@moontra/moonui 6.2.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/index.global.js +0 -29
- package/dist/hooks/index.global.js.map +1 -1
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.global.js +13 -348
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +287 -272
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +251 -236
- package/dist/index.mjs.map +1 -1
- package/dist/lib/theme.global.js +0 -37
- package/dist/lib/theme.global.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/__tests__/badge.test.tsx +67 -9
- package/src/components/ui/badge.tsx +12 -2
- package/src/lib/utils.ts +25 -0
package/dist/index.global.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
/** @license MoonUI v1.0.0 - MIT License - https://moonui.dev */
|
|
4
|
-
import{a as Az,b as ru,c as R,d as to,e as My,f as Bm,g as M,h as N}from"./chunk-VXDFZPDA.global.js";var kP=ru(Xe=>{"use strict";function Oy(e,t){var o=e.length;e.push(t);e:for(;0<o;){var r=o-1>>>1,n=e[r];if(0<zm(n,t))e[r]=t,e[o]=n,o=r;else break e}}function dn(e){return e.length===0?null:e[0]}function Wm(e){if(e.length===0)return null;var t=e[0],o=e.pop();if(o!==t){e[0]=o;e:for(var r=0,n=e.length,a=n>>>1;r<a;){var i=2*(r+1)-1,s=e[i],l=i+1,u=e[l];if(0>zm(s,o))l<n&&0>zm(u,s)?(e[r]=u,e[l]=o,r=l):(e[r]=s,e[i]=o,r=i);else if(l<n&&0>zm(u,o))e[r]=u,e[l]=o,r=l;else break e}}return t}function zm(e,t){var o=e.sortIndex-t.sortIndex;return o!==0?o:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(wP=performance,Xe.unstable_now=function(){return wP.now()}):(Ay=Date,CP=Ay.now(),Xe.unstable_now=function(){return Ay.now()-CP});var wP,Ay,CP,Yn=[],yi=[],Gz=1,Er=null,fo=3,jm=!1,Vs=!1,wd=!1,RP=typeof setTimeout=="function"?setTimeout:null,IP=typeof clearTimeout=="function"?clearTimeout:null,SP=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Fy(e){for(var t=dn(yi);t!==null;){if(t.callback===null)Wm(yi);else if(t.startTime<=e)Wm(yi),t.sortIndex=t.expirationTime,Oy(Yn,t);else break;t=dn(yi)}}function _y(e){if(wd=!1,Fy(e),!Vs)if(dn(Yn)!==null)Vs=!0,By(Vy);else{var t=dn(yi);t!==null&&Hy(_y,t.startTime-e)}}function Vy(e,t){Vs=!1,wd&&(wd=!1,IP(Cd),Cd=-1),jm=!0;var o=fo;try{for(Fy(t),Er=dn(Yn);Er!==null&&(!(Er.expirationTime>t)||e&&!TP());){var r=Er.callback;if(typeof r=="function"){Er.callback=null,fo=Er.priorityLevel;var n=r(Er.expirationTime<=t);t=Xe.unstable_now(),typeof n=="function"?Er.callback=n:Er===dn(Yn)&&Wm(Yn),Fy(t)}else Wm(Yn);Er=dn(Yn)}if(Er!==null)var a=!0;else{var i=dn(yi);i!==null&&Hy(_y,i.startTime-t),a=!1}return a}finally{Er=null,fo=o,jm=!1}}var qm=!1,Gm=null,Cd=-1,PP=5,LP=-1;function TP(){return!(Xe.unstable_now()-LP<PP)}function Dy(){if(Gm!==null){var e=Xe.unstable_now();LP=e;var t=!0;try{t=Gm(!0,e)}finally{t?yd():(qm=!1,Gm=null)}}else qm=!1}var yd;typeof SP=="function"?yd=function(){SP(Dy)}:typeof MessageChannel<"u"?(Ny=new MessageChannel,bP=Ny.port2,Ny.port1.onmessage=Dy,yd=function(){bP.postMessage(null)}):yd=function(){RP(Dy,0)};var Ny,bP;function By(e){Gm=e,qm||(qm=!0,yd())}function Hy(e,t){Cd=RP(function(){e(Xe.unstable_now())},t)}Xe.unstable_IdlePriority=5;Xe.unstable_ImmediatePriority=1;Xe.unstable_LowPriority=4;Xe.unstable_NormalPriority=3;Xe.unstable_Profiling=null;Xe.unstable_UserBlockingPriority=2;Xe.unstable_cancelCallback=function(e){e.callback=null};Xe.unstable_continueExecution=function(){Vs||jm||(Vs=!0,By(Vy))};Xe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):PP=0<e?Math.floor(1e3/e):5};Xe.unstable_getCurrentPriorityLevel=function(){return fo};Xe.unstable_getFirstCallbackNode=function(){return dn(Yn)};Xe.unstable_next=function(e){switch(fo){case 1:case 2:case 3:var t=3;break;default:t=fo}var o=fo;fo=t;try{return e()}finally{fo=o}};Xe.unstable_pauseExecution=function(){};Xe.unstable_requestPaint=function(){};Xe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var o=fo;fo=e;try{return t()}finally{fo=o}};Xe.unstable_scheduleCallback=function(e,t,o){var r=Xe.unstable_now();switch(typeof o=="object"&&o!==null?(o=o.delay,o=typeof o=="number"&&0<o?r+o:r):o=r,e){case 1:var n=-1;break;case 2:n=250;break;case 5:n=1073741823;break;case 4:n=1e4;break;default:n=5e3}return n=o+n,e={id:Gz++,callback:t,priorityLevel:e,startTime:o,expirationTime:n,sortIndex:-1},o>r?(e.sortIndex=o,Oy(yi,e),dn(Yn)===null&&e===dn(yi)&&(wd?(IP(Cd),Cd=-1):wd=!0,Hy(_y,o-r))):(e.sortIndex=n,Oy(Yn,e),Vs||jm||(Vs=!0,By(Vy))),e};Xe.unstable_shouldYield=TP;Xe.unstable_wrapCallback=function(e){var t=fo;return function(){var o=fo;fo=t;try{return e.apply(this,arguments)}finally{fo=o}}}});var EP=ru((Tee,MP)=>{"use strict";MP.exports=kP()});var OT=ru(gr=>{"use strict";var Wz=M(),pr=EP();function q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)t+="&args[]="+encodeURIComponent(arguments[o]);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 VL=new Set,Gd={};function Qs(e,t){Iu(e,t),Iu(e+"Capture",t)}function Iu(e,t){for(Gd[e]=t,e=0;e<t.length;e++)VL.add(t[e])}var La=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u0=Object.prototype.hasOwnProperty,jz=/^[: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]*$/,AP={},DP={};function qz(e){return u0.call(DP,e)?!0:u0.call(AP,e)?!1:jz.test(e)?DP[e]=!0:(AP[e]=!0,!1)}function $z(e,t,o,r){if(o!==null&&o.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Kz(e,t,o,r){if(t===null||typeof t>"u"||$z(e,t,o,r))return!0;if(r)return!1;if(o!==null)switch(o.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 Do(e,t,o,r,n,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=n,this.mustUseProperty=o,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var no={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){no[e]=new Do(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];no[t]=new Do(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){no[e]=new Do(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){no[e]=new Do(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){no[e]=new Do(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){no[e]=new Do(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){no[e]=new Do(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){no[e]=new Do(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){no[e]=new Do(e,5,!1,e.toLowerCase(),null,!1,!1)});var tw=/[\-:]([a-z])/g;function ow(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(tw,ow);no[t]=new Do(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(tw,ow);no[t]=new Do(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(tw,ow);no[t]=new Do(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){no[e]=new Do(e,1,!1,e.toLowerCase(),null,!1,!1)});no.xlinkHref=new Do("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){no[e]=new Do(e,1,!1,e.toLowerCase(),null,!0,!0)});function rw(e,t,o,r){var n=no.hasOwnProperty(t)?no[t]:null;(n!==null?n.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Kz(t,o,n,r)&&(o=null),r||n===null?qz(t)&&(o===null?e.removeAttribute(t):e.setAttribute(t,""+o)):n.mustUseProperty?e[n.propertyName]=o===null?n.type===3?!1:"":o:(t=n.attributeName,r=n.attributeNamespace,o===null?e.removeAttribute(t):(n=n.type,o=n===3||n===4&&o===!0?"":""+o,r?e.setAttributeNS(r,t,o):e.setAttribute(t,o))))}var Ea=Wz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$m=Symbol.for("react.element"),su=Symbol.for("react.portal"),lu=Symbol.for("react.fragment"),nw=Symbol.for("react.strict_mode"),c0=Symbol.for("react.profiler"),BL=Symbol.for("react.provider"),HL=Symbol.for("react.context"),aw=Symbol.for("react.forward_ref"),d0=Symbol.for("react.suspense"),f0=Symbol.for("react.suspense_list"),iw=Symbol.for("react.memo"),Ci=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var UL=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var NP=Symbol.iterator;function Sd(e){return e===null||typeof e!="object"?null:(e=NP&&e[NP]||e["@@iterator"],typeof e=="function"?e:null)}var pt=Object.assign,Uy;function Md(e){if(Uy===void 0)try{throw Error()}catch(o){var t=o.stack.trim().match(/\n( *(at )?)/);Uy=t&&t[1]||""}return`
|
|
5
|
-
`+
|
|
4
|
+
import{a as Nz,b as ru,c as R,d as to,e as Ey,f as Hm,g as M,h as N}from"./chunk-VXDFZPDA.global.js";var MP=ru(Xe=>{"use strict";function Fy(e,t){var o=e.length;e.push(t);e:for(;0<o;){var r=o-1>>>1,n=e[r];if(0<Gm(n,t))e[r]=t,e[o]=n,o=r;else break e}}function dn(e){return e.length===0?null:e[0]}function jm(e){if(e.length===0)return null;var t=e[0],o=e.pop();if(o!==t){e[0]=o;e:for(var r=0,n=e.length,a=n>>>1;r<a;){var i=2*(r+1)-1,s=e[i],l=i+1,u=e[l];if(0>Gm(s,o))l<n&&0>Gm(u,s)?(e[r]=u,e[l]=o,r=l):(e[r]=s,e[i]=o,r=i);else if(l<n&&0>Gm(u,o))e[r]=u,e[l]=o,r=l;else break e}}return t}function Gm(e,t){var o=e.sortIndex-t.sortIndex;return o!==0?o:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(CP=performance,Xe.unstable_now=function(){return CP.now()}):(Dy=Date,SP=Dy.now(),Xe.unstable_now=function(){return Dy.now()-SP});var CP,Dy,SP,Yn=[],yi=[],jz=1,Er=null,fo=3,qm=!1,Vs=!1,wd=!1,IP=typeof setTimeout=="function"?setTimeout:null,PP=typeof clearTimeout=="function"?clearTimeout:null,bP=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _y(e){for(var t=dn(yi);t!==null;){if(t.callback===null)jm(yi);else if(t.startTime<=e)jm(yi),t.sortIndex=t.expirationTime,Fy(Yn,t);else break;t=dn(yi)}}function Vy(e){if(wd=!1,_y(e),!Vs)if(dn(Yn)!==null)Vs=!0,Hy(By);else{var t=dn(yi);t!==null&&Uy(Vy,t.startTime-e)}}function By(e,t){Vs=!1,wd&&(wd=!1,PP(Cd),Cd=-1),qm=!0;var o=fo;try{for(_y(t),Er=dn(Yn);Er!==null&&(!(Er.expirationTime>t)||e&&!kP());){var r=Er.callback;if(typeof r=="function"){Er.callback=null,fo=Er.priorityLevel;var n=r(Er.expirationTime<=t);t=Xe.unstable_now(),typeof n=="function"?Er.callback=n:Er===dn(Yn)&&jm(Yn),_y(t)}else jm(Yn);Er=dn(Yn)}if(Er!==null)var a=!0;else{var i=dn(yi);i!==null&&Uy(Vy,i.startTime-t),a=!1}return a}finally{Er=null,fo=o,qm=!1}}var $m=!1,Wm=null,Cd=-1,LP=5,TP=-1;function kP(){return!(Xe.unstable_now()-TP<LP)}function Ny(){if(Wm!==null){var e=Xe.unstable_now();TP=e;var t=!0;try{t=Wm(!0,e)}finally{t?yd():($m=!1,Wm=null)}}else $m=!1}var yd;typeof bP=="function"?yd=function(){bP(Ny)}:typeof MessageChannel<"u"?(Oy=new MessageChannel,RP=Oy.port2,Oy.port1.onmessage=Ny,yd=function(){RP.postMessage(null)}):yd=function(){IP(Ny,0)};var Oy,RP;function Hy(e){Wm=e,$m||($m=!0,yd())}function Uy(e,t){Cd=IP(function(){e(Xe.unstable_now())},t)}Xe.unstable_IdlePriority=5;Xe.unstable_ImmediatePriority=1;Xe.unstable_LowPriority=4;Xe.unstable_NormalPriority=3;Xe.unstable_Profiling=null;Xe.unstable_UserBlockingPriority=2;Xe.unstable_cancelCallback=function(e){e.callback=null};Xe.unstable_continueExecution=function(){Vs||qm||(Vs=!0,Hy(By))};Xe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):LP=0<e?Math.floor(1e3/e):5};Xe.unstable_getCurrentPriorityLevel=function(){return fo};Xe.unstable_getFirstCallbackNode=function(){return dn(Yn)};Xe.unstable_next=function(e){switch(fo){case 1:case 2:case 3:var t=3;break;default:t=fo}var o=fo;fo=t;try{return e()}finally{fo=o}};Xe.unstable_pauseExecution=function(){};Xe.unstable_requestPaint=function(){};Xe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var o=fo;fo=e;try{return t()}finally{fo=o}};Xe.unstable_scheduleCallback=function(e,t,o){var r=Xe.unstable_now();switch(typeof o=="object"&&o!==null?(o=o.delay,o=typeof o=="number"&&0<o?r+o:r):o=r,e){case 1:var n=-1;break;case 2:n=250;break;case 5:n=1073741823;break;case 4:n=1e4;break;default:n=5e3}return n=o+n,e={id:jz++,callback:t,priorityLevel:e,startTime:o,expirationTime:n,sortIndex:-1},o>r?(e.sortIndex=o,Fy(yi,e),dn(Yn)===null&&e===dn(yi)&&(wd?(PP(Cd),Cd=-1):wd=!0,Uy(Vy,o-r))):(e.sortIndex=n,Fy(Yn,e),Vs||qm||(Vs=!0,Hy(By))),e};Xe.unstable_shouldYield=kP;Xe.unstable_wrapCallback=function(e){var t=fo;return function(){var o=fo;fo=t;try{return e.apply(this,arguments)}finally{fo=o}}}});var AP=ru((Mee,EP)=>{"use strict";EP.exports=MP()});var F1=ru(gr=>{"use strict";var qz=M(),pr=AP();function q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)t+="&args[]="+encodeURIComponent(arguments[o]);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 BL=new Set,Gd={};function Qs(e,t){Iu(e,t),Iu(e+"Capture",t)}function Iu(e,t){for(Gd[e]=t,e=0;e<t.length;e++)BL.add(t[e])}var La=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c0=Object.prototype.hasOwnProperty,$z=/^[: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]*$/,DP={},NP={};function Kz(e){return c0.call(NP,e)?!0:c0.call(DP,e)?!1:$z.test(e)?NP[e]=!0:(DP[e]=!0,!1)}function Xz(e,t,o,r){if(o!==null&&o.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Yz(e,t,o,r){if(t===null||typeof t>"u"||Xz(e,t,o,r))return!0;if(r)return!1;if(o!==null)switch(o.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 Do(e,t,o,r,n,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=n,this.mustUseProperty=o,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var no={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){no[e]=new Do(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];no[t]=new Do(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){no[e]=new Do(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){no[e]=new Do(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){no[e]=new Do(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){no[e]=new Do(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){no[e]=new Do(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){no[e]=new Do(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){no[e]=new Do(e,5,!1,e.toLowerCase(),null,!1,!1)});var ow=/[\-:]([a-z])/g;function rw(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(ow,rw);no[t]=new Do(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(ow,rw);no[t]=new Do(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(ow,rw);no[t]=new Do(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){no[e]=new Do(e,1,!1,e.toLowerCase(),null,!1,!1)});no.xlinkHref=new Do("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){no[e]=new Do(e,1,!1,e.toLowerCase(),null,!0,!0)});function nw(e,t,o,r){var n=no.hasOwnProperty(t)?no[t]:null;(n!==null?n.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Yz(t,o,n,r)&&(o=null),r||n===null?Kz(t)&&(o===null?e.removeAttribute(t):e.setAttribute(t,""+o)):n.mustUseProperty?e[n.propertyName]=o===null?n.type===3?!1:"":o:(t=n.attributeName,r=n.attributeNamespace,o===null?e.removeAttribute(t):(n=n.type,o=n===3||n===4&&o===!0?"":""+o,r?e.setAttributeNS(r,t,o):e.setAttribute(t,o))))}var Ea=qz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Km=Symbol.for("react.element"),su=Symbol.for("react.portal"),lu=Symbol.for("react.fragment"),aw=Symbol.for("react.strict_mode"),d0=Symbol.for("react.profiler"),HL=Symbol.for("react.provider"),UL=Symbol.for("react.context"),iw=Symbol.for("react.forward_ref"),f0=Symbol.for("react.suspense"),p0=Symbol.for("react.suspense_list"),sw=Symbol.for("react.memo"),Ci=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var zL=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var OP=Symbol.iterator;function Sd(e){return e===null||typeof e!="object"?null:(e=OP&&e[OP]||e["@@iterator"],typeof e=="function"?e:null)}var pt=Object.assign,zy;function Md(e){if(zy===void 0)try{throw Error()}catch(o){var t=o.stack.trim().match(/\n( *(at )?)/);zy=t&&t[1]||""}return`
|
|
5
|
+
`+zy+e}var Gy=!1;function Wy(e,t){if(!e||Gy)return"";Gy=!0;var o=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 n=u.stack.split(`
|
|
6
6
|
`),a=r.stack.split(`
|
|
7
7
|
`),i=n.length-1,s=a.length-1;1<=i&&0<=s&&n[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(n[i]!==a[s]){if(i!==1||s!==1)do if(i--,s--,0>s||n[i]!==a[s]){var l=`
|
|
8
|
-
`+n[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{zy=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?Md(e):""}function Xz(e){switch(e.tag){case 5:return Md(e.type);case 16:return Md("Lazy");case 13:return Md("Suspense");case 19:return Md("SuspenseList");case 0:case 2:case 15:return e=Gy(e.type,!1),e;case 11:return e=Gy(e.type.render,!1),e;case 1:return e=Gy(e.type,!0),e;default:return""}}function p0(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 lu:return"Fragment";case su:return"Portal";case c0:return"Profiler";case nw:return"StrictMode";case d0:return"Suspense";case f0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case HL:return(e.displayName||"Context")+".Consumer";case BL:return(e._context.displayName||"Context")+".Provider";case aw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case iw:return t=e.displayName||null,t!==null?t:p0(e.type)||"Memo";case Ci:t=e._payload,e=e._init;try{return p0(e(t))}catch{}}return null}function Yz(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 p0(t);case 8:return t===nw?"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 Oi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qz(e){var t=zL(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var n=o.get,a=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){r=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Km(e){e._valueTracker||(e._valueTracker=Qz(e))}function GL(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var o=t.getValue(),r="";return e&&(r=zL(e)?e.checked?"true":"false":e.value),e=r,e!==o?(t.setValue(e),!0):!1}function Sg(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 m0(e,t){var o=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function OP(e,t){var o=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;o=Oi(t.value!=null?t.value:o),e._wrapperState={initialChecked:r,initialValue:o,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function WL(e,t){t=t.checked,t!=null&&rw(e,"checked",t,!1)}function g0(e,t){WL(e,t);var o=Oi(t.value),r=t.type;if(o!=null)r==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?h0(e,t.type,o):t.hasOwnProperty("defaultValue")&&h0(e,t.type,Oi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function FP(e,t,o){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,o||t===e.value||(e.value=t),e.defaultValue=t}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function h0(e,t,o){(t!=="number"||Sg(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Ed=Array.isArray;function yu(e,t,o,r){if(e=e.options,t){t={};for(var n=0;n<o.length;n++)t["$"+o[n]]=!0;for(o=0;o<e.length;o++)n=t.hasOwnProperty("$"+e[o].value),e[o].selected!==n&&(e[o].selected=n),n&&r&&(e[o].defaultSelected=!0)}else{for(o=""+Oi(o),t=null,n=0;n<e.length;n++){if(e[n].value===o){e[n].selected=!0,r&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function v0(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return pt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _P(e,t){var o=t.value;if(o==null){if(o=t.children,t=t.defaultValue,o!=null){if(t!=null)throw Error(q(92));if(Ed(o)){if(1<o.length)throw Error(q(93));o=o[0]}t=o}t==null&&(t=""),o=t}e._wrapperState={initialValue:Oi(o)}}function jL(e,t){var o=Oi(t.value),r=Oi(t.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),t.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),r!=null&&(e.defaultValue=""+r)}function VP(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function qL(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 x0(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qL(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xm,$L=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,o,r,n){MSApp.execUnsafeLocalFunction(function(){return e(t,o,r,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Xm=Xm||document.createElement("div"),Xm.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wd(e,t){if(t){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=t;return}}e.textContent=t}var Nd={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},Zz=["Webkit","ms","Moz","O"];Object.keys(Nd).forEach(function(e){Zz.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nd[t]=Nd[e]})});function KL(e,t,o){return t==null||typeof t=="boolean"||t===""?"":o||typeof t!="number"||t===0||Nd.hasOwnProperty(e)&&Nd[e]?(""+t).trim():t+"px"}function XL(e,t){e=e.style;for(var o in t)if(t.hasOwnProperty(o)){var r=o.indexOf("--")===0,n=KL(o,t[o],r);o==="float"&&(o="cssFloat"),r?e.setProperty(o,n):e[o]=n}}var Jz=pt({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 y0(e,t){if(t){if(Jz[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function w0(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 C0=null;function sw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var S0=null,wu=null,Cu=null;function BP(e){if(e=uf(e)){if(typeof S0!="function")throw Error(q(280));var t=e.stateNode;t&&(t=Yg(t),S0(e.stateNode,e.type,t))}}function YL(e){wu?Cu?Cu.push(e):Cu=[e]:wu=e}function QL(){if(wu){var e=wu,t=Cu;if(Cu=wu=null,BP(e),t)for(e=0;e<t.length;e++)BP(t[e])}}function ZL(e,t){return e(t)}function JL(){}var Wy=!1;function e1(e,t,o){if(Wy)return e(t,o);Wy=!0;try{return ZL(e,t,o)}finally{Wy=!1,(wu!==null||Cu!==null)&&(JL(),QL())}}function jd(e,t){var o=e.stateNode;if(o===null)return null;var r=Yg(o);if(r===null)return null;o=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(o&&typeof o!="function")throw Error(q(231,t,typeof o));return o}var b0=!1;if(La)try{au={},Object.defineProperty(au,"passive",{get:function(){b0=!0}}),window.addEventListener("test",au,au),window.removeEventListener("test",au,au)}catch{b0=!1}var au;function e4(e,t,o,r,n,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(o,u)}catch(c){this.onError(c)}}var Od=!1,bg=null,Rg=!1,R0=null,t4={onError:function(e){Od=!0,bg=e}};function o4(e,t,o,r,n,a,i,s,l){Od=!1,bg=null,e4.apply(t4,arguments)}function r4(e,t,o,r,n,a,i,s,l){if(o4.apply(this,arguments),Od){if(Od){var u=bg;Od=!1,bg=null}else throw Error(q(198));Rg||(Rg=!0,R0=u)}}function Zs(e){var t=e,o=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(o=t.return),e=t.return;while(e)}return t.tag===3?o:null}function t1(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 HP(e){if(Zs(e)!==e)throw Error(q(188))}function n4(e){var t=e.alternate;if(!t){if(t=Zs(e),t===null)throw Error(q(188));return t!==e?null:e}for(var o=e,r=t;;){var n=o.return;if(n===null)break;var a=n.alternate;if(a===null){if(r=n.return,r!==null){o=r;continue}break}if(n.child===a.child){for(a=n.child;a;){if(a===o)return HP(n),e;if(a===r)return HP(n),t;a=a.sibling}throw Error(q(188))}if(o.return!==r.return)o=n,r=a;else{for(var i=!1,s=n.child;s;){if(s===o){i=!0,o=n,r=a;break}if(s===r){i=!0,r=n,o=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===o){i=!0,o=a,r=n;break}if(s===r){i=!0,r=a,o=n;break}s=s.sibling}if(!i)throw Error(q(189))}}if(o.alternate!==r)throw Error(q(190))}if(o.tag!==3)throw Error(q(188));return o.stateNode.current===o?e:t}function o1(e){return e=n4(e),e!==null?r1(e):null}function r1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=r1(e);if(t!==null)return t;e=e.sibling}return null}var n1=pr.unstable_scheduleCallback,UP=pr.unstable_cancelCallback,a4=pr.unstable_shouldYield,i4=pr.unstable_requestPaint,St=pr.unstable_now,s4=pr.unstable_getCurrentPriorityLevel,lw=pr.unstable_ImmediatePriority,a1=pr.unstable_UserBlockingPriority,Ig=pr.unstable_NormalPriority,l4=pr.unstable_LowPriority,i1=pr.unstable_IdlePriority,qg=null,ea=null;function u4(e){if(ea&&typeof ea.onCommitFiberRoot=="function")try{ea.onCommitFiberRoot(qg,e,void 0,(e.current.flags&128)===128)}catch{}}var hn=Math.clz32?Math.clz32:f4,c4=Math.log,d4=Math.LN2;function f4(e){return e>>>=0,e===0?32:31-(c4(e)/d4|0)|0}var Ym=64,Qm=4194304;function Ad(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 Pg(e,t){var o=e.pendingLanes;if(o===0)return 0;var r=0,n=e.suspendedLanes,a=e.pingedLanes,i=o&268435455;if(i!==0){var s=i&~n;s!==0?r=Ad(s):(a&=i,a!==0&&(r=Ad(a)))}else i=o&~n,i!==0?r=Ad(i):a!==0&&(r=Ad(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&n)&&(n=r&-r,a=t&-t,n>=a||n===16&&(a&4194240)!==0))return t;if(r&4&&(r|=o&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)o=31-hn(t),n=1<<o,r|=e[o],t&=~n;return r}function p4(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 m4(e,t){for(var o=e.suspendedLanes,r=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-hn(a),s=1<<i,l=n[i];l===-1?(!(s&o)||s&r)&&(n[i]=p4(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function I0(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function s1(){var e=Ym;return Ym<<=1,!(Ym&4194240)&&(Ym=64),e}function jy(e){for(var t=[],o=0;31>o;o++)t.push(e);return t}function sf(e,t,o){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hn(t),e[t]=o}function g4(e,t){var o=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<o;){var n=31-hn(o),a=1<<n;t[n]=0,r[n]=-1,e[n]=-1,o&=~a}}function uw(e,t){var o=e.entangledLanes|=t;for(e=e.entanglements;o;){var r=31-hn(o),n=1<<r;n&t|e[r]&t&&(e[r]|=t),o&=~n}}var Ge=0;function l1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var u1,cw,c1,d1,f1,P0=!1,Zm=[],Li=null,Ti=null,ki=null,qd=new Map,$d=new Map,bi=[],h4="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 zP(e,t){switch(e){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":Ti=null;break;case"mouseover":case"mouseout":ki=null;break;case"pointerover":case"pointerout":qd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$d.delete(t.pointerId)}}function bd(e,t,o,r,n,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:o,eventSystemFlags:r,nativeEvent:a,targetContainers:[n]},t!==null&&(t=uf(t),t!==null&&cw(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function v4(e,t,o,r,n){switch(t){case"focusin":return Li=bd(Li,e,t,o,r,n),!0;case"dragenter":return Ti=bd(Ti,e,t,o,r,n),!0;case"mouseover":return ki=bd(ki,e,t,o,r,n),!0;case"pointerover":var a=n.pointerId;return qd.set(a,bd(qd.get(a)||null,e,t,o,r,n)),!0;case"gotpointercapture":return a=n.pointerId,$d.set(a,bd($d.get(a)||null,e,t,o,r,n)),!0}return!1}function p1(e){var t=Us(e.target);if(t!==null){var o=Zs(t);if(o!==null){if(t=o.tag,t===13){if(t=t1(o),t!==null){e.blockedOn=t,f1(e.priority,function(){c1(o)});return}}else if(t===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var o=L0(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var r=new o.constructor(o.type,o);C0=r,o.target.dispatchEvent(r),C0=null}else return t=uf(o),t!==null&&cw(t),e.blockedOn=o,!1;t.shift()}return!0}function GP(e,t,o){fg(e)&&o.delete(t)}function x4(){P0=!1,Li!==null&&fg(Li)&&(Li=null),Ti!==null&&fg(Ti)&&(Ti=null),ki!==null&&fg(ki)&&(ki=null),qd.forEach(GP),$d.forEach(GP)}function Rd(e,t){e.blockedOn===t&&(e.blockedOn=null,P0||(P0=!0,pr.unstable_scheduleCallback(pr.unstable_NormalPriority,x4)))}function Kd(e){function t(n){return Rd(n,e)}if(0<Zm.length){Rd(Zm[0],e);for(var o=1;o<Zm.length;o++){var r=Zm[o];r.blockedOn===e&&(r.blockedOn=null)}}for(Li!==null&&Rd(Li,e),Ti!==null&&Rd(Ti,e),ki!==null&&Rd(ki,e),qd.forEach(t),$d.forEach(t),o=0;o<bi.length;o++)r=bi[o],r.blockedOn===e&&(r.blockedOn=null);for(;0<bi.length&&(o=bi[0],o.blockedOn===null);)p1(o),o.blockedOn===null&&bi.shift()}var Su=Ea.ReactCurrentBatchConfig,Lg=!0;function y4(e,t,o,r){var n=Ge,a=Su.transition;Su.transition=null;try{Ge=1,dw(e,t,o,r)}finally{Ge=n,Su.transition=a}}function w4(e,t,o,r){var n=Ge,a=Su.transition;Su.transition=null;try{Ge=4,dw(e,t,o,r)}finally{Ge=n,Su.transition=a}}function dw(e,t,o,r){if(Lg){var n=L0(e,t,o,r);if(n===null)Zy(e,t,r,Tg,o),zP(e,r);else if(v4(n,e,t,o,r))r.stopPropagation();else if(zP(e,r),t&4&&-1<h4.indexOf(e)){for(;n!==null;){var a=uf(n);if(a!==null&&u1(a),a=L0(e,t,o,r),a===null&&Zy(e,t,r,Tg,o),a===n)break;n=a}n!==null&&r.stopPropagation()}else Zy(e,t,r,null,o)}}var Tg=null;function L0(e,t,o,r){if(Tg=null,e=sw(r),e=Us(e),e!==null)if(t=Zs(e),t===null)e=null;else if(o=t.tag,o===13){if(e=t1(t),e!==null)return e;e=null}else if(o===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Tg=e,null}function m1(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(s4()){case lw:return 1;case a1:return 4;case Ig:case l4:return 16;case i1:return 536870912;default:return 16}default:return 16}}var Ii=null,fw=null,pg=null;function g1(){if(pg)return pg;var e,t=fw,o=t.length,r,n="value"in Ii?Ii.value:Ii.textContent,a=n.length;for(e=0;e<o&&t[e]===n[e];e++);var i=o-e;for(r=1;r<=i&&t[o-r]===n[a-r];r++);return pg=n.slice(e,1<r?1-r:void 0)}function mg(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 Jm(){return!0}function WP(){return!1}function mr(e){function t(o,r,n,a,i){this._reactName=o,this._targetInst=n,this.type=r,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(o=e[s],this[s]=o?o(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Jm:WP,this.isPropagationStopped=WP,this}return pt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Jm)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Jm)},persist:function(){},isPersistent:Jm}),t}var Au={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pw=mr(Au),lf=pt({},Au,{view:0,detail:0}),C4=mr(lf),qy,$y,Id,$g=pt({},lf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mw,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!==Id&&(Id&&e.type==="mousemove"?(qy=e.screenX-Id.screenX,$y=e.screenY-Id.screenY):$y=qy=0,Id=e),qy)},movementY:function(e){return"movementY"in e?e.movementY:$y}}),jP=mr($g),S4=pt({},$g,{dataTransfer:0}),b4=mr(S4),R4=pt({},lf,{relatedTarget:0}),Ky=mr(R4),I4=pt({},Au,{animationName:0,elapsedTime:0,pseudoElement:0}),P4=mr(I4),L4=pt({},Au,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),T4=mr(L4),k4=pt({},Au,{data:0}),qP=mr(k4),M4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},E4={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"},A4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function D4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=A4[e])?!!t[e]:!1}function mw(){return D4}var N4=pt({},lf,{key:function(e){if(e.key){var t=M4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mg(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?E4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mw,charCode:function(e){return e.type==="keypress"?mg(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mg(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),O4=mr(N4),F4=pt({},$g,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$P=mr(F4),_4=pt({},lf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mw}),V4=mr(_4),B4=pt({},Au,{propertyName:0,elapsedTime:0,pseudoElement:0}),H4=mr(B4),U4=pt({},$g,{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}),z4=mr(U4),G4=[9,13,27,32],gw=La&&"CompositionEvent"in window,Fd=null;La&&"documentMode"in document&&(Fd=document.documentMode);var W4=La&&"TextEvent"in window&&!Fd,h1=La&&(!gw||Fd&&8<Fd&&11>=Fd),KP=String.fromCharCode(32),XP=!1;function v1(e,t){switch(e){case"keyup":return G4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function x1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var uu=!1;function j4(e,t){switch(e){case"compositionend":return x1(t);case"keypress":return t.which!==32?null:(XP=!0,KP);case"textInput":return e=t.data,e===KP&&XP?null:e;default:return null}}function q4(e,t){if(uu)return e==="compositionend"||!gw&&v1(e,t)?(e=g1(),pg=fw=Ii=null,uu=!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 h1&&t.locale!=="ko"?null:t.data;default:return null}}var $4={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 YP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$4[e.type]:t==="textarea"}function y1(e,t,o,r){YL(r),t=kg(t,"onChange"),0<t.length&&(o=new pw("onChange","change",null,o,r),e.push({event:o,listeners:t}))}var _d=null,Xd=null;function K4(e){M1(e,0)}function Kg(e){var t=fu(e);if(GL(t))return e}function X4(e,t){if(e==="change")return t}var w1=!1;La&&(La?(tg="oninput"in document,tg||(Xy=document.createElement("div"),Xy.setAttribute("oninput","return;"),tg=typeof Xy.oninput=="function"),eg=tg):eg=!1,w1=eg&&(!document.documentMode||9<document.documentMode));var eg,tg,Xy;function QP(){_d&&(_d.detachEvent("onpropertychange",C1),Xd=_d=null)}function C1(e){if(e.propertyName==="value"&&Kg(Xd)){var t=[];y1(t,Xd,e,sw(e)),e1(K4,t)}}function Y4(e,t,o){e==="focusin"?(QP(),_d=t,Xd=o,_d.attachEvent("onpropertychange",C1)):e==="focusout"&&QP()}function Q4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Kg(Xd)}function Z4(e,t){if(e==="click")return Kg(t)}function J4(e,t){if(e==="input"||e==="change")return Kg(t)}function e5(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:e5;function Yd(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(r=0;r<o.length;r++){var n=o[r];if(!u0.call(t,n)||!xn(e[n],t[n]))return!1}return!0}function ZP(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function JP(e,t){var o=ZP(e);e=0;for(var r;o;){if(o.nodeType===3){if(r=e+o.textContent.length,e<=t&&r>=t)return{node:o,offset:t-e};e=r}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=ZP(o)}}function S1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?S1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function b1(){for(var e=window,t=Sg();t instanceof e.HTMLIFrameElement;){try{var o=typeof t.contentWindow.location.href=="string"}catch{o=!1}if(o)e=t.contentWindow;else break;t=Sg(e.document)}return t}function hw(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 t5(e){var t=b1(),o=e.focusedElem,r=e.selectionRange;if(t!==o&&o&&o.ownerDocument&&S1(o.ownerDocument.documentElement,o)){if(r!==null&&hw(o)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in o)o.selectionStart=t,o.selectionEnd=Math.min(e,o.value.length);else if(e=(t=o.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=o.textContent.length,a=Math.min(r.start,n);r=r.end===void 0?a:Math.min(r.end,n),!e.extend&&a>r&&(n=r,r=a,a=n),n=JP(o,a);var i=JP(o,r);n&&i&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=o;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<t.length;o++)e=t[o],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var o5=La&&"documentMode"in document&&11>=document.documentMode,cu=null,T0=null,Vd=null,k0=!1;function eL(e,t,o){var r=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;k0||cu==null||cu!==Sg(r)||(r=cu,"selectionStart"in r&&hw(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}),Vd&&Yd(Vd,r)||(Vd=r,r=kg(T0,"onSelect"),0<r.length&&(t=new pw("onSelect","select",null,t,o),e.push({event:t,listeners:r}),t.target=cu)))}function og(e,t){var o={};return o[e.toLowerCase()]=t.toLowerCase(),o["Webkit"+e]="webkit"+t,o["Moz"+e]="moz"+t,o}var du={animationend:og("Animation","AnimationEnd"),animationiteration:og("Animation","AnimationIteration"),animationstart:og("Animation","AnimationStart"),transitionend:og("Transition","TransitionEnd")},Yy={},R1={};La&&(R1=document.createElement("div").style,"AnimationEvent"in window||(delete du.animationend.animation,delete du.animationiteration.animation,delete du.animationstart.animation),"TransitionEvent"in window||delete du.transitionend.transition);function Xg(e){if(Yy[e])return Yy[e];if(!du[e])return e;var t=du[e],o;for(o in t)if(t.hasOwnProperty(o)&&o in R1)return Yy[e]=t[o];return e}var I1=Xg("animationend"),P1=Xg("animationiteration"),L1=Xg("animationstart"),T1=Xg("transitionend"),k1=new Map,tL="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 _i(e,t){k1.set(e,t),Qs(t,[e])}for(rg=0;rg<tL.length;rg++)ng=tL[rg],oL=ng.toLowerCase(),rL=ng[0].toUpperCase()+ng.slice(1),_i(oL,"on"+rL);var ng,oL,rL,rg;_i(I1,"onAnimationEnd");_i(P1,"onAnimationIteration");_i(L1,"onAnimationStart");_i("dblclick","onDoubleClick");_i("focusin","onFocus");_i("focusout","onBlur");_i(T1,"onTransitionEnd");Iu("onMouseEnter",["mouseout","mouseover"]);Iu("onMouseLeave",["mouseout","mouseover"]);Iu("onPointerEnter",["pointerout","pointerover"]);Iu("onPointerLeave",["pointerout","pointerover"]);Qs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dd="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(" "),r5=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dd));function nL(e,t,o){var r=e.type||"unknown-event";e.currentTarget=o,r4(r,t,void 0,e),e.currentTarget=null}function M1(e,t){t=(t&4)!==0;for(var o=0;o<e.length;o++){var r=e[o],n=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&n.isPropagationStopped())break e;nL(n,s,u),a=l}else for(i=0;i<r.length;i++){if(s=r[i],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&n.isPropagationStopped())break e;nL(n,s,u),a=l}}}if(Rg)throw e=R0,Rg=!1,R0=null,e}function et(e,t){var o=t[N0];o===void 0&&(o=t[N0]=new Set);var r=e+"__bubble";o.has(r)||(E1(t,e,2,!1),o.add(r))}function Qy(e,t,o){var r=0;t&&(r|=4),E1(o,e,r,t)}var ag="_reactListening"+Math.random().toString(36).slice(2);function Qd(e){if(!e[ag]){e[ag]=!0,VL.forEach(function(o){o!=="selectionchange"&&(r5.has(o)||Qy(o,!1,e),Qy(o,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ag]||(t[ag]=!0,Qy("selectionchange",!1,t))}}function E1(e,t,o,r){switch(m1(t)){case 1:var n=y4;break;case 4:n=w4;break;default:n=dw}o=n.bind(null,t,o,e),n=void 0,!b0||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),r?n!==void 0?e.addEventListener(t,o,{capture:!0,passive:n}):e.addEventListener(t,o,!0):n!==void 0?e.addEventListener(t,o,{passive:n}):e.addEventListener(t,o,!1)}function Zy(e,t,o,r,n){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var s=r.stateNode.containerInfo;if(s===n||s.nodeType===8&&s.parentNode===n)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===n||l.nodeType===8&&l.parentNode===n))return;i=i.return}for(;s!==null;){if(i=Us(s),i===null)return;if(l=i.tag,l===5||l===6){r=a=i;continue e}s=s.parentNode}}r=r.return}e1(function(){var u=a,c=sw(o),d=[];e:{var f=k1.get(e);if(f!==void 0){var p=pw,g=e;switch(e){case"keypress":if(mg(o)===0)break e;case"keydown":case"keyup":p=O4;break;case"focusin":g="focus",p=Ky;break;case"focusout":g="blur",p=Ky;break;case"beforeblur":case"afterblur":p=Ky;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=jP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=b4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=V4;break;case I1:case P1:case L1:p=P4;break;case T1:p=H4;break;case"scroll":p=C4;break;case"wheel":p=z4;break;case"copy":case"cut":case"paste":p=T4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=$P}var m=(t&4)!==0,x=!m&&e==="scroll",h=m?f!==null?f+"Capture":null:f;m=[];for(var v=u,y;v!==null;){y=v;var w=y.stateNode;if(y.tag===5&&w!==null&&(y=w,h!==null&&(w=jd(v,h),w!=null&&m.push(Zd(v,w,y)))),x)break;v=v.return}0<m.length&&(f=new p(f,g,null,o,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&o!==C0&&(g=o.relatedTarget||o.fromElement)&&(Us(g)||g[Ta]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=o.relatedTarget||o.toElement,p=u,g=g?Us(g):null,g!==null&&(x=Zs(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(m=jP,w="onMouseLeave",h="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=$P,w="onPointerLeave",h="onPointerEnter",v="pointer"),x=p==null?f:fu(p),y=g==null?f:fu(g),f=new m(w,v+"leave",p,o,c),f.target=x,f.relatedTarget=y,w=null,Us(c)===u&&(m=new m(h,v+"enter",g,o,c),m.target=y,m.relatedTarget=x,w=m),x=w,p&&g)t:{for(m=p,h=g,v=0,y=m;y;y=iu(y))v++;for(y=0,w=h;w;w=iu(w))y++;for(;0<v-y;)m=iu(m),v--;for(;0<y-v;)h=iu(h),y--;for(;v--;){if(m===h||h!==null&&m===h.alternate)break t;m=iu(m),h=iu(h)}m=null}else m=null;p!==null&&aL(d,f,p,m,!1),g!==null&&x!==null&&aL(d,x,g,m,!0)}}e:{if(f=u?fu(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=X4;else if(YP(f))if(w1)C=J4;else{C=Q4;var b=Y4}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=Z4);if(C&&(C=C(e,u))){y1(d,C,o,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&h0(f,"number",f.value)}switch(b=u?fu(u):window,e){case"focusin":(YP(b)||b.contentEditable==="true")&&(cu=b,T0=u,Vd=null);break;case"focusout":Vd=T0=cu=null;break;case"mousedown":k0=!0;break;case"contextmenu":case"mouseup":case"dragend":k0=!1,eL(d,o,c);break;case"selectionchange":if(o5)break;case"keydown":case"keyup":eL(d,o,c)}var S;if(gw)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else uu?v1(e,o)&&(I="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(I="onCompositionStart");I&&(h1&&o.locale!=="ko"&&(uu||I!=="onCompositionStart"?I==="onCompositionEnd"&&uu&&(S=g1()):(Ii=c,fw="value"in Ii?Ii.value:Ii.textContent,uu=!0)),b=kg(u,I),0<b.length&&(I=new qP(I,e,null,o,c),d.push({event:I,listeners:b}),S?I.data=S:(S=x1(o),S!==null&&(I.data=S)))),(S=W4?j4(e,o):q4(e,o))&&(u=kg(u,"onBeforeInput"),0<u.length&&(c=new qP("onBeforeInput","beforeinput",null,o,c),d.push({event:c,listeners:u}),c.data=S))}M1(d,t)})}function Zd(e,t,o){return{instance:e,listener:t,currentTarget:o}}function kg(e,t){for(var o=t+"Capture",r=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=jd(e,o),a!=null&&r.unshift(Zd(e,a,n)),a=jd(e,t),a!=null&&r.push(Zd(e,a,n))),e=e.return}return r}function iu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function aL(e,t,o,r,n){for(var a=t._reactName,i=[];o!==null&&o!==r;){var s=o,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,n?(l=jd(o,a),l!=null&&i.unshift(Zd(o,l,s))):n||(l=jd(o,a),l!=null&&i.push(Zd(o,l,s)))),o=o.return}i.length!==0&&e.push({event:t,listeners:i})}var n5=/\r\n?/g,a5=/\u0000|\uFFFD/g;function iL(e){return(typeof e=="string"?e:""+e).replace(n5,`
|
|
9
|
-
`).replace(a5,"")}function ig(e,t,o){if(t=iL(t),iL(e)!==t&&o)throw Error(q(425))}function Mg(){}var M0=null,E0=null;function A0(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 D0=typeof setTimeout=="function"?setTimeout:void 0,i5=typeof clearTimeout=="function"?clearTimeout:void 0,sL=typeof Promise=="function"?Promise:void 0,s5=typeof queueMicrotask=="function"?queueMicrotask:typeof sL<"u"?function(e){return sL.resolve(null).then(e).catch(l5)}:D0;function l5(e){setTimeout(function(){throw e})}function Jy(e,t){var o=t,r=0;do{var n=o.nextSibling;if(e.removeChild(o),n&&n.nodeType===8)if(o=n.data,o==="/$"){if(r===0){e.removeChild(n),Kd(t);return}r--}else o!=="$"&&o!=="$?"&&o!=="$!"||r++;o=n}while(o);Kd(t)}function Mi(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 lL(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(t===0)return e;t--}else o==="/$"&&t++}e=e.previousSibling}return null}var Du=Math.random().toString(36).slice(2),Jn="__reactFiber$"+Du,Jd="__reactProps$"+Du,Ta="__reactContainer$"+Du,N0="__reactEvents$"+Du,u5="__reactListeners$"+Du,c5="__reactHandles$"+Du;function Us(e){var t=e[Jn];if(t)return t;for(var o=e.parentNode;o;){if(t=o[Ta]||o[Jn]){if(o=t.alternate,t.child!==null||o!==null&&o.child!==null)for(e=lL(e);e!==null;){if(o=e[Jn])return o;e=lL(e)}return t}e=o,o=e.parentNode}return null}function uf(e){return e=e[Jn]||e[Ta],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fu(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function Yg(e){return e[Jd]||null}var O0=[],pu=-1;function Vi(e){return{current:e}}function tt(e){0>pu||(e.current=O0[pu],O0[pu]=null,pu--)}function Ye(e,t){pu++,O0[pu]=e.current,e.current=t}var Fi={},ho=Vi(Fi),qo=Vi(!1),qs=Fi;function Pu(e,t){var o=e.type.contextTypes;if(!o)return Fi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var n={},a;for(a in o)n[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function $o(e){return e=e.childContextTypes,e!=null}function Eg(){tt(qo),tt(ho)}function uL(e,t,o){if(ho.current!==Fi)throw Error(q(168));Ye(ho,t),Ye(qo,o)}function A1(e,t,o){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return o;r=r.getChildContext();for(var n in r)if(!(n in t))throw Error(q(108,Yz(e)||"Unknown",n));return pt({},o,r)}function Ag(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fi,qs=ho.current,Ye(ho,e),Ye(qo,qo.current),!0}function cL(e,t,o){var r=e.stateNode;if(!r)throw Error(q(169));o?(e=A1(e,t,qs),r.__reactInternalMemoizedMergedChildContext=e,tt(qo),tt(ho),Ye(ho,e)):tt(qo),Ye(qo,o)}var ba=null,Qg=!1,e0=!1;function D1(e){ba===null?ba=[e]:ba.push(e)}function d5(e){Qg=!0,D1(e)}function Bi(){if(!e0&&ba!==null){e0=!0;var e=0,t=Ge;try{var o=ba;for(Ge=1;e<o.length;e++){var r=o[e];do r=r(!0);while(r!==null)}ba=null,Qg=!1}catch(n){throw ba!==null&&(ba=ba.slice(e+1)),n1(lw,Bi),n}finally{Ge=t,e0=!1}}return null}var mu=[],gu=0,Dg=null,Ng=0,Ar=[],Dr=0,$s=null,Ra=1,Ia="";function Bs(e,t){mu[gu++]=Ng,mu[gu++]=Dg,Dg=e,Ng=t}function N1(e,t,o){Ar[Dr++]=Ra,Ar[Dr++]=Ia,Ar[Dr++]=$s,$s=e;var r=Ra;e=Ia;var n=32-hn(r)-1;r&=~(1<<n),o+=1;var a=32-hn(t)+n;if(30<a){var i=n-n%5;a=(r&(1<<i)-1).toString(32),r>>=i,n-=i,Ra=1<<32-hn(t)+n|o<<n|r,Ia=a+e}else Ra=1<<a|o<<n|r,Ia=e}function vw(e){e.return!==null&&(Bs(e,1),N1(e,1,0))}function xw(e){for(;e===Dg;)Dg=mu[--gu],mu[gu]=null,Ng=mu[--gu],mu[gu]=null;for(;e===$s;)$s=Ar[--Dr],Ar[Dr]=null,Ia=Ar[--Dr],Ar[Dr]=null,Ra=Ar[--Dr],Ar[Dr]=null}var fr=null,dr=null,it=!1,gn=null;function O1(e,t){var o=Nr(5,null,null,0);o.elementType="DELETED",o.stateNode=t,o.return=e,t=e.deletions,t===null?(e.deletions=[o],e.flags|=16):t.push(o)}function dL(e,t){switch(e.tag){case 5:var o=e.type;return t=t.nodeType!==1||o.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,fr=e,dr=Mi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,fr=e,dr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(o=$s!==null?{id:Ra,overflow:Ia}:null,e.memoizedState={dehydrated:t,treeContext:o,retryLane:1073741824},o=Nr(18,null,null,0),o.stateNode=t,o.return=e,e.child=o,fr=e,dr=null,!0):!1;default:return!1}}function F0(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _0(e){if(it){var t=dr;if(t){var o=t;if(!dL(e,t)){if(F0(e))throw Error(q(418));t=Mi(o.nextSibling);var r=fr;t&&dL(e,t)?O1(r,o):(e.flags=e.flags&-4097|2,it=!1,fr=e)}}else{if(F0(e))throw Error(q(418));e.flags=e.flags&-4097|2,it=!1,fr=e}}}function fL(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;fr=e}function sg(e){if(e!==fr)return!1;if(!it)return fL(e),it=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!A0(e.type,e.memoizedProps)),t&&(t=dr)){if(F0(e))throw F1(),Error(q(418));for(;t;)O1(e,t),t=Mi(t.nextSibling)}if(fL(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(t===0){dr=Mi(e.nextSibling);break e}t--}else o!=="$"&&o!=="$!"&&o!=="$?"||t++}e=e.nextSibling}dr=null}}else dr=fr?Mi(e.stateNode.nextSibling):null;return!0}function F1(){for(var e=dr;e;)e=Mi(e.nextSibling)}function Lu(){dr=fr=null,it=!1}function yw(e){gn===null?gn=[e]:gn.push(e)}var f5=Ea.ReactCurrentBatchConfig;function Pd(e,t,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(q(309));var r=o.stateNode}if(!r)throw Error(q(147,e));var n=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(i){var s=n.refs;i===null?delete s[a]:s[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(q(284));if(!o._owner)throw Error(q(290,e))}return e}function lg(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pL(e){var t=e._init;return t(e._payload)}function _1(e){function t(h,v){if(e){var y=h.deletions;y===null?(h.deletions=[v],h.flags|=16):y.push(v)}}function o(h,v){if(!e)return null;for(;v!==null;)t(h,v),v=v.sibling;return null}function r(h,v){for(h=new Map;v!==null;)v.key!==null?h.set(v.key,v):h.set(v.index,v),v=v.sibling;return h}function n(h,v){return h=Ni(h,v),h.index=0,h.sibling=null,h}function a(h,v,y){return h.index=y,e?(y=h.alternate,y!==null?(y=y.index,y<v?(h.flags|=2,v):y):(h.flags|=2,v)):(h.flags|=1048576,v)}function i(h){return e&&h.alternate===null&&(h.flags|=2),h}function s(h,v,y,w){return v===null||v.tag!==6?(v=s0(y,h.mode,w),v.return=h,v):(v=n(v,y),v.return=h,v)}function l(h,v,y,w){var C=y.type;return C===lu?c(h,v,y.props.children,w,y.key):v!==null&&(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ci&&pL(C)===v.type)?(w=n(v,y.props),w.ref=Pd(h,v,y),w.return=h,w):(w=Cg(y.type,y.key,y.props,null,h.mode,w),w.ref=Pd(h,v,y),w.return=h,w)}function u(h,v,y,w){return v===null||v.tag!==4||v.stateNode.containerInfo!==y.containerInfo||v.stateNode.implementation!==y.implementation?(v=l0(y,h.mode,w),v.return=h,v):(v=n(v,y.children||[]),v.return=h,v)}function c(h,v,y,w,C){return v===null||v.tag!==7?(v=js(y,h.mode,w,C),v.return=h,v):(v=n(v,y),v.return=h,v)}function d(h,v,y){if(typeof v=="string"&&v!==""||typeof v=="number")return v=s0(""+v,h.mode,y),v.return=h,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case $m:return y=Cg(v.type,v.key,v.props,null,h.mode,y),y.ref=Pd(h,null,v),y.return=h,y;case su:return v=l0(v,h.mode,y),v.return=h,v;case Ci:var w=v._init;return d(h,w(v._payload),y)}if(Ed(v)||Sd(v))return v=js(v,h.mode,y,null),v.return=h,v;lg(h,v)}return null}function f(h,v,y,w){var C=v!==null?v.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return C!==null?null:s(h,v,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case $m:return y.key===C?l(h,v,y,w):null;case su:return y.key===C?u(h,v,y,w):null;case Ci:return C=y._init,f(h,v,C(y._payload),w)}if(Ed(y)||Sd(y))return C!==null?null:c(h,v,y,w,null);lg(h,y)}return null}function p(h,v,y,w,C){if(typeof w=="string"&&w!==""||typeof w=="number")return h=h.get(y)||null,s(v,h,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case $m:return h=h.get(w.key===null?y:w.key)||null,l(v,h,w,C);case su:return h=h.get(w.key===null?y:w.key)||null,u(v,h,w,C);case Ci:var b=w._init;return p(h,v,y,b(w._payload),C)}if(Ed(w)||Sd(w))return h=h.get(y)||null,c(v,h,w,C,null);lg(v,w)}return null}function g(h,v,y,w){for(var C=null,b=null,S=v,I=v=0,L=null;S!==null&&I<y.length;I++){S.index>I?(L=S,S=null):L=S.sibling;var T=f(h,S,y[I],w);if(T===null){S===null&&(S=L);break}e&&S&&T.alternate===null&&t(h,S),v=a(T,v,I),b===null?C=T:b.sibling=T,b=T,S=L}if(I===y.length)return o(h,S),it&&Bs(h,I),C;if(S===null){for(;I<y.length;I++)S=d(h,y[I],w),S!==null&&(v=a(S,v,I),b===null?C=S:b.sibling=S,b=S);return it&&Bs(h,I),C}for(S=r(h,S);I<y.length;I++)L=p(S,h,I,y[I],w),L!==null&&(e&&L.alternate!==null&&S.delete(L.key===null?I:L.key),v=a(L,v,I),b===null?C=L:b.sibling=L,b=L);return e&&S.forEach(function(k){return t(h,k)}),it&&Bs(h,I),C}function m(h,v,y,w){var C=Sd(y);if(typeof C!="function")throw Error(q(150));if(y=C.call(y),y==null)throw Error(q(151));for(var b=C=null,S=v,I=v=0,L=null,T=y.next();S!==null&&!T.done;I++,T=y.next()){S.index>I?(L=S,S=null):L=S.sibling;var k=f(h,S,T.value,w);if(k===null){S===null&&(S=L);break}e&&S&&k.alternate===null&&t(h,S),v=a(k,v,I),b===null?C=k:b.sibling=k,b=k,S=L}if(T.done)return o(h,S),it&&Bs(h,I),C;if(S===null){for(;!T.done;I++,T=y.next())T=d(h,T.value,w),T!==null&&(v=a(T,v,I),b===null?C=T:b.sibling=T,b=T);return it&&Bs(h,I),C}for(S=r(h,S);!T.done;I++,T=y.next())T=p(S,h,I,T.value,w),T!==null&&(e&&T.alternate!==null&&S.delete(T.key===null?I:T.key),v=a(T,v,I),b===null?C=T:b.sibling=T,b=T);return e&&S.forEach(function(E){return t(h,E)}),it&&Bs(h,I),C}function x(h,v,y,w){if(typeof y=="object"&&y!==null&&y.type===lu&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case $m:e:{for(var C=y.key,b=v;b!==null;){if(b.key===C){if(C=y.type,C===lu){if(b.tag===7){o(h,b.sibling),v=n(b,y.props.children),v.return=h,h=v;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ci&&pL(C)===b.type){o(h,b.sibling),v=n(b,y.props),v.ref=Pd(h,b,y),v.return=h,h=v;break e}o(h,b);break}else t(h,b);b=b.sibling}y.type===lu?(v=js(y.props.children,h.mode,w,y.key),v.return=h,h=v):(w=Cg(y.type,y.key,y.props,null,h.mode,w),w.ref=Pd(h,v,y),w.return=h,h=w)}return i(h);case su:e:{for(b=y.key;v!==null;){if(v.key===b)if(v.tag===4&&v.stateNode.containerInfo===y.containerInfo&&v.stateNode.implementation===y.implementation){o(h,v.sibling),v=n(v,y.children||[]),v.return=h,h=v;break e}else{o(h,v);break}else t(h,v);v=v.sibling}v=l0(y,h.mode,w),v.return=h,h=v}return i(h);case Ci:return b=y._init,x(h,v,b(y._payload),w)}if(Ed(y))return g(h,v,y,w);if(Sd(y))return m(h,v,y,w);lg(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,v!==null&&v.tag===6?(o(h,v.sibling),v=n(v,y),v.return=h,h=v):(o(h,v),v=s0(y,h.mode,w),v.return=h,h=v),i(h)):o(h,v)}return x}var Tu=_1(!0),V1=_1(!1),Og=Vi(null),Fg=null,hu=null,ww=null;function Cw(){ww=hu=Fg=null}function Sw(e){var t=Og.current;tt(Og),e._currentValue=t}function V0(e,t,o){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===o)break;e=e.return}}function bu(e,t){Fg=e,ww=hu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jo=!0),e.firstContext=null)}function Fr(e){var t=e._currentValue;if(ww!==e)if(e={context:e,memoizedValue:t,next:null},hu===null){if(Fg===null)throw Error(q(308));hu=e,Fg.dependencies={lanes:0,firstContext:e}}else hu=hu.next=e;return t}var zs=null;function bw(e){zs===null?zs=[e]:zs.push(e)}function B1(e,t,o,r){var n=t.interleaved;return n===null?(o.next=o,bw(t)):(o.next=n.next,n.next=o),t.interleaved=o,ka(e,r)}function ka(e,t){e.lanes|=t;var o=e.alternate;for(o!==null&&(o.lanes|=t),o=e,e=e.return;e!==null;)e.childLanes|=t,o=e.alternate,o!==null&&(o.childLanes|=t),o=e,e=e.return;return o.tag===3?o.stateNode:null}var Si=!1;function Rw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function H1(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 Pa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ei(e,t,o){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ee&2){var n=r.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),r.pending=t,ka(e,o)}return n=r.interleaved,n===null?(t.next=t,bw(r)):(t.next=n.next,n.next=t),r.interleaved=t,ka(e,o)}function gg(e,t,o){if(t=t.updateQueue,t!==null&&(t=t.shared,(o&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,o|=r,t.lanes=o,uw(e,o)}}function mL(e,t){var o=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,o===r)){var n=null,a=null;if(o=o.firstBaseUpdate,o!==null){do{var i={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};a===null?n=a=i:a=a.next=i,o=o.next}while(o!==null);a===null?n=a=t:a=a.next=t}else n=a=t;o={baseState:r.baseState,firstBaseUpdate:n,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=t:e.next=t,o.lastBaseUpdate=t}function _g(e,t,o,r){var n=e.updateQueue;Si=!1;var a=n.firstBaseUpdate,i=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var l=s,u=l.next;l.next=null,i===null?a=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==i&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var d=n.baseState;i=0,c=u=l=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,m=s;switch(f=t,p=o,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(p,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(p,d,f):g,f==null)break e;d=pt({},d,f);break e;case 2:Si=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=n.effects,f===null?n.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,i|=f;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;f=s,s=f.next,f.next=null,n.lastBaseUpdate=f,n.shared.pending=null}}while(1);if(c===null&&(l=d),n.baseState=l,n.firstBaseUpdate=u,n.lastBaseUpdate=c,t=n.shared.interleaved,t!==null){n=t;do i|=n.lane,n=n.next;while(n!==t)}else a===null&&(n.shared.lanes=0);Xs|=i,e.lanes=i,e.memoizedState=d}}function gL(e,t,o){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],n=r.callback;if(n!==null){if(r.callback=null,r=o,typeof n!="function")throw Error(q(191,n));n.call(r)}}}var cf={},ta=Vi(cf),ef=Vi(cf),tf=Vi(cf);function Gs(e){if(e===cf)throw Error(q(174));return e}function Iw(e,t){switch(Ye(tf,t),Ye(ef,e),Ye(ta,cf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:x0(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=x0(t,e)}tt(ta),Ye(ta,t)}function ku(){tt(ta),tt(ef),tt(tf)}function U1(e){Gs(tf.current);var t=Gs(ta.current),o=x0(t,e.type);t!==o&&(Ye(ef,e),Ye(ta,o))}function Pw(e){ef.current===e&&(tt(ta),tt(ef))}var dt=Vi(0);function Vg(e){for(var t=e;t!==null;){if(t.tag===13){var o=t.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.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 t0=[];function Lw(){for(var e=0;e<t0.length;e++)t0[e]._workInProgressVersionPrimary=null;t0.length=0}var hg=Ea.ReactCurrentDispatcher,o0=Ea.ReactCurrentBatchConfig,Ks=0,ft=null,Ot=null,jt=null,Bg=!1,Bd=!1,of=0,p5=0;function po(){throw Error(q(321))}function Tw(e,t){if(t===null)return!1;for(var o=0;o<t.length&&o<e.length;o++)if(!xn(e[o],t[o]))return!1;return!0}function kw(e,t,o,r,n,a){if(Ks=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hg.current=e===null||e.memoizedState===null?v5:x5,e=o(r,n),Bd){a=0;do{if(Bd=!1,of=0,25<=a)throw Error(q(301));a+=1,jt=Ot=null,t.updateQueue=null,hg.current=y5,e=o(r,n)}while(Bd)}if(hg.current=Hg,t=Ot!==null&&Ot.next!==null,Ks=0,jt=Ot=ft=null,Bg=!1,t)throw Error(q(300));return e}function Mw(){var e=of!==0;return of=0,e}function Zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?ft.memoizedState=jt=e:jt=jt.next=e,jt}function _r(){if(Ot===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=Ot.next;var t=jt===null?ft.memoizedState:jt.next;if(t!==null)jt=t,Ot=e;else{if(e===null)throw Error(q(310));Ot=e,e={memoizedState:Ot.memoizedState,baseState:Ot.baseState,baseQueue:Ot.baseQueue,queue:Ot.queue,next:null},jt===null?ft.memoizedState=jt=e:jt=jt.next=e}return jt}function rf(e,t){return typeof t=="function"?t(e):t}function r0(e){var t=_r(),o=t.queue;if(o===null)throw Error(q(311));o.lastRenderedReducer=e;var r=Ot,n=r.baseQueue,a=o.pending;if(a!==null){if(n!==null){var i=n.next;n.next=a.next,a.next=i}r.baseQueue=n=a,o.pending=null}if(n!==null){a=n.next,r=r.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if((Ks&c)===c)l!==null&&(l=l.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 d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,i=r):l=l.next=d,ft.lanes|=c,Xs|=c}u=u.next}while(u!==null&&u!==a);l===null?i=r:l.next=s,xn(r,t.memoizedState)||(jo=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,o.lastRenderedState=r}if(e=o.interleaved,e!==null){n=e;do a=n.lane,ft.lanes|=a,Xs|=a,n=n.next;while(n!==e)}else n===null&&(o.lanes=0);return[t.memoizedState,o.dispatch]}function n0(e){var t=_r(),o=t.queue;if(o===null)throw Error(q(311));o.lastRenderedReducer=e;var r=o.dispatch,n=o.pending,a=t.memoizedState;if(n!==null){o.pending=null;var i=n=n.next;do a=e(a,i.action),i=i.next;while(i!==n);xn(a,t.memoizedState)||(jo=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),o.lastRenderedState=a}return[a,r]}function z1(){}function G1(e,t){var o=ft,r=_r(),n=t(),a=!xn(r.memoizedState,n);if(a&&(r.memoizedState=n,jo=!0),r=r.queue,Ew(q1.bind(null,o,r,e),[e]),r.getSnapshot!==t||a||jt!==null&&jt.memoizedState.tag&1){if(o.flags|=2048,nf(9,j1.bind(null,o,r,n,t),void 0,null),qt===null)throw Error(q(349));Ks&30||W1(o,t,n)}return n}function W1(e,t,o){e.flags|=16384,e={getSnapshot:t,value:o},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.stores=[e]):(o=t.stores,o===null?t.stores=[e]:o.push(e))}function j1(e,t,o,r){t.value=o,t.getSnapshot=r,$1(t)&&K1(e)}function q1(e,t,o){return o(function(){$1(t)&&K1(e)})}function $1(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!xn(e,o)}catch{return!0}}function K1(e){var t=ka(e,1);t!==null&&vn(t,e,1,-1)}function hL(e){var t=Zn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:rf,lastRenderedState:e},t.queue=e,e=e.dispatch=h5.bind(null,ft,e),[t.memoizedState,e]}function nf(e,t,o,r){return e={tag:e,create:t,destroy:o,deps:r,next:null},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.lastEffect=e.next=e):(o=t.lastEffect,o===null?t.lastEffect=e.next=e:(r=o.next,o.next=e,e.next=r,t.lastEffect=e)),e}function X1(){return _r().memoizedState}function vg(e,t,o,r){var n=Zn();ft.flags|=e,n.memoizedState=nf(1|t,o,void 0,r===void 0?null:r)}function Zg(e,t,o,r){var n=_r();r=r===void 0?null:r;var a=void 0;if(Ot!==null){var i=Ot.memoizedState;if(a=i.destroy,r!==null&&Tw(r,i.deps)){n.memoizedState=nf(t,o,a,r);return}}ft.flags|=e,n.memoizedState=nf(1|t,o,a,r)}function vL(e,t){return vg(8390656,8,e,t)}function Ew(e,t){return Zg(2048,8,e,t)}function Y1(e,t){return Zg(4,2,e,t)}function Q1(e,t){return Zg(4,4,e,t)}function Z1(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 J1(e,t,o){return o=o!=null?o.concat([e]):null,Zg(4,4,Z1.bind(null,t,e),o)}function Aw(){}function eT(e,t){var o=_r();t=t===void 0?null:t;var r=o.memoizedState;return r!==null&&t!==null&&Tw(t,r[1])?r[0]:(o.memoizedState=[e,t],e)}function tT(e,t){var o=_r();t=t===void 0?null:t;var r=o.memoizedState;return r!==null&&t!==null&&Tw(t,r[1])?r[0]:(e=e(),o.memoizedState=[e,t],e)}function oT(e,t,o){return Ks&21?(xn(o,t)||(o=s1(),ft.lanes|=o,Xs|=o,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,jo=!0),e.memoizedState=o)}function m5(e,t){var o=Ge;Ge=o!==0&&4>o?o:4,e(!0);var r=o0.transition;o0.transition={};try{e(!1),t()}finally{Ge=o,o0.transition=r}}function rT(){return _r().memoizedState}function g5(e,t,o){var r=Di(e);if(o={lane:r,action:o,hasEagerState:!1,eagerState:null,next:null},nT(e))aT(t,o);else if(o=B1(e,t,o,r),o!==null){var n=Ao();vn(o,e,r,n),iT(o,t,r)}}function h5(e,t,o){var r=Di(e),n={lane:r,action:o,hasEagerState:!1,eagerState:null,next:null};if(nT(e))aT(t,n);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,s=a(i,o);if(n.hasEagerState=!0,n.eagerState=s,xn(s,i)){var l=t.interleaved;l===null?(n.next=n,bw(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}o=B1(e,t,n,r),o!==null&&(n=Ao(),vn(o,e,r,n),iT(o,t,r))}}function nT(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function aT(e,t){Bd=Bg=!0;var o=e.pending;o===null?t.next=t:(t.next=o.next,o.next=t),e.pending=t}function iT(e,t,o){if(o&4194240){var r=t.lanes;r&=e.pendingLanes,o|=r,t.lanes=o,uw(e,o)}}var Hg={readContext:Fr,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useInsertionEffect:po,useLayoutEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useMutableSource:po,useSyncExternalStore:po,useId:po,unstable_isNewReconciler:!1},v5={readContext:Fr,useCallback:function(e,t){return Zn().memoizedState=[e,t===void 0?null:t],e},useContext:Fr,useEffect:vL,useImperativeHandle:function(e,t,o){return o=o!=null?o.concat([e]):null,vg(4194308,4,Z1.bind(null,t,e),o)},useLayoutEffect:function(e,t){return vg(4194308,4,e,t)},useInsertionEffect:function(e,t){return vg(4,2,e,t)},useMemo:function(e,t){var o=Zn();return t=t===void 0?null:t,e=e(),o.memoizedState=[e,t],e},useReducer:function(e,t,o){var r=Zn();return t=o!==void 0?o(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=g5.bind(null,ft,e),[r.memoizedState,e]},useRef:function(e){var t=Zn();return e={current:e},t.memoizedState=e},useState:hL,useDebugValue:Aw,useDeferredValue:function(e){return Zn().memoizedState=e},useTransition:function(){var e=hL(!1),t=e[0];return e=m5.bind(null,e[1]),Zn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,o){var r=ft,n=Zn();if(it){if(o===void 0)throw Error(q(407));o=o()}else{if(o=t(),qt===null)throw Error(q(349));Ks&30||W1(r,t,o)}n.memoizedState=o;var a={value:o,getSnapshot:t};return n.queue=a,vL(q1.bind(null,r,a,e),[e]),r.flags|=2048,nf(9,j1.bind(null,r,a,o,t),void 0,null),o},useId:function(){var e=Zn(),t=qt.identifierPrefix;if(it){var o=Ia,r=Ra;o=(r&~(1<<32-hn(r)-1)).toString(32)+o,t=":"+t+"R"+o,o=of++,0<o&&(t+="H"+o.toString(32)),t+=":"}else o=p5++,t=":"+t+"r"+o.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},x5={readContext:Fr,useCallback:eT,useContext:Fr,useEffect:Ew,useImperativeHandle:J1,useInsertionEffect:Y1,useLayoutEffect:Q1,useMemo:tT,useReducer:r0,useRef:X1,useState:function(){return r0(rf)},useDebugValue:Aw,useDeferredValue:function(e){var t=_r();return oT(t,Ot.memoizedState,e)},useTransition:function(){var e=r0(rf)[0],t=_r().memoizedState;return[e,t]},useMutableSource:z1,useSyncExternalStore:G1,useId:rT,unstable_isNewReconciler:!1},y5={readContext:Fr,useCallback:eT,useContext:Fr,useEffect:Ew,useImperativeHandle:J1,useInsertionEffect:Y1,useLayoutEffect:Q1,useMemo:tT,useReducer:n0,useRef:X1,useState:function(){return n0(rf)},useDebugValue:Aw,useDeferredValue:function(e){var t=_r();return Ot===null?t.memoizedState=e:oT(t,Ot.memoizedState,e)},useTransition:function(){var e=n0(rf)[0],t=_r().memoizedState;return[e,t]},useMutableSource:z1,useSyncExternalStore:G1,useId:rT,unstable_isNewReconciler:!1};function pn(e,t){if(e&&e.defaultProps){t=pt({},t),e=e.defaultProps;for(var o in e)t[o]===void 0&&(t[o]=e[o]);return t}return t}function B0(e,t,o,r){t=e.memoizedState,o=o(r,t),o=o==null?t:pt({},t,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var Jg={isMounted:function(e){return(e=e._reactInternals)?Zs(e)===e:!1},enqueueSetState:function(e,t,o){e=e._reactInternals;var r=Ao(),n=Di(e),a=Pa(r,n);a.payload=t,o!=null&&(a.callback=o),t=Ei(e,a,n),t!==null&&(vn(t,e,n,r),gg(t,e,n))},enqueueReplaceState:function(e,t,o){e=e._reactInternals;var r=Ao(),n=Di(e),a=Pa(r,n);a.tag=1,a.payload=t,o!=null&&(a.callback=o),t=Ei(e,a,n),t!==null&&(vn(t,e,n,r),gg(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var o=Ao(),r=Di(e),n=Pa(o,r);n.tag=2,t!=null&&(n.callback=t),t=Ei(e,n,r),t!==null&&(vn(t,e,r,o),gg(t,e,r))}};function xL(e,t,o,r,n,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,i):t.prototype&&t.prototype.isPureReactComponent?!Yd(o,r)||!Yd(n,a):!0}function sT(e,t,o){var r=!1,n=Fi,a=t.contextType;return typeof a=="object"&&a!==null?a=Fr(a):(n=$o(t)?qs:ho.current,r=t.contextTypes,a=(r=r!=null)?Pu(e,n):Fi),t=new t(o,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Jg,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function yL(e,t,o,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(o,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(o,r),t.state!==e&&Jg.enqueueReplaceState(t,t.state,null)}function H0(e,t,o,r){var n=e.stateNode;n.props=o,n.state=e.memoizedState,n.refs={},Rw(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=Fr(a):(a=$o(t)?qs:ho.current,n.context=Pu(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(B0(e,t,a,o),n.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(t=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),t!==n.state&&Jg.enqueueReplaceState(n,n.state,null),_g(e,o,n,r),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function Mu(e,t){try{var o="",r=t;do o+=Xz(r),r=r.return;while(r);var n=o}catch(a){n=`
|
|
8
|
+
`+n[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{Gy=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?Md(e):""}function Qz(e){switch(e.tag){case 5:return Md(e.type);case 16:return Md("Lazy");case 13:return Md("Suspense");case 19:return Md("SuspenseList");case 0:case 2:case 15:return e=Wy(e.type,!1),e;case 11:return e=Wy(e.type.render,!1),e;case 1:return e=Wy(e.type,!0),e;default:return""}}function m0(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 lu:return"Fragment";case su:return"Portal";case d0:return"Profiler";case aw:return"StrictMode";case f0:return"Suspense";case p0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case UL:return(e.displayName||"Context")+".Consumer";case HL:return(e._context.displayName||"Context")+".Provider";case iw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sw:return t=e.displayName||null,t!==null?t:m0(e.type)||"Memo";case Ci:t=e._payload,e=e._init;try{return m0(e(t))}catch{}}return null}function Zz(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 m0(t);case 8:return t===aw?"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 Oi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function GL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Jz(e){var t=GL(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var n=o.get,a=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){r=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xm(e){e._valueTracker||(e._valueTracker=Jz(e))}function WL(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var o=t.getValue(),r="";return e&&(r=GL(e)?e.checked?"true":"false":e.value),e=r,e!==o?(t.setValue(e),!0):!1}function bg(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 g0(e,t){var o=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function FP(e,t){var o=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;o=Oi(t.value!=null?t.value:o),e._wrapperState={initialChecked:r,initialValue:o,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function jL(e,t){t=t.checked,t!=null&&nw(e,"checked",t,!1)}function h0(e,t){jL(e,t);var o=Oi(t.value),r=t.type;if(o!=null)r==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?v0(e,t.type,o):t.hasOwnProperty("defaultValue")&&v0(e,t.type,Oi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _P(e,t,o){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,o||t===e.value||(e.value=t),e.defaultValue=t}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function v0(e,t,o){(t!=="number"||bg(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Ed=Array.isArray;function yu(e,t,o,r){if(e=e.options,t){t={};for(var n=0;n<o.length;n++)t["$"+o[n]]=!0;for(o=0;o<e.length;o++)n=t.hasOwnProperty("$"+e[o].value),e[o].selected!==n&&(e[o].selected=n),n&&r&&(e[o].defaultSelected=!0)}else{for(o=""+Oi(o),t=null,n=0;n<e.length;n++){if(e[n].value===o){e[n].selected=!0,r&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function x0(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return pt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function VP(e,t){var o=t.value;if(o==null){if(o=t.children,t=t.defaultValue,o!=null){if(t!=null)throw Error(q(92));if(Ed(o)){if(1<o.length)throw Error(q(93));o=o[0]}t=o}t==null&&(t=""),o=t}e._wrapperState={initialValue:Oi(o)}}function qL(e,t){var o=Oi(t.value),r=Oi(t.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),t.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),r!=null&&(e.defaultValue=""+r)}function BP(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function $L(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 y0(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$L(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ym,KL=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,o,r,n){MSApp.execUnsafeLocalFunction(function(){return e(t,o,r,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ym=Ym||document.createElement("div"),Ym.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ym.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wd(e,t){if(t){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=t;return}}e.textContent=t}var Nd={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},e4=["Webkit","ms","Moz","O"];Object.keys(Nd).forEach(function(e){e4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nd[t]=Nd[e]})});function XL(e,t,o){return t==null||typeof t=="boolean"||t===""?"":o||typeof t!="number"||t===0||Nd.hasOwnProperty(e)&&Nd[e]?(""+t).trim():t+"px"}function YL(e,t){e=e.style;for(var o in t)if(t.hasOwnProperty(o)){var r=o.indexOf("--")===0,n=XL(o,t[o],r);o==="float"&&(o="cssFloat"),r?e.setProperty(o,n):e[o]=n}}var t4=pt({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 w0(e,t){if(t){if(t4[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function C0(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 S0=null;function lw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var b0=null,wu=null,Cu=null;function HP(e){if(e=uf(e)){if(typeof b0!="function")throw Error(q(280));var t=e.stateNode;t&&(t=Qg(t),b0(e.stateNode,e.type,t))}}function QL(e){wu?Cu?Cu.push(e):Cu=[e]:wu=e}function ZL(){if(wu){var e=wu,t=Cu;if(Cu=wu=null,HP(e),t)for(e=0;e<t.length;e++)HP(t[e])}}function JL(e,t){return e(t)}function eT(){}var jy=!1;function tT(e,t,o){if(jy)return e(t,o);jy=!0;try{return JL(e,t,o)}finally{jy=!1,(wu!==null||Cu!==null)&&(eT(),ZL())}}function jd(e,t){var o=e.stateNode;if(o===null)return null;var r=Qg(o);if(r===null)return null;o=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(o&&typeof o!="function")throw Error(q(231,t,typeof o));return o}var R0=!1;if(La)try{au={},Object.defineProperty(au,"passive",{get:function(){R0=!0}}),window.addEventListener("test",au,au),window.removeEventListener("test",au,au)}catch{R0=!1}var au;function o4(e,t,o,r,n,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(o,u)}catch(c){this.onError(c)}}var Od=!1,Rg=null,Ig=!1,I0=null,r4={onError:function(e){Od=!0,Rg=e}};function n4(e,t,o,r,n,a,i,s,l){Od=!1,Rg=null,o4.apply(r4,arguments)}function a4(e,t,o,r,n,a,i,s,l){if(n4.apply(this,arguments),Od){if(Od){var u=Rg;Od=!1,Rg=null}else throw Error(q(198));Ig||(Ig=!0,I0=u)}}function Zs(e){var t=e,o=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(o=t.return),e=t.return;while(e)}return t.tag===3?o:null}function oT(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 UP(e){if(Zs(e)!==e)throw Error(q(188))}function i4(e){var t=e.alternate;if(!t){if(t=Zs(e),t===null)throw Error(q(188));return t!==e?null:e}for(var o=e,r=t;;){var n=o.return;if(n===null)break;var a=n.alternate;if(a===null){if(r=n.return,r!==null){o=r;continue}break}if(n.child===a.child){for(a=n.child;a;){if(a===o)return UP(n),e;if(a===r)return UP(n),t;a=a.sibling}throw Error(q(188))}if(o.return!==r.return)o=n,r=a;else{for(var i=!1,s=n.child;s;){if(s===o){i=!0,o=n,r=a;break}if(s===r){i=!0,r=n,o=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===o){i=!0,o=a,r=n;break}if(s===r){i=!0,r=a,o=n;break}s=s.sibling}if(!i)throw Error(q(189))}}if(o.alternate!==r)throw Error(q(190))}if(o.tag!==3)throw Error(q(188));return o.stateNode.current===o?e:t}function rT(e){return e=i4(e),e!==null?nT(e):null}function nT(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=nT(e);if(t!==null)return t;e=e.sibling}return null}var aT=pr.unstable_scheduleCallback,zP=pr.unstable_cancelCallback,s4=pr.unstable_shouldYield,l4=pr.unstable_requestPaint,St=pr.unstable_now,u4=pr.unstable_getCurrentPriorityLevel,uw=pr.unstable_ImmediatePriority,iT=pr.unstable_UserBlockingPriority,Pg=pr.unstable_NormalPriority,c4=pr.unstable_LowPriority,sT=pr.unstable_IdlePriority,$g=null,ea=null;function d4(e){if(ea&&typeof ea.onCommitFiberRoot=="function")try{ea.onCommitFiberRoot($g,e,void 0,(e.current.flags&128)===128)}catch{}}var hn=Math.clz32?Math.clz32:m4,f4=Math.log,p4=Math.LN2;function m4(e){return e>>>=0,e===0?32:31-(f4(e)/p4|0)|0}var Qm=64,Zm=4194304;function Ad(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 Lg(e,t){var o=e.pendingLanes;if(o===0)return 0;var r=0,n=e.suspendedLanes,a=e.pingedLanes,i=o&268435455;if(i!==0){var s=i&~n;s!==0?r=Ad(s):(a&=i,a!==0&&(r=Ad(a)))}else i=o&~n,i!==0?r=Ad(i):a!==0&&(r=Ad(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&n)&&(n=r&-r,a=t&-t,n>=a||n===16&&(a&4194240)!==0))return t;if(r&4&&(r|=o&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)o=31-hn(t),n=1<<o,r|=e[o],t&=~n;return r}function g4(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 h4(e,t){for(var o=e.suspendedLanes,r=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-hn(a),s=1<<i,l=n[i];l===-1?(!(s&o)||s&r)&&(n[i]=g4(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function P0(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function lT(){var e=Qm;return Qm<<=1,!(Qm&4194240)&&(Qm=64),e}function qy(e){for(var t=[],o=0;31>o;o++)t.push(e);return t}function sf(e,t,o){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hn(t),e[t]=o}function v4(e,t){var o=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<o;){var n=31-hn(o),a=1<<n;t[n]=0,r[n]=-1,e[n]=-1,o&=~a}}function cw(e,t){var o=e.entangledLanes|=t;for(e=e.entanglements;o;){var r=31-hn(o),n=1<<r;n&t|e[r]&t&&(e[r]|=t),o&=~n}}var Ge=0;function uT(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var cT,dw,dT,fT,pT,L0=!1,Jm=[],Li=null,Ti=null,ki=null,qd=new Map,$d=new Map,bi=[],x4="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 GP(e,t){switch(e){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":Ti=null;break;case"mouseover":case"mouseout":ki=null;break;case"pointerover":case"pointerout":qd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$d.delete(t.pointerId)}}function bd(e,t,o,r,n,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:o,eventSystemFlags:r,nativeEvent:a,targetContainers:[n]},t!==null&&(t=uf(t),t!==null&&dw(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function y4(e,t,o,r,n){switch(t){case"focusin":return Li=bd(Li,e,t,o,r,n),!0;case"dragenter":return Ti=bd(Ti,e,t,o,r,n),!0;case"mouseover":return ki=bd(ki,e,t,o,r,n),!0;case"pointerover":var a=n.pointerId;return qd.set(a,bd(qd.get(a)||null,e,t,o,r,n)),!0;case"gotpointercapture":return a=n.pointerId,$d.set(a,bd($d.get(a)||null,e,t,o,r,n)),!0}return!1}function mT(e){var t=Us(e.target);if(t!==null){var o=Zs(t);if(o!==null){if(t=o.tag,t===13){if(t=oT(o),t!==null){e.blockedOn=t,pT(e.priority,function(){dT(o)});return}}else if(t===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function pg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var o=T0(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var r=new o.constructor(o.type,o);S0=r,o.target.dispatchEvent(r),S0=null}else return t=uf(o),t!==null&&dw(t),e.blockedOn=o,!1;t.shift()}return!0}function WP(e,t,o){pg(e)&&o.delete(t)}function w4(){L0=!1,Li!==null&&pg(Li)&&(Li=null),Ti!==null&&pg(Ti)&&(Ti=null),ki!==null&&pg(ki)&&(ki=null),qd.forEach(WP),$d.forEach(WP)}function Rd(e,t){e.blockedOn===t&&(e.blockedOn=null,L0||(L0=!0,pr.unstable_scheduleCallback(pr.unstable_NormalPriority,w4)))}function Kd(e){function t(n){return Rd(n,e)}if(0<Jm.length){Rd(Jm[0],e);for(var o=1;o<Jm.length;o++){var r=Jm[o];r.blockedOn===e&&(r.blockedOn=null)}}for(Li!==null&&Rd(Li,e),Ti!==null&&Rd(Ti,e),ki!==null&&Rd(ki,e),qd.forEach(t),$d.forEach(t),o=0;o<bi.length;o++)r=bi[o],r.blockedOn===e&&(r.blockedOn=null);for(;0<bi.length&&(o=bi[0],o.blockedOn===null);)mT(o),o.blockedOn===null&&bi.shift()}var Su=Ea.ReactCurrentBatchConfig,Tg=!0;function C4(e,t,o,r){var n=Ge,a=Su.transition;Su.transition=null;try{Ge=1,fw(e,t,o,r)}finally{Ge=n,Su.transition=a}}function S4(e,t,o,r){var n=Ge,a=Su.transition;Su.transition=null;try{Ge=4,fw(e,t,o,r)}finally{Ge=n,Su.transition=a}}function fw(e,t,o,r){if(Tg){var n=T0(e,t,o,r);if(n===null)Jy(e,t,r,kg,o),GP(e,r);else if(y4(n,e,t,o,r))r.stopPropagation();else if(GP(e,r),t&4&&-1<x4.indexOf(e)){for(;n!==null;){var a=uf(n);if(a!==null&&cT(a),a=T0(e,t,o,r),a===null&&Jy(e,t,r,kg,o),a===n)break;n=a}n!==null&&r.stopPropagation()}else Jy(e,t,r,null,o)}}var kg=null;function T0(e,t,o,r){if(kg=null,e=lw(r),e=Us(e),e!==null)if(t=Zs(e),t===null)e=null;else if(o=t.tag,o===13){if(e=oT(t),e!==null)return e;e=null}else if(o===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return kg=e,null}function gT(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(u4()){case uw:return 1;case iT:return 4;case Pg:case c4:return 16;case sT:return 536870912;default:return 16}default:return 16}}var Ii=null,pw=null,mg=null;function hT(){if(mg)return mg;var e,t=pw,o=t.length,r,n="value"in Ii?Ii.value:Ii.textContent,a=n.length;for(e=0;e<o&&t[e]===n[e];e++);var i=o-e;for(r=1;r<=i&&t[o-r]===n[a-r];r++);return mg=n.slice(e,1<r?1-r:void 0)}function gg(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 eg(){return!0}function jP(){return!1}function mr(e){function t(o,r,n,a,i){this._reactName=o,this._targetInst=n,this.type=r,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(o=e[s],this[s]=o?o(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?eg:jP,this.isPropagationStopped=jP,this}return pt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=eg)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=eg)},persist:function(){},isPersistent:eg}),t}var Au={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mw=mr(Au),lf=pt({},Au,{view:0,detail:0}),b4=mr(lf),$y,Ky,Id,Kg=pt({},lf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gw,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!==Id&&(Id&&e.type==="mousemove"?($y=e.screenX-Id.screenX,Ky=e.screenY-Id.screenY):Ky=$y=0,Id=e),$y)},movementY:function(e){return"movementY"in e?e.movementY:Ky}}),qP=mr(Kg),R4=pt({},Kg,{dataTransfer:0}),I4=mr(R4),P4=pt({},lf,{relatedTarget:0}),Xy=mr(P4),L4=pt({},Au,{animationName:0,elapsedTime:0,pseudoElement:0}),T4=mr(L4),k4=pt({},Au,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),M4=mr(k4),E4=pt({},Au,{data:0}),$P=mr(E4),A4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},D4={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"},N4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function O4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=N4[e])?!!t[e]:!1}function gw(){return O4}var F4=pt({},lf,{key:function(e){if(e.key){var t=A4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gg(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?D4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gw,charCode:function(e){return e.type==="keypress"?gg(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gg(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_4=mr(F4),V4=pt({},Kg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),KP=mr(V4),B4=pt({},lf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gw}),H4=mr(B4),U4=pt({},Au,{propertyName:0,elapsedTime:0,pseudoElement:0}),z4=mr(U4),G4=pt({},Kg,{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}),W4=mr(G4),j4=[9,13,27,32],hw=La&&"CompositionEvent"in window,Fd=null;La&&"documentMode"in document&&(Fd=document.documentMode);var q4=La&&"TextEvent"in window&&!Fd,vT=La&&(!hw||Fd&&8<Fd&&11>=Fd),XP=String.fromCharCode(32),YP=!1;function xT(e,t){switch(e){case"keyup":return j4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var uu=!1;function $4(e,t){switch(e){case"compositionend":return yT(t);case"keypress":return t.which!==32?null:(YP=!0,XP);case"textInput":return e=t.data,e===XP&&YP?null:e;default:return null}}function K4(e,t){if(uu)return e==="compositionend"||!hw&&xT(e,t)?(e=hT(),mg=pw=Ii=null,uu=!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 vT&&t.locale!=="ko"?null:t.data;default:return null}}var X4={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 QP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!X4[e.type]:t==="textarea"}function wT(e,t,o,r){QL(r),t=Mg(t,"onChange"),0<t.length&&(o=new mw("onChange","change",null,o,r),e.push({event:o,listeners:t}))}var _d=null,Xd=null;function Y4(e){ET(e,0)}function Xg(e){var t=fu(e);if(WL(t))return e}function Q4(e,t){if(e==="change")return t}var CT=!1;La&&(La?(og="oninput"in document,og||(Yy=document.createElement("div"),Yy.setAttribute("oninput","return;"),og=typeof Yy.oninput=="function"),tg=og):tg=!1,CT=tg&&(!document.documentMode||9<document.documentMode));var tg,og,Yy;function ZP(){_d&&(_d.detachEvent("onpropertychange",ST),Xd=_d=null)}function ST(e){if(e.propertyName==="value"&&Xg(Xd)){var t=[];wT(t,Xd,e,lw(e)),tT(Y4,t)}}function Z4(e,t,o){e==="focusin"?(ZP(),_d=t,Xd=o,_d.attachEvent("onpropertychange",ST)):e==="focusout"&&ZP()}function J4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xg(Xd)}function e5(e,t){if(e==="click")return Xg(t)}function t5(e,t){if(e==="input"||e==="change")return Xg(t)}function o5(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:o5;function Yd(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(r=0;r<o.length;r++){var n=o[r];if(!c0.call(t,n)||!xn(e[n],t[n]))return!1}return!0}function JP(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eL(e,t){var o=JP(e);e=0;for(var r;o;){if(o.nodeType===3){if(r=e+o.textContent.length,e<=t&&r>=t)return{node:o,offset:t-e};e=r}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=JP(o)}}function bT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function RT(){for(var e=window,t=bg();t instanceof e.HTMLIFrameElement;){try{var o=typeof t.contentWindow.location.href=="string"}catch{o=!1}if(o)e=t.contentWindow;else break;t=bg(e.document)}return t}function vw(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 r5(e){var t=RT(),o=e.focusedElem,r=e.selectionRange;if(t!==o&&o&&o.ownerDocument&&bT(o.ownerDocument.documentElement,o)){if(r!==null&&vw(o)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in o)o.selectionStart=t,o.selectionEnd=Math.min(e,o.value.length);else if(e=(t=o.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=o.textContent.length,a=Math.min(r.start,n);r=r.end===void 0?a:Math.min(r.end,n),!e.extend&&a>r&&(n=r,r=a,a=n),n=eL(o,a);var i=eL(o,r);n&&i&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=o;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<t.length;o++)e=t[o],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var n5=La&&"documentMode"in document&&11>=document.documentMode,cu=null,k0=null,Vd=null,M0=!1;function tL(e,t,o){var r=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;M0||cu==null||cu!==bg(r)||(r=cu,"selectionStart"in r&&vw(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}),Vd&&Yd(Vd,r)||(Vd=r,r=Mg(k0,"onSelect"),0<r.length&&(t=new mw("onSelect","select",null,t,o),e.push({event:t,listeners:r}),t.target=cu)))}function rg(e,t){var o={};return o[e.toLowerCase()]=t.toLowerCase(),o["Webkit"+e]="webkit"+t,o["Moz"+e]="moz"+t,o}var du={animationend:rg("Animation","AnimationEnd"),animationiteration:rg("Animation","AnimationIteration"),animationstart:rg("Animation","AnimationStart"),transitionend:rg("Transition","TransitionEnd")},Qy={},IT={};La&&(IT=document.createElement("div").style,"AnimationEvent"in window||(delete du.animationend.animation,delete du.animationiteration.animation,delete du.animationstart.animation),"TransitionEvent"in window||delete du.transitionend.transition);function Yg(e){if(Qy[e])return Qy[e];if(!du[e])return e;var t=du[e],o;for(o in t)if(t.hasOwnProperty(o)&&o in IT)return Qy[e]=t[o];return e}var PT=Yg("animationend"),LT=Yg("animationiteration"),TT=Yg("animationstart"),kT=Yg("transitionend"),MT=new Map,oL="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 _i(e,t){MT.set(e,t),Qs(t,[e])}for(ng=0;ng<oL.length;ng++)ag=oL[ng],rL=ag.toLowerCase(),nL=ag[0].toUpperCase()+ag.slice(1),_i(rL,"on"+nL);var ag,rL,nL,ng;_i(PT,"onAnimationEnd");_i(LT,"onAnimationIteration");_i(TT,"onAnimationStart");_i("dblclick","onDoubleClick");_i("focusin","onFocus");_i("focusout","onBlur");_i(kT,"onTransitionEnd");Iu("onMouseEnter",["mouseout","mouseover"]);Iu("onMouseLeave",["mouseout","mouseover"]);Iu("onPointerEnter",["pointerout","pointerover"]);Iu("onPointerLeave",["pointerout","pointerover"]);Qs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dd="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(" "),a5=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dd));function aL(e,t,o){var r=e.type||"unknown-event";e.currentTarget=o,a4(r,t,void 0,e),e.currentTarget=null}function ET(e,t){t=(t&4)!==0;for(var o=0;o<e.length;o++){var r=e[o],n=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&n.isPropagationStopped())break e;aL(n,s,u),a=l}else for(i=0;i<r.length;i++){if(s=r[i],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&n.isPropagationStopped())break e;aL(n,s,u),a=l}}}if(Ig)throw e=I0,Ig=!1,I0=null,e}function et(e,t){var o=t[O0];o===void 0&&(o=t[O0]=new Set);var r=e+"__bubble";o.has(r)||(AT(t,e,2,!1),o.add(r))}function Zy(e,t,o){var r=0;t&&(r|=4),AT(o,e,r,t)}var ig="_reactListening"+Math.random().toString(36).slice(2);function Qd(e){if(!e[ig]){e[ig]=!0,BL.forEach(function(o){o!=="selectionchange"&&(a5.has(o)||Zy(o,!1,e),Zy(o,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ig]||(t[ig]=!0,Zy("selectionchange",!1,t))}}function AT(e,t,o,r){switch(gT(t)){case 1:var n=C4;break;case 4:n=S4;break;default:n=fw}o=n.bind(null,t,o,e),n=void 0,!R0||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),r?n!==void 0?e.addEventListener(t,o,{capture:!0,passive:n}):e.addEventListener(t,o,!0):n!==void 0?e.addEventListener(t,o,{passive:n}):e.addEventListener(t,o,!1)}function Jy(e,t,o,r,n){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var s=r.stateNode.containerInfo;if(s===n||s.nodeType===8&&s.parentNode===n)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===n||l.nodeType===8&&l.parentNode===n))return;i=i.return}for(;s!==null;){if(i=Us(s),i===null)return;if(l=i.tag,l===5||l===6){r=a=i;continue e}s=s.parentNode}}r=r.return}tT(function(){var u=a,c=lw(o),d=[];e:{var f=MT.get(e);if(f!==void 0){var p=mw,g=e;switch(e){case"keypress":if(gg(o)===0)break e;case"keydown":case"keyup":p=_4;break;case"focusin":g="focus",p=Xy;break;case"focusout":g="blur",p=Xy;break;case"beforeblur":case"afterblur":p=Xy;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=qP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=I4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=H4;break;case PT:case LT:case TT:p=T4;break;case kT:p=z4;break;case"scroll":p=b4;break;case"wheel":p=W4;break;case"copy":case"cut":case"paste":p=M4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=KP}var m=(t&4)!==0,x=!m&&e==="scroll",h=m?f!==null?f+"Capture":null:f;m=[];for(var v=u,y;v!==null;){y=v;var w=y.stateNode;if(y.tag===5&&w!==null&&(y=w,h!==null&&(w=jd(v,h),w!=null&&m.push(Zd(v,w,y)))),x)break;v=v.return}0<m.length&&(f=new p(f,g,null,o,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&o!==S0&&(g=o.relatedTarget||o.fromElement)&&(Us(g)||g[Ta]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=o.relatedTarget||o.toElement,p=u,g=g?Us(g):null,g!==null&&(x=Zs(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(m=qP,w="onMouseLeave",h="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=KP,w="onPointerLeave",h="onPointerEnter",v="pointer"),x=p==null?f:fu(p),y=g==null?f:fu(g),f=new m(w,v+"leave",p,o,c),f.target=x,f.relatedTarget=y,w=null,Us(c)===u&&(m=new m(h,v+"enter",g,o,c),m.target=y,m.relatedTarget=x,w=m),x=w,p&&g)t:{for(m=p,h=g,v=0,y=m;y;y=iu(y))v++;for(y=0,w=h;w;w=iu(w))y++;for(;0<v-y;)m=iu(m),v--;for(;0<y-v;)h=iu(h),y--;for(;v--;){if(m===h||h!==null&&m===h.alternate)break t;m=iu(m),h=iu(h)}m=null}else m=null;p!==null&&iL(d,f,p,m,!1),g!==null&&x!==null&&iL(d,x,g,m,!0)}}e:{if(f=u?fu(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=Q4;else if(QP(f))if(CT)C=t5;else{C=J4;var b=Z4}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=e5);if(C&&(C=C(e,u))){wT(d,C,o,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&v0(f,"number",f.value)}switch(b=u?fu(u):window,e){case"focusin":(QP(b)||b.contentEditable==="true")&&(cu=b,k0=u,Vd=null);break;case"focusout":Vd=k0=cu=null;break;case"mousedown":M0=!0;break;case"contextmenu":case"mouseup":case"dragend":M0=!1,tL(d,o,c);break;case"selectionchange":if(n5)break;case"keydown":case"keyup":tL(d,o,c)}var S;if(hw)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else uu?xT(e,o)&&(I="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(I="onCompositionStart");I&&(vT&&o.locale!=="ko"&&(uu||I!=="onCompositionStart"?I==="onCompositionEnd"&&uu&&(S=hT()):(Ii=c,pw="value"in Ii?Ii.value:Ii.textContent,uu=!0)),b=Mg(u,I),0<b.length&&(I=new $P(I,e,null,o,c),d.push({event:I,listeners:b}),S?I.data=S:(S=yT(o),S!==null&&(I.data=S)))),(S=q4?$4(e,o):K4(e,o))&&(u=Mg(u,"onBeforeInput"),0<u.length&&(c=new $P("onBeforeInput","beforeinput",null,o,c),d.push({event:c,listeners:u}),c.data=S))}ET(d,t)})}function Zd(e,t,o){return{instance:e,listener:t,currentTarget:o}}function Mg(e,t){for(var o=t+"Capture",r=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=jd(e,o),a!=null&&r.unshift(Zd(e,a,n)),a=jd(e,t),a!=null&&r.push(Zd(e,a,n))),e=e.return}return r}function iu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function iL(e,t,o,r,n){for(var a=t._reactName,i=[];o!==null&&o!==r;){var s=o,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,n?(l=jd(o,a),l!=null&&i.unshift(Zd(o,l,s))):n||(l=jd(o,a),l!=null&&i.push(Zd(o,l,s)))),o=o.return}i.length!==0&&e.push({event:t,listeners:i})}var i5=/\r\n?/g,s5=/\u0000|\uFFFD/g;function sL(e){return(typeof e=="string"?e:""+e).replace(i5,`
|
|
9
|
+
`).replace(s5,"")}function sg(e,t,o){if(t=sL(t),sL(e)!==t&&o)throw Error(q(425))}function Eg(){}var E0=null,A0=null;function D0(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 N0=typeof setTimeout=="function"?setTimeout:void 0,l5=typeof clearTimeout=="function"?clearTimeout:void 0,lL=typeof Promise=="function"?Promise:void 0,u5=typeof queueMicrotask=="function"?queueMicrotask:typeof lL<"u"?function(e){return lL.resolve(null).then(e).catch(c5)}:N0;function c5(e){setTimeout(function(){throw e})}function e0(e,t){var o=t,r=0;do{var n=o.nextSibling;if(e.removeChild(o),n&&n.nodeType===8)if(o=n.data,o==="/$"){if(r===0){e.removeChild(n),Kd(t);return}r--}else o!=="$"&&o!=="$?"&&o!=="$!"||r++;o=n}while(o);Kd(t)}function Mi(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 uL(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(t===0)return e;t--}else o==="/$"&&t++}e=e.previousSibling}return null}var Du=Math.random().toString(36).slice(2),Jn="__reactFiber$"+Du,Jd="__reactProps$"+Du,Ta="__reactContainer$"+Du,O0="__reactEvents$"+Du,d5="__reactListeners$"+Du,f5="__reactHandles$"+Du;function Us(e){var t=e[Jn];if(t)return t;for(var o=e.parentNode;o;){if(t=o[Ta]||o[Jn]){if(o=t.alternate,t.child!==null||o!==null&&o.child!==null)for(e=uL(e);e!==null;){if(o=e[Jn])return o;e=uL(e)}return t}e=o,o=e.parentNode}return null}function uf(e){return e=e[Jn]||e[Ta],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fu(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function Qg(e){return e[Jd]||null}var F0=[],pu=-1;function Vi(e){return{current:e}}function tt(e){0>pu||(e.current=F0[pu],F0[pu]=null,pu--)}function Ye(e,t){pu++,F0[pu]=e.current,e.current=t}var Fi={},ho=Vi(Fi),qo=Vi(!1),qs=Fi;function Pu(e,t){var o=e.type.contextTypes;if(!o)return Fi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var n={},a;for(a in o)n[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function $o(e){return e=e.childContextTypes,e!=null}function Ag(){tt(qo),tt(ho)}function cL(e,t,o){if(ho.current!==Fi)throw Error(q(168));Ye(ho,t),Ye(qo,o)}function DT(e,t,o){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return o;r=r.getChildContext();for(var n in r)if(!(n in t))throw Error(q(108,Zz(e)||"Unknown",n));return pt({},o,r)}function Dg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fi,qs=ho.current,Ye(ho,e),Ye(qo,qo.current),!0}function dL(e,t,o){var r=e.stateNode;if(!r)throw Error(q(169));o?(e=DT(e,t,qs),r.__reactInternalMemoizedMergedChildContext=e,tt(qo),tt(ho),Ye(ho,e)):tt(qo),Ye(qo,o)}var ba=null,Zg=!1,t0=!1;function NT(e){ba===null?ba=[e]:ba.push(e)}function p5(e){Zg=!0,NT(e)}function Bi(){if(!t0&&ba!==null){t0=!0;var e=0,t=Ge;try{var o=ba;for(Ge=1;e<o.length;e++){var r=o[e];do r=r(!0);while(r!==null)}ba=null,Zg=!1}catch(n){throw ba!==null&&(ba=ba.slice(e+1)),aT(uw,Bi),n}finally{Ge=t,t0=!1}}return null}var mu=[],gu=0,Ng=null,Og=0,Ar=[],Dr=0,$s=null,Ra=1,Ia="";function Bs(e,t){mu[gu++]=Og,mu[gu++]=Ng,Ng=e,Og=t}function OT(e,t,o){Ar[Dr++]=Ra,Ar[Dr++]=Ia,Ar[Dr++]=$s,$s=e;var r=Ra;e=Ia;var n=32-hn(r)-1;r&=~(1<<n),o+=1;var a=32-hn(t)+n;if(30<a){var i=n-n%5;a=(r&(1<<i)-1).toString(32),r>>=i,n-=i,Ra=1<<32-hn(t)+n|o<<n|r,Ia=a+e}else Ra=1<<a|o<<n|r,Ia=e}function xw(e){e.return!==null&&(Bs(e,1),OT(e,1,0))}function yw(e){for(;e===Ng;)Ng=mu[--gu],mu[gu]=null,Og=mu[--gu],mu[gu]=null;for(;e===$s;)$s=Ar[--Dr],Ar[Dr]=null,Ia=Ar[--Dr],Ar[Dr]=null,Ra=Ar[--Dr],Ar[Dr]=null}var fr=null,dr=null,it=!1,gn=null;function FT(e,t){var o=Nr(5,null,null,0);o.elementType="DELETED",o.stateNode=t,o.return=e,t=e.deletions,t===null?(e.deletions=[o],e.flags|=16):t.push(o)}function fL(e,t){switch(e.tag){case 5:var o=e.type;return t=t.nodeType!==1||o.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,fr=e,dr=Mi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,fr=e,dr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(o=$s!==null?{id:Ra,overflow:Ia}:null,e.memoizedState={dehydrated:t,treeContext:o,retryLane:1073741824},o=Nr(18,null,null,0),o.stateNode=t,o.return=e,e.child=o,fr=e,dr=null,!0):!1;default:return!1}}function _0(e){return(e.mode&1)!==0&&(e.flags&128)===0}function V0(e){if(it){var t=dr;if(t){var o=t;if(!fL(e,t)){if(_0(e))throw Error(q(418));t=Mi(o.nextSibling);var r=fr;t&&fL(e,t)?FT(r,o):(e.flags=e.flags&-4097|2,it=!1,fr=e)}}else{if(_0(e))throw Error(q(418));e.flags=e.flags&-4097|2,it=!1,fr=e}}}function pL(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;fr=e}function lg(e){if(e!==fr)return!1;if(!it)return pL(e),it=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!D0(e.type,e.memoizedProps)),t&&(t=dr)){if(_0(e))throw _T(),Error(q(418));for(;t;)FT(e,t),t=Mi(t.nextSibling)}if(pL(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(t===0){dr=Mi(e.nextSibling);break e}t--}else o!=="$"&&o!=="$!"&&o!=="$?"||t++}e=e.nextSibling}dr=null}}else dr=fr?Mi(e.stateNode.nextSibling):null;return!0}function _T(){for(var e=dr;e;)e=Mi(e.nextSibling)}function Lu(){dr=fr=null,it=!1}function ww(e){gn===null?gn=[e]:gn.push(e)}var m5=Ea.ReactCurrentBatchConfig;function Pd(e,t,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(q(309));var r=o.stateNode}if(!r)throw Error(q(147,e));var n=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(i){var s=n.refs;i===null?delete s[a]:s[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(q(284));if(!o._owner)throw Error(q(290,e))}return e}function ug(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mL(e){var t=e._init;return t(e._payload)}function VT(e){function t(h,v){if(e){var y=h.deletions;y===null?(h.deletions=[v],h.flags|=16):y.push(v)}}function o(h,v){if(!e)return null;for(;v!==null;)t(h,v),v=v.sibling;return null}function r(h,v){for(h=new Map;v!==null;)v.key!==null?h.set(v.key,v):h.set(v.index,v),v=v.sibling;return h}function n(h,v){return h=Ni(h,v),h.index=0,h.sibling=null,h}function a(h,v,y){return h.index=y,e?(y=h.alternate,y!==null?(y=y.index,y<v?(h.flags|=2,v):y):(h.flags|=2,v)):(h.flags|=1048576,v)}function i(h){return e&&h.alternate===null&&(h.flags|=2),h}function s(h,v,y,w){return v===null||v.tag!==6?(v=l0(y,h.mode,w),v.return=h,v):(v=n(v,y),v.return=h,v)}function l(h,v,y,w){var C=y.type;return C===lu?c(h,v,y.props.children,w,y.key):v!==null&&(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ci&&mL(C)===v.type)?(w=n(v,y.props),w.ref=Pd(h,v,y),w.return=h,w):(w=Sg(y.type,y.key,y.props,null,h.mode,w),w.ref=Pd(h,v,y),w.return=h,w)}function u(h,v,y,w){return v===null||v.tag!==4||v.stateNode.containerInfo!==y.containerInfo||v.stateNode.implementation!==y.implementation?(v=u0(y,h.mode,w),v.return=h,v):(v=n(v,y.children||[]),v.return=h,v)}function c(h,v,y,w,C){return v===null||v.tag!==7?(v=js(y,h.mode,w,C),v.return=h,v):(v=n(v,y),v.return=h,v)}function d(h,v,y){if(typeof v=="string"&&v!==""||typeof v=="number")return v=l0(""+v,h.mode,y),v.return=h,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Km:return y=Sg(v.type,v.key,v.props,null,h.mode,y),y.ref=Pd(h,null,v),y.return=h,y;case su:return v=u0(v,h.mode,y),v.return=h,v;case Ci:var w=v._init;return d(h,w(v._payload),y)}if(Ed(v)||Sd(v))return v=js(v,h.mode,y,null),v.return=h,v;ug(h,v)}return null}function f(h,v,y,w){var C=v!==null?v.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return C!==null?null:s(h,v,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Km:return y.key===C?l(h,v,y,w):null;case su:return y.key===C?u(h,v,y,w):null;case Ci:return C=y._init,f(h,v,C(y._payload),w)}if(Ed(y)||Sd(y))return C!==null?null:c(h,v,y,w,null);ug(h,y)}return null}function p(h,v,y,w,C){if(typeof w=="string"&&w!==""||typeof w=="number")return h=h.get(y)||null,s(v,h,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Km:return h=h.get(w.key===null?y:w.key)||null,l(v,h,w,C);case su:return h=h.get(w.key===null?y:w.key)||null,u(v,h,w,C);case Ci:var b=w._init;return p(h,v,y,b(w._payload),C)}if(Ed(w)||Sd(w))return h=h.get(y)||null,c(v,h,w,C,null);ug(v,w)}return null}function g(h,v,y,w){for(var C=null,b=null,S=v,I=v=0,L=null;S!==null&&I<y.length;I++){S.index>I?(L=S,S=null):L=S.sibling;var T=f(h,S,y[I],w);if(T===null){S===null&&(S=L);break}e&&S&&T.alternate===null&&t(h,S),v=a(T,v,I),b===null?C=T:b.sibling=T,b=T,S=L}if(I===y.length)return o(h,S),it&&Bs(h,I),C;if(S===null){for(;I<y.length;I++)S=d(h,y[I],w),S!==null&&(v=a(S,v,I),b===null?C=S:b.sibling=S,b=S);return it&&Bs(h,I),C}for(S=r(h,S);I<y.length;I++)L=p(S,h,I,y[I],w),L!==null&&(e&&L.alternate!==null&&S.delete(L.key===null?I:L.key),v=a(L,v,I),b===null?C=L:b.sibling=L,b=L);return e&&S.forEach(function(k){return t(h,k)}),it&&Bs(h,I),C}function m(h,v,y,w){var C=Sd(y);if(typeof C!="function")throw Error(q(150));if(y=C.call(y),y==null)throw Error(q(151));for(var b=C=null,S=v,I=v=0,L=null,T=y.next();S!==null&&!T.done;I++,T=y.next()){S.index>I?(L=S,S=null):L=S.sibling;var k=f(h,S,T.value,w);if(k===null){S===null&&(S=L);break}e&&S&&k.alternate===null&&t(h,S),v=a(k,v,I),b===null?C=k:b.sibling=k,b=k,S=L}if(T.done)return o(h,S),it&&Bs(h,I),C;if(S===null){for(;!T.done;I++,T=y.next())T=d(h,T.value,w),T!==null&&(v=a(T,v,I),b===null?C=T:b.sibling=T,b=T);return it&&Bs(h,I),C}for(S=r(h,S);!T.done;I++,T=y.next())T=p(S,h,I,T.value,w),T!==null&&(e&&T.alternate!==null&&S.delete(T.key===null?I:T.key),v=a(T,v,I),b===null?C=T:b.sibling=T,b=T);return e&&S.forEach(function(E){return t(h,E)}),it&&Bs(h,I),C}function x(h,v,y,w){if(typeof y=="object"&&y!==null&&y.type===lu&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Km:e:{for(var C=y.key,b=v;b!==null;){if(b.key===C){if(C=y.type,C===lu){if(b.tag===7){o(h,b.sibling),v=n(b,y.props.children),v.return=h,h=v;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ci&&mL(C)===b.type){o(h,b.sibling),v=n(b,y.props),v.ref=Pd(h,b,y),v.return=h,h=v;break e}o(h,b);break}else t(h,b);b=b.sibling}y.type===lu?(v=js(y.props.children,h.mode,w,y.key),v.return=h,h=v):(w=Sg(y.type,y.key,y.props,null,h.mode,w),w.ref=Pd(h,v,y),w.return=h,h=w)}return i(h);case su:e:{for(b=y.key;v!==null;){if(v.key===b)if(v.tag===4&&v.stateNode.containerInfo===y.containerInfo&&v.stateNode.implementation===y.implementation){o(h,v.sibling),v=n(v,y.children||[]),v.return=h,h=v;break e}else{o(h,v);break}else t(h,v);v=v.sibling}v=u0(y,h.mode,w),v.return=h,h=v}return i(h);case Ci:return b=y._init,x(h,v,b(y._payload),w)}if(Ed(y))return g(h,v,y,w);if(Sd(y))return m(h,v,y,w);ug(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,v!==null&&v.tag===6?(o(h,v.sibling),v=n(v,y),v.return=h,h=v):(o(h,v),v=l0(y,h.mode,w),v.return=h,h=v),i(h)):o(h,v)}return x}var Tu=VT(!0),BT=VT(!1),Fg=Vi(null),_g=null,hu=null,Cw=null;function Sw(){Cw=hu=_g=null}function bw(e){var t=Fg.current;tt(Fg),e._currentValue=t}function B0(e,t,o){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===o)break;e=e.return}}function bu(e,t){_g=e,Cw=hu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jo=!0),e.firstContext=null)}function Fr(e){var t=e._currentValue;if(Cw!==e)if(e={context:e,memoizedValue:t,next:null},hu===null){if(_g===null)throw Error(q(308));hu=e,_g.dependencies={lanes:0,firstContext:e}}else hu=hu.next=e;return t}var zs=null;function Rw(e){zs===null?zs=[e]:zs.push(e)}function HT(e,t,o,r){var n=t.interleaved;return n===null?(o.next=o,Rw(t)):(o.next=n.next,n.next=o),t.interleaved=o,ka(e,r)}function ka(e,t){e.lanes|=t;var o=e.alternate;for(o!==null&&(o.lanes|=t),o=e,e=e.return;e!==null;)e.childLanes|=t,o=e.alternate,o!==null&&(o.childLanes|=t),o=e,e=e.return;return o.tag===3?o.stateNode:null}var Si=!1;function Iw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function UT(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 Pa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ei(e,t,o){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ee&2){var n=r.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),r.pending=t,ka(e,o)}return n=r.interleaved,n===null?(t.next=t,Rw(r)):(t.next=n.next,n.next=t),r.interleaved=t,ka(e,o)}function hg(e,t,o){if(t=t.updateQueue,t!==null&&(t=t.shared,(o&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,o|=r,t.lanes=o,cw(e,o)}}function gL(e,t){var o=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,o===r)){var n=null,a=null;if(o=o.firstBaseUpdate,o!==null){do{var i={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};a===null?n=a=i:a=a.next=i,o=o.next}while(o!==null);a===null?n=a=t:a=a.next=t}else n=a=t;o={baseState:r.baseState,firstBaseUpdate:n,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=t:e.next=t,o.lastBaseUpdate=t}function Vg(e,t,o,r){var n=e.updateQueue;Si=!1;var a=n.firstBaseUpdate,i=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var l=s,u=l.next;l.next=null,i===null?a=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==i&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var d=n.baseState;i=0,c=u=l=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,m=s;switch(f=t,p=o,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(p,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(p,d,f):g,f==null)break e;d=pt({},d,f);break e;case 2:Si=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=n.effects,f===null?n.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,i|=f;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;f=s,s=f.next,f.next=null,n.lastBaseUpdate=f,n.shared.pending=null}}while(1);if(c===null&&(l=d),n.baseState=l,n.firstBaseUpdate=u,n.lastBaseUpdate=c,t=n.shared.interleaved,t!==null){n=t;do i|=n.lane,n=n.next;while(n!==t)}else a===null&&(n.shared.lanes=0);Xs|=i,e.lanes=i,e.memoizedState=d}}function hL(e,t,o){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],n=r.callback;if(n!==null){if(r.callback=null,r=o,typeof n!="function")throw Error(q(191,n));n.call(r)}}}var cf={},ta=Vi(cf),ef=Vi(cf),tf=Vi(cf);function Gs(e){if(e===cf)throw Error(q(174));return e}function Pw(e,t){switch(Ye(tf,t),Ye(ef,e),Ye(ta,cf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:y0(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=y0(t,e)}tt(ta),Ye(ta,t)}function ku(){tt(ta),tt(ef),tt(tf)}function zT(e){Gs(tf.current);var t=Gs(ta.current),o=y0(t,e.type);t!==o&&(Ye(ef,e),Ye(ta,o))}function Lw(e){ef.current===e&&(tt(ta),tt(ef))}var dt=Vi(0);function Bg(e){for(var t=e;t!==null;){if(t.tag===13){var o=t.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.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 o0=[];function Tw(){for(var e=0;e<o0.length;e++)o0[e]._workInProgressVersionPrimary=null;o0.length=0}var vg=Ea.ReactCurrentDispatcher,r0=Ea.ReactCurrentBatchConfig,Ks=0,ft=null,Ot=null,jt=null,Hg=!1,Bd=!1,of=0,g5=0;function po(){throw Error(q(321))}function kw(e,t){if(t===null)return!1;for(var o=0;o<t.length&&o<e.length;o++)if(!xn(e[o],t[o]))return!1;return!0}function Mw(e,t,o,r,n,a){if(Ks=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,vg.current=e===null||e.memoizedState===null?y5:w5,e=o(r,n),Bd){a=0;do{if(Bd=!1,of=0,25<=a)throw Error(q(301));a+=1,jt=Ot=null,t.updateQueue=null,vg.current=C5,e=o(r,n)}while(Bd)}if(vg.current=Ug,t=Ot!==null&&Ot.next!==null,Ks=0,jt=Ot=ft=null,Hg=!1,t)throw Error(q(300));return e}function Ew(){var e=of!==0;return of=0,e}function Zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?ft.memoizedState=jt=e:jt=jt.next=e,jt}function _r(){if(Ot===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=Ot.next;var t=jt===null?ft.memoizedState:jt.next;if(t!==null)jt=t,Ot=e;else{if(e===null)throw Error(q(310));Ot=e,e={memoizedState:Ot.memoizedState,baseState:Ot.baseState,baseQueue:Ot.baseQueue,queue:Ot.queue,next:null},jt===null?ft.memoizedState=jt=e:jt=jt.next=e}return jt}function rf(e,t){return typeof t=="function"?t(e):t}function n0(e){var t=_r(),o=t.queue;if(o===null)throw Error(q(311));o.lastRenderedReducer=e;var r=Ot,n=r.baseQueue,a=o.pending;if(a!==null){if(n!==null){var i=n.next;n.next=a.next,a.next=i}r.baseQueue=n=a,o.pending=null}if(n!==null){a=n.next,r=r.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if((Ks&c)===c)l!==null&&(l=l.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 d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,i=r):l=l.next=d,ft.lanes|=c,Xs|=c}u=u.next}while(u!==null&&u!==a);l===null?i=r:l.next=s,xn(r,t.memoizedState)||(jo=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,o.lastRenderedState=r}if(e=o.interleaved,e!==null){n=e;do a=n.lane,ft.lanes|=a,Xs|=a,n=n.next;while(n!==e)}else n===null&&(o.lanes=0);return[t.memoizedState,o.dispatch]}function a0(e){var t=_r(),o=t.queue;if(o===null)throw Error(q(311));o.lastRenderedReducer=e;var r=o.dispatch,n=o.pending,a=t.memoizedState;if(n!==null){o.pending=null;var i=n=n.next;do a=e(a,i.action),i=i.next;while(i!==n);xn(a,t.memoizedState)||(jo=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),o.lastRenderedState=a}return[a,r]}function GT(){}function WT(e,t){var o=ft,r=_r(),n=t(),a=!xn(r.memoizedState,n);if(a&&(r.memoizedState=n,jo=!0),r=r.queue,Aw($T.bind(null,o,r,e),[e]),r.getSnapshot!==t||a||jt!==null&&jt.memoizedState.tag&1){if(o.flags|=2048,nf(9,qT.bind(null,o,r,n,t),void 0,null),qt===null)throw Error(q(349));Ks&30||jT(o,t,n)}return n}function jT(e,t,o){e.flags|=16384,e={getSnapshot:t,value:o},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.stores=[e]):(o=t.stores,o===null?t.stores=[e]:o.push(e))}function qT(e,t,o,r){t.value=o,t.getSnapshot=r,KT(t)&&XT(e)}function $T(e,t,o){return o(function(){KT(t)&&XT(e)})}function KT(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!xn(e,o)}catch{return!0}}function XT(e){var t=ka(e,1);t!==null&&vn(t,e,1,-1)}function vL(e){var t=Zn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:rf,lastRenderedState:e},t.queue=e,e=e.dispatch=x5.bind(null,ft,e),[t.memoizedState,e]}function nf(e,t,o,r){return e={tag:e,create:t,destroy:o,deps:r,next:null},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.lastEffect=e.next=e):(o=t.lastEffect,o===null?t.lastEffect=e.next=e:(r=o.next,o.next=e,e.next=r,t.lastEffect=e)),e}function YT(){return _r().memoizedState}function xg(e,t,o,r){var n=Zn();ft.flags|=e,n.memoizedState=nf(1|t,o,void 0,r===void 0?null:r)}function Jg(e,t,o,r){var n=_r();r=r===void 0?null:r;var a=void 0;if(Ot!==null){var i=Ot.memoizedState;if(a=i.destroy,r!==null&&kw(r,i.deps)){n.memoizedState=nf(t,o,a,r);return}}ft.flags|=e,n.memoizedState=nf(1|t,o,a,r)}function xL(e,t){return xg(8390656,8,e,t)}function Aw(e,t){return Jg(2048,8,e,t)}function QT(e,t){return Jg(4,2,e,t)}function ZT(e,t){return Jg(4,4,e,t)}function JT(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 e1(e,t,o){return o=o!=null?o.concat([e]):null,Jg(4,4,JT.bind(null,t,e),o)}function Dw(){}function t1(e,t){var o=_r();t=t===void 0?null:t;var r=o.memoizedState;return r!==null&&t!==null&&kw(t,r[1])?r[0]:(o.memoizedState=[e,t],e)}function o1(e,t){var o=_r();t=t===void 0?null:t;var r=o.memoizedState;return r!==null&&t!==null&&kw(t,r[1])?r[0]:(e=e(),o.memoizedState=[e,t],e)}function r1(e,t,o){return Ks&21?(xn(o,t)||(o=lT(),ft.lanes|=o,Xs|=o,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,jo=!0),e.memoizedState=o)}function h5(e,t){var o=Ge;Ge=o!==0&&4>o?o:4,e(!0);var r=r0.transition;r0.transition={};try{e(!1),t()}finally{Ge=o,r0.transition=r}}function n1(){return _r().memoizedState}function v5(e,t,o){var r=Di(e);if(o={lane:r,action:o,hasEagerState:!1,eagerState:null,next:null},a1(e))i1(t,o);else if(o=HT(e,t,o,r),o!==null){var n=Ao();vn(o,e,r,n),s1(o,t,r)}}function x5(e,t,o){var r=Di(e),n={lane:r,action:o,hasEagerState:!1,eagerState:null,next:null};if(a1(e))i1(t,n);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,s=a(i,o);if(n.hasEagerState=!0,n.eagerState=s,xn(s,i)){var l=t.interleaved;l===null?(n.next=n,Rw(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}o=HT(e,t,n,r),o!==null&&(n=Ao(),vn(o,e,r,n),s1(o,t,r))}}function a1(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function i1(e,t){Bd=Hg=!0;var o=e.pending;o===null?t.next=t:(t.next=o.next,o.next=t),e.pending=t}function s1(e,t,o){if(o&4194240){var r=t.lanes;r&=e.pendingLanes,o|=r,t.lanes=o,cw(e,o)}}var Ug={readContext:Fr,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useInsertionEffect:po,useLayoutEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useMutableSource:po,useSyncExternalStore:po,useId:po,unstable_isNewReconciler:!1},y5={readContext:Fr,useCallback:function(e,t){return Zn().memoizedState=[e,t===void 0?null:t],e},useContext:Fr,useEffect:xL,useImperativeHandle:function(e,t,o){return o=o!=null?o.concat([e]):null,xg(4194308,4,JT.bind(null,t,e),o)},useLayoutEffect:function(e,t){return xg(4194308,4,e,t)},useInsertionEffect:function(e,t){return xg(4,2,e,t)},useMemo:function(e,t){var o=Zn();return t=t===void 0?null:t,e=e(),o.memoizedState=[e,t],e},useReducer:function(e,t,o){var r=Zn();return t=o!==void 0?o(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=v5.bind(null,ft,e),[r.memoizedState,e]},useRef:function(e){var t=Zn();return e={current:e},t.memoizedState=e},useState:vL,useDebugValue:Dw,useDeferredValue:function(e){return Zn().memoizedState=e},useTransition:function(){var e=vL(!1),t=e[0];return e=h5.bind(null,e[1]),Zn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,o){var r=ft,n=Zn();if(it){if(o===void 0)throw Error(q(407));o=o()}else{if(o=t(),qt===null)throw Error(q(349));Ks&30||jT(r,t,o)}n.memoizedState=o;var a={value:o,getSnapshot:t};return n.queue=a,xL($T.bind(null,r,a,e),[e]),r.flags|=2048,nf(9,qT.bind(null,r,a,o,t),void 0,null),o},useId:function(){var e=Zn(),t=qt.identifierPrefix;if(it){var o=Ia,r=Ra;o=(r&~(1<<32-hn(r)-1)).toString(32)+o,t=":"+t+"R"+o,o=of++,0<o&&(t+="H"+o.toString(32)),t+=":"}else o=g5++,t=":"+t+"r"+o.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},w5={readContext:Fr,useCallback:t1,useContext:Fr,useEffect:Aw,useImperativeHandle:e1,useInsertionEffect:QT,useLayoutEffect:ZT,useMemo:o1,useReducer:n0,useRef:YT,useState:function(){return n0(rf)},useDebugValue:Dw,useDeferredValue:function(e){var t=_r();return r1(t,Ot.memoizedState,e)},useTransition:function(){var e=n0(rf)[0],t=_r().memoizedState;return[e,t]},useMutableSource:GT,useSyncExternalStore:WT,useId:n1,unstable_isNewReconciler:!1},C5={readContext:Fr,useCallback:t1,useContext:Fr,useEffect:Aw,useImperativeHandle:e1,useInsertionEffect:QT,useLayoutEffect:ZT,useMemo:o1,useReducer:a0,useRef:YT,useState:function(){return a0(rf)},useDebugValue:Dw,useDeferredValue:function(e){var t=_r();return Ot===null?t.memoizedState=e:r1(t,Ot.memoizedState,e)},useTransition:function(){var e=a0(rf)[0],t=_r().memoizedState;return[e,t]},useMutableSource:GT,useSyncExternalStore:WT,useId:n1,unstable_isNewReconciler:!1};function pn(e,t){if(e&&e.defaultProps){t=pt({},t),e=e.defaultProps;for(var o in e)t[o]===void 0&&(t[o]=e[o]);return t}return t}function H0(e,t,o,r){t=e.memoizedState,o=o(r,t),o=o==null?t:pt({},t,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var eh={isMounted:function(e){return(e=e._reactInternals)?Zs(e)===e:!1},enqueueSetState:function(e,t,o){e=e._reactInternals;var r=Ao(),n=Di(e),a=Pa(r,n);a.payload=t,o!=null&&(a.callback=o),t=Ei(e,a,n),t!==null&&(vn(t,e,n,r),hg(t,e,n))},enqueueReplaceState:function(e,t,o){e=e._reactInternals;var r=Ao(),n=Di(e),a=Pa(r,n);a.tag=1,a.payload=t,o!=null&&(a.callback=o),t=Ei(e,a,n),t!==null&&(vn(t,e,n,r),hg(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var o=Ao(),r=Di(e),n=Pa(o,r);n.tag=2,t!=null&&(n.callback=t),t=Ei(e,n,r),t!==null&&(vn(t,e,r,o),hg(t,e,r))}};function yL(e,t,o,r,n,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,i):t.prototype&&t.prototype.isPureReactComponent?!Yd(o,r)||!Yd(n,a):!0}function l1(e,t,o){var r=!1,n=Fi,a=t.contextType;return typeof a=="object"&&a!==null?a=Fr(a):(n=$o(t)?qs:ho.current,r=t.contextTypes,a=(r=r!=null)?Pu(e,n):Fi),t=new t(o,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=eh,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function wL(e,t,o,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(o,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(o,r),t.state!==e&&eh.enqueueReplaceState(t,t.state,null)}function U0(e,t,o,r){var n=e.stateNode;n.props=o,n.state=e.memoizedState,n.refs={},Iw(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=Fr(a):(a=$o(t)?qs:ho.current,n.context=Pu(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(H0(e,t,a,o),n.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(t=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),t!==n.state&&eh.enqueueReplaceState(n,n.state,null),Vg(e,o,n,r),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function Mu(e,t){try{var o="",r=t;do o+=Qz(r),r=r.return;while(r);var n=o}catch(a){n=`
|
|
10
10
|
Error generating stack: `+a.message+`
|
|
11
|
-
`+a.stack}return{value:e,source:t,stack:n,digest:null}}function a0(e,t,o){return{value:e,source:null,stack:o??null,digest:t??null}}function U0(e,t){try{console.error(t.value)}catch(o){setTimeout(function(){throw o})}}var w5=typeof WeakMap=="function"?WeakMap:Map;function lT(e,t,o){o=Pa(-1,o),o.tag=3,o.payload={element:null};var r=t.value;return o.callback=function(){zg||(zg=!0,Q0=r),U0(e,t)},o}function uT(e,t,o){o=Pa(-1,o),o.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var n=t.value;o.payload=function(){return r(n)},o.callback=function(){U0(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(o.callback=function(){U0(e,t),typeof r!="function"&&(Ai===null?Ai=new Set([this]):Ai.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),o}function wL(e,t,o){var r=e.pingCache;if(r===null){r=e.pingCache=new w5;var n=new Set;r.set(t,n)}else n=r.get(t),n===void 0&&(n=new Set,r.set(t,n));n.has(o)||(n.add(o),e=N5.bind(null,e,t,o),t.then(e,e))}function CL(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 SL(e,t,o,r,n){return e.mode&1?(e.flags|=65536,e.lanes=n,e):(e===t?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(t=Pa(-1,1),t.tag=2,Ei(o,t,1))),o.lanes|=1),e)}var C5=Ea.ReactCurrentOwner,jo=!1;function Eo(e,t,o,r){t.child=e===null?V1(t,null,o,r):Tu(t,e.child,o,r)}function bL(e,t,o,r,n){o=o.render;var a=t.ref;return bu(t,n),r=kw(e,t,o,r,a,n),o=Mw(),e!==null&&!jo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ma(e,t,n)):(it&&o&&vw(t),t.flags|=1,Eo(e,t,r,n),t.child)}function RL(e,t,o,r,n){if(e===null){var a=o.type;return typeof a=="function"&&!Hw(a)&&a.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(t.tag=15,t.type=a,cT(e,t,a,r,n)):(e=Cg(o.type,null,r,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&n)){var i=a.memoizedProps;if(o=o.compare,o=o!==null?o:Yd,o(i,r)&&e.ref===t.ref)return Ma(e,t,n)}return t.flags|=1,e=Ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function cT(e,t,o,r,n){if(e!==null){var a=e.memoizedProps;if(Yd(a,r)&&e.ref===t.ref)if(jo=!1,t.pendingProps=r=a,(e.lanes&n)!==0)e.flags&131072&&(jo=!0);else return t.lanes=e.lanes,Ma(e,t,n)}return z0(e,t,o,r,n)}function dT(e,t,o){var r=t.pendingProps,n=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ye(xu,cr),cr|=o;else{if(!(o&1073741824))return e=a!==null?a.baseLanes|o:o,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ye(xu,cr),cr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:o,Ye(xu,cr),cr|=r}else a!==null?(r=a.baseLanes|o,t.memoizedState=null):r=o,Ye(xu,cr),cr|=r;return Eo(e,t,n,o),t.child}function fT(e,t){var o=t.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(t.flags|=512,t.flags|=2097152)}function z0(e,t,o,r,n){var a=$o(o)?qs:ho.current;return a=Pu(t,a),bu(t,n),o=kw(e,t,o,r,a,n),r=Mw(),e!==null&&!jo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ma(e,t,n)):(it&&r&&vw(t),t.flags|=1,Eo(e,t,o,n),t.child)}function IL(e,t,o,r,n){if($o(o)){var a=!0;Ag(t)}else a=!1;if(bu(t,n),t.stateNode===null)xg(e,t),sT(t,o,r),H0(t,o,r,n),r=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=o.contextType;typeof u=="object"&&u!==null?u=Fr(u):(u=$o(o)?qs:ho.current,u=Pu(t,u));var c=o.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==r||l!==u)&&yL(t,i,r,u),Si=!1;var f=t.memoizedState;i.state=f,_g(t,r,i,n),l=t.memoizedState,s!==r||f!==l||qo.current||Si?(typeof c=="function"&&(B0(t,o,c,r),l=t.memoizedState),(s=Si||xL(t,o,s,r,f,l,u))?(d||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=l),i.props=r,i.state=l,i.context=u,r=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,H1(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:pn(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=o.contextType,typeof l=="object"&&l!==null?l=Fr(l):(l=$o(o)?qs:ho.current,l=Pu(t,l));var p=o.getDerivedStateFromProps;(c=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==l)&&yL(t,i,r,l),Si=!1,f=t.memoizedState,i.state=f,_g(t,r,i,n);var g=t.memoizedState;s!==d||f!==g||qo.current||Si?(typeof p=="function"&&(B0(t,o,p,r),g=t.memoizedState),(u=Si||xL(t,o,u,r,f,g,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,g,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,g,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),i.props=r,i.state=g,i.context=l,r=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return G0(e,t,o,r,a,n)}function G0(e,t,o,r,n,a){fT(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return n&&cL(t,o,!1),Ma(e,t,a);r=t.stateNode,C5.current=t;var s=i&&typeof o.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Tu(t,e.child,null,a),t.child=Tu(t,null,s,a)):Eo(e,t,s,a),t.memoizedState=r.state,n&&cL(t,o,!0),t.child}function pT(e){var t=e.stateNode;t.pendingContext?uL(e,t.pendingContext,t.pendingContext!==t.context):t.context&&uL(e,t.context,!1),Iw(e,t.containerInfo)}function PL(e,t,o,r,n){return Lu(),yw(n),t.flags|=256,Eo(e,t,o,r),t.child}var W0={dehydrated:null,treeContext:null,retryLane:0};function j0(e){return{baseLanes:e,cachePool:null,transitions:null}}function mT(e,t,o){var r=t.pendingProps,n=dt.current,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(n&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),Ye(dt,n&1),e===null)return _0(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,a?(r=t.mode,a=t.child,i={mode:"hidden",children:i},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=i):a=oh(i,r,0,null),e=js(e,r,o,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=j0(o),t.memoizedState=W0,e):Dw(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return S5(e,t,i,r,s,n,o);if(a){a=r.fallback,i=t.mode,n=e.child,s=n.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==n?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Ni(n,l),r.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=Ni(s,a):(a=js(a,i,o,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,i=e.child.memoizedState,i=i===null?j0(o):{baseLanes:i.baseLanes|o,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~o,t.memoizedState=W0,r}return a=e.child,e=a.sibling,r=Ni(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=o),r.return=t,r.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=r,t.memoizedState=null,r}function Dw(e,t){return t=oh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ug(e,t,o,r){return r!==null&&yw(r),Tu(t,e.child,null,o),e=Dw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function S5(e,t,o,r,n,a,i){if(o)return t.flags&256?(t.flags&=-257,r=a0(Error(q(422))),ug(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,n=t.mode,r=oh({mode:"visible",children:r.children},n,0,null),a=js(a,n,i,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Tu(t,e.child,null,i),t.child.memoizedState=j0(i),t.memoizedState=W0,a);if(!(t.mode&1))return ug(e,t,i,null);if(n.data==="$!"){if(r=n.nextSibling&&n.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(q(419)),r=a0(a,r,void 0),ug(e,t,i,r)}if(s=(i&e.childLanes)!==0,jo||s){if(r=qt,r!==null){switch(i&-i){case 4:n=2;break;case 16:n=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:n=32;break;case 536870912:n=268435456;break;default:n=0}n=n&(r.suspendedLanes|i)?0:n,n!==0&&n!==a.retryLane&&(a.retryLane=n,ka(e,n),vn(r,e,n,-1))}return Bw(),r=a0(Error(q(421))),ug(e,t,i,r)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=O5.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,dr=Mi(n.nextSibling),fr=t,it=!0,gn=null,e!==null&&(Ar[Dr++]=Ra,Ar[Dr++]=Ia,Ar[Dr++]=$s,Ra=e.id,Ia=e.overflow,$s=t),t=Dw(t,r.children),t.flags|=4096,t)}function LL(e,t,o){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),V0(e.return,t,o)}function i0(e,t,o,r,n){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:o,tailMode:n}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=o,a.tailMode=n)}function gT(e,t,o){var r=t.pendingProps,n=r.revealOrder,a=r.tail;if(Eo(e,t,r.children,o),r=dt.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&&LL(e,o,t);else if(e.tag===19)LL(e,o,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(Ye(dt,r),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(o=t.child,n=null;o!==null;)e=o.alternate,e!==null&&Vg(e)===null&&(n=o),o=o.sibling;o=n,o===null?(n=t.child,t.child=null):(n=o.sibling,o.sibling=null),i0(t,!1,n,o,a);break;case"backwards":for(o=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Vg(e)===null){t.child=n;break}e=n.sibling,n.sibling=o,o=n,n=e}i0(t,!0,o,null,a);break;case"together":i0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function xg(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ma(e,t,o){if(e!==null&&(t.dependencies=e.dependencies),Xs|=t.lanes,!(o&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,o=Ni(e,e.pendingProps),t.child=o,o.return=t;e.sibling!==null;)e=e.sibling,o=o.sibling=Ni(e,e.pendingProps),o.return=t;o.sibling=null}return t.child}function b5(e,t,o){switch(t.tag){case 3:pT(t),Lu();break;case 5:U1(t);break;case 1:$o(t.type)&&Ag(t);break;case 4:Iw(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,n=t.memoizedProps.value;Ye(Og,r._currentValue),r._currentValue=n;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ye(dt,dt.current&1),t.flags|=128,null):o&t.child.childLanes?mT(e,t,o):(Ye(dt,dt.current&1),e=Ma(e,t,o),e!==null?e.sibling:null);Ye(dt,dt.current&1);break;case 19:if(r=(o&t.childLanes)!==0,e.flags&128){if(r)return gT(e,t,o);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Ye(dt,dt.current),r)break;return null;case 22:case 23:return t.lanes=0,dT(e,t,o)}return Ma(e,t,o)}var hT,q0,vT,xT;hT=function(e,t){for(var o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break;for(;o.sibling===null;){if(o.return===null||o.return===t)return;o=o.return}o.sibling.return=o.return,o=o.sibling}};q0=function(){};vT=function(e,t,o,r){var n=e.memoizedProps;if(n!==r){e=t.stateNode,Gs(ta.current);var a=null;switch(o){case"input":n=m0(e,n),r=m0(e,r),a=[];break;case"select":n=pt({},n,{value:void 0}),r=pt({},r,{value:void 0}),a=[];break;case"textarea":n=v0(e,n),r=v0(e,r),a=[];break;default:typeof n.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Mg)}y0(o,r);var i;o=null;for(u in n)if(!r.hasOwnProperty(u)&&n.hasOwnProperty(u)&&n[u]!=null)if(u==="style"){var s=n[u];for(i in s)s.hasOwnProperty(i)&&(o||(o={}),o[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Gd.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var l=r[u];if(s=n?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(o||(o={}),o[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(o||(o={}),o[i]=l[i])}else o||(a||(a=[]),a.push(u,o)),o=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Gd.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&et("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}o&&(a=a||[]).push("style",o);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};xT=function(e,t,o,r){o!==r&&(t.flags|=4)};function Ld(e,t){if(!it)switch(e.tailMode){case"hidden":t=e.tail;for(var o=null;t!==null;)t.alternate!==null&&(o=t),t=t.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var r=null;o!==null;)o.alternate!==null&&(r=o),o=o.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function mo(e){var t=e.alternate!==null&&e.alternate.child===e.child,o=0,r=0;if(t)for(var n=e.child;n!==null;)o|=n.lanes|n.childLanes,r|=n.subtreeFlags&14680064,r|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)o|=n.lanes|n.childLanes,r|=n.subtreeFlags,r|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=r,e.childLanes=o,t}function R5(e,t,o){var r=t.pendingProps;switch(xw(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mo(t),null;case 1:return $o(t.type)&&Eg(),mo(t),null;case 3:return r=t.stateNode,ku(),tt(qo),tt(ho),Lw(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(sg(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gn!==null&&(ew(gn),gn=null))),q0(e,t),mo(t),null;case 5:Pw(t);var n=Gs(tf.current);if(o=t.type,e!==null&&t.stateNode!=null)vT(e,t,o,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(q(166));return mo(t),null}if(e=Gs(ta.current),sg(t)){r=t.stateNode,o=t.type;var a=t.memoizedProps;switch(r[Jn]=t,r[Jd]=a,e=(t.mode&1)!==0,o){case"dialog":et("cancel",r),et("close",r);break;case"iframe":case"object":case"embed":et("load",r);break;case"video":case"audio":for(n=0;n<Dd.length;n++)et(Dd[n],r);break;case"source":et("error",r);break;case"img":case"image":case"link":et("error",r),et("load",r);break;case"details":et("toggle",r);break;case"input":OP(r,a),et("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},et("invalid",r);break;case"textarea":_P(r,a),et("invalid",r)}y0(o,a),n=null;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];i==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&ig(r.textContent,s,e),n=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&ig(r.textContent,s,e),n=["children",""+s]):Gd.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&et("scroll",r)}switch(o){case"input":Km(r),FP(r,a,!0);break;case"textarea":Km(r),VP(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Mg)}r=n,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=qL(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(o,{is:r.is}):(e=i.createElement(o),o==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,o),e[Jn]=t,e[Jd]=r,hT(e,t,!1,!1),t.stateNode=e;e:{switch(i=w0(o,r),o){case"dialog":et("cancel",e),et("close",e),n=r;break;case"iframe":case"object":case"embed":et("load",e),n=r;break;case"video":case"audio":for(n=0;n<Dd.length;n++)et(Dd[n],e);n=r;break;case"source":et("error",e),n=r;break;case"img":case"image":case"link":et("error",e),et("load",e),n=r;break;case"details":et("toggle",e),n=r;break;case"input":OP(e,r),n=m0(e,r),et("invalid",e);break;case"option":n=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},n=pt({},r,{value:void 0}),et("invalid",e);break;case"textarea":_P(e,r),n=v0(e,r),et("invalid",e);break;default:n=r}y0(o,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?XL(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&$L(e,l)):a==="children"?typeof l=="string"?(o!=="textarea"||l!=="")&&Wd(e,l):typeof l=="number"&&Wd(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Gd.hasOwnProperty(a)?l!=null&&a==="onScroll"&&et("scroll",e):l!=null&&rw(e,a,l,i))}switch(o){case"input":Km(e),FP(e,r,!1);break;case"textarea":Km(e),VP(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Oi(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?yu(e,!!r.multiple,a,!1):r.defaultValue!=null&&yu(e,!!r.multiple,r.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=Mg)}switch(o){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 mo(t),null;case 6:if(e&&t.stateNode!=null)xT(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(o=Gs(tf.current),Gs(ta.current),sg(t)){if(r=t.stateNode,o=t.memoizedProps,r[Jn]=t,(a=r.nodeValue!==o)&&(e=fr,e!==null))switch(e.tag){case 3:ig(r.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ig(r.nodeValue,o,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(o.nodeType===9?o:o.ownerDocument).createTextNode(r),r[Jn]=t,t.stateNode=r}return mo(t),null;case 13:if(tt(dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(it&&dr!==null&&t.mode&1&&!(t.flags&128))F1(),Lu(),t.flags|=98560,a=!1;else if(a=sg(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(q(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(q(317));a[Jn]=t}else Lu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;mo(t),a=!1}else gn!==null&&(ew(gn),gn=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=o,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||dt.current&1?Ft===0&&(Ft=3):Bw())),t.updateQueue!==null&&(t.flags|=4),mo(t),null);case 4:return ku(),q0(e,t),e===null&&Qd(t.stateNode.containerInfo),mo(t),null;case 10:return Sw(t.type._context),mo(t),null;case 17:return $o(t.type)&&Eg(),mo(t),null;case 19:if(tt(dt),a=t.memoizedState,a===null)return mo(t),null;if(r=(t.flags&128)!==0,i=a.rendering,i===null)if(r)Ld(a,!1);else{if(Ft!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Vg(e),i!==null){for(t.flags|=128,Ld(a,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=o,o=t.child;o!==null;)a=o,e=r,a.flags&=14680066,i=a.alternate,i===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return Ye(dt,dt.current&1|2),t.child}e=e.sibling}a.tail!==null&&St()>Eu&&(t.flags|=128,r=!0,Ld(a,!1),t.lanes=4194304)}else{if(!r)if(e=Vg(i),e!==null){if(t.flags|=128,r=!0,o=e.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),Ld(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!it)return mo(t),null}else 2*St()-a.renderingStartTime>Eu&&o!==1073741824&&(t.flags|=128,r=!0,Ld(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(o=a.last,o!==null?o.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=St(),t.sibling=null,o=dt.current,Ye(dt,r?o&1|2:o&1),t):(mo(t),null);case 22:case 23:return Vw(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?cr&1073741824&&(mo(t),t.subtreeFlags&6&&(t.flags|=8192)):mo(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function I5(e,t){switch(xw(t),t.tag){case 1:return $o(t.type)&&Eg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ku(),tt(qo),tt(ho),Lw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pw(t),null;case 13:if(tt(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Lu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(dt),null;case 4:return ku(),null;case 10:return Sw(t.type._context),null;case 22:case 23:return Vw(),null;case 24:return null;default:return null}}var cg=!1,go=!1,P5=typeof WeakSet=="function"?WeakSet:Set,re=null;function vu(e,t){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(r){vt(e,t,r)}else o.current=null}function $0(e,t,o){try{o()}catch(r){vt(e,t,r)}}var TL=!1;function L5(e,t){if(M0=Lg,e=b1(),hw(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var r=o.getSelection&&o.getSelection();if(r&&r.rangeCount!==0){o=r.anchorNode;var n=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{o.nodeType,a.nodeType}catch{o=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==o||n!==0&&d.nodeType!==3||(s=i+n),d!==a||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===o&&++u===n&&(s=i),f===a&&++c===r&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}o=s===-1||l===-1?null:{start:s,end:l}}else o=null}o=o||{start:0,end:0}}else o=null;for(E0={focusedElem:e,selectionRange:o},Lg=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,x=g.memoizedState,h=t.stateNode,v=h.getSnapshotBeforeUpdate(t.elementType===t.type?m:pn(t.type,m),x);h.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(w){vt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return g=TL,TL=!1,g}function Hd(e,t,o){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do{if((n.tag&e)===e){var a=n.destroy;n.destroy=void 0,a!==void 0&&$0(t,o,a)}n=n.next}while(n!==r)}}function eh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var o=t=t.next;do{if((o.tag&e)===e){var r=o.create;o.destroy=r()}o=o.next}while(o!==t)}}function K0(e){var t=e.ref;if(t!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof t=="function"?t(e):t.current=e}}function yT(e){var t=e.alternate;t!==null&&(e.alternate=null,yT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jn],delete t[Jd],delete t[N0],delete t[u5],delete t[c5])),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 wT(e){return e.tag===5||e.tag===3||e.tag===4}function kL(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wT(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 X0(e,t,o){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?o.nodeType===8?o.parentNode.insertBefore(e,t):o.insertBefore(e,t):(o.nodeType===8?(t=o.parentNode,t.insertBefore(e,o)):(t=o,t.appendChild(e)),o=o._reactRootContainer,o!=null||t.onclick!==null||(t.onclick=Mg));else if(r!==4&&(e=e.child,e!==null))for(X0(e,t,o),e=e.sibling;e!==null;)X0(e,t,o),e=e.sibling}function Y0(e,t,o){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?o.insertBefore(e,t):o.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Y0(e,t,o),e=e.sibling;e!==null;)Y0(e,t,o),e=e.sibling}var oo=null,mn=!1;function wi(e,t,o){for(o=o.child;o!==null;)CT(e,t,o),o=o.sibling}function CT(e,t,o){if(ea&&typeof ea.onCommitFiberUnmount=="function")try{ea.onCommitFiberUnmount(qg,o)}catch{}switch(o.tag){case 5:go||vu(o,t);case 6:var r=oo,n=mn;oo=null,wi(e,t,o),oo=r,mn=n,oo!==null&&(mn?(e=oo,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):oo.removeChild(o.stateNode));break;case 18:oo!==null&&(mn?(e=oo,o=o.stateNode,e.nodeType===8?Jy(e.parentNode,o):e.nodeType===1&&Jy(e,o),Kd(e)):Jy(oo,o.stateNode));break;case 4:r=oo,n=mn,oo=o.stateNode.containerInfo,mn=!0,wi(e,t,o),oo=r,mn=n;break;case 0:case 11:case 14:case 15:if(!go&&(r=o.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){n=r=r.next;do{var a=n,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&$0(o,t,i),n=n.next}while(n!==r)}wi(e,t,o);break;case 1:if(!go&&(vu(o,t),r=o.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=o.memoizedProps,r.state=o.memoizedState,r.componentWillUnmount()}catch(s){vt(o,t,s)}wi(e,t,o);break;case 21:wi(e,t,o);break;case 22:o.mode&1?(go=(r=go)||o.memoizedState!==null,wi(e,t,o),go=r):wi(e,t,o);break;default:wi(e,t,o)}}function ML(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new P5),t.forEach(function(r){var n=F5.bind(null,e,r);o.has(r)||(o.add(r),r.then(n,n))})}}function fn(e,t){var o=t.deletions;if(o!==null)for(var r=0;r<o.length;r++){var n=o[r];try{var a=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:oo=s.stateNode,mn=!1;break e;case 3:oo=s.stateNode.containerInfo,mn=!0;break e;case 4:oo=s.stateNode.containerInfo,mn=!0;break e}s=s.return}if(oo===null)throw Error(q(160));CT(a,i,n),oo=null,mn=!1;var l=n.alternate;l!==null&&(l.return=null),n.return=null}catch(u){vt(n,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ST(t,e),t=t.sibling}function ST(e,t){var o=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fn(t,e),Qn(e),r&4){try{Hd(3,e,e.return),eh(3,e)}catch(m){vt(e,e.return,m)}try{Hd(5,e,e.return)}catch(m){vt(e,e.return,m)}}break;case 1:fn(t,e),Qn(e),r&512&&o!==null&&vu(o,o.return);break;case 5:if(fn(t,e),Qn(e),r&512&&o!==null&&vu(o,o.return),e.flags&32){var n=e.stateNode;try{Wd(n,"")}catch(m){vt(e,e.return,m)}}if(r&4&&(n=e.stateNode,n!=null)){var a=e.memoizedProps,i=o!==null?o.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&WL(n,a),w0(s,i);var u=w0(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?XL(n,d):c==="dangerouslySetInnerHTML"?$L(n,d):c==="children"?Wd(n,d):rw(n,c,d,u)}switch(s){case"input":g0(n,a);break;case"textarea":jL(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?yu(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?yu(n,!!a.multiple,a.defaultValue,!0):yu(n,!!a.multiple,a.multiple?[]:"",!1))}n[Jd]=a}catch(m){vt(e,e.return,m)}}break;case 6:if(fn(t,e),Qn(e),r&4){if(e.stateNode===null)throw Error(q(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(m){vt(e,e.return,m)}}break;case 3:if(fn(t,e),Qn(e),r&4&&o!==null&&o.memoizedState.isDehydrated)try{Kd(t.containerInfo)}catch(m){vt(e,e.return,m)}break;case 4:fn(t,e),Qn(e);break;case 13:fn(t,e),Qn(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(Fw=St())),r&4&&ML(e);break;case 22:if(c=o!==null&&o.memoizedState!==null,e.mode&1?(go=(u=go)||c,fn(t,e),go=u):fn(t,e),Qn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(re=e,c=e.child;c!==null;){for(d=re=c;re!==null;){switch(f=re,p=f.child,f.tag){case 0:case 11:case 14:case 15:Hd(4,f,f.return);break;case 1:vu(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,o=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){vt(r,o,m)}}break;case 5:vu(f,f.return);break;case 22:if(f.memoizedState!==null){AL(d);continue}}p!==null?(p.return=f,re=p):AL(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{n=d.stateNode,u?(a=n.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=KL("display",i))}catch(m){vt(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){vt(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:fn(t,e),Qn(e),r&4&&ML(e);break;case 21:break;default:fn(t,e),Qn(e)}}function Qn(e){var t=e.flags;if(t&2){try{e:{for(var o=e.return;o!==null;){if(wT(o)){var r=o;break e}o=o.return}throw Error(q(160))}switch(r.tag){case 5:var n=r.stateNode;r.flags&32&&(Wd(n,""),r.flags&=-33);var a=kL(e);Y0(e,a,n);break;case 3:case 4:var i=r.stateNode.containerInfo,s=kL(e);X0(e,s,i);break;default:throw Error(q(161))}}catch(l){vt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function T5(e,t,o){re=e,bT(e,t,o)}function bT(e,t,o){for(var r=(e.mode&1)!==0;re!==null;){var n=re,a=n.child;if(n.tag===22&&r){var i=n.memoizedState!==null||cg;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||go;s=cg;var u=go;if(cg=i,(go=l)&&!u)for(re=n;re!==null;)i=re,l=i.child,i.tag===22&&i.memoizedState!==null?DL(n):l!==null?(l.return=i,re=l):DL(n);for(;a!==null;)re=a,bT(a,t,o),a=a.sibling;re=n,cg=s,go=u}EL(e,t,o)}else n.subtreeFlags&8772&&a!==null?(a.return=n,re=a):EL(e,t,o)}}function EL(e){for(;re!==null;){var t=re;if(t.flags&8772){var o=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:go||eh(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!go)if(o===null)r.componentDidMount();else{var n=t.elementType===t.type?o.memoizedProps:pn(t.type,o.memoizedProps);r.componentDidUpdate(n,o.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&gL(t,a,r);break;case 3:var i=t.updateQueue;if(i!==null){if(o=null,t.child!==null)switch(t.child.tag){case 5:o=t.child.stateNode;break;case 1:o=t.child.stateNode}gL(t,i,o)}break;case 5:var s=t.stateNode;if(o===null&&t.flags&4){o=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break;case"img":l.src&&(o.src=l.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 c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Kd(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}go||t.flags&512&&K0(t)}catch(f){vt(t,t.return,f)}}if(t===e){re=null;break}if(o=t.sibling,o!==null){o.return=t.return,re=o;break}re=t.return}}function AL(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var o=t.sibling;if(o!==null){o.return=t.return,re=o;break}re=t.return}}function DL(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var o=t.return;try{eh(4,t)}catch(l){vt(t,o,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var n=t.return;try{r.componentDidMount()}catch(l){vt(t,n,l)}}var a=t.return;try{K0(t)}catch(l){vt(t,a,l)}break;case 5:var i=t.return;try{K0(t)}catch(l){vt(t,i,l)}}}catch(l){vt(t,t.return,l)}if(t===e){re=null;break}var s=t.sibling;if(s!==null){s.return=t.return,re=s;break}re=t.return}}var k5=Math.ceil,Ug=Ea.ReactCurrentDispatcher,Nw=Ea.ReactCurrentOwner,Or=Ea.ReactCurrentBatchConfig,Ee=0,qt=null,Tt=null,ro=0,cr=0,xu=Vi(0),Ft=0,af=null,Xs=0,th=0,Ow=0,Ud=null,Wo=null,Fw=0,Eu=1/0,Sa=null,zg=!1,Q0=null,Ai=null,dg=!1,Pi=null,Gg=0,zd=0,Z0=null,yg=-1,wg=0;function Ao(){return Ee&6?St():yg!==-1?yg:yg=St()}function Di(e){return e.mode&1?Ee&2&&ro!==0?ro&-ro:f5.transition!==null?(wg===0&&(wg=s1()),wg):(e=Ge,e!==0||(e=window.event,e=e===void 0?16:m1(e.type)),e):1}function vn(e,t,o,r){if(50<zd)throw zd=0,Z0=null,Error(q(185));sf(e,o,r),(!(Ee&2)||e!==qt)&&(e===qt&&(!(Ee&2)&&(th|=o),Ft===4&&Ri(e,ro)),Ko(e,r),o===1&&Ee===0&&!(t.mode&1)&&(Eu=St()+500,Qg&&Bi()))}function Ko(e,t){var o=e.callbackNode;m4(e,t);var r=Pg(e,e===qt?ro:0);if(r===0)o!==null&&UP(o),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(o!=null&&UP(o),t===1)e.tag===0?d5(NL.bind(null,e)):D1(NL.bind(null,e)),s5(function(){!(Ee&6)&&Bi()}),o=null;else{switch(l1(r)){case 1:o=lw;break;case 4:o=a1;break;case 16:o=Ig;break;case 536870912:o=i1;break;default:o=Ig}o=ET(o,RT.bind(null,e))}e.callbackPriority=t,e.callbackNode=o}}function RT(e,t){if(yg=-1,wg=0,Ee&6)throw Error(q(327));var o=e.callbackNode;if(Ru()&&e.callbackNode!==o)return null;var r=Pg(e,e===qt?ro:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Wg(e,r);else{t=r;var n=Ee;Ee|=2;var a=PT();(qt!==e||ro!==t)&&(Sa=null,Eu=St()+500,Ws(e,t));do try{A5();break}catch(s){IT(e,s)}while(1);Cw(),Ug.current=a,Ee=n,Tt!==null?t=0:(qt=null,ro=0,t=Ft)}if(t!==0){if(t===2&&(n=I0(e),n!==0&&(r=n,t=J0(e,n))),t===1)throw o=af,Ws(e,0),Ri(e,r),Ko(e,St()),o;if(t===6)Ri(e,r);else{if(n=e.current.alternate,!(r&30)&&!M5(n)&&(t=Wg(e,r),t===2&&(a=I0(e),a!==0&&(r=a,t=J0(e,a))),t===1))throw o=af,Ws(e,0),Ri(e,r),Ko(e,St()),o;switch(e.finishedWork=n,e.finishedLanes=r,t){case 0:case 1:throw Error(q(345));case 2:Hs(e,Wo,Sa);break;case 3:if(Ri(e,r),(r&130023424)===r&&(t=Fw+500-St(),10<t)){if(Pg(e,0)!==0)break;if(n=e.suspendedLanes,(n&r)!==r){Ao(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=D0(Hs.bind(null,e,Wo,Sa),t);break}Hs(e,Wo,Sa);break;case 4:if(Ri(e,r),(r&4194240)===r)break;for(t=e.eventTimes,n=-1;0<r;){var i=31-hn(r);a=1<<i,i=t[i],i>n&&(n=i),r&=~a}if(r=n,r=St()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*k5(r/1960))-r,10<r){e.timeoutHandle=D0(Hs.bind(null,e,Wo,Sa),r);break}Hs(e,Wo,Sa);break;case 5:Hs(e,Wo,Sa);break;default:throw Error(q(329))}}}return Ko(e,St()),e.callbackNode===o?RT.bind(null,e):null}function J0(e,t){var o=Ud;return e.current.memoizedState.isDehydrated&&(Ws(e,t).flags|=256),e=Wg(e,t),e!==2&&(t=Wo,Wo=o,t!==null&&ew(t)),e}function ew(e){Wo===null?Wo=e:Wo.push.apply(Wo,e)}function M5(e){for(var t=e;;){if(t.flags&16384){var o=t.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var r=0;r<o.length;r++){var n=o[r],a=n.getSnapshot;n=n.value;try{if(!xn(a(),n))return!1}catch{return!1}}}if(o=t.child,t.subtreeFlags&16384&&o!==null)o.return=t,t=o;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 Ri(e,t){for(t&=~Ow,t&=~th,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var o=31-hn(t),r=1<<o;e[o]=-1,t&=~r}}function NL(e){if(Ee&6)throw Error(q(327));Ru();var t=Pg(e,0);if(!(t&1))return Ko(e,St()),null;var o=Wg(e,t);if(e.tag!==0&&o===2){var r=I0(e);r!==0&&(t=r,o=J0(e,r))}if(o===1)throw o=af,Ws(e,0),Ri(e,t),Ko(e,St()),o;if(o===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Hs(e,Wo,Sa),Ko(e,St()),null}function _w(e,t){var o=Ee;Ee|=1;try{return e(t)}finally{Ee=o,Ee===0&&(Eu=St()+500,Qg&&Bi())}}function Ys(e){Pi!==null&&Pi.tag===0&&!(Ee&6)&&Ru();var t=Ee;Ee|=1;var o=Or.transition,r=Ge;try{if(Or.transition=null,Ge=1,e)return e()}finally{Ge=r,Or.transition=o,Ee=t,!(Ee&6)&&Bi()}}function Vw(){cr=xu.current,tt(xu)}function Ws(e,t){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,i5(o)),Tt!==null)for(o=Tt.return;o!==null;){var r=o;switch(xw(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Eg();break;case 3:ku(),tt(qo),tt(ho),Lw();break;case 5:Pw(r);break;case 4:ku();break;case 13:tt(dt);break;case 19:tt(dt);break;case 10:Sw(r.type._context);break;case 22:case 23:Vw()}o=o.return}if(qt=e,Tt=e=Ni(e.current,null),ro=cr=t,Ft=0,af=null,Ow=th=Xs=0,Wo=Ud=null,zs!==null){for(t=0;t<zs.length;t++)if(o=zs[t],r=o.interleaved,r!==null){o.interleaved=null;var n=r.next,a=o.pending;if(a!==null){var i=a.next;a.next=n,r.next=i}o.pending=r}zs=null}return e}function IT(e,t){do{var o=Tt;try{if(Cw(),hg.current=Hg,Bg){for(var r=ft.memoizedState;r!==null;){var n=r.queue;n!==null&&(n.pending=null),r=r.next}Bg=!1}if(Ks=0,jt=Ot=ft=null,Bd=!1,of=0,Nw.current=null,o===null||o.return===null){Ft=1,af=t,Tt=null;break}e:{var a=e,i=o.return,s=o,l=t;if(t=ro,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=CL(i);if(p!==null){p.flags&=-257,SL(p,i,s,a,t),p.mode&1&&wL(a,u,t),t=p,l=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if(!(t&1)){wL(a,u,t),Bw();break e}l=Error(q(426))}}else if(it&&s.mode&1){var x=CL(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),SL(x,i,s,a,t),yw(Mu(l,s));break e}}a=l=Mu(l,s),Ft!==4&&(Ft=2),Ud===null?Ud=[a]:Ud.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var h=lT(a,l,t);mL(a,h);break e;case 1:s=l;var v=a.type,y=a.stateNode;if(!(a.flags&128)&&(typeof v.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Ai===null||!Ai.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=uT(a,s,t);mL(a,w);break e}}a=a.return}while(a!==null)}TT(o)}catch(C){t=C,Tt===o&&o!==null&&(Tt=o=o.return);continue}break}while(1)}function PT(){var e=Ug.current;return Ug.current=Hg,e===null?Hg:e}function Bw(){(Ft===0||Ft===3||Ft===2)&&(Ft=4),qt===null||!(Xs&268435455)&&!(th&268435455)||Ri(qt,ro)}function Wg(e,t){var o=Ee;Ee|=2;var r=PT();(qt!==e||ro!==t)&&(Sa=null,Ws(e,t));do try{E5();break}catch(n){IT(e,n)}while(1);if(Cw(),Ee=o,Ug.current=r,Tt!==null)throw Error(q(261));return qt=null,ro=0,Ft}function E5(){for(;Tt!==null;)LT(Tt)}function A5(){for(;Tt!==null&&!a4();)LT(Tt)}function LT(e){var t=MT(e.alternate,e,cr);e.memoizedProps=e.pendingProps,t===null?TT(e):Tt=t,Nw.current=null}function TT(e){var t=e;do{var o=t.alternate;if(e=t.return,t.flags&32768){if(o=I5(o,t),o!==null){o.flags&=32767,Tt=o;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ft=6,Tt=null;return}}else if(o=R5(o,t,cr),o!==null){Tt=o;return}if(t=t.sibling,t!==null){Tt=t;return}Tt=t=e}while(t!==null);Ft===0&&(Ft=5)}function Hs(e,t,o){var r=Ge,n=Or.transition;try{Or.transition=null,Ge=1,D5(e,t,o,r)}finally{Or.transition=n,Ge=r}return null}function D5(e,t,o,r){do Ru();while(Pi!==null);if(Ee&6)throw Error(q(327));o=e.finishedWork;var n=e.finishedLanes;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var a=o.lanes|o.childLanes;if(g4(e,a),e===qt&&(Tt=qt=null,ro=0),!(o.subtreeFlags&2064)&&!(o.flags&2064)||dg||(dg=!0,ET(Ig,function(){return Ru(),null})),a=(o.flags&15990)!==0,o.subtreeFlags&15990||a){a=Or.transition,Or.transition=null;var i=Ge;Ge=1;var s=Ee;Ee|=4,Nw.current=null,L5(e,o),ST(o,e),t5(E0),Lg=!!M0,E0=M0=null,e.current=o,T5(o,e,n),i4(),Ee=s,Ge=i,Or.transition=a}else e.current=o;if(dg&&(dg=!1,Pi=e,Gg=n),a=e.pendingLanes,a===0&&(Ai=null),u4(o.stateNode,r),Ko(e,St()),t!==null)for(r=e.onRecoverableError,o=0;o<t.length;o++)n=t[o],r(n.value,{componentStack:n.stack,digest:n.digest});if(zg)throw zg=!1,e=Q0,Q0=null,e;return Gg&1&&e.tag!==0&&Ru(),a=e.pendingLanes,a&1?e===Z0?zd++:(zd=0,Z0=e):zd=0,Bi(),null}function Ru(){if(Pi!==null){var e=l1(Gg),t=Or.transition,o=Ge;try{if(Or.transition=null,Ge=16>e?16:e,Pi===null)var r=!1;else{if(e=Pi,Pi=null,Gg=0,Ee&6)throw Error(q(331));var n=Ee;for(Ee|=4,re=e.current;re!==null;){var a=re,i=a.child;if(re.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(re=u;re!==null;){var c=re;switch(c.tag){case 0:case 11:case 15:Hd(8,c,a)}var d=c.child;if(d!==null)d.return=c,re=d;else for(;re!==null;){c=re;var f=c.sibling,p=c.return;if(yT(c),c===u){re=null;break}if(f!==null){f.return=p,re=f;break}re=p}}}var g=a.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}re=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,re=i;else e:for(;re!==null;){if(a=re,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Hd(9,a,a.return)}var h=a.sibling;if(h!==null){h.return=a.return,re=h;break e}re=a.return}}var v=e.current;for(re=v;re!==null;){i=re;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,re=y;else e:for(i=v;re!==null;){if(s=re,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:eh(9,s)}}catch(C){vt(s,s.return,C)}if(s===i){re=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,re=w;break e}re=s.return}}if(Ee=n,Bi(),ea&&typeof ea.onPostCommitFiberRoot=="function")try{ea.onPostCommitFiberRoot(qg,e)}catch{}r=!0}return r}finally{Ge=o,Or.transition=t}}return!1}function OL(e,t,o){t=Mu(o,t),t=lT(e,t,1),e=Ei(e,t,1),t=Ao(),e!==null&&(sf(e,1,t),Ko(e,t))}function vt(e,t,o){if(e.tag===3)OL(e,e,o);else for(;t!==null;){if(t.tag===3){OL(t,e,o);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ai===null||!Ai.has(r))){e=Mu(o,e),e=uT(t,e,1),t=Ei(t,e,1),e=Ao(),t!==null&&(sf(t,1,e),Ko(t,e));break}}t=t.return}}function N5(e,t,o){var r=e.pingCache;r!==null&&r.delete(t),t=Ao(),e.pingedLanes|=e.suspendedLanes&o,qt===e&&(ro&o)===o&&(Ft===4||Ft===3&&(ro&130023424)===ro&&500>St()-Fw?Ws(e,0):Ow|=o),Ko(e,t)}function kT(e,t){t===0&&(e.mode&1?(t=Qm,Qm<<=1,!(Qm&130023424)&&(Qm=4194304)):t=1);var o=Ao();e=ka(e,t),e!==null&&(sf(e,t,o),Ko(e,o))}function O5(e){var t=e.memoizedState,o=0;t!==null&&(o=t.retryLane),kT(e,o)}function F5(e,t){var o=0;switch(e.tag){case 13:var r=e.stateNode,n=e.memoizedState;n!==null&&(o=n.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(q(314))}r!==null&&r.delete(t),kT(e,o)}var MT;MT=function(e,t,o){if(e!==null)if(e.memoizedProps!==t.pendingProps||qo.current)jo=!0;else{if(!(e.lanes&o)&&!(t.flags&128))return jo=!1,b5(e,t,o);jo=!!(e.flags&131072)}else jo=!1,it&&t.flags&1048576&&N1(t,Ng,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;xg(e,t),e=t.pendingProps;var n=Pu(t,ho.current);bu(t,o),n=kw(null,t,r,e,n,o);var a=Mw();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$o(r)?(a=!0,Ag(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,Rw(t),n.updater=Jg,t.stateNode=n,n._reactInternals=t,H0(t,r,e,o),t=G0(null,t,r,!0,a,o)):(t.tag=0,it&&a&&vw(t),Eo(null,t,n,o),t=t.child),t;case 16:r=t.elementType;e:{switch(xg(e,t),e=t.pendingProps,n=r._init,r=n(r._payload),t.type=r,n=t.tag=V5(r),e=pn(r,e),n){case 0:t=z0(null,t,r,e,o);break e;case 1:t=IL(null,t,r,e,o);break e;case 11:t=bL(null,t,r,e,o);break e;case 14:t=RL(null,t,r,pn(r.type,e),o);break e}throw Error(q(306,r,""))}return t;case 0:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),z0(e,t,r,n,o);case 1:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),IL(e,t,r,n,o);case 3:e:{if(pT(t),e===null)throw Error(q(387));r=t.pendingProps,a=t.memoizedState,n=a.element,H1(e,t),_g(t,r,null,o);var i=t.memoizedState;if(r=i.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){n=Mu(Error(q(423)),t),t=PL(e,t,r,o,n);break e}else if(r!==n){n=Mu(Error(q(424)),t),t=PL(e,t,r,o,n);break e}else for(dr=Mi(t.stateNode.containerInfo.firstChild),fr=t,it=!0,gn=null,o=V1(t,null,r,o),t.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Lu(),r===n){t=Ma(e,t,o);break e}Eo(e,t,r,o)}t=t.child}return t;case 5:return U1(t),e===null&&_0(t),r=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,A0(r,n)?i=null:a!==null&&A0(r,a)&&(t.flags|=32),fT(e,t),Eo(e,t,i,o),t.child;case 6:return e===null&&_0(t),null;case 13:return mT(e,t,o);case 4:return Iw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tu(t,null,r,o):Eo(e,t,r,o),t.child;case 11:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),bL(e,t,r,n,o);case 7:return Eo(e,t,t.pendingProps,o),t.child;case 8:return Eo(e,t,t.pendingProps.children,o),t.child;case 12:return Eo(e,t,t.pendingProps.children,o),t.child;case 10:e:{if(r=t.type._context,n=t.pendingProps,a=t.memoizedProps,i=n.value,Ye(Og,r._currentValue),r._currentValue=i,a!==null)if(xn(a.value,i)){if(a.children===n.children&&!qo.current){t=Ma(e,t,o);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=Pa(-1,o&-o),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=o,l=a.alternate,l!==null&&(l.lanes|=o),V0(a.return,o,t),s.lanes|=o;break}l=l.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(q(341));i.lanes|=o,s=i.alternate,s!==null&&(s.lanes|=o),V0(i,o,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Eo(e,t,n.children,o),t=t.child}return t;case 9:return n=t.type,r=t.pendingProps.children,bu(t,o),n=Fr(n),r=r(n),t.flags|=1,Eo(e,t,r,o),t.child;case 14:return r=t.type,n=pn(r,t.pendingProps),n=pn(r.type,n),RL(e,t,r,n,o);case 15:return cT(e,t,t.type,t.pendingProps,o);case 17:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),xg(e,t),t.tag=1,$o(r)?(e=!0,Ag(t)):e=!1,bu(t,o),sT(t,r,n),H0(t,r,n,o),G0(null,t,r,!0,e,o);case 19:return gT(e,t,o);case 22:return dT(e,t,o)}throw Error(q(156,t.tag))};function ET(e,t){return n1(e,t)}function _5(e,t,o,r){this.tag=e,this.key=o,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 Nr(e,t,o,r){return new _5(e,t,o,r)}function Hw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function V5(e){if(typeof e=="function")return Hw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===aw)return 11;if(e===iw)return 14}return 2}function Ni(e,t){var o=e.alternate;return o===null?(o=Nr(e.tag,t,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,t=e.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Cg(e,t,o,r,n,a){var i=2;if(r=e,typeof e=="function")Hw(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case lu:return js(o.children,n,a,t);case nw:i=8,n|=8;break;case c0:return e=Nr(12,o,t,n|2),e.elementType=c0,e.lanes=a,e;case d0:return e=Nr(13,o,t,n),e.elementType=d0,e.lanes=a,e;case f0:return e=Nr(19,o,t,n),e.elementType=f0,e.lanes=a,e;case UL:return oh(o,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case BL:i=10;break e;case HL:i=9;break e;case aw:i=11;break e;case iw:i=14;break e;case Ci:i=16,r=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=Nr(i,o,t,n),t.elementType=e,t.type=r,t.lanes=a,t}function js(e,t,o,r){return e=Nr(7,e,r,t),e.lanes=o,e}function oh(e,t,o,r){return e=Nr(22,e,r,t),e.elementType=UL,e.lanes=o,e.stateNode={isHidden:!1},e}function s0(e,t,o){return e=Nr(6,e,null,t),e.lanes=o,e}function l0(e,t,o){return t=Nr(4,e.children!==null?e.children:[],e.key,t),t.lanes=o,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function B5(e,t,o,r,n){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=jy(0),this.expirationTimes=jy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jy(0),this.identifierPrefix=r,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function Uw(e,t,o,r,n,a,i,s,l){return e=new B5(e,t,o,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Nr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rw(a),e}function H5(e,t,o){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:su,key:r==null?null:""+r,children:e,containerInfo:t,implementation:o}}function AT(e){if(!e)return Fi;e=e._reactInternals;e:{if(Zs(e)!==e||e.tag!==1)throw Error(q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if($o(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var o=e.type;if($o(o))return A1(e,o,t)}return t}function DT(e,t,o,r,n,a,i,s,l){return e=Uw(o,r,!0,e,n,a,i,s,l),e.context=AT(null),o=e.current,r=Ao(),n=Di(o),a=Pa(r,n),a.callback=t??null,Ei(o,a,n),e.current.lanes=n,sf(e,n,r),Ko(e,r),e}function rh(e,t,o,r){var n=t.current,a=Ao(),i=Di(n);return o=AT(o),t.context===null?t.context=o:t.pendingContext=o,t=Pa(a,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ei(n,t,i),e!==null&&(vn(e,n,i,a),gg(e,n,i)),i}function jg(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 FL(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<t?o:t}}function zw(e,t){FL(e,t),(e=e.alternate)&&FL(e,t)}function U5(){return null}var NT=typeof reportError=="function"?reportError:function(e){console.error(e)};function Gw(e){this._internalRoot=e}nh.prototype.render=Gw.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));rh(e,t,null,null)};nh.prototype.unmount=Gw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ys(function(){rh(null,e,null,null)}),t[Ta]=null}};function nh(e){this._internalRoot=e}nh.prototype.unstable_scheduleHydration=function(e){if(e){var t=d1();e={blockedOn:null,target:e,priority:t};for(var o=0;o<bi.length&&t!==0&&t<bi[o].priority;o++);bi.splice(o,0,e),o===0&&p1(e)}};function Ww(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ah(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function _L(){}function z5(e,t,o,r,n){if(n){if(typeof r=="function"){var a=r;r=function(){var u=jg(i);a.call(u)}}var i=DT(t,r,e,0,null,!1,!1,"",_L);return e._reactRootContainer=i,e[Ta]=i.current,Qd(e.nodeType===8?e.parentNode:e),Ys(),i}for(;n=e.lastChild;)e.removeChild(n);if(typeof r=="function"){var s=r;r=function(){var u=jg(l);s.call(u)}}var l=Uw(e,0,!1,null,null,!1,!1,"",_L);return e._reactRootContainer=l,e[Ta]=l.current,Qd(e.nodeType===8?e.parentNode:e),Ys(function(){rh(t,l,o,r)}),l}function ih(e,t,o,r,n){var a=o._reactRootContainer;if(a){var i=a;if(typeof n=="function"){var s=n;n=function(){var l=jg(i);s.call(l)}}rh(t,i,e,n)}else i=z5(o,t,e,n,r);return jg(i)}u1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var o=Ad(t.pendingLanes);o!==0&&(uw(t,o|1),Ko(t,St()),!(Ee&6)&&(Eu=St()+500,Bi()))}break;case 13:Ys(function(){var r=ka(e,1);if(r!==null){var n=Ao();vn(r,e,1,n)}}),zw(e,1)}};cw=function(e){if(e.tag===13){var t=ka(e,134217728);if(t!==null){var o=Ao();vn(t,e,134217728,o)}zw(e,134217728)}};c1=function(e){if(e.tag===13){var t=Di(e),o=ka(e,t);if(o!==null){var r=Ao();vn(o,e,t,r)}zw(e,t)}};d1=function(){return Ge};f1=function(e,t){var o=Ge;try{return Ge=e,t()}finally{Ge=o}};S0=function(e,t,o){switch(t){case"input":if(g0(e,o),t=o.name,o.type==="radio"&&t!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<o.length;t++){var r=o[t];if(r!==e&&r.form===e.form){var n=Yg(r);if(!n)throw Error(q(90));GL(r),g0(r,n)}}}break;case"textarea":jL(e,o);break;case"select":t=o.value,t!=null&&yu(e,!!o.multiple,t,!1)}};ZL=_w;JL=Ys;var G5={usingClientEntryPoint:!1,Events:[uf,fu,Yg,YL,QL,_w]},Td={findFiberByHostInstance:Us,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},W5={bundleType:Td.bundleType,version:Td.version,rendererPackageName:Td.rendererPackageName,rendererConfig:Td.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ea.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=o1(e),e===null?null:e.stateNode},findFiberByHostInstance:Td.findFiberByHostInstance||U5,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(kd=__REACT_DEVTOOLS_GLOBAL_HOOK__,!kd.isDisabled&&kd.supportsFiber))try{qg=kd.inject(W5),ea=kd}catch{}var kd;gr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G5;gr.createPortal=function(e,t){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ww(t))throw Error(q(200));return H5(e,t,null,o)};gr.createRoot=function(e,t){if(!Ww(e))throw Error(q(299));var o=!1,r="",n=NT;return t!=null&&(t.unstable_strictMode===!0&&(o=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=Uw(e,1,!1,null,null,o,!1,r,n),e[Ta]=t.current,Qd(e.nodeType===8?e.parentNode:e),new Gw(t)};gr.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(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=o1(t),e=e===null?null:e.stateNode,e};gr.flushSync=function(e){return Ys(e)};gr.hydrate=function(e,t,o){if(!ah(t))throw Error(q(200));return ih(null,e,t,!0,o)};gr.hydrateRoot=function(e,t,o){if(!Ww(e))throw Error(q(405));var r=o!=null&&o.hydratedSources||null,n=!1,a="",i=NT;if(o!=null&&(o.unstable_strictMode===!0&&(n=!0),o.identifierPrefix!==void 0&&(a=o.identifierPrefix),o.onRecoverableError!==void 0&&(i=o.onRecoverableError)),t=DT(t,null,e,1,o??null,n,!1,a,i),e[Ta]=t.current,Qd(e),r)for(e=0;e<r.length;e++)o=r[e],n=o._getVersion,n=n(o._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[o,n]:t.mutableSourceEagerHydrationData.push(o,n);return new nh(t)};gr.render=function(e,t,o){if(!ah(t))throw Error(q(200));return ih(null,e,t,!1,o)};gr.unmountComponentAtNode=function(e){if(!ah(e))throw Error(q(40));return e._reactRootContainer?(Ys(function(){ih(null,null,e,!1,function(){e._reactRootContainer=null,e[Ta]=null})}),!0):!1};gr.unstable_batchedUpdates=_w;gr.unstable_renderSubtreeIntoContainer=function(e,t,o,r){if(!ah(o))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return ih(e,t,o,!1,r)};gr.version="18.3.1-next-f1338f8080-20240426"});var Aa=ru((Mee,_T)=>{"use strict";function FT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(FT)}catch(e){console.error(e)}}FT(),_T.exports=OT()});var Ek=ru(Mk=>{"use strict";var Ku=M();function YW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var QW=typeof Object.is=="function"?Object.is:YW,ZW=Ku.useState,JW=Ku.useEffect,ej=Ku.useLayoutEffect,tj=Ku.useDebugValue;function oj(e,t){var o=t(),r=ZW({inst:{value:o,getSnapshot:t}}),n=r[0].inst,a=r[1];return ej(function(){n.value=o,n.getSnapshot=t,sC(n)&&a({inst:n})},[e,o,t]),JW(function(){return sC(n)&&a({inst:n}),e(function(){sC(n)&&a({inst:n})})},[e]),tj(o),o}function sC(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!QW(e,o)}catch{return!0}}function rj(e,t){return t()}var nj=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?rj:oj;Mk.useSyncExternalStore=Ku.useSyncExternalStore!==void 0?Ku.useSyncExternalStore:nj});var Dk=ru((Hne,Ak)=>{"use strict";Ak.exports=Ek()});var xh=R(M());var Yo=R(M(),1);var kr=R(M(),1),Ey=R(N(),1);function mP(e,t){let o=kr.createContext(t),r=a=>{let{children:i,...s}=a,l=kr.useMemo(()=>s,Object.values(s));return(0,Ey.jsx)(o.Provider,{value:l,children:i})};r.displayName=e+"Provider";function n(a){let i=kr.useContext(o);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,n]}function Oe(e,t=[]){let o=[];function r(a,i){let s=kr.createContext(i),l=o.length;o=[...o,i];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=kr.useMemo(()=>g,Object.values(g));return(0,Ey.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,g=kr.useContext(p);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=o.map(i=>kr.createContext(i));return function(s){let l=s?.[e]||a;return kr.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[r,Dz(n,...t)]}function Dz(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=r.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return kr.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return o.scopeName=t.scopeName,o}var xi=R(M(),1);var hP=R(M(),1);function gP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lr(...e){return t=>{let o=!1,r=e.map(n=>{let a=gP(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():gP(e[n],null)}}}}function de(...e){return hP.useCallback(lr(...e),e)}var Nt=R(M(),1);var nu=R(N(),1);function ur(e){let t=Nz(e),o=Nt.forwardRef((r,n)=>{let{children:a,...i}=r,s=Nt.Children.toArray(a),l=s.find(Oz);if(l){let u=l.props.children,c=s.map(d=>d===l?Nt.Children.count(u)>1?Nt.Children.only(null):Nt.isValidElement(u)?u.props.children:null:d);return(0,nu.jsx)(t,{...i,ref:n,children:Nt.isValidElement(u)?Nt.cloneElement(u,void 0,c):null})}return(0,nu.jsx)(t,{...i,ref:n,children:a})});return o.displayName=`${e}.Slot`,o}function Nz(e){let t=Nt.forwardRef((o,r)=>{let{children:n,...a}=o;if(Nt.isValidElement(n)){let i=_z(n),s=Fz(a,n.props);return n.type!==Nt.Fragment&&(s.ref=r?lr(r,i):i),Nt.cloneElement(n,s)}return Nt.Children.count(n)>1?Nt.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vP=Symbol("radix.slottable");function xP(e){let t=({children:o})=>(0,nu.jsx)(nu.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=vP,t}function Oz(e){return Nt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vP}function Fz(e,t){let o={...t};for(let r in t){let n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function _z(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Hm=R(N(),1),Vz=R(M(),1);var Bz=R(N(),1);function Xn(e){let t=e+"CollectionProvider",[o,r]=Oe(t),[n,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:x,children:h}=m,v=xi.default.useRef(null),y=xi.default.useRef(new Map).current;return(0,Hm.jsx)(n,{scope:x,itemMap:y,collectionRef:v,children:h})};i.displayName=t;let s=e+"CollectionSlot",l=ur(s),u=xi.default.forwardRef((m,x)=>{let{scope:h,children:v}=m,y=a(s,h),w=de(x,y.collectionRef);return(0,Hm.jsx)(l,{ref:w,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=ur(c),p=xi.default.forwardRef((m,x)=>{let{scope:h,children:v,...y}=m,w=xi.default.useRef(null),C=de(x,w),b=a(c,h);return xi.default.useEffect(()=>(b.itemMap.set(w,{ref:w,...y}),()=>void b.itemMap.delete(w))),(0,Hm.jsx)(f,{[d]:"",ref:C,children:v})});p.displayName=c;function g(m){let x=a(e+"CollectionConsumer",m);return xi.default.useCallback(()=>{let v=x.collectionRef.current;if(!v)return[];let y=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((b,S)=>y.indexOf(b.ref.current)-y.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},g,r]}var Cee=!!(typeof window<"u"&&window.document&&window.document.createElement);function W(e,t,{checkForDefaultPrevented:o=!0}={}){return function(n){if(e?.(n),o===!1||!n.defaultPrevented)return t?.(n)}}var Mr=R(M(),1);var yP=R(M(),1),_e=globalThis?.document?yP.useLayoutEffect:()=>{};var Um=R(M(),1);var Hz=Mr[" useInsertionEffect ".trim().toString()]||_e;function qe({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[n,a,i]=Uz({defaultProp:t,onChange:o}),s=e!==void 0,l=s?e:n;{let c=Mr.useRef(e!==void 0);Mr.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),c.current=s},[s,r])}let u=Mr.useCallback(c=>{if(s){let d=zz(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function Uz({defaultProp:e,onChange:t}){let[o,r]=Mr.useState(e),n=Mr.useRef(o),a=Mr.useRef(t);return Hz(()=>{a.current=t},[t]),Mr.useEffect(()=>{n.current!==o&&(a.current?.(o),n.current=o)},[o,n]),[o,r,a]}function zz(e){return typeof e=="function"}var Iee=Symbol("RADIX:SYNC_STATE");var VT=R(M(),1),BT=R(Aa(),1);var HT=R(N(),1),j5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=j5.reduce((e,t)=>{let o=ur(`Primitive.${t}`),r=VT.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,HT.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Nu(e,t){e&&BT.flushSync(()=>e.dispatchEvent(t))}var ao=R(M(),1);var Xo=R(M(),1);var UT=R(M(),1);function q5(e,t){return UT.useReducer((o,r)=>t[o][r]??o,e)}var st=e=>{let{present:t,children:o}=e,r=$5(t),n=typeof o=="function"?o({present:r.isPresent}):Xo.Children.only(o),a=de(r.ref,K5(n));return typeof o=="function"||r.isPresent?Xo.cloneElement(n,{ref:a}):null};st.displayName="Presence";function $5(e){let[t,o]=Xo.useState(),r=Xo.useRef(null),n=Xo.useRef(e),a=Xo.useRef("none"),i=e?"mounted":"unmounted",[s,l]=q5(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Xo.useEffect(()=>{let u=sh(r.current);a.current=s==="mounted"?u:"none"},[s]),_e(()=>{let u=r.current,c=n.current;if(c!==e){let f=a.current,p=sh(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),_e(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let m=sh(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!n.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=p=>{p.target===t&&(a.current=sh(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Xo.useCallback(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function sh(e){return e?.animationName||"none"}function K5(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var jw=R(M(),1);var X5=jw[" useId ".trim().toString()]||(()=>{}),Y5=0;function Ae(e){let[t,o]=jw.useState(X5());return _e(()=>{e||o(r=>r??String(Y5++))},[e]),e||(t?`radix-${t}`:"")}var Js=R(N(),1),lh="Collapsible",[Q5,qw]=Oe(lh),[Z5,$w]=Q5(lh),zT=ao.forwardRef((e,t)=>{let{__scopeCollapsible:o,open:r,defaultOpen:n,disabled:a,onOpenChange:i,...s}=e,[l,u]=qe({prop:r,defaultProp:n??!1,onChange:i,caller:lh});return(0,Js.jsx)(Z5,{scope:o,disabled:a,contentId:Ae(),open:l,onOpenToggle:ao.useCallback(()=>u(c=>!c),[u]),children:(0,Js.jsx)($.div,{"data-state":Xw(l),"data-disabled":a?"":void 0,...s,ref:t})})});zT.displayName=lh;var GT="CollapsibleTrigger",WT=ao.forwardRef((e,t)=>{let{__scopeCollapsible:o,...r}=e,n=$w(GT,o);return(0,Js.jsx)($.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":Xw(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...r,ref:t,onClick:W(e.onClick,n.onOpenToggle)})});WT.displayName=GT;var Kw="CollapsibleContent",jT=ao.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=$w(Kw,e.__scopeCollapsible);return(0,Js.jsx)(st,{present:o||n.open,children:({present:a})=>(0,Js.jsx)(J5,{...r,ref:t,present:a})})});jT.displayName=Kw;var J5=ao.forwardRef((e,t)=>{let{__scopeCollapsible:o,present:r,children:n,...a}=e,i=$w(Kw,o),[s,l]=ao.useState(r),u=ao.useRef(null),c=de(t,u),d=ao.useRef(0),f=d.current,p=ao.useRef(0),g=p.current,m=i.open||s,x=ao.useRef(m),h=ao.useRef(void 0);return ao.useEffect(()=>{let v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),_e(()=>{let v=u.current;if(v){h.current=h.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";let y=v.getBoundingClientRect();d.current=y.height,p.current=y.width,x.current||(v.style.transitionDuration=h.current.transitionDuration,v.style.animationName=h.current.animationName),l(r)}},[i.open,r]),(0,Js.jsx)($.div,{"data-state":Xw(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:m&&n})});function Xw(e){return e?"open":"closed"}var uh=zT,Ou=WT,df=jT;var ch=R(M(),1),eG=R(N(),1),tG=ch.createContext(void 0);function oa(e){let t=ch.useContext(tG);return e||t||"ltr"}var _t=R(N(),1),yn="Accordion",oG=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Qw,rG,nG]=Xn(yn),[fh,ote]=Oe(yn,[nG,qw]),Zw=qw(),$T=Yo.default.forwardRef((e,t)=>{let{type:o,...r}=e,n=r,a=r;return(0,_t.jsx)(Qw.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?(0,_t.jsx)(lG,{...a,ref:t}):(0,_t.jsx)(sG,{...n,ref:t})})});$T.displayName=yn;var[KT,aG]=fh(yn),[XT,iG]=fh(yn,{collapsible:!1}),sG=Yo.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:n=()=>{},collapsible:a=!1,...i}=e,[s,l]=qe({prop:o,defaultProp:r??"",onChange:n,caller:yn});return(0,_t.jsx)(KT,{scope:e.__scopeAccordion,value:Yo.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Yo.default.useCallback(()=>a&&l(""),[a,l]),children:(0,_t.jsx)(XT,{scope:e.__scopeAccordion,collapsible:a,children:(0,_t.jsx)(YT,{...i,ref:t})})})}),lG=Yo.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:n=()=>{},...a}=e,[i,s]=qe({prop:o,defaultProp:r??[],onChange:n,caller:yn}),l=Yo.default.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=Yo.default.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return(0,_t.jsx)(KT,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:(0,_t.jsx)(XT,{scope:e.__scopeAccordion,collapsible:!0,children:(0,_t.jsx)(YT,{...a,ref:t})})})}),[uG,ph]=fh(yn),YT=Yo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,disabled:r,dir:n,orientation:a="vertical",...i}=e,s=Yo.default.useRef(null),l=de(s,t),u=rG(o),d=oa(n)==="ltr",f=W(e.onKeyDown,p=>{if(!oG.includes(p.key))return;let g=p.target,m=u().filter(I=>!I.ref.current?.disabled),x=m.findIndex(I=>I.ref.current===g),h=m.length;if(x===-1)return;p.preventDefault();let v=x,y=0,w=h-1,C=()=>{v=x+1,v>w&&(v=y)},b=()=>{v=x-1,v<y&&(v=w)};switch(p.key){case"Home":v=y;break;case"End":v=w;break;case"ArrowRight":a==="horizontal"&&(d?C():b());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(d?b():C());break;case"ArrowUp":a==="vertical"&&b();break}let S=v%h;m[S].ref.current?.focus()});return(0,_t.jsx)(uG,{scope:o,disabled:r,direction:n,orientation:a,children:(0,_t.jsx)(Qw.Slot,{scope:o,children:(0,_t.jsx)($.div,{...i,"data-orientation":a,ref:l,onKeyDown:r?void 0:f})})})}),dh="AccordionItem",[cG,Jw]=fh(dh),QT=Yo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,value:r,...n}=e,a=ph(dh,o),i=aG(dh,o),s=Zw(o),l=Ae(),u=r&&i.value.includes(r)||!1,c=a.disabled||e.disabled;return(0,_t.jsx)(cG,{scope:o,open:u,disabled:c,triggerId:l,children:(0,_t.jsx)(uh,{"data-orientation":a.orientation,"data-state":rk(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:d=>{d?i.onItemOpen(r):i.onItemClose(r)}})})});QT.displayName=dh;var ZT="AccordionHeader",JT=Yo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,n=ph(yn,o),a=Jw(ZT,o);return(0,_t.jsx)($.h3,{"data-orientation":n.orientation,"data-state":rk(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});JT.displayName=ZT;var Yw="AccordionTrigger",ek=Yo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,n=ph(yn,o),a=Jw(Yw,o),i=iG(Yw,o),s=Zw(o);return(0,_t.jsx)(Qw.ItemSlot,{scope:o,children:(0,_t.jsx)(Ou,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:a.triggerId,...s,...r,ref:t})})});ek.displayName=Yw;var tk="AccordionContent",ok=Yo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,n=ph(yn,o),a=Jw(tk,o),i=Zw(o);return(0,_t.jsx)(df,{role:"region","aria-labelledby":a.triggerId,"data-orientation":n.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ok.displayName=tk;function rk(e){return e?"open":"closed"}var nk=$T,ak=QT,ik=JT,eC=ek,tC=ok;var gh=R(M());var sk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fG=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase()),oC=e=>{let t=fG(e);return t.charAt(0).toUpperCase()+t.slice(1)},mh=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim(),lk=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var ff=R(M());var uk={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"};var ck=(0,ff.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:a,iconNode:i,...s},l)=>(0,ff.createElement)("svg",{ref:l,...uk,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:mh("lucide",n),...!a&&!lk(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,ff.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var H=(e,t)=>{let o=(0,gh.forwardRef)(({className:r,...n},a)=>(0,gh.createElement)(ck,{ref:a,iconNode:t,className:mh(`lucide-${sk(oC(e))}`,`lucide-${e}`,r),...n}));return o.displayName=oC(e),o};var pG=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],pf=H("align-center",pG);var mG=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],mf=H("align-justify",mG);var gG=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],gf=H("align-left",gG);var hG=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],hf=H("align-right",hG);var vG=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Fu=H("arrow-down",vG);var xG=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],vf=H("arrow-left",xG);var yG=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],xf=H("arrow-right",yG);var wG=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],_u=H("arrow-up-down",wG);var CG=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Vu=H("arrow-up",CG);var SG=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],yf=H("bold",SG);var bG=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],el=H("calendar",bG);var RG=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vo=H("check",RG);var IG=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ra=H("chevron-down",IG);var PG=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],wn=H("chevron-left",PG);var LG=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],No=H("chevron-right",LG);var TG=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],wf=H("chevron-up",TG);var kG=[["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"}]],Cn=H("circle-alert",kG);var MG=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Hi=H("circle-check-big",MG);var EG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],tl=H("circle",EG);var AG=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Cf=H("clock",AG);var DG=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Sf=H("code",DG);var NG=[["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"}]],bf=H("copy",NG);var OG=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Rf=H("credit-card",OG);var FG=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],Bu=H("crown",FG);var _G=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],If=H("dot",_G);var VG=[["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"}]],na=H("ellipsis",VG);var BG=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Pf=H("external-link",BG);var HG=[["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"}]],ol=H("eye",HG);var UG=[["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"}]],Lf=H("file-text",UG);var zG=[["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"}]],Tf=H("file",zG);var GG=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],kf=H("git-fork",GG);var WG=[["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"}]],rl=H("image",WG);var jG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Hu=H("info",jG);var qG=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Mf=H("italic",qG);var $G=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Ef=H("link",$G);var KG=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],Af=H("list-ordered",KG);var XG=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],Df=H("list",XG);var YG=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Vt=H("loader-circle",YG);var QG=[["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"}]],Uu=H("lock",QG);var ZG=[["path",{d:"M5 12h14",key:"1ays0h"}]],Nf=H("minus",ZG);var JG=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],Of=H("music",JG);var eW=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],zu=H("palette",eW);var tW=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Ff=H("phone",tW);var oW=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],hh=H("pipette",oW);var rW=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],_f=H("quote",rW);var nW=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],Vf=H("redo",nW);var aW=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],nl=H("search",aW);var iW=[["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"}]],Qo=H("square-pen",iW);var sW=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Ui=H("star",sW);var lW=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],Bf=H("strikethrough",lW);var uW=[["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"}]],zi=H("triangle-alert",uW);var cW=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Hf=H("underline",cW);var dW=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],Uf=H("undo",dW);var fW=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],zf=H("upload",fW);var pW=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Gf=H("video",pW);var mW=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hr=H("x",mW);var gW=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Gu=H("zap",gW);function dk(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=dk(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function vh(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=dk(e))&&(r&&(r+=" "),r+=t);return r}var aC="-",hW=e=>{let t=xW(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{let s=i.split(aC);return s[0]===""&&s.length!==1&&s.shift(),mk(s,t)||vW(i)},getConflictingClassGroupIds:(i,s)=>{let l=o[i]||[];return s&&r[i]?[...l,...r[i]]:l}}},mk=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),n=r?mk(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(aC);return t.validators.find(({validator:i})=>i(a))?.classGroupId},fk=/^\[(.+)\]$/,vW=e=>{if(fk.test(e)){let t=fk.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},xW=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return wW(Object.entries(e.classGroups),o).forEach(([a,i])=>{nC(i,r,a,t)}),r},nC=(e,t,o,r)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:pk(t,n);a.classGroupId=o;return}if(typeof n=="function"){if(yW(n)){nC(n(r),t,o,r);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([a,i])=>{nC(i,pk(t,a),o,r)})})},pk=(e,t)=>{let o=e;return t.split(aC).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},yW=e=>e.isThemeGetter,wW=(e,t)=>t?e.map(([o,r])=>{let n=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[o,n]}):e,CW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,n=(a,i)=>{o.set(a,i),t++,t>e&&(t=0,r=o,o=new Map)};return{get(a){let i=o.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return n(a,i),i},set(a,i){o.has(a)?o.set(a,i):n(a,i)}}},gk="!",SW=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,n=t[0],a=t.length,i=s=>{let l=[],u=0,c=0,d;for(let x=0;x<s.length;x++){let h=s[x];if(u===0){if(h===n&&(r||s.slice(x,x+a)===t)){l.push(s.slice(c,x)),c=x+a;continue}if(h==="/"){d=x;continue}}h==="["?u++:h==="]"&&u--}let f=l.length===0?s:s.substring(c),p=f.startsWith(gk),g=p?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return o?s=>o({className:s,parseClassName:i}):i},bW=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},RW=e=>({cache:CW(e.cacheSize),parseClassName:SW(e),...hW(e)}),IW=/\s+/,PW=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(IW),s="";for(let l=i.length-1;l>=0;l-=1){let u=i[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=o(u),g=!!p,m=r(g?f.substring(0,p):f);if(!m){if(!g){s=u+(s.length>0?" "+s:s);continue}if(m=r(f),!m){s=u+(s.length>0?" "+s:s);continue}g=!1}let x=bW(c).join(":"),h=d?x+gk:x,v=h+m;if(a.includes(v))continue;a.push(v);let y=n(m,g);for(let w=0;w<y.length;++w){let C=y[w];a.push(h+C)}s=u+(s.length>0?" "+s:s)}return s};function LW(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=hk(t))&&(r&&(r+=" "),r+=o);return r}var hk=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=hk(e[r]))&&(o&&(o+=" "),o+=t);return o};function TW(e,...t){let o,r,n,a=i;function i(l){let u=t.reduce((c,d)=>d(c),e());return o=RW(u),r=o.cache.get,n=o.cache.set,a=s,s(l)}function s(l){let u=r(l);if(u)return u;let c=PW(l,o);return n(l,c),c}return function(){return a(LW.apply(null,arguments))}}var ot=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},vk=/^\[(?:([a-z-]+):)?(.+)\]$/i,kW=/^\d+\/\d+$/,MW=new Set(["px","full","screen"]),EW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AW=/\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$/,DW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,NW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Da=e=>Wu(e)||MW.has(e)||kW.test(e),Gi=e=>ju(e,"length",GW),Wu=e=>!!e&&!Number.isNaN(Number(e)),rC=e=>ju(e,"number",Wu),Wf=e=>!!e&&Number.isInteger(Number(e)),FW=e=>e.endsWith("%")&&Wu(e.slice(0,-1)),Pe=e=>vk.test(e),Wi=e=>EW.test(e),_W=new Set(["length","size","percentage"]),VW=e=>ju(e,_W,xk),BW=e=>ju(e,"position",xk),HW=new Set(["image","url"]),UW=e=>ju(e,HW,jW),zW=e=>ju(e,"",WW),jf=()=>!0,ju=(e,t,o)=>{let r=vk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},GW=e=>AW.test(e)&&!DW.test(e),xk=()=>!1,WW=e=>NW.test(e),jW=e=>OW.test(e);var qW=()=>{let e=ot("colors"),t=ot("spacing"),o=ot("blur"),r=ot("brightness"),n=ot("borderColor"),a=ot("borderRadius"),i=ot("borderSpacing"),s=ot("borderWidth"),l=ot("contrast"),u=ot("grayscale"),c=ot("hueRotate"),d=ot("invert"),f=ot("gap"),p=ot("gradientColorStops"),g=ot("gradientColorStopPositions"),m=ot("inset"),x=ot("margin"),h=ot("opacity"),v=ot("padding"),y=ot("saturate"),w=ot("scale"),C=ot("sepia"),b=ot("skew"),S=ot("space"),I=ot("translate"),L=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",Pe,t],E=()=>[Pe,t],_=()=>["",Da,Gi],D=()=>["auto",Wu,Pe],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",Pe],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[Wu,Pe];return{cacheSize:500,separator:":",theme:{colors:[jf],spacing:[Da,Gi],blur:["none","",Wi,Pe],brightness:ae(),borderColor:[e],borderRadius:["none","","full",Wi,Pe],borderSpacing:E(),borderWidth:_(),contrast:ae(),grayscale:A(),hueRotate:ae(),invert:A(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[FW,Gi],inset:k(),margin:k(),opacity:ae(),padding:E(),saturate:ae(),scale:ae(),sepia:A(),skew:ae(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",Pe]}],container:["container"],columns:[{columns:[Wi]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"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:[...z(),Pe]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wf,Pe]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Pe]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",Wf,Pe]}],"grid-cols":[{"grid-cols":[jf]}],"col-start-end":[{col:["auto",{span:["full",Wf,Pe]},Pe]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[jf]}],"row-start-end":[{row:["auto",{span:[Wf,Pe]},Pe]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Pe]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Pe,t]}],"min-w":[{"min-w":[Pe,t,"min","max","fit"]}],"max-w":[{"max-w":[Pe,t,"none","full","min","max","fit","prose",{screen:[Wi]},Wi]}],h:[{h:[Pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Wi,Gi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rC]}],"font-family":[{font:[jf]}],"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",Pe]}],"line-clamp":[{"line-clamp":["none",Wu,rC]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Da,Pe]}],"list-image":[{"list-image":["none",Pe]}],"list-style-type":[{list:["none","disc","decimal",Pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Da,Gi]}],"underline-offset":[{"underline-offset":["auto",Da,Pe]}],"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:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pe]}],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",Pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...z(),BW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",VW]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},UW]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:F()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[Da,Pe]}],"outline-w":[{outline:[Da,Gi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[Da,Gi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wi,zW]}],"shadow-color":[{shadow:[jf]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Wi,Pe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Pe]}],duration:[{duration:ae()}],ease:[{ease:["linear","in","out","in-out",Pe]}],delay:[{delay:ae()}],animate:[{animate:["none","spin","ping","pulse","bounce",Pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Wf,Pe]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Pe]}],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",Pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",Pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Da,Gi,rC]}],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"]}}};var yk=TW(qW);function P(...e){return yk(vh(e))}var ji=R(N()),$W=nk,wk=xh.forwardRef(({className:e,...t},o)=>(0,ji.jsx)(ak,{ref:o,className:P("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));wk.displayName="AccordionItem";var Ck=xh.forwardRef(({className:e,children:t,...o},r)=>(0,ji.jsx)(ik,{className:"flex",children:(0,ji.jsxs)(eC,{ref:r,className:P("flex flex-1 items-center justify-between py-4 font-medium transition-all dark:text-gray-100","hover:underline hover:text-primary dark:hover:text-primary-400","[&[data-state=open]>svg]:rotate-180",e),...o,children:[t,(0,ji.jsx)(ra,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));Ck.displayName=eC.displayName;var Sk=xh.forwardRef(({className:e,children:t,...o},r)=>(0,ji.jsx)(tC,{ref:r,className:P("overflow-hidden text-sm text-gray-700 dark:text-gray-300 transition-all","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...o,children:(0,ji.jsx)("div",{className:"pb-4 pt-0",children:t})}));Sk.displayName=tC.displayName;var qu=R(M());var bk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rk=vh,K=(e,t)=>o=>{var r;if(t?.variants==null)return Rk(e,o?.class,o?.className);let{variants:n,defaultVariants:a}=t,i=Object.keys(n).map(u=>{let c=o?.[u],d=a?.[u];if(c===null)return null;let f=bk(c)||bk(d);return n[u][f]}),s=o&&Object.entries(o).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(g=>{let[m,x]=g;return Array.isArray(x)?x.includes({...a,...s}[m]):{...a,...s}[m]===x})?[...u,d,f]:u},[]);return Rk(e,i,l,o?.class,o?.className)};var Na=R(N()),KW=K("relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",{variants:{variant:{default:"bg-background text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/30",success:"bg-success/10 text-success border-success/30",warning:"bg-warning/10 text-warning border-warning/30",error:"bg-destructive/10 text-destructive border-destructive/30",info:"bg-info/10 text-info border-info/30"},size:{sm:"py-2 text-xs",default:"py-3 text-sm",lg:"py-4 text-base"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},withClose:{true:"pr-10"}},defaultVariants:{variant:"default",size:"default",radius:"default",withClose:!1}}),Ik=qu.forwardRef(({className:e,variant:t="default",size:o,radius:r,hideIcon:n=!1,closable:a=!1,onClose:i,children:s,...l},u)=>{let c=qu.useMemo(()=>{switch(t){case"success":return vo;case"warning":return zi;case"error":return Cn;case"info":return Hu;default:return Hu}},[t]);return(0,Na.jsxs)("div",{ref:u,role:"alert",className:P("moonui-theme",KW({variant:t,size:o,radius:r,withClose:a}),e),...l,children:[!n&&(0,Na.jsx)(c,{className:"h-5 w-5"}),(0,Na.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,Na.jsx)("button",{onClick:i,className:"absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100","aria-label":"Close alert",children:(0,Na.jsx)(hr,{className:"h-4 w-4"})})]})});Ik.displayName="Alert";var Pk=qu.forwardRef(({className:e,...t},o)=>(0,Na.jsx)("h5",{ref:o,className:P("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));Pk.displayName="AlertTitle";var Lk=qu.forwardRef(({className:e,...t},o)=>(0,Na.jsx)("div",{ref:o,className:P("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));Lk.displayName="AlertDescription";var Tk=R(M());var iC=R(N()),XW=K("relative overflow-hidden",{variants:{variant:{default:"bg-muted/10",ghost:"bg-transparent",outline:"border border-border",card:"bg-card shadow-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default",radius:"md"}}),kk=Tk.forwardRef(({className:e,variant:t,radius:o,ratio:r=16/9,style:n,children:a,...i},s)=>(0,iC.jsx)("div",{ref:s,className:P("moonui-theme",XW({variant:t,radius:o}),e),style:{position:"relative",paddingBottom:`${1/r*100}%`,...n},...i,children:(0,iC.jsx)("div",{className:"absolute inset-0",children:a})}));kk.displayName="AspectRatio";var al=R(M());var Vr=R(M(),1);var $u=R(M(),1);function rt(e){let t=$u.useRef(e);return $u.useEffect(()=>{t.current=e}),$u.useMemo(()=>(...o)=>t.current?.(...o),[])}var Nk=R(Dk(),1);function Ok(){return(0,Nk.useSyncExternalStore)(aj,()=>!0,()=>!1)}function aj(){return()=>{}}var qf=R(N(),1),lC="Avatar",[ij,$ne]=Oe(lC),[sj,_k]=ij(lC),Vk=Vr.forwardRef((e,t)=>{let{__scopeAvatar:o,...r}=e,[n,a]=Vr.useState("idle");return(0,qf.jsx)(sj,{scope:o,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:(0,qf.jsx)($.span,{...r,ref:t})})});Vk.displayName=lC;var Bk="AvatarImage",Hk=Vr.forwardRef((e,t)=>{let{__scopeAvatar:o,src:r,onLoadingStatusChange:n=()=>{},...a}=e,i=_k(Bk,o),s=lj(r,a),l=rt(u=>{n(u),i.onImageLoadingStatusChange(u)});return _e(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,qf.jsx)($.img,{...a,ref:t,src:r}):null});Hk.displayName=Bk;var Uk="AvatarFallback",zk=Vr.forwardRef((e,t)=>{let{__scopeAvatar:o,delayMs:r,...n}=e,a=_k(Uk,o),[i,s]=Vr.useState(r===void 0);return Vr.useEffect(()=>{if(r!==void 0){let l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),i&&a.imageLoadingStatus!=="loaded"?(0,qf.jsx)($.span,{...n,ref:t}):null});zk.displayName=Uk;function Fk(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function lj(e,{referrerPolicy:t,crossOrigin:o}){let r=Ok(),n=Vr.useRef(null),a=(()=>r?(n.current||(n.current=new window.Image),n.current):null)(),[i,s]=Vr.useState(()=>Fk(a,e));return _e(()=>{s(Fk(a,e))},[a,e]),_e(()=>{let l=d=>()=>{s(d)};if(!a)return;let u=l("loaded"),c=l("error");return a.addEventListener("load",u),a.addEventListener("error",c),t&&(a.referrerPolicy=t),typeof o=="string"&&(a.crossOrigin=o),()=>{a.removeEventListener("load",u),a.removeEventListener("error",c)}},[a,o,t]),i}var uC=Vk,cC=Hk,dC=zk;var Sn=R(N()),cj=K("relative flex shrink-0 overflow-hidden",{variants:{size:{default:"h-10 w-10",xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12",xl:"h-16 w-16","2xl":"h-20 w-20"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",full:"rounded-full",none:"rounded-none"},variant:{default:"",ring:"ring-2 ring-border",ringOffset:"ring-2 ring-border ring-offset-2 ring-offset-background",border:"border-2 border-border"}},defaultVariants:{size:"default",radius:"default",variant:"default"}}),fC=al.forwardRef(({className:e,size:t,radius:o,variant:r,...n},a)=>(0,Sn.jsx)(uC,{ref:a,className:P("moonui-theme",cj({size:t,radius:o,variant:r}),e),...n}));fC.displayName=uC.displayName;var Gk=al.forwardRef(({className:e,...t},o)=>(0,Sn.jsx)(cC,{ref:o,className:P("moonui-theme","aspect-square h-full w-full",e),...t}));Gk.displayName=cC.displayName;var pC=al.forwardRef(({className:e,...t},o)=>(0,Sn.jsx)(dC,{ref:o,className:P("flex h-full w-full items-center justify-center bg-muted",e),...t}));pC.displayName=dC.displayName;var Wk=al.forwardRef(({className:e,max:t,children:o,overlapOffset:r=-8,...n},a)=>{let i=al.Children.toArray(o),s=t?i.slice(0,t):i,l=t?Math.max(0,i.length-t):0;return(0,Sn.jsx)("div",{ref:a,className:P("moonui-theme","flex items-center",e),...n,children:(0,Sn.jsxs)("div",{className:"flex",children:[s.map((u,c)=>(0,Sn.jsx)("div",{className:"relative",style:{marginLeft:c===0?0:`${r}px`,zIndex:s.length-c},children:u},c)),l>0&&(0,Sn.jsx)("div",{className:"relative z-0",style:{marginLeft:`${r}px`},children:(0,Sn.jsx)(fC,{variant:"border",children:(0,Sn.jsxs)(pC,{children:["+",l]})})})]})})});Wk.displayName="AvatarGroup";var jk=R(M());var xo=R(N()),qk=K(["inline-flex items-center justify-center gap-1.5","font-medium transition-colors duration-200","border focus:outline-none","focus-visible:ring-2 focus-visible:ring-offset-1","mr-2 mb-2 last:mr-0"],{variants:{variant:{primary:["border-transparent bg-primary text-primary-foreground","hover:bg-primary/90","focus-visible:ring-primary/30 dark:focus-visible:ring-primary/40","dark:bg-primary/90 dark:shadow-inner dark:shadow-primary/10"],secondary:["border-transparent bg-secondary text-secondary-foreground","hover:bg-gray-200 dark:hover:bg-gray-600","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],outline:["border-gray-200 dark:border-gray-600","bg-transparent text-foreground","hover:border-gray-300 dark:hover:border-gray-500","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm"],destructive:["border-transparent bg-error text-white","hover:bg-error/90 dark:hover:bg-error/80","focus-visible:ring-error/30 dark:focus-visible:ring-error/25","dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10"],success:["border-transparent bg-success text-success-foreground","hover:bg-success/90 dark:hover:bg-success/80","focus-visible:ring-success/30 dark:focus-visible:ring-success/25","dark:bg-success/90 dark:text-success-foreground dark:shadow-inner dark:shadow-success/10"],warning:["border-transparent bg-warning text-warning-foreground","hover:bg-warning/90 dark:hover:bg-warning/80","focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25","dark:bg-warning/90 dark:text-warning-foreground dark:shadow-inner dark:shadow-warning/10"],ghost:["border border-gray-200 bg-gray-50/50 text-gray-700","hover:bg-gray-100 dark:hover:bg-gray-800/60","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300","transition-all duration-200"],pro:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"],admin:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"]},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-3 text-sm",lg:"h-8 px-4 text-base"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",none:"rounded-none"}},defaultVariants:{variant:"primary",size:"md",radius:"default"}}),Zo=jk.forwardRef(({className:e,variant:t,size:o,radius:r,withDot:n,dotColor:a,removable:i,onRemove:s,leftIcon:l,rightIcon:u,noAutoSpacing:c,children:d,...f},p)=>{let g=l,m=d;return t==="pro"&&(g=l||(0,xo.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:[(0,xo.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,xo.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,xo.jsx)("path",{d:"M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z",fill:"currentColor"})]}),m=d||"Pro"),t==="admin"&&(g=l||(0,xo.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:(0,xo.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",fill:"currentColor"})}),m=d||"Admin Pro"),(0,xo.jsxs)("div",{ref:p,className:P("moonui-theme",qk({variant:t,size:o,radius:r}),c&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...f,children:[n&&(0,xo.jsx)("span",{className:P("h-2 w-2 rounded-full",a||(t==="destructive"||t==="success"||t==="warning"?"bg-white":t==="secondary"?"bg-secondary-foreground":t==="outline"||t==="ghost"?"bg-foreground":t==="pro"||t==="admin"?"bg-white":"bg-primary-foreground")),"aria-hidden":"true"}),g&&(0,xo.jsx)("span",{className:"inline-flex shrink-0 items-center",children:g}),(0,xo.jsx)("span",{className:"inline-flex items-center",children:m}),u&&(0,xo.jsx)("span",{className:"inline-flex shrink-0 items-center",children:u}),i&&s&&(0,xo.jsx)("button",{type:"button",className:"ml-1 -mr-1 h-3.5 w-3.5 rounded-full inline-flex items-center justify-center hover:bg-black/10 dark:hover:bg-white/10",onClick:x=>{x.stopPropagation(),s()},"aria-label":"Remove badge",children:(0,xo.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"opacity-70","aria-hidden":"true",children:(0,xo.jsx)("path",{d:"M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});Zo.displayName="Badge";var aa=R(M());var Oo=R(N()),dj=K("flex items-center gap-1.5 text-sm",{variants:{variant:{default:"text-foreground transition-colors",muted:"text-muted-foreground transition-colors",ghost:"text-foreground/60 transition-colors"},size:{default:"text-sm",sm:"text-xs",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),$k=aa.forwardRef(({className:e,variant:t,size:o,...r},n)=>(0,Oo.jsx)("nav",{ref:n,className:P("moonui-theme",dj({variant:t,size:o}),e),"aria-label":"breadcrumb",...r}));$k.displayName="Breadcrumb";var Kk=aa.forwardRef(({className:e,collapsed:t,collapsedWidth:o=3,...r},n)=>{let a=aa.Children.toArray(r.children).filter(Boolean),i=a.length;if(t&&i>o){let s=a[0],l=a.slice(-2);return(0,Oo.jsxs)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r,children:[s,(0,Oo.jsx)(mC,{}),l]})}return(0,Oo.jsx)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r})});Kk.displayName="BreadcrumbList";var Xk=aa.forwardRef(({className:e,isCurrent:t,href:o,asChild:r=!1,...n},a)=>{let i=r?aa.Fragment:o?"a":"span",s=r?{}:o?{href:o}:{};return(0,Oo.jsx)("li",{ref:a,className:P("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...n,children:(0,Oo.jsx)(i,{className:P("transition-colors duration-200 hover:text-foreground",t?"font-medium text-foreground":"text-muted-foreground hover:text-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30"),...s,children:n.children})})});Xk.displayName="BreadcrumbItem";var Yk=({children:e,className:t,...o})=>(0,Oo.jsx)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","text-muted-foreground opacity-70",t),...o,children:e||(0,Oo.jsx)(No,{className:"h-3.5 w-3.5"})});Yk.displayName="BreadcrumbSeparator";var mC=({className:e,...t})=>(0,Oo.jsxs)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,Oo.jsx)(na,{className:"h-4 w-4"}),(0,Oo.jsx)("span",{className:"sr-only",children:"More pages"})]});mC.displayName="BreadcrumbEllipsis";var Qk=aa.forwardRef(({className:e,href:t,...o},r)=>(0,Oo.jsx)("a",{ref:r,href:t,className:P("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...o}));Qk.displayName="BreadcrumbLink";var Zk=aa.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)("span",{ref:o,className:P("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));Zk.displayName="BreadcrumbPage";var Jk=R(M());var wh=R(N()),yh=K(["inline-flex items-center justify-center gap-2 whitespace-nowrap","font-medium relative","transition-all duration-200 ease-out","transform active:scale-[0.98]","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none disabled:transform-none"],{variants:{variant:{primary:["bg-primary text-primary-foreground","dark:bg-primary dark:text-primary-foreground","hover:bg-primary/90 dark:hover:bg-primary/90","active:bg-primary/80 dark:active:bg-primary/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],secondary:["bg-gray-100 text-gray-900","dark:bg-gray-800 dark:text-gray-100","hover:bg-gray-200 dark:hover:bg-gray-700","active:bg-gray-300 dark:active:bg-gray-600","border border-input","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","shadow-sm hover:shadow-md"],outline:["bg-background text-foreground","dark:bg-background dark:text-foreground","border border-input dark:border-input","hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground","active:bg-accent/80 dark:active:bg-accent/80","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],ghost:["text-gray-700","dark:text-gray-300","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100","active:bg-gray-200 dark:active:bg-gray-700","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],destructive:["bg-destructive text-destructive-foreground","dark:bg-destructive dark:text-destructive-foreground","hover:bg-destructive/90 dark:hover:bg-destructive/90","active:bg-destructive/80 dark:active:bg-destructive/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],success:["bg-success text-success-foreground","dark:bg-success dark:text-success-foreground","hover:bg-success/90 dark:hover:bg-success/90","active:bg-success/80 dark:active:bg-success/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],link:["text-primary bg-transparent","underline-offset-4 hover:underline","hover:text-primary/80 active:text-primary/70","p-0 h-auto","transition-colors duration-200"],gradient:["bg-gradient-to-r from-purple-500 to-pink-500 text-white","hover:from-purple-600 hover:to-pink-600","active:from-purple-700 active:to-pink-700","shadow-xl shadow-purple-500/40","hover:shadow-2xl hover:shadow-purple-500/50","focus-visible:ring-purple-500/50","transition-all duration-300"],glow:["bg-blue-500 text-white","shadow-[0_0_30px_rgba(59,130,246,0.5)]","hover:shadow-[0_0_40px_rgba(59,130,246,0.7)]","active:shadow-[0_0_20px_rgba(59,130,246,0.4)]","hover:bg-blue-600","focus-visible:ring-blue-500/50","transition-all duration-300"],soft:["bg-primary/10 text-primary","hover:bg-primary/20","active:bg-primary/30","focus-visible:ring-primary/50","dark:bg-primary/20 dark:text-primary-foreground","dark:hover:bg-primary/30 dark:active:bg-primary/40","transition-colors duration-200"],glass:["bg-white/10 backdrop-blur-md text-foreground","border border-white/20","hover:bg-white/20 hover:border-white/30","active:bg-white/30","shadow-lg","focus-visible:ring-white/50","dark:bg-gray-800/10 dark:border-gray-700/20","dark:hover:bg-gray-800/20 dark:hover:border-gray-700/30","transition-all duration-200"],neon:["bg-transparent text-green-400","border-2 border-green-400","hover:bg-green-400 hover:text-gray-900","hover:shadow-[0_0_30px_rgba(74,222,128,0.6)]","active:shadow-[0_0_15px_rgba(74,222,128,0.4)]","focus-visible:ring-green-400/50","transition-all duration-300"]},size:{xs:"h-7 px-2.5 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-base",lg:"h-12 px-6 text-lg",xl:"h-14 px-8 text-xl",icon:"h-10 w-10 p-2","icon-sm":"h-8 w-8 p-1.5","icon-lg":"h-12 w-12 p-3"},rounded:{default:"rounded-xl",full:"rounded-full",none:"rounded-none",sm:"rounded-lg",lg:"rounded-2xl"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"primary",size:"md",rounded:"default",fullWidth:!1}}),De=Jk.forwardRef(({className:e,variant:t,size:o,rounded:r,fullWidth:n,asChild:a=!1,loading:i=!1,leftIcon:s,rightIcon:l,children:u,disabled:c,...d},f)=>(0,wh.jsxs)("button",{className:P("moonui-theme",yh({variant:t,size:o,rounded:r,fullWidth:n,className:e})),ref:f,disabled:c||i,"aria-busy":i||void 0,"data-loading":i?"":void 0,...d,children:[i&&(0,wh.jsx)(Vt,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,u,!i&&l]}));De.displayName="Button";var Ll=R(M());var Mp=R(N(),1),ua=R(M(),1);var eM=R(M(),1),Xu=(0,eM.createContext)({});var tM=R(M(),1);function ia(e){let t=(0,tM.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Ch=R(M(),1);var Yu=typeof window<"u";var Qu=Yu?Ch.useLayoutEffect:Ch.useEffect;var KC=R(N(),1),sE=R(M(),1),Tp=R(M(),1);var oM=R(M(),1),qi=(0,oM.createContext)(null);var aE=R(N(),1);function il(e,t){e.indexOf(t)===-1&&e.push(t)}function bn(e,t){let o=e.indexOf(t);o>-1&&e.splice(o,1)}var $t=(e,t,o)=>o>t?t:o<e?e:o;var Oa=()=>{},io=()=>{};var yo={};var $f=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Kf(e){return typeof e=="object"&&e!==null}var Xf=e=>/^0[^.\s]+$/u.test(e);function sl(e){let t;return()=>(t===void 0&&(t=e()),t)}var mt=e=>e;var fj=(e,t)=>o=>t(e(o)),Rn=(...e)=>e.reduce(fj);var Br=(e,t,o)=>{let r=t-e;return r===0?1:(o-e)/r};var Fa=class{constructor(){this.subscriptions=[]}add(t){return il(this.subscriptions,t),()=>bn(this.subscriptions,t)}notify(t,o,r){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](t,o,r);else for(let a=0;a<n;a++){let i=this.subscriptions[a];i&&i(t,o,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var bt=e=>e*1e3,Bt=e=>e/1e3;function Yf(e,t){return t?e*(1e3/t):0}var rM=(e,t,o)=>{let r=t-e;return((o-e)%r+r)%r+e};var nM=(e,t,o)=>(((1-3*o+3*t)*e+(3*o-6*t))*e+3*t)*e,pj=1e-7,mj=12;function gj(e,t,o,r,n){let a,i,s=0;do i=t+(o-t)/2,a=nM(i,r,n)-e,a>0?o=i:t=i;while(Math.abs(a)>pj&&++s<mj);return i}function $i(e,t,o,r){if(e===t&&o===r)return mt;let n=a=>gj(a,0,1,e,o);return a=>a===0||a===1?a:nM(n(a),t,r)}var Sh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var bh=e=>t=>1-e(1-t);var Rh=$i(.33,1.53,.69,.99),Zu=bh(Rh),Qf=Sh(Zu);var Zf=e=>(e*=2)<1?.5*Zu(e):.5*(2-Math.pow(2,-10*(e-1)));var Jf=e=>1-Math.sin(Math.acos(e)),ep=bh(Jf),tp=Sh(Jf);var gC=$i(.42,0,1,1),hC=$i(0,0,.58,1),op=$i(.42,0,.58,1);var rp=e=>Array.isArray(e)&&typeof e[0]!="number";function np(e,t){return rp(e)?e[rM(0,e.length,t)]:e}var ap=e=>Array.isArray(e)&&typeof e[0]=="number";var aM={linear:mt,easeIn:gC,easeInOut:op,easeOut:hC,circIn:Jf,circInOut:tp,circOut:ep,backIn:Zu,backInOut:Qf,backOut:Rh,anticipate:Zf},hj=e=>typeof e=="string",Ih=e=>{if(ap(e)){io(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,o,r,n]=e;return $i(t,o,r,n)}else if(hj(e))return io(aM[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),aM[e];return e};var ip=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Jo={value:null,addProjectionMetrics:null};function iM(e,t){let o=new Set,r=new Set,n=!1,a=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(d){i.has(d)&&(c.schedule(d),e()),l++,d(s)}let c={schedule:(d,f=!1,p=!1)=>{let m=p&&n?o:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(s=d,n){a=!0;return}n=!0,[o,r]=[r,o],o.forEach(u),t&&Jo.value&&Jo.value.frameloop[t].push(l),l=0,o.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}var vj=40;function Ph(e,t){let o=!1,r=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>o=!0,i=ip.reduce((y,w)=>(y[w]=iM(a,t?w:void 0),y),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:g}=i,m=()=>{let y=yo.useManualTiming?n.timestamp:performance.now();o=!1,yo.useManualTiming||(n.delta=r?1e3/60:Math.max(Math.min(y-n.timestamp,vj),1)),n.timestamp=y,n.isProcessing=!0,s.process(n),l.process(n),u.process(n),c.process(n),d.process(n),f.process(n),p.process(n),g.process(n),n.isProcessing=!1,o&&t&&(r=!1,e(m))},x=()=>{o=!0,r=!0,n.isProcessing||e(m)};return{schedule:ip.reduce((y,w)=>{let C=i[w];return y[w]=(b,S=!1,I=!1)=>(o||x(),C.schedule(b,S,I)),y},{}),cancel:y=>{for(let w=0;w<ip.length;w++)i[ip[w]].cancel(y)},state:n,steps:i}}var{schedule:Le,cancel:wo,state:xt,steps:sp}=Ph(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0);var Lh;function xj(){Lh=void 0}var yt={now:()=>(Lh===void 0&&yt.set(xt.isProcessing||yo.useManualTiming?xt.timestamp:performance.now()),Lh),set:e=>{Lh=e,queueMicrotask(xj)}};var In={layout:0,mainThread:0,waapi:0};var sM=e=>t=>typeof t=="string"&&t.startsWith(e),ll=sM("--"),yj=sM("var(--"),ul=e=>yj(e)?wj.test(e.split("/*")[0].trim()):!1,wj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var sa={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},_a={...sa,transform:e=>$t(0,1,e)},lp={...sa,default:1};var Ki=e=>Math.round(e*1e5)/1e5;var Ju=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function lM(e){return e==null}var uM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var ec=(e,t)=>o=>!!(typeof o=="string"&&uM.test(o)&&o.startsWith(e)||t&&!lM(o)&&Object.prototype.hasOwnProperty.call(o,t)),Th=(e,t,o)=>r=>{if(typeof r!="string")return r;let[n,a,i,s]=r.match(Ju);return{[e]:parseFloat(n),[t]:parseFloat(a),[o]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var Cj=e=>$t(0,255,e),vC={...sa,transform:e=>Math.round(Cj(e))},la={test:ec("rgb","red"),parse:Th("red","green","blue"),transform:({red:e,green:t,blue:o,alpha:r=1})=>"rgba("+vC.transform(e)+", "+vC.transform(t)+", "+vC.transform(o)+", "+Ki(_a.transform(r))+")"};function Sj(e){let t="",o="",r="",n="";return e.length>5?(t=e.substring(1,3),o=e.substring(3,5),r=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),o=e.substring(2,3),r=e.substring(3,4),n=e.substring(4,5),t+=t,o+=o,r+=r,n+=n),{red:parseInt(t,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:n?parseInt(n,16)/255:1}}var up={test:ec("#"),parse:Sj,transform:la.transform};var cp=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pn=cp("deg"),Co=cp("%"),ue=cp("px"),xC=cp("vh"),yC=cp("vw"),kh=(()=>({...Co,parse:e=>Co.parse(e)/100,transform:e=>Co.transform(e*100)}))();var Xi={test:ec("hsl","hue"),parse:Th("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:o,alpha:r=1})=>"hsla("+Math.round(e)+", "+Co.transform(Ki(t))+", "+Co.transform(Ki(o))+", "+Ki(_a.transform(r))+")"};var lt={test:e=>la.test(e)||up.test(e)||Xi.test(e),parse:e=>la.test(e)?la.parse(e):Xi.test(e)?Xi.parse(e):up.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?la.transform(e):Xi.transform(e),getAnimatableNone:e=>{let t=lt.parse(e);return t.alpha=0,lt.transform(t)}};var cM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function bj(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ju)?.length||0)+(e.match(cM)?.length||0)>0}var fM="number",pM="color",Rj="var",Ij="var(",dM="${}",Pj=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Yi(e){let t=e.toString(),o=[],r={color:[],number:[],var:[]},n=[],a=0,s=t.replace(Pj,l=>(lt.test(l)?(r.color.push(a),n.push(pM),o.push(lt.parse(l))):l.startsWith(Ij)?(r.var.push(a),n.push(Rj),o.push(l)):(r.number.push(a),n.push(fM),o.push(parseFloat(l))),++a,dM)).split(dM);return{values:o,split:s,indexes:r,types:n}}function mM(e){return Yi(e).values}function gM(e){let{split:t,types:o}=Yi(e),r=t.length;return n=>{let a="";for(let i=0;i<r;i++)if(a+=t[i],n[i]!==void 0){let s=o[i];s===fM?a+=Ki(n[i]):s===pM?a+=lt.transform(n[i]):a+=n[i]}return a}}var Lj=e=>typeof e=="number"?0:lt.test(e)?lt.getAnimatableNone(e):e;function Tj(e){let t=mM(e);return gM(e)(t.map(Lj))}var So={test:bj,parse:mM,createTransformer:gM,getAnimatableNone:Tj};function wC(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*6*o:o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function hM({hue:e,saturation:t,lightness:o,alpha:r}){e/=360,t/=100,o/=100;let n=0,a=0,i=0;if(!t)n=a=i=o;else{let s=o<.5?o*(1+t):o+t-o*t,l=2*o-s;n=wC(l,s,e+1/3),a=wC(l,s,e),i=wC(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:r}}function tc(e,t){return o=>o>0?t:e}var ke=(e,t,o)=>e+(t-e)*o;var CC=(e,t,o)=>{let r=e*e,n=o*(t*t-r)+r;return n<0?0:Math.sqrt(n)},kj=[up,la,Xi],Mj=e=>kj.find(t=>t.test(e));function vM(e){let t=Mj(e);if(Oa(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let o=t.parse(e);return t===Xi&&(o=hM(o)),o}var SC=(e,t)=>{let o=vM(e),r=vM(t);if(!o||!r)return tc(e,t);let n={...o};return a=>(n.red=CC(o.red,r.red,a),n.green=CC(o.green,r.green,a),n.blue=CC(o.blue,r.blue,a),n.alpha=ke(o.alpha,r.alpha,a),la.transform(n))};var Mh=new Set(["none","hidden"]);function xM(e,t){return Mh.has(e)?o=>o<=0?e:t:o=>o>=1?t:e}function Ej(e,t){return o=>ke(e,t,o)}function Eh(e){return typeof e=="number"?Ej:typeof e=="string"?ul(e)?tc:lt.test(e)?SC:Nj:Array.isArray(e)?yM:typeof e=="object"?lt.test(e)?SC:Aj:tc}function yM(e,t){let o=[...e],r=o.length,n=e.map((a,i)=>Eh(a)(a,t[i]));return a=>{for(let i=0;i<r;i++)o[i]=n[i](a);return o}}function Aj(e,t){let o={...e,...t},r={};for(let n in o)e[n]!==void 0&&t[n]!==void 0&&(r[n]=Eh(e[n])(e[n],t[n]));return n=>{for(let a in r)o[a]=r[a](n);return o}}function Dj(e,t){let o=[],r={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let a=t.types[n],i=e.indexes[a][r[a]],s=e.values[i]??0;o[n]=s,r[a]++}return o}var Nj=(e,t)=>{let o=So.createTransformer(t),r=Yi(e),n=Yi(t);return r.indexes.var.length===n.indexes.var.length&&r.indexes.color.length===n.indexes.color.length&&r.indexes.number.length>=n.indexes.number.length?Mh.has(e)&&!n.values.length||Mh.has(t)&&!r.values.length?xM(e,t):Rn(yM(Dj(r,n),n.values),o):(Oa(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),tc(e,t))};function Ah(e,t,o){return typeof e=="number"&&typeof t=="number"&&typeof o=="number"?ke(e,t,o):Eh(e)(e,t)}var wM=e=>{let t=({timestamp:o})=>e(o);return{start:(o=!0)=>Le.update(t,o),stop:()=>wo(t),now:()=>xt.isProcessing?xt.timestamp:yt.now()}};var Dh=(e,t,o=10)=>{let r="",n=Math.max(Math.round(t/o),2);for(let a=0;a<n;a++)r+=Math.round(e(a/(n-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function oc(e){let t=0,o=50,r=e.next(t);for(;!r.done&&t<2e4;)t+=o,r=e.next(t);return t>=2e4?1/0:t}function dp(e,t=100,o){let r=o({...e,keyframes:[0,t]}),n=Math.min(oc(r),2e4);return{type:"keyframes",ease:a=>r.next(n*a).value/t,duration:Bt(n)}}var Oj=5;function Nh(e,t,o){let r=Math.max(t-Oj,0);return Yf(o-e(r),t-r)}var nt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var RC=.001;function CM({duration:e=nt.duration,bounce:t=nt.bounce,velocity:o=nt.velocity,mass:r=nt.mass}){let n,a;Oa(e<=bt(nt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=$t(nt.minDamping,nt.maxDamping,i),e=$t(nt.minDuration,nt.maxDuration,Bt(e)),i<1?(n=u=>{let c=u*i,d=c*e,f=c-o,p=Oh(u,i),g=Math.exp(-d);return RC-f/p*g},a=u=>{let d=u*i*e,f=d*o+o,p=Math.pow(i,2)*Math.pow(u,2)*e,g=Math.exp(-d),m=Oh(Math.pow(u,2),i);return(-n(u)+RC>0?-1:1)*((f-p)*g)/m}):(n=u=>{let c=Math.exp(-u*e),d=(u-o)*e+1;return-RC+c*d},a=u=>{let c=Math.exp(-u*e),d=(o-u)*(e*e);return c*d});let s=5/e,l=_j(n,a,s);if(e=bt(e),isNaN(l))return{stiffness:nt.stiffness,damping:nt.damping,duration:e};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}var Fj=12;function _j(e,t,o){let r=o;for(let n=1;n<Fj;n++)r=r-e(r)/t(r);return r}function Oh(e,t){return e*Math.sqrt(1-t*t)}var Vj=["duration","bounce"],Bj=["stiffness","damping","mass"];function SM(e,t){return t.some(o=>e[o]!==void 0)}function Hj(e){let t={velocity:nt.velocity,stiffness:nt.stiffness,damping:nt.damping,mass:nt.mass,isResolvedFromDuration:!1,...e};if(!SM(e,Bj)&&SM(e,Vj))if(e.visualDuration){let o=e.visualDuration,r=2*Math.PI/(o*1.2),n=r*r,a=2*$t(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:nt.mass,stiffness:n,damping:a}}else{let o=CM(e);t={...t,...o,mass:nt.mass},t.isResolvedFromDuration=!0}return t}function Va(e=nt.visualDuration,t=nt.bounce){let o=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:r,restDelta:n}=o,a=o.keyframes[0],i=o.keyframes[o.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=Hj({...o,velocity:-Bt(o.velocity||0)}),g=f||0,m=u/(2*Math.sqrt(l*c)),x=i-a,h=Bt(Math.sqrt(l/c)),v=Math.abs(x)<5;r||(r=v?nt.restSpeed.granular:nt.restSpeed.default),n||(n=v?nt.restDelta.granular:nt.restDelta.default);let y;if(m<1){let C=Oh(h,m);y=b=>{let S=Math.exp(-m*h*b);return i-S*((g+m*h*x)/C*Math.sin(C*b)+x*Math.cos(C*b))}}else if(m===1)y=C=>i-Math.exp(-h*C)*(x+(g+h*x)*C);else{let C=h*Math.sqrt(m*m-1);y=b=>{let S=Math.exp(-m*h*b),I=Math.min(C*b,300);return i-S*((g+m*h*x)*Math.sinh(I)+C*x*Math.cosh(I))/C}}let w={calculatedDuration:p&&d||null,next:C=>{let b=y(C);if(p)s.done=C>=d;else{let S=C===0?g:0;m<1&&(S=C===0?bt(g):Nh(y,C,b));let I=Math.abs(S)<=r,L=Math.abs(i-b)<=n;s.done=I&&L}return s.value=s.done?i:b,s},toString:()=>{let C=Math.min(oc(w),2e4),b=Dh(S=>w.next(C*S).value,C,30);return C+"ms "+b},toTransition:()=>{}};return w}Va.applyToOptions=e=>{let t=dp(e,100,Va);return e.ease=t.ease,e.duration=bt(t.duration),e.type="keyframes",e};function fp({keyframes:e,velocity:t=0,power:o=.8,timeConstant:r=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],f={done:!1,value:d},p=I=>s!==void 0&&I<s||l!==void 0&&I>l,g=I=>s===void 0?l:l===void 0||Math.abs(s-I)<Math.abs(l-I)?s:l,m=o*t,x=d+m,h=i===void 0?x:i(x);h!==x&&(m=h-d);let v=I=>-m*Math.exp(-I/r),y=I=>h+v(I),w=I=>{let L=v(I),T=y(I);f.done=Math.abs(L)<=u,f.value=f.done?h:T},C,b,S=I=>{p(f.value)&&(C=I,b=Va({keyframes:[f.value,g(f.value)],velocity:Nh(y,I,f.value),damping:n,stiffness:a,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:I=>{let L=!1;return!b&&C===void 0&&(L=!0,w(I),S(I)),C!==void 0&&I>=C?b.next(I-C):(!L&&w(I),f)}}}function Uj(e,t,o){let r=[],n=o||yo.mix||Ah,a=e.length-1;for(let i=0;i<a;i++){let s=n(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||mt:t;s=Rn(l,s)}r.push(s)}return r}function Fh(e,t,{clamp:o=!0,ease:r,mixer:n}={}){let a=e.length;if(io(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Uj(t,r,n),l=s.length,u=c=>{if(i&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);let f=Br(e[d],e[d+1],c);return s[d](f)};return o?c=>u($t(e[0],e[a-1],c)):u}function pp(e,t){let o=e[e.length-1];for(let r=1;r<=t;r++){let n=Br(0,t,r);e.push(ke(o,1,n))}}function mp(e){let t=[0];return pp(t,e.length-1),t}function bM(e,t){return e.map(o=>o*t)}function zj(e,t){return e.map(()=>t||op).splice(0,e.length-1)}function cl({duration:e=300,keyframes:t,times:o,ease:r="easeInOut"}){let n=rp(r)?r.map(Ih):Ih(r),a={done:!1,value:t[0]},i=bM(o&&o.length===t.length?o:mp(t),e),s=Fh(i,t,{ease:Array.isArray(n)?n:zj(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var Gj=e=>e!==null;function rc(e,{repeat:t,repeatType:o="loop"},r,n=1){let a=e.filter(Gj),s=n<0||t&&o!=="loop"&&t%2===1?0:a.length-1;return!s||r===void 0?a[s]:r}var Wj={decay:fp,inertia:fp,tween:cl,keyframes:cl,spring:Va};function _h(e){typeof e.type=="string"&&(e.type=Wj[e.type])}var Qi=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,o){return this.finished.then(t,o)}};var jj=e=>e/100,Ba=class extends Qi{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:o}=this.options;o&&o.updatedAt!==yt.now()&&this.tick(yt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},In.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;_h(t);let{type:o=cl,repeat:r=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=o||cl;l!==cl&&typeof s[0]!="number"&&(this.mixKeyframes=Rn(jj,Ah(s[0],s[1])),s=[0,100]);let u=l({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=oc(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=u}updateTime(t){let o=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=o}tick(t,o=!1){let{generator:r,totalDuration:n,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:p,type:g,onUpdate:m,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),o?this.currentTime=t:this.updateTime(t);let h=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?h<0:h>n;this.currentTime=Math.max(h,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let y=this.currentTime,w=r;if(d){let I=Math.min(this.currentTime,n)/s,L=Math.floor(I),T=I%1;!T&&I>=1&&(T=1),T===1&&L--,L=Math.min(L,d+1),!!(L%2)&&(f==="reverse"?(T=1-T,p&&(T-=p/s)):f==="mirror"&&(w=i)),y=$t(0,1,T)*s}let C=v?{done:!1,value:c[0]}:w.next(y);a&&(C.value=a(C.value));let{done:b}=C;!v&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return S&&g!==fp&&(C.value=rc(c,this.options,x,this.speed)),m&&m(C.value),S&&this.finish(),C}then(t,o){return this.finished.then(t,o)}get duration(){return Bt(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Bt(t)}get time(){return Bt(this.currentTime)}set time(t){t=bt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(yt.now());let o=this.playbackSpeed!==t;this.playbackSpeed=t,o&&(this.time=Bt(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=wM,startTime:o}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),this.options.onPlay?.();let r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=o??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(yt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,In.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function RM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var dl=e=>e*180/Math.PI,IC=e=>{let t=dl(Math.atan2(e[1],e[0]));return PC(t)},qj={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:IC,rotateZ:IC,skewX:e=>dl(Math.atan(e[1])),skewY:e=>dl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},PC=e=>(e=e%360,e<0&&(e+=360),e),IM=IC,PM=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),LM=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),$j={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:PM,scaleY:LM,scale:e=>(PM(e)+LM(e))/2,rotateX:e=>PC(dl(Math.atan2(e[6],e[5]))),rotateY:e=>PC(dl(Math.atan2(-e[2],e[0]))),rotateZ:IM,rotate:IM,skewX:e=>dl(Math.atan(e[4])),skewY:e=>dl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function gp(e){return e.includes("scale")?1:0}function hp(e,t){if(!e||e==="none")return gp(t);let o=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,n;if(o)r=$j,n=o;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=qj,n=s}if(!n)return gp(t);let a=r[t],i=n[1].split(",").map(Kj);return typeof a=="function"?a(i):i[a]}var LC=(e,t)=>{let{transform:o="none"}=getComputedStyle(e);return hp(o,t)};function Kj(e){return parseFloat(e.trim())}var Ln=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vr=(()=>new Set(Ln))();var TC=e=>e===sa||e===ue,Xj=new Set(["x","y","z"]),Yj=Ln.filter(e=>!Xj.has(e));function TM(e){let t=[];return Yj.forEach(o=>{let r=e.getValue(o);r!==void 0&&(t.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),t}var Zi={width:({x:e},{paddingLeft:t="0",paddingRight:o="0"})=>e.max-e.min-parseFloat(t)-parseFloat(o),height:({y:e},{paddingTop:t="0",paddingBottom:o="0"})=>e.max-e.min-parseFloat(t)-parseFloat(o),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>hp(t,"x"),y:(e,{transform:t})=>hp(t,"y")};Zi.translateX=Zi.x;Zi.translateY=Zi.y;var fl=new Set,kC=!1,MC=!1,EC=!1;function kM(){if(MC){let e=Array.from(fl).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),o=new Map;t.forEach(r=>{let n=TM(r);n.length&&(o.set(r,n),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();let n=o.get(r);n&&n.forEach(([a,i])=>{r.getValue(a)?.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}MC=!1,kC=!1,fl.forEach(e=>e.complete(EC)),fl.clear()}function MM(){fl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(MC=!0)})}function AC(){EC=!0,MM(),kM(),EC=!1}var Ha=class{constructor(t,o,r,n,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=o,this.name=r,this.motionValue=n,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(fl.add(this),kC||(kC=!0,Le.read(MM),Le.resolveKeyframes(kM))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:o,element:r,motionValue:n}=this;if(t[0]===null){let a=n?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&o){let s=r.readValue(o,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),n&&a===void 0&&n.set(t[0])}RM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),fl.delete(this)}cancel(){this.state==="scheduled"&&(fl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var EM=e=>e.startsWith("--");function AM(e,t,o){EM(t)?e.style.setProperty(t,o):e.style[t]=o}var DM=sl(()=>window.ScrollTimeline!==void 0);var NM={};function OM(e,t){let o=sl(e);return()=>NM[t]??o()}var Vh=OM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var pl=([e,t,o,r])=>`cubic-bezier(${e}, ${t}, ${o}, ${r})`;var DC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pl([0,.65,.55,1]),circOut:pl([.55,0,1,.45]),backIn:pl([.31,.01,.66,-.59]),backOut:pl([.33,1.53,.69,.99])};function NC(e,t){if(e)return typeof e=="function"?Vh()?Dh(e,t):"ease-out":ap(e)?pl(e):Array.isArray(e)?e.map(o=>NC(o,t)||DC.easeOut):DC[e]}function FM(e,t,o,{delay:r=0,duration:n=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){let c={[t]:o};l&&(c.offset=l);let d=NC(s,n);Array.isArray(d)&&(c.easing=d),Jo.value&&In.waapi++;let f={delay:r,duration:n,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};u&&(f.pseudoElement=u);let p=e.animate(c,f);return Jo.value&&p.finished.finally(()=>{In.waapi--}),p}function ml(e){return typeof e=="function"&&"applyToOptions"in e}function _M({type:e,...t}){return ml(e)&&Vh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Bh=class extends Qi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:o,name:r,keyframes:n,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,io(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=_M(t);this.animation=FM(o,r,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=rc(n,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):AM(o,r,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return Bt(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Bt(t)}get time(){return Bt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=bt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&DM()?(this.animation.timeline=t,mt):o(this)}};var VM={anticipate:Zf,backInOut:Qf,circInOut:tp};function Qj(e){return e in VM}function BM(e){typeof e.ease=="string"&&Qj(e.ease)&&(e.ease=VM[e.ease])}var HM=10,Hh=class extends Bh{constructor(t){BM(t),_h(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:o,onUpdate:r,onComplete:n,element:a,...i}=this.options;if(!o)return;if(t!==void 0){o.set(t);return}let s=new Ba({...i,autoplay:!1}),l=bt(this.finishedTime??this.time);o.setWithVelocity(s.sample(l-HM).value,s.sample(l).value,HM),s.stop()}};var OC=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(So.test(e)||e==="0")&&!e.startsWith("url("));function Zj(e){let t=e[0];if(e.length===1)return!0;for(let o=0;o<e.length;o++)if(e[o]!==t)return!0}function UM(e,t,o,r){let n=e[0];if(n===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=OC(n,t),s=OC(a,t);return Oa(i===s,`You are trying to animate ${t} from "${n}" to "${a}". "${i?a:n}" is not an animatable value.`,"value-not-animatable"),!i||!s?!1:Zj(e)||(o==="spring"||ml(o))&&r}function nc(e){e.duration=0,e.type="keyframes"}var Jj=new Set(["opacity","clipPath","filter","transform"]),e6=sl(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function zM(e){let{motionValue:t,name:o,repeatDelay:r,repeatType:n,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return e6()&&o&&Jj.has(o)&&(o!=="transform"||!u)&&!l&&!r&&n!=="mirror"&&a!==0&&i!=="inertia"}var t6=40,vp=class extends Qi{constructor({autoplay:t=!0,delay:o=0,type:r="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:i="loop",keyframes:s,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=yt.now();let f={autoplay:t,delay:o,type:r,repeat:n,repeatDelay:a,repeatType:i,name:l,motionValue:u,element:c,...d},p=c?.KeyframeResolver||Ha;this.keyframeResolver=new p(s,(g,m,x)=>this.onKeyframesResolved(g,m,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,o,r,n){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=yt.now(),UM(t,a,i,s)||((yo.instantAnimations||!l)&&c?.(rc(t,r,o)),t[0]=t[t.length-1],nc(r),r.repeat=0);let f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>t6?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:t},p=!u&&zM(f)?new Hh({...f,element:f.motionValue.owner.current}):new Ba(f);p.finished.then(()=>this.notifyFinished()).catch(mt),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,o){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),AC()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var Uh=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,o){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=o}attachTimeline(t){let o=this.animations.map(r=>r.attachTimeline(t));return()=>{o.forEach((r,n)=>{r&&r(),this.animations[n].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return GM(this.animations,"duration")}get iterationDuration(){return GM(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(o=>o[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};function GM(e,t){let o=0;for(let r=0;r<e.length;r++){let n=e[r][t];n!==null&&n>o&&(o=n)}return o}var xp=class extends Uh{then(t,o){return this.finished.finally(t).then(()=>{})}};var o6=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function r6(e){let t=o6.exec(e);if(!t)return[,];let[,o,r,n]=t;return[`--${o??r}`,n]}var n6=4;function FC(e,t,o=1){io(o<=n6,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,n]=r6(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let i=a.trim();return $f(i)?parseFloat(i):i}return ul(n)?FC(n,t,o+1):n}function gl(e,t){return e?.[t]??e?.default??e}var yp=new Set(["width","height","top","left","right","bottom",...Ln]);var WM={test:e=>e==="auto",parse:e=>e};var zh=e=>t=>t.test(e);var _C=[sa,ue,Co,Pn,yC,xC,WM],VC=e=>_C.find(zh(e));function jM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xf(e):!0}var a6=new Set(["brightness","contrast","saturate","opacity"]);function i6(e){let[t,o]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[r]=o.match(Ju)||[];if(!r)return e;let n=o.replace(r,""),a=a6.has(t)?1:0;return r!==o&&(a*=100),t+"("+a+n+")"}var s6=/\b([a-z-]*)\(.*?\)/gu,wp={...So,getAnimatableNone:e=>{let t=e.match(s6);return t?t.map(i6).join(" "):e}};var BC={...sa,transform:Math.round};var qM={rotate:Pn,rotateX:Pn,rotateY:Pn,rotateZ:Pn,scale:lp,scaleX:lp,scaleY:lp,scaleZ:lp,skew:Pn,skewX:Pn,skewY:Pn,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:_a,originX:kh,originY:kh,originZ:ue};var hl={borderWidth:ue,borderTopWidth:ue,borderRightWidth:ue,borderBottomWidth:ue,borderLeftWidth:ue,borderRadius:ue,radius:ue,borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomRightRadius:ue,borderBottomLeftRadius:ue,width:ue,maxWidth:ue,height:ue,maxHeight:ue,top:ue,right:ue,bottom:ue,left:ue,padding:ue,paddingTop:ue,paddingRight:ue,paddingBottom:ue,paddingLeft:ue,margin:ue,marginTop:ue,marginRight:ue,marginBottom:ue,marginLeft:ue,backgroundPositionX:ue,backgroundPositionY:ue,...qM,zIndex:BC,fillOpacity:_a,strokeOpacity:_a,numOctaves:BC};var $M={...hl,color:lt,backgroundColor:lt,outlineColor:lt,fill:lt,stroke:lt,borderColor:lt,borderTopColor:lt,borderRightColor:lt,borderBottomColor:lt,borderLeftColor:lt,filter:wp,WebkitFilter:wp},Cp=e=>$M[e];function Sp(e,t){let o=Cp(e);return o!==wp&&(o=So),o.getAnimatableNone?o.getAnimatableNone(t):void 0}var l6=new Set(["auto","none","0"]);function KM(e,t,o){let r=0,n;for(;r<e.length&&!n;){let a=e[r];typeof a=="string"&&!l6.has(a)&&Yi(a).values.length&&(n=e[r]),r++}if(n&&o)for(let a of t)e[a]=Sp(o,n)}var bp=class extends Ha{constructor(t,o,r,n,a){super(t,o,r,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:o,name:r}=this;if(!o||!o.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),ul(u))){let c=FC(u,o.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!yp.has(r)||t.length!==2)return;let[n,a]=t,i=VC(n),s=VC(a);if(i!==s)if(TC(i)&&TC(s))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Zi[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:o}=this,r=[];for(let n=0;n<t.length;n++)(t[n]===null||jM(t[n]))&&r.push(n);r.length&&KM(t,r,o)}measureInitialState(){let{element:t,unresolvedKeyframes:o,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Zi[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o[0]=this.measuredOrigin;let n=o[o.length-1];n!==void 0&&t.getValue(r,n).jump(n,!1)}measureEndState(){let{element:t,name:o,unresolvedKeyframes:r}=this;if(!t||!t.current)return;let n=t.getValue(o);n&&n.jump(this.measuredOrigin,!1);let a=r.length-1,i=r[a];r[a]=Zi[o](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}};function Rp(e,t,o){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);let n=o?.[e]??r.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}var Ip=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Pp(e){return Kf(e)&&"offsetHeight"in e}var XM=30,u6=e=>!isNaN(parseFloat(e)),vl={current:void 0},Gh=class{constructor(t,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{let n=yt.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=o.owner}setCurrent(t){this.current=t,this.updatedAt=yt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=u6(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,o){this.events[t]||(this.events[t]=new Fa);let r=this.events[t].add(o);return t==="change"?()=>{r(),Le.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,o){this.passiveEffect=t,this.stopPassiveEffect=o}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,o=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return vl.current&&vl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=yt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>XM)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,XM);return Yf(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(t){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=t(o),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function er(e,t){return new Gh(e,t)}var{schedule:xl,cancel:c6}=Ph(queueMicrotask,!1);var Hr={x:!1,y:!1};function Wh(){return Hr.x||Hr.y}function HC(e){return e==="x"||e==="y"?Hr[e]?null:(Hr[e]=!0,()=>{Hr[e]=!1}):Hr.x||Hr.y?null:(Hr.x=Hr.y=!0,()=>{Hr.x=Hr.y=!1})}function jh(e,t){let o=Rp(e),r=new AbortController,n={passive:!0,...t,signal:r.signal};return[o,n,()=>r.abort()]}function YM(e){return!(e.pointerType==="touch"||Wh())}function UC(e,t,o={}){let[r,n,a]=jh(e,o),i=s=>{if(!YM(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{YM(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,n)};return r.forEach(s=>{s.addEventListener("pointerenter",i,n)}),a}var zC=(e,t)=>t?e===t?!0:zC(e,t.parentElement):!1;var yl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var d6=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function QM(e){return d6.has(e.tagName)||e.tabIndex!==-1}var ac=new WeakSet;function ZM(e){return t=>{t.key==="Enter"&&e(t)}}function GC(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var JM=(e,t)=>{let o=e.currentTarget;if(!o)return;let r=ZM(()=>{if(ac.has(o))return;GC(o,"down");let n=ZM(()=>{GC(o,"up")}),a=()=>GC(o,"cancel");o.addEventListener("keyup",n,t),o.addEventListener("blur",a,t)});o.addEventListener("keydown",r,t),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),t)};function eE(e){return yl(e)&&!Wh()}function WC(e,t,o={}){let[r,n,a]=jh(e,o),i=s=>{let l=s.currentTarget;if(!eE(s))return;ac.add(l);let u=t(l,s),c=(p,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ac.has(l)&&ac.delete(l),eE(p)&&typeof u=="function"&&u(p,{success:g})},d=p=>{c(p,l===window||l===document||o.useGlobalTarget||zC(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",d,n),window.addEventListener("pointercancel",f,n)};return r.forEach(s=>{(o.useGlobalTarget?window:s).addEventListener("pointerdown",i,n),Pp(s)&&(s.addEventListener("focus",u=>JM(u,n)),!QM(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function wl(e){return Kf(e)&&"ownerSVGElement"in e}function Lp(e){return wl(e)&&e.tagName==="svg"}function jC(...e){let t=!Array.isArray(e[0]),o=t?0:-1,r=e[0+o],n=e[1+o],a=e[2+o],i=e[3+o],s=Fh(n,a,i);return t?s(r):s}var Ve=e=>!!(e&&e.getVelocity);var f6=[..._C,lt,So],qC=e=>f6.find(zh(e));var qh=R(M(),1),Ua=R(M(),1);var tE=R(M(),1),Ji=(0,tE.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var rE=R(M(),1);function oE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function p6(...e){return t=>{let o=!1,r=e.map(n=>{let a=oE(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():oE(e[n],null)}}}}function nE(...e){return rE.useCallback(p6(...e),e)}var $C=class extends qh.Component{getSnapshotBeforeUpdate(t){let o=this.props.childRef.current;if(o&&t.isPresent&&!this.props.isPresent){let r=o.offsetParent,n=Pp(r)&&r.offsetWidth||0,a=this.props.sizeRef.current;a.height=o.offsetHeight||0,a.width=o.offsetWidth||0,a.top=o.offsetTop,a.left=o.offsetLeft,a.right=n-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function iE({children:e,isPresent:t,anchorX:o,root:r}){let n=(0,Ua.useId)(),a=(0,Ua.useRef)(null),i=(0,Ua.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,Ua.useContext)(Ji),l=nE(a,e?.ref);return(0,Ua.useInsertionEffect)(()=>{let{width:u,height:c,top:d,left:f,right:p}=i.current;if(t||!a.current||!u||!c)return;let g=o==="left"?`left: ${f}`:`right: ${p}`;a.current.dataset.motionPopId=n;let m=document.createElement("style");s&&(m.nonce=s);let x=r??document.head;return x.appendChild(m),m.sheet&&m.sheet.insertRule(`
|
|
11
|
+
`+a.stack}return{value:e,source:t,stack:n,digest:null}}function i0(e,t,o){return{value:e,source:null,stack:o??null,digest:t??null}}function z0(e,t){try{console.error(t.value)}catch(o){setTimeout(function(){throw o})}}var S5=typeof WeakMap=="function"?WeakMap:Map;function u1(e,t,o){o=Pa(-1,o),o.tag=3,o.payload={element:null};var r=t.value;return o.callback=function(){Gg||(Gg=!0,Z0=r),z0(e,t)},o}function c1(e,t,o){o=Pa(-1,o),o.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var n=t.value;o.payload=function(){return r(n)},o.callback=function(){z0(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(o.callback=function(){z0(e,t),typeof r!="function"&&(Ai===null?Ai=new Set([this]):Ai.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),o}function CL(e,t,o){var r=e.pingCache;if(r===null){r=e.pingCache=new S5;var n=new Set;r.set(t,n)}else n=r.get(t),n===void 0&&(n=new Set,r.set(t,n));n.has(o)||(n.add(o),e=F5.bind(null,e,t,o),t.then(e,e))}function SL(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 bL(e,t,o,r,n){return e.mode&1?(e.flags|=65536,e.lanes=n,e):(e===t?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(t=Pa(-1,1),t.tag=2,Ei(o,t,1))),o.lanes|=1),e)}var b5=Ea.ReactCurrentOwner,jo=!1;function Eo(e,t,o,r){t.child=e===null?BT(t,null,o,r):Tu(t,e.child,o,r)}function RL(e,t,o,r,n){o=o.render;var a=t.ref;return bu(t,n),r=Mw(e,t,o,r,a,n),o=Ew(),e!==null&&!jo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ma(e,t,n)):(it&&o&&xw(t),t.flags|=1,Eo(e,t,r,n),t.child)}function IL(e,t,o,r,n){if(e===null){var a=o.type;return typeof a=="function"&&!Uw(a)&&a.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(t.tag=15,t.type=a,d1(e,t,a,r,n)):(e=Sg(o.type,null,r,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&n)){var i=a.memoizedProps;if(o=o.compare,o=o!==null?o:Yd,o(i,r)&&e.ref===t.ref)return Ma(e,t,n)}return t.flags|=1,e=Ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function d1(e,t,o,r,n){if(e!==null){var a=e.memoizedProps;if(Yd(a,r)&&e.ref===t.ref)if(jo=!1,t.pendingProps=r=a,(e.lanes&n)!==0)e.flags&131072&&(jo=!0);else return t.lanes=e.lanes,Ma(e,t,n)}return G0(e,t,o,r,n)}function f1(e,t,o){var r=t.pendingProps,n=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ye(xu,cr),cr|=o;else{if(!(o&1073741824))return e=a!==null?a.baseLanes|o:o,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ye(xu,cr),cr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:o,Ye(xu,cr),cr|=r}else a!==null?(r=a.baseLanes|o,t.memoizedState=null):r=o,Ye(xu,cr),cr|=r;return Eo(e,t,n,o),t.child}function p1(e,t){var o=t.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(t.flags|=512,t.flags|=2097152)}function G0(e,t,o,r,n){var a=$o(o)?qs:ho.current;return a=Pu(t,a),bu(t,n),o=Mw(e,t,o,r,a,n),r=Ew(),e!==null&&!jo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ma(e,t,n)):(it&&r&&xw(t),t.flags|=1,Eo(e,t,o,n),t.child)}function PL(e,t,o,r,n){if($o(o)){var a=!0;Dg(t)}else a=!1;if(bu(t,n),t.stateNode===null)yg(e,t),l1(t,o,r),U0(t,o,r,n),r=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=o.contextType;typeof u=="object"&&u!==null?u=Fr(u):(u=$o(o)?qs:ho.current,u=Pu(t,u));var c=o.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==r||l!==u)&&wL(t,i,r,u),Si=!1;var f=t.memoizedState;i.state=f,Vg(t,r,i,n),l=t.memoizedState,s!==r||f!==l||qo.current||Si?(typeof c=="function"&&(H0(t,o,c,r),l=t.memoizedState),(s=Si||yL(t,o,s,r,f,l,u))?(d||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=l),i.props=r,i.state=l,i.context=u,r=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,UT(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:pn(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=o.contextType,typeof l=="object"&&l!==null?l=Fr(l):(l=$o(o)?qs:ho.current,l=Pu(t,l));var p=o.getDerivedStateFromProps;(c=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==l)&&wL(t,i,r,l),Si=!1,f=t.memoizedState,i.state=f,Vg(t,r,i,n);var g=t.memoizedState;s!==d||f!==g||qo.current||Si?(typeof p=="function"&&(H0(t,o,p,r),g=t.memoizedState),(u=Si||yL(t,o,u,r,f,g,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,g,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,g,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),i.props=r,i.state=g,i.context=l,r=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return W0(e,t,o,r,a,n)}function W0(e,t,o,r,n,a){p1(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return n&&dL(t,o,!1),Ma(e,t,a);r=t.stateNode,b5.current=t;var s=i&&typeof o.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Tu(t,e.child,null,a),t.child=Tu(t,null,s,a)):Eo(e,t,s,a),t.memoizedState=r.state,n&&dL(t,o,!0),t.child}function m1(e){var t=e.stateNode;t.pendingContext?cL(e,t.pendingContext,t.pendingContext!==t.context):t.context&&cL(e,t.context,!1),Pw(e,t.containerInfo)}function LL(e,t,o,r,n){return Lu(),ww(n),t.flags|=256,Eo(e,t,o,r),t.child}var j0={dehydrated:null,treeContext:null,retryLane:0};function q0(e){return{baseLanes:e,cachePool:null,transitions:null}}function g1(e,t,o){var r=t.pendingProps,n=dt.current,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(n&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),Ye(dt,n&1),e===null)return V0(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,a?(r=t.mode,a=t.child,i={mode:"hidden",children:i},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=i):a=rh(i,r,0,null),e=js(e,r,o,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=q0(o),t.memoizedState=j0,e):Nw(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return R5(e,t,i,r,s,n,o);if(a){a=r.fallback,i=t.mode,n=e.child,s=n.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==n?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Ni(n,l),r.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=Ni(s,a):(a=js(a,i,o,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,i=e.child.memoizedState,i=i===null?q0(o):{baseLanes:i.baseLanes|o,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~o,t.memoizedState=j0,r}return a=e.child,e=a.sibling,r=Ni(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=o),r.return=t,r.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=r,t.memoizedState=null,r}function Nw(e,t){return t=rh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function cg(e,t,o,r){return r!==null&&ww(r),Tu(t,e.child,null,o),e=Nw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function R5(e,t,o,r,n,a,i){if(o)return t.flags&256?(t.flags&=-257,r=i0(Error(q(422))),cg(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,n=t.mode,r=rh({mode:"visible",children:r.children},n,0,null),a=js(a,n,i,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Tu(t,e.child,null,i),t.child.memoizedState=q0(i),t.memoizedState=j0,a);if(!(t.mode&1))return cg(e,t,i,null);if(n.data==="$!"){if(r=n.nextSibling&&n.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(q(419)),r=i0(a,r,void 0),cg(e,t,i,r)}if(s=(i&e.childLanes)!==0,jo||s){if(r=qt,r!==null){switch(i&-i){case 4:n=2;break;case 16:n=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:n=32;break;case 536870912:n=268435456;break;default:n=0}n=n&(r.suspendedLanes|i)?0:n,n!==0&&n!==a.retryLane&&(a.retryLane=n,ka(e,n),vn(r,e,n,-1))}return Hw(),r=i0(Error(q(421))),cg(e,t,i,r)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=_5.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,dr=Mi(n.nextSibling),fr=t,it=!0,gn=null,e!==null&&(Ar[Dr++]=Ra,Ar[Dr++]=Ia,Ar[Dr++]=$s,Ra=e.id,Ia=e.overflow,$s=t),t=Nw(t,r.children),t.flags|=4096,t)}function TL(e,t,o){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),B0(e.return,t,o)}function s0(e,t,o,r,n){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:o,tailMode:n}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=o,a.tailMode=n)}function h1(e,t,o){var r=t.pendingProps,n=r.revealOrder,a=r.tail;if(Eo(e,t,r.children,o),r=dt.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&&TL(e,o,t);else if(e.tag===19)TL(e,o,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(Ye(dt,r),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(o=t.child,n=null;o!==null;)e=o.alternate,e!==null&&Bg(e)===null&&(n=o),o=o.sibling;o=n,o===null?(n=t.child,t.child=null):(n=o.sibling,o.sibling=null),s0(t,!1,n,o,a);break;case"backwards":for(o=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Bg(e)===null){t.child=n;break}e=n.sibling,n.sibling=o,o=n,n=e}s0(t,!0,o,null,a);break;case"together":s0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function yg(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ma(e,t,o){if(e!==null&&(t.dependencies=e.dependencies),Xs|=t.lanes,!(o&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,o=Ni(e,e.pendingProps),t.child=o,o.return=t;e.sibling!==null;)e=e.sibling,o=o.sibling=Ni(e,e.pendingProps),o.return=t;o.sibling=null}return t.child}function I5(e,t,o){switch(t.tag){case 3:m1(t),Lu();break;case 5:zT(t);break;case 1:$o(t.type)&&Dg(t);break;case 4:Pw(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,n=t.memoizedProps.value;Ye(Fg,r._currentValue),r._currentValue=n;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ye(dt,dt.current&1),t.flags|=128,null):o&t.child.childLanes?g1(e,t,o):(Ye(dt,dt.current&1),e=Ma(e,t,o),e!==null?e.sibling:null);Ye(dt,dt.current&1);break;case 19:if(r=(o&t.childLanes)!==0,e.flags&128){if(r)return h1(e,t,o);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Ye(dt,dt.current),r)break;return null;case 22:case 23:return t.lanes=0,f1(e,t,o)}return Ma(e,t,o)}var v1,$0,x1,y1;v1=function(e,t){for(var o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break;for(;o.sibling===null;){if(o.return===null||o.return===t)return;o=o.return}o.sibling.return=o.return,o=o.sibling}};$0=function(){};x1=function(e,t,o,r){var n=e.memoizedProps;if(n!==r){e=t.stateNode,Gs(ta.current);var a=null;switch(o){case"input":n=g0(e,n),r=g0(e,r),a=[];break;case"select":n=pt({},n,{value:void 0}),r=pt({},r,{value:void 0}),a=[];break;case"textarea":n=x0(e,n),r=x0(e,r),a=[];break;default:typeof n.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Eg)}w0(o,r);var i;o=null;for(u in n)if(!r.hasOwnProperty(u)&&n.hasOwnProperty(u)&&n[u]!=null)if(u==="style"){var s=n[u];for(i in s)s.hasOwnProperty(i)&&(o||(o={}),o[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Gd.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var l=r[u];if(s=n?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(o||(o={}),o[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(o||(o={}),o[i]=l[i])}else o||(a||(a=[]),a.push(u,o)),o=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Gd.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&et("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}o&&(a=a||[]).push("style",o);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};y1=function(e,t,o,r){o!==r&&(t.flags|=4)};function Ld(e,t){if(!it)switch(e.tailMode){case"hidden":t=e.tail;for(var o=null;t!==null;)t.alternate!==null&&(o=t),t=t.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var r=null;o!==null;)o.alternate!==null&&(r=o),o=o.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function mo(e){var t=e.alternate!==null&&e.alternate.child===e.child,o=0,r=0;if(t)for(var n=e.child;n!==null;)o|=n.lanes|n.childLanes,r|=n.subtreeFlags&14680064,r|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)o|=n.lanes|n.childLanes,r|=n.subtreeFlags,r|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=r,e.childLanes=o,t}function P5(e,t,o){var r=t.pendingProps;switch(yw(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mo(t),null;case 1:return $o(t.type)&&Ag(),mo(t),null;case 3:return r=t.stateNode,ku(),tt(qo),tt(ho),Tw(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(lg(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gn!==null&&(tw(gn),gn=null))),$0(e,t),mo(t),null;case 5:Lw(t);var n=Gs(tf.current);if(o=t.type,e!==null&&t.stateNode!=null)x1(e,t,o,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(q(166));return mo(t),null}if(e=Gs(ta.current),lg(t)){r=t.stateNode,o=t.type;var a=t.memoizedProps;switch(r[Jn]=t,r[Jd]=a,e=(t.mode&1)!==0,o){case"dialog":et("cancel",r),et("close",r);break;case"iframe":case"object":case"embed":et("load",r);break;case"video":case"audio":for(n=0;n<Dd.length;n++)et(Dd[n],r);break;case"source":et("error",r);break;case"img":case"image":case"link":et("error",r),et("load",r);break;case"details":et("toggle",r);break;case"input":FP(r,a),et("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},et("invalid",r);break;case"textarea":VP(r,a),et("invalid",r)}w0(o,a),n=null;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];i==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&sg(r.textContent,s,e),n=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&sg(r.textContent,s,e),n=["children",""+s]):Gd.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&et("scroll",r)}switch(o){case"input":Xm(r),_P(r,a,!0);break;case"textarea":Xm(r),BP(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Eg)}r=n,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=$L(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(o,{is:r.is}):(e=i.createElement(o),o==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,o),e[Jn]=t,e[Jd]=r,v1(e,t,!1,!1),t.stateNode=e;e:{switch(i=C0(o,r),o){case"dialog":et("cancel",e),et("close",e),n=r;break;case"iframe":case"object":case"embed":et("load",e),n=r;break;case"video":case"audio":for(n=0;n<Dd.length;n++)et(Dd[n],e);n=r;break;case"source":et("error",e),n=r;break;case"img":case"image":case"link":et("error",e),et("load",e),n=r;break;case"details":et("toggle",e),n=r;break;case"input":FP(e,r),n=g0(e,r),et("invalid",e);break;case"option":n=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},n=pt({},r,{value:void 0}),et("invalid",e);break;case"textarea":VP(e,r),n=x0(e,r),et("invalid",e);break;default:n=r}w0(o,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?YL(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&KL(e,l)):a==="children"?typeof l=="string"?(o!=="textarea"||l!=="")&&Wd(e,l):typeof l=="number"&&Wd(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Gd.hasOwnProperty(a)?l!=null&&a==="onScroll"&&et("scroll",e):l!=null&&nw(e,a,l,i))}switch(o){case"input":Xm(e),_P(e,r,!1);break;case"textarea":Xm(e),BP(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Oi(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?yu(e,!!r.multiple,a,!1):r.defaultValue!=null&&yu(e,!!r.multiple,r.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=Eg)}switch(o){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 mo(t),null;case 6:if(e&&t.stateNode!=null)y1(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(o=Gs(tf.current),Gs(ta.current),lg(t)){if(r=t.stateNode,o=t.memoizedProps,r[Jn]=t,(a=r.nodeValue!==o)&&(e=fr,e!==null))switch(e.tag){case 3:sg(r.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&sg(r.nodeValue,o,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(o.nodeType===9?o:o.ownerDocument).createTextNode(r),r[Jn]=t,t.stateNode=r}return mo(t),null;case 13:if(tt(dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(it&&dr!==null&&t.mode&1&&!(t.flags&128))_T(),Lu(),t.flags|=98560,a=!1;else if(a=lg(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(q(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(q(317));a[Jn]=t}else Lu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;mo(t),a=!1}else gn!==null&&(tw(gn),gn=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=o,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||dt.current&1?Ft===0&&(Ft=3):Hw())),t.updateQueue!==null&&(t.flags|=4),mo(t),null);case 4:return ku(),$0(e,t),e===null&&Qd(t.stateNode.containerInfo),mo(t),null;case 10:return bw(t.type._context),mo(t),null;case 17:return $o(t.type)&&Ag(),mo(t),null;case 19:if(tt(dt),a=t.memoizedState,a===null)return mo(t),null;if(r=(t.flags&128)!==0,i=a.rendering,i===null)if(r)Ld(a,!1);else{if(Ft!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Bg(e),i!==null){for(t.flags|=128,Ld(a,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=o,o=t.child;o!==null;)a=o,e=r,a.flags&=14680066,i=a.alternate,i===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return Ye(dt,dt.current&1|2),t.child}e=e.sibling}a.tail!==null&&St()>Eu&&(t.flags|=128,r=!0,Ld(a,!1),t.lanes=4194304)}else{if(!r)if(e=Bg(i),e!==null){if(t.flags|=128,r=!0,o=e.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),Ld(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!it)return mo(t),null}else 2*St()-a.renderingStartTime>Eu&&o!==1073741824&&(t.flags|=128,r=!0,Ld(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(o=a.last,o!==null?o.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=St(),t.sibling=null,o=dt.current,Ye(dt,r?o&1|2:o&1),t):(mo(t),null);case 22:case 23:return Bw(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?cr&1073741824&&(mo(t),t.subtreeFlags&6&&(t.flags|=8192)):mo(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function L5(e,t){switch(yw(t),t.tag){case 1:return $o(t.type)&&Ag(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ku(),tt(qo),tt(ho),Tw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Lw(t),null;case 13:if(tt(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Lu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(dt),null;case 4:return ku(),null;case 10:return bw(t.type._context),null;case 22:case 23:return Bw(),null;case 24:return null;default:return null}}var dg=!1,go=!1,T5=typeof WeakSet=="function"?WeakSet:Set,re=null;function vu(e,t){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(r){vt(e,t,r)}else o.current=null}function K0(e,t,o){try{o()}catch(r){vt(e,t,r)}}var kL=!1;function k5(e,t){if(E0=Tg,e=RT(),vw(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var r=o.getSelection&&o.getSelection();if(r&&r.rangeCount!==0){o=r.anchorNode;var n=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{o.nodeType,a.nodeType}catch{o=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==o||n!==0&&d.nodeType!==3||(s=i+n),d!==a||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===o&&++u===n&&(s=i),f===a&&++c===r&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}o=s===-1||l===-1?null:{start:s,end:l}}else o=null}o=o||{start:0,end:0}}else o=null;for(A0={focusedElem:e,selectionRange:o},Tg=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,x=g.memoizedState,h=t.stateNode,v=h.getSnapshotBeforeUpdate(t.elementType===t.type?m:pn(t.type,m),x);h.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(w){vt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return g=kL,kL=!1,g}function Hd(e,t,o){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do{if((n.tag&e)===e){var a=n.destroy;n.destroy=void 0,a!==void 0&&K0(t,o,a)}n=n.next}while(n!==r)}}function th(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var o=t=t.next;do{if((o.tag&e)===e){var r=o.create;o.destroy=r()}o=o.next}while(o!==t)}}function X0(e){var t=e.ref;if(t!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof t=="function"?t(e):t.current=e}}function w1(e){var t=e.alternate;t!==null&&(e.alternate=null,w1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jn],delete t[Jd],delete t[O0],delete t[d5],delete t[f5])),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 C1(e){return e.tag===5||e.tag===3||e.tag===4}function ML(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||C1(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 Y0(e,t,o){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?o.nodeType===8?o.parentNode.insertBefore(e,t):o.insertBefore(e,t):(o.nodeType===8?(t=o.parentNode,t.insertBefore(e,o)):(t=o,t.appendChild(e)),o=o._reactRootContainer,o!=null||t.onclick!==null||(t.onclick=Eg));else if(r!==4&&(e=e.child,e!==null))for(Y0(e,t,o),e=e.sibling;e!==null;)Y0(e,t,o),e=e.sibling}function Q0(e,t,o){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?o.insertBefore(e,t):o.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Q0(e,t,o),e=e.sibling;e!==null;)Q0(e,t,o),e=e.sibling}var oo=null,mn=!1;function wi(e,t,o){for(o=o.child;o!==null;)S1(e,t,o),o=o.sibling}function S1(e,t,o){if(ea&&typeof ea.onCommitFiberUnmount=="function")try{ea.onCommitFiberUnmount($g,o)}catch{}switch(o.tag){case 5:go||vu(o,t);case 6:var r=oo,n=mn;oo=null,wi(e,t,o),oo=r,mn=n,oo!==null&&(mn?(e=oo,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):oo.removeChild(o.stateNode));break;case 18:oo!==null&&(mn?(e=oo,o=o.stateNode,e.nodeType===8?e0(e.parentNode,o):e.nodeType===1&&e0(e,o),Kd(e)):e0(oo,o.stateNode));break;case 4:r=oo,n=mn,oo=o.stateNode.containerInfo,mn=!0,wi(e,t,o),oo=r,mn=n;break;case 0:case 11:case 14:case 15:if(!go&&(r=o.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){n=r=r.next;do{var a=n,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&K0(o,t,i),n=n.next}while(n!==r)}wi(e,t,o);break;case 1:if(!go&&(vu(o,t),r=o.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=o.memoizedProps,r.state=o.memoizedState,r.componentWillUnmount()}catch(s){vt(o,t,s)}wi(e,t,o);break;case 21:wi(e,t,o);break;case 22:o.mode&1?(go=(r=go)||o.memoizedState!==null,wi(e,t,o),go=r):wi(e,t,o);break;default:wi(e,t,o)}}function EL(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new T5),t.forEach(function(r){var n=V5.bind(null,e,r);o.has(r)||(o.add(r),r.then(n,n))})}}function fn(e,t){var o=t.deletions;if(o!==null)for(var r=0;r<o.length;r++){var n=o[r];try{var a=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:oo=s.stateNode,mn=!1;break e;case 3:oo=s.stateNode.containerInfo,mn=!0;break e;case 4:oo=s.stateNode.containerInfo,mn=!0;break e}s=s.return}if(oo===null)throw Error(q(160));S1(a,i,n),oo=null,mn=!1;var l=n.alternate;l!==null&&(l.return=null),n.return=null}catch(u){vt(n,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)b1(t,e),t=t.sibling}function b1(e,t){var o=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fn(t,e),Qn(e),r&4){try{Hd(3,e,e.return),th(3,e)}catch(m){vt(e,e.return,m)}try{Hd(5,e,e.return)}catch(m){vt(e,e.return,m)}}break;case 1:fn(t,e),Qn(e),r&512&&o!==null&&vu(o,o.return);break;case 5:if(fn(t,e),Qn(e),r&512&&o!==null&&vu(o,o.return),e.flags&32){var n=e.stateNode;try{Wd(n,"")}catch(m){vt(e,e.return,m)}}if(r&4&&(n=e.stateNode,n!=null)){var a=e.memoizedProps,i=o!==null?o.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&jL(n,a),C0(s,i);var u=C0(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?YL(n,d):c==="dangerouslySetInnerHTML"?KL(n,d):c==="children"?Wd(n,d):nw(n,c,d,u)}switch(s){case"input":h0(n,a);break;case"textarea":qL(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?yu(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?yu(n,!!a.multiple,a.defaultValue,!0):yu(n,!!a.multiple,a.multiple?[]:"",!1))}n[Jd]=a}catch(m){vt(e,e.return,m)}}break;case 6:if(fn(t,e),Qn(e),r&4){if(e.stateNode===null)throw Error(q(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(m){vt(e,e.return,m)}}break;case 3:if(fn(t,e),Qn(e),r&4&&o!==null&&o.memoizedState.isDehydrated)try{Kd(t.containerInfo)}catch(m){vt(e,e.return,m)}break;case 4:fn(t,e),Qn(e);break;case 13:fn(t,e),Qn(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(_w=St())),r&4&&EL(e);break;case 22:if(c=o!==null&&o.memoizedState!==null,e.mode&1?(go=(u=go)||c,fn(t,e),go=u):fn(t,e),Qn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(re=e,c=e.child;c!==null;){for(d=re=c;re!==null;){switch(f=re,p=f.child,f.tag){case 0:case 11:case 14:case 15:Hd(4,f,f.return);break;case 1:vu(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,o=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){vt(r,o,m)}}break;case 5:vu(f,f.return);break;case 22:if(f.memoizedState!==null){DL(d);continue}}p!==null?(p.return=f,re=p):DL(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{n=d.stateNode,u?(a=n.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=XL("display",i))}catch(m){vt(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){vt(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:fn(t,e),Qn(e),r&4&&EL(e);break;case 21:break;default:fn(t,e),Qn(e)}}function Qn(e){var t=e.flags;if(t&2){try{e:{for(var o=e.return;o!==null;){if(C1(o)){var r=o;break e}o=o.return}throw Error(q(160))}switch(r.tag){case 5:var n=r.stateNode;r.flags&32&&(Wd(n,""),r.flags&=-33);var a=ML(e);Q0(e,a,n);break;case 3:case 4:var i=r.stateNode.containerInfo,s=ML(e);Y0(e,s,i);break;default:throw Error(q(161))}}catch(l){vt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function M5(e,t,o){re=e,R1(e,t,o)}function R1(e,t,o){for(var r=(e.mode&1)!==0;re!==null;){var n=re,a=n.child;if(n.tag===22&&r){var i=n.memoizedState!==null||dg;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||go;s=dg;var u=go;if(dg=i,(go=l)&&!u)for(re=n;re!==null;)i=re,l=i.child,i.tag===22&&i.memoizedState!==null?NL(n):l!==null?(l.return=i,re=l):NL(n);for(;a!==null;)re=a,R1(a,t,o),a=a.sibling;re=n,dg=s,go=u}AL(e,t,o)}else n.subtreeFlags&8772&&a!==null?(a.return=n,re=a):AL(e,t,o)}}function AL(e){for(;re!==null;){var t=re;if(t.flags&8772){var o=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:go||th(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!go)if(o===null)r.componentDidMount();else{var n=t.elementType===t.type?o.memoizedProps:pn(t.type,o.memoizedProps);r.componentDidUpdate(n,o.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&hL(t,a,r);break;case 3:var i=t.updateQueue;if(i!==null){if(o=null,t.child!==null)switch(t.child.tag){case 5:o=t.child.stateNode;break;case 1:o=t.child.stateNode}hL(t,i,o)}break;case 5:var s=t.stateNode;if(o===null&&t.flags&4){o=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break;case"img":l.src&&(o.src=l.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 c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Kd(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}go||t.flags&512&&X0(t)}catch(f){vt(t,t.return,f)}}if(t===e){re=null;break}if(o=t.sibling,o!==null){o.return=t.return,re=o;break}re=t.return}}function DL(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var o=t.sibling;if(o!==null){o.return=t.return,re=o;break}re=t.return}}function NL(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var o=t.return;try{th(4,t)}catch(l){vt(t,o,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var n=t.return;try{r.componentDidMount()}catch(l){vt(t,n,l)}}var a=t.return;try{X0(t)}catch(l){vt(t,a,l)}break;case 5:var i=t.return;try{X0(t)}catch(l){vt(t,i,l)}}}catch(l){vt(t,t.return,l)}if(t===e){re=null;break}var s=t.sibling;if(s!==null){s.return=t.return,re=s;break}re=t.return}}var E5=Math.ceil,zg=Ea.ReactCurrentDispatcher,Ow=Ea.ReactCurrentOwner,Or=Ea.ReactCurrentBatchConfig,Ee=0,qt=null,Tt=null,ro=0,cr=0,xu=Vi(0),Ft=0,af=null,Xs=0,oh=0,Fw=0,Ud=null,Wo=null,_w=0,Eu=1/0,Sa=null,Gg=!1,Z0=null,Ai=null,fg=!1,Pi=null,Wg=0,zd=0,J0=null,wg=-1,Cg=0;function Ao(){return Ee&6?St():wg!==-1?wg:wg=St()}function Di(e){return e.mode&1?Ee&2&&ro!==0?ro&-ro:m5.transition!==null?(Cg===0&&(Cg=lT()),Cg):(e=Ge,e!==0||(e=window.event,e=e===void 0?16:gT(e.type)),e):1}function vn(e,t,o,r){if(50<zd)throw zd=0,J0=null,Error(q(185));sf(e,o,r),(!(Ee&2)||e!==qt)&&(e===qt&&(!(Ee&2)&&(oh|=o),Ft===4&&Ri(e,ro)),Ko(e,r),o===1&&Ee===0&&!(t.mode&1)&&(Eu=St()+500,Zg&&Bi()))}function Ko(e,t){var o=e.callbackNode;h4(e,t);var r=Lg(e,e===qt?ro:0);if(r===0)o!==null&&zP(o),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(o!=null&&zP(o),t===1)e.tag===0?p5(OL.bind(null,e)):NT(OL.bind(null,e)),u5(function(){!(Ee&6)&&Bi()}),o=null;else{switch(uT(r)){case 1:o=uw;break;case 4:o=iT;break;case 16:o=Pg;break;case 536870912:o=sT;break;default:o=Pg}o=A1(o,I1.bind(null,e))}e.callbackPriority=t,e.callbackNode=o}}function I1(e,t){if(wg=-1,Cg=0,Ee&6)throw Error(q(327));var o=e.callbackNode;if(Ru()&&e.callbackNode!==o)return null;var r=Lg(e,e===qt?ro:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=jg(e,r);else{t=r;var n=Ee;Ee|=2;var a=L1();(qt!==e||ro!==t)&&(Sa=null,Eu=St()+500,Ws(e,t));do try{N5();break}catch(s){P1(e,s)}while(1);Sw(),zg.current=a,Ee=n,Tt!==null?t=0:(qt=null,ro=0,t=Ft)}if(t!==0){if(t===2&&(n=P0(e),n!==0&&(r=n,t=ew(e,n))),t===1)throw o=af,Ws(e,0),Ri(e,r),Ko(e,St()),o;if(t===6)Ri(e,r);else{if(n=e.current.alternate,!(r&30)&&!A5(n)&&(t=jg(e,r),t===2&&(a=P0(e),a!==0&&(r=a,t=ew(e,a))),t===1))throw o=af,Ws(e,0),Ri(e,r),Ko(e,St()),o;switch(e.finishedWork=n,e.finishedLanes=r,t){case 0:case 1:throw Error(q(345));case 2:Hs(e,Wo,Sa);break;case 3:if(Ri(e,r),(r&130023424)===r&&(t=_w+500-St(),10<t)){if(Lg(e,0)!==0)break;if(n=e.suspendedLanes,(n&r)!==r){Ao(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=N0(Hs.bind(null,e,Wo,Sa),t);break}Hs(e,Wo,Sa);break;case 4:if(Ri(e,r),(r&4194240)===r)break;for(t=e.eventTimes,n=-1;0<r;){var i=31-hn(r);a=1<<i,i=t[i],i>n&&(n=i),r&=~a}if(r=n,r=St()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*E5(r/1960))-r,10<r){e.timeoutHandle=N0(Hs.bind(null,e,Wo,Sa),r);break}Hs(e,Wo,Sa);break;case 5:Hs(e,Wo,Sa);break;default:throw Error(q(329))}}}return Ko(e,St()),e.callbackNode===o?I1.bind(null,e):null}function ew(e,t){var o=Ud;return e.current.memoizedState.isDehydrated&&(Ws(e,t).flags|=256),e=jg(e,t),e!==2&&(t=Wo,Wo=o,t!==null&&tw(t)),e}function tw(e){Wo===null?Wo=e:Wo.push.apply(Wo,e)}function A5(e){for(var t=e;;){if(t.flags&16384){var o=t.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var r=0;r<o.length;r++){var n=o[r],a=n.getSnapshot;n=n.value;try{if(!xn(a(),n))return!1}catch{return!1}}}if(o=t.child,t.subtreeFlags&16384&&o!==null)o.return=t,t=o;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 Ri(e,t){for(t&=~Fw,t&=~oh,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var o=31-hn(t),r=1<<o;e[o]=-1,t&=~r}}function OL(e){if(Ee&6)throw Error(q(327));Ru();var t=Lg(e,0);if(!(t&1))return Ko(e,St()),null;var o=jg(e,t);if(e.tag!==0&&o===2){var r=P0(e);r!==0&&(t=r,o=ew(e,r))}if(o===1)throw o=af,Ws(e,0),Ri(e,t),Ko(e,St()),o;if(o===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Hs(e,Wo,Sa),Ko(e,St()),null}function Vw(e,t){var o=Ee;Ee|=1;try{return e(t)}finally{Ee=o,Ee===0&&(Eu=St()+500,Zg&&Bi())}}function Ys(e){Pi!==null&&Pi.tag===0&&!(Ee&6)&&Ru();var t=Ee;Ee|=1;var o=Or.transition,r=Ge;try{if(Or.transition=null,Ge=1,e)return e()}finally{Ge=r,Or.transition=o,Ee=t,!(Ee&6)&&Bi()}}function Bw(){cr=xu.current,tt(xu)}function Ws(e,t){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,l5(o)),Tt!==null)for(o=Tt.return;o!==null;){var r=o;switch(yw(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ag();break;case 3:ku(),tt(qo),tt(ho),Tw();break;case 5:Lw(r);break;case 4:ku();break;case 13:tt(dt);break;case 19:tt(dt);break;case 10:bw(r.type._context);break;case 22:case 23:Bw()}o=o.return}if(qt=e,Tt=e=Ni(e.current,null),ro=cr=t,Ft=0,af=null,Fw=oh=Xs=0,Wo=Ud=null,zs!==null){for(t=0;t<zs.length;t++)if(o=zs[t],r=o.interleaved,r!==null){o.interleaved=null;var n=r.next,a=o.pending;if(a!==null){var i=a.next;a.next=n,r.next=i}o.pending=r}zs=null}return e}function P1(e,t){do{var o=Tt;try{if(Sw(),vg.current=Ug,Hg){for(var r=ft.memoizedState;r!==null;){var n=r.queue;n!==null&&(n.pending=null),r=r.next}Hg=!1}if(Ks=0,jt=Ot=ft=null,Bd=!1,of=0,Ow.current=null,o===null||o.return===null){Ft=1,af=t,Tt=null;break}e:{var a=e,i=o.return,s=o,l=t;if(t=ro,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=SL(i);if(p!==null){p.flags&=-257,bL(p,i,s,a,t),p.mode&1&&CL(a,u,t),t=p,l=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if(!(t&1)){CL(a,u,t),Hw();break e}l=Error(q(426))}}else if(it&&s.mode&1){var x=SL(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),bL(x,i,s,a,t),ww(Mu(l,s));break e}}a=l=Mu(l,s),Ft!==4&&(Ft=2),Ud===null?Ud=[a]:Ud.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var h=u1(a,l,t);gL(a,h);break e;case 1:s=l;var v=a.type,y=a.stateNode;if(!(a.flags&128)&&(typeof v.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Ai===null||!Ai.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=c1(a,s,t);gL(a,w);break e}}a=a.return}while(a!==null)}k1(o)}catch(C){t=C,Tt===o&&o!==null&&(Tt=o=o.return);continue}break}while(1)}function L1(){var e=zg.current;return zg.current=Ug,e===null?Ug:e}function Hw(){(Ft===0||Ft===3||Ft===2)&&(Ft=4),qt===null||!(Xs&268435455)&&!(oh&268435455)||Ri(qt,ro)}function jg(e,t){var o=Ee;Ee|=2;var r=L1();(qt!==e||ro!==t)&&(Sa=null,Ws(e,t));do try{D5();break}catch(n){P1(e,n)}while(1);if(Sw(),Ee=o,zg.current=r,Tt!==null)throw Error(q(261));return qt=null,ro=0,Ft}function D5(){for(;Tt!==null;)T1(Tt)}function N5(){for(;Tt!==null&&!s4();)T1(Tt)}function T1(e){var t=E1(e.alternate,e,cr);e.memoizedProps=e.pendingProps,t===null?k1(e):Tt=t,Ow.current=null}function k1(e){var t=e;do{var o=t.alternate;if(e=t.return,t.flags&32768){if(o=L5(o,t),o!==null){o.flags&=32767,Tt=o;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ft=6,Tt=null;return}}else if(o=P5(o,t,cr),o!==null){Tt=o;return}if(t=t.sibling,t!==null){Tt=t;return}Tt=t=e}while(t!==null);Ft===0&&(Ft=5)}function Hs(e,t,o){var r=Ge,n=Or.transition;try{Or.transition=null,Ge=1,O5(e,t,o,r)}finally{Or.transition=n,Ge=r}return null}function O5(e,t,o,r){do Ru();while(Pi!==null);if(Ee&6)throw Error(q(327));o=e.finishedWork;var n=e.finishedLanes;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var a=o.lanes|o.childLanes;if(v4(e,a),e===qt&&(Tt=qt=null,ro=0),!(o.subtreeFlags&2064)&&!(o.flags&2064)||fg||(fg=!0,A1(Pg,function(){return Ru(),null})),a=(o.flags&15990)!==0,o.subtreeFlags&15990||a){a=Or.transition,Or.transition=null;var i=Ge;Ge=1;var s=Ee;Ee|=4,Ow.current=null,k5(e,o),b1(o,e),r5(A0),Tg=!!E0,A0=E0=null,e.current=o,M5(o,e,n),l4(),Ee=s,Ge=i,Or.transition=a}else e.current=o;if(fg&&(fg=!1,Pi=e,Wg=n),a=e.pendingLanes,a===0&&(Ai=null),d4(o.stateNode,r),Ko(e,St()),t!==null)for(r=e.onRecoverableError,o=0;o<t.length;o++)n=t[o],r(n.value,{componentStack:n.stack,digest:n.digest});if(Gg)throw Gg=!1,e=Z0,Z0=null,e;return Wg&1&&e.tag!==0&&Ru(),a=e.pendingLanes,a&1?e===J0?zd++:(zd=0,J0=e):zd=0,Bi(),null}function Ru(){if(Pi!==null){var e=uT(Wg),t=Or.transition,o=Ge;try{if(Or.transition=null,Ge=16>e?16:e,Pi===null)var r=!1;else{if(e=Pi,Pi=null,Wg=0,Ee&6)throw Error(q(331));var n=Ee;for(Ee|=4,re=e.current;re!==null;){var a=re,i=a.child;if(re.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(re=u;re!==null;){var c=re;switch(c.tag){case 0:case 11:case 15:Hd(8,c,a)}var d=c.child;if(d!==null)d.return=c,re=d;else for(;re!==null;){c=re;var f=c.sibling,p=c.return;if(w1(c),c===u){re=null;break}if(f!==null){f.return=p,re=f;break}re=p}}}var g=a.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}re=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,re=i;else e:for(;re!==null;){if(a=re,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Hd(9,a,a.return)}var h=a.sibling;if(h!==null){h.return=a.return,re=h;break e}re=a.return}}var v=e.current;for(re=v;re!==null;){i=re;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,re=y;else e:for(i=v;re!==null;){if(s=re,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:th(9,s)}}catch(C){vt(s,s.return,C)}if(s===i){re=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,re=w;break e}re=s.return}}if(Ee=n,Bi(),ea&&typeof ea.onPostCommitFiberRoot=="function")try{ea.onPostCommitFiberRoot($g,e)}catch{}r=!0}return r}finally{Ge=o,Or.transition=t}}return!1}function FL(e,t,o){t=Mu(o,t),t=u1(e,t,1),e=Ei(e,t,1),t=Ao(),e!==null&&(sf(e,1,t),Ko(e,t))}function vt(e,t,o){if(e.tag===3)FL(e,e,o);else for(;t!==null;){if(t.tag===3){FL(t,e,o);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ai===null||!Ai.has(r))){e=Mu(o,e),e=c1(t,e,1),t=Ei(t,e,1),e=Ao(),t!==null&&(sf(t,1,e),Ko(t,e));break}}t=t.return}}function F5(e,t,o){var r=e.pingCache;r!==null&&r.delete(t),t=Ao(),e.pingedLanes|=e.suspendedLanes&o,qt===e&&(ro&o)===o&&(Ft===4||Ft===3&&(ro&130023424)===ro&&500>St()-_w?Ws(e,0):Fw|=o),Ko(e,t)}function M1(e,t){t===0&&(e.mode&1?(t=Zm,Zm<<=1,!(Zm&130023424)&&(Zm=4194304)):t=1);var o=Ao();e=ka(e,t),e!==null&&(sf(e,t,o),Ko(e,o))}function _5(e){var t=e.memoizedState,o=0;t!==null&&(o=t.retryLane),M1(e,o)}function V5(e,t){var o=0;switch(e.tag){case 13:var r=e.stateNode,n=e.memoizedState;n!==null&&(o=n.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(q(314))}r!==null&&r.delete(t),M1(e,o)}var E1;E1=function(e,t,o){if(e!==null)if(e.memoizedProps!==t.pendingProps||qo.current)jo=!0;else{if(!(e.lanes&o)&&!(t.flags&128))return jo=!1,I5(e,t,o);jo=!!(e.flags&131072)}else jo=!1,it&&t.flags&1048576&&OT(t,Og,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yg(e,t),e=t.pendingProps;var n=Pu(t,ho.current);bu(t,o),n=Mw(null,t,r,e,n,o);var a=Ew();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$o(r)?(a=!0,Dg(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,Iw(t),n.updater=eh,t.stateNode=n,n._reactInternals=t,U0(t,r,e,o),t=W0(null,t,r,!0,a,o)):(t.tag=0,it&&a&&xw(t),Eo(null,t,n,o),t=t.child),t;case 16:r=t.elementType;e:{switch(yg(e,t),e=t.pendingProps,n=r._init,r=n(r._payload),t.type=r,n=t.tag=H5(r),e=pn(r,e),n){case 0:t=G0(null,t,r,e,o);break e;case 1:t=PL(null,t,r,e,o);break e;case 11:t=RL(null,t,r,e,o);break e;case 14:t=IL(null,t,r,pn(r.type,e),o);break e}throw Error(q(306,r,""))}return t;case 0:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),G0(e,t,r,n,o);case 1:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),PL(e,t,r,n,o);case 3:e:{if(m1(t),e===null)throw Error(q(387));r=t.pendingProps,a=t.memoizedState,n=a.element,UT(e,t),Vg(t,r,null,o);var i=t.memoizedState;if(r=i.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){n=Mu(Error(q(423)),t),t=LL(e,t,r,o,n);break e}else if(r!==n){n=Mu(Error(q(424)),t),t=LL(e,t,r,o,n);break e}else for(dr=Mi(t.stateNode.containerInfo.firstChild),fr=t,it=!0,gn=null,o=BT(t,null,r,o),t.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Lu(),r===n){t=Ma(e,t,o);break e}Eo(e,t,r,o)}t=t.child}return t;case 5:return zT(t),e===null&&V0(t),r=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,D0(r,n)?i=null:a!==null&&D0(r,a)&&(t.flags|=32),p1(e,t),Eo(e,t,i,o),t.child;case 6:return e===null&&V0(t),null;case 13:return g1(e,t,o);case 4:return Pw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tu(t,null,r,o):Eo(e,t,r,o),t.child;case 11:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),RL(e,t,r,n,o);case 7:return Eo(e,t,t.pendingProps,o),t.child;case 8:return Eo(e,t,t.pendingProps.children,o),t.child;case 12:return Eo(e,t,t.pendingProps.children,o),t.child;case 10:e:{if(r=t.type._context,n=t.pendingProps,a=t.memoizedProps,i=n.value,Ye(Fg,r._currentValue),r._currentValue=i,a!==null)if(xn(a.value,i)){if(a.children===n.children&&!qo.current){t=Ma(e,t,o);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=Pa(-1,o&-o),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=o,l=a.alternate,l!==null&&(l.lanes|=o),B0(a.return,o,t),s.lanes|=o;break}l=l.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(q(341));i.lanes|=o,s=i.alternate,s!==null&&(s.lanes|=o),B0(i,o,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Eo(e,t,n.children,o),t=t.child}return t;case 9:return n=t.type,r=t.pendingProps.children,bu(t,o),n=Fr(n),r=r(n),t.flags|=1,Eo(e,t,r,o),t.child;case 14:return r=t.type,n=pn(r,t.pendingProps),n=pn(r.type,n),IL(e,t,r,n,o);case 15:return d1(e,t,t.type,t.pendingProps,o);case 17:return r=t.type,n=t.pendingProps,n=t.elementType===r?n:pn(r,n),yg(e,t),t.tag=1,$o(r)?(e=!0,Dg(t)):e=!1,bu(t,o),l1(t,r,n),U0(t,r,n,o),W0(null,t,r,!0,e,o);case 19:return h1(e,t,o);case 22:return f1(e,t,o)}throw Error(q(156,t.tag))};function A1(e,t){return aT(e,t)}function B5(e,t,o,r){this.tag=e,this.key=o,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 Nr(e,t,o,r){return new B5(e,t,o,r)}function Uw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function H5(e){if(typeof e=="function")return Uw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===iw)return 11;if(e===sw)return 14}return 2}function Ni(e,t){var o=e.alternate;return o===null?(o=Nr(e.tag,t,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,t=e.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Sg(e,t,o,r,n,a){var i=2;if(r=e,typeof e=="function")Uw(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case lu:return js(o.children,n,a,t);case aw:i=8,n|=8;break;case d0:return e=Nr(12,o,t,n|2),e.elementType=d0,e.lanes=a,e;case f0:return e=Nr(13,o,t,n),e.elementType=f0,e.lanes=a,e;case p0:return e=Nr(19,o,t,n),e.elementType=p0,e.lanes=a,e;case zL:return rh(o,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case HL:i=10;break e;case UL:i=9;break e;case iw:i=11;break e;case sw:i=14;break e;case Ci:i=16,r=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=Nr(i,o,t,n),t.elementType=e,t.type=r,t.lanes=a,t}function js(e,t,o,r){return e=Nr(7,e,r,t),e.lanes=o,e}function rh(e,t,o,r){return e=Nr(22,e,r,t),e.elementType=zL,e.lanes=o,e.stateNode={isHidden:!1},e}function l0(e,t,o){return e=Nr(6,e,null,t),e.lanes=o,e}function u0(e,t,o){return t=Nr(4,e.children!==null?e.children:[],e.key,t),t.lanes=o,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function U5(e,t,o,r,n){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=qy(0),this.expirationTimes=qy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qy(0),this.identifierPrefix=r,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function zw(e,t,o,r,n,a,i,s,l){return e=new U5(e,t,o,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Nr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Iw(a),e}function z5(e,t,o){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:su,key:r==null?null:""+r,children:e,containerInfo:t,implementation:o}}function D1(e){if(!e)return Fi;e=e._reactInternals;e:{if(Zs(e)!==e||e.tag!==1)throw Error(q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if($o(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var o=e.type;if($o(o))return DT(e,o,t)}return t}function N1(e,t,o,r,n,a,i,s,l){return e=zw(o,r,!0,e,n,a,i,s,l),e.context=D1(null),o=e.current,r=Ao(),n=Di(o),a=Pa(r,n),a.callback=t??null,Ei(o,a,n),e.current.lanes=n,sf(e,n,r),Ko(e,r),e}function nh(e,t,o,r){var n=t.current,a=Ao(),i=Di(n);return o=D1(o),t.context===null?t.context=o:t.pendingContext=o,t=Pa(a,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ei(n,t,i),e!==null&&(vn(e,n,i,a),hg(e,n,i)),i}function qg(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 _L(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<t?o:t}}function Gw(e,t){_L(e,t),(e=e.alternate)&&_L(e,t)}function G5(){return null}var O1=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ww(e){this._internalRoot=e}ah.prototype.render=Ww.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));nh(e,t,null,null)};ah.prototype.unmount=Ww.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ys(function(){nh(null,e,null,null)}),t[Ta]=null}};function ah(e){this._internalRoot=e}ah.prototype.unstable_scheduleHydration=function(e){if(e){var t=fT();e={blockedOn:null,target:e,priority:t};for(var o=0;o<bi.length&&t!==0&&t<bi[o].priority;o++);bi.splice(o,0,e),o===0&&mT(e)}};function jw(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ih(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function VL(){}function W5(e,t,o,r,n){if(n){if(typeof r=="function"){var a=r;r=function(){var u=qg(i);a.call(u)}}var i=N1(t,r,e,0,null,!1,!1,"",VL);return e._reactRootContainer=i,e[Ta]=i.current,Qd(e.nodeType===8?e.parentNode:e),Ys(),i}for(;n=e.lastChild;)e.removeChild(n);if(typeof r=="function"){var s=r;r=function(){var u=qg(l);s.call(u)}}var l=zw(e,0,!1,null,null,!1,!1,"",VL);return e._reactRootContainer=l,e[Ta]=l.current,Qd(e.nodeType===8?e.parentNode:e),Ys(function(){nh(t,l,o,r)}),l}function sh(e,t,o,r,n){var a=o._reactRootContainer;if(a){var i=a;if(typeof n=="function"){var s=n;n=function(){var l=qg(i);s.call(l)}}nh(t,i,e,n)}else i=W5(o,t,e,n,r);return qg(i)}cT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var o=Ad(t.pendingLanes);o!==0&&(cw(t,o|1),Ko(t,St()),!(Ee&6)&&(Eu=St()+500,Bi()))}break;case 13:Ys(function(){var r=ka(e,1);if(r!==null){var n=Ao();vn(r,e,1,n)}}),Gw(e,1)}};dw=function(e){if(e.tag===13){var t=ka(e,134217728);if(t!==null){var o=Ao();vn(t,e,134217728,o)}Gw(e,134217728)}};dT=function(e){if(e.tag===13){var t=Di(e),o=ka(e,t);if(o!==null){var r=Ao();vn(o,e,t,r)}Gw(e,t)}};fT=function(){return Ge};pT=function(e,t){var o=Ge;try{return Ge=e,t()}finally{Ge=o}};b0=function(e,t,o){switch(t){case"input":if(h0(e,o),t=o.name,o.type==="radio"&&t!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<o.length;t++){var r=o[t];if(r!==e&&r.form===e.form){var n=Qg(r);if(!n)throw Error(q(90));WL(r),h0(r,n)}}}break;case"textarea":qL(e,o);break;case"select":t=o.value,t!=null&&yu(e,!!o.multiple,t,!1)}};JL=Vw;eT=Ys;var j5={usingClientEntryPoint:!1,Events:[uf,fu,Qg,QL,ZL,Vw]},Td={findFiberByHostInstance:Us,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},q5={bundleType:Td.bundleType,version:Td.version,rendererPackageName:Td.rendererPackageName,rendererConfig:Td.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ea.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=rT(e),e===null?null:e.stateNode},findFiberByHostInstance:Td.findFiberByHostInstance||G5,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(kd=__REACT_DEVTOOLS_GLOBAL_HOOK__,!kd.isDisabled&&kd.supportsFiber))try{$g=kd.inject(q5),ea=kd}catch{}var kd;gr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j5;gr.createPortal=function(e,t){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jw(t))throw Error(q(200));return z5(e,t,null,o)};gr.createRoot=function(e,t){if(!jw(e))throw Error(q(299));var o=!1,r="",n=O1;return t!=null&&(t.unstable_strictMode===!0&&(o=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=zw(e,1,!1,null,null,o,!1,r,n),e[Ta]=t.current,Qd(e.nodeType===8?e.parentNode:e),new Ww(t)};gr.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(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=rT(t),e=e===null?null:e.stateNode,e};gr.flushSync=function(e){return Ys(e)};gr.hydrate=function(e,t,o){if(!ih(t))throw Error(q(200));return sh(null,e,t,!0,o)};gr.hydrateRoot=function(e,t,o){if(!jw(e))throw Error(q(405));var r=o!=null&&o.hydratedSources||null,n=!1,a="",i=O1;if(o!=null&&(o.unstable_strictMode===!0&&(n=!0),o.identifierPrefix!==void 0&&(a=o.identifierPrefix),o.onRecoverableError!==void 0&&(i=o.onRecoverableError)),t=N1(t,null,e,1,o??null,n,!1,a,i),e[Ta]=t.current,Qd(e),r)for(e=0;e<r.length;e++)o=r[e],n=o._getVersion,n=n(o._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[o,n]:t.mutableSourceEagerHydrationData.push(o,n);return new ah(t)};gr.render=function(e,t,o){if(!ih(t))throw Error(q(200));return sh(null,e,t,!1,o)};gr.unmountComponentAtNode=function(e){if(!ih(e))throw Error(q(40));return e._reactRootContainer?(Ys(function(){sh(null,null,e,!1,function(){e._reactRootContainer=null,e[Ta]=null})}),!0):!1};gr.unstable_batchedUpdates=Vw;gr.unstable_renderSubtreeIntoContainer=function(e,t,o,r){if(!ih(o))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return sh(e,t,o,!1,r)};gr.version="18.3.1-next-f1338f8080-20240426"});var Aa=ru((Aee,V1)=>{"use strict";function _1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_1)}catch(e){console.error(e)}}_1(),V1.exports=F1()});var Dk=ru(Ak=>{"use strict";var Ku=M();function ZW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var JW=typeof Object.is=="function"?Object.is:ZW,ej=Ku.useState,tj=Ku.useEffect,oj=Ku.useLayoutEffect,rj=Ku.useDebugValue;function nj(e,t){var o=t(),r=ej({inst:{value:o,getSnapshot:t}}),n=r[0].inst,a=r[1];return oj(function(){n.value=o,n.getSnapshot=t,lC(n)&&a({inst:n})},[e,o,t]),tj(function(){return lC(n)&&a({inst:n}),e(function(){lC(n)&&a({inst:n})})},[e]),rj(o),o}function lC(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!JW(e,o)}catch{return!0}}function aj(e,t){return t()}var ij=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?aj:nj;Ak.useSyncExternalStore=Ku.useSyncExternalStore!==void 0?Ku.useSyncExternalStore:ij});var Ok=ru((zne,Nk)=>{"use strict";Nk.exports=Dk()});var yh=R(M());var Yo=R(M(),1);var kr=R(M(),1),Ay=R(N(),1);function gP(e,t){let o=kr.createContext(t),r=a=>{let{children:i,...s}=a,l=kr.useMemo(()=>s,Object.values(s));return(0,Ay.jsx)(o.Provider,{value:l,children:i})};r.displayName=e+"Provider";function n(a){let i=kr.useContext(o);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,n]}function Oe(e,t=[]){let o=[];function r(a,i){let s=kr.createContext(i),l=o.length;o=[...o,i];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=kr.useMemo(()=>g,Object.values(g));return(0,Ay.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,g=kr.useContext(p);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=o.map(i=>kr.createContext(i));return function(s){let l=s?.[e]||a;return kr.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[r,Oz(n,...t)]}function Oz(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=r.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return kr.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return o.scopeName=t.scopeName,o}var xi=R(M(),1);var vP=R(M(),1);function hP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lr(...e){return t=>{let o=!1,r=e.map(n=>{let a=hP(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():hP(e[n],null)}}}}function de(...e){return vP.useCallback(lr(...e),e)}var Nt=R(M(),1);var nu=R(N(),1);function ur(e){let t=Fz(e),o=Nt.forwardRef((r,n)=>{let{children:a,...i}=r,s=Nt.Children.toArray(a),l=s.find(_z);if(l){let u=l.props.children,c=s.map(d=>d===l?Nt.Children.count(u)>1?Nt.Children.only(null):Nt.isValidElement(u)?u.props.children:null:d);return(0,nu.jsx)(t,{...i,ref:n,children:Nt.isValidElement(u)?Nt.cloneElement(u,void 0,c):null})}return(0,nu.jsx)(t,{...i,ref:n,children:a})});return o.displayName=`${e}.Slot`,o}function Fz(e){let t=Nt.forwardRef((o,r)=>{let{children:n,...a}=o;if(Nt.isValidElement(n)){let i=Bz(n),s=Vz(a,n.props);return n.type!==Nt.Fragment&&(s.ref=r?lr(r,i):i),Nt.cloneElement(n,s)}return Nt.Children.count(n)>1?Nt.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xP=Symbol("radix.slottable");function yP(e){let t=({children:o})=>(0,nu.jsx)(nu.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=xP,t}function _z(e){return Nt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xP}function Vz(e,t){let o={...t};for(let r in t){let n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function Bz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Um=R(N(),1),Hz=R(M(),1);var Uz=R(N(),1);function Xn(e){let t=e+"CollectionProvider",[o,r]=Oe(t),[n,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:x,children:h}=m,v=xi.default.useRef(null),y=xi.default.useRef(new Map).current;return(0,Um.jsx)(n,{scope:x,itemMap:y,collectionRef:v,children:h})};i.displayName=t;let s=e+"CollectionSlot",l=ur(s),u=xi.default.forwardRef((m,x)=>{let{scope:h,children:v}=m,y=a(s,h),w=de(x,y.collectionRef);return(0,Um.jsx)(l,{ref:w,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=ur(c),p=xi.default.forwardRef((m,x)=>{let{scope:h,children:v,...y}=m,w=xi.default.useRef(null),C=de(x,w),b=a(c,h);return xi.default.useEffect(()=>(b.itemMap.set(w,{ref:w,...y}),()=>void b.itemMap.delete(w))),(0,Um.jsx)(f,{[d]:"",ref:C,children:v})});p.displayName=c;function g(m){let x=a(e+"CollectionConsumer",m);return xi.default.useCallback(()=>{let v=x.collectionRef.current;if(!v)return[];let y=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((b,S)=>y.indexOf(b.ref.current)-y.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},g,r]}var bee=!!(typeof window<"u"&&window.document&&window.document.createElement);function W(e,t,{checkForDefaultPrevented:o=!0}={}){return function(n){if(e?.(n),o===!1||!n.defaultPrevented)return t?.(n)}}var Mr=R(M(),1);var wP=R(M(),1),_e=globalThis?.document?wP.useLayoutEffect:()=>{};var zm=R(M(),1);var zz=Mr[" useInsertionEffect ".trim().toString()]||_e;function qe({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[n,a,i]=Gz({defaultProp:t,onChange:o}),s=e!==void 0,l=s?e:n;{let c=Mr.useRef(e!==void 0);Mr.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),c.current=s},[s,r])}let u=Mr.useCallback(c=>{if(s){let d=Wz(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function Gz({defaultProp:e,onChange:t}){let[o,r]=Mr.useState(e),n=Mr.useRef(o),a=Mr.useRef(t);return zz(()=>{a.current=t},[t]),Mr.useEffect(()=>{n.current!==o&&(a.current?.(o),n.current=o)},[o,n]),[o,r,a]}function Wz(e){return typeof e=="function"}var Lee=Symbol("RADIX:SYNC_STATE");var B1=R(M(),1),H1=R(Aa(),1);var U1=R(N(),1),$5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=$5.reduce((e,t)=>{let o=ur(`Primitive.${t}`),r=B1.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,U1.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Nu(e,t){e&&H1.flushSync(()=>e.dispatchEvent(t))}var ao=R(M(),1);var Xo=R(M(),1);var z1=R(M(),1);function K5(e,t){return z1.useReducer((o,r)=>t[o][r]??o,e)}var st=e=>{let{present:t,children:o}=e,r=X5(t),n=typeof o=="function"?o({present:r.isPresent}):Xo.Children.only(o),a=de(r.ref,Y5(n));return typeof o=="function"||r.isPresent?Xo.cloneElement(n,{ref:a}):null};st.displayName="Presence";function X5(e){let[t,o]=Xo.useState(),r=Xo.useRef(null),n=Xo.useRef(e),a=Xo.useRef("none"),i=e?"mounted":"unmounted",[s,l]=K5(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Xo.useEffect(()=>{let u=lh(r.current);a.current=s==="mounted"?u:"none"},[s]),_e(()=>{let u=r.current,c=n.current;if(c!==e){let f=a.current,p=lh(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),_e(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let m=lh(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!n.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=p=>{p.target===t&&(a.current=lh(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Xo.useCallback(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function lh(e){return e?.animationName||"none"}function Y5(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var qw=R(M(),1);var Q5=qw[" useId ".trim().toString()]||(()=>{}),Z5=0;function Ae(e){let[t,o]=qw.useState(Q5());return _e(()=>{e||o(r=>r??String(Z5++))},[e]),e||(t?`radix-${t}`:"")}var Js=R(N(),1),uh="Collapsible",[J5,$w]=Oe(uh),[eG,Kw]=J5(uh),G1=ao.forwardRef((e,t)=>{let{__scopeCollapsible:o,open:r,defaultOpen:n,disabled:a,onOpenChange:i,...s}=e,[l,u]=qe({prop:r,defaultProp:n??!1,onChange:i,caller:uh});return(0,Js.jsx)(eG,{scope:o,disabled:a,contentId:Ae(),open:l,onOpenToggle:ao.useCallback(()=>u(c=>!c),[u]),children:(0,Js.jsx)($.div,{"data-state":Yw(l),"data-disabled":a?"":void 0,...s,ref:t})})});G1.displayName=uh;var W1="CollapsibleTrigger",j1=ao.forwardRef((e,t)=>{let{__scopeCollapsible:o,...r}=e,n=Kw(W1,o);return(0,Js.jsx)($.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":Yw(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...r,ref:t,onClick:W(e.onClick,n.onOpenToggle)})});j1.displayName=W1;var Xw="CollapsibleContent",q1=ao.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=Kw(Xw,e.__scopeCollapsible);return(0,Js.jsx)(st,{present:o||n.open,children:({present:a})=>(0,Js.jsx)(tG,{...r,ref:t,present:a})})});q1.displayName=Xw;var tG=ao.forwardRef((e,t)=>{let{__scopeCollapsible:o,present:r,children:n,...a}=e,i=Kw(Xw,o),[s,l]=ao.useState(r),u=ao.useRef(null),c=de(t,u),d=ao.useRef(0),f=d.current,p=ao.useRef(0),g=p.current,m=i.open||s,x=ao.useRef(m),h=ao.useRef(void 0);return ao.useEffect(()=>{let v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),_e(()=>{let v=u.current;if(v){h.current=h.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";let y=v.getBoundingClientRect();d.current=y.height,p.current=y.width,x.current||(v.style.transitionDuration=h.current.transitionDuration,v.style.animationName=h.current.animationName),l(r)}},[i.open,r]),(0,Js.jsx)($.div,{"data-state":Yw(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:m&&n})});function Yw(e){return e?"open":"closed"}var ch=G1,Ou=j1,df=q1;var dh=R(M(),1),oG=R(N(),1),rG=dh.createContext(void 0);function oa(e){let t=dh.useContext(rG);return e||t||"ltr"}var _t=R(N(),1),yn="Accordion",nG=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Zw,aG,iG]=Xn(yn),[ph,nte]=Oe(yn,[iG,$w]),Jw=$w(),K1=Yo.default.forwardRef((e,t)=>{let{type:o,...r}=e,n=r,a=r;return(0,_t.jsx)(Zw.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?(0,_t.jsx)(cG,{...a,ref:t}):(0,_t.jsx)(uG,{...n,ref:t})})});K1.displayName=yn;var[X1,sG]=ph(yn),[Y1,lG]=ph(yn,{collapsible:!1}),uG=Yo.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:n=()=>{},collapsible:a=!1,...i}=e,[s,l]=qe({prop:o,defaultProp:r??"",onChange:n,caller:yn});return(0,_t.jsx)(X1,{scope:e.__scopeAccordion,value:Yo.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Yo.default.useCallback(()=>a&&l(""),[a,l]),children:(0,_t.jsx)(Y1,{scope:e.__scopeAccordion,collapsible:a,children:(0,_t.jsx)(Q1,{...i,ref:t})})})}),cG=Yo.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:n=()=>{},...a}=e,[i,s]=qe({prop:o,defaultProp:r??[],onChange:n,caller:yn}),l=Yo.default.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=Yo.default.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return(0,_t.jsx)(X1,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:(0,_t.jsx)(Y1,{scope:e.__scopeAccordion,collapsible:!0,children:(0,_t.jsx)(Q1,{...a,ref:t})})})}),[dG,mh]=ph(yn),Q1=Yo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,disabled:r,dir:n,orientation:a="vertical",...i}=e,s=Yo.default.useRef(null),l=de(s,t),u=aG(o),d=oa(n)==="ltr",f=W(e.onKeyDown,p=>{if(!nG.includes(p.key))return;let g=p.target,m=u().filter(I=>!I.ref.current?.disabled),x=m.findIndex(I=>I.ref.current===g),h=m.length;if(x===-1)return;p.preventDefault();let v=x,y=0,w=h-1,C=()=>{v=x+1,v>w&&(v=y)},b=()=>{v=x-1,v<y&&(v=w)};switch(p.key){case"Home":v=y;break;case"End":v=w;break;case"ArrowRight":a==="horizontal"&&(d?C():b());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(d?b():C());break;case"ArrowUp":a==="vertical"&&b();break}let S=v%h;m[S].ref.current?.focus()});return(0,_t.jsx)(dG,{scope:o,disabled:r,direction:n,orientation:a,children:(0,_t.jsx)(Zw.Slot,{scope:o,children:(0,_t.jsx)($.div,{...i,"data-orientation":a,ref:l,onKeyDown:r?void 0:f})})})}),fh="AccordionItem",[fG,eC]=ph(fh),Z1=Yo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,value:r,...n}=e,a=mh(fh,o),i=sG(fh,o),s=Jw(o),l=Ae(),u=r&&i.value.includes(r)||!1,c=a.disabled||e.disabled;return(0,_t.jsx)(fG,{scope:o,open:u,disabled:c,triggerId:l,children:(0,_t.jsx)(ch,{"data-orientation":a.orientation,"data-state":nk(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:d=>{d?i.onItemOpen(r):i.onItemClose(r)}})})});Z1.displayName=fh;var J1="AccordionHeader",ek=Yo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,n=mh(yn,o),a=eC(J1,o);return(0,_t.jsx)($.h3,{"data-orientation":n.orientation,"data-state":nk(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});ek.displayName=J1;var Qw="AccordionTrigger",tk=Yo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,n=mh(yn,o),a=eC(Qw,o),i=lG(Qw,o),s=Jw(o);return(0,_t.jsx)(Zw.ItemSlot,{scope:o,children:(0,_t.jsx)(Ou,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:a.triggerId,...s,...r,ref:t})})});tk.displayName=Qw;var ok="AccordionContent",rk=Yo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,n=mh(yn,o),a=eC(ok,o),i=Jw(o);return(0,_t.jsx)(df,{role:"region","aria-labelledby":a.triggerId,"data-orientation":n.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});rk.displayName=ok;function nk(e){return e?"open":"closed"}var ak=K1,ik=Z1,sk=ek,tC=tk,oC=rk;var hh=R(M());var lk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mG=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase()),rC=e=>{let t=mG(e);return t.charAt(0).toUpperCase()+t.slice(1)},gh=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim(),uk=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var ff=R(M());var ck={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"};var dk=(0,ff.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:a,iconNode:i,...s},l)=>(0,ff.createElement)("svg",{ref:l,...ck,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:gh("lucide",n),...!a&&!uk(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,ff.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var H=(e,t)=>{let o=(0,hh.forwardRef)(({className:r,...n},a)=>(0,hh.createElement)(dk,{ref:a,iconNode:t,className:gh(`lucide-${lk(rC(e))}`,`lucide-${e}`,r),...n}));return o.displayName=rC(e),o};var gG=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],pf=H("align-center",gG);var hG=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],mf=H("align-justify",hG);var vG=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],gf=H("align-left",vG);var xG=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],hf=H("align-right",xG);var yG=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Fu=H("arrow-down",yG);var wG=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],vf=H("arrow-left",wG);var CG=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],xf=H("arrow-right",CG);var SG=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],_u=H("arrow-up-down",SG);var bG=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Vu=H("arrow-up",bG);var RG=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],yf=H("bold",RG);var IG=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],el=H("calendar",IG);var PG=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vo=H("check",PG);var LG=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ra=H("chevron-down",LG);var TG=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],wn=H("chevron-left",TG);var kG=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],No=H("chevron-right",kG);var MG=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],wf=H("chevron-up",MG);var EG=[["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"}]],Cn=H("circle-alert",EG);var AG=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Hi=H("circle-check-big",AG);var DG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],tl=H("circle",DG);var NG=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Cf=H("clock",NG);var OG=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Sf=H("code",OG);var FG=[["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"}]],bf=H("copy",FG);var _G=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Rf=H("credit-card",_G);var VG=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],Bu=H("crown",VG);var BG=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],If=H("dot",BG);var HG=[["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"}]],na=H("ellipsis",HG);var UG=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Pf=H("external-link",UG);var zG=[["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"}]],ol=H("eye",zG);var GG=[["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"}]],Lf=H("file-text",GG);var WG=[["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"}]],Tf=H("file",WG);var jG=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],kf=H("git-fork",jG);var qG=[["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"}]],rl=H("image",qG);var $G=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Hu=H("info",$G);var KG=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Mf=H("italic",KG);var XG=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Ef=H("link",XG);var YG=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],Af=H("list-ordered",YG);var QG=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],Df=H("list",QG);var ZG=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Vt=H("loader-circle",ZG);var JG=[["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"}]],Uu=H("lock",JG);var eW=[["path",{d:"M5 12h14",key:"1ays0h"}]],Nf=H("minus",eW);var tW=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],Of=H("music",tW);var oW=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],zu=H("palette",oW);var rW=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Ff=H("phone",rW);var nW=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],vh=H("pipette",nW);var aW=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],_f=H("quote",aW);var iW=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],Vf=H("redo",iW);var sW=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],nl=H("search",sW);var lW=[["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"}]],Qo=H("square-pen",lW);var uW=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Ui=H("star",uW);var cW=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],Bf=H("strikethrough",cW);var dW=[["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"}]],zi=H("triangle-alert",dW);var fW=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Hf=H("underline",fW);var pW=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],Uf=H("undo",pW);var mW=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],zf=H("upload",mW);var gW=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Gf=H("video",gW);var hW=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hr=H("x",hW);var vW=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Gu=H("zap",vW);var Ck=R(M());function fk(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=fk(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function xh(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=fk(e))&&(r&&(r+=" "),r+=t);return r}var iC="-",xW=e=>{let t=wW(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{let s=i.split(iC);return s[0]===""&&s.length!==1&&s.shift(),gk(s,t)||yW(i)},getConflictingClassGroupIds:(i,s)=>{let l=o[i]||[];return s&&r[i]?[...l,...r[i]]:l}}},gk=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),n=r?gk(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(iC);return t.validators.find(({validator:i})=>i(a))?.classGroupId},pk=/^\[(.+)\]$/,yW=e=>{if(pk.test(e)){let t=pk.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},wW=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return SW(Object.entries(e.classGroups),o).forEach(([a,i])=>{aC(i,r,a,t)}),r},aC=(e,t,o,r)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:mk(t,n);a.classGroupId=o;return}if(typeof n=="function"){if(CW(n)){aC(n(r),t,o,r);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([a,i])=>{aC(i,mk(t,a),o,r)})})},mk=(e,t)=>{let o=e;return t.split(iC).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},CW=e=>e.isThemeGetter,SW=(e,t)=>t?e.map(([o,r])=>{let n=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[o,n]}):e,bW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,n=(a,i)=>{o.set(a,i),t++,t>e&&(t=0,r=o,o=new Map)};return{get(a){let i=o.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return n(a,i),i},set(a,i){o.has(a)?o.set(a,i):n(a,i)}}},hk="!",RW=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,n=t[0],a=t.length,i=s=>{let l=[],u=0,c=0,d;for(let x=0;x<s.length;x++){let h=s[x];if(u===0){if(h===n&&(r||s.slice(x,x+a)===t)){l.push(s.slice(c,x)),c=x+a;continue}if(h==="/"){d=x;continue}}h==="["?u++:h==="]"&&u--}let f=l.length===0?s:s.substring(c),p=f.startsWith(hk),g=p?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return o?s=>o({className:s,parseClassName:i}):i},IW=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},PW=e=>({cache:bW(e.cacheSize),parseClassName:RW(e),...xW(e)}),LW=/\s+/,TW=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(LW),s="";for(let l=i.length-1;l>=0;l-=1){let u=i[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=o(u),g=!!p,m=r(g?f.substring(0,p):f);if(!m){if(!g){s=u+(s.length>0?" "+s:s);continue}if(m=r(f),!m){s=u+(s.length>0?" "+s:s);continue}g=!1}let x=IW(c).join(":"),h=d?x+hk:x,v=h+m;if(a.includes(v))continue;a.push(v);let y=n(m,g);for(let w=0;w<y.length;++w){let C=y[w];a.push(h+C)}s=u+(s.length>0?" "+s:s)}return s};function kW(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=vk(t))&&(r&&(r+=" "),r+=o);return r}var vk=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=vk(e[r]))&&(o&&(o+=" "),o+=t);return o};function MW(e,...t){let o,r,n,a=i;function i(l){let u=t.reduce((c,d)=>d(c),e());return o=PW(u),r=o.cache.get,n=o.cache.set,a=s,s(l)}function s(l){let u=r(l);if(u)return u;let c=TW(l,o);return n(l,c),c}return function(){return a(kW.apply(null,arguments))}}var ot=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},xk=/^\[(?:([a-z-]+):)?(.+)\]$/i,EW=/^\d+\/\d+$/,AW=new Set(["px","full","screen"]),DW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NW=/\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$/,OW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,FW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_W=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Da=e=>Wu(e)||AW.has(e)||EW.test(e),Gi=e=>ju(e,"length",jW),Wu=e=>!!e&&!Number.isNaN(Number(e)),nC=e=>ju(e,"number",Wu),Wf=e=>!!e&&Number.isInteger(Number(e)),VW=e=>e.endsWith("%")&&Wu(e.slice(0,-1)),Pe=e=>xk.test(e),Wi=e=>DW.test(e),BW=new Set(["length","size","percentage"]),HW=e=>ju(e,BW,yk),UW=e=>ju(e,"position",yk),zW=new Set(["image","url"]),GW=e=>ju(e,zW,$W),WW=e=>ju(e,"",qW),jf=()=>!0,ju=(e,t,o)=>{let r=xk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},jW=e=>NW.test(e)&&!OW.test(e),yk=()=>!1,qW=e=>FW.test(e),$W=e=>_W.test(e);var KW=()=>{let e=ot("colors"),t=ot("spacing"),o=ot("blur"),r=ot("brightness"),n=ot("borderColor"),a=ot("borderRadius"),i=ot("borderSpacing"),s=ot("borderWidth"),l=ot("contrast"),u=ot("grayscale"),c=ot("hueRotate"),d=ot("invert"),f=ot("gap"),p=ot("gradientColorStops"),g=ot("gradientColorStopPositions"),m=ot("inset"),x=ot("margin"),h=ot("opacity"),v=ot("padding"),y=ot("saturate"),w=ot("scale"),C=ot("sepia"),b=ot("skew"),S=ot("space"),I=ot("translate"),L=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",Pe,t],E=()=>[Pe,t],_=()=>["",Da,Gi],D=()=>["auto",Wu,Pe],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",Pe],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[Wu,Pe];return{cacheSize:500,separator:":",theme:{colors:[jf],spacing:[Da,Gi],blur:["none","",Wi,Pe],brightness:ae(),borderColor:[e],borderRadius:["none","","full",Wi,Pe],borderSpacing:E(),borderWidth:_(),contrast:ae(),grayscale:A(),hueRotate:ae(),invert:A(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[VW,Gi],inset:k(),margin:k(),opacity:ae(),padding:E(),saturate:ae(),scale:ae(),sepia:A(),skew:ae(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",Pe]}],container:["container"],columns:[{columns:[Wi]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"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:[...z(),Pe]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wf,Pe]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Pe]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",Wf,Pe]}],"grid-cols":[{"grid-cols":[jf]}],"col-start-end":[{col:["auto",{span:["full",Wf,Pe]},Pe]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[jf]}],"row-start-end":[{row:["auto",{span:[Wf,Pe]},Pe]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Pe]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Pe,t]}],"min-w":[{"min-w":[Pe,t,"min","max","fit"]}],"max-w":[{"max-w":[Pe,t,"none","full","min","max","fit","prose",{screen:[Wi]},Wi]}],h:[{h:[Pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Wi,Gi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",nC]}],"font-family":[{font:[jf]}],"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",Pe]}],"line-clamp":[{"line-clamp":["none",Wu,nC]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Da,Pe]}],"list-image":[{"list-image":["none",Pe]}],"list-style-type":[{list:["none","disc","decimal",Pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Da,Gi]}],"underline-offset":[{"underline-offset":["auto",Da,Pe]}],"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:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pe]}],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",Pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...z(),UW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",HW]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},GW]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:F()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[Da,Pe]}],"outline-w":[{outline:[Da,Gi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[Da,Gi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wi,WW]}],"shadow-color":[{shadow:[jf]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Wi,Pe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Pe]}],duration:[{duration:ae()}],ease:[{ease:["linear","in","out","in-out",Pe]}],delay:[{delay:ae()}],animate:[{animate:["none","spin","ping","pulse","bounce",Pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Wf,Pe]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Pe]}],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",Pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",Pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Da,Gi,nC]}],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"]}}};var wk=MW(KW);function P(...e){return wk(xh(e))}function qf(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(qf).filter(Boolean).join(" ").trim();if(Ck.isValidElement(e)){let t=e.props;return qf(t.children)}return""}var ji=R(N()),XW=ak,Sk=yh.forwardRef(({className:e,...t},o)=>(0,ji.jsx)(ik,{ref:o,className:P("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));Sk.displayName="AccordionItem";var bk=yh.forwardRef(({className:e,children:t,...o},r)=>(0,ji.jsx)(sk,{className:"flex",children:(0,ji.jsxs)(tC,{ref:r,className:P("flex flex-1 items-center justify-between py-4 font-medium transition-all dark:text-gray-100","hover:underline hover:text-primary dark:hover:text-primary-400","[&[data-state=open]>svg]:rotate-180",e),...o,children:[t,(0,ji.jsx)(ra,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));bk.displayName=tC.displayName;var Rk=yh.forwardRef(({className:e,children:t,...o},r)=>(0,ji.jsx)(oC,{ref:r,className:P("overflow-hidden text-sm text-gray-700 dark:text-gray-300 transition-all","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...o,children:(0,ji.jsx)("div",{className:"pb-4 pt-0",children:t})}));Rk.displayName=oC.displayName;var qu=R(M());var Ik=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Pk=xh,K=(e,t)=>o=>{var r;if(t?.variants==null)return Pk(e,o?.class,o?.className);let{variants:n,defaultVariants:a}=t,i=Object.keys(n).map(u=>{let c=o?.[u],d=a?.[u];if(c===null)return null;let f=Ik(c)||Ik(d);return n[u][f]}),s=o&&Object.entries(o).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(g=>{let[m,x]=g;return Array.isArray(x)?x.includes({...a,...s}[m]):{...a,...s}[m]===x})?[...u,d,f]:u},[]);return Pk(e,i,l,o?.class,o?.className)};var Na=R(N()),YW=K("relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",{variants:{variant:{default:"bg-background text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/30",success:"bg-success/10 text-success border-success/30",warning:"bg-warning/10 text-warning border-warning/30",error:"bg-destructive/10 text-destructive border-destructive/30",info:"bg-info/10 text-info border-info/30"},size:{sm:"py-2 text-xs",default:"py-3 text-sm",lg:"py-4 text-base"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},withClose:{true:"pr-10"}},defaultVariants:{variant:"default",size:"default",radius:"default",withClose:!1}}),Lk=qu.forwardRef(({className:e,variant:t="default",size:o,radius:r,hideIcon:n=!1,closable:a=!1,onClose:i,children:s,...l},u)=>{let c=qu.useMemo(()=>{switch(t){case"success":return vo;case"warning":return zi;case"error":return Cn;case"info":return Hu;default:return Hu}},[t]);return(0,Na.jsxs)("div",{ref:u,role:"alert",className:P("moonui-theme",YW({variant:t,size:o,radius:r,withClose:a}),e),...l,children:[!n&&(0,Na.jsx)(c,{className:"h-5 w-5"}),(0,Na.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,Na.jsx)("button",{onClick:i,className:"absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100","aria-label":"Close alert",children:(0,Na.jsx)(hr,{className:"h-4 w-4"})})]})});Lk.displayName="Alert";var Tk=qu.forwardRef(({className:e,...t},o)=>(0,Na.jsx)("h5",{ref:o,className:P("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));Tk.displayName="AlertTitle";var kk=qu.forwardRef(({className:e,...t},o)=>(0,Na.jsx)("div",{ref:o,className:P("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));kk.displayName="AlertDescription";var Mk=R(M());var sC=R(N()),QW=K("relative overflow-hidden",{variants:{variant:{default:"bg-muted/10",ghost:"bg-transparent",outline:"border border-border",card:"bg-card shadow-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default",radius:"md"}}),Ek=Mk.forwardRef(({className:e,variant:t,radius:o,ratio:r=16/9,style:n,children:a,...i},s)=>(0,sC.jsx)("div",{ref:s,className:P("moonui-theme",QW({variant:t,radius:o}),e),style:{position:"relative",paddingBottom:`${1/r*100}%`,...n},...i,children:(0,sC.jsx)("div",{className:"absolute inset-0",children:a})}));Ek.displayName="AspectRatio";var al=R(M());var Vr=R(M(),1);var $u=R(M(),1);function rt(e){let t=$u.useRef(e);return $u.useEffect(()=>{t.current=e}),$u.useMemo(()=>(...o)=>t.current?.(...o),[])}var Fk=R(Ok(),1);function _k(){return(0,Fk.useSyncExternalStore)(sj,()=>!0,()=>!1)}function sj(){return()=>{}}var $f=R(N(),1),uC="Avatar",[lj,Xne]=Oe(uC),[uj,Bk]=lj(uC),Hk=Vr.forwardRef((e,t)=>{let{__scopeAvatar:o,...r}=e,[n,a]=Vr.useState("idle");return(0,$f.jsx)(uj,{scope:o,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:(0,$f.jsx)($.span,{...r,ref:t})})});Hk.displayName=uC;var Uk="AvatarImage",zk=Vr.forwardRef((e,t)=>{let{__scopeAvatar:o,src:r,onLoadingStatusChange:n=()=>{},...a}=e,i=Bk(Uk,o),s=cj(r,a),l=rt(u=>{n(u),i.onImageLoadingStatusChange(u)});return _e(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,$f.jsx)($.img,{...a,ref:t,src:r}):null});zk.displayName=Uk;var Gk="AvatarFallback",Wk=Vr.forwardRef((e,t)=>{let{__scopeAvatar:o,delayMs:r,...n}=e,a=Bk(Gk,o),[i,s]=Vr.useState(r===void 0);return Vr.useEffect(()=>{if(r!==void 0){let l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),i&&a.imageLoadingStatus!=="loaded"?(0,$f.jsx)($.span,{...n,ref:t}):null});Wk.displayName=Gk;function Vk(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function cj(e,{referrerPolicy:t,crossOrigin:o}){let r=_k(),n=Vr.useRef(null),a=(()=>r?(n.current||(n.current=new window.Image),n.current):null)(),[i,s]=Vr.useState(()=>Vk(a,e));return _e(()=>{s(Vk(a,e))},[a,e]),_e(()=>{let l=d=>()=>{s(d)};if(!a)return;let u=l("loaded"),c=l("error");return a.addEventListener("load",u),a.addEventListener("error",c),t&&(a.referrerPolicy=t),typeof o=="string"&&(a.crossOrigin=o),()=>{a.removeEventListener("load",u),a.removeEventListener("error",c)}},[a,o,t]),i}var cC=Hk,dC=zk,fC=Wk;var Sn=R(N()),fj=K("relative flex shrink-0 overflow-hidden",{variants:{size:{default:"h-10 w-10",xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12",xl:"h-16 w-16","2xl":"h-20 w-20"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",full:"rounded-full",none:"rounded-none"},variant:{default:"",ring:"ring-2 ring-border",ringOffset:"ring-2 ring-border ring-offset-2 ring-offset-background",border:"border-2 border-border"}},defaultVariants:{size:"default",radius:"default",variant:"default"}}),pC=al.forwardRef(({className:e,size:t,radius:o,variant:r,...n},a)=>(0,Sn.jsx)(cC,{ref:a,className:P("moonui-theme",fj({size:t,radius:o,variant:r}),e),...n}));pC.displayName=cC.displayName;var jk=al.forwardRef(({className:e,...t},o)=>(0,Sn.jsx)(dC,{ref:o,className:P("moonui-theme","aspect-square h-full w-full",e),...t}));jk.displayName=dC.displayName;var mC=al.forwardRef(({className:e,...t},o)=>(0,Sn.jsx)(fC,{ref:o,className:P("flex h-full w-full items-center justify-center bg-muted",e),...t}));mC.displayName=fC.displayName;var qk=al.forwardRef(({className:e,max:t,children:o,overlapOffset:r=-8,...n},a)=>{let i=al.Children.toArray(o),s=t?i.slice(0,t):i,l=t?Math.max(0,i.length-t):0;return(0,Sn.jsx)("div",{ref:a,className:P("moonui-theme","flex items-center",e),...n,children:(0,Sn.jsxs)("div",{className:"flex",children:[s.map((u,c)=>(0,Sn.jsx)("div",{className:"relative",style:{marginLeft:c===0?0:`${r}px`,zIndex:s.length-c},children:u},c)),l>0&&(0,Sn.jsx)("div",{className:"relative z-0",style:{marginLeft:`${r}px`},children:(0,Sn.jsx)(pC,{variant:"border",children:(0,Sn.jsxs)(mC,{children:["+",l]})})})]})})});qk.displayName="AvatarGroup";var $k=R(M());var xo=R(N()),Kk=K(["inline-flex items-center justify-center gap-1.5","font-medium transition-colors duration-200","border focus:outline-none","focus-visible:ring-2 focus-visible:ring-offset-1","mr-2 mb-2 last:mr-0"],{variants:{variant:{primary:["border-transparent bg-primary text-primary-foreground","hover:bg-primary/90","focus-visible:ring-primary/30 dark:focus-visible:ring-primary/40","dark:bg-primary/90 dark:shadow-inner dark:shadow-primary/10"],secondary:["border-transparent bg-secondary text-secondary-foreground","hover:bg-gray-200 dark:hover:bg-gray-600","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],outline:["border-gray-200 dark:border-gray-600","bg-transparent text-foreground","hover:border-gray-300 dark:hover:border-gray-500","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm"],destructive:["border-transparent bg-error text-white","hover:bg-error/90 dark:hover:bg-error/80","focus-visible:ring-error/30 dark:focus-visible:ring-error/25","dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10"],success:["border-transparent bg-success text-success-foreground","hover:bg-success/90 dark:hover:bg-success/80","focus-visible:ring-success/30 dark:focus-visible:ring-success/25","dark:bg-success/90 dark:text-success-foreground dark:shadow-inner dark:shadow-success/10"],warning:["border-transparent bg-warning text-warning-foreground","hover:bg-warning/90 dark:hover:bg-warning/80","focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25","dark:bg-warning/90 dark:text-warning-foreground dark:shadow-inner dark:shadow-warning/10"],ghost:["border border-gray-200 bg-gray-50/50 text-gray-700","hover:bg-gray-100 dark:hover:bg-gray-800/60","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300","transition-all duration-200"],pro:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"],admin:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"]},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-3 text-sm",lg:"h-8 px-4 text-base"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",none:"rounded-none"}},defaultVariants:{variant:"primary",size:"md",radius:"default"}}),Zo=$k.forwardRef(({className:e,variant:t,size:o,radius:r,withDot:n,dotColor:a,removable:i,onRemove:s,removeLabel:l,leftIcon:u,rightIcon:c,noAutoSpacing:d,children:f,...p},g)=>{let m=u,x=f;return t==="pro"&&(m=u||(0,xo.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:[(0,xo.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,xo.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,xo.jsx)("path",{d:"M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z",fill:"currentColor"})]}),x=f||"Pro"),t==="admin"&&(m=u||(0,xo.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:(0,xo.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",fill:"currentColor"})}),x=f||"Admin Pro"),(0,xo.jsxs)("div",{ref:g,className:P("moonui-theme",Kk({variant:t,size:o,radius:r}),d&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...p,children:[n&&(0,xo.jsx)("span",{className:P("h-2 w-2 rounded-full",a||(t==="destructive"||t==="success"||t==="warning"?"bg-white":t==="secondary"?"bg-secondary-foreground":t==="outline"||t==="ghost"?"bg-foreground":t==="pro"||t==="admin"?"bg-white":"bg-primary-foreground")),"aria-hidden":"true"}),m&&(0,xo.jsx)("span",{className:"inline-flex shrink-0 items-center",children:m}),(0,xo.jsx)("span",{className:"inline-flex items-center",children:x}),c&&(0,xo.jsx)("span",{className:"inline-flex shrink-0 items-center",children:c}),i&&s&&(0,xo.jsx)("button",{type:"button",className:"ml-1 -mr-1 h-3.5 w-3.5 rounded-full inline-flex items-center justify-center hover:bg-black/10 dark:hover:bg-white/10",onClick:h=>{h.stopPropagation(),s()},"aria-label":l||(qf(x)?`Remove ${qf(x)}`:"Remove badge"),children:(0,xo.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"opacity-70","aria-hidden":"true",children:(0,xo.jsx)("path",{d:"M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});Zo.displayName="Badge";var aa=R(M());var Oo=R(N()),pj=K("flex items-center gap-1.5 text-sm",{variants:{variant:{default:"text-foreground transition-colors",muted:"text-muted-foreground transition-colors",ghost:"text-foreground/60 transition-colors"},size:{default:"text-sm",sm:"text-xs",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),Xk=aa.forwardRef(({className:e,variant:t,size:o,...r},n)=>(0,Oo.jsx)("nav",{ref:n,className:P("moonui-theme",pj({variant:t,size:o}),e),"aria-label":"breadcrumb",...r}));Xk.displayName="Breadcrumb";var Yk=aa.forwardRef(({className:e,collapsed:t,collapsedWidth:o=3,...r},n)=>{let a=aa.Children.toArray(r.children).filter(Boolean),i=a.length;if(t&&i>o){let s=a[0],l=a.slice(-2);return(0,Oo.jsxs)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r,children:[s,(0,Oo.jsx)(gC,{}),l]})}return(0,Oo.jsx)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r})});Yk.displayName="BreadcrumbList";var Qk=aa.forwardRef(({className:e,isCurrent:t,href:o,asChild:r=!1,...n},a)=>{let i=r?aa.Fragment:o?"a":"span",s=r?{}:o?{href:o}:{};return(0,Oo.jsx)("li",{ref:a,className:P("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...n,children:(0,Oo.jsx)(i,{className:P("transition-colors duration-200 hover:text-foreground",t?"font-medium text-foreground":"text-muted-foreground hover:text-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30"),...s,children:n.children})})});Qk.displayName="BreadcrumbItem";var Zk=({children:e,className:t,...o})=>(0,Oo.jsx)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","text-muted-foreground opacity-70",t),...o,children:e||(0,Oo.jsx)(No,{className:"h-3.5 w-3.5"})});Zk.displayName="BreadcrumbSeparator";var gC=({className:e,...t})=>(0,Oo.jsxs)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,Oo.jsx)(na,{className:"h-4 w-4"}),(0,Oo.jsx)("span",{className:"sr-only",children:"More pages"})]});gC.displayName="BreadcrumbEllipsis";var Jk=aa.forwardRef(({className:e,href:t,...o},r)=>(0,Oo.jsx)("a",{ref:r,href:t,className:P("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...o}));Jk.displayName="BreadcrumbLink";var eM=aa.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)("span",{ref:o,className:P("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));eM.displayName="BreadcrumbPage";var tM=R(M());var Ch=R(N()),wh=K(["inline-flex items-center justify-center gap-2 whitespace-nowrap","font-medium relative","transition-all duration-200 ease-out","transform active:scale-[0.98]","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none disabled:transform-none"],{variants:{variant:{primary:["bg-primary text-primary-foreground","dark:bg-primary dark:text-primary-foreground","hover:bg-primary/90 dark:hover:bg-primary/90","active:bg-primary/80 dark:active:bg-primary/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],secondary:["bg-gray-100 text-gray-900","dark:bg-gray-800 dark:text-gray-100","hover:bg-gray-200 dark:hover:bg-gray-700","active:bg-gray-300 dark:active:bg-gray-600","border border-input","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","shadow-sm hover:shadow-md"],outline:["bg-background text-foreground","dark:bg-background dark:text-foreground","border border-input dark:border-input","hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground","active:bg-accent/80 dark:active:bg-accent/80","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],ghost:["text-gray-700","dark:text-gray-300","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100","active:bg-gray-200 dark:active:bg-gray-700","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],destructive:["bg-destructive text-destructive-foreground","dark:bg-destructive dark:text-destructive-foreground","hover:bg-destructive/90 dark:hover:bg-destructive/90","active:bg-destructive/80 dark:active:bg-destructive/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],success:["bg-success text-success-foreground","dark:bg-success dark:text-success-foreground","hover:bg-success/90 dark:hover:bg-success/90","active:bg-success/80 dark:active:bg-success/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],link:["text-primary bg-transparent","underline-offset-4 hover:underline","hover:text-primary/80 active:text-primary/70","p-0 h-auto","transition-colors duration-200"],gradient:["bg-gradient-to-r from-purple-500 to-pink-500 text-white","hover:from-purple-600 hover:to-pink-600","active:from-purple-700 active:to-pink-700","shadow-xl shadow-purple-500/40","hover:shadow-2xl hover:shadow-purple-500/50","focus-visible:ring-purple-500/50","transition-all duration-300"],glow:["bg-blue-500 text-white","shadow-[0_0_30px_rgba(59,130,246,0.5)]","hover:shadow-[0_0_40px_rgba(59,130,246,0.7)]","active:shadow-[0_0_20px_rgba(59,130,246,0.4)]","hover:bg-blue-600","focus-visible:ring-blue-500/50","transition-all duration-300"],soft:["bg-primary/10 text-primary","hover:bg-primary/20","active:bg-primary/30","focus-visible:ring-primary/50","dark:bg-primary/20 dark:text-primary-foreground","dark:hover:bg-primary/30 dark:active:bg-primary/40","transition-colors duration-200"],glass:["bg-white/10 backdrop-blur-md text-foreground","border border-white/20","hover:bg-white/20 hover:border-white/30","active:bg-white/30","shadow-lg","focus-visible:ring-white/50","dark:bg-gray-800/10 dark:border-gray-700/20","dark:hover:bg-gray-800/20 dark:hover:border-gray-700/30","transition-all duration-200"],neon:["bg-transparent text-green-400","border-2 border-green-400","hover:bg-green-400 hover:text-gray-900","hover:shadow-[0_0_30px_rgba(74,222,128,0.6)]","active:shadow-[0_0_15px_rgba(74,222,128,0.4)]","focus-visible:ring-green-400/50","transition-all duration-300"]},size:{xs:"h-7 px-2.5 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-base",lg:"h-12 px-6 text-lg",xl:"h-14 px-8 text-xl",icon:"h-10 w-10 p-2","icon-sm":"h-8 w-8 p-1.5","icon-lg":"h-12 w-12 p-3"},rounded:{default:"rounded-xl",full:"rounded-full",none:"rounded-none",sm:"rounded-lg",lg:"rounded-2xl"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"primary",size:"md",rounded:"default",fullWidth:!1}}),De=tM.forwardRef(({className:e,variant:t,size:o,rounded:r,fullWidth:n,asChild:a=!1,loading:i=!1,leftIcon:s,rightIcon:l,children:u,disabled:c,...d},f)=>(0,Ch.jsxs)("button",{className:P("moonui-theme",wh({variant:t,size:o,rounded:r,fullWidth:n,className:e})),ref:f,disabled:c||i,"aria-busy":i||void 0,"data-loading":i?"":void 0,...d,children:[i&&(0,Ch.jsx)(Vt,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,u,!i&&l]}));De.displayName="Button";var Ll=R(M());var Ep=R(N(),1),ua=R(M(),1);var oM=R(M(),1),Xu=(0,oM.createContext)({});var rM=R(M(),1);function ia(e){let t=(0,rM.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Sh=R(M(),1);var Yu=typeof window<"u";var Qu=Yu?Sh.useLayoutEffect:Sh.useEffect;var XC=R(N(),1),uE=R(M(),1),kp=R(M(),1);var nM=R(M(),1),qi=(0,nM.createContext)(null);var sE=R(N(),1);function il(e,t){e.indexOf(t)===-1&&e.push(t)}function bn(e,t){let o=e.indexOf(t);o>-1&&e.splice(o,1)}var $t=(e,t,o)=>o>t?t:o<e?e:o;var Oa=()=>{},io=()=>{};var yo={};var Kf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Xf(e){return typeof e=="object"&&e!==null}var Yf=e=>/^0[^.\s]+$/u.test(e);function sl(e){let t;return()=>(t===void 0&&(t=e()),t)}var mt=e=>e;var mj=(e,t)=>o=>t(e(o)),Rn=(...e)=>e.reduce(mj);var Br=(e,t,o)=>{let r=t-e;return r===0?1:(o-e)/r};var Fa=class{constructor(){this.subscriptions=[]}add(t){return il(this.subscriptions,t),()=>bn(this.subscriptions,t)}notify(t,o,r){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](t,o,r);else for(let a=0;a<n;a++){let i=this.subscriptions[a];i&&i(t,o,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var bt=e=>e*1e3,Bt=e=>e/1e3;function Qf(e,t){return t?e*(1e3/t):0}var aM=(e,t,o)=>{let r=t-e;return((o-e)%r+r)%r+e};var iM=(e,t,o)=>(((1-3*o+3*t)*e+(3*o-6*t))*e+3*t)*e,gj=1e-7,hj=12;function vj(e,t,o,r,n){let a,i,s=0;do i=t+(o-t)/2,a=iM(i,r,n)-e,a>0?o=i:t=i;while(Math.abs(a)>gj&&++s<hj);return i}function $i(e,t,o,r){if(e===t&&o===r)return mt;let n=a=>vj(a,0,1,e,o);return a=>a===0||a===1?a:iM(n(a),t,r)}var bh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Rh=e=>t=>1-e(1-t);var Ih=$i(.33,1.53,.69,.99),Zu=Rh(Ih),Zf=bh(Zu);var Jf=e=>(e*=2)<1?.5*Zu(e):.5*(2-Math.pow(2,-10*(e-1)));var ep=e=>1-Math.sin(Math.acos(e)),tp=Rh(ep),op=bh(ep);var hC=$i(.42,0,1,1),vC=$i(0,0,.58,1),rp=$i(.42,0,.58,1);var np=e=>Array.isArray(e)&&typeof e[0]!="number";function ap(e,t){return np(e)?e[aM(0,e.length,t)]:e}var ip=e=>Array.isArray(e)&&typeof e[0]=="number";var sM={linear:mt,easeIn:hC,easeInOut:rp,easeOut:vC,circIn:ep,circInOut:op,circOut:tp,backIn:Zu,backInOut:Zf,backOut:Ih,anticipate:Jf},xj=e=>typeof e=="string",Ph=e=>{if(ip(e)){io(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,o,r,n]=e;return $i(t,o,r,n)}else if(xj(e))return io(sM[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),sM[e];return e};var sp=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Jo={value:null,addProjectionMetrics:null};function lM(e,t){let o=new Set,r=new Set,n=!1,a=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(d){i.has(d)&&(c.schedule(d),e()),l++,d(s)}let c={schedule:(d,f=!1,p=!1)=>{let m=p&&n?o:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(s=d,n){a=!0;return}n=!0,[o,r]=[r,o],o.forEach(u),t&&Jo.value&&Jo.value.frameloop[t].push(l),l=0,o.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}var yj=40;function Lh(e,t){let o=!1,r=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>o=!0,i=sp.reduce((y,w)=>(y[w]=lM(a,t?w:void 0),y),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:g}=i,m=()=>{let y=yo.useManualTiming?n.timestamp:performance.now();o=!1,yo.useManualTiming||(n.delta=r?1e3/60:Math.max(Math.min(y-n.timestamp,yj),1)),n.timestamp=y,n.isProcessing=!0,s.process(n),l.process(n),u.process(n),c.process(n),d.process(n),f.process(n),p.process(n),g.process(n),n.isProcessing=!1,o&&t&&(r=!1,e(m))},x=()=>{o=!0,r=!0,n.isProcessing||e(m)};return{schedule:sp.reduce((y,w)=>{let C=i[w];return y[w]=(b,S=!1,I=!1)=>(o||x(),C.schedule(b,S,I)),y},{}),cancel:y=>{for(let w=0;w<sp.length;w++)i[sp[w]].cancel(y)},state:n,steps:i}}var{schedule:Le,cancel:wo,state:xt,steps:lp}=Lh(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0);var Th;function wj(){Th=void 0}var yt={now:()=>(Th===void 0&&yt.set(xt.isProcessing||yo.useManualTiming?xt.timestamp:performance.now()),Th),set:e=>{Th=e,queueMicrotask(wj)}};var In={layout:0,mainThread:0,waapi:0};var uM=e=>t=>typeof t=="string"&&t.startsWith(e),ll=uM("--"),Cj=uM("var(--"),ul=e=>Cj(e)?Sj.test(e.split("/*")[0].trim()):!1,Sj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var sa={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},_a={...sa,transform:e=>$t(0,1,e)},up={...sa,default:1};var Ki=e=>Math.round(e*1e5)/1e5;var Ju=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cM(e){return e==null}var dM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var ec=(e,t)=>o=>!!(typeof o=="string"&&dM.test(o)&&o.startsWith(e)||t&&!cM(o)&&Object.prototype.hasOwnProperty.call(o,t)),kh=(e,t,o)=>r=>{if(typeof r!="string")return r;let[n,a,i,s]=r.match(Ju);return{[e]:parseFloat(n),[t]:parseFloat(a),[o]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var bj=e=>$t(0,255,e),xC={...sa,transform:e=>Math.round(bj(e))},la={test:ec("rgb","red"),parse:kh("red","green","blue"),transform:({red:e,green:t,blue:o,alpha:r=1})=>"rgba("+xC.transform(e)+", "+xC.transform(t)+", "+xC.transform(o)+", "+Ki(_a.transform(r))+")"};function Rj(e){let t="",o="",r="",n="";return e.length>5?(t=e.substring(1,3),o=e.substring(3,5),r=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),o=e.substring(2,3),r=e.substring(3,4),n=e.substring(4,5),t+=t,o+=o,r+=r,n+=n),{red:parseInt(t,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:n?parseInt(n,16)/255:1}}var cp={test:ec("#"),parse:Rj,transform:la.transform};var dp=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pn=dp("deg"),Co=dp("%"),ue=dp("px"),yC=dp("vh"),wC=dp("vw"),Mh=(()=>({...Co,parse:e=>Co.parse(e)/100,transform:e=>Co.transform(e*100)}))();var Xi={test:ec("hsl","hue"),parse:kh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:o,alpha:r=1})=>"hsla("+Math.round(e)+", "+Co.transform(Ki(t))+", "+Co.transform(Ki(o))+", "+Ki(_a.transform(r))+")"};var lt={test:e=>la.test(e)||cp.test(e)||Xi.test(e),parse:e=>la.test(e)?la.parse(e):Xi.test(e)?Xi.parse(e):cp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?la.transform(e):Xi.transform(e),getAnimatableNone:e=>{let t=lt.parse(e);return t.alpha=0,lt.transform(t)}};var fM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ij(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ju)?.length||0)+(e.match(fM)?.length||0)>0}var mM="number",gM="color",Pj="var",Lj="var(",pM="${}",Tj=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Yi(e){let t=e.toString(),o=[],r={color:[],number:[],var:[]},n=[],a=0,s=t.replace(Tj,l=>(lt.test(l)?(r.color.push(a),n.push(gM),o.push(lt.parse(l))):l.startsWith(Lj)?(r.var.push(a),n.push(Pj),o.push(l)):(r.number.push(a),n.push(mM),o.push(parseFloat(l))),++a,pM)).split(pM);return{values:o,split:s,indexes:r,types:n}}function hM(e){return Yi(e).values}function vM(e){let{split:t,types:o}=Yi(e),r=t.length;return n=>{let a="";for(let i=0;i<r;i++)if(a+=t[i],n[i]!==void 0){let s=o[i];s===mM?a+=Ki(n[i]):s===gM?a+=lt.transform(n[i]):a+=n[i]}return a}}var kj=e=>typeof e=="number"?0:lt.test(e)?lt.getAnimatableNone(e):e;function Mj(e){let t=hM(e);return vM(e)(t.map(kj))}var So={test:Ij,parse:hM,createTransformer:vM,getAnimatableNone:Mj};function CC(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*6*o:o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function xM({hue:e,saturation:t,lightness:o,alpha:r}){e/=360,t/=100,o/=100;let n=0,a=0,i=0;if(!t)n=a=i=o;else{let s=o<.5?o*(1+t):o+t-o*t,l=2*o-s;n=CC(l,s,e+1/3),a=CC(l,s,e),i=CC(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:r}}function tc(e,t){return o=>o>0?t:e}var ke=(e,t,o)=>e+(t-e)*o;var SC=(e,t,o)=>{let r=e*e,n=o*(t*t-r)+r;return n<0?0:Math.sqrt(n)},Ej=[cp,la,Xi],Aj=e=>Ej.find(t=>t.test(e));function yM(e){let t=Aj(e);if(Oa(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let o=t.parse(e);return t===Xi&&(o=xM(o)),o}var bC=(e,t)=>{let o=yM(e),r=yM(t);if(!o||!r)return tc(e,t);let n={...o};return a=>(n.red=SC(o.red,r.red,a),n.green=SC(o.green,r.green,a),n.blue=SC(o.blue,r.blue,a),n.alpha=ke(o.alpha,r.alpha,a),la.transform(n))};var Eh=new Set(["none","hidden"]);function wM(e,t){return Eh.has(e)?o=>o<=0?e:t:o=>o>=1?t:e}function Dj(e,t){return o=>ke(e,t,o)}function Ah(e){return typeof e=="number"?Dj:typeof e=="string"?ul(e)?tc:lt.test(e)?bC:Fj:Array.isArray(e)?CM:typeof e=="object"?lt.test(e)?bC:Nj:tc}function CM(e,t){let o=[...e],r=o.length,n=e.map((a,i)=>Ah(a)(a,t[i]));return a=>{for(let i=0;i<r;i++)o[i]=n[i](a);return o}}function Nj(e,t){let o={...e,...t},r={};for(let n in o)e[n]!==void 0&&t[n]!==void 0&&(r[n]=Ah(e[n])(e[n],t[n]));return n=>{for(let a in r)o[a]=r[a](n);return o}}function Oj(e,t){let o=[],r={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let a=t.types[n],i=e.indexes[a][r[a]],s=e.values[i]??0;o[n]=s,r[a]++}return o}var Fj=(e,t)=>{let o=So.createTransformer(t),r=Yi(e),n=Yi(t);return r.indexes.var.length===n.indexes.var.length&&r.indexes.color.length===n.indexes.color.length&&r.indexes.number.length>=n.indexes.number.length?Eh.has(e)&&!n.values.length||Eh.has(t)&&!r.values.length?wM(e,t):Rn(CM(Oj(r,n),n.values),o):(Oa(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),tc(e,t))};function Dh(e,t,o){return typeof e=="number"&&typeof t=="number"&&typeof o=="number"?ke(e,t,o):Ah(e)(e,t)}var SM=e=>{let t=({timestamp:o})=>e(o);return{start:(o=!0)=>Le.update(t,o),stop:()=>wo(t),now:()=>xt.isProcessing?xt.timestamp:yt.now()}};var Nh=(e,t,o=10)=>{let r="",n=Math.max(Math.round(t/o),2);for(let a=0;a<n;a++)r+=Math.round(e(a/(n-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function oc(e){let t=0,o=50,r=e.next(t);for(;!r.done&&t<2e4;)t+=o,r=e.next(t);return t>=2e4?1/0:t}function fp(e,t=100,o){let r=o({...e,keyframes:[0,t]}),n=Math.min(oc(r),2e4);return{type:"keyframes",ease:a=>r.next(n*a).value/t,duration:Bt(n)}}var _j=5;function Oh(e,t,o){let r=Math.max(t-_j,0);return Qf(o-e(r),t-r)}var nt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var IC=.001;function bM({duration:e=nt.duration,bounce:t=nt.bounce,velocity:o=nt.velocity,mass:r=nt.mass}){let n,a;Oa(e<=bt(nt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=$t(nt.minDamping,nt.maxDamping,i),e=$t(nt.minDuration,nt.maxDuration,Bt(e)),i<1?(n=u=>{let c=u*i,d=c*e,f=c-o,p=Fh(u,i),g=Math.exp(-d);return IC-f/p*g},a=u=>{let d=u*i*e,f=d*o+o,p=Math.pow(i,2)*Math.pow(u,2)*e,g=Math.exp(-d),m=Fh(Math.pow(u,2),i);return(-n(u)+IC>0?-1:1)*((f-p)*g)/m}):(n=u=>{let c=Math.exp(-u*e),d=(u-o)*e+1;return-IC+c*d},a=u=>{let c=Math.exp(-u*e),d=(o-u)*(e*e);return c*d});let s=5/e,l=Bj(n,a,s);if(e=bt(e),isNaN(l))return{stiffness:nt.stiffness,damping:nt.damping,duration:e};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}var Vj=12;function Bj(e,t,o){let r=o;for(let n=1;n<Vj;n++)r=r-e(r)/t(r);return r}function Fh(e,t){return e*Math.sqrt(1-t*t)}var Hj=["duration","bounce"],Uj=["stiffness","damping","mass"];function RM(e,t){return t.some(o=>e[o]!==void 0)}function zj(e){let t={velocity:nt.velocity,stiffness:nt.stiffness,damping:nt.damping,mass:nt.mass,isResolvedFromDuration:!1,...e};if(!RM(e,Uj)&&RM(e,Hj))if(e.visualDuration){let o=e.visualDuration,r=2*Math.PI/(o*1.2),n=r*r,a=2*$t(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:nt.mass,stiffness:n,damping:a}}else{let o=bM(e);t={...t,...o,mass:nt.mass},t.isResolvedFromDuration=!0}return t}function Va(e=nt.visualDuration,t=nt.bounce){let o=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:r,restDelta:n}=o,a=o.keyframes[0],i=o.keyframes[o.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=zj({...o,velocity:-Bt(o.velocity||0)}),g=f||0,m=u/(2*Math.sqrt(l*c)),x=i-a,h=Bt(Math.sqrt(l/c)),v=Math.abs(x)<5;r||(r=v?nt.restSpeed.granular:nt.restSpeed.default),n||(n=v?nt.restDelta.granular:nt.restDelta.default);let y;if(m<1){let C=Fh(h,m);y=b=>{let S=Math.exp(-m*h*b);return i-S*((g+m*h*x)/C*Math.sin(C*b)+x*Math.cos(C*b))}}else if(m===1)y=C=>i-Math.exp(-h*C)*(x+(g+h*x)*C);else{let C=h*Math.sqrt(m*m-1);y=b=>{let S=Math.exp(-m*h*b),I=Math.min(C*b,300);return i-S*((g+m*h*x)*Math.sinh(I)+C*x*Math.cosh(I))/C}}let w={calculatedDuration:p&&d||null,next:C=>{let b=y(C);if(p)s.done=C>=d;else{let S=C===0?g:0;m<1&&(S=C===0?bt(g):Oh(y,C,b));let I=Math.abs(S)<=r,L=Math.abs(i-b)<=n;s.done=I&&L}return s.value=s.done?i:b,s},toString:()=>{let C=Math.min(oc(w),2e4),b=Nh(S=>w.next(C*S).value,C,30);return C+"ms "+b},toTransition:()=>{}};return w}Va.applyToOptions=e=>{let t=fp(e,100,Va);return e.ease=t.ease,e.duration=bt(t.duration),e.type="keyframes",e};function pp({keyframes:e,velocity:t=0,power:o=.8,timeConstant:r=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],f={done:!1,value:d},p=I=>s!==void 0&&I<s||l!==void 0&&I>l,g=I=>s===void 0?l:l===void 0||Math.abs(s-I)<Math.abs(l-I)?s:l,m=o*t,x=d+m,h=i===void 0?x:i(x);h!==x&&(m=h-d);let v=I=>-m*Math.exp(-I/r),y=I=>h+v(I),w=I=>{let L=v(I),T=y(I);f.done=Math.abs(L)<=u,f.value=f.done?h:T},C,b,S=I=>{p(f.value)&&(C=I,b=Va({keyframes:[f.value,g(f.value)],velocity:Oh(y,I,f.value),damping:n,stiffness:a,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:I=>{let L=!1;return!b&&C===void 0&&(L=!0,w(I),S(I)),C!==void 0&&I>=C?b.next(I-C):(!L&&w(I),f)}}}function Gj(e,t,o){let r=[],n=o||yo.mix||Dh,a=e.length-1;for(let i=0;i<a;i++){let s=n(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||mt:t;s=Rn(l,s)}r.push(s)}return r}function _h(e,t,{clamp:o=!0,ease:r,mixer:n}={}){let a=e.length;if(io(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Gj(t,r,n),l=s.length,u=c=>{if(i&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);let f=Br(e[d],e[d+1],c);return s[d](f)};return o?c=>u($t(e[0],e[a-1],c)):u}function mp(e,t){let o=e[e.length-1];for(let r=1;r<=t;r++){let n=Br(0,t,r);e.push(ke(o,1,n))}}function gp(e){let t=[0];return mp(t,e.length-1),t}function IM(e,t){return e.map(o=>o*t)}function Wj(e,t){return e.map(()=>t||rp).splice(0,e.length-1)}function cl({duration:e=300,keyframes:t,times:o,ease:r="easeInOut"}){let n=np(r)?r.map(Ph):Ph(r),a={done:!1,value:t[0]},i=IM(o&&o.length===t.length?o:gp(t),e),s=_h(i,t,{ease:Array.isArray(n)?n:Wj(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var jj=e=>e!==null;function rc(e,{repeat:t,repeatType:o="loop"},r,n=1){let a=e.filter(jj),s=n<0||t&&o!=="loop"&&t%2===1?0:a.length-1;return!s||r===void 0?a[s]:r}var qj={decay:pp,inertia:pp,tween:cl,keyframes:cl,spring:Va};function Vh(e){typeof e.type=="string"&&(e.type=qj[e.type])}var Qi=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,o){return this.finished.then(t,o)}};var $j=e=>e/100,Ba=class extends Qi{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:o}=this.options;o&&o.updatedAt!==yt.now()&&this.tick(yt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},In.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;Vh(t);let{type:o=cl,repeat:r=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=o||cl;l!==cl&&typeof s[0]!="number"&&(this.mixKeyframes=Rn($j,Dh(s[0],s[1])),s=[0,100]);let u=l({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=oc(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=u}updateTime(t){let o=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=o}tick(t,o=!1){let{generator:r,totalDuration:n,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:p,type:g,onUpdate:m,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),o?this.currentTime=t:this.updateTime(t);let h=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?h<0:h>n;this.currentTime=Math.max(h,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let y=this.currentTime,w=r;if(d){let I=Math.min(this.currentTime,n)/s,L=Math.floor(I),T=I%1;!T&&I>=1&&(T=1),T===1&&L--,L=Math.min(L,d+1),!!(L%2)&&(f==="reverse"?(T=1-T,p&&(T-=p/s)):f==="mirror"&&(w=i)),y=$t(0,1,T)*s}let C=v?{done:!1,value:c[0]}:w.next(y);a&&(C.value=a(C.value));let{done:b}=C;!v&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return S&&g!==pp&&(C.value=rc(c,this.options,x,this.speed)),m&&m(C.value),S&&this.finish(),C}then(t,o){return this.finished.then(t,o)}get duration(){return Bt(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Bt(t)}get time(){return Bt(this.currentTime)}set time(t){t=bt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(yt.now());let o=this.playbackSpeed!==t;this.playbackSpeed=t,o&&(this.time=Bt(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=SM,startTime:o}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),this.options.onPlay?.();let r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=o??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(yt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,In.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function PM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var dl=e=>e*180/Math.PI,PC=e=>{let t=dl(Math.atan2(e[1],e[0]));return LC(t)},Kj={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:PC,rotateZ:PC,skewX:e=>dl(Math.atan(e[1])),skewY:e=>dl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},LC=e=>(e=e%360,e<0&&(e+=360),e),LM=PC,TM=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),kM=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Xj={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:TM,scaleY:kM,scale:e=>(TM(e)+kM(e))/2,rotateX:e=>LC(dl(Math.atan2(e[6],e[5]))),rotateY:e=>LC(dl(Math.atan2(-e[2],e[0]))),rotateZ:LM,rotate:LM,skewX:e=>dl(Math.atan(e[4])),skewY:e=>dl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function hp(e){return e.includes("scale")?1:0}function vp(e,t){if(!e||e==="none")return hp(t);let o=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,n;if(o)r=Xj,n=o;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Kj,n=s}if(!n)return hp(t);let a=r[t],i=n[1].split(",").map(Yj);return typeof a=="function"?a(i):i[a]}var TC=(e,t)=>{let{transform:o="none"}=getComputedStyle(e);return vp(o,t)};function Yj(e){return parseFloat(e.trim())}var Ln=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vr=(()=>new Set(Ln))();var kC=e=>e===sa||e===ue,Qj=new Set(["x","y","z"]),Zj=Ln.filter(e=>!Qj.has(e));function MM(e){let t=[];return Zj.forEach(o=>{let r=e.getValue(o);r!==void 0&&(t.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),t}var Zi={width:({x:e},{paddingLeft:t="0",paddingRight:o="0"})=>e.max-e.min-parseFloat(t)-parseFloat(o),height:({y:e},{paddingTop:t="0",paddingBottom:o="0"})=>e.max-e.min-parseFloat(t)-parseFloat(o),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>vp(t,"x"),y:(e,{transform:t})=>vp(t,"y")};Zi.translateX=Zi.x;Zi.translateY=Zi.y;var fl=new Set,MC=!1,EC=!1,AC=!1;function EM(){if(EC){let e=Array.from(fl).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),o=new Map;t.forEach(r=>{let n=MM(r);n.length&&(o.set(r,n),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();let n=o.get(r);n&&n.forEach(([a,i])=>{r.getValue(a)?.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}EC=!1,MC=!1,fl.forEach(e=>e.complete(AC)),fl.clear()}function AM(){fl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(EC=!0)})}function DC(){AC=!0,AM(),EM(),AC=!1}var Ha=class{constructor(t,o,r,n,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=o,this.name=r,this.motionValue=n,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(fl.add(this),MC||(MC=!0,Le.read(AM),Le.resolveKeyframes(EM))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:o,element:r,motionValue:n}=this;if(t[0]===null){let a=n?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&o){let s=r.readValue(o,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),n&&a===void 0&&n.set(t[0])}PM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),fl.delete(this)}cancel(){this.state==="scheduled"&&(fl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var DM=e=>e.startsWith("--");function NM(e,t,o){DM(t)?e.style.setProperty(t,o):e.style[t]=o}var OM=sl(()=>window.ScrollTimeline!==void 0);var FM={};function _M(e,t){let o=sl(e);return()=>FM[t]??o()}var Bh=_M(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var pl=([e,t,o,r])=>`cubic-bezier(${e}, ${t}, ${o}, ${r})`;var NC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pl([0,.65,.55,1]),circOut:pl([.55,0,1,.45]),backIn:pl([.31,.01,.66,-.59]),backOut:pl([.33,1.53,.69,.99])};function OC(e,t){if(e)return typeof e=="function"?Bh()?Nh(e,t):"ease-out":ip(e)?pl(e):Array.isArray(e)?e.map(o=>OC(o,t)||NC.easeOut):NC[e]}function VM(e,t,o,{delay:r=0,duration:n=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){let c={[t]:o};l&&(c.offset=l);let d=OC(s,n);Array.isArray(d)&&(c.easing=d),Jo.value&&In.waapi++;let f={delay:r,duration:n,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};u&&(f.pseudoElement=u);let p=e.animate(c,f);return Jo.value&&p.finished.finally(()=>{In.waapi--}),p}function ml(e){return typeof e=="function"&&"applyToOptions"in e}function BM({type:e,...t}){return ml(e)&&Bh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Hh=class extends Qi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:o,name:r,keyframes:n,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,io(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=BM(t);this.animation=VM(o,r,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=rc(n,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):NM(o,r,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return Bt(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Bt(t)}get time(){return Bt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=bt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&OM()?(this.animation.timeline=t,mt):o(this)}};var HM={anticipate:Jf,backInOut:Zf,circInOut:op};function Jj(e){return e in HM}function UM(e){typeof e.ease=="string"&&Jj(e.ease)&&(e.ease=HM[e.ease])}var zM=10,Uh=class extends Hh{constructor(t){UM(t),Vh(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:o,onUpdate:r,onComplete:n,element:a,...i}=this.options;if(!o)return;if(t!==void 0){o.set(t);return}let s=new Ba({...i,autoplay:!1}),l=bt(this.finishedTime??this.time);o.setWithVelocity(s.sample(l-zM).value,s.sample(l).value,zM),s.stop()}};var FC=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(So.test(e)||e==="0")&&!e.startsWith("url("));function e6(e){let t=e[0];if(e.length===1)return!0;for(let o=0;o<e.length;o++)if(e[o]!==t)return!0}function GM(e,t,o,r){let n=e[0];if(n===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=FC(n,t),s=FC(a,t);return Oa(i===s,`You are trying to animate ${t} from "${n}" to "${a}". "${i?a:n}" is not an animatable value.`,"value-not-animatable"),!i||!s?!1:e6(e)||(o==="spring"||ml(o))&&r}function nc(e){e.duration=0,e.type="keyframes"}var t6=new Set(["opacity","clipPath","filter","transform"]),o6=sl(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function WM(e){let{motionValue:t,name:o,repeatDelay:r,repeatType:n,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return o6()&&o&&t6.has(o)&&(o!=="transform"||!u)&&!l&&!r&&n!=="mirror"&&a!==0&&i!=="inertia"}var r6=40,xp=class extends Qi{constructor({autoplay:t=!0,delay:o=0,type:r="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:i="loop",keyframes:s,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=yt.now();let f={autoplay:t,delay:o,type:r,repeat:n,repeatDelay:a,repeatType:i,name:l,motionValue:u,element:c,...d},p=c?.KeyframeResolver||Ha;this.keyframeResolver=new p(s,(g,m,x)=>this.onKeyframesResolved(g,m,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,o,r,n){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=yt.now(),GM(t,a,i,s)||((yo.instantAnimations||!l)&&c?.(rc(t,r,o)),t[0]=t[t.length-1],nc(r),r.repeat=0);let f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>r6?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:t},p=!u&&WM(f)?new Uh({...f,element:f.motionValue.owner.current}):new Ba(f);p.finished.then(()=>this.notifyFinished()).catch(mt),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,o){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),DC()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var zh=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,o){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=o}attachTimeline(t){let o=this.animations.map(r=>r.attachTimeline(t));return()=>{o.forEach((r,n)=>{r&&r(),this.animations[n].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return jM(this.animations,"duration")}get iterationDuration(){return jM(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(o=>o[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};function jM(e,t){let o=0;for(let r=0;r<e.length;r++){let n=e[r][t];n!==null&&n>o&&(o=n)}return o}var yp=class extends zh{then(t,o){return this.finished.finally(t).then(()=>{})}};var n6=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function a6(e){let t=n6.exec(e);if(!t)return[,];let[,o,r,n]=t;return[`--${o??r}`,n]}var i6=4;function _C(e,t,o=1){io(o<=i6,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,n]=a6(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let i=a.trim();return Kf(i)?parseFloat(i):i}return ul(n)?_C(n,t,o+1):n}function gl(e,t){return e?.[t]??e?.default??e}var wp=new Set(["width","height","top","left","right","bottom",...Ln]);var qM={test:e=>e==="auto",parse:e=>e};var Gh=e=>t=>t.test(e);var VC=[sa,ue,Co,Pn,wC,yC,qM],BC=e=>VC.find(Gh(e));function $M(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Yf(e):!0}var s6=new Set(["brightness","contrast","saturate","opacity"]);function l6(e){let[t,o]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[r]=o.match(Ju)||[];if(!r)return e;let n=o.replace(r,""),a=s6.has(t)?1:0;return r!==o&&(a*=100),t+"("+a+n+")"}var u6=/\b([a-z-]*)\(.*?\)/gu,Cp={...So,getAnimatableNone:e=>{let t=e.match(u6);return t?t.map(l6).join(" "):e}};var HC={...sa,transform:Math.round};var KM={rotate:Pn,rotateX:Pn,rotateY:Pn,rotateZ:Pn,scale:up,scaleX:up,scaleY:up,scaleZ:up,skew:Pn,skewX:Pn,skewY:Pn,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:_a,originX:Mh,originY:Mh,originZ:ue};var hl={borderWidth:ue,borderTopWidth:ue,borderRightWidth:ue,borderBottomWidth:ue,borderLeftWidth:ue,borderRadius:ue,radius:ue,borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomRightRadius:ue,borderBottomLeftRadius:ue,width:ue,maxWidth:ue,height:ue,maxHeight:ue,top:ue,right:ue,bottom:ue,left:ue,padding:ue,paddingTop:ue,paddingRight:ue,paddingBottom:ue,paddingLeft:ue,margin:ue,marginTop:ue,marginRight:ue,marginBottom:ue,marginLeft:ue,backgroundPositionX:ue,backgroundPositionY:ue,...KM,zIndex:HC,fillOpacity:_a,strokeOpacity:_a,numOctaves:HC};var XM={...hl,color:lt,backgroundColor:lt,outlineColor:lt,fill:lt,stroke:lt,borderColor:lt,borderTopColor:lt,borderRightColor:lt,borderBottomColor:lt,borderLeftColor:lt,filter:Cp,WebkitFilter:Cp},Sp=e=>XM[e];function bp(e,t){let o=Sp(e);return o!==Cp&&(o=So),o.getAnimatableNone?o.getAnimatableNone(t):void 0}var c6=new Set(["auto","none","0"]);function YM(e,t,o){let r=0,n;for(;r<e.length&&!n;){let a=e[r];typeof a=="string"&&!c6.has(a)&&Yi(a).values.length&&(n=e[r]),r++}if(n&&o)for(let a of t)e[a]=bp(o,n)}var Rp=class extends Ha{constructor(t,o,r,n,a){super(t,o,r,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:o,name:r}=this;if(!o||!o.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),ul(u))){let c=_C(u,o.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!wp.has(r)||t.length!==2)return;let[n,a]=t,i=BC(n),s=BC(a);if(i!==s)if(kC(i)&&kC(s))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Zi[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:o}=this,r=[];for(let n=0;n<t.length;n++)(t[n]===null||$M(t[n]))&&r.push(n);r.length&&YM(t,r,o)}measureInitialState(){let{element:t,unresolvedKeyframes:o,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Zi[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o[0]=this.measuredOrigin;let n=o[o.length-1];n!==void 0&&t.getValue(r,n).jump(n,!1)}measureEndState(){let{element:t,name:o,unresolvedKeyframes:r}=this;if(!t||!t.current)return;let n=t.getValue(o);n&&n.jump(this.measuredOrigin,!1);let a=r.length-1,i=r[a];r[a]=Zi[o](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}};function Ip(e,t,o){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);let n=o?.[e]??r.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}var Pp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Lp(e){return Xf(e)&&"offsetHeight"in e}var QM=30,d6=e=>!isNaN(parseFloat(e)),vl={current:void 0},Wh=class{constructor(t,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{let n=yt.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=o.owner}setCurrent(t){this.current=t,this.updatedAt=yt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=d6(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,o){this.events[t]||(this.events[t]=new Fa);let r=this.events[t].add(o);return t==="change"?()=>{r(),Le.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,o){this.passiveEffect=t,this.stopPassiveEffect=o}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,o=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return vl.current&&vl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=yt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>QM)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,QM);return Qf(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(t){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=t(o),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function er(e,t){return new Wh(e,t)}var{schedule:xl,cancel:f6}=Lh(queueMicrotask,!1);var Hr={x:!1,y:!1};function jh(){return Hr.x||Hr.y}function UC(e){return e==="x"||e==="y"?Hr[e]?null:(Hr[e]=!0,()=>{Hr[e]=!1}):Hr.x||Hr.y?null:(Hr.x=Hr.y=!0,()=>{Hr.x=Hr.y=!1})}function qh(e,t){let o=Ip(e),r=new AbortController,n={passive:!0,...t,signal:r.signal};return[o,n,()=>r.abort()]}function ZM(e){return!(e.pointerType==="touch"||jh())}function zC(e,t,o={}){let[r,n,a]=qh(e,o),i=s=>{if(!ZM(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{ZM(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,n)};return r.forEach(s=>{s.addEventListener("pointerenter",i,n)}),a}var GC=(e,t)=>t?e===t?!0:GC(e,t.parentElement):!1;var yl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var p6=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function JM(e){return p6.has(e.tagName)||e.tabIndex!==-1}var ac=new WeakSet;function eE(e){return t=>{t.key==="Enter"&&e(t)}}function WC(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var tE=(e,t)=>{let o=e.currentTarget;if(!o)return;let r=eE(()=>{if(ac.has(o))return;WC(o,"down");let n=eE(()=>{WC(o,"up")}),a=()=>WC(o,"cancel");o.addEventListener("keyup",n,t),o.addEventListener("blur",a,t)});o.addEventListener("keydown",r,t),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),t)};function oE(e){return yl(e)&&!jh()}function jC(e,t,o={}){let[r,n,a]=qh(e,o),i=s=>{let l=s.currentTarget;if(!oE(s))return;ac.add(l);let u=t(l,s),c=(p,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ac.has(l)&&ac.delete(l),oE(p)&&typeof u=="function"&&u(p,{success:g})},d=p=>{c(p,l===window||l===document||o.useGlobalTarget||GC(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",d,n),window.addEventListener("pointercancel",f,n)};return r.forEach(s=>{(o.useGlobalTarget?window:s).addEventListener("pointerdown",i,n),Lp(s)&&(s.addEventListener("focus",u=>tE(u,n)),!JM(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function wl(e){return Xf(e)&&"ownerSVGElement"in e}function Tp(e){return wl(e)&&e.tagName==="svg"}function qC(...e){let t=!Array.isArray(e[0]),o=t?0:-1,r=e[0+o],n=e[1+o],a=e[2+o],i=e[3+o],s=_h(n,a,i);return t?s(r):s}var Ve=e=>!!(e&&e.getVelocity);var m6=[...VC,lt,So],$C=e=>m6.find(Gh(e));var $h=R(M(),1),Ua=R(M(),1);var rE=R(M(),1),Ji=(0,rE.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var aE=R(M(),1);function nE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function g6(...e){return t=>{let o=!1,r=e.map(n=>{let a=nE(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():nE(e[n],null)}}}}function iE(...e){return aE.useCallback(g6(...e),e)}var KC=class extends $h.Component{getSnapshotBeforeUpdate(t){let o=this.props.childRef.current;if(o&&t.isPresent&&!this.props.isPresent){let r=o.offsetParent,n=Lp(r)&&r.offsetWidth||0,a=this.props.sizeRef.current;a.height=o.offsetHeight||0,a.width=o.offsetWidth||0,a.top=o.offsetTop,a.left=o.offsetLeft,a.right=n-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function lE({children:e,isPresent:t,anchorX:o,root:r}){let n=(0,Ua.useId)(),a=(0,Ua.useRef)(null),i=(0,Ua.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,Ua.useContext)(Ji),l=iE(a,e?.ref);return(0,Ua.useInsertionEffect)(()=>{let{width:u,height:c,top:d,left:f,right:p}=i.current;if(t||!a.current||!u||!c)return;let g=o==="left"?`left: ${f}`:`right: ${p}`;a.current.dataset.motionPopId=n;let m=document.createElement("style");s&&(m.nonce=s);let x=r??document.head;return x.appendChild(m),m.sheet&&m.sheet.insertRule(`
|
|
12
12
|
[data-motion-pop-id="${n}"] {
|
|
13
13
|
position: absolute !important;
|
|
14
14
|
width: ${u}px !important;
|
|
@@ -16,8 +16,8 @@ Error generating stack: `+a.message+`
|
|
|
16
16
|
${g}px !important;
|
|
17
17
|
top: ${d}px !important;
|
|
18
18
|
}
|
|
19
|
-
`),()=>{x.contains(m)&&x.removeChild(m)}},[t]),(0,aE.jsx)($C,{isPresent:t,childRef:a,sizeRef:i,children:qh.cloneElement(e,{ref:l})})}var lE=({children:e,initial:t,isPresent:o,onExitComplete:r,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=ia(m6),c=(0,Tp.useId)(),d=!0,f=(0,Tp.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:o,custom:n,onExitComplete:p=>{u.set(p,!0);for(let g of u.values())if(!g)return;r&&r()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[o,u,r]);return a&&d&&(f={...f}),(0,Tp.useMemo)(()=>{u.forEach((p,g)=>u.set(g,!1))},[o]),sE.useEffect(()=>{!o&&!u.size&&r&&r()},[o]),i==="popLayout"&&(e=(0,KC.jsx)(iE,{isPresent:o,anchorX:s,root:l,children:e})),(0,KC.jsx)(qi.Provider,{value:f,children:e})};function m6(){return new Map}var es=R(M(),1);function $h(e=!0){let t=(0,es.useContext)(qi);if(t===null)return[!0,null];let{isPresent:o,onExitComplete:r,register:n}=t,a=(0,es.useId)();(0,es.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,es.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!o&&r?[!1,i]:[!0]}var Kh=R(M(),1),kp=e=>e.key||"";function XC(e){let t=[];return Kh.Children.forEach(e,o=>{(0,Kh.isValidElement)(o)&&t.push(o)}),t}var za=({children:e,custom:t,initial:o=!0,onExitComplete:r,presenceAffectsLayout:n=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",root:l})=>{let[u,c]=$h(i),d=(0,ua.useMemo)(()=>XC(e),[e]),f=i&&!u?[]:d.map(kp),p=(0,ua.useRef)(!0),g=(0,ua.useRef)(d),m=ia(()=>new Map),[x,h]=(0,ua.useState)(d),[v,y]=(0,ua.useState)(d);Qu(()=>{p.current=!1,g.current=d;for(let b=0;b<v.length;b++){let S=kp(v[b]);f.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[v,f.length,f.join("-")]);let w=[];if(d!==x){let b=[...d];for(let S=0;S<v.length;S++){let I=v[S],L=kp(I);f.includes(L)||(b.splice(S,0,I),w.push(I))}return a==="wait"&&w.length&&(b=w),y(XC(b)),h(d),null}let{forceRender:C}=(0,ua.useContext)(Xu);return(0,Mp.jsx)(Mp.Fragment,{children:v.map(b=>{let S=kp(b),I=i&&!u?!1:d===v||f.includes(S),L=()=>{if(m.has(S))m.set(S,!0);else return;let T=!0;m.forEach(k=>{k||(T=!1)}),T&&(C?.(),y(g.current),i&&c?.(),r&&r())};return(0,Mp.jsx)(lE,{isPresent:I,initial:!p.current||o?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:l,onExitComplete:I?void 0:L,anchorX:s,children:b},S)})})};var uE=R(M(),1),Xh=(0,uE.createContext)({strict:!1});var cE={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ga={};for(let e in cE)Ga[e]={isEnabled:t=>cE[e].some(o=>!!t[o])};function dE(e){for(let t in e)Ga[t]={...Ga[t],...e[t]}}var g6=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ep(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||g6.has(e)}var fE=e=>!Ep(e);function h6(e){typeof e=="function"&&(fE=t=>t.startsWith("on")?!Ep(t):e(t))}try{h6(Az("@emotion/is-prop-valid").default)}catch{}function pE(e,t,o){let r={};for(let n in e)n==="values"&&typeof e.values=="object"||(fE(n)||o===!0&&Ep(n)||!t&&!Ep(n)||e.draggable&&n.startsWith("onDrag"))&&(r[n]=e[n]);return r}var sv=R(N(),1);var mc=R(M(),1);var mE=R(M(),1),ts=(0,mE.createContext)({});var Zh=R(M(),1);function os(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Wa(e){return typeof e=="string"||Array.isArray(e)}var Yh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ap=["initial",...Yh];function Cl(e){return os(e.animate)||Ap.some(t=>Wa(e[t]))}function Qh(e){return!!(Cl(e)||e.variants)}function gE(e,t){if(Cl(e)){let{initial:o,animate:r}=e;return{initial:o===!1||Wa(o)?o:void 0,animate:Wa(r)?r:void 0}}return e.inherit!==!1?t:{}}function vE(e){let{initial:t,animate:o}=gE(e,(0,Zh.useContext)(ts));return(0,Zh.useMemo)(()=>({initial:t,animate:o}),[hE(t),hE(o)])}function hE(e){return Array.isArray(e)?e.join(" "):e}var uc=R(M(),1);var wE=R(M(),1);var Sl={};function xE(e){for(let t in e)Sl[t]=e[t],ll(t)&&(Sl[t].isCSSVariable=!0)}function Jh(e,{layout:t,layoutId:o}){return vr.has(e)||e.startsWith("origin")||(t||o!==void 0)&&(!!Sl[e]||e==="opacity")}var v6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},x6=Ln.length;function yE(e,t,o){let r="",n=!0;for(let a=0;a<x6;a++){let i=Ln[a],s=e[i];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(i.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||o){let u=Ip(s,hl[i]);if(!l){n=!1;let c=v6[i]||i;r+=`${c}(${u}) `}o&&(t[i]=u)}}return r=r.trim(),o?r=o(t,n?"":r):n&&(r="none"),r}function ic(e,t,o){let{style:r,vars:n,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let u=t[l];if(vr.has(l)){i=!0;continue}else if(ll(l)){n[l]=u;continue}else{let c=Ip(u,hl[l]);l.startsWith("origin")?(s=!0,a[l]=c):r[l]=c}}if(t.transform||(i||o?r.transform=yE(t,e.transform,o):r.transform&&(r.transform="none")),s){let{originX:l="50%",originY:u="50%",originZ:c=0}=a;r.transformOrigin=`${l} ${u} ${c}`}}var sc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function YC(e,t,o){for(let r in t)!Ve(t[r])&&!Jh(r,o)&&(e[r]=t[r])}function y6({transformTemplate:e},t){return(0,wE.useMemo)(()=>{let o=sc();return ic(o,t,e),Object.assign({},o.vars,o.style)},[t])}function w6(e,t){let o=e.style||{},r={};return YC(r,o,e),Object.assign(r,y6(e,t)),r}function CE(e,t){let o={},r=w6(e,t);return e.drag&&e.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(o.tabIndex=0),o.style=r,o}var bE=R(M(),1);var C6={offset:"stroke-dashoffset",array:"stroke-dasharray"},S6={offset:"strokeDashoffset",array:"strokeDasharray"};function SE(e,t,o=1,r=0,n=!0){e.pathLength=1;let a=n?C6:S6;e[a.offset]=ue.transform(-r);let i=ue.transform(t),s=ue.transform(o);e[a.array]=`${i} ${s}`}function ev(e,{attrX:t,attrY:o,attrScale:r,pathLength:n,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(ic(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),o!==void 0&&(d.y=o),r!==void 0&&(d.scale=r),n!==void 0&&SE(d,n,a,i,!1)}var tv=()=>({...sc(),attrs:{}});var ov=e=>typeof e=="string"&&e.toLowerCase()==="svg";function RE(e,t,o,r){let n=(0,bE.useMemo)(()=>{let a=tv();return ev(a,t,ov(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};YC(a,e.style,e),n.style={...a,...n.style}}return n}var IE=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function lc(e){return typeof e!="string"||e.includes("-")?!1:!!(IE.indexOf(e)>-1||/[A-Z]/u.test(e))}function PE(e,t,o,{latestValues:r},n,a=!1){let s=(lc(e)?RE:CE)(t,r,n,e),l=pE(t,typeof e=="string",a),u=e!==uc.Fragment?{...l,...s,ref:o}:{},{children:c}=t,d=(0,uc.useMemo)(()=>Ve(c)?c.get():c,[c]);return(0,uc.createElement)(e,{...u,children:d})}var QC=R(M(),1);function LE(e){let t=[{},{}];return e?.values.forEach((o,r)=>{t[0][r]=o.get(),t[1][r]=o.getVelocity()}),t}function cc(e,t,o,r){if(typeof t=="function"){let[n,a]=LE(r);t=t(o!==void 0?o:e.custom,n,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[n,a]=LE(r);t=t(o!==void 0?o:e.custom,n,a)}return t}function dc(e){return Ve(e)?e.get():e}function b6({scrapeMotionValuesFromProps:e,createRenderState:t},o,r,n){return{latestValues:R6(o,r,n,e),renderState:t()}}function R6(e,t,o,r){let n={},a=r(e,{});for(let f in a)n[f]=dc(a[f]);let{initial:i,animate:s}=e,l=Cl(e),u=Qh(e);t&&u&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let c=o?o.initial===!1:!1;c=c||i===!1;let d=c?s:i;if(d&&typeof d!="boolean"&&!os(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let g=cc(e,f[p]);if(g){let{transitionEnd:m,transition:x,...h}=g;for(let v in h){let y=h[v];if(Array.isArray(y)){let w=c?y.length-1:0;y=y[w]}y!==null&&(n[v]=y)}for(let v in m)n[v]=m[v]}}}return n}var rv=e=>(t,o)=>{let r=(0,QC.useContext)(ts),n=(0,QC.useContext)(qi),a=()=>b6(e,t,r,n);return o?a():ia(a)};function fc(e,t,o){let{style:r}=e,n={};for(let a in r)(Ve(r[a])||t.style&&Ve(t.style[a])||Jh(a,e)||o?.getValue(a)?.liveStyle!==void 0)&&(n[a]=r[a]);return n}var TE=rv({scrapeMotionValuesFromProps:fc,createRenderState:sc});function nv(e,t,o){let r=fc(e,t,o);for(let n in e)if(Ve(e[n])||Ve(t[n])){let a=Ln.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[a]=e[n]}return r}var kE=rv({scrapeMotionValuesFromProps:nv,createRenderState:tv});var ME=Symbol.for("motionComponentSymbol");var EE=R(M(),1);function ja(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function AE(e,t,o){return(0,EE.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),o&&(typeof o=="function"?o(r):ja(o)&&(o.current=r))},[t])}var tr=R(M(),1);var pc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var I6="framerAppearId",av="data-"+pc(I6);var DE=R(M(),1),iv=(0,DE.createContext)({});function NE(e,t,o,r,n){let{visualElement:a}=(0,tr.useContext)(ts),i=(0,tr.useContext)(Xh),s=(0,tr.useContext)(qi),l=(0,tr.useContext)(Ji).reducedMotion,u=(0,tr.useRef)(null);r=r||i.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:o,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));let c=u.current,d=(0,tr.useContext)(iv);c&&!c.projection&&n&&(c.type==="html"||c.type==="svg")&&P6(u.current,o,n,d);let f=(0,tr.useRef)(!1);(0,tr.useInsertionEffect)(()=>{c&&f.current&&c.update(o,s)});let p=o[av],g=(0,tr.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return Qu(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),(0,tr.useEffect)(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),g.current=!1),c.enteringChildren=void 0)}),c}function P6(e,t,o,r){let{layoutId:n,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new o(e.latestValues,t["data-framer-portal-id"]?void 0:OE(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&ja(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function OE(e){if(e)return e.options.allowProjection!==!1?e.projection:OE(e.parent)}function lv(e,{forwardMotionProps:t=!1}={},o,r){o&&dE(o);let n=lc(e)?kE:TE;function a(s,l){let u,c={...(0,mc.useContext)(Ji),...s,layoutId:L6(s)},{isStatic:d}=c,f=vE(s),p=n(s,d);if(!d&&Yu){T6(c,o);let g=k6(c);u=g.MeasureLayout,f.visualElement=NE(e,p,c,r,g.ProjectionNode)}return(0,sv.jsxs)(ts.Provider,{value:f,children:[u&&f.visualElement?(0,sv.jsx)(u,{visualElement:f.visualElement,...c}):null,PE(e,s,AE(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,mc.forwardRef)(a);return i[ME]=e,i}function L6({layoutId:e}){let t=(0,mc.useContext)(Xu).id;return t&&e!==void 0?t+"-"+e:e}function T6(e,t){let o=(0,mc.useContext)(Xh).strict}function k6(e){let{drag:t,layout:o}=Ga;if(!t&&!o)return{};let r={...t,...o};return{MeasureLayout:t?.isEnabled(e)||o?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function FE(e,t){if(typeof Proxy>"u")return lv;let o=new Map,r=(a,i)=>lv(a,i,e,t),n=(a,i)=>r(a,i);return new Proxy(n,{get:(a,i)=>i==="create"?r:(o.has(i)||o.set(i,lv(i,void 0,e,t)),o.get(i))})}var ZE=R(M(),1);function uv({top:e,left:t,right:o,bottom:r}){return{x:{min:t,max:o},y:{min:e,max:r}}}function _E({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function VE(e,t){if(!t)return e;let o=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:o.y,left:o.x,bottom:r.y,right:r.x}}function ZC(e){return e===void 0||e===1}function cv({scale:e,scaleX:t,scaleY:o}){return!ZC(e)||!ZC(t)||!ZC(o)}function qa(e){return cv(e)||JC(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function JC(e){return BE(e.x)||BE(e.y)}function BE(e){return e&&e!=="0%"}function Dp(e,t,o){let r=e-o,n=t*r;return o+n}function HE(e,t,o,r,n){return n!==void 0&&(e=Dp(e,n,r)),Dp(e,o,r)+t}function eS(e,t=0,o=1,r,n){e.min=HE(e.min,t,o,r,n),e.max=HE(e.max,t,o,r,n)}function tS(e,{x:t,y:o}){eS(e.x,t.translate,t.scale,t.originPoint),eS(e.y,o.translate,o.scale,o.originPoint)}var UE=.999999999999,zE=1.0000000000001;function WE(e,t,o,r=!1){let n=o.length;if(!n)return;t.x=t.y=1;let a,i;for(let s=0;s<n;s++){a=o[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&bl(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,tS(e,i)),r&&qa(a.latestValues)&&bl(e,a.latestValues))}t.x<zE&&t.x>UE&&(t.x=1),t.y<zE&&t.y>UE&&(t.y=1)}function rs(e,t){e.min=e.min+t,e.max=e.max+t}function GE(e,t,o,r,n=.5){let a=ke(e.min,e.max,n);eS(e,t,o,a,r)}function bl(e,t){GE(e.x,t.x,t.scaleX,t.scale,t.originX),GE(e.y,t.y,t.scaleY,t.scale,t.originY)}function oS(e,t){return uv(VE(e.getBoundingClientRect(),t))}function jE(e,t,o){let r=oS(e,o),{scroll:n}=t;return n&&(rs(r.x,n.offset.x),rs(r.y,n.offset.y)),r}var qE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rl=()=>({x:qE(),y:qE()}),$E=()=>({min:0,max:0}),$e=()=>({x:$E(),y:$E()});var Np={current:null},dv={current:!1};function KE(){if(dv.current=!0,!!Yu)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Np.current=e.matches;e.addEventListener("change",t),t()}else Np.current=!1}var ns=new WeakMap;function XE(e,t,o){for(let r in t){let n=t[r],a=o[r];if(Ve(n))e.addValue(r,n);else if(Ve(a))e.addValue(r,er(n,{owner:e}));else if(a!==n)if(e.hasValue(r)){let i=e.getValue(r);i.liveStyle===!0?i.jump(n):i.hasAnimated||i.set(n)}else{let i=e.getStaticValue(r);e.addValue(r,er(i!==void 0?i:n,{owner:e}))}}for(let r in o)t[r]===void 0&&e.removeValue(r);return t}var YE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],gc=class{scrapeMotionValuesFromProps(t,o,r){return{}}constructor({parent:t,props:o,presenceContext:r,reducedMotionConfig:n,blockInitialAnimation:a,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ha,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let f=yt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Le.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=o.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=o,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Cl(o),this.isVariantNode=Qh(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(o,{},this);for(let f in d){let p=d[f];l[f]!==void 0&&Ve(p)&&p.set(l[f])}}mount(t){this.current=t,ns.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,r)=>this.bindToMotionValue(r,o)),dv.current||KE(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Np.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),wo(this.notifyUpdate),wo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let o=this.features[t];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,o){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let r=vr.has(t);r&&this.onBindTransform&&this.onBindTransform();let n=o.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Le.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,o)),this.valueSubscriptions.set(t,()=>{n(),a&&a(),o.owner&&o.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ga){let o=Ga[t];if(!o)continue;let{isEnabled:r,Feature:n}=o;if(!this.features[t]&&n&&r(this.props)&&(this.features[t]=new n(this)),this.features[t]){let a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$e()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,o){this.latestValues[t]=o}update(t,o){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let r=0;r<YE.length;r++){let n=YE[r];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let a="on"+n,i=t[a];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=XE(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(t),()=>o.variantChildren.delete(t)}addValue(t,o){let r=this.values.get(t);o!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,o),this.values.set(t,o),this.latestValues[t]=o.get())}removeValue(t){this.values.delete(t);let o=this.valueSubscriptions.get(t);o&&(o(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,o){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&o!==void 0&&(r=er(o===null?void 0:o,{owner:this}),this.addValue(t,r)),r}readValue(t,o){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&($f(r)||Xf(r))?r=parseFloat(r):!qC(r)&&So.test(o)&&(r=Sp(t,o)),this.setBaseTarget(t,Ve(r)?r.get():r)),Ve(r)?r.get():r}setBaseTarget(t,o){this.baseTarget[t]=o}getBaseTarget(t){let{initial:o}=this.props,r;if(typeof o=="string"||typeof o=="object"){let a=cc(this.props,o,this.presenceContext?.custom);a&&(r=a[t])}if(o&&r!==void 0)return r;let n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!Ve(n)?n:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,o){return this.events[t]||(this.events[t]=new Fa),this.events[t].add(o)}notify(t,...o){this.events[t]&&this.events[t].notify(...o)}scheduleRenderMicrotask(){xl.render(this.render)}};var hc=class extends gc{constructor(){super(...arguments),this.KeyframeResolver=bp}sortInstanceNodePosition(t,o){return t.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(t,o){return t.style?t.style[o]:void 0}removeValueFromRenderState(t,{vars:o,style:r}){delete o[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Ve(t)&&(this.childSubscription=t.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};function fv(e,{style:t,vars:o},r,n){let a=e.style,i;for(i in t)a[i]=t[i];n?.applyProjectionStyles(a,r);for(i in o)a.setProperty(i,o[i])}function M6(e){return window.getComputedStyle(e)}var vc=class extends hc{constructor(){super(...arguments),this.type="html",this.renderInstance=fv}readValueFromInstance(t,o){if(vr.has(o))return this.projection?.isProjecting?gp(o):LC(t,o);{let r=M6(t),n=(ll(o)?r.getPropertyValue(o):r[o])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:o}){return oS(t,o)}build(t,o,r){ic(t,o,r.transformTemplate)}scrapeMotionValuesFromProps(t,o,r){return fc(t,o,r)}};var pv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function QE(e,t,o,r){fv(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(pv.has(n)?n:pc(n),t.attrs[n])}var xc=class extends hc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$e}getBaseTargetFromProps(t,o){return t[o]}readValueFromInstance(t,o){if(vr.has(o)){let r=Cp(o);return r&&r.default||0}return o=pv.has(o)?o:pc(o),t.getAttribute(o)}scrapeMotionValuesFromProps(t,o,r){return nv(t,o,r)}build(t,o,r){ev(t,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,o,r,n){QE(t,o,r,n)}mount(t){this.isSVGTag=ov(t.tagName),super.mount(t)}};var JE=(e,t)=>lc(e)?new xc(t):new vc(t,{allowProjection:e!==ZE.Fragment});function ca(e,t,o){let r=e.getProps();return cc(r,t,o!==void 0?o:r.custom,e)}var Op=e=>Array.isArray(e);function E6(e,t,o){e.hasValue(t)?e.getValue(t).set(o):e.addValue(t,er(o))}function A6(e){return Op(e)?e[e.length-1]||0:e}function eA(e,t){let o=ca(e,t),{transitionEnd:r={},transition:n={},...a}=o||{};a={...a,...r};for(let i in a){let s=A6(a[i]);E6(e,i,s)}}function tA(e){return!!(Ve(e)&&e.add)}function Fp(e,t){let o=e.getValue("willChange");if(tA(o))return o.add(t);if(!o&&yo.WillChange){let r=new yo.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function mv(e){return e.props[av]}var D6=e=>e!==null;function oA(e,{repeat:t,repeatType:o="loop"},r){let n=e.filter(D6),a=t&&o!=="loop"&&t%2===1?0:n.length-1;return!a||r===void 0?n[a]:r}var N6={type:"spring",stiffness:500,damping:25,restSpeed:10},O6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),F6={type:"keyframes",duration:.8},_6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rA=(e,{keyframes:t})=>t.length>2?F6:vr.has(e)?e.startsWith("scale")?O6(t[1]):N6:_6;function nA({when:e,delay:t,delayChildren:o,staggerChildren:r,staggerDirection:n,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var yc=(e,t,o,r={},n,a)=>i=>{let s=gl(r,e)||{},l=s.delay||r.delay||0,{elapsed:u=0}=r;u=u-bt(l);let c={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:n};nA(s)||Object.assign(c,rA(e,c)),c.duration&&(c.duration=bt(c.duration)),c.repeatDelay&&(c.repeatDelay=bt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(nc(c),c.delay===0&&(d=!0)),(yo.instantAnimations||yo.skipAnimations)&&(d=!0,nc(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=oA(c.keyframes,s);if(f!==void 0){Le.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new Ba(c):new vp(c)};function V6({protectedKeys:e,needsAnimating:t},o){let r=e.hasOwnProperty(o)&&t[o]!==!0;return t[o]=!1,r}function wc(e,t,{delay:o=0,transitionOverride:r,type:n}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...s}=t;r&&(a=r);let l=[],u=n&&e.animationState&&e.animationState.getState()[n];for(let c in s){let d=e.getValue(c,e.latestValues[c]??null),f=s[c];if(f===void 0||u&&V6(u,c))continue;let p={delay:o,...gl(a||{},c)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===g&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){let h=mv(e);if(h){let v=window.MotionHandoffAnimation(h,c,Le);v!==null&&(p.startTime=v,m=!0)}}Fp(e,c),d.start(yc(c,d,f,e.shouldReduceMotion&&yp.has(c)?{type:!1}:p,e,m));let x=d.animation;x&&l.push(x)}return i&&Promise.all(l).then(()=>{Le.update(()=>{i&&eA(e,i)})}),l}function gv(e,t,o,r=0,n=1){let a=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),i=e.size,s=(i-1)*r;return typeof o=="function"?o(a,i):n===1?a*r:s-a*r}function hv(e,t,o={}){let r=ca(e,t,o.type==="exit"?e.presenceContext?.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(n=o.transitionOverride);let a=r?()=>Promise.all(wc(e,r,o)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=n;return B6(e,t,l,u,c,d,o)}:()=>Promise.resolve(),{when:s}=n;if(s){let[l,u]=s==="beforeChildren"?[a,i]:[i,a];return l().then(()=>u())}else return Promise.all([a(),i(o.delay)])}function B6(e,t,o=0,r=0,n=0,a=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(hv(l,t,{...i,delay:o+(typeof r=="function"?0:r)+gv(e.variantChildren,l,r,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function aA(e,t,o={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){let n=t.map(a=>hv(e,a,o));r=Promise.all(n)}else if(typeof t=="string")r=hv(e,t,o);else{let n=typeof t=="function"?ca(e,t,o.custom):t;r=Promise.all(wc(e,n,o))}return r.then(()=>{e.notify("AnimationComplete",t)})}function rS(e,t){if(!Array.isArray(t))return!1;let o=t.length;if(o!==e.length)return!1;for(let r=0;r<o;r++)if(t[r]!==e[r])return!1;return!0}var H6=Ap.length;function nS(e){if(!e)return;if(!e.isControllingVariants){let o=e.parent?nS(e.parent)||{}:{};return e.props.initial!==void 0&&(o.initial=e.props.initial),o}let t={};for(let o=0;o<H6;o++){let r=Ap[o],n=e.props[r];(Wa(n)||n===!1)&&(t[r]=n)}return t}var U6=[...Yh].reverse(),z6=Yh.length;function G6(e){return t=>Promise.all(t.map(({animation:o,options:r})=>aA(e,o,r)))}function sA(e){let t=G6(e),o=iA(),r=!0,n=l=>(u,c)=>{let d=ca(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:p,...g}=d;u={...u,...g,...p}}return u};function a(l){t=l(e)}function i(l){let{props:u}=e,c=nS(e.parent)||{},d=[],f=new Set,p={},g=1/0;for(let x=0;x<z6;x++){let h=U6[x],v=o[h],y=u[h]!==void 0?u[h]:c[h],w=Wa(y),C=h===l?v.isActive:null;C===!1&&(g=x);let b=y===c[h]&&y!==u[h]&&w;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),v.protectedKeys={...p},!v.isActive&&C===null||!y&&!v.prevProp||os(y)||typeof y=="boolean")continue;let S=W6(v.prevProp,y),I=S||h===l&&v.isActive&&!b&&w||x>g&&w,L=!1,T=Array.isArray(y)?y:[y],k=T.reduce(n(h),{});C===!1&&(k={});let{prevResolvedValues:E={}}=v,_={...E,...k},D=O=>{I=!0,f.has(O)&&(L=!0,f.delete(O)),v.needsAnimating[O]=!0;let B=e.getValue(O);B&&(B.liveStyle=!1)};for(let O in _){let B=k[O],A=E[O];if(p.hasOwnProperty(O))continue;let te=!1;Op(B)&&Op(A)?te=!rS(B,A):te=B!==A,te?B!=null?D(O):f.add(O):B!==void 0&&f.has(O)?D(O):v.protectedKeys[O]=!0}v.prevProp=y,v.prevResolvedValues=k,v.isActive&&(p={...p,...k}),r&&e.blockInitialAnimation&&(I=!1);let z=b&&S;I&&(!z||L)&&d.push(...T.map(O=>{let B={type:h};if(typeof O=="string"&&r&&!z&&e.manuallyAnimateOnMount&&e.parent){let{parent:A}=e,te=ca(A,O);if(A.enteringChildren&&te){let{delayChildren:ae}=te.transition||{};B.delay=gv(A.enteringChildren,e,ae)}}return{animation:O,options:B}}))}if(f.size){let x={};if(typeof u.initial!="boolean"){let h=ca(e,Array.isArray(u.initial)?u.initial[0]:u.initial);h&&h.transition&&(x.transition=h.transition)}f.forEach(h=>{let v=e.getBaseTarget(h),y=e.getValue(h);y&&(y.liveStyle=!0),x[h]=v??null}),d.push({animation:x})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function s(l,u){if(o[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),o[l].isActive=u;let c=i(l);for(let d in o)o[d].protectedKeys={};return c}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>o,reset:()=>{o=iA()}}}function W6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rS(t,e):!1}function Il(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iA(){return{animate:Il(!0),whileInView:Il(),whileHover:Il(),whileTap:Il(),whileDrag:Il(),whileFocus:Il(),exit:Il()}}var Kt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var vv=class extends Kt{constructor(t){super(t),t.animationState||(t.animationState=sA(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();os(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:o}=this.node.prevProps||{};t!==o&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var j6=0,xv=class extends Kt{constructor(){super(...arguments),this.id=j6++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:o}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;let n=this.node.animationState.setActive("exit",!t);o&&!t&&n.then(()=>{o(this.id)})}mount(){let{register:t,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var lA={animation:{Feature:vv},exit:{Feature:xv}};function $a(e,t,o,r={passive:!0}){return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o)}function Ka(e){return{point:{x:e.pageX,y:e.pageY}}}var uA=e=>t=>yl(t)&&e(t,Ka(t));function as(e,t,o,r){return $a(e,t,uA(o),r)}var pA=1e-4,q6=1-pA,$6=1+pA,mA=.01,K6=0-mA,X6=0+mA;function Ht(e){return e.max-e.min}function gA(e,t,o){return Math.abs(e-t)<=o}function cA(e,t,o,r=.5){e.origin=r,e.originPoint=ke(t.min,t.max,e.origin),e.scale=Ht(o)/Ht(t),e.translate=ke(o.min,o.max,e.origin)-e.originPoint,(e.scale>=q6&&e.scale<=$6||isNaN(e.scale))&&(e.scale=1),(e.translate>=K6&&e.translate<=X6||isNaN(e.translate))&&(e.translate=0)}function Cc(e,t,o,r){cA(e.x,t.x,o.x,r?r.originX:void 0),cA(e.y,t.y,o.y,r?r.originY:void 0)}function dA(e,t,o){e.min=o.min+t.min,e.max=e.min+Ht(t)}function hA(e,t,o){dA(e.x,t.x,o.x),dA(e.y,t.y,o.y)}function fA(e,t,o){e.min=t.min-o.min,e.max=e.min+Ht(t)}function Sc(e,t,o){fA(e.x,t.x,o.x),fA(e.y,t.y,o.y)}function or(e){return[e("x"),e("y")]}var yv=({current:e})=>e?e.ownerDocument.defaultView:null;var vA=(e,t)=>Math.abs(e-t);function xA(e,t){let o=vA(e.x,t.x),r=vA(e.y,t.y);return Math.sqrt(o**2+r**2)}var bc=class{constructor(t,o,{transformPagePoint:r,contextWindow:n=window,dragSnapToOrigin:a=!1,distanceThreshold:i=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let f=iS(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=xA(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!g)return;let{point:m}=f,{timestamp:x}=xt;this.history.push({...m,timestamp:x});let{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=aS(p,this.transformPagePoint),Le.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();let{onEnd:g,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let h=iS(f.type==="pointercancel"?this.lastMoveEventInfo:aS(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,h),m&&m(f,h)},!yl(t))return;this.dragSnapToOrigin=a,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=n||window;let s=Ka(t),l=aS(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=xt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=o;d&&d(t,iS(l,this.history)),this.removeListeners=Rn(as(this.contextWindow,"pointermove",this.handlePointerMove),as(this.contextWindow,"pointerup",this.handlePointerUp),as(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),wo(this.updatePoint)}};function aS(e,t){return t?{point:t(e.point)}:e}function yA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function iS({point:e},t){return{point:e,delta:yA(e,wA(t)),offset:yA(e,Y6(t)),velocity:Q6(t,.1)}}function Y6(e){return e[0]}function wA(e){return e[e.length-1]}function Q6(e,t){if(e.length<2)return{x:0,y:0};let o=e.length-1,r=null,n=wA(e);for(;o>=0&&(r=e[o],!(n.timestamp-r.timestamp>bt(t)));)o--;if(!r)return{x:0,y:0};let a=Bt(n.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let i={x:(n.x-r.x)/a,y:(n.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function IA(e,{min:t,max:o},r){return t!==void 0&&e<t?e=r?ke(t,e,r.min):Math.max(e,t):o!==void 0&&e>o&&(e=r?ke(o,e,r.max):Math.min(e,o)),e}function CA(e,t,o){return{min:t!==void 0?e.min+t:void 0,max:o!==void 0?e.max+o-(e.max-e.min):void 0}}function PA(e,{top:t,left:o,bottom:r,right:n}){return{x:CA(e.x,o,n),y:CA(e.y,t,r)}}function SA(e,t){let o=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([o,r]=[r,o]),{min:o,max:r}}function LA(e,t){return{x:SA(e.x,t.x),y:SA(e.y,t.y)}}function TA(e,t){let o=.5,r=Ht(e),n=Ht(t);return n>r?o=Br(t.min,t.max-r,e.min):r>n&&(o=Br(e.min,e.max-n,t.min)),$t(0,1,o)}function kA(e,t){let o={};return t.min!==void 0&&(o.min=t.min-e.min),t.max!==void 0&&(o.max=t.max-e.min),o}var wv=.35;function MA(e=wv){return e===!1?e=0:e===!0&&(e=wv),{x:bA(e,"left","right"),y:bA(e,"top","bottom")}}function bA(e,t,o){return{min:RA(e,t),max:RA(e,o)}}function RA(e,t){return typeof e=="number"?e:e[t]||0}var Z6=new WeakMap,Sv=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$e(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:o=!1,distanceThreshold:r}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let a=d=>{let{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(Ka(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=HC(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),or(h=>{let v=this.getAxisMotionValue(h).get()||0;if(Co.test(v)){let{projection:y}=this.visualElement;if(y&&y.layout){let w=y.layout.layoutBox[h];w&&(v=Ht(w)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&Le.postRender(()=>m(d,f)),Fp(this.visualElement,"transform");let{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:g,onDirectionLock:m,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:h}=f;if(g&&this.currentDirection===null){this.currentDirection=J6(h),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,h),this.updateAxis("y",f.point,h),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>or(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new bc(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:yv(this.visualElement)})}stop(t,o){let r=t||this.latestPointerEvent,n=o||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!r)return;let{velocity:i}=n;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&Le.postRender(()=>s(r,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:o}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(t,o,r){let{drag:n}=this.getProps();if(!r||!Cv(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=IA(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){let{dragConstraints:t,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&ja(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=PA(r.layoutBox,t):this.constraints=!1,this.elastic=MA(o),n!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&or(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=kA(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:o}=this.getProps();if(!t||!ja(t))return!1;let r=t.current;io(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;let a=jE(r,n.root,this.visualElement.getTransformPagePoint()),i=LA(n.layout.layoutBox,a);if(o){let s=o(_E(i));this.hasMutatedConstraints=!!s,s&&(i=uv(s))}return i}startAnimation(t){let{drag:o,dragMomentum:r,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=or(c=>{if(!Cv(c,o,this.currentDirection))return;let d=l&&l[c]||{};i&&(d={min:0,max:0});let f=n?200:1e6,p=n?40:1e7,g={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(s)}startAxisValueAnimation(t,o){let r=this.getAxisMotionValue(t);return Fp(this.visualElement,t),r.start(yc(t,r,0,o,this.visualElement,!1))}stopAnimation(){or(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){or(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let o=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),n=r[o];return n||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){or(o=>{let{drag:r}=this.getProps();if(!Cv(o,r,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(o);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[o];a.set(t[o]-ke(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!ja(o)||!r||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};or(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=TA({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),or(i=>{if(!Cv(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];s.set(ke(l,u,n[i]))})}addListeners(){if(!this.visualElement.current)return;Z6.set(this.visualElement,this);let t=this.visualElement.current,o=as(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{let{dragConstraints:l}=this.getProps();ja(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,a=n.addEventListener("measure",r);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Le.read(r);let i=$a(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(or(c=>{let d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{i(),o(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:i=wv,dragMomentum:s=!0}=t;return{...t,drag:o,dragDirectionLock:r,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function Cv(e,t,o){return(t===!0||t===e)&&(o===null||o===e)}function J6(e,t=10){let o=null;return Math.abs(e.y)>t?o="y":Math.abs(e.x)>t&&(o="x"),o}var bv=class extends Kt{constructor(t){super(t),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new Sv(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mt}unmount(){this.removeGroupControls(),this.removeListeners()}};var EA=e=>(t,o)=>{e&&Le.postRender(()=>e(t,o))},Rv=class extends Kt{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(t){this.session=new bc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yv(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:o,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:EA(t),onStart:EA(o),onMove:r,onEnd:(a,i)=>{delete this.session,n&&Le.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=as(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var NA=R(N(),1);var _p=R(M(),1);var Rc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function AA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ic={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ue.test(e))e=parseFloat(e);else return e;let o=AA(e,t.target.x),r=AA(e,t.target.y);return`${o}% ${r}%`}};var DA={correct:(e,{treeScale:t,projectionDelta:o})=>{let r=e,n=So.parse(e);if(n.length>5)return r;let a=So.createTransformer(e),i=typeof n[0]!="number"?1:0,s=o.x.scale*t.x,l=o.y.scale*t.y;n[0+i]/=s,n[1+i]/=l;let u=ke(s,l,.5);return typeof n[2+i]=="number"&&(n[2+i]/=u),typeof n[3+i]=="number"&&(n[3+i]/=u),a(n)}};var sS=!1,lS=class extends _p.Component{componentDidMount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r,layoutId:n}=this.props,{projection:a}=t;xE(eq),a&&(o.group&&o.group.add(a),r&&r.register&&n&&r.register(a),sS&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Rc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:o,visualElement:r,drag:n,isPresent:a}=this.props,{projection:i}=r;return i&&(i.isPresent=a,sS=!0,n||t.layoutDependency!==o||o===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Le.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),xl.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:n}=t;sS=!0,n&&(n.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function Iv(e){let[t,o]=$h(),r=(0,_p.useContext)(Xu);return(0,NA.jsx)(lS,{...e,layoutGroup:r,switchLayoutGroup:(0,_p.useContext)(iv),isPresent:t,safeToRemove:o})}var eq={borderRadius:{...Ic,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ic,borderTopRightRadius:Ic,borderBottomLeftRadius:Ic,borderBottomRightRadius:Ic,boxShadow:DA};function Pv(e,t,o){let r=Ve(e)?e:er(e);return r.start(yc("",r,t,o)),r.animation}var OA=(e,t)=>e.depth-t.depth;var Lv=class{constructor(){this.children=[],this.isDirty=!1}add(t){il(this.children,t),this.isDirty=!0}remove(t){bn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(OA),this.isDirty=!1,this.children.forEach(t)}};function FA(e,t){let o=yt.now(),r=({timestamp:n})=>{let a=n-o;a>=t&&(wo(r),e(a-t))};return Le.setup(r,!0),()=>wo(r)}var HA=["TopLeft","TopRight","BottomLeft","BottomRight"],tq=HA.length,_A=e=>typeof e=="string"?parseFloat(e):e,VA=e=>typeof e=="number"||ue.test(e);function UA(e,t,o,r,n,a){n?(e.opacity=ke(0,o.opacity??1,oq(r)),e.opacityExit=ke(t.opacity??1,0,rq(r))):a&&(e.opacity=ke(t.opacity??1,o.opacity??1,r));for(let i=0;i<tq;i++){let s=`border${HA[i]}Radius`,l=BA(t,s),u=BA(o,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||VA(l)===VA(u)?(e[s]=Math.max(ke(_A(l),_A(u),r),0),(Co.test(u)||Co.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||o.rotate)&&(e.rotate=ke(t.rotate||0,o.rotate||0,r))}function BA(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var oq=zA(0,.5,ep),rq=zA(.5,.95,mt);function zA(e,t,o){return r=>r<e?0:r>t?1:o(Br(e,t,r))}function GA(e,t){e.min=t.min,e.max=t.max}function xr(e,t){GA(e.x,t.x),GA(e.y,t.y)}function uS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function WA(e,t,o,r,n){return e-=t,e=Dp(e,1/o,r),n!==void 0&&(e=Dp(e,1/n,r)),e}function nq(e,t=0,o=1,r=.5,n,a=e,i=e){if(Co.test(t)&&(t=parseFloat(t),t=ke(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=ke(a.min,a.max,r);e===a&&(s-=t),e.min=WA(e.min,t,o,s,n),e.max=WA(e.max,t,o,s,n)}function jA(e,t,[o,r,n],a,i){nq(e,t[o],t[r],t[n],t.scale,a,i)}var aq=["x","scaleX","originX"],iq=["y","scaleY","originY"];function cS(e,t,o,r){jA(e.x,t,aq,o?o.x:void 0,r?r.x:void 0),jA(e.y,t,iq,o?o.y:void 0,r?r.y:void 0)}function qA(e){return e.translate===0&&e.scale===1}function dS(e){return qA(e.x)&&qA(e.y)}function $A(e,t){return e.min===t.min&&e.max===t.max}function XA(e,t){return $A(e.x,t.x)&&$A(e.y,t.y)}function KA(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fS(e,t){return KA(e.x,t.x)&&KA(e.y,t.y)}function pS(e){return Ht(e.x)/Ht(e.y)}function mS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Tv=class{constructor(){this.members=[]}add(t){il(this.members,t),t.scheduleRender()}remove(t){if(bn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(t){let o=this.members.findIndex(n=>t===n);if(o===0)return!1;let r;for(let n=o;n>=0;n--){let a=this.members[n];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,o){let r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,o&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:n}=t.options;n===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:o,resumingFrom:r}=t;o.onExitComplete&&o.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function YA(e,t,o){let r="",n=e.x.translate/t.x,a=e.y.translate/t.y,i=o?.z||0;if((n||a||i)&&(r=`translate3d(${n}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),o){let{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:g}=o;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}var Pl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},gS=["","X","Y","Z"],sq=1e3,lq=0;function hS(e,t,o,r){let{latestValues:n}=t;n[e]&&(o[e]=n[e],t.setStaticValue(e,0),r&&(r[e]=0))}function aD(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let o=mv(t);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(o,"transform",Le,!(n||a))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&aD(r)}function kv({attachResizeListener:e,defaultParent:t,measureScroll:o,checkIsScrollRoot:r,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=lq++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Jo.value&&(Pl.nodes=Pl.calculatedTargetDeltas=Pl.calculatedProjections=0),this.nodes.forEach(dq),this.nodes.forEach(gq),this.nodes.forEach(hq),this.nodes.forEach(fq),Jo.addProjectionMetrics&&Jo.addProjectionMetrics(Pl)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Lv)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Fa),this.eventHandlers.get(i).add(s)}notifyListeners(i,...s){let l=this.eventHandlers.get(i);l&&l.notify(...s)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=wl(i)&&!Lp(i),this.instance=i;let{layoutId:s,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let c,d=0,f=()=>this.root.updateBlockedByResize=!1;Le.read(()=>{d=window.innerWidth}),e(i,()=>{let p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,c&&c(),c=FA(f,250),Rc.hasAnimatedSinceResize&&(Rc.hasAnimatedSinceResize=!1,this.nodes.forEach(JA)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let g=this.options.transition||u.getDefaultTransition()||Cq,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=u.getProps(),h=!this.targetLayout||!fS(this.targetLayout,p),v=!d&&f;if(this.options.layoutRoot||this.resumeFrom||v||d&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let y={...gl(g,"layout"),onPlay:m,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,v)}else d||JA(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),wo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(vq),this.animationId++)}getTransformTemplate(){let{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&aD(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(QA);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ZA);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(mq),this.nodes.forEach(uq),this.nodes.forEach(cq)):this.nodes.forEach(ZA),this.clearAllSnapshots();let s=yt.now();xt.delta=$t(0,1e3/60,s-xt.timestamp),xt.timestamp=s,xt.isProcessing=!0,sp.update.process(xt),sp.preRender.process(xt),sp.render.process(xt),xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,xl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(pq),this.sharedNodes.forEach(xq)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ht(this.snapshot.measuredBox.x)&&!Ht(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=$e(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(s=!1),s&&this.instance){let l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!n)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!dS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||qa(this.latestValues)||c)&&(n(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),Sq(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return $e();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(bq))){let{scroll:u}=this.root;u&&(rs(s.x,u.offset.x),rs(s.y,u.offset.y))}return s}removeElementScroll(i){let s=$e();if(xr(s,i),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&xr(s,i),rs(s.x,c.offset.x),rs(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=$e();xr(l,i);for(let u=0;u<this.path.length;u++){let c=this.path[u];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&bl(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),qa(c.latestValues)&&bl(l,c.latestValues)}return qa(this.latestValues)&&bl(l,this.latestValues),l}removeTransform(i){let s=$e();xr(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!qa(u.latestValues))continue;cv(u.latestValues)&&u.updateSnapshot();let c=$e(),d=u.measurePageBox();xr(c,d),cS(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return qa(this.latestValues)&&cS(s,this.latestValues),s}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){let s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==s;if(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=xt.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$e(),this.relativeTargetOrigin=$e(),Sc(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),xr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=$e(),this.targetWithTransforms=$e()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),hA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xr(this.target,this.layout.layoutBox),tS(this.target,this.targetDelta)):xr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$e(),this.relativeTargetOrigin=$e(),Sc(this.relativeTargetOrigin,this.target,f.target),xr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Jo.value&&Pl.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||cv(this.parent.latestValues)||JC(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let i=this.getLead(),s=!!this.resumingFrom||this!==i,l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===xt.timestamp&&(l=!1),l)return;let{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;xr(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;WE(this.layoutCorrected,this.treeScale,this.path,s),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=$e());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(uS(this.prevProjectionDelta.x,this.projectionDelta.x),uS(this.prevProjectionDelta.y,this.projectionDelta.y)),Cc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!mS(this.projectionDelta.x,this.prevProjectionDelta.x)||!mS(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Jo.value&&Pl.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.visualElement?.scheduleRender(),i){let s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Rl(),this.projectionDelta=Rl(),this.projectionDeltaWithTransform=Rl()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Rl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=$e(),p=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=p!==g,x=this.getStack(),h=!x||x.members.length<=1,v=!!(m&&!h&&this.options.crossfade===!0&&!this.path.some(wq));this.animationProgress=0;let y;this.mixTargetDelta=w=>{let C=w/1e3;eD(d.x,i.x,C),eD(d.y,i.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Sc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),yq(this.relativeTarget,this.relativeTargetOrigin,f,C),y&&XA(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=$e()),xr(y,this.relativeTarget)),m&&(this.animationValues=c,UA(c,u,this.latestValues,C,v,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(wo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{Rc.hasAnimatedSinceResize=!0,In.layout++,this.motionValue||(this.motionValue=er(0)),this.currentAnimation=Pv(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{In.layout--},onComplete:()=>{In.layout--,i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(sq),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:u,latestValues:c}=i;if(!(!s||!l||!u)){if(this!==i&&this.layout&&u&&iD(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||$e();let d=Ht(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=Ht(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}xr(s,l),bl(s,c),Cc(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Tv),this.sharedNodes.get(i).add(s);let u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){let i=this.getStack();return i?i.lead===this:!0}getLead(){let{layoutId:i}=this.options;return i?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:i}=this.options;return i?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:s,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){let i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){let{visualElement:i}=this.options;if(!i)return;let s=!1,{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;let u={};l.z&&hS("z",i,u,this.animationValues);for(let c=0;c<gS.length;c++)hS(`rotate${gS[c]}`,i,u,this.animationValues),hS(`skew${gS[c]}`,i,u,this.animationValues);i.render();for(let c in u)i.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);i.scheduleRender()}applyProjectionStyles(i,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=dc(s?.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=dc(s?.pointerEvents)||""),this.hasProjected&&!qa(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=YA(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),i.transform=d;let{x:f,y:p}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?i.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:i.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(let g in Sl){if(c[g]===void 0)continue;let{correct:m,applyTo:x,isCSSVariable:h}=Sl[g],v=d==="none"?c[g]:m(c[g],u);if(x){let y=x.length;for(let w=0;w<y;w++)i[x[w]]=v}else h?this.options.visualElement.renderState.vars[g]=v:i[g]=v}this.options.layoutId&&(i.pointerEvents=u===this?dc(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(QA),this.root.sharedNodes.clear()}}}function uq(e){e.updateLayout()}function cq(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:o,measuredBox:r}=e.layout,{animationType:n}=e.options,a=t.source!==e.layout.source;n==="size"?or(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Ht(d);d.min=o[c].min,d.max=d.min+f}):iD(n,t.layoutBox,o)&&or(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Ht(o[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});let i=Rl();Cc(i,o,t.layoutBox);let s=Rl();a?Cc(s,e.applyTransform(r,!0),t.measuredBox):Cc(s,o,t.layoutBox);let l=!dS(i),u=!1;if(!e.resumeFrom){let c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){let{snapshot:d,layout:f}=c;if(d&&f){let p=$e();Sc(p,t.layoutBox,d.layoutBox);let g=$e();Sc(g,o,f.layoutBox),fS(p,g)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function dq(e){Jo.value&&Pl.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function fq(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function pq(e){e.clearSnapshot()}function QA(e){e.clearMeasurements()}function ZA(e){e.isLayoutDirty=!1}function mq(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function JA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function gq(e){e.resolveTargetDelta()}function hq(e){e.calcProjection()}function vq(e){e.resetSkewAndRotation()}function xq(e){e.removeLeadSnapshot()}function eD(e,t,o){e.translate=ke(t.translate,0,o),e.scale=ke(t.scale,1,o),e.origin=t.origin,e.originPoint=t.originPoint}function tD(e,t,o,r){e.min=ke(t.min,o.min,r),e.max=ke(t.max,o.max,r)}function yq(e,t,o,r){tD(e.x,t.x,o.x,r),tD(e.y,t.y,o.y,r)}function wq(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Cq={duration:.45,ease:[.4,0,.1,1]},oD=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),rD=oD("applewebkit/")&&!oD("chrome/")?Math.round:mt;function nD(e){e.min=rD(e.min),e.max=rD(e.max)}function Sq(e){nD(e.x),nD(e.y)}function iD(e,t,o){return e==="position"||e==="preserve-aspect"&&!gA(pS(t),pS(o),.2)}function bq(e){return e!==e.root&&e.scroll?.wasRoot}var sD=kv({attachResizeListener:(e,t)=>$a(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var vS={current:void 0},Mv=kv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!vS.current){let e=new sD({});e.mount(window),e.setOptions({layoutScroll:!0}),vS.current=e}return vS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var lD={pan:{Feature:Rv},drag:{Feature:bv,ProjectionNode:Mv,MeasureLayout:Iv}};function uD(e,t,o){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",o==="Start");let n="onHover"+o,a=r[n];a&&Le.postRender(()=>a(t,Ka(t)))}var Ev=class extends Kt{mount(){let{current:t}=this.node;t&&(this.unmount=UC(t,(o,r)=>(uD(this.node,r,"Start"),n=>uD(this.node,n,"End"))))}unmount(){}};var Av=class extends Kt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Rn($a(this.node.current,"focus",()=>this.onFocus()),$a(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function cD(e,t,o){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",o==="Start");let n="onTap"+(o==="End"?"":o),a=r[n];a&&Le.postRender(()=>a(t,Ka(t)))}var Dv=class extends Kt{mount(){let{current:t}=this.node;t&&(this.unmount=WC(t,(o,r)=>(cD(this.node,r,"Start"),(n,{success:a})=>cD(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var yS=new WeakMap,xS=new WeakMap,Rq=e=>{let t=yS.get(e.target);t&&t(e)},Iq=e=>{e.forEach(Rq)};function Pq({root:e,...t}){let o=e||document;xS.has(o)||xS.set(o,{});let r=xS.get(o),n=JSON.stringify(t);return r[n]||(r[n]=new IntersectionObserver(Iq,{root:e,...t})),r[n]}function dD(e,t,o){let r=Pq(t);return yS.set(e,o),r.observe(e),()=>{yS.delete(e),r.unobserve(e)}}var Lq={some:0,all:1},Nv=class extends Kt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:o,margin:r,amount:n="some",once:a}=t,i={root:o?o.current:void 0,rootMargin:r,threshold:typeof n=="number"?n:Lq[n]},s=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return dD(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:o}=this.node;["amount","margin","root"].some(Tq(t,o))&&this.startObserver()}unmount(){}};function Tq({viewport:e={}},{viewport:t={}}={}){return o=>e[o]!==t[o]}var fD={inView:{Feature:Nv},tap:{Feature:Dv},focus:{Feature:Av},hover:{Feature:Ev}};var pD={layout:{ProjectionNode:Mv,MeasureLayout:Iv}};var mD={...lA,...fD,...lD,...pD};var Be=FE(mD,JE);var Pc=R(M(),1);function Lc(e){let t=ia(()=>er(e)),{isStatic:o}=(0,Pc.useContext)(Ji);if(o){let[,r]=(0,Pc.useState)(e);(0,Pc.useEffect)(()=>t.on("change",r),[])}return t}function Ov(e,t){let o=Lc(t()),r=()=>o.set(t());return r(),Qu(()=>{let n=()=>Le.preRender(r,!1,!0),a=e.map(i=>i.on("change",n));return()=>{a.forEach(i=>i()),wo(r)}}),o}function gD(e){vl.current=[],e();let t=Ov(vl.current,e);return vl.current=void 0,t}function wS(e,t,o,r){if(typeof e=="function")return gD(e);let n=typeof t=="function"?t:jC(t,o,r);return Array.isArray(e)?hD(e,n):hD([e],([a])=>n(a))}function hD(e,t){let o=ia(()=>[]);return Ov(e,()=>{o.length=0;let r=e.length;for(let n=0;n<r;n++)o[n]=e[n].get();return t(o)})}function Vp(e){return typeof e=="object"&&!Array.isArray(e)}function Fv(e,t,o,r){return typeof e=="string"&&Vp(t)?Rp(e,o,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function vD(e,t,o){return e*(t+1)}function CS(e,t,o,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?o:t.startsWith("<")?Math.max(0,o+parseFloat(t.slice(1))):r.get(t)??e}function kq(e,t,o){for(let r=0;r<e.length;r++){let n=e[r];n.at>t&&n.at<o&&(bn(e,n),r--)}}function xD(e,t,o,r,n,a){kq(e,n,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:ke(n,a,r[i]),easing:np(o,i)})}function yD(e,t){for(let o=0;o<e.length;o++)e[o]=e[o]/(t+1)}function wD(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Mq="easeInOut",Eq=20;function bD(e,{defaultTransition:t={},...o}={},r,n){let a=t.duration||.3,i=new Map,s=new Map,l={},u=new Map,c=0,d=0,f=0;for(let p=0;p<e.length;p++){let g=e[p];if(typeof g=="string"){u.set(g,d);continue}else if(!Array.isArray(g)){u.set(g.name,CS(d,g.at,c,u));continue}let[m,x,h={}]=g;h.at!==void 0&&(d=CS(d,h.at,c,u));let v=0,y=(w,C,b,S=0,I=0)=>{let L=Aq(w),{delay:T=0,times:k=mp(L),type:E="keyframes",repeat:_,repeatType:D,repeatDelay:z=0,...F}=C,{ease:O=t.ease||"easeOut",duration:B}=C,A=typeof T=="function"?T(S,I):T,te=L.length,ae=ml(E)?E:n?.[E||"keyframes"];if(te<=2&&ae){let Y=100;if(te===2&&Oq(L)){let ne=L[1]-L[0];Y=Math.abs(ne)}let ce={...F};B!==void 0&&(ce.duration=bt(B));let U=dp(ce,Y,ae);O=U.ease,B=U.duration}B??(B=a);let V=d+A;k.length===1&&k[0]===0&&(k[1]=1);let Q=k.length-L.length;if(Q>0&&pp(k,Q),L.length===1&&L.unshift(null),_){io(_<Eq,"Repeat count too high, must be less than 20","repeat-count-high"),B=vD(B,_);let Y=[...L],ce=[...k];O=Array.isArray(O)?[...O]:[O];let U=[...O];for(let ne=0;ne<_;ne++){L.push(...Y);for(let he=0;he<Y.length;he++)k.push(ce[he]+(ne+1)),O.push(he===0?"linear":np(U,he-1))}yD(k,_)}let oe=V+B;xD(b,L,O,k,V,oe),v=Math.max(A+B,v),f=Math.max(oe,f)};if(Ve(m)){let w=CD(m,s);y(x,h,SD("default",w))}else{let w=Fv(m,x,r,l),C=w.length;for(let b=0;b<C;b++){x=x,h=h;let S=w[b],I=CD(S,s);for(let L in x)y(x[L],Dq(h,L),SD(L,I),b,C)}}c=d,d+=v}return s.forEach((p,g)=>{for(let m in p){let x=p[m];x.sort(wD);let h=[],v=[],y=[];for(let C=0;C<x.length;C++){let{at:b,value:S,easing:I}=x[C];h.push(S),v.push(Br(0,f,b)),y.push(I||"easeOut")}v[0]!==0&&(v.unshift(0),h.unshift(h[0]),y.unshift(Mq)),v[v.length-1]!==1&&(v.push(1),h.push(null)),i.has(g)||i.set(g,{keyframes:{},transition:{}});let w=i.get(g);w.keyframes[m]=h,w.transition[m]={...t,duration:f,ease:y,times:v,...o}}}),i}function CD(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function SD(e,t){return t[e]||(t[e]=[]),t[e]}function Aq(e){return Array.isArray(e)?e:[e]}function Dq(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Nq=e=>typeof e=="number",Oq=e=>e.every(Nq);function Fq(e,t){return e in t}var _v=class extends gc{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,o){if(Fq(o,t)){let r=t[o];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,o){delete o.output[t]}measureInstanceViewportBox(){return $e()}build(t,o){Object.assign(t.output,o)}renderInstance(t,{output:o}){Object.assign(t,o)}sortInstanceNodePosition(){return 0}};function RD(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},o=wl(e)&&!Lp(e)?new xc(t):new vc(t);o.mount(e),ns.set(e,o)}function ID(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},o=new _v(t);o.mount(e),ns.set(e,o)}function _q(e,t){return Ve(e)||typeof e=="number"||typeof e=="string"&&!Vp(t)}function Vv(e,t,o,r){let n=[];if(_q(e,t))n.push(Pv(e,Vp(t)&&t.default||t,o&&(o.default||o)));else{let a=Fv(e,t,r),i=a.length;io(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];io(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");let u=l instanceof Element?RD:ID;ns.has(l)||u(l);let c=ns.get(l),d={...o};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),n.push(...wc(c,{...t,transition:d},{}))}}return n}function PD(e,t,o){let r=[];return bD(e,t,o,{spring:Va}).forEach(({keyframes:a,transition:i},s)=>{r.push(...Vv(s,a,i))}),r}function Vq(e){return Array.isArray(e)&&e.some(Array.isArray)}function LD(e){function t(o,r,n){let a=[],i;if(Vq(o))a=PD(o,r,e);else{let{onComplete:l,...u}=n||{};typeof l=="function"&&(i=l),a=Vv(o,r,u,e)}let s=new xp(a);return i&&s.finished.then(i),e&&(e.animations.push(s),s.finished.then(()=>{bn(e.animations,s)})),s}return t}var SS=LD();var Kwe=K("",{variants:{hover:{lift:["transition-all duration-200 ease-out","hover:-translate-y-0.5","hover:shadow-md"],glow:["transition-all duration-300 ease-out","hover:shadow-lg","hover:shadow-primary/20"],scale:["transition-transform duration-200 ease-out","hover:scale-105","active:scale-95"],brightness:["transition-all duration-200 ease-out","hover:brightness-110","active:brightness-95"],border:["transition-all duration-200 ease-out","hover:border-primary/50"]},focus:{ring:["focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary/50","focus-visible:ring-offset-2"],glow:["focus:outline-none","focus-visible:shadow-lg","focus-visible:shadow-primary/30"],border:["focus:outline-none","focus-visible:border-primary","focus-visible:border-2"]},active:{scale:["active:scale-95","transition-transform duration-100"],darken:["active:brightness-90","transition-all duration-100"],depress:["active:translate-y-0.5","active:shadow-sm","transition-all duration-100"]},cursor:{pointer:"cursor-pointer",grab:"cursor-grab active:cursor-grabbing",text:"cursor-text",wait:"cursor-wait",help:"cursor-help",notAllowed:"cursor-not-allowed"}},defaultVariants:{hover:"lift",focus:"ring",active:"scale",cursor:"pointer"}}),Tn={smooth:{type:"spring",stiffness:260,damping:20},bouncy:{type:"spring",stiffness:300,damping:15},stiff:{type:"spring",stiffness:400,damping:25},gentle:{type:"spring",stiffness:150,damping:15}},Bv={lift:{y:-2,transition:Tn.smooth},scale:{scale:1.05,transition:Tn.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:Tn.smooth},rotate:{rotate:2,transition:Tn.bouncy}},TD={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},Xwe={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:Tn.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:Tn.smooth}},Ywe={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:Tn.smooth}}},Qwe={fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3}},slideUp:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:Tn.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:Tn.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:Tn.smooth}},kD={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var Zwe={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:Tn.bouncy};var is=R(N()),MD=K("rounded-lg border bg-card text-card-foreground shadow-sm dark:shadow-gray-900/20 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 transition-all duration-200",{variants:{variant:{default:"",outline:"border border-border shadow-none bg-transparent dark:border-gray-700 dark:bg-transparent dark:text-gray-200",filled:"border-none bg-secondary dark:bg-gray-800 dark:text-gray-100 dark:shadow-inner dark:shadow-gray-950/10",elevated:"border-none shadow-md dark:shadow-lg dark:shadow-gray-900/30 dark:bg-gray-850 dark:text-gray-100",gradient:"border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",glass:"border border-white/20 bg-white/10 backdrop-blur-md dark:border-gray-700/30 dark:bg-gray-800/10"},size:{default:"",sm:"",lg:"",xl:""},radius:{default:"rounded-lg",sm:"rounded-md",lg:"rounded-xl",full:"rounded-3xl",none:"rounded-none"},interactive:{true:"cursor-pointer hover:shadow-lg hover:border-primary/20 dark:hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm",false:""}},defaultVariants:{variant:"default",size:"default",radius:"default"}}),ED=Ll.forwardRef(({className:e,variant:t,size:o,radius:r,interactive:n,microInteraction:a="lift",...i},s)=>{if(n&&a!=="none"){let l={whileHover:a==="scale"?Bv.scale:a==="glow"?Bv.glow:Bv.lift,whileTap:TD.scale};return(0,is.jsx)(Be.div,{ref:s,className:P("moonui-theme",MD({variant:t,size:o,radius:r,interactive:n,className:e})),...l,...i})}return(0,is.jsx)("div",{ref:s,className:P("moonui-theme",MD({variant:t,size:o,radius:r,interactive:n,className:e})),...i})});ED.displayName="Card";var AD=Ll.forwardRef(({className:e,...t},o)=>(0,is.jsx)("div",{ref:o,className:P("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));AD.displayName="CardHeader";var DD=Ll.forwardRef(({className:e,...t},o)=>(0,is.jsx)("h3",{ref:o,className:P("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));DD.displayName="CardTitle";var ND=Ll.forwardRef(({className:e,...t},o)=>(0,is.jsx)("p",{ref:o,className:P("moonui-theme","text-sm text-muted-foreground",e),...t}));ND.displayName="CardDescription";var OD=Ll.forwardRef(({className:e,...t},o)=>(0,is.jsx)("div",{ref:o,className:P("moonui-theme","p-6 pt-0",e),...t}));OD.displayName="CardContent";var FD=Ll.forwardRef(({className:e,...t},o)=>(0,is.jsx)("div",{ref:o,className:P("moonui-theme","flex items-center p-6 pt-0",e),...t}));FD.displayName="CardFooter";var mN=R(M());function Te(e){let 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 so(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Hv(e,t){let o=Te(e);if(isNaN(t))return so(e,NaN);if(!t)return o;let r=o.getDate(),n=so(e,o.getTime());n.setMonth(o.getMonth()+t+1,0);let a=n.getDate();return r>=a?n:(o.setFullYear(n.getFullYear(),n.getMonth(),r),o)}var Bq=Math.pow(10,8)*24*60*60*1e3,dCe=-Bq,Uv=6048e5,_D=864e5;var Hq=3600;var VD=Hq*24,fCe=VD*7,Uq=VD*365.2425,zq=Uq/12,pCe=zq*3;var Gq={};function da(){return Gq}function kn(e,t){let o=da(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=Te(e),a=n.getDay(),i=(a<r?7:0)+a-r;return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}function Tl(e){return kn(e,{weekStartsOn:1})}function zv(e){let t=Te(e),o=t.getFullYear(),r=so(e,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);let n=Tl(r),a=so(e,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);let i=Tl(a);return t.getTime()>=n.getTime()?o+1:t.getTime()>=i.getTime()?o:o-1}function Tc(e){let t=Te(e);return t.setHours(0,0,0,0),t}function bS(e){let t=Te(e),o=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return o.setUTCFullYear(t.getFullYear()),+e-+o}function BD(e,t){let o=Tc(e),r=Tc(t),n=+o-bS(o),a=+r-bS(r);return Math.round((n-a)/_D)}function HD(e){let t=zv(e),o=so(e,0);return o.setFullYear(t,0,4),o.setHours(0,0,0,0),Tl(o)}function UD(e){return so(e,Date.now())}function kl(e,t){let o=Tc(e),r=Tc(t);return+o==+r}function zD(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Gv(e){if(!zD(e)&&typeof e!="number")return!1;let t=Te(e);return!isNaN(Number(t))}function GD(e){let t=Te(e),o=t.getMonth();return t.setFullYear(t.getFullYear(),o+1,0),t.setHours(23,59,59,999),t}function Wv(e,t){let o=Te(e.start),r=Te(e.end),n=+o>+r,a=n?+o:+r,i=n?r:o;i.setHours(0,0,0,0);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,n=!n);let l=[];for(;+i<=a;)l.push(Te(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return n?l.reverse():l}function WD(e){let t=Te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function jD(e){let t=Te(e),o=so(e,0);return o.setFullYear(t.getFullYear(),0,1),o.setHours(0,0,0,0),o}function qD(e,t){let o=da(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=Te(e),a=n.getDay(),i=(a<r?-7:0)+6-(a-r);return n.setDate(n.getDate()+i),n.setHours(23,59,59,999),n}var Wq={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"}},$D=(e,t,o)=>{let r,n=Wq[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),o?.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};function jv(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var jq={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$q={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},KD={date:jv({formats:jq,defaultWidth:"full"}),time:jv({formats:qq,defaultWidth:"full"}),dateTime:jv({formats:$q,defaultWidth:"full"})};var Kq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},XD=(e,t,o,r)=>Kq[e];function kc(e){return(t,o)=>{let r=o?.context?String(o.context):"standalone",n;if(r==="formatting"&&e.formattingValues){let i=e.defaultFormattingWidth||e.defaultWidth,s=o?.width?String(o.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{let i=e.defaultWidth,s=o?.width?String(o.width):e.defaultWidth;n=e.values[s]||e.values[i]}let a=e.argumentCallback?e.argumentCallback(t):t;return n[a]}}var Xq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Yq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qq={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"]},Zq={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"]},Jq={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"}},e$={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"}},t$=(e,t)=>{let o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},YD={ordinalNumber:t$,era:kc({values:Xq,defaultWidth:"wide"}),quarter:kc({values:Yq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:kc({values:Qq,defaultWidth:"wide"}),day:kc({values:Zq,defaultWidth:"wide"}),dayPeriod:kc({values:Jq,defaultWidth:"wide",formattingValues:e$,defaultFormattingWidth:"wide"})};function Mc(e){return(t,o={})=>{let r=o.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(n);if(!a)return null;let i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?r$(s,d=>d.test(i)):o$(s,d=>d.test(i)),u;u=e.valueCallback?e.valueCallback(l):l,u=o.valueCallback?o.valueCallback(u):u;let c=t.slice(i.length);return{value:u,rest:c}}}function o$(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function r$(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function QD(e){return(t,o={})=>{let r=t.match(e.matchPattern);if(!r)return null;let n=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=o.valueCallback?o.valueCallback(i):i;let s=t.slice(n.length);return{value:i,rest:s}}}var n$=/^(\d+)(th|st|nd|rd)?/i,a$=/\d+/i,i$={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},s$={any:[/^b/i,/^(a|c)/i]},l$={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u$={any:[/1/i,/2/i,/3/i,/4/i]},c$={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},d$={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]},f$={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},p$={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]},m$={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},g$={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}},ZD={ordinalNumber:QD({matchPattern:n$,parsePattern:a$,valueCallback:e=>parseInt(e,10)}),era:Mc({matchPatterns:i$,defaultMatchWidth:"wide",parsePatterns:s$,defaultParseWidth:"any"}),quarter:Mc({matchPatterns:l$,defaultMatchWidth:"wide",parsePatterns:u$,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Mc({matchPatterns:c$,defaultMatchWidth:"wide",parsePatterns:d$,defaultParseWidth:"any"}),day:Mc({matchPatterns:f$,defaultMatchWidth:"wide",parsePatterns:p$,defaultParseWidth:"any"}),dayPeriod:Mc({matchPatterns:m$,defaultMatchWidth:"any",parsePatterns:g$,defaultParseWidth:"any"})};var RS={code:"en-US",formatDistance:$D,formatLong:KD,formatRelative:XD,localize:YD,match:ZD,options:{weekStartsOn:0,firstWeekContainsDate:1}};function JD(e){let t=Te(e);return BD(t,jD(t))+1}function eN(e){let t=Te(e),o=+Tl(t)-+HD(t);return Math.round(o/Uv)+1}function qv(e,t){let o=Te(e),r=o.getFullYear(),n=da(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=so(e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);let s=kn(i,t),l=so(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);let u=kn(l,t);return o.getTime()>=s.getTime()?r+1:o.getTime()>=u.getTime()?r:r-1}function tN(e,t){let o=da(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=qv(e,t),a=so(e,0);return a.setFullYear(n,0,r),a.setHours(0,0,0,0),kn(a,t)}function oN(e,t){let o=Te(e),r=+kn(o,t)-+tN(o,t);return Math.round(r/Uv)+1}function He(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var Xa={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return He(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):He(o+1,2)},d(e,t){return He(e.getDate(),t.length)},a(e,t){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(e,t){return He(e.getHours()%12||12,t.length)},H(e,t){return He(e.getHours(),t.length)},m(e,t){return He(e.getMinutes(),t.length)},s(e,t){return He(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return He(n,t.length)}};var Ec={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},IS={G:function(e,t,o){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"});case"GGGGG":return o.era(r,{width:"narrow"});case"GGGG":default:return o.era(r,{width:"wide"})}},y:function(e,t,o){if(t==="yo"){let r=e.getFullYear(),n=r>0?r:1-r;return o.ordinalNumber(n,{unit:"year"})}return Xa.y(e,t)},Y:function(e,t,o,r){let n=qv(e,r),a=n>0?n:1-n;if(t==="YY"){let i=a%100;return He(i,2)}return t==="Yo"?o.ordinalNumber(a,{unit:"year"}):He(a,t.length)},R:function(e,t){let o=zv(e);return He(o,t.length)},u:function(e,t){let o=e.getFullYear();return He(o,t.length)},Q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return He(r,2);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return He(r,2);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,o){let r=e.getMonth();switch(t){case"M":case"MM":return Xa.M(e,t);case"Mo":return o.ordinalNumber(r+1,{unit:"month"});case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,o){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return He(r+1,2);case"Lo":return o.ordinalNumber(r+1,{unit:"month"});case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,o,r){let n=oN(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):He(n,t.length)},I:function(e,t,o){let r=eN(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):He(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):Xa.d(e,t)},D:function(e,t,o){let r=JD(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):He(r,t.length)},E:function(e,t,o){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"});case"EEEE":default:return o.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,o,r){let n=e.getDay(),a=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return He(a,2);case"eo":return o.ordinalNumber(a,{unit:"day"});case"eee":return o.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,o,r){let n=e.getDay(),a=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return He(a,t.length);case"co":return o.ordinalNumber(a,{unit:"day"});case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,o){let r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return He(n,t.length);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return o.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(r,{width:"short",context:"formatting"});case"iiii":default:return o.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,o){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),n;switch(r===12?n=Ec.noon:r===0?n=Ec.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),n;switch(r>=17?n=Ec.evening:r>=12?n=Ec.afternoon:r>=4?n=Ec.morning:n=Ec.night,t){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,o){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),o.ordinalNumber(r,{unit:"hour"})}return Xa.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):Xa.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):He(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):He(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):Xa.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):Xa.s(e,t)},S:function(e,t){return Xa.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return nN(r);case"XXXX":case"XX":return Ml(r);case"XXXXX":case"XXX":default:return Ml(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return nN(r);case"xxxx":case"xx":return Ml(r);case"xxxxx":case"xxx":default:return Ml(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+rN(r,":");case"OOOO":default:return"GMT"+Ml(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+rN(r,":");case"zzzz":default:return"GMT"+Ml(r,":")}},t:function(e,t,o){let r=Math.trunc(e.getTime()/1e3);return He(r,t.length)},T:function(e,t,o){let r=e.getTime();return He(r,t.length)}};function rN(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),a=r%60;return a===0?o+String(n):o+String(n)+t+He(a,2)}function nN(e,t){return e%60===0?(e>0?"-":"+")+He(Math.abs(e)/60,2):Ml(e,t)}function Ml(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=He(Math.trunc(r/60),2),a=He(r%60,2);return o+n+t+a}var aN=(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"})}},iN=(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"})}},h$=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return aN(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",aN(r,t)).replace("{{time}}",iN(n,t))},sN={p:iN,P:h$};var v$=/^D+$/,x$=/^Y+$/,y$=["D","DD","YY","YYYY"];function lN(e){return v$.test(e)}function uN(e){return x$.test(e)}function cN(e,t,o){let r=w$(e,t,o);if(console.warn(r),y$.includes(e))throw new RangeError(r)}function w$(e,t,o){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var C$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,S$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,b$=/^'([^]*?)'?$/,R$=/''/g,I$=/[a-zA-Z]/;function Mn(e,t,o){let r=da(),n=o?.locale??r.locale??RS,a=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Te(e);if(!Gv(s))throw new RangeError("Invalid time value");let l=t.match(S$).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=sN[d];return f(c,n.formatLong)}return c}).join("").match(C$).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:P$(c)};if(IS[d])return{isToken:!0,value:c};if(d.match(I$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:c}});n.localize.preprocessor&&(l=n.localize.preprocessor(s,l));let u={firstWeekContainsDate:a,weekStartsOn:i,locale:n};return l.map(c=>{if(!c.isToken)return c.value;let d=c.value;(!o?.useAdditionalWeekYearTokens&&uN(d)||!o?.useAdditionalDayOfYearTokens&&lN(d))&&cN(d,t,String(e));let f=IS[d[0]];return f(s,d,n.localize,u)}).join("")}function P$(e){let t=e.match(b$);return t?t[1].replace(R$,"'"):e}function PS(e){return Te(e).getDay()}function dN(e,t){let o=Te(e),r=Te(t);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function fN(e){return kl(e,UD(e))}function pN(e,t){return Hv(e,-t)}var Fo=R(N());function Bp({mode:e="single",selected:t,onSelect:o,disabled:r,showOutsideDays:n=!1,className:a,classNames:i,numberOfMonths:s=1,defaultMonth:l,...u}){let[c,d]=mN.useState(l||t&&t||new Date),f=[{short:"S",full:"Sunday"},{short:"M",full:"Monday"},{short:"T",full:"Tuesday"},{short:"W",full:"Wednesday"},{short:"T",full:"Thursday"},{short:"F",full:"Friday"},{short:"S",full:"Saturday"}],p=()=>{d(pN(c,1))},g=()=>{d(Hv(c,1))},m=b=>{if(!r?.(b)){if(e==="single")o?.(b);else if(e==="range"){let S=t;!S?.from||S.from&&S.to?o?.({from:b,to:void 0}):b<S.from?o?.({from:b,to:S.from}):o?.({from:S.from,to:b})}}},x=b=>{if(!t)return!1;if(e==="single")return kl(b,t);if(e==="range"){let S=t;return S.from&&S.to?b>=S.from&&b<=S.to:S.from?kl(b,S.from):!1}return!1},h=b=>{if(e!=="range"||!t)return!1;let S=t;return S.from?kl(b,S.from):!1},v=b=>{if(e!=="range"||!t)return!1;let S=t;return S.to?kl(b,S.to):!1},y=b=>{if(e!=="range"||!t)return!1;let S=t;return!S.from||!S.to?!1:b>S.from&&b<S.to},C=(()=>{let b=WD(c),S=GD(c),I=Wv({start:b,end:S}),L=PS(b),T=[];if(L>0&&n){let D=kn(b),z=new Date(b);z.setDate(z.getDate()-1),T.push(...Wv({start:D,end:z}))}let k=PS(S),E=[];if(k<6&&n){let D=new Date(S);D.setDate(D.getDate()+1);let z=qD(S);E.push(...Wv({start:D,end:z}))}let _=[];if(!n&&L>0)for(let D=0;D<L;D++)_.push(null);return[...T,..._,...I,...E]})();return(0,Fo.jsxs)("div",{className:P("moonui-theme","p-0",a),children:[(0,Fo.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,Fo.jsx)("button",{onClick:p,className:P("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,Fo.jsx)(wn,{className:"h-5 w-5"})}),(0,Fo.jsx)("h2",{className:"text-base font-medium",children:Mn(c,"MMMM yyyy")}),(0,Fo.jsx)("button",{onClick:g,className:P("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,Fo.jsx)(No,{className:"h-5 w-5"})})]}),(0,Fo.jsxs)("div",{className:"px-6 pb-4",children:[(0,Fo.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((b,S)=>(0,Fo.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:b.full,children:b.short},`weekday-${S}`))}),(0,Fo.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((b,S)=>{if(!b)return(0,Fo.jsx)("div",{className:"h-10 w-10"},`empty-${S}`);let I=!dN(b,c),L=r?.(b)||!1,T=x(b),k=fN(b),E=h(b),_=v(b),D=y(b);return(0,Fo.jsx)("button",{onClick:()=>m(b),disabled:L,className:P("h-10 w-10 p-0 font-normal","inline-flex items-center justify-center rounded-lg","hover:bg-muted transition-colors text-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",I&&"text-muted-foreground/50",L&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",T&&!D&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",k&&"font-semibold relative after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-primary",D&&"bg-accent/30 text-accent-foreground rounded-none",E&&"rounded-r-none",_&&"rounded-l-none"),type:"button",children:Mn(b,"d")},b.toISOString())})})]})]})}Bp.displayName="Calendar";var El=R(M());var ss=R(N()),L$=e=>{let t={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/};for(let[o,r]of Object.entries(t))if(r.test(e))return o;return"unknown"},gN=(e,t)=>{let o=e.replace(/\s+/g,""),r=t==="amex"?[4,6,5]:[4,4,4,4],n="",a=0;for(let i of r){if(a>=o.length)break;n&&(n+=" "),n+=o.slice(a,a+i),a+=i}return n},hN=El.forwardRef(({className:e,value:t="",onChange:o,showIcon:r=!0,size:n,...a},i)=>{let[s,l]=El.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=L$(d);l(f);let p=f==="amex"?15:16,g=d.slice(0,p),m=gN(g,f);o?.(g,f),c.target.value=m};return(0,ss.jsxs)("div",{className:"relative",children:[(0,ss.jsx)(bo,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:gN(t,s),onChange:u,className:P(r&&"pl-10",e),...a}),r&&(0,ss.jsx)(Rf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});hN.displayName="CardNumberInput";var vN=El.forwardRef(({className:e,value:t="",onChange:o,size:r,...n},a)=>{let i=l=>{let u=l.target.value.replace(/\D/g,"");if(u.length>=2){let d=parseInt(u.slice(0,2));d>12?u="12"+u.slice(2):d===0&&(u="01"+u.slice(2))}u=u.slice(0,4);let c=u;u.length>=2&&(c=u.slice(0,2)+"/"+u.slice(2)),o?.(u),l.target.value=c},s=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return(0,ss.jsx)(bo,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...n})});vN.displayName="CardExpiryInput";var xN=El.forwardRef(({className:e,value:t="",onChange:o,cardType:r="unknown",size:n,...a},i)=>{let s=r==="amex"?4:3;return(0,ss.jsx)(bo,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-csc",placeholder:r==="amex"?"1234":"123",value:t,onChange:u=>{let c=u.target.value.replace(/\D/g,"").slice(0,s);o?.(c)},maxLength:s,className:e,...a})});xN.displayName="CardCVCInput";var yN=El.forwardRef(({className:e,value:t="",onChange:o,format:r="US",size:n,...a},i)=>{let s=u=>{let c=u.target.value;switch(r){case"US":c=c.replace(/\D/g,"").slice(0,5);break;case"CA":c=c.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6),c.length>=3&&(c=c.slice(0,3)+" "+c.slice(3));break;case"UK":c=c.toUpperCase().replace(/[^A-Z0-9\s]/g,"").slice(0,8);break;default:c=c.slice(0,10)}o?.(c.replace(/\s/g,"")),u.target.value=c};return(0,ss.jsx)(bo,{ref:i,type:"text",autoComplete:"postal-code",placeholder:(()=>{switch(r){case"US":return"12345";case"CA":return"K1A 0B1";case"UK":return"SW1A 1AA";default:return"Postal Code"}})(),value:t,onChange:s,className:e,...a})});yN.displayName="CardZipInput";var Rt=R(M());var Ur=R(M(),1);function T$(e){return Object.prototype.toString.call(e)==="[object Object]"}function wN(e){return T$(e)||Array.isArray(e)}function SN(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function $v(e,t){let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;let n=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return n!==a?!1:o.every(i=>{let s=e[i],l=t[i];return typeof s=="function"?`${s}`==`${l}`:!wN(s)||!wN(l)?s===l:$v(s,l)})}function CN(e){return e.concat().sort((t,o)=>t.name>o.name?1:-1).map(t=>t.options)}function bN(e,t){if(e.length!==t.length)return!1;let o=CN(e),r=CN(t);return o.every((n,a)=>{let i=r[a];return $v(n,i)})}function kS(e){return typeof e=="number"}function LS(e){return typeof e=="string"}function Kv(e){return typeof e=="boolean"}function RN(e){return Object.prototype.toString.call(e)==="[object Object]"}function gt(e){return Math.abs(e)}function MS(e){return Math.sign(e)}function Up(e,t){return gt(e-t)}function k$(e,t){if(e===0||t===0||gt(e)<=gt(t))return 0;let o=Up(gt(e),gt(t));return gt(o/e)}function M$(e){return Math.round(e*100)/100}function zp(e){return Gp(e).map(Number)}function En(e){return e[jp(e)]}function jp(e){return Math.max(0,e.length-1)}function ES(e,t){return t===jp(e)}function IN(e,t=0){return Array.from(Array(e),(o,r)=>t+r)}function Gp(e){return Object.keys(e)}function PN(e,t){return[e,t].reduce((o,r)=>(Gp(r).forEach(n=>{let a=o[n],i=r[n],s=RN(a)&&RN(i);o[n]=s?PN(a,i):i}),o),{})}function TS(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function E$(e,t){let o={start:r,center:n,end:a};function r(){return 0}function n(l){return a(l)/2}function a(l){return t-l}function i(l,u){return LS(e)?o[e](l):e(t,l,u)}return{measure:i}}function Wp(){let e=[];function t(n,a,i,s={passive:!0}){let l;if("addEventListener"in n)n.addEventListener(a,i,s),l=()=>n.removeEventListener(a,i,s);else{let u=n;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),r}function o(){e=e.filter(n=>n())}let r={add:t,clear:o};return r}function A$(e,t,o,r){let n=Wp(),a=1e3/60,i=null,s=0,l=0;function u(){n.add(e,"visibilitychange",()=>{e.hidden&&g()})}function c(){p(),n.clear()}function d(x){if(!l)return;i||(i=x,o(),o());let h=x-i;for(i=x,s+=h;s>=a;)o(),s-=a;let v=s/a;r(v),l&&(l=t.requestAnimationFrame(d))}function f(){l||(l=t.requestAnimationFrame(d))}function p(){t.cancelAnimationFrame(l),i=null,s=0,l=0}function g(){i=null,s=0}return{init:u,destroy:c,start:f,stop:p,update:o,render:r}}function D$(e,t){let o=t==="rtl",r=e==="y",n=r?"y":"x",a=r?"x":"y",i=!r&&o?-1:1,s=c(),l=d();function u(g){let{height:m,width:x}=g;return r?m:x}function c(){return r?"top":o?"right":"left"}function d(){return r?"bottom":o?"left":"right"}function f(g){return g*i}return{scroll:n,cross:a,startEdge:s,endEdge:l,measureSize:u,direction:f}}function Al(e=0,t=0){let o=gt(e-t);function r(u){return u<e}function n(u){return u>t}function a(u){return r(u)||n(u)}function i(u){return a(u)?r(u)?e:t:u}function s(u){return o?u-o*Math.ceil((u-t)/o):u}return{length:o,max:t,min:e,constrain:i,reachedAny:a,reachedMax:n,reachedMin:r,removeOffset:s}}function LN(e,t,o){let{constrain:r}=Al(0,e),n=e+1,a=i(t);function i(f){return o?gt((n+f)%n):r(f)}function s(){return a}function l(f){return a=i(f),d}function u(f){return c().set(s()+f)}function c(){return LN(e,s(),o)}let d={get:s,set:l,add:u,clone:c};return d}function N$(e,t,o,r,n,a,i,s,l,u,c,d,f,p,g,m,x,h,v){let{cross:y,direction:w}=e,C=["INPUT","SELECT","TEXTAREA"],b={passive:!1},S=Wp(),I=Wp(),L=Al(50,225).constrain(p.measure(20)),T={mouse:300,touch:400},k={mouse:500,touch:600},E=g?43:25,_=!1,D=0,z=0,F=!1,O=!1,B=!1,A=!1;function te(X){if(!v)return;function Ie(ie){(Kv(v)||v(X,ie))&&ce(ie)}let J=t;S.add(J,"dragstart",ie=>ie.preventDefault(),b).add(J,"touchmove",()=>{},b).add(J,"touchend",()=>{}).add(J,"touchstart",Ie).add(J,"mousedown",Ie).add(J,"touchcancel",ne).add(J,"contextmenu",ne).add(J,"click",he,!0)}function ae(){S.clear(),I.clear()}function V(){let X=A?o:t;I.add(X,"touchmove",U,b).add(X,"touchend",ne).add(X,"mousemove",U,b).add(X,"mouseup",ne)}function Q(X){let Ie=X.nodeName||"";return C.includes(Ie)}function oe(){return(g?k:T)[A?"mouse":"touch"]}function Y(X,Ie){let J=d.add(MS(X)*-1),ie=c.byDistance(X,!g).distance;return g||gt(X)<L?ie:x&&Ie?ie*.5:c.byIndex(J.get(),0).distance}function ce(X){let Ie=TS(X,r);A=Ie,B=g&&Ie&&!X.buttons&&_,_=Up(n.get(),i.get())>=2,!(Ie&&X.button!==0)&&(Q(X.target)||(F=!0,a.pointerDown(X),u.useFriction(0).useDuration(0),n.set(i),V(),D=a.readPoint(X),z=a.readPoint(X,y),f.emit("pointerDown")))}function U(X){if(!TS(X,r)&&X.touches.length>=2)return ne(X);let J=a.readPoint(X),ie=a.readPoint(X,y),ze=Up(J,D),Ke=Up(ie,z);if(!O&&!A&&(!X.cancelable||(O=ze>Ke,!O)))return ne(X);let Lt=a.pointerMove(X);ze>m&&(B=!0),u.useFriction(.3).useDuration(.75),s.start(),n.add(w(Lt)),X.preventDefault()}function ne(X){let J=c.byDistance(0,!1).index!==d.get(),ie=a.pointerUp(X)*oe(),ze=Y(w(ie),J),Ke=k$(ie,ze),Lt=E-10*Ke,Ne=h+Ke/50;O=!1,F=!1,I.clear(),u.useDuration(Lt).useFriction(Ne),l.distance(ze,!g),A=!1,f.emit("pointerUp")}function he(X){B&&(X.stopPropagation(),X.preventDefault(),B=!1)}function xe(){return F}return{init:te,destroy:ae,pointerDown:xe}}function O$(e,t){let r,n;function a(d){return d.timeStamp}function i(d,f){let g=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(TS(d,t)?d:d.touches[0])[g]}function s(d){return r=d,n=d,i(d)}function l(d){let f=i(d)-i(n),p=a(d)-a(r)>170;return n=d,p&&(r=d),f}function u(d){if(!r||!n)return 0;let f=i(n)-i(r),p=a(d)-a(r),g=a(d)-a(n)>170,m=f/p;return p&&!g&>(m)>.1?m:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:i}}function F$(){function e(o){let{offsetTop:r,offsetLeft:n,offsetWidth:a,offsetHeight:i}=o;return{top:r,right:n+a,bottom:r+i,left:n,width:a,height:i}}return{measure:e}}function _$(e){function t(r){return e*(r/100)}return{measure:t}}function V$(e,t,o,r,n,a,i){let s=[e].concat(r),l,u,c=[],d=!1;function f(x){return n.measureSize(i.measure(x))}function p(x){if(!a)return;u=f(e),c=r.map(f);function h(v){for(let y of v){if(d)return;let w=y.target===e,C=r.indexOf(y.target),b=w?u:c[C],S=f(w?e:r[C]);if(gt(S-b)>=.5){x.reInit(),t.emit("resize");break}}}l=new ResizeObserver(v=>{(Kv(a)||a(x,v))&&h(v)}),o.requestAnimationFrame(()=>{s.forEach(v=>l.observe(v))})}function g(){d=!0,l&&l.disconnect()}return{init:p,destroy:g}}function B$(e,t,o,r,n,a){let i=0,s=0,l=n,u=a,c=e.get(),d=0;function f(){let b=r.get()-e.get(),S=!l,I=0;return S?(i=0,o.set(r),e.set(r),I=b):(o.set(e),i+=b/l,i*=u,c+=i,e.add(i),I=c-d),s=MS(I),d=c,C}function p(){let b=r.get()-t.get();return gt(b)<.001}function g(){return l}function m(){return s}function x(){return i}function h(){return y(n)}function v(){return w(a)}function y(b){return l=b,C}function w(b){return u=b,C}let C={direction:m,duration:g,velocity:x,seek:f,settled:p,useBaseFriction:v,useBaseDuration:h,useFriction:w,useDuration:y};return C}function H$(e,t,o,r,n){let a=n.measure(10),i=n.measure(50),s=Al(.1,.99),l=!1;function u(){return!(l||!e.reachedAny(o.get())||!e.reachedAny(t.get()))}function c(p){if(!u())return;let g=e.reachedMin(t.get())?"min":"max",m=gt(e[g]-t.get()),x=o.get()-t.get(),h=s.constrain(m/i);o.subtract(x*h),!p&>(x)<a&&(o.set(e.constrain(o.get())),r.useDuration(25).useBaseFriction())}function d(p){l=!p}return{shouldConstrain:u,constrain:c,toggleActive:d}}function U$(e,t,o,r,n){let a=Al(-t+e,0),i=d(),s=c(),l=f();function u(g,m){return Up(g,m)<=1}function c(){let g=i[0],m=En(i),x=i.lastIndexOf(g),h=i.indexOf(m)+1;return Al(x,h)}function d(){return o.map((g,m)=>{let{min:x,max:h}=a,v=a.constrain(g),y=!m,w=ES(o,m);return y?h:w||u(x,v)?x:u(h,v)?h:v}).map(g=>parseFloat(g.toFixed(3)))}function f(){if(t<=e+n)return[a.max];if(r==="keepSnaps")return i;let{min:g,max:m}=s;return i.slice(g,m)}return{snapsContained:l,scrollContainLimit:s}}function z$(e,t,o){let r=t[0],n=o?r-e:En(t);return{limit:Al(n,r)}}function G$(e,t,o,r){let a=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:l}=Al(a,i);function u(f){return f===1?l(o.get()):f===-1?s(o.get()):!1}function c(f){if(!u(f))return;let p=e*(f*-1);r.forEach(g=>g.add(p))}return{loop:c}}function W$(e){let{max:t,length:o}=e;function r(a){let i=a-t;return o?i/-o:0}return{get:r}}function j$(e,t,o,r,n){let{startEdge:a,endEdge:i}=e,{groupSlides:s}=n,l=d().map(t.measure),u=f(),c=p();function d(){return s(r).map(m=>En(m)[i]-m[0][a]).map(gt)}function f(){return r.map(m=>o[a]-m[a]).map(m=>-gt(m))}function p(){return s(u).map(m=>m[0]).map((m,x)=>m+l[x])}return{snaps:u,snapsAligned:c}}function q$(e,t,o,r,n,a){let{groupSlides:i}=n,{min:s,max:l}=r,u=c();function c(){let f=i(a),p=!e||t==="keepSnaps";return o.length===1?[a]:p?f:f.slice(s,l).map((g,m,x)=>{let h=!m,v=ES(x,m);if(h){let y=En(x[0])+1;return IN(y)}if(v){let y=jp(a)-En(x)[0]+1;return IN(y,En(x)[0])}return g})}return{slideRegistry:u}}function $$(e,t,o,r,n){let{reachedAny:a,removeOffset:i,constrain:s}=r;function l(g){return g.concat().sort((m,x)=>gt(m)-gt(x))[0]}function u(g){let m=e?i(g):s(g),x=t.map((v,y)=>({diff:c(v-m,0),index:y})).sort((v,y)=>gt(v.diff)-gt(y.diff)),{index:h}=x[0];return{index:h,distance:m}}function c(g,m){let x=[g,g+o,g-o];if(!e)return g;if(!m)return l(x);let h=x.filter(v=>MS(v)===m);return h.length?l(h):En(x)-o}function d(g,m){let x=t[g]-n.get(),h=c(x,m);return{index:g,distance:h}}function f(g,m){let x=n.get()+g,{index:h,distance:v}=u(x),y=!e&&a(x);if(!m||y)return{index:h,distance:g};let w=t[h]-v,C=g+c(w,0);return{index:h,distance:C}}return{byDistance:f,byIndex:d,shortcut:c}}function K$(e,t,o,r,n,a,i){function s(d){let f=d.distance,p=d.index!==t.get();a.add(f),f&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(o.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,f){let p=n.byDistance(d,f);s(p)}function u(d,f){let p=t.clone().set(d),g=n.byIndex(p.get(),f);s(g)}return{distance:l,index:u}}function X$(e,t,o,r,n,a,i,s){let l={passive:!0,capture:!0},u=0;function c(p){if(!s)return;function g(m){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;let v=o.findIndex(y=>y.includes(m));kS(v)&&(n.useDuration(0),r.index(v,0),i.emit("slideFocus"))}a.add(document,"keydown",d,!1),t.forEach((m,x)=>{a.add(m,"focus",h=>{(Kv(s)||s(p,h))&&g(x)},l)})}function d(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function Hp(e){let t=e;function o(){return t}function r(l){t=i(l)}function n(l){t+=i(l)}function a(l){t-=i(l)}function i(l){return kS(l)?l:l.get()}return{get:o,set:r,add:n,subtract:a}}function TN(e,t){let o=e.scroll==="x"?i:s,r=t.style,n=null,a=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function s(f){return`translate3d(0px,${f}px,0px)`}function l(f){if(a)return;let p=M$(e.direction(f));p!==n&&(r.transform=o(p),n=p)}function u(f){a=!f}function c(){a||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function Y$(e,t,o,r,n,a,i,s,l){let c=zp(n),d=zp(n).reverse(),f=h().concat(v());function p(S,I){return S.reduce((L,T)=>L-n[T],I)}function g(S,I){return S.reduce((L,T)=>p(L,I)>0?L.concat([T]):L,[])}function m(S){return a.map((I,L)=>({start:I-r[L]+.5+S,end:I+t-.5+S}))}function x(S,I,L){let T=m(I);return S.map(k=>{let E=L?0:-o,_=L?o:0,D=L?"end":"start",z=T[k][D];return{index:k,loopPoint:z,slideLocation:Hp(-1),translate:TN(e,l[k]),target:()=>s.get()>z?E:_}})}function h(){let S=i[0],I=g(d,S);return x(I,o,!1)}function v(){let S=t-i[0]-1,I=g(c,S);return x(I,-o,!0)}function y(){return f.every(({index:S})=>{let I=c.filter(L=>L!==S);return p(I,t)<=.1})}function w(){f.forEach(S=>{let{target:I,translate:L,slideLocation:T}=S,k=I();k!==T.get()&&(L.to(k),T.set(k))})}function C(){f.forEach(S=>S.translate.clear())}return{canLoop:y,clear:C,loop:w,loopPoints:f}}function Q$(e,t,o){let r,n=!1;function a(l){if(!o)return;function u(c){for(let d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(c=>{n||(Kv(o)||o(l,c))&&u(c)}),r.observe(e,{childList:!0})}function i(){r&&r.disconnect(),n=!0}return{init:a,destroy:i}}function Z$(e,t,o,r){let n={},a=null,i=null,s,l=!1;function u(){s=new IntersectionObserver(g=>{l||(g.forEach(m=>{let x=t.indexOf(m.target);n[x]=m}),a=null,i=null,o.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(g=>s.observe(g))}function c(){s&&s.disconnect(),l=!0}function d(g){return Gp(n).reduce((m,x)=>{let h=parseInt(x),{isIntersecting:v}=n[h];return(g&&v||!g&&!v)&&m.push(h),m},[])}function f(g=!0){if(g&&a)return a;if(!g&&i)return i;let m=d(g);return g&&(a=m),g||(i=m),m}return{init:u,destroy:c,get:f}}function J$(e,t,o,r,n,a){let{measureSize:i,startEdge:s,endEdge:l}=e,u=o[0]&&n,c=g(),d=m(),f=o.map(i),p=x();function g(){if(!u)return 0;let v=o[0];return gt(t[s]-v[s])}function m(){if(!u)return 0;let v=a.getComputedStyle(En(r));return parseFloat(v.getPropertyValue(`margin-${l}`))}function x(){return o.map((v,y,w)=>{let C=!y,b=ES(w,y);return C?f[y]+c:b?f[y]+d:w[y+1][s]-v[s]}).map(gt)}return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}function e8(e,t,o,r,n,a,i,s,l){let{startEdge:u,endEdge:c,direction:d}=e,f=kS(o);function p(h,v){return zp(h).filter(y=>y%v===0).map(y=>h.slice(y,y+v))}function g(h){return h.length?zp(h).reduce((v,y,w)=>{let C=En(v)||0,b=C===0,S=y===jp(h),I=n[u]-a[C][u],L=n[u]-a[y][c],T=!r&&b?d(i):0,k=!r&&S?d(s):0,E=gt(L-k-(I+T));return w&&E>t+l&&v.push(y),S&&v.push(h.length),v},[]).map((v,y,w)=>{let C=Math.max(w[y-1]||0);return h.slice(C,v)}):[]}function m(h){return f?p(h,o):g(h)}return{groupSlides:m}}function t8(e,t,o,r,n,a,i){let{align:s,axis:l,direction:u,startIndex:c,loop:d,duration:f,dragFree:p,dragThreshold:g,inViewThreshold:m,slidesToScroll:x,skipSnaps:h,containScroll:v,watchResize:y,watchSlides:w,watchDrag:C,watchFocus:b}=a,S=2,I=F$(),L=I.measure(t),T=o.map(I.measure),k=D$(l,u),E=k.measureSize(L),_=_$(E),D=E$(s,E),z=!d&&!!v,F=d||!!v,{slideSizes:O,slideSizesWithGaps:B,startGap:A,endGap:te}=J$(k,L,T,o,F,n),ae=e8(k,E,x,d,L,T,A,te,S),{snaps:V,snapsAligned:Q}=j$(k,D,L,T,ae),oe=-En(V)+En(B),{snapsContained:Y,scrollContainLimit:ce}=U$(E,oe,Q,v,S),U=z?Y:Q,{limit:ne}=z$(oe,U,d),he=LN(jp(U),c,d),xe=he.clone(),pe=zp(o),X=({dragHandler:vi,scrollBody:hd,scrollBounds:vd,options:{loop:Tr}})=>{Tr||vd.constrain(vi.pointerDown()),hd.seek()},Ie=({scrollBody:vi,translate:hd,location:vd,offsetLocation:Tr,previousLocation:xd,scrollLooper:ky,slideLooper:Pz,dragHandler:Lz,animation:Tz,eventHandler:lP,scrollBounds:kz,options:{loop:uP}},cP)=>{let dP=vi.settled(),Mz=!kz.shouldConstrain(),fP=uP?dP:dP&&Mz,pP=fP&&!Lz.pointerDown();pP&&Tz.stop();let Ez=vd.get()*cP+xd.get()*(1-cP);Tr.set(Ez),uP&&(ky.loop(vi.direction()),Pz.loop()),hd.to(Tr.get()),pP&&lP.emit("settle"),fP||lP.emit("scroll")},J=A$(r,n,()=>X(ou),vi=>Ie(ou,vi)),ie=.68,ze=U[he.get()],Ke=Hp(ze),Lt=Hp(ze),Ne=Hp(ze),Ct=Hp(ze),qn=B$(Ke,Ne,Lt,Ct,f,ie),Mo=$$(d,U,oe,ne,Ct),un=K$(J,he,xe,qn,Mo,Ct,i),Lr=W$(ne),cn=Wp(),$n=Z$(t,o,i,m),{slideRegistry:Kn}=q$(z,v,U,ce,ae,pe),Vm=X$(e,o,Kn,un,qn,cn,i,b),ou={ownerDocument:r,ownerWindow:n,eventHandler:i,containerRect:L,slideRects:T,animation:J,axis:k,dragHandler:N$(k,e,r,n,Ct,O$(k,n),Ke,J,un,qn,Mo,he,i,_,p,g,h,ie,C),eventStore:cn,percentOfView:_,index:he,indexPrevious:xe,limit:ne,location:Ke,offsetLocation:Ne,previousLocation:Lt,options:a,resizeHandler:V$(t,i,n,o,k,y,I),scrollBody:qn,scrollBounds:H$(ne,Ne,Ct,qn,_),scrollLooper:G$(oe,ne,Ne,[Ke,Ne,Lt,Ct]),scrollProgress:Lr,scrollSnapList:U.map(Lr.get),scrollSnaps:U,scrollTarget:Mo,scrollTo:un,slideLooper:Y$(k,E,oe,O,B,V,U,Ne,o),slideFocus:Vm,slidesHandler:Q$(t,i,w),slidesInView:$n,slideIndexes:pe,slideRegistry:Kn,slidesToScroll:ae,target:Ct,translate:TN(k,t)};return ou}function o8(){let e={},t;function o(u){t=u}function r(u){return e[u]||[]}function n(u){return r(u).forEach(c=>c(t,u)),l}function a(u,c){return e[u]=r(u).concat([c]),l}function i(u,c){return e[u]=r(u).filter(d=>d!==c),l}function s(){e={}}let l={init:o,emit:n,off:i,on:a,clear:s};return l}var r8={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function n8(e){function t(a,i){return PN(a,i||{})}function o(a){let i=a.breakpoints||{},s=Gp(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(a,s)}function r(a){return a.map(i=>Gp(i.breakpoints||{})).reduce((i,s)=>i.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:o,optionsMediaQueries:r}}function a8(e){let t=[];function o(a,i){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:o,destroy:r}}function qp(e,t,o){let r=e.ownerDocument,n=r.defaultView,a=n8(n),i=a8(a),s=Wp(),l=o8(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=a,{on:f,off:p,emit:g}=l,m=k,x=!1,h,v=u(r8,qp.globalOptions),y=u(v),w=[],C,b,S;function I(){let{container:pe,slides:X}=y;b=(LS(pe)?e.querySelector(pe):pe)||e.children[0];let J=LS(X)?b.querySelectorAll(X):X;S=[].slice.call(J||b.children)}function L(pe){let X=t8(e,b,S,r,n,pe,l);if(pe.loop&&!X.slideLooper.canLoop()){let Ie=Object.assign({},pe,{loop:!1});return L(Ie)}return X}function T(pe,X){x||(v=u(v,pe),y=c(v),w=X||w,I(),h=L(y),d([v,...w.map(({options:Ie})=>Ie)]).forEach(Ie=>s.add(Ie,"change",k)),y.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(xe),h.eventHandler.init(xe),h.resizeHandler.init(xe),h.slidesHandler.init(xe),h.options.loop&&h.slideLooper.loop(),b.offsetParent&&S.length&&h.dragHandler.init(xe),C=i.init(xe,w)))}function k(pe,X){let Ie=ae();E(),T(u({startIndex:Ie},pe),X),l.emit("reInit")}function E(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),i.destroy(),s.clear()}function _(){x||(x=!0,s.clear(),E(),l.emit("destroy"),l.clear())}function D(pe,X,Ie){!y.active||x||(h.scrollBody.useBaseFriction().useDuration(X===!0?0:y.duration),h.scrollTo.index(pe,Ie||0))}function z(pe){let X=h.index.add(1).get();D(X,pe,-1)}function F(pe){let X=h.index.add(-1).get();D(X,pe,1)}function O(){return h.index.add(1).get()!==ae()}function B(){return h.index.add(-1).get()!==ae()}function A(){return h.scrollSnapList}function te(){return h.scrollProgress.get(h.offsetLocation.get())}function ae(){return h.index.get()}function V(){return h.indexPrevious.get()}function Q(){return h.slidesInView.get()}function oe(){return h.slidesInView.get(!1)}function Y(){return C}function ce(){return h}function U(){return e}function ne(){return b}function he(){return S}let xe={canScrollNext:O,canScrollPrev:B,containerNode:ne,internalEngine:ce,destroy:_,off:p,on:f,emit:g,plugins:Y,previousScrollSnap:V,reInit:m,rootNode:U,scrollNext:z,scrollPrev:F,scrollProgress:te,scrollSnapList:A,scrollTo:D,selectedScrollSnap:ae,slideNodes:he,slidesInView:Q,slidesNotInView:oe};return T(t,o),setTimeout(()=>l.emit("init"),0),xe}qp.globalOptions=void 0;function Xv(e={},t=[]){let o=(0,Ur.useRef)(e),r=(0,Ur.useRef)(t),[n,a]=(0,Ur.useState)(),[i,s]=(0,Ur.useState)(),l=(0,Ur.useCallback)(()=>{n&&n.reInit(o.current,r.current)},[n]);return(0,Ur.useEffect)(()=>{$v(o.current,e)||(o.current=e,l())},[e,l]),(0,Ur.useEffect)(()=>{bN(r.current,t)||(r.current=t,l())},[t,l]),(0,Ur.useEffect)(()=>{if(SN()&&i){qp.globalOptions=Xv.globalOptions;let u=qp(i,o.current,r.current);return a(u),()=>u.destroy()}else a(void 0)},[i,a]),[s,n]}Xv.globalOptions=void 0;var yr=R(N()),kN=Rt.createContext(null);function $p(){let e=Rt.useContext(kN);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var MN=Rt.forwardRef(({orientation:e="horizontal",opts:t,setApi:o,plugins:r,className:n,children:a,...i},s)=>{let l=e||(t?.axis==="y"?"vertical":"horizontal"),[u,c]=Xv({...t,axis:l==="horizontal"?"x":"y"},r),[d,f]=Rt.useState(!1),[p,g]=Rt.useState(!1),m=Rt.useCallback(y=>{y&&(f(y.canScrollPrev()),g(y.canScrollNext()))},[]),x=Rt.useCallback(()=>{c?.scrollPrev()},[c]),h=Rt.useCallback(()=>{c?.scrollNext()},[c]),v=Rt.useCallback(y=>{let w=l==="horizontal"?"ArrowLeft":"ArrowUp",C=l==="horizontal"?"ArrowRight":"ArrowDown";y.key===w?(y.preventDefault(),x()):y.key===C&&(y.preventDefault(),h())},[l,x,h]);return Rt.useEffect(()=>{!c||!o||o(c)},[c,o]),Rt.useEffect(()=>{if(c)return m(c),c.on("reInit",m),c.on("select",m),()=>{c.off("reInit",m),c.off("select",m)}},[c,m]),(0,yr.jsx)(kN.Provider,{value:{carouselRef:u,api:c,opts:t,scrollPrev:x,scrollNext:h,canScrollPrev:d,canScrollNext:p,orientation:l},children:(0,yr.jsx)("div",{ref:s,onKeyDownCapture:v,className:P("moonui-theme","relative",n),role:"region","aria-roledescription":"carousel",...i,children:a})})});MN.displayName="Carousel";var EN=K("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),AN=Rt.forwardRef(({className:e,...t},o)=>{let{carouselRef:r,orientation:n}=$p();return(0,yr.jsx)("div",{ref:r,className:"overflow-hidden",children:(0,yr.jsx)("div",{ref:o,className:P(EN({orientation:n}),e),...t})})});AN.displayName="CarouselContent";var DN=K("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),NN=Rt.forwardRef(({className:e,...t},o)=>{let{orientation:r}=$p();return(0,yr.jsx)("div",{ref:o,role:"group","aria-roledescription":"slide",className:P(DN({orientation:r}),e),...t})});NN.displayName="CarouselItem";var ON=Rt.forwardRef(({className:e,variant:t="outline",size:o="icon-sm",...r},n)=>{let{orientation:a,scrollPrev:i,canScrollPrev:s}=$p();return(0,yr.jsxs)(De,{ref:n,variant:t,size:o,rounded:"full",className:P("absolute",a==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...r,children:[(0,yr.jsx)(vf,{className:"h-4 w-4","aria-hidden":"true"}),(0,yr.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});ON.displayName="CarouselPrevious";var FN=Rt.forwardRef(({className:e,variant:t="outline",size:o="icon-sm",...r},n)=>{let{orientation:a,scrollNext:i,canScrollNext:s}=$p();return(0,yr.jsxs)(De,{ref:n,variant:t,size:o,rounded:"full",className:P("absolute",a==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...r,children:[(0,yr.jsx)(xf,{className:"h-4 w-4","aria-hidden":"true"}),(0,yr.jsx)("span",{className:"sr-only",children:"Next slide"})]})});FN.displayName="CarouselNext";var Dl=R(M());var _o=R(M(),1);var Yv=R(M(),1);function Ac(e){let t=Yv.useRef({value:e,previous:e});return Yv.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var _N=R(M(),1);function Dc(e){let[t,o]=_N.useState(void 0);return _e(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let a=n[0],i,s;if("borderBoxSize"in a){let l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;o({width:i,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}var wr=R(N(),1),Qv="Checkbox",[i8,eRe]=Oe(Qv),[s8,AS]=i8(Qv);function l8(e){let{__scopeCheckbox:t,checked:o,children:r,defaultChecked:n,disabled:a,form:i,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,p]=qe({prop:o,defaultProp:n??!1,onChange:l,caller:Qv}),[g,m]=_o.useState(null),[x,h]=_o.useState(null),v=_o.useRef(!1),y=g?!!i||!!g.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:g,setControl:m,name:s,form:i,value:c,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:ls(n)?!1:n,isFormControl:y,bubbleInput:x,setBubbleInput:h};return(0,wr.jsx)(s8,{scope:t,...w,children:u8(d)?d(w):r})}var VN="CheckboxTrigger",BN=_o.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},n)=>{let{control:a,value:i,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:g}=AS(VN,e),m=de(n,c),x=_o.useRef(l);return _o.useEffect(()=>{let h=a?.form;if(h){let v=()=>d(x.current);return h.addEventListener("reset",v),()=>h.removeEventListener("reset",v)}},[a,d]),(0,wr.jsx)($.button,{type:"button",role:"checkbox","aria-checked":ls(l)?"mixed":l,"aria-required":u,"data-state":GN(l),"data-disabled":s?"":void 0,disabled:s,value:i,...r,ref:m,onKeyDown:W(t,h=>{h.key==="Enter"&&h.preventDefault()}),onClick:W(o,h=>{d(v=>ls(v)?!0:!v),g&&p&&(f.current=h.isPropagationStopped(),f.current||h.stopPropagation())})})});BN.displayName=VN;var Zv=_o.forwardRef((e,t)=>{let{__scopeCheckbox:o,name:r,checked:n,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return(0,wr.jsx)(l8,{__scopeCheckbox:o,checked:n,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,wr.jsxs)(wr.Fragment,{children:[(0,wr.jsx)(BN,{...d,ref:t,__scopeCheckbox:o}),f&&(0,wr.jsx)(zN,{__scopeCheckbox:o})]})})});Zv.displayName=Qv;var HN="CheckboxIndicator",DS=_o.forwardRef((e,t)=>{let{__scopeCheckbox:o,forceMount:r,...n}=e,a=AS(HN,o);return(0,wr.jsx)(st,{present:r||ls(a.checked)||a.checked===!0,children:(0,wr.jsx)($.span,{"data-state":GN(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});DS.displayName=HN;var UN="CheckboxBubbleInput",zN=_o.forwardRef(({__scopeCheckbox:e,...t},o)=>{let{control:r,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:i,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:p}=AS(UN,e),g=de(o,p),m=Ac(a),x=Dc(r);_o.useEffect(()=>{let v=f;if(!v)return;let y=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(y,"checked").set,b=!n.current;if(m!==a&&C){let S=new Event("click",{bubbles:b});v.indeterminate=ls(a),C.call(v,ls(a)?!1:a),v.dispatchEvent(S)}},[f,m,a,n]);let h=_o.useRef(ls(a)?!1:a);return(0,wr.jsx)($.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??h.current,required:s,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:g,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});zN.displayName=UN;function u8(e){return typeof e=="function"}function ls(e){return e==="indeterminate"}function GN(e){return ls(e)?"indeterminate":e?"checked":"unchecked"}var zr=R(N()),d8=K("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground data-[state=indeterminate]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),NS=Dl.forwardRef(({className:e,variant:t,size:o,radius:r,animation:n,indeterminate:a=!1,icon:i,checked:s,...l},u)=>(0,zr.jsx)(Zv,{ref:u,checked:a?"indeterminate":s,className:P("moonui-theme",d8({variant:t,size:o,radius:r,animation:n}),e),...l,children:(0,zr.jsx)(DS,{className:P("flex items-center justify-center text-current",n==="bounce"&&"data-[state=checked]:animate-bounce"),children:a?(0,zr.jsx)(Nf,{className:"h-[65%] w-[65%]"}):i||(0,zr.jsx)(vo,{className:"h-[65%] w-[65%]"})})}));NS.displayName=Zv.displayName;var WN=Dl.forwardRef(({className:e,orientation:t="vertical",spacing:o="1rem",children:r,...n},a)=>(0,zr.jsx)("div",{ref:a,className:P("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:o},role:"group",...n,children:r}));WN.displayName="CheckboxGroup";var Jv=Dl.forwardRef(({className:e,htmlFor:t,children:o,position:r="end",disabled:n=!1,...a},i)=>(0,zr.jsx)("label",{ref:i,htmlFor:t,className:P("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r==="start"?"mr-2":"ml-2",n&&"cursor-not-allowed opacity-70",e),...a,children:o}));Jv.displayName="CheckboxLabel";var jN=Dl.forwardRef(({id:e,label:t,labelPosition:o="end",labelClassName:r,...n},a)=>{let i=Dl.useId(),s=e||i;return(0,zr.jsxs)("div",{className:"flex items-center",children:[o==="start"&&(0,zr.jsx)(Jv,{htmlFor:s,position:"start",disabled:n.disabled,className:r,children:t}),(0,zr.jsx)(NS,{ref:a,id:s,...n}),o==="end"&&(0,zr.jsx)(Jv,{htmlFor:s,position:"end",disabled:n.disabled,className:r,children:t})]})});jN.displayName="CheckboxWithLabel";var OS=R(M());var Nl=R(N()),f8=uh,qN=K("flex w-full items-center justify-between transition-all",{variants:{variant:{default:"text-foreground hover:text-primary",ghost:"text-foreground hover:bg-accent/10 rounded",outline:"text-foreground border border-border rounded-t-md hover:bg-accent/5"},size:{sm:"text-xs py-2 px-3",default:"text-sm py-3 px-4",md:"text-base py-4 px-4",lg:"text-lg py-5 px-5"}},defaultVariants:{variant:"default",size:"default"}}),$N=OS.forwardRef(({className:e,children:t,variant:o,size:r,asChild:n,...a},i)=>n?(0,Nl.jsx)(Ou,{ref:i,className:P("moonui-theme",qN({variant:o,size:r}),e),asChild:n,...a,children:t}):(0,Nl.jsxs)(Ou,{ref:i,className:P("moonui-theme",qN({variant:o,size:r}),e),...a,children:[t,(0,Nl.jsx)(ra,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));$N.displayName=Ou.displayName;var p8=K("overflow-hidden transition-all data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",{variants:{variant:{default:"text-muted-foreground",ghost:"text-muted-foreground rounded-b",outline:"text-muted-foreground border border-t-0 border-border rounded-b-md"},size:{sm:"text-xs",default:"text-sm",md:"text-base",lg:"text-lg"}},defaultVariants:{variant:"default",size:"default"}}),KN=OS.forwardRef(({className:e,children:t,variant:o,size:r,...n},a)=>(0,Nl.jsx)(df,{ref:a,className:P("moonui-theme",p8({variant:o,size:r}),e),...n,children:(0,Nl.jsx)("div",{className:"p-4",children:t})}));KN.displayName=df.displayName;var Kr=R(M());var Ya=R(M());var Cr=R(N()),m8=K("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),g8=K(["w-full bg-background transition-all duration-200","text-foreground placeholder:text-muted-foreground","disabled:cursor-not-allowed disabled:opacity-50","file:border-0 file:bg-transparent file:font-medium","focus-visible:outline-none dark:text-gray-200"],{variants:{variant:{standard:"border border-input rounded-md px-3 py-2 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-800/80 dark:shadow-inner dark:shadow-gray-950/10",filled:"border border-transparent bg-gray-100 dark:bg-gray-800 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",ghost:"border-none bg-transparent shadow-none px-1 dark:text-gray-300 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 py-2 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300 dark:bg-transparent"},size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""},hasRightButton:{true:"pr-10",false:""},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800/50 pointer-events-none",false:""}},defaultVariants:{variant:"standard",size:"md",isError:!1,isSuccess:!1,isDisabled:!1,hasLeftIcon:!1,hasRightIcon:!1,hasRightButton:!1}}),bo=Ya.forwardRef(({className:e,wrapperClassName:t,messageClassName:o,variant:r,size:n,isError:a,disabled:i,error:s,success:l,loading:u,leftIcon:c,rightIcon:d,rightButton:f,alwaysShowMessage:p=!1,label:g,floatingLabel:m=!1,floatingLabelClassName:x,value:h,defaultValue:v,onChange:y,onFocus:w,onBlur:C,placeholder:b,...S},I)=>{let L=Ya.useId(),T=S.id||L,[k,E]=Ya.useState(!1),[_,D]=Ya.useState(h||v||""),F=k||_!==""&&_!==null&&_!==void 0,O=V=>{E(!0),w?.(V)},B=V=>{E(!1),C?.(V)},A=V=>{D(V.target.value),y?.(V)};Ya.useEffect(()=>{h!==void 0&&D(h)},[h]);let te=p||s||l,ae=s?"error":l?"success":"normal";return(0,Cr.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,Cr.jsxs)("div",{className:P("moonui-theme",m8({size:n}),t),children:[m&&g&&(0,Cr.jsx)("label",{htmlFor:S.id,className:P("absolute transition-all duration-200 pointer-events-none",c||u?"left-10":"left-3","text-gray-500 dark:text-gray-400",F?"top-0 -translate-y-1/2 text-xs bg-background dark:bg-gray-800 px-1":"top-1/2 -translate-y-1/2 text-sm",k&&"text-primary dark:text-primary",!!s&&"text-error",i&&"opacity-50",x),children:g}),c&&(0,Cr.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,Cr.jsx)(Vt,{className:"h-4 w-4 animate-spin"}):c}),(0,Cr.jsx)("input",{className:P(g8({variant:r,size:n,isError:!!s||a,isSuccess:!!l,isDisabled:i||u,hasLeftIcon:!!c||u,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:I,disabled:i||u,"data-loading":u?"":void 0,"data-error":s?"":void 0,"data-success":l?"":void 0,"aria-invalid":!!s||!!a||void 0,"aria-describedby":s?`${T}-error`:l?`${T}-success`:void 0,value:h,defaultValue:v,onChange:A,onFocus:O,onBlur:B,placeholder:m?F?b:"":b,...S}),d&&!u&&(0,Cr.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,Cr.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,Cr.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,Cr.jsx)(Vt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),te&&(0,Cr.jsx)("p",{className:P("text-xs transition-all",ae==="error"&&"text-error",ae==="success"&&"text-success",ae==="normal"&&"text-muted-foreground",o),id:s?`${T}-error`:l?`${T}-success`:void 0,children:s||l||""})]})});bo.displayName="Input";var ZN=R(M());var XN=R(M(),1);var YN=R(N(),1),h8="Label",QN=XN.forwardRef((e,t)=>(0,YN.jsx)($.label,{...e,ref:t,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));QN.displayName=h8;var FS=QN;var JN=R(N()),x8=K("text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"),rr=ZN.forwardRef(({className:e,...t},o)=>(0,JN.jsx)(FS,{ref:o,className:P(x8(),e),...t}));rr.displayName=FS.displayName;var uF=R(M());var ut=R(M(),1);var ht=R(M(),1);var e2=R(M(),1);function t2(e,t=globalThis?.document){let o=rt(e);e2.useEffect(()=>{let r=n=>{n.key==="Escape"&&o(n)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[o,t])}var VS=R(N(),1),y8="DismissableLayer",_S="dismissableLayer.update",w8="dismissableLayer.pointerDownOutside",C8="dismissableLayer.focusOutside",o2,n2=ht.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gr=ht.forwardRef((e,t)=>{let{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=ht.useContext(n2),[c,d]=ht.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=ht.useState({}),g=de(t,S=>d(S)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=m.indexOf(x),v=c?m.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,w=v>=h,C=b8(S=>{let I=S.target,L=[...u.branches].some(T=>T.contains(I));!w||L||(n?.(S),i?.(S),S.defaultPrevented||s?.())},f),b=R8(S=>{let I=S.target;[...u.branches].some(T=>T.contains(I))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return t2(S=>{v===u.layers.size-1&&(r?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),ht.useEffect(()=>{if(c)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(o2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),r2(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=o2)}},[c,f,o,u]),ht.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),r2())},[c,u]),ht.useEffect(()=>{let S=()=>p({});return document.addEventListener(_S,S),()=>document.removeEventListener(_S,S)},[]),(0,VS.jsx)($.div,{...l,ref:g,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,b.onFocusCapture),onBlurCapture:W(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,C.onPointerDownCapture)})});Gr.displayName=y8;var S8="DismissableLayerBranch",a2=ht.forwardRef((e,t)=>{let o=ht.useContext(n2),r=ht.useRef(null),n=de(t,r);return ht.useEffect(()=>{let a=r.current;if(a)return o.branches.add(a),()=>{o.branches.delete(a)}},[o.branches]),(0,VS.jsx)($.div,{...e,ref:n})});a2.displayName=S8;function b8(e,t=globalThis?.document){let o=rt(e),r=ht.useRef(!1),n=ht.useRef(()=>{});return ht.useEffect(()=>{let a=s=>{if(s.target&&!r.current){let u=function(){i2(w8,o,c,{discrete:!0})};var l=u;let c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=u,t.addEventListener("click",n.current,{once:!0})):u()}else t.removeEventListener("click",n.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,o]),{onPointerDownCapture:()=>r.current=!0}}function R8(e,t=globalThis?.document){let o=rt(e),r=ht.useRef(!1);return ht.useEffect(()=>{let n=a=>{a.target&&!r.current&&i2(C8,o,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function r2(){let e=new CustomEvent(_S);document.dispatchEvent(e)}function i2(e,t,o,{discrete:r}){let n=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?Nu(n,a):n.dispatchEvent(a)}var s2=Gr,l2=a2;var c2=R(M(),1),BS=0;function us(){c2.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??u2()),document.body.insertAdjacentElement("beforeend",e[1]??u2()),BS++,()=>{BS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),BS--}},[])}function u2(){let 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 Wr=R(M(),1);var g2=R(N(),1),HS="focusScope.autoFocusOnMount",US="focusScope.autoFocusOnUnmount",d2={bubbles:!1,cancelable:!0},P8="FocusScope",Qa=Wr.forwardRef((e,t)=>{let{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=Wr.useState(null),u=rt(n),c=rt(a),d=Wr.useRef(null),f=de(t,m=>l(m)),p=Wr.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Wr.useEffect(()=>{if(r){let v=function(b){if(p.paused||!s)return;let S=b.target;s.contains(S)?d.current=S:cs(d.current,{select:!0})},y=function(b){if(p.paused||!s)return;let S=b.relatedTarget;S!==null&&(s.contains(S)||cs(d.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(let I of b)I.removedNodes.length>0&&cs(s)};var m=v,x=y,h=w;document.addEventListener("focusin",v),document.addEventListener("focusout",y);let C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),C.disconnect()}}},[r,s,p.paused]),Wr.useEffect(()=>{if(s){p2.add(p);let m=document.activeElement;if(!s.contains(m)){let h=new CustomEvent(HS,d2);s.addEventListener(HS,u),s.dispatchEvent(h),h.defaultPrevented||(L8(A8(h2(s)),{select:!0}),document.activeElement===m&&cs(s))}return()=>{s.removeEventListener(HS,u),setTimeout(()=>{let h=new CustomEvent(US,d2);s.addEventListener(US,c),s.dispatchEvent(h),h.defaultPrevented||cs(m??document.body,{select:!0}),s.removeEventListener(US,c),p2.remove(p)},0)}}},[s,u,c,p]);let g=Wr.useCallback(m=>{if(!o&&!r||p.paused)return;let x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,h=document.activeElement;if(x&&h){let v=m.currentTarget,[y,w]=T8(v);y&&w?!m.shiftKey&&h===w?(m.preventDefault(),o&&cs(y,{select:!0})):m.shiftKey&&h===y&&(m.preventDefault(),o&&cs(w,{select:!0})):h===v&&m.preventDefault()}},[o,r,p.paused]);return(0,g2.jsx)($.div,{tabIndex:-1,...i,ref:f,onKeyDown:g})});Qa.displayName=P8;function L8(e,{select:t=!1}={}){let o=document.activeElement;for(let r of e)if(cs(r,{select:t}),document.activeElement!==o)return}function T8(e){let t=h2(e),o=f2(t,e),r=f2(t.reverse(),e);return[o,r]}function h2(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function f2(e,t){for(let o of e)if(!k8(o,{upTo:t}))return o}function k8(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 M8(e){return e instanceof HTMLInputElement&&"select"in e}function cs(e,{select:t=!1}={}){if(e&&e.focus){let o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&M8(e)&&t&&e.select()}}var p2=E8();function E8(){let e=[];return{add(t){let o=e[0];t!==o&&o?.pause(),e=m2(e,t),e.unshift(t)},remove(t){e=m2(e,t),e[0]?.resume()}}}function m2(e,t){let o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function A8(e){return e.filter(t=>t.tagName!=="A")}var ar=R(M(),1);var y2=["top","right","bottom","left"];var fa=Math.min,Vo=Math.max,Xp=Math.round,Yp=Math.floor,An=e=>({x:e,y:e}),D8={left:"right",right:"left",bottom:"top",top:"bottom"},N8={start:"end",end:"start"};function tx(e,t,o){return Vo(e,fa(t,o))}function pa(e,t){return typeof e=="function"?e(t):e}function ma(e){return e.split("-")[0]}function Ol(e){return e.split("-")[1]}function ox(e){return e==="x"?"y":"x"}function rx(e){return e==="y"?"height":"width"}var O8=new Set(["top","bottom"]);function Dn(e){return O8.has(ma(e))?"y":"x"}function nx(e){return ox(Dn(e))}function w2(e,t,o){o===void 0&&(o=!1);let r=Ol(e),n=nx(e),a=rx(n),i=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Kp(i)),[i,Kp(i)]}function C2(e){let t=Kp(e);return[ex(e),t,ex(t)]}function ex(e){return e.replace(/start|end/g,t=>N8[t])}var v2=["left","right"],x2=["right","left"],F8=["top","bottom"],_8=["bottom","top"];function V8(e,t,o){switch(e){case"top":case"bottom":return o?t?x2:v2:t?v2:x2;case"left":case"right":return t?F8:_8;default:return[]}}function S2(e,t,o,r){let n=Ol(e),a=V8(ma(e),o==="start",r);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(ex)))),a}function Kp(e){return e.replace(/left|right|bottom|top/g,t=>D8[t])}function B8(e){return{top:0,right:0,bottom:0,left:0,...e}}function zS(e){return typeof e!="number"?B8(e):{top:e,right:e,bottom:e,left:e}}function Fl(e){let{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function b2(e,t,o){let{reference:r,floating:n}=e,a=Dn(t),i=nx(t),s=rx(i),l=ma(t),u=a==="y",c=r.x+r.width/2-n.width/2,d=r.y+r.height/2-n.height/2,f=r[s]/2-n[s]/2,p;switch(l){case"top":p={x:c,y:r.y-n.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-n.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ol(t)){case"start":p[i]-=f*(o&&u?-1:1);break;case"end":p[i]+=f*(o&&u?-1:1);break}return p}var P2=async(e,t,o)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:i}=o,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:d}=b2(u,r,l),f=r,p={},g=0;for(let m=0;m<s.length;m++){let{name:x,fn:h}=s[m],{x:v,y,data:w,reset:C}=await h({x:c,y:d,initialPlacement:r,placement:f,strategy:n,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=v??c,d=y??d,p={...p,[x]:{...p[x],...w}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):C.rects),{x:c,y:d}=b2(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:n,middlewareData:p}};async function Nc(e,t){var o;t===void 0&&(t={});let{x:r,y:n,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=pa(t,e),g=zS(p),x=s[f?d==="floating"?"reference":"floating":d],h=Fl(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(x)))==null||o?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:r,y:n,width:i.floating.width,height:i.floating.height}:i.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),w=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},C=Fl(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(h.top-C.top+g.top)/w.y,bottom:(C.bottom-h.bottom+g.bottom)/w.y,left:(h.left-C.left+g.left)/w.x,right:(C.right-h.right+g.right)/w.x}}var L2=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:n,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=pa(e,t)||{};if(u==null)return{};let d=zS(c),f={x:o,y:r},p=nx(n),g=rx(p),m=await i.getDimensions(u),x=p==="y",h=x?"top":"left",v=x?"bottom":"right",y=x?"clientHeight":"clientWidth",w=a.reference[g]+a.reference[p]-f[p]-a.floating[g],C=f[p]-a.reference[p],b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),S=b?b[y]:0;(!S||!await(i.isElement==null?void 0:i.isElement(b)))&&(S=s.floating[y]||a.floating[g]);let I=w/2-C/2,L=S/2-m[g]/2-1,T=fa(d[h],L),k=fa(d[v],L),E=T,_=S-m[g]-k,D=S/2-m[g]/2+I,z=tx(E,D,_),F=!l.arrow&&Ol(n)!=null&&D!==z&&a.reference[g]/2-(D<E?T:k)-m[g]/2<0,O=F?D<E?D-E:D-_:0;return{[p]:f[p]+O,data:{[p]:z,centerOffset:D-z-O,...F&&{alignmentOffset:O}},reset:F}}});var T2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;let{placement:n,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...x}=pa(e,t);if((o=a.arrow)!=null&&o.alignmentOffset)return{};let h=ma(n),v=Dn(s),y=ma(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(y||!m?[Kp(s)]:C2(s)),b=g!=="none";!f&&b&&C.push(...S2(s,m,g,w));let S=[s,...C],I=await Nc(t,x),L=[],T=((r=a.flip)==null?void 0:r.overflows)||[];if(c&&L.push(I[h]),d){let D=w2(n,i,w);L.push(I[D[0]],I[D[1]])}if(T=[...T,{placement:n,overflows:L}],!L.every(D=>D<=0)){var k,E;let D=(((k=a.flip)==null?void 0:k.index)||0)+1,z=S[D];if(z&&(!(d==="alignment"?v!==Dn(z):!1)||T.every(B=>Dn(B.placement)===v?B.overflows[0]>0:!0)))return{data:{index:D,overflows:T},reset:{placement:z}};let F=(E=T.filter(O=>O.overflows[0]<=0).sort((O,B)=>O.overflows[1]-B.overflows[1])[0])==null?void 0:E.placement;if(!F)switch(p){case"bestFit":{var _;let O=(_=T.filter(B=>{if(b){let A=Dn(B.placement);return A===v||A==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(A=>A>0).reduce((A,te)=>A+te,0)]).sort((B,A)=>B[1]-A[1])[0])==null?void 0:_[0];O&&(F=O);break}case"initialPlacement":F=s;break}if(n!==F)return{reset:{placement:F}}}return{}}}};function R2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function I2(e){return y2.some(t=>e[t]>=0)}var k2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o}=t,{strategy:r="referenceHidden",...n}=pa(e,t);switch(r){case"referenceHidden":{let a=await Nc(t,{...n,elementContext:"reference"}),i=R2(a,o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:I2(i)}}}case"escaped":{let a=await Nc(t,{...n,altBoundary:!0}),i=R2(a,o.floating);return{data:{escapedOffsets:i,escaped:I2(i)}}}default:return{}}}}};var M2=new Set(["left","top"]);async function H8(e,t){let{placement:o,platform:r,elements:n}=e,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),i=ma(o),s=Ol(o),l=Dn(o)==="y",u=M2.has(i)?-1:1,c=a&&l?-1:1,d=pa(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var E2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;let{x:n,y:a,placement:i,middlewareData:s}=t,l=await H8(t,e);return i===((o=s.offset)==null?void 0:o.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:i}}}}},A2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:n}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:x=>{let{x:h,y:v}=x;return{x:h,y:v}}},...l}=pa(e,t),u={x:o,y:r},c=await Nc(t,l),d=Dn(ma(n)),f=ox(d),p=u[f],g=u[d];if(a){let x=f==="y"?"top":"left",h=f==="y"?"bottom":"right",v=p+c[x],y=p-c[h];p=tx(v,p,y)}if(i){let x=d==="y"?"top":"left",h=d==="y"?"bottom":"right",v=g+c[x],y=g-c[h];g=tx(v,g,y)}let m=s.fn({...t,[f]:p,[d]:g});return{...m,data:{x:m.x-o,y:m.y-r,enabled:{[f]:a,[d]:i}}}}}},D2=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:o,y:r,placement:n,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=pa(e,t),c={x:o,y:r},d=Dn(n),f=ox(d),p=c[f],g=c[d],m=pa(s,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let y=f==="y"?"height":"width",w=a.reference[f]-a.floating[y]+x.mainAxis,C=a.reference[f]+a.reference[y]-x.mainAxis;p<w?p=w:p>C&&(p=C)}if(u){var h,v;let y=f==="y"?"width":"height",w=M2.has(ma(n)),C=a.reference[d]-a.floating[y]+(w&&((h=i.offset)==null?void 0:h[d])||0)+(w?0:x.crossAxis),b=a.reference[d]+a.reference[y]+(w?0:((v=i.offset)==null?void 0:v[d])||0)-(w?x.crossAxis:0);g<C?g=C:g>b&&(g=b)}return{[f]:p,[d]:g}}}},N2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;let{placement:n,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=pa(e,t),c=await Nc(t,u),d=ma(n),f=Ol(n),p=Dn(n)==="y",{width:g,height:m}=a.floating,x,h;d==="top"||d==="bottom"?(x=d,h=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(h=d,x=f==="end"?"top":"bottom");let v=m-c.top-c.bottom,y=g-c.left-c.right,w=fa(m-c[x],v),C=fa(g-c[h],y),b=!t.middlewareData.shift,S=w,I=C;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(I=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=v),b&&!f){let T=Vo(c.left,0),k=Vo(c.right,0),E=Vo(c.top,0),_=Vo(c.bottom,0);p?I=g-2*(T!==0||k!==0?T+k:Vo(c.left,c.right)):S=m-2*(E!==0||_!==0?E+_:Vo(c.top,c.bottom))}await l({...t,availableWidth:I,availableHeight:S});let L=await i.getDimensions(s.floating);return g!==L.width||m!==L.height?{reset:{rects:!0}}:{}}}};function ax(){return typeof window<"u"}function Vl(e){return F2(e)?(e.nodeName||"").toLowerCase():"#document"}function nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nn(e){var t;return(t=(F2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function F2(e){return ax()?e instanceof Node||e instanceof nr(e).Node:!1}function jr(e){return ax()?e instanceof Element||e instanceof nr(e).Element:!1}function On(e){return ax()?e instanceof HTMLElement||e instanceof nr(e).HTMLElement:!1}function O2(e){return!ax()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nr(e).ShadowRoot}var U8=new Set(["inline","contents"]);function Oc(e){let{overflow:t,overflowX:o,overflowY:r,display:n}=qr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!U8.has(n)}var z8=new Set(["table","td","th"]);function _2(e){return z8.has(Vl(e))}var G8=[":popover-open",":modal"];function Qp(e){return G8.some(t=>{try{return e.matches(t)}catch{return!1}})}var W8=["transform","translate","scale","rotate","perspective"],j8=["transform","translate","scale","rotate","perspective","filter"],q8=["paint","layout","strict","content"];function ix(e){let t=sx(),o=jr(e)?qr(e):e;return W8.some(r=>o[r]?o[r]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||j8.some(r=>(o.willChange||"").includes(r))||q8.some(r=>(o.contain||"").includes(r))}function V2(e){let t=Za(e);for(;On(t)&&!Bl(t);){if(ix(t))return t;if(Qp(t))return null;t=Za(t)}return null}function sx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var $8=new Set(["html","body","#document"]);function Bl(e){return $8.has(Vl(e))}function qr(e){return nr(e).getComputedStyle(e)}function Zp(e){return jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Za(e){if(Vl(e)==="html")return e;let t=e.assignedSlot||e.parentNode||O2(e)&&e.host||Nn(e);return O2(t)?t.host:t}function B2(e){let t=Za(e);return Bl(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&Oc(t)?t:B2(t)}function _l(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let n=B2(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),i=nr(n);if(a){let s=lx(i);return t.concat(i,i.visualViewport||[],Oc(n)?n:[],s&&o?_l(s):[])}return t.concat(n,_l(n,[],o))}function lx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function G2(e){let t=qr(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=On(e),a=n?e.offsetWidth:o,i=n?e.offsetHeight:r,s=Xp(o)!==a||Xp(r)!==i;return s&&(o=a,r=i),{width:o,height:r,$:s}}function WS(e){return jr(e)?e:e.contextElement}function Fc(e){let t=WS(e);if(!On(t))return An(1);let o=t.getBoundingClientRect(),{width:r,height:n,$:a}=G2(t),i=(a?Xp(o.width):o.width)/r,s=(a?Xp(o.height):o.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var K8=An(0);function W2(e){let t=nr(e);return!sx()||!t.visualViewport?K8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function X8(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==nr(e)?!1:t}function Hl(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let n=e.getBoundingClientRect(),a=WS(e),i=An(1);t&&(r?jr(r)&&(i=Fc(r)):i=Fc(e));let s=X8(a,o,r)?W2(a):An(0),l=(n.left+s.x)/i.x,u=(n.top+s.y)/i.y,c=n.width/i.x,d=n.height/i.y;if(a){let f=nr(a),p=r&&jr(r)?nr(r):r,g=f,m=lx(g);for(;m&&r&&p!==g;){let x=Fc(m),h=m.getBoundingClientRect(),v=qr(m),y=h.left+(m.clientLeft+parseFloat(v.paddingLeft))*x.x,w=h.top+(m.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=y,u+=w,g=nr(m),m=lx(g)}}return Fl({width:c,height:d,x:l,y:u})}function ux(e,t){let o=Zp(e).scrollLeft;return t?t.left+o:Hl(Nn(e)).left+o}function j2(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-ux(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function Y8(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e,a=n==="fixed",i=Nn(r),s=t?Qp(t.floating):!1;if(r===i||s&&a)return o;let l={scrollLeft:0,scrollTop:0},u=An(1),c=An(0),d=On(r);if((d||!d&&!a)&&((Vl(r)!=="body"||Oc(i))&&(l=Zp(r)),On(r))){let p=Hl(r);u=Fc(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=i&&!d&&!a?j2(i,l):An(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:o.y*u.y-l.scrollTop*u.y+c.y+f.y}}function Q8(e){return Array.from(e.getClientRects())}function Z8(e){let t=Nn(e),o=Zp(e),r=e.ownerDocument.body,n=Vo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Vo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-o.scrollLeft+ux(e),s=-o.scrollTop;return qr(r).direction==="rtl"&&(i+=Vo(t.clientWidth,r.clientWidth)-n),{width:n,height:a,x:i,y:s}}var H2=25;function J8(e,t){let o=nr(e),r=Nn(e),n=o.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let c=sx();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let u=ux(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=H2&&(a-=g)}else u<=H2&&(a+=u);return{width:a,height:i,x:s,y:l}}var e9=new Set(["absolute","fixed"]);function t9(e,t){let o=Hl(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,a=On(e)?Fc(e):An(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=n*a.x,u=r*a.y;return{width:i,height:s,x:l,y:u}}function U2(e,t,o){let r;if(t==="viewport")r=J8(e,o);else if(t==="document")r=Z8(Nn(e));else if(jr(t))r=t9(t,o);else{let n=W2(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Fl(r)}function q2(e,t){let o=Za(e);return o===t||!jr(o)||Bl(o)?!1:qr(o).position==="fixed"||q2(o,t)}function o9(e,t){let o=t.get(e);if(o)return o;let r=_l(e,[],!1).filter(s=>jr(s)&&Vl(s)!=="body"),n=null,a=qr(e).position==="fixed",i=a?Za(e):e;for(;jr(i)&&!Bl(i);){let s=qr(i),l=ix(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&e9.has(n.position)||Oc(i)&&!l&&q2(e,i))?r=r.filter(c=>c!==i):n=s,i=Za(i)}return t.set(e,r),r}function r9(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e,i=[...o==="clippingAncestors"?Qp(t)?[]:o9(t,this._c):[].concat(o),r],s=i[0],l=i.reduce((u,c)=>{let d=U2(t,c,n);return u.top=Vo(d.top,u.top),u.right=fa(d.right,u.right),u.bottom=fa(d.bottom,u.bottom),u.left=Vo(d.left,u.left),u},U2(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function n9(e){let{width:t,height:o}=G2(e);return{width:t,height:o}}function a9(e,t,o){let r=On(t),n=Nn(t),a=o==="fixed",i=Hl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=An(0);function u(){l.x=ux(n)}if(r||!r&&!a)if((Vl(t)!=="body"||Oc(n))&&(s=Zp(t)),r){let p=Hl(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else n&&u();a&&!r&&n&&u();let c=n&&!r&&!a?j2(n,s):An(0),d=i.left+s.scrollLeft-l.x-c.x,f=i.top+s.scrollTop-l.y-c.y;return{x:d,y:f,width:i.width,height:i.height}}function GS(e){return qr(e).position==="static"}function z2(e,t){if(!On(e)||qr(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Nn(e)===o&&(o=o.ownerDocument.body),o}function $2(e,t){let o=nr(e);if(Qp(e))return o;if(!On(e)){let n=Za(e);for(;n&&!Bl(n);){if(jr(n)&&!GS(n))return n;n=Za(n)}return o}let r=z2(e,t);for(;r&&_2(r)&&GS(r);)r=z2(r,t);return r&&Bl(r)&&GS(r)&&!ix(r)?o:r||V2(e)||o}var i9=async function(e){let t=this.getOffsetParent||$2,o=this.getDimensions,r=await o(e.floating);return{reference:a9(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function s9(e){return qr(e).direction==="rtl"}var K2={convertOffsetParentRelativeRectToViewportRelativeRect:Y8,getDocumentElement:Nn,getClippingRect:r9,getOffsetParent:$2,getElementRects:i9,getClientRects:Q8,getDimensions:n9,getScale:Fc,isElement:jr,isRTL:s9};function X2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function l9(e,t){let o=null,r,n=Nn(e);function a(){var s;clearTimeout(r),(s=o)==null||s.disconnect(),o=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(s||t(),!f||!p)return;let g=Yp(d),m=Yp(n.clientWidth-(c+f)),x=Yp(n.clientHeight-(d+p)),h=Yp(c),y={rootMargin:-g+"px "+-m+"px "+-x+"px "+-h+"px",threshold:Vo(0,fa(1,l))||1},w=!0;function C(b){let S=b[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!X2(u,e.getBoundingClientRect())&&i(),w=!1}try{o=new IntersectionObserver(C,{...y,root:n.ownerDocument})}catch{o=new IntersectionObserver(C,y)}o.observe(e)}return i(!0),a}function jS(e,t,o,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=WS(e),c=n||a?[...u?_l(u):[],..._l(t)]:[];c.forEach(h=>{n&&h.addEventListener("scroll",o,{passive:!0}),a&&h.addEventListener("resize",o)});let d=u&&s?l9(u,o):null,f=-1,p=null;i&&(p=new ResizeObserver(h=>{let[v]=h;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),o()}),u&&!l&&p.observe(u),p.observe(t));let g,m=l?Hl(e):null;l&&x();function x(){let h=Hl(e);m&&!X2(m,h)&&o(),m=h,g=requestAnimationFrame(x)}return o(),()=>{var h;c.forEach(v=>{n&&v.removeEventListener("scroll",o),a&&v.removeEventListener("resize",o)}),d?.(),(h=p)==null||h.disconnect(),p=null,l&&cancelAnimationFrame(g)}}var Y2=E2;var Q2=A2,Z2=T2,J2=N2,eO=k2,qS=L2;var tO=D2,$S=(e,t,o)=>{let r=new Map,n={platform:K2,...o},a={...n.platform,_c:r};return P2(e,t,{...n,platform:a})};var kt=R(M(),1),rO=R(M(),1),nO=R(Aa(),1),u9=typeof document<"u",c9=function(){},cx=u9?rO.useLayoutEffect:c9;function dx(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 o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!dx(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){let a=n[r];if(!(a==="_owner"&&e.$$typeof)&&!dx(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function aO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oO(e,t){let o=aO(e);return Math.round(t*o)/o}function KS(e){let t=kt.useRef(e);return cx(()=>{t.current=e}),t}function iO(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=kt.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=kt.useState(r);dx(f,r)||p(r);let[g,m]=kt.useState(null),[x,h]=kt.useState(null),v=kt.useCallback(B=>{B!==b.current&&(b.current=B,m(B))},[]),y=kt.useCallback(B=>{B!==S.current&&(S.current=B,h(B))},[]),w=a||g,C=i||x,b=kt.useRef(null),S=kt.useRef(null),I=kt.useRef(c),L=l!=null,T=KS(l),k=KS(n),E=KS(u),_=kt.useCallback(()=>{if(!b.current||!S.current)return;let B={placement:t,strategy:o,middleware:f};k.current&&(B.platform=k.current),$S(b.current,S.current,B).then(A=>{let te={...A,isPositioned:E.current!==!1};D.current&&!dx(I.current,te)&&(I.current=te,nO.flushSync(()=>{d(te)}))})},[f,t,o,k,E]);cx(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);let D=kt.useRef(!1);cx(()=>(D.current=!0,()=>{D.current=!1}),[]),cx(()=>{if(w&&(b.current=w),C&&(S.current=C),w&&C){if(T.current)return T.current(w,C,_);_()}},[w,C,_,T,L]);let z=kt.useMemo(()=>({reference:b,floating:S,setReference:v,setFloating:y}),[v,y]),F=kt.useMemo(()=>({reference:w,floating:C}),[w,C]),O=kt.useMemo(()=>{let B={position:o,left:0,top:0};if(!F.floating)return B;let A=oO(F.floating,c.x),te=oO(F.floating,c.y);return s?{...B,transform:"translate("+A+"px, "+te+"px)",...aO(F.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:A,top:te}},[o,s,F.floating,c.x,c.y]);return kt.useMemo(()=>({...c,update:_,refs:z,elements:F,floatingStyles:O}),[c,_,z,F,O])}var d9=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){let{element:r,padding:n}=typeof e=="function"?e(o):e;return r&&t(r)?r.current!=null?qS({element:r.current,padding:n}).fn(o):{}:r?qS({element:r,padding:n}).fn(o):{}}}},sO=(e,t)=>({...Y2(e),options:[e,t]}),lO=(e,t)=>({...Q2(e),options:[e,t]}),uO=(e,t)=>({...tO(e),options:[e,t]}),cO=(e,t)=>({...Z2(e),options:[e,t]}),dO=(e,t)=>({...J2(e),options:[e,t]});var fO=(e,t)=>({...eO(e),options:[e,t]});var pO=(e,t)=>({...d9(e),options:[e,t]});var mO=R(M(),1);var XS=R(N(),1),f9="Arrow",gO=mO.forwardRef((e,t)=>{let{children:o,width:r=10,height:n=5,...a}=e;return(0,XS.jsx)($.svg,{...a,ref:t,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:(0,XS.jsx)("polygon",{points:"0,0 30,0 15,10"})})});gO.displayName=f9;var hO=gO;var ds=R(N(),1);var YS="Popper",[vO,$r]=Oe(YS),[m9,xO]=vO(YS),yO=e=>{let{__scopePopper:t,children:o}=e,[r,n]=ar.useState(null);return(0,ds.jsx)(m9,{scope:t,anchor:r,onAnchorChange:n,children:o})};yO.displayName=YS;var wO="PopperAnchor",CO=ar.forwardRef((e,t)=>{let{__scopePopper:o,virtualRef:r,...n}=e,a=xO(wO,o),i=ar.useRef(null),s=de(t,i),l=ar.useRef(null);return ar.useEffect(()=>{let u=l.current;l.current=r?.current||i.current,u!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,ds.jsx)($.div,{...n,ref:s})});CO.displayName=wO;var QS="PopperContent",[g9,h9]=vO(QS),SO=ar.forwardRef((e,t)=>{let{__scopePopper:o,side:r="bottom",sideOffset:n=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,x=xO(QS,o),[h,v]=ar.useState(null),y=de(t,U=>v(U)),[w,C]=ar.useState(null),b=Dc(w),S=b?.width??0,I=b?.height??0,L=r+(a!=="center"?"-"+a:""),T=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},k=Array.isArray(u)?u:[u],E=k.length>0,_={padding:T,boundary:k.filter(x9),altBoundary:E},{refs:D,floatingStyles:z,placement:F,isPositioned:O,middlewareData:B}=iO({strategy:"fixed",placement:L,whileElementsMounted:(...U)=>jS(...U,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[sO({mainAxis:n+I,alignmentAxis:i}),l&&lO({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?uO():void 0,..._}),l&&cO({..._}),dO({..._,apply:({elements:U,rects:ne,availableWidth:he,availableHeight:xe})=>{let{width:pe,height:X}=ne.reference,Ie=U.floating.style;Ie.setProperty("--radix-popper-available-width",`${he}px`),Ie.setProperty("--radix-popper-available-height",`${xe}px`),Ie.setProperty("--radix-popper-anchor-width",`${pe}px`),Ie.setProperty("--radix-popper-anchor-height",`${X}px`)}}),w&&pO({element:w,padding:s}),y9({arrowWidth:S,arrowHeight:I}),f&&fO({strategy:"referenceHidden",..._})]}),[A,te]=IO(F),ae=rt(g);_e(()=>{O&&ae?.()},[O,ae]);let V=B.arrow?.x,Q=B.arrow?.y,oe=B.arrow?.centerOffset!==0,[Y,ce]=ar.useState();return _e(()=>{h&&ce(window.getComputedStyle(h).zIndex)},[h]),(0,ds.jsx)("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:O?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,ds.jsx)(g9,{scope:o,placedSide:A,onArrowChange:C,arrowX:V,arrowY:Q,shouldHideArrow:oe,children:(0,ds.jsx)($.div,{"data-side":A,"data-align":te,...m,ref:y,style:{...m.style,animation:O?void 0:"none"}})})})});SO.displayName=QS;var bO="PopperArrow",v9={top:"bottom",right:"left",bottom:"top",left:"right"},RO=ar.forwardRef(function(t,o){let{__scopePopper:r,...n}=t,a=h9(bO,r),i=v9[a.placedSide];return(0,ds.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,ds.jsx)(hO,{...n,ref:o,style:{...n.style,display:"block"}})})});RO.displayName=bO;function x9(e){return e!==null}var y9=e=>({name:"transformOrigin",options:e,fn(t){let{placement:o,rects:r,middlewareData:n}=t,i=n.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=IO(o),d={start:"0%",center:"50%",end:"100%"}[c],f=(n.arrow?.x??0)+s/2,p=(n.arrow?.y??0)+l/2,g="",m="";return u==="bottom"?(g=i?d:`${f}px`,m=`${-l}px`):u==="top"?(g=i?d:`${f}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=i?d:`${p}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=i?d:`${p}px`),{data:{x:g,y:m}}}});function IO(e){let[t,o="center"]=e.split("-");return[t,o]}var Ja=yO,ei=CO,fs=SO,ps=RO;var px=R(M(),1),PO=R(Aa(),1);var LO=R(N(),1),w9="Portal",Sr=px.forwardRef((e,t)=>{let{container:o,...r}=e,[n,a]=px.useState(!1);_e(()=>a(!0),[]);let i=o||n&&globalThis?.document?.body;return i?PO.default.createPortal((0,LO.jsx)($.div,{...r,ref:t}),i):null});Sr.displayName=w9;var C9=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_c=new WeakMap,mx=new WeakMap,gx={},ZS=0,TO=function(e){return e&&(e.host||TO(e.parentNode))},S9=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=TO(o);return r&&e.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},b9=function(e,t,o,r){var n=S9(t,Array.isArray(e)?e:[e]);gx[o]||(gx[o]=new WeakMap);var a=gx[o],i=[],s=new Set,l=new Set(n),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};n.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var p=f.getAttribute(r),g=p!==null&&p!=="false",m=(_c.get(f)||0)+1,x=(a.get(f)||0)+1;_c.set(f,m),a.set(f,x),i.push(f),m===1&&g&&mx.set(f,!0),x===1&&f.setAttribute(o,"true"),g||f.setAttribute(r,"true")}catch(h){console.error("aria-hidden: cannot operate on ",f,h)}})};return c(t),s.clear(),ZS++,function(){i.forEach(function(d){var f=_c.get(d)-1,p=a.get(d)-1;_c.set(d,f),a.set(d,p),f||(mx.has(d)||d.removeAttribute(r),mx.delete(d)),p||d.removeAttribute(o)}),ZS--,ZS||(_c=new WeakMap,_c=new WeakMap,mx=new WeakMap,gx={})}},ms=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),n=t||C9(e);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live], script"))),b9(r,n,o,"aria-hidden")):function(){return null}};var ir=function(){return ir=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},ir.apply(this,arguments)};function hx(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]]);return o}function kO(e,t,o){if(o||arguments.length===2)for(var r=0,n=t.length,a;r<n;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Cx=R(M());var Ro=R(M());var Ul="right-scroll-bar-position",zl="width-before-scroll-bar",JS="with-scroll-bars-hidden",eb="--removed-body-scroll-bar-size";function vx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var MO=R(M());function EO(e,t){var o=(0,MO.useState)(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(r){var n=o.value;n!==r&&(o.value=r,o.callback(r,n))}}}})[0];return o.callback=t,o.facade}var xx=R(M());var R9=typeof window<"u"?xx.useLayoutEffect:xx.useEffect,AO=new WeakMap;function tb(e,t){var o=EO(t||null,function(r){return e.forEach(function(n){return vx(n,r)})});return R9(function(){var r=AO.get(o);if(r){var n=new Set(r),a=new Set(e),i=o.current;n.forEach(function(s){a.has(s)||vx(s,null)}),a.forEach(function(s){n.has(s)||vx(s,i)})}AO.set(o,e)},[e]),o}function I9(e){return e}function P9(e,t){t===void 0&&(t=I9);var o=[],r=!1,n={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(a){var i=t(a,r);return o.push(i),function(){o=o.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(r=!0;o.length;){var i=o;o=[],i.forEach(a)}o={push:function(s){return a(s)},filter:function(){return o}}},assignMedium:function(a){r=!0;var i=[];if(o.length){var s=o;o=[],s.forEach(a),i=o}var l=function(){var c=i;i=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),o={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),o}}}};return n}function ob(e){e===void 0&&(e={});var t=P9(null);return t.options=ir({async:!0,ssr:!1},e),t}var DO=R(M()),NO=function(e){var t=e.sideCar,o=hx(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 DO.createElement(r,ir({},o))};NO.isSideCarExport=!0;function rb(e,t){return e.useMedium(t),NO}var yx=ob();var nb=function(){},Jp=Ro.forwardRef(function(e,t){var o=Ro.useRef(null),r=Ro.useState({onScrollCapture:nb,onWheelCapture:nb,onTouchMoveCapture:nb}),n=r[0],a=r[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,x=e.allowPinchZoom,h=e.as,v=h===void 0?"div":h,y=e.gapMode,w=hx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,b=tb([o,t]),S=ir(ir({},w),n);return Ro.createElement(Ro.Fragment,null,c&&Ro.createElement(C,{sideCar:yx,removeScrollBar:u,shards:d,noRelative:p,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!x,lockRef:o,gapMode:y}),i?Ro.cloneElement(Ro.Children.only(s),ir(ir({},S),{ref:b})):Ro.createElement(v,ir({},S,{className:l,ref:b}),s))});Jp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jp.classNames={fullWidth:zl,zeroRight:Ul};var at=R(M());var Bc=R(M());var _O=R(M());var OO;var FO=function(){if(OO)return OO;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function L9(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=FO();return t&&e.setAttribute("nonce",t),e}function T9(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function k9(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ab=function(){var e=0,t=null;return{add:function(o){e==0&&(t=L9())&&(T9(t,o),k9(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var ib=function(){var e=ab();return function(t,o){_O.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}};var em=function(){var e=ib(),t=function(o){var r=o.styles,n=o.dynamic;return e(r,n),null};return t};var M9={left:0,top:0,right:0,gap:0},sb=function(e){return parseInt(e||"",10)||0},E9=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[sb(o),sb(r),sb(n)]},lb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return M9;var t=E9(e),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-o+t[2]-t[0])}};var A9=em(),Vc="data-scroll-locked",D9=function(e,t,o,r){var n=e.left,a=e.top,i=e.right,s=e.gap;return o===void 0&&(o="margin"),`
|
|
20
|
-
.`.concat(
|
|
19
|
+
`),()=>{x.contains(m)&&x.removeChild(m)}},[t]),(0,sE.jsx)(KC,{isPresent:t,childRef:a,sizeRef:i,children:$h.cloneElement(e,{ref:l})})}var cE=({children:e,initial:t,isPresent:o,onExitComplete:r,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=ia(h6),c=(0,kp.useId)(),d=!0,f=(0,kp.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:o,custom:n,onExitComplete:p=>{u.set(p,!0);for(let g of u.values())if(!g)return;r&&r()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[o,u,r]);return a&&d&&(f={...f}),(0,kp.useMemo)(()=>{u.forEach((p,g)=>u.set(g,!1))},[o]),uE.useEffect(()=>{!o&&!u.size&&r&&r()},[o]),i==="popLayout"&&(e=(0,XC.jsx)(lE,{isPresent:o,anchorX:s,root:l,children:e})),(0,XC.jsx)(qi.Provider,{value:f,children:e})};function h6(){return new Map}var es=R(M(),1);function Kh(e=!0){let t=(0,es.useContext)(qi);if(t===null)return[!0,null];let{isPresent:o,onExitComplete:r,register:n}=t,a=(0,es.useId)();(0,es.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,es.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!o&&r?[!1,i]:[!0]}var Xh=R(M(),1),Mp=e=>e.key||"";function YC(e){let t=[];return Xh.Children.forEach(e,o=>{(0,Xh.isValidElement)(o)&&t.push(o)}),t}var za=({children:e,custom:t,initial:o=!0,onExitComplete:r,presenceAffectsLayout:n=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",root:l})=>{let[u,c]=Kh(i),d=(0,ua.useMemo)(()=>YC(e),[e]),f=i&&!u?[]:d.map(Mp),p=(0,ua.useRef)(!0),g=(0,ua.useRef)(d),m=ia(()=>new Map),[x,h]=(0,ua.useState)(d),[v,y]=(0,ua.useState)(d);Qu(()=>{p.current=!1,g.current=d;for(let b=0;b<v.length;b++){let S=Mp(v[b]);f.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[v,f.length,f.join("-")]);let w=[];if(d!==x){let b=[...d];for(let S=0;S<v.length;S++){let I=v[S],L=Mp(I);f.includes(L)||(b.splice(S,0,I),w.push(I))}return a==="wait"&&w.length&&(b=w),y(YC(b)),h(d),null}let{forceRender:C}=(0,ua.useContext)(Xu);return(0,Ep.jsx)(Ep.Fragment,{children:v.map(b=>{let S=Mp(b),I=i&&!u?!1:d===v||f.includes(S),L=()=>{if(m.has(S))m.set(S,!0);else return;let T=!0;m.forEach(k=>{k||(T=!1)}),T&&(C?.(),y(g.current),i&&c?.(),r&&r())};return(0,Ep.jsx)(cE,{isPresent:I,initial:!p.current||o?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:l,onExitComplete:I?void 0:L,anchorX:s,children:b},S)})})};var dE=R(M(),1),Yh=(0,dE.createContext)({strict:!1});var fE={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ga={};for(let e in fE)Ga[e]={isEnabled:t=>fE[e].some(o=>!!t[o])};function pE(e){for(let t in e)Ga[t]={...Ga[t],...e[t]}}var v6=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ap(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||v6.has(e)}var mE=e=>!Ap(e);function x6(e){typeof e=="function"&&(mE=t=>t.startsWith("on")?!Ap(t):e(t))}try{x6(Nz("@emotion/is-prop-valid").default)}catch{}function gE(e,t,o){let r={};for(let n in e)n==="values"&&typeof e.values=="object"||(mE(n)||o===!0&&Ap(n)||!t&&!Ap(n)||e.draggable&&n.startsWith("onDrag"))&&(r[n]=e[n]);return r}var lv=R(N(),1);var mc=R(M(),1);var hE=R(M(),1),ts=(0,hE.createContext)({});var Jh=R(M(),1);function os(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Wa(e){return typeof e=="string"||Array.isArray(e)}var Qh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dp=["initial",...Qh];function Cl(e){return os(e.animate)||Dp.some(t=>Wa(e[t]))}function Zh(e){return!!(Cl(e)||e.variants)}function vE(e,t){if(Cl(e)){let{initial:o,animate:r}=e;return{initial:o===!1||Wa(o)?o:void 0,animate:Wa(r)?r:void 0}}return e.inherit!==!1?t:{}}function yE(e){let{initial:t,animate:o}=vE(e,(0,Jh.useContext)(ts));return(0,Jh.useMemo)(()=>({initial:t,animate:o}),[xE(t),xE(o)])}function xE(e){return Array.isArray(e)?e.join(" "):e}var uc=R(M(),1);var SE=R(M(),1);var Sl={};function wE(e){for(let t in e)Sl[t]=e[t],ll(t)&&(Sl[t].isCSSVariable=!0)}function ev(e,{layout:t,layoutId:o}){return vr.has(e)||e.startsWith("origin")||(t||o!==void 0)&&(!!Sl[e]||e==="opacity")}var y6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},w6=Ln.length;function CE(e,t,o){let r="",n=!0;for(let a=0;a<w6;a++){let i=Ln[a],s=e[i];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(i.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||o){let u=Pp(s,hl[i]);if(!l){n=!1;let c=y6[i]||i;r+=`${c}(${u}) `}o&&(t[i]=u)}}return r=r.trim(),o?r=o(t,n?"":r):n&&(r="none"),r}function ic(e,t,o){let{style:r,vars:n,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let u=t[l];if(vr.has(l)){i=!0;continue}else if(ll(l)){n[l]=u;continue}else{let c=Pp(u,hl[l]);l.startsWith("origin")?(s=!0,a[l]=c):r[l]=c}}if(t.transform||(i||o?r.transform=CE(t,e.transform,o):r.transform&&(r.transform="none")),s){let{originX:l="50%",originY:u="50%",originZ:c=0}=a;r.transformOrigin=`${l} ${u} ${c}`}}var sc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function QC(e,t,o){for(let r in t)!Ve(t[r])&&!ev(r,o)&&(e[r]=t[r])}function C6({transformTemplate:e},t){return(0,SE.useMemo)(()=>{let o=sc();return ic(o,t,e),Object.assign({},o.vars,o.style)},[t])}function S6(e,t){let o=e.style||{},r={};return QC(r,o,e),Object.assign(r,C6(e,t)),r}function bE(e,t){let o={},r=S6(e,t);return e.drag&&e.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(o.tabIndex=0),o.style=r,o}var IE=R(M(),1);var b6={offset:"stroke-dashoffset",array:"stroke-dasharray"},R6={offset:"strokeDashoffset",array:"strokeDasharray"};function RE(e,t,o=1,r=0,n=!0){e.pathLength=1;let a=n?b6:R6;e[a.offset]=ue.transform(-r);let i=ue.transform(t),s=ue.transform(o);e[a.array]=`${i} ${s}`}function tv(e,{attrX:t,attrY:o,attrScale:r,pathLength:n,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(ic(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),o!==void 0&&(d.y=o),r!==void 0&&(d.scale=r),n!==void 0&&RE(d,n,a,i,!1)}var ov=()=>({...sc(),attrs:{}});var rv=e=>typeof e=="string"&&e.toLowerCase()==="svg";function PE(e,t,o,r){let n=(0,IE.useMemo)(()=>{let a=ov();return tv(a,t,rv(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};QC(a,e.style,e),n.style={...a,...n.style}}return n}var LE=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function lc(e){return typeof e!="string"||e.includes("-")?!1:!!(LE.indexOf(e)>-1||/[A-Z]/u.test(e))}function TE(e,t,o,{latestValues:r},n,a=!1){let s=(lc(e)?PE:bE)(t,r,n,e),l=gE(t,typeof e=="string",a),u=e!==uc.Fragment?{...l,...s,ref:o}:{},{children:c}=t,d=(0,uc.useMemo)(()=>Ve(c)?c.get():c,[c]);return(0,uc.createElement)(e,{...u,children:d})}var ZC=R(M(),1);function kE(e){let t=[{},{}];return e?.values.forEach((o,r)=>{t[0][r]=o.get(),t[1][r]=o.getVelocity()}),t}function cc(e,t,o,r){if(typeof t=="function"){let[n,a]=kE(r);t=t(o!==void 0?o:e.custom,n,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[n,a]=kE(r);t=t(o!==void 0?o:e.custom,n,a)}return t}function dc(e){return Ve(e)?e.get():e}function I6({scrapeMotionValuesFromProps:e,createRenderState:t},o,r,n){return{latestValues:P6(o,r,n,e),renderState:t()}}function P6(e,t,o,r){let n={},a=r(e,{});for(let f in a)n[f]=dc(a[f]);let{initial:i,animate:s}=e,l=Cl(e),u=Zh(e);t&&u&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let c=o?o.initial===!1:!1;c=c||i===!1;let d=c?s:i;if(d&&typeof d!="boolean"&&!os(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let g=cc(e,f[p]);if(g){let{transitionEnd:m,transition:x,...h}=g;for(let v in h){let y=h[v];if(Array.isArray(y)){let w=c?y.length-1:0;y=y[w]}y!==null&&(n[v]=y)}for(let v in m)n[v]=m[v]}}}return n}var nv=e=>(t,o)=>{let r=(0,ZC.useContext)(ts),n=(0,ZC.useContext)(qi),a=()=>I6(e,t,r,n);return o?a():ia(a)};function fc(e,t,o){let{style:r}=e,n={};for(let a in r)(Ve(r[a])||t.style&&Ve(t.style[a])||ev(a,e)||o?.getValue(a)?.liveStyle!==void 0)&&(n[a]=r[a]);return n}var ME=nv({scrapeMotionValuesFromProps:fc,createRenderState:sc});function av(e,t,o){let r=fc(e,t,o);for(let n in e)if(Ve(e[n])||Ve(t[n])){let a=Ln.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[a]=e[n]}return r}var EE=nv({scrapeMotionValuesFromProps:av,createRenderState:ov});var AE=Symbol.for("motionComponentSymbol");var DE=R(M(),1);function ja(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function NE(e,t,o){return(0,DE.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),o&&(typeof o=="function"?o(r):ja(o)&&(o.current=r))},[t])}var tr=R(M(),1);var pc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var L6="framerAppearId",iv="data-"+pc(L6);var OE=R(M(),1),sv=(0,OE.createContext)({});function FE(e,t,o,r,n){let{visualElement:a}=(0,tr.useContext)(ts),i=(0,tr.useContext)(Yh),s=(0,tr.useContext)(qi),l=(0,tr.useContext)(Ji).reducedMotion,u=(0,tr.useRef)(null);r=r||i.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:o,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));let c=u.current,d=(0,tr.useContext)(sv);c&&!c.projection&&n&&(c.type==="html"||c.type==="svg")&&T6(u.current,o,n,d);let f=(0,tr.useRef)(!1);(0,tr.useInsertionEffect)(()=>{c&&f.current&&c.update(o,s)});let p=o[iv],g=(0,tr.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return Qu(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),(0,tr.useEffect)(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),g.current=!1),c.enteringChildren=void 0)}),c}function T6(e,t,o,r){let{layoutId:n,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new o(e.latestValues,t["data-framer-portal-id"]?void 0:_E(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&ja(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function _E(e){if(e)return e.options.allowProjection!==!1?e.projection:_E(e.parent)}function uv(e,{forwardMotionProps:t=!1}={},o,r){o&&pE(o);let n=lc(e)?EE:ME;function a(s,l){let u,c={...(0,mc.useContext)(Ji),...s,layoutId:k6(s)},{isStatic:d}=c,f=yE(s),p=n(s,d);if(!d&&Yu){M6(c,o);let g=E6(c);u=g.MeasureLayout,f.visualElement=FE(e,p,c,r,g.ProjectionNode)}return(0,lv.jsxs)(ts.Provider,{value:f,children:[u&&f.visualElement?(0,lv.jsx)(u,{visualElement:f.visualElement,...c}):null,TE(e,s,NE(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,mc.forwardRef)(a);return i[AE]=e,i}function k6({layoutId:e}){let t=(0,mc.useContext)(Xu).id;return t&&e!==void 0?t+"-"+e:e}function M6(e,t){let o=(0,mc.useContext)(Yh).strict}function E6(e){let{drag:t,layout:o}=Ga;if(!t&&!o)return{};let r={...t,...o};return{MeasureLayout:t?.isEnabled(e)||o?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function VE(e,t){if(typeof Proxy>"u")return uv;let o=new Map,r=(a,i)=>uv(a,i,e,t),n=(a,i)=>r(a,i);return new Proxy(n,{get:(a,i)=>i==="create"?r:(o.has(i)||o.set(i,uv(i,void 0,e,t)),o.get(i))})}var eA=R(M(),1);function cv({top:e,left:t,right:o,bottom:r}){return{x:{min:t,max:o},y:{min:e,max:r}}}function BE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function HE(e,t){if(!t)return e;let o=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:o.y,left:o.x,bottom:r.y,right:r.x}}function JC(e){return e===void 0||e===1}function dv({scale:e,scaleX:t,scaleY:o}){return!JC(e)||!JC(t)||!JC(o)}function qa(e){return dv(e)||eS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function eS(e){return UE(e.x)||UE(e.y)}function UE(e){return e&&e!=="0%"}function Np(e,t,o){let r=e-o,n=t*r;return o+n}function zE(e,t,o,r,n){return n!==void 0&&(e=Np(e,n,r)),Np(e,o,r)+t}function tS(e,t=0,o=1,r,n){e.min=zE(e.min,t,o,r,n),e.max=zE(e.max,t,o,r,n)}function oS(e,{x:t,y:o}){tS(e.x,t.translate,t.scale,t.originPoint),tS(e.y,o.translate,o.scale,o.originPoint)}var GE=.999999999999,WE=1.0000000000001;function qE(e,t,o,r=!1){let n=o.length;if(!n)return;t.x=t.y=1;let a,i;for(let s=0;s<n;s++){a=o[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&bl(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,oS(e,i)),r&&qa(a.latestValues)&&bl(e,a.latestValues))}t.x<WE&&t.x>GE&&(t.x=1),t.y<WE&&t.y>GE&&(t.y=1)}function rs(e,t){e.min=e.min+t,e.max=e.max+t}function jE(e,t,o,r,n=.5){let a=ke(e.min,e.max,n);tS(e,t,o,a,r)}function bl(e,t){jE(e.x,t.x,t.scaleX,t.scale,t.originX),jE(e.y,t.y,t.scaleY,t.scale,t.originY)}function rS(e,t){return cv(HE(e.getBoundingClientRect(),t))}function $E(e,t,o){let r=rS(e,o),{scroll:n}=t;return n&&(rs(r.x,n.offset.x),rs(r.y,n.offset.y)),r}var KE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rl=()=>({x:KE(),y:KE()}),XE=()=>({min:0,max:0}),$e=()=>({x:XE(),y:XE()});var Op={current:null},fv={current:!1};function YE(){if(fv.current=!0,!!Yu)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Op.current=e.matches;e.addEventListener("change",t),t()}else Op.current=!1}var ns=new WeakMap;function QE(e,t,o){for(let r in t){let n=t[r],a=o[r];if(Ve(n))e.addValue(r,n);else if(Ve(a))e.addValue(r,er(n,{owner:e}));else if(a!==n)if(e.hasValue(r)){let i=e.getValue(r);i.liveStyle===!0?i.jump(n):i.hasAnimated||i.set(n)}else{let i=e.getStaticValue(r);e.addValue(r,er(i!==void 0?i:n,{owner:e}))}}for(let r in o)t[r]===void 0&&e.removeValue(r);return t}var ZE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],gc=class{scrapeMotionValuesFromProps(t,o,r){return{}}constructor({parent:t,props:o,presenceContext:r,reducedMotionConfig:n,blockInitialAnimation:a,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ha,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let f=yt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Le.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=o.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=o,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Cl(o),this.isVariantNode=Zh(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(o,{},this);for(let f in d){let p=d[f];l[f]!==void 0&&Ve(p)&&p.set(l[f])}}mount(t){this.current=t,ns.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,r)=>this.bindToMotionValue(r,o)),fv.current||YE(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Op.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),wo(this.notifyUpdate),wo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let o=this.features[t];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,o){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let r=vr.has(t);r&&this.onBindTransform&&this.onBindTransform();let n=o.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Le.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,o)),this.valueSubscriptions.set(t,()=>{n(),a&&a(),o.owner&&o.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ga){let o=Ga[t];if(!o)continue;let{isEnabled:r,Feature:n}=o;if(!this.features[t]&&n&&r(this.props)&&(this.features[t]=new n(this)),this.features[t]){let a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$e()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,o){this.latestValues[t]=o}update(t,o){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let r=0;r<ZE.length;r++){let n=ZE[r];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let a="on"+n,i=t[a];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=QE(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(t),()=>o.variantChildren.delete(t)}addValue(t,o){let r=this.values.get(t);o!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,o),this.values.set(t,o),this.latestValues[t]=o.get())}removeValue(t){this.values.delete(t);let o=this.valueSubscriptions.get(t);o&&(o(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,o){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&o!==void 0&&(r=er(o===null?void 0:o,{owner:this}),this.addValue(t,r)),r}readValue(t,o){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Kf(r)||Yf(r))?r=parseFloat(r):!$C(r)&&So.test(o)&&(r=bp(t,o)),this.setBaseTarget(t,Ve(r)?r.get():r)),Ve(r)?r.get():r}setBaseTarget(t,o){this.baseTarget[t]=o}getBaseTarget(t){let{initial:o}=this.props,r;if(typeof o=="string"||typeof o=="object"){let a=cc(this.props,o,this.presenceContext?.custom);a&&(r=a[t])}if(o&&r!==void 0)return r;let n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!Ve(n)?n:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,o){return this.events[t]||(this.events[t]=new Fa),this.events[t].add(o)}notify(t,...o){this.events[t]&&this.events[t].notify(...o)}scheduleRenderMicrotask(){xl.render(this.render)}};var hc=class extends gc{constructor(){super(...arguments),this.KeyframeResolver=Rp}sortInstanceNodePosition(t,o){return t.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(t,o){return t.style?t.style[o]:void 0}removeValueFromRenderState(t,{vars:o,style:r}){delete o[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Ve(t)&&(this.childSubscription=t.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};function pv(e,{style:t,vars:o},r,n){let a=e.style,i;for(i in t)a[i]=t[i];n?.applyProjectionStyles(a,r);for(i in o)a.setProperty(i,o[i])}function A6(e){return window.getComputedStyle(e)}var vc=class extends hc{constructor(){super(...arguments),this.type="html",this.renderInstance=pv}readValueFromInstance(t,o){if(vr.has(o))return this.projection?.isProjecting?hp(o):TC(t,o);{let r=A6(t),n=(ll(o)?r.getPropertyValue(o):r[o])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:o}){return rS(t,o)}build(t,o,r){ic(t,o,r.transformTemplate)}scrapeMotionValuesFromProps(t,o,r){return fc(t,o,r)}};var mv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function JE(e,t,o,r){pv(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(mv.has(n)?n:pc(n),t.attrs[n])}var xc=class extends hc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$e}getBaseTargetFromProps(t,o){return t[o]}readValueFromInstance(t,o){if(vr.has(o)){let r=Sp(o);return r&&r.default||0}return o=mv.has(o)?o:pc(o),t.getAttribute(o)}scrapeMotionValuesFromProps(t,o,r){return av(t,o,r)}build(t,o,r){tv(t,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,o,r,n){JE(t,o,r,n)}mount(t){this.isSVGTag=rv(t.tagName),super.mount(t)}};var tA=(e,t)=>lc(e)?new xc(t):new vc(t,{allowProjection:e!==eA.Fragment});function ca(e,t,o){let r=e.getProps();return cc(r,t,o!==void 0?o:r.custom,e)}var Fp=e=>Array.isArray(e);function D6(e,t,o){e.hasValue(t)?e.getValue(t).set(o):e.addValue(t,er(o))}function N6(e){return Fp(e)?e[e.length-1]||0:e}function oA(e,t){let o=ca(e,t),{transitionEnd:r={},transition:n={},...a}=o||{};a={...a,...r};for(let i in a){let s=N6(a[i]);D6(e,i,s)}}function rA(e){return!!(Ve(e)&&e.add)}function _p(e,t){let o=e.getValue("willChange");if(rA(o))return o.add(t);if(!o&&yo.WillChange){let r=new yo.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function gv(e){return e.props[iv]}var O6=e=>e!==null;function nA(e,{repeat:t,repeatType:o="loop"},r){let n=e.filter(O6),a=t&&o!=="loop"&&t%2===1?0:n.length-1;return!a||r===void 0?n[a]:r}var F6={type:"spring",stiffness:500,damping:25,restSpeed:10},_6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),V6={type:"keyframes",duration:.8},B6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},aA=(e,{keyframes:t})=>t.length>2?V6:vr.has(e)?e.startsWith("scale")?_6(t[1]):F6:B6;function iA({when:e,delay:t,delayChildren:o,staggerChildren:r,staggerDirection:n,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var yc=(e,t,o,r={},n,a)=>i=>{let s=gl(r,e)||{},l=s.delay||r.delay||0,{elapsed:u=0}=r;u=u-bt(l);let c={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:n};iA(s)||Object.assign(c,aA(e,c)),c.duration&&(c.duration=bt(c.duration)),c.repeatDelay&&(c.repeatDelay=bt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(nc(c),c.delay===0&&(d=!0)),(yo.instantAnimations||yo.skipAnimations)&&(d=!0,nc(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=nA(c.keyframes,s);if(f!==void 0){Le.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new Ba(c):new xp(c)};function H6({protectedKeys:e,needsAnimating:t},o){let r=e.hasOwnProperty(o)&&t[o]!==!0;return t[o]=!1,r}function wc(e,t,{delay:o=0,transitionOverride:r,type:n}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...s}=t;r&&(a=r);let l=[],u=n&&e.animationState&&e.animationState.getState()[n];for(let c in s){let d=e.getValue(c,e.latestValues[c]??null),f=s[c];if(f===void 0||u&&H6(u,c))continue;let p={delay:o,...gl(a||{},c)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===g&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){let h=gv(e);if(h){let v=window.MotionHandoffAnimation(h,c,Le);v!==null&&(p.startTime=v,m=!0)}}_p(e,c),d.start(yc(c,d,f,e.shouldReduceMotion&&wp.has(c)?{type:!1}:p,e,m));let x=d.animation;x&&l.push(x)}return i&&Promise.all(l).then(()=>{Le.update(()=>{i&&oA(e,i)})}),l}function hv(e,t,o,r=0,n=1){let a=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),i=e.size,s=(i-1)*r;return typeof o=="function"?o(a,i):n===1?a*r:s-a*r}function vv(e,t,o={}){let r=ca(e,t,o.type==="exit"?e.presenceContext?.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(n=o.transitionOverride);let a=r?()=>Promise.all(wc(e,r,o)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=n;return U6(e,t,l,u,c,d,o)}:()=>Promise.resolve(),{when:s}=n;if(s){let[l,u]=s==="beforeChildren"?[a,i]:[i,a];return l().then(()=>u())}else return Promise.all([a(),i(o.delay)])}function U6(e,t,o=0,r=0,n=0,a=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(vv(l,t,{...i,delay:o+(typeof r=="function"?0:r)+hv(e.variantChildren,l,r,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function sA(e,t,o={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){let n=t.map(a=>vv(e,a,o));r=Promise.all(n)}else if(typeof t=="string")r=vv(e,t,o);else{let n=typeof t=="function"?ca(e,t,o.custom):t;r=Promise.all(wc(e,n,o))}return r.then(()=>{e.notify("AnimationComplete",t)})}function nS(e,t){if(!Array.isArray(t))return!1;let o=t.length;if(o!==e.length)return!1;for(let r=0;r<o;r++)if(t[r]!==e[r])return!1;return!0}var z6=Dp.length;function aS(e){if(!e)return;if(!e.isControllingVariants){let o=e.parent?aS(e.parent)||{}:{};return e.props.initial!==void 0&&(o.initial=e.props.initial),o}let t={};for(let o=0;o<z6;o++){let r=Dp[o],n=e.props[r];(Wa(n)||n===!1)&&(t[r]=n)}return t}var G6=[...Qh].reverse(),W6=Qh.length;function j6(e){return t=>Promise.all(t.map(({animation:o,options:r})=>sA(e,o,r)))}function uA(e){let t=j6(e),o=lA(),r=!0,n=l=>(u,c)=>{let d=ca(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:p,...g}=d;u={...u,...g,...p}}return u};function a(l){t=l(e)}function i(l){let{props:u}=e,c=aS(e.parent)||{},d=[],f=new Set,p={},g=1/0;for(let x=0;x<W6;x++){let h=G6[x],v=o[h],y=u[h]!==void 0?u[h]:c[h],w=Wa(y),C=h===l?v.isActive:null;C===!1&&(g=x);let b=y===c[h]&&y!==u[h]&&w;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),v.protectedKeys={...p},!v.isActive&&C===null||!y&&!v.prevProp||os(y)||typeof y=="boolean")continue;let S=q6(v.prevProp,y),I=S||h===l&&v.isActive&&!b&&w||x>g&&w,L=!1,T=Array.isArray(y)?y:[y],k=T.reduce(n(h),{});C===!1&&(k={});let{prevResolvedValues:E={}}=v,_={...E,...k},D=O=>{I=!0,f.has(O)&&(L=!0,f.delete(O)),v.needsAnimating[O]=!0;let B=e.getValue(O);B&&(B.liveStyle=!1)};for(let O in _){let B=k[O],A=E[O];if(p.hasOwnProperty(O))continue;let te=!1;Fp(B)&&Fp(A)?te=!nS(B,A):te=B!==A,te?B!=null?D(O):f.add(O):B!==void 0&&f.has(O)?D(O):v.protectedKeys[O]=!0}v.prevProp=y,v.prevResolvedValues=k,v.isActive&&(p={...p,...k}),r&&e.blockInitialAnimation&&(I=!1);let z=b&&S;I&&(!z||L)&&d.push(...T.map(O=>{let B={type:h};if(typeof O=="string"&&r&&!z&&e.manuallyAnimateOnMount&&e.parent){let{parent:A}=e,te=ca(A,O);if(A.enteringChildren&&te){let{delayChildren:ae}=te.transition||{};B.delay=hv(A.enteringChildren,e,ae)}}return{animation:O,options:B}}))}if(f.size){let x={};if(typeof u.initial!="boolean"){let h=ca(e,Array.isArray(u.initial)?u.initial[0]:u.initial);h&&h.transition&&(x.transition=h.transition)}f.forEach(h=>{let v=e.getBaseTarget(h),y=e.getValue(h);y&&(y.liveStyle=!0),x[h]=v??null}),d.push({animation:x})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function s(l,u){if(o[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),o[l].isActive=u;let c=i(l);for(let d in o)o[d].protectedKeys={};return c}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>o,reset:()=>{o=lA()}}}function q6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nS(t,e):!1}function Il(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function lA(){return{animate:Il(!0),whileInView:Il(),whileHover:Il(),whileTap:Il(),whileDrag:Il(),whileFocus:Il(),exit:Il()}}var Kt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var xv=class extends Kt{constructor(t){super(t),t.animationState||(t.animationState=uA(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();os(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:o}=this.node.prevProps||{};t!==o&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var $6=0,yv=class extends Kt{constructor(){super(...arguments),this.id=$6++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:o}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;let n=this.node.animationState.setActive("exit",!t);o&&!t&&n.then(()=>{o(this.id)})}mount(){let{register:t,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var cA={animation:{Feature:xv},exit:{Feature:yv}};function $a(e,t,o,r={passive:!0}){return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o)}function Ka(e){return{point:{x:e.pageX,y:e.pageY}}}var dA=e=>t=>yl(t)&&e(t,Ka(t));function as(e,t,o,r){return $a(e,t,dA(o),r)}var gA=1e-4,K6=1-gA,X6=1+gA,hA=.01,Y6=0-hA,Q6=0+hA;function Ht(e){return e.max-e.min}function vA(e,t,o){return Math.abs(e-t)<=o}function fA(e,t,o,r=.5){e.origin=r,e.originPoint=ke(t.min,t.max,e.origin),e.scale=Ht(o)/Ht(t),e.translate=ke(o.min,o.max,e.origin)-e.originPoint,(e.scale>=K6&&e.scale<=X6||isNaN(e.scale))&&(e.scale=1),(e.translate>=Y6&&e.translate<=Q6||isNaN(e.translate))&&(e.translate=0)}function Cc(e,t,o,r){fA(e.x,t.x,o.x,r?r.originX:void 0),fA(e.y,t.y,o.y,r?r.originY:void 0)}function pA(e,t,o){e.min=o.min+t.min,e.max=e.min+Ht(t)}function xA(e,t,o){pA(e.x,t.x,o.x),pA(e.y,t.y,o.y)}function mA(e,t,o){e.min=t.min-o.min,e.max=e.min+Ht(t)}function Sc(e,t,o){mA(e.x,t.x,o.x),mA(e.y,t.y,o.y)}function or(e){return[e("x"),e("y")]}var wv=({current:e})=>e?e.ownerDocument.defaultView:null;var yA=(e,t)=>Math.abs(e-t);function wA(e,t){let o=yA(e.x,t.x),r=yA(e.y,t.y);return Math.sqrt(o**2+r**2)}var bc=class{constructor(t,o,{transformPagePoint:r,contextWindow:n=window,dragSnapToOrigin:a=!1,distanceThreshold:i=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let f=sS(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=wA(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!g)return;let{point:m}=f,{timestamp:x}=xt;this.history.push({...m,timestamp:x});let{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=iS(p,this.transformPagePoint),Le.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();let{onEnd:g,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let h=sS(f.type==="pointercancel"?this.lastMoveEventInfo:iS(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,h),m&&m(f,h)},!yl(t))return;this.dragSnapToOrigin=a,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=n||window;let s=Ka(t),l=iS(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=xt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=o;d&&d(t,sS(l,this.history)),this.removeListeners=Rn(as(this.contextWindow,"pointermove",this.handlePointerMove),as(this.contextWindow,"pointerup",this.handlePointerUp),as(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),wo(this.updatePoint)}};function iS(e,t){return t?{point:t(e.point)}:e}function CA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sS({point:e},t){return{point:e,delta:CA(e,SA(t)),offset:CA(e,Z6(t)),velocity:J6(t,.1)}}function Z6(e){return e[0]}function SA(e){return e[e.length-1]}function J6(e,t){if(e.length<2)return{x:0,y:0};let o=e.length-1,r=null,n=SA(e);for(;o>=0&&(r=e[o],!(n.timestamp-r.timestamp>bt(t)));)o--;if(!r)return{x:0,y:0};let a=Bt(n.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let i={x:(n.x-r.x)/a,y:(n.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function LA(e,{min:t,max:o},r){return t!==void 0&&e<t?e=r?ke(t,e,r.min):Math.max(e,t):o!==void 0&&e>o&&(e=r?ke(o,e,r.max):Math.min(e,o)),e}function bA(e,t,o){return{min:t!==void 0?e.min+t:void 0,max:o!==void 0?e.max+o-(e.max-e.min):void 0}}function TA(e,{top:t,left:o,bottom:r,right:n}){return{x:bA(e.x,o,n),y:bA(e.y,t,r)}}function RA(e,t){let o=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([o,r]=[r,o]),{min:o,max:r}}function kA(e,t){return{x:RA(e.x,t.x),y:RA(e.y,t.y)}}function MA(e,t){let o=.5,r=Ht(e),n=Ht(t);return n>r?o=Br(t.min,t.max-r,e.min):r>n&&(o=Br(e.min,e.max-n,t.min)),$t(0,1,o)}function EA(e,t){let o={};return t.min!==void 0&&(o.min=t.min-e.min),t.max!==void 0&&(o.max=t.max-e.min),o}var Cv=.35;function AA(e=Cv){return e===!1?e=0:e===!0&&(e=Cv),{x:IA(e,"left","right"),y:IA(e,"top","bottom")}}function IA(e,t,o){return{min:PA(e,t),max:PA(e,o)}}function PA(e,t){return typeof e=="number"?e:e[t]||0}var eq=new WeakMap,bv=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$e(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:o=!1,distanceThreshold:r}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let a=d=>{let{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(Ka(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=UC(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),or(h=>{let v=this.getAxisMotionValue(h).get()||0;if(Co.test(v)){let{projection:y}=this.visualElement;if(y&&y.layout){let w=y.layout.layoutBox[h];w&&(v=Ht(w)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&Le.postRender(()=>m(d,f)),_p(this.visualElement,"transform");let{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:g,onDirectionLock:m,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:h}=f;if(g&&this.currentDirection===null){this.currentDirection=tq(h),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,h),this.updateAxis("y",f.point,h),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>or(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new bc(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:wv(this.visualElement)})}stop(t,o){let r=t||this.latestPointerEvent,n=o||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!r)return;let{velocity:i}=n;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&Le.postRender(()=>s(r,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:o}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(t,o,r){let{drag:n}=this.getProps();if(!r||!Sv(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=LA(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){let{dragConstraints:t,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&ja(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=TA(r.layoutBox,t):this.constraints=!1,this.elastic=AA(o),n!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&or(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=EA(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:o}=this.getProps();if(!t||!ja(t))return!1;let r=t.current;io(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;let a=$E(r,n.root,this.visualElement.getTransformPagePoint()),i=kA(n.layout.layoutBox,a);if(o){let s=o(BE(i));this.hasMutatedConstraints=!!s,s&&(i=cv(s))}return i}startAnimation(t){let{drag:o,dragMomentum:r,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=or(c=>{if(!Sv(c,o,this.currentDirection))return;let d=l&&l[c]||{};i&&(d={min:0,max:0});let f=n?200:1e6,p=n?40:1e7,g={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(s)}startAxisValueAnimation(t,o){let r=this.getAxisMotionValue(t);return _p(this.visualElement,t),r.start(yc(t,r,0,o,this.visualElement,!1))}stopAnimation(){or(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){or(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let o=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),n=r[o];return n||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){or(o=>{let{drag:r}=this.getProps();if(!Sv(o,r,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(o);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[o];a.set(t[o]-ke(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!ja(o)||!r||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};or(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=MA({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),or(i=>{if(!Sv(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];s.set(ke(l,u,n[i]))})}addListeners(){if(!this.visualElement.current)return;eq.set(this.visualElement,this);let t=this.visualElement.current,o=as(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{let{dragConstraints:l}=this.getProps();ja(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,a=n.addEventListener("measure",r);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Le.read(r);let i=$a(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(or(c=>{let d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{i(),o(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:i=Cv,dragMomentum:s=!0}=t;return{...t,drag:o,dragDirectionLock:r,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function Sv(e,t,o){return(t===!0||t===e)&&(o===null||o===e)}function tq(e,t=10){let o=null;return Math.abs(e.y)>t?o="y":Math.abs(e.x)>t&&(o="x"),o}var Rv=class extends Kt{constructor(t){super(t),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new bv(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mt}unmount(){this.removeGroupControls(),this.removeListeners()}};var DA=e=>(t,o)=>{e&&Le.postRender(()=>e(t,o))},Iv=class extends Kt{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(t){this.session=new bc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wv(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:o,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:DA(t),onStart:DA(o),onMove:r,onEnd:(a,i)=>{delete this.session,n&&Le.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=as(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var FA=R(N(),1);var Vp=R(M(),1);var Rc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function NA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ic={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ue.test(e))e=parseFloat(e);else return e;let o=NA(e,t.target.x),r=NA(e,t.target.y);return`${o}% ${r}%`}};var OA={correct:(e,{treeScale:t,projectionDelta:o})=>{let r=e,n=So.parse(e);if(n.length>5)return r;let a=So.createTransformer(e),i=typeof n[0]!="number"?1:0,s=o.x.scale*t.x,l=o.y.scale*t.y;n[0+i]/=s,n[1+i]/=l;let u=ke(s,l,.5);return typeof n[2+i]=="number"&&(n[2+i]/=u),typeof n[3+i]=="number"&&(n[3+i]/=u),a(n)}};var lS=!1,uS=class extends Vp.Component{componentDidMount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r,layoutId:n}=this.props,{projection:a}=t;wE(oq),a&&(o.group&&o.group.add(a),r&&r.register&&n&&r.register(a),lS&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Rc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:o,visualElement:r,drag:n,isPresent:a}=this.props,{projection:i}=r;return i&&(i.isPresent=a,lS=!0,n||t.layoutDependency!==o||o===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Le.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),xl.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:n}=t;lS=!0,n&&(n.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function Pv(e){let[t,o]=Kh(),r=(0,Vp.useContext)(Xu);return(0,FA.jsx)(uS,{...e,layoutGroup:r,switchLayoutGroup:(0,Vp.useContext)(sv),isPresent:t,safeToRemove:o})}var oq={borderRadius:{...Ic,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ic,borderTopRightRadius:Ic,borderBottomLeftRadius:Ic,borderBottomRightRadius:Ic,boxShadow:OA};function Lv(e,t,o){let r=Ve(e)?e:er(e);return r.start(yc("",r,t,o)),r.animation}var _A=(e,t)=>e.depth-t.depth;var Tv=class{constructor(){this.children=[],this.isDirty=!1}add(t){il(this.children,t),this.isDirty=!0}remove(t){bn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_A),this.isDirty=!1,this.children.forEach(t)}};function VA(e,t){let o=yt.now(),r=({timestamp:n})=>{let a=n-o;a>=t&&(wo(r),e(a-t))};return Le.setup(r,!0),()=>wo(r)}var zA=["TopLeft","TopRight","BottomLeft","BottomRight"],rq=zA.length,BA=e=>typeof e=="string"?parseFloat(e):e,HA=e=>typeof e=="number"||ue.test(e);function GA(e,t,o,r,n,a){n?(e.opacity=ke(0,o.opacity??1,nq(r)),e.opacityExit=ke(t.opacity??1,0,aq(r))):a&&(e.opacity=ke(t.opacity??1,o.opacity??1,r));for(let i=0;i<rq;i++){let s=`border${zA[i]}Radius`,l=UA(t,s),u=UA(o,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||HA(l)===HA(u)?(e[s]=Math.max(ke(BA(l),BA(u),r),0),(Co.test(u)||Co.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||o.rotate)&&(e.rotate=ke(t.rotate||0,o.rotate||0,r))}function UA(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var nq=WA(0,.5,tp),aq=WA(.5,.95,mt);function WA(e,t,o){return r=>r<e?0:r>t?1:o(Br(e,t,r))}function jA(e,t){e.min=t.min,e.max=t.max}function xr(e,t){jA(e.x,t.x),jA(e.y,t.y)}function cS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function qA(e,t,o,r,n){return e-=t,e=Np(e,1/o,r),n!==void 0&&(e=Np(e,1/n,r)),e}function iq(e,t=0,o=1,r=.5,n,a=e,i=e){if(Co.test(t)&&(t=parseFloat(t),t=ke(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=ke(a.min,a.max,r);e===a&&(s-=t),e.min=qA(e.min,t,o,s,n),e.max=qA(e.max,t,o,s,n)}function $A(e,t,[o,r,n],a,i){iq(e,t[o],t[r],t[n],t.scale,a,i)}var sq=["x","scaleX","originX"],lq=["y","scaleY","originY"];function dS(e,t,o,r){$A(e.x,t,sq,o?o.x:void 0,r?r.x:void 0),$A(e.y,t,lq,o?o.y:void 0,r?r.y:void 0)}function KA(e){return e.translate===0&&e.scale===1}function fS(e){return KA(e.x)&&KA(e.y)}function XA(e,t){return e.min===t.min&&e.max===t.max}function QA(e,t){return XA(e.x,t.x)&&XA(e.y,t.y)}function YA(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function pS(e,t){return YA(e.x,t.x)&&YA(e.y,t.y)}function mS(e){return Ht(e.x)/Ht(e.y)}function gS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var kv=class{constructor(){this.members=[]}add(t){il(this.members,t),t.scheduleRender()}remove(t){if(bn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(t){let o=this.members.findIndex(n=>t===n);if(o===0)return!1;let r;for(let n=o;n>=0;n--){let a=this.members[n];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,o){let r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,o&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:n}=t.options;n===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:o,resumingFrom:r}=t;o.onExitComplete&&o.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function ZA(e,t,o){let r="",n=e.x.translate/t.x,a=e.y.translate/t.y,i=o?.z||0;if((n||a||i)&&(r=`translate3d(${n}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),o){let{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:g}=o;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}var Pl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},hS=["","X","Y","Z"],uq=1e3,cq=0;function vS(e,t,o,r){let{latestValues:n}=t;n[e]&&(o[e]=n[e],t.setStaticValue(e,0),r&&(r[e]=0))}function sD(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let o=gv(t);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(o,"transform",Le,!(n||a))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&sD(r)}function Mv({attachResizeListener:e,defaultParent:t,measureScroll:o,checkIsScrollRoot:r,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=cq++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Jo.value&&(Pl.nodes=Pl.calculatedTargetDeltas=Pl.calculatedProjections=0),this.nodes.forEach(pq),this.nodes.forEach(vq),this.nodes.forEach(xq),this.nodes.forEach(mq),Jo.addProjectionMetrics&&Jo.addProjectionMetrics(Pl)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Tv)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Fa),this.eventHandlers.get(i).add(s)}notifyListeners(i,...s){let l=this.eventHandlers.get(i);l&&l.notify(...s)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=wl(i)&&!Tp(i),this.instance=i;let{layoutId:s,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let c,d=0,f=()=>this.root.updateBlockedByResize=!1;Le.read(()=>{d=window.innerWidth}),e(i,()=>{let p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,c&&c(),c=VA(f,250),Rc.hasAnimatedSinceResize&&(Rc.hasAnimatedSinceResize=!1,this.nodes.forEach(tD)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let g=this.options.transition||u.getDefaultTransition()||bq,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=u.getProps(),h=!this.targetLayout||!pS(this.targetLayout,p),v=!d&&f;if(this.options.layoutRoot||this.resumeFrom||v||d&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let y={...gl(g,"layout"),onPlay:m,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,v)}else d||tD(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),wo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yq),this.animationId++)}getTransformTemplate(){let{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sD(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(JA);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(eD);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(hq),this.nodes.forEach(dq),this.nodes.forEach(fq)):this.nodes.forEach(eD),this.clearAllSnapshots();let s=yt.now();xt.delta=$t(0,1e3/60,s-xt.timestamp),xt.timestamp=s,xt.isProcessing=!0,lp.update.process(xt),lp.preRender.process(xt),lp.render.process(xt),xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,xl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gq),this.sharedNodes.forEach(wq)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ht(this.snapshot.measuredBox.x)&&!Ht(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=$e(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(s=!1),s&&this.instance){let l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!n)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!fS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||qa(this.latestValues)||c)&&(n(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),Rq(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return $e();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Iq))){let{scroll:u}=this.root;u&&(rs(s.x,u.offset.x),rs(s.y,u.offset.y))}return s}removeElementScroll(i){let s=$e();if(xr(s,i),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&xr(s,i),rs(s.x,c.offset.x),rs(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=$e();xr(l,i);for(let u=0;u<this.path.length;u++){let c=this.path[u];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&bl(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),qa(c.latestValues)&&bl(l,c.latestValues)}return qa(this.latestValues)&&bl(l,this.latestValues),l}removeTransform(i){let s=$e();xr(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!qa(u.latestValues))continue;dv(u.latestValues)&&u.updateSnapshot();let c=$e(),d=u.measurePageBox();xr(c,d),dS(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return qa(this.latestValues)&&dS(s,this.latestValues),s}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){let s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==s;if(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=xt.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$e(),this.relativeTargetOrigin=$e(),Sc(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),xr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=$e(),this.targetWithTransforms=$e()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xr(this.target,this.layout.layoutBox),oS(this.target,this.targetDelta)):xr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$e(),this.relativeTargetOrigin=$e(),Sc(this.relativeTargetOrigin,this.target,f.target),xr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Jo.value&&Pl.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||dv(this.parent.latestValues)||eS(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let i=this.getLead(),s=!!this.resumingFrom||this!==i,l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===xt.timestamp&&(l=!1),l)return;let{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;xr(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;qE(this.layoutCorrected,this.treeScale,this.path,s),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=$e());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(cS(this.prevProjectionDelta.x,this.projectionDelta.x),cS(this.prevProjectionDelta.y,this.projectionDelta.y)),Cc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!gS(this.projectionDelta.x,this.prevProjectionDelta.x)||!gS(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Jo.value&&Pl.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.visualElement?.scheduleRender(),i){let s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Rl(),this.projectionDelta=Rl(),this.projectionDeltaWithTransform=Rl()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Rl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=$e(),p=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=p!==g,x=this.getStack(),h=!x||x.members.length<=1,v=!!(m&&!h&&this.options.crossfade===!0&&!this.path.some(Sq));this.animationProgress=0;let y;this.mixTargetDelta=w=>{let C=w/1e3;oD(d.x,i.x,C),oD(d.y,i.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Sc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Cq(this.relativeTarget,this.relativeTargetOrigin,f,C),y&&QA(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=$e()),xr(y,this.relativeTarget)),m&&(this.animationValues=c,GA(c,u,this.latestValues,C,v,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(wo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{Rc.hasAnimatedSinceResize=!0,In.layout++,this.motionValue||(this.motionValue=er(0)),this.currentAnimation=Lv(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{In.layout--},onComplete:()=>{In.layout--,i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uq),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:u,latestValues:c}=i;if(!(!s||!l||!u)){if(this!==i&&this.layout&&u&&lD(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||$e();let d=Ht(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=Ht(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}xr(s,l),bl(s,c),Cc(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new kv),this.sharedNodes.get(i).add(s);let u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){let i=this.getStack();return i?i.lead===this:!0}getLead(){let{layoutId:i}=this.options;return i?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:i}=this.options;return i?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:s,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){let i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){let{visualElement:i}=this.options;if(!i)return;let s=!1,{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;let u={};l.z&&vS("z",i,u,this.animationValues);for(let c=0;c<hS.length;c++)vS(`rotate${hS[c]}`,i,u,this.animationValues),vS(`skew${hS[c]}`,i,u,this.animationValues);i.render();for(let c in u)i.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);i.scheduleRender()}applyProjectionStyles(i,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=dc(s?.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=dc(s?.pointerEvents)||""),this.hasProjected&&!qa(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=ZA(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),i.transform=d;let{x:f,y:p}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?i.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:i.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(let g in Sl){if(c[g]===void 0)continue;let{correct:m,applyTo:x,isCSSVariable:h}=Sl[g],v=d==="none"?c[g]:m(c[g],u);if(x){let y=x.length;for(let w=0;w<y;w++)i[x[w]]=v}else h?this.options.visualElement.renderState.vars[g]=v:i[g]=v}this.options.layoutId&&(i.pointerEvents=u===this?dc(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(JA),this.root.sharedNodes.clear()}}}function dq(e){e.updateLayout()}function fq(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:o,measuredBox:r}=e.layout,{animationType:n}=e.options,a=t.source!==e.layout.source;n==="size"?or(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Ht(d);d.min=o[c].min,d.max=d.min+f}):lD(n,t.layoutBox,o)&&or(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Ht(o[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});let i=Rl();Cc(i,o,t.layoutBox);let s=Rl();a?Cc(s,e.applyTransform(r,!0),t.measuredBox):Cc(s,o,t.layoutBox);let l=!fS(i),u=!1;if(!e.resumeFrom){let c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){let{snapshot:d,layout:f}=c;if(d&&f){let p=$e();Sc(p,t.layoutBox,d.layoutBox);let g=$e();Sc(g,o,f.layoutBox),pS(p,g)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function pq(e){Jo.value&&Pl.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function mq(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gq(e){e.clearSnapshot()}function JA(e){e.clearMeasurements()}function eD(e){e.isLayoutDirty=!1}function hq(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function tD(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vq(e){e.resolveTargetDelta()}function xq(e){e.calcProjection()}function yq(e){e.resetSkewAndRotation()}function wq(e){e.removeLeadSnapshot()}function oD(e,t,o){e.translate=ke(t.translate,0,o),e.scale=ke(t.scale,1,o),e.origin=t.origin,e.originPoint=t.originPoint}function rD(e,t,o,r){e.min=ke(t.min,o.min,r),e.max=ke(t.max,o.max,r)}function Cq(e,t,o,r){rD(e.x,t.x,o.x,r),rD(e.y,t.y,o.y,r)}function Sq(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var bq={duration:.45,ease:[.4,0,.1,1]},nD=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),aD=nD("applewebkit/")&&!nD("chrome/")?Math.round:mt;function iD(e){e.min=aD(e.min),e.max=aD(e.max)}function Rq(e){iD(e.x),iD(e.y)}function lD(e,t,o){return e==="position"||e==="preserve-aspect"&&!vA(mS(t),mS(o),.2)}function Iq(e){return e!==e.root&&e.scroll?.wasRoot}var uD=Mv({attachResizeListener:(e,t)=>$a(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var xS={current:void 0},Ev=Mv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!xS.current){let e=new uD({});e.mount(window),e.setOptions({layoutScroll:!0}),xS.current=e}return xS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var cD={pan:{Feature:Iv},drag:{Feature:Rv,ProjectionNode:Ev,MeasureLayout:Pv}};function dD(e,t,o){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",o==="Start");let n="onHover"+o,a=r[n];a&&Le.postRender(()=>a(t,Ka(t)))}var Av=class extends Kt{mount(){let{current:t}=this.node;t&&(this.unmount=zC(t,(o,r)=>(dD(this.node,r,"Start"),n=>dD(this.node,n,"End"))))}unmount(){}};var Dv=class extends Kt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Rn($a(this.node.current,"focus",()=>this.onFocus()),$a(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function fD(e,t,o){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",o==="Start");let n="onTap"+(o==="End"?"":o),a=r[n];a&&Le.postRender(()=>a(t,Ka(t)))}var Nv=class extends Kt{mount(){let{current:t}=this.node;t&&(this.unmount=jC(t,(o,r)=>(fD(this.node,r,"Start"),(n,{success:a})=>fD(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var wS=new WeakMap,yS=new WeakMap,Pq=e=>{let t=wS.get(e.target);t&&t(e)},Lq=e=>{e.forEach(Pq)};function Tq({root:e,...t}){let o=e||document;yS.has(o)||yS.set(o,{});let r=yS.get(o),n=JSON.stringify(t);return r[n]||(r[n]=new IntersectionObserver(Lq,{root:e,...t})),r[n]}function pD(e,t,o){let r=Tq(t);return wS.set(e,o),r.observe(e),()=>{wS.delete(e),r.unobserve(e)}}var kq={some:0,all:1},Ov=class extends Kt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:o,margin:r,amount:n="some",once:a}=t,i={root:o?o.current:void 0,rootMargin:r,threshold:typeof n=="number"?n:kq[n]},s=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return pD(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:o}=this.node;["amount","margin","root"].some(Mq(t,o))&&this.startObserver()}unmount(){}};function Mq({viewport:e={}},{viewport:t={}}={}){return o=>e[o]!==t[o]}var mD={inView:{Feature:Ov},tap:{Feature:Nv},focus:{Feature:Dv},hover:{Feature:Av}};var gD={layout:{ProjectionNode:Ev,MeasureLayout:Pv}};var hD={...cA,...mD,...cD,...gD};var Be=VE(hD,tA);var Pc=R(M(),1);function Lc(e){let t=ia(()=>er(e)),{isStatic:o}=(0,Pc.useContext)(Ji);if(o){let[,r]=(0,Pc.useState)(e);(0,Pc.useEffect)(()=>t.on("change",r),[])}return t}function Fv(e,t){let o=Lc(t()),r=()=>o.set(t());return r(),Qu(()=>{let n=()=>Le.preRender(r,!1,!0),a=e.map(i=>i.on("change",n));return()=>{a.forEach(i=>i()),wo(r)}}),o}function vD(e){vl.current=[],e();let t=Fv(vl.current,e);return vl.current=void 0,t}function CS(e,t,o,r){if(typeof e=="function")return vD(e);let n=typeof t=="function"?t:qC(t,o,r);return Array.isArray(e)?xD(e,n):xD([e],([a])=>n(a))}function xD(e,t){let o=ia(()=>[]);return Fv(e,()=>{o.length=0;let r=e.length;for(let n=0;n<r;n++)o[n]=e[n].get();return t(o)})}function Bp(e){return typeof e=="object"&&!Array.isArray(e)}function _v(e,t,o,r){return typeof e=="string"&&Bp(t)?Ip(e,o,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function yD(e,t,o){return e*(t+1)}function SS(e,t,o,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?o:t.startsWith("<")?Math.max(0,o+parseFloat(t.slice(1))):r.get(t)??e}function Eq(e,t,o){for(let r=0;r<e.length;r++){let n=e[r];n.at>t&&n.at<o&&(bn(e,n),r--)}}function wD(e,t,o,r,n,a){Eq(e,n,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:ke(n,a,r[i]),easing:ap(o,i)})}function CD(e,t){for(let o=0;o<e.length;o++)e[o]=e[o]/(t+1)}function SD(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Aq="easeInOut",Dq=20;function ID(e,{defaultTransition:t={},...o}={},r,n){let a=t.duration||.3,i=new Map,s=new Map,l={},u=new Map,c=0,d=0,f=0;for(let p=0;p<e.length;p++){let g=e[p];if(typeof g=="string"){u.set(g,d);continue}else if(!Array.isArray(g)){u.set(g.name,SS(d,g.at,c,u));continue}let[m,x,h={}]=g;h.at!==void 0&&(d=SS(d,h.at,c,u));let v=0,y=(w,C,b,S=0,I=0)=>{let L=Nq(w),{delay:T=0,times:k=gp(L),type:E="keyframes",repeat:_,repeatType:D,repeatDelay:z=0,...F}=C,{ease:O=t.ease||"easeOut",duration:B}=C,A=typeof T=="function"?T(S,I):T,te=L.length,ae=ml(E)?E:n?.[E||"keyframes"];if(te<=2&&ae){let Y=100;if(te===2&&_q(L)){let ne=L[1]-L[0];Y=Math.abs(ne)}let ce={...F};B!==void 0&&(ce.duration=bt(B));let U=fp(ce,Y,ae);O=U.ease,B=U.duration}B??(B=a);let V=d+A;k.length===1&&k[0]===0&&(k[1]=1);let Q=k.length-L.length;if(Q>0&&mp(k,Q),L.length===1&&L.unshift(null),_){io(_<Dq,"Repeat count too high, must be less than 20","repeat-count-high"),B=yD(B,_);let Y=[...L],ce=[...k];O=Array.isArray(O)?[...O]:[O];let U=[...O];for(let ne=0;ne<_;ne++){L.push(...Y);for(let he=0;he<Y.length;he++)k.push(ce[he]+(ne+1)),O.push(he===0?"linear":ap(U,he-1))}CD(k,_)}let oe=V+B;wD(b,L,O,k,V,oe),v=Math.max(A+B,v),f=Math.max(oe,f)};if(Ve(m)){let w=bD(m,s);y(x,h,RD("default",w))}else{let w=_v(m,x,r,l),C=w.length;for(let b=0;b<C;b++){x=x,h=h;let S=w[b],I=bD(S,s);for(let L in x)y(x[L],Oq(h,L),RD(L,I),b,C)}}c=d,d+=v}return s.forEach((p,g)=>{for(let m in p){let x=p[m];x.sort(SD);let h=[],v=[],y=[];for(let C=0;C<x.length;C++){let{at:b,value:S,easing:I}=x[C];h.push(S),v.push(Br(0,f,b)),y.push(I||"easeOut")}v[0]!==0&&(v.unshift(0),h.unshift(h[0]),y.unshift(Aq)),v[v.length-1]!==1&&(v.push(1),h.push(null)),i.has(g)||i.set(g,{keyframes:{},transition:{}});let w=i.get(g);w.keyframes[m]=h,w.transition[m]={...t,duration:f,ease:y,times:v,...o}}}),i}function bD(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function RD(e,t){return t[e]||(t[e]=[]),t[e]}function Nq(e){return Array.isArray(e)?e:[e]}function Oq(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Fq=e=>typeof e=="number",_q=e=>e.every(Fq);function Vq(e,t){return e in t}var Vv=class extends gc{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,o){if(Vq(o,t)){let r=t[o];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,o){delete o.output[t]}measureInstanceViewportBox(){return $e()}build(t,o){Object.assign(t.output,o)}renderInstance(t,{output:o}){Object.assign(t,o)}sortInstanceNodePosition(){return 0}};function PD(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},o=wl(e)&&!Tp(e)?new xc(t):new vc(t);o.mount(e),ns.set(e,o)}function LD(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},o=new Vv(t);o.mount(e),ns.set(e,o)}function Bq(e,t){return Ve(e)||typeof e=="number"||typeof e=="string"&&!Bp(t)}function Bv(e,t,o,r){let n=[];if(Bq(e,t))n.push(Lv(e,Bp(t)&&t.default||t,o&&(o.default||o)));else{let a=_v(e,t,r),i=a.length;io(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];io(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");let u=l instanceof Element?PD:LD;ns.has(l)||u(l);let c=ns.get(l),d={...o};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),n.push(...wc(c,{...t,transition:d},{}))}}return n}function TD(e,t,o){let r=[];return ID(e,t,o,{spring:Va}).forEach(({keyframes:a,transition:i},s)=>{r.push(...Bv(s,a,i))}),r}function Hq(e){return Array.isArray(e)&&e.some(Array.isArray)}function kD(e){function t(o,r,n){let a=[],i;if(Hq(o))a=TD(o,r,e);else{let{onComplete:l,...u}=n||{};typeof l=="function"&&(i=l),a=Bv(o,r,u,e)}let s=new yp(a);return i&&s.finished.then(i),e&&(e.animations.push(s),s.finished.then(()=>{bn(e.animations,s)})),s}return t}var bS=kD();var Ywe=K("",{variants:{hover:{lift:["transition-all duration-200 ease-out","hover:-translate-y-0.5","hover:shadow-md"],glow:["transition-all duration-300 ease-out","hover:shadow-lg","hover:shadow-primary/20"],scale:["transition-transform duration-200 ease-out","hover:scale-105","active:scale-95"],brightness:["transition-all duration-200 ease-out","hover:brightness-110","active:brightness-95"],border:["transition-all duration-200 ease-out","hover:border-primary/50"]},focus:{ring:["focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary/50","focus-visible:ring-offset-2"],glow:["focus:outline-none","focus-visible:shadow-lg","focus-visible:shadow-primary/30"],border:["focus:outline-none","focus-visible:border-primary","focus-visible:border-2"]},active:{scale:["active:scale-95","transition-transform duration-100"],darken:["active:brightness-90","transition-all duration-100"],depress:["active:translate-y-0.5","active:shadow-sm","transition-all duration-100"]},cursor:{pointer:"cursor-pointer",grab:"cursor-grab active:cursor-grabbing",text:"cursor-text",wait:"cursor-wait",help:"cursor-help",notAllowed:"cursor-not-allowed"}},defaultVariants:{hover:"lift",focus:"ring",active:"scale",cursor:"pointer"}}),Tn={smooth:{type:"spring",stiffness:260,damping:20},bouncy:{type:"spring",stiffness:300,damping:15},stiff:{type:"spring",stiffness:400,damping:25},gentle:{type:"spring",stiffness:150,damping:15}},Hv={lift:{y:-2,transition:Tn.smooth},scale:{scale:1.05,transition:Tn.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:Tn.smooth},rotate:{rotate:2,transition:Tn.bouncy}},MD={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},Qwe={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:Tn.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:Tn.smooth}},Zwe={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:Tn.smooth}}},Jwe={fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3}},slideUp:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:Tn.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:Tn.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:Tn.smooth}},ED={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var eCe={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:Tn.bouncy};var is=R(N()),AD=K("rounded-lg border bg-card text-card-foreground shadow-sm dark:shadow-gray-900/20 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 transition-all duration-200",{variants:{variant:{default:"",outline:"border border-border shadow-none bg-transparent dark:border-gray-700 dark:bg-transparent dark:text-gray-200",filled:"border-none bg-secondary dark:bg-gray-800 dark:text-gray-100 dark:shadow-inner dark:shadow-gray-950/10",elevated:"border-none shadow-md dark:shadow-lg dark:shadow-gray-900/30 dark:bg-gray-850 dark:text-gray-100",gradient:"border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",glass:"border border-white/20 bg-white/10 backdrop-blur-md dark:border-gray-700/30 dark:bg-gray-800/10"},size:{default:"",sm:"",lg:"",xl:""},radius:{default:"rounded-lg",sm:"rounded-md",lg:"rounded-xl",full:"rounded-3xl",none:"rounded-none"},interactive:{true:"cursor-pointer hover:shadow-lg hover:border-primary/20 dark:hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm",false:""}},defaultVariants:{variant:"default",size:"default",radius:"default"}}),DD=Ll.forwardRef(({className:e,variant:t,size:o,radius:r,interactive:n,microInteraction:a="lift",...i},s)=>{if(n&&a!=="none"){let l={whileHover:a==="scale"?Hv.scale:a==="glow"?Hv.glow:Hv.lift,whileTap:MD.scale};return(0,is.jsx)(Be.div,{ref:s,className:P("moonui-theme",AD({variant:t,size:o,radius:r,interactive:n,className:e})),...l,...i})}return(0,is.jsx)("div",{ref:s,className:P("moonui-theme",AD({variant:t,size:o,radius:r,interactive:n,className:e})),...i})});DD.displayName="Card";var ND=Ll.forwardRef(({className:e,...t},o)=>(0,is.jsx)("div",{ref:o,className:P("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));ND.displayName="CardHeader";var OD=Ll.forwardRef(({className:e,...t},o)=>(0,is.jsx)("h3",{ref:o,className:P("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));OD.displayName="CardTitle";var FD=Ll.forwardRef(({className:e,...t},o)=>(0,is.jsx)("p",{ref:o,className:P("moonui-theme","text-sm text-muted-foreground",e),...t}));FD.displayName="CardDescription";var _D=Ll.forwardRef(({className:e,...t},o)=>(0,is.jsx)("div",{ref:o,className:P("moonui-theme","p-6 pt-0",e),...t}));_D.displayName="CardContent";var VD=Ll.forwardRef(({className:e,...t},o)=>(0,is.jsx)("div",{ref:o,className:P("moonui-theme","flex items-center p-6 pt-0",e),...t}));VD.displayName="CardFooter";var hN=R(M());function Te(e){let 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 so(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Uv(e,t){let o=Te(e);if(isNaN(t))return so(e,NaN);if(!t)return o;let r=o.getDate(),n=so(e,o.getTime());n.setMonth(o.getMonth()+t+1,0);let a=n.getDate();return r>=a?n:(o.setFullYear(n.getFullYear(),n.getMonth(),r),o)}var Uq=Math.pow(10,8)*24*60*60*1e3,pCe=-Uq,zv=6048e5,BD=864e5;var zq=3600;var HD=zq*24,mCe=HD*7,Gq=HD*365.2425,Wq=Gq/12,gCe=Wq*3;var jq={};function da(){return jq}function kn(e,t){let o=da(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=Te(e),a=n.getDay(),i=(a<r?7:0)+a-r;return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}function Tl(e){return kn(e,{weekStartsOn:1})}function Gv(e){let t=Te(e),o=t.getFullYear(),r=so(e,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);let n=Tl(r),a=so(e,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);let i=Tl(a);return t.getTime()>=n.getTime()?o+1:t.getTime()>=i.getTime()?o:o-1}function Tc(e){let t=Te(e);return t.setHours(0,0,0,0),t}function RS(e){let t=Te(e),o=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return o.setUTCFullYear(t.getFullYear()),+e-+o}function UD(e,t){let o=Tc(e),r=Tc(t),n=+o-RS(o),a=+r-RS(r);return Math.round((n-a)/BD)}function zD(e){let t=Gv(e),o=so(e,0);return o.setFullYear(t,0,4),o.setHours(0,0,0,0),Tl(o)}function GD(e){return so(e,Date.now())}function kl(e,t){let o=Tc(e),r=Tc(t);return+o==+r}function WD(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Wv(e){if(!WD(e)&&typeof e!="number")return!1;let t=Te(e);return!isNaN(Number(t))}function jD(e){let t=Te(e),o=t.getMonth();return t.setFullYear(t.getFullYear(),o+1,0),t.setHours(23,59,59,999),t}function jv(e,t){let o=Te(e.start),r=Te(e.end),n=+o>+r,a=n?+o:+r,i=n?r:o;i.setHours(0,0,0,0);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,n=!n);let l=[];for(;+i<=a;)l.push(Te(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return n?l.reverse():l}function qD(e){let t=Te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function $D(e){let t=Te(e),o=so(e,0);return o.setFullYear(t.getFullYear(),0,1),o.setHours(0,0,0,0),o}function KD(e,t){let o=da(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=Te(e),a=n.getDay(),i=(a<r?-7:0)+6-(a-r);return n.setDate(n.getDate()+i),n.setHours(23,59,59,999),n}var qq={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"}},XD=(e,t,o)=>{let r,n=qq[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),o?.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};function qv(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var $q={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Kq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Xq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},YD={date:qv({formats:$q,defaultWidth:"full"}),time:qv({formats:Kq,defaultWidth:"full"}),dateTime:qv({formats:Xq,defaultWidth:"full"})};var Yq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},QD=(e,t,o,r)=>Yq[e];function kc(e){return(t,o)=>{let r=o?.context?String(o.context):"standalone",n;if(r==="formatting"&&e.formattingValues){let i=e.defaultFormattingWidth||e.defaultWidth,s=o?.width?String(o.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{let i=e.defaultWidth,s=o?.width?String(o.width):e.defaultWidth;n=e.values[s]||e.values[i]}let a=e.argumentCallback?e.argumentCallback(t):t;return n[a]}}var Qq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Jq={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"]},e$={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"]},t$={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"}},o$={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"}},r$=(e,t)=>{let o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},ZD={ordinalNumber:r$,era:kc({values:Qq,defaultWidth:"wide"}),quarter:kc({values:Zq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:kc({values:Jq,defaultWidth:"wide"}),day:kc({values:e$,defaultWidth:"wide"}),dayPeriod:kc({values:t$,defaultWidth:"wide",formattingValues:o$,defaultFormattingWidth:"wide"})};function Mc(e){return(t,o={})=>{let r=o.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(n);if(!a)return null;let i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?a$(s,d=>d.test(i)):n$(s,d=>d.test(i)),u;u=e.valueCallback?e.valueCallback(l):l,u=o.valueCallback?o.valueCallback(u):u;let c=t.slice(i.length);return{value:u,rest:c}}}function n$(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function a$(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function JD(e){return(t,o={})=>{let r=t.match(e.matchPattern);if(!r)return null;let n=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=o.valueCallback?o.valueCallback(i):i;let s=t.slice(n.length);return{value:i,rest:s}}}var i$=/^(\d+)(th|st|nd|rd)?/i,s$=/\d+/i,l$={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},u$={any:[/^b/i,/^(a|c)/i]},c$={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},d$={any:[/1/i,/2/i,/3/i,/4/i]},f$={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},p$={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]},m$={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},g$={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]},h$={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},v$={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}},eN={ordinalNumber:JD({matchPattern:i$,parsePattern:s$,valueCallback:e=>parseInt(e,10)}),era:Mc({matchPatterns:l$,defaultMatchWidth:"wide",parsePatterns:u$,defaultParseWidth:"any"}),quarter:Mc({matchPatterns:c$,defaultMatchWidth:"wide",parsePatterns:d$,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Mc({matchPatterns:f$,defaultMatchWidth:"wide",parsePatterns:p$,defaultParseWidth:"any"}),day:Mc({matchPatterns:m$,defaultMatchWidth:"wide",parsePatterns:g$,defaultParseWidth:"any"}),dayPeriod:Mc({matchPatterns:h$,defaultMatchWidth:"any",parsePatterns:v$,defaultParseWidth:"any"})};var IS={code:"en-US",formatDistance:XD,formatLong:YD,formatRelative:QD,localize:ZD,match:eN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tN(e){let t=Te(e);return UD(t,$D(t))+1}function oN(e){let t=Te(e),o=+Tl(t)-+zD(t);return Math.round(o/zv)+1}function $v(e,t){let o=Te(e),r=o.getFullYear(),n=da(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=so(e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);let s=kn(i,t),l=so(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);let u=kn(l,t);return o.getTime()>=s.getTime()?r+1:o.getTime()>=u.getTime()?r:r-1}function rN(e,t){let o=da(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=$v(e,t),a=so(e,0);return a.setFullYear(n,0,r),a.setHours(0,0,0,0),kn(a,t)}function nN(e,t){let o=Te(e),r=+kn(o,t)-+rN(o,t);return Math.round(r/zv)+1}function He(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var Xa={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return He(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):He(o+1,2)},d(e,t){return He(e.getDate(),t.length)},a(e,t){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(e,t){return He(e.getHours()%12||12,t.length)},H(e,t){return He(e.getHours(),t.length)},m(e,t){return He(e.getMinutes(),t.length)},s(e,t){return He(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return He(n,t.length)}};var Ec={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},PS={G:function(e,t,o){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"});case"GGGGG":return o.era(r,{width:"narrow"});case"GGGG":default:return o.era(r,{width:"wide"})}},y:function(e,t,o){if(t==="yo"){let r=e.getFullYear(),n=r>0?r:1-r;return o.ordinalNumber(n,{unit:"year"})}return Xa.y(e,t)},Y:function(e,t,o,r){let n=$v(e,r),a=n>0?n:1-n;if(t==="YY"){let i=a%100;return He(i,2)}return t==="Yo"?o.ordinalNumber(a,{unit:"year"}):He(a,t.length)},R:function(e,t){let o=Gv(e);return He(o,t.length)},u:function(e,t){let o=e.getFullYear();return He(o,t.length)},Q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return He(r,2);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return He(r,2);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,o){let r=e.getMonth();switch(t){case"M":case"MM":return Xa.M(e,t);case"Mo":return o.ordinalNumber(r+1,{unit:"month"});case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,o){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return He(r+1,2);case"Lo":return o.ordinalNumber(r+1,{unit:"month"});case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,o,r){let n=nN(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):He(n,t.length)},I:function(e,t,o){let r=oN(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):He(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):Xa.d(e,t)},D:function(e,t,o){let r=tN(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):He(r,t.length)},E:function(e,t,o){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"});case"EEEE":default:return o.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,o,r){let n=e.getDay(),a=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return He(a,2);case"eo":return o.ordinalNumber(a,{unit:"day"});case"eee":return o.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,o,r){let n=e.getDay(),a=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return He(a,t.length);case"co":return o.ordinalNumber(a,{unit:"day"});case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,o){let r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return He(n,t.length);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return o.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(r,{width:"short",context:"formatting"});case"iiii":default:return o.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,o){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),n;switch(r===12?n=Ec.noon:r===0?n=Ec.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),n;switch(r>=17?n=Ec.evening:r>=12?n=Ec.afternoon:r>=4?n=Ec.morning:n=Ec.night,t){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,o){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),o.ordinalNumber(r,{unit:"hour"})}return Xa.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):Xa.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):He(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):He(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):Xa.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):Xa.s(e,t)},S:function(e,t){return Xa.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return iN(r);case"XXXX":case"XX":return Ml(r);case"XXXXX":case"XXX":default:return Ml(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return iN(r);case"xxxx":case"xx":return Ml(r);case"xxxxx":case"xxx":default:return Ml(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+aN(r,":");case"OOOO":default:return"GMT"+Ml(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+aN(r,":");case"zzzz":default:return"GMT"+Ml(r,":")}},t:function(e,t,o){let r=Math.trunc(e.getTime()/1e3);return He(r,t.length)},T:function(e,t,o){let r=e.getTime();return He(r,t.length)}};function aN(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),a=r%60;return a===0?o+String(n):o+String(n)+t+He(a,2)}function iN(e,t){return e%60===0?(e>0?"-":"+")+He(Math.abs(e)/60,2):Ml(e,t)}function Ml(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=He(Math.trunc(r/60),2),a=He(r%60,2);return o+n+t+a}var sN=(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"})}},lN=(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"})}},x$=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return sN(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",sN(r,t)).replace("{{time}}",lN(n,t))},uN={p:lN,P:x$};var y$=/^D+$/,w$=/^Y+$/,C$=["D","DD","YY","YYYY"];function cN(e){return y$.test(e)}function dN(e){return w$.test(e)}function fN(e,t,o){let r=S$(e,t,o);if(console.warn(r),C$.includes(e))throw new RangeError(r)}function S$(e,t,o){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var b$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,R$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,I$=/^'([^]*?)'?$/,P$=/''/g,L$=/[a-zA-Z]/;function Mn(e,t,o){let r=da(),n=o?.locale??r.locale??IS,a=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Te(e);if(!Wv(s))throw new RangeError("Invalid time value");let l=t.match(R$).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=uN[d];return f(c,n.formatLong)}return c}).join("").match(b$).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:T$(c)};if(PS[d])return{isToken:!0,value:c};if(d.match(L$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:c}});n.localize.preprocessor&&(l=n.localize.preprocessor(s,l));let u={firstWeekContainsDate:a,weekStartsOn:i,locale:n};return l.map(c=>{if(!c.isToken)return c.value;let d=c.value;(!o?.useAdditionalWeekYearTokens&&dN(d)||!o?.useAdditionalDayOfYearTokens&&cN(d))&&fN(d,t,String(e));let f=PS[d[0]];return f(s,d,n.localize,u)}).join("")}function T$(e){let t=e.match(I$);return t?t[1].replace(P$,"'"):e}function LS(e){return Te(e).getDay()}function pN(e,t){let o=Te(e),r=Te(t);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function mN(e){return kl(e,GD(e))}function gN(e,t){return Uv(e,-t)}var Fo=R(N());function Hp({mode:e="single",selected:t,onSelect:o,disabled:r,showOutsideDays:n=!1,className:a,classNames:i,numberOfMonths:s=1,defaultMonth:l,...u}){let[c,d]=hN.useState(l||t&&t||new Date),f=[{short:"S",full:"Sunday"},{short:"M",full:"Monday"},{short:"T",full:"Tuesday"},{short:"W",full:"Wednesday"},{short:"T",full:"Thursday"},{short:"F",full:"Friday"},{short:"S",full:"Saturday"}],p=()=>{d(gN(c,1))},g=()=>{d(Uv(c,1))},m=b=>{if(!r?.(b)){if(e==="single")o?.(b);else if(e==="range"){let S=t;!S?.from||S.from&&S.to?o?.({from:b,to:void 0}):b<S.from?o?.({from:b,to:S.from}):o?.({from:S.from,to:b})}}},x=b=>{if(!t)return!1;if(e==="single")return kl(b,t);if(e==="range"){let S=t;return S.from&&S.to?b>=S.from&&b<=S.to:S.from?kl(b,S.from):!1}return!1},h=b=>{if(e!=="range"||!t)return!1;let S=t;return S.from?kl(b,S.from):!1},v=b=>{if(e!=="range"||!t)return!1;let S=t;return S.to?kl(b,S.to):!1},y=b=>{if(e!=="range"||!t)return!1;let S=t;return!S.from||!S.to?!1:b>S.from&&b<S.to},C=(()=>{let b=qD(c),S=jD(c),I=jv({start:b,end:S}),L=LS(b),T=[];if(L>0&&n){let D=kn(b),z=new Date(b);z.setDate(z.getDate()-1),T.push(...jv({start:D,end:z}))}let k=LS(S),E=[];if(k<6&&n){let D=new Date(S);D.setDate(D.getDate()+1);let z=KD(S);E.push(...jv({start:D,end:z}))}let _=[];if(!n&&L>0)for(let D=0;D<L;D++)_.push(null);return[...T,..._,...I,...E]})();return(0,Fo.jsxs)("div",{className:P("moonui-theme","p-0",a),children:[(0,Fo.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,Fo.jsx)("button",{onClick:p,className:P("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,Fo.jsx)(wn,{className:"h-5 w-5"})}),(0,Fo.jsx)("h2",{className:"text-base font-medium",children:Mn(c,"MMMM yyyy")}),(0,Fo.jsx)("button",{onClick:g,className:P("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,Fo.jsx)(No,{className:"h-5 w-5"})})]}),(0,Fo.jsxs)("div",{className:"px-6 pb-4",children:[(0,Fo.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((b,S)=>(0,Fo.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:b.full,children:b.short},`weekday-${S}`))}),(0,Fo.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((b,S)=>{if(!b)return(0,Fo.jsx)("div",{className:"h-10 w-10"},`empty-${S}`);let I=!pN(b,c),L=r?.(b)||!1,T=x(b),k=mN(b),E=h(b),_=v(b),D=y(b);return(0,Fo.jsx)("button",{onClick:()=>m(b),disabled:L,className:P("h-10 w-10 p-0 font-normal","inline-flex items-center justify-center rounded-lg","hover:bg-muted transition-colors text-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",I&&"text-muted-foreground/50",L&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",T&&!D&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",k&&"font-semibold relative after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-primary",D&&"bg-accent/30 text-accent-foreground rounded-none",E&&"rounded-r-none",_&&"rounded-l-none"),type:"button",children:Mn(b,"d")},b.toISOString())})})]})]})}Hp.displayName="Calendar";var El=R(M());var ss=R(N()),k$=e=>{let t={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/};for(let[o,r]of Object.entries(t))if(r.test(e))return o;return"unknown"},vN=(e,t)=>{let o=e.replace(/\s+/g,""),r=t==="amex"?[4,6,5]:[4,4,4,4],n="",a=0;for(let i of r){if(a>=o.length)break;n&&(n+=" "),n+=o.slice(a,a+i),a+=i}return n},xN=El.forwardRef(({className:e,value:t="",onChange:o,showIcon:r=!0,size:n,...a},i)=>{let[s,l]=El.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=k$(d);l(f);let p=f==="amex"?15:16,g=d.slice(0,p),m=vN(g,f);o?.(g,f),c.target.value=m};return(0,ss.jsxs)("div",{className:"relative",children:[(0,ss.jsx)(bo,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:vN(t,s),onChange:u,className:P(r&&"pl-10",e),...a}),r&&(0,ss.jsx)(Rf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});xN.displayName="CardNumberInput";var yN=El.forwardRef(({className:e,value:t="",onChange:o,size:r,...n},a)=>{let i=l=>{let u=l.target.value.replace(/\D/g,"");if(u.length>=2){let d=parseInt(u.slice(0,2));d>12?u="12"+u.slice(2):d===0&&(u="01"+u.slice(2))}u=u.slice(0,4);let c=u;u.length>=2&&(c=u.slice(0,2)+"/"+u.slice(2)),o?.(u),l.target.value=c},s=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return(0,ss.jsx)(bo,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...n})});yN.displayName="CardExpiryInput";var wN=El.forwardRef(({className:e,value:t="",onChange:o,cardType:r="unknown",size:n,...a},i)=>{let s=r==="amex"?4:3;return(0,ss.jsx)(bo,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-csc",placeholder:r==="amex"?"1234":"123",value:t,onChange:u=>{let c=u.target.value.replace(/\D/g,"").slice(0,s);o?.(c)},maxLength:s,className:e,...a})});wN.displayName="CardCVCInput";var CN=El.forwardRef(({className:e,value:t="",onChange:o,format:r="US",size:n,...a},i)=>{let s=u=>{let c=u.target.value;switch(r){case"US":c=c.replace(/\D/g,"").slice(0,5);break;case"CA":c=c.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6),c.length>=3&&(c=c.slice(0,3)+" "+c.slice(3));break;case"UK":c=c.toUpperCase().replace(/[^A-Z0-9\s]/g,"").slice(0,8);break;default:c=c.slice(0,10)}o?.(c.replace(/\s/g,"")),u.target.value=c};return(0,ss.jsx)(bo,{ref:i,type:"text",autoComplete:"postal-code",placeholder:(()=>{switch(r){case"US":return"12345";case"CA":return"K1A 0B1";case"UK":return"SW1A 1AA";default:return"Postal Code"}})(),value:t,onChange:s,className:e,...a})});CN.displayName="CardZipInput";var Rt=R(M());var Ur=R(M(),1);function M$(e){return Object.prototype.toString.call(e)==="[object Object]"}function SN(e){return M$(e)||Array.isArray(e)}function RN(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Kv(e,t){let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;let n=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return n!==a?!1:o.every(i=>{let s=e[i],l=t[i];return typeof s=="function"?`${s}`==`${l}`:!SN(s)||!SN(l)?s===l:Kv(s,l)})}function bN(e){return e.concat().sort((t,o)=>t.name>o.name?1:-1).map(t=>t.options)}function IN(e,t){if(e.length!==t.length)return!1;let o=bN(e),r=bN(t);return o.every((n,a)=>{let i=r[a];return Kv(n,i)})}function MS(e){return typeof e=="number"}function TS(e){return typeof e=="string"}function Xv(e){return typeof e=="boolean"}function PN(e){return Object.prototype.toString.call(e)==="[object Object]"}function gt(e){return Math.abs(e)}function ES(e){return Math.sign(e)}function zp(e,t){return gt(e-t)}function E$(e,t){if(e===0||t===0||gt(e)<=gt(t))return 0;let o=zp(gt(e),gt(t));return gt(o/e)}function A$(e){return Math.round(e*100)/100}function Gp(e){return Wp(e).map(Number)}function En(e){return e[qp(e)]}function qp(e){return Math.max(0,e.length-1)}function AS(e,t){return t===qp(e)}function LN(e,t=0){return Array.from(Array(e),(o,r)=>t+r)}function Wp(e){return Object.keys(e)}function TN(e,t){return[e,t].reduce((o,r)=>(Wp(r).forEach(n=>{let a=o[n],i=r[n],s=PN(a)&&PN(i);o[n]=s?TN(a,i):i}),o),{})}function kS(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function D$(e,t){let o={start:r,center:n,end:a};function r(){return 0}function n(l){return a(l)/2}function a(l){return t-l}function i(l,u){return TS(e)?o[e](l):e(t,l,u)}return{measure:i}}function jp(){let e=[];function t(n,a,i,s={passive:!0}){let l;if("addEventListener"in n)n.addEventListener(a,i,s),l=()=>n.removeEventListener(a,i,s);else{let u=n;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),r}function o(){e=e.filter(n=>n())}let r={add:t,clear:o};return r}function N$(e,t,o,r){let n=jp(),a=1e3/60,i=null,s=0,l=0;function u(){n.add(e,"visibilitychange",()=>{e.hidden&&g()})}function c(){p(),n.clear()}function d(x){if(!l)return;i||(i=x,o(),o());let h=x-i;for(i=x,s+=h;s>=a;)o(),s-=a;let v=s/a;r(v),l&&(l=t.requestAnimationFrame(d))}function f(){l||(l=t.requestAnimationFrame(d))}function p(){t.cancelAnimationFrame(l),i=null,s=0,l=0}function g(){i=null,s=0}return{init:u,destroy:c,start:f,stop:p,update:o,render:r}}function O$(e,t){let o=t==="rtl",r=e==="y",n=r?"y":"x",a=r?"x":"y",i=!r&&o?-1:1,s=c(),l=d();function u(g){let{height:m,width:x}=g;return r?m:x}function c(){return r?"top":o?"right":"left"}function d(){return r?"bottom":o?"left":"right"}function f(g){return g*i}return{scroll:n,cross:a,startEdge:s,endEdge:l,measureSize:u,direction:f}}function Al(e=0,t=0){let o=gt(e-t);function r(u){return u<e}function n(u){return u>t}function a(u){return r(u)||n(u)}function i(u){return a(u)?r(u)?e:t:u}function s(u){return o?u-o*Math.ceil((u-t)/o):u}return{length:o,max:t,min:e,constrain:i,reachedAny:a,reachedMax:n,reachedMin:r,removeOffset:s}}function kN(e,t,o){let{constrain:r}=Al(0,e),n=e+1,a=i(t);function i(f){return o?gt((n+f)%n):r(f)}function s(){return a}function l(f){return a=i(f),d}function u(f){return c().set(s()+f)}function c(){return kN(e,s(),o)}let d={get:s,set:l,add:u,clone:c};return d}function F$(e,t,o,r,n,a,i,s,l,u,c,d,f,p,g,m,x,h,v){let{cross:y,direction:w}=e,C=["INPUT","SELECT","TEXTAREA"],b={passive:!1},S=jp(),I=jp(),L=Al(50,225).constrain(p.measure(20)),T={mouse:300,touch:400},k={mouse:500,touch:600},E=g?43:25,_=!1,D=0,z=0,F=!1,O=!1,B=!1,A=!1;function te(X){if(!v)return;function Ie(ie){(Xv(v)||v(X,ie))&&ce(ie)}let J=t;S.add(J,"dragstart",ie=>ie.preventDefault(),b).add(J,"touchmove",()=>{},b).add(J,"touchend",()=>{}).add(J,"touchstart",Ie).add(J,"mousedown",Ie).add(J,"touchcancel",ne).add(J,"contextmenu",ne).add(J,"click",he,!0)}function ae(){S.clear(),I.clear()}function V(){let X=A?o:t;I.add(X,"touchmove",U,b).add(X,"touchend",ne).add(X,"mousemove",U,b).add(X,"mouseup",ne)}function Q(X){let Ie=X.nodeName||"";return C.includes(Ie)}function oe(){return(g?k:T)[A?"mouse":"touch"]}function Y(X,Ie){let J=d.add(ES(X)*-1),ie=c.byDistance(X,!g).distance;return g||gt(X)<L?ie:x&&Ie?ie*.5:c.byIndex(J.get(),0).distance}function ce(X){let Ie=kS(X,r);A=Ie,B=g&&Ie&&!X.buttons&&_,_=zp(n.get(),i.get())>=2,!(Ie&&X.button!==0)&&(Q(X.target)||(F=!0,a.pointerDown(X),u.useFriction(0).useDuration(0),n.set(i),V(),D=a.readPoint(X),z=a.readPoint(X,y),f.emit("pointerDown")))}function U(X){if(!kS(X,r)&&X.touches.length>=2)return ne(X);let J=a.readPoint(X),ie=a.readPoint(X,y),ze=zp(J,D),Ke=zp(ie,z);if(!O&&!A&&(!X.cancelable||(O=ze>Ke,!O)))return ne(X);let Lt=a.pointerMove(X);ze>m&&(B=!0),u.useFriction(.3).useDuration(.75),s.start(),n.add(w(Lt)),X.preventDefault()}function ne(X){let J=c.byDistance(0,!1).index!==d.get(),ie=a.pointerUp(X)*oe(),ze=Y(w(ie),J),Ke=E$(ie,ze),Lt=E-10*Ke,Ne=h+Ke/50;O=!1,F=!1,I.clear(),u.useDuration(Lt).useFriction(Ne),l.distance(ze,!g),A=!1,f.emit("pointerUp")}function he(X){B&&(X.stopPropagation(),X.preventDefault(),B=!1)}function xe(){return F}return{init:te,destroy:ae,pointerDown:xe}}function _$(e,t){let r,n;function a(d){return d.timeStamp}function i(d,f){let g=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(kS(d,t)?d:d.touches[0])[g]}function s(d){return r=d,n=d,i(d)}function l(d){let f=i(d)-i(n),p=a(d)-a(r)>170;return n=d,p&&(r=d),f}function u(d){if(!r||!n)return 0;let f=i(n)-i(r),p=a(d)-a(r),g=a(d)-a(n)>170,m=f/p;return p&&!g&>(m)>.1?m:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:i}}function V$(){function e(o){let{offsetTop:r,offsetLeft:n,offsetWidth:a,offsetHeight:i}=o;return{top:r,right:n+a,bottom:r+i,left:n,width:a,height:i}}return{measure:e}}function B$(e){function t(r){return e*(r/100)}return{measure:t}}function H$(e,t,o,r,n,a,i){let s=[e].concat(r),l,u,c=[],d=!1;function f(x){return n.measureSize(i.measure(x))}function p(x){if(!a)return;u=f(e),c=r.map(f);function h(v){for(let y of v){if(d)return;let w=y.target===e,C=r.indexOf(y.target),b=w?u:c[C],S=f(w?e:r[C]);if(gt(S-b)>=.5){x.reInit(),t.emit("resize");break}}}l=new ResizeObserver(v=>{(Xv(a)||a(x,v))&&h(v)}),o.requestAnimationFrame(()=>{s.forEach(v=>l.observe(v))})}function g(){d=!0,l&&l.disconnect()}return{init:p,destroy:g}}function U$(e,t,o,r,n,a){let i=0,s=0,l=n,u=a,c=e.get(),d=0;function f(){let b=r.get()-e.get(),S=!l,I=0;return S?(i=0,o.set(r),e.set(r),I=b):(o.set(e),i+=b/l,i*=u,c+=i,e.add(i),I=c-d),s=ES(I),d=c,C}function p(){let b=r.get()-t.get();return gt(b)<.001}function g(){return l}function m(){return s}function x(){return i}function h(){return y(n)}function v(){return w(a)}function y(b){return l=b,C}function w(b){return u=b,C}let C={direction:m,duration:g,velocity:x,seek:f,settled:p,useBaseFriction:v,useBaseDuration:h,useFriction:w,useDuration:y};return C}function z$(e,t,o,r,n){let a=n.measure(10),i=n.measure(50),s=Al(.1,.99),l=!1;function u(){return!(l||!e.reachedAny(o.get())||!e.reachedAny(t.get()))}function c(p){if(!u())return;let g=e.reachedMin(t.get())?"min":"max",m=gt(e[g]-t.get()),x=o.get()-t.get(),h=s.constrain(m/i);o.subtract(x*h),!p&>(x)<a&&(o.set(e.constrain(o.get())),r.useDuration(25).useBaseFriction())}function d(p){l=!p}return{shouldConstrain:u,constrain:c,toggleActive:d}}function G$(e,t,o,r,n){let a=Al(-t+e,0),i=d(),s=c(),l=f();function u(g,m){return zp(g,m)<=1}function c(){let g=i[0],m=En(i),x=i.lastIndexOf(g),h=i.indexOf(m)+1;return Al(x,h)}function d(){return o.map((g,m)=>{let{min:x,max:h}=a,v=a.constrain(g),y=!m,w=AS(o,m);return y?h:w||u(x,v)?x:u(h,v)?h:v}).map(g=>parseFloat(g.toFixed(3)))}function f(){if(t<=e+n)return[a.max];if(r==="keepSnaps")return i;let{min:g,max:m}=s;return i.slice(g,m)}return{snapsContained:l,scrollContainLimit:s}}function W$(e,t,o){let r=t[0],n=o?r-e:En(t);return{limit:Al(n,r)}}function j$(e,t,o,r){let a=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:l}=Al(a,i);function u(f){return f===1?l(o.get()):f===-1?s(o.get()):!1}function c(f){if(!u(f))return;let p=e*(f*-1);r.forEach(g=>g.add(p))}return{loop:c}}function q$(e){let{max:t,length:o}=e;function r(a){let i=a-t;return o?i/-o:0}return{get:r}}function $$(e,t,o,r,n){let{startEdge:a,endEdge:i}=e,{groupSlides:s}=n,l=d().map(t.measure),u=f(),c=p();function d(){return s(r).map(m=>En(m)[i]-m[0][a]).map(gt)}function f(){return r.map(m=>o[a]-m[a]).map(m=>-gt(m))}function p(){return s(u).map(m=>m[0]).map((m,x)=>m+l[x])}return{snaps:u,snapsAligned:c}}function K$(e,t,o,r,n,a){let{groupSlides:i}=n,{min:s,max:l}=r,u=c();function c(){let f=i(a),p=!e||t==="keepSnaps";return o.length===1?[a]:p?f:f.slice(s,l).map((g,m,x)=>{let h=!m,v=AS(x,m);if(h){let y=En(x[0])+1;return LN(y)}if(v){let y=qp(a)-En(x)[0]+1;return LN(y,En(x)[0])}return g})}return{slideRegistry:u}}function X$(e,t,o,r,n){let{reachedAny:a,removeOffset:i,constrain:s}=r;function l(g){return g.concat().sort((m,x)=>gt(m)-gt(x))[0]}function u(g){let m=e?i(g):s(g),x=t.map((v,y)=>({diff:c(v-m,0),index:y})).sort((v,y)=>gt(v.diff)-gt(y.diff)),{index:h}=x[0];return{index:h,distance:m}}function c(g,m){let x=[g,g+o,g-o];if(!e)return g;if(!m)return l(x);let h=x.filter(v=>ES(v)===m);return h.length?l(h):En(x)-o}function d(g,m){let x=t[g]-n.get(),h=c(x,m);return{index:g,distance:h}}function f(g,m){let x=n.get()+g,{index:h,distance:v}=u(x),y=!e&&a(x);if(!m||y)return{index:h,distance:g};let w=t[h]-v,C=g+c(w,0);return{index:h,distance:C}}return{byDistance:f,byIndex:d,shortcut:c}}function Y$(e,t,o,r,n,a,i){function s(d){let f=d.distance,p=d.index!==t.get();a.add(f),f&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(o.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,f){let p=n.byDistance(d,f);s(p)}function u(d,f){let p=t.clone().set(d),g=n.byIndex(p.get(),f);s(g)}return{distance:l,index:u}}function Q$(e,t,o,r,n,a,i,s){let l={passive:!0,capture:!0},u=0;function c(p){if(!s)return;function g(m){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;let v=o.findIndex(y=>y.includes(m));MS(v)&&(n.useDuration(0),r.index(v,0),i.emit("slideFocus"))}a.add(document,"keydown",d,!1),t.forEach((m,x)=>{a.add(m,"focus",h=>{(Xv(s)||s(p,h))&&g(x)},l)})}function d(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function Up(e){let t=e;function o(){return t}function r(l){t=i(l)}function n(l){t+=i(l)}function a(l){t-=i(l)}function i(l){return MS(l)?l:l.get()}return{get:o,set:r,add:n,subtract:a}}function MN(e,t){let o=e.scroll==="x"?i:s,r=t.style,n=null,a=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function s(f){return`translate3d(0px,${f}px,0px)`}function l(f){if(a)return;let p=A$(e.direction(f));p!==n&&(r.transform=o(p),n=p)}function u(f){a=!f}function c(){a||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function Z$(e,t,o,r,n,a,i,s,l){let c=Gp(n),d=Gp(n).reverse(),f=h().concat(v());function p(S,I){return S.reduce((L,T)=>L-n[T],I)}function g(S,I){return S.reduce((L,T)=>p(L,I)>0?L.concat([T]):L,[])}function m(S){return a.map((I,L)=>({start:I-r[L]+.5+S,end:I+t-.5+S}))}function x(S,I,L){let T=m(I);return S.map(k=>{let E=L?0:-o,_=L?o:0,D=L?"end":"start",z=T[k][D];return{index:k,loopPoint:z,slideLocation:Up(-1),translate:MN(e,l[k]),target:()=>s.get()>z?E:_}})}function h(){let S=i[0],I=g(d,S);return x(I,o,!1)}function v(){let S=t-i[0]-1,I=g(c,S);return x(I,-o,!0)}function y(){return f.every(({index:S})=>{let I=c.filter(L=>L!==S);return p(I,t)<=.1})}function w(){f.forEach(S=>{let{target:I,translate:L,slideLocation:T}=S,k=I();k!==T.get()&&(L.to(k),T.set(k))})}function C(){f.forEach(S=>S.translate.clear())}return{canLoop:y,clear:C,loop:w,loopPoints:f}}function J$(e,t,o){let r,n=!1;function a(l){if(!o)return;function u(c){for(let d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(c=>{n||(Xv(o)||o(l,c))&&u(c)}),r.observe(e,{childList:!0})}function i(){r&&r.disconnect(),n=!0}return{init:a,destroy:i}}function e8(e,t,o,r){let n={},a=null,i=null,s,l=!1;function u(){s=new IntersectionObserver(g=>{l||(g.forEach(m=>{let x=t.indexOf(m.target);n[x]=m}),a=null,i=null,o.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(g=>s.observe(g))}function c(){s&&s.disconnect(),l=!0}function d(g){return Wp(n).reduce((m,x)=>{let h=parseInt(x),{isIntersecting:v}=n[h];return(g&&v||!g&&!v)&&m.push(h),m},[])}function f(g=!0){if(g&&a)return a;if(!g&&i)return i;let m=d(g);return g&&(a=m),g||(i=m),m}return{init:u,destroy:c,get:f}}function t8(e,t,o,r,n,a){let{measureSize:i,startEdge:s,endEdge:l}=e,u=o[0]&&n,c=g(),d=m(),f=o.map(i),p=x();function g(){if(!u)return 0;let v=o[0];return gt(t[s]-v[s])}function m(){if(!u)return 0;let v=a.getComputedStyle(En(r));return parseFloat(v.getPropertyValue(`margin-${l}`))}function x(){return o.map((v,y,w)=>{let C=!y,b=AS(w,y);return C?f[y]+c:b?f[y]+d:w[y+1][s]-v[s]}).map(gt)}return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}function o8(e,t,o,r,n,a,i,s,l){let{startEdge:u,endEdge:c,direction:d}=e,f=MS(o);function p(h,v){return Gp(h).filter(y=>y%v===0).map(y=>h.slice(y,y+v))}function g(h){return h.length?Gp(h).reduce((v,y,w)=>{let C=En(v)||0,b=C===0,S=y===qp(h),I=n[u]-a[C][u],L=n[u]-a[y][c],T=!r&&b?d(i):0,k=!r&&S?d(s):0,E=gt(L-k-(I+T));return w&&E>t+l&&v.push(y),S&&v.push(h.length),v},[]).map((v,y,w)=>{let C=Math.max(w[y-1]||0);return h.slice(C,v)}):[]}function m(h){return f?p(h,o):g(h)}return{groupSlides:m}}function r8(e,t,o,r,n,a,i){let{align:s,axis:l,direction:u,startIndex:c,loop:d,duration:f,dragFree:p,dragThreshold:g,inViewThreshold:m,slidesToScroll:x,skipSnaps:h,containScroll:v,watchResize:y,watchSlides:w,watchDrag:C,watchFocus:b}=a,S=2,I=V$(),L=I.measure(t),T=o.map(I.measure),k=O$(l,u),E=k.measureSize(L),_=B$(E),D=D$(s,E),z=!d&&!!v,F=d||!!v,{slideSizes:O,slideSizesWithGaps:B,startGap:A,endGap:te}=t8(k,L,T,o,F,n),ae=o8(k,E,x,d,L,T,A,te,S),{snaps:V,snapsAligned:Q}=$$(k,D,L,T,ae),oe=-En(V)+En(B),{snapsContained:Y,scrollContainLimit:ce}=G$(E,oe,Q,v,S),U=z?Y:Q,{limit:ne}=W$(oe,U,d),he=kN(qp(U),c,d),xe=he.clone(),pe=Gp(o),X=({dragHandler:vi,scrollBody:hd,scrollBounds:vd,options:{loop:Tr}})=>{Tr||vd.constrain(vi.pointerDown()),hd.seek()},Ie=({scrollBody:vi,translate:hd,location:vd,offsetLocation:Tr,previousLocation:xd,scrollLooper:My,slideLooper:Tz,dragHandler:kz,animation:Mz,eventHandler:uP,scrollBounds:Ez,options:{loop:cP}},dP)=>{let fP=vi.settled(),Az=!Ez.shouldConstrain(),pP=cP?fP:fP&&Az,mP=pP&&!kz.pointerDown();mP&&Mz.stop();let Dz=vd.get()*dP+xd.get()*(1-dP);Tr.set(Dz),cP&&(My.loop(vi.direction()),Tz.loop()),hd.to(Tr.get()),mP&&uP.emit("settle"),pP||uP.emit("scroll")},J=N$(r,n,()=>X(ou),vi=>Ie(ou,vi)),ie=.68,ze=U[he.get()],Ke=Up(ze),Lt=Up(ze),Ne=Up(ze),Ct=Up(ze),qn=U$(Ke,Ne,Lt,Ct,f,ie),Mo=X$(d,U,oe,ne,Ct),un=Y$(J,he,xe,qn,Mo,Ct,i),Lr=q$(ne),cn=jp(),$n=e8(t,o,i,m),{slideRegistry:Kn}=K$(z,v,U,ce,ae,pe),Bm=Q$(e,o,Kn,un,qn,cn,i,b),ou={ownerDocument:r,ownerWindow:n,eventHandler:i,containerRect:L,slideRects:T,animation:J,axis:k,dragHandler:F$(k,e,r,n,Ct,_$(k,n),Ke,J,un,qn,Mo,he,i,_,p,g,h,ie,C),eventStore:cn,percentOfView:_,index:he,indexPrevious:xe,limit:ne,location:Ke,offsetLocation:Ne,previousLocation:Lt,options:a,resizeHandler:H$(t,i,n,o,k,y,I),scrollBody:qn,scrollBounds:z$(ne,Ne,Ct,qn,_),scrollLooper:j$(oe,ne,Ne,[Ke,Ne,Lt,Ct]),scrollProgress:Lr,scrollSnapList:U.map(Lr.get),scrollSnaps:U,scrollTarget:Mo,scrollTo:un,slideLooper:Z$(k,E,oe,O,B,V,U,Ne,o),slideFocus:Bm,slidesHandler:J$(t,i,w),slidesInView:$n,slideIndexes:pe,slideRegistry:Kn,slidesToScroll:ae,target:Ct,translate:MN(k,t)};return ou}function n8(){let e={},t;function o(u){t=u}function r(u){return e[u]||[]}function n(u){return r(u).forEach(c=>c(t,u)),l}function a(u,c){return e[u]=r(u).concat([c]),l}function i(u,c){return e[u]=r(u).filter(d=>d!==c),l}function s(){e={}}let l={init:o,emit:n,off:i,on:a,clear:s};return l}var a8={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function i8(e){function t(a,i){return TN(a,i||{})}function o(a){let i=a.breakpoints||{},s=Wp(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(a,s)}function r(a){return a.map(i=>Wp(i.breakpoints||{})).reduce((i,s)=>i.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:o,optionsMediaQueries:r}}function s8(e){let t=[];function o(a,i){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:o,destroy:r}}function $p(e,t,o){let r=e.ownerDocument,n=r.defaultView,a=i8(n),i=s8(a),s=jp(),l=n8(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=a,{on:f,off:p,emit:g}=l,m=k,x=!1,h,v=u(a8,$p.globalOptions),y=u(v),w=[],C,b,S;function I(){let{container:pe,slides:X}=y;b=(TS(pe)?e.querySelector(pe):pe)||e.children[0];let J=TS(X)?b.querySelectorAll(X):X;S=[].slice.call(J||b.children)}function L(pe){let X=r8(e,b,S,r,n,pe,l);if(pe.loop&&!X.slideLooper.canLoop()){let Ie=Object.assign({},pe,{loop:!1});return L(Ie)}return X}function T(pe,X){x||(v=u(v,pe),y=c(v),w=X||w,I(),h=L(y),d([v,...w.map(({options:Ie})=>Ie)]).forEach(Ie=>s.add(Ie,"change",k)),y.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(xe),h.eventHandler.init(xe),h.resizeHandler.init(xe),h.slidesHandler.init(xe),h.options.loop&&h.slideLooper.loop(),b.offsetParent&&S.length&&h.dragHandler.init(xe),C=i.init(xe,w)))}function k(pe,X){let Ie=ae();E(),T(u({startIndex:Ie},pe),X),l.emit("reInit")}function E(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),i.destroy(),s.clear()}function _(){x||(x=!0,s.clear(),E(),l.emit("destroy"),l.clear())}function D(pe,X,Ie){!y.active||x||(h.scrollBody.useBaseFriction().useDuration(X===!0?0:y.duration),h.scrollTo.index(pe,Ie||0))}function z(pe){let X=h.index.add(1).get();D(X,pe,-1)}function F(pe){let X=h.index.add(-1).get();D(X,pe,1)}function O(){return h.index.add(1).get()!==ae()}function B(){return h.index.add(-1).get()!==ae()}function A(){return h.scrollSnapList}function te(){return h.scrollProgress.get(h.offsetLocation.get())}function ae(){return h.index.get()}function V(){return h.indexPrevious.get()}function Q(){return h.slidesInView.get()}function oe(){return h.slidesInView.get(!1)}function Y(){return C}function ce(){return h}function U(){return e}function ne(){return b}function he(){return S}let xe={canScrollNext:O,canScrollPrev:B,containerNode:ne,internalEngine:ce,destroy:_,off:p,on:f,emit:g,plugins:Y,previousScrollSnap:V,reInit:m,rootNode:U,scrollNext:z,scrollPrev:F,scrollProgress:te,scrollSnapList:A,scrollTo:D,selectedScrollSnap:ae,slideNodes:he,slidesInView:Q,slidesNotInView:oe};return T(t,o),setTimeout(()=>l.emit("init"),0),xe}$p.globalOptions=void 0;function Yv(e={},t=[]){let o=(0,Ur.useRef)(e),r=(0,Ur.useRef)(t),[n,a]=(0,Ur.useState)(),[i,s]=(0,Ur.useState)(),l=(0,Ur.useCallback)(()=>{n&&n.reInit(o.current,r.current)},[n]);return(0,Ur.useEffect)(()=>{Kv(o.current,e)||(o.current=e,l())},[e,l]),(0,Ur.useEffect)(()=>{IN(r.current,t)||(r.current=t,l())},[t,l]),(0,Ur.useEffect)(()=>{if(RN()&&i){$p.globalOptions=Yv.globalOptions;let u=$p(i,o.current,r.current);return a(u),()=>u.destroy()}else a(void 0)},[i,a]),[s,n]}Yv.globalOptions=void 0;var yr=R(N()),EN=Rt.createContext(null);function Kp(){let e=Rt.useContext(EN);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var AN=Rt.forwardRef(({orientation:e="horizontal",opts:t,setApi:o,plugins:r,className:n,children:a,...i},s)=>{let l=e||(t?.axis==="y"?"vertical":"horizontal"),[u,c]=Yv({...t,axis:l==="horizontal"?"x":"y"},r),[d,f]=Rt.useState(!1),[p,g]=Rt.useState(!1),m=Rt.useCallback(y=>{y&&(f(y.canScrollPrev()),g(y.canScrollNext()))},[]),x=Rt.useCallback(()=>{c?.scrollPrev()},[c]),h=Rt.useCallback(()=>{c?.scrollNext()},[c]),v=Rt.useCallback(y=>{let w=l==="horizontal"?"ArrowLeft":"ArrowUp",C=l==="horizontal"?"ArrowRight":"ArrowDown";y.key===w?(y.preventDefault(),x()):y.key===C&&(y.preventDefault(),h())},[l,x,h]);return Rt.useEffect(()=>{!c||!o||o(c)},[c,o]),Rt.useEffect(()=>{if(c)return m(c),c.on("reInit",m),c.on("select",m),()=>{c.off("reInit",m),c.off("select",m)}},[c,m]),(0,yr.jsx)(EN.Provider,{value:{carouselRef:u,api:c,opts:t,scrollPrev:x,scrollNext:h,canScrollPrev:d,canScrollNext:p,orientation:l},children:(0,yr.jsx)("div",{ref:s,onKeyDownCapture:v,className:P("moonui-theme","relative",n),role:"region","aria-roledescription":"carousel",...i,children:a})})});AN.displayName="Carousel";var DN=K("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),NN=Rt.forwardRef(({className:e,...t},o)=>{let{carouselRef:r,orientation:n}=Kp();return(0,yr.jsx)("div",{ref:r,className:"overflow-hidden",children:(0,yr.jsx)("div",{ref:o,className:P(DN({orientation:n}),e),...t})})});NN.displayName="CarouselContent";var ON=K("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),FN=Rt.forwardRef(({className:e,...t},o)=>{let{orientation:r}=Kp();return(0,yr.jsx)("div",{ref:o,role:"group","aria-roledescription":"slide",className:P(ON({orientation:r}),e),...t})});FN.displayName="CarouselItem";var _N=Rt.forwardRef(({className:e,variant:t="outline",size:o="icon-sm",...r},n)=>{let{orientation:a,scrollPrev:i,canScrollPrev:s}=Kp();return(0,yr.jsxs)(De,{ref:n,variant:t,size:o,rounded:"full",className:P("absolute",a==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...r,children:[(0,yr.jsx)(vf,{className:"h-4 w-4","aria-hidden":"true"}),(0,yr.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});_N.displayName="CarouselPrevious";var VN=Rt.forwardRef(({className:e,variant:t="outline",size:o="icon-sm",...r},n)=>{let{orientation:a,scrollNext:i,canScrollNext:s}=Kp();return(0,yr.jsxs)(De,{ref:n,variant:t,size:o,rounded:"full",className:P("absolute",a==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...r,children:[(0,yr.jsx)(xf,{className:"h-4 w-4","aria-hidden":"true"}),(0,yr.jsx)("span",{className:"sr-only",children:"Next slide"})]})});VN.displayName="CarouselNext";var Dl=R(M());var _o=R(M(),1);var Qv=R(M(),1);function Ac(e){let t=Qv.useRef({value:e,previous:e});return Qv.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var BN=R(M(),1);function Dc(e){let[t,o]=BN.useState(void 0);return _e(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let a=n[0],i,s;if("borderBoxSize"in a){let l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;o({width:i,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}var wr=R(N(),1),Zv="Checkbox",[l8,oRe]=Oe(Zv),[u8,DS]=l8(Zv);function c8(e){let{__scopeCheckbox:t,checked:o,children:r,defaultChecked:n,disabled:a,form:i,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,p]=qe({prop:o,defaultProp:n??!1,onChange:l,caller:Zv}),[g,m]=_o.useState(null),[x,h]=_o.useState(null),v=_o.useRef(!1),y=g?!!i||!!g.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:g,setControl:m,name:s,form:i,value:c,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:ls(n)?!1:n,isFormControl:y,bubbleInput:x,setBubbleInput:h};return(0,wr.jsx)(u8,{scope:t,...w,children:d8(d)?d(w):r})}var HN="CheckboxTrigger",UN=_o.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},n)=>{let{control:a,value:i,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:g}=DS(HN,e),m=de(n,c),x=_o.useRef(l);return _o.useEffect(()=>{let h=a?.form;if(h){let v=()=>d(x.current);return h.addEventListener("reset",v),()=>h.removeEventListener("reset",v)}},[a,d]),(0,wr.jsx)($.button,{type:"button",role:"checkbox","aria-checked":ls(l)?"mixed":l,"aria-required":u,"data-state":jN(l),"data-disabled":s?"":void 0,disabled:s,value:i,...r,ref:m,onKeyDown:W(t,h=>{h.key==="Enter"&&h.preventDefault()}),onClick:W(o,h=>{d(v=>ls(v)?!0:!v),g&&p&&(f.current=h.isPropagationStopped(),f.current||h.stopPropagation())})})});UN.displayName=HN;var Jv=_o.forwardRef((e,t)=>{let{__scopeCheckbox:o,name:r,checked:n,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return(0,wr.jsx)(c8,{__scopeCheckbox:o,checked:n,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,wr.jsxs)(wr.Fragment,{children:[(0,wr.jsx)(UN,{...d,ref:t,__scopeCheckbox:o}),f&&(0,wr.jsx)(WN,{__scopeCheckbox:o})]})})});Jv.displayName=Zv;var zN="CheckboxIndicator",NS=_o.forwardRef((e,t)=>{let{__scopeCheckbox:o,forceMount:r,...n}=e,a=DS(zN,o);return(0,wr.jsx)(st,{present:r||ls(a.checked)||a.checked===!0,children:(0,wr.jsx)($.span,{"data-state":jN(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});NS.displayName=zN;var GN="CheckboxBubbleInput",WN=_o.forwardRef(({__scopeCheckbox:e,...t},o)=>{let{control:r,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:i,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:p}=DS(GN,e),g=de(o,p),m=Ac(a),x=Dc(r);_o.useEffect(()=>{let v=f;if(!v)return;let y=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(y,"checked").set,b=!n.current;if(m!==a&&C){let S=new Event("click",{bubbles:b});v.indeterminate=ls(a),C.call(v,ls(a)?!1:a),v.dispatchEvent(S)}},[f,m,a,n]);let h=_o.useRef(ls(a)?!1:a);return(0,wr.jsx)($.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??h.current,required:s,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:g,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});WN.displayName=GN;function d8(e){return typeof e=="function"}function ls(e){return e==="indeterminate"}function jN(e){return ls(e)?"indeterminate":e?"checked":"unchecked"}var zr=R(N()),p8=K("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground data-[state=indeterminate]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),OS=Dl.forwardRef(({className:e,variant:t,size:o,radius:r,animation:n,indeterminate:a=!1,icon:i,checked:s,...l},u)=>(0,zr.jsx)(Jv,{ref:u,checked:a?"indeterminate":s,className:P("moonui-theme",p8({variant:t,size:o,radius:r,animation:n}),e),...l,children:(0,zr.jsx)(NS,{className:P("flex items-center justify-center text-current",n==="bounce"&&"data-[state=checked]:animate-bounce"),children:a?(0,zr.jsx)(Nf,{className:"h-[65%] w-[65%]"}):i||(0,zr.jsx)(vo,{className:"h-[65%] w-[65%]"})})}));OS.displayName=Jv.displayName;var qN=Dl.forwardRef(({className:e,orientation:t="vertical",spacing:o="1rem",children:r,...n},a)=>(0,zr.jsx)("div",{ref:a,className:P("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:o},role:"group",...n,children:r}));qN.displayName="CheckboxGroup";var ex=Dl.forwardRef(({className:e,htmlFor:t,children:o,position:r="end",disabled:n=!1,...a},i)=>(0,zr.jsx)("label",{ref:i,htmlFor:t,className:P("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r==="start"?"mr-2":"ml-2",n&&"cursor-not-allowed opacity-70",e),...a,children:o}));ex.displayName="CheckboxLabel";var $N=Dl.forwardRef(({id:e,label:t,labelPosition:o="end",labelClassName:r,...n},a)=>{let i=Dl.useId(),s=e||i;return(0,zr.jsxs)("div",{className:"flex items-center",children:[o==="start"&&(0,zr.jsx)(ex,{htmlFor:s,position:"start",disabled:n.disabled,className:r,children:t}),(0,zr.jsx)(OS,{ref:a,id:s,...n}),o==="end"&&(0,zr.jsx)(ex,{htmlFor:s,position:"end",disabled:n.disabled,className:r,children:t})]})});$N.displayName="CheckboxWithLabel";var FS=R(M());var Nl=R(N()),m8=ch,KN=K("flex w-full items-center justify-between transition-all",{variants:{variant:{default:"text-foreground hover:text-primary",ghost:"text-foreground hover:bg-accent/10 rounded",outline:"text-foreground border border-border rounded-t-md hover:bg-accent/5"},size:{sm:"text-xs py-2 px-3",default:"text-sm py-3 px-4",md:"text-base py-4 px-4",lg:"text-lg py-5 px-5"}},defaultVariants:{variant:"default",size:"default"}}),XN=FS.forwardRef(({className:e,children:t,variant:o,size:r,asChild:n,...a},i)=>n?(0,Nl.jsx)(Ou,{ref:i,className:P("moonui-theme",KN({variant:o,size:r}),e),asChild:n,...a,children:t}):(0,Nl.jsxs)(Ou,{ref:i,className:P("moonui-theme",KN({variant:o,size:r}),e),...a,children:[t,(0,Nl.jsx)(ra,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));XN.displayName=Ou.displayName;var g8=K("overflow-hidden transition-all data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",{variants:{variant:{default:"text-muted-foreground",ghost:"text-muted-foreground rounded-b",outline:"text-muted-foreground border border-t-0 border-border rounded-b-md"},size:{sm:"text-xs",default:"text-sm",md:"text-base",lg:"text-lg"}},defaultVariants:{variant:"default",size:"default"}}),YN=FS.forwardRef(({className:e,children:t,variant:o,size:r,...n},a)=>(0,Nl.jsx)(df,{ref:a,className:P("moonui-theme",g8({variant:o,size:r}),e),...n,children:(0,Nl.jsx)("div",{className:"p-4",children:t})}));YN.displayName=df.displayName;var Kr=R(M());var Ya=R(M());var Cr=R(N()),h8=K("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),v8=K(["w-full bg-background transition-all duration-200","text-foreground placeholder:text-muted-foreground","disabled:cursor-not-allowed disabled:opacity-50","file:border-0 file:bg-transparent file:font-medium","focus-visible:outline-none dark:text-gray-200"],{variants:{variant:{standard:"border border-input rounded-md px-3 py-2 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-800/80 dark:shadow-inner dark:shadow-gray-950/10",filled:"border border-transparent bg-gray-100 dark:bg-gray-800 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",ghost:"border-none bg-transparent shadow-none px-1 dark:text-gray-300 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 py-2 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300 dark:bg-transparent"},size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""},hasRightButton:{true:"pr-10",false:""},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800/50 pointer-events-none",false:""}},defaultVariants:{variant:"standard",size:"md",isError:!1,isSuccess:!1,isDisabled:!1,hasLeftIcon:!1,hasRightIcon:!1,hasRightButton:!1}}),bo=Ya.forwardRef(({className:e,wrapperClassName:t,messageClassName:o,variant:r,size:n,isError:a,disabled:i,error:s,success:l,loading:u,leftIcon:c,rightIcon:d,rightButton:f,alwaysShowMessage:p=!1,label:g,floatingLabel:m=!1,floatingLabelClassName:x,value:h,defaultValue:v,onChange:y,onFocus:w,onBlur:C,placeholder:b,...S},I)=>{let L=Ya.useId(),T=S.id||L,[k,E]=Ya.useState(!1),[_,D]=Ya.useState(h||v||""),F=k||_!==""&&_!==null&&_!==void 0,O=V=>{E(!0),w?.(V)},B=V=>{E(!1),C?.(V)},A=V=>{D(V.target.value),y?.(V)};Ya.useEffect(()=>{h!==void 0&&D(h)},[h]);let te=p||s||l,ae=s?"error":l?"success":"normal";return(0,Cr.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,Cr.jsxs)("div",{className:P("moonui-theme",h8({size:n}),t),children:[m&&g&&(0,Cr.jsx)("label",{htmlFor:S.id,className:P("absolute transition-all duration-200 pointer-events-none",c||u?"left-10":"left-3","text-gray-500 dark:text-gray-400",F?"top-0 -translate-y-1/2 text-xs bg-background dark:bg-gray-800 px-1":"top-1/2 -translate-y-1/2 text-sm",k&&"text-primary dark:text-primary",!!s&&"text-error",i&&"opacity-50",x),children:g}),c&&(0,Cr.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,Cr.jsx)(Vt,{className:"h-4 w-4 animate-spin"}):c}),(0,Cr.jsx)("input",{className:P(v8({variant:r,size:n,isError:!!s||a,isSuccess:!!l,isDisabled:i||u,hasLeftIcon:!!c||u,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:I,disabled:i||u,"data-loading":u?"":void 0,"data-error":s?"":void 0,"data-success":l?"":void 0,"aria-invalid":!!s||!!a||void 0,"aria-describedby":s?`${T}-error`:l?`${T}-success`:void 0,value:h,defaultValue:v,onChange:A,onFocus:O,onBlur:B,placeholder:m?F?b:"":b,...S}),d&&!u&&(0,Cr.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,Cr.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,Cr.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,Cr.jsx)(Vt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),te&&(0,Cr.jsx)("p",{className:P("text-xs transition-all",ae==="error"&&"text-error",ae==="success"&&"text-success",ae==="normal"&&"text-muted-foreground",o),id:s?`${T}-error`:l?`${T}-success`:void 0,children:s||l||""})]})});bo.displayName="Input";var e2=R(M());var QN=R(M(),1);var ZN=R(N(),1),x8="Label",JN=QN.forwardRef((e,t)=>(0,ZN.jsx)($.label,{...e,ref:t,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));JN.displayName=x8;var _S=JN;var t2=R(N()),w8=K("text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"),rr=e2.forwardRef(({className:e,...t},o)=>(0,t2.jsx)(_S,{ref:o,className:P(w8(),e),...t}));rr.displayName=_S.displayName;var dF=R(M());var ut=R(M(),1);var ht=R(M(),1);var o2=R(M(),1);function r2(e,t=globalThis?.document){let o=rt(e);o2.useEffect(()=>{let r=n=>{n.key==="Escape"&&o(n)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[o,t])}var BS=R(N(),1),C8="DismissableLayer",VS="dismissableLayer.update",S8="dismissableLayer.pointerDownOutside",b8="dismissableLayer.focusOutside",n2,i2=ht.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gr=ht.forwardRef((e,t)=>{let{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=ht.useContext(i2),[c,d]=ht.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=ht.useState({}),g=de(t,S=>d(S)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=m.indexOf(x),v=c?m.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,w=v>=h,C=I8(S=>{let I=S.target,L=[...u.branches].some(T=>T.contains(I));!w||L||(n?.(S),i?.(S),S.defaultPrevented||s?.())},f),b=P8(S=>{let I=S.target;[...u.branches].some(T=>T.contains(I))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return r2(S=>{v===u.layers.size-1&&(r?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),ht.useEffect(()=>{if(c)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(n2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),a2(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=n2)}},[c,f,o,u]),ht.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),a2())},[c,u]),ht.useEffect(()=>{let S=()=>p({});return document.addEventListener(VS,S),()=>document.removeEventListener(VS,S)},[]),(0,BS.jsx)($.div,{...l,ref:g,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,b.onFocusCapture),onBlurCapture:W(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,C.onPointerDownCapture)})});Gr.displayName=C8;var R8="DismissableLayerBranch",s2=ht.forwardRef((e,t)=>{let o=ht.useContext(i2),r=ht.useRef(null),n=de(t,r);return ht.useEffect(()=>{let a=r.current;if(a)return o.branches.add(a),()=>{o.branches.delete(a)}},[o.branches]),(0,BS.jsx)($.div,{...e,ref:n})});s2.displayName=R8;function I8(e,t=globalThis?.document){let o=rt(e),r=ht.useRef(!1),n=ht.useRef(()=>{});return ht.useEffect(()=>{let a=s=>{if(s.target&&!r.current){let u=function(){l2(S8,o,c,{discrete:!0})};var l=u;let c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=u,t.addEventListener("click",n.current,{once:!0})):u()}else t.removeEventListener("click",n.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,o]),{onPointerDownCapture:()=>r.current=!0}}function P8(e,t=globalThis?.document){let o=rt(e),r=ht.useRef(!1);return ht.useEffect(()=>{let n=a=>{a.target&&!r.current&&l2(b8,o,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function a2(){let e=new CustomEvent(VS);document.dispatchEvent(e)}function l2(e,t,o,{discrete:r}){let n=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?Nu(n,a):n.dispatchEvent(a)}var u2=Gr,c2=s2;var f2=R(M(),1),HS=0;function us(){f2.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??d2()),document.body.insertAdjacentElement("beforeend",e[1]??d2()),HS++,()=>{HS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),HS--}},[])}function d2(){let 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 Wr=R(M(),1);var v2=R(N(),1),US="focusScope.autoFocusOnMount",zS="focusScope.autoFocusOnUnmount",p2={bubbles:!1,cancelable:!0},T8="FocusScope",Qa=Wr.forwardRef((e,t)=>{let{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=Wr.useState(null),u=rt(n),c=rt(a),d=Wr.useRef(null),f=de(t,m=>l(m)),p=Wr.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Wr.useEffect(()=>{if(r){let v=function(b){if(p.paused||!s)return;let S=b.target;s.contains(S)?d.current=S:cs(d.current,{select:!0})},y=function(b){if(p.paused||!s)return;let S=b.relatedTarget;S!==null&&(s.contains(S)||cs(d.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(let I of b)I.removedNodes.length>0&&cs(s)};var m=v,x=y,h=w;document.addEventListener("focusin",v),document.addEventListener("focusout",y);let C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),C.disconnect()}}},[r,s,p.paused]),Wr.useEffect(()=>{if(s){g2.add(p);let m=document.activeElement;if(!s.contains(m)){let h=new CustomEvent(US,p2);s.addEventListener(US,u),s.dispatchEvent(h),h.defaultPrevented||(k8(N8(x2(s)),{select:!0}),document.activeElement===m&&cs(s))}return()=>{s.removeEventListener(US,u),setTimeout(()=>{let h=new CustomEvent(zS,p2);s.addEventListener(zS,c),s.dispatchEvent(h),h.defaultPrevented||cs(m??document.body,{select:!0}),s.removeEventListener(zS,c),g2.remove(p)},0)}}},[s,u,c,p]);let g=Wr.useCallback(m=>{if(!o&&!r||p.paused)return;let x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,h=document.activeElement;if(x&&h){let v=m.currentTarget,[y,w]=M8(v);y&&w?!m.shiftKey&&h===w?(m.preventDefault(),o&&cs(y,{select:!0})):m.shiftKey&&h===y&&(m.preventDefault(),o&&cs(w,{select:!0})):h===v&&m.preventDefault()}},[o,r,p.paused]);return(0,v2.jsx)($.div,{tabIndex:-1,...i,ref:f,onKeyDown:g})});Qa.displayName=T8;function k8(e,{select:t=!1}={}){let o=document.activeElement;for(let r of e)if(cs(r,{select:t}),document.activeElement!==o)return}function M8(e){let t=x2(e),o=m2(t,e),r=m2(t.reverse(),e);return[o,r]}function x2(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function m2(e,t){for(let o of e)if(!E8(o,{upTo:t}))return o}function E8(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 A8(e){return e instanceof HTMLInputElement&&"select"in e}function cs(e,{select:t=!1}={}){if(e&&e.focus){let o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&A8(e)&&t&&e.select()}}var g2=D8();function D8(){let e=[];return{add(t){let o=e[0];t!==o&&o?.pause(),e=h2(e,t),e.unshift(t)},remove(t){e=h2(e,t),e[0]?.resume()}}}function h2(e,t){let o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function N8(e){return e.filter(t=>t.tagName!=="A")}var ar=R(M(),1);var C2=["top","right","bottom","left"];var fa=Math.min,Vo=Math.max,Yp=Math.round,Qp=Math.floor,An=e=>({x:e,y:e}),O8={left:"right",right:"left",bottom:"top",top:"bottom"},F8={start:"end",end:"start"};function ox(e,t,o){return Vo(e,fa(t,o))}function pa(e,t){return typeof e=="function"?e(t):e}function ma(e){return e.split("-")[0]}function Ol(e){return e.split("-")[1]}function rx(e){return e==="x"?"y":"x"}function nx(e){return e==="y"?"height":"width"}var _8=new Set(["top","bottom"]);function Dn(e){return _8.has(ma(e))?"y":"x"}function ax(e){return rx(Dn(e))}function S2(e,t,o){o===void 0&&(o=!1);let r=Ol(e),n=ax(e),a=nx(n),i=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Xp(i)),[i,Xp(i)]}function b2(e){let t=Xp(e);return[tx(e),t,tx(t)]}function tx(e){return e.replace(/start|end/g,t=>F8[t])}var y2=["left","right"],w2=["right","left"],V8=["top","bottom"],B8=["bottom","top"];function H8(e,t,o){switch(e){case"top":case"bottom":return o?t?w2:y2:t?y2:w2;case"left":case"right":return t?V8:B8;default:return[]}}function R2(e,t,o,r){let n=Ol(e),a=H8(ma(e),o==="start",r);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(tx)))),a}function Xp(e){return e.replace(/left|right|bottom|top/g,t=>O8[t])}function U8(e){return{top:0,right:0,bottom:0,left:0,...e}}function GS(e){return typeof e!="number"?U8(e):{top:e,right:e,bottom:e,left:e}}function Fl(e){let{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function I2(e,t,o){let{reference:r,floating:n}=e,a=Dn(t),i=ax(t),s=nx(i),l=ma(t),u=a==="y",c=r.x+r.width/2-n.width/2,d=r.y+r.height/2-n.height/2,f=r[s]/2-n[s]/2,p;switch(l){case"top":p={x:c,y:r.y-n.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-n.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ol(t)){case"start":p[i]-=f*(o&&u?-1:1);break;case"end":p[i]+=f*(o&&u?-1:1);break}return p}var T2=async(e,t,o)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:i}=o,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:d}=I2(u,r,l),f=r,p={},g=0;for(let m=0;m<s.length;m++){let{name:x,fn:h}=s[m],{x:v,y,data:w,reset:C}=await h({x:c,y:d,initialPlacement:r,placement:f,strategy:n,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=v??c,d=y??d,p={...p,[x]:{...p[x],...w}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):C.rects),{x:c,y:d}=I2(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:n,middlewareData:p}};async function Nc(e,t){var o;t===void 0&&(t={});let{x:r,y:n,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=pa(t,e),g=GS(p),x=s[f?d==="floating"?"reference":"floating":d],h=Fl(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(x)))==null||o?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:r,y:n,width:i.floating.width,height:i.floating.height}:i.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),w=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},C=Fl(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(h.top-C.top+g.top)/w.y,bottom:(C.bottom-h.bottom+g.bottom)/w.y,left:(h.left-C.left+g.left)/w.x,right:(C.right-h.right+g.right)/w.x}}var k2=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:n,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=pa(e,t)||{};if(u==null)return{};let d=GS(c),f={x:o,y:r},p=ax(n),g=nx(p),m=await i.getDimensions(u),x=p==="y",h=x?"top":"left",v=x?"bottom":"right",y=x?"clientHeight":"clientWidth",w=a.reference[g]+a.reference[p]-f[p]-a.floating[g],C=f[p]-a.reference[p],b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),S=b?b[y]:0;(!S||!await(i.isElement==null?void 0:i.isElement(b)))&&(S=s.floating[y]||a.floating[g]);let I=w/2-C/2,L=S/2-m[g]/2-1,T=fa(d[h],L),k=fa(d[v],L),E=T,_=S-m[g]-k,D=S/2-m[g]/2+I,z=ox(E,D,_),F=!l.arrow&&Ol(n)!=null&&D!==z&&a.reference[g]/2-(D<E?T:k)-m[g]/2<0,O=F?D<E?D-E:D-_:0;return{[p]:f[p]+O,data:{[p]:z,centerOffset:D-z-O,...F&&{alignmentOffset:O}},reset:F}}});var M2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;let{placement:n,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...x}=pa(e,t);if((o=a.arrow)!=null&&o.alignmentOffset)return{};let h=ma(n),v=Dn(s),y=ma(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(y||!m?[Xp(s)]:b2(s)),b=g!=="none";!f&&b&&C.push(...R2(s,m,g,w));let S=[s,...C],I=await Nc(t,x),L=[],T=((r=a.flip)==null?void 0:r.overflows)||[];if(c&&L.push(I[h]),d){let D=S2(n,i,w);L.push(I[D[0]],I[D[1]])}if(T=[...T,{placement:n,overflows:L}],!L.every(D=>D<=0)){var k,E;let D=(((k=a.flip)==null?void 0:k.index)||0)+1,z=S[D];if(z&&(!(d==="alignment"?v!==Dn(z):!1)||T.every(B=>Dn(B.placement)===v?B.overflows[0]>0:!0)))return{data:{index:D,overflows:T},reset:{placement:z}};let F=(E=T.filter(O=>O.overflows[0]<=0).sort((O,B)=>O.overflows[1]-B.overflows[1])[0])==null?void 0:E.placement;if(!F)switch(p){case"bestFit":{var _;let O=(_=T.filter(B=>{if(b){let A=Dn(B.placement);return A===v||A==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(A=>A>0).reduce((A,te)=>A+te,0)]).sort((B,A)=>B[1]-A[1])[0])==null?void 0:_[0];O&&(F=O);break}case"initialPlacement":F=s;break}if(n!==F)return{reset:{placement:F}}}return{}}}};function P2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function L2(e){return C2.some(t=>e[t]>=0)}var E2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o}=t,{strategy:r="referenceHidden",...n}=pa(e,t);switch(r){case"referenceHidden":{let a=await Nc(t,{...n,elementContext:"reference"}),i=P2(a,o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:L2(i)}}}case"escaped":{let a=await Nc(t,{...n,altBoundary:!0}),i=P2(a,o.floating);return{data:{escapedOffsets:i,escaped:L2(i)}}}default:return{}}}}};var A2=new Set(["left","top"]);async function z8(e,t){let{placement:o,platform:r,elements:n}=e,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),i=ma(o),s=Ol(o),l=Dn(o)==="y",u=A2.has(i)?-1:1,c=a&&l?-1:1,d=pa(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var D2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;let{x:n,y:a,placement:i,middlewareData:s}=t,l=await z8(t,e);return i===((o=s.offset)==null?void 0:o.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:i}}}}},N2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:n}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:x=>{let{x:h,y:v}=x;return{x:h,y:v}}},...l}=pa(e,t),u={x:o,y:r},c=await Nc(t,l),d=Dn(ma(n)),f=rx(d),p=u[f],g=u[d];if(a){let x=f==="y"?"top":"left",h=f==="y"?"bottom":"right",v=p+c[x],y=p-c[h];p=ox(v,p,y)}if(i){let x=d==="y"?"top":"left",h=d==="y"?"bottom":"right",v=g+c[x],y=g-c[h];g=ox(v,g,y)}let m=s.fn({...t,[f]:p,[d]:g});return{...m,data:{x:m.x-o,y:m.y-r,enabled:{[f]:a,[d]:i}}}}}},O2=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:o,y:r,placement:n,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=pa(e,t),c={x:o,y:r},d=Dn(n),f=rx(d),p=c[f],g=c[d],m=pa(s,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let y=f==="y"?"height":"width",w=a.reference[f]-a.floating[y]+x.mainAxis,C=a.reference[f]+a.reference[y]-x.mainAxis;p<w?p=w:p>C&&(p=C)}if(u){var h,v;let y=f==="y"?"width":"height",w=A2.has(ma(n)),C=a.reference[d]-a.floating[y]+(w&&((h=i.offset)==null?void 0:h[d])||0)+(w?0:x.crossAxis),b=a.reference[d]+a.reference[y]+(w?0:((v=i.offset)==null?void 0:v[d])||0)-(w?x.crossAxis:0);g<C?g=C:g>b&&(g=b)}return{[f]:p,[d]:g}}}},F2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;let{placement:n,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=pa(e,t),c=await Nc(t,u),d=ma(n),f=Ol(n),p=Dn(n)==="y",{width:g,height:m}=a.floating,x,h;d==="top"||d==="bottom"?(x=d,h=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(h=d,x=f==="end"?"top":"bottom");let v=m-c.top-c.bottom,y=g-c.left-c.right,w=fa(m-c[x],v),C=fa(g-c[h],y),b=!t.middlewareData.shift,S=w,I=C;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(I=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=v),b&&!f){let T=Vo(c.left,0),k=Vo(c.right,0),E=Vo(c.top,0),_=Vo(c.bottom,0);p?I=g-2*(T!==0||k!==0?T+k:Vo(c.left,c.right)):S=m-2*(E!==0||_!==0?E+_:Vo(c.top,c.bottom))}await l({...t,availableWidth:I,availableHeight:S});let L=await i.getDimensions(s.floating);return g!==L.width||m!==L.height?{reset:{rects:!0}}:{}}}};function ix(){return typeof window<"u"}function Vl(e){return V2(e)?(e.nodeName||"").toLowerCase():"#document"}function nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nn(e){var t;return(t=(V2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function V2(e){return ix()?e instanceof Node||e instanceof nr(e).Node:!1}function jr(e){return ix()?e instanceof Element||e instanceof nr(e).Element:!1}function On(e){return ix()?e instanceof HTMLElement||e instanceof nr(e).HTMLElement:!1}function _2(e){return!ix()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nr(e).ShadowRoot}var G8=new Set(["inline","contents"]);function Oc(e){let{overflow:t,overflowX:o,overflowY:r,display:n}=qr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!G8.has(n)}var W8=new Set(["table","td","th"]);function B2(e){return W8.has(Vl(e))}var j8=[":popover-open",":modal"];function Zp(e){return j8.some(t=>{try{return e.matches(t)}catch{return!1}})}var q8=["transform","translate","scale","rotate","perspective"],$8=["transform","translate","scale","rotate","perspective","filter"],K8=["paint","layout","strict","content"];function sx(e){let t=lx(),o=jr(e)?qr(e):e;return q8.some(r=>o[r]?o[r]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||$8.some(r=>(o.willChange||"").includes(r))||K8.some(r=>(o.contain||"").includes(r))}function H2(e){let t=Za(e);for(;On(t)&&!Bl(t);){if(sx(t))return t;if(Zp(t))return null;t=Za(t)}return null}function lx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var X8=new Set(["html","body","#document"]);function Bl(e){return X8.has(Vl(e))}function qr(e){return nr(e).getComputedStyle(e)}function Jp(e){return jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Za(e){if(Vl(e)==="html")return e;let t=e.assignedSlot||e.parentNode||_2(e)&&e.host||Nn(e);return _2(t)?t.host:t}function U2(e){let t=Za(e);return Bl(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&Oc(t)?t:U2(t)}function _l(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let n=U2(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),i=nr(n);if(a){let s=ux(i);return t.concat(i,i.visualViewport||[],Oc(n)?n:[],s&&o?_l(s):[])}return t.concat(n,_l(n,[],o))}function ux(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function j2(e){let t=qr(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=On(e),a=n?e.offsetWidth:o,i=n?e.offsetHeight:r,s=Yp(o)!==a||Yp(r)!==i;return s&&(o=a,r=i),{width:o,height:r,$:s}}function jS(e){return jr(e)?e:e.contextElement}function Fc(e){let t=jS(e);if(!On(t))return An(1);let o=t.getBoundingClientRect(),{width:r,height:n,$:a}=j2(t),i=(a?Yp(o.width):o.width)/r,s=(a?Yp(o.height):o.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var Y8=An(0);function q2(e){let t=nr(e);return!lx()||!t.visualViewport?Y8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Q8(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==nr(e)?!1:t}function Hl(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let n=e.getBoundingClientRect(),a=jS(e),i=An(1);t&&(r?jr(r)&&(i=Fc(r)):i=Fc(e));let s=Q8(a,o,r)?q2(a):An(0),l=(n.left+s.x)/i.x,u=(n.top+s.y)/i.y,c=n.width/i.x,d=n.height/i.y;if(a){let f=nr(a),p=r&&jr(r)?nr(r):r,g=f,m=ux(g);for(;m&&r&&p!==g;){let x=Fc(m),h=m.getBoundingClientRect(),v=qr(m),y=h.left+(m.clientLeft+parseFloat(v.paddingLeft))*x.x,w=h.top+(m.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=y,u+=w,g=nr(m),m=ux(g)}}return Fl({width:c,height:d,x:l,y:u})}function cx(e,t){let o=Jp(e).scrollLeft;return t?t.left+o:Hl(Nn(e)).left+o}function $2(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-cx(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function Z8(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e,a=n==="fixed",i=Nn(r),s=t?Zp(t.floating):!1;if(r===i||s&&a)return o;let l={scrollLeft:0,scrollTop:0},u=An(1),c=An(0),d=On(r);if((d||!d&&!a)&&((Vl(r)!=="body"||Oc(i))&&(l=Jp(r)),On(r))){let p=Hl(r);u=Fc(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=i&&!d&&!a?$2(i,l):An(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:o.y*u.y-l.scrollTop*u.y+c.y+f.y}}function J8(e){return Array.from(e.getClientRects())}function e9(e){let t=Nn(e),o=Jp(e),r=e.ownerDocument.body,n=Vo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Vo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-o.scrollLeft+cx(e),s=-o.scrollTop;return qr(r).direction==="rtl"&&(i+=Vo(t.clientWidth,r.clientWidth)-n),{width:n,height:a,x:i,y:s}}var z2=25;function t9(e,t){let o=nr(e),r=Nn(e),n=o.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let c=lx();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let u=cx(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=z2&&(a-=g)}else u<=z2&&(a+=u);return{width:a,height:i,x:s,y:l}}var o9=new Set(["absolute","fixed"]);function r9(e,t){let o=Hl(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,a=On(e)?Fc(e):An(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=n*a.x,u=r*a.y;return{width:i,height:s,x:l,y:u}}function G2(e,t,o){let r;if(t==="viewport")r=t9(e,o);else if(t==="document")r=e9(Nn(e));else if(jr(t))r=r9(t,o);else{let n=q2(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Fl(r)}function K2(e,t){let o=Za(e);return o===t||!jr(o)||Bl(o)?!1:qr(o).position==="fixed"||K2(o,t)}function n9(e,t){let o=t.get(e);if(o)return o;let r=_l(e,[],!1).filter(s=>jr(s)&&Vl(s)!=="body"),n=null,a=qr(e).position==="fixed",i=a?Za(e):e;for(;jr(i)&&!Bl(i);){let s=qr(i),l=sx(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&o9.has(n.position)||Oc(i)&&!l&&K2(e,i))?r=r.filter(c=>c!==i):n=s,i=Za(i)}return t.set(e,r),r}function a9(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e,i=[...o==="clippingAncestors"?Zp(t)?[]:n9(t,this._c):[].concat(o),r],s=i[0],l=i.reduce((u,c)=>{let d=G2(t,c,n);return u.top=Vo(d.top,u.top),u.right=fa(d.right,u.right),u.bottom=fa(d.bottom,u.bottom),u.left=Vo(d.left,u.left),u},G2(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function i9(e){let{width:t,height:o}=j2(e);return{width:t,height:o}}function s9(e,t,o){let r=On(t),n=Nn(t),a=o==="fixed",i=Hl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=An(0);function u(){l.x=cx(n)}if(r||!r&&!a)if((Vl(t)!=="body"||Oc(n))&&(s=Jp(t)),r){let p=Hl(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else n&&u();a&&!r&&n&&u();let c=n&&!r&&!a?$2(n,s):An(0),d=i.left+s.scrollLeft-l.x-c.x,f=i.top+s.scrollTop-l.y-c.y;return{x:d,y:f,width:i.width,height:i.height}}function WS(e){return qr(e).position==="static"}function W2(e,t){if(!On(e)||qr(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Nn(e)===o&&(o=o.ownerDocument.body),o}function X2(e,t){let o=nr(e);if(Zp(e))return o;if(!On(e)){let n=Za(e);for(;n&&!Bl(n);){if(jr(n)&&!WS(n))return n;n=Za(n)}return o}let r=W2(e,t);for(;r&&B2(r)&&WS(r);)r=W2(r,t);return r&&Bl(r)&&WS(r)&&!sx(r)?o:r||H2(e)||o}var l9=async function(e){let t=this.getOffsetParent||X2,o=this.getDimensions,r=await o(e.floating);return{reference:s9(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function u9(e){return qr(e).direction==="rtl"}var Y2={convertOffsetParentRelativeRectToViewportRelativeRect:Z8,getDocumentElement:Nn,getClippingRect:a9,getOffsetParent:X2,getElementRects:l9,getClientRects:J8,getDimensions:i9,getScale:Fc,isElement:jr,isRTL:u9};function Q2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function c9(e,t){let o=null,r,n=Nn(e);function a(){var s;clearTimeout(r),(s=o)==null||s.disconnect(),o=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(s||t(),!f||!p)return;let g=Qp(d),m=Qp(n.clientWidth-(c+f)),x=Qp(n.clientHeight-(d+p)),h=Qp(c),y={rootMargin:-g+"px "+-m+"px "+-x+"px "+-h+"px",threshold:Vo(0,fa(1,l))||1},w=!0;function C(b){let S=b[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Q2(u,e.getBoundingClientRect())&&i(),w=!1}try{o=new IntersectionObserver(C,{...y,root:n.ownerDocument})}catch{o=new IntersectionObserver(C,y)}o.observe(e)}return i(!0),a}function qS(e,t,o,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=jS(e),c=n||a?[...u?_l(u):[],..._l(t)]:[];c.forEach(h=>{n&&h.addEventListener("scroll",o,{passive:!0}),a&&h.addEventListener("resize",o)});let d=u&&s?c9(u,o):null,f=-1,p=null;i&&(p=new ResizeObserver(h=>{let[v]=h;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),o()}),u&&!l&&p.observe(u),p.observe(t));let g,m=l?Hl(e):null;l&&x();function x(){let h=Hl(e);m&&!Q2(m,h)&&o(),m=h,g=requestAnimationFrame(x)}return o(),()=>{var h;c.forEach(v=>{n&&v.removeEventListener("scroll",o),a&&v.removeEventListener("resize",o)}),d?.(),(h=p)==null||h.disconnect(),p=null,l&&cancelAnimationFrame(g)}}var Z2=D2;var J2=N2,eO=M2,tO=F2,oO=E2,$S=k2;var rO=O2,KS=(e,t,o)=>{let r=new Map,n={platform:Y2,...o},a={...n.platform,_c:r};return T2(e,t,{...n,platform:a})};var kt=R(M(),1),aO=R(M(),1),iO=R(Aa(),1),d9=typeof document<"u",f9=function(){},dx=d9?aO.useLayoutEffect:f9;function fx(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 o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!fx(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){let a=n[r];if(!(a==="_owner"&&e.$$typeof)&&!fx(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function sO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nO(e,t){let o=sO(e);return Math.round(t*o)/o}function XS(e){let t=kt.useRef(e);return dx(()=>{t.current=e}),t}function lO(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=kt.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=kt.useState(r);fx(f,r)||p(r);let[g,m]=kt.useState(null),[x,h]=kt.useState(null),v=kt.useCallback(B=>{B!==b.current&&(b.current=B,m(B))},[]),y=kt.useCallback(B=>{B!==S.current&&(S.current=B,h(B))},[]),w=a||g,C=i||x,b=kt.useRef(null),S=kt.useRef(null),I=kt.useRef(c),L=l!=null,T=XS(l),k=XS(n),E=XS(u),_=kt.useCallback(()=>{if(!b.current||!S.current)return;let B={placement:t,strategy:o,middleware:f};k.current&&(B.platform=k.current),KS(b.current,S.current,B).then(A=>{let te={...A,isPositioned:E.current!==!1};D.current&&!fx(I.current,te)&&(I.current=te,iO.flushSync(()=>{d(te)}))})},[f,t,o,k,E]);dx(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);let D=kt.useRef(!1);dx(()=>(D.current=!0,()=>{D.current=!1}),[]),dx(()=>{if(w&&(b.current=w),C&&(S.current=C),w&&C){if(T.current)return T.current(w,C,_);_()}},[w,C,_,T,L]);let z=kt.useMemo(()=>({reference:b,floating:S,setReference:v,setFloating:y}),[v,y]),F=kt.useMemo(()=>({reference:w,floating:C}),[w,C]),O=kt.useMemo(()=>{let B={position:o,left:0,top:0};if(!F.floating)return B;let A=nO(F.floating,c.x),te=nO(F.floating,c.y);return s?{...B,transform:"translate("+A+"px, "+te+"px)",...sO(F.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:A,top:te}},[o,s,F.floating,c.x,c.y]);return kt.useMemo(()=>({...c,update:_,refs:z,elements:F,floatingStyles:O}),[c,_,z,F,O])}var p9=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){let{element:r,padding:n}=typeof e=="function"?e(o):e;return r&&t(r)?r.current!=null?$S({element:r.current,padding:n}).fn(o):{}:r?$S({element:r,padding:n}).fn(o):{}}}},uO=(e,t)=>({...Z2(e),options:[e,t]}),cO=(e,t)=>({...J2(e),options:[e,t]}),dO=(e,t)=>({...rO(e),options:[e,t]}),fO=(e,t)=>({...eO(e),options:[e,t]}),pO=(e,t)=>({...tO(e),options:[e,t]});var mO=(e,t)=>({...oO(e),options:[e,t]});var gO=(e,t)=>({...p9(e),options:[e,t]});var hO=R(M(),1);var YS=R(N(),1),m9="Arrow",vO=hO.forwardRef((e,t)=>{let{children:o,width:r=10,height:n=5,...a}=e;return(0,YS.jsx)($.svg,{...a,ref:t,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:(0,YS.jsx)("polygon",{points:"0,0 30,0 15,10"})})});vO.displayName=m9;var xO=vO;var ds=R(N(),1);var QS="Popper",[yO,$r]=Oe(QS),[h9,wO]=yO(QS),CO=e=>{let{__scopePopper:t,children:o}=e,[r,n]=ar.useState(null);return(0,ds.jsx)(h9,{scope:t,anchor:r,onAnchorChange:n,children:o})};CO.displayName=QS;var SO="PopperAnchor",bO=ar.forwardRef((e,t)=>{let{__scopePopper:o,virtualRef:r,...n}=e,a=wO(SO,o),i=ar.useRef(null),s=de(t,i),l=ar.useRef(null);return ar.useEffect(()=>{let u=l.current;l.current=r?.current||i.current,u!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,ds.jsx)($.div,{...n,ref:s})});bO.displayName=SO;var ZS="PopperContent",[v9,x9]=yO(ZS),RO=ar.forwardRef((e,t)=>{let{__scopePopper:o,side:r="bottom",sideOffset:n=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,x=wO(ZS,o),[h,v]=ar.useState(null),y=de(t,U=>v(U)),[w,C]=ar.useState(null),b=Dc(w),S=b?.width??0,I=b?.height??0,L=r+(a!=="center"?"-"+a:""),T=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},k=Array.isArray(u)?u:[u],E=k.length>0,_={padding:T,boundary:k.filter(w9),altBoundary:E},{refs:D,floatingStyles:z,placement:F,isPositioned:O,middlewareData:B}=lO({strategy:"fixed",placement:L,whileElementsMounted:(...U)=>qS(...U,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[uO({mainAxis:n+I,alignmentAxis:i}),l&&cO({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?dO():void 0,..._}),l&&fO({..._}),pO({..._,apply:({elements:U,rects:ne,availableWidth:he,availableHeight:xe})=>{let{width:pe,height:X}=ne.reference,Ie=U.floating.style;Ie.setProperty("--radix-popper-available-width",`${he}px`),Ie.setProperty("--radix-popper-available-height",`${xe}px`),Ie.setProperty("--radix-popper-anchor-width",`${pe}px`),Ie.setProperty("--radix-popper-anchor-height",`${X}px`)}}),w&&gO({element:w,padding:s}),C9({arrowWidth:S,arrowHeight:I}),f&&mO({strategy:"referenceHidden",..._})]}),[A,te]=LO(F),ae=rt(g);_e(()=>{O&&ae?.()},[O,ae]);let V=B.arrow?.x,Q=B.arrow?.y,oe=B.arrow?.centerOffset!==0,[Y,ce]=ar.useState();return _e(()=>{h&&ce(window.getComputedStyle(h).zIndex)},[h]),(0,ds.jsx)("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:O?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,ds.jsx)(v9,{scope:o,placedSide:A,onArrowChange:C,arrowX:V,arrowY:Q,shouldHideArrow:oe,children:(0,ds.jsx)($.div,{"data-side":A,"data-align":te,...m,ref:y,style:{...m.style,animation:O?void 0:"none"}})})})});RO.displayName=ZS;var IO="PopperArrow",y9={top:"bottom",right:"left",bottom:"top",left:"right"},PO=ar.forwardRef(function(t,o){let{__scopePopper:r,...n}=t,a=x9(IO,r),i=y9[a.placedSide];return(0,ds.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,ds.jsx)(xO,{...n,ref:o,style:{...n.style,display:"block"}})})});PO.displayName=IO;function w9(e){return e!==null}var C9=e=>({name:"transformOrigin",options:e,fn(t){let{placement:o,rects:r,middlewareData:n}=t,i=n.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=LO(o),d={start:"0%",center:"50%",end:"100%"}[c],f=(n.arrow?.x??0)+s/2,p=(n.arrow?.y??0)+l/2,g="",m="";return u==="bottom"?(g=i?d:`${f}px`,m=`${-l}px`):u==="top"?(g=i?d:`${f}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=i?d:`${p}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=i?d:`${p}px`),{data:{x:g,y:m}}}});function LO(e){let[t,o="center"]=e.split("-");return[t,o]}var Ja=CO,ei=bO,fs=RO,ps=PO;var mx=R(M(),1),TO=R(Aa(),1);var kO=R(N(),1),S9="Portal",Sr=mx.forwardRef((e,t)=>{let{container:o,...r}=e,[n,a]=mx.useState(!1);_e(()=>a(!0),[]);let i=o||n&&globalThis?.document?.body;return i?TO.default.createPortal((0,kO.jsx)($.div,{...r,ref:t}),i):null});Sr.displayName=S9;var b9=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_c=new WeakMap,gx=new WeakMap,hx={},JS=0,MO=function(e){return e&&(e.host||MO(e.parentNode))},R9=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=MO(o);return r&&e.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},I9=function(e,t,o,r){var n=R9(t,Array.isArray(e)?e:[e]);hx[o]||(hx[o]=new WeakMap);var a=hx[o],i=[],s=new Set,l=new Set(n),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};n.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var p=f.getAttribute(r),g=p!==null&&p!=="false",m=(_c.get(f)||0)+1,x=(a.get(f)||0)+1;_c.set(f,m),a.set(f,x),i.push(f),m===1&&g&&gx.set(f,!0),x===1&&f.setAttribute(o,"true"),g||f.setAttribute(r,"true")}catch(h){console.error("aria-hidden: cannot operate on ",f,h)}})};return c(t),s.clear(),JS++,function(){i.forEach(function(d){var f=_c.get(d)-1,p=a.get(d)-1;_c.set(d,f),a.set(d,p),f||(gx.has(d)||d.removeAttribute(r),gx.delete(d)),p||d.removeAttribute(o)}),JS--,JS||(_c=new WeakMap,_c=new WeakMap,gx=new WeakMap,hx={})}},ms=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),n=t||b9(e);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live], script"))),I9(r,n,o,"aria-hidden")):function(){return null}};var ir=function(){return ir=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},ir.apply(this,arguments)};function vx(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]]);return o}function EO(e,t,o){if(o||arguments.length===2)for(var r=0,n=t.length,a;r<n;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Sx=R(M());var Ro=R(M());var Ul="right-scroll-bar-position",zl="width-before-scroll-bar",eb="with-scroll-bars-hidden",tb="--removed-body-scroll-bar-size";function xx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var AO=R(M());function DO(e,t){var o=(0,AO.useState)(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(r){var n=o.value;n!==r&&(o.value=r,o.callback(r,n))}}}})[0];return o.callback=t,o.facade}var yx=R(M());var P9=typeof window<"u"?yx.useLayoutEffect:yx.useEffect,NO=new WeakMap;function ob(e,t){var o=DO(t||null,function(r){return e.forEach(function(n){return xx(n,r)})});return P9(function(){var r=NO.get(o);if(r){var n=new Set(r),a=new Set(e),i=o.current;n.forEach(function(s){a.has(s)||xx(s,null)}),a.forEach(function(s){n.has(s)||xx(s,i)})}NO.set(o,e)},[e]),o}function L9(e){return e}function T9(e,t){t===void 0&&(t=L9);var o=[],r=!1,n={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(a){var i=t(a,r);return o.push(i),function(){o=o.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(r=!0;o.length;){var i=o;o=[],i.forEach(a)}o={push:function(s){return a(s)},filter:function(){return o}}},assignMedium:function(a){r=!0;var i=[];if(o.length){var s=o;o=[],s.forEach(a),i=o}var l=function(){var c=i;i=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),o={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),o}}}};return n}function rb(e){e===void 0&&(e={});var t=T9(null);return t.options=ir({async:!0,ssr:!1},e),t}var OO=R(M()),FO=function(e){var t=e.sideCar,o=vx(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 OO.createElement(r,ir({},o))};FO.isSideCarExport=!0;function nb(e,t){return e.useMedium(t),FO}var wx=rb();var ab=function(){},em=Ro.forwardRef(function(e,t){var o=Ro.useRef(null),r=Ro.useState({onScrollCapture:ab,onWheelCapture:ab,onTouchMoveCapture:ab}),n=r[0],a=r[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,x=e.allowPinchZoom,h=e.as,v=h===void 0?"div":h,y=e.gapMode,w=vx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,b=ob([o,t]),S=ir(ir({},w),n);return Ro.createElement(Ro.Fragment,null,c&&Ro.createElement(C,{sideCar:wx,removeScrollBar:u,shards:d,noRelative:p,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!x,lockRef:o,gapMode:y}),i?Ro.cloneElement(Ro.Children.only(s),ir(ir({},S),{ref:b})):Ro.createElement(v,ir({},S,{className:l,ref:b}),s))});em.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};em.classNames={fullWidth:zl,zeroRight:Ul};var at=R(M());var Bc=R(M());var BO=R(M());var _O;var VO=function(){if(_O)return _O;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function k9(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=VO();return t&&e.setAttribute("nonce",t),e}function M9(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function E9(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ib=function(){var e=0,t=null;return{add:function(o){e==0&&(t=k9())&&(M9(t,o),E9(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var sb=function(){var e=ib();return function(t,o){BO.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}};var tm=function(){var e=sb(),t=function(o){var r=o.styles,n=o.dynamic;return e(r,n),null};return t};var A9={left:0,top:0,right:0,gap:0},lb=function(e){return parseInt(e||"",10)||0},D9=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[lb(o),lb(r),lb(n)]},ub=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return A9;var t=D9(e),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-o+t[2]-t[0])}};var N9=tm(),Vc="data-scroll-locked",O9=function(e,t,o,r){var n=e.left,a=e.top,i=e.right,s=e.gap;return o===void 0&&(o="margin"),`
|
|
20
|
+
.`.concat(eb,` {
|
|
21
21
|
overflow: hidden `).concat(r,`;
|
|
22
22
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
23
23
|
}
|
|
@@ -51,19 +51,19 @@ Error generating stack: `+a.message+`
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
body[`).concat(Vc,`] {
|
|
54
|
-
`).concat(
|
|
54
|
+
`).concat(tb,": ").concat(s,`px;
|
|
55
55
|
}
|
|
56
|
-
`)},
|
|
56
|
+
`)},HO=function(){var e=parseInt(document.body.getAttribute(Vc)||"0",10);return isFinite(e)?e:0},F9=function(){Bc.useEffect(function(){return document.body.setAttribute(Vc,(HO()+1).toString()),function(){var e=HO()-1;e<=0?document.body.removeAttribute(Vc):document.body.setAttribute(Vc,e.toString())}},[])},cb=function(e){var t=e.noRelative,o=e.noImportant,r=e.gapMode,n=r===void 0?"margin":r;F9();var a=Bc.useMemo(function(){return ub(n)},[n]);return Bc.createElement(N9,{styles:O9(a,!t,n,o?"":"!important")})};var db=!1;if(typeof window<"u")try{om=Object.defineProperty({},"passive",{get:function(){return db=!0,!0}}),window.addEventListener("test",om,om),window.removeEventListener("test",om,om)}catch{db=!1}var om,Gl=db?{passive:!1}:!1;var _9=function(e){return e.tagName==="TEXTAREA"},UO=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!_9(e)&&o[t]==="visible")},V9=function(e){return UO(e,"overflowY")},B9=function(e){return UO(e,"overflowX")},fb=function(e,t){var o=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=zO(e,r);if(n){var a=GO(e,r),i=a[1],s=a[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==o.body);return!1},H9=function(e){var t=e.scrollTop,o=e.scrollHeight,r=e.clientHeight;return[t,o,r]},U9=function(e){var t=e.scrollLeft,o=e.scrollWidth,r=e.clientWidth;return[t,o,r]},zO=function(e,t){return e==="v"?V9(t):B9(t)},GO=function(e,t){return e==="v"?H9(t):U9(t)},z9=function(e,t){return e==="h"&&t==="rtl"?-1:1},WO=function(e,t,o,r,n){var a=z9(e,window.getComputedStyle(t).direction),i=a*r,s=o.target,l=t.contains(s),u=!1,c=i>0,d=0,f=0;do{if(!s)break;var p=GO(e,s),g=p[0],m=p[1],x=p[2],h=m-x-a*g;(g||h)&&zO(e,s)&&(d+=h,f+=g);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(n&&Math.abs(d)<1||!n&&i>d)||!c&&(n&&Math.abs(f)<1||!n&&-i>f))&&(u=!0),u};var Cx=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jO=function(e){return[e.deltaX,e.deltaY]},qO=function(e){return e&&"current"in e?e.current:e},G9=function(e,t){return e[0]===t[0]&&e[1]===t[1]},W9=function(e){return`
|
|
57
57
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
58
58
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
59
|
-
`)},G9=0,Hc=[];function jO(e){var t=at.useRef([]),o=at.useRef([0,0]),r=at.useRef(),n=at.useState(G9++)[0],a=at.useState(em)[0],i=at.useRef(e);at.useEffect(function(){i.current=e},[e]),at.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var m=kO([e.lockRef.current],(e.shards||[]).map(WO),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var s=at.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var h=wx(m),v=o.current,y="deltaX"in m?m.deltaX:v[0]-h[0],w="deltaY"in m?m.deltaY:v[1]-h[1],C,b=m.target,S=Math.abs(y)>Math.abs(w)?"h":"v";if("touches"in m&&S==="h"&&b.type==="range")return!1;var I=db(S,b);if(!I)return!0;if(I?C=S:(C=S==="v"?"h":"v",I=db(S,b)),!I)return!1;if(!r.current&&"changedTouches"in m&&(y||w)&&(r.current=C),!C)return!0;var L=r.current||C;return zO(L,x,m,L==="h"?y:w,!0)},[]),l=at.useCallback(function(m){var x=m;if(!(!Hc.length||Hc[Hc.length-1]!==a)){var h="deltaY"in x?GO(x):wx(x),v=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&U9(C.delta,h)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var y=(i.current.shards||[]).map(WO).filter(Boolean).filter(function(C){return C.contains(x.target)}),w=y.length>0?s(x,y[0]):!i.current.noIsolation;w&&x.cancelable&&x.preventDefault()}}},[]),u=at.useCallback(function(m,x,h,v){var y={name:m,delta:x,target:h,should:v,shadowParent:W9(h)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),c=at.useCallback(function(m){o.current=wx(m),r.current=void 0},[]),d=at.useCallback(function(m){u(m.type,GO(m),m.target,s(m,e.lockRef.current))},[]),f=at.useCallback(function(m){u(m.type,wx(m),m.target,s(m,e.lockRef.current))},[]);at.useEffect(function(){return Hc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Gl),document.addEventListener("touchmove",l,Gl),document.addEventListener("touchstart",c,Gl),function(){Hc=Hc.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Gl),document.removeEventListener("touchmove",l,Gl),document.removeEventListener("touchstart",c,Gl)}},[]);var p=e.removeScrollBar,g=e.inert;return at.createElement(at.Fragment,null,g?at.createElement(a,{styles:z9(n)}):null,p?at.createElement(ub,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function W9(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var qO=rb(yx,jO);var $O=Cx.forwardRef(function(e,t){return Cx.createElement(Jp,ir({},e,{ref:t,sideCar:qO}))});$O.classNames=Jp.classNames;var ti=$O;var Mt=R(N(),1),Sx="Popover",[KO,TPe]=Oe(Sx,[$r]),om=$r(),[j9,gs]=KO(Sx),XO=e=>{let{__scopePopover:t,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:i=!1}=e,s=om(t),l=ut.useRef(null),[u,c]=ut.useState(!1),[d,f]=qe({prop:r,defaultProp:n??!1,onChange:a,caller:Sx});return(0,Mt.jsx)(Ja,{...s,children:(0,Mt.jsx)(j9,{scope:t,contentId:Ae(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:ut.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:ut.useCallback(()=>c(!0),[]),onCustomAnchorRemove:ut.useCallback(()=>c(!1),[]),modal:i,children:o})})};XO.displayName=Sx;var YO="PopoverAnchor",QO=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=gs(YO,o),a=om(o),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=n;return ut.useEffect(()=>(i(),()=>s()),[i,s]),(0,Mt.jsx)(ei,{...a,...r,ref:t})});QO.displayName=YO;var ZO="PopoverTrigger",JO=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=gs(ZO,o),a=om(o),i=de(t,n.triggerRef),s=(0,Mt.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":nF(n.open),...r,ref:i,onClick:W(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:(0,Mt.jsx)(ei,{asChild:!0,...a,children:s})});JO.displayName=ZO;var fb="PopoverPortal",[q9,$9]=KO(fb,{forceMount:void 0}),K9=e=>{let{__scopePopover:t,forceMount:o,children:r,container:n}=e,a=gs(fb,t);return(0,Mt.jsx)(q9,{scope:t,forceMount:o,children:(0,Mt.jsx)(st,{present:o||a.open,children:(0,Mt.jsx)(Sr,{asChild:!0,container:n,children:r})})})};K9.displayName=fb;var Uc="PopoverContent",eF=ut.forwardRef((e,t)=>{let o=$9(Uc,e.__scopePopover),{forceMount:r=o.forceMount,...n}=e,a=gs(Uc,e.__scopePopover);return(0,Mt.jsx)(st,{present:r||a.open,children:a.modal?(0,Mt.jsx)(Y9,{...n,ref:t}):(0,Mt.jsx)(Q9,{...n,ref:t})})});eF.displayName=Uc;var X9=ur("PopoverContent.RemoveScroll"),Y9=ut.forwardRef((e,t)=>{let o=gs(Uc,e.__scopePopover),r=ut.useRef(null),n=de(t,r),a=ut.useRef(!1);return ut.useEffect(()=>{let i=r.current;if(i)return ms(i)},[]),(0,Mt.jsx)(ti,{as:X9,allowPinchZoom:!0,children:(0,Mt.jsx)(tF,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||o.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:W(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Q9=ut.forwardRef((e,t)=>{let o=gs(Uc,e.__scopePopover),r=ut.useRef(!1),n=ut.useRef(!1);return(0,Mt.jsx)(tF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;o.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),tF=ut.forwardRef((e,t)=>{let{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=gs(Uc,o),p=om(o);return us(),(0,Mt.jsx)(Qa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,Mt.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,Mt.jsx)(fs,{"data-state":nF(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),oF="PopoverClose",rF=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=gs(oF,o);return(0,Mt.jsx)($.button,{type:"button",...r,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});rF.displayName=oF;var Z9="PopoverArrow",J9=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=om(o);return(0,Mt.jsx)(ps,{...n,...r,ref:t})});J9.displayName=Z9;function nF(e){return e?"open":"closed"}var aF=XO,iF=QO,sF=JO;var pb=eF,lF=rF;var ga=R(N()),t7=K("z-50 w-72 rounded-md border border-border bg-background p-4 shadow-md outline-none 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",{variants:{variant:{default:"",destructive:"border-destructive bg-destructive/5",outline:"border-border bg-transparent",subtle:"border-transparent bg-muted/50"},size:{sm:"w-48 p-3",default:"w-72 p-4",lg:"w-96 p-5"},side:{top:"data-[side=top]:slide-in-from-bottom-2",right:"data-[side=right]:slide-in-from-left-2",bottom:"data-[side=bottom]:slide-in-from-top-2",left:"data-[side=left]:slide-in-from-right-2"},position:{pointerEventsNone:"pointer-events-none",default:""},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",default:"shadow-md",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}},defaultVariants:{variant:"default",size:"default",radius:"default",shadow:"default"}}),oi=aF,ri=sF,EPe=iF,ha=uF.forwardRef(({className:e,variant:t,size:o,side:r,position:n,radius:a,shadow:i,backdrop:s=!1,closeOnInteractOutside:l=!0,overlayBackdrop:u=!1,sideOffset:c=4,...d},f)=>(0,ga.jsxs)(ga.Fragment,{children:[u&&(0,ga.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,ga.jsx)(pb,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:P(t7({variant:t,size:o,side:r,position:n,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));ha.displayName=pb.displayName;var APe=lF,o7=({className:e,...t})=>(0,ga.jsx)("div",{className:P("moonui-theme","my-2 h-px bg-border",e),...t});o7.displayName="PopoverSeparator";var r7=({className:e,...t})=>(0,ga.jsx)("div",{className:P("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});r7.displayName="PopoverHeader";var n7=({className:e,...t})=>(0,ga.jsx)("div",{className:P("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});n7.displayName="PopoverFooter";var nm=R(M());var ai=R(M(),1);var Xt=R(M(),1);var hs=R(N(),1),mb="rovingFocusGroup.onEntryFocus",a7={bubbles:!1,cancelable:!0},rm="RovingFocusGroup",[gb,cF,i7]=Xn(rm),[s7,zc]=Oe(rm,[i7]),[l7,u7]=s7(rm),dF=Xt.forwardRef((e,t)=>(0,hs.jsx)(gb.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,hs.jsx)(gb.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,hs.jsx)(c7,{...e,ref:t})})}));dF.displayName=rm;var c7=Xt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:r,loop:n=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=Xt.useRef(null),p=de(t,f),g=oa(a),[m,x]=qe({prop:i,defaultProp:s??null,onChange:l,caller:rm}),[h,v]=Xt.useState(!1),y=rt(u),w=cF(o),C=Xt.useRef(!1),[b,S]=Xt.useState(0);return Xt.useEffect(()=>{let I=f.current;if(I)return I.addEventListener(mb,y),()=>I.removeEventListener(mb,y)},[y]),(0,hs.jsx)(l7,{scope:o,orientation:r,dir:g,loop:n,currentTabStopId:m,onItemFocus:Xt.useCallback(I=>x(I),[x]),onItemShiftTab:Xt.useCallback(()=>v(!0),[]),onFocusableItemAdd:Xt.useCallback(()=>S(I=>I+1),[]),onFocusableItemRemove:Xt.useCallback(()=>S(I=>I-1),[]),children:(0,hs.jsx)($.div,{tabIndex:h||b===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{C.current=!0}),onFocus:W(e.onFocus,I=>{let L=!C.current;if(I.target===I.currentTarget&&L&&!h){let T=new CustomEvent(mb,a7);if(I.currentTarget.dispatchEvent(T),!T.defaultPrevented){let k=w().filter(F=>F.focusable),E=k.find(F=>F.active),_=k.find(F=>F.id===m),z=[E,_,...k].filter(Boolean).map(F=>F.ref.current);mF(z,c)}}C.current=!1}),onBlur:W(e.onBlur,()=>v(!1))})})}),fF="RovingFocusGroupItem",pF=Xt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:r=!0,active:n=!1,tabStopId:a,children:i,...s}=e,l=Ae(),u=a||l,c=u7(fF,o),d=c.currentTabStopId===u,f=cF(o),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=c;return Xt.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),(0,hs.jsx)(gb.ItemSlot,{scope:o,id:u,focusable:r,active:n,children:(0,hs.jsx)($.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:W(e.onMouseDown,x=>{r?c.onItemFocus(u):x.preventDefault()}),onFocus:W(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:W(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){c.onItemShiftTab();return}if(x.target!==x.currentTarget)return;let h=p7(x,c.orientation,c.dir);if(h!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let y=f().filter(w=>w.focusable).map(w=>w.ref.current);if(h==="last")y.reverse();else if(h==="prev"||h==="next"){h==="prev"&&y.reverse();let w=y.indexOf(x.currentTarget);y=c.loop?m7(y,w+1):y.slice(w+1)}setTimeout(()=>mF(y))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});pF.displayName=fF;var d7={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function f7(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function p7(e,t,o){let r=f7(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return d7[r]}function mF(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function m7(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var bx=dF,Rx=pF;var ni=R(N(),1),Ix="Tabs",[g7,QPe]=Oe(Ix,[zc]),hF=zc(),[h7,hb]=g7(Ix),vF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,onValueChange:n,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=oa(s),[d,f]=qe({prop:r,onChange:n,defaultProp:a??"",caller:Ix});return(0,ni.jsx)(h7,{scope:o,baseId:Ae(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:(0,ni.jsx)($.div,{dir:c,"data-orientation":i,...u,ref:t})})});vF.displayName=Ix;var xF="TabsList",yF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,loop:r=!0,...n}=e,a=hb(xF,o),i=hF(o);return(0,ni.jsx)(bx,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:(0,ni.jsx)($.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});yF.displayName=xF;var wF="TabsTrigger",CF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,disabled:n=!1,...a}=e,i=hb(wF,o),s=hF(o),l=RF(i.baseId,r),u=IF(i.baseId,r),c=r===i.value;return(0,ni.jsx)(Rx,{asChild:!0,...s,focusable:!n,active:c,children:(0,ni.jsx)($.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...a,ref:t,onMouseDown:W(e.onMouseDown,d=>{!n&&d.button===0&&d.ctrlKey===!1?i.onValueChange(r):d.preventDefault()}),onKeyDown:W(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(r)}),onFocus:W(e.onFocus,()=>{let d=i.activationMode!=="manual";!c&&!n&&d&&i.onValueChange(r)})})})});CF.displayName=wF;var SF="TabsContent",bF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,forceMount:n,children:a,...i}=e,s=hb(SF,o),l=RF(s.baseId,r),u=IF(s.baseId,r),c=r===s.value,d=ai.useRef(c);return ai.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,ni.jsx)(st,{present:n||c,children:({present:f})=>(0,ni.jsx)($.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&a})})});bF.displayName=SF;function RF(e,t){return`${e}-trigger-${t}`}function IF(e,t){return`${e}-content-${t}`}var vb=vF,xb=yF,yb=CF,wb=bF;var ii=R(N()),Px=nm.forwardRef(({vertical:e=!1,...t},o)=>(0,ii.jsx)(vb,{ref:o,className:P("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));Px.displayName=vb.displayName;var x7=K("flex items-center justify-start transition-all duration-200",{variants:{variant:{default:"bg-muted rounded-md p-1 text-muted-foreground dark:bg-gray-800/80 dark:text-gray-400",pills:"bg-transparent gap-3 p-0 dark:text-gray-400",underline:"bg-transparent border-b border-border dark:border-gray-700 gap-4 dark:text-gray-400",cards:"bg-transparent gap-2 p-0 dark:text-gray-400",minimal:"bg-transparent gap-1 p-0 dark:text-gray-400"},orientation:{horizontal:"flex-row",vertical:"flex-col items-start gap-1"},fullWidth:{true:"w-full"},scrollable:{true:"overflow-x-auto overflow-y-hidden flex-nowrap hide-scrollbar",false:"flex-wrap"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1,scrollable:!1}}),Lx=nm.forwardRef(({className:e,variant:t,orientation:o,fullWidth:r,scrollable:n,...a},i)=>(0,ii.jsx)(xb,{ref:i,className:P("moonui-theme",x7({variant:t,orientation:o,fullWidth:r,scrollable:n,className:e})),...a}));Lx.displayName=xb.displayName;var y7=K("inline-flex items-center justify-center whitespace-nowrap flex-shrink-0 font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",underline:"rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",pills:"rounded-lg bg-gray-100 hover:bg-gray-200/80 border border-gray-300 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:border-primary dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white dark:data-[state=active]:border-primary",cards:"rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",minimal:"rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 py-1.5 text-sm",lg:"h-10 px-4 py-2 text-base"},orientation:{horizontal:"",vertical:"justify-start w-full text-left"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",size:"md",orientation:"horizontal",fullWidth:!1}}),Gc=nm.forwardRef(({className:e,variant:t,size:o,icon:r,iconPosition:n="left",badge:a,fadeTabs:i=!1,orientation:s,fullWidth:l,children:u,...c},d)=>(0,ii.jsxs)(yb,{ref:d,className:P("moonui-theme",y7({variant:t,size:o,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...c,children:[r&&n==="left"&&(0,ii.jsx)("span",{className:"mr-2",children:r}),u,r&&n==="right"&&(0,ii.jsx)("span",{className:"ml-2",children:r}),a&&(0,ii.jsx)("span",{className:"ml-2",children:a})]}));Gc.displayName=yb.displayName;var Wc=nm.forwardRef(({className:e,animated:t=!1,...o},r)=>(0,ii.jsx)(wb,{ref:r,className:P("moonui-theme","mt-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t&&"data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",e),...o}));Wc.displayName=wb.displayName;var vs=R(M());var va=R(N()),w7=K("relative flex w-full touch-none select-none items-center",{variants:{size:{sm:"h-5",default:"h-6",md:"h-8",lg:"h-10"}},defaultVariants:{size:"default"}}),C7=K("relative h-1.5 w-full grow overflow-hidden rounded-full",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",accent:"bg-accent/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"}},defaultVariants:{variant:"default"}}),S7=K("absolute h-full",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",success:"bg-success",warning:"bg-warning",error:"bg-error"}},defaultVariants:{variant:"primary"}}),b7=K("block rounded-full border-2 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",{variants:{variant:{default:"border-foreground bg-background",primary:"border-primary bg-background",secondary:"border-secondary bg-background",accent:"border-accent bg-background",success:"border-success bg-background",warning:"border-warning bg-background",error:"border-error bg-background"},size:{sm:"h-3 w-3",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"primary",size:"default"}}),si=vs.forwardRef(({className:e,size:t,trackVariant:o,rangeVariant:r,thumbVariant:n,thumbSize:a,showValueLabel:i=!1,valueLabelFormat:s,valueLabelClassName:l,value:u,defaultValue:c=[0],onValueChange:d,disabled:f,...p},g)=>{let[m,x]=vs.useState(u||c||[0]);vs.useEffect(()=>{u!==void 0&&x(u)},[u]);let h=k=>s?s(k):`${Math.round(k*100)/100}`,v=(k,E,_)=>(k-E)/(_-E)*100,y=vs.useRef(null),w=p.min||0,C=p.max||100,b=p.step||1,S=k=>{let E=k.map(_=>{if(b<1){let D=b.toString().split(".")[1]?.length||0;return Math.round(_*Math.pow(10,D))/Math.pow(10,D)}return Math.round(_)});x(E),d&&d(E)},I=k=>{if(f)return;let E=y.current;if(!E)return;let _=E.getBoundingClientRect(),D=(k.clientX-_.left)/_.width,z=w+D*(C-w),F=Math.round(z/b)*b,O=Math.max(w,Math.min(C,F)),B=[...m];B[0]=O,S(B)},L=k=>E=>{if(f)return;E.preventDefault();let _=z=>{let F=y.current;if(!F)return;let O=F.getBoundingClientRect(),B=(z.clientX-O.left)/O.width,A=w+B*(C-w),te=Math.round(A/b)*b,ae=Math.max(w,Math.min(C,te)),V=[...m];V[k]=ae,S(V)},D=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",D)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",D)},T=k=>E=>{if(f)return;let _=b*10,D=m[k],z;switch(E.key){case"ArrowRight":case"ArrowUp":z=D+b;break;case"ArrowLeft":case"ArrowDown":z=D-b;break;case"PageUp":z=D+_;break;case"PageDown":z=D-_;break;case"Home":z=w;break;case"End":z=C;break;default:return}E.preventDefault();let F=k>0?m[k-1]:w,O=k<m.length-1?m[k+1]:C,B=Math.max(F,Math.min(O,z)),A=[...m];A[k]=B,S(A)};return(0,va.jsxs)("div",{className:"w-full",ref:g,...p,children:[i&&(0,va.jsx)("div",{className:P("flex justify-end mb-1 text-sm text-muted-foreground",l),children:m.length===1?(0,va.jsx)("span",{children:h(m[0])}):(0,va.jsxs)("span",{children:[h(m[0])," - ",h(m[m.length-1])]})}),(0,va.jsxs)("div",{className:P("moonui-theme",w7({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,va.jsx)("div",{ref:y,className:P(C7({variant:o||n||"default"})),onClick:I,children:(0,va.jsx)("div",{className:P(S7({variant:r||n||"primary"})),style:{left:"0%",width:`${v(m[0],w,C)}%`}})}),m.map((k,E)=>(0,va.jsx)("div",{className:P(b7({variant:n||"primary",size:a})),style:{left:`${v(k,w,C)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:L(E),onKeyDown:T(E),"aria-label":`Thumb ${E+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":C,"aria-valuenow":k,"aria-disabled":f},E))]})]})});si.displayName="Slider";var j=R(N()),PF=K("relative inline-flex items-center justify-center",{variants:{size:{default:"h-10 w-10",sm:"h-8 w-8",lg:"h-12 w-12",xl:"h-16 w-16"},shape:{square:"rounded-md",circle:"rounded-full",rounded:"rounded-lg"}},defaultVariants:{size:"default",shape:"square"}});function LF(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function TF(e,t,o){return"#"+((1<<24)+(e<<16)+(t<<8)+o).toString(16).slice(1)}function R7(e){let t=LF(e);if(!t)return null;let o=t.r/255,r=t.g/255,n=t.b/255,a=Math.max(o,r,n),i=Math.min(o,r,n),s=0,l=0,u=(a+i)/2;if(a!==i){let c=a-i;switch(l=u>.5?c/(2-a-i):c/(a+i),a){case o:s=((r-n)/c+(r<n?6:0))/6;break;case r:s=((n-o)/c+2)/6;break;case n:s=((o-r)/c+4)/6;break}}return{h:Math.round(s*360),s:Math.round(l*100),l:Math.round(u*100)}}function I7(e,t,o){e=e/360,t=t/100,o=o/100;let r,n,a;if(t===0)r=n=a=o;else{let i=(u,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?u+(c-u)*6*d:d<.5?c:d<.6666666666666666?u+(c-u)*(.6666666666666666-d)*6:u),s=o<.5?o*(1+t):o+t-o*t,l=2*o-s;r=i(l,s,e+1/3),n=i(l,s,e),a=i(l,s,e-1/3)}return TF(Math.round(r*255),Math.round(n*255),Math.round(a*255))}var kF=["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ff8800","#8800ff","#88ff00","#0088ff","#ff0088","#00ff88","#888888","#f87171","#fb923c","#fbbf24","#facc15","#a3e635","#4ade80","#34d399","#2dd4bf","#22d3ee","#38bdf8","#60a5fa","#818cf8","#a78bfa","#c084fc","#e879f9","#f472b6","#fb7185","#f43f5e","#ef4444","#dc2626"];function Cb({className:e,size:t,shape:o,value:r="#000000",onChange:n,showInput:a=!0,showPresets:i=!0,presets:s=kF,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[g,m]=Kr.useState(!1),[x,h]=Kr.useState(r),[v,y]=Kr.useState(100),[w,C]=Kr.useState(!1),[b,S]=Kr.useState(r),I=Kr.useMemo(()=>R7(x)||{h:0,s:0,l:0},[x]),L=Kr.useMemo(()=>LF(x)||{r:0,g:0,b:0},[x]);Kr.useEffect(()=>{h(r),S(r)},[r]);let T=F=>{h(F),S(F),n?.(F)},k=(F,O)=>{let B={...I,[F]:O},A=I7(B.h,B.s,B.l);T(A)},E=(F,O)=>{let B={...L,[F]:O},A=TF(B.r,B.g,B.b);T(A)},_=F=>{let O=F.target.value;S(O),/^#[0-9A-F]{6}$/i.test(O)&&T(O)},D=async()=>{try{let F=x;u==="rgb"?F=`rgb(${L.r}, ${L.g}, ${L.b})`:u==="hsl"&&(F=`hsl(${I.h}, ${I.s}%, ${I.l}%)`),await navigator.clipboard.writeText(F),C(!0),setTimeout(()=>C(!1),2e3)}catch(F){console.error("Failed to copy:",F)}},z=()=>u==="rgb"?`rgb(${L.r}, ${L.g}, ${L.b})`:u==="hsl"?`hsl(${I.h}, ${I.s}%, ${I.l}%)`:x;return(0,j.jsxs)(oi,{open:g,onOpenChange:m,children:[(0,j.jsx)(ri,{asChild:!0,children:(0,j.jsx)(De,{variant:"outline",className:P(PF({size:t,shape:o}),"p-0 border-2",e),style:{backgroundColor:x},disabled:f,...p,children:(0,j.jsx)("span",{className:"sr-only",children:"Pick a color"})})}),(0,j.jsxs)(ha,{className:"w-80",align:"start",sideOffset:8,children:[(0,j.jsxs)(Px,{defaultValue:"picker",className:"w-full",children:[(0,j.jsxs)(Lx,{className:"grid w-full grid-cols-3",children:[(0,j.jsx)(Gc,{value:"picker",children:"Picker"}),(0,j.jsx)(Gc,{value:"sliders",children:"Sliders"}),(0,j.jsx)(Gc,{value:"input",children:"Input"})]}),(0,j.jsxs)(Wc,{value:"picker",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"relative h-48 rounded-md overflow-hidden",children:[(0,j.jsx)("div",{className:"absolute inset-0",style:{background:`linear-gradient(to right, #fff, hsl(${I.h}, 100%, 50%))`}}),(0,j.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, #000)"}}),(0,j.jsx)(Be.div,{className:"absolute w-4 h-4 border-2 border-white rounded-full shadow-md cursor-pointer",drag:!0,dragConstraints:{left:-8,right:280,top:-8,bottom:184},dragElastic:0,style:{backgroundColor:x,left:`${I.s/100*280-8}px`,top:`${(1-I.l/100)*192-8}px`}})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"Hue"}),(0,j.jsx)("div",{className:"relative h-3 rounded-full",style:{background:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"},children:(0,j.jsx)(si,{value:[I.h],onValueChange:([F])=>k("h",F),max:360,step:1,className:"absolute inset-0"})})]}),l&&(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"Opacity"}),(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)(si,{value:[v],onValueChange:([F])=>y(F),max:100,step:1,className:"flex-1"}),(0,j.jsxs)("span",{className:"text-sm w-10 text-right",children:[v,"%"]})]})]})]}),(0,j.jsxs)(Wc,{value:"sliders",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"space-y-3",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(rr,{children:"Red"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.r})]}),(0,j.jsx)(si,{value:[L.r],onValueChange:([F])=>E("r",F),max:255,step:1,className:"[&_[role=slider]]:bg-red-500"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(rr,{children:"Green"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.g})]}),(0,j.jsx)(si,{value:[L.g],onValueChange:([F])=>E("g",F),max:255,step:1,className:"[&_[role=slider]]:bg-green-500"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(rr,{children:"Blue"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.b})]}),(0,j.jsx)(si,{value:[L.b],onValueChange:([F])=>E("b",F),max:255,step:1,className:"[&_[role=slider]]:bg-blue-500"})]})]}),(0,j.jsx)("div",{className:"pt-2 border-t",children:(0,j.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"H"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.h,"\xB0"]})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"S"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.s,"%"]})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"L"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.l,"%"]})]})]})})]}),(0,j.jsxs)(Wc,{value:"input",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"Hex Color"}),(0,j.jsxs)("div",{className:"flex gap-2",children:[(0,j.jsx)(bo,{value:b,onChange:_,placeholder:"#000000",className:"font-mono"}),(0,j.jsx)(De,{size:"icon",variant:"outline",onClick:()=>T(b),children:(0,j.jsx)(vo,{className:"h-4 w-4"})})]})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"RGB Values"}),(0,j.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,j.jsx)(bo,{type:"number",value:L.r,onChange:F=>E("r",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(bo,{type:"number",value:L.g,onChange:F=>E("g",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(bo,{type:"number",value:L.b,onChange:F=>E("b",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"})]})]})]})]}),(0,j.jsxs)("div",{className:"mt-4 flex items-center justify-between p-3 border rounded-lg",children:[(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)("div",{className:P("h-10 w-10 rounded border-2",PF({shape:o})),style:{backgroundColor:x}}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-sm font-medium",children:z()}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&(0,j.jsx)(De,{size:"icon",variant:"ghost",onClick:D,className:"h-8 w-8",children:(0,j.jsx)(za,{mode:"wait",children:w?(0,j.jsx)(Be.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(vo,{className:"h-4 w-4 text-green-600"})},"check"):(0,j.jsx)(Be.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(bf,{className:"h-4 w-4"})},"copy")})})]}),i&&s.length>0&&(0,j.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,j.jsx)(rr,{children:"Preset Colors"}),(0,j.jsx)("div",{className:"grid grid-cols-10 gap-1",children:s.map(F=>(0,j.jsx)("button",{type:"button","aria-label":`Select color ${F}`,"aria-pressed":x===F,className:P("h-7 w-7 rounded border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",x===F?"border-primary":"border-transparent"),style:{backgroundColor:F},onClick:()=>T(F)},F))})]})]})]})}function P7({value:e="#000000",onChange:t,colors:o=kF.slice(0,10),className:r,size:n="default"}){let a={sm:"h-6 w-6",default:"h-8 w-8",lg:"h-10 w-10"};return(0,j.jsx)("div",{className:P("moonui-theme","flex flex-wrap gap-2",r),children:o.map(i=>(0,j.jsx)("button",{type:"button","aria-label":`Select color ${i}`,"aria-pressed":e===i,className:P("rounded-full border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a[n],e===i?"border-primary ring-2 ring-primary/20":"border-transparent"),style:{backgroundColor:i},onClick:()=>t?.(i)},i))})}function L7({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:o}){let[r,n]=Kr.useState(e),a=(i,s)=>{let l={...r,[i]:s};n(l),t?.(l)};return(0,j.jsxs)("div",{className:P("moonui-theme","space-y-4",o),children:[(0,j.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${r.angle}deg, ${r.start}, ${r.end})`}}),(0,j.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"Start Color"}),(0,j.jsx)(Cb,{value:r.start,onChange:i=>a("start",i),size:"sm"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"End Color"}),(0,j.jsx)(Cb,{value:r.end,onChange:i=>a("end",i),size:"sm"})]})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(rr,{children:"Angle"}),(0,j.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r.angle,"\xB0"]})]}),(0,j.jsx)(si,{value:[r.angle||90],onValueChange:([i])=>a("angle",i),max:360,step:1})]})]})}var ws=R(M());var MF=1,T7=.9,k7=.8,M7=.17,Sb=.1,bb=.999,E7=.9999,A7=.99,D7=/[\\\/_+.#"@\[\(\{&]/,N7=/[\\\/_+.#"@\[\(\{&]/g,O7=/[\s-]/,AF=/[\s-]/g;function Rb(e,t,o,r,n,a,i){if(a===t.length)return n===e.length?MF:A7;var s=`${n},${a}`;if(i[s]!==void 0)return i[s];for(var l=r.charAt(a),u=o.indexOf(l,n),c=0,d,f,p,g;u>=0;)d=Rb(e,t,o,r,u+1,a+1,i),d>c&&(u===n?d*=MF:D7.test(e.charAt(u-1))?(d*=k7,p=e.slice(n,u-1).match(N7),p&&n>0&&(d*=Math.pow(bb,p.length))):O7.test(e.charAt(u-1))?(d*=T7,g=e.slice(n,u-1).match(AF),g&&n>0&&(d*=Math.pow(bb,g.length))):(d*=M7,n>0&&(d*=Math.pow(bb,u-n))),e.charAt(u)!==t.charAt(a)&&(d*=E7)),(d<Sb&&o.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&o.charAt(u-1)!==r.charAt(a))&&(f=Rb(e,t,o,r,u+1,a+2,i),f*Sb>d&&(d=f*Sb)),d>c&&(c=d),u=o.indexOf(l,u+1);return i[s]=c,c}function EF(e){return e.toLowerCase().replace(AF," ")}function DF(e,t,o){return e=o&&o.length>0?`${e+" "+o.join(" ")}`:e,Rb(e,t,EF(e),EF(t),0,0,{})}var Qe=R(M(),1);var We=R(N(),1),kx="Dialog",[NF,DLe]=Oe(kx),[F7,Fn]=NF(kx),OF=e=>{let{__scopeDialog:t,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=Qe.useRef(null),l=Qe.useRef(null),[u,c]=qe({prop:r,defaultProp:n??!1,onChange:a,caller:kx});return(0,We.jsx)(F7,{scope:t,triggerRef:s,contentRef:l,contentId:Ae(),titleId:Ae(),descriptionId:Ae(),open:u,onOpenChange:c,onOpenToggle:Qe.useCallback(()=>c(d=>!d),[c]),modal:i,children:o})};OF.displayName=kx;var FF="DialogTrigger",_F=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=Fn(FF,o),a=de(t,n.triggerRef);return(0,We.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":Lb(n.open),...r,ref:a,onClick:W(e.onClick,n.onOpenToggle)})});_F.displayName=FF;var Ib="DialogPortal",[_7,VF]=NF(Ib,{forceMount:void 0}),BF=e=>{let{__scopeDialog:t,forceMount:o,children:r,container:n}=e,a=Fn(Ib,t);return(0,We.jsx)(_7,{scope:t,forceMount:o,children:Qe.Children.map(r,i=>(0,We.jsx)(st,{present:o||a.open,children:(0,We.jsx)(Sr,{asChild:!0,container:n,children:i})}))})};BF.displayName=Ib;var Tx="DialogOverlay",HF=Qe.forwardRef((e,t)=>{let o=VF(Tx,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=Fn(Tx,e.__scopeDialog);return a.modal?(0,We.jsx)(st,{present:r||a.open,children:(0,We.jsx)(B7,{...n,ref:t})}):null});HF.displayName=Tx;var V7=ur("DialogOverlay.RemoveScroll"),B7=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=Fn(Tx,o);return(0,We.jsx)(ti,{as:V7,allowPinchZoom:!0,shards:[n.contentRef],children:(0,We.jsx)($.div,{"data-state":Lb(n.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Wl="DialogContent",UF=Qe.forwardRef((e,t)=>{let o=VF(Wl,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=Fn(Wl,e.__scopeDialog);return(0,We.jsx)(st,{present:r||a.open,children:a.modal?(0,We.jsx)(H7,{...n,ref:t}):(0,We.jsx)(U7,{...n,ref:t})})});UF.displayName=Wl;var H7=Qe.forwardRef((e,t)=>{let o=Fn(Wl,e.__scopeDialog),r=Qe.useRef(null),n=de(t,o.contentRef,r);return Qe.useEffect(()=>{let a=r.current;if(a)return ms(a)},[]),(0,We.jsx)(zF,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,a=>{a.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,a=>{let i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault())})}),U7=Qe.forwardRef((e,t)=>{let o=Fn(Wl,e.__scopeDialog),r=Qe.useRef(!1),n=Qe.useRef(!1);return(0,We.jsx)(zF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;o.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),zF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=Fn(Wl,o),l=Qe.useRef(null),u=de(t,l);return us(),(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(Qa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,We.jsx)(Gr,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Lb(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(z7,{titleId:s.titleId}),(0,We.jsx)(W7,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Pb="DialogTitle",GF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=Fn(Pb,o);return(0,We.jsx)($.h2,{id:n.titleId,...r,ref:t})});GF.displayName=Pb;var WF="DialogDescription",jF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=Fn(WF,o);return(0,We.jsx)($.p,{id:n.descriptionId,...r,ref:t})});jF.displayName=WF;var qF="DialogClose",$F=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=Fn(qF,o);return(0,We.jsx)($.button,{type:"button",...r,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});$F.displayName=qF;function Lb(e){return e?"open":"closed"}var KF="DialogTitleWarning",[NLe,XF]=mP(KF,{contentName:Wl,titleName:Pb,docsSlug:"dialog"}),z7=({titleId:e})=>{let t=XF(KF),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
59
|
+
`)},j9=0,Hc=[];function $O(e){var t=at.useRef([]),o=at.useRef([0,0]),r=at.useRef(),n=at.useState(j9++)[0],a=at.useState(tm)[0],i=at.useRef(e);at.useEffect(function(){i.current=e},[e]),at.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var m=EO([e.lockRef.current],(e.shards||[]).map(qO),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var s=at.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var h=Cx(m),v=o.current,y="deltaX"in m?m.deltaX:v[0]-h[0],w="deltaY"in m?m.deltaY:v[1]-h[1],C,b=m.target,S=Math.abs(y)>Math.abs(w)?"h":"v";if("touches"in m&&S==="h"&&b.type==="range")return!1;var I=fb(S,b);if(!I)return!0;if(I?C=S:(C=S==="v"?"h":"v",I=fb(S,b)),!I)return!1;if(!r.current&&"changedTouches"in m&&(y||w)&&(r.current=C),!C)return!0;var L=r.current||C;return WO(L,x,m,L==="h"?y:w,!0)},[]),l=at.useCallback(function(m){var x=m;if(!(!Hc.length||Hc[Hc.length-1]!==a)){var h="deltaY"in x?jO(x):Cx(x),v=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&G9(C.delta,h)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var y=(i.current.shards||[]).map(qO).filter(Boolean).filter(function(C){return C.contains(x.target)}),w=y.length>0?s(x,y[0]):!i.current.noIsolation;w&&x.cancelable&&x.preventDefault()}}},[]),u=at.useCallback(function(m,x,h,v){var y={name:m,delta:x,target:h,should:v,shadowParent:q9(h)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),c=at.useCallback(function(m){o.current=Cx(m),r.current=void 0},[]),d=at.useCallback(function(m){u(m.type,jO(m),m.target,s(m,e.lockRef.current))},[]),f=at.useCallback(function(m){u(m.type,Cx(m),m.target,s(m,e.lockRef.current))},[]);at.useEffect(function(){return Hc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Gl),document.addEventListener("touchmove",l,Gl),document.addEventListener("touchstart",c,Gl),function(){Hc=Hc.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Gl),document.removeEventListener("touchmove",l,Gl),document.removeEventListener("touchstart",c,Gl)}},[]);var p=e.removeScrollBar,g=e.inert;return at.createElement(at.Fragment,null,g?at.createElement(a,{styles:W9(n)}):null,p?at.createElement(cb,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function q9(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var KO=nb(wx,$O);var XO=Sx.forwardRef(function(e,t){return Sx.createElement(em,ir({},e,{ref:t,sideCar:KO}))});XO.classNames=em.classNames;var ti=XO;var Mt=R(N(),1),bx="Popover",[YO,MPe]=Oe(bx,[$r]),rm=$r(),[$9,gs]=YO(bx),QO=e=>{let{__scopePopover:t,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:i=!1}=e,s=rm(t),l=ut.useRef(null),[u,c]=ut.useState(!1),[d,f]=qe({prop:r,defaultProp:n??!1,onChange:a,caller:bx});return(0,Mt.jsx)(Ja,{...s,children:(0,Mt.jsx)($9,{scope:t,contentId:Ae(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:ut.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:ut.useCallback(()=>c(!0),[]),onCustomAnchorRemove:ut.useCallback(()=>c(!1),[]),modal:i,children:o})})};QO.displayName=bx;var ZO="PopoverAnchor",JO=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=gs(ZO,o),a=rm(o),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=n;return ut.useEffect(()=>(i(),()=>s()),[i,s]),(0,Mt.jsx)(ei,{...a,...r,ref:t})});JO.displayName=ZO;var eF="PopoverTrigger",tF=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=gs(eF,o),a=rm(o),i=de(t,n.triggerRef),s=(0,Mt.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":iF(n.open),...r,ref:i,onClick:W(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:(0,Mt.jsx)(ei,{asChild:!0,...a,children:s})});tF.displayName=eF;var pb="PopoverPortal",[K9,X9]=YO(pb,{forceMount:void 0}),Y9=e=>{let{__scopePopover:t,forceMount:o,children:r,container:n}=e,a=gs(pb,t);return(0,Mt.jsx)(K9,{scope:t,forceMount:o,children:(0,Mt.jsx)(st,{present:o||a.open,children:(0,Mt.jsx)(Sr,{asChild:!0,container:n,children:r})})})};Y9.displayName=pb;var Uc="PopoverContent",oF=ut.forwardRef((e,t)=>{let o=X9(Uc,e.__scopePopover),{forceMount:r=o.forceMount,...n}=e,a=gs(Uc,e.__scopePopover);return(0,Mt.jsx)(st,{present:r||a.open,children:a.modal?(0,Mt.jsx)(Z9,{...n,ref:t}):(0,Mt.jsx)(J9,{...n,ref:t})})});oF.displayName=Uc;var Q9=ur("PopoverContent.RemoveScroll"),Z9=ut.forwardRef((e,t)=>{let o=gs(Uc,e.__scopePopover),r=ut.useRef(null),n=de(t,r),a=ut.useRef(!1);return ut.useEffect(()=>{let i=r.current;if(i)return ms(i)},[]),(0,Mt.jsx)(ti,{as:Q9,allowPinchZoom:!0,children:(0,Mt.jsx)(rF,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||o.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:W(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),J9=ut.forwardRef((e,t)=>{let o=gs(Uc,e.__scopePopover),r=ut.useRef(!1),n=ut.useRef(!1);return(0,Mt.jsx)(rF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;o.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),rF=ut.forwardRef((e,t)=>{let{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=gs(Uc,o),p=rm(o);return us(),(0,Mt.jsx)(Qa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,Mt.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,Mt.jsx)(fs,{"data-state":iF(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),nF="PopoverClose",aF=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=gs(nF,o);return(0,Mt.jsx)($.button,{type:"button",...r,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});aF.displayName=nF;var e7="PopoverArrow",t7=ut.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,n=rm(o);return(0,Mt.jsx)(ps,{...n,...r,ref:t})});t7.displayName=e7;function iF(e){return e?"open":"closed"}var sF=QO,lF=JO,uF=tF;var mb=oF,cF=aF;var ga=R(N()),r7=K("z-50 w-72 rounded-md border border-border bg-background p-4 shadow-md outline-none 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",{variants:{variant:{default:"",destructive:"border-destructive bg-destructive/5",outline:"border-border bg-transparent",subtle:"border-transparent bg-muted/50"},size:{sm:"w-48 p-3",default:"w-72 p-4",lg:"w-96 p-5"},side:{top:"data-[side=top]:slide-in-from-bottom-2",right:"data-[side=right]:slide-in-from-left-2",bottom:"data-[side=bottom]:slide-in-from-top-2",left:"data-[side=left]:slide-in-from-right-2"},position:{pointerEventsNone:"pointer-events-none",default:""},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",default:"shadow-md",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}},defaultVariants:{variant:"default",size:"default",radius:"default",shadow:"default"}}),oi=sF,ri=uF,DPe=lF,ha=dF.forwardRef(({className:e,variant:t,size:o,side:r,position:n,radius:a,shadow:i,backdrop:s=!1,closeOnInteractOutside:l=!0,overlayBackdrop:u=!1,sideOffset:c=4,...d},f)=>(0,ga.jsxs)(ga.Fragment,{children:[u&&(0,ga.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,ga.jsx)(mb,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:P(r7({variant:t,size:o,side:r,position:n,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));ha.displayName=mb.displayName;var NPe=cF,n7=({className:e,...t})=>(0,ga.jsx)("div",{className:P("moonui-theme","my-2 h-px bg-border",e),...t});n7.displayName="PopoverSeparator";var a7=({className:e,...t})=>(0,ga.jsx)("div",{className:P("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});a7.displayName="PopoverHeader";var i7=({className:e,...t})=>(0,ga.jsx)("div",{className:P("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});i7.displayName="PopoverFooter";var am=R(M());var ai=R(M(),1);var Xt=R(M(),1);var hs=R(N(),1),gb="rovingFocusGroup.onEntryFocus",s7={bubbles:!1,cancelable:!0},nm="RovingFocusGroup",[hb,fF,l7]=Xn(nm),[u7,zc]=Oe(nm,[l7]),[c7,d7]=u7(nm),pF=Xt.forwardRef((e,t)=>(0,hs.jsx)(hb.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,hs.jsx)(hb.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,hs.jsx)(f7,{...e,ref:t})})}));pF.displayName=nm;var f7=Xt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:r,loop:n=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=Xt.useRef(null),p=de(t,f),g=oa(a),[m,x]=qe({prop:i,defaultProp:s??null,onChange:l,caller:nm}),[h,v]=Xt.useState(!1),y=rt(u),w=fF(o),C=Xt.useRef(!1),[b,S]=Xt.useState(0);return Xt.useEffect(()=>{let I=f.current;if(I)return I.addEventListener(gb,y),()=>I.removeEventListener(gb,y)},[y]),(0,hs.jsx)(c7,{scope:o,orientation:r,dir:g,loop:n,currentTabStopId:m,onItemFocus:Xt.useCallback(I=>x(I),[x]),onItemShiftTab:Xt.useCallback(()=>v(!0),[]),onFocusableItemAdd:Xt.useCallback(()=>S(I=>I+1),[]),onFocusableItemRemove:Xt.useCallback(()=>S(I=>I-1),[]),children:(0,hs.jsx)($.div,{tabIndex:h||b===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{C.current=!0}),onFocus:W(e.onFocus,I=>{let L=!C.current;if(I.target===I.currentTarget&&L&&!h){let T=new CustomEvent(gb,s7);if(I.currentTarget.dispatchEvent(T),!T.defaultPrevented){let k=w().filter(F=>F.focusable),E=k.find(F=>F.active),_=k.find(F=>F.id===m),z=[E,_,...k].filter(Boolean).map(F=>F.ref.current);hF(z,c)}}C.current=!1}),onBlur:W(e.onBlur,()=>v(!1))})})}),mF="RovingFocusGroupItem",gF=Xt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:r=!0,active:n=!1,tabStopId:a,children:i,...s}=e,l=Ae(),u=a||l,c=d7(mF,o),d=c.currentTabStopId===u,f=fF(o),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=c;return Xt.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),(0,hs.jsx)(hb.ItemSlot,{scope:o,id:u,focusable:r,active:n,children:(0,hs.jsx)($.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:W(e.onMouseDown,x=>{r?c.onItemFocus(u):x.preventDefault()}),onFocus:W(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:W(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){c.onItemShiftTab();return}if(x.target!==x.currentTarget)return;let h=g7(x,c.orientation,c.dir);if(h!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let y=f().filter(w=>w.focusable).map(w=>w.ref.current);if(h==="last")y.reverse();else if(h==="prev"||h==="next"){h==="prev"&&y.reverse();let w=y.indexOf(x.currentTarget);y=c.loop?h7(y,w+1):y.slice(w+1)}setTimeout(()=>hF(y))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});gF.displayName=mF;var p7={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function m7(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function g7(e,t,o){let r=m7(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return p7[r]}function hF(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function h7(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var Rx=pF,Ix=gF;var ni=R(N(),1),Px="Tabs",[v7,JPe]=Oe(Px,[zc]),xF=zc(),[x7,vb]=v7(Px),yF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,onValueChange:n,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=oa(s),[d,f]=qe({prop:r,onChange:n,defaultProp:a??"",caller:Px});return(0,ni.jsx)(x7,{scope:o,baseId:Ae(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:(0,ni.jsx)($.div,{dir:c,"data-orientation":i,...u,ref:t})})});yF.displayName=Px;var wF="TabsList",CF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,loop:r=!0,...n}=e,a=vb(wF,o),i=xF(o);return(0,ni.jsx)(Rx,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:(0,ni.jsx)($.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});CF.displayName=wF;var SF="TabsTrigger",bF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,disabled:n=!1,...a}=e,i=vb(SF,o),s=xF(o),l=PF(i.baseId,r),u=LF(i.baseId,r),c=r===i.value;return(0,ni.jsx)(Ix,{asChild:!0,...s,focusable:!n,active:c,children:(0,ni.jsx)($.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...a,ref:t,onMouseDown:W(e.onMouseDown,d=>{!n&&d.button===0&&d.ctrlKey===!1?i.onValueChange(r):d.preventDefault()}),onKeyDown:W(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(r)}),onFocus:W(e.onFocus,()=>{let d=i.activationMode!=="manual";!c&&!n&&d&&i.onValueChange(r)})})})});bF.displayName=SF;var RF="TabsContent",IF=ai.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,forceMount:n,children:a,...i}=e,s=vb(RF,o),l=PF(s.baseId,r),u=LF(s.baseId,r),c=r===s.value,d=ai.useRef(c);return ai.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,ni.jsx)(st,{present:n||c,children:({present:f})=>(0,ni.jsx)($.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&a})})});IF.displayName=RF;function PF(e,t){return`${e}-trigger-${t}`}function LF(e,t){return`${e}-content-${t}`}var xb=yF,yb=CF,wb=bF,Cb=IF;var ii=R(N()),Lx=am.forwardRef(({vertical:e=!1,...t},o)=>(0,ii.jsx)(xb,{ref:o,className:P("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));Lx.displayName=xb.displayName;var w7=K("flex items-center justify-start transition-all duration-200",{variants:{variant:{default:"bg-muted rounded-md p-1 text-muted-foreground dark:bg-gray-800/80 dark:text-gray-400",pills:"bg-transparent gap-3 p-0 dark:text-gray-400",underline:"bg-transparent border-b border-border dark:border-gray-700 gap-4 dark:text-gray-400",cards:"bg-transparent gap-2 p-0 dark:text-gray-400",minimal:"bg-transparent gap-1 p-0 dark:text-gray-400"},orientation:{horizontal:"flex-row",vertical:"flex-col items-start gap-1"},fullWidth:{true:"w-full"},scrollable:{true:"overflow-x-auto overflow-y-hidden flex-nowrap hide-scrollbar",false:"flex-wrap"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1,scrollable:!1}}),Tx=am.forwardRef(({className:e,variant:t,orientation:o,fullWidth:r,scrollable:n,...a},i)=>(0,ii.jsx)(yb,{ref:i,className:P("moonui-theme",w7({variant:t,orientation:o,fullWidth:r,scrollable:n,className:e})),...a}));Tx.displayName=yb.displayName;var C7=K("inline-flex items-center justify-center whitespace-nowrap flex-shrink-0 font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",underline:"rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",pills:"rounded-lg bg-gray-100 hover:bg-gray-200/80 border border-gray-300 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:border-primary dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white dark:data-[state=active]:border-primary",cards:"rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",minimal:"rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 py-1.5 text-sm",lg:"h-10 px-4 py-2 text-base"},orientation:{horizontal:"",vertical:"justify-start w-full text-left"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",size:"md",orientation:"horizontal",fullWidth:!1}}),Gc=am.forwardRef(({className:e,variant:t,size:o,icon:r,iconPosition:n="left",badge:a,fadeTabs:i=!1,orientation:s,fullWidth:l,children:u,...c},d)=>(0,ii.jsxs)(wb,{ref:d,className:P("moonui-theme",C7({variant:t,size:o,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...c,children:[r&&n==="left"&&(0,ii.jsx)("span",{className:"mr-2",children:r}),u,r&&n==="right"&&(0,ii.jsx)("span",{className:"ml-2",children:r}),a&&(0,ii.jsx)("span",{className:"ml-2",children:a})]}));Gc.displayName=wb.displayName;var Wc=am.forwardRef(({className:e,animated:t=!1,...o},r)=>(0,ii.jsx)(Cb,{ref:r,className:P("moonui-theme","mt-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t&&"data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",e),...o}));Wc.displayName=Cb.displayName;var vs=R(M());var va=R(N()),S7=K("relative flex w-full touch-none select-none items-center",{variants:{size:{sm:"h-5",default:"h-6",md:"h-8",lg:"h-10"}},defaultVariants:{size:"default"}}),b7=K("relative h-1.5 w-full grow overflow-hidden rounded-full",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",accent:"bg-accent/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"}},defaultVariants:{variant:"default"}}),R7=K("absolute h-full",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",success:"bg-success",warning:"bg-warning",error:"bg-error"}},defaultVariants:{variant:"primary"}}),I7=K("block rounded-full border-2 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",{variants:{variant:{default:"border-foreground bg-background",primary:"border-primary bg-background",secondary:"border-secondary bg-background",accent:"border-accent bg-background",success:"border-success bg-background",warning:"border-warning bg-background",error:"border-error bg-background"},size:{sm:"h-3 w-3",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"primary",size:"default"}}),si=vs.forwardRef(({className:e,size:t,trackVariant:o,rangeVariant:r,thumbVariant:n,thumbSize:a,showValueLabel:i=!1,valueLabelFormat:s,valueLabelClassName:l,value:u,defaultValue:c=[0],onValueChange:d,disabled:f,...p},g)=>{let[m,x]=vs.useState(u||c||[0]);vs.useEffect(()=>{u!==void 0&&x(u)},[u]);let h=k=>s?s(k):`${Math.round(k*100)/100}`,v=(k,E,_)=>(k-E)/(_-E)*100,y=vs.useRef(null),w=p.min||0,C=p.max||100,b=p.step||1,S=k=>{let E=k.map(_=>{if(b<1){let D=b.toString().split(".")[1]?.length||0;return Math.round(_*Math.pow(10,D))/Math.pow(10,D)}return Math.round(_)});x(E),d&&d(E)},I=k=>{if(f)return;let E=y.current;if(!E)return;let _=E.getBoundingClientRect(),D=(k.clientX-_.left)/_.width,z=w+D*(C-w),F=Math.round(z/b)*b,O=Math.max(w,Math.min(C,F)),B=[...m];B[0]=O,S(B)},L=k=>E=>{if(f)return;E.preventDefault();let _=z=>{let F=y.current;if(!F)return;let O=F.getBoundingClientRect(),B=(z.clientX-O.left)/O.width,A=w+B*(C-w),te=Math.round(A/b)*b,ae=Math.max(w,Math.min(C,te)),V=[...m];V[k]=ae,S(V)},D=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",D)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",D)},T=k=>E=>{if(f)return;let _=b*10,D=m[k],z;switch(E.key){case"ArrowRight":case"ArrowUp":z=D+b;break;case"ArrowLeft":case"ArrowDown":z=D-b;break;case"PageUp":z=D+_;break;case"PageDown":z=D-_;break;case"Home":z=w;break;case"End":z=C;break;default:return}E.preventDefault();let F=k>0?m[k-1]:w,O=k<m.length-1?m[k+1]:C,B=Math.max(F,Math.min(O,z)),A=[...m];A[k]=B,S(A)};return(0,va.jsxs)("div",{className:"w-full",ref:g,...p,children:[i&&(0,va.jsx)("div",{className:P("flex justify-end mb-1 text-sm text-muted-foreground",l),children:m.length===1?(0,va.jsx)("span",{children:h(m[0])}):(0,va.jsxs)("span",{children:[h(m[0])," - ",h(m[m.length-1])]})}),(0,va.jsxs)("div",{className:P("moonui-theme",S7({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,va.jsx)("div",{ref:y,className:P(b7({variant:o||n||"default"})),onClick:I,children:(0,va.jsx)("div",{className:P(R7({variant:r||n||"primary"})),style:{left:"0%",width:`${v(m[0],w,C)}%`}})}),m.map((k,E)=>(0,va.jsx)("div",{className:P(I7({variant:n||"primary",size:a})),style:{left:`${v(k,w,C)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:L(E),onKeyDown:T(E),"aria-label":`Thumb ${E+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":C,"aria-valuenow":k,"aria-disabled":f},E))]})]})});si.displayName="Slider";var j=R(N()),TF=K("relative inline-flex items-center justify-center",{variants:{size:{default:"h-10 w-10",sm:"h-8 w-8",lg:"h-12 w-12",xl:"h-16 w-16"},shape:{square:"rounded-md",circle:"rounded-full",rounded:"rounded-lg"}},defaultVariants:{size:"default",shape:"square"}});function kF(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function MF(e,t,o){return"#"+((1<<24)+(e<<16)+(t<<8)+o).toString(16).slice(1)}function P7(e){let t=kF(e);if(!t)return null;let o=t.r/255,r=t.g/255,n=t.b/255,a=Math.max(o,r,n),i=Math.min(o,r,n),s=0,l=0,u=(a+i)/2;if(a!==i){let c=a-i;switch(l=u>.5?c/(2-a-i):c/(a+i),a){case o:s=((r-n)/c+(r<n?6:0))/6;break;case r:s=((n-o)/c+2)/6;break;case n:s=((o-r)/c+4)/6;break}}return{h:Math.round(s*360),s:Math.round(l*100),l:Math.round(u*100)}}function L7(e,t,o){e=e/360,t=t/100,o=o/100;let r,n,a;if(t===0)r=n=a=o;else{let i=(u,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?u+(c-u)*6*d:d<.5?c:d<.6666666666666666?u+(c-u)*(.6666666666666666-d)*6:u),s=o<.5?o*(1+t):o+t-o*t,l=2*o-s;r=i(l,s,e+1/3),n=i(l,s,e),a=i(l,s,e-1/3)}return MF(Math.round(r*255),Math.round(n*255),Math.round(a*255))}var EF=["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ff8800","#8800ff","#88ff00","#0088ff","#ff0088","#00ff88","#888888","#f87171","#fb923c","#fbbf24","#facc15","#a3e635","#4ade80","#34d399","#2dd4bf","#22d3ee","#38bdf8","#60a5fa","#818cf8","#a78bfa","#c084fc","#e879f9","#f472b6","#fb7185","#f43f5e","#ef4444","#dc2626"];function Sb({className:e,size:t,shape:o,value:r="#000000",onChange:n,showInput:a=!0,showPresets:i=!0,presets:s=EF,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[g,m]=Kr.useState(!1),[x,h]=Kr.useState(r),[v,y]=Kr.useState(100),[w,C]=Kr.useState(!1),[b,S]=Kr.useState(r),I=Kr.useMemo(()=>P7(x)||{h:0,s:0,l:0},[x]),L=Kr.useMemo(()=>kF(x)||{r:0,g:0,b:0},[x]);Kr.useEffect(()=>{h(r),S(r)},[r]);let T=F=>{h(F),S(F),n?.(F)},k=(F,O)=>{let B={...I,[F]:O},A=L7(B.h,B.s,B.l);T(A)},E=(F,O)=>{let B={...L,[F]:O},A=MF(B.r,B.g,B.b);T(A)},_=F=>{let O=F.target.value;S(O),/^#[0-9A-F]{6}$/i.test(O)&&T(O)},D=async()=>{try{let F=x;u==="rgb"?F=`rgb(${L.r}, ${L.g}, ${L.b})`:u==="hsl"&&(F=`hsl(${I.h}, ${I.s}%, ${I.l}%)`),await navigator.clipboard.writeText(F),C(!0),setTimeout(()=>C(!1),2e3)}catch(F){console.error("Failed to copy:",F)}},z=()=>u==="rgb"?`rgb(${L.r}, ${L.g}, ${L.b})`:u==="hsl"?`hsl(${I.h}, ${I.s}%, ${I.l}%)`:x;return(0,j.jsxs)(oi,{open:g,onOpenChange:m,children:[(0,j.jsx)(ri,{asChild:!0,children:(0,j.jsx)(De,{variant:"outline",className:P(TF({size:t,shape:o}),"p-0 border-2",e),style:{backgroundColor:x},disabled:f,...p,children:(0,j.jsx)("span",{className:"sr-only",children:"Pick a color"})})}),(0,j.jsxs)(ha,{className:"w-80",align:"start",sideOffset:8,children:[(0,j.jsxs)(Lx,{defaultValue:"picker",className:"w-full",children:[(0,j.jsxs)(Tx,{className:"grid w-full grid-cols-3",children:[(0,j.jsx)(Gc,{value:"picker",children:"Picker"}),(0,j.jsx)(Gc,{value:"sliders",children:"Sliders"}),(0,j.jsx)(Gc,{value:"input",children:"Input"})]}),(0,j.jsxs)(Wc,{value:"picker",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"relative h-48 rounded-md overflow-hidden",children:[(0,j.jsx)("div",{className:"absolute inset-0",style:{background:`linear-gradient(to right, #fff, hsl(${I.h}, 100%, 50%))`}}),(0,j.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, #000)"}}),(0,j.jsx)(Be.div,{className:"absolute w-4 h-4 border-2 border-white rounded-full shadow-md cursor-pointer",drag:!0,dragConstraints:{left:-8,right:280,top:-8,bottom:184},dragElastic:0,style:{backgroundColor:x,left:`${I.s/100*280-8}px`,top:`${(1-I.l/100)*192-8}px`}})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"Hue"}),(0,j.jsx)("div",{className:"relative h-3 rounded-full",style:{background:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"},children:(0,j.jsx)(si,{value:[I.h],onValueChange:([F])=>k("h",F),max:360,step:1,className:"absolute inset-0"})})]}),l&&(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"Opacity"}),(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)(si,{value:[v],onValueChange:([F])=>y(F),max:100,step:1,className:"flex-1"}),(0,j.jsxs)("span",{className:"text-sm w-10 text-right",children:[v,"%"]})]})]})]}),(0,j.jsxs)(Wc,{value:"sliders",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"space-y-3",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(rr,{children:"Red"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.r})]}),(0,j.jsx)(si,{value:[L.r],onValueChange:([F])=>E("r",F),max:255,step:1,className:"[&_[role=slider]]:bg-red-500"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(rr,{children:"Green"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.g})]}),(0,j.jsx)(si,{value:[L.g],onValueChange:([F])=>E("g",F),max:255,step:1,className:"[&_[role=slider]]:bg-green-500"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(rr,{children:"Blue"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.b})]}),(0,j.jsx)(si,{value:[L.b],onValueChange:([F])=>E("b",F),max:255,step:1,className:"[&_[role=slider]]:bg-blue-500"})]})]}),(0,j.jsx)("div",{className:"pt-2 border-t",children:(0,j.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"H"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.h,"\xB0"]})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"S"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.s,"%"]})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"L"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.l,"%"]})]})]})})]}),(0,j.jsxs)(Wc,{value:"input",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"Hex Color"}),(0,j.jsxs)("div",{className:"flex gap-2",children:[(0,j.jsx)(bo,{value:b,onChange:_,placeholder:"#000000",className:"font-mono"}),(0,j.jsx)(De,{size:"icon",variant:"outline",onClick:()=>T(b),children:(0,j.jsx)(vo,{className:"h-4 w-4"})})]})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"RGB Values"}),(0,j.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,j.jsx)(bo,{type:"number",value:L.r,onChange:F=>E("r",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(bo,{type:"number",value:L.g,onChange:F=>E("g",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(bo,{type:"number",value:L.b,onChange:F=>E("b",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"})]})]})]})]}),(0,j.jsxs)("div",{className:"mt-4 flex items-center justify-between p-3 border rounded-lg",children:[(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)("div",{className:P("h-10 w-10 rounded border-2",TF({shape:o})),style:{backgroundColor:x}}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-sm font-medium",children:z()}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&(0,j.jsx)(De,{size:"icon",variant:"ghost",onClick:D,className:"h-8 w-8",children:(0,j.jsx)(za,{mode:"wait",children:w?(0,j.jsx)(Be.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(vo,{className:"h-4 w-4 text-green-600"})},"check"):(0,j.jsx)(Be.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(bf,{className:"h-4 w-4"})},"copy")})})]}),i&&s.length>0&&(0,j.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,j.jsx)(rr,{children:"Preset Colors"}),(0,j.jsx)("div",{className:"grid grid-cols-10 gap-1",children:s.map(F=>(0,j.jsx)("button",{type:"button","aria-label":`Select color ${F}`,"aria-pressed":x===F,className:P("h-7 w-7 rounded border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",x===F?"border-primary":"border-transparent"),style:{backgroundColor:F},onClick:()=>T(F)},F))})]})]})]})}function T7({value:e="#000000",onChange:t,colors:o=EF.slice(0,10),className:r,size:n="default"}){let a={sm:"h-6 w-6",default:"h-8 w-8",lg:"h-10 w-10"};return(0,j.jsx)("div",{className:P("moonui-theme","flex flex-wrap gap-2",r),children:o.map(i=>(0,j.jsx)("button",{type:"button","aria-label":`Select color ${i}`,"aria-pressed":e===i,className:P("rounded-full border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a[n],e===i?"border-primary ring-2 ring-primary/20":"border-transparent"),style:{backgroundColor:i},onClick:()=>t?.(i)},i))})}function k7({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:o}){let[r,n]=Kr.useState(e),a=(i,s)=>{let l={...r,[i]:s};n(l),t?.(l)};return(0,j.jsxs)("div",{className:P("moonui-theme","space-y-4",o),children:[(0,j.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${r.angle}deg, ${r.start}, ${r.end})`}}),(0,j.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"Start Color"}),(0,j.jsx)(Sb,{value:r.start,onChange:i=>a("start",i),size:"sm"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(rr,{children:"End Color"}),(0,j.jsx)(Sb,{value:r.end,onChange:i=>a("end",i),size:"sm"})]})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(rr,{children:"Angle"}),(0,j.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r.angle,"\xB0"]})]}),(0,j.jsx)(si,{value:[r.angle||90],onValueChange:([i])=>a("angle",i),max:360,step:1})]})]})}var ws=R(M());var AF=1,M7=.9,E7=.8,A7=.17,bb=.1,Rb=.999,D7=.9999,N7=.99,O7=/[\\\/_+.#"@\[\(\{&]/,F7=/[\\\/_+.#"@\[\(\{&]/g,_7=/[\s-]/,NF=/[\s-]/g;function Ib(e,t,o,r,n,a,i){if(a===t.length)return n===e.length?AF:N7;var s=`${n},${a}`;if(i[s]!==void 0)return i[s];for(var l=r.charAt(a),u=o.indexOf(l,n),c=0,d,f,p,g;u>=0;)d=Ib(e,t,o,r,u+1,a+1,i),d>c&&(u===n?d*=AF:O7.test(e.charAt(u-1))?(d*=E7,p=e.slice(n,u-1).match(F7),p&&n>0&&(d*=Math.pow(Rb,p.length))):_7.test(e.charAt(u-1))?(d*=M7,g=e.slice(n,u-1).match(NF),g&&n>0&&(d*=Math.pow(Rb,g.length))):(d*=A7,n>0&&(d*=Math.pow(Rb,u-n))),e.charAt(u)!==t.charAt(a)&&(d*=D7)),(d<bb&&o.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&o.charAt(u-1)!==r.charAt(a))&&(f=Ib(e,t,o,r,u+1,a+2,i),f*bb>d&&(d=f*bb)),d>c&&(c=d),u=o.indexOf(l,u+1);return i[s]=c,c}function DF(e){return e.toLowerCase().replace(NF," ")}function OF(e,t,o){return e=o&&o.length>0?`${e+" "+o.join(" ")}`:e,Ib(e,t,DF(e),DF(t),0,0,{})}var Qe=R(M(),1);var We=R(N(),1),Mx="Dialog",[FF,OLe]=Oe(Mx),[V7,Fn]=FF(Mx),_F=e=>{let{__scopeDialog:t,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=Qe.useRef(null),l=Qe.useRef(null),[u,c]=qe({prop:r,defaultProp:n??!1,onChange:a,caller:Mx});return(0,We.jsx)(V7,{scope:t,triggerRef:s,contentRef:l,contentId:Ae(),titleId:Ae(),descriptionId:Ae(),open:u,onOpenChange:c,onOpenToggle:Qe.useCallback(()=>c(d=>!d),[c]),modal:i,children:o})};_F.displayName=Mx;var VF="DialogTrigger",BF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=Fn(VF,o),a=de(t,n.triggerRef);return(0,We.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":Tb(n.open),...r,ref:a,onClick:W(e.onClick,n.onOpenToggle)})});BF.displayName=VF;var Pb="DialogPortal",[B7,HF]=FF(Pb,{forceMount:void 0}),UF=e=>{let{__scopeDialog:t,forceMount:o,children:r,container:n}=e,a=Fn(Pb,t);return(0,We.jsx)(B7,{scope:t,forceMount:o,children:Qe.Children.map(r,i=>(0,We.jsx)(st,{present:o||a.open,children:(0,We.jsx)(Sr,{asChild:!0,container:n,children:i})}))})};UF.displayName=Pb;var kx="DialogOverlay",zF=Qe.forwardRef((e,t)=>{let o=HF(kx,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=Fn(kx,e.__scopeDialog);return a.modal?(0,We.jsx)(st,{present:r||a.open,children:(0,We.jsx)(U7,{...n,ref:t})}):null});zF.displayName=kx;var H7=ur("DialogOverlay.RemoveScroll"),U7=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=Fn(kx,o);return(0,We.jsx)(ti,{as:H7,allowPinchZoom:!0,shards:[n.contentRef],children:(0,We.jsx)($.div,{"data-state":Tb(n.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Wl="DialogContent",GF=Qe.forwardRef((e,t)=>{let o=HF(Wl,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=Fn(Wl,e.__scopeDialog);return(0,We.jsx)(st,{present:r||a.open,children:a.modal?(0,We.jsx)(z7,{...n,ref:t}):(0,We.jsx)(G7,{...n,ref:t})})});GF.displayName=Wl;var z7=Qe.forwardRef((e,t)=>{let o=Fn(Wl,e.__scopeDialog),r=Qe.useRef(null),n=de(t,o.contentRef,r);return Qe.useEffect(()=>{let a=r.current;if(a)return ms(a)},[]),(0,We.jsx)(WF,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,a=>{a.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,a=>{let i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault())})}),G7=Qe.forwardRef((e,t)=>{let o=Fn(Wl,e.__scopeDialog),r=Qe.useRef(!1),n=Qe.useRef(!1);return(0,We.jsx)(WF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;o.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),WF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=Fn(Wl,o),l=Qe.useRef(null),u=de(t,l);return us(),(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(Qa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,We.jsx)(Gr,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Tb(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(W7,{titleId:s.titleId}),(0,We.jsx)(q7,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Lb="DialogTitle",jF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=Fn(Lb,o);return(0,We.jsx)($.h2,{id:n.titleId,...r,ref:t})});jF.displayName=Lb;var qF="DialogDescription",$F=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=Fn(qF,o);return(0,We.jsx)($.p,{id:n.descriptionId,...r,ref:t})});$F.displayName=qF;var KF="DialogClose",XF=Qe.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,n=Fn(KF,o);return(0,We.jsx)($.button,{type:"button",...r,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});XF.displayName=KF;function Tb(e){return e?"open":"closed"}var YF="DialogTitleWarning",[FLe,QF]=gP(YF,{contentName:Wl,titleName:Lb,docsSlug:"dialog"}),W7=({titleId:e})=>{let t=QF(YF),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
60
60
|
|
|
61
61
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
62
62
|
|
|
63
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Qe.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},G7="DialogDescriptionWarning",W7=({contentRef:e,descriptionId:t})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${XF(G7).contentName}}.`;return Qe.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Mx=OF,YF=_F,Ex=BF,am=HF,im=UF,Tb=GF,kb=jF,Mb=$F;var ee=R(M(),1);var sm='[cmdk-group=""]',Eb='[cmdk-group-items=""]',j7='[cmdk-group-heading=""]',JF='[cmdk-item=""]',ZF=`${JF}:not([aria-disabled="true"])`,Ab="cmdk-item-select",jc="data-value",q7=(e,t,o)=>DF(e,t,o),e_=ee.createContext(void 0),lm=()=>ee.useContext(e_),t_=ee.createContext(void 0),Db=()=>ee.useContext(t_),o_=ee.createContext(void 0),r_=ee.forwardRef((e,t)=>{let o=qc(()=>{var V,Q;return{search:"",value:(Q=(V=e.value)!=null?V:e.defaultValue)!=null?Q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=qc(()=>new Set),n=qc(()=>new Map),a=qc(()=>new Map),i=qc(()=>new Set),s=n_(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:g,disablePointerSelection:m=!1,vimBindings:x=!0,...h}=e,v=Ae(),y=Ae(),w=Ae(),C=ee.useRef(null),b=rK();jl(()=>{if(c!==void 0){let V=c.trim();o.current.value=V,S.emit()}},[c]),jl(()=>{b(6,_)},[]);let S=ee.useMemo(()=>({subscribe:V=>(i.current.add(V),()=>i.current.delete(V)),snapshot:()=>o.current,setState:(V,Q,oe)=>{var Y,ce,U,ne;if(!Object.is(o.current[V],Q)){if(o.current[V]=Q,V==="search")E(),T(),b(1,k);else if(V==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let he=document.getElementById(w);he?he.focus():(Y=document.getElementById(v))==null||Y.focus()}if(b(7,()=>{var he;o.current.selectedItemId=(he=D())==null?void 0:he.id,S.emit()}),oe||b(5,_),((ce=s.current)==null?void 0:ce.value)!==void 0){let he=Q??"";(ne=(U=s.current).onValueChange)==null||ne.call(U,he);return}}S.emit()}},emit:()=>{i.current.forEach(V=>V())}}),[]),I=ee.useMemo(()=>({value:(V,Q,oe)=>{var Y;Q!==((Y=a.current.get(V))==null?void 0:Y.value)&&(a.current.set(V,{value:Q,keywords:oe}),o.current.filtered.items.set(V,L(Q,oe)),b(2,()=>{T(),S.emit()}))},item:(V,Q)=>(r.current.add(V),Q&&(n.current.has(Q)?n.current.get(Q).add(V):n.current.set(Q,new Set([V]))),b(3,()=>{E(),T(),o.current.value||k(),S.emit()}),()=>{a.current.delete(V),r.current.delete(V),o.current.filtered.items.delete(V);let oe=D();b(4,()=>{E(),oe?.getAttribute("id")===V&&k(),S.emit()})}),group:V=>(n.current.has(V)||n.current.set(V,new Set),()=>{a.current.delete(V),n.current.delete(V)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:w,labelId:y,listInnerRef:C}),[]);function L(V,Q){var oe,Y;let ce=(Y=(oe=s.current)==null?void 0:oe.filter)!=null?Y:q7;return V?ce(V,o.current.search,Q):0}function T(){if(!o.current.search||s.current.shouldFilter===!1)return;let V=o.current.filtered.items,Q=[];o.current.filtered.groups.forEach(Y=>{let ce=n.current.get(Y),U=0;ce.forEach(ne=>{let he=V.get(ne);U=Math.max(he,U)}),Q.push([Y,U])});let oe=C.current;z().sort((Y,ce)=>{var U,ne;let he=Y.getAttribute("id"),xe=ce.getAttribute("id");return((U=V.get(xe))!=null?U:0)-((ne=V.get(he))!=null?ne:0)}).forEach(Y=>{let ce=Y.closest(Eb);ce?ce.appendChild(Y.parentElement===ce?Y:Y.closest(`${Eb} > *`)):oe.appendChild(Y.parentElement===oe?Y:Y.closest(`${Eb} > *`))}),Q.sort((Y,ce)=>ce[1]-Y[1]).forEach(Y=>{var ce;let U=(ce=C.current)==null?void 0:ce.querySelector(`${sm}[${jc}="${encodeURIComponent(Y[0])}"]`);U?.parentElement.appendChild(U)})}function k(){let V=z().find(oe=>oe.getAttribute("aria-disabled")!=="true"),Q=V?.getAttribute(jc);S.setState("value",Q||void 0)}function E(){var V,Q,oe,Y;if(!o.current.search||s.current.shouldFilter===!1){o.current.filtered.count=r.current.size;return}o.current.filtered.groups=new Set;let ce=0;for(let U of r.current){let ne=(Q=(V=a.current.get(U))==null?void 0:V.value)!=null?Q:"",he=(Y=(oe=a.current.get(U))==null?void 0:oe.keywords)!=null?Y:[],xe=L(ne,he);o.current.filtered.items.set(U,xe),xe>0&&ce++}for(let[U,ne]of n.current)for(let he of ne)if(o.current.filtered.items.get(he)>0){o.current.filtered.groups.add(U);break}o.current.filtered.count=ce}function _(){var V,Q,oe;let Y=D();Y&&(((V=Y.parentElement)==null?void 0:V.firstChild)===Y&&((oe=(Q=Y.closest(sm))==null?void 0:Q.querySelector(j7))==null||oe.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function D(){var V;return(V=C.current)==null?void 0:V.querySelector(`${JF}[aria-selected="true"]`)}function z(){var V;return Array.from(((V=C.current)==null?void 0:V.querySelectorAll(ZF))||[])}function F(V){let Q=z()[V];Q&&S.setState("value",Q.getAttribute(jc))}function O(V){var Q;let oe=D(),Y=z(),ce=Y.findIndex(ne=>ne===oe),U=Y[ce+V];(Q=s.current)!=null&&Q.loop&&(U=ce+V<0?Y[Y.length-1]:ce+V===Y.length?Y[0]:Y[ce+V]),U&&S.setState("value",U.getAttribute(jc))}function B(V){let Q=D(),oe=Q?.closest(sm),Y;for(;oe&&!Y;)oe=V>0?tK(oe,sm):oK(oe,sm),Y=oe?.querySelector(ZF);Y?S.setState("value",Y.getAttribute(jc)):O(V)}let A=()=>F(z().length-1),te=V=>{V.preventDefault(),V.metaKey?A():V.altKey?B(1):O(1)},ae=V=>{V.preventDefault(),V.metaKey?F(0):V.altKey?B(-1):O(-1)};return ee.createElement($.div,{ref:t,tabIndex:-1,...h,"cmdk-root":"",onKeyDown:V=>{var Q;(Q=h.onKeyDown)==null||Q.call(h,V);let oe=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||oe))switch(V.key){case"n":case"j":{x&&V.ctrlKey&&te(V);break}case"ArrowDown":{te(V);break}case"p":case"k":{x&&V.ctrlKey&&ae(V);break}case"ArrowUp":{ae(V);break}case"Home":{V.preventDefault(),F(0);break}case"End":{V.preventDefault(),A();break}case"Enter":{V.preventDefault();let Y=D();if(Y){let ce=new Event(Ab);Y.dispatchEvent(ce)}}}}},ee.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:aK},l),Ax(e,V=>ee.createElement(t_.Provider,{value:S},ee.createElement(e_.Provider,{value:I},V))))}),$7=ee.forwardRef((e,t)=>{var o,r;let n=Ae(),a=ee.useRef(null),i=ee.useContext(o_),s=lm(),l=n_(e),u=(r=(o=l.current)==null?void 0:o.forceMount)!=null?r:i?.forceMount;jl(()=>{if(!u)return s.item(n,i?.id)},[u]);let c=a_(n,a,[e.value,e.children,a],e.keywords),d=Db(),f=xs(b=>b.value&&b.value===c.current),p=xs(b=>u||s.filter()===!1?!0:b.search?b.filtered.items.get(n)>0:!0);ee.useEffect(()=>{let b=a.current;if(!(!b||e.disabled))return b.addEventListener(Ab,g),()=>b.removeEventListener(Ab,g)},[p,e.onSelect,e.disabled]);function g(){var b,S;m(),(S=(b=l.current).onSelect)==null||S.call(b,c.current)}function m(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:x,value:h,onSelect:v,forceMount:y,keywords:w,...C}=e;return ee.createElement($.div,{ref:lr(a,t),...C,id:n,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!f,"data-disabled":!!x,"data-selected":!!f,onPointerMove:x||s.getDisablePointerSelection()?void 0:m,onClick:x?void 0:g},e.children)}),K7=ee.forwardRef((e,t)=>{let{heading:o,children:r,forceMount:n,...a}=e,i=Ae(),s=ee.useRef(null),l=ee.useRef(null),u=Ae(),c=lm(),d=xs(p=>n||c.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);jl(()=>c.group(i),[]),a_(i,s,[e.value,e.heading,l]);let f=ee.useMemo(()=>({id:i,forceMount:n}),[n]);return ee.createElement($.div,{ref:lr(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},o&&ee.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},o),Ax(e,p=>ee.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?u:void 0},ee.createElement(o_.Provider,{value:f},p))))}),X7=ee.forwardRef((e,t)=>{let{alwaysRender:o,...r}=e,n=ee.useRef(null),a=xs(i=>!i.search);return!o&&!a?null:ee.createElement($.div,{ref:lr(n,t),...r,"cmdk-separator":"",role:"separator"})}),Y7=ee.forwardRef((e,t)=>{let{onValueChange:o,...r}=e,n=e.value!=null,a=Db(),i=xs(u=>u.search),s=xs(u=>u.selectedItemId),l=lm();return ee.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),ee.createElement($.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:n?e.value:i,onChange:u=>{n||a.setState("search",u.target.value),o?.(u.target.value)}})}),Q7=ee.forwardRef((e,t)=>{let{children:o,label:r="Suggestions",...n}=e,a=ee.useRef(null),i=ee.useRef(null),s=xs(u=>u.selectedItemId),l=lm();return ee.useEffect(()=>{if(i.current&&a.current){let u=i.current,c=a.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=u.offsetHeight;c.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(u),()=>{cancelAnimationFrame(d),f.unobserve(u)}}},[]),ee.createElement($.div,{ref:lr(a,t),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},Ax(e,u=>ee.createElement("div",{ref:lr(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),Z7=ee.forwardRef((e,t)=>{let{open:o,onOpenChange:r,overlayClassName:n,contentClassName:a,container:i,...s}=e;return ee.createElement(Mx,{open:o,onOpenChange:r},ee.createElement(Ex,{container:i},ee.createElement(am,{"cmdk-overlay":"",className:n}),ee.createElement(im,{"aria-label":e.label,"cmdk-dialog":"",className:a},ee.createElement(r_,{ref:t,...s}))))}),J7=ee.forwardRef((e,t)=>xs(o=>o.filtered.count===0)?ee.createElement($.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),eK=ee.forwardRef((e,t)=>{let{progress:o,children:r,label:n="Loading...",...a}=e;return ee.createElement($.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},Ax(e,i=>ee.createElement("div",{"aria-hidden":!0},i)))}),ys=Object.assign(r_,{List:Q7,Item:$7,Input:Y7,Group:K7,Separator:X7,Dialog:Z7,Empty:J7,Loading:eK});function tK(e,t){let o=e.nextElementSibling;for(;o;){if(o.matches(t))return o;o=o.nextElementSibling}}function oK(e,t){let o=e.previousElementSibling;for(;o;){if(o.matches(t))return o;o=o.previousElementSibling}}function n_(e){let t=ee.useRef(e);return jl(()=>{t.current=e}),t}var jl=typeof window>"u"?ee.useEffect:ee.useLayoutEffect;function qc(e){let t=ee.useRef();return t.current===void 0&&(t.current=e()),t}function xs(e){let t=Db(),o=()=>e(t.snapshot());return ee.useSyncExternalStore(t.subscribe,o,o)}function a_(e,t,o,r=[]){let n=ee.useRef(),a=lm();return jl(()=>{var i;let s=(()=>{var u;for(let c of o){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():n.current}})(),l=r.map(u=>u.trim());a.value(e,s,l),(i=t.current)==null||i.setAttribute(jc,s),n.current=s}),n}var rK=()=>{let[e,t]=ee.useState(),o=qc(()=>new Map);return jl(()=>{o.current.forEach(r=>r()),o.current=new Map},[e]),(r,n)=>{o.current.set(r,n),t({})}};function nK(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Ax({asChild:e,children:t},o){return e&&ee.isValidElement(t)?ee.cloneElement(nK(t),{ref:t.ref},o(t.props.children)):o(t)}var aK={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var $c=R(M());var wt=R(N()),Nb=Mx,iK=YF,sK=Ex,lK=Mb,uK=K("fixed inset-0 z-50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",{variants:{variant:{default:"bg-black/80",subtle:"bg-black/60",blur:"bg-black/40 backdrop-blur-md",minimal:"bg-black/20 backdrop-blur-sm"},animation:{default:"duration-200",slow:"duration-300",fast:"duration-100"}},defaultVariants:{variant:"default",animation:"default"}}),i_=$c.forwardRef(({className:e,variant:t,animation:o,...r},n)=>(0,wt.jsx)(am,{ref:n,className:P("moonui-theme",uK({variant:t,animation:o}),e),...r}));i_.displayName=am.displayName;var cK=K("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg",{variants:{variant:{default:"border-gray-200 dark:border-gray-700",primary:"border-primary/20 dark:border-primary/30",secondary:"border-gray-300 dark:border-gray-600",ghost:"border-transparent shadow-xl",destructive:"border-error/20 dark:border-error/30"},size:{xs:"max-w-xs p-4",sm:"max-w-sm p-5",default:"max-w-lg p-6",md:"max-w-md p-6",lg:"max-w-2xl p-7",xl:"max-w-4xl p-8",full:"max-w-[95vw] max-h-[95vh] p-6"},radius:{none:"rounded-none",sm:"rounded-md",default:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-3xl"},animation:{default:"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",fade:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",zoom:"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",slide:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",none:""},position:{default:"top-[50%]",top:"top-[5%]",bottom:"bottom-[5%] top-auto translate-y-0"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default",position:"default"}}),Dx=$c.forwardRef(({className:e,children:t,variant:o,size:r,radius:n,animation:a,position:i,overlayVariant:s="default",overlayAnimation:l="default",hideCloseButton:u=!1,title:c,description:d,icon:f,loading:p=!1,success:g=!1,onClose:m,...x},h)=>{let v=()=>{m&&m()};return(0,wt.jsxs)(sK,{children:[(0,wt.jsx)(i_,{variant:s,animation:l,onClick:u?void 0:v}),(0,wt.jsxs)(im,{ref:h,onEscapeKeyDown:u?void 0:v,onInteractOutside:u?void 0:v,className:P(cK({variant:o,size:r,radius:n,animation:a,position:i}),"outline-none",p&&"pointer-events-none",g&&"border-success/40",e),...x,children:[(c||d||f)&&(0,wt.jsxs)(Ob,{className:"flex gap-4",children:[(f||p||g)&&(0,wt.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,wt.jsx)(Vt,{className:"h-5 w-5 animate-spin text-primary"}),g&&(0,wt.jsx)(vo,{className:"h-5 w-5 text-success"}),!p&&!g&&f&&(0,wt.jsx)("span",{className:"text-primary",children:f})]}),(0,wt.jsxs)("div",{className:"flex-1",children:[c&&(0,wt.jsx)(um,{children:c}),d&&(0,wt.jsx)(Fb,{children:d})]})]}),t,!u&&(0,wt.jsxs)(Mb,{onClick:v,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:ring-offset-2 disabled:pointer-events-none dark:text-gray-300 dark:hover:text-white",children:[(0,wt.jsx)(hr,{className:"h-4 w-4"}),(0,wt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});Dx.displayName=im.displayName;var Ob=({className:e,...t})=>(0,wt.jsx)("div",{className:P("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ob.displayName="DialogHeader";var s_=({className:e,...t})=>(0,wt.jsx)("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});s_.displayName="DialogFooter";var um=$c.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(Tb,{ref:o,className:P("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));um.displayName=Tb.displayName;var Fb=$c.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(kb,{ref:o,className:P("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));Fb.displayName=kb.displayName;var dK=$c.forwardRef(({className:e,...t},o)=>(0,wt.jsx)("form",{ref:o,className:P("moonui-theme","flex flex-col gap-4",e),...t}));dK.displayName="DialogForm";var Io=R(N()),fK=K("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",{variants:{variant:{default:"bg-popover text-popover-foreground",glass:"bg-background/80 text-foreground backdrop-blur-sm",bordered:"bg-popover text-popover-foreground border border-border"},size:{sm:"min-h-[200px]",default:"min-h-[300px]",lg:"min-h-[400px]"}},defaultVariants:{variant:"default",size:"default"}}),_b=ws.forwardRef(({className:e,variant:t,size:o,...r},n)=>(0,Io.jsx)(ys,{ref:n,className:P("moonui-theme",fK({variant:t,size:o}),e),...r}));_b.displayName="Command";var pK=({children:e,commandClassName:t,...o})=>(0,Io.jsx)(Nb,{...o,children:(0,Io.jsxs)(Dx,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,Io.jsx)(um,{className:"sr-only",children:"Command Menu"}),(0,Io.jsx)(_b,{className:P("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",t),children:e})]})}),l_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Io.jsx)(nl,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,Io.jsx)(ys.Input,{ref:o,className:P("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));l_.displayName="CommandInput";var u_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsx)(ys.List,{ref:o,className:P("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));u_.displayName="CommandList";var c_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsx)(ys.Empty,{ref:o,className:P("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));c_.displayName="CommandEmpty";var d_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsx)(ys.Group,{ref:o,className:P("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));d_.displayName="CommandGroup";var f_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsx)(ys.Separator,{ref:o,className:P("moonui-theme","-mx-1 h-px bg-border",e),...t}));f_.displayName="CommandSeparator";var p_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsx)(ys.Item,{ref:o,className:P("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}));p_.displayName="CommandItem";var m_=({className:e,...t})=>(0,Io.jsx)("span",{className:P("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});m_.displayName="CommandShortcut";var tR=R(M());var fm=R(M(),1);function Cs(e,t){return typeof e=="function"?e(t):e}function br(e,t){return o=>{t.setState(r=>({...r,[e]:Cs(o,r[e])}))}}function _x(e){return e instanceof Function}function mK(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function gK(e,t){let o=[],r=n=>{n.forEach(a=>{o.push(a);let i=t(a);i!=null&&i.length&&r(i)})};return r(e),o}function me(e,t,o){let r=[],n;return a=>{let i;o.key&&o.debug&&(i=Date.now());let s=e(a);if(!(s.length!==r.length||s.some((c,d)=>r[d]!==c)))return n;r=s;let u;if(o.key&&o.debug&&(u=Date.now()),n=t(...s),o==null||o.onChange==null||o.onChange(n),o.key&&o.debug&&o!=null&&o.debug()){let c=Math.round((Date.now()-i)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,p=(g,m)=>{for(g=String(g);g.length<m;)g=" "+g;return g};console.info(`%c\u23F1 ${p(d,5)} /${p(c,5)} ms`,`
|
|
63
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Qe.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},j7="DialogDescriptionWarning",q7=({contentRef:e,descriptionId:t})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${QF(j7).contentName}}.`;return Qe.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ex=_F,ZF=BF,Ax=UF,im=zF,sm=GF,kb=jF,Mb=$F,Eb=XF;var ee=R(M(),1);var lm='[cmdk-group=""]',Ab='[cmdk-group-items=""]',$7='[cmdk-group-heading=""]',t_='[cmdk-item=""]',e_=`${t_}:not([aria-disabled="true"])`,Db="cmdk-item-select",jc="data-value",K7=(e,t,o)=>OF(e,t,o),o_=ee.createContext(void 0),um=()=>ee.useContext(o_),r_=ee.createContext(void 0),Nb=()=>ee.useContext(r_),n_=ee.createContext(void 0),a_=ee.forwardRef((e,t)=>{let o=qc(()=>{var V,Q;return{search:"",value:(Q=(V=e.value)!=null?V:e.defaultValue)!=null?Q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=qc(()=>new Set),n=qc(()=>new Map),a=qc(()=>new Map),i=qc(()=>new Set),s=i_(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:g,disablePointerSelection:m=!1,vimBindings:x=!0,...h}=e,v=Ae(),y=Ae(),w=Ae(),C=ee.useRef(null),b=aK();jl(()=>{if(c!==void 0){let V=c.trim();o.current.value=V,S.emit()}},[c]),jl(()=>{b(6,_)},[]);let S=ee.useMemo(()=>({subscribe:V=>(i.current.add(V),()=>i.current.delete(V)),snapshot:()=>o.current,setState:(V,Q,oe)=>{var Y,ce,U,ne;if(!Object.is(o.current[V],Q)){if(o.current[V]=Q,V==="search")E(),T(),b(1,k);else if(V==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let he=document.getElementById(w);he?he.focus():(Y=document.getElementById(v))==null||Y.focus()}if(b(7,()=>{var he;o.current.selectedItemId=(he=D())==null?void 0:he.id,S.emit()}),oe||b(5,_),((ce=s.current)==null?void 0:ce.value)!==void 0){let he=Q??"";(ne=(U=s.current).onValueChange)==null||ne.call(U,he);return}}S.emit()}},emit:()=>{i.current.forEach(V=>V())}}),[]),I=ee.useMemo(()=>({value:(V,Q,oe)=>{var Y;Q!==((Y=a.current.get(V))==null?void 0:Y.value)&&(a.current.set(V,{value:Q,keywords:oe}),o.current.filtered.items.set(V,L(Q,oe)),b(2,()=>{T(),S.emit()}))},item:(V,Q)=>(r.current.add(V),Q&&(n.current.has(Q)?n.current.get(Q).add(V):n.current.set(Q,new Set([V]))),b(3,()=>{E(),T(),o.current.value||k(),S.emit()}),()=>{a.current.delete(V),r.current.delete(V),o.current.filtered.items.delete(V);let oe=D();b(4,()=>{E(),oe?.getAttribute("id")===V&&k(),S.emit()})}),group:V=>(n.current.has(V)||n.current.set(V,new Set),()=>{a.current.delete(V),n.current.delete(V)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:w,labelId:y,listInnerRef:C}),[]);function L(V,Q){var oe,Y;let ce=(Y=(oe=s.current)==null?void 0:oe.filter)!=null?Y:K7;return V?ce(V,o.current.search,Q):0}function T(){if(!o.current.search||s.current.shouldFilter===!1)return;let V=o.current.filtered.items,Q=[];o.current.filtered.groups.forEach(Y=>{let ce=n.current.get(Y),U=0;ce.forEach(ne=>{let he=V.get(ne);U=Math.max(he,U)}),Q.push([Y,U])});let oe=C.current;z().sort((Y,ce)=>{var U,ne;let he=Y.getAttribute("id"),xe=ce.getAttribute("id");return((U=V.get(xe))!=null?U:0)-((ne=V.get(he))!=null?ne:0)}).forEach(Y=>{let ce=Y.closest(Ab);ce?ce.appendChild(Y.parentElement===ce?Y:Y.closest(`${Ab} > *`)):oe.appendChild(Y.parentElement===oe?Y:Y.closest(`${Ab} > *`))}),Q.sort((Y,ce)=>ce[1]-Y[1]).forEach(Y=>{var ce;let U=(ce=C.current)==null?void 0:ce.querySelector(`${lm}[${jc}="${encodeURIComponent(Y[0])}"]`);U?.parentElement.appendChild(U)})}function k(){let V=z().find(oe=>oe.getAttribute("aria-disabled")!=="true"),Q=V?.getAttribute(jc);S.setState("value",Q||void 0)}function E(){var V,Q,oe,Y;if(!o.current.search||s.current.shouldFilter===!1){o.current.filtered.count=r.current.size;return}o.current.filtered.groups=new Set;let ce=0;for(let U of r.current){let ne=(Q=(V=a.current.get(U))==null?void 0:V.value)!=null?Q:"",he=(Y=(oe=a.current.get(U))==null?void 0:oe.keywords)!=null?Y:[],xe=L(ne,he);o.current.filtered.items.set(U,xe),xe>0&&ce++}for(let[U,ne]of n.current)for(let he of ne)if(o.current.filtered.items.get(he)>0){o.current.filtered.groups.add(U);break}o.current.filtered.count=ce}function _(){var V,Q,oe;let Y=D();Y&&(((V=Y.parentElement)==null?void 0:V.firstChild)===Y&&((oe=(Q=Y.closest(lm))==null?void 0:Q.querySelector($7))==null||oe.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function D(){var V;return(V=C.current)==null?void 0:V.querySelector(`${t_}[aria-selected="true"]`)}function z(){var V;return Array.from(((V=C.current)==null?void 0:V.querySelectorAll(e_))||[])}function F(V){let Q=z()[V];Q&&S.setState("value",Q.getAttribute(jc))}function O(V){var Q;let oe=D(),Y=z(),ce=Y.findIndex(ne=>ne===oe),U=Y[ce+V];(Q=s.current)!=null&&Q.loop&&(U=ce+V<0?Y[Y.length-1]:ce+V===Y.length?Y[0]:Y[ce+V]),U&&S.setState("value",U.getAttribute(jc))}function B(V){let Q=D(),oe=Q?.closest(lm),Y;for(;oe&&!Y;)oe=V>0?rK(oe,lm):nK(oe,lm),Y=oe?.querySelector(e_);Y?S.setState("value",Y.getAttribute(jc)):O(V)}let A=()=>F(z().length-1),te=V=>{V.preventDefault(),V.metaKey?A():V.altKey?B(1):O(1)},ae=V=>{V.preventDefault(),V.metaKey?F(0):V.altKey?B(-1):O(-1)};return ee.createElement($.div,{ref:t,tabIndex:-1,...h,"cmdk-root":"",onKeyDown:V=>{var Q;(Q=h.onKeyDown)==null||Q.call(h,V);let oe=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||oe))switch(V.key){case"n":case"j":{x&&V.ctrlKey&&te(V);break}case"ArrowDown":{te(V);break}case"p":case"k":{x&&V.ctrlKey&&ae(V);break}case"ArrowUp":{ae(V);break}case"Home":{V.preventDefault(),F(0);break}case"End":{V.preventDefault(),A();break}case"Enter":{V.preventDefault();let Y=D();if(Y){let ce=new Event(Db);Y.dispatchEvent(ce)}}}}},ee.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:sK},l),Dx(e,V=>ee.createElement(r_.Provider,{value:S},ee.createElement(o_.Provider,{value:I},V))))}),X7=ee.forwardRef((e,t)=>{var o,r;let n=Ae(),a=ee.useRef(null),i=ee.useContext(n_),s=um(),l=i_(e),u=(r=(o=l.current)==null?void 0:o.forceMount)!=null?r:i?.forceMount;jl(()=>{if(!u)return s.item(n,i?.id)},[u]);let c=s_(n,a,[e.value,e.children,a],e.keywords),d=Nb(),f=xs(b=>b.value&&b.value===c.current),p=xs(b=>u||s.filter()===!1?!0:b.search?b.filtered.items.get(n)>0:!0);ee.useEffect(()=>{let b=a.current;if(!(!b||e.disabled))return b.addEventListener(Db,g),()=>b.removeEventListener(Db,g)},[p,e.onSelect,e.disabled]);function g(){var b,S;m(),(S=(b=l.current).onSelect)==null||S.call(b,c.current)}function m(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:x,value:h,onSelect:v,forceMount:y,keywords:w,...C}=e;return ee.createElement($.div,{ref:lr(a,t),...C,id:n,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!f,"data-disabled":!!x,"data-selected":!!f,onPointerMove:x||s.getDisablePointerSelection()?void 0:m,onClick:x?void 0:g},e.children)}),Y7=ee.forwardRef((e,t)=>{let{heading:o,children:r,forceMount:n,...a}=e,i=Ae(),s=ee.useRef(null),l=ee.useRef(null),u=Ae(),c=um(),d=xs(p=>n||c.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);jl(()=>c.group(i),[]),s_(i,s,[e.value,e.heading,l]);let f=ee.useMemo(()=>({id:i,forceMount:n}),[n]);return ee.createElement($.div,{ref:lr(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},o&&ee.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},o),Dx(e,p=>ee.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?u:void 0},ee.createElement(n_.Provider,{value:f},p))))}),Q7=ee.forwardRef((e,t)=>{let{alwaysRender:o,...r}=e,n=ee.useRef(null),a=xs(i=>!i.search);return!o&&!a?null:ee.createElement($.div,{ref:lr(n,t),...r,"cmdk-separator":"",role:"separator"})}),Z7=ee.forwardRef((e,t)=>{let{onValueChange:o,...r}=e,n=e.value!=null,a=Nb(),i=xs(u=>u.search),s=xs(u=>u.selectedItemId),l=um();return ee.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),ee.createElement($.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:n?e.value:i,onChange:u=>{n||a.setState("search",u.target.value),o?.(u.target.value)}})}),J7=ee.forwardRef((e,t)=>{let{children:o,label:r="Suggestions",...n}=e,a=ee.useRef(null),i=ee.useRef(null),s=xs(u=>u.selectedItemId),l=um();return ee.useEffect(()=>{if(i.current&&a.current){let u=i.current,c=a.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=u.offsetHeight;c.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(u),()=>{cancelAnimationFrame(d),f.unobserve(u)}}},[]),ee.createElement($.div,{ref:lr(a,t),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},Dx(e,u=>ee.createElement("div",{ref:lr(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),eK=ee.forwardRef((e,t)=>{let{open:o,onOpenChange:r,overlayClassName:n,contentClassName:a,container:i,...s}=e;return ee.createElement(Ex,{open:o,onOpenChange:r},ee.createElement(Ax,{container:i},ee.createElement(im,{"cmdk-overlay":"",className:n}),ee.createElement(sm,{"aria-label":e.label,"cmdk-dialog":"",className:a},ee.createElement(a_,{ref:t,...s}))))}),tK=ee.forwardRef((e,t)=>xs(o=>o.filtered.count===0)?ee.createElement($.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),oK=ee.forwardRef((e,t)=>{let{progress:o,children:r,label:n="Loading...",...a}=e;return ee.createElement($.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},Dx(e,i=>ee.createElement("div",{"aria-hidden":!0},i)))}),ys=Object.assign(a_,{List:J7,Item:X7,Input:Z7,Group:Y7,Separator:Q7,Dialog:eK,Empty:tK,Loading:oK});function rK(e,t){let o=e.nextElementSibling;for(;o;){if(o.matches(t))return o;o=o.nextElementSibling}}function nK(e,t){let o=e.previousElementSibling;for(;o;){if(o.matches(t))return o;o=o.previousElementSibling}}function i_(e){let t=ee.useRef(e);return jl(()=>{t.current=e}),t}var jl=typeof window>"u"?ee.useEffect:ee.useLayoutEffect;function qc(e){let t=ee.useRef();return t.current===void 0&&(t.current=e()),t}function xs(e){let t=Nb(),o=()=>e(t.snapshot());return ee.useSyncExternalStore(t.subscribe,o,o)}function s_(e,t,o,r=[]){let n=ee.useRef(),a=um();return jl(()=>{var i;let s=(()=>{var u;for(let c of o){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():n.current}})(),l=r.map(u=>u.trim());a.value(e,s,l),(i=t.current)==null||i.setAttribute(jc,s),n.current=s}),n}var aK=()=>{let[e,t]=ee.useState(),o=qc(()=>new Map);return jl(()=>{o.current.forEach(r=>r()),o.current=new Map},[e]),(r,n)=>{o.current.set(r,n),t({})}};function iK(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Dx({asChild:e,children:t},o){return e&&ee.isValidElement(t)?ee.cloneElement(iK(t),{ref:t.ref},o(t.props.children)):o(t)}var sK={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var $c=R(M());var wt=R(N()),Ob=Ex,lK=ZF,uK=Ax,cK=Eb,dK=K("fixed inset-0 z-50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",{variants:{variant:{default:"bg-black/80",subtle:"bg-black/60",blur:"bg-black/40 backdrop-blur-md",minimal:"bg-black/20 backdrop-blur-sm"},animation:{default:"duration-200",slow:"duration-300",fast:"duration-100"}},defaultVariants:{variant:"default",animation:"default"}}),l_=$c.forwardRef(({className:e,variant:t,animation:o,...r},n)=>(0,wt.jsx)(im,{ref:n,className:P("moonui-theme",dK({variant:t,animation:o}),e),...r}));l_.displayName=im.displayName;var fK=K("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg",{variants:{variant:{default:"border-gray-200 dark:border-gray-700",primary:"border-primary/20 dark:border-primary/30",secondary:"border-gray-300 dark:border-gray-600",ghost:"border-transparent shadow-xl",destructive:"border-error/20 dark:border-error/30"},size:{xs:"max-w-xs p-4",sm:"max-w-sm p-5",default:"max-w-lg p-6",md:"max-w-md p-6",lg:"max-w-2xl p-7",xl:"max-w-4xl p-8",full:"max-w-[95vw] max-h-[95vh] p-6"},radius:{none:"rounded-none",sm:"rounded-md",default:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-3xl"},animation:{default:"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",fade:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",zoom:"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",slide:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",none:""},position:{default:"top-[50%]",top:"top-[5%]",bottom:"bottom-[5%] top-auto translate-y-0"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default",position:"default"}}),Nx=$c.forwardRef(({className:e,children:t,variant:o,size:r,radius:n,animation:a,position:i,overlayVariant:s="default",overlayAnimation:l="default",hideCloseButton:u=!1,title:c,description:d,icon:f,loading:p=!1,success:g=!1,onClose:m,...x},h)=>{let v=()=>{m&&m()};return(0,wt.jsxs)(uK,{children:[(0,wt.jsx)(l_,{variant:s,animation:l,onClick:u?void 0:v}),(0,wt.jsxs)(sm,{ref:h,onEscapeKeyDown:u?void 0:v,onInteractOutside:u?void 0:v,className:P(fK({variant:o,size:r,radius:n,animation:a,position:i}),"outline-none",p&&"pointer-events-none",g&&"border-success/40",e),...x,children:[(c||d||f)&&(0,wt.jsxs)(Fb,{className:"flex gap-4",children:[(f||p||g)&&(0,wt.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,wt.jsx)(Vt,{className:"h-5 w-5 animate-spin text-primary"}),g&&(0,wt.jsx)(vo,{className:"h-5 w-5 text-success"}),!p&&!g&&f&&(0,wt.jsx)("span",{className:"text-primary",children:f})]}),(0,wt.jsxs)("div",{className:"flex-1",children:[c&&(0,wt.jsx)(cm,{children:c}),d&&(0,wt.jsx)(_b,{children:d})]})]}),t,!u&&(0,wt.jsxs)(Eb,{onClick:v,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:ring-offset-2 disabled:pointer-events-none dark:text-gray-300 dark:hover:text-white",children:[(0,wt.jsx)(hr,{className:"h-4 w-4"}),(0,wt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});Nx.displayName=sm.displayName;var Fb=({className:e,...t})=>(0,wt.jsx)("div",{className:P("flex flex-col space-y-2 text-center sm:text-left",e),...t});Fb.displayName="DialogHeader";var u_=({className:e,...t})=>(0,wt.jsx)("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});u_.displayName="DialogFooter";var cm=$c.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(kb,{ref:o,className:P("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));cm.displayName=kb.displayName;var _b=$c.forwardRef(({className:e,...t},o)=>(0,wt.jsx)(Mb,{ref:o,className:P("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));_b.displayName=Mb.displayName;var pK=$c.forwardRef(({className:e,...t},o)=>(0,wt.jsx)("form",{ref:o,className:P("moonui-theme","flex flex-col gap-4",e),...t}));pK.displayName="DialogForm";var Io=R(N()),mK=K("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",{variants:{variant:{default:"bg-popover text-popover-foreground",glass:"bg-background/80 text-foreground backdrop-blur-sm",bordered:"bg-popover text-popover-foreground border border-border"},size:{sm:"min-h-[200px]",default:"min-h-[300px]",lg:"min-h-[400px]"}},defaultVariants:{variant:"default",size:"default"}}),Vb=ws.forwardRef(({className:e,variant:t,size:o,...r},n)=>(0,Io.jsx)(ys,{ref:n,className:P("moonui-theme",mK({variant:t,size:o}),e),...r}));Vb.displayName="Command";var gK=({children:e,commandClassName:t,...o})=>(0,Io.jsx)(Ob,{...o,children:(0,Io.jsxs)(Nx,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,Io.jsx)(cm,{className:"sr-only",children:"Command Menu"}),(0,Io.jsx)(Vb,{className:P("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",t),children:e})]})}),c_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Io.jsx)(nl,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,Io.jsx)(ys.Input,{ref:o,className:P("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));c_.displayName="CommandInput";var d_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsx)(ys.List,{ref:o,className:P("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));d_.displayName="CommandList";var f_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsx)(ys.Empty,{ref:o,className:P("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));f_.displayName="CommandEmpty";var p_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsx)(ys.Group,{ref:o,className:P("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));p_.displayName="CommandGroup";var m_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsx)(ys.Separator,{ref:o,className:P("moonui-theme","-mx-1 h-px bg-border",e),...t}));m_.displayName="CommandSeparator";var g_=ws.forwardRef(({className:e,...t},o)=>(0,Io.jsx)(ys.Item,{ref:o,className:P("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}));g_.displayName="CommandItem";var h_=({className:e,...t})=>(0,Io.jsx)("span",{className:P("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});h_.displayName="CommandShortcut";var oR=R(M());var pm=R(M(),1);function Cs(e,t){return typeof e=="function"?e(t):e}function br(e,t){return o=>{t.setState(r=>({...r,[e]:Cs(o,r[e])}))}}function Vx(e){return e instanceof Function}function hK(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function vK(e,t){let o=[],r=n=>{n.forEach(a=>{o.push(a);let i=t(a);i!=null&&i.length&&r(i)})};return r(e),o}function me(e,t,o){let r=[],n;return a=>{let i;o.key&&o.debug&&(i=Date.now());let s=e(a);if(!(s.length!==r.length||s.some((c,d)=>r[d]!==c)))return n;r=s;let u;if(o.key&&o.debug&&(u=Date.now()),n=t(...s),o==null||o.onChange==null||o.onChange(n),o.key&&o.debug&&o!=null&&o.debug()){let c=Math.round((Date.now()-i)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,p=(g,m)=>{for(g=String(g);g.length<m;)g=" "+g;return g};console.info(`%c\u23F1 ${p(d,5)} /${p(c,5)} ms`,`
|
|
64
64
|
font-size: .6rem;
|
|
65
65
|
font-weight: bold;
|
|
66
|
-
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,o?.key)}return n}}function ge(e,t,o,r){return{debug:()=>{var n;return(n=e?.debugAll)!=null?n:e[t]},key:!1,onChange:r}}function hK(e,t,o,r){let n=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${o.id}`,row:t,column:o,getValue:()=>t.getValue(r),renderValue:n,getContext:me(()=>[e,o,t,a],(i,s,l,u)=>({table:i,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),ge(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,o,t,e)},{}),a}function vK(e,t,o,r){var n,a;let s={...e._getDefaultColumnDef(),...t},l=s.accessorKey,u=(n=(a=s.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?n:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:l&&(l.includes(".")?c=f=>{let p=f;for(let m of l.split(".")){var g;p=(g=p)==null?void 0:g[m]}return p}:c=f=>f[s.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:r,depth:o,columnDef:s,columns:[],getFlatColumns:me(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},ge(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:me(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=d.columns)!=null&&p.length){let g=d.columns.flatMap(m=>m.getLeafColumns());return f(g)}return[d]},ge(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var Po="debugHeaders";function g_(e,t,o){var r;let a={id:(r=o.id)!=null?r:t.id,column:t,index:o.index,isPlaceholder:!!o.isPlaceholder,placeholderId:o.placeholderId,depth:o.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let i=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),i.push(l)};return s(a),i},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}var xK={createTable:e=>{e.getHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,n)=>{var a,i;let s=(a=r?.map(d=>o.find(f=>f.id===d)).filter(Boolean))!=null?a:[],l=(i=n?.map(d=>o.find(f=>f.id===d)).filter(Boolean))!=null?i:[],u=o.filter(d=>!(r!=null&&r.includes(d.id))&&!(n!=null&&n.includes(d.id)));return Nx(t,[...s,...u,...l],e)},ge(e.options,Po,"getHeaderGroups")),e.getCenterHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,n)=>(o=o.filter(a=>!(r!=null&&r.includes(a.id))&&!(n!=null&&n.includes(a.id))),Nx(t,o,e,"center")),ge(e.options,Po,"getCenterHeaderGroups")),e.getLeftHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,o,r)=>{var n;let a=(n=r?.map(i=>o.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return Nx(t,a,e,"left")},ge(e.options,Po,"getLeftHeaderGroups")),e.getRightHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,o,r)=>{var n;let a=(n=r?.map(i=>o.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return Nx(t,a,e,"right")},ge(e.options,Po,"getRightHeaderGroups")),e.getFooterGroups=me(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ge(e.options,Po,"getFooterGroups")),e.getLeftFooterGroups=me(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ge(e.options,Po,"getLeftFooterGroups")),e.getCenterFooterGroups=me(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ge(e.options,Po,"getCenterFooterGroups")),e.getRightFooterGroups=me(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ge(e.options,Po,"getRightFooterGroups")),e.getFlatHeaders=me(()=>[e.getHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Po,"getFlatHeaders")),e.getLeftFlatHeaders=me(()=>[e.getLeftHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Po,"getLeftFlatHeaders")),e.getCenterFlatHeaders=me(()=>[e.getCenterHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Po,"getCenterFlatHeaders")),e.getRightFlatHeaders=me(()=>[e.getRightHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Po,"getRightFlatHeaders")),e.getCenterLeafHeaders=me(()=>[e.getCenterFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ge(e.options,Po,"getCenterLeafHeaders")),e.getLeftLeafHeaders=me(()=>[e.getLeftFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ge(e.options,Po,"getLeftLeafHeaders")),e.getRightLeafHeaders=me(()=>[e.getRightFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ge(e.options,Po,"getRightLeafHeaders")),e.getLeafHeaders=me(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,o,r)=>{var n,a,i,s,l,u;return[...(n=(a=t[0])==null?void 0:a.headers)!=null?n:[],...(i=(s=o[0])==null?void 0:s.headers)!=null?i:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},ge(e.options,Po,"getLeafHeaders"))}};function Nx(e,t,o,r){var n,a;let i=0,s=function(f,p){p===void 0&&(p=1),i=Math.max(i,p),f.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&s(g.columns,p+1)},0)};s(e);let l=[],u=(f,p)=>{let g={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(x=>{let h=[...m].reverse()[0],v=x.column.depth===g.depth,y,w=!1;if(v&&x.column.parent?y=x.column.parent:(y=x.column,w=!0),h&&h?.column===y)h.subHeaders.push(x);else{let C=g_(o,y,{id:[r,p,y.id,x?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${m.filter(b=>b.column===y).length}`:void 0,depth:p,index:m.length});C.subHeaders.push(x),m.push(C)}g.headers.push(x),x.headerGroup=g}),l.push(g),p>0&&u(m,p-1)},c=t.map((f,p)=>g_(o,f,{depth:i,index:p}));u(c,i-1),l.reverse();let d=f=>f.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,x=0,h=[0];g.subHeaders&&g.subHeaders.length?(h=[],d(g.subHeaders).forEach(y=>{let{colSpan:w,rowSpan:C}=y;m+=w,h.push(C)})):m=1;let v=Math.min(...h);return x=x+v,g.colSpan=m,g.rowSpan=x,{colSpan:m,rowSpan:x}});return d((n=(a=l[0])==null?void 0:a.headers)!=null?n:[]),l}var Yb=(e,t,o,r,n,a,i)=>{let s={id:t,index:r,original:o,depth:n,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return s._valuesCache[l]=u.accessorFn(s.original,r),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=u.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=s.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:a??[],getLeafRows:()=>gK(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],u=s;for(;;){let c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:me(()=>[e.getAllLeafColumns()],l=>l.map(u=>hK(e,s,u,u.id)),ge(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:me(()=>[s.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),ge(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){let u=e._features[l];u==null||u.createRow==null||u.createRow(s,e)}return s},yK={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},v_=(e,t,o)=>{var r,n;let a=o==null||(r=o.toString())==null?void 0:r.toLowerCase();return!!(!((n=e.getValue(t))==null||(n=n.toString())==null||(n=n.toLowerCase())==null)&&n.includes(a))};v_.autoRemove=e=>_n(e);var x_=(e,t,o)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(o))};x_.autoRemove=e=>_n(e);var y_=(e,t,o)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===o?.toLowerCase()};y_.autoRemove=e=>_n(e);var w_=(e,t,o)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(o)};w_.autoRemove=e=>_n(e);var C_=(e,t,o)=>!o.some(r=>{var n;return!((n=e.getValue(t))!=null&&n.includes(r))});C_.autoRemove=e=>_n(e)||!(e!=null&&e.length);var S_=(e,t,o)=>o.some(r=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(r)});S_.autoRemove=e=>_n(e)||!(e!=null&&e.length);var b_=(e,t,o)=>e.getValue(t)===o;b_.autoRemove=e=>_n(e);var R_=(e,t,o)=>e.getValue(t)==o;R_.autoRemove=e=>_n(e);var Qb=(e,t,o)=>{let[r,n]=o,a=e.getValue(t);return a>=r&&a<=n};Qb.resolveFilterValue=e=>{let[t,o]=e,r=typeof t!="number"?parseFloat(t):t,n=typeof o!="number"?parseFloat(o):o,a=t===null||Number.isNaN(r)?-1/0:r,i=o===null||Number.isNaN(n)?1/0:n;if(a>i){let s=a;a=i,i=s}return[a,i]};Qb.autoRemove=e=>_n(e)||_n(e[0])&&_n(e[1]);var li={includesString:v_,includesStringSensitive:x_,equalsString:y_,arrIncludes:w_,arrIncludesAll:C_,arrIncludesSome:S_,equals:b_,weakEquals:R_,inNumberRange:Qb};function _n(e){return e==null||e===""}var wK={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:br("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let o=t.getCoreRowModel().flatRows[0],r=o?.getValue(e.id);return typeof r=="string"?li.includesString:typeof r=="number"?li.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?li.equals:Array.isArray(r)?li.arrIncludes:li.weakEquals},e.getFilterFn=()=>{var o,r;return _x(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(o=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?o:li[e.columnDef.filterFn]},e.getCanFilter=()=>{var o,r,n;return((o=e.columnDef.enableColumnFilter)!=null?o:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var o;return(o=t.getState().columnFilters)==null||(o=o.find(r=>r.id===e.id))==null?void 0:o.value},e.getFilterIndex=()=>{var o,r;return(o=(r=t.getState().columnFilters)==null?void 0:r.findIndex(n=>n.id===e.id))!=null?o:-1},e.setFilterValue=o=>{t.setColumnFilters(r=>{let n=e.getFilterFn(),a=r?.find(c=>c.id===e.id),i=Cs(o,a?a.value:void 0);if(h_(n,i,e)){var s;return(s=r?.filter(c=>c.id!==e.id))!=null?s:[]}let l={id:e.id,value:i};if(a){var u;return(u=r?.map(c=>c.id===e.id?l:c))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let o=e.getAllLeafColumns(),r=n=>{var a;return(a=Cs(t,n))==null?void 0:a.filter(i=>{let s=o.find(l=>l.id===i.id);if(s){let l=s.getFilterFn();if(h_(l,i.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var o,r;e.setColumnFilters(t?[]:(o=(r=e.initialState)==null?void 0:r.columnFilters)!=null?o:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function h_(e,t,o){return(e&&e.autoRemove?e.autoRemove(t,o):!1)||typeof t>"u"||typeof t=="string"&&!t}var CK=(e,t,o)=>o.reduce((r,n)=>{let a=n.getValue(e);return r+(typeof a=="number"?a:0)},0),SK=(e,t,o)=>{let r;return o.forEach(n=>{let a=n.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}),r},bK=(e,t,o)=>{let r;return o.forEach(n=>{let a=n.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}),r},RK=(e,t,o)=>{let r,n;return o.forEach(a=>{let i=a.getValue(e);i!=null&&(r===void 0?i>=i&&(r=n=i):(r>i&&(r=i),n<i&&(n=i)))}),[r,n]},IK=(e,t)=>{let o=0,r=0;if(t.forEach(n=>{let a=n.getValue(e);a!=null&&(a=+a)>=a&&(++o,r+=a)}),o)return r/o},PK=(e,t)=>{if(!t.length)return;let o=t.map(a=>a.getValue(e));if(!mK(o))return;if(o.length===1)return o[0];let r=Math.floor(o.length/2),n=o.sort((a,i)=>a-i);return o.length%2!==0?n[r]:(n[r-1]+n[r])/2},LK=(e,t)=>Array.from(new Set(t.map(o=>o.getValue(e))).values()),TK=(e,t)=>new Set(t.map(o=>o.getValue(e))).size,kK=(e,t)=>t.length,Vb={sum:CK,min:SK,max:bK,extent:RK,mean:IK,median:PK,unique:LK,uniqueCount:TK,count:kK},MK={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,o;return(t=(o=e.getValue())==null||o.toString==null?void 0:o.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:br("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(o=>o!=null&&o.includes(e.id)?o.filter(r=>r!==e.id):[...o??[],e.id])},e.getCanGroup=()=>{var o,r;return((o=e.columnDef.enableGrouping)!=null?o:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var o;return(o=t.getState().grouping)==null?void 0:o.includes(e.id)},e.getGroupedIndex=()=>{var o;return(o=t.getState().grouping)==null?void 0:o.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let o=e.getCanGroup();return()=>{o&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let o=t.getCoreRowModel().flatRows[0],r=o?.getValue(e.id);if(typeof r=="number")return Vb.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Vb.extent},e.getAggregationFn=()=>{var o,r;if(!e)throw new Error;return _x(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(o=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?o:Vb[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var o,r;e.setGrouping(t?[]:(o=(r=e.initialState)==null?void 0:r.grouping)!=null?o:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=o=>{if(e._groupingValuesCache.hasOwnProperty(o))return e._groupingValuesCache[o];let r=t.getColumn(o);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[o]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[o]):e.getValue(o)},e._groupingValuesCache={}},createCell:(e,t,o,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===o.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var n;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((n=o.subRows)!=null&&n.length)}}};function EK(e,t,o){if(!(t!=null&&t.length)||!o)return e;let r=e.filter(a=>!t.includes(a.id));return o==="remove"?r:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...r]}var AK={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:br("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=me(o=>[dm(t,o)],o=>o.findIndex(r=>r.id===e.id),ge(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=o=>{var r;return((r=dm(t,o)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=o=>{var r;let n=dm(t,o);return((r=n[n.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var o;e.setColumnOrder(t?[]:(o=e.initialState.columnOrder)!=null?o:[])},e._getOrderColumnsFn=me(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,o,r)=>n=>{let a=[];if(!(t!=null&&t.length))a=n;else{let i=[...t],s=[...n];for(;s.length&&i.length;){let l=i.shift(),u=s.findIndex(c=>c.id===l);u>-1&&a.push(s.splice(u,1)[0])}a=[...a,...s]}return EK(a,o,r)},ge(e.options,"debugTable","_getOrderColumnsFn"))}},Bb=()=>({left:[],right:[]}),DK={getInitialState:e=>({columnPinning:Bb(),...e}),getDefaultOptions:e=>({onColumnPinningChange:br("columnPinning",e)}),createColumn:(e,t)=>{e.pin=o=>{let r=e.getLeafColumns().map(n=>n.id).filter(Boolean);t.setColumnPinning(n=>{var a,i;if(o==="right"){var s,l;return{left:((s=n?.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=n?.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(o==="left"){var u,c;return{left:[...((u=n?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=n?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((a=n?.left)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),right:((i=n?.right)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var n,a,i;return((n=r.columnDef.enablePinning)!=null?n:!0)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{let o=e.getLeafColumns().map(s=>s.id),{left:r,right:n}=t.getState().columnPinning,a=o.some(s=>r?.includes(s)),i=o.some(s=>n?.includes(s));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var o,r;let n=e.getIsPinned();return n?(o=(r=t.getState().columnPinning)==null||(r=r[n])==null?void 0:r.indexOf(e.id))!=null?o:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(o,r,n)=>{let a=[...r??[],...n??[]];return o.filter(i=>!a.includes(i.column.id))},ge(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(o,r)=>(r??[]).map(a=>o.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),ge(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(o,r)=>(r??[]).map(a=>o.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),ge(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var o,r;return e.setColumnPinning(t?Bb():(o=(r=e.initialState)==null?void 0:r.columnPinning)!=null?o:Bb())},e.getIsSomeColumnsPinned=t=>{var o;let r=e.getState().columnPinning;if(!t){var n,a;return!!((n=r.left)!=null&&n.length||(a=r.right)!=null&&a.length)}return!!((o=r[t])!=null&&o.length)},e.getLeftLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,o)=>(o??[]).map(r=>t.find(n=>n.id===r)).filter(Boolean),ge(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,o)=>(o??[]).map(r=>t.find(n=>n.id===r)).filter(Boolean),ge(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r)=>{let n=[...o??[],...r??[]];return t.filter(a=>!n.includes(a.id))},ge(e.options,"debugColumns","getCenterLeafColumns"))}};function NK(e){return e||(typeof document<"u"?document:null)}var Ox={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Hb=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),OK={getDefaultColumnDef:()=>Ox,getInitialState:e=>({columnSizing:{},columnSizingInfo:Hb(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:br("columnSizing",e),onColumnSizingInfoChange:br("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var o,r,n;let a=t.getState().columnSizing[e.id];return Math.min(Math.max((o=e.columnDef.minSize)!=null?o:Ox.minSize,(r=a??e.columnDef.size)!=null?r:Ox.size),(n=e.columnDef.maxSize)!=null?n:Ox.maxSize)},e.getStart=me(o=>[o,dm(t,o),t.getState().columnSizing],(o,r)=>r.slice(0,e.getIndex(o)).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getStart")),e.getAfter=me(o=>[o,dm(t,o),t.getState().columnSizing],(o,r)=>r.slice(e.getIndex(o)+1).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(o=>{let{[e.id]:r,...n}=o;return n})},e.getCanResize=()=>{var o,r;return((o=e.columnDef.enableResizing)!=null?o:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let o=0,r=n=>{if(n.subHeaders.length)n.subHeaders.forEach(r);else{var a;o+=(a=n.column.getSize())!=null?a:0}};return r(e),o},e.getStart=()=>{if(e.index>0){let o=e.headerGroup.headers[e.index-1];return o.getStart()+o.getSize()}return 0},e.getResizeHandler=o=>{let r=t.getColumn(e.column.id),n=r?.getCanResize();return a=>{if(!r||!n||(a.persist==null||a.persist(),Ub(a)&&a.touches&&a.touches.length>1))return;let i=e.getSize(),s=e?e.getLeafHeaders().map(h=>[h.column.id,h.column.getSize()]):[[r.id,r.getSize()]],l=Ub(a)?Math.round(a.touches[0].clientX):a.clientX,u={},c=(h,v)=>{typeof v=="number"&&(t.setColumnSizingInfo(y=>{var w,C;let b=t.options.columnResizeDirection==="rtl"?-1:1,S=(v-((w=y?.startOffset)!=null?w:0))*b,I=Math.max(S/((C=y?.startSize)!=null?C:0),-.999999);return y.columnSizingStart.forEach(L=>{let[T,k]=L;u[T]=Math.round(Math.max(k+k*I,0)*100)/100}),{...y,deltaOffset:S,deltaPercentage:I}}),(t.options.columnResizeMode==="onChange"||h==="end")&&t.setColumnSizing(y=>({...y,...u})))},d=h=>c("move",h),f=h=>{c("end",h),t.setColumnSizingInfo(v=>({...v,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=NK(o),g={moveHandler:h=>d(h.clientX),upHandler:h=>{p?.removeEventListener("mousemove",g.moveHandler),p?.removeEventListener("mouseup",g.upHandler),f(h.clientX)}},m={moveHandler:h=>(h.cancelable&&(h.preventDefault(),h.stopPropagation()),d(h.touches[0].clientX),!1),upHandler:h=>{var v;p?.removeEventListener("touchmove",m.moveHandler),p?.removeEventListener("touchend",m.upHandler),h.cancelable&&(h.preventDefault(),h.stopPropagation()),f((v=h.touches[0])==null?void 0:v.clientX)}},x=FK()?{passive:!1}:!1;Ub(a)?(p?.addEventListener("touchmove",m.moveHandler,x),p?.addEventListener("touchend",m.upHandler,x)):(p?.addEventListener("mousemove",g.moveHandler,x),p?.addEventListener("mouseup",g.upHandler,x)),t.setColumnSizingInfo(h=>({...h,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var o;e.setColumnSizing(t?{}:(o=e.initialState.columnSizing)!=null?o:{})},e.resetHeaderSizeInfo=t=>{var o;e.setColumnSizingInfo(t?Hb():(o=e.initialState.columnSizingInfo)!=null?o:Hb())},e.getTotalSize=()=>{var t,o;return(t=(o=e.getHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,o;return(t=(o=e.getLeftHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,o;return(t=(o=e.getCenterHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,o;return(t=(o=e.getRightHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0}}},Fx=null;function FK(){if(typeof Fx=="boolean")return Fx;let e=!1;try{let t={get passive(){return e=!0,!1}},o=()=>{};window.addEventListener("test",o,t),window.removeEventListener("test",o)}catch{e=!1}return Fx=e,Fx}function Ub(e){return e.type==="touchstart"}var _K={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:br("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=o=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:o??!e.getIsVisible()}))},e.getIsVisible=()=>{var o,r;let n=e.columns;return(o=n.length?n.some(a=>a.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?o:!0},e.getCanHide=()=>{var o,r;return((o=e.columnDef.enableHiding)!=null?o:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>o=>{e.toggleVisibility==null||e.toggleVisibility(o.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=me(()=>[e.getAllCells(),t.getState().columnVisibility],o=>o.filter(r=>r.column.getIsVisible()),ge(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=me(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(o,r,n)=>[...o,...r,...n],ge(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(o,r)=>me(()=>[r(),r().filter(n=>n.getIsVisible()).map(n=>n.id).join("_")],n=>n.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),ge(e.options,"debugColumns",o));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=o=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(o),e.resetColumnVisibility=o=>{var r;e.setColumnVisibility(o?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=o=>{var r;o=(r=o)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((n,a)=>({...n,[a.id]:o||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(o=>!(o.getIsVisible!=null&&o.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(o=>o.getIsVisible==null?void 0:o.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>o=>{var r;e.toggleAllColumnsVisible((r=o.target)==null?void 0:r.checked)}}};function dm(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var VK={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},BK={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:br("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var o;let r=(o=e.getCoreRowModel().flatRows[0])==null||(o=o._getAllCellsByColumnId()[t.id])==null?void 0:o.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var o,r,n,a;return((o=e.columnDef.enableGlobalFilter)!=null?o:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>li.includesString,e.getGlobalFilterFn=()=>{var t,o;let{globalFilterFn:r}=e.options;return _x(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(o=e.options.filterFns)==null?void 0:o[r])!=null?t:li[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},HK={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:br("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,o=!1;e._autoResetExpanded=()=>{var r,n;if(!t){e._queue(()=>{t=!0});return}if((r=(n=e.options.autoResetAll)!=null?n:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(o)return;o=!0,e._queue(()=>{e.resetExpanded(),o=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var n,a;e.setExpanded(r?{}:(n=(a=e.initialState)==null?void 0:a.expanded)!=null?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{let r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(n=>!n.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{let i=a.split(".");r=Math.max(r,i.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=o=>{t.setExpanded(r=>{var n;let a=r===!0?!0:!!(r!=null&&r[e.id]),i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=r,o=(n=o)!=null?n:!a,!a&&o)return{...i,[e.id]:!0};if(a&&!o){let{[e.id]:s,...l}=i;return l}return r})},e.getIsExpanded=()=>{var o;let r=t.getState().expanded;return!!((o=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?o:r===!0||r?.[e.id])},e.getCanExpand=()=>{var o,r,n;return(o=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?o:((r=t.options.enableExpanding)!=null?r:!0)&&!!((n=e.subRows)!=null&&n.length)},e.getIsAllParentsExpanded=()=>{let o=!0,r=e;for(;o&&r.parentId;)r=t.getRow(r.parentId,!0),o=r.getIsExpanded();return o},e.getToggleExpandedHandler=()=>{let o=e.getCanExpand();return()=>{o&&e.toggleExpanded()}}}},jb=0,qb=10,zb=()=>({pageIndex:jb,pageSize:qb}),UK={getInitialState:e=>({...e,pagination:{...zb(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:br("pagination",e)}),createTable:e=>{let t=!1,o=!1;e._autoResetPageIndex=()=>{var r,n;if(!t){e._queue(()=>{t=!0});return}if((r=(n=e.options.autoResetAll)!=null?n:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(o)return;o=!0,e._queue(()=>{e.resetPageIndex(),o=!1})}},e.setPagination=r=>{let n=a=>Cs(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=r=>{var n;e.setPagination(r?zb():(n=e.initialState.pagination)!=null?n:zb())},e.setPageIndex=r=>{e.setPagination(n=>{let a=Cs(r,n.pageIndex),i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...n,pageIndex:a}})},e.resetPageIndex=r=>{var n,a;e.setPageIndex(r?jb:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?n:jb)},e.resetPageSize=r=>{var n,a;e.setPageSize(r?qb:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?n:qb)},e.setPageSize=r=>{e.setPagination(n=>{let a=Math.max(1,Cs(r,n.pageSize)),i=n.pageSize*n.pageIndex,s=Math.floor(i/a);return{...n,pageIndex:s,pageSize:a}})},e.setPageCount=r=>e.setPagination(n=>{var a;let i=Cs(r,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=me(()=>[e.getPageCount()],r=>{let n=[];return r&&r>0&&(n=[...new Array(r)].fill(null).map((a,i)=>i)),n},ge(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:r}=e.getState().pagination,n=e.getPageCount();return n===-1?!0:n===0?!1:r<n-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Gb=()=>({top:[],bottom:[]}),zK={getInitialState:e=>({rowPinning:Gb(),...e}),getDefaultOptions:e=>({onRowPinningChange:br("rowPinning",e)}),createRow:(e,t)=>{e.pin=(o,r,n)=>{let a=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],i=n?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],s=new Set([...i,e.id,...a]);t.setRowPinning(l=>{var u,c;if(o==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(m=>!(s!=null&&s.has(m))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)]}}if(o==="top"){var p,g;return{top:[...((p=l?.top)!=null?p:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((g=l?.bottom)!=null?g:[]).filter(m=>!(s!=null&&s.has(m)))}}return{top:((u=l?.top)!=null?u:[]).filter(m=>!(s!=null&&s.has(m))),bottom:((c=l?.bottom)!=null?c:[]).filter(m=>!(s!=null&&s.has(m)))}})},e.getCanPin=()=>{var o;let{enableRowPinning:r,enablePinning:n}=t.options;return typeof r=="function"?r(e):(o=r??n)!=null?o:!0},e.getIsPinned=()=>{let o=[e.id],{top:r,bottom:n}=t.getState().rowPinning,a=o.some(s=>r?.includes(s)),i=o.some(s=>n?.includes(s));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var o,r;let n=e.getIsPinned();if(!n)return-1;let a=(o=n==="top"?t.getTopRows():t.getBottomRows())==null?void 0:o.map(i=>{let{id:s}=i;return s});return(r=a?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var o,r;return e.setRowPinning(t?Gb():(o=(r=e.initialState)==null?void 0:r.rowPinning)!=null?o:Gb())},e.getIsSomeRowsPinned=t=>{var o;let r=e.getState().rowPinning;if(!t){var n,a;return!!((n=r.top)!=null&&n.length||(a=r.bottom)!=null&&a.length)}return!!((o=r[t])!=null&&o.length)},e._getPinnedRows=(t,o,r)=>{var n;return((n=e.options.keepPinnedRows)==null||n?(o??[]).map(i=>{let s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(o??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,o)=>e._getPinnedRows(t,o,"top"),ge(e.options,"debugRows","getTopRows")),e.getBottomRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,o)=>e._getPinnedRows(t,o,"bottom"),ge(e.options,"debugRows","getBottomRows")),e.getCenterRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,o,r)=>{let n=new Set([...o??[],...r??[]]);return t.filter(a=>!n.has(a.id))},ge(e.options,"debugRows","getCenterRows"))}},GK={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:br("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var o;return e.setRowSelection(t?{}:(o=e.initialState.rowSelection)!=null?o:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(o=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();let r={...o},n=e.getPreGroupedRowModel().flatRows;return t?n.forEach(a=>{a.getCanSelect()&&(r[a.id]=!0)}):n.forEach(a=>{delete r[a.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(o=>{let r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),n={...o};return e.getRowModel().rows.forEach(a=>{$b(n,a.id,r,!0,e)}),n}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=me(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,o)=>Object.keys(t).length?Wb(e,o):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=me(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,o)=>Object.keys(t).length?Wb(e,o):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=me(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,o)=>Object.keys(t).length?Wb(e,o):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:o}=e.getState(),r=!!(t.length&&Object.keys(o).length);return r&&t.some(n=>n.getCanSelect()&&!o[n.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(n=>n.getCanSelect()),{rowSelection:o}=e.getState(),r=!!t.length;return r&&t.some(n=>!o[n.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;let o=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return o>0&&o<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(o=>o.getCanSelect()).some(o=>o.getIsSelected()||o.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(o,r)=>{let n=e.getIsSelected();t.setRowSelection(a=>{var i;if(o=typeof o<"u"?o:!n,e.getCanSelect()&&n===o)return a;let s={...a};return $b(s,e.id,o,(i=r?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:o}=t.getState();return Zb(e,o)},e.getIsSomeSelected=()=>{let{rowSelection:o}=t.getState();return Kb(e,o)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:o}=t.getState();return Kb(e,o)==="all"},e.getCanSelect=()=>{var o;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(o=t.options.enableRowSelection)!=null?o:!0},e.getCanSelectSubRows=()=>{var o;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(o=t.options.enableSubRowSelection)!=null?o:!0},e.getCanMultiSelect=()=>{var o;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(o=t.options.enableMultiRowSelection)!=null?o:!0},e.getToggleSelectedHandler=()=>{let o=e.getCanSelect();return r=>{var n;o&&e.toggleSelected((n=r.target)==null?void 0:n.checked)}}}},$b=(e,t,o,r,n)=>{var a;let i=n.getRow(t,!0);o?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>$b(e,s.id,o,r,n))};function Wb(e,t){let o=e.getState().rowSelection,r=[],n={},a=function(i,s){return i.map(l=>{var u;let c=Zb(l,o);if(c&&(r.push(l),n[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:a(l.subRows)}),c)return l}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:n}}function Zb(e,t){var o;return(o=t[e.id])!=null?o:!1}function Kb(e,t,o){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let n=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!n)&&(i.getCanSelect()&&(Zb(i,t)?a=!0:n=!1),i.subRows&&i.subRows.length)){let s=Kb(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),n=!1)}}),n?"all":a?"some":!1}var Xb=/([0-9]+)/gm,WK=(e,t,o)=>I_(Ss(e.getValue(o)).toLowerCase(),Ss(t.getValue(o)).toLowerCase()),jK=(e,t,o)=>I_(Ss(e.getValue(o)),Ss(t.getValue(o))),qK=(e,t,o)=>Jb(Ss(e.getValue(o)).toLowerCase(),Ss(t.getValue(o)).toLowerCase()),$K=(e,t,o)=>Jb(Ss(e.getValue(o)),Ss(t.getValue(o))),KK=(e,t,o)=>{let r=e.getValue(o),n=t.getValue(o);return r>n?1:r<n?-1:0},XK=(e,t,o)=>Jb(e.getValue(o),t.getValue(o));function Jb(e,t){return e===t?0:e>t?1:-1}function Ss(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function I_(e,t){let o=e.split(Xb).filter(Boolean),r=t.split(Xb).filter(Boolean);for(;o.length&&r.length;){let n=o.shift(),a=r.shift(),i=parseInt(n,10),s=parseInt(a,10),l=[i,s].sort();if(isNaN(l[0])){if(n>a)return 1;if(a>n)return-1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>s)return 1;if(s>i)return-1}return o.length-r.length}var cm={alphanumeric:WK,alphanumericCaseSensitive:jK,text:qK,textCaseSensitive:$K,datetime:KK,basic:XK},YK={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:br("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let o=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let n of o){let a=n?.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return cm.datetime;if(typeof a=="string"&&(r=!0,a.split(Xb).length>1))return cm.alphanumeric}return r?cm.text:cm.basic},e.getAutoSortDir=()=>{let o=t.getFilteredRowModel().flatRows[0];return typeof o?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var o,r;if(!e)throw new Error;return _x(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(o=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?o:cm[e.columnDef.sortingFn]},e.toggleSorting=(o,r)=>{let n=e.getNextSortingOrder(),a=typeof o<"u"&&o!==null;t.setSorting(i=>{let s=i?.find(p=>p.id===e.id),l=i?.findIndex(p=>p.id===e.id),u=[],c,d=a?o:n==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":i!=null&&i.length&&l!==i.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(a||n||(c="remove")),c==="add"){var f;u=[...i,{id:e.id,desc:d}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=i.map(p=>p.id===e.id?{...p,desc:d}:p):c==="remove"?u=i.filter(p=>p.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var o,r;return((o=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?o:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=o=>{var r,n;let a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((r=t.options.enableSortingRemoval)==null||r)&&(!(o&&(n=t.options.enableMultiRemove)!=null)||n)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var o,r;return((o=e.columnDef.enableSorting)!=null?o:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var o,r;return(o=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?o:!!e.accessorFn},e.getIsSorted=()=>{var o;let r=(o=t.getState().sorting)==null?void 0:o.find(n=>n.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var o,r;return(o=(r=t.getState().sorting)==null?void 0:r.findIndex(n=>n.id===e.id))!=null?o:-1},e.clearSorting=()=>{t.setSorting(o=>o!=null&&o.length?o.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{let o=e.getCanSort();return r=>{o&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var o,r;e.setSorting(t?[]:(o=(r=e.initialState)==null?void 0:r.sorting)!=null?o:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},QK=[xK,_K,AK,DK,yK,wK,VK,BK,YK,MK,HK,UK,zK,GK,OK];function P_(e){var t,o;let r=[...QK,...(t=e._features)!=null?t:[]],n={_features:r},a=n._features.reduce((f,p)=>Object.assign(f,p.getDefaultOptions==null?void 0:p.getDefaultOptions(n)),{}),i=f=>n.options.mergeOptions?n.options.mergeOptions(a,f):{...a,...f},l={...{},...(o=e.initialState)!=null?o:{}};n._features.forEach(f=>{var p;l=(p=f.getInitialState==null?void 0:f.getInitialState(l))!=null?p:l});let u=[],c=!1,d={_features:r,options:{...a,...e},initialState:l,_queue:f=>{u.push(f),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{n.setState(n.initialState)},setOptions:f=>{let p=Cs(f,n.options);n.options=i(p)},getState:()=>n.options.state,setState:f=>{n.options.onStateChange==null||n.options.onStateChange(f)},_getRowId:(f,p,g)=>{var m;return(m=n.options.getRowId==null?void 0:n.options.getRowId(f,p,g))!=null?m:`${g?[g.id,p].join("."):p}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(f,p)=>{let g=(p?n.getPrePaginationRowModel():n.getRowModel()).rowsById[f];if(!g&&(g=n.getCoreRowModel().rowsById[f],!g))throw new Error;return g},_getDefaultColumnDef:me(()=>[n.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:g=>{let m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,x;return(m=(x=g.renderValue())==null||x.toString==null?void 0:x.toString())!=null?m:null},...n._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},ge(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>n.options.columns,getAllColumns:me(()=>[n._getColumnDefs()],f=>{let p=function(g,m,x){return x===void 0&&(x=0),g.map(h=>{let v=vK(n,h,x,m),y=h;return v.columns=y.columns?p(y.columns,v,x+1):[],v})};return p(f)},ge(e,"debugColumns","getAllColumns")),getAllFlatColumns:me(()=>[n.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),ge(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:me(()=>[n.getAllFlatColumns()],f=>f.reduce((p,g)=>(p[g.id]=g,p),{}),ge(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:me(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(f,p)=>{let g=f.flatMap(m=>m.getLeafColumns());return p(g)},ge(e,"debugColumns","getAllLeafColumns")),getColumn:f=>n._getAllFlatColumnsById()[f]};Object.assign(n,d);for(let f=0;f<n._features.length;f++){let p=n._features[f];p==null||p.createTable==null||p.createTable(n)}return n}function L_(){return e=>me(()=>[e.options.data],t=>{let o={rows:[],flatRows:[],rowsById:{}},r=function(n,a,i){a===void 0&&(a=0);let s=[];for(let u=0;u<n.length;u++){let c=Yb(e,e._getRowId(n[u],u,i),n[u],u,a,void 0,i?.id);if(o.flatRows.push(c),o.rowsById[c.id]=c,s.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(n[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=r(c.originalSubRows,a+1,c))}}return s};return o.rows=r(t),o},ge(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function ZK(e){let t=[],o=r=>{var n;t.push(r),(n=r.subRows)!=null&&n.length&&r.getIsExpanded()&&r.subRows.forEach(o)};return e.rows.forEach(o),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function JK(e,t,o){return o.options.filterFromLeafRows?eX(e,t,o):tX(e,t,o)}function eX(e,t,o){var r;let n=[],a={},i=(r=o.options.maxLeafRowFilterDepth)!=null?r:100,s=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){var d;let p=l[f],g=Yb(o,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(g.columnFilters=p.columnFilters,(d=p.subRows)!=null&&d.length&&u<i){if(g.subRows=s(p.subRows,u+1),p=g,t(p)&&!g.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}if(t(p)||g.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}}else p=g,t(p)&&(c.push(p),a[p.id]=p,n.push(p))}return c};return{rows:s(e),flatRows:n,rowsById:a}}function tX(e,t,o){var r;let n=[],a={},i=(r=o.options.maxLeafRowFilterDepth)!=null?r:100,s=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){let p=l[f];if(t(p)){var d;if((d=p.subRows)!=null&&d.length&&u<i){let m=Yb(o,p.id,p.original,p.index,p.depth,void 0,p.parentId);m.subRows=s(p.subRows,u+1),p=m}c.push(p),n.push(p),a[p.id]=p}}return c};return{rows:s(e),flatRows:n,rowsById:a}}function T_(){return e=>me(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,o,r)=>{if(!t.rows.length||!(o!=null&&o.length)&&!r){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}let n=[],a=[];(o??[]).forEach(f=>{var p;let g=e.getColumn(f.id);if(!g)return;let m=g.getFilterFn();m&&n.push({id:f.id,filterFn:m,resolvedValue:(p=m.resolveFilterValue==null?void 0:m.resolveFilterValue(f.value))!=null?p:f.value})});let i=(o??[]).map(f=>f.id),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&s&&l.length&&(i.push("__global__"),l.forEach(f=>{var p;a.push({id:f.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let u,c;for(let f=0;f<t.flatRows.length;f++){let p=t.flatRows[f];if(p.columnFilters={},n.length)for(let g=0;g<n.length;g++){u=n[g];let m=u.id;p.columnFilters[m]=u.filterFn(p,m,u.resolvedValue,x=>{p.columnFiltersMeta[m]=x})}if(a.length){for(let g=0;g<a.length;g++){c=a[g];let m=c.id;if(c.filterFn(p,m,c.resolvedValue,x=>{p.columnFiltersMeta[m]=x})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}let d=f=>{for(let p=0;p<i.length;p++)if(f.columnFilters[i[p]]===!1)return!1;return!0};return JK(t.rows,d,e)},ge(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function k_(e){return t=>me(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(o,r)=>{if(!r.rows.length)return r;let{pageSize:n,pageIndex:a}=o,{rows:i,flatRows:s,rowsById:l}=r,u=n*a,c=u+n;i=i.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:i,flatRows:s,rowsById:l}:d=ZK({rows:i,flatRows:s,rowsById:l}),d.flatRows=[];let f=p=>{d.flatRows.push(p),p.subRows.length&&p.subRows.forEach(f)};return d.rows.forEach(f),d},ge(t.options,"debugTable","getPaginationRowModel"))}function M_(){return e=>me(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,o)=>{if(!o.rows.length||!(t!=null&&t.length))return o;let r=e.getState().sorting,n=[],a=r.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),i={};a.forEach(l=>{let u=e.getColumn(l.id);u&&(i[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});let s=l=>{let u=l.map(c=>({...c}));return u.sort((c,d)=>{for(let p=0;p<a.length;p+=1){var f;let g=a[p],m=i[g.id],x=m.sortUndefined,h=(f=g?.desc)!=null?f:!1,v=0;if(x){let y=c.getValue(g.id),w=d.getValue(g.id),C=y===void 0,b=w===void 0;if(C||b){if(x==="first")return C?-1:1;if(x==="last")return C?1:-1;v=C&&b?0:C?x:-x}}if(v===0&&(v=m.sortingFn(c,d,g.id)),v!==0)return h&&(v*=-1),m.invertSorting&&(v*=-1),v}return c.index-d.index}),u.forEach(c=>{var d;n.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=s(c.subRows))}),u};return{rows:s(o.rows),flatRows:n,rowsById:o.rowsById}},ge(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function eR(e,t){return e?oX(e)?fm.createElement(e,t):e:null}function oX(e){return rX(e)||typeof e=="function"||nX(e)}function rX(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function nX(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function E_(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=fm.useState(()=>({current:P_(t)})),[r,n]=fm.useState(()=>o.current.initialState);return o.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{n(i),e.onStateChange==null||e.onStateChange(i)}})),o.current}var Lo=R(M());var ct=R(N()),aX=K("w-full caption-bottom text-sm",{variants:{variant:{default:"dark:text-gray-200",bordered:"border border-border dark:border-gray-700",striped:"dark:text-gray-200",card:"border border-border dark:border-gray-700 rounded-md shadow-sm dark:shadow-gray-900/20",minimal:"border-none dark:text-gray-200"},size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),Vx=Lo.forwardRef(({className:e,variant:t,size:o,loading:r,emptyContent:n,...a},i)=>{let s=t==="striped",l=Lo.Children.map(a.children,u=>{if(Lo.isValidElement(u)&&u.type==="tbody"){let c=u.props;return Lo.cloneElement(u,{className:P(c.className,s&&"even:[&>tr]:bg-muted/50")})}return u});return(0,ct.jsxs)("div",{className:"relative w-full overflow-auto",children:[r&&(0,ct.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,ct.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,ct.jsx)("table",{ref:i,className:P(aX({variant:t,size:o}),r&&"opacity-70",e),...a,children:l})]})});Vx.displayName="Table";var Bx=Lo.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("thead",{ref:o,className:P("moonui-theme","[&_tr]:border-b",e),...t}));Bx.displayName="TableHeader";var Hx=Lo.forwardRef(({className:e,emptyContent:t,emptyMessage:o="No data available",children:r,...n},a)=>{let i=Lo.Children.count(r)>0;return(0,ct.jsx)("tbody",{ref:a,className:P("moonui-theme","[&_tr:last-child]:border-0",e),...n,children:i?r:(0,ct.jsx)("tr",{children:(0,ct.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,ct.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,ct.jsx)("div",{className:"text-sm",children:o})})})})})});Hx.displayName="TableBody";var A_=Lo.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("tfoot",{ref:o,className:P("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));A_.displayName="TableFooter";var Kc=Lo.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("tr",{ref:o,className:P("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Kc.displayName="TableRow";var Ux=Lo.forwardRef(({className:e,sortable:t,sorted:o,onSort:r,align:n="left",children:a,...i},s)=>{let l=()=>t?o==="asc"?(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):o==="desc"?(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})}):(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block opacity-30",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})}):null,u={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};return(0,ct.jsx)("th",{ref:s,className:P("h-10 px-4 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",u[n].split(" ")[0],t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?r:void 0,...i,children:t||n!=="left"?(0,ct.jsxs)("div",{className:P("flex items-center",u[n].split(" ")[1]),children:[a,t&&l()]}):a})});Ux.displayName="TableHead";var pm=Lo.forwardRef(({className:e,align:t="left",...o},r)=>{let n={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,ct.jsx)("td",{ref:r,className:P("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",n,e),...o})});pm.displayName="TableCell";var D_=Lo.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("caption",{ref:o,className:P("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));D_.displayName="TableCaption";var Me=R(N());function iX({columns:e,data:t,enableSorting:o=!0,enablePagination:r=!0,enableSearch:n=!0,pageSize:a=10,searchPlaceholder:i="Search...",emptyMessage:s="No results found.",className:l}){let[u,c]=tR.useState([]),[d,f]=tR.useState(""),p=E_({data:t,columns:e,onSortingChange:o?c:void 0,onGlobalFilterChange:n?f:void 0,getCoreRowModel:L_(),getPaginationRowModel:r?k_():void 0,getSortedRowModel:o?M_():void 0,getFilteredRowModel:n?T_():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:a}}});return(0,Me.jsxs)("div",{className:P("space-y-4",l),children:[n&&(0,Me.jsx)("div",{className:"flex items-center",children:(0,Me.jsxs)("div",{className:"relative max-w-sm",children:[(0,Me.jsx)(nl,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Me.jsx)(bo,{placeholder:i,value:d,onChange:g=>f(g.target.value),className:"pl-8"})]})}),(0,Me.jsx)("div",{className:"rounded-md border",children:(0,Me.jsxs)(Vx,{children:[(0,Me.jsx)(Bx,{children:p.getHeaderGroups().map(g=>(0,Me.jsx)(Kc,{children:g.headers.map(m=>(0,Me.jsx)(Ux,{children:m.isPlaceholder?null:(0,Me.jsxs)("div",{className:P("flex items-center gap-2",m.column.getCanSort()&&"cursor-pointer select-none"),onClick:m.column.getToggleSortingHandler(),children:[eR(m.column.columnDef.header,m.getContext()),o&&m.column.getCanSort()&&(0,Me.jsx)("div",{className:"ml-auto",children:m.column.getIsSorted()==="desc"?(0,Me.jsx)(Fu,{className:"h-4 w-4"}):m.column.getIsSorted()==="asc"?(0,Me.jsx)(Vu,{className:"h-4 w-4"}):(0,Me.jsx)(_u,{className:"h-4 w-4 opacity-50"})})]})},m.id))},g.id))}),(0,Me.jsx)(Hx,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(g=>(0,Me.jsx)(Kc,{"data-state":g.getIsSelected()&&"selected",children:g.getVisibleCells().map(m=>(0,Me.jsx)(pm,{children:eR(m.column.columnDef.cell,m.getContext())},m.id))},g.id)):(0,Me.jsx)(Kc,{children:(0,Me.jsx)(pm,{colSpan:e.length,className:"h-24 text-center",children:s})})})]})}),r&&(0,Me.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Me.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[p.getFilteredRowModel().rows.length," row(s)"]}),(0,Me.jsxs)("div",{className:"space-x-2",children:[(0,Me.jsxs)(De,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Me.jsx)(wn,{className:"h-4 w-4"}),"Previous"]}),(0,Me.jsxs)("span",{className:"text-sm",children:["Page ",p.getState().pagination.pageIndex+1," of"," ",p.getPageCount()]}),(0,Me.jsxs)(De,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Me.jsx)(No,{className:"h-4 w-4"})]})]})]})]})}function sX(e){return({column:t})=>(0,Me.jsxs)(De,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Me.jsx)(Fu,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Me.jsx)(Vu,{className:"ml-2 h-4 w-4"}):(0,Me.jsx)(_u,{className:"ml-2 h-4 w-4"})]})}var Et=R(M());var ye=R(N()),lX={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},oR=K("w-full justify-start text-left font-normal",{variants:{variant:{default:"",outline:"border-2",ghost:"hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-sm",lg:"h-12 px-6 text-base",icon:"h-10 w-10"},state:{default:"",error:"border-destructive focus:ring-destructive",success:"border-success focus:ring-success",warning:"border-warning focus:ring-warning"}},defaultVariants:{variant:"default",size:"default",state:"default"}}),rR=Et.forwardRef(function({className:t,variant:o,size:r,state:n,value:a,onChange:i,placeholder:s="Pick a date",formatString:l="PPP",minDate:u,maxDate:c,disabledDates:d,disabledDaysOfWeek:f,showWeekNumbers:p,iconPosition:g="left",icon:m,allowClear:x=!0,readOnly:h=!1,showTodayButton:v=!0,calendarProps:y,disabled:w,...C},b){let[S,I]=Et.useState(!1),[L,T]=Et.useState(a);Et.useEffect(()=>{T(a)},[a]);let k=O=>{let B=Array.isArray(O)?O[0]:O&&typeof O=="object"&&"from"in O?O.from:O;T(B),i?.(B),B&&I(!1)},E=O=>{O.stopPropagation(),k(void 0)},_=()=>{k(new Date)},D=O=>!!(u&&O<u||c&&O>c||d?.some(B=>B.toDateString()===O.toDateString())||f?.includes(O.getDay())),z=L&&Gv(L)?Mn(L,l):null,F=m||(0,ye.jsx)(el,{className:"h-4 w-4"});return(0,ye.jsx)("div",{ref:b,className:"moonui-theme",children:(0,ye.jsxs)(oi,{open:S,onOpenChange:I,children:[(0,ye.jsx)(ri,{asChild:!0,children:(0,ye.jsxs)(De,{variant:o==="ghost"?"ghost":"outline",className:P(oR({variant:o,size:r,state:n}),!z&&"text-muted-foreground",t),disabled:w||h,...C,children:[(0,ye.jsx)(za,{mode:"wait",children:(0,ye.jsxs)(Be.div,{initial:{opacity:0,y:-2},animate:{opacity:1,y:0},exit:{opacity:0,y:2},transition:{duration:.15},className:"flex items-center gap-2 flex-1",children:[g==="left"&&F,(0,ye.jsx)("span",{className:"flex-1 truncate",children:z||s}),g==="right"&&F]},z||"placeholder")}),x&&z&&!h&&!w&&(0,ye.jsxs)(Be.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileHover:{scale:1.1},whileTap:{scale:.9},className:"ml-2 h-4 w-4 shrink-0 opacity-50 hover:opacity-100 transition-opacity cursor-pointer",onClick:E,role:"button",tabIndex:0,onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),E(O))},children:[(0,ye.jsx)("span",{className:"sr-only",children:"Clear date"}),(0,ye.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ye.jsx)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})]})]})}),(0,ye.jsx)(ha,{className:"w-[360px] p-0 shadow-2xl rounded-2xl border border-border bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,ye.jsxs)(Be.div,{...lX,className:"rounded-2xl bg-background overflow-hidden",children:[(0,ye.jsx)(Bp,{mode:"single",selected:L,onSelect:k,disabled:D,showOutsideDays:!1,className:P("rounded-2xl",y?.className),...y}),v&&(0,ye.jsx)("div",{className:"border-t px-4 py-3",children:(0,ye.jsx)(De,{variant:"ghost",size:"sm",onClick:_,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]})})});rR.displayName="DatePicker";var N_=Et.forwardRef(function({className:t,value:o,onChange:r,placeholder:n="Pick a date range",formatString:a="LLL dd, y",separator:i=" - ",...s},l){let[u,c]=Et.useState(!1),[d,f]=Et.useState(o);Et.useEffect(()=>{f(o)},[o]);let p=m=>{f(m),r?.(m),m?.from&&m?.to&&c(!1)},g=Et.useMemo(()=>d?.from?d?.to?`${Mn(d.from,a)}${i}${Mn(d.to,a)}`:Mn(d.from,a):null,[d,a,i]);return(0,ye.jsxs)(oi,{open:u,onOpenChange:c,children:[(0,ye.jsx)(ri,{asChild:!0,children:(0,ye.jsxs)(De,{ref:l,variant:s.variant==="ghost"?"ghost":"outline",className:P(oR({variant:s.variant,size:s.size,state:s.state}),!g&&"text-muted-foreground",t),disabled:s.disabled||s.readOnly,children:[(0,ye.jsx)(el,{className:"mr-2 h-4 w-4"}),(0,ye.jsx)("span",{className:"flex-1 truncate text-left",children:g||n})]})}),(0,ye.jsx)(ha,{className:"w-auto p-0 shadow-2xl rounded-2xl border border-border bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,ye.jsx)(Bp,{mode:"range",defaultMonth:d?.from,selected:d,onSelect:p,showOutsideDays:!1,...s.calendarProps,className:"rounded-2xl"})})]})});N_.displayName="DateRangePicker";var O_=Et.forwardRef(function({value:t,onChange:o,formatString:r="PPP",showTimePicker:n=!0,timeFormat:a="24",timeInterval:i=15,...s},l){let[u,c]=Et.useState(t),[d,f]=Et.useState(t?Mn(t,a==="24"?"HH:mm":"hh:mm a"):"00:00"),p=x=>{if(!x){c(void 0),o?.(void 0);return}let[h,v]=d.split(":").map(Number);x.setHours(h,v),c(x),o?.(x)},g=x=>{let h=x.target.value;if(f(h),u){let[v,y]=h.split(":").map(Number),w=new Date(u);w.setHours(v,y),c(w),o?.(w)}},m=Et.useMemo(()=>{let x=[];for(let h=0;h<24;h++)for(let v=0;v<60;v+=i){let y=h.toString().padStart(2,"0"),w=v.toString().padStart(2,"0"),C=`${y}:${w}`;if(a==="12"){let b=h===0?12:h>12?h-12:h,S=h<12?"AM":"PM",I=`${b}:${w} ${S}`;x.push({value:C,label:I})}else x.push({value:C,label:C})}return x},[a,i]);return(0,ye.jsxs)("div",{ref:l,className:"flex flex-col gap-2",children:[(0,ye.jsx)(rR,{...s,value:u,onChange:p,formatString:r,showTodayButton:!1}),n&&u&&(0,ye.jsxs)(Be.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2",children:[(0,ye.jsx)(Cf,{className:"h-4 w-4 text-muted-foreground"}),(0,ye.jsx)("select",{value:d,onChange:g,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:m.map(x=>(0,ye.jsx)("option",{value:x.value,children:x.label},x.value))})]})]})});O_.displayName="DateTimePicker";var F_=Et.forwardRef(function({value:t,onChange:o,placeholder:r="Pick a month",formatString:n="MMMM yyyy",...a},i){let[s,l]=Et.useState(!1),[u,c]=Et.useState(t||new Date),d=["January","February","March","April","May","June","July","August","September","October","November","December"],f=m=>{let x=new Date(u);x.setMonth(m),o?.(x),l(!1)},p=m=>{let x=new Date(u);x.setFullYear(x.getFullYear()+m),c(x)},g=t?Mn(t,n):null;return(0,ye.jsxs)(oi,{open:s,onOpenChange:l,children:[(0,ye.jsx)(ri,{asChild:!0,children:(0,ye.jsxs)(De,{ref:i,variant:a.variant==="default"?"outline":a.variant||"outline",className:P(oR({variant:a.variant,size:a.size,state:a.state}),!g&&"text-muted-foreground",a.className),disabled:a.disabled||a.readOnly,children:[(0,ye.jsx)(el,{className:"mr-2 h-4 w-4"}),g||r]})}),(0,ye.jsx)(ha,{className:"w-64 p-0 shadow-2xl border border-border bg-background !z-[9999]",align:"start",children:(0,ye.jsxs)("div",{className:"p-3",children:[(0,ye.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ye.jsx)(De,{variant:"outline",size:"icon","aria-label":`Previous year, ${u.getFullYear()-1}`,onClick:()=>p(-1),children:(0,ye.jsx)(wn,{className:"h-4 w-4"})}),(0,ye.jsx)("span",{className:"font-semibold",children:u.getFullYear()}),(0,ye.jsx)(De,{variant:"outline",size:"icon","aria-label":`Next year, ${u.getFullYear()+1}`,onClick:()=>p(1),children:(0,ye.jsx)(No,{className:"h-4 w-4"})})]}),(0,ye.jsx)("div",{className:"grid grid-cols-3 gap-2",children:d.map((m,x)=>(0,ye.jsx)(De,{variant:t&&t.getMonth()===x?"primary":"outline",size:"sm",onClick:()=>f(x),className:"h-8 text-xs",children:m.slice(0,3)},m))})]})})]})});F_.displayName="MonthPicker";var __=R(M());var nR=R(N());function uX({items:e,onReorder:t,renderItem:o,keyExtractor:r,className:n,disabled:a=!1}){let[i,s]=__.useState(null),l=(f,p)=>{a||(s(p),f.dataTransfer.effectAllowed="move")},u=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},c=(f,p)=>{if(f.preventDefault(),a||i===null||i===p){s(null);return}let g=[...e],m=g[i];g.splice(i,1),g.splice(p,0,m),t(g),s(null)},d=()=>{s(null)};return(0,nR.jsx)("div",{className:P("moonui-theme","space-y-2",n),children:e.map((f,p)=>(0,nR.jsx)("div",{draggable:!a,onDragStart:g=>l(g,p),onDragOver:u,onDrop:g=>c(g,p),onDragEnd:d,className:P("transition-opacity duration-200",!a&&"cursor-move hover:opacity-80",i===p&&"opacity-50",a&&"cursor-not-allowed"),children:o(f,p)},r(f)))})}var ui=R(M());var zt=R(M(),1);var le=R(M(),1);var we=R(N(),1),aR=["Enter"," "],cX=["ArrowDown","PageUp","Home"],B_=["ArrowUp","PageDown","End"],dX=[...cX,...B_],fX={ltr:[...aR,"ArrowRight"],rtl:[...aR,"ArrowLeft"]},pX={ltr:["ArrowLeft"],rtl:["ArrowRight"]},vm="Menu",[gm,mX,gX]=Xn(vm),[ql,iR]=Oe(vm,[gX,$r,zc]),xm=$r(),H_=zc(),[U_,bs]=ql(vm),[hX,ym]=ql(vm),z_=e=>{let{__scopeMenu:t,open:o=!1,children:r,dir:n,onOpenChange:a,modal:i=!0}=e,s=xm(t),[l,u]=le.useState(null),c=le.useRef(!1),d=rt(a),f=oa(n);return le.useEffect(()=>{let p=()=>{c.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),(0,we.jsx)(Ja,{...s,children:(0,we.jsx)(U_,{scope:t,open:o,onOpenChange:d,content:l,onContentChange:u,children:(0,we.jsx)(hX,{scope:t,onClose:le.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:i,children:r})})})};z_.displayName=vm;var vX="MenuAnchor",sR=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,n=xm(o);return(0,we.jsx)(ei,{...n,...r,ref:t})});sR.displayName=vX;var lR="MenuPortal",[xX,G_]=ql(lR,{forceMount:void 0}),W_=e=>{let{__scopeMenu:t,forceMount:o,children:r,container:n}=e,a=bs(lR,t);return(0,we.jsx)(xX,{scope:t,forceMount:o,children:(0,we.jsx)(st,{present:o||a.open,children:(0,we.jsx)(Sr,{asChild:!0,container:n,children:r})})})};W_.displayName=lR;var Xr="MenuContent",[yX,uR]=ql(Xr),j_=le.forwardRef((e,t)=>{let o=G_(Xr,e.__scopeMenu),{forceMount:r=o.forceMount,...n}=e,a=bs(Xr,e.__scopeMenu),i=ym(Xr,e.__scopeMenu);return(0,we.jsx)(gm.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(st,{present:r||a.open,children:(0,we.jsx)(gm.Slot,{scope:e.__scopeMenu,children:i.modal?(0,we.jsx)(wX,{...n,ref:t}):(0,we.jsx)(CX,{...n,ref:t})})})})}),wX=le.forwardRef((e,t)=>{let o=bs(Xr,e.__scopeMenu),r=le.useRef(null),n=de(t,r);return le.useEffect(()=>{let a=r.current;if(a)return ms(a)},[]),(0,we.jsx)(cR,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),CX=le.forwardRef((e,t)=>{let o=bs(Xr,e.__scopeMenu);return(0,we.jsx)(cR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),SX=ur("MenuContent.ScrollLock"),cR=le.forwardRef((e,t)=>{let{__scopeMenu:o,loop:r=!1,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:g,...m}=e,x=bs(Xr,o),h=ym(Xr,o),v=xm(o),y=H_(o),w=mX(o),[C,b]=le.useState(null),S=le.useRef(null),I=de(t,S,x.onContentChange),L=le.useRef(0),T=le.useRef(""),k=le.useRef(0),E=le.useRef(null),_=le.useRef("right"),D=le.useRef(0),z=g?ti:le.Fragment,F=g?{as:SX,allowPinchZoom:!0}:void 0,O=A=>{let te=T.current+A,ae=w().filter(U=>!U.disabled),V=document.activeElement,Q=ae.find(U=>U.ref.current===V)?.textValue,oe=ae.map(U=>U.textValue),Y=NX(oe,te,Q),ce=ae.find(U=>U.textValue===Y)?.ref.current;(function U(ne){T.current=ne,window.clearTimeout(L.current),ne!==""&&(L.current=window.setTimeout(()=>U(""),1e3))})(te),ce&&setTimeout(()=>ce.focus())};le.useEffect(()=>()=>window.clearTimeout(L.current),[]),us();let B=le.useCallback(A=>_.current===E.current?.side&&FX(A,E.current?.area),[]);return(0,we.jsx)(yX,{scope:o,searchRef:T,onItemEnter:le.useCallback(A=>{B(A)&&A.preventDefault()},[B]),onItemLeave:le.useCallback(A=>{B(A)||(S.current?.focus(),b(null))},[B]),onTriggerLeave:le.useCallback(A=>{B(A)&&A.preventDefault()},[B]),pointerGraceTimerRef:k,onPointerGraceIntentChange:le.useCallback(A=>{E.current=A},[]),children:(0,we.jsx)(z,{...F,children:(0,we.jsx)(Qa,{asChild:!0,trapped:n,onMountAutoFocus:W(a,A=>{A.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,we.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,we.jsx)(bx,{asChild:!0,...y,dir:h.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:b,onEntryFocus:W(l,A=>{h.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,we.jsx)(fs,{role:"menu","aria-orientation":"vertical","data-state":lV(x.open),"data-radix-menu-content":"",dir:h.dir,...v,...m,ref:I,style:{outline:"none",...m.style},onKeyDown:W(m.onKeyDown,A=>{let ae=A.target.closest("[data-radix-menu-content]")===A.currentTarget,V=A.ctrlKey||A.altKey||A.metaKey,Q=A.key.length===1;ae&&(A.key==="Tab"&&A.preventDefault(),!V&&Q&&O(A.key));let oe=S.current;if(A.target!==oe||!dX.includes(A.key))return;A.preventDefault();let ce=w().filter(U=>!U.disabled).map(U=>U.ref.current);B_.includes(A.key)&&ce.reverse(),AX(ce)}),onBlur:W(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(L.current),T.current="")}),onPointerMove:W(e.onPointerMove,hm(A=>{let te=A.target,ae=D.current!==A.clientX;if(A.currentTarget.contains(te)&&ae){let V=A.clientX>D.current?"right":"left";_.current=V,D.current=A.clientX}}))})})})})})})});j_.displayName=Xr;var bX="MenuGroup",dR=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,we.jsx)($.div,{role:"group",...r,ref:t})});dR.displayName=bX;var RX="MenuLabel",q_=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,we.jsx)($.div,{...r,ref:t})});q_.displayName=RX;var zx="MenuItem",V_="menu.itemSelect",Wx=le.forwardRef((e,t)=>{let{disabled:o=!1,onSelect:r,...n}=e,a=le.useRef(null),i=ym(zx,e.__scopeMenu),s=uR(zx,e.__scopeMenu),l=de(t,a),u=le.useRef(!1),c=()=>{let d=a.current;if(!o&&d){let f=new CustomEvent(V_,{bubbles:!0,cancelable:!0});d.addEventListener(V_,p=>r?.(p),{once:!0}),Nu(d,f),f.defaultPrevented?u.current=!1:i.onClose()}};return(0,we.jsx)($_,{...n,ref:l,disabled:o,onClick:W(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:W(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:W(e.onKeyDown,d=>{let f=s.searchRef.current!=="";o||f&&d.key===" "||aR.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Wx.displayName=zx;var $_=le.forwardRef((e,t)=>{let{__scopeMenu:o,disabled:r=!1,textValue:n,...a}=e,i=uR(zx,o),s=H_(o),l=le.useRef(null),u=de(t,l),[c,d]=le.useState(!1),[f,p]=le.useState("");return le.useEffect(()=>{let g=l.current;g&&p((g.textContent??"").trim())},[a.children]),(0,we.jsx)(gm.ItemSlot,{scope:o,disabled:r,textValue:n??f,children:(0,we.jsx)(Rx,{asChild:!0,...s,focusable:!r,children:(0,we.jsx)($.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:W(e.onPointerMove,hm(g=>{r?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,hm(g=>i.onItemLeave(g))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),IX="MenuCheckboxItem",K_=le.forwardRef((e,t)=>{let{checked:o=!1,onCheckedChange:r,...n}=e;return(0,we.jsx)(J_,{scope:e.__scopeMenu,checked:o,children:(0,we.jsx)(Wx,{role:"menuitemcheckbox","aria-checked":Gx(o)?"mixed":o,...n,ref:t,"data-state":mR(o),onSelect:W(n.onSelect,()=>r?.(Gx(o)?!0:!o),{checkForDefaultPrevented:!1})})})});K_.displayName=IX;var X_="MenuRadioGroup",[PX,LX]=ql(X_,{value:void 0,onValueChange:()=>{}}),Y_=le.forwardRef((e,t)=>{let{value:o,onValueChange:r,...n}=e,a=rt(r);return(0,we.jsx)(PX,{scope:e.__scopeMenu,value:o,onValueChange:a,children:(0,we.jsx)(dR,{...n,ref:t})})});Y_.displayName=X_;var Q_="MenuRadioItem",Z_=le.forwardRef((e,t)=>{let{value:o,...r}=e,n=LX(Q_,e.__scopeMenu),a=o===n.value;return(0,we.jsx)(J_,{scope:e.__scopeMenu,checked:a,children:(0,we.jsx)(Wx,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":mR(a),onSelect:W(r.onSelect,()=>n.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});Z_.displayName=Q_;var fR="MenuItemIndicator",[J_,TX]=ql(fR,{checked:!1}),eV=le.forwardRef((e,t)=>{let{__scopeMenu:o,forceMount:r,...n}=e,a=TX(fR,o);return(0,we.jsx)(st,{present:r||Gx(a.checked)||a.checked===!0,children:(0,we.jsx)($.span,{...n,ref:t,"data-state":mR(a.checked)})})});eV.displayName=fR;var kX="MenuSeparator",tV=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,we.jsx)($.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});tV.displayName=kX;var MX="MenuArrow",oV=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,n=xm(o);return(0,we.jsx)(ps,{...n,...r,ref:t})});oV.displayName=MX;var pR="MenuSub",[EX,rV]=ql(pR),nV=e=>{let{__scopeMenu:t,children:o,open:r=!1,onOpenChange:n}=e,a=bs(pR,t),i=xm(t),[s,l]=le.useState(null),[u,c]=le.useState(null),d=rt(n);return le.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,we.jsx)(Ja,{...i,children:(0,we.jsx)(U_,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:c,children:(0,we.jsx)(EX,{scope:t,contentId:Ae(),triggerId:Ae(),trigger:s,onTriggerChange:l,children:o})})})};nV.displayName=pR;var mm="MenuSubTrigger",aV=le.forwardRef((e,t)=>{let o=bs(mm,e.__scopeMenu),r=ym(mm,e.__scopeMenu),n=rV(mm,e.__scopeMenu),a=uR(mm,e.__scopeMenu),i=le.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},c=le.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return le.useEffect(()=>c,[c]),le.useEffect(()=>{let d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),(0,we.jsx)(sR,{asChild:!0,...u,children:(0,we.jsx)($_,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":n.contentId,"data-state":lV(o.open),...e,ref:lr(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,hm(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!o.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{o.onOpenChange(!0),c()},100))})),onPointerLeave:W(e.onPointerLeave,hm(d=>{c();let f=o.content?.getBoundingClientRect();if(f){let p=o.content?.dataset.side,g=p==="right",m=g?-5:5,x=f[g?"left":"right"],h=f[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x,y:f.top},{x:h,y:f.top},{x:h,y:f.bottom},{x,y:f.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:W(e.onKeyDown,d=>{let f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||fX[r.dir].includes(d.key)&&(o.onOpenChange(!0),o.content?.focus(),d.preventDefault())})})})});aV.displayName=mm;var iV="MenuSubContent",sV=le.forwardRef((e,t)=>{let o=G_(Xr,e.__scopeMenu),{forceMount:r=o.forceMount,...n}=e,a=bs(Xr,e.__scopeMenu),i=ym(Xr,e.__scopeMenu),s=rV(iV,e.__scopeMenu),l=le.useRef(null),u=de(t,l);return(0,we.jsx)(gm.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(st,{present:r||a.open,children:(0,we.jsx)(gm.Slot,{scope:e.__scopeMenu,children:(0,we.jsx)(cR,{id:s.contentId,"aria-labelledby":s.triggerId,...n,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{i.isUsingKeyboardRef.current&&l.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:W(e.onFocusOutside,c=>{c.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:W(e.onEscapeKeyDown,c=>{i.onClose(),c.preventDefault()}),onKeyDown:W(e.onKeyDown,c=>{let d=c.currentTarget.contains(c.target),f=pX[i.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});sV.displayName=iV;function lV(e){return e?"open":"closed"}function Gx(e){return e==="indeterminate"}function mR(e){return Gx(e)?"indeterminate":e?"checked":"unchecked"}function AX(e){let t=document.activeElement;for(let o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function DX(e,t){return e.map((o,r)=>e[(t+r)%e.length])}function NX(e,t,o){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1,i=DX(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==o));let l=i.find(u=>u.toLowerCase().startsWith(n.toLowerCase()));return l!==o?l:void 0}function OX(e,t){let{x:o,y:r}=e,n=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],u=s.x,c=s.y,d=l.x,f=l.y;c>r!=f>r&&o<(d-u)*(r-c)/(f-c)+u&&(n=!n)}return n}function FX(e,t){if(!t)return!1;let o={x:e.clientX,y:e.clientY};return OX(o,t)}function hm(e){return t=>t.pointerType==="mouse"?e(t):void 0}var uV=z_,cV=sR,dV=W_,fV=j_,pV=dR,mV=q_,gV=Wx,hV=K_,vV=Y_,xV=Z_,yV=eV,wV=tV,CV=oV,SV=nV,bV=aV,RV=sV;var Ut=R(N(),1),jx="DropdownMenu",[VX,Y1e]=Oe(jx,[iR]),To=iR(),[BX,IV]=VX(jx),PV=e=>{let{__scopeDropdownMenu:t,children:o,dir:r,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=To(t),u=zt.useRef(null),[c,d]=qe({prop:n,defaultProp:a??!1,onChange:i,caller:jx});return(0,Ut.jsx)(BX,{scope:t,triggerId:Ae(),triggerRef:u,contentId:Ae(),open:c,onOpenChange:d,onOpenToggle:zt.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,Ut.jsx)(uV,{...l,open:c,onOpenChange:d,dir:r,modal:s,children:o})})};PV.displayName=jx;var LV="DropdownMenuTrigger",TV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,disabled:r=!1,...n}=e,a=IV(LV,o),i=To(o);return(0,Ut.jsx)(cV,{asChild:!0,...i,children:(0,Ut.jsx)($.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...n,ref:lr(t,a.triggerRef),onPointerDown:W(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:W(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});TV.displayName=LV;var HX="DropdownMenuPortal",kV=e=>{let{__scopeDropdownMenu:t,...o}=e,r=To(t);return(0,Ut.jsx)(dV,{...r,...o})};kV.displayName=HX;var MV="DropdownMenuContent",EV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=IV(MV,o),a=To(o),i=zt.useRef(!1);return(0,Ut.jsx)(fV,{id:n.contentId,"aria-labelledby":n.triggerId,...a,...r,ref:t,onCloseAutoFocus:W(e.onCloseAutoFocus,s=>{i.current||n.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:W(e.onInteractOutside,s=>{let l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!n.modal||c)&&(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)"}})});EV.displayName=MV;var UX="DropdownMenuGroup",AV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(pV,{...n,...r,ref:t})});AV.displayName=UX;var zX="DropdownMenuLabel",DV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(mV,{...n,...r,ref:t})});DV.displayName=zX;var GX="DropdownMenuItem",NV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(gV,{...n,...r,ref:t})});NV.displayName=GX;var WX="DropdownMenuCheckboxItem",OV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(hV,{...n,...r,ref:t})});OV.displayName=WX;var jX="DropdownMenuRadioGroup",FV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(vV,{...n,...r,ref:t})});FV.displayName=jX;var qX="DropdownMenuRadioItem",_V=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(xV,{...n,...r,ref:t})});_V.displayName=qX;var $X="DropdownMenuItemIndicator",VV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(yV,{...n,...r,ref:t})});VV.displayName=$X;var KX="DropdownMenuSeparator",BV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(wV,{...n,...r,ref:t})});BV.displayName=KX;var XX="DropdownMenuArrow",YX=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(CV,{...n,...r,ref:t})});YX.displayName=XX;var QX=e=>{let{__scopeDropdownMenu:t,children:o,open:r,onOpenChange:n,defaultOpen:a}=e,i=To(t),[s,l]=qe({prop:r,defaultProp:a??!1,onChange:n,caller:"DropdownMenuSub"});return(0,Ut.jsx)(SV,{...i,open:s,onOpenChange:l,children:o})},ZX="DropdownMenuSubTrigger",HV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(bV,{...n,...r,ref:t})});HV.displayName=ZX;var JX="DropdownMenuSubContent",UV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(RV,{...n,...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)"}})});UV.displayName=JX;var zV=PV,GV=TV,gR=kV,hR=EV,WV=AV,vR=DV,xR=NV,yR=OV,jV=FV,wR=_V,CR=VV,SR=BV;var qV=QX,bR=HV,RR=UV;var Gt=R(N()),tY=zV,oY=GV,rY=WV,nY=gR,aY=qV,iY=jV,$V=ui.forwardRef(({className:e,inset:t,children:o,...r},n)=>(0,Gt.jsxs)(bR,{ref:n,className:P("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[o,(0,Gt.jsx)(No,{className:"ml-auto h-4 w-4"})]}));$V.displayName=bR.displayName;var KV=ui.forwardRef(({className:e,...t},o)=>(0,Gt.jsx)(RR,{ref:o,className:P("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}));KV.displayName=RR.displayName;var XV=ui.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,Gt.jsx)(gR,{children:(0,Gt.jsx)(hR,{ref:r,sideOffset:t,className:P("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),...o})}));XV.displayName=hR.displayName;var YV=ui.forwardRef(({className:e,inset:t,...o},r)=>(0,Gt.jsx)(xR,{ref:r,className:P("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));YV.displayName=xR.displayName;var QV=ui.forwardRef(({className:e,children:t,checked:o,...r},n)=>(0,Gt.jsxs)(yR,{ref:n,className:P("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[(0,Gt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Gt.jsx)(CR,{children:(0,Gt.jsx)(vo,{className:"h-4 w-4"})})}),t]}));QV.displayName=yR.displayName;var ZV=ui.forwardRef(({className:e,children:t,...o},r)=>(0,Gt.jsxs)(wR,{ref:r,className:P("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,Gt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Gt.jsx)(CR,{children:(0,Gt.jsx)(tl,{className:"h-2 w-2 fill-current"})})}),t]}));ZV.displayName=wR.displayName;var JV=ui.forwardRef(({className:e,inset:t,...o},r)=>(0,Gt.jsx)(vR,{ref:r,className:P("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));JV.displayName=vR.displayName;var eB=ui.forwardRef(({className:e,...t},o)=>(0,Gt.jsx)(SR,{ref:o,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));eB.displayName=SR.displayName;var tB=({className:e,...t})=>(0,Gt.jsx)("span",{className:P("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});tB.displayName="DropdownMenuShortcut";var Rr=R(M());var oB=R(M());var ci=R(N()),sY=K("relative overflow-hidden bg-muted",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"},size:{xs:"h-1",sm:"h-1.5",default:"h-2",md:"h-2.5",lg:"h-3",xl:"h-4"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},animation:{default:"[&>div]:transition-all [&>div]:duration-500",smooth:"[&>div]:transition-all [&>div]:duration-700",fast:"[&>div]:transition-all [&>div]:duration-300",none:""}},defaultVariants:{variant:"default",size:"default",radius:"full",animation:"default"}}),lY=K("h-full w-full flex-1",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",error:"bg-error"},animation:{default:"transition-all duration-500",smooth:"transition-all duration-700",fast:"transition-all duration-300",none:""}},defaultVariants:{variant:"primary",animation:"default"}}),qx=oB.forwardRef(({className:e,value:t=0,variant:o,size:r,radius:n,animation:a,indicatorVariant:i,showValueLabel:s=!1,valueLabel:l,labelClassName:u,indeterminate:c=!1,max:d=100,...f},p)=>{let g=Math.max(0,Math.min(t,d)),m=d>0?g/d*100:0,x=l||`${Math.round(m)}%`;return(0,ci.jsxs)(ci.Fragment,{children:[s&&(0,ci.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,ci.jsx)("span",{className:P("text-sm font-medium text-muted-foreground",u),children:x})}),(0,ci.jsx)("div",{ref:p,className:P("moonui-theme",sY({variant:o,size:r,radius:n,animation:a}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:g,...f,children:(0,ci.jsx)("div",{className:P(lY({variant:i||"primary",animation:a}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-m}%)`}})})]})});qx.displayName="Progress";var ve=R(N()),uY=e=>e.startsWith("image/")?(0,ve.jsx)(rl,{className:"h-4 w-4"}):e.startsWith("video/")?(0,ve.jsx)(Gf,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,ve.jsx)(Of,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,ve.jsx)(Lf,{className:"h-4 w-4"}):(0,ve.jsx)(Tf,{className:"h-4 w-4"}),IR=e=>{if(e===0)return"0 Bytes";let t=1024,o=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+o[r]},cY=({uploadedFile:e,onRemove:t})=>{let{id:o,file:r,progress:n,status:a,preview:i}=e;return(0,ve.jsxs)(Be.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-3 p-3 border rounded-lg bg-background",children:[(0,ve.jsx)("div",{className:"flex-shrink-0",children:i?(0,ve.jsx)("img",{src:i,alt:r.name,className:"h-10 w-10 object-cover rounded"}):(0,ve.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:uY(r.type)})}),(0,ve.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ve.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ve.jsx)("p",{className:"text-sm font-medium truncate",children:r.name}),(0,ve.jsx)(De,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(o),"aria-label":`Remove ${r.name}`,children:(0,ve.jsx)(hr,{className:"h-3 w-3"})})]}),(0,ve.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,ve.jsx)("p",{className:"text-xs text-muted-foreground",children:IR(r.size)}),a==="uploading"&&(0,ve.jsxs)(Zo,{variant:"secondary",className:"h-5",children:[(0,ve.jsx)(Vt,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,ve.jsxs)(Zo,{variant:"success",className:"h-5",children:[(0,ve.jsx)(Hi,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,ve.jsxs)(Zo,{variant:"destructive",className:"h-5",children:[(0,ve.jsx)(Cn,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,ve.jsx)("div",{className:"mt-2",children:(0,ve.jsx)(qx,{value:n,className:"h-1"})})]})]})},rB=Rr.default.forwardRef(({accept:e="*",multiple:t=!0,maxSize:o=10*1024*1024,maxFiles:r=5,disabled:n=!1,className:a,onUpload:i,onRemove:s,children:l,...u},c)=>{let[d,f]=(0,Rr.useState)([]),[p,g]=(0,Rr.useState)(!1),[m,x]=(0,Rr.useState)(null),h=I=>I.size>o?`File size exceeds ${IR(o)}`:e!=="*"&&!e.split(",").some(L=>{let T=L.trim();return T.includes("*")?I.type.startsWith(T.replace("*","")):I.type===T})?"File type not supported":null,v=(0,Rr.useCallback)(async I=>{let L=Array.from(I);if(x(null),d.length+L.length>r){x(`Maximum ${r} files allowed`);return}let T=[],k=[];if(L.forEach(_=>{let D=h(_);D?k.push(`${_.name}: ${D}`):T.push(_)}),k.length>0){x(k.join(", "));return}let E=T.map((_,D)=>({id:`${Date.now()}-${D}-${_.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:_,progress:0,status:"uploading",preview:_.type.startsWith("image/")?URL.createObjectURL(_):void 0}));f(_=>[..._,...E]);for(let _ of E){let D=0,z=setInterval(()=>{D+=15+_.file.size%10,D>=100?(D=100,clearInterval(z),f(F=>F.map(O=>O.id===_.id?{...O,progress:100,status:"success"}:O))):f(F=>F.map(O=>O.id===_.id?{...O,progress:D}:O))},200)}if(i)try{await i(E)}catch(_){console.error("Upload failed:",_),f(D=>D.map(z=>E.some(F=>F.id===z.id)?{...z,status:"error"}:z))}},[d.length,r,o,e,i]),y=(0,Rr.useCallback)(I=>{if(I.preventDefault(),g(!1),n)return;let L=I.dataTransfer.files;L.length>0&&v(L)},[v,n]),w=(0,Rr.useCallback)(I=>{I.preventDefault(),n||g(!0)},[n]),C=(0,Rr.useCallback)(I=>{I.preventDefault(),g(!1)},[]),b=(0,Rr.useCallback)(I=>{let L=I.target.files;L&&L.length>0&&v(L),I.target.value=""},[v]),S=(0,Rr.useCallback)(I=>{f(L=>{let T=L.find(k=>k.id===I);return T?.preview&&URL.revokeObjectURL(T.preview),L.filter(k=>k.id!==I)}),s&&s(I)},[s]);return(0,ve.jsxs)("div",{ref:c,className:P("moonui-theme","space-y-4",a),...u,children:[(0,ve.jsxs)(Be.div,{className:P("relative border-2 border-dashed rounded-lg p-8 text-center transition-colors",p&&"border-primary bg-primary/5",n&&"opacity-50 cursor-not-allowed",!n&&"hover:border-primary/50 cursor-pointer"),onDrop:y,onDragOver:w,onDragLeave:C,animate:{scale:p?1.02:1,borderColor:p?"hsl(var(--primary))":"hsl(var(--border))"},children:[(0,ve.jsx)("input",{type:"file",accept:e,multiple:t,disabled:n,onChange:b,"aria-label":t?"Choose files to upload":"Choose a file to upload",className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,ve.jsxs)("div",{className:"space-y-4",children:[(0,ve.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,ve.jsx)(zf,{className:"h-full w-full"})}),(0,ve.jsxs)("div",{children:[(0,ve.jsx)("p",{className:"text-lg font-medium",children:p?"Drop files here":"Upload files"}),(0,ve.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,ve.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",r," files, ",IR(o)," each"]})]}),(0,ve.jsx)(De,{variant:"outline",disabled:n,children:"Select Files"})]})]}),(0,ve.jsx)(za,{children:m&&(0,ve.jsxs)(Be.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-2 text-sm text-destructive",children:[(0,ve.jsx)(Cn,{className:"h-4 w-4"}),(0,ve.jsx)("span",{children:m})]})}),(0,ve.jsx)(za,{children:d.length>0&&(0,ve.jsxs)(Be.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,ve.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,ve.jsx)("div",{className:"space-y-2",children:(0,ve.jsx)(za,{children:d.map(I=>(0,ve.jsx)(cY,{uploadedFile:I,onRemove:S},I.id))})})]})})]})});rB.displayName="FileUpload";var nB=R(M());var $l=R(N()),aB=nB.default.forwardRef(({children:e,isOpen:t,onOpenChange:o,direction:r="up",threshold:n=50,className:a,overlayClassName:i,enableSwipeToClose:s=!0,...l},u)=>{let c=Lc(0),d=Lc(0),f=r==="up"||r==="down",p=f?c:d,g=wS(p,[0,n],[1,.5]),m=(v,y)=>{if(!s)return;let w=f?y.offset.y:y.offset.x,C=f?y.velocity.y:y.velocity.x,b=!1;switch(r){case"up":b=w>n||C>500;break;case"down":b=w<-n||C<-500;break;case"left":b=w>n||C>500;break;case"right":b=w<-n||C<-500;break}b?o(!1):SS(p,0,{type:"spring",stiffness:300,damping:20})},x=()=>{switch(r){case"up":return{y:"100%"};case"down":return{y:"-100%"};case"left":return{x:"100%"};case"right":return{x:"-100%"};default:return{y:"100%"}}},h=()=>f?{y:0}:{x:0};return t?(0,$l.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,$l.jsx)(Be.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>o(!1),className:P("absolute inset-0 bg-black/50",i)}),(0,$l.jsxs)(Be.div,{ref:u,drag:s?f?"y":"x":!1,dragConstraints:{top:r==="up"?0:void 0,bottom:r==="down"?0:void 0,left:r==="left"?0:void 0,right:r==="right"?0:void 0},dragElastic:.2,onDragEnd:m,style:{[f?"y":"x"]:p,opacity:g},initial:x(),animate:h(),exit:x(),transition:{type:"spring",damping:30,stiffness:300},className:P("absolute bg-background border shadow-lg",{"bottom-0 left-0 right-0 rounded-t-lg":r==="up","top-0 left-0 right-0 rounded-b-lg":r==="down","top-0 bottom-0 right-0 rounded-l-lg":r==="left","top-0 bottom-0 left-0 rounded-r-lg":r==="right"},a),...l,children:[(r==="up"||r==="down")&&(0,$l.jsx)("div",{className:"flex justify-center p-2",children:(0,$l.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});aB.displayName="GestureDrawer";var Rs=R(M());var Ze=R(N());function dY({className:e,size:t="md",showForks:o=!0,showWatchers:r=!1,repoUrl:n="https://github.com/moonui/moonui"}){let[a,i]=(0,Rs.useState)(null),[s,l]=(0,Rs.useState)(!0);(0,Rs.useEffect)(()=>{(async()=>{try{let g=await(await fetch("/api/github-stars")).json();i(g)}catch(p){console.error("Failed to fetch GitHub stats:",p),i({stars:1240,forks:89,watchers:156,isLive:!1})}finally{l(!1)}})()},[]);let u=f=>f>=1e3?(f/1e3).toFixed(1)+"k":f.toString(),c={sm:"text-sm gap-2",md:"text-base gap-3",lg:"text-lg gap-4"},d={sm:14,md:16,lg:20};return s?(0,Ze.jsxs)("div",{className:P("flex items-center animate-pulse",c[t],e),children:[(0,Ze.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ze.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Ze.jsx)("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),o&&(0,Ze.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ze.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Ze.jsx)("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):a?(0,Ze.jsxs)("div",{className:P("flex items-center",c[t],e),children:[(0,Ze.jsxs)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Ze.jsx)(Ui,{className:"fill-current text-yellow-500",size:d[t]}),(0,Ze.jsx)("span",{className:"font-medium",children:u(a.stars)})]}),o&&(0,Ze.jsxs)("a",{href:`${n}/network/members`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Ze.jsx)(kf,{size:d[t]}),(0,Ze.jsx)("span",{className:"font-medium",children:u(a.forks)})]}),r&&(0,Ze.jsxs)("a",{href:`${n}/watchers`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Ze.jsx)(ol,{size:d[t]}),(0,Ze.jsx)("span",{className:"font-medium",children:u(a.watchers)})]}),!a.isLive&&(0,Ze.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function CTe({className:e,size:t="md",repoUrl:o="https://github.com/moonui/moonui"}){let[r,n]=(0,Rs.useState)(null),[a,i]=(0,Rs.useState)(!0);(0,Rs.useEffect)(()=>{(async()=>{try{let c=await(await fetch("/api/github-stars")).json();n(c.stars)}catch(u){console.error("Failed to fetch GitHub stats:",u),n(1240)}finally{i(!1)}})()},[]);let s=l=>l>=1e3?(l/1e3).toFixed(1)+"k":l.toString();return(0,Ze.jsx)(De,{variant:"outline",size:t,className:P("moonui-theme","group",e),asChild:!0,children:(0,Ze.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,Ze.jsx)(Ui,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,Ze.jsx)("span",{children:"Star on GitHub"}),!a&&r&&(0,Ze.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-800 rounded-full text-xs font-medium",children:s(r)}),(0,Ze.jsx)(Pf,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var Kl=R(M());var Se=R(M(),1),Kx=R(M(),1),Vn=R(M(),1),fY=Object.defineProperty,pY=Object.defineProperties,mY=Object.getOwnPropertyDescriptors,$x=Object.getOwnPropertySymbols,sB=Object.prototype.hasOwnProperty,lB=Object.prototype.propertyIsEnumerable,iB=(e,t,o)=>t in e?fY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,gY=(e,t)=>{for(var o in t||(t={}))sB.call(t,o)&&iB(e,o,t[o]);if($x)for(var o of $x(t))lB.call(t,o)&&iB(e,o,t[o]);return e},hY=(e,t)=>pY(e,mY(t)),vY=(e,t)=>{var o={};for(var r in e)sB.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&$x)for(var r of $x(e))t.indexOf(r)<0&&lB.call(e,r)&&(o[r]=e[r]);return o};function xY(e){let t=setTimeout(e,0),o=setTimeout(e,10),r=setTimeout(e,50);return[t,o,r]}function yY(e){let t=Kx.useRef();return Kx.useEffect(()=>{t.current=e}),t.current}var wY=18,uB=40,CY=`${uB}px`,SY=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function bY({containerRef:e,inputRef:t,pushPasswordManagerStrategy:o,isFocused:r}){let[n,a]=Vn.useState(!1),[i,s]=Vn.useState(!1),[l,u]=Vn.useState(!1),c=Vn.useMemo(()=>o==="none"?!1:(o==="increase-width"||o==="experimental-no-flickering")&&n&&i,[n,i,o]),d=Vn.useCallback(()=>{let f=e.current,p=t.current;if(!f||!p||l||o==="none")return;let g=f,m=g.getBoundingClientRect().left+g.offsetWidth,x=g.getBoundingClientRect().top+g.offsetHeight/2,h=m-wY,v=x;document.querySelectorAll(SY).length===0&&document.elementFromPoint(h,v)===f||(a(!0),u(!0))},[e,t,l,o]);return Vn.useEffect(()=>{let f=e.current;if(!f||o==="none")return;function p(){let m=window.innerWidth-f.getBoundingClientRect().right;s(m>=uB)}p();let g=setInterval(p,1e3);return()=>{clearInterval(g)}},[e,o]),Vn.useEffect(()=>{let f=r||document.activeElement===t.current;if(o==="none"||!f)return;let p=setTimeout(d,0),g=setTimeout(d,2e3),m=setTimeout(d,5e3),x=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(p),clearTimeout(g),clearTimeout(m),clearTimeout(x)}},[t,r,o,d]),{hasPWMBadge:n,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:CY}}var PR=Se.createContext({}),LR=Se.forwardRef((e,t)=>{var o=e,{value:r,onChange:n,maxLength:a,textAlign:i="left",pattern:s,placeholder:l,inputMode:u="numeric",onComplete:c,pushPasswordManagerStrategy:d="increase-width",pasteTransformer:f,containerClassName:p,noScriptCSSFallback:g=RY,render:m,children:x}=o,h=vY(o,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),v,y,w,C,b;let[S,I]=Se.useState(typeof h.defaultValue=="string"?h.defaultValue:""),L=r??S,T=yY(L),k=Se.useCallback(J=>{n?.(J),I(J)},[n]),E=Se.useMemo(()=>s?typeof s=="string"?new RegExp(s):s:null,[s]),_=Se.useRef(null),D=Se.useRef(null),z=Se.useRef({value:L,onChange:k,isIOS:typeof window<"u"&&((y=(v=window?.CSS)==null?void 0:v.supports)==null?void 0:y.call(v,"-webkit-touch-callout","none"))}),F=Se.useRef({prev:[(w=_.current)==null?void 0:w.selectionStart,(C=_.current)==null?void 0:C.selectionEnd,(b=_.current)==null?void 0:b.selectionDirection]});Se.useImperativeHandle(t,()=>_.current,[]),Se.useEffect(()=>{let J=_.current,ie=D.current;if(!J||!ie)return;z.current.value!==J.value&&z.current.onChange(J.value),F.current.prev=[J.selectionStart,J.selectionEnd,J.selectionDirection];function ze(){if(document.activeElement!==J){V(null),oe(null);return}let Ne=J.selectionStart,Ct=J.selectionEnd,qn=J.selectionDirection,Mo=J.maxLength,un=J.value,Lr=F.current.prev,cn=-1,$n=-1,Kn;if(un.length!==0&&Ne!==null&&Ct!==null){let hd=Ne===Ct,vd=Ne===un.length&&un.length<Mo;if(hd&&!vd){let Tr=Ne;if(Tr===0)cn=0,$n=1,Kn="forward";else if(Tr===Mo)cn=Tr-1,$n=Tr,Kn="backward";else if(Mo>1&&un.length>1){let xd=0;if(Lr[0]!==null&&Lr[1]!==null){Kn=Tr<Lr[1]?"backward":"forward";let ky=Lr[0]===Lr[1]&&Lr[0]<Mo;Kn==="backward"&&!ky&&(xd=-1)}cn=xd+Tr,$n=xd+Tr+1}}cn!==-1&&$n!==-1&&cn!==$n&&_.current.setSelectionRange(cn,$n,Kn)}let Vm=cn!==-1?cn:Ne,ou=$n!==-1?$n:Ct,vi=Kn??qn;V(Vm),oe(ou),F.current.prev=[Vm,ou,vi]}if(document.addEventListener("selectionchange",ze,{capture:!0}),ze(),document.activeElement===J&&te(!0),!document.getElementById("input-otp-style")){let Ne=document.createElement("style");if(Ne.id="input-otp-style",document.head.appendChild(Ne),Ne.sheet){let Ct="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";wm(Ne.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),wm(Ne.sheet,`[data-input-otp]:autofill { ${Ct} }`),wm(Ne.sheet,`[data-input-otp]:-webkit-autofill { ${Ct} }`),wm(Ne.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),wm(Ne.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Ke=()=>{ie&&ie.style.setProperty("--root-height",`${J.clientHeight}px`)};Ke();let Lt=new ResizeObserver(Ke);return Lt.observe(J),()=>{document.removeEventListener("selectionchange",ze,{capture:!0}),Lt.disconnect()}},[]);let[O,B]=Se.useState(!1),[A,te]=Se.useState(!1),[ae,V]=Se.useState(null),[Q,oe]=Se.useState(null);Se.useEffect(()=>{xY(()=>{var J,ie,ze,Ke;(J=_.current)==null||J.dispatchEvent(new Event("input"));let Lt=(ie=_.current)==null?void 0:ie.selectionStart,Ne=(ze=_.current)==null?void 0:ze.selectionEnd,Ct=(Ke=_.current)==null?void 0:Ke.selectionDirection;Lt!==null&&Ne!==null&&(V(Lt),oe(Ne),F.current.prev=[Lt,Ne,Ct])})},[L,A]),Se.useEffect(()=>{T!==void 0&&L!==T&&T.length<a&&L.length===a&&c?.(L)},[a,c,T,L]);let Y=bY({containerRef:D,inputRef:_,pushPasswordManagerStrategy:d,isFocused:A}),ce=Se.useCallback(J=>{let ie=J.currentTarget.value.slice(0,a);if(ie.length>0&&E&&!E.test(ie)){J.preventDefault();return}typeof T=="string"&&ie.length<T.length&&document.dispatchEvent(new Event("selectionchange")),k(ie)},[a,k,T,E]),U=Se.useCallback(()=>{var J;if(_.current){let ie=Math.min(_.current.value.length,a-1),ze=_.current.value.length;(J=_.current)==null||J.setSelectionRange(ie,ze),V(ie),oe(ze)}te(!0)},[a]),ne=Se.useCallback(J=>{var ie,ze;let Ke=_.current;if(!f&&(!z.current.isIOS||!J.clipboardData||!Ke))return;let Lt=J.clipboardData.getData("text/plain"),Ne=f?f(Lt):Lt;J.preventDefault();let Ct=(ie=_.current)==null?void 0:ie.selectionStart,qn=(ze=_.current)==null?void 0:ze.selectionEnd,Mo=(Ct!==qn?L.slice(0,Ct)+Ne+L.slice(qn):L.slice(0,Ct)+Ne+L.slice(Ct)).slice(0,a);if(Mo.length>0&&E&&!E.test(Mo))return;Ke.value=Mo,k(Mo);let un=Math.min(Mo.length,a-1),Lr=Mo.length;Ke.setSelectionRange(un,Lr),V(un),oe(Lr)},[a,k,E,L]),he=Se.useMemo(()=>({position:"relative",cursor:h.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[h.disabled]),xe=Se.useMemo(()=>({position:"absolute",inset:0,width:Y.willPushPWMBadge?`calc(100% + ${Y.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:Y.willPushPWMBadge?`inset(0 ${Y.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[Y.PWM_BADGE_SPACE_WIDTH,Y.willPushPWMBadge,i]),pe=Se.useMemo(()=>Se.createElement("input",hY(gY({autoComplete:h.autoComplete||"one-time-code"},h),{"data-input-otp":!0,"data-input-otp-placeholder-shown":L.length===0||void 0,"data-input-otp-mss":ae,"data-input-otp-mse":Q,inputMode:u,pattern:E?.source,"aria-placeholder":l,style:xe,maxLength:a,value:L,ref:_,onPaste:J=>{var ie;ne(J),(ie=h.onPaste)==null||ie.call(h,J)},onChange:ce,onMouseOver:J=>{var ie;B(!0),(ie=h.onMouseOver)==null||ie.call(h,J)},onMouseLeave:J=>{var ie;B(!1),(ie=h.onMouseLeave)==null||ie.call(h,J)},onFocus:J=>{var ie;U(),(ie=h.onFocus)==null||ie.call(h,J)},onBlur:J=>{var ie;te(!1),(ie=h.onBlur)==null||ie.call(h,J)}})),[ce,U,ne,u,xe,a,Q,ae,h,E?.source,L]),X=Se.useMemo(()=>({slots:Array.from({length:a}).map((J,ie)=>{var ze;let Ke=A&&ae!==null&&Q!==null&&(ae===Q&&ie===ae||ie>=ae&&ie<Q),Lt=L[ie]!==void 0?L[ie]:null,Ne=L[0]!==void 0?null:(ze=l?.[ie])!=null?ze:null;return{char:Lt,placeholderChar:Ne,isActive:Ke,hasFakeCaret:Ke&&Lt===null}}),isFocused:A,isHovering:!h.disabled&&O}),[A,O,a,Q,ae,h.disabled,L]),Ie=Se.useMemo(()=>m?m(X):Se.createElement(PR.Provider,{value:X},x),[x,X,m]);return Se.createElement(Se.Fragment,null,g!==null&&Se.createElement("noscript",null,Se.createElement("style",null,g)),Se.createElement("div",{ref:D,"data-input-otp-container":!0,style:he,className:p},Ie,Se.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},pe)))});LR.displayName="Input";function wm(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var RY=`
|
|
66
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,o?.key)}return n}}function ge(e,t,o,r){return{debug:()=>{var n;return(n=e?.debugAll)!=null?n:e[t]},key:!1,onChange:r}}function xK(e,t,o,r){let n=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${o.id}`,row:t,column:o,getValue:()=>t.getValue(r),renderValue:n,getContext:me(()=>[e,o,t,a],(i,s,l,u)=>({table:i,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),ge(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,o,t,e)},{}),a}function yK(e,t,o,r){var n,a;let s={...e._getDefaultColumnDef(),...t},l=s.accessorKey,u=(n=(a=s.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?n:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:l&&(l.includes(".")?c=f=>{let p=f;for(let m of l.split(".")){var g;p=(g=p)==null?void 0:g[m]}return p}:c=f=>f[s.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:r,depth:o,columnDef:s,columns:[],getFlatColumns:me(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},ge(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:me(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=d.columns)!=null&&p.length){let g=d.columns.flatMap(m=>m.getLeafColumns());return f(g)}return[d]},ge(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var Po="debugHeaders";function v_(e,t,o){var r;let a={id:(r=o.id)!=null?r:t.id,column:t,index:o.index,isPlaceholder:!!o.isPlaceholder,placeholderId:o.placeholderId,depth:o.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let i=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),i.push(l)};return s(a),i},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}var wK={createTable:e=>{e.getHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,n)=>{var a,i;let s=(a=r?.map(d=>o.find(f=>f.id===d)).filter(Boolean))!=null?a:[],l=(i=n?.map(d=>o.find(f=>f.id===d)).filter(Boolean))!=null?i:[],u=o.filter(d=>!(r!=null&&r.includes(d.id))&&!(n!=null&&n.includes(d.id)));return Ox(t,[...s,...u,...l],e)},ge(e.options,Po,"getHeaderGroups")),e.getCenterHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,n)=>(o=o.filter(a=>!(r!=null&&r.includes(a.id))&&!(n!=null&&n.includes(a.id))),Ox(t,o,e,"center")),ge(e.options,Po,"getCenterHeaderGroups")),e.getLeftHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,o,r)=>{var n;let a=(n=r?.map(i=>o.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return Ox(t,a,e,"left")},ge(e.options,Po,"getLeftHeaderGroups")),e.getRightHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,o,r)=>{var n;let a=(n=r?.map(i=>o.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return Ox(t,a,e,"right")},ge(e.options,Po,"getRightHeaderGroups")),e.getFooterGroups=me(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ge(e.options,Po,"getFooterGroups")),e.getLeftFooterGroups=me(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ge(e.options,Po,"getLeftFooterGroups")),e.getCenterFooterGroups=me(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ge(e.options,Po,"getCenterFooterGroups")),e.getRightFooterGroups=me(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ge(e.options,Po,"getRightFooterGroups")),e.getFlatHeaders=me(()=>[e.getHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Po,"getFlatHeaders")),e.getLeftFlatHeaders=me(()=>[e.getLeftHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Po,"getLeftFlatHeaders")),e.getCenterFlatHeaders=me(()=>[e.getCenterHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Po,"getCenterFlatHeaders")),e.getRightFlatHeaders=me(()=>[e.getRightHeaderGroups()],t=>t.map(o=>o.headers).flat(),ge(e.options,Po,"getRightFlatHeaders")),e.getCenterLeafHeaders=me(()=>[e.getCenterFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ge(e.options,Po,"getCenterLeafHeaders")),e.getLeftLeafHeaders=me(()=>[e.getLeftFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ge(e.options,Po,"getLeftLeafHeaders")),e.getRightLeafHeaders=me(()=>[e.getRightFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ge(e.options,Po,"getRightLeafHeaders")),e.getLeafHeaders=me(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,o,r)=>{var n,a,i,s,l,u;return[...(n=(a=t[0])==null?void 0:a.headers)!=null?n:[],...(i=(s=o[0])==null?void 0:s.headers)!=null?i:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},ge(e.options,Po,"getLeafHeaders"))}};function Ox(e,t,o,r){var n,a;let i=0,s=function(f,p){p===void 0&&(p=1),i=Math.max(i,p),f.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&s(g.columns,p+1)},0)};s(e);let l=[],u=(f,p)=>{let g={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(x=>{let h=[...m].reverse()[0],v=x.column.depth===g.depth,y,w=!1;if(v&&x.column.parent?y=x.column.parent:(y=x.column,w=!0),h&&h?.column===y)h.subHeaders.push(x);else{let C=v_(o,y,{id:[r,p,y.id,x?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${m.filter(b=>b.column===y).length}`:void 0,depth:p,index:m.length});C.subHeaders.push(x),m.push(C)}g.headers.push(x),x.headerGroup=g}),l.push(g),p>0&&u(m,p-1)},c=t.map((f,p)=>v_(o,f,{depth:i,index:p}));u(c,i-1),l.reverse();let d=f=>f.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,x=0,h=[0];g.subHeaders&&g.subHeaders.length?(h=[],d(g.subHeaders).forEach(y=>{let{colSpan:w,rowSpan:C}=y;m+=w,h.push(C)})):m=1;let v=Math.min(...h);return x=x+v,g.colSpan=m,g.rowSpan=x,{colSpan:m,rowSpan:x}});return d((n=(a=l[0])==null?void 0:a.headers)!=null?n:[]),l}var Qb=(e,t,o,r,n,a,i)=>{let s={id:t,index:r,original:o,depth:n,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return s._valuesCache[l]=u.accessorFn(s.original,r),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=u.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=s.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:a??[],getLeafRows:()=>vK(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],u=s;for(;;){let c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:me(()=>[e.getAllLeafColumns()],l=>l.map(u=>xK(e,s,u,u.id)),ge(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:me(()=>[s.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),ge(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){let u=e._features[l];u==null||u.createRow==null||u.createRow(s,e)}return s},CK={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},y_=(e,t,o)=>{var r,n;let a=o==null||(r=o.toString())==null?void 0:r.toLowerCase();return!!(!((n=e.getValue(t))==null||(n=n.toString())==null||(n=n.toLowerCase())==null)&&n.includes(a))};y_.autoRemove=e=>_n(e);var w_=(e,t,o)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(o))};w_.autoRemove=e=>_n(e);var C_=(e,t,o)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===o?.toLowerCase()};C_.autoRemove=e=>_n(e);var S_=(e,t,o)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(o)};S_.autoRemove=e=>_n(e);var b_=(e,t,o)=>!o.some(r=>{var n;return!((n=e.getValue(t))!=null&&n.includes(r))});b_.autoRemove=e=>_n(e)||!(e!=null&&e.length);var R_=(e,t,o)=>o.some(r=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(r)});R_.autoRemove=e=>_n(e)||!(e!=null&&e.length);var I_=(e,t,o)=>e.getValue(t)===o;I_.autoRemove=e=>_n(e);var P_=(e,t,o)=>e.getValue(t)==o;P_.autoRemove=e=>_n(e);var Zb=(e,t,o)=>{let[r,n]=o,a=e.getValue(t);return a>=r&&a<=n};Zb.resolveFilterValue=e=>{let[t,o]=e,r=typeof t!="number"?parseFloat(t):t,n=typeof o!="number"?parseFloat(o):o,a=t===null||Number.isNaN(r)?-1/0:r,i=o===null||Number.isNaN(n)?1/0:n;if(a>i){let s=a;a=i,i=s}return[a,i]};Zb.autoRemove=e=>_n(e)||_n(e[0])&&_n(e[1]);var li={includesString:y_,includesStringSensitive:w_,equalsString:C_,arrIncludes:S_,arrIncludesAll:b_,arrIncludesSome:R_,equals:I_,weakEquals:P_,inNumberRange:Zb};function _n(e){return e==null||e===""}var SK={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:br("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let o=t.getCoreRowModel().flatRows[0],r=o?.getValue(e.id);return typeof r=="string"?li.includesString:typeof r=="number"?li.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?li.equals:Array.isArray(r)?li.arrIncludes:li.weakEquals},e.getFilterFn=()=>{var o,r;return Vx(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(o=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?o:li[e.columnDef.filterFn]},e.getCanFilter=()=>{var o,r,n;return((o=e.columnDef.enableColumnFilter)!=null?o:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var o;return(o=t.getState().columnFilters)==null||(o=o.find(r=>r.id===e.id))==null?void 0:o.value},e.getFilterIndex=()=>{var o,r;return(o=(r=t.getState().columnFilters)==null?void 0:r.findIndex(n=>n.id===e.id))!=null?o:-1},e.setFilterValue=o=>{t.setColumnFilters(r=>{let n=e.getFilterFn(),a=r?.find(c=>c.id===e.id),i=Cs(o,a?a.value:void 0);if(x_(n,i,e)){var s;return(s=r?.filter(c=>c.id!==e.id))!=null?s:[]}let l={id:e.id,value:i};if(a){var u;return(u=r?.map(c=>c.id===e.id?l:c))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let o=e.getAllLeafColumns(),r=n=>{var a;return(a=Cs(t,n))==null?void 0:a.filter(i=>{let s=o.find(l=>l.id===i.id);if(s){let l=s.getFilterFn();if(x_(l,i.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var o,r;e.setColumnFilters(t?[]:(o=(r=e.initialState)==null?void 0:r.columnFilters)!=null?o:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function x_(e,t,o){return(e&&e.autoRemove?e.autoRemove(t,o):!1)||typeof t>"u"||typeof t=="string"&&!t}var bK=(e,t,o)=>o.reduce((r,n)=>{let a=n.getValue(e);return r+(typeof a=="number"?a:0)},0),RK=(e,t,o)=>{let r;return o.forEach(n=>{let a=n.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}),r},IK=(e,t,o)=>{let r;return o.forEach(n=>{let a=n.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}),r},PK=(e,t,o)=>{let r,n;return o.forEach(a=>{let i=a.getValue(e);i!=null&&(r===void 0?i>=i&&(r=n=i):(r>i&&(r=i),n<i&&(n=i)))}),[r,n]},LK=(e,t)=>{let o=0,r=0;if(t.forEach(n=>{let a=n.getValue(e);a!=null&&(a=+a)>=a&&(++o,r+=a)}),o)return r/o},TK=(e,t)=>{if(!t.length)return;let o=t.map(a=>a.getValue(e));if(!hK(o))return;if(o.length===1)return o[0];let r=Math.floor(o.length/2),n=o.sort((a,i)=>a-i);return o.length%2!==0?n[r]:(n[r-1]+n[r])/2},kK=(e,t)=>Array.from(new Set(t.map(o=>o.getValue(e))).values()),MK=(e,t)=>new Set(t.map(o=>o.getValue(e))).size,EK=(e,t)=>t.length,Bb={sum:bK,min:RK,max:IK,extent:PK,mean:LK,median:TK,unique:kK,uniqueCount:MK,count:EK},AK={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,o;return(t=(o=e.getValue())==null||o.toString==null?void 0:o.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:br("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(o=>o!=null&&o.includes(e.id)?o.filter(r=>r!==e.id):[...o??[],e.id])},e.getCanGroup=()=>{var o,r;return((o=e.columnDef.enableGrouping)!=null?o:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var o;return(o=t.getState().grouping)==null?void 0:o.includes(e.id)},e.getGroupedIndex=()=>{var o;return(o=t.getState().grouping)==null?void 0:o.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let o=e.getCanGroup();return()=>{o&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let o=t.getCoreRowModel().flatRows[0],r=o?.getValue(e.id);if(typeof r=="number")return Bb.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Bb.extent},e.getAggregationFn=()=>{var o,r;if(!e)throw new Error;return Vx(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(o=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?o:Bb[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var o,r;e.setGrouping(t?[]:(o=(r=e.initialState)==null?void 0:r.grouping)!=null?o:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=o=>{if(e._groupingValuesCache.hasOwnProperty(o))return e._groupingValuesCache[o];let r=t.getColumn(o);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[o]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[o]):e.getValue(o)},e._groupingValuesCache={}},createCell:(e,t,o,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===o.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var n;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((n=o.subRows)!=null&&n.length)}}};function DK(e,t,o){if(!(t!=null&&t.length)||!o)return e;let r=e.filter(a=>!t.includes(a.id));return o==="remove"?r:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...r]}var NK={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:br("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=me(o=>[fm(t,o)],o=>o.findIndex(r=>r.id===e.id),ge(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=o=>{var r;return((r=fm(t,o)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=o=>{var r;let n=fm(t,o);return((r=n[n.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var o;e.setColumnOrder(t?[]:(o=e.initialState.columnOrder)!=null?o:[])},e._getOrderColumnsFn=me(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,o,r)=>n=>{let a=[];if(!(t!=null&&t.length))a=n;else{let i=[...t],s=[...n];for(;s.length&&i.length;){let l=i.shift(),u=s.findIndex(c=>c.id===l);u>-1&&a.push(s.splice(u,1)[0])}a=[...a,...s]}return DK(a,o,r)},ge(e.options,"debugTable","_getOrderColumnsFn"))}},Hb=()=>({left:[],right:[]}),OK={getInitialState:e=>({columnPinning:Hb(),...e}),getDefaultOptions:e=>({onColumnPinningChange:br("columnPinning",e)}),createColumn:(e,t)=>{e.pin=o=>{let r=e.getLeafColumns().map(n=>n.id).filter(Boolean);t.setColumnPinning(n=>{var a,i;if(o==="right"){var s,l;return{left:((s=n?.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=n?.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(o==="left"){var u,c;return{left:[...((u=n?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=n?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((a=n?.left)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),right:((i=n?.right)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var n,a,i;return((n=r.columnDef.enablePinning)!=null?n:!0)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{let o=e.getLeafColumns().map(s=>s.id),{left:r,right:n}=t.getState().columnPinning,a=o.some(s=>r?.includes(s)),i=o.some(s=>n?.includes(s));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var o,r;let n=e.getIsPinned();return n?(o=(r=t.getState().columnPinning)==null||(r=r[n])==null?void 0:r.indexOf(e.id))!=null?o:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(o,r,n)=>{let a=[...r??[],...n??[]];return o.filter(i=>!a.includes(i.column.id))},ge(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(o,r)=>(r??[]).map(a=>o.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),ge(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(o,r)=>(r??[]).map(a=>o.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),ge(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var o,r;return e.setColumnPinning(t?Hb():(o=(r=e.initialState)==null?void 0:r.columnPinning)!=null?o:Hb())},e.getIsSomeColumnsPinned=t=>{var o;let r=e.getState().columnPinning;if(!t){var n,a;return!!((n=r.left)!=null&&n.length||(a=r.right)!=null&&a.length)}return!!((o=r[t])!=null&&o.length)},e.getLeftLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,o)=>(o??[]).map(r=>t.find(n=>n.id===r)).filter(Boolean),ge(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,o)=>(o??[]).map(r=>t.find(n=>n.id===r)).filter(Boolean),ge(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r)=>{let n=[...o??[],...r??[]];return t.filter(a=>!n.includes(a.id))},ge(e.options,"debugColumns","getCenterLeafColumns"))}};function FK(e){return e||(typeof document<"u"?document:null)}var Fx={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Ub=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),_K={getDefaultColumnDef:()=>Fx,getInitialState:e=>({columnSizing:{},columnSizingInfo:Ub(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:br("columnSizing",e),onColumnSizingInfoChange:br("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var o,r,n;let a=t.getState().columnSizing[e.id];return Math.min(Math.max((o=e.columnDef.minSize)!=null?o:Fx.minSize,(r=a??e.columnDef.size)!=null?r:Fx.size),(n=e.columnDef.maxSize)!=null?n:Fx.maxSize)},e.getStart=me(o=>[o,fm(t,o),t.getState().columnSizing],(o,r)=>r.slice(0,e.getIndex(o)).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getStart")),e.getAfter=me(o=>[o,fm(t,o),t.getState().columnSizing],(o,r)=>r.slice(e.getIndex(o)+1).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(o=>{let{[e.id]:r,...n}=o;return n})},e.getCanResize=()=>{var o,r;return((o=e.columnDef.enableResizing)!=null?o:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let o=0,r=n=>{if(n.subHeaders.length)n.subHeaders.forEach(r);else{var a;o+=(a=n.column.getSize())!=null?a:0}};return r(e),o},e.getStart=()=>{if(e.index>0){let o=e.headerGroup.headers[e.index-1];return o.getStart()+o.getSize()}return 0},e.getResizeHandler=o=>{let r=t.getColumn(e.column.id),n=r?.getCanResize();return a=>{if(!r||!n||(a.persist==null||a.persist(),zb(a)&&a.touches&&a.touches.length>1))return;let i=e.getSize(),s=e?e.getLeafHeaders().map(h=>[h.column.id,h.column.getSize()]):[[r.id,r.getSize()]],l=zb(a)?Math.round(a.touches[0].clientX):a.clientX,u={},c=(h,v)=>{typeof v=="number"&&(t.setColumnSizingInfo(y=>{var w,C;let b=t.options.columnResizeDirection==="rtl"?-1:1,S=(v-((w=y?.startOffset)!=null?w:0))*b,I=Math.max(S/((C=y?.startSize)!=null?C:0),-.999999);return y.columnSizingStart.forEach(L=>{let[T,k]=L;u[T]=Math.round(Math.max(k+k*I,0)*100)/100}),{...y,deltaOffset:S,deltaPercentage:I}}),(t.options.columnResizeMode==="onChange"||h==="end")&&t.setColumnSizing(y=>({...y,...u})))},d=h=>c("move",h),f=h=>{c("end",h),t.setColumnSizingInfo(v=>({...v,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=FK(o),g={moveHandler:h=>d(h.clientX),upHandler:h=>{p?.removeEventListener("mousemove",g.moveHandler),p?.removeEventListener("mouseup",g.upHandler),f(h.clientX)}},m={moveHandler:h=>(h.cancelable&&(h.preventDefault(),h.stopPropagation()),d(h.touches[0].clientX),!1),upHandler:h=>{var v;p?.removeEventListener("touchmove",m.moveHandler),p?.removeEventListener("touchend",m.upHandler),h.cancelable&&(h.preventDefault(),h.stopPropagation()),f((v=h.touches[0])==null?void 0:v.clientX)}},x=VK()?{passive:!1}:!1;zb(a)?(p?.addEventListener("touchmove",m.moveHandler,x),p?.addEventListener("touchend",m.upHandler,x)):(p?.addEventListener("mousemove",g.moveHandler,x),p?.addEventListener("mouseup",g.upHandler,x)),t.setColumnSizingInfo(h=>({...h,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var o;e.setColumnSizing(t?{}:(o=e.initialState.columnSizing)!=null?o:{})},e.resetHeaderSizeInfo=t=>{var o;e.setColumnSizingInfo(t?Ub():(o=e.initialState.columnSizingInfo)!=null?o:Ub())},e.getTotalSize=()=>{var t,o;return(t=(o=e.getHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,o;return(t=(o=e.getLeftHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,o;return(t=(o=e.getCenterHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,o;return(t=(o=e.getRightHeaderGroups()[0])==null?void 0:o.headers.reduce((r,n)=>r+n.getSize(),0))!=null?t:0}}},_x=null;function VK(){if(typeof _x=="boolean")return _x;let e=!1;try{let t={get passive(){return e=!0,!1}},o=()=>{};window.addEventListener("test",o,t),window.removeEventListener("test",o)}catch{e=!1}return _x=e,_x}function zb(e){return e.type==="touchstart"}var BK={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:br("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=o=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:o??!e.getIsVisible()}))},e.getIsVisible=()=>{var o,r;let n=e.columns;return(o=n.length?n.some(a=>a.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?o:!0},e.getCanHide=()=>{var o,r;return((o=e.columnDef.enableHiding)!=null?o:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>o=>{e.toggleVisibility==null||e.toggleVisibility(o.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=me(()=>[e.getAllCells(),t.getState().columnVisibility],o=>o.filter(r=>r.column.getIsVisible()),ge(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=me(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(o,r,n)=>[...o,...r,...n],ge(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(o,r)=>me(()=>[r(),r().filter(n=>n.getIsVisible()).map(n=>n.id).join("_")],n=>n.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),ge(e.options,"debugColumns",o));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=o=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(o),e.resetColumnVisibility=o=>{var r;e.setColumnVisibility(o?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=o=>{var r;o=(r=o)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((n,a)=>({...n,[a.id]:o||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(o=>!(o.getIsVisible!=null&&o.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(o=>o.getIsVisible==null?void 0:o.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>o=>{var r;e.toggleAllColumnsVisible((r=o.target)==null?void 0:r.checked)}}};function fm(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var HK={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},UK={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:br("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var o;let r=(o=e.getCoreRowModel().flatRows[0])==null||(o=o._getAllCellsByColumnId()[t.id])==null?void 0:o.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var o,r,n,a;return((o=e.columnDef.enableGlobalFilter)!=null?o:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>li.includesString,e.getGlobalFilterFn=()=>{var t,o;let{globalFilterFn:r}=e.options;return Vx(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(o=e.options.filterFns)==null?void 0:o[r])!=null?t:li[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},zK={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:br("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,o=!1;e._autoResetExpanded=()=>{var r,n;if(!t){e._queue(()=>{t=!0});return}if((r=(n=e.options.autoResetAll)!=null?n:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(o)return;o=!0,e._queue(()=>{e.resetExpanded(),o=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var n,a;e.setExpanded(r?{}:(n=(a=e.initialState)==null?void 0:a.expanded)!=null?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{let r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(n=>!n.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{let i=a.split(".");r=Math.max(r,i.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=o=>{t.setExpanded(r=>{var n;let a=r===!0?!0:!!(r!=null&&r[e.id]),i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=r,o=(n=o)!=null?n:!a,!a&&o)return{...i,[e.id]:!0};if(a&&!o){let{[e.id]:s,...l}=i;return l}return r})},e.getIsExpanded=()=>{var o;let r=t.getState().expanded;return!!((o=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?o:r===!0||r?.[e.id])},e.getCanExpand=()=>{var o,r,n;return(o=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?o:((r=t.options.enableExpanding)!=null?r:!0)&&!!((n=e.subRows)!=null&&n.length)},e.getIsAllParentsExpanded=()=>{let o=!0,r=e;for(;o&&r.parentId;)r=t.getRow(r.parentId,!0),o=r.getIsExpanded();return o},e.getToggleExpandedHandler=()=>{let o=e.getCanExpand();return()=>{o&&e.toggleExpanded()}}}},qb=0,$b=10,Gb=()=>({pageIndex:qb,pageSize:$b}),GK={getInitialState:e=>({...e,pagination:{...Gb(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:br("pagination",e)}),createTable:e=>{let t=!1,o=!1;e._autoResetPageIndex=()=>{var r,n;if(!t){e._queue(()=>{t=!0});return}if((r=(n=e.options.autoResetAll)!=null?n:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(o)return;o=!0,e._queue(()=>{e.resetPageIndex(),o=!1})}},e.setPagination=r=>{let n=a=>Cs(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=r=>{var n;e.setPagination(r?Gb():(n=e.initialState.pagination)!=null?n:Gb())},e.setPageIndex=r=>{e.setPagination(n=>{let a=Cs(r,n.pageIndex),i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...n,pageIndex:a}})},e.resetPageIndex=r=>{var n,a;e.setPageIndex(r?qb:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?n:qb)},e.resetPageSize=r=>{var n,a;e.setPageSize(r?$b:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?n:$b)},e.setPageSize=r=>{e.setPagination(n=>{let a=Math.max(1,Cs(r,n.pageSize)),i=n.pageSize*n.pageIndex,s=Math.floor(i/a);return{...n,pageIndex:s,pageSize:a}})},e.setPageCount=r=>e.setPagination(n=>{var a;let i=Cs(r,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=me(()=>[e.getPageCount()],r=>{let n=[];return r&&r>0&&(n=[...new Array(r)].fill(null).map((a,i)=>i)),n},ge(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:r}=e.getState().pagination,n=e.getPageCount();return n===-1?!0:n===0?!1:r<n-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Wb=()=>({top:[],bottom:[]}),WK={getInitialState:e=>({rowPinning:Wb(),...e}),getDefaultOptions:e=>({onRowPinningChange:br("rowPinning",e)}),createRow:(e,t)=>{e.pin=(o,r,n)=>{let a=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],i=n?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],s=new Set([...i,e.id,...a]);t.setRowPinning(l=>{var u,c;if(o==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(m=>!(s!=null&&s.has(m))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)]}}if(o==="top"){var p,g;return{top:[...((p=l?.top)!=null?p:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((g=l?.bottom)!=null?g:[]).filter(m=>!(s!=null&&s.has(m)))}}return{top:((u=l?.top)!=null?u:[]).filter(m=>!(s!=null&&s.has(m))),bottom:((c=l?.bottom)!=null?c:[]).filter(m=>!(s!=null&&s.has(m)))}})},e.getCanPin=()=>{var o;let{enableRowPinning:r,enablePinning:n}=t.options;return typeof r=="function"?r(e):(o=r??n)!=null?o:!0},e.getIsPinned=()=>{let o=[e.id],{top:r,bottom:n}=t.getState().rowPinning,a=o.some(s=>r?.includes(s)),i=o.some(s=>n?.includes(s));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var o,r;let n=e.getIsPinned();if(!n)return-1;let a=(o=n==="top"?t.getTopRows():t.getBottomRows())==null?void 0:o.map(i=>{let{id:s}=i;return s});return(r=a?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var o,r;return e.setRowPinning(t?Wb():(o=(r=e.initialState)==null?void 0:r.rowPinning)!=null?o:Wb())},e.getIsSomeRowsPinned=t=>{var o;let r=e.getState().rowPinning;if(!t){var n,a;return!!((n=r.top)!=null&&n.length||(a=r.bottom)!=null&&a.length)}return!!((o=r[t])!=null&&o.length)},e._getPinnedRows=(t,o,r)=>{var n;return((n=e.options.keepPinnedRows)==null||n?(o??[]).map(i=>{let s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(o??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,o)=>e._getPinnedRows(t,o,"top"),ge(e.options,"debugRows","getTopRows")),e.getBottomRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,o)=>e._getPinnedRows(t,o,"bottom"),ge(e.options,"debugRows","getBottomRows")),e.getCenterRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,o,r)=>{let n=new Set([...o??[],...r??[]]);return t.filter(a=>!n.has(a.id))},ge(e.options,"debugRows","getCenterRows"))}},jK={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:br("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var o;return e.setRowSelection(t?{}:(o=e.initialState.rowSelection)!=null?o:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(o=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();let r={...o},n=e.getPreGroupedRowModel().flatRows;return t?n.forEach(a=>{a.getCanSelect()&&(r[a.id]=!0)}):n.forEach(a=>{delete r[a.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(o=>{let r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),n={...o};return e.getRowModel().rows.forEach(a=>{Kb(n,a.id,r,!0,e)}),n}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=me(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,o)=>Object.keys(t).length?jb(e,o):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=me(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,o)=>Object.keys(t).length?jb(e,o):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=me(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,o)=>Object.keys(t).length?jb(e,o):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:o}=e.getState(),r=!!(t.length&&Object.keys(o).length);return r&&t.some(n=>n.getCanSelect()&&!o[n.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(n=>n.getCanSelect()),{rowSelection:o}=e.getState(),r=!!t.length;return r&&t.some(n=>!o[n.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;let o=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return o>0&&o<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(o=>o.getCanSelect()).some(o=>o.getIsSelected()||o.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(o,r)=>{let n=e.getIsSelected();t.setRowSelection(a=>{var i;if(o=typeof o<"u"?o:!n,e.getCanSelect()&&n===o)return a;let s={...a};return Kb(s,e.id,o,(i=r?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:o}=t.getState();return Jb(e,o)},e.getIsSomeSelected=()=>{let{rowSelection:o}=t.getState();return Xb(e,o)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:o}=t.getState();return Xb(e,o)==="all"},e.getCanSelect=()=>{var o;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(o=t.options.enableRowSelection)!=null?o:!0},e.getCanSelectSubRows=()=>{var o;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(o=t.options.enableSubRowSelection)!=null?o:!0},e.getCanMultiSelect=()=>{var o;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(o=t.options.enableMultiRowSelection)!=null?o:!0},e.getToggleSelectedHandler=()=>{let o=e.getCanSelect();return r=>{var n;o&&e.toggleSelected((n=r.target)==null?void 0:n.checked)}}}},Kb=(e,t,o,r,n)=>{var a;let i=n.getRow(t,!0);o?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>Kb(e,s.id,o,r,n))};function jb(e,t){let o=e.getState().rowSelection,r=[],n={},a=function(i,s){return i.map(l=>{var u;let c=Jb(l,o);if(c&&(r.push(l),n[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:a(l.subRows)}),c)return l}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:n}}function Jb(e,t){var o;return(o=t[e.id])!=null?o:!1}function Xb(e,t,o){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let n=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!n)&&(i.getCanSelect()&&(Jb(i,t)?a=!0:n=!1),i.subRows&&i.subRows.length)){let s=Xb(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),n=!1)}}),n?"all":a?"some":!1}var Yb=/([0-9]+)/gm,qK=(e,t,o)=>L_(Ss(e.getValue(o)).toLowerCase(),Ss(t.getValue(o)).toLowerCase()),$K=(e,t,o)=>L_(Ss(e.getValue(o)),Ss(t.getValue(o))),KK=(e,t,o)=>eR(Ss(e.getValue(o)).toLowerCase(),Ss(t.getValue(o)).toLowerCase()),XK=(e,t,o)=>eR(Ss(e.getValue(o)),Ss(t.getValue(o))),YK=(e,t,o)=>{let r=e.getValue(o),n=t.getValue(o);return r>n?1:r<n?-1:0},QK=(e,t,o)=>eR(e.getValue(o),t.getValue(o));function eR(e,t){return e===t?0:e>t?1:-1}function Ss(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function L_(e,t){let o=e.split(Yb).filter(Boolean),r=t.split(Yb).filter(Boolean);for(;o.length&&r.length;){let n=o.shift(),a=r.shift(),i=parseInt(n,10),s=parseInt(a,10),l=[i,s].sort();if(isNaN(l[0])){if(n>a)return 1;if(a>n)return-1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>s)return 1;if(s>i)return-1}return o.length-r.length}var dm={alphanumeric:qK,alphanumericCaseSensitive:$K,text:KK,textCaseSensitive:XK,datetime:YK,basic:QK},ZK={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:br("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let o=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let n of o){let a=n?.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return dm.datetime;if(typeof a=="string"&&(r=!0,a.split(Yb).length>1))return dm.alphanumeric}return r?dm.text:dm.basic},e.getAutoSortDir=()=>{let o=t.getFilteredRowModel().flatRows[0];return typeof o?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var o,r;if(!e)throw new Error;return Vx(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(o=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?o:dm[e.columnDef.sortingFn]},e.toggleSorting=(o,r)=>{let n=e.getNextSortingOrder(),a=typeof o<"u"&&o!==null;t.setSorting(i=>{let s=i?.find(p=>p.id===e.id),l=i?.findIndex(p=>p.id===e.id),u=[],c,d=a?o:n==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":i!=null&&i.length&&l!==i.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(a||n||(c="remove")),c==="add"){var f;u=[...i,{id:e.id,desc:d}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=i.map(p=>p.id===e.id?{...p,desc:d}:p):c==="remove"?u=i.filter(p=>p.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var o,r;return((o=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?o:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=o=>{var r,n;let a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((r=t.options.enableSortingRemoval)==null||r)&&(!(o&&(n=t.options.enableMultiRemove)!=null)||n)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var o,r;return((o=e.columnDef.enableSorting)!=null?o:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var o,r;return(o=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?o:!!e.accessorFn},e.getIsSorted=()=>{var o;let r=(o=t.getState().sorting)==null?void 0:o.find(n=>n.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var o,r;return(o=(r=t.getState().sorting)==null?void 0:r.findIndex(n=>n.id===e.id))!=null?o:-1},e.clearSorting=()=>{t.setSorting(o=>o!=null&&o.length?o.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{let o=e.getCanSort();return r=>{o&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var o,r;e.setSorting(t?[]:(o=(r=e.initialState)==null?void 0:r.sorting)!=null?o:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},JK=[wK,BK,NK,OK,CK,SK,HK,UK,ZK,AK,zK,GK,WK,jK,_K];function T_(e){var t,o;let r=[...JK,...(t=e._features)!=null?t:[]],n={_features:r},a=n._features.reduce((f,p)=>Object.assign(f,p.getDefaultOptions==null?void 0:p.getDefaultOptions(n)),{}),i=f=>n.options.mergeOptions?n.options.mergeOptions(a,f):{...a,...f},l={...{},...(o=e.initialState)!=null?o:{}};n._features.forEach(f=>{var p;l=(p=f.getInitialState==null?void 0:f.getInitialState(l))!=null?p:l});let u=[],c=!1,d={_features:r,options:{...a,...e},initialState:l,_queue:f=>{u.push(f),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{n.setState(n.initialState)},setOptions:f=>{let p=Cs(f,n.options);n.options=i(p)},getState:()=>n.options.state,setState:f=>{n.options.onStateChange==null||n.options.onStateChange(f)},_getRowId:(f,p,g)=>{var m;return(m=n.options.getRowId==null?void 0:n.options.getRowId(f,p,g))!=null?m:`${g?[g.id,p].join("."):p}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(f,p)=>{let g=(p?n.getPrePaginationRowModel():n.getRowModel()).rowsById[f];if(!g&&(g=n.getCoreRowModel().rowsById[f],!g))throw new Error;return g},_getDefaultColumnDef:me(()=>[n.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:g=>{let m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,x;return(m=(x=g.renderValue())==null||x.toString==null?void 0:x.toString())!=null?m:null},...n._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},ge(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>n.options.columns,getAllColumns:me(()=>[n._getColumnDefs()],f=>{let p=function(g,m,x){return x===void 0&&(x=0),g.map(h=>{let v=yK(n,h,x,m),y=h;return v.columns=y.columns?p(y.columns,v,x+1):[],v})};return p(f)},ge(e,"debugColumns","getAllColumns")),getAllFlatColumns:me(()=>[n.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),ge(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:me(()=>[n.getAllFlatColumns()],f=>f.reduce((p,g)=>(p[g.id]=g,p),{}),ge(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:me(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(f,p)=>{let g=f.flatMap(m=>m.getLeafColumns());return p(g)},ge(e,"debugColumns","getAllLeafColumns")),getColumn:f=>n._getAllFlatColumnsById()[f]};Object.assign(n,d);for(let f=0;f<n._features.length;f++){let p=n._features[f];p==null||p.createTable==null||p.createTable(n)}return n}function k_(){return e=>me(()=>[e.options.data],t=>{let o={rows:[],flatRows:[],rowsById:{}},r=function(n,a,i){a===void 0&&(a=0);let s=[];for(let u=0;u<n.length;u++){let c=Qb(e,e._getRowId(n[u],u,i),n[u],u,a,void 0,i?.id);if(o.flatRows.push(c),o.rowsById[c.id]=c,s.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(n[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=r(c.originalSubRows,a+1,c))}}return s};return o.rows=r(t),o},ge(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function eX(e){let t=[],o=r=>{var n;t.push(r),(n=r.subRows)!=null&&n.length&&r.getIsExpanded()&&r.subRows.forEach(o)};return e.rows.forEach(o),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function tX(e,t,o){return o.options.filterFromLeafRows?oX(e,t,o):rX(e,t,o)}function oX(e,t,o){var r;let n=[],a={},i=(r=o.options.maxLeafRowFilterDepth)!=null?r:100,s=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){var d;let p=l[f],g=Qb(o,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(g.columnFilters=p.columnFilters,(d=p.subRows)!=null&&d.length&&u<i){if(g.subRows=s(p.subRows,u+1),p=g,t(p)&&!g.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}if(t(p)||g.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}}else p=g,t(p)&&(c.push(p),a[p.id]=p,n.push(p))}return c};return{rows:s(e),flatRows:n,rowsById:a}}function rX(e,t,o){var r;let n=[],a={},i=(r=o.options.maxLeafRowFilterDepth)!=null?r:100,s=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){let p=l[f];if(t(p)){var d;if((d=p.subRows)!=null&&d.length&&u<i){let m=Qb(o,p.id,p.original,p.index,p.depth,void 0,p.parentId);m.subRows=s(p.subRows,u+1),p=m}c.push(p),n.push(p),a[p.id]=p}}return c};return{rows:s(e),flatRows:n,rowsById:a}}function M_(){return e=>me(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,o,r)=>{if(!t.rows.length||!(o!=null&&o.length)&&!r){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}let n=[],a=[];(o??[]).forEach(f=>{var p;let g=e.getColumn(f.id);if(!g)return;let m=g.getFilterFn();m&&n.push({id:f.id,filterFn:m,resolvedValue:(p=m.resolveFilterValue==null?void 0:m.resolveFilterValue(f.value))!=null?p:f.value})});let i=(o??[]).map(f=>f.id),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&s&&l.length&&(i.push("__global__"),l.forEach(f=>{var p;a.push({id:f.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let u,c;for(let f=0;f<t.flatRows.length;f++){let p=t.flatRows[f];if(p.columnFilters={},n.length)for(let g=0;g<n.length;g++){u=n[g];let m=u.id;p.columnFilters[m]=u.filterFn(p,m,u.resolvedValue,x=>{p.columnFiltersMeta[m]=x})}if(a.length){for(let g=0;g<a.length;g++){c=a[g];let m=c.id;if(c.filterFn(p,m,c.resolvedValue,x=>{p.columnFiltersMeta[m]=x})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}let d=f=>{for(let p=0;p<i.length;p++)if(f.columnFilters[i[p]]===!1)return!1;return!0};return tX(t.rows,d,e)},ge(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function E_(e){return t=>me(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(o,r)=>{if(!r.rows.length)return r;let{pageSize:n,pageIndex:a}=o,{rows:i,flatRows:s,rowsById:l}=r,u=n*a,c=u+n;i=i.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:i,flatRows:s,rowsById:l}:d=eX({rows:i,flatRows:s,rowsById:l}),d.flatRows=[];let f=p=>{d.flatRows.push(p),p.subRows.length&&p.subRows.forEach(f)};return d.rows.forEach(f),d},ge(t.options,"debugTable","getPaginationRowModel"))}function A_(){return e=>me(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,o)=>{if(!o.rows.length||!(t!=null&&t.length))return o;let r=e.getState().sorting,n=[],a=r.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),i={};a.forEach(l=>{let u=e.getColumn(l.id);u&&(i[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});let s=l=>{let u=l.map(c=>({...c}));return u.sort((c,d)=>{for(let p=0;p<a.length;p+=1){var f;let g=a[p],m=i[g.id],x=m.sortUndefined,h=(f=g?.desc)!=null?f:!1,v=0;if(x){let y=c.getValue(g.id),w=d.getValue(g.id),C=y===void 0,b=w===void 0;if(C||b){if(x==="first")return C?-1:1;if(x==="last")return C?1:-1;v=C&&b?0:C?x:-x}}if(v===0&&(v=m.sortingFn(c,d,g.id)),v!==0)return h&&(v*=-1),m.invertSorting&&(v*=-1),v}return c.index-d.index}),u.forEach(c=>{var d;n.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=s(c.subRows))}),u};return{rows:s(o.rows),flatRows:n,rowsById:o.rowsById}},ge(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function tR(e,t){return e?nX(e)?pm.createElement(e,t):e:null}function nX(e){return aX(e)||typeof e=="function"||iX(e)}function aX(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function iX(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function D_(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=pm.useState(()=>({current:T_(t)})),[r,n]=pm.useState(()=>o.current.initialState);return o.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{n(i),e.onStateChange==null||e.onStateChange(i)}})),o.current}var Lo=R(M());var ct=R(N()),sX=K("w-full caption-bottom text-sm",{variants:{variant:{default:"dark:text-gray-200",bordered:"border border-border dark:border-gray-700",striped:"dark:text-gray-200",card:"border border-border dark:border-gray-700 rounded-md shadow-sm dark:shadow-gray-900/20",minimal:"border-none dark:text-gray-200"},size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),Bx=Lo.forwardRef(({className:e,variant:t,size:o,loading:r,emptyContent:n,...a},i)=>{let s=t==="striped",l=Lo.Children.map(a.children,u=>{if(Lo.isValidElement(u)&&u.type==="tbody"){let c=u.props;return Lo.cloneElement(u,{className:P(c.className,s&&"even:[&>tr]:bg-muted/50")})}return u});return(0,ct.jsxs)("div",{className:"relative w-full overflow-auto",children:[r&&(0,ct.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,ct.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,ct.jsx)("table",{ref:i,className:P(sX({variant:t,size:o}),r&&"opacity-70",e),...a,children:l})]})});Bx.displayName="Table";var Hx=Lo.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("thead",{ref:o,className:P("moonui-theme","[&_tr]:border-b",e),...t}));Hx.displayName="TableHeader";var Ux=Lo.forwardRef(({className:e,emptyContent:t,emptyMessage:o="No data available",children:r,...n},a)=>{let i=Lo.Children.count(r)>0;return(0,ct.jsx)("tbody",{ref:a,className:P("moonui-theme","[&_tr:last-child]:border-0",e),...n,children:i?r:(0,ct.jsx)("tr",{children:(0,ct.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,ct.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,ct.jsx)("div",{className:"text-sm",children:o})})})})})});Ux.displayName="TableBody";var N_=Lo.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("tfoot",{ref:o,className:P("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));N_.displayName="TableFooter";var Kc=Lo.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("tr",{ref:o,className:P("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Kc.displayName="TableRow";var zx=Lo.forwardRef(({className:e,sortable:t,sorted:o,onSort:r,align:n="left",children:a,...i},s)=>{let l=()=>t?o==="asc"?(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):o==="desc"?(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})}):(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block opacity-30",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})}):null,u={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};return(0,ct.jsx)("th",{ref:s,className:P("h-10 px-4 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",u[n].split(" ")[0],t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?r:void 0,...i,children:t||n!=="left"?(0,ct.jsxs)("div",{className:P("flex items-center",u[n].split(" ")[1]),children:[a,t&&l()]}):a})});zx.displayName="TableHead";var mm=Lo.forwardRef(({className:e,align:t="left",...o},r)=>{let n={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,ct.jsx)("td",{ref:r,className:P("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",n,e),...o})});mm.displayName="TableCell";var O_=Lo.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("caption",{ref:o,className:P("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));O_.displayName="TableCaption";var Me=R(N());function lX({columns:e,data:t,enableSorting:o=!0,enablePagination:r=!0,enableSearch:n=!0,pageSize:a=10,searchPlaceholder:i="Search...",emptyMessage:s="No results found.",className:l}){let[u,c]=oR.useState([]),[d,f]=oR.useState(""),p=D_({data:t,columns:e,onSortingChange:o?c:void 0,onGlobalFilterChange:n?f:void 0,getCoreRowModel:k_(),getPaginationRowModel:r?E_():void 0,getSortedRowModel:o?A_():void 0,getFilteredRowModel:n?M_():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:a}}});return(0,Me.jsxs)("div",{className:P("space-y-4",l),children:[n&&(0,Me.jsx)("div",{className:"flex items-center",children:(0,Me.jsxs)("div",{className:"relative max-w-sm",children:[(0,Me.jsx)(nl,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Me.jsx)(bo,{placeholder:i,value:d,onChange:g=>f(g.target.value),className:"pl-8"})]})}),(0,Me.jsx)("div",{className:"rounded-md border",children:(0,Me.jsxs)(Bx,{children:[(0,Me.jsx)(Hx,{children:p.getHeaderGroups().map(g=>(0,Me.jsx)(Kc,{children:g.headers.map(m=>(0,Me.jsx)(zx,{children:m.isPlaceholder?null:(0,Me.jsxs)("div",{className:P("flex items-center gap-2",m.column.getCanSort()&&"cursor-pointer select-none"),onClick:m.column.getToggleSortingHandler(),children:[tR(m.column.columnDef.header,m.getContext()),o&&m.column.getCanSort()&&(0,Me.jsx)("div",{className:"ml-auto",children:m.column.getIsSorted()==="desc"?(0,Me.jsx)(Fu,{className:"h-4 w-4"}):m.column.getIsSorted()==="asc"?(0,Me.jsx)(Vu,{className:"h-4 w-4"}):(0,Me.jsx)(_u,{className:"h-4 w-4 opacity-50"})})]})},m.id))},g.id))}),(0,Me.jsx)(Ux,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(g=>(0,Me.jsx)(Kc,{"data-state":g.getIsSelected()&&"selected",children:g.getVisibleCells().map(m=>(0,Me.jsx)(mm,{children:tR(m.column.columnDef.cell,m.getContext())},m.id))},g.id)):(0,Me.jsx)(Kc,{children:(0,Me.jsx)(mm,{colSpan:e.length,className:"h-24 text-center",children:s})})})]})}),r&&(0,Me.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Me.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[p.getFilteredRowModel().rows.length," row(s)"]}),(0,Me.jsxs)("div",{className:"space-x-2",children:[(0,Me.jsxs)(De,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Me.jsx)(wn,{className:"h-4 w-4"}),"Previous"]}),(0,Me.jsxs)("span",{className:"text-sm",children:["Page ",p.getState().pagination.pageIndex+1," of"," ",p.getPageCount()]}),(0,Me.jsxs)(De,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Me.jsx)(No,{className:"h-4 w-4"})]})]})]})]})}function uX(e){return({column:t})=>(0,Me.jsxs)(De,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Me.jsx)(Fu,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Me.jsx)(Vu,{className:"ml-2 h-4 w-4"}):(0,Me.jsx)(_u,{className:"ml-2 h-4 w-4"})]})}var Et=R(M());var ye=R(N()),cX={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},rR=K("w-full justify-start text-left font-normal",{variants:{variant:{default:"",outline:"border-2",ghost:"hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-sm",lg:"h-12 px-6 text-base",icon:"h-10 w-10"},state:{default:"",error:"border-destructive focus:ring-destructive",success:"border-success focus:ring-success",warning:"border-warning focus:ring-warning"}},defaultVariants:{variant:"default",size:"default",state:"default"}}),nR=Et.forwardRef(function({className:t,variant:o,size:r,state:n,value:a,onChange:i,placeholder:s="Pick a date",formatString:l="PPP",minDate:u,maxDate:c,disabledDates:d,disabledDaysOfWeek:f,showWeekNumbers:p,iconPosition:g="left",icon:m,allowClear:x=!0,readOnly:h=!1,showTodayButton:v=!0,calendarProps:y,disabled:w,...C},b){let[S,I]=Et.useState(!1),[L,T]=Et.useState(a);Et.useEffect(()=>{T(a)},[a]);let k=O=>{let B=Array.isArray(O)?O[0]:O&&typeof O=="object"&&"from"in O?O.from:O;T(B),i?.(B),B&&I(!1)},E=O=>{O.stopPropagation(),k(void 0)},_=()=>{k(new Date)},D=O=>!!(u&&O<u||c&&O>c||d?.some(B=>B.toDateString()===O.toDateString())||f?.includes(O.getDay())),z=L&&Wv(L)?Mn(L,l):null,F=m||(0,ye.jsx)(el,{className:"h-4 w-4"});return(0,ye.jsx)("div",{ref:b,className:"moonui-theme",children:(0,ye.jsxs)(oi,{open:S,onOpenChange:I,children:[(0,ye.jsx)(ri,{asChild:!0,children:(0,ye.jsxs)(De,{variant:o==="ghost"?"ghost":"outline",className:P(rR({variant:o,size:r,state:n}),!z&&"text-muted-foreground",t),disabled:w||h,...C,children:[(0,ye.jsx)(za,{mode:"wait",children:(0,ye.jsxs)(Be.div,{initial:{opacity:0,y:-2},animate:{opacity:1,y:0},exit:{opacity:0,y:2},transition:{duration:.15},className:"flex items-center gap-2 flex-1",children:[g==="left"&&F,(0,ye.jsx)("span",{className:"flex-1 truncate",children:z||s}),g==="right"&&F]},z||"placeholder")}),x&&z&&!h&&!w&&(0,ye.jsxs)(Be.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileHover:{scale:1.1},whileTap:{scale:.9},className:"ml-2 h-4 w-4 shrink-0 opacity-50 hover:opacity-100 transition-opacity cursor-pointer",onClick:E,role:"button",tabIndex:0,onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),E(O))},children:[(0,ye.jsx)("span",{className:"sr-only",children:"Clear date"}),(0,ye.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ye.jsx)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})]})]})}),(0,ye.jsx)(ha,{className:"w-[360px] p-0 shadow-2xl rounded-2xl border border-border bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,ye.jsxs)(Be.div,{...cX,className:"rounded-2xl bg-background overflow-hidden",children:[(0,ye.jsx)(Hp,{mode:"single",selected:L,onSelect:k,disabled:D,showOutsideDays:!1,className:P("rounded-2xl",y?.className),...y}),v&&(0,ye.jsx)("div",{className:"border-t px-4 py-3",children:(0,ye.jsx)(De,{variant:"ghost",size:"sm",onClick:_,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]})})});nR.displayName="DatePicker";var F_=Et.forwardRef(function({className:t,value:o,onChange:r,placeholder:n="Pick a date range",formatString:a="LLL dd, y",separator:i=" - ",...s},l){let[u,c]=Et.useState(!1),[d,f]=Et.useState(o);Et.useEffect(()=>{f(o)},[o]);let p=m=>{f(m),r?.(m),m?.from&&m?.to&&c(!1)},g=Et.useMemo(()=>d?.from?d?.to?`${Mn(d.from,a)}${i}${Mn(d.to,a)}`:Mn(d.from,a):null,[d,a,i]);return(0,ye.jsxs)(oi,{open:u,onOpenChange:c,children:[(0,ye.jsx)(ri,{asChild:!0,children:(0,ye.jsxs)(De,{ref:l,variant:s.variant==="ghost"?"ghost":"outline",className:P(rR({variant:s.variant,size:s.size,state:s.state}),!g&&"text-muted-foreground",t),disabled:s.disabled||s.readOnly,children:[(0,ye.jsx)(el,{className:"mr-2 h-4 w-4"}),(0,ye.jsx)("span",{className:"flex-1 truncate text-left",children:g||n})]})}),(0,ye.jsx)(ha,{className:"w-auto p-0 shadow-2xl rounded-2xl border border-border bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,ye.jsx)(Hp,{mode:"range",defaultMonth:d?.from,selected:d,onSelect:p,showOutsideDays:!1,...s.calendarProps,className:"rounded-2xl"})})]})});F_.displayName="DateRangePicker";var __=Et.forwardRef(function({value:t,onChange:o,formatString:r="PPP",showTimePicker:n=!0,timeFormat:a="24",timeInterval:i=15,...s},l){let[u,c]=Et.useState(t),[d,f]=Et.useState(t?Mn(t,a==="24"?"HH:mm":"hh:mm a"):"00:00"),p=x=>{if(!x){c(void 0),o?.(void 0);return}let[h,v]=d.split(":").map(Number);x.setHours(h,v),c(x),o?.(x)},g=x=>{let h=x.target.value;if(f(h),u){let[v,y]=h.split(":").map(Number),w=new Date(u);w.setHours(v,y),c(w),o?.(w)}},m=Et.useMemo(()=>{let x=[];for(let h=0;h<24;h++)for(let v=0;v<60;v+=i){let y=h.toString().padStart(2,"0"),w=v.toString().padStart(2,"0"),C=`${y}:${w}`;if(a==="12"){let b=h===0?12:h>12?h-12:h,S=h<12?"AM":"PM",I=`${b}:${w} ${S}`;x.push({value:C,label:I})}else x.push({value:C,label:C})}return x},[a,i]);return(0,ye.jsxs)("div",{ref:l,className:"flex flex-col gap-2",children:[(0,ye.jsx)(nR,{...s,value:u,onChange:p,formatString:r,showTodayButton:!1}),n&&u&&(0,ye.jsxs)(Be.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2",children:[(0,ye.jsx)(Cf,{className:"h-4 w-4 text-muted-foreground"}),(0,ye.jsx)("select",{value:d,onChange:g,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:m.map(x=>(0,ye.jsx)("option",{value:x.value,children:x.label},x.value))})]})]})});__.displayName="DateTimePicker";var V_=Et.forwardRef(function({value:t,onChange:o,placeholder:r="Pick a month",formatString:n="MMMM yyyy",...a},i){let[s,l]=Et.useState(!1),[u,c]=Et.useState(t||new Date),d=["January","February","March","April","May","June","July","August","September","October","November","December"],f=m=>{let x=new Date(u);x.setMonth(m),o?.(x),l(!1)},p=m=>{let x=new Date(u);x.setFullYear(x.getFullYear()+m),c(x)},g=t?Mn(t,n):null;return(0,ye.jsxs)(oi,{open:s,onOpenChange:l,children:[(0,ye.jsx)(ri,{asChild:!0,children:(0,ye.jsxs)(De,{ref:i,variant:a.variant==="default"?"outline":a.variant||"outline",className:P(rR({variant:a.variant,size:a.size,state:a.state}),!g&&"text-muted-foreground",a.className),disabled:a.disabled||a.readOnly,children:[(0,ye.jsx)(el,{className:"mr-2 h-4 w-4"}),g||r]})}),(0,ye.jsx)(ha,{className:"w-64 p-0 shadow-2xl border border-border bg-background !z-[9999]",align:"start",children:(0,ye.jsxs)("div",{className:"p-3",children:[(0,ye.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ye.jsx)(De,{variant:"outline",size:"icon","aria-label":`Previous year, ${u.getFullYear()-1}`,onClick:()=>p(-1),children:(0,ye.jsx)(wn,{className:"h-4 w-4"})}),(0,ye.jsx)("span",{className:"font-semibold",children:u.getFullYear()}),(0,ye.jsx)(De,{variant:"outline",size:"icon","aria-label":`Next year, ${u.getFullYear()+1}`,onClick:()=>p(1),children:(0,ye.jsx)(No,{className:"h-4 w-4"})})]}),(0,ye.jsx)("div",{className:"grid grid-cols-3 gap-2",children:d.map((m,x)=>(0,ye.jsx)(De,{variant:t&&t.getMonth()===x?"primary":"outline",size:"sm",onClick:()=>f(x),className:"h-8 text-xs",children:m.slice(0,3)},m))})]})})]})});V_.displayName="MonthPicker";var B_=R(M());var aR=R(N());function dX({items:e,onReorder:t,renderItem:o,keyExtractor:r,className:n,disabled:a=!1}){let[i,s]=B_.useState(null),l=(f,p)=>{a||(s(p),f.dataTransfer.effectAllowed="move")},u=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},c=(f,p)=>{if(f.preventDefault(),a||i===null||i===p){s(null);return}let g=[...e],m=g[i];g.splice(i,1),g.splice(p,0,m),t(g),s(null)},d=()=>{s(null)};return(0,aR.jsx)("div",{className:P("moonui-theme","space-y-2",n),children:e.map((f,p)=>(0,aR.jsx)("div",{draggable:!a,onDragStart:g=>l(g,p),onDragOver:u,onDrop:g=>c(g,p),onDragEnd:d,className:P("transition-opacity duration-200",!a&&"cursor-move hover:opacity-80",i===p&&"opacity-50",a&&"cursor-not-allowed"),children:o(f,p)},r(f)))})}var ui=R(M());var zt=R(M(),1);var le=R(M(),1);var we=R(N(),1),iR=["Enter"," "],fX=["ArrowDown","PageUp","Home"],U_=["ArrowUp","PageDown","End"],pX=[...fX,...U_],mX={ltr:[...iR,"ArrowRight"],rtl:[...iR,"ArrowLeft"]},gX={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xm="Menu",[hm,hX,vX]=Xn(xm),[ql,sR]=Oe(xm,[vX,$r,zc]),ym=$r(),z_=zc(),[G_,bs]=ql(xm),[xX,wm]=ql(xm),W_=e=>{let{__scopeMenu:t,open:o=!1,children:r,dir:n,onOpenChange:a,modal:i=!0}=e,s=ym(t),[l,u]=le.useState(null),c=le.useRef(!1),d=rt(a),f=oa(n);return le.useEffect(()=>{let p=()=>{c.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),(0,we.jsx)(Ja,{...s,children:(0,we.jsx)(G_,{scope:t,open:o,onOpenChange:d,content:l,onContentChange:u,children:(0,we.jsx)(xX,{scope:t,onClose:le.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:i,children:r})})})};W_.displayName=xm;var yX="MenuAnchor",lR=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,n=ym(o);return(0,we.jsx)(ei,{...n,...r,ref:t})});lR.displayName=yX;var uR="MenuPortal",[wX,j_]=ql(uR,{forceMount:void 0}),q_=e=>{let{__scopeMenu:t,forceMount:o,children:r,container:n}=e,a=bs(uR,t);return(0,we.jsx)(wX,{scope:t,forceMount:o,children:(0,we.jsx)(st,{present:o||a.open,children:(0,we.jsx)(Sr,{asChild:!0,container:n,children:r})})})};q_.displayName=uR;var Xr="MenuContent",[CX,cR]=ql(Xr),$_=le.forwardRef((e,t)=>{let o=j_(Xr,e.__scopeMenu),{forceMount:r=o.forceMount,...n}=e,a=bs(Xr,e.__scopeMenu),i=wm(Xr,e.__scopeMenu);return(0,we.jsx)(hm.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(st,{present:r||a.open,children:(0,we.jsx)(hm.Slot,{scope:e.__scopeMenu,children:i.modal?(0,we.jsx)(SX,{...n,ref:t}):(0,we.jsx)(bX,{...n,ref:t})})})})}),SX=le.forwardRef((e,t)=>{let o=bs(Xr,e.__scopeMenu),r=le.useRef(null),n=de(t,r);return le.useEffect(()=>{let a=r.current;if(a)return ms(a)},[]),(0,we.jsx)(dR,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),bX=le.forwardRef((e,t)=>{let o=bs(Xr,e.__scopeMenu);return(0,we.jsx)(dR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),RX=ur("MenuContent.ScrollLock"),dR=le.forwardRef((e,t)=>{let{__scopeMenu:o,loop:r=!1,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:g,...m}=e,x=bs(Xr,o),h=wm(Xr,o),v=ym(o),y=z_(o),w=hX(o),[C,b]=le.useState(null),S=le.useRef(null),I=de(t,S,x.onContentChange),L=le.useRef(0),T=le.useRef(""),k=le.useRef(0),E=le.useRef(null),_=le.useRef("right"),D=le.useRef(0),z=g?ti:le.Fragment,F=g?{as:RX,allowPinchZoom:!0}:void 0,O=A=>{let te=T.current+A,ae=w().filter(U=>!U.disabled),V=document.activeElement,Q=ae.find(U=>U.ref.current===V)?.textValue,oe=ae.map(U=>U.textValue),Y=FX(oe,te,Q),ce=ae.find(U=>U.textValue===Y)?.ref.current;(function U(ne){T.current=ne,window.clearTimeout(L.current),ne!==""&&(L.current=window.setTimeout(()=>U(""),1e3))})(te),ce&&setTimeout(()=>ce.focus())};le.useEffect(()=>()=>window.clearTimeout(L.current),[]),us();let B=le.useCallback(A=>_.current===E.current?.side&&VX(A,E.current?.area),[]);return(0,we.jsx)(CX,{scope:o,searchRef:T,onItemEnter:le.useCallback(A=>{B(A)&&A.preventDefault()},[B]),onItemLeave:le.useCallback(A=>{B(A)||(S.current?.focus(),b(null))},[B]),onTriggerLeave:le.useCallback(A=>{B(A)&&A.preventDefault()},[B]),pointerGraceTimerRef:k,onPointerGraceIntentChange:le.useCallback(A=>{E.current=A},[]),children:(0,we.jsx)(z,{...F,children:(0,we.jsx)(Qa,{asChild:!0,trapped:n,onMountAutoFocus:W(a,A=>{A.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,we.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,we.jsx)(Rx,{asChild:!0,...y,dir:h.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:b,onEntryFocus:W(l,A=>{h.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,we.jsx)(fs,{role:"menu","aria-orientation":"vertical","data-state":cV(x.open),"data-radix-menu-content":"",dir:h.dir,...v,...m,ref:I,style:{outline:"none",...m.style},onKeyDown:W(m.onKeyDown,A=>{let ae=A.target.closest("[data-radix-menu-content]")===A.currentTarget,V=A.ctrlKey||A.altKey||A.metaKey,Q=A.key.length===1;ae&&(A.key==="Tab"&&A.preventDefault(),!V&&Q&&O(A.key));let oe=S.current;if(A.target!==oe||!pX.includes(A.key))return;A.preventDefault();let ce=w().filter(U=>!U.disabled).map(U=>U.ref.current);U_.includes(A.key)&&ce.reverse(),NX(ce)}),onBlur:W(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(L.current),T.current="")}),onPointerMove:W(e.onPointerMove,vm(A=>{let te=A.target,ae=D.current!==A.clientX;if(A.currentTarget.contains(te)&&ae){let V=A.clientX>D.current?"right":"left";_.current=V,D.current=A.clientX}}))})})})})})})});$_.displayName=Xr;var IX="MenuGroup",fR=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,we.jsx)($.div,{role:"group",...r,ref:t})});fR.displayName=IX;var PX="MenuLabel",K_=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,we.jsx)($.div,{...r,ref:t})});K_.displayName=PX;var Gx="MenuItem",H_="menu.itemSelect",jx=le.forwardRef((e,t)=>{let{disabled:o=!1,onSelect:r,...n}=e,a=le.useRef(null),i=wm(Gx,e.__scopeMenu),s=cR(Gx,e.__scopeMenu),l=de(t,a),u=le.useRef(!1),c=()=>{let d=a.current;if(!o&&d){let f=new CustomEvent(H_,{bubbles:!0,cancelable:!0});d.addEventListener(H_,p=>r?.(p),{once:!0}),Nu(d,f),f.defaultPrevented?u.current=!1:i.onClose()}};return(0,we.jsx)(X_,{...n,ref:l,disabled:o,onClick:W(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:W(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:W(e.onKeyDown,d=>{let f=s.searchRef.current!=="";o||f&&d.key===" "||iR.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});jx.displayName=Gx;var X_=le.forwardRef((e,t)=>{let{__scopeMenu:o,disabled:r=!1,textValue:n,...a}=e,i=cR(Gx,o),s=z_(o),l=le.useRef(null),u=de(t,l),[c,d]=le.useState(!1),[f,p]=le.useState("");return le.useEffect(()=>{let g=l.current;g&&p((g.textContent??"").trim())},[a.children]),(0,we.jsx)(hm.ItemSlot,{scope:o,disabled:r,textValue:n??f,children:(0,we.jsx)(Ix,{asChild:!0,...s,focusable:!r,children:(0,we.jsx)($.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:W(e.onPointerMove,vm(g=>{r?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,vm(g=>i.onItemLeave(g))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),LX="MenuCheckboxItem",Y_=le.forwardRef((e,t)=>{let{checked:o=!1,onCheckedChange:r,...n}=e;return(0,we.jsx)(tV,{scope:e.__scopeMenu,checked:o,children:(0,we.jsx)(jx,{role:"menuitemcheckbox","aria-checked":Wx(o)?"mixed":o,...n,ref:t,"data-state":gR(o),onSelect:W(n.onSelect,()=>r?.(Wx(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Y_.displayName=LX;var Q_="MenuRadioGroup",[TX,kX]=ql(Q_,{value:void 0,onValueChange:()=>{}}),Z_=le.forwardRef((e,t)=>{let{value:o,onValueChange:r,...n}=e,a=rt(r);return(0,we.jsx)(TX,{scope:e.__scopeMenu,value:o,onValueChange:a,children:(0,we.jsx)(fR,{...n,ref:t})})});Z_.displayName=Q_;var J_="MenuRadioItem",eV=le.forwardRef((e,t)=>{let{value:o,...r}=e,n=kX(J_,e.__scopeMenu),a=o===n.value;return(0,we.jsx)(tV,{scope:e.__scopeMenu,checked:a,children:(0,we.jsx)(jx,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":gR(a),onSelect:W(r.onSelect,()=>n.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});eV.displayName=J_;var pR="MenuItemIndicator",[tV,MX]=ql(pR,{checked:!1}),oV=le.forwardRef((e,t)=>{let{__scopeMenu:o,forceMount:r,...n}=e,a=MX(pR,o);return(0,we.jsx)(st,{present:r||Wx(a.checked)||a.checked===!0,children:(0,we.jsx)($.span,{...n,ref:t,"data-state":gR(a.checked)})})});oV.displayName=pR;var EX="MenuSeparator",rV=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,we.jsx)($.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});rV.displayName=EX;var AX="MenuArrow",nV=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,n=ym(o);return(0,we.jsx)(ps,{...n,...r,ref:t})});nV.displayName=AX;var mR="MenuSub",[DX,aV]=ql(mR),iV=e=>{let{__scopeMenu:t,children:o,open:r=!1,onOpenChange:n}=e,a=bs(mR,t),i=ym(t),[s,l]=le.useState(null),[u,c]=le.useState(null),d=rt(n);return le.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,we.jsx)(Ja,{...i,children:(0,we.jsx)(G_,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:c,children:(0,we.jsx)(DX,{scope:t,contentId:Ae(),triggerId:Ae(),trigger:s,onTriggerChange:l,children:o})})})};iV.displayName=mR;var gm="MenuSubTrigger",sV=le.forwardRef((e,t)=>{let o=bs(gm,e.__scopeMenu),r=wm(gm,e.__scopeMenu),n=aV(gm,e.__scopeMenu),a=cR(gm,e.__scopeMenu),i=le.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},c=le.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return le.useEffect(()=>c,[c]),le.useEffect(()=>{let d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),(0,we.jsx)(lR,{asChild:!0,...u,children:(0,we.jsx)(X_,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":n.contentId,"data-state":cV(o.open),...e,ref:lr(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,vm(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!o.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{o.onOpenChange(!0),c()},100))})),onPointerLeave:W(e.onPointerLeave,vm(d=>{c();let f=o.content?.getBoundingClientRect();if(f){let p=o.content?.dataset.side,g=p==="right",m=g?-5:5,x=f[g?"left":"right"],h=f[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x,y:f.top},{x:h,y:f.top},{x:h,y:f.bottom},{x,y:f.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:W(e.onKeyDown,d=>{let f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||mX[r.dir].includes(d.key)&&(o.onOpenChange(!0),o.content?.focus(),d.preventDefault())})})})});sV.displayName=gm;var lV="MenuSubContent",uV=le.forwardRef((e,t)=>{let o=j_(Xr,e.__scopeMenu),{forceMount:r=o.forceMount,...n}=e,a=bs(Xr,e.__scopeMenu),i=wm(Xr,e.__scopeMenu),s=aV(lV,e.__scopeMenu),l=le.useRef(null),u=de(t,l);return(0,we.jsx)(hm.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(st,{present:r||a.open,children:(0,we.jsx)(hm.Slot,{scope:e.__scopeMenu,children:(0,we.jsx)(dR,{id:s.contentId,"aria-labelledby":s.triggerId,...n,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{i.isUsingKeyboardRef.current&&l.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:W(e.onFocusOutside,c=>{c.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:W(e.onEscapeKeyDown,c=>{i.onClose(),c.preventDefault()}),onKeyDown:W(e.onKeyDown,c=>{let d=c.currentTarget.contains(c.target),f=gX[i.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});uV.displayName=lV;function cV(e){return e?"open":"closed"}function Wx(e){return e==="indeterminate"}function gR(e){return Wx(e)?"indeterminate":e?"checked":"unchecked"}function NX(e){let t=document.activeElement;for(let o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function OX(e,t){return e.map((o,r)=>e[(t+r)%e.length])}function FX(e,t,o){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1,i=OX(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==o));let l=i.find(u=>u.toLowerCase().startsWith(n.toLowerCase()));return l!==o?l:void 0}function _X(e,t){let{x:o,y:r}=e,n=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],u=s.x,c=s.y,d=l.x,f=l.y;c>r!=f>r&&o<(d-u)*(r-c)/(f-c)+u&&(n=!n)}return n}function VX(e,t){if(!t)return!1;let o={x:e.clientX,y:e.clientY};return _X(o,t)}function vm(e){return t=>t.pointerType==="mouse"?e(t):void 0}var dV=W_,fV=lR,pV=q_,mV=$_,gV=fR,hV=K_,vV=jx,xV=Y_,yV=Z_,wV=eV,CV=oV,SV=rV,bV=nV,RV=iV,IV=sV,PV=uV;var Ut=R(N(),1),qx="DropdownMenu",[HX,ZTe]=Oe(qx,[sR]),To=sR(),[UX,LV]=HX(qx),TV=e=>{let{__scopeDropdownMenu:t,children:o,dir:r,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=To(t),u=zt.useRef(null),[c,d]=qe({prop:n,defaultProp:a??!1,onChange:i,caller:qx});return(0,Ut.jsx)(UX,{scope:t,triggerId:Ae(),triggerRef:u,contentId:Ae(),open:c,onOpenChange:d,onOpenToggle:zt.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,Ut.jsx)(dV,{...l,open:c,onOpenChange:d,dir:r,modal:s,children:o})})};TV.displayName=qx;var kV="DropdownMenuTrigger",MV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,disabled:r=!1,...n}=e,a=LV(kV,o),i=To(o);return(0,Ut.jsx)(fV,{asChild:!0,...i,children:(0,Ut.jsx)($.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...n,ref:lr(t,a.triggerRef),onPointerDown:W(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:W(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});MV.displayName=kV;var zX="DropdownMenuPortal",EV=e=>{let{__scopeDropdownMenu:t,...o}=e,r=To(t);return(0,Ut.jsx)(pV,{...r,...o})};EV.displayName=zX;var AV="DropdownMenuContent",DV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=LV(AV,o),a=To(o),i=zt.useRef(!1);return(0,Ut.jsx)(mV,{id:n.contentId,"aria-labelledby":n.triggerId,...a,...r,ref:t,onCloseAutoFocus:W(e.onCloseAutoFocus,s=>{i.current||n.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:W(e.onInteractOutside,s=>{let l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!n.modal||c)&&(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)"}})});DV.displayName=AV;var GX="DropdownMenuGroup",NV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(gV,{...n,...r,ref:t})});NV.displayName=GX;var WX="DropdownMenuLabel",OV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(hV,{...n,...r,ref:t})});OV.displayName=WX;var jX="DropdownMenuItem",FV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(vV,{...n,...r,ref:t})});FV.displayName=jX;var qX="DropdownMenuCheckboxItem",_V=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(xV,{...n,...r,ref:t})});_V.displayName=qX;var $X="DropdownMenuRadioGroup",VV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(yV,{...n,...r,ref:t})});VV.displayName=$X;var KX="DropdownMenuRadioItem",BV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(wV,{...n,...r,ref:t})});BV.displayName=KX;var XX="DropdownMenuItemIndicator",HV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(CV,{...n,...r,ref:t})});HV.displayName=XX;var YX="DropdownMenuSeparator",UV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(SV,{...n,...r,ref:t})});UV.displayName=YX;var QX="DropdownMenuArrow",ZX=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(bV,{...n,...r,ref:t})});ZX.displayName=QX;var JX=e=>{let{__scopeDropdownMenu:t,children:o,open:r,onOpenChange:n,defaultOpen:a}=e,i=To(t),[s,l]=qe({prop:r,defaultProp:a??!1,onChange:n,caller:"DropdownMenuSub"});return(0,Ut.jsx)(RV,{...i,open:s,onOpenChange:l,children:o})},eY="DropdownMenuSubTrigger",zV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(IV,{...n,...r,ref:t})});zV.displayName=eY;var tY="DropdownMenuSubContent",GV=zt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,n=To(o);return(0,Ut.jsx)(PV,{...n,...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)"}})});GV.displayName=tY;var WV=TV,jV=MV,hR=EV,vR=DV,qV=NV,xR=OV,yR=FV,wR=_V,$V=VV,CR=BV,SR=HV,bR=UV;var KV=JX,RR=zV,IR=GV;var Gt=R(N()),rY=WV,nY=jV,aY=qV,iY=hR,sY=KV,lY=$V,XV=ui.forwardRef(({className:e,inset:t,children:o,...r},n)=>(0,Gt.jsxs)(RR,{ref:n,className:P("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[o,(0,Gt.jsx)(No,{className:"ml-auto h-4 w-4"})]}));XV.displayName=RR.displayName;var YV=ui.forwardRef(({className:e,...t},o)=>(0,Gt.jsx)(IR,{ref:o,className:P("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}));YV.displayName=IR.displayName;var QV=ui.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,Gt.jsx)(hR,{children:(0,Gt.jsx)(vR,{ref:r,sideOffset:t,className:P("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),...o})}));QV.displayName=vR.displayName;var ZV=ui.forwardRef(({className:e,inset:t,...o},r)=>(0,Gt.jsx)(yR,{ref:r,className:P("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));ZV.displayName=yR.displayName;var JV=ui.forwardRef(({className:e,children:t,checked:o,...r},n)=>(0,Gt.jsxs)(wR,{ref:n,className:P("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[(0,Gt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Gt.jsx)(SR,{children:(0,Gt.jsx)(vo,{className:"h-4 w-4"})})}),t]}));JV.displayName=wR.displayName;var eB=ui.forwardRef(({className:e,children:t,...o},r)=>(0,Gt.jsxs)(CR,{ref:r,className:P("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,Gt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Gt.jsx)(SR,{children:(0,Gt.jsx)(tl,{className:"h-2 w-2 fill-current"})})}),t]}));eB.displayName=CR.displayName;var tB=ui.forwardRef(({className:e,inset:t,...o},r)=>(0,Gt.jsx)(xR,{ref:r,className:P("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));tB.displayName=xR.displayName;var oB=ui.forwardRef(({className:e,...t},o)=>(0,Gt.jsx)(bR,{ref:o,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));oB.displayName=bR.displayName;var rB=({className:e,...t})=>(0,Gt.jsx)("span",{className:P("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});rB.displayName="DropdownMenuShortcut";var Rr=R(M());var nB=R(M());var ci=R(N()),uY=K("relative overflow-hidden bg-muted",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"},size:{xs:"h-1",sm:"h-1.5",default:"h-2",md:"h-2.5",lg:"h-3",xl:"h-4"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},animation:{default:"[&>div]:transition-all [&>div]:duration-500",smooth:"[&>div]:transition-all [&>div]:duration-700",fast:"[&>div]:transition-all [&>div]:duration-300",none:""}},defaultVariants:{variant:"default",size:"default",radius:"full",animation:"default"}}),cY=K("h-full w-full flex-1",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",error:"bg-error"},animation:{default:"transition-all duration-500",smooth:"transition-all duration-700",fast:"transition-all duration-300",none:""}},defaultVariants:{variant:"primary",animation:"default"}}),$x=nB.forwardRef(({className:e,value:t=0,variant:o,size:r,radius:n,animation:a,indicatorVariant:i,showValueLabel:s=!1,valueLabel:l,labelClassName:u,indeterminate:c=!1,max:d=100,...f},p)=>{let g=Math.max(0,Math.min(t,d)),m=d>0?g/d*100:0,x=l||`${Math.round(m)}%`;return(0,ci.jsxs)(ci.Fragment,{children:[s&&(0,ci.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,ci.jsx)("span",{className:P("text-sm font-medium text-muted-foreground",u),children:x})}),(0,ci.jsx)("div",{ref:p,className:P("moonui-theme",uY({variant:o,size:r,radius:n,animation:a}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:g,...f,children:(0,ci.jsx)("div",{className:P(cY({variant:i||"primary",animation:a}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-m}%)`}})})]})});$x.displayName="Progress";var ve=R(N()),dY=e=>e.startsWith("image/")?(0,ve.jsx)(rl,{className:"h-4 w-4"}):e.startsWith("video/")?(0,ve.jsx)(Gf,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,ve.jsx)(Of,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,ve.jsx)(Lf,{className:"h-4 w-4"}):(0,ve.jsx)(Tf,{className:"h-4 w-4"}),PR=e=>{if(e===0)return"0 Bytes";let t=1024,o=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+o[r]},fY=({uploadedFile:e,onRemove:t})=>{let{id:o,file:r,progress:n,status:a,preview:i}=e;return(0,ve.jsxs)(Be.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-3 p-3 border rounded-lg bg-background",children:[(0,ve.jsx)("div",{className:"flex-shrink-0",children:i?(0,ve.jsx)("img",{src:i,alt:r.name,className:"h-10 w-10 object-cover rounded"}):(0,ve.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:dY(r.type)})}),(0,ve.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ve.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ve.jsx)("p",{className:"text-sm font-medium truncate",children:r.name}),(0,ve.jsx)(De,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(o),"aria-label":`Remove ${r.name}`,children:(0,ve.jsx)(hr,{className:"h-3 w-3"})})]}),(0,ve.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,ve.jsx)("p",{className:"text-xs text-muted-foreground",children:PR(r.size)}),a==="uploading"&&(0,ve.jsxs)(Zo,{variant:"secondary",className:"h-5",children:[(0,ve.jsx)(Vt,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,ve.jsxs)(Zo,{variant:"success",className:"h-5",children:[(0,ve.jsx)(Hi,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,ve.jsxs)(Zo,{variant:"destructive",className:"h-5",children:[(0,ve.jsx)(Cn,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,ve.jsx)("div",{className:"mt-2",children:(0,ve.jsx)($x,{value:n,className:"h-1"})})]})]})},aB=Rr.default.forwardRef(({accept:e="*",multiple:t=!0,maxSize:o=10*1024*1024,maxFiles:r=5,disabled:n=!1,className:a,onUpload:i,onRemove:s,children:l,...u},c)=>{let[d,f]=(0,Rr.useState)([]),[p,g]=(0,Rr.useState)(!1),[m,x]=(0,Rr.useState)(null),h=I=>I.size>o?`File size exceeds ${PR(o)}`:e!=="*"&&!e.split(",").some(L=>{let T=L.trim();return T.includes("*")?I.type.startsWith(T.replace("*","")):I.type===T})?"File type not supported":null,v=(0,Rr.useCallback)(async I=>{let L=Array.from(I);if(x(null),d.length+L.length>r){x(`Maximum ${r} files allowed`);return}let T=[],k=[];if(L.forEach(_=>{let D=h(_);D?k.push(`${_.name}: ${D}`):T.push(_)}),k.length>0){x(k.join(", "));return}let E=T.map((_,D)=>({id:`${Date.now()}-${D}-${_.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:_,progress:0,status:"uploading",preview:_.type.startsWith("image/")?URL.createObjectURL(_):void 0}));f(_=>[..._,...E]);for(let _ of E){let D=0,z=setInterval(()=>{D+=15+_.file.size%10,D>=100?(D=100,clearInterval(z),f(F=>F.map(O=>O.id===_.id?{...O,progress:100,status:"success"}:O))):f(F=>F.map(O=>O.id===_.id?{...O,progress:D}:O))},200)}if(i)try{await i(E)}catch(_){console.error("Upload failed:",_),f(D=>D.map(z=>E.some(F=>F.id===z.id)?{...z,status:"error"}:z))}},[d.length,r,o,e,i]),y=(0,Rr.useCallback)(I=>{if(I.preventDefault(),g(!1),n)return;let L=I.dataTransfer.files;L.length>0&&v(L)},[v,n]),w=(0,Rr.useCallback)(I=>{I.preventDefault(),n||g(!0)},[n]),C=(0,Rr.useCallback)(I=>{I.preventDefault(),g(!1)},[]),b=(0,Rr.useCallback)(I=>{let L=I.target.files;L&&L.length>0&&v(L),I.target.value=""},[v]),S=(0,Rr.useCallback)(I=>{f(L=>{let T=L.find(k=>k.id===I);return T?.preview&&URL.revokeObjectURL(T.preview),L.filter(k=>k.id!==I)}),s&&s(I)},[s]);return(0,ve.jsxs)("div",{ref:c,className:P("moonui-theme","space-y-4",a),...u,children:[(0,ve.jsxs)(Be.div,{className:P("relative border-2 border-dashed rounded-lg p-8 text-center transition-colors",p&&"border-primary bg-primary/5",n&&"opacity-50 cursor-not-allowed",!n&&"hover:border-primary/50 cursor-pointer"),onDrop:y,onDragOver:w,onDragLeave:C,animate:{scale:p?1.02:1,borderColor:p?"hsl(var(--primary))":"hsl(var(--border))"},children:[(0,ve.jsx)("input",{type:"file",accept:e,multiple:t,disabled:n,onChange:b,"aria-label":t?"Choose files to upload":"Choose a file to upload",className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,ve.jsxs)("div",{className:"space-y-4",children:[(0,ve.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,ve.jsx)(zf,{className:"h-full w-full"})}),(0,ve.jsxs)("div",{children:[(0,ve.jsx)("p",{className:"text-lg font-medium",children:p?"Drop files here":"Upload files"}),(0,ve.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,ve.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",r," files, ",PR(o)," each"]})]}),(0,ve.jsx)(De,{variant:"outline",disabled:n,children:"Select Files"})]})]}),(0,ve.jsx)(za,{children:m&&(0,ve.jsxs)(Be.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-2 text-sm text-destructive",children:[(0,ve.jsx)(Cn,{className:"h-4 w-4"}),(0,ve.jsx)("span",{children:m})]})}),(0,ve.jsx)(za,{children:d.length>0&&(0,ve.jsxs)(Be.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,ve.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,ve.jsx)("div",{className:"space-y-2",children:(0,ve.jsx)(za,{children:d.map(I=>(0,ve.jsx)(fY,{uploadedFile:I,onRemove:S},I.id))})})]})})]})});aB.displayName="FileUpload";var iB=R(M());var $l=R(N()),sB=iB.default.forwardRef(({children:e,isOpen:t,onOpenChange:o,direction:r="up",threshold:n=50,className:a,overlayClassName:i,enableSwipeToClose:s=!0,...l},u)=>{let c=Lc(0),d=Lc(0),f=r==="up"||r==="down",p=f?c:d,g=CS(p,[0,n],[1,.5]),m=(v,y)=>{if(!s)return;let w=f?y.offset.y:y.offset.x,C=f?y.velocity.y:y.velocity.x,b=!1;switch(r){case"up":b=w>n||C>500;break;case"down":b=w<-n||C<-500;break;case"left":b=w>n||C>500;break;case"right":b=w<-n||C<-500;break}b?o(!1):bS(p,0,{type:"spring",stiffness:300,damping:20})},x=()=>{switch(r){case"up":return{y:"100%"};case"down":return{y:"-100%"};case"left":return{x:"100%"};case"right":return{x:"-100%"};default:return{y:"100%"}}},h=()=>f?{y:0}:{x:0};return t?(0,$l.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,$l.jsx)(Be.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>o(!1),className:P("absolute inset-0 bg-black/50",i)}),(0,$l.jsxs)(Be.div,{ref:u,drag:s?f?"y":"x":!1,dragConstraints:{top:r==="up"?0:void 0,bottom:r==="down"?0:void 0,left:r==="left"?0:void 0,right:r==="right"?0:void 0},dragElastic:.2,onDragEnd:m,style:{[f?"y":"x"]:p,opacity:g},initial:x(),animate:h(),exit:x(),transition:{type:"spring",damping:30,stiffness:300},className:P("absolute bg-background border shadow-lg",{"bottom-0 left-0 right-0 rounded-t-lg":r==="up","top-0 left-0 right-0 rounded-b-lg":r==="down","top-0 bottom-0 right-0 rounded-l-lg":r==="left","top-0 bottom-0 left-0 rounded-r-lg":r==="right"},a),...l,children:[(r==="up"||r==="down")&&(0,$l.jsx)("div",{className:"flex justify-center p-2",children:(0,$l.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});sB.displayName="GestureDrawer";var Rs=R(M());var Ze=R(N());function pY({className:e,size:t="md",showForks:o=!0,showWatchers:r=!1,repoUrl:n="https://github.com/moonui/moonui"}){let[a,i]=(0,Rs.useState)(null),[s,l]=(0,Rs.useState)(!0);(0,Rs.useEffect)(()=>{(async()=>{try{let g=await(await fetch("/api/github-stars")).json();i(g)}catch(p){console.error("Failed to fetch GitHub stats:",p),i({stars:1240,forks:89,watchers:156,isLive:!1})}finally{l(!1)}})()},[]);let u=f=>f>=1e3?(f/1e3).toFixed(1)+"k":f.toString(),c={sm:"text-sm gap-2",md:"text-base gap-3",lg:"text-lg gap-4"},d={sm:14,md:16,lg:20};return s?(0,Ze.jsxs)("div",{className:P("flex items-center animate-pulse",c[t],e),children:[(0,Ze.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ze.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Ze.jsx)("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),o&&(0,Ze.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ze.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Ze.jsx)("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):a?(0,Ze.jsxs)("div",{className:P("flex items-center",c[t],e),children:[(0,Ze.jsxs)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Ze.jsx)(Ui,{className:"fill-current text-yellow-500",size:d[t]}),(0,Ze.jsx)("span",{className:"font-medium",children:u(a.stars)})]}),o&&(0,Ze.jsxs)("a",{href:`${n}/network/members`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Ze.jsx)(kf,{size:d[t]}),(0,Ze.jsx)("span",{className:"font-medium",children:u(a.forks)})]}),r&&(0,Ze.jsxs)("a",{href:`${n}/watchers`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Ze.jsx)(ol,{size:d[t]}),(0,Ze.jsx)("span",{className:"font-medium",children:u(a.watchers)})]}),!a.isLive&&(0,Ze.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function b1e({className:e,size:t="md",repoUrl:o="https://github.com/moonui/moonui"}){let[r,n]=(0,Rs.useState)(null),[a,i]=(0,Rs.useState)(!0);(0,Rs.useEffect)(()=>{(async()=>{try{let c=await(await fetch("/api/github-stars")).json();n(c.stars)}catch(u){console.error("Failed to fetch GitHub stats:",u),n(1240)}finally{i(!1)}})()},[]);let s=l=>l>=1e3?(l/1e3).toFixed(1)+"k":l.toString();return(0,Ze.jsx)(De,{variant:"outline",size:t,className:P("moonui-theme","group",e),asChild:!0,children:(0,Ze.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,Ze.jsx)(Ui,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,Ze.jsx)("span",{children:"Star on GitHub"}),!a&&r&&(0,Ze.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-800 rounded-full text-xs font-medium",children:s(r)}),(0,Ze.jsx)(Pf,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var Kl=R(M());var Se=R(M(),1),Xx=R(M(),1),Vn=R(M(),1),mY=Object.defineProperty,gY=Object.defineProperties,hY=Object.getOwnPropertyDescriptors,Kx=Object.getOwnPropertySymbols,uB=Object.prototype.hasOwnProperty,cB=Object.prototype.propertyIsEnumerable,lB=(e,t,o)=>t in e?mY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,vY=(e,t)=>{for(var o in t||(t={}))uB.call(t,o)&&lB(e,o,t[o]);if(Kx)for(var o of Kx(t))cB.call(t,o)&&lB(e,o,t[o]);return e},xY=(e,t)=>gY(e,hY(t)),yY=(e,t)=>{var o={};for(var r in e)uB.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&Kx)for(var r of Kx(e))t.indexOf(r)<0&&cB.call(e,r)&&(o[r]=e[r]);return o};function wY(e){let t=setTimeout(e,0),o=setTimeout(e,10),r=setTimeout(e,50);return[t,o,r]}function CY(e){let t=Xx.useRef();return Xx.useEffect(()=>{t.current=e}),t.current}var SY=18,dB=40,bY=`${dB}px`,RY=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function IY({containerRef:e,inputRef:t,pushPasswordManagerStrategy:o,isFocused:r}){let[n,a]=Vn.useState(!1),[i,s]=Vn.useState(!1),[l,u]=Vn.useState(!1),c=Vn.useMemo(()=>o==="none"?!1:(o==="increase-width"||o==="experimental-no-flickering")&&n&&i,[n,i,o]),d=Vn.useCallback(()=>{let f=e.current,p=t.current;if(!f||!p||l||o==="none")return;let g=f,m=g.getBoundingClientRect().left+g.offsetWidth,x=g.getBoundingClientRect().top+g.offsetHeight/2,h=m-SY,v=x;document.querySelectorAll(RY).length===0&&document.elementFromPoint(h,v)===f||(a(!0),u(!0))},[e,t,l,o]);return Vn.useEffect(()=>{let f=e.current;if(!f||o==="none")return;function p(){let m=window.innerWidth-f.getBoundingClientRect().right;s(m>=dB)}p();let g=setInterval(p,1e3);return()=>{clearInterval(g)}},[e,o]),Vn.useEffect(()=>{let f=r||document.activeElement===t.current;if(o==="none"||!f)return;let p=setTimeout(d,0),g=setTimeout(d,2e3),m=setTimeout(d,5e3),x=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(p),clearTimeout(g),clearTimeout(m),clearTimeout(x)}},[t,r,o,d]),{hasPWMBadge:n,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:bY}}var LR=Se.createContext({}),TR=Se.forwardRef((e,t)=>{var o=e,{value:r,onChange:n,maxLength:a,textAlign:i="left",pattern:s,placeholder:l,inputMode:u="numeric",onComplete:c,pushPasswordManagerStrategy:d="increase-width",pasteTransformer:f,containerClassName:p,noScriptCSSFallback:g=PY,render:m,children:x}=o,h=yY(o,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),v,y,w,C,b;let[S,I]=Se.useState(typeof h.defaultValue=="string"?h.defaultValue:""),L=r??S,T=CY(L),k=Se.useCallback(J=>{n?.(J),I(J)},[n]),E=Se.useMemo(()=>s?typeof s=="string"?new RegExp(s):s:null,[s]),_=Se.useRef(null),D=Se.useRef(null),z=Se.useRef({value:L,onChange:k,isIOS:typeof window<"u"&&((y=(v=window?.CSS)==null?void 0:v.supports)==null?void 0:y.call(v,"-webkit-touch-callout","none"))}),F=Se.useRef({prev:[(w=_.current)==null?void 0:w.selectionStart,(C=_.current)==null?void 0:C.selectionEnd,(b=_.current)==null?void 0:b.selectionDirection]});Se.useImperativeHandle(t,()=>_.current,[]),Se.useEffect(()=>{let J=_.current,ie=D.current;if(!J||!ie)return;z.current.value!==J.value&&z.current.onChange(J.value),F.current.prev=[J.selectionStart,J.selectionEnd,J.selectionDirection];function ze(){if(document.activeElement!==J){V(null),oe(null);return}let Ne=J.selectionStart,Ct=J.selectionEnd,qn=J.selectionDirection,Mo=J.maxLength,un=J.value,Lr=F.current.prev,cn=-1,$n=-1,Kn;if(un.length!==0&&Ne!==null&&Ct!==null){let hd=Ne===Ct,vd=Ne===un.length&&un.length<Mo;if(hd&&!vd){let Tr=Ne;if(Tr===0)cn=0,$n=1,Kn="forward";else if(Tr===Mo)cn=Tr-1,$n=Tr,Kn="backward";else if(Mo>1&&un.length>1){let xd=0;if(Lr[0]!==null&&Lr[1]!==null){Kn=Tr<Lr[1]?"backward":"forward";let My=Lr[0]===Lr[1]&&Lr[0]<Mo;Kn==="backward"&&!My&&(xd=-1)}cn=xd+Tr,$n=xd+Tr+1}}cn!==-1&&$n!==-1&&cn!==$n&&_.current.setSelectionRange(cn,$n,Kn)}let Bm=cn!==-1?cn:Ne,ou=$n!==-1?$n:Ct,vi=Kn??qn;V(Bm),oe(ou),F.current.prev=[Bm,ou,vi]}if(document.addEventListener("selectionchange",ze,{capture:!0}),ze(),document.activeElement===J&&te(!0),!document.getElementById("input-otp-style")){let Ne=document.createElement("style");if(Ne.id="input-otp-style",document.head.appendChild(Ne),Ne.sheet){let Ct="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Cm(Ne.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Cm(Ne.sheet,`[data-input-otp]:autofill { ${Ct} }`),Cm(Ne.sheet,`[data-input-otp]:-webkit-autofill { ${Ct} }`),Cm(Ne.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Cm(Ne.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Ke=()=>{ie&&ie.style.setProperty("--root-height",`${J.clientHeight}px`)};Ke();let Lt=new ResizeObserver(Ke);return Lt.observe(J),()=>{document.removeEventListener("selectionchange",ze,{capture:!0}),Lt.disconnect()}},[]);let[O,B]=Se.useState(!1),[A,te]=Se.useState(!1),[ae,V]=Se.useState(null),[Q,oe]=Se.useState(null);Se.useEffect(()=>{wY(()=>{var J,ie,ze,Ke;(J=_.current)==null||J.dispatchEvent(new Event("input"));let Lt=(ie=_.current)==null?void 0:ie.selectionStart,Ne=(ze=_.current)==null?void 0:ze.selectionEnd,Ct=(Ke=_.current)==null?void 0:Ke.selectionDirection;Lt!==null&&Ne!==null&&(V(Lt),oe(Ne),F.current.prev=[Lt,Ne,Ct])})},[L,A]),Se.useEffect(()=>{T!==void 0&&L!==T&&T.length<a&&L.length===a&&c?.(L)},[a,c,T,L]);let Y=IY({containerRef:D,inputRef:_,pushPasswordManagerStrategy:d,isFocused:A}),ce=Se.useCallback(J=>{let ie=J.currentTarget.value.slice(0,a);if(ie.length>0&&E&&!E.test(ie)){J.preventDefault();return}typeof T=="string"&&ie.length<T.length&&document.dispatchEvent(new Event("selectionchange")),k(ie)},[a,k,T,E]),U=Se.useCallback(()=>{var J;if(_.current){let ie=Math.min(_.current.value.length,a-1),ze=_.current.value.length;(J=_.current)==null||J.setSelectionRange(ie,ze),V(ie),oe(ze)}te(!0)},[a]),ne=Se.useCallback(J=>{var ie,ze;let Ke=_.current;if(!f&&(!z.current.isIOS||!J.clipboardData||!Ke))return;let Lt=J.clipboardData.getData("text/plain"),Ne=f?f(Lt):Lt;J.preventDefault();let Ct=(ie=_.current)==null?void 0:ie.selectionStart,qn=(ze=_.current)==null?void 0:ze.selectionEnd,Mo=(Ct!==qn?L.slice(0,Ct)+Ne+L.slice(qn):L.slice(0,Ct)+Ne+L.slice(Ct)).slice(0,a);if(Mo.length>0&&E&&!E.test(Mo))return;Ke.value=Mo,k(Mo);let un=Math.min(Mo.length,a-1),Lr=Mo.length;Ke.setSelectionRange(un,Lr),V(un),oe(Lr)},[a,k,E,L]),he=Se.useMemo(()=>({position:"relative",cursor:h.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[h.disabled]),xe=Se.useMemo(()=>({position:"absolute",inset:0,width:Y.willPushPWMBadge?`calc(100% + ${Y.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:Y.willPushPWMBadge?`inset(0 ${Y.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[Y.PWM_BADGE_SPACE_WIDTH,Y.willPushPWMBadge,i]),pe=Se.useMemo(()=>Se.createElement("input",xY(vY({autoComplete:h.autoComplete||"one-time-code"},h),{"data-input-otp":!0,"data-input-otp-placeholder-shown":L.length===0||void 0,"data-input-otp-mss":ae,"data-input-otp-mse":Q,inputMode:u,pattern:E?.source,"aria-placeholder":l,style:xe,maxLength:a,value:L,ref:_,onPaste:J=>{var ie;ne(J),(ie=h.onPaste)==null||ie.call(h,J)},onChange:ce,onMouseOver:J=>{var ie;B(!0),(ie=h.onMouseOver)==null||ie.call(h,J)},onMouseLeave:J=>{var ie;B(!1),(ie=h.onMouseLeave)==null||ie.call(h,J)},onFocus:J=>{var ie;U(),(ie=h.onFocus)==null||ie.call(h,J)},onBlur:J=>{var ie;te(!1),(ie=h.onBlur)==null||ie.call(h,J)}})),[ce,U,ne,u,xe,a,Q,ae,h,E?.source,L]),X=Se.useMemo(()=>({slots:Array.from({length:a}).map((J,ie)=>{var ze;let Ke=A&&ae!==null&&Q!==null&&(ae===Q&&ie===ae||ie>=ae&&ie<Q),Lt=L[ie]!==void 0?L[ie]:null,Ne=L[0]!==void 0?null:(ze=l?.[ie])!=null?ze:null;return{char:Lt,placeholderChar:Ne,isActive:Ke,hasFakeCaret:Ke&&Lt===null}}),isFocused:A,isHovering:!h.disabled&&O}),[A,O,a,Q,ae,h.disabled,L]),Ie=Se.useMemo(()=>m?m(X):Se.createElement(LR.Provider,{value:X},x),[x,X,m]);return Se.createElement(Se.Fragment,null,g!==null&&Se.createElement("noscript",null,Se.createElement("style",null,g)),Se.createElement("div",{ref:D,"data-input-otp-container":!0,style:he,className:p},Ie,Se.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},pe)))});TR.displayName="Input";function Cm(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var PY=`
|
|
67
67
|
[data-input-otp] {
|
|
68
68
|
--nojs-bg: white !important;
|
|
69
69
|
--nojs-fg: black !important;
|
|
@@ -82,7 +82,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
82
82
|
--nojs-bg: black !important;
|
|
83
83
|
--nojs-fg: white !important;
|
|
84
84
|
}
|
|
85
|
-
}`,IY="^\\d+$",PY="^[a-zA-Z]+$",LY="^[a-zA-Z0-9]+$";var di=R(N()),cB=Kl.forwardRef(({className:e,containerClassName:t,...o},r)=>(0,di.jsx)(LR,{ref:r,"aria-label":"One-time password",containerClassName:P("moonui-theme","flex items-center gap-2 has-[:disabled]:opacity-50",t),className:P("disabled:cursor-not-allowed",e),...o}));cB.displayName="InputOTP";var dB=Kl.forwardRef(({className:e,...t},o)=>(0,di.jsx)("div",{ref:o,className:P("flex items-center",e),...t}));dB.displayName="InputOTPGroup";var fB=K(["relative flex h-10 w-10 items-center justify-center","border-y border-r border-input text-sm text-foreground","transition-all duration-200","first:rounded-l-md first:border-l last:rounded-r-md"],{variants:{isActive:{true:"z-10 ring-2 ring-ring ring-offset-background",false:""}},defaultVariants:{isActive:!1}}),pB=Kl.forwardRef(({index:e,className:t,...o},r)=>{let a=Kl.useContext(PR)?.slots?.[e],i=a?.char,s=a?.hasFakeCaret,l=a?.isActive;return(0,di.jsxs)("div",{ref:r,"data-active":l?"":void 0,className:P(fB({isActive:!!l}),t),...o,children:[i,s&&(0,di.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,di.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});pB.displayName="InputOTPSlot";var mB=Kl.forwardRef(({className:e,...t},o)=>(0,di.jsx)("div",{ref:o,role:"separator",className:P("text-muted-foreground",e),...t,children:(0,di.jsx)(If,{"aria-hidden":"true"})}));mB.displayName="InputOTPSeparator";var Xc=R(M());var Ce=R(N());function gB({children:e,componentName:t,className:o,showPreview:r=!0,previewDuration:n=2e3}){let[a,i]=(0,Xc.useState)(!1),[s,l]=(0,Xc.useState)(null),u=()=>{if(!r)return;i(!0),s&&clearTimeout(s);let d=setTimeout(()=>{i(!1)},n);l(d)},c=()=>{s&&(clearTimeout(s),l(null)),i(!1)};return(0,Ce.jsxs)("div",{className:P("relative group cursor-pointer transition-all duration-300",o),onMouseEnter:u,onMouseLeave:c,children:[(0,Ce.jsx)("div",{className:P("transition-all duration-300",!a&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),(0,Ce.jsx)("div",{className:P("absolute inset-0 bg-gradient-to-br from-amber-500/10 via-transparent to-purple-500/10","border-2 border-dashed border-amber-400/30 rounded-lg","flex items-center justify-center","transition-all duration-300",a?"opacity-0":"opacity-100"),children:(0,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsxs)(Zo,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[(0,Ce.jsx)(Bu,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsx)("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:(0,Ce.jsx)(Uu,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,Ce.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This premium component is available with Pro subscription"}),(0,Ce.jsxs)(De,{size:"sm",className:"bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 border-0",onClick:()=>{typeof window<"u"&&(window.location.href="/pricing")},children:[(0,Ce.jsx)(Gu,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),r&&!a&&(0,Ce.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,Ce.jsx)("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function TY({children:e,componentId:t,componentName:o,className:r,fallback:n,requireCLI:a=!0}){let[i,s]=(0,Xc.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,Xc.useEffect)(()=>{if(!(()=>{let d={nodeEnv:!1,nextPublicEnv:process.env.NEXT_PUBLIC_VERCEL_ENV==="development",localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080"),vercelEnv:!process.env.VERCEL,ciEnv:!process.env.CI,deploymentEnv:!process.env.DEPLOYMENT_ENV};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME||process.env.DEPLOYMENT_ENV==="production"?!1:d.nodeEnv&&d.localhost&&!d.vercelEnv&&!d.ciEnv})()||!a){s({isAuthenticated:!0,deviceValid:!0,hasProAccess:!0,loading:!1});return}async function c(){try{let d=localStorage.getItem("moonui_cli_token"),f=localStorage.getItem("moonui_device_id");if(!d||!f){s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1});return}let p=await fetch("/api/device/validate",{method:"POST",headers:{Authorization:`Bearer ${d}`,"X-Device-ID":f,"Content-Type":"application/json"},body:JSON.stringify({environment:{nodeEnv:"production",hostname:window.location.hostname,port:window.location.port,protocol:window.location.protocol}})});if(p.ok){let g=await p.json();s({isAuthenticated:!0,deviceValid:g.valid,hasProAccess:g.hasProAccess,loading:!1})}else s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}catch{s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}}c()},[a]),i.loading)return(0,Ce.jsx)("div",{className:P("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",r),children:(0,Ce.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,Ce.jsx)("div",{className:"text-sm text-gray-500",children:"Loading..."})})});if((()=>{let u={nodeEnv:!1,localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080")};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME?!1:u.nodeEnv&&u.localhost})()&&a){if(!i.isAuthenticated)return(0,Ce.jsxs)("div",{className:P("relative",r),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,Ce.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-red-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-red-400/30 rounded-lg flex items-center justify-center",children:(0,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(Zo,{variant:"destructive",className:"mb-2",children:[(0,Ce.jsx)(Uu,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),(0,Ce.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),(0,Ce.jsx)("code",{className:"block bg-black/80 text-green-400 p-2 rounded text-xs",children:"npx moonui auth login"})]})})]});if(!i.deviceValid)return(0,Ce.jsxs)("div",{className:P("relative",r),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,Ce.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-yellow-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-yellow-400/30 rounded-lg flex items-center justify-center",children:(0,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(Zo,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,Ce.jsx)(Gu,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),(0,Ce.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This device is not registered or you've reached your device limit"}),(0,Ce.jsx)(De,{size:"sm",className:"bg-gradient-to-r from-yellow-500 to-orange-500",onClick:()=>window.open("/dashboard/devices","_blank"),children:"Manage Devices"})]})})]});if(!i.hasProAccess)return(0,Ce.jsx)(gB,{componentName:o||t,className:r,children:n||e})}return(0,Ce.jsx)("div",{className:r,children:e})}function kY({className:e}){return(0,Ce.jsxs)(Zo,{variant:"secondary",className:P("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[(0,Ce.jsx)(Bu,{className:"w-3 h-3 mr-1"}),"PRO"]})}function MY({className:e}){return(0,Ce.jsx)(Zo,{variant:"outline",className:P("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var hB=R(M());var Yt=R(N());function TR({className:e,variant:t="default",showText:o=!0,...r}){let n=hB.useId(),a=`moon-gradient-${n}`,i=`moon-mask-${n}`;return(0,Yt.jsxs)("div",{className:P("flex items-center gap-2",e),children:[(0,Yt.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",...r,children:[(0,Yt.jsxs)("defs",{children:[t==="gradient"&&(0,Yt.jsxs)("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,Yt.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,Yt.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,Yt.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]}),(0,Yt.jsxs)("mask",{id:i,children:[(0,Yt.jsx)("rect",{width:"32",height:"32",fill:"white"}),(0,Yt.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),(0,Yt.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${a})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${i})`})]}),o&&(0,Yt.jsxs)("span",{className:"text-xl font-bold",children:[(0,Yt.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,Yt.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function VTe({className:e,variant:t="default",...o}){return(0,Yt.jsx)(TR,{showText:!1,className:e,variant:t,...o})}function BTe({className:e,variant:t="default",showText:o=!0,...r}){return(0,Yt.jsx)(TR,{className:P("transition-all duration-300 hover:scale-105",e),variant:t,showText:o,...r})}var kR=R(M());var Bo=R(N()),vB=({className:e,...t})=>(0,Bo.jsx)("nav",{role:"navigation","aria-label":"pagination",className:P("moonui-theme","mx-auto flex w-full justify-center",e),...t});vB.displayName="Pagination";var xB=kR.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("ul",{ref:o,className:P("moonui-theme","flex flex-row items-center gap-1",e),...t}));xB.displayName="PaginationContent";var yB=kR.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("li",{ref:o,className:P("moonui-theme","",e),...t}));yB.displayName="PaginationItem";var Xx=({className:e,isActive:t,size:o="icon",...r})=>(0,Bo.jsx)("a",{"aria-current":t?"page":void 0,className:P(yh({variant:t?"outline":"ghost",size:o}),e),...r});Xx.displayName="PaginationLink";var wB=({className:e,...t})=>(0,Bo.jsxs)(Xx,{"aria-label":"Go to previous page",size:"md",className:P("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Bo.jsx)(wn,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:"Previous"})]});wB.displayName="PaginationPrevious";var CB=({className:e,...t})=>(0,Bo.jsxs)(Xx,{"aria-label":"Go to next page",size:"md",className:P("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Bo.jsx)("span",{children:"Next"}),(0,Bo.jsx)(No,{className:"h-4 w-4"})]});CB.displayName="PaginationNext";var SB=({className:e,...t})=>(0,Bo.jsxs)("span",{"aria-hidden":!0,className:P("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Bo.jsx)(na,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"More pages"})]});SB.displayName="PaginationEllipsis";var Rm=R(M());var Ls=R(M());var Z=R(M(),1),_R=R(Aa(),1);function MR(e,[t,o]){return Math.min(o,Math.max(t,e))}var bB=R(M(),1);var RB=R(N(),1),ER=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"}),EY="VisuallyHidden",Cm=bB.forwardRef((e,t)=>(0,RB.jsx)($.span,{...e,ref:t,style:{...ER,...e.style}}));Cm.displayName=EY;var IB=Cm;var fe=R(N(),1),DY=[" ","Enter","ArrowUp","ArrowDown"],NY=[" ","Enter"],Xl="Select",[Qx,Zx,OY]=Xn(Xl),[Yc,gke]=Oe(Xl,[OY,$r]),Jx=$r(),[FY,Is]=Yc(Xl),[_Y,VY]=Yc(Xl),PB=e=>{let{__scopeSelect:t,children:o,open:r,defaultOpen:n,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:g}=e,m=Jx(t),[x,h]=Z.useState(null),[v,y]=Z.useState(null),[w,C]=Z.useState(!1),b=oa(u),[S,I]=qe({prop:r,defaultProp:n??!1,onChange:a,caller:Xl}),[L,T]=qe({prop:i,defaultProp:s,onChange:l,caller:Xl}),k=Z.useRef(null),E=x?g||!!x.closest("form"):!0,[_,D]=Z.useState(new Set),z=Array.from(_).map(F=>F.props.value).join(";");return(0,fe.jsx)(Ja,{...m,children:(0,fe.jsxs)(FY,{required:p,scope:t,trigger:x,onTriggerChange:h,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Ae(),value:L,onValueChange:T,open:S,onOpenChange:I,dir:b,triggerPointerDownPosRef:k,disabled:f,children:[(0,fe.jsx)(Qx.Provider,{scope:t,children:(0,fe.jsx)(_Y,{scope:e.__scopeSelect,onNativeOptionAdd:Z.useCallback(F=>{D(O=>new Set(O).add(F))},[]),onNativeOptionRemove:Z.useCallback(F=>{D(O=>{let B=new Set(O);return B.delete(F),B})},[]),children:o})}),E?(0,fe.jsxs)(QB,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:L,onChange:F=>T(F.target.value),disabled:f,form:g,children:[L===void 0?(0,fe.jsx)("option",{value:""}):null,Array.from(_)]},z):null]})})};PB.displayName=Xl;var LB="SelectTrigger",TB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,disabled:r=!1,...n}=e,a=Jx(o),i=Is(LB,o),s=i.disabled||r,l=de(t,i.onTriggerChange),u=Zx(o),c=Z.useRef("touch"),[d,f,p]=JB(m=>{let x=u().filter(y=>!y.disabled),h=x.find(y=>y.value===i.value),v=eH(x,m,h);v!==void 0&&i.onValueChange(v.value)}),g=m=>{s||(i.onOpenChange(!0),p()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return(0,fe.jsx)(ei,{asChild:!0,...a,children:(0,fe.jsx)($.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:s,"data-disabled":s?"":void 0,"data-placeholder":ZB(i.value)?"":void 0,...n,ref:l,onClick:W(n.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&g(m)}),onPointerDown:W(n.onPointerDown,m=>{c.current=m.pointerType;let x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:W(n.onKeyDown,m=>{let x=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(x&&m.key===" ")&&DY.includes(m.key)&&(g(),m.preventDefault())})})})});TB.displayName=LB;var kB="SelectValue",MB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:n,children:a,placeholder:i="",...s}=e,l=Is(kB,o),{onValueNodeHasChildrenChange:u}=l,c=a!==void 0,d=de(t,l.onValueNodeChange);return _e(()=>{u(c)},[u,c]),(0,fe.jsx)($.span,{...s,ref:d,style:{pointerEvents:"none"},children:ZB(l.value)?(0,fe.jsx)(fe.Fragment,{children:i}):a})});MB.displayName=kB;var BY="SelectIcon",EB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,children:r,...n}=e;return(0,fe.jsx)($.span,{"aria-hidden":!0,...n,ref:t,children:r||"\u25BC"})});EB.displayName=BY;var HY="SelectPortal",AB=e=>(0,fe.jsx)(Sr,{asChild:!0,...e});AB.displayName=HY;var Yl="SelectContent",DB=Z.forwardRef((e,t)=>{let o=Is(Yl,e.__scopeSelect),[r,n]=Z.useState();if(_e(()=>{n(new DocumentFragment)},[]),!o.open){let a=r;return a?_R.createPortal((0,fe.jsx)(NB,{scope:e.__scopeSelect,children:(0,fe.jsx)(Qx.Slot,{scope:e.__scopeSelect,children:(0,fe.jsx)("div",{children:e.children})})}),a):null}return(0,fe.jsx)(OB,{...e,ref:t})});DB.displayName=Yl;var Bn=10,[NB,Ps]=Yc(Yl),UY="SelectContentImpl",zY=ur("SelectContent.RemoveScroll"),OB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,position:r="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:x,...h}=e,v=Is(Yl,o),[y,w]=Z.useState(null),[C,b]=Z.useState(null),S=de(t,U=>w(U)),[I,L]=Z.useState(null),[T,k]=Z.useState(null),E=Zx(o),[_,D]=Z.useState(!1),z=Z.useRef(!1);Z.useEffect(()=>{if(y)return ms(y)},[y]),us();let F=Z.useCallback(U=>{let[ne,...he]=E().map(X=>X.ref.current),[xe]=he.slice(-1),pe=document.activeElement;for(let X of U)if(X===pe||(X?.scrollIntoView({block:"nearest"}),X===ne&&C&&(C.scrollTop=0),X===xe&&C&&(C.scrollTop=C.scrollHeight),X?.focus(),document.activeElement!==pe))return},[E,C]),O=Z.useCallback(()=>F([I,y]),[F,I,y]);Z.useEffect(()=>{_&&O()},[_,O]);let{onOpenChange:B,triggerPointerDownPosRef:A}=v;Z.useEffect(()=>{if(y){let U={x:0,y:0},ne=xe=>{U={x:Math.abs(Math.round(xe.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(xe.pageY)-(A.current?.y??0))}},he=xe=>{U.x<=10&&U.y<=10?xe.preventDefault():y.contains(xe.target)||B(!1),document.removeEventListener("pointermove",ne),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",he,{capture:!0})}}},[y,B,A]),Z.useEffect(()=>{let U=()=>B(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[B]);let[te,ae]=JB(U=>{let ne=E().filter(pe=>!pe.disabled),he=ne.find(pe=>pe.ref.current===document.activeElement),xe=eH(ne,U,he);xe&&setTimeout(()=>xe.ref.current.focus())}),V=Z.useCallback((U,ne,he)=>{let xe=!z.current&&!he;(v.value!==void 0&&v.value===ne||xe)&&(L(U),xe&&(z.current=!0))},[v.value]),Q=Z.useCallback(()=>y?.focus(),[y]),oe=Z.useCallback((U,ne,he)=>{let xe=!z.current&&!he;(v.value!==void 0&&v.value===ne||xe)&&k(U)},[v.value]),Y=r==="popper"?AR:FB,ce=Y===AR?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:x}:{};return(0,fe.jsx)(NB,{scope:o,content:y,viewport:C,onViewportChange:b,itemRefCallback:V,selectedItem:I,onItemLeave:Q,itemTextRefCallback:oe,focusSelectedItem:O,selectedItemText:T,position:r,isPositioned:_,searchRef:te,children:(0,fe.jsx)(ti,{as:zY,allowPinchZoom:!0,children:(0,fe.jsx)(Qa,{asChild:!0,trapped:v.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:W(n,U=>{v.trigger?.focus({preventScroll:!0}),U.preventDefault()}),children:(0,fe.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,fe.jsx)(Y,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:U=>U.preventDefault(),...h,...ce,onPlaced:()=>D(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...h.style},onKeyDown:W(h.onKeyDown,U=>{let ne=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!ne&&U.key.length===1&&ae(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let xe=E().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(U.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){let pe=U.target,X=xe.indexOf(pe);xe=xe.slice(X+1)}setTimeout(()=>F(xe)),U.preventDefault()}})})})})})})});OB.displayName=UY;var GY="SelectItemAlignedPosition",FB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,onPlaced:r,...n}=e,a=Is(Yl,o),i=Ps(Yl,o),[s,l]=Z.useState(null),[u,c]=Z.useState(null),d=de(t,S=>c(S)),f=Zx(o),p=Z.useRef(!1),g=Z.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:h,focusSelectedItem:v}=i,y=Z.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&m&&x&&h){let S=a.trigger.getBoundingClientRect(),I=u.getBoundingClientRect(),L=a.valueNode.getBoundingClientRect(),T=h.getBoundingClientRect();if(a.dir!=="rtl"){let pe=T.left-I.left,X=L.left-pe,Ie=S.left-X,J=S.width+Ie,ie=Math.max(J,I.width),ze=window.innerWidth-Bn,Ke=MR(X,[Bn,Math.max(Bn,ze-ie)]);s.style.minWidth=J+"px",s.style.left=Ke+"px"}else{let pe=I.right-T.right,X=window.innerWidth-L.right-pe,Ie=window.innerWidth-S.right-X,J=S.width+Ie,ie=Math.max(J,I.width),ze=window.innerWidth-Bn,Ke=MR(X,[Bn,Math.max(Bn,ze-ie)]);s.style.minWidth=J+"px",s.style.right=Ke+"px"}let k=f(),E=window.innerHeight-Bn*2,_=m.scrollHeight,D=window.getComputedStyle(u),z=parseInt(D.borderTopWidth,10),F=parseInt(D.paddingTop,10),O=parseInt(D.borderBottomWidth,10),B=parseInt(D.paddingBottom,10),A=z+F+_+B+O,te=Math.min(x.offsetHeight*5,A),ae=window.getComputedStyle(m),V=parseInt(ae.paddingTop,10),Q=parseInt(ae.paddingBottom,10),oe=S.top+S.height/2-Bn,Y=E-oe,ce=x.offsetHeight/2,U=x.offsetTop+ce,ne=z+F+U,he=A-ne;if(ne<=oe){let pe=k.length>0&&x===k[k.length-1].ref.current;s.style.bottom="0px";let X=u.clientHeight-m.offsetTop-m.offsetHeight,Ie=Math.max(Y,ce+(pe?Q:0)+X+O),J=ne+Ie;s.style.height=J+"px"}else{let pe=k.length>0&&x===k[0].ref.current;s.style.top="0px";let Ie=Math.max(oe,z+m.offsetTop+(pe?V:0)+ce)+he;s.style.height=Ie+"px",m.scrollTop=ne-oe+m.offsetTop}s.style.margin=`${Bn}px 0`,s.style.minHeight=te+"px",s.style.maxHeight=E+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,m,x,h,a.dir,r]);_e(()=>y(),[y]);let[w,C]=Z.useState();_e(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let b=Z.useCallback(S=>{S&&g.current===!0&&(y(),v?.(),g.current=!1)},[y,v]);return(0,fe.jsx)(jY,{scope:o,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b,children:(0,fe.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,fe.jsx)($.div,{...n,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});FB.displayName=GY;var WY="SelectPopperPosition",AR=Z.forwardRef((e,t)=>{let{__scopeSelect:o,align:r="start",collisionPadding:n=Bn,...a}=e,i=Jx(o);return(0,fe.jsx)(fs,{...i,...a,ref:t,align:r,collisionPadding:n,style:{boxSizing:"border-box",...a.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)"}})});AR.displayName=WY;var[jY,VR]=Yc(Yl,{}),DR="SelectViewport",_B=Z.forwardRef((e,t)=>{let{__scopeSelect:o,nonce:r,...n}=e,a=Ps(DR,o),i=VR(DR,o),s=de(t,a.onViewportChange),l=Z.useRef(0);return(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.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}),(0,fe.jsx)(Qx.Slot,{scope:o,children:(0,fe.jsx)($.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:W(n.onScroll,u=>{let c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f?.current&&d){let p=Math.abs(l.current-c.scrollTop);if(p>0){let g=window.innerHeight-Bn*2,m=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),h=Math.max(m,x);if(h<g){let v=h+p,y=Math.min(g,v),w=v-y;d.style.height=y+"px",d.style.bottom==="0px"&&(c.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});_B.displayName=DR;var VB="SelectGroup",[qY,$Y]=Yc(VB),BB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,n=Ae();return(0,fe.jsx)(qY,{scope:o,id:n,children:(0,fe.jsx)($.div,{role:"group","aria-labelledby":n,...r,ref:t})})});BB.displayName=VB;var HB="SelectLabel",UB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,n=$Y(HB,o);return(0,fe.jsx)($.div,{id:n.id,...r,ref:t})});UB.displayName=HB;var Yx="SelectItem",[KY,zB]=Yc(Yx),GB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,value:r,disabled:n=!1,textValue:a,...i}=e,s=Is(Yx,o),l=Ps(Yx,o),u=s.value===r,[c,d]=Z.useState(a??""),[f,p]=Z.useState(!1),g=de(t,v=>l.itemRefCallback?.(v,r,n)),m=Ae(),x=Z.useRef("touch"),h=()=>{n||(s.onValueChange(r),s.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(0,fe.jsx)(KY,{scope:o,value:r,disabled:n,textId:m,isSelected:u,onItemTextChange:Z.useCallback(v=>{d(y=>y||(v?.textContent??"").trim())},[]),children:(0,fe.jsx)(Qx.ItemSlot,{scope:o,value:r,disabled:n,textValue:c,children:(0,fe.jsx)($.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...i,ref:g,onFocus:W(i.onFocus,()=>p(!0)),onBlur:W(i.onBlur,()=>p(!1)),onClick:W(i.onClick,()=>{x.current!=="mouse"&&h()}),onPointerUp:W(i.onPointerUp,()=>{x.current==="mouse"&&h()}),onPointerDown:W(i.onPointerDown,v=>{x.current=v.pointerType}),onPointerMove:W(i.onPointerMove,v=>{x.current=v.pointerType,n?l.onItemLeave?.():x.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:W(i.onPointerLeave,v=>{v.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:W(i.onKeyDown,v=>{l.searchRef?.current!==""&&v.key===" "||(NY.includes(v.key)&&h(),v.key===" "&&v.preventDefault())})})})})});GB.displayName=Yx;var Sm="SelectItemText",WB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:n,...a}=e,i=Is(Sm,o),s=Ps(Sm,o),l=zB(Sm,o),u=VY(Sm,o),[c,d]=Z.useState(null),f=de(t,h=>d(h),l.onItemTextChange,h=>s.itemTextRefCallback?.(h,l.value,l.disabled)),p=c?.textContent,g=Z.useMemo(()=>(0,fe.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=u;return _e(()=>(m(g),()=>x(g)),[m,x,g]),(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)($.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?_R.createPortal(a.children,i.valueNode):null]})});WB.displayName=Sm;var jB="SelectItemIndicator",qB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return zB(jB,o).isSelected?(0,fe.jsx)($.span,{"aria-hidden":!0,...r,ref:t}):null});qB.displayName=jB;var NR="SelectScrollUpButton",$B=Z.forwardRef((e,t)=>{let o=Ps(NR,e.__scopeSelect),r=VR(NR,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,r.onScrollButtonChange);return _e(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollTop>0;a(c)};var s=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),n?(0,fe.jsx)(XB,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=o;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});$B.displayName=NR;var OR="SelectScrollDownButton",KB=Z.forwardRef((e,t)=>{let o=Ps(OR,e.__scopeSelect),r=VR(OR,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,r.onScrollButtonChange);return _e(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<c;a(d)};var s=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),n?(0,fe.jsx)(XB,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=o;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});KB.displayName=OR;var XB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,onAutoScroll:r,...n}=e,a=Ps("SelectScrollButton",o),i=Z.useRef(null),s=Zx(o),l=Z.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return Z.useEffect(()=>()=>l(),[l]),_e(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,fe.jsx)($.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:W(n.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:W(n.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:W(n.onPointerLeave,()=>{l()})})}),XY="SelectSeparator",YB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return(0,fe.jsx)($.div,{"aria-hidden":!0,...r,ref:t})});YB.displayName=XY;var FR="SelectArrow",YY=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,n=Jx(o),a=Is(FR,o),i=Ps(FR,o);return a.open&&i.position==="popper"?(0,fe.jsx)(ps,{...n,...r,ref:t}):null});YY.displayName=FR;var QY="SelectBubbleInput",QB=Z.forwardRef(({__scopeSelect:e,value:t,...o},r)=>{let n=Z.useRef(null),a=de(r,n),i=Ac(t);return Z.useEffect(()=>{let s=n.current;if(!s)return;let l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&c){let d=new Event("change",{bubbles:!0});c.call(s,t),s.dispatchEvent(d)}},[i,t]),(0,fe.jsx)($.select,{...o,style:{...ER,...o.style},ref:a,defaultValue:t})});QB.displayName=QY;function ZB(e){return e===""||e===void 0}function JB(e){let t=rt(e),o=Z.useRef(""),r=Z.useRef(0),n=Z.useCallback(i=>{let s=o.current+i;t(s),function l(u){o.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=Z.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return Z.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,n,a]}function eH(e,t,o){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1,i=ZY(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==o));let l=i.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==o?l:void 0}function ZY(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var tH=PB,BR=TB,oH=MB,rH=EB,nH=AB,HR=DB,aH=_B,iH=BB,UR=UB,zR=GB,sH=WB,lH=qB,GR=$B,WR=KB,jR=YB;var je=R(N()),Qc=tH;Qc.displayName="Select";var eQ=iH,bm=oH,tQ=K(["flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","focus-visible:outline-none text-foreground"],{variants:{variant:{standard:"border border-input bg-background hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",outline:"border border-input bg-transparent hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",ghost:"border-none bg-muted hover:bg-muted/80 focus-visible:ring-2 focus-visible:ring-primary/30",underline:"border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 bg-transparent hover:border-ring focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary"},size:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4"},state:{none:"",error:"border-error focus-visible:ring-error/30 focus-visible:border-error",success:"border-success focus-visible:ring-success/30 focus-visible:border-success"}},defaultVariants:{variant:"standard",size:"md",state:"none"}}),Zc=Ls.forwardRef(({className:e,children:t,variant:o,size:r,error:n,success:a,loading:i,leftIcon:s,rightIcon:l,...u},c)=>(0,je.jsxs)(BR,{ref:c,className:P(tQ({variant:o,size:r,state:n?"error":a?"success":"none"}),e),...u,disabled:u.disabled||i,"aria-invalid":n?!0:void 0,"data-error":n?!0:void 0,"data-success":a?!0:void 0,"data-loading":i?!0:void 0,children:[(0,je.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,je.jsx)("span",{className:"flex items-center justify-center text-muted-foreground",children:s}),i?(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsx)(Vt,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,je.jsx)("span",{className:"text-muted-foreground",children:"Loading..."})]}):t]}),!i&&(0,je.jsx)(rH,{asChild:!0,children:l?(0,je.jsx)("span",{className:"opacity-60",children:l}):(0,je.jsx)(ra,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));Zc.displayName=BR.displayName;var qR=Ls.forwardRef(({className:e,...t},o)=>(0,je.jsx)(GR,{ref:o,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,je.jsx)(wf,{className:"h-4 w-4"})}));qR.displayName=GR.displayName;var $R=Ls.forwardRef(({className:e,...t},o)=>(0,je.jsx)(WR,{ref:o,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,je.jsx)(ra,{className:"h-4 w-4"})}));$R.displayName=WR.displayName;var Jc=Ls.forwardRef(({className:e,children:t,position:o="popper",side:r="bottom",sideOffset:n=4,align:a="start",...i},s)=>(0,je.jsx)(nH,{children:(0,je.jsxs)(HR,{ref:s,side:r,sideOffset:n,align:a,avoidCollisions:!1,className:P(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-input","bg-background dark:bg-gray-800/80 backdrop-blur-sm text-foreground dark:text-gray-200","shadow-lg dark:shadow-gray-900/20","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=open]:duration-150"],o==="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:o,...i,children:[(0,je.jsx)(qR,{}),(0,je.jsx)(aH,{className:P("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,je.jsx)($R,{})]})}));Jc.displayName=HR.displayName;var uH=Ls.forwardRef(({className:e,...t},o)=>(0,je.jsx)(UR,{ref:o,className:P("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));uH.displayName=UR.displayName;var Ho=Ls.forwardRef(({className:e,children:t,variant:o="default",size:r="md",rightIcon:n,customIndicator:a,...i},s)=>(0,je.jsxs)(zR,{ref:s,className:P("moonui-theme","relative flex w-full cursor-default select-none items-center rounded-sm outline-none","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-150",r==="sm"&&"py-1 pl-7 pr-2 text-xs",r==="md"&&"py-1.5 pl-8 pr-2 text-sm",r==="lg"&&"py-2 pl-9 pr-3 text-base",o==="default"&&"focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",o==="subtle"&&"focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",o==="destructive"&&"text-error dark:text-red-400 focus:bg-error/10 dark:focus:bg-red-900/20 focus:text-error dark:focus:text-red-300",o==="success"&&"text-success dark:text-green-400 focus:bg-success/10 dark:focus:bg-green-900/20 focus:text-success dark:focus:text-green-300",o==="warning"&&"text-warning dark:text-yellow-400 focus:bg-warning/10 dark:focus:bg-yellow-900/20 focus:text-warning dark:focus:text-yellow-300",e),...i,children:[(0,je.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,je.jsx)(lH,{children:a||(0,je.jsx)(vo,{className:"h-4 w-4"})})}),(0,je.jsx)(sH,{children:t}),n&&(0,je.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:n})]}));Ho.displayName=zR.displayName;var cH=Ls.forwardRef(({className:e,...t},o)=>(0,je.jsx)(jR,{ref:o,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));cH.displayName=jR.displayName;var Qt=R(N()),oQ=[{code:"+1",country:"US",flag:"\u{1F1FA}\u{1F1F8}",name:"United States"},{code:"+44",country:"GB",flag:"\u{1F1EC}\u{1F1E7}",name:"United Kingdom"},{code:"+49",country:"DE",flag:"\u{1F1E9}\u{1F1EA}",name:"Germany"},{code:"+33",country:"FR",flag:"\u{1F1EB}\u{1F1F7}",name:"France"},{code:"+39",country:"IT",flag:"\u{1F1EE}\u{1F1F9}",name:"Italy"},{code:"+34",country:"ES",flag:"\u{1F1EA}\u{1F1F8}",name:"Spain"},{code:"+31",country:"NL",flag:"\u{1F1F3}\u{1F1F1}",name:"Netherlands"},{code:"+46",country:"SE",flag:"\u{1F1F8}\u{1F1EA}",name:"Sweden"},{code:"+47",country:"NO",flag:"\u{1F1F3}\u{1F1F4}",name:"Norway"},{code:"+45",country:"DK",flag:"\u{1F1E9}\u{1F1F0}",name:"Denmark"},{code:"+358",country:"FI",flag:"\u{1F1EB}\u{1F1EE}",name:"Finland"},{code:"+48",country:"PL",flag:"\u{1F1F5}\u{1F1F1}",name:"Poland"},{code:"+90",country:"TR",flag:"\u{1F1F9}\u{1F1F7}",name:"Turkey"},{code:"+86",country:"CN",flag:"\u{1F1E8}\u{1F1F3}",name:"China"},{code:"+81",country:"JP",flag:"\u{1F1EF}\u{1F1F5}",name:"Japan"},{code:"+82",country:"KR",flag:"\u{1F1F0}\u{1F1F7}",name:"South Korea"},{code:"+91",country:"IN",flag:"\u{1F1EE}\u{1F1F3}",name:"India"},{code:"+61",country:"AU",flag:"\u{1F1E6}\u{1F1FA}",name:"Australia"},{code:"+64",country:"NZ",flag:"\u{1F1F3}\u{1F1FF}",name:"New Zealand"},{code:"+27",country:"ZA",flag:"\u{1F1FF}\u{1F1E6}",name:"South Africa"},{code:"+55",country:"BR",flag:"\u{1F1E7}\u{1F1F7}",name:"Brazil"},{code:"+52",country:"MX",flag:"\u{1F1F2}\u{1F1FD}",name:"Mexico"},{code:"+54",country:"AR",flag:"\u{1F1E6}\u{1F1F7}",name:"Argentina"},{code:"+20",country:"EG",flag:"\u{1F1EA}\u{1F1EC}",name:"Egypt"},{code:"+966",country:"SA",flag:"\u{1F1F8}\u{1F1E6}",name:"Saudi Arabia"},{code:"+971",country:"AE",flag:"\u{1F1E6}\u{1F1EA}",name:"UAE"}],dH=(e,t)=>{let o=e.replace(/\D/g,"");switch(t){case"+1":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:`(${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,10)}`;case"+44":return o.length<=4?o:o.length<=7?`${o.slice(0,4)} ${o.slice(4)}`:`${o.slice(0,4)} ${o.slice(4,7)} ${o.slice(7,11)}`;case"+90":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:o.length<=9?`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6)}`:`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6,8)} ${o.slice(8,10)}`;default:let r="";for(let n=0;n<o.length;n++)n>0&&n%3===0&&(r+=" "),r+=o[n];return r}},rQ=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},fH=Rm.forwardRef(({className:e,value:t="",onChange:o,defaultCountry:r="+1",showIcon:n=!0,showCountrySelect:a=!0,countries:i=oQ,size:s,...l},u)=>{let[c,d]=Rm.useState(r),[f,p]=Rm.useState(t),g=i.find(v=>v.code===c)||i[0],m=v=>{let y=v.target.value.replace(/\D/g,""),w=rQ(c),C=y.slice(0,w),b=dH(C,c);p(C),o?.(C,c),v.target.value=b},x=v=>{d(v),o?.(f,v)},h=dH(f,c);return(0,Qt.jsxs)("div",{className:P("relative flex gap-2",e),children:[a&&(0,Qt.jsxs)(Qc,{value:c,onValueChange:x,children:[(0,Qt.jsx)(Zc,{className:"w-[120px]",children:(0,Qt.jsx)(bm,{children:(0,Qt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Qt.jsx)("span",{children:g.flag}),(0,Qt.jsx)("span",{children:g.code})]})})}),(0,Qt.jsx)(Jc,{children:i.map(v=>(0,Qt.jsx)(Ho,{value:v.code,children:(0,Qt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Qt.jsx)("span",{children:v.flag}),(0,Qt.jsx)("span",{children:v.code}),(0,Qt.jsx)("span",{className:"text-muted-foreground",children:v.name})]})},v.code))})]}),(0,Qt.jsxs)("div",{className:"relative flex-1",children:[(0,Qt.jsx)(bo,{ref:u,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:c==="+1"?"(555) 123-4567":"123 456 789",value:h,onChange:m,className:P(n&&"pl-10",e),...l}),n&&(0,Qt.jsx)(Ff,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});fH.displayName="PhoneInput";var ko=R(M());var Ir=R(N()),nQ=K("aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border bg-background text-primary",outline:"border-border bg-transparent text-primary",filled:"border-primary bg-primary/10 text-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"default",size:"default"}}),pH=ko.createContext({}),mH=ko.forwardRef(({className:e,value:t,defaultValue:o,onValueChange:r,disabled:n,name:a,...i},s)=>{let[l,u]=ko.useState(o),c=t!==void 0,d=c?t:l,f=ko.useCallback(p=>{c||u(p),r?.(p)},[c,r]);return(0,Ir.jsx)(pH.Provider,{value:{value:d,onValueChange:f,disabled:n,name:a},children:(0,Ir.jsx)("div",{ref:s,role:"radiogroup",className:P("moonui-theme","grid gap-2",e),...i})})});mH.displayName="RadioGroup";var KR=ko.forwardRef(({className:e,variant:t,size:o,indicator:r,id:n,value:a,disabled:i,...s},l)=>{let u=ko.useContext(pH),c=ko.useId(),d=n||c,f=u.value===a,p=g=>{u.onValueChange&&u.onValueChange(g.target.value),s.onChange&&s.onChange(g)};return(0,Ir.jsxs)("div",{className:"relative flex items-center",children:[(0,Ir.jsx)("input",{type:"radio",id:d,ref:l,value:a,checked:f,disabled:i||u.disabled,name:u.name,onChange:p,className:"peer sr-only",...s}),(0,Ir.jsx)("label",{htmlFor:d,className:P(nQ({variant:t,size:o}),"rounded-full","peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",i&&"cursor-not-allowed opacity-50",e),children:(0,Ir.jsx)("span",{className:P("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(r||(0,Ir.jsx)(tl,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});KR.displayName="RadioGroupItem";var XR=ko.forwardRef(({className:e,htmlFor:t,children:o,disabled:r=!1,...n},a)=>(0,Ir.jsx)("label",{ref:a,htmlFor:t,className:P("text-sm font-medium leading-none ml-2 text-foreground",r&&"cursor-not-allowed opacity-70",e),...n,children:o}));XR.displayName="RadioLabel";var gH=ko.forwardRef(({id:e,label:t,labelClassName:o,...r},n)=>{let a=ko.useId(),i=e||a;return(0,Ir.jsxs)("div",{className:"flex items-center",children:[(0,Ir.jsx)(KR,{ref:n,id:i,...r}),(0,Ir.jsx)(XR,{htmlFor:i,disabled:r.disabled,className:o,children:t})]})});gH.displayName="RadioItemWithLabel";var fi=R(N());function aQ({value:e="",onChange:t,placeholder:o="Start typing...",className:r,disabled:n=!1}){let a=i=>{!n&&t&&t(i.target.value)};return(0,fi.jsxs)("div",{className:P("border border-input rounded-md",r),children:[(0,fi.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,fi.jsxs)("div",{className:"flex gap-1",children:[(0,fi.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Bold (Pro feature)",children:"B"}),(0,fi.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Italic (Pro feature)",children:"I"}),(0,fi.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Underline (Pro feature)",children:"U"})]})}),(0,fi.jsx)("textarea",{value:e,onChange:a,placeholder:o,disabled:n,className:P("w-full min-h-[200px] p-3 resize-none border-0 bg-transparent","focus:outline-none focus:ring-0","disabled:cursor-not-allowed disabled:opacity-50")})]})}var tI=R(M());var se=R(M(),1);var wH=R(M(),1),hQ=R(Aa(),1);var lo=R(M(),1);var vH=R(M(),1);function hH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function iQ(...e){return t=>{let o=!1,r=e.map(n=>{let a=hH(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():hH(e[n],null)}}}}function pi(...e){return vH.useCallback(iQ(...e),e)}function yH(e){let t=lo.forwardRef((o,r)=>{let{children:n,...a}=o,i=null,s=!1,l=[];xH(n)&&typeof ey=="function"&&(n=ey(n._payload)),lo.Children.forEach(n,f=>{if(dQ(f)){s=!0;let p=f,g="child"in p.props?p.props.child:p.props.children;xH(g)&&typeof ey=="function"&&(g=ey(g._payload)),i=lQ(p,g),l.push(i?.props?.children)}else l.push(f)}),i?i=lo.cloneElement(i,void 0,l):!s&&lo.Children.count(n)===1&&lo.isValidElement(n)&&(i=n);let u=i?cQ(i):void 0,c=pi(r,u);if(!i){if(n||n===0)throw new Error(s?gQ(e):mQ(e));return n}let d=uQ(a,i.props??{});return i.type!==lo.Fragment&&(d.ref=r?c:u),lo.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var sQ=Symbol.for("radix.slottable");var lQ=(e,t)=>{if("child"in e.props){let o=e.props.child;return lo.isValidElement(o)?lo.cloneElement(o,void 0,e.props.children(o.props.children)):null}return lo.isValidElement(t)?t:null};function uQ(e,t){let o={...t};for(let r in t){let n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function cQ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function dQ(e){return lo.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sQ}var fQ=Symbol.for("react.lazy");function xH(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===fQ&&"_payload"in e&&pQ(e._payload)}function pQ(e){return typeof e=="object"&&e!==null&&"then"in e}var mQ=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,gQ=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ey=lo[" use ".trim().toString()];var CH=R(N(),1),vQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ed=vQ.reduce((e,t)=>{let o=yH(`Primitive.${t}`),r=wH.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,CH.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});var uo=R(M(),1);var SH=R(M(),1),Im=globalThis?.document?SH.useLayoutEffect:()=>{};var RH=R(M(),1);function xQ(e,t){return RH.useReducer((o,r)=>t[o][r]??o,e)}var td=e=>{let{present:t,children:o}=e,r=yQ(t),n=typeof o=="function"?o({present:r.isPresent}):uo.Children.only(o),a=wQ(r.ref,CQ(n));return typeof o=="function"||r.isPresent?uo.cloneElement(n,{ref:a}):null};td.displayName="Presence";function yQ(e){let[t,o]=uo.useState(),r=uo.useRef(null),n=uo.useRef(e),a=uo.useRef("none"),i=uo.useRef(void 0),s=e?"mounted":"unmounted",[l,u]=xQ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return uo.useEffect(()=>{l==="mounted"?(a.current=i.current??Pm(r.current),i.current=void 0):a.current="none"},[l]),Im(()=>{let c=r.current,d=n.current;if(d!==e){let p=a.current,g=Pm(c);e?(i.current=g,u("MOUNT")):g==="none"||c?.display==="none"?u("UNMOUNT"):u(d&&p!==g?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,u]),Im(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=g=>{let x=Pm(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&x&&(u("ANIMATION_END"),!n.current)){let h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=g=>{g.target===t&&(a.current=Pm(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:uo.useCallback(c=>{if(c){let d=getComputedStyle(c);r.current=d,i.current=Pm(d)}else r.current=null;o(c)},[])}}function bH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wQ(...e){let t=uo.useRef(e);return t.current=e,uo.useCallback(o=>{let r=t.current,n=!1,a=r.map(i=>{let s=bH(i,o);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<a.length;i++){let s=a[i];typeof s=="function"?s():bH(r[i],null)}}},[])}function Pm(e){return e?.animationName||"none"}function CQ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var mi=R(M(),1),IH=R(N(),1);function PH(e,t=[]){let o=[];function r(a,i){let s=mi.createContext(i);s.displayName=a+"Context";let l=o.length;o=[...o,i];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=mi.useMemo(()=>g,Object.values(g));return(0,IH.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f,p={}){let{optional:g=!1}=p,m=f?.[e]?.[l]||s,x=mi.useContext(m);if(x)return x;if(i!==void 0)return i;if(!g)throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=o.map(i=>mi.createContext(i));return function(s){let l=s?.[e]||a;return mi.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[r,SQ(n,...t)]}function SQ(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=r.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return mi.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return o.scopeName=t.scopeName,o}var od=R(M(),1);function Ts(e){let t=od.useRef(e);return od.useEffect(()=>{t.current=e}),od.useMemo(()=>(...o)=>t.current?.(...o),[])}var ty=R(M(),1),bQ=R(N(),1),RQ=ty.createContext(void 0);function LH(e){let t=ty.useContext(RQ);return e||t||"ltr"}function TH(e,[t,o]){return Math.min(o,Math.max(t,e))}var Gke=!!(typeof window<"u"&&window.document&&window.document.createElement);function ks(e,t,{checkForDefaultPrevented:o=!0}={}){return function(n){if(e?.(n),o===!1||!n||!n.defaultPrevented)return t?.(n)}}var MH=R(M(),1),Fe=R(N(),1);function IQ(e,t){return MH.useReducer((o,r)=>t[o][r]??o,e)}var YR="ScrollArea",[EH,eMe]=PH(YR),[PQ,Yr]=EH(YR),AH=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,type:r="hover",dir:n,scrollHideDelay:a=600,...i}=e,[s,l]=se.useState(null),[u,c]=se.useState(null),[d,f]=se.useState(null),[p,g]=se.useState(null),[m,x]=se.useState(null),[h,v]=se.useState(0),[y,w]=se.useState(0),[C,b]=se.useState(!1),[S,I]=se.useState(!1),L=pi(t,l),T=LH(n);return(0,Fe.jsx)(PQ,{scope:o,type:r,dir:T,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:b,scrollbarY:m,onScrollbarYChange:x,scrollbarYEnabled:S,onScrollbarYEnabledChange:I,onCornerWidthChange:v,onCornerHeightChange:w,children:(0,Fe.jsx)(ed.div,{dir:T,...i,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":h+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});AH.displayName=YR;var DH="ScrollAreaViewport",NH=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,children:r,nonce:n,...a}=e,i=Yr(DH,o),s=se.useRef(null),l=pi(t,s,i.onViewportChange);return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)(LQ,{nonce:n}),(0,Fe.jsx)(ed.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Fe.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});NH.displayName=DH;var LQ=se.memo(({nonce:e})=>(0,Fe.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,t)=>e.nonce===t.nonce),xa="ScrollAreaScrollbar",ny=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=Yr(xa,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=n,s=e.orientation==="horizontal";return se.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),n.type==="hover"?(0,Fe.jsx)(TQ,{...r,ref:t,forceMount:o}):n.type==="scroll"?(0,Fe.jsx)(kQ,{...r,ref:t,forceMount:o}):n.type==="auto"?(0,Fe.jsx)(OH,{...r,ref:t,forceMount:o}):n.type==="always"?(0,Fe.jsx)(QR,{...r,ref:t,"data-state":"visible"}):null});ny.displayName=xa;var TQ=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=Yr(xa,e.__scopeScrollArea),[a,i]=se.useState(!1);return se.useEffect(()=>{let s=n.scrollArea,l=0;if(s){let u=()=>{window.clearTimeout(l),i(!0)},c=()=>{l=window.setTimeout(()=>i(!1),n.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",c)}}},[n.scrollArea,n.scrollHideDelay]),(0,Fe.jsx)(td,{present:o||a,children:(0,Fe.jsx)(OH,{"data-state":a?"visible":"hidden",...r,ref:t})})}),kQ=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=Yr(xa,e.__scopeScrollArea),a=e.orientation==="horizontal",i=iy(()=>l("SCROLL_END"),100),[s,l]=IQ("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return se.useEffect(()=>{if(s==="idle"){let u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,n.scrollHideDelay,l]),se.useEffect(()=>{let u=n.viewport,c=a?"scrollLeft":"scrollTop";if(u){let d=u[c],f=()=>{let p=u[c];d!==p&&(l("SCROLL"),i()),d=p};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[n.viewport,a,l,i]),(0,Fe.jsx)(td,{present:o||s!=="hidden",children:(0,Fe.jsx)(QR,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ks(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ks(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),OH=se.forwardRef((e,t)=>{let o=Yr(xa,e.__scopeScrollArea),{forceMount:r,...n}=e,[a,i]=se.useState(!1),s=e.orientation==="horizontal",l=iy(()=>{if(o.viewport){let u=o.viewport.offsetWidth<o.viewport.scrollWidth,c=o.viewport.offsetHeight<o.viewport.scrollHeight;i(s?u:c)}},10);return rd(o.viewport,l),rd(o.content,l),(0,Fe.jsx)(td,{present:r||a,children:(0,Fe.jsx)(QR,{"data-state":a?"visible":"hidden",...n,ref:t})})}),QR=se.forwardRef((e,t)=>{let{orientation:o="vertical",...r}=e,n=Yr(xa,e.__scopeScrollArea),a=se.useRef(null),i=se.useRef(0),[s,l]=se.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=BH(s.viewport,s.content),c={...r,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function d(f,p){return OQ(f,i.current,s,p)}return o==="horizontal"?(0,Fe.jsx)(MQ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollLeft,p=kH(f,s,n.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{n.viewport&&(n.viewport.scrollLeft=f)},onDragScroll:f=>{n.viewport&&(n.viewport.scrollLeft=d(f,n.dir))}}):o==="vertical"?(0,Fe.jsx)(EQ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollTop,p=kH(f,s);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{n.viewport&&(n.viewport.scrollTop=f)},onDragScroll:f=>{n.viewport&&(n.viewport.scrollTop=d(f))}}):null}),MQ=se.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...n}=e,a=Yr(xa,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=pi(t,l,a.onScrollbarXChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Fe.jsx)(_H,{"data-orientation":"horizontal",...n,ref:u,sizes:o,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ay(o)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(a.viewport){let f=a.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),UH(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:ry(i.paddingLeft),paddingEnd:ry(i.paddingRight)}})}})}),EQ=se.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...n}=e,a=Yr(xa,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=pi(t,l,a.onScrollbarYChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Fe.jsx)(_H,{"data-orientation":"vertical",...n,ref:u,sizes:o,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ay(o)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(a.viewport){let f=a.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),UH(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:ry(i.paddingTop),paddingEnd:ry(i.paddingBottom)}})}})}),[AQ,FH]=EH(xa),_H=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,sizes:r,hasThumb:n,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=Yr(xa,o),[g,m]=se.useState(null),x=pi(t,m),h=se.useRef(null),v=se.useRef(""),y=p.viewport,w=r.content-r.viewport,C=Ts(c),b=Ts(l),S=iy(d,10);function I(L){if(h.current){let T=L.clientX-h.current.left,k=L.clientY-h.current.top;u({x:T,y:k})}}return se.useEffect(()=>{let L=T=>{let k=T.target;g?.contains(k)&&C(T,w)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[y,g,w,C]),se.useEffect(b,[r,b]),rd(g,S),rd(p.content,S),(0,Fe.jsx)(AQ,{scope:o,scrollbar:g,hasThumb:n,onThumbChange:Ts(a),onThumbPointerUp:Ts(i),onThumbPositionChange:b,onThumbPointerDown:Ts(s),children:(0,Fe.jsx)(ed.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:ks(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),h.current=g.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),I(L))}),onPointerMove:ks(e.onPointerMove,I),onPointerUp:ks(e.onPointerUp,L=>{let T=L.target;T.hasPointerCapture(L.pointerId)&&T.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=""),h.current=null})})})}),oy="ScrollAreaThumb",ZR=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=FH(oy,e.__scopeScrollArea);return(0,Fe.jsx)(td,{present:o||n.hasThumb,children:(0,Fe.jsx)(DQ,{ref:t,...r})})}),DQ=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,style:r,...n}=e,a=Yr(oy,o),i=FH(oy,o),{onThumbPositionChange:s}=i,l=pi(t,i.onThumbChange),u=se.useRef(void 0),c=iy(()=>{u.current&&(u.current(),u.current=void 0)},100);return se.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(c(),!u.current){let p=FQ(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,c,s]),(0,Fe.jsx)(ed.div,{"data-state":i.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ks(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),g=d.clientX-p.left,m=d.clientY-p.top;i.onThumbPointerDown({x:g,y:m})}),onPointerUp:ks(e.onPointerUp,i.onThumbPointerUp)})});ZR.displayName=oy;var JR="ScrollAreaCorner",VH=se.forwardRef((e,t)=>{let o=Yr(JR,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?(0,Fe.jsx)(NQ,{...e,ref:t}):null});VH.displayName=JR;var NQ=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,...r}=e,n=Yr(JR,o),[a,i]=se.useState(0),[s,l]=se.useState(0),u=!!(a&&s),{onCornerWidthChange:c,onCornerHeightChange:d}=n;return rd(n.scrollbarX,()=>{let f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),l(f)}),rd(n.scrollbarY,()=>{let f=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(f),i(f)}),se.useEffect(()=>()=>{c(0),d(0)},[c,d]),u?(0,Fe.jsx)(ed.div,{...r,ref:t,style:{width:a,height:s,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ry(e){return e?parseInt(e,10):0}function BH(e,t){let o=e/t;return isNaN(o)?0:o}function ay(e){let t=BH(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function OQ(e,t,o,r="ltr"){let n=ay(o),a=n/2,i=t||a,s=n-i,l=o.scrollbar.paddingStart+i,u=o.scrollbar.size-o.scrollbar.paddingEnd-s,c=o.content-o.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return HH([l,u],d)(e)}function kH(e,t,o="ltr"){let r=ay(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,i=t.content-t.viewport,s=a-r,l=o==="ltr"?[0,i]:[i*-1,0],u=TH(e,l);return HH([0,i],[0,s])(u)}function HH(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function UH(e,t){return e>0&&e<t}var FQ=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return function n(){let a={left:e.scrollLeft,top:e.scrollTop},i=o.left!==a.left,s=o.top!==a.top;(i||s)&&t(),o=a,r=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(r)};function iy(e,t){let o=Ts(e),r=se.useRef(0);return se.useEffect(()=>()=>window.clearTimeout(r.current),[]),se.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function rd(e,t){let o=Ts(t);Im(()=>{let r=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return n.observe(e),()=>{window.cancelAnimationFrame(r),n.unobserve(e)}}},[e,o])}var eI=AH,zH=NH;var GH=VH;var Ms=R(N()),WH=tI.forwardRef(({className:e,children:t,...o},r)=>(0,Ms.jsxs)(eI,{ref:r,className:P("relative overflow-hidden",e),...o,children:[(0,Ms.jsx)(zH,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Ms.jsx)(oI,{}),(0,Ms.jsx)(GH,{})]}));WH.displayName=eI.displayName;var oI=tI.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,Ms.jsx)(ny,{ref:r,orientation:t,className:P("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,Ms.jsx)(ZR,{className:"relative flex-1 rounded-full bg-border"})}));oI.displayName=ny.displayName;var Hn=R(M());var Lm=R(N()),jH=(e,t)=>{let o={up:{hidden:{opacity:0,y:t},visible:{opacity:1,y:0}},down:{hidden:{opacity:0,y:-t},visible:{opacity:1,y:0}},left:{hidden:{opacity:0,x:t},visible:{opacity:1,x:0}},right:{hidden:{opacity:0,x:-t},visible:{opacity:1,x:0}},fade:{hidden:{opacity:0},visible:{opacity:1}},scale:{hidden:{opacity:0,scale:.85},visible:{opacity:1,scale:1}},blur:{hidden:{opacity:0,filter:"blur(10px)"},visible:{opacity:1,filter:"blur(0px)"}}};return o[e]||o.up},qH={duration:.5,ease:[.25,.46,.45,.94]},$H=Hn.forwardRef(({children:e,direction:t="up",delay:o=0,duration:r=.5,distance:n=50,threshold:a=.3,once:i=!0,triggerOnce:s,stagger:l=0,className:u,variants:c,animate:d=!0,style:f,id:p,viewport:g},m)=>{let x=s!==void 0?s:i,h=Hn.useMemo(()=>c||jH(t,n),[t,n,c]),v=Hn.useMemo(()=>({...qH,duration:r,delay:o+l}),[r,o,l]),y=Hn.useMemo(()=>({once:x,amount:a,...g}),[x,a,g]);return d?(0,Lm.jsx)(Be.div,{ref:m,initial:"hidden",whileInView:"visible",viewport:y,variants:h,transition:v,className:P(u),style:f,id:p,children:e}):(0,Lm.jsx)("div",{ref:m,className:u,style:f,id:p,children:e})});$H.displayName="ScrollReveal";var KH=Hn.forwardRef(({children:e,stagger:t=.1,className:o,style:r,id:n,threshold:a=.3,once:i=!0,triggerOnce:s,viewport:l},u)=>{let c=s!==void 0?s:i,d=Hn.useMemo(()=>({once:c,amount:a,...l}),[c,a,l]),f={hidden:{},visible:{transition:{staggerChildren:t,delayChildren:0}}};return(0,Lm.jsx)(Be.div,{ref:u,initial:"hidden",whileInView:"visible",viewport:d,variants:f,className:P(o),style:r,id:n,children:e})});KH.displayName="ScrollRevealContainer";var XH=Hn.forwardRef(({children:e,direction:t="up",duration:o=.5,distance:r=50,className:n,variants:a,style:i,id:s},l)=>{let u=Hn.useMemo(()=>a||jH(t,r),[t,r,a]),c=Hn.useMemo(()=>({...qH,duration:o}),[o]);return(0,Lm.jsx)(Be.div,{ref:l,variants:u,transition:c,className:P(n),style:i,id:s,children:e})});XH.displayName="ScrollRevealItem";var eU=R(M());var QH=R(M(),1);var ZH=R(N(),1),VQ="Separator",YH="horizontal",BQ=["horizontal","vertical"],JH=QH.forwardRef((e,t)=>{let{decorative:o,orientation:r=YH,...n}=e,a=HQ(r)?r:YH,s=o?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,ZH.jsx)($.div,{"data-orientation":a,...s,...n,ref:t})});JH.displayName=VQ;function HQ(e){return BQ.includes(e)}var rI=JH;var tU=R(N()),zQ=K("shrink-0 bg-border",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"},variant:{default:"bg-border",dashed:"border-dashed border-border bg-transparent",dotted:"border-dotted border-border bg-transparent",gradient:"bg-gradient-to-r from-transparent via-border to-transparent"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",variant:"dashed",className:"border-t h-0"},{orientation:"vertical",variant:"dashed",className:"border-l w-0"},{orientation:"horizontal",variant:"dotted",className:"border-t h-0"},{orientation:"vertical",variant:"dotted",className:"border-l w-0"},{orientation:"horizontal",size:"sm",variant:["dashed","dotted"],className:"border-t-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["dashed","dotted"],className:"border-t-2"},{orientation:"vertical",size:"sm",variant:["dashed","dotted"],className:"border-l-[0.5px]"},{orientation:"vertical",size:"lg",variant:["dashed","dotted"],className:"border-l-2"},{orientation:"horizontal",size:"sm",variant:["default","gradient"],className:"h-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["default","gradient"],className:"h-[2px]"},{orientation:"vertical",size:"sm",variant:["default","gradient"],className:"w-[0.5px]"},{orientation:"vertical",size:"lg",variant:["default","gradient"],className:"w-[2px]"}],defaultVariants:{orientation:"horizontal",variant:"default",size:"md"}}),Qr=eU.forwardRef(({className:e,orientation:t="horizontal",variant:o="default",size:r="md",decorative:n=!0,...a},i)=>(0,tU.jsx)(rI,{ref:i,decorative:n,orientation:t||void 0,className:P(zQ({orientation:t,variant:o,size:r}),e),...a}));Qr.displayName=rI.displayName;var Je=R(M());var IU=R(M());var bU=R(M(),1);var GQ=Object.defineProperty,nd=(e,t)=>GQ(e,"name",{value:t,configurable:!0}),oU=!!(typeof window<"u"&&window.document&&window.document.createElement);function aI(e,t,{checkForDefaultPrevented:o=!0}={}){return nd(function(n){if(e?.(n),o===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}nd(aI,"composeEventHandlers");function WQ(e){if(!oU)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}nd(WQ,"getOwnerWindow");function nI(e){if(!oU)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}nd(nI,"getOwnerDocument");function rU(e,t=!1){let{activeElement:o}=nI(e);if(!o?.nodeName)return null;if(nU(o)&&o.contentDocument)return rU(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let n=nI(o).getElementById(r);if(n)return n}}return o}nd(rU,"getActiveElement");function nU(e){return e.tagName==="IFRAME"}nd(nU,"isFrame");var Zr=R(M(),1);var ad=!1;var aU=R(M(),1),sy=globalThis?.document?aU.useLayoutEffect:()=>{};var Un=R(M(),1);var id=R(M(),1),jQ=Object.defineProperty,qQ=(e,t)=>jQ(e,"name",{value:t,configurable:!0}),iU=id[" useEffectEvent ".trim().toString()],sU=id[" useInsertionEffect ".trim().toString()];function iI(e){if(typeof iU=="function")return iU(e);let t=id.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof sU=="function"?sU(()=>{t.current=e}):sy(()=>{t.current=e}),id.useMemo(()=>(...o)=>t.current?.(...o),[])}qQ(iI,"useEffectEvent");var $Q=Object.defineProperty,Tm=(e,t)=>$Q(e,"name",{value:t,configurable:!0}),KQ=Zr[" useInsertionEffect ".trim().toString()]||sy;function sI({prop:e,defaultProp:t,onChange:o=Tm(()=>{},"onChange"),caller:r}){let[n,a,i]=uU({defaultProp:t,onChange:o}),s=e!==void 0,l=s?e:n;if(ad){let c=Zr.useRef(e!==void 0);Zr.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),c.current=s},[s,r])}let u=Zr.useCallback(c=>{if(s){let d=cU(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}Tm(sI,"useControllableState");function uU({defaultProp:e,onChange:t}){let[o,r]=Zr.useState(e),n=Zr.useRef(o),a=Zr.useRef(t);return KQ(()=>{a.current=t},[t]),Zr.useEffect(()=>{n.current!==o&&(a.current?.(o),n.current=o)},[o,n]),[o,r,a]}Tm(uU,"useUncontrolledState");function cU(e){return typeof e=="function"}Tm(cU,"isFunction");var lU=Symbol("RADIX:SYNC_STATE");function XQ(e,t,o,r){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=iI(i);if(ad){let x=Un.useRef(n!==void 0);Un.useEffect(()=>{let h=x.current;h!==l&&console.warn(`${s} 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.`),x.current=l},[l,s])}let c=[{...o,state:a}];r&&c.push(r);let[d,f]=Un.useReducer((x,h)=>{if(h.type===lU)return{...x,state:h.state};let v=e(x,h);return l&&!Object.is(v.state,x.state)&&u(v.state),v},...c),p=d.state,g=Un.useRef(p);Un.useEffect(()=>{g.current!==p&&(g.current=p,l||u(p))},[p,g,l]);let m=Un.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return Un.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:lU,state:n})},[n,d.state,l]),[m,f]}Tm(XQ,"useControllableStateReducer");var yU=R(M(),1),wU=R(Aa(),1);var It=R(M(),1);var dU=R(M(),1),YQ=Object.defineProperty,uI=(e,t)=>YQ(e,"name",{value:t,configurable:!0});function lI(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}uI(lI,"setRef");function fU(...e){return t=>{let o=!1,r=e.map(n=>{let a=lI(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():lI(e[n],null)}}}}uI(fU,"composeRefs");function cI(...e){return dU.useCallback(fU(...e),e)}uI(cI,"useComposedRefs");var JQ=R(N(),1),QQ=Object.defineProperty,Jr=(e,t)=>QQ(e,"name",{value:t,configurable:!0}),ZQ=Jr((e,t)=>{let o={...t};for(let r in t){let n=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(n&&a){let s=typeof n=="function",l=typeof a=="function";ad&&(!s||!l)&&console.warn(`Slot: Expected a function for ${r}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),o[r]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(o[r]=n);else r==="style"?o[r]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:r==="className"?o[r]=[n,a].filter(Boolean).join(" "):r==="aria-describedby"&&(o[r]=pU(a,n))}return{...e,...o}},"mergeProps");function pU(...e){let t=new Set;for(let o of e)if(typeof o=="string")for(let r of String(o).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}Jr(pU,"concatAriaDescribedby");var mU=It.createContext(ZQ);mU.displayName="SlotContext";function fI(e){let t=It.forwardRef((o,r)=>{let n=It.useContext(mU),{children:a,mergeProps:i=n,...s}=o,l=null,u=!1,c=[];dI(a)&&typeof ly=="function"&&(a=ly(a._payload)),It.Children.forEach(a,g=>{if(vU(g)){u=!0;let m=g,x="child"in m.props?m.props.child:m.props.children;dI(x)&&typeof ly=="function"&&(x=ly(x._payload)),l=tZ(m,x),c.push(l?.props?.children)}else c.push(g)}),l?l=It.cloneElement(l,void 0,c):!u&&It.Children.count(a)===1&&It.isValidElement(a)&&(l=a);let d=l?hU(l):void 0,f=cI(r,d);if(!l){if(a||a===0)throw new Error(u?nZ(e):rZ(e));return a}let p=i(s,l.props??{});return l.type!==It.Fragment&&(p.ref=r?f:d),It.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}Jr(fI,"createSlot");var gU=Symbol.for("radix.slottable");function eZ(e){let t=Jr(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=gU,t}Jr(eZ,"createSlottable");var tZ=Jr((e,t)=>{if("child"in e.props){let o=e.props.child;return It.isValidElement(o)?It.cloneElement(o,void 0,e.props.children(o.props.children)):null}return It.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function hU(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}Jr(hU,"getElementRef");function vU(e){return It.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gU}Jr(vU,"isSlottable");var oZ=Symbol.for("react.lazy");function dI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===oZ&&"_payload"in e&&xU(e._payload)}Jr(dI,"isLazyComponent");function xU(e){return typeof e=="object"&&e!==null&&"then"in e}Jr(xU,"isPromiseLike");var rZ=Jr(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),nZ=Jr(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ly=It[" use ".trim().toString()];var CU=R(N(),1),aZ=Object.defineProperty,iZ=(e,t)=>aZ(e,"name",{value:t,configurable:!0}),sZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],SU=sZ.reduce((e,t)=>{let o=fI(`Primitive.${t}`),r=yU.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,CU.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function lZ(e,t){e&&wU.flushSync(()=>e.dispatchEvent(t))}iZ(lZ,"dispatchDiscreteCustomEvent");var RU=R(N(),1),uZ=Object.defineProperty,cZ=(e,t)=>uZ(e,"name",{value:t,configurable:!0}),dZ="Toggle",km=bU.forwardRef(cZ(function(t,o){let{pressed:r,defaultPressed:n,onPressedChange:a,...i}=t,[s,l]=sI({prop:r,onChange:a,defaultProp:n??!1,caller:dZ});return(0,RU.jsx)(SU.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:o,onClick:aI(t.onClick,()=>{t.disabled||l(!s)})})},"Toggle"));var PU=R(N()),uy=K("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),cy=IU.forwardRef(({className:e,variant:t,size:o,...r},n)=>(0,PU.jsx)(km,{ref:n,className:P("moonui-theme",uy({variant:t,size:o,className:e})),...r}));cy.displayName=km.displayName;var py=R(M());var Re=R(M(),1);var At=R(N(),1),[dy,qMe]=Oe("Tooltip",[$r]),fy=$r(),LU="TooltipProvider",pZ=700,pI="tooltip.open",[mZ,gI]=dy(LU),TU=e=>{let{__scopeTooltip:t,delayDuration:o=pZ,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:a}=e,i=Re.useRef(!0),s=Re.useRef(!1),l=Re.useRef(0);return Re.useEffect(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),(0,At.jsx)(mZ,{scope:t,isOpenDelayedRef:i,delayDuration:o,onOpen:Re.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:Re.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:Re.useCallback(u=>{s.current=u},[]),disableHoverableContent:n,children:a})};TU.displayName=LU;var Mm="Tooltip",[gZ,Em]=dy(Mm),kU=e=>{let{__scopeTooltip:t,children:o,open:r,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=gI(Mm,e.__scopeTooltip),u=fy(t),[c,d]=Re.useState(null),f=Ae(),p=Re.useRef(0),g=i??l.disableHoverableContent,m=s??l.delayDuration,x=Re.useRef(!1),[h,v]=qe({prop:r,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(pI))):l.onClose(),a?.(S)},caller:Mm}),y=Re.useMemo(()=>h?x.current?"delayed-open":"instant-open":"closed",[h]),w=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,v(!0)},[v]),C=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),b=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,v(!0),p.current=0},m)},[m,v]);return Re.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,At.jsx)(Ja,{...u,children:(0,At.jsx)(gZ,{scope:t,contentId:f,open:h,stateAttribute:y,trigger:c,onTriggerChange:d,onTriggerEnter:Re.useCallback(()=>{l.isOpenDelayedRef.current?b():w()},[l.isOpenDelayedRef,b,w]),onTriggerLeave:Re.useCallback(()=>{g?C():(window.clearTimeout(p.current),p.current=0)},[C,g]),onOpen:w,onClose:C,disableHoverableContent:g,children:o})})};kU.displayName=Mm;var mI="TooltipTrigger",MU=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,n=Em(mI,o),a=gI(mI,o),i=fy(o),s=Re.useRef(null),l=de(t,s,n.onTriggerChange),u=Re.useRef(!1),c=Re.useRef(!1),d=Re.useCallback(()=>u.current=!1,[]);return Re.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,At.jsx)(ei,{asChild:!0,...i,children:(0,At.jsx)($.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:W(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:W(e.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:W(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:W(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:W(e.onBlur,n.onClose),onClick:W(e.onClick,n.onClose)})})});MU.displayName=mI;var hI="TooltipPortal",[hZ,vZ]=dy(hI,{forceMount:void 0}),xZ=e=>{let{__scopeTooltip:t,forceMount:o,children:r,container:n}=e,a=Em(hI,t);return(0,At.jsx)(hZ,{scope:t,forceMount:o,children:(0,At.jsx)(st,{present:o||a.open,children:(0,At.jsx)(Sr,{asChild:!0,container:n,children:r})})})};xZ.displayName=hI;var sd="TooltipContent",EU=Re.forwardRef((e,t)=>{let o=vZ(sd,e.__scopeTooltip),{forceMount:r=o.forceMount,side:n="top",...a}=e,i=Em(sd,e.__scopeTooltip);return(0,At.jsx)(st,{present:r||i.open,children:i.disableHoverableContent?(0,At.jsx)(AU,{side:n,...a,ref:t}):(0,At.jsx)(yZ,{side:n,...a,ref:t})})}),yZ=Re.forwardRef((e,t)=>{let o=Em(sd,e.__scopeTooltip),r=gI(sd,e.__scopeTooltip),n=Re.useRef(null),a=de(t,n),[i,s]=Re.useState(null),{trigger:l,onClose:u}=o,c=n.current,{onPointerInTransitChange:d}=r,f=Re.useCallback(()=>{s(null),d(!1)},[d]),p=Re.useCallback((g,m)=>{let x=g.currentTarget,h={x:g.clientX,y:g.clientY},v=bZ(h,x.getBoundingClientRect()),y=RZ(h,v),w=IZ(m.getBoundingClientRect()),C=LZ([...y,...w]);s(C),d(!0)},[d]);return Re.useEffect(()=>()=>f(),[f]),Re.useEffect(()=>{if(l&&c){let g=x=>p(x,c),m=x=>p(x,l);return l.addEventListener("pointerleave",g),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",m)}}},[l,c,p,f]),Re.useEffect(()=>{if(i){let g=m=>{let x=m.target,h={x:m.clientX,y:m.clientY},v=l?.contains(x)||c?.contains(x),y=!PZ(h,i);v?f():y&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,c,i,u,f]),(0,At.jsx)(AU,{...e,ref:a})}),[wZ,CZ]=dy(Mm,{isInside:!1}),SZ=xP("TooltipContent"),AU=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,children:r,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Em(sd,o),u=fy(o),{onClose:c}=l;return Re.useEffect(()=>(document.addEventListener(pI,c),()=>document.removeEventListener(pI,c)),[c]),Re.useEffect(()=>{if(l.trigger){let d=f=>{f.target?.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),(0,At.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,At.jsxs)(fs,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.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:[(0,At.jsx)(SZ,{children:r}),(0,At.jsx)(wZ,{scope:o,isInside:!0,children:(0,At.jsx)(IB,{id:l.contentId,role:"tooltip",children:n||r})})]})})});EU.displayName=sd;var DU="TooltipArrow",NU=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,n=fy(o);return CZ(DU,o).isInside?null:(0,At.jsx)(ps,{...n,...r,ref:t})});NU.displayName=DU;function bZ(e,t){let o=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(o,r,n,a)){case a:return"left";case n:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function RZ(e,t,o=5){let r=[];switch(t){case"top":r.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":r.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":r.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":r.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return r}function IZ(e){let{top:t,right:o,bottom:r,left:n}=e;return[{x:n,y:t},{x:o,y:t},{x:o,y:r},{x:n,y:r}]}function PZ(e,t){let{x:o,y:r}=e,n=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],u=s.x,c=s.y,d=l.x,f=l.y;c>r!=f>r&&o<(d-u)*(r-c)/(f-c)+u&&(n=!n)}return n}function LZ(e){let t=e.slice();return t.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),TZ(t)}function TZ(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let n=e[r];for(;t.length>=2;){let a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}t.pop();let o=[];for(let r=e.length-1;r>=0;r--){let n=e[r];for(;o.length>=2;){let a=o[o.length-1],i=o[o.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))o.pop();else break}o.push(n)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var OU=TU,FU=kU,_U=MU;var vI=EU,xI=NU;var Es=R(N()),yI=OU,MZ=K("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",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500 text-white border-green-600",warning:"bg-yellow-500 text-white border-yellow-600",destructive:"bg-destructive text-destructive-foreground",info:"bg-blue-500 text-white border-blue-600"},size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{variant:"default",size:"md"}}),my=FU,gy=_U,VU=py.forwardRef(({className:e,...t},o)=>(0,Es.jsx)(xI,{ref:o,className:P("moonui-theme","fill-current",e),...t}));VU.displayName=xI.displayName;var Am=py.forwardRef(({className:e,variant:t,size:o,showArrow:r=!1,sideOffset:n=4,...a},i)=>(0,Es.jsxs)(vI,{ref:i,sideOffset:n,className:P("moonui-theme",MZ({variant:t,size:o}),e),...a,children:[a.children,r&&(0,Es.jsx)(VU,{})]}));Am.displayName=vI.displayName;var EZ=py.forwardRef(({children:e,content:t,variant:o="default",size:r="md",side:n="top",align:a="center",delayDuration:i=400,sideOffset:s=4,showArrow:l=!1,className:u,open:c,defaultOpen:d,onOpenChange:f,...p},g)=>(0,Es.jsxs)(my,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,Es.jsx)(gy,{asChild:!0,children:e}),(0,Es.jsx)(Am,{ref:g,side:n,align:a,variant:o,size:r,sideOffset:s,showArrow:l,className:u,...p,children:t})]}));EZ.displayName="SimpleTooltip";var G=R(N()),Wt=({icon:e,tooltip:t,active:o,onClick:r,disabled:n})=>(0,G.jsxs)(my,{children:[(0,G.jsx)(gy,{asChild:!0,children:(0,G.jsx)(cy,{pressed:o,onPressedChange:()=>r(),disabled:n,"aria-label":t,className:"h-8 w-8 p-0",children:e})}),(0,G.jsx)(Am,{children:(0,G.jsx)("p",{children:t})})]}),AZ=({onColorSelect:e})=>(0,G.jsx)("div",{className:"grid grid-cols-4 gap-1 p-2",children:["#000000","#374151","#6B7280","#9CA3AF","#EF4444","#F59E0B","#EAB308","#22C55E","#3B82F6","#6366F1","#8B5CF6","#EC4899"].map(o=>(0,G.jsx)("button",{type:"button","aria-label":`Select color ${o}`,className:"w-6 h-6 rounded border-2 border-border hover:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",style:{backgroundColor:o},onClick:()=>e(o)},o))}),BU=Je.default.forwardRef(({value:e="",onChange:t,placeholder:o="Start writing...",disabled:r=!1,className:n,minHeight:a=200,maxHeight:i=500,showToolbar:s=!0,showPreview:l=!0,...u},c)=>{let[d,f]=(0,Je.useState)(e),[p,g]=(0,Je.useState)(!1),[m,x]=(0,Je.useState)(e),[h,v]=(0,Je.useState)(null),y=Je.default.useRef(null),w=Je.default.useRef(null),[C,b]=(0,Je.useState)({bold:!1,italic:!1,underline:!1,strikethrough:!1,alignLeft:!0,alignCenter:!1,alignRight:!1,alignJustify:!1,orderedList:!1,unorderedList:!1,quote:!1,code:!1}),S=(0,Je.useCallback)(A=>{f(A),t?.(A)},[t]),I=(0,Je.useCallback)(()=>{let A=window.getSelection();return A&&A.rangeCount>0?A.getRangeAt(0):null},[]),L=(0,Je.useCallback)(A=>{if(!A)return;let te=window.getSelection();te&&(te.removeAllRanges(),te.addRange(A))},[]),T=(0,Je.useCallback)((A,te)=>{if(r)return;y.current&&y.current.focus();let ae=I();if(document.execCommand(A,!1,te)||console.warn(`Command '${A}' failed to execute`),y.current){let Q=y.current.innerHTML;S(Q)}b({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikethrough:document.queryCommandState("strikeThrough"),alignLeft:document.queryCommandState("justifyLeft"),alignCenter:document.queryCommandState("justifyCenter"),alignRight:document.queryCommandState("justifyRight"),alignJustify:document.queryCommandState("justifyFull"),orderedList:document.queryCommandState("insertOrderedList"),unorderedList:document.queryCommandState("insertUnorderedList"),quote:document.queryCommandState("formatBlock"),code:document.queryCommandState("formatBlock")}),y.current&&y.current.focus()},[r,I,S]),k=(0,Je.useCallback)(A=>{let te=A.currentTarget.innerHTML;S(te)},[S]),E=(0,Je.useCallback)(A=>{if(A.ctrlKey||A.metaKey)switch(A.key){case"b":A.preventDefault(),T("bold");break;case"i":A.preventDefault(),T("italic");break;case"u":A.preventDefault(),T("underline");break;case"z":A.preventDefault(),A.shiftKey?T("redo"):T("undo");break}A.key==="Tab"&&(A.preventDefault(),T("insertHTML"," "))},[T]),_=(0,Je.useCallback)(()=>{let A=prompt("Enter URL:");A&&T("createLink",A)},[T]),D=(0,Je.useCallback)(()=>{let A=prompt("Enter image URL:");A&&T("insertImage",A)},[T]),z=(0,Je.useCallback)(A=>{T("formatBlock",`<h${A}>`)},[T]),F=(0,Je.useCallback)(A=>{let te=window.getSelection();if(te&&te.rangeCount>0){let ae=te.getRangeAt(0),V=document.createElement("span");V.style.color=A;try{ae.surroundContents(V)}catch{T("foreColor",A)}if(y.current){let Q=y.current.innerHTML;S(Q)}}},[T,S]),O=A=>{if(typeof window>"u")return A.replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'");let te=document.createElement("div");return te.innerHTML=A,te.textContent||te.innerText||""};Je.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),Je.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),x(e))},[e,d]);let B=s&&(0,G.jsx)(yI,{children:(0,G.jsxs)(Be.div,{className:"flex items-center gap-1 p-2 border-b bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},children:[!p&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)(yf,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>T("bold"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Mf,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>T("italic"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Hf,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>T("underline"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Bf,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>T("strikeThrough"),disabled:r})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(Qc,{onValueChange:A=>{A.startsWith("h")?z(A.substring(1)):A==="normal"?T("formatBlock","p"):T("fontSize",A)},disabled:r,children:[(0,G.jsx)(Zc,{className:"w-24 h-8",children:(0,G.jsx)(bm,{placeholder:"Size"})}),(0,G.jsxs)(Jc,{children:[(0,G.jsx)(Ho,{value:"1",children:"Small"}),(0,G.jsx)(Ho,{value:"3",children:"Normal"}),(0,G.jsx)(Ho,{value:"5",children:"Large"}),(0,G.jsx)(Ho,{value:"7",children:"X-Large"}),(0,G.jsx)(Qr,{className:"my-1"}),(0,G.jsx)(Ho,{value:"h1",children:"Heading 1"}),(0,G.jsx)(Ho,{value:"h2",children:"Heading 2"}),(0,G.jsx)(Ho,{value:"h3",children:"Heading 3"}),(0,G.jsx)(Ho,{value:"h4",children:"Heading 4"}),(0,G.jsx)(Ho,{value:"h5",children:"Heading 5"}),(0,G.jsx)(Ho,{value:"h6",children:"Heading 6"})]})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)(gf,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>T("justifyLeft"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(pf,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>T("justifyCenter"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(hf,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>T("justifyRight"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(mf,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>T("justifyFull"),disabled:r})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)(Df,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>T("insertUnorderedList"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Af,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>T("insertOrderedList"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(_f,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>T("formatBlock","blockquote"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Sf,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>T("formatBlock","pre"),disabled:r})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>T("outdent"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>T("indent"),disabled:r})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)(Ef,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:_,disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(rl,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:D,disabled:r})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(oi,{children:[(0,G.jsx)(ri,{asChild:!0,children:(0,G.jsx)(De,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:r,title:"Text Color",children:(0,G.jsx)(zu,{className:"h-3 w-3"})})}),(0,G.jsx)(ha,{className:"w-auto p-0",children:(0,G.jsx)(AZ,{onColorSelect:F})})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)(Uf,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>T("undo"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Vf,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>T("redo"),disabled:r})]})]}),l&&(0,G.jsxs)(G.Fragment,{children:[!p&&(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsx)(Wt,{icon:p?(0,G.jsx)(Qo,{className:"h-3 w-3"}):(0,G.jsx)(ol,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?S(m):x(d),g(!p)},disabled:r})]})]})});return(0,G.jsxs)("div",{ref:c,className:P("border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",r&&"opacity-50 cursor-not-allowed",n),...u,children:[B,(0,G.jsxs)("div",{className:"relative",children:[p?(0,G.jsx)(Be.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-slate-50 dark:bg-zinc-900/95",style:{minHeight:a,maxHeight:i,overflow:"auto"},children:(0,G.jsx)("textarea",{ref:w,value:m,onChange:A=>x(A.target.value),className:"w-full h-full bg-transparent p-4 font-mono text-sm text-gray-900 dark:text-gray-100 resize-none focus:outline-none",style:{minHeight:a-32},disabled:r,placeholder:"HTML source code..."})}):(0,G.jsx)(Be.div,{ref:y,contentEditable:!r,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":o,"aria-disabled":r||void 0,className:P("p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto","bg-background text-foreground","focus:ring-0","[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4","[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3","[&_h3]:text-xl [&_h3]:font-bold [&_h3]:mb-2","[&_h4]:text-lg [&_h4]:font-bold [&_h4]:mb-2","[&_h5]:text-base [&_h5]:font-bold [&_h5]:mb-1","[&_h6]:text-sm [&_h6]:font-bold [&_h6]:mb-1","[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4","[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4","[&_li]:mb-1","[&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-4 [&_blockquote]:italic","[&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto"),style:{minHeight:a,maxHeight:i},onInput:k,onKeyDown:E,"data-placeholder":o,initial:{opacity:0},animate:{opacity:1}}),!d&&!p&&(0,G.jsx)("div",{className:"absolute top-4 left-4 text-muted-foreground pointer-events-none",style:{fontSize:"16px"},children:o})]}),(0,G.jsx)("div",{className:"px-4 py-2 border-t bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm text-xs text-gray-600 dark:text-gray-400",children:(0,G.jsx)(DZ,{content:d})})]})});BU.displayName="SimpleEditor";var DZ=({content:e})=>{let[t,o]=(0,Je.useState)(0);return(0,Je.useEffect)(()=>{o((n=>{let a=document.createElement("div");return a.innerHTML=n,a.textContent||a.innerText||""})(e).length)},[e]),(0,G.jsxs)(G.Fragment,{children:[t," characters"]})};var Dm=R(M());var Zt=R(N()),HU=K("animate-pulse rounded-md",{variants:{variant:{default:"bg-muted",primary:"bg-primary/10",secondary:"bg-secondary/10",accent:"bg-accent"},size:{default:"",sm:"scale-90",lg:"scale-110"},shape:{rect:"rounded-md",circle:"rounded-full",pill:"rounded-full"},animation:{pulse:"animate-pulse",wave:"overflow-hidden relative after:absolute after:inset-0 after:-translate-x-full after:animate-[shimmer_2s_infinite] after:bg-gradient-to-r after:from-transparent after:via-white/10 after:to-transparent dark:after:via-white/5",none:"animate-none"}},defaultVariants:{variant:"default",size:"default",shape:"rect",animation:"pulse"}}),As=Dm.forwardRef(({className:e,variant:t,size:o,shape:r,animation:n,height:a,width:i,isLoaded:s=!1,children:l,fadeInDuration:u=400,motion:c=!1,style:d,...f},p)=>{let{onDrag:g,onDragEnd:m,onDragStart:x,onAnimationStart:h,onAnimationEnd:v,onAnimationIteration:y,...w}=f;if(s&&l)return c?(0,Zt.jsx)(Be.div,{ref:p,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:P("moonui-theme",e),style:{height:a,width:i,...d},...w,children:l}):(0,Zt.jsx)("div",{ref:p,className:P("moonui-theme","animate-fade-in",e),style:{animationDuration:`${u}ms`,height:a,width:i,...d},...f,children:l});let C=c?Be.div:"div";return(0,Zt.jsx)(C,{ref:p,className:P("moonui-theme",HU({variant:t,size:o,shape:r,animation:n}),"relative isolate",e),style:{height:a,width:i,...d},...c?kD:{},...w})});As.displayName="Skeleton";var wI=Dm.forwardRef(({className:e,lines:t=3,lineHeight:o="0.85rem",spacing:r="0.5rem",lastLineWidth:n=80,randomWidths:a=!1,variant:i="default",animation:s="pulse",...l},u)=>(0,Zt.jsx)("div",{ref:u,className:P("moonui-theme","flex flex-col",e),style:{gap:r},...l,children:Array.from({length:t}).map((c,d)=>{let p=d===t-1?n:a?85+d%3*5:100;return(0,Zt.jsx)(As,{variant:i,animation:s,className:"w-full",style:{height:o,width:`${p}%`}},d)})}));wI.displayName="SkeletonText";var CI=Dm.forwardRef(({className:e,size:t="2.5rem",variant:o="default",animation:r="pulse",...n},a)=>(0,Zt.jsx)(As,{ref:a,variant:o,animation:r,shape:"circle",className:P("moonui-theme","shrink-0",e),style:{height:t,width:t},...n}));CI.displayName="SkeletonAvatar";var UU=Dm.forwardRef(({className:e,showHeader:t=!0,contentLines:o=3,showFooter:r=!0,variant:n="default",animation:a="pulse",...i},s)=>(0,Zt.jsxs)("div",{ref:s,className:P("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,Zt.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,Zt.jsx)(CI,{size:"2.5rem",variant:n,animation:a}),(0,Zt.jsxs)("div",{className:"flex-1",children:[(0,Zt.jsx)(As,{variant:n,animation:a,className:"mb-2 h-4 w-1/3"}),(0,Zt.jsx)(As,{variant:n,animation:a,className:"h-3 w-1/4"})]})]}),(0,Zt.jsx)(wI,{lines:o,variant:n,animation:a,className:"mb-4"}),r&&(0,Zt.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,Zt.jsx)(As,{variant:n,animation:a,className:"h-4 w-1/4"}),(0,Zt.jsx)(As,{variant:n,animation:a,className:"h-4 w-1/5"})]})]}));UU.displayName="SkeletonCard";var ld=R(M());var GU=R(N()),zU=ld.forwardRef(({className:e,children:t,onSwipeLeft:o,onSwipeRight:r,threshold:n=100,disabled:a=!1,...i},s)=>{let[l,u]=ld.useState(0),[c,d]=ld.useState(0),[f,p]=ld.useState(!1),g=h=>{a||(u(h.touches[0].clientX),p(!0))},m=h=>{a||!f||d(h.touches[0].clientX)},x=()=>{if(a||!f)return;let h=c-l;Math.abs(h)>n&&(h>0&&r?r():h<0&&o&&o()),p(!1),d(0),u(0)};return(0,GU.jsx)("div",{ref:s,className:P("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:g,onTouchMove:m,onTouchEnd:x,...i,children:t})});zU.displayName="SwipeableCard";var vy=R(M());var zn=R(M(),1);var Ql=R(N(),1),hy="Switch",[NZ,CEe]=Oe(hy),[OZ,FZ]=NZ(hy),WU=zn.forwardRef((e,t)=>{let{__scopeSwitch:o,name:r,checked:n,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,p]=zn.useState(null),g=de(t,y=>p(y)),m=zn.useRef(!1),x=f?c||!!f.closest("form"):!0,[h,v]=qe({prop:n,defaultProp:a??!1,onChange:u,caller:hy});return(0,Ql.jsxs)(OZ,{scope:o,checked:h,disabled:s,children:[(0,Ql.jsx)($.button,{type:"button",role:"switch","aria-checked":h,"aria-required":i,"data-state":KU(h),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:g,onClick:W(e.onClick,y=>{v(w=>!w),x&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})}),x&&(0,Ql.jsx)($U,{control:f,bubbles:!m.current,name:r,value:l,checked:h,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});WU.displayName=hy;var jU="SwitchThumb",qU=zn.forwardRef((e,t)=>{let{__scopeSwitch:o,...r}=e,n=FZ(jU,o);return(0,Ql.jsx)($.span,{"data-state":KU(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t})});qU.displayName=jU;var _Z="SwitchBubbleInput",$U=zn.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...n},a)=>{let i=zn.useRef(null),s=de(i,a),l=Ac(o),u=Dc(t);return zn.useEffect(()=>{let c=i.current;if(!c)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==o&&p){let g=new Event("click",{bubbles:r});p.call(c,o),c.dispatchEvent(g)}},[l,o,r]),(0,Ql.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...n,tabIndex:-1,ref:s,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});$U.displayName=_Z;function KU(e){return e?"checked":"unchecked"}var SI=WU,XU=qU;var ya=R(N()),BZ=K(["peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full","border-2 border-transparent transition-colors","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","data-[state=unchecked]:bg-input","dark:focus-visible:ring-primary/40"],{variants:{size:{sm:"h-4 w-8",md:"h-6 w-11",lg:"h-7 w-14"},variant:{primary:"data-[state=checked]:bg-primary",success:"data-[state=checked]:bg-success",warning:"data-[state=checked]:bg-warning",destructive:"data-[state=checked]:bg-error",secondary:"data-[state=checked]:bg-accent"}},defaultVariants:{size:"md",variant:"primary"}}),HZ=K("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",{variants:{size:{sm:"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",md:"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",lg:"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0"}},defaultVariants:{size:"md"}}),YU=vy.forwardRef(({className:e,size:t,variant:o,loading:r,leftIcon:n,rightIcon:a,description:i,"aria-describedby":s,...l},u)=>{let c=vy.useId(),d=i?`${c}-description`:void 0,f=[s,d].filter(Boolean).join(" ")||void 0;return(0,ya.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[n&&(0,ya.jsx)("span",{className:"text-muted-foreground",children:n}),(0,ya.jsxs)(SI,{className:P(BZ({size:t,variant:o}),r&&"opacity-80 cursor-wait",e),disabled:r||l.disabled,"aria-describedby":f,...l,ref:u,children:[r?(0,ya.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,ya.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-muted border-t-primary"})}):null,(0,ya.jsx)(XU,{className:P(HZ({size:t}))})]}),a&&(0,ya.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,ya.jsx)("span",{id:d,className:"text-sm text-muted-foreground",children:i})]})});YU.displayName=SI.displayName;var en=R(M());var wa=R(N()),QU=en.forwardRef(({value:e=[],onChange:t,maxTags:o,variant:r="primary",allowDuplicates:n=!1,delimiter:a=",",placeholder:i="Add tag and press Enter",className:s,disabled:l,...u},c)=>{let[d,f]=en.useState(""),[p,g]=en.useState(""),m=en.useRef(null);en.useImperativeHandle(c,()=>m.current);let x=en.useRef([]),h=en.useId(),v=S=>{if(e.length===0)return;let I=Math.max(0,Math.min(e.length-1,S));x.current[I]?.focus()},y=S=>{S.key==="Enter"||S.key===a?(S.preventDefault(),C()):S.key==="Backspace"&&d===""&&e.length>0?b(e.length-1):S.key==="ArrowLeft"&&d===""&&e.length>0&&(S.preventDefault(),v(e.length-1))},w=S=>I=>{switch(I.key){case"ArrowLeft":I.preventDefault(),v(S-1);break;case"ArrowRight":I.preventDefault(),S>=e.length-1?m.current?.focus():v(S+1);break;case"Home":I.preventDefault(),v(0);break;case"End":I.preventDefault(),v(e.length-1);break;case"Delete":case"Backspace":{I.preventDefault();let L=e.length-1;b(S),requestAnimationFrame(()=>{L>0?v(Math.min(S,L-1)):m.current?.focus()});break}default:break}},C=()=>{let S=d.trim();if(S){if(!n&&e.includes(S)){g("This tag already exists"),setTimeout(()=>g(""),2e3);return}if(o&&e.length>=o){g(`Maximum ${o} tags allowed`),setTimeout(()=>g(""),2e3);return}t([...e,S]),f(""),g("")}},b=S=>{l||t(e.filter((I,L)=>L!==S))};return(0,wa.jsxs)("div",{className:"relative",children:[(0,wa.jsxs)("div",{className:P("flex items-center min-h-[2.5rem] w-full flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",l&&"cursor-not-allowed opacity-50",s),children:[e.map((S,I)=>(0,wa.jsxs)(Zo,{variant:r,className:"gap-1 pr-1.5",children:[(0,wa.jsx)("span",{className:"text-xs",children:S}),!l&&(0,wa.jsx)("button",{ref:L=>{x.current[I]=L},type:"button","aria-label":`Remove ${S}`,onClick:()=>b(I),onKeyDown:w(I),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,wa.jsx)(hr,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},I)),(0,wa.jsx)("input",{ref:m,type:"text",value:d,onChange:S=>f(S.target.value),onKeyDown:y,onBlur:C,disabled:l,placeholder:e.length===0?i:"","aria-label":"Add tag","aria-describedby":p?h:void 0,"aria-invalid":p?!0:void 0,className:P("flex-1 bg-transparent outline-none placeholder:text-muted-foreground","min-w-[120px]",l&&"cursor-not-allowed"),...u})]}),p&&(0,wa.jsx)("p",{id:h,role:"status",className:"mt-1 text-xs text-destructive",children:p})]})});QU.displayName="TagsInput";var Uo=R(M());var Ca=R(N()),UZ=K(["flex w-full rounded-md px-3 py-2 text-sm transition-all duration-200","text-foreground placeholder:text-muted-foreground","disabled:cursor-not-allowed disabled:opacity-50","focus-visible:outline-none dark:text-gray-200","resize-none"],{variants:{variant:{default:"border border-input bg-background dark:bg-gray-800/80 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:shadow-inner dark:shadow-gray-950/10",outline:"border-2 border-input bg-transparent focus-visible:border-primary dark:focus-visible:border-primary/80",ghost:"border-none bg-transparent hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b-2 border-input rounded-none px-0 focus-visible:ring-0 focus-visible:border-primary dark:focus-visible:border-primary/80 bg-transparent dark:bg-transparent"},size:{sm:"min-h-[60px] text-xs",md:"min-h-[80px] text-sm",lg:"min-h-[120px] text-base"},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""}},defaultVariants:{variant:"default",size:"md",isError:!1,isSuccess:!1}}),ZU=Uo.forwardRef(({className:e,wrapperClassName:t,messageClassName:o,variant:r,size:n,error:a,success:i,loading:s,autoResize:l=!1,maxHeight:u,characterCount:c=!1,disabled:d,maxLength:f,value:p,defaultValue:g,onChange:m,...x},h)=>{let v=Uo.useId(),y=x.id||v,w=Uo.useRef(null),[C,b]=Uo.useState(p||g||"");Uo.useImperativeHandle(h,()=>w.current);let S=Uo.useCallback(()=>{let D=w.current;if(!D||!l)return;D.style.height="auto";let z=D.scrollHeight;u&&z>u?(D.style.height=`${u}px`,D.style.overflowY="auto"):(D.style.height=`${z}px`,D.style.overflowY="hidden")},[l,u]);Uo.useEffect(()=>{S()},[C,S]),Uo.useEffect(()=>{p!==void 0&&b(p)},[p]);let I=D=>{b(D.target.value),m?.(D)},L=String(C).length,T=c&&(f!==void 0||L>0),k=typeof a=="string"?a:void 0,E=typeof i=="string"?i:void 0,_=k||E;return(0,Ca.jsxs)("div",{className:P("moonui-theme","space-y-1.5 w-full",t),children:[(0,Ca.jsxs)("div",{className:"relative",children:[(0,Ca.jsx)("textarea",{ref:w,className:P(UZ({variant:r,size:n,isError:!!a,isSuccess:!!i}),s&&"pr-10",e),disabled:d||s,value:p,defaultValue:g,onChange:I,maxLength:f,"aria-invalid":!!a||void 0,"aria-describedby":k?`${y}-error`:E?`${y}-success`:void 0,...x}),s&&(0,Ca.jsx)("div",{className:"absolute top-3 right-3 text-gray-500",children:(0,Ca.jsx)(Vt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[_&&(0,Ca.jsx)("p",{className:P("text-xs transition-all",k&&"text-error",E&&"text-success",o),id:k?`${y}-error`:E?`${y}-success`:void 0,children:k||E}),T&&(0,Ca.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[L,f!==void 0&&` / ${f}`]})]})]})});ZU.displayName="Textarea";var Gn=R(M());var be=R(M(),1),e3=R(Aa(),1);var Ue=R(N(),1),LI="ToastProvider",[TI,zZ,GZ]=Xn("Toast"),[t3,WEe]=Oe("Toast",[GZ]),[WZ,yy]=t3(LI),o3=e=>{let{__scopeToast:t,label:o="Notification",duration:r=5e3,swipeDirection:n="right",swipeThreshold:a=50,children:i}=e,[s,l]=be.useState(null),[u,c]=be.useState(0),d=be.useRef(!1),f=be.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${LI}\`. Expected non-empty \`string\`.`),(0,Ue.jsx)(TI.Provider,{scope:t,children:(0,Ue.jsx)(WZ,{scope:t,label:o,duration:r,swipeDirection:n,swipeThreshold:a,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:be.useCallback(()=>c(p=>p+1),[]),onToastRemove:be.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};o3.displayName=LI;var r3="ToastViewport",jZ=["F8"],RI="toast.viewportPause",II="toast.viewportResume",n3=be.forwardRef((e,t)=>{let{__scopeToast:o,hotkey:r=jZ,label:n="Notifications ({hotkey})",...a}=e,i=yy(r3,o),s=zZ(o),l=be.useRef(null),u=be.useRef(null),c=be.useRef(null),d=be.useRef(null),f=de(t,d,i.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=i.toastCount>0;be.useEffect(()=>{let x=h=>{r.length!==0&&r.every(y=>h[y]||h.code===y)&&d.current?.focus()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),be.useEffect(()=>{let x=l.current,h=d.current;if(g&&x&&h){let v=()=>{if(!i.isClosePausedRef.current){let b=new CustomEvent(RI);h.dispatchEvent(b),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){let b=new CustomEvent(II);h.dispatchEvent(b),i.isClosePausedRef.current=!1}},w=b=>{!x.contains(b.relatedTarget)&&y()},C=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",v),x.addEventListener("focusout",w),x.addEventListener("pointermove",v),x.addEventListener("pointerleave",C),window.addEventListener("blur",v),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",v),x.removeEventListener("focusout",w),x.removeEventListener("pointermove",v),x.removeEventListener("pointerleave",C),window.removeEventListener("blur",v),window.removeEventListener("focus",y)}}},[g,i.isClosePausedRef]);let m=be.useCallback(({tabbingDirection:x})=>{let v=s().map(y=>{let w=y.ref.current,C=[w,...nJ(w)];return x==="forwards"?C:C.reverse()});return(x==="forwards"?v.reverse():v).flat()},[s]);return be.useEffect(()=>{let x=d.current;if(x){let h=v=>{let y=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!y){let C=document.activeElement,b=v.shiftKey;if(v.target===x&&b){u.current?.focus();return}let L=m({tabbingDirection:b?"backwards":"forwards"}),T=L.findIndex(k=>k===C);bI(L.slice(T+1))?v.preventDefault():b?u.current?.focus():c.current?.focus()}};return x.addEventListener("keydown",h),()=>x.removeEventListener("keydown",h)}},[s,m]),(0,Ue.jsxs)(l2,{ref:l,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&(0,Ue.jsx)(PI,{ref:u,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"forwards"});bI(x)}}),(0,Ue.jsx)(TI.Slot,{scope:o,children:(0,Ue.jsx)($.ol,{tabIndex:-1,...a,ref:f})}),g&&(0,Ue.jsx)(PI,{ref:c,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"backwards"});bI(x)}})]})});n3.displayName=r3;var a3="ToastFocusProxy",PI=be.forwardRef((e,t)=>{let{__scopeToast:o,onFocusFromOutsideViewport:r,...n}=e,a=yy(a3,o);return(0,Ue.jsx)(Cm,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&r()}})});PI.displayName=a3;var Nm="Toast",qZ="toast.swipeStart",$Z="toast.swipeMove",KZ="toast.swipeCancel",XZ="toast.swipeEnd",i3=be.forwardRef((e,t)=>{let{forceMount:o,open:r,defaultOpen:n,onOpenChange:a,...i}=e,[s,l]=qe({prop:r,defaultProp:n??!0,onChange:a,caller:Nm});return(0,Ue.jsx)(st,{present:o||s,children:(0,Ue.jsx)(ZZ,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:rt(e.onPause),onResume:rt(e.onResume),onSwipeStart:W(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:W(e.onSwipeMove,u=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}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=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});i3.displayName=Nm;var[YZ,QZ]=t3(Nm,{onClose(){}}),ZZ=be.forwardRef((e,t)=>{let{__scopeToast:o,type:r="foreground",duration:n,open:a,onClose:i,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...g}=e,m=yy(Nm,o),[x,h]=be.useState(null),v=de(t,D=>h(D)),y=be.useRef(null),w=be.useRef(null),C=n||m.duration,b=be.useRef(0),S=be.useRef(C),I=be.useRef(0),{onToastAdd:L,onToastRemove:T}=m,k=rt(()=>{x?.contains(document.activeElement)&&m.viewport?.focus(),i()}),E=be.useCallback(D=>{!D||D===1/0||(window.clearTimeout(I.current),b.current=new Date().getTime(),I.current=window.setTimeout(k,D))},[k]);be.useEffect(()=>{let D=m.viewport;if(D){let z=()=>{E(S.current),u?.()},F=()=>{let O=new Date().getTime()-b.current;S.current=S.current-O,window.clearTimeout(I.current),l?.()};return D.addEventListener(RI,F),D.addEventListener(II,z),()=>{D.removeEventListener(RI,F),D.removeEventListener(II,z)}}},[m.viewport,C,l,u,E]),be.useEffect(()=>{a&&!m.isClosePausedRef.current&&E(C)},[a,C,m.isClosePausedRef,E]),be.useEffect(()=>(L(),()=>T()),[L,T]);let _=be.useMemo(()=>x?p3(x):null,[x]);return m.viewport?(0,Ue.jsxs)(Ue.Fragment,{children:[_&&(0,Ue.jsx)(JZ,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:_}),(0,Ue.jsx)(YZ,{scope:o,onClose:k,children:e3.createPortal((0,Ue.jsx)(TI.ItemSlot,{scope:o,children:(0,Ue.jsx)(s2,{asChild:!0,onEscapeKeyDown:W(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||k(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Ue.jsx)($.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:W(e.onKeyDown,D=>{D.key==="Escape"&&(s?.(D.nativeEvent),D.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:W(e.onPointerDown,D=>{D.button===0&&(y.current={x:D.clientX,y:D.clientY})}),onPointerMove:W(e.onPointerMove,D=>{if(!y.current)return;let z=D.clientX-y.current.x,F=D.clientY-y.current.y,O=!!w.current,B=["left","right"].includes(m.swipeDirection),A=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,te=B?A(0,z):0,ae=B?0:A(0,F),V=D.pointerType==="touch"?10:2,Q={x:te,y:ae},oe={originalEvent:D,delta:Q};O?(w.current=Q,xy($Z,d,oe,{discrete:!1})):JU(Q,m.swipeDirection,V)?(w.current=Q,xy(qZ,c,oe,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(z)>V||Math.abs(F)>V)&&(y.current=null)}),onPointerUp:W(e.onPointerUp,D=>{let z=w.current,F=D.target;if(F.hasPointerCapture(D.pointerId)&&F.releasePointerCapture(D.pointerId),w.current=null,y.current=null,z){let O=D.currentTarget,B={originalEvent:D,delta:z};JU(z,m.swipeDirection,m.swipeThreshold)?xy(XZ,p,B,{discrete:!0}):xy(KZ,f,B,{discrete:!0}),O.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),JZ=e=>{let{__scopeToast:t,children:o,...r}=e,n=yy(Nm,t),[a,i]=be.useState(!1),[s,l]=be.useState(!1);return oJ(()=>i(!0)),be.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:(0,Ue.jsx)(Sr,{asChild:!0,children:(0,Ue.jsx)(Cm,{...r,children:a&&(0,Ue.jsxs)(Ue.Fragment,{children:[n.label," ",o]})})})},eJ="ToastTitle",s3=be.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ue.jsx)($.div,{...r,ref:t})});s3.displayName=eJ;var tJ="ToastDescription",l3=be.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ue.jsx)($.div,{...r,ref:t})});l3.displayName=tJ;var u3="ToastAction",c3=be.forwardRef((e,t)=>{let{altText:o,...r}=e;return o.trim()?(0,Ue.jsx)(f3,{altText:o,asChild:!0,children:(0,Ue.jsx)(kI,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${u3}\`. Expected non-empty \`string\`.`),null)});c3.displayName=u3;var d3="ToastClose",kI=be.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e,n=QZ(d3,o);return(0,Ue.jsx)(f3,{asChild:!0,children:(0,Ue.jsx)($.button,{type:"button",...r,ref:t,onClick:W(e.onClick,n.onClose)})})});kI.displayName=d3;var f3=be.forwardRef((e,t)=>{let{__scopeToast:o,altText:r,...n}=e;return(0,Ue.jsx)($.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...n,ref:t})});function p3(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),rJ(r)){let n=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!n)if(a){let i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...p3(r))}}),t}function xy(e,t,o,{discrete:r}){let n=o.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?Nu(n,a):n.dispatchEvent(a)}var JU=(e,t,o=0)=>{let r=Math.abs(e.x),n=Math.abs(e.y),a=r>n;return t==="left"||t==="right"?a&&r>o:!a&&n>o};function oJ(e=()=>{}){let t=rt(e);_e(()=>{let o=0,r=0;return o=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(r)}},[t])}function rJ(e){return e.nodeType===e.ELEMENT_NODE}function nJ(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function bI(e){let t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var m3=o3,MI=n3,EI=i3,AI=s3,DI=l3,NI=c3,OI=kI;var co=R(N()),h3=m3,_I=Gn.forwardRef(({className:e,...t},o)=>(0,co.jsx)(MI,{ref:o,className:P("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}));_I.displayName=MI.displayName;var iJ=K("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm 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",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-900/20 dark:text-green-100",warning:"border-orange-200 bg-orange-50 text-orange-900 dark:border-orange-800 dark:bg-orange-900/20 dark:text-orange-100",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-900/20 dark:text-blue-100"}},defaultVariants:{variant:"default"}}),VI=Gn.forwardRef(({className:e,variant:t,...o},r)=>(0,co.jsx)(EI,{ref:r,className:P("moonui-theme",iJ({variant:t}),e),...o}));VI.displayName=EI.displayName;var v3=Gn.forwardRef(({className:e,...t},o)=>(0,co.jsx)(NI,{ref:o,className:P("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));v3.displayName=NI.displayName;var BI=Gn.forwardRef(({className:e,...t},o)=>(0,co.jsxs)(OI,{ref:o,className:P("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:[(0,co.jsx)(hr,{className:"h-4 w-4"}),(0,co.jsx)("span",{className:"sr-only",children:"Close"})]}));BI.displayName=OI.displayName;var HI=Gn.forwardRef(({className:e,...t},o)=>(0,co.jsx)(AI,{ref:o,className:P("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));HI.displayName=AI.displayName;var UI=Gn.forwardRef(({className:e,...t},o)=>(0,co.jsx)(DI,{ref:o,className:P("moonui-theme","text-sm opacity-90",e),...t}));UI.displayName=DI.displayName;var sJ=5,lJ=1e6,FI=new Map,g3=e=>{if(FI.has(e))return;let t=setTimeout(()=>{FI.delete(e),Om({type:"REMOVE_TOAST",toastId:e})},lJ);FI.set(e,t)},uJ=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,sJ)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{let{toastId:o}=t;return o?g3(o):e.toasts.forEach(r=>{g3(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===o||o===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};default:return e}},wy=[],Cy={toasts:[]},cJ=0;function Om(e){Cy=uJ(Cy,e),wy.forEach(t=>{t(Cy)})}function x3({...e}){let t=`toast-${Date.now()}-${++cJ}`,o=n=>Om({type:"UPDATE_TOAST",toast:{...n,id:t}}),r=()=>Om({type:"DISMISS_TOAST",toastId:t});return Om({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||r()}}}),{id:t,dismiss:r,update:o}}function y3(){let[e,t]=Gn.useState(Cy);return Gn.useEffect(()=>(wy.push(t),()=>{let o=wy.indexOf(t);o>-1&&wy.splice(o,1)}),[e]),{...e,toast:x3,dismiss:o=>Om({type:"DISMISS_TOAST",toastId:o})}}function dJ(){let{toasts:e}=y3();return(0,co.jsxs)(h3,{children:[e.map(function({id:t,title:o,description:r,action:n,variant:a,open:i,onOpenChange:s,...l}){return(0,co.jsxs)(VI,{variant:a,open:i,onOpenChange:s,...l,children:[(0,co.jsxs)("div",{className:"grid gap-1",children:[o&&(0,co.jsx)(HI,{children:o}),r&&(0,co.jsx)(UI,{children:r})]}),n,(0,co.jsx)(BI,{})]},t)}),(0,co.jsx)(_I,{})]})}var w3=R(M());var b3=R(N()),C3=K(["inline-flex items-center justify-center rounded","border border-border bg-muted","px-1.5 font-mono font-medium text-muted-foreground","shadow-[0_1px_0_1px_hsl(var(--border))]","select-none whitespace-nowrap"],{variants:{size:{sm:"h-5 min-w-5 text-[10px]",md:"h-6 min-w-6 text-xs"}},defaultVariants:{size:"md"}}),S3=w3.forwardRef(({className:e,size:t,children:o,...r},n)=>(0,b3.jsx)("kbd",{ref:n,className:P("moonui-theme",C3({size:t}),e),...r,children:o}));S3.displayName="Kbd";var tn=R(M());var Pr=R(N()),R3=K(["moonui-theme inline-flex items-center rounded-md outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"],{variants:{size:{sm:"gap-0.5",md:"gap-1",lg:"gap-1.5"}},defaultVariants:{size:"md"}}),fJ={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},I3=tn.forwardRef(({className:e,value:t,defaultValue:o,onValueChange:r,max:n=5,readOnly:a=!1,precision:i="full",icon:s,size:l,"aria-label":u="Rating",...c},d)=>{let p=fJ[l??"md"],g=i==="half"?.5:1,m=t!==void 0,[x,h]=tn.useState(o??0),v=m?t??0:x,[y,w]=tn.useState(null),C=y!==null?y:v,b=tn.useCallback(T=>{a||(m||h(T),r?.(T))},[a,m,r]),S=tn.useCallback(T=>{if(a)return;let k=null;switch(T.key){case"ArrowRight":case"ArrowUp":k=Math.min(n,v+g);break;case"ArrowLeft":case"ArrowDown":k=Math.max(g,v-g);break;case"Home":k=g;break;case"End":k=n;break;default:return}T.preventDefault(),b(k)},[a,n,v,g,b]),I=T=>{if(tn.isValidElement(s)){let k=s;return tn.cloneElement(k,{className:P(p,"shrink-0",T&&"fill-current",k.props?.className)})}return(0,Pr.jsx)(Ui,{className:P(p,"shrink-0",T&&"fill-current"),"aria-hidden":"true"})},L=Array.from({length:n},(T,k)=>k+1);return(0,Pr.jsx)("div",{ref:d,role:"radiogroup","aria-label":u,"aria-orientation":"horizontal","aria-readonly":a||void 0,tabIndex:a?void 0:0,onKeyDown:S,onMouseLeave:()=>w(null),className:P(R3({size:l}),e),...c,children:L.map(T=>{let k=Math.max(0,Math.min(1,C-(T-1))),E=T-.5;return(0,Pr.jsxs)("span",{"data-slot":"rating-star",className:P("relative inline-flex shrink-0",!a&&"cursor-pointer"),children:[(0,Pr.jsx)("span",{"aria-hidden":"true",className:"inline-flex text-muted-foreground/30",children:I(!1)}),(0,Pr.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-0 top-0 h-full overflow-hidden text-amber-400",style:{width:`${k*100}%`},children:I(!0)}),!a&&i==="half"&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("button",{type:"button",role:"radio","aria-checked":v===E,"aria-label":`${E} stars`,tabIndex:-1,onClick:()=>b(E),onMouseEnter:()=>w(E),className:"absolute inset-y-0 left-0 z-10 w-1/2 cursor-pointer bg-transparent"}),(0,Pr.jsx)("button",{type:"button",role:"radio","aria-checked":v===T,"aria-label":`${T} stars`,tabIndex:-1,onClick:()=>b(T),onMouseEnter:()=>w(T),className:"absolute inset-y-0 right-0 z-10 w-1/2 cursor-pointer bg-transparent"})]}),!a&&i==="full"&&(0,Pr.jsx)("button",{type:"button",role:"radio","aria-checked":v===T,"aria-label":`${T} ${T===1?"star":"stars"}`,tabIndex:-1,onClick:()=>b(T),onMouseEnter:()=>w(T),className:"absolute inset-0 z-10 cursor-pointer bg-transparent"})]},T)})})});I3.displayName="Rating";var P3=R(M());var Zl=R(N()),L3=K(["inline-block shrink-0 rounded-full","border-current border-t-transparent","animate-spin motion-reduce:animate-none"],{variants:{size:{sm:"h-4 w-4 border-2",md:"h-6 w-6 border-2",lg:"h-8 w-8 border-[3px]",xl:"h-10 w-10 border-4"}},defaultVariants:{size:"md"}}),pJ={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},T3=P3.forwardRef(({className:e,size:t,variant:o="default",label:r="Loading",...n},a)=>(0,Zl.jsxs)("div",{ref:a,role:"status","aria-live":"polite",className:P("moonui-theme inline-flex items-center justify-center",e),...n,children:[o==="dots"?(0,Zl.jsx)("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(i=>(0,Zl.jsx)("span",{className:P("inline-block rounded-full bg-current","animate-bounce motion-reduce:animate-none",pJ[t??"md"]),style:{animationDelay:`${i*.15}s`}},i))}):(0,Zl.jsx)("span",{className:P(L3({size:t})),"aria-hidden":"true"}),(0,Zl.jsx)("span",{className:"sr-only",children:r})]}));T3.displayName="Spinner";var Ds=R(M());var E3=R(N()),k3=K("moonui-theme inline-flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col items-stretch"},attached:{true:"",false:"gap-2"}},compoundVariants:[{orientation:"horizontal",attached:!0,class:["[&>*:not(:first-child)]:rounded-l-none","[&>*:not(:last-child)]:rounded-r-none","[&>*:not(:first-child)]:-ml-px"]},{orientation:"vertical",attached:!0,class:["[&>*:not(:first-child)]:rounded-t-none","[&>*:not(:last-child)]:rounded-b-none","[&>*:not(:first-child)]:-mt-px"]}],defaultVariants:{orientation:"horizontal",attached:!0}}),M3=Ds.forwardRef(({className:e,orientation:t,attached:o,size:r,variant:n,children:a,...i},s)=>{let u=r!==void 0||n!==void 0?Ds.Children.map(a,c=>{if(!Ds.isValidElement(c)||c.type!==De)return c;let d=c.props;return Ds.cloneElement(c,{size:d.size??r,variant:d.variant??n})}):a;return(0,E3.jsx)("div",{ref:s,role:"group",className:P(k3({orientation:t,attached:o}),e),...i,children:u})});M3.displayName="ButtonGroup";var tu=R(M());var Go=R(M(),1);var rn=R(M(),1),zI=R(N(),1),mJ=Object.defineProperty,on=(e,t)=>mJ(e,"name",{value:t,configurable:!0});function gJ(e,t){let o=rn.createContext(t);o.displayName=e+"Context";let r=on(a=>{let{children:i,...s}=a,l=rn.useMemo(()=>s,Object.values(s));return(0,zI.jsx)(o.Provider,{value:l,children:i})},"Provider");r.displayName=e+"Provider";function n(a,i={}){let{optional:s=!1}=i,l=rn.useContext(o);if(l)return l;if(t!==void 0)return t;if(!s)throw new Error(`\`${a}\` must be used within \`${e}\``)}return on(n,"useContext"),[r,n]}on(gJ,"createContext");function gi(e,t=[]){let o=[];function r(a,i){let s=rn.createContext(i);s.displayName=a+"Context";let l=o.length;o=[...o,i];let u=on(d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=rn.useMemo(()=>g,Object.values(g));return(0,zI.jsx)(m.Provider,{value:x,children:p})},"Provider");u.displayName=a+"Provider";function c(d,f,p={}){let{optional:g=!1}=p,m=f?.[e]?.[l]||s,x=rn.useContext(m);if(x)return x;if(i!==void 0)return i;if(!g)throw new Error(`\`${d}\` must be used within \`${a}\``)}return on(c,"useContext"),[u,c]}on(r,"createContext");let n=on(()=>{let a=o.map(i=>rn.createContext(i));return on(function(s){let l=s?.[e]||a;return rn.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])},"useScope")},"createScope");return n.scopeName=e,[r,A3(n,...t)]}on(gi,"createContextScope");function A3(...e){let t=e[0];if(e.length===1)return t;let o=on(()=>{let r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return on(function(a){let i=r.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return rn.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return o.scopeName=t.scopeName,o}on(A3,"composeContextScopes");var U3=R(M(),1),z3=R(Aa(),1);var Pt=R(M(),1);var D3=R(M(),1),hJ=Object.defineProperty,WI=(e,t)=>hJ(e,"name",{value:t,configurable:!0});function GI(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}WI(GI,"setRef");function N3(...e){return t=>{let o=!1,r=e.map(n=>{let a=GI(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():GI(e[n],null)}}}}WI(N3,"composeRefs");function nn(...e){return D3.useCallback(N3(...e),e)}WI(nn,"useComposedRefs");var ud=!1;var yJ=R(N(),1),vJ=Object.defineProperty,an=(e,t)=>vJ(e,"name",{value:t,configurable:!0}),xJ=an((e,t)=>{let o={...t};for(let r in t){let n=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(n&&a){let s=typeof n=="function",l=typeof a=="function";ud&&(!s||!l)&&console.warn(`Slot: Expected a function for ${r}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),o[r]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(o[r]=n);else r==="style"?o[r]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:r==="className"?o[r]=[n,a].filter(Boolean).join(" "):r==="aria-describedby"&&(o[r]=O3(a,n))}return{...e,...o}},"mergeProps");function O3(...e){let t=new Set;for(let o of e)if(typeof o=="string")for(let r of String(o).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}an(O3,"concatAriaDescribedby");var F3=Pt.createContext(xJ);F3.displayName="SlotContext";function hi(e){let t=Pt.forwardRef((o,r)=>{let n=Pt.useContext(F3),{children:a,mergeProps:i=n,...s}=o,l=null,u=!1,c=[];jI(a)&&typeof Sy=="function"&&(a=Sy(a._payload)),Pt.Children.forEach(a,g=>{if(B3(g)){u=!0;let m=g,x="child"in m.props?m.props.child:m.props.children;jI(x)&&typeof Sy=="function"&&(x=Sy(x._payload)),l=CJ(m,x),c.push(l?.props?.children)}else c.push(g)}),l?l=Pt.cloneElement(l,void 0,c):!u&&Pt.Children.count(a)===1&&Pt.isValidElement(a)&&(l=a);let d=l?V3(l):void 0,f=nn(r,d);if(!l){if(a||a===0)throw new Error(u?RJ(e):bJ(e));return a}let p=i(s,l.props??{});return l.type!==Pt.Fragment&&(p.ref=r?f:d),Pt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}an(hi,"createSlot");var _3=Symbol.for("radix.slottable");function wJ(e){let t=an(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=_3,t}an(wJ,"createSlottable");var CJ=an((e,t)=>{if("child"in e.props){let o=e.props.child;return Pt.isValidElement(o)?Pt.cloneElement(o,void 0,e.props.children(o.props.children)):null}return Pt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function V3(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}an(V3,"getElementRef");function B3(e){return Pt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_3}an(B3,"isSlottable");var SJ=Symbol.for("react.lazy");function jI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===SJ&&"_payload"in e&&H3(e._payload)}an(jI,"isLazyComponent");function H3(e){return typeof e=="object"&&e!==null&&"then"in e}an(H3,"isPromiseLike");var bJ=an(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),RJ=an(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Sy=Pt[" use ".trim().toString()];var G3=R(N(),1),IJ=Object.defineProperty,PJ=(e,t)=>IJ(e,"name",{value:t,configurable:!0}),LJ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cd=LJ.reduce((e,t)=>{let o=hi(`Primitive.${t}`),r=U3.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,G3.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function TJ(e,t){e&&z3.flushSync(()=>e.dispatchEvent(t))}PJ(TJ,"dispatchDiscreteCustomEvent");var eo=R(M(),1);var kJ=Object.defineProperty,dd=(e,t)=>kJ(e,"name",{value:t,configurable:!0}),W3=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ns(e,t,{checkForDefaultPrevented:o=!0}={}){return dd(function(n){if(e?.(n),o===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}dd(Ns,"composeEventHandlers");function MJ(e){if(!W3)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}dd(MJ,"getOwnerWindow");function qI(e){if(!W3)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}dd(qI,"getOwnerDocument");function j3(e,t=!1){let{activeElement:o}=qI(e);if(!o?.nodeName)return null;if(q3(o)&&o.contentDocument)return j3(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let n=qI(o).getElementById(r);if(n)return n}}return o}dd(j3,"getActiveElement");function q3(e){return e.tagName==="IFRAME"}dd(q3,"isFrame");var Wn=R(M(),1);var by=R(N(),1),sr=R(M(),1);var Jl=R(N(),1);var EJ=Object.defineProperty,Jt=(e,t)=>EJ(e,"name",{value:t,configurable:!0});function XI(e){let t=e+"CollectionProvider",[o,r]=gi(t),[n,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),i=Jt(m=>{let{scope:x,children:h}=m,v=Wn.useRef(null),y=Wn.useRef(new Map).current;return(0,by.jsx)(n,{scope:x,itemMap:y,collectionRef:v,children:h})},"CollectionProvider");i.displayName=t;let s=e+"CollectionSlot",l=hi(s),u=Wn.forwardRef((m,x)=>{let{scope:h,children:v}=m,y=a(s,h),w=nn(x,y.collectionRef);return(0,by.jsx)(l,{ref:w,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=hi(c),p=Wn.forwardRef((m,x)=>{let{scope:h,children:v,...y}=m,w=Wn.useRef(null),C=nn(x,w),b=a(c,h);return Wn.useEffect(()=>(b.itemMap.set(w,{ref:w,...y}),()=>void b.itemMap.delete(w))),(0,by.jsx)(f,{[d]:"",ref:C,children:v})});p.displayName=c;function g(m){let x=a(e+"CollectionConsumer",m);return Wn.useCallback(()=>{let v=x.collectionRef.current;if(!v)return[];let y=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((b,S)=>y.indexOf(b.ref.current)-y.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return Jt(g,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},g,r]}Jt(XI,"createCollection");var $3=new WeakMap,Dt,sn,$I=(sn=class extends Map{constructor(o){super(o);My(this,Dt,void 0);Bm(this,Dt,[...super.keys()]),$3.set(this,!0)}set(o,r){return $3.get(this)&&(this.has(o)?to(this,Dt)[to(this,Dt).indexOf(o)]=o:to(this,Dt).push(o)),super.set(o,r),this}insert(o,r,n){let a=this.has(r),i=to(this,Dt).length,s=YI(o),l=s>=0?s:i+s,u=l<0||l>=i?-1:l;if(u===this.size||a&&u===this.size-1||u===-1)return this.set(r,n),this;let c=this.size+(a?0:1);s<0&&l++;let d=[...to(this,Dt)],f,p=!1;for(let g=l;g<c;g++)if(l===g){let m=d[g];d[g]===r&&(m=d[g+1]),a&&this.delete(r),f=this.get(m),this.set(r,n)}else{!p&&d[g-1]===r&&(p=!0);let m=d[p?g:g-1],x=f;f=this.get(m),this.delete(m),this.set(m,x)}return this}with(o,r,n){let a=new sn(this);return a.insert(o,r,n),a}before(o){let r=to(this,Dt).indexOf(o)-1;if(!(r<0))return this.entryAt(r)}setBefore(o,r,n){let a=to(this,Dt).indexOf(o);return a===-1?this:this.insert(a,r,n)}after(o){let r=to(this,Dt).indexOf(o);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(o,r,n){let a=to(this,Dt).indexOf(o);return a===-1?this:this.insert(a+1,r,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Bm(this,Dt,[]),super.clear()}delete(o){let r=super.delete(o);return r&&to(this,Dt).splice(to(this,Dt).indexOf(o),1),r}deleteAt(o){let r=this.keyAt(o);return r!==void 0?this.delete(r):!1}at(o){let r=Ry(to(this,Dt),o);if(r!==void 0)return this.get(r)}entryAt(o){let r=Ry(to(this,Dt),o);if(r!==void 0)return[r,this.get(r)]}indexOf(o){return to(this,Dt).indexOf(o)}keyAt(o){return Ry(to(this,Dt),o)}from(o,r){let n=this.indexOf(o);if(n===-1)return;let a=n+r;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(o,r){let n=this.indexOf(o);if(n===-1)return;let a=n+r;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(o,r){let n=0;for(let a of this){if(Reflect.apply(o,r,[a,n,this]))return a;n++}}findIndex(o,r){let n=0;for(let a of this){if(Reflect.apply(o,r,[a,n,this]))return n;n++}return-1}filter(o,r){let n=[],a=0;for(let i of this)Reflect.apply(o,r,[i,a,this])&&n.push(i),a++;return new sn(n)}map(o,r){let n=[],a=0;for(let i of this)n.push([i[0],Reflect.apply(o,r,[i,a,this])]),a++;return new sn(n)}reduce(...o){let[r,n]=o,a=0,i=n??this.at(0);for(let s of this)a===0&&o.length===1?i=s:i=Reflect.apply(r,this,[i,s,a,this]),a++;return i}reduceRight(...o){let[r,n]=o,a=n??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&o.length===1?a=s:a=Reflect.apply(r,this,[a,s,i,this])}return a}toSorted(o){let r=[...this.entries()].sort(o);return new sn(r)}toReversed(){let o=new sn;for(let r=this.size-1;r>=0;r--){let n=this.keyAt(r),a=this.get(n);o.set(n,a)}return o}toSpliced(...o){let r=[...this.entries()];return r.splice(...o),new sn(r)}slice(o,r){let n=new sn,a=this.size-1;if(o===void 0)return n;o<0&&(o=o+this.size),r!==void 0&&r>0&&(a=r-1);for(let i=o;i<=a;i++){let s=this.keyAt(i),l=this.get(s);n.set(s,l)}return n}every(o,r){let n=0;for(let a of this){if(!Reflect.apply(o,r,[a,n,this]))return!1;n++}return!0}some(o,r){let n=0;for(let a of this){if(Reflect.apply(o,r,[a,n,this]))return!0;n++}return!1}},Dt=new WeakMap,Jt(sn,"OrderedDict"),sn);function Ry(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let o=K3(e,t);return o===-1?void 0:e[o]}Jt(Ry,"at");function K3(e,t){let o=e.length,r=YI(t),n=r>=0?r:o+r;return n<0||n>=o?-1:n}Jt(K3,"toSafeIndex");function YI(e){return e!==e||e===0?0:Math.trunc(e)}Jt(YI,"toSafeInteger");function AJ(e){let t=e+"CollectionProvider",[o,r]=gi(t),[n,a]=o(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new $I,setItemMap:Jt(()=>{},"setItemMap")}),i=Jt(({state:y,...w})=>y?(0,Jl.jsx)(l,{...w,state:y}):(0,Jl.jsx)(s,{...w}),"CollectionProvider");i.displayName=t;let s=Jt(y=>{let w=x();return(0,Jl.jsx)(l,{...y,state:w})},"CollectionInit");s.displayName=t+"Init";let l=Jt(y=>{let{scope:w,children:C,state:b}=y,S=sr.useRef(null),[I,L]=sr.useState(null),T=nn(S,L),[k,E]=b;return sr.useEffect(()=>{if(!I)return;let _=Q3(()=>{});return _.observe(I,{childList:!0,subtree:!0}),()=>{_.disconnect()}},[I]),(0,Jl.jsx)(n,{scope:w,itemMap:k,setItemMap:E,collectionRef:T,collectionRefObject:S,collectionElement:I,children:C})},"CollectionProviderImpl");l.displayName=t+"Impl";let u=e+"CollectionSlot",c=hi(u),d=sr.forwardRef((y,w)=>{let{scope:C,children:b}=y,S=a(u,C),I=nn(w,S.collectionRef);return(0,Jl.jsx)(c,{ref:I,children:b})});d.displayName=u;let f=e+"CollectionItemSlot",p="data-radix-collection-item",g=hi(f),m=sr.forwardRef((y,w)=>{let{scope:C,children:b,...S}=y,I=sr.useRef(null),[L,T]=sr.useState(null),k=nn(w,I,T),E=a(f,C),{setItemMap:_}=E,D=sr.useRef(S);X3(D.current,S)||(D.current=S);let z=D.current;return sr.useEffect(()=>{let F=z;return _(O=>L?O.has(L)?O.set(L,{...F,element:L}).toSorted(KI):(O.set(L,{...F,element:L}),O.toSorted(KI)):O),()=>{_(O=>!L||!O.has(L)?O:(O.delete(L),new $I(O)))}},[L,z,_]),(0,Jl.jsx)(g,{[p]:"",ref:k,children:b})});m.displayName=f;function x(){return sr.useState(new $I)}Jt(x,"useInitCollection");function h(y){let{itemMap:w}=a(e+"CollectionConsumer",y);return w}return Jt(h,"useCollection"),[{Provider:i,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:h,useInitCollection:x}]}Jt(AJ,"createCollection");function X3(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(let n of o)if(!Object.prototype.hasOwnProperty.call(t,n)||e[n]!==t[n])return!1;return!0}Jt(X3,"shallowEqual");function Y3(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Jt(Y3,"isElementPreceding");function KI(e,t){return!e[1].element||!t[1].element?0:Y3(e[1].element,t[1].element)?-1:1}Jt(KI,"sortByDocumentPosition");function Q3(e){return new MutationObserver(o=>{for(let r of o)if(r.type==="childList"){e();return}})}Jt(Q3,"getChildListObserver");var QI=R(M(),1);var Z3=R(M(),1),Os=globalThis?.document?Z3.useLayoutEffect:()=>{};var DJ=Object.defineProperty,NJ=(e,t)=>DJ(e,"name",{value:t,configurable:!0}),OJ=QI[" useId ".trim().toString()]||(()=>{}),FJ=0;function ZI(e){let[t,o]=QI.useState(OJ());return Os(()=>{e||o(r=>r??String(FJ++))},[e]),e||(t?`radix-${t}`:"")}NJ(ZI,"useId");var fd=R(M(),1),_J=Object.defineProperty,VJ=(e,t)=>_J(e,"name",{value:t,configurable:!0});function JI(e){let t=fd.useRef(e);return fd.useEffect(()=>{t.current=e}),fd.useMemo(()=>(...o)=>t.current?.(...o),[])}VJ(JI,"useCallbackRef");var ln=R(M(),1);var jn=R(M(),1);var pd=R(M(),1),BJ=Object.defineProperty,HJ=(e,t)=>BJ(e,"name",{value:t,configurable:!0}),J3=pd[" useEffectEvent ".trim().toString()],ez=pd[" useInsertionEffect ".trim().toString()];function eP(e){if(typeof J3=="function")return J3(e);let t=pd.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof ez=="function"?ez(()=>{t.current=e}):Os(()=>{t.current=e}),pd.useMemo(()=>(...o)=>t.current?.(...o),[])}HJ(eP,"useEffectEvent");var UJ=Object.defineProperty,Fm=(e,t)=>UJ(e,"name",{value:t,configurable:!0}),zJ=ln[" useInsertionEffect ".trim().toString()]||Os;function md({prop:e,defaultProp:t,onChange:o=Fm(()=>{},"onChange"),caller:r}){let[n,a,i]=oz({defaultProp:t,onChange:o}),s=e!==void 0,l=s?e:n;if(ud){let c=ln.useRef(e!==void 0);ln.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),c.current=s},[s,r])}let u=ln.useCallback(c=>{if(s){let d=rz(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}Fm(md,"useControllableState");function oz({defaultProp:e,onChange:t}){let[o,r]=ln.useState(e),n=ln.useRef(o),a=ln.useRef(t);return zJ(()=>{a.current=t},[t]),ln.useEffect(()=>{n.current!==o&&(a.current?.(o),n.current=o)},[o,n]),[o,r,a]}Fm(oz,"useUncontrolledState");function rz(e){return typeof e=="function"}Fm(rz,"isFunction");var tz=Symbol("RADIX:SYNC_STATE");function GJ(e,t,o,r){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=eP(i);if(ud){let x=jn.useRef(n!==void 0);jn.useEffect(()=>{let h=x.current;h!==l&&console.warn(`${s} 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.`),x.current=l},[l,s])}let c=[{...o,state:a}];r&&c.push(r);let[d,f]=jn.useReducer((x,h)=>{if(h.type===tz)return{...x,state:h.state};let v=e(x,h);return l&&!Object.is(v.state,x.state)&&u(v.state),v},...c),p=d.state,g=jn.useRef(p);jn.useEffect(()=>{g.current!==p&&(g.current=p,l||u(p))},[p,g,l]);let m=jn.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return jn.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:tz,state:n})},[n,d.state,l]),[m,f]}Fm(GJ,"useControllableStateReducer");var Iy=R(M(),1),qJ=R(N(),1),WJ=Object.defineProperty,jJ=(e,t)=>WJ(e,"name",{value:t,configurable:!0}),$J=Iy.createContext(void 0);function _m(e){let t=Iy.useContext($J);return e||t||"ltr"}jJ(_m,"useDirection");var XJ=R(M(),1),Py=R(M(),1),KJ=Object.defineProperty,oP=(e,t)=>KJ(e,"name",{value:t,configurable:!0}),tP=!1;function nz(){let[e,t]=Py.useState(tP);return Py.useEffect(()=>{tP||(tP=!0,t(!0))},[]),e}oP(nz,"useIsHydrated");var az=XJ[" useSyncExternalStore ".trim().toString()];function iz(){return()=>{}}oP(iz,"subscribe");function sz(){return az(iz,()=>!0,()=>!1)}oP(sz,"useIsHydratedModern");var lz=typeof az=="function"?sz:nz;var Fs=R(N(),1),YJ=Object.defineProperty,eu=(e,t)=>YJ(e,"name",{value:t,configurable:!0}),rP="rovingFocusGroup.onEntryFocus",QJ={bubbles:!1,cancelable:!0},Ly="RovingFocusGroup",[nP,uz,ZJ]=XI(Ly),[JJ,aP]=gi(Ly,[ZJ]),[eee,tee]=JJ(Ly),cz=eo.forwardRef(eu(function(t,o){return(0,Fs.jsx)(nP.Provider,{scope:t.__scopeRovingFocusGroup,children:(0,Fs.jsx)(nP.Slot,{scope:t.__scopeRovingFocusGroup,children:(0,Fs.jsx)(oee,{...t,ref:o})})})},"RovingFocusGroup")),oee=eo.forwardRef(eu(function(t,o){let{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,p=eo.useRef(null),g=nn(o,p),m=_m(i),[x,h]=md({prop:s,defaultProp:l??null,onChange:u,caller:Ly}),[v,y]=eo.useState(!1),w=JI(c),C=uz(r),b=eo.useRef(!1),[S,I]=eo.useState(0);return eo.useEffect(()=>{let L=p.current;if(L)return L.addEventListener(rP,w),()=>L.removeEventListener(rP,w)},[w]),(0,Fs.jsx)(eee,{scope:r,orientation:n,dir:m,loop:a,currentTabStopId:x,onItemFocus:eo.useCallback(L=>h(L),[h]),onItemShiftTab:eo.useCallback(()=>y(!0),[]),onFocusableItemAdd:eo.useCallback(()=>I(L=>L+1),[]),onFocusableItemRemove:eo.useCallback(()=>I(L=>L-1),[]),children:(0,Fs.jsx)(cd.div,{tabIndex:v||S===0?-1:0,"data-orientation":n,...f,ref:g,style:{outline:"none",...t.style},onMouseDown:Ns(t.onMouseDown,()=>{b.current=!0}),onFocus:Ns(t.onFocus,L=>{let T=!b.current;if(L.target===L.currentTarget&&T&&!v){let k=new CustomEvent(rP,QJ);if(L.currentTarget.dispatchEvent(k),!k.defaultPrevented){let E=C().filter(O=>O.focusable),_=E.find(O=>O.active),D=E.find(O=>O.id===x),F=[_,D,...E].filter(Boolean).map(O=>O.ref.current);iP(F,d)}}b.current=!1}),onBlur:Ns(t.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),ree="RovingFocusGroupItem",dz=eo.forwardRef(eu(function(t,o){let{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,children:s,...l}=t,u=ZI(),c=i||u,d=tee(ree,r),f=d.currentTabStopId===c,p=uz(r),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:x}=d,h=lz();return Os(()=>{if(!(!h||!n))return g(),()=>m()},[h,n,g,m]),eo.useEffect(()=>{if(!(h||!n))return g(),()=>m()},[h,n,g,m]),(0,Fs.jsx)(nP.ItemSlot,{scope:r,id:c,focusable:n,active:a,children:(0,Fs.jsx)(cd.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:o,onMouseDown:Ns(t.onMouseDown,v=>{n?d.onItemFocus(c):v.preventDefault()}),onFocus:Ns(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:Ns(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;let y=pz(v,d.orientation,d.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=p().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();let b=C.indexOf(v.currentTarget);C=d.loop?mz(C,b+1):C.slice(b+1)}setTimeout(()=>iP(C))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:x!=null}):s})})},"RovingFocusGroupItem")),nee={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function fz(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}eu(fz,"getDirectionAwareKey");function pz(e,t,o){let r=fz(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return nee[r]}eu(pz,"getFocusIntent");function iP(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}eu(iP,"focusFirst");function mz(e,t){return e.map((o,r)=>e[(t+r)%e.length])}eu(mz,"wrapArray");var zo=R(N(),1),iee=Object.defineProperty,_s=(e,t)=>iee(e,"name",{value:t,configurable:!0}),gd="ToggleGroup",[hz,oDe]=gi(gd,[aP]),vz=aP(),xz=Go.forwardRef(_s(function(t,o){let{type:r,...n}=t;if(r==="single")return(0,zo.jsx)(see,{role:"radiogroup",...n,ref:o});if(r==="multiple")return(0,zo.jsx)(lee,{role:"toolbar",...n,ref:o});throw new Error(`Missing prop \`type\` expected on \`${gd}\``)},"ToggleGroup")),[yz,wz]=hz(gd),see=Go.forwardRef(_s(function(t,o){let{value:r,defaultValue:n,onValueChange:a=_s(()=>{},"onValueChange"),...i}=t,[s,l]=md({prop:r,defaultProp:n??"",onChange:a,caller:gd});return(0,zo.jsx)(yz,{scope:t.__scopeToggleGroup,type:"single",value:Go.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:Go.useCallback(()=>l(""),[l]),children:(0,zo.jsx)(Cz,{...i,ref:o})})},"ToggleGroupImplSingle")),lee=Go.forwardRef(_s(function(t,o){let{value:r,defaultValue:n,onValueChange:a=_s(()=>{},"onValueChange"),...i}=t,[s,l]=md({prop:r,defaultProp:n??[],onChange:a,caller:gd}),u=Go.useCallback(d=>l((f=[])=>[...f,d]),[l]),c=Go.useCallback(d=>l((f=[])=>f.filter(p=>p!==d)),[l]);return(0,zo.jsx)(yz,{scope:t.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:c,children:(0,zo.jsx)(Cz,{...i,ref:o})})},"ToggleGroupImplMultiple")),[uee,cee]=hz(gd),Cz=Go.forwardRef(_s(function(t,o){let{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:i,dir:s,loop:l=!0,...u}=t,c=vz(r),d=_m(s),f={dir:d,...u};return(0,zo.jsx)(uee,{scope:r,rovingFocus:a,disabled:n,children:a?(0,zo.jsx)(cz,{asChild:!0,...c,orientation:i,dir:d,loop:l,children:(0,zo.jsx)(cd.div,{...f,ref:o})}):(0,zo.jsx)(cd.div,{...f,ref:o})})},"ToggleGroupImpl")),sP="ToggleGroupItem",Sz=Go.forwardRef(_s(function(t,o){let r=wz(sP,t.__scopeToggleGroup),n=cee(sP,t.__scopeToggleGroup),a=vz(t.__scopeToggleGroup),i=r.value.includes(t.value),s=n.disabled||t.disabled,l={...t,pressed:i,disabled:s},u=Go.useRef(null);return n.rovingFocus?(0,zo.jsx)(dz,{asChild:!0,...a,focusable:!s,active:i,ref:u,children:(0,zo.jsx)(gz,{...l,ref:o})}):(0,zo.jsx)(gz,{...l,ref:o})},"ToggleGroupItem")),gz=Go.forwardRef(_s(function(t,o){let{__scopeToggleGroup:r,value:n,...a}=t,i=wz(sP,r),s={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=i.type==="single"?s:void 0;return(0,zo.jsx)(km,{...l,...a,ref:o,onPressedChange:u=>{u?i.onItemActivate(n):i.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var Ty=R(N()),bz=tu.createContext({size:"default",variant:"default"}),Rz=tu.forwardRef(({className:e,variant:t,size:o,children:r,...n},a)=>(0,Ty.jsx)(xz,{ref:a,className:P("moonui-theme inline-flex items-center justify-center gap-1","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-start",e),...n,children:(0,Ty.jsx)(bz.Provider,{value:{variant:t,size:o},children:r})}));Rz.displayName="ToggleGroup";var Iz=tu.forwardRef(({className:e,children:t,variant:o,size:r,...n},a)=>{let i=tu.useContext(bz);return(0,Ty.jsx)(Sz,{ref:a,className:P(uy({variant:i.variant??o,size:i.size??r}),e),...n,children:t})});Iz.displayName="ToggleGroupItem";export{$W as Accordion,Sk as AccordionContent,wk as AccordionItem,Ck as AccordionTrigger,Ik as Alert,Lk as AlertDescription,Pk as AlertTitle,kk as AspectRatio,fC as Avatar,pC as AvatarFallback,Wk as AvatarGroup,Gk as AvatarImage,Zo as Badge,$k as Breadcrumb,mC as BreadcrumbEllipsis,Xk as BreadcrumbItem,Qk as BreadcrumbLink,Kk as BreadcrumbList,Zk as BreadcrumbPage,Yk as BreadcrumbSeparator,De as Button,M3 as ButtonGroup,ED as Card,xN as CardCVCInput,OD as CardContent,ND as CardDescription,vN as CardExpiryInput,FD as CardFooter,AD as CardHeader,hN as CardNumberInput,DD as CardTitle,yN as CardZipInput,MN as Carousel,AN as CarouselContent,NN as CarouselItem,FN as CarouselNext,ON as CarouselPrevious,NS as Checkbox,WN as CheckboxGroup,Jv as CheckboxLabel,jN as CheckboxWithLabel,f8 as Collapsible,KN as CollapsibleContent,$N as CollapsibleTrigger,Cb as ColorPicker,_b as Command,pK as CommandDialog,c_ as CommandEmpty,d_ as CommandGroup,l_ as CommandInput,p_ as CommandItem,u_ as CommandList,f_ as CommandSeparator,m_ as CommandShortcut,rR as DatePicker,N_ as DateRangePicker,O_ as DateTimePicker,Nb as Dialog,lK as DialogClose,Dx as DialogContent,Fb as DialogDescription,s_ as DialogFooter,dK as DialogForm,Ob as DialogHeader,um as DialogTitle,iK as DialogTrigger,uX as DraggableList,tY as DropdownMenu,QV as DropdownMenuCheckboxItem,XV as DropdownMenuContent,rY as DropdownMenuGroup,YV as DropdownMenuItem,JV as DropdownMenuLabel,nY as DropdownMenuPortal,iY as DropdownMenuRadioGroup,ZV as DropdownMenuRadioItem,eB as DropdownMenuSeparator,tB as DropdownMenuShortcut,aY as DropdownMenuSub,KV as DropdownMenuSubContent,$V as DropdownMenuSubTrigger,oY as DropdownMenuTrigger,rB as FileUpload,MY as FreeBadge,aB as GestureDrawer,CTe as GitHubStarButton,dY as GitHubStars,L7 as GradientPicker,bo as Input,cB as InputOTP,dB as InputOTPGroup,mB as InputOTPSeparator,pB as InputOTPSlot,S3 as Kbd,rr as Label,gB as LockedComponent,F_ as MonthPicker,TR as MoonLogo,BTe as MoonLogoAnimated,VTe as MoonLogoIcon,$W as MoonUIAccordion,Sk as MoonUIAccordionContent,wk as MoonUIAccordionItem,Ck as MoonUIAccordionTrigger,Ik as MoonUIAlert,Lk as MoonUIAlertDescription,Pk as MoonUIAlertTitle,kk as MoonUIAspectRatio,fC as MoonUIAvatar,pC as MoonUIAvatarFallback,Wk as MoonUIAvatarGroup,Gk as MoonUIAvatarImage,Zo as MoonUIBadge,$k as MoonUIBreadcrumb,mC as MoonUIBreadcrumbEllipsis,Xk as MoonUIBreadcrumbItem,Qk as MoonUIBreadcrumbLink,Kk as MoonUIBreadcrumbList,Zk as MoonUIBreadcrumbPage,Yk as MoonUIBreadcrumbSeparator,De as MoonUIButton,M3 as MoonUIButtonGroup,Bp as MoonUICalendar,ED as MoonUICard,xN as MoonUICardCVCInput,OD as MoonUICardContent,ND as MoonUICardDescription,vN as MoonUICardExpiryInput,FD as MoonUICardFooter,AD as MoonUICardHeader,hN as MoonUICardNumberInput,DD as MoonUICardTitle,yN as MoonUICardZipInput,MN as MoonUICarousel,AN as MoonUICarouselContent,NN as MoonUICarouselItem,FN as MoonUICarouselNext,ON as MoonUICarouselPrevious,NS as MoonUICheckbox,WN as MoonUICheckboxGroup,Jv as MoonUICheckboxLabel,jN as MoonUICheckboxWithLabel,f8 as MoonUICollapsible,KN as MoonUICollapsibleContent,$N as MoonUICollapsibleTrigger,Cb as MoonUIColorPicker,_b as MoonUICommand,pK as MoonUICommandDialog,c_ as MoonUICommandEmpty,d_ as MoonUICommandGroup,l_ as MoonUICommandInput,p_ as MoonUICommandItem,u_ as MoonUICommandList,f_ as MoonUICommandSeparator,m_ as MoonUICommandShortcut,iX as MoonUIDataTableBasic,rR as MoonUIDatePicker,N_ as MoonUIDateRangePicker,O_ as MoonUIDateTimePicker,Nb as MoonUIDialog,lK as MoonUIDialogClose,Dx as MoonUIDialogContent,Fb as MoonUIDialogDescription,s_ as MoonUIDialogFooter,Ob as MoonUIDialogHeader,um as MoonUIDialogTitle,iK as MoonUIDialogTrigger,uX as MoonUIDraggableList,tY as MoonUIDropdownMenu,QV as MoonUIDropdownMenuCheckboxItem,XV as MoonUIDropdownMenuContent,rY as MoonUIDropdownMenuGroup,YV as MoonUIDropdownMenuItem,JV as MoonUIDropdownMenuLabel,nY as MoonUIDropdownMenuPortal,iY as MoonUIDropdownMenuRadioGroup,ZV as MoonUIDropdownMenuRadioItem,eB as MoonUIDropdownMenuSeparator,tB as MoonUIDropdownMenuShortcut,aY as MoonUIDropdownMenuSub,KV as MoonUIDropdownMenuSubContent,$V as MoonUIDropdownMenuSubTrigger,oY as MoonUIDropdownMenuTrigger,rB as MoonUIFileUpload,MY as MoonUIFreeBadge,aB as MoonUIGestureDrawer,dY as MoonUIGitHubStars,L7 as MoonUIGradientPicker,bo as MoonUIInput,cB as MoonUIInputOTP,dB as MoonUIInputOTPGroup,mB as MoonUIInputOTPSeparator,pB as MoonUIInputOTPSlot,S3 as MoonUIKbd,rr as MoonUILabel,gB as MoonUILockedComponent,F_ as MoonUIMonthPicker,TR as MoonUIMoonLogo,vB as MoonUIPagination,xB as MoonUIPaginationContent,SB as MoonUIPaginationEllipsis,yB as MoonUIPaginationItem,Xx as MoonUIPaginationLink,CB as MoonUIPaginationNext,wB as MoonUIPaginationPrevious,fH as MoonUIPhoneInput,oi as MoonUIPopover,ha as MoonUIPopoverContent,ri as MoonUIPopoverTrigger,kY as MoonUIProBadge,TY as MoonUIProComponentWrapper,qx as MoonUIProgress,mH as MoonUIRadioGroup,KR as MoonUIRadioGroupItem,gH as MoonUIRadioItemWithLabel,XR as MoonUIRadioLabel,I3 as MoonUIRating,aQ as MoonUIRichTextEditor,WH as MoonUIScrollArea,oI as MoonUIScrollBar,$H as MoonUIScrollReveal,KH as MoonUIScrollRevealContainer,XH as MoonUIScrollRevealItem,Qc as MoonUISelect,Jc as MoonUISelectContent,eQ as MoonUISelectGroup,Ho as MoonUISelectItem,uH as MoonUISelectLabel,$R as MoonUISelectScrollDownButton,qR as MoonUISelectScrollUpButton,cH as MoonUISelectSeparator,Zc as MoonUISelectTrigger,bm as MoonUISelectValue,Qr as MoonUISeparator,P7 as MoonUISimpleColorPicker,BU as MoonUISimpleEditor,As as MoonUISkeleton,CI as MoonUISkeletonAvatar,UU as MoonUISkeletonCard,wI as MoonUISkeletonText,si as MoonUISlider,T3 as MoonUISpinner,zU as MoonUISwipeableCard,YU as MoonUISwitch,Vx as MoonUITable,Hx as MoonUITableBody,D_ as MoonUITableCaption,pm as MoonUITableCell,A_ as MoonUITableFooter,Ux as MoonUITableHead,Bx as MoonUITableHeader,Kc as MoonUITableRow,Px as MoonUITabs,Wc as MoonUITabsContent,Lx as MoonUITabsList,Gc as MoonUITabsTrigger,QU as MoonUITagsInput,ZU as MoonUITextarea,VI as MoonUIToast,v3 as MoonUIToastAction,BI as MoonUIToastClose,UI as MoonUIToastDescription,h3 as MoonUIToastProvider,HI as MoonUIToastTitle,_I as MoonUIToastViewport,dJ as MoonUIToaster,cy as MoonUIToggle,Rz as MoonUIToggleGroup,Iz as MoonUIToggleGroupItem,my as MoonUITooltip,Am as MoonUITooltipContent,yI as MoonUITooltipProvider,gy as MoonUITooltipTrigger,vB as Pagination,xB as PaginationContent,SB as PaginationEllipsis,yB as PaginationItem,Xx as PaginationLink,CB as PaginationNext,wB as PaginationPrevious,zu as Palette,fH as PhoneInput,hh as Pipette,oi as Popover,EPe as PopoverAnchor,APe as PopoverClose,ha as PopoverContent,n7 as PopoverFooter,r7 as PopoverHeader,o7 as PopoverSeparator,ri as PopoverTrigger,kY as ProBadge,TY as ProComponentWrapper,qx as Progress,PY as REGEXP_ONLY_CHARS,IY as REGEXP_ONLY_DIGITS,LY as REGEXP_ONLY_DIGITS_AND_CHARS,mH as RadioGroup,KR as RadioGroupItem,gH as RadioItemWithLabel,XR as RadioLabel,I3 as Rating,aQ as RichTextEditor,WH as ScrollArea,oI as ScrollBar,$H as ScrollReveal,KH as ScrollRevealContainer,XH as ScrollRevealItem,Qc as Select,Jc as SelectContent,eQ as SelectGroup,Ho as SelectItem,uH as SelectLabel,$R as SelectScrollDownButton,qR as SelectScrollUpButton,cH as SelectSeparator,Zc as SelectTrigger,bm as SelectValue,Qr as Separator,P7 as SimpleColorPicker,BU as SimpleEditor,EZ as SimpleTooltip,As as Skeleton,CI as SkeletonAvatar,UU as SkeletonCard,wI as SkeletonText,si as Slider,T3 as Spinner,zU as SwipeableCard,YU as Switch,Vx as Table,Hx as TableBody,D_ as TableCaption,pm as TableCell,A_ as TableFooter,Ux as TableHead,Bx as TableHeader,Kc as TableRow,Px as Tabs,Wc as TabsContent,Lx as TabsList,Gc as TabsTrigger,QU as TagsInput,ZU as Textarea,VI as Toast,v3 as ToastAction,BI as ToastClose,UI as ToastDescription,h3 as ToastProvider,HI as ToastTitle,_I as ToastViewport,dJ as Toaster,cy as Toggle,Rz as ToggleGroup,Iz as ToggleGroupItem,my as Tooltip,VU as TooltipArrow,Am as TooltipContent,yI as TooltipProvider,gy as TooltipTrigger,XW as aspectRatioVariants,qk as badgeVariants,k3 as buttonGroupVariants,yh as buttonVariants,EN as carouselContentVariants,DN as carouselItemVariants,P as cn,p8 as collapsibleContentVariants,qN as collapsibleTriggerVariants,Mn as format,fB as inputOTPSlotVariants,C3 as kbdVariants,qk as moonUIBadgeVariants,k3 as moonUIButtonGroupVariants,yh as moonUIButtonVariants,EN as moonUICarouselContentVariants,DN as moonUICarouselItemVariants,sX as moonUICreateSortableHeader,fB as moonUIInputOTPSlotVariants,C3 as moonUIKbdVariants,R3 as moonUIRatingVariants,HU as moonUISkeletonVariants,L3 as moonUISpinnerVariants,uy as moonUIToggleVariants,t7 as popoverContentVariants,sY as progressVariants,R3 as ratingVariants,zQ as separatorVariants,HU as skeletonVariants,L3 as spinnerVariants,BZ as switchVariants,x3 as toast,uy as toggleVariants,MZ as tooltipVariants,$p as useCarousel,y3 as useToast};
|
|
85
|
+
}`,LY="^\\d+$",TY="^[a-zA-Z]+$",kY="^[a-zA-Z0-9]+$";var di=R(N()),fB=Kl.forwardRef(({className:e,containerClassName:t,...o},r)=>(0,di.jsx)(TR,{ref:r,"aria-label":"One-time password",containerClassName:P("moonui-theme","flex items-center gap-2 has-[:disabled]:opacity-50",t),className:P("disabled:cursor-not-allowed",e),...o}));fB.displayName="InputOTP";var pB=Kl.forwardRef(({className:e,...t},o)=>(0,di.jsx)("div",{ref:o,className:P("flex items-center",e),...t}));pB.displayName="InputOTPGroup";var mB=K(["relative flex h-10 w-10 items-center justify-center","border-y border-r border-input text-sm text-foreground","transition-all duration-200","first:rounded-l-md first:border-l last:rounded-r-md"],{variants:{isActive:{true:"z-10 ring-2 ring-ring ring-offset-background",false:""}},defaultVariants:{isActive:!1}}),gB=Kl.forwardRef(({index:e,className:t,...o},r)=>{let a=Kl.useContext(LR)?.slots?.[e],i=a?.char,s=a?.hasFakeCaret,l=a?.isActive;return(0,di.jsxs)("div",{ref:r,"data-active":l?"":void 0,className:P(mB({isActive:!!l}),t),...o,children:[i,s&&(0,di.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,di.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});gB.displayName="InputOTPSlot";var hB=Kl.forwardRef(({className:e,...t},o)=>(0,di.jsx)("div",{ref:o,role:"separator",className:P("text-muted-foreground",e),...t,children:(0,di.jsx)(If,{"aria-hidden":"true"})}));hB.displayName="InputOTPSeparator";var Xc=R(M());var Ce=R(N());function vB({children:e,componentName:t,className:o,showPreview:r=!0,previewDuration:n=2e3}){let[a,i]=(0,Xc.useState)(!1),[s,l]=(0,Xc.useState)(null),u=()=>{if(!r)return;i(!0),s&&clearTimeout(s);let d=setTimeout(()=>{i(!1)},n);l(d)},c=()=>{s&&(clearTimeout(s),l(null)),i(!1)};return(0,Ce.jsxs)("div",{className:P("relative group cursor-pointer transition-all duration-300",o),onMouseEnter:u,onMouseLeave:c,children:[(0,Ce.jsx)("div",{className:P("transition-all duration-300",!a&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),(0,Ce.jsx)("div",{className:P("absolute inset-0 bg-gradient-to-br from-amber-500/10 via-transparent to-purple-500/10","border-2 border-dashed border-amber-400/30 rounded-lg","flex items-center justify-center","transition-all duration-300",a?"opacity-0":"opacity-100"),children:(0,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsxs)(Zo,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[(0,Ce.jsx)(Bu,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsx)("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:(0,Ce.jsx)(Uu,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,Ce.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This premium component is available with Pro subscription"}),(0,Ce.jsxs)(De,{size:"sm",className:"bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 border-0",onClick:()=>{typeof window<"u"&&(window.location.href="/pricing")},children:[(0,Ce.jsx)(Gu,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),r&&!a&&(0,Ce.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,Ce.jsx)("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function MY({children:e,componentId:t,componentName:o,className:r,fallback:n,requireCLI:a=!0}){let[i,s]=(0,Xc.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,Xc.useEffect)(()=>{if(!(()=>{let d={nodeEnv:!1,nextPublicEnv:process.env.NEXT_PUBLIC_VERCEL_ENV==="development",localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080"),vercelEnv:!process.env.VERCEL,ciEnv:!process.env.CI,deploymentEnv:!process.env.DEPLOYMENT_ENV};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME||process.env.DEPLOYMENT_ENV==="production"?!1:d.nodeEnv&&d.localhost&&!d.vercelEnv&&!d.ciEnv})()||!a){s({isAuthenticated:!0,deviceValid:!0,hasProAccess:!0,loading:!1});return}async function c(){try{let d=localStorage.getItem("moonui_cli_token"),f=localStorage.getItem("moonui_device_id");if(!d||!f){s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1});return}let p=await fetch("/api/device/validate",{method:"POST",headers:{Authorization:`Bearer ${d}`,"X-Device-ID":f,"Content-Type":"application/json"},body:JSON.stringify({environment:{nodeEnv:"production",hostname:window.location.hostname,port:window.location.port,protocol:window.location.protocol}})});if(p.ok){let g=await p.json();s({isAuthenticated:!0,deviceValid:g.valid,hasProAccess:g.hasProAccess,loading:!1})}else s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}catch{s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}}c()},[a]),i.loading)return(0,Ce.jsx)("div",{className:P("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",r),children:(0,Ce.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,Ce.jsx)("div",{className:"text-sm text-gray-500",children:"Loading..."})})});if((()=>{let u={nodeEnv:!1,localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080")};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME?!1:u.nodeEnv&&u.localhost})()&&a){if(!i.isAuthenticated)return(0,Ce.jsxs)("div",{className:P("relative",r),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,Ce.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-red-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-red-400/30 rounded-lg flex items-center justify-center",children:(0,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(Zo,{variant:"destructive",className:"mb-2",children:[(0,Ce.jsx)(Uu,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),(0,Ce.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),(0,Ce.jsx)("code",{className:"block bg-black/80 text-green-400 p-2 rounded text-xs",children:"npx moonui auth login"})]})})]});if(!i.deviceValid)return(0,Ce.jsxs)("div",{className:P("relative",r),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,Ce.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-yellow-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-yellow-400/30 rounded-lg flex items-center justify-center",children:(0,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(Zo,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,Ce.jsx)(Gu,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),(0,Ce.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This device is not registered or you've reached your device limit"}),(0,Ce.jsx)(De,{size:"sm",className:"bg-gradient-to-r from-yellow-500 to-orange-500",onClick:()=>window.open("/dashboard/devices","_blank"),children:"Manage Devices"})]})})]});if(!i.hasProAccess)return(0,Ce.jsx)(vB,{componentName:o||t,className:r,children:n||e})}return(0,Ce.jsx)("div",{className:r,children:e})}function EY({className:e}){return(0,Ce.jsxs)(Zo,{variant:"secondary",className:P("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[(0,Ce.jsx)(Bu,{className:"w-3 h-3 mr-1"}),"PRO"]})}function AY({className:e}){return(0,Ce.jsx)(Zo,{variant:"outline",className:P("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var xB=R(M());var Yt=R(N());function kR({className:e,variant:t="default",showText:o=!0,...r}){let n=xB.useId(),a=`moon-gradient-${n}`,i=`moon-mask-${n}`;return(0,Yt.jsxs)("div",{className:P("flex items-center gap-2",e),children:[(0,Yt.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",...r,children:[(0,Yt.jsxs)("defs",{children:[t==="gradient"&&(0,Yt.jsxs)("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,Yt.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,Yt.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,Yt.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]}),(0,Yt.jsxs)("mask",{id:i,children:[(0,Yt.jsx)("rect",{width:"32",height:"32",fill:"white"}),(0,Yt.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),(0,Yt.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${a})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${i})`})]}),o&&(0,Yt.jsxs)("span",{className:"text-xl font-bold",children:[(0,Yt.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,Yt.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function H1e({className:e,variant:t="default",...o}){return(0,Yt.jsx)(kR,{showText:!1,className:e,variant:t,...o})}function U1e({className:e,variant:t="default",showText:o=!0,...r}){return(0,Yt.jsx)(kR,{className:P("transition-all duration-300 hover:scale-105",e),variant:t,showText:o,...r})}var MR=R(M());var Bo=R(N()),yB=({className:e,...t})=>(0,Bo.jsx)("nav",{role:"navigation","aria-label":"pagination",className:P("moonui-theme","mx-auto flex w-full justify-center",e),...t});yB.displayName="Pagination";var wB=MR.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("ul",{ref:o,className:P("moonui-theme","flex flex-row items-center gap-1",e),...t}));wB.displayName="PaginationContent";var CB=MR.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("li",{ref:o,className:P("moonui-theme","",e),...t}));CB.displayName="PaginationItem";var Yx=({className:e,isActive:t,size:o="icon",...r})=>(0,Bo.jsx)("a",{"aria-current":t?"page":void 0,className:P(wh({variant:t?"outline":"ghost",size:o}),e),...r});Yx.displayName="PaginationLink";var SB=({className:e,...t})=>(0,Bo.jsxs)(Yx,{"aria-label":"Go to previous page",size:"md",className:P("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Bo.jsx)(wn,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:"Previous"})]});SB.displayName="PaginationPrevious";var bB=({className:e,...t})=>(0,Bo.jsxs)(Yx,{"aria-label":"Go to next page",size:"md",className:P("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Bo.jsx)("span",{children:"Next"}),(0,Bo.jsx)(No,{className:"h-4 w-4"})]});bB.displayName="PaginationNext";var RB=({className:e,...t})=>(0,Bo.jsxs)("span",{"aria-hidden":!0,className:P("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Bo.jsx)(na,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"More pages"})]});RB.displayName="PaginationEllipsis";var Im=R(M());var Ls=R(M());var Z=R(M(),1),VR=R(Aa(),1);function ER(e,[t,o]){return Math.min(o,Math.max(t,e))}var IB=R(M(),1);var PB=R(N(),1),AR=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"}),DY="VisuallyHidden",Sm=IB.forwardRef((e,t)=>(0,PB.jsx)($.span,{...e,ref:t,style:{...AR,...e.style}}));Sm.displayName=DY;var LB=Sm;var fe=R(N(),1),OY=[" ","Enter","ArrowUp","ArrowDown"],FY=[" ","Enter"],Xl="Select",[Zx,Jx,_Y]=Xn(Xl),[Yc,vke]=Oe(Xl,[_Y,$r]),ey=$r(),[VY,Is]=Yc(Xl),[BY,HY]=Yc(Xl),TB=e=>{let{__scopeSelect:t,children:o,open:r,defaultOpen:n,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:g}=e,m=ey(t),[x,h]=Z.useState(null),[v,y]=Z.useState(null),[w,C]=Z.useState(!1),b=oa(u),[S,I]=qe({prop:r,defaultProp:n??!1,onChange:a,caller:Xl}),[L,T]=qe({prop:i,defaultProp:s,onChange:l,caller:Xl}),k=Z.useRef(null),E=x?g||!!x.closest("form"):!0,[_,D]=Z.useState(new Set),z=Array.from(_).map(F=>F.props.value).join(";");return(0,fe.jsx)(Ja,{...m,children:(0,fe.jsxs)(VY,{required:p,scope:t,trigger:x,onTriggerChange:h,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Ae(),value:L,onValueChange:T,open:S,onOpenChange:I,dir:b,triggerPointerDownPosRef:k,disabled:f,children:[(0,fe.jsx)(Zx.Provider,{scope:t,children:(0,fe.jsx)(BY,{scope:e.__scopeSelect,onNativeOptionAdd:Z.useCallback(F=>{D(O=>new Set(O).add(F))},[]),onNativeOptionRemove:Z.useCallback(F=>{D(O=>{let B=new Set(O);return B.delete(F),B})},[]),children:o})}),E?(0,fe.jsxs)(JB,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:L,onChange:F=>T(F.target.value),disabled:f,form:g,children:[L===void 0?(0,fe.jsx)("option",{value:""}):null,Array.from(_)]},z):null]})})};TB.displayName=Xl;var kB="SelectTrigger",MB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,disabled:r=!1,...n}=e,a=ey(o),i=Is(kB,o),s=i.disabled||r,l=de(t,i.onTriggerChange),u=Jx(o),c=Z.useRef("touch"),[d,f,p]=tH(m=>{let x=u().filter(y=>!y.disabled),h=x.find(y=>y.value===i.value),v=oH(x,m,h);v!==void 0&&i.onValueChange(v.value)}),g=m=>{s||(i.onOpenChange(!0),p()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return(0,fe.jsx)(ei,{asChild:!0,...a,children:(0,fe.jsx)($.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:s,"data-disabled":s?"":void 0,"data-placeholder":eH(i.value)?"":void 0,...n,ref:l,onClick:W(n.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&g(m)}),onPointerDown:W(n.onPointerDown,m=>{c.current=m.pointerType;let x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:W(n.onKeyDown,m=>{let x=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(x&&m.key===" ")&&OY.includes(m.key)&&(g(),m.preventDefault())})})})});MB.displayName=kB;var EB="SelectValue",AB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:n,children:a,placeholder:i="",...s}=e,l=Is(EB,o),{onValueNodeHasChildrenChange:u}=l,c=a!==void 0,d=de(t,l.onValueNodeChange);return _e(()=>{u(c)},[u,c]),(0,fe.jsx)($.span,{...s,ref:d,style:{pointerEvents:"none"},children:eH(l.value)?(0,fe.jsx)(fe.Fragment,{children:i}):a})});AB.displayName=EB;var UY="SelectIcon",DB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,children:r,...n}=e;return(0,fe.jsx)($.span,{"aria-hidden":!0,...n,ref:t,children:r||"\u25BC"})});DB.displayName=UY;var zY="SelectPortal",NB=e=>(0,fe.jsx)(Sr,{asChild:!0,...e});NB.displayName=zY;var Yl="SelectContent",OB=Z.forwardRef((e,t)=>{let o=Is(Yl,e.__scopeSelect),[r,n]=Z.useState();if(_e(()=>{n(new DocumentFragment)},[]),!o.open){let a=r;return a?VR.createPortal((0,fe.jsx)(FB,{scope:e.__scopeSelect,children:(0,fe.jsx)(Zx.Slot,{scope:e.__scopeSelect,children:(0,fe.jsx)("div",{children:e.children})})}),a):null}return(0,fe.jsx)(_B,{...e,ref:t})});OB.displayName=Yl;var Bn=10,[FB,Ps]=Yc(Yl),GY="SelectContentImpl",WY=ur("SelectContent.RemoveScroll"),_B=Z.forwardRef((e,t)=>{let{__scopeSelect:o,position:r="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:x,...h}=e,v=Is(Yl,o),[y,w]=Z.useState(null),[C,b]=Z.useState(null),S=de(t,U=>w(U)),[I,L]=Z.useState(null),[T,k]=Z.useState(null),E=Jx(o),[_,D]=Z.useState(!1),z=Z.useRef(!1);Z.useEffect(()=>{if(y)return ms(y)},[y]),us();let F=Z.useCallback(U=>{let[ne,...he]=E().map(X=>X.ref.current),[xe]=he.slice(-1),pe=document.activeElement;for(let X of U)if(X===pe||(X?.scrollIntoView({block:"nearest"}),X===ne&&C&&(C.scrollTop=0),X===xe&&C&&(C.scrollTop=C.scrollHeight),X?.focus(),document.activeElement!==pe))return},[E,C]),O=Z.useCallback(()=>F([I,y]),[F,I,y]);Z.useEffect(()=>{_&&O()},[_,O]);let{onOpenChange:B,triggerPointerDownPosRef:A}=v;Z.useEffect(()=>{if(y){let U={x:0,y:0},ne=xe=>{U={x:Math.abs(Math.round(xe.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(xe.pageY)-(A.current?.y??0))}},he=xe=>{U.x<=10&&U.y<=10?xe.preventDefault():y.contains(xe.target)||B(!1),document.removeEventListener("pointermove",ne),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",he,{capture:!0})}}},[y,B,A]),Z.useEffect(()=>{let U=()=>B(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[B]);let[te,ae]=tH(U=>{let ne=E().filter(pe=>!pe.disabled),he=ne.find(pe=>pe.ref.current===document.activeElement),xe=oH(ne,U,he);xe&&setTimeout(()=>xe.ref.current.focus())}),V=Z.useCallback((U,ne,he)=>{let xe=!z.current&&!he;(v.value!==void 0&&v.value===ne||xe)&&(L(U),xe&&(z.current=!0))},[v.value]),Q=Z.useCallback(()=>y?.focus(),[y]),oe=Z.useCallback((U,ne,he)=>{let xe=!z.current&&!he;(v.value!==void 0&&v.value===ne||xe)&&k(U)},[v.value]),Y=r==="popper"?DR:VB,ce=Y===DR?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:x}:{};return(0,fe.jsx)(FB,{scope:o,content:y,viewport:C,onViewportChange:b,itemRefCallback:V,selectedItem:I,onItemLeave:Q,itemTextRefCallback:oe,focusSelectedItem:O,selectedItemText:T,position:r,isPositioned:_,searchRef:te,children:(0,fe.jsx)(ti,{as:WY,allowPinchZoom:!0,children:(0,fe.jsx)(Qa,{asChild:!0,trapped:v.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:W(n,U=>{v.trigger?.focus({preventScroll:!0}),U.preventDefault()}),children:(0,fe.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,fe.jsx)(Y,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:U=>U.preventDefault(),...h,...ce,onPlaced:()=>D(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...h.style},onKeyDown:W(h.onKeyDown,U=>{let ne=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!ne&&U.key.length===1&&ae(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let xe=E().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(U.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){let pe=U.target,X=xe.indexOf(pe);xe=xe.slice(X+1)}setTimeout(()=>F(xe)),U.preventDefault()}})})})})})})});_B.displayName=GY;var jY="SelectItemAlignedPosition",VB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,onPlaced:r,...n}=e,a=Is(Yl,o),i=Ps(Yl,o),[s,l]=Z.useState(null),[u,c]=Z.useState(null),d=de(t,S=>c(S)),f=Jx(o),p=Z.useRef(!1),g=Z.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:h,focusSelectedItem:v}=i,y=Z.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&m&&x&&h){let S=a.trigger.getBoundingClientRect(),I=u.getBoundingClientRect(),L=a.valueNode.getBoundingClientRect(),T=h.getBoundingClientRect();if(a.dir!=="rtl"){let pe=T.left-I.left,X=L.left-pe,Ie=S.left-X,J=S.width+Ie,ie=Math.max(J,I.width),ze=window.innerWidth-Bn,Ke=ER(X,[Bn,Math.max(Bn,ze-ie)]);s.style.minWidth=J+"px",s.style.left=Ke+"px"}else{let pe=I.right-T.right,X=window.innerWidth-L.right-pe,Ie=window.innerWidth-S.right-X,J=S.width+Ie,ie=Math.max(J,I.width),ze=window.innerWidth-Bn,Ke=ER(X,[Bn,Math.max(Bn,ze-ie)]);s.style.minWidth=J+"px",s.style.right=Ke+"px"}let k=f(),E=window.innerHeight-Bn*2,_=m.scrollHeight,D=window.getComputedStyle(u),z=parseInt(D.borderTopWidth,10),F=parseInt(D.paddingTop,10),O=parseInt(D.borderBottomWidth,10),B=parseInt(D.paddingBottom,10),A=z+F+_+B+O,te=Math.min(x.offsetHeight*5,A),ae=window.getComputedStyle(m),V=parseInt(ae.paddingTop,10),Q=parseInt(ae.paddingBottom,10),oe=S.top+S.height/2-Bn,Y=E-oe,ce=x.offsetHeight/2,U=x.offsetTop+ce,ne=z+F+U,he=A-ne;if(ne<=oe){let pe=k.length>0&&x===k[k.length-1].ref.current;s.style.bottom="0px";let X=u.clientHeight-m.offsetTop-m.offsetHeight,Ie=Math.max(Y,ce+(pe?Q:0)+X+O),J=ne+Ie;s.style.height=J+"px"}else{let pe=k.length>0&&x===k[0].ref.current;s.style.top="0px";let Ie=Math.max(oe,z+m.offsetTop+(pe?V:0)+ce)+he;s.style.height=Ie+"px",m.scrollTop=ne-oe+m.offsetTop}s.style.margin=`${Bn}px 0`,s.style.minHeight=te+"px",s.style.maxHeight=E+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,m,x,h,a.dir,r]);_e(()=>y(),[y]);let[w,C]=Z.useState();_e(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let b=Z.useCallback(S=>{S&&g.current===!0&&(y(),v?.(),g.current=!1)},[y,v]);return(0,fe.jsx)($Y,{scope:o,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b,children:(0,fe.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,fe.jsx)($.div,{...n,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});VB.displayName=jY;var qY="SelectPopperPosition",DR=Z.forwardRef((e,t)=>{let{__scopeSelect:o,align:r="start",collisionPadding:n=Bn,...a}=e,i=ey(o);return(0,fe.jsx)(fs,{...i,...a,ref:t,align:r,collisionPadding:n,style:{boxSizing:"border-box",...a.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)"}})});DR.displayName=qY;var[$Y,BR]=Yc(Yl,{}),NR="SelectViewport",BB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,nonce:r,...n}=e,a=Ps(NR,o),i=BR(NR,o),s=de(t,a.onViewportChange),l=Z.useRef(0);return(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.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}),(0,fe.jsx)(Zx.Slot,{scope:o,children:(0,fe.jsx)($.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:W(n.onScroll,u=>{let c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f?.current&&d){let p=Math.abs(l.current-c.scrollTop);if(p>0){let g=window.innerHeight-Bn*2,m=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),h=Math.max(m,x);if(h<g){let v=h+p,y=Math.min(g,v),w=v-y;d.style.height=y+"px",d.style.bottom==="0px"&&(c.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});BB.displayName=NR;var HB="SelectGroup",[KY,XY]=Yc(HB),UB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,n=Ae();return(0,fe.jsx)(KY,{scope:o,id:n,children:(0,fe.jsx)($.div,{role:"group","aria-labelledby":n,...r,ref:t})})});UB.displayName=HB;var zB="SelectLabel",GB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,n=XY(zB,o);return(0,fe.jsx)($.div,{id:n.id,...r,ref:t})});GB.displayName=zB;var Qx="SelectItem",[YY,WB]=Yc(Qx),jB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,value:r,disabled:n=!1,textValue:a,...i}=e,s=Is(Qx,o),l=Ps(Qx,o),u=s.value===r,[c,d]=Z.useState(a??""),[f,p]=Z.useState(!1),g=de(t,v=>l.itemRefCallback?.(v,r,n)),m=Ae(),x=Z.useRef("touch"),h=()=>{n||(s.onValueChange(r),s.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(0,fe.jsx)(YY,{scope:o,value:r,disabled:n,textId:m,isSelected:u,onItemTextChange:Z.useCallback(v=>{d(y=>y||(v?.textContent??"").trim())},[]),children:(0,fe.jsx)(Zx.ItemSlot,{scope:o,value:r,disabled:n,textValue:c,children:(0,fe.jsx)($.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...i,ref:g,onFocus:W(i.onFocus,()=>p(!0)),onBlur:W(i.onBlur,()=>p(!1)),onClick:W(i.onClick,()=>{x.current!=="mouse"&&h()}),onPointerUp:W(i.onPointerUp,()=>{x.current==="mouse"&&h()}),onPointerDown:W(i.onPointerDown,v=>{x.current=v.pointerType}),onPointerMove:W(i.onPointerMove,v=>{x.current=v.pointerType,n?l.onItemLeave?.():x.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:W(i.onPointerLeave,v=>{v.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:W(i.onKeyDown,v=>{l.searchRef?.current!==""&&v.key===" "||(FY.includes(v.key)&&h(),v.key===" "&&v.preventDefault())})})})})});jB.displayName=Qx;var bm="SelectItemText",qB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:n,...a}=e,i=Is(bm,o),s=Ps(bm,o),l=WB(bm,o),u=HY(bm,o),[c,d]=Z.useState(null),f=de(t,h=>d(h),l.onItemTextChange,h=>s.itemTextRefCallback?.(h,l.value,l.disabled)),p=c?.textContent,g=Z.useMemo(()=>(0,fe.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=u;return _e(()=>(m(g),()=>x(g)),[m,x,g]),(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)($.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?VR.createPortal(a.children,i.valueNode):null]})});qB.displayName=bm;var $B="SelectItemIndicator",KB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return WB($B,o).isSelected?(0,fe.jsx)($.span,{"aria-hidden":!0,...r,ref:t}):null});KB.displayName=$B;var OR="SelectScrollUpButton",XB=Z.forwardRef((e,t)=>{let o=Ps(OR,e.__scopeSelect),r=BR(OR,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,r.onScrollButtonChange);return _e(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollTop>0;a(c)};var s=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),n?(0,fe.jsx)(QB,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=o;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});XB.displayName=OR;var FR="SelectScrollDownButton",YB=Z.forwardRef((e,t)=>{let o=Ps(FR,e.__scopeSelect),r=BR(FR,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,r.onScrollButtonChange);return _e(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<c;a(d)};var s=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),n?(0,fe.jsx)(QB,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=o;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});YB.displayName=FR;var QB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,onAutoScroll:r,...n}=e,a=Ps("SelectScrollButton",o),i=Z.useRef(null),s=Jx(o),l=Z.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return Z.useEffect(()=>()=>l(),[l]),_e(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,fe.jsx)($.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:W(n.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:W(n.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:W(n.onPointerLeave,()=>{l()})})}),QY="SelectSeparator",ZB=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return(0,fe.jsx)($.div,{"aria-hidden":!0,...r,ref:t})});ZB.displayName=QY;var _R="SelectArrow",ZY=Z.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,n=ey(o),a=Is(_R,o),i=Ps(_R,o);return a.open&&i.position==="popper"?(0,fe.jsx)(ps,{...n,...r,ref:t}):null});ZY.displayName=_R;var JY="SelectBubbleInput",JB=Z.forwardRef(({__scopeSelect:e,value:t,...o},r)=>{let n=Z.useRef(null),a=de(r,n),i=Ac(t);return Z.useEffect(()=>{let s=n.current;if(!s)return;let l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&c){let d=new Event("change",{bubbles:!0});c.call(s,t),s.dispatchEvent(d)}},[i,t]),(0,fe.jsx)($.select,{...o,style:{...AR,...o.style},ref:a,defaultValue:t})});JB.displayName=JY;function eH(e){return e===""||e===void 0}function tH(e){let t=rt(e),o=Z.useRef(""),r=Z.useRef(0),n=Z.useCallback(i=>{let s=o.current+i;t(s),function l(u){o.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=Z.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return Z.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,n,a]}function oH(e,t,o){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1,i=eQ(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==o));let l=i.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==o?l:void 0}function eQ(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var rH=TB,HR=MB,nH=AB,aH=DB,iH=NB,UR=OB,sH=BB,lH=UB,zR=GB,GR=jB,uH=qB,cH=KB,WR=XB,jR=YB,qR=ZB;var je=R(N()),Qc=rH;Qc.displayName="Select";var oQ=lH,Rm=nH,rQ=K(["flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","focus-visible:outline-none text-foreground"],{variants:{variant:{standard:"border border-input bg-background hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",outline:"border border-input bg-transparent hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",ghost:"border-none bg-muted hover:bg-muted/80 focus-visible:ring-2 focus-visible:ring-primary/30",underline:"border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 bg-transparent hover:border-ring focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary"},size:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4"},state:{none:"",error:"border-error focus-visible:ring-error/30 focus-visible:border-error",success:"border-success focus-visible:ring-success/30 focus-visible:border-success"}},defaultVariants:{variant:"standard",size:"md",state:"none"}}),Zc=Ls.forwardRef(({className:e,children:t,variant:o,size:r,error:n,success:a,loading:i,leftIcon:s,rightIcon:l,...u},c)=>(0,je.jsxs)(HR,{ref:c,className:P(rQ({variant:o,size:r,state:n?"error":a?"success":"none"}),e),...u,disabled:u.disabled||i,"aria-invalid":n?!0:void 0,"data-error":n?!0:void 0,"data-success":a?!0:void 0,"data-loading":i?!0:void 0,children:[(0,je.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,je.jsx)("span",{className:"flex items-center justify-center text-muted-foreground",children:s}),i?(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsx)(Vt,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,je.jsx)("span",{className:"text-muted-foreground",children:"Loading..."})]}):t]}),!i&&(0,je.jsx)(aH,{asChild:!0,children:l?(0,je.jsx)("span",{className:"opacity-60",children:l}):(0,je.jsx)(ra,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));Zc.displayName=HR.displayName;var $R=Ls.forwardRef(({className:e,...t},o)=>(0,je.jsx)(WR,{ref:o,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,je.jsx)(wf,{className:"h-4 w-4"})}));$R.displayName=WR.displayName;var KR=Ls.forwardRef(({className:e,...t},o)=>(0,je.jsx)(jR,{ref:o,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,je.jsx)(ra,{className:"h-4 w-4"})}));KR.displayName=jR.displayName;var Jc=Ls.forwardRef(({className:e,children:t,position:o="popper",side:r="bottom",sideOffset:n=4,align:a="start",...i},s)=>(0,je.jsx)(iH,{children:(0,je.jsxs)(UR,{ref:s,side:r,sideOffset:n,align:a,avoidCollisions:!1,className:P(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-input","bg-background dark:bg-gray-800/80 backdrop-blur-sm text-foreground dark:text-gray-200","shadow-lg dark:shadow-gray-900/20","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=open]:duration-150"],o==="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:o,...i,children:[(0,je.jsx)($R,{}),(0,je.jsx)(sH,{className:P("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,je.jsx)(KR,{})]})}));Jc.displayName=UR.displayName;var dH=Ls.forwardRef(({className:e,...t},o)=>(0,je.jsx)(zR,{ref:o,className:P("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));dH.displayName=zR.displayName;var Ho=Ls.forwardRef(({className:e,children:t,variant:o="default",size:r="md",rightIcon:n,customIndicator:a,...i},s)=>(0,je.jsxs)(GR,{ref:s,className:P("moonui-theme","relative flex w-full cursor-default select-none items-center rounded-sm outline-none","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-150",r==="sm"&&"py-1 pl-7 pr-2 text-xs",r==="md"&&"py-1.5 pl-8 pr-2 text-sm",r==="lg"&&"py-2 pl-9 pr-3 text-base",o==="default"&&"focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",o==="subtle"&&"focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",o==="destructive"&&"text-error dark:text-red-400 focus:bg-error/10 dark:focus:bg-red-900/20 focus:text-error dark:focus:text-red-300",o==="success"&&"text-success dark:text-green-400 focus:bg-success/10 dark:focus:bg-green-900/20 focus:text-success dark:focus:text-green-300",o==="warning"&&"text-warning dark:text-yellow-400 focus:bg-warning/10 dark:focus:bg-yellow-900/20 focus:text-warning dark:focus:text-yellow-300",e),...i,children:[(0,je.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,je.jsx)(cH,{children:a||(0,je.jsx)(vo,{className:"h-4 w-4"})})}),(0,je.jsx)(uH,{children:t}),n&&(0,je.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:n})]}));Ho.displayName=GR.displayName;var fH=Ls.forwardRef(({className:e,...t},o)=>(0,je.jsx)(qR,{ref:o,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));fH.displayName=qR.displayName;var Qt=R(N()),nQ=[{code:"+1",country:"US",flag:"\u{1F1FA}\u{1F1F8}",name:"United States"},{code:"+44",country:"GB",flag:"\u{1F1EC}\u{1F1E7}",name:"United Kingdom"},{code:"+49",country:"DE",flag:"\u{1F1E9}\u{1F1EA}",name:"Germany"},{code:"+33",country:"FR",flag:"\u{1F1EB}\u{1F1F7}",name:"France"},{code:"+39",country:"IT",flag:"\u{1F1EE}\u{1F1F9}",name:"Italy"},{code:"+34",country:"ES",flag:"\u{1F1EA}\u{1F1F8}",name:"Spain"},{code:"+31",country:"NL",flag:"\u{1F1F3}\u{1F1F1}",name:"Netherlands"},{code:"+46",country:"SE",flag:"\u{1F1F8}\u{1F1EA}",name:"Sweden"},{code:"+47",country:"NO",flag:"\u{1F1F3}\u{1F1F4}",name:"Norway"},{code:"+45",country:"DK",flag:"\u{1F1E9}\u{1F1F0}",name:"Denmark"},{code:"+358",country:"FI",flag:"\u{1F1EB}\u{1F1EE}",name:"Finland"},{code:"+48",country:"PL",flag:"\u{1F1F5}\u{1F1F1}",name:"Poland"},{code:"+90",country:"TR",flag:"\u{1F1F9}\u{1F1F7}",name:"Turkey"},{code:"+86",country:"CN",flag:"\u{1F1E8}\u{1F1F3}",name:"China"},{code:"+81",country:"JP",flag:"\u{1F1EF}\u{1F1F5}",name:"Japan"},{code:"+82",country:"KR",flag:"\u{1F1F0}\u{1F1F7}",name:"South Korea"},{code:"+91",country:"IN",flag:"\u{1F1EE}\u{1F1F3}",name:"India"},{code:"+61",country:"AU",flag:"\u{1F1E6}\u{1F1FA}",name:"Australia"},{code:"+64",country:"NZ",flag:"\u{1F1F3}\u{1F1FF}",name:"New Zealand"},{code:"+27",country:"ZA",flag:"\u{1F1FF}\u{1F1E6}",name:"South Africa"},{code:"+55",country:"BR",flag:"\u{1F1E7}\u{1F1F7}",name:"Brazil"},{code:"+52",country:"MX",flag:"\u{1F1F2}\u{1F1FD}",name:"Mexico"},{code:"+54",country:"AR",flag:"\u{1F1E6}\u{1F1F7}",name:"Argentina"},{code:"+20",country:"EG",flag:"\u{1F1EA}\u{1F1EC}",name:"Egypt"},{code:"+966",country:"SA",flag:"\u{1F1F8}\u{1F1E6}",name:"Saudi Arabia"},{code:"+971",country:"AE",flag:"\u{1F1E6}\u{1F1EA}",name:"UAE"}],pH=(e,t)=>{let o=e.replace(/\D/g,"");switch(t){case"+1":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:`(${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,10)}`;case"+44":return o.length<=4?o:o.length<=7?`${o.slice(0,4)} ${o.slice(4)}`:`${o.slice(0,4)} ${o.slice(4,7)} ${o.slice(7,11)}`;case"+90":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:o.length<=9?`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6)}`:`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6,8)} ${o.slice(8,10)}`;default:let r="";for(let n=0;n<o.length;n++)n>0&&n%3===0&&(r+=" "),r+=o[n];return r}},aQ=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},mH=Im.forwardRef(({className:e,value:t="",onChange:o,defaultCountry:r="+1",showIcon:n=!0,showCountrySelect:a=!0,countries:i=nQ,size:s,...l},u)=>{let[c,d]=Im.useState(r),[f,p]=Im.useState(t),g=i.find(v=>v.code===c)||i[0],m=v=>{let y=v.target.value.replace(/\D/g,""),w=aQ(c),C=y.slice(0,w),b=pH(C,c);p(C),o?.(C,c),v.target.value=b},x=v=>{d(v),o?.(f,v)},h=pH(f,c);return(0,Qt.jsxs)("div",{className:P("relative flex gap-2",e),children:[a&&(0,Qt.jsxs)(Qc,{value:c,onValueChange:x,children:[(0,Qt.jsx)(Zc,{className:"w-[120px]",children:(0,Qt.jsx)(Rm,{children:(0,Qt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Qt.jsx)("span",{children:g.flag}),(0,Qt.jsx)("span",{children:g.code})]})})}),(0,Qt.jsx)(Jc,{children:i.map(v=>(0,Qt.jsx)(Ho,{value:v.code,children:(0,Qt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Qt.jsx)("span",{children:v.flag}),(0,Qt.jsx)("span",{children:v.code}),(0,Qt.jsx)("span",{className:"text-muted-foreground",children:v.name})]})},v.code))})]}),(0,Qt.jsxs)("div",{className:"relative flex-1",children:[(0,Qt.jsx)(bo,{ref:u,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:c==="+1"?"(555) 123-4567":"123 456 789",value:h,onChange:m,className:P(n&&"pl-10",e),...l}),n&&(0,Qt.jsx)(Ff,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});mH.displayName="PhoneInput";var ko=R(M());var Ir=R(N()),iQ=K("aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border bg-background text-primary",outline:"border-border bg-transparent text-primary",filled:"border-primary bg-primary/10 text-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"default",size:"default"}}),gH=ko.createContext({}),hH=ko.forwardRef(({className:e,value:t,defaultValue:o,onValueChange:r,disabled:n,name:a,...i},s)=>{let[l,u]=ko.useState(o),c=t!==void 0,d=c?t:l,f=ko.useCallback(p=>{c||u(p),r?.(p)},[c,r]);return(0,Ir.jsx)(gH.Provider,{value:{value:d,onValueChange:f,disabled:n,name:a},children:(0,Ir.jsx)("div",{ref:s,role:"radiogroup",className:P("moonui-theme","grid gap-2",e),...i})})});hH.displayName="RadioGroup";var XR=ko.forwardRef(({className:e,variant:t,size:o,indicator:r,id:n,value:a,disabled:i,...s},l)=>{let u=ko.useContext(gH),c=ko.useId(),d=n||c,f=u.value===a,p=g=>{u.onValueChange&&u.onValueChange(g.target.value),s.onChange&&s.onChange(g)};return(0,Ir.jsxs)("div",{className:"relative flex items-center",children:[(0,Ir.jsx)("input",{type:"radio",id:d,ref:l,value:a,checked:f,disabled:i||u.disabled,name:u.name,onChange:p,className:"peer sr-only",...s}),(0,Ir.jsx)("label",{htmlFor:d,className:P(iQ({variant:t,size:o}),"rounded-full","peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",i&&"cursor-not-allowed opacity-50",e),children:(0,Ir.jsx)("span",{className:P("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(r||(0,Ir.jsx)(tl,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});XR.displayName="RadioGroupItem";var YR=ko.forwardRef(({className:e,htmlFor:t,children:o,disabled:r=!1,...n},a)=>(0,Ir.jsx)("label",{ref:a,htmlFor:t,className:P("text-sm font-medium leading-none ml-2 text-foreground",r&&"cursor-not-allowed opacity-70",e),...n,children:o}));YR.displayName="RadioLabel";var vH=ko.forwardRef(({id:e,label:t,labelClassName:o,...r},n)=>{let a=ko.useId(),i=e||a;return(0,Ir.jsxs)("div",{className:"flex items-center",children:[(0,Ir.jsx)(XR,{ref:n,id:i,...r}),(0,Ir.jsx)(YR,{htmlFor:i,disabled:r.disabled,className:o,children:t})]})});vH.displayName="RadioItemWithLabel";var fi=R(N());function sQ({value:e="",onChange:t,placeholder:o="Start typing...",className:r,disabled:n=!1}){let a=i=>{!n&&t&&t(i.target.value)};return(0,fi.jsxs)("div",{className:P("border border-input rounded-md",r),children:[(0,fi.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,fi.jsxs)("div",{className:"flex gap-1",children:[(0,fi.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Bold (Pro feature)",children:"B"}),(0,fi.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Italic (Pro feature)",children:"I"}),(0,fi.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Underline (Pro feature)",children:"U"})]})}),(0,fi.jsx)("textarea",{value:e,onChange:a,placeholder:o,disabled:n,className:P("w-full min-h-[200px] p-3 resize-none border-0 bg-transparent","focus:outline-none focus:ring-0","disabled:cursor-not-allowed disabled:opacity-50")})]})}var oI=R(M());var se=R(M(),1);var SH=R(M(),1),xQ=R(Aa(),1);var lo=R(M(),1);var yH=R(M(),1);function xH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lQ(...e){return t=>{let o=!1,r=e.map(n=>{let a=xH(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():xH(e[n],null)}}}}function pi(...e){return yH.useCallback(lQ(...e),e)}function CH(e){let t=lo.forwardRef((o,r)=>{let{children:n,...a}=o,i=null,s=!1,l=[];wH(n)&&typeof ty=="function"&&(n=ty(n._payload)),lo.Children.forEach(n,f=>{if(pQ(f)){s=!0;let p=f,g="child"in p.props?p.props.child:p.props.children;wH(g)&&typeof ty=="function"&&(g=ty(g._payload)),i=cQ(p,g),l.push(i?.props?.children)}else l.push(f)}),i?i=lo.cloneElement(i,void 0,l):!s&&lo.Children.count(n)===1&&lo.isValidElement(n)&&(i=n);let u=i?fQ(i):void 0,c=pi(r,u);if(!i){if(n||n===0)throw new Error(s?vQ(e):hQ(e));return n}let d=dQ(a,i.props??{});return i.type!==lo.Fragment&&(d.ref=r?c:u),lo.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var uQ=Symbol.for("radix.slottable");var cQ=(e,t)=>{if("child"in e.props){let o=e.props.child;return lo.isValidElement(o)?lo.cloneElement(o,void 0,e.props.children(o.props.children)):null}return lo.isValidElement(t)?t:null};function dQ(e,t){let o={...t};for(let r in t){let n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function fQ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function pQ(e){return lo.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uQ}var mQ=Symbol.for("react.lazy");function wH(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===mQ&&"_payload"in e&&gQ(e._payload)}function gQ(e){return typeof e=="object"&&e!==null&&"then"in e}var hQ=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,vQ=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ty=lo[" use ".trim().toString()];var bH=R(N(),1),yQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ed=yQ.reduce((e,t)=>{let o=CH(`Primitive.${t}`),r=SH.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,bH.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});var uo=R(M(),1);var RH=R(M(),1),Pm=globalThis?.document?RH.useLayoutEffect:()=>{};var PH=R(M(),1);function wQ(e,t){return PH.useReducer((o,r)=>t[o][r]??o,e)}var td=e=>{let{present:t,children:o}=e,r=CQ(t),n=typeof o=="function"?o({present:r.isPresent}):uo.Children.only(o),a=SQ(r.ref,bQ(n));return typeof o=="function"||r.isPresent?uo.cloneElement(n,{ref:a}):null};td.displayName="Presence";function CQ(e){let[t,o]=uo.useState(),r=uo.useRef(null),n=uo.useRef(e),a=uo.useRef("none"),i=uo.useRef(void 0),s=e?"mounted":"unmounted",[l,u]=wQ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return uo.useEffect(()=>{l==="mounted"?(a.current=i.current??Lm(r.current),i.current=void 0):a.current="none"},[l]),Pm(()=>{let c=r.current,d=n.current;if(d!==e){let p=a.current,g=Lm(c);e?(i.current=g,u("MOUNT")):g==="none"||c?.display==="none"?u("UNMOUNT"):u(d&&p!==g?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,u]),Pm(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=g=>{let x=Lm(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&x&&(u("ANIMATION_END"),!n.current)){let h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=g=>{g.target===t&&(a.current=Lm(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:uo.useCallback(c=>{if(c){let d=getComputedStyle(c);r.current=d,i.current=Lm(d)}else r.current=null;o(c)},[])}}function IH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function SQ(...e){let t=uo.useRef(e);return t.current=e,uo.useCallback(o=>{let r=t.current,n=!1,a=r.map(i=>{let s=IH(i,o);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<a.length;i++){let s=a[i];typeof s=="function"?s():IH(r[i],null)}}},[])}function Lm(e){return e?.animationName||"none"}function bQ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var mi=R(M(),1),LH=R(N(),1);function TH(e,t=[]){let o=[];function r(a,i){let s=mi.createContext(i);s.displayName=a+"Context";let l=o.length;o=[...o,i];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=mi.useMemo(()=>g,Object.values(g));return(0,LH.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f,p={}){let{optional:g=!1}=p,m=f?.[e]?.[l]||s,x=mi.useContext(m);if(x)return x;if(i!==void 0)return i;if(!g)throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=o.map(i=>mi.createContext(i));return function(s){let l=s?.[e]||a;return mi.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[r,RQ(n,...t)]}function RQ(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=r.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return mi.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return o.scopeName=t.scopeName,o}var od=R(M(),1);function Ts(e){let t=od.useRef(e);return od.useEffect(()=>{t.current=e}),od.useMemo(()=>(...o)=>t.current?.(...o),[])}var oy=R(M(),1),IQ=R(N(),1),PQ=oy.createContext(void 0);function kH(e){let t=oy.useContext(PQ);return e||t||"ltr"}function MH(e,[t,o]){return Math.min(o,Math.max(t,e))}var jke=!!(typeof window<"u"&&window.document&&window.document.createElement);function ks(e,t,{checkForDefaultPrevented:o=!0}={}){return function(n){if(e?.(n),o===!1||!n||!n.defaultPrevented)return t?.(n)}}var AH=R(M(),1),Fe=R(N(),1);function LQ(e,t){return AH.useReducer((o,r)=>t[o][r]??o,e)}var QR="ScrollArea",[DH,oMe]=TH(QR),[TQ,Yr]=DH(QR),NH=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,type:r="hover",dir:n,scrollHideDelay:a=600,...i}=e,[s,l]=se.useState(null),[u,c]=se.useState(null),[d,f]=se.useState(null),[p,g]=se.useState(null),[m,x]=se.useState(null),[h,v]=se.useState(0),[y,w]=se.useState(0),[C,b]=se.useState(!1),[S,I]=se.useState(!1),L=pi(t,l),T=kH(n);return(0,Fe.jsx)(TQ,{scope:o,type:r,dir:T,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:b,scrollbarY:m,onScrollbarYChange:x,scrollbarYEnabled:S,onScrollbarYEnabledChange:I,onCornerWidthChange:v,onCornerHeightChange:w,children:(0,Fe.jsx)(ed.div,{dir:T,...i,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":h+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});NH.displayName=QR;var OH="ScrollAreaViewport",FH=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,children:r,nonce:n,...a}=e,i=Yr(OH,o),s=se.useRef(null),l=pi(t,s,i.onViewportChange);return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)(kQ,{nonce:n}),(0,Fe.jsx)(ed.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Fe.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});FH.displayName=OH;var kQ=se.memo(({nonce:e})=>(0,Fe.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,t)=>e.nonce===t.nonce),xa="ScrollAreaScrollbar",ay=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=Yr(xa,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=n,s=e.orientation==="horizontal";return se.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),n.type==="hover"?(0,Fe.jsx)(MQ,{...r,ref:t,forceMount:o}):n.type==="scroll"?(0,Fe.jsx)(EQ,{...r,ref:t,forceMount:o}):n.type==="auto"?(0,Fe.jsx)(_H,{...r,ref:t,forceMount:o}):n.type==="always"?(0,Fe.jsx)(ZR,{...r,ref:t,"data-state":"visible"}):null});ay.displayName=xa;var MQ=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=Yr(xa,e.__scopeScrollArea),[a,i]=se.useState(!1);return se.useEffect(()=>{let s=n.scrollArea,l=0;if(s){let u=()=>{window.clearTimeout(l),i(!0)},c=()=>{l=window.setTimeout(()=>i(!1),n.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",c)}}},[n.scrollArea,n.scrollHideDelay]),(0,Fe.jsx)(td,{present:o||a,children:(0,Fe.jsx)(_H,{"data-state":a?"visible":"hidden",...r,ref:t})})}),EQ=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=Yr(xa,e.__scopeScrollArea),a=e.orientation==="horizontal",i=sy(()=>l("SCROLL_END"),100),[s,l]=LQ("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return se.useEffect(()=>{if(s==="idle"){let u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,n.scrollHideDelay,l]),se.useEffect(()=>{let u=n.viewport,c=a?"scrollLeft":"scrollTop";if(u){let d=u[c],f=()=>{let p=u[c];d!==p&&(l("SCROLL"),i()),d=p};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[n.viewport,a,l,i]),(0,Fe.jsx)(td,{present:o||s!=="hidden",children:(0,Fe.jsx)(ZR,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ks(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ks(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),_H=se.forwardRef((e,t)=>{let o=Yr(xa,e.__scopeScrollArea),{forceMount:r,...n}=e,[a,i]=se.useState(!1),s=e.orientation==="horizontal",l=sy(()=>{if(o.viewport){let u=o.viewport.offsetWidth<o.viewport.scrollWidth,c=o.viewport.offsetHeight<o.viewport.scrollHeight;i(s?u:c)}},10);return rd(o.viewport,l),rd(o.content,l),(0,Fe.jsx)(td,{present:r||a,children:(0,Fe.jsx)(ZR,{"data-state":a?"visible":"hidden",...n,ref:t})})}),ZR=se.forwardRef((e,t)=>{let{orientation:o="vertical",...r}=e,n=Yr(xa,e.__scopeScrollArea),a=se.useRef(null),i=se.useRef(0),[s,l]=se.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=UH(s.viewport,s.content),c={...r,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function d(f,p){return _Q(f,i.current,s,p)}return o==="horizontal"?(0,Fe.jsx)(AQ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollLeft,p=EH(f,s,n.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{n.viewport&&(n.viewport.scrollLeft=f)},onDragScroll:f=>{n.viewport&&(n.viewport.scrollLeft=d(f,n.dir))}}):o==="vertical"?(0,Fe.jsx)(DQ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollTop,p=EH(f,s);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{n.viewport&&(n.viewport.scrollTop=f)},onDragScroll:f=>{n.viewport&&(n.viewport.scrollTop=d(f))}}):null}),AQ=se.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...n}=e,a=Yr(xa,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=pi(t,l,a.onScrollbarXChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Fe.jsx)(BH,{"data-orientation":"horizontal",...n,ref:u,sizes:o,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":iy(o)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(a.viewport){let f=a.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),GH(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:ny(i.paddingLeft),paddingEnd:ny(i.paddingRight)}})}})}),DQ=se.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...n}=e,a=Yr(xa,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=pi(t,l,a.onScrollbarYChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Fe.jsx)(BH,{"data-orientation":"vertical",...n,ref:u,sizes:o,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":iy(o)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(a.viewport){let f=a.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),GH(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:ny(i.paddingTop),paddingEnd:ny(i.paddingBottom)}})}})}),[NQ,VH]=DH(xa),BH=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,sizes:r,hasThumb:n,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=Yr(xa,o),[g,m]=se.useState(null),x=pi(t,m),h=se.useRef(null),v=se.useRef(""),y=p.viewport,w=r.content-r.viewport,C=Ts(c),b=Ts(l),S=sy(d,10);function I(L){if(h.current){let T=L.clientX-h.current.left,k=L.clientY-h.current.top;u({x:T,y:k})}}return se.useEffect(()=>{let L=T=>{let k=T.target;g?.contains(k)&&C(T,w)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[y,g,w,C]),se.useEffect(b,[r,b]),rd(g,S),rd(p.content,S),(0,Fe.jsx)(NQ,{scope:o,scrollbar:g,hasThumb:n,onThumbChange:Ts(a),onThumbPointerUp:Ts(i),onThumbPositionChange:b,onThumbPointerDown:Ts(s),children:(0,Fe.jsx)(ed.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:ks(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),h.current=g.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),I(L))}),onPointerMove:ks(e.onPointerMove,I),onPointerUp:ks(e.onPointerUp,L=>{let T=L.target;T.hasPointerCapture(L.pointerId)&&T.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=""),h.current=null})})})}),ry="ScrollAreaThumb",JR=se.forwardRef((e,t)=>{let{forceMount:o,...r}=e,n=VH(ry,e.__scopeScrollArea);return(0,Fe.jsx)(td,{present:o||n.hasThumb,children:(0,Fe.jsx)(OQ,{ref:t,...r})})}),OQ=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,style:r,...n}=e,a=Yr(ry,o),i=VH(ry,o),{onThumbPositionChange:s}=i,l=pi(t,i.onThumbChange),u=se.useRef(void 0),c=sy(()=>{u.current&&(u.current(),u.current=void 0)},100);return se.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(c(),!u.current){let p=VQ(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,c,s]),(0,Fe.jsx)(ed.div,{"data-state":i.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ks(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),g=d.clientX-p.left,m=d.clientY-p.top;i.onThumbPointerDown({x:g,y:m})}),onPointerUp:ks(e.onPointerUp,i.onThumbPointerUp)})});JR.displayName=ry;var eI="ScrollAreaCorner",HH=se.forwardRef((e,t)=>{let o=Yr(eI,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?(0,Fe.jsx)(FQ,{...e,ref:t}):null});HH.displayName=eI;var FQ=se.forwardRef((e,t)=>{let{__scopeScrollArea:o,...r}=e,n=Yr(eI,o),[a,i]=se.useState(0),[s,l]=se.useState(0),u=!!(a&&s),{onCornerWidthChange:c,onCornerHeightChange:d}=n;return rd(n.scrollbarX,()=>{let f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),l(f)}),rd(n.scrollbarY,()=>{let f=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(f),i(f)}),se.useEffect(()=>()=>{c(0),d(0)},[c,d]),u?(0,Fe.jsx)(ed.div,{...r,ref:t,style:{width:a,height:s,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ny(e){return e?parseInt(e,10):0}function UH(e,t){let o=e/t;return isNaN(o)?0:o}function iy(e){let t=UH(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function _Q(e,t,o,r="ltr"){let n=iy(o),a=n/2,i=t||a,s=n-i,l=o.scrollbar.paddingStart+i,u=o.scrollbar.size-o.scrollbar.paddingEnd-s,c=o.content-o.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return zH([l,u],d)(e)}function EH(e,t,o="ltr"){let r=iy(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,i=t.content-t.viewport,s=a-r,l=o==="ltr"?[0,i]:[i*-1,0],u=MH(e,l);return zH([0,i],[0,s])(u)}function zH(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function GH(e,t){return e>0&&e<t}var VQ=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return function n(){let a={left:e.scrollLeft,top:e.scrollTop},i=o.left!==a.left,s=o.top!==a.top;(i||s)&&t(),o=a,r=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(r)};function sy(e,t){let o=Ts(e),r=se.useRef(0);return se.useEffect(()=>()=>window.clearTimeout(r.current),[]),se.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function rd(e,t){let o=Ts(t);Pm(()=>{let r=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return n.observe(e),()=>{window.cancelAnimationFrame(r),n.unobserve(e)}}},[e,o])}var tI=NH,WH=FH;var jH=HH;var Ms=R(N()),qH=oI.forwardRef(({className:e,children:t,...o},r)=>(0,Ms.jsxs)(tI,{ref:r,className:P("relative overflow-hidden",e),...o,children:[(0,Ms.jsx)(WH,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Ms.jsx)(rI,{}),(0,Ms.jsx)(jH,{})]}));qH.displayName=tI.displayName;var rI=oI.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,Ms.jsx)(ay,{ref:r,orientation:t,className:P("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,Ms.jsx)(JR,{className:"relative flex-1 rounded-full bg-border"})}));rI.displayName=ay.displayName;var Hn=R(M());var Tm=R(N()),$H=(e,t)=>{let o={up:{hidden:{opacity:0,y:t},visible:{opacity:1,y:0}},down:{hidden:{opacity:0,y:-t},visible:{opacity:1,y:0}},left:{hidden:{opacity:0,x:t},visible:{opacity:1,x:0}},right:{hidden:{opacity:0,x:-t},visible:{opacity:1,x:0}},fade:{hidden:{opacity:0},visible:{opacity:1}},scale:{hidden:{opacity:0,scale:.85},visible:{opacity:1,scale:1}},blur:{hidden:{opacity:0,filter:"blur(10px)"},visible:{opacity:1,filter:"blur(0px)"}}};return o[e]||o.up},KH={duration:.5,ease:[.25,.46,.45,.94]},XH=Hn.forwardRef(({children:e,direction:t="up",delay:o=0,duration:r=.5,distance:n=50,threshold:a=.3,once:i=!0,triggerOnce:s,stagger:l=0,className:u,variants:c,animate:d=!0,style:f,id:p,viewport:g},m)=>{let x=s!==void 0?s:i,h=Hn.useMemo(()=>c||$H(t,n),[t,n,c]),v=Hn.useMemo(()=>({...KH,duration:r,delay:o+l}),[r,o,l]),y=Hn.useMemo(()=>({once:x,amount:a,...g}),[x,a,g]);return d?(0,Tm.jsx)(Be.div,{ref:m,initial:"hidden",whileInView:"visible",viewport:y,variants:h,transition:v,className:P(u),style:f,id:p,children:e}):(0,Tm.jsx)("div",{ref:m,className:u,style:f,id:p,children:e})});XH.displayName="ScrollReveal";var YH=Hn.forwardRef(({children:e,stagger:t=.1,className:o,style:r,id:n,threshold:a=.3,once:i=!0,triggerOnce:s,viewport:l},u)=>{let c=s!==void 0?s:i,d=Hn.useMemo(()=>({once:c,amount:a,...l}),[c,a,l]),f={hidden:{},visible:{transition:{staggerChildren:t,delayChildren:0}}};return(0,Tm.jsx)(Be.div,{ref:u,initial:"hidden",whileInView:"visible",viewport:d,variants:f,className:P(o),style:r,id:n,children:e})});YH.displayName="ScrollRevealContainer";var QH=Hn.forwardRef(({children:e,direction:t="up",duration:o=.5,distance:r=50,className:n,variants:a,style:i,id:s},l)=>{let u=Hn.useMemo(()=>a||$H(t,r),[t,r,a]),c=Hn.useMemo(()=>({...KH,duration:o}),[o]);return(0,Tm.jsx)(Be.div,{ref:l,variants:u,transition:c,className:P(n),style:i,id:s,children:e})});QH.displayName="ScrollRevealItem";var oU=R(M());var JH=R(M(),1);var eU=R(N(),1),HQ="Separator",ZH="horizontal",UQ=["horizontal","vertical"],tU=JH.forwardRef((e,t)=>{let{decorative:o,orientation:r=ZH,...n}=e,a=zQ(r)?r:ZH,s=o?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,eU.jsx)($.div,{"data-orientation":a,...s,...n,ref:t})});tU.displayName=HQ;function zQ(e){return UQ.includes(e)}var nI=tU;var rU=R(N()),WQ=K("shrink-0 bg-border",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"},variant:{default:"bg-border",dashed:"border-dashed border-border bg-transparent",dotted:"border-dotted border-border bg-transparent",gradient:"bg-gradient-to-r from-transparent via-border to-transparent"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",variant:"dashed",className:"border-t h-0"},{orientation:"vertical",variant:"dashed",className:"border-l w-0"},{orientation:"horizontal",variant:"dotted",className:"border-t h-0"},{orientation:"vertical",variant:"dotted",className:"border-l w-0"},{orientation:"horizontal",size:"sm",variant:["dashed","dotted"],className:"border-t-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["dashed","dotted"],className:"border-t-2"},{orientation:"vertical",size:"sm",variant:["dashed","dotted"],className:"border-l-[0.5px]"},{orientation:"vertical",size:"lg",variant:["dashed","dotted"],className:"border-l-2"},{orientation:"horizontal",size:"sm",variant:["default","gradient"],className:"h-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["default","gradient"],className:"h-[2px]"},{orientation:"vertical",size:"sm",variant:["default","gradient"],className:"w-[0.5px]"},{orientation:"vertical",size:"lg",variant:["default","gradient"],className:"w-[2px]"}],defaultVariants:{orientation:"horizontal",variant:"default",size:"md"}}),Qr=oU.forwardRef(({className:e,orientation:t="horizontal",variant:o="default",size:r="md",decorative:n=!0,...a},i)=>(0,rU.jsx)(nI,{ref:i,decorative:n,orientation:t||void 0,className:P(WQ({orientation:t,variant:o,size:r}),e),...a}));Qr.displayName=nI.displayName;var Je=R(M());var LU=R(M());var IU=R(M(),1);var jQ=Object.defineProperty,nd=(e,t)=>jQ(e,"name",{value:t,configurable:!0}),nU=!!(typeof window<"u"&&window.document&&window.document.createElement);function iI(e,t,{checkForDefaultPrevented:o=!0}={}){return nd(function(n){if(e?.(n),o===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}nd(iI,"composeEventHandlers");function qQ(e){if(!nU)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}nd(qQ,"getOwnerWindow");function aI(e){if(!nU)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}nd(aI,"getOwnerDocument");function aU(e,t=!1){let{activeElement:o}=aI(e);if(!o?.nodeName)return null;if(iU(o)&&o.contentDocument)return aU(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let n=aI(o).getElementById(r);if(n)return n}}return o}nd(aU,"getActiveElement");function iU(e){return e.tagName==="IFRAME"}nd(iU,"isFrame");var Zr=R(M(),1);var ad=!1;var sU=R(M(),1),ly=globalThis?.document?sU.useLayoutEffect:()=>{};var Un=R(M(),1);var id=R(M(),1),$Q=Object.defineProperty,KQ=(e,t)=>$Q(e,"name",{value:t,configurable:!0}),lU=id[" useEffectEvent ".trim().toString()],uU=id[" useInsertionEffect ".trim().toString()];function sI(e){if(typeof lU=="function")return lU(e);let t=id.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof uU=="function"?uU(()=>{t.current=e}):ly(()=>{t.current=e}),id.useMemo(()=>(...o)=>t.current?.(...o),[])}KQ(sI,"useEffectEvent");var XQ=Object.defineProperty,km=(e,t)=>XQ(e,"name",{value:t,configurable:!0}),YQ=Zr[" useInsertionEffect ".trim().toString()]||ly;function lI({prop:e,defaultProp:t,onChange:o=km(()=>{},"onChange"),caller:r}){let[n,a,i]=dU({defaultProp:t,onChange:o}),s=e!==void 0,l=s?e:n;if(ad){let c=Zr.useRef(e!==void 0);Zr.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),c.current=s},[s,r])}let u=Zr.useCallback(c=>{if(s){let d=fU(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}km(lI,"useControllableState");function dU({defaultProp:e,onChange:t}){let[o,r]=Zr.useState(e),n=Zr.useRef(o),a=Zr.useRef(t);return YQ(()=>{a.current=t},[t]),Zr.useEffect(()=>{n.current!==o&&(a.current?.(o),n.current=o)},[o,n]),[o,r,a]}km(dU,"useUncontrolledState");function fU(e){return typeof e=="function"}km(fU,"isFunction");var cU=Symbol("RADIX:SYNC_STATE");function QQ(e,t,o,r){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=sI(i);if(ad){let x=Un.useRef(n!==void 0);Un.useEffect(()=>{let h=x.current;h!==l&&console.warn(`${s} 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.`),x.current=l},[l,s])}let c=[{...o,state:a}];r&&c.push(r);let[d,f]=Un.useReducer((x,h)=>{if(h.type===cU)return{...x,state:h.state};let v=e(x,h);return l&&!Object.is(v.state,x.state)&&u(v.state),v},...c),p=d.state,g=Un.useRef(p);Un.useEffect(()=>{g.current!==p&&(g.current=p,l||u(p))},[p,g,l]);let m=Un.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return Un.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:cU,state:n})},[n,d.state,l]),[m,f]}km(QQ,"useControllableStateReducer");var CU=R(M(),1),SU=R(Aa(),1);var It=R(M(),1);var pU=R(M(),1),ZQ=Object.defineProperty,cI=(e,t)=>ZQ(e,"name",{value:t,configurable:!0});function uI(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}cI(uI,"setRef");function mU(...e){return t=>{let o=!1,r=e.map(n=>{let a=uI(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():uI(e[n],null)}}}}cI(mU,"composeRefs");function dI(...e){return pU.useCallback(mU(...e),e)}cI(dI,"useComposedRefs");var tZ=R(N(),1),JQ=Object.defineProperty,Jr=(e,t)=>JQ(e,"name",{value:t,configurable:!0}),eZ=Jr((e,t)=>{let o={...t};for(let r in t){let n=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(n&&a){let s=typeof n=="function",l=typeof a=="function";ad&&(!s||!l)&&console.warn(`Slot: Expected a function for ${r}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),o[r]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(o[r]=n);else r==="style"?o[r]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:r==="className"?o[r]=[n,a].filter(Boolean).join(" "):r==="aria-describedby"&&(o[r]=gU(a,n))}return{...e,...o}},"mergeProps");function gU(...e){let t=new Set;for(let o of e)if(typeof o=="string")for(let r of String(o).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}Jr(gU,"concatAriaDescribedby");var hU=It.createContext(eZ);hU.displayName="SlotContext";function pI(e){let t=It.forwardRef((o,r)=>{let n=It.useContext(hU),{children:a,mergeProps:i=n,...s}=o,l=null,u=!1,c=[];fI(a)&&typeof uy=="function"&&(a=uy(a._payload)),It.Children.forEach(a,g=>{if(yU(g)){u=!0;let m=g,x="child"in m.props?m.props.child:m.props.children;fI(x)&&typeof uy=="function"&&(x=uy(x._payload)),l=rZ(m,x),c.push(l?.props?.children)}else c.push(g)}),l?l=It.cloneElement(l,void 0,c):!u&&It.Children.count(a)===1&&It.isValidElement(a)&&(l=a);let d=l?xU(l):void 0,f=dI(r,d);if(!l){if(a||a===0)throw new Error(u?iZ(e):aZ(e));return a}let p=i(s,l.props??{});return l.type!==It.Fragment&&(p.ref=r?f:d),It.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}Jr(pI,"createSlot");var vU=Symbol.for("radix.slottable");function oZ(e){let t=Jr(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=vU,t}Jr(oZ,"createSlottable");var rZ=Jr((e,t)=>{if("child"in e.props){let o=e.props.child;return It.isValidElement(o)?It.cloneElement(o,void 0,e.props.children(o.props.children)):null}return It.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function xU(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}Jr(xU,"getElementRef");function yU(e){return It.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vU}Jr(yU,"isSlottable");var nZ=Symbol.for("react.lazy");function fI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===nZ&&"_payload"in e&&wU(e._payload)}Jr(fI,"isLazyComponent");function wU(e){return typeof e=="object"&&e!==null&&"then"in e}Jr(wU,"isPromiseLike");var aZ=Jr(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),iZ=Jr(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),uy=It[" use ".trim().toString()];var bU=R(N(),1),sZ=Object.defineProperty,lZ=(e,t)=>sZ(e,"name",{value:t,configurable:!0}),uZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],RU=uZ.reduce((e,t)=>{let o=pI(`Primitive.${t}`),r=CU.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,bU.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cZ(e,t){e&&SU.flushSync(()=>e.dispatchEvent(t))}lZ(cZ,"dispatchDiscreteCustomEvent");var PU=R(N(),1),dZ=Object.defineProperty,fZ=(e,t)=>dZ(e,"name",{value:t,configurable:!0}),pZ="Toggle",Mm=IU.forwardRef(fZ(function(t,o){let{pressed:r,defaultPressed:n,onPressedChange:a,...i}=t,[s,l]=lI({prop:r,onChange:a,defaultProp:n??!1,caller:pZ});return(0,PU.jsx)(RU.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:o,onClick:iI(t.onClick,()=>{t.disabled||l(!s)})})},"Toggle"));var TU=R(N()),cy=K("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),dy=LU.forwardRef(({className:e,variant:t,size:o,...r},n)=>(0,TU.jsx)(Mm,{ref:n,className:P("moonui-theme",cy({variant:t,size:o,className:e})),...r}));dy.displayName=Mm.displayName;var my=R(M());var Re=R(M(),1);var At=R(N(),1),[fy,KMe]=Oe("Tooltip",[$r]),py=$r(),kU="TooltipProvider",gZ=700,mI="tooltip.open",[hZ,hI]=fy(kU),MU=e=>{let{__scopeTooltip:t,delayDuration:o=gZ,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:a}=e,i=Re.useRef(!0),s=Re.useRef(!1),l=Re.useRef(0);return Re.useEffect(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),(0,At.jsx)(hZ,{scope:t,isOpenDelayedRef:i,delayDuration:o,onOpen:Re.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:Re.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:Re.useCallback(u=>{s.current=u},[]),disableHoverableContent:n,children:a})};MU.displayName=kU;var Em="Tooltip",[vZ,Am]=fy(Em),EU=e=>{let{__scopeTooltip:t,children:o,open:r,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=hI(Em,e.__scopeTooltip),u=py(t),[c,d]=Re.useState(null),f=Ae(),p=Re.useRef(0),g=i??l.disableHoverableContent,m=s??l.delayDuration,x=Re.useRef(!1),[h,v]=qe({prop:r,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(mI))):l.onClose(),a?.(S)},caller:Em}),y=Re.useMemo(()=>h?x.current?"delayed-open":"instant-open":"closed",[h]),w=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,v(!0)},[v]),C=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),b=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,v(!0),p.current=0},m)},[m,v]);return Re.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,At.jsx)(Ja,{...u,children:(0,At.jsx)(vZ,{scope:t,contentId:f,open:h,stateAttribute:y,trigger:c,onTriggerChange:d,onTriggerEnter:Re.useCallback(()=>{l.isOpenDelayedRef.current?b():w()},[l.isOpenDelayedRef,b,w]),onTriggerLeave:Re.useCallback(()=>{g?C():(window.clearTimeout(p.current),p.current=0)},[C,g]),onOpen:w,onClose:C,disableHoverableContent:g,children:o})})};EU.displayName=Em;var gI="TooltipTrigger",AU=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,n=Am(gI,o),a=hI(gI,o),i=py(o),s=Re.useRef(null),l=de(t,s,n.onTriggerChange),u=Re.useRef(!1),c=Re.useRef(!1),d=Re.useCallback(()=>u.current=!1,[]);return Re.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,At.jsx)(ei,{asChild:!0,...i,children:(0,At.jsx)($.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:W(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:W(e.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:W(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:W(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:W(e.onBlur,n.onClose),onClick:W(e.onClick,n.onClose)})})});AU.displayName=gI;var vI="TooltipPortal",[xZ,yZ]=fy(vI,{forceMount:void 0}),wZ=e=>{let{__scopeTooltip:t,forceMount:o,children:r,container:n}=e,a=Am(vI,t);return(0,At.jsx)(xZ,{scope:t,forceMount:o,children:(0,At.jsx)(st,{present:o||a.open,children:(0,At.jsx)(Sr,{asChild:!0,container:n,children:r})})})};wZ.displayName=vI;var sd="TooltipContent",DU=Re.forwardRef((e,t)=>{let o=yZ(sd,e.__scopeTooltip),{forceMount:r=o.forceMount,side:n="top",...a}=e,i=Am(sd,e.__scopeTooltip);return(0,At.jsx)(st,{present:r||i.open,children:i.disableHoverableContent?(0,At.jsx)(NU,{side:n,...a,ref:t}):(0,At.jsx)(CZ,{side:n,...a,ref:t})})}),CZ=Re.forwardRef((e,t)=>{let o=Am(sd,e.__scopeTooltip),r=hI(sd,e.__scopeTooltip),n=Re.useRef(null),a=de(t,n),[i,s]=Re.useState(null),{trigger:l,onClose:u}=o,c=n.current,{onPointerInTransitChange:d}=r,f=Re.useCallback(()=>{s(null),d(!1)},[d]),p=Re.useCallback((g,m)=>{let x=g.currentTarget,h={x:g.clientX,y:g.clientY},v=IZ(h,x.getBoundingClientRect()),y=PZ(h,v),w=LZ(m.getBoundingClientRect()),C=kZ([...y,...w]);s(C),d(!0)},[d]);return Re.useEffect(()=>()=>f(),[f]),Re.useEffect(()=>{if(l&&c){let g=x=>p(x,c),m=x=>p(x,l);return l.addEventListener("pointerleave",g),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",m)}}},[l,c,p,f]),Re.useEffect(()=>{if(i){let g=m=>{let x=m.target,h={x:m.clientX,y:m.clientY},v=l?.contains(x)||c?.contains(x),y=!TZ(h,i);v?f():y&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,c,i,u,f]),(0,At.jsx)(NU,{...e,ref:a})}),[SZ,bZ]=fy(Em,{isInside:!1}),RZ=yP("TooltipContent"),NU=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,children:r,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Am(sd,o),u=py(o),{onClose:c}=l;return Re.useEffect(()=>(document.addEventListener(mI,c),()=>document.removeEventListener(mI,c)),[c]),Re.useEffect(()=>{if(l.trigger){let d=f=>{f.target?.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),(0,At.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,At.jsxs)(fs,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.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:[(0,At.jsx)(RZ,{children:r}),(0,At.jsx)(SZ,{scope:o,isInside:!0,children:(0,At.jsx)(LB,{id:l.contentId,role:"tooltip",children:n||r})})]})})});DU.displayName=sd;var OU="TooltipArrow",FU=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,n=py(o);return bZ(OU,o).isInside?null:(0,At.jsx)(ps,{...n,...r,ref:t})});FU.displayName=OU;function IZ(e,t){let o=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(o,r,n,a)){case a:return"left";case n:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function PZ(e,t,o=5){let r=[];switch(t){case"top":r.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":r.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":r.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":r.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return r}function LZ(e){let{top:t,right:o,bottom:r,left:n}=e;return[{x:n,y:t},{x:o,y:t},{x:o,y:r},{x:n,y:r}]}function TZ(e,t){let{x:o,y:r}=e,n=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],u=s.x,c=s.y,d=l.x,f=l.y;c>r!=f>r&&o<(d-u)*(r-c)/(f-c)+u&&(n=!n)}return n}function kZ(e){let t=e.slice();return t.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),MZ(t)}function MZ(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let n=e[r];for(;t.length>=2;){let a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}t.pop();let o=[];for(let r=e.length-1;r>=0;r--){let n=e[r];for(;o.length>=2;){let a=o[o.length-1],i=o[o.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))o.pop();else break}o.push(n)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var _U=MU,VU=EU,BU=AU;var xI=DU,yI=FU;var Es=R(N()),wI=_U,AZ=K("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",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500 text-white border-green-600",warning:"bg-yellow-500 text-white border-yellow-600",destructive:"bg-destructive text-destructive-foreground",info:"bg-blue-500 text-white border-blue-600"},size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{variant:"default",size:"md"}}),gy=VU,hy=BU,HU=my.forwardRef(({className:e,...t},o)=>(0,Es.jsx)(yI,{ref:o,className:P("moonui-theme","fill-current",e),...t}));HU.displayName=yI.displayName;var Dm=my.forwardRef(({className:e,variant:t,size:o,showArrow:r=!1,sideOffset:n=4,...a},i)=>(0,Es.jsxs)(xI,{ref:i,sideOffset:n,className:P("moonui-theme",AZ({variant:t,size:o}),e),...a,children:[a.children,r&&(0,Es.jsx)(HU,{})]}));Dm.displayName=xI.displayName;var DZ=my.forwardRef(({children:e,content:t,variant:o="default",size:r="md",side:n="top",align:a="center",delayDuration:i=400,sideOffset:s=4,showArrow:l=!1,className:u,open:c,defaultOpen:d,onOpenChange:f,...p},g)=>(0,Es.jsxs)(gy,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,Es.jsx)(hy,{asChild:!0,children:e}),(0,Es.jsx)(Dm,{ref:g,side:n,align:a,variant:o,size:r,sideOffset:s,showArrow:l,className:u,...p,children:t})]}));DZ.displayName="SimpleTooltip";var G=R(N()),Wt=({icon:e,tooltip:t,active:o,onClick:r,disabled:n})=>(0,G.jsxs)(gy,{children:[(0,G.jsx)(hy,{asChild:!0,children:(0,G.jsx)(dy,{pressed:o,onPressedChange:()=>r(),disabled:n,"aria-label":t,className:"h-8 w-8 p-0",children:e})}),(0,G.jsx)(Dm,{children:(0,G.jsx)("p",{children:t})})]}),NZ=({onColorSelect:e})=>(0,G.jsx)("div",{className:"grid grid-cols-4 gap-1 p-2",children:["#000000","#374151","#6B7280","#9CA3AF","#EF4444","#F59E0B","#EAB308","#22C55E","#3B82F6","#6366F1","#8B5CF6","#EC4899"].map(o=>(0,G.jsx)("button",{type:"button","aria-label":`Select color ${o}`,className:"w-6 h-6 rounded border-2 border-border hover:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",style:{backgroundColor:o},onClick:()=>e(o)},o))}),UU=Je.default.forwardRef(({value:e="",onChange:t,placeholder:o="Start writing...",disabled:r=!1,className:n,minHeight:a=200,maxHeight:i=500,showToolbar:s=!0,showPreview:l=!0,...u},c)=>{let[d,f]=(0,Je.useState)(e),[p,g]=(0,Je.useState)(!1),[m,x]=(0,Je.useState)(e),[h,v]=(0,Je.useState)(null),y=Je.default.useRef(null),w=Je.default.useRef(null),[C,b]=(0,Je.useState)({bold:!1,italic:!1,underline:!1,strikethrough:!1,alignLeft:!0,alignCenter:!1,alignRight:!1,alignJustify:!1,orderedList:!1,unorderedList:!1,quote:!1,code:!1}),S=(0,Je.useCallback)(A=>{f(A),t?.(A)},[t]),I=(0,Je.useCallback)(()=>{let A=window.getSelection();return A&&A.rangeCount>0?A.getRangeAt(0):null},[]),L=(0,Je.useCallback)(A=>{if(!A)return;let te=window.getSelection();te&&(te.removeAllRanges(),te.addRange(A))},[]),T=(0,Je.useCallback)((A,te)=>{if(r)return;y.current&&y.current.focus();let ae=I();if(document.execCommand(A,!1,te)||console.warn(`Command '${A}' failed to execute`),y.current){let Q=y.current.innerHTML;S(Q)}b({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikethrough:document.queryCommandState("strikeThrough"),alignLeft:document.queryCommandState("justifyLeft"),alignCenter:document.queryCommandState("justifyCenter"),alignRight:document.queryCommandState("justifyRight"),alignJustify:document.queryCommandState("justifyFull"),orderedList:document.queryCommandState("insertOrderedList"),unorderedList:document.queryCommandState("insertUnorderedList"),quote:document.queryCommandState("formatBlock"),code:document.queryCommandState("formatBlock")}),y.current&&y.current.focus()},[r,I,S]),k=(0,Je.useCallback)(A=>{let te=A.currentTarget.innerHTML;S(te)},[S]),E=(0,Je.useCallback)(A=>{if(A.ctrlKey||A.metaKey)switch(A.key){case"b":A.preventDefault(),T("bold");break;case"i":A.preventDefault(),T("italic");break;case"u":A.preventDefault(),T("underline");break;case"z":A.preventDefault(),A.shiftKey?T("redo"):T("undo");break}A.key==="Tab"&&(A.preventDefault(),T("insertHTML"," "))},[T]),_=(0,Je.useCallback)(()=>{let A=prompt("Enter URL:");A&&T("createLink",A)},[T]),D=(0,Je.useCallback)(()=>{let A=prompt("Enter image URL:");A&&T("insertImage",A)},[T]),z=(0,Je.useCallback)(A=>{T("formatBlock",`<h${A}>`)},[T]),F=(0,Je.useCallback)(A=>{let te=window.getSelection();if(te&&te.rangeCount>0){let ae=te.getRangeAt(0),V=document.createElement("span");V.style.color=A;try{ae.surroundContents(V)}catch{T("foreColor",A)}if(y.current){let Q=y.current.innerHTML;S(Q)}}},[T,S]),O=A=>{if(typeof window>"u")return A.replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'");let te=document.createElement("div");return te.innerHTML=A,te.textContent||te.innerText||""};Je.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),Je.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),x(e))},[e,d]);let B=s&&(0,G.jsx)(wI,{children:(0,G.jsxs)(Be.div,{className:"flex items-center gap-1 p-2 border-b bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},children:[!p&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)(yf,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>T("bold"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Mf,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>T("italic"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Hf,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>T("underline"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Bf,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>T("strikeThrough"),disabled:r})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(Qc,{onValueChange:A=>{A.startsWith("h")?z(A.substring(1)):A==="normal"?T("formatBlock","p"):T("fontSize",A)},disabled:r,children:[(0,G.jsx)(Zc,{className:"w-24 h-8",children:(0,G.jsx)(Rm,{placeholder:"Size"})}),(0,G.jsxs)(Jc,{children:[(0,G.jsx)(Ho,{value:"1",children:"Small"}),(0,G.jsx)(Ho,{value:"3",children:"Normal"}),(0,G.jsx)(Ho,{value:"5",children:"Large"}),(0,G.jsx)(Ho,{value:"7",children:"X-Large"}),(0,G.jsx)(Qr,{className:"my-1"}),(0,G.jsx)(Ho,{value:"h1",children:"Heading 1"}),(0,G.jsx)(Ho,{value:"h2",children:"Heading 2"}),(0,G.jsx)(Ho,{value:"h3",children:"Heading 3"}),(0,G.jsx)(Ho,{value:"h4",children:"Heading 4"}),(0,G.jsx)(Ho,{value:"h5",children:"Heading 5"}),(0,G.jsx)(Ho,{value:"h6",children:"Heading 6"})]})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)(gf,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>T("justifyLeft"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(pf,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>T("justifyCenter"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(hf,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>T("justifyRight"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(mf,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>T("justifyFull"),disabled:r})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)(Df,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>T("insertUnorderedList"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Af,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>T("insertOrderedList"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(_f,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>T("formatBlock","blockquote"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Sf,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>T("formatBlock","pre"),disabled:r})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>T("outdent"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>T("indent"),disabled:r})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)(Ef,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:_,disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(rl,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:D,disabled:r})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(oi,{children:[(0,G.jsx)(ri,{asChild:!0,children:(0,G.jsx)(De,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:r,title:"Text Color",children:(0,G.jsx)(zu,{className:"h-3 w-3"})})}),(0,G.jsx)(ha,{className:"w-auto p-0",children:(0,G.jsx)(NZ,{onColorSelect:F})})]}),(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(Wt,{icon:(0,G.jsx)(Uf,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>T("undo"),disabled:r}),(0,G.jsx)(Wt,{icon:(0,G.jsx)(Vf,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>T("redo"),disabled:r})]})]}),l&&(0,G.jsxs)(G.Fragment,{children:[!p&&(0,G.jsx)(Qr,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsx)(Wt,{icon:p?(0,G.jsx)(Qo,{className:"h-3 w-3"}):(0,G.jsx)(ol,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?S(m):x(d),g(!p)},disabled:r})]})]})});return(0,G.jsxs)("div",{ref:c,className:P("border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",r&&"opacity-50 cursor-not-allowed",n),...u,children:[B,(0,G.jsxs)("div",{className:"relative",children:[p?(0,G.jsx)(Be.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-slate-50 dark:bg-zinc-900/95",style:{minHeight:a,maxHeight:i,overflow:"auto"},children:(0,G.jsx)("textarea",{ref:w,value:m,onChange:A=>x(A.target.value),className:"w-full h-full bg-transparent p-4 font-mono text-sm text-gray-900 dark:text-gray-100 resize-none focus:outline-none",style:{minHeight:a-32},disabled:r,placeholder:"HTML source code..."})}):(0,G.jsx)(Be.div,{ref:y,contentEditable:!r,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":o,"aria-disabled":r||void 0,className:P("p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto","bg-background text-foreground","focus:ring-0","[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4","[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3","[&_h3]:text-xl [&_h3]:font-bold [&_h3]:mb-2","[&_h4]:text-lg [&_h4]:font-bold [&_h4]:mb-2","[&_h5]:text-base [&_h5]:font-bold [&_h5]:mb-1","[&_h6]:text-sm [&_h6]:font-bold [&_h6]:mb-1","[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4","[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4","[&_li]:mb-1","[&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-4 [&_blockquote]:italic","[&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto"),style:{minHeight:a,maxHeight:i},onInput:k,onKeyDown:E,"data-placeholder":o,initial:{opacity:0},animate:{opacity:1}}),!d&&!p&&(0,G.jsx)("div",{className:"absolute top-4 left-4 text-muted-foreground pointer-events-none",style:{fontSize:"16px"},children:o})]}),(0,G.jsx)("div",{className:"px-4 py-2 border-t bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm text-xs text-gray-600 dark:text-gray-400",children:(0,G.jsx)(OZ,{content:d})})]})});UU.displayName="SimpleEditor";var OZ=({content:e})=>{let[t,o]=(0,Je.useState)(0);return(0,Je.useEffect)(()=>{o((n=>{let a=document.createElement("div");return a.innerHTML=n,a.textContent||a.innerText||""})(e).length)},[e]),(0,G.jsxs)(G.Fragment,{children:[t," characters"]})};var Nm=R(M());var Zt=R(N()),zU=K("animate-pulse rounded-md",{variants:{variant:{default:"bg-muted",primary:"bg-primary/10",secondary:"bg-secondary/10",accent:"bg-accent"},size:{default:"",sm:"scale-90",lg:"scale-110"},shape:{rect:"rounded-md",circle:"rounded-full",pill:"rounded-full"},animation:{pulse:"animate-pulse",wave:"overflow-hidden relative after:absolute after:inset-0 after:-translate-x-full after:animate-[shimmer_2s_infinite] after:bg-gradient-to-r after:from-transparent after:via-white/10 after:to-transparent dark:after:via-white/5",none:"animate-none"}},defaultVariants:{variant:"default",size:"default",shape:"rect",animation:"pulse"}}),As=Nm.forwardRef(({className:e,variant:t,size:o,shape:r,animation:n,height:a,width:i,isLoaded:s=!1,children:l,fadeInDuration:u=400,motion:c=!1,style:d,...f},p)=>{let{onDrag:g,onDragEnd:m,onDragStart:x,onAnimationStart:h,onAnimationEnd:v,onAnimationIteration:y,...w}=f;if(s&&l)return c?(0,Zt.jsx)(Be.div,{ref:p,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:P("moonui-theme",e),style:{height:a,width:i,...d},...w,children:l}):(0,Zt.jsx)("div",{ref:p,className:P("moonui-theme","animate-fade-in",e),style:{animationDuration:`${u}ms`,height:a,width:i,...d},...f,children:l});let C=c?Be.div:"div";return(0,Zt.jsx)(C,{ref:p,className:P("moonui-theme",zU({variant:t,size:o,shape:r,animation:n}),"relative isolate",e),style:{height:a,width:i,...d},...c?ED:{},...w})});As.displayName="Skeleton";var CI=Nm.forwardRef(({className:e,lines:t=3,lineHeight:o="0.85rem",spacing:r="0.5rem",lastLineWidth:n=80,randomWidths:a=!1,variant:i="default",animation:s="pulse",...l},u)=>(0,Zt.jsx)("div",{ref:u,className:P("moonui-theme","flex flex-col",e),style:{gap:r},...l,children:Array.from({length:t}).map((c,d)=>{let p=d===t-1?n:a?85+d%3*5:100;return(0,Zt.jsx)(As,{variant:i,animation:s,className:"w-full",style:{height:o,width:`${p}%`}},d)})}));CI.displayName="SkeletonText";var SI=Nm.forwardRef(({className:e,size:t="2.5rem",variant:o="default",animation:r="pulse",...n},a)=>(0,Zt.jsx)(As,{ref:a,variant:o,animation:r,shape:"circle",className:P("moonui-theme","shrink-0",e),style:{height:t,width:t},...n}));SI.displayName="SkeletonAvatar";var GU=Nm.forwardRef(({className:e,showHeader:t=!0,contentLines:o=3,showFooter:r=!0,variant:n="default",animation:a="pulse",...i},s)=>(0,Zt.jsxs)("div",{ref:s,className:P("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,Zt.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,Zt.jsx)(SI,{size:"2.5rem",variant:n,animation:a}),(0,Zt.jsxs)("div",{className:"flex-1",children:[(0,Zt.jsx)(As,{variant:n,animation:a,className:"mb-2 h-4 w-1/3"}),(0,Zt.jsx)(As,{variant:n,animation:a,className:"h-3 w-1/4"})]})]}),(0,Zt.jsx)(CI,{lines:o,variant:n,animation:a,className:"mb-4"}),r&&(0,Zt.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,Zt.jsx)(As,{variant:n,animation:a,className:"h-4 w-1/4"}),(0,Zt.jsx)(As,{variant:n,animation:a,className:"h-4 w-1/5"})]})]}));GU.displayName="SkeletonCard";var ld=R(M());var jU=R(N()),WU=ld.forwardRef(({className:e,children:t,onSwipeLeft:o,onSwipeRight:r,threshold:n=100,disabled:a=!1,...i},s)=>{let[l,u]=ld.useState(0),[c,d]=ld.useState(0),[f,p]=ld.useState(!1),g=h=>{a||(u(h.touches[0].clientX),p(!0))},m=h=>{a||!f||d(h.touches[0].clientX)},x=()=>{if(a||!f)return;let h=c-l;Math.abs(h)>n&&(h>0&&r?r():h<0&&o&&o()),p(!1),d(0),u(0)};return(0,jU.jsx)("div",{ref:s,className:P("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:g,onTouchMove:m,onTouchEnd:x,...i,children:t})});WU.displayName="SwipeableCard";var xy=R(M());var zn=R(M(),1);var Ql=R(N(),1),vy="Switch",[FZ,bEe]=Oe(vy),[_Z,VZ]=FZ(vy),qU=zn.forwardRef((e,t)=>{let{__scopeSwitch:o,name:r,checked:n,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,p]=zn.useState(null),g=de(t,y=>p(y)),m=zn.useRef(!1),x=f?c||!!f.closest("form"):!0,[h,v]=qe({prop:n,defaultProp:a??!1,onChange:u,caller:vy});return(0,Ql.jsxs)(_Z,{scope:o,checked:h,disabled:s,children:[(0,Ql.jsx)($.button,{type:"button",role:"switch","aria-checked":h,"aria-required":i,"data-state":YU(h),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:g,onClick:W(e.onClick,y=>{v(w=>!w),x&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})}),x&&(0,Ql.jsx)(XU,{control:f,bubbles:!m.current,name:r,value:l,checked:h,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});qU.displayName=vy;var $U="SwitchThumb",KU=zn.forwardRef((e,t)=>{let{__scopeSwitch:o,...r}=e,n=VZ($U,o);return(0,Ql.jsx)($.span,{"data-state":YU(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t})});KU.displayName=$U;var BZ="SwitchBubbleInput",XU=zn.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...n},a)=>{let i=zn.useRef(null),s=de(i,a),l=Ac(o),u=Dc(t);return zn.useEffect(()=>{let c=i.current;if(!c)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==o&&p){let g=new Event("click",{bubbles:r});p.call(c,o),c.dispatchEvent(g)}},[l,o,r]),(0,Ql.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...n,tabIndex:-1,ref:s,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});XU.displayName=BZ;function YU(e){return e?"checked":"unchecked"}var bI=qU,QU=KU;var ya=R(N()),UZ=K(["peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full","border-2 border-transparent transition-colors","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","data-[state=unchecked]:bg-input","dark:focus-visible:ring-primary/40"],{variants:{size:{sm:"h-4 w-8",md:"h-6 w-11",lg:"h-7 w-14"},variant:{primary:"data-[state=checked]:bg-primary",success:"data-[state=checked]:bg-success",warning:"data-[state=checked]:bg-warning",destructive:"data-[state=checked]:bg-error",secondary:"data-[state=checked]:bg-accent"}},defaultVariants:{size:"md",variant:"primary"}}),zZ=K("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",{variants:{size:{sm:"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",md:"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",lg:"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0"}},defaultVariants:{size:"md"}}),ZU=xy.forwardRef(({className:e,size:t,variant:o,loading:r,leftIcon:n,rightIcon:a,description:i,"aria-describedby":s,...l},u)=>{let c=xy.useId(),d=i?`${c}-description`:void 0,f=[s,d].filter(Boolean).join(" ")||void 0;return(0,ya.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[n&&(0,ya.jsx)("span",{className:"text-muted-foreground",children:n}),(0,ya.jsxs)(bI,{className:P(UZ({size:t,variant:o}),r&&"opacity-80 cursor-wait",e),disabled:r||l.disabled,"aria-describedby":f,...l,ref:u,children:[r?(0,ya.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,ya.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-muted border-t-primary"})}):null,(0,ya.jsx)(QU,{className:P(zZ({size:t}))})]}),a&&(0,ya.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,ya.jsx)("span",{id:d,className:"text-sm text-muted-foreground",children:i})]})});ZU.displayName=bI.displayName;var en=R(M());var wa=R(N()),JU=en.forwardRef(({value:e=[],onChange:t,maxTags:o,variant:r="primary",allowDuplicates:n=!1,delimiter:a=",",placeholder:i="Add tag and press Enter",className:s,disabled:l,...u},c)=>{let[d,f]=en.useState(""),[p,g]=en.useState(""),m=en.useRef(null);en.useImperativeHandle(c,()=>m.current);let x=en.useRef([]),h=en.useId(),v=S=>{if(e.length===0)return;let I=Math.max(0,Math.min(e.length-1,S));x.current[I]?.focus()},y=S=>{S.key==="Enter"||S.key===a?(S.preventDefault(),C()):S.key==="Backspace"&&d===""&&e.length>0?b(e.length-1):S.key==="ArrowLeft"&&d===""&&e.length>0&&(S.preventDefault(),v(e.length-1))},w=S=>I=>{switch(I.key){case"ArrowLeft":I.preventDefault(),v(S-1);break;case"ArrowRight":I.preventDefault(),S>=e.length-1?m.current?.focus():v(S+1);break;case"Home":I.preventDefault(),v(0);break;case"End":I.preventDefault(),v(e.length-1);break;case"Delete":case"Backspace":{I.preventDefault();let L=e.length-1;b(S),requestAnimationFrame(()=>{L>0?v(Math.min(S,L-1)):m.current?.focus()});break}default:break}},C=()=>{let S=d.trim();if(S){if(!n&&e.includes(S)){g("This tag already exists"),setTimeout(()=>g(""),2e3);return}if(o&&e.length>=o){g(`Maximum ${o} tags allowed`),setTimeout(()=>g(""),2e3);return}t([...e,S]),f(""),g("")}},b=S=>{l||t(e.filter((I,L)=>L!==S))};return(0,wa.jsxs)("div",{className:"relative",children:[(0,wa.jsxs)("div",{className:P("flex items-center min-h-[2.5rem] w-full flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",l&&"cursor-not-allowed opacity-50",s),children:[e.map((S,I)=>(0,wa.jsxs)(Zo,{variant:r,className:"gap-1 pr-1.5",children:[(0,wa.jsx)("span",{className:"text-xs",children:S}),!l&&(0,wa.jsx)("button",{ref:L=>{x.current[I]=L},type:"button","aria-label":`Remove ${S}`,onClick:()=>b(I),onKeyDown:w(I),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,wa.jsx)(hr,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},I)),(0,wa.jsx)("input",{ref:m,type:"text",value:d,onChange:S=>f(S.target.value),onKeyDown:y,onBlur:C,disabled:l,placeholder:e.length===0?i:"","aria-label":"Add tag","aria-describedby":p?h:void 0,"aria-invalid":p?!0:void 0,className:P("flex-1 bg-transparent outline-none placeholder:text-muted-foreground","min-w-[120px]",l&&"cursor-not-allowed"),...u})]}),p&&(0,wa.jsx)("p",{id:h,role:"status",className:"mt-1 text-xs text-destructive",children:p})]})});JU.displayName="TagsInput";var Uo=R(M());var Ca=R(N()),GZ=K(["flex w-full rounded-md px-3 py-2 text-sm transition-all duration-200","text-foreground placeholder:text-muted-foreground","disabled:cursor-not-allowed disabled:opacity-50","focus-visible:outline-none dark:text-gray-200","resize-none"],{variants:{variant:{default:"border border-input bg-background dark:bg-gray-800/80 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:shadow-inner dark:shadow-gray-950/10",outline:"border-2 border-input bg-transparent focus-visible:border-primary dark:focus-visible:border-primary/80",ghost:"border-none bg-transparent hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b-2 border-input rounded-none px-0 focus-visible:ring-0 focus-visible:border-primary dark:focus-visible:border-primary/80 bg-transparent dark:bg-transparent"},size:{sm:"min-h-[60px] text-xs",md:"min-h-[80px] text-sm",lg:"min-h-[120px] text-base"},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""}},defaultVariants:{variant:"default",size:"md",isError:!1,isSuccess:!1}}),e3=Uo.forwardRef(({className:e,wrapperClassName:t,messageClassName:o,variant:r,size:n,error:a,success:i,loading:s,autoResize:l=!1,maxHeight:u,characterCount:c=!1,disabled:d,maxLength:f,value:p,defaultValue:g,onChange:m,...x},h)=>{let v=Uo.useId(),y=x.id||v,w=Uo.useRef(null),[C,b]=Uo.useState(p||g||"");Uo.useImperativeHandle(h,()=>w.current);let S=Uo.useCallback(()=>{let D=w.current;if(!D||!l)return;D.style.height="auto";let z=D.scrollHeight;u&&z>u?(D.style.height=`${u}px`,D.style.overflowY="auto"):(D.style.height=`${z}px`,D.style.overflowY="hidden")},[l,u]);Uo.useEffect(()=>{S()},[C,S]),Uo.useEffect(()=>{p!==void 0&&b(p)},[p]);let I=D=>{b(D.target.value),m?.(D)},L=String(C).length,T=c&&(f!==void 0||L>0),k=typeof a=="string"?a:void 0,E=typeof i=="string"?i:void 0,_=k||E;return(0,Ca.jsxs)("div",{className:P("moonui-theme","space-y-1.5 w-full",t),children:[(0,Ca.jsxs)("div",{className:"relative",children:[(0,Ca.jsx)("textarea",{ref:w,className:P(GZ({variant:r,size:n,isError:!!a,isSuccess:!!i}),s&&"pr-10",e),disabled:d||s,value:p,defaultValue:g,onChange:I,maxLength:f,"aria-invalid":!!a||void 0,"aria-describedby":k?`${y}-error`:E?`${y}-success`:void 0,...x}),s&&(0,Ca.jsx)("div",{className:"absolute top-3 right-3 text-gray-500",children:(0,Ca.jsx)(Vt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[_&&(0,Ca.jsx)("p",{className:P("text-xs transition-all",k&&"text-error",E&&"text-success",o),id:k?`${y}-error`:E?`${y}-success`:void 0,children:k||E}),T&&(0,Ca.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[L,f!==void 0&&` / ${f}`]})]})]})});e3.displayName="Textarea";var Gn=R(M());var be=R(M(),1),o3=R(Aa(),1);var Ue=R(N(),1),TI="ToastProvider",[kI,WZ,jZ]=Xn("Toast"),[r3,qEe]=Oe("Toast",[jZ]),[qZ,wy]=r3(TI),n3=e=>{let{__scopeToast:t,label:o="Notification",duration:r=5e3,swipeDirection:n="right",swipeThreshold:a=50,children:i}=e,[s,l]=be.useState(null),[u,c]=be.useState(0),d=be.useRef(!1),f=be.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${TI}\`. Expected non-empty \`string\`.`),(0,Ue.jsx)(kI.Provider,{scope:t,children:(0,Ue.jsx)(qZ,{scope:t,label:o,duration:r,swipeDirection:n,swipeThreshold:a,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:be.useCallback(()=>c(p=>p+1),[]),onToastRemove:be.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};n3.displayName=TI;var a3="ToastViewport",$Z=["F8"],II="toast.viewportPause",PI="toast.viewportResume",i3=be.forwardRef((e,t)=>{let{__scopeToast:o,hotkey:r=$Z,label:n="Notifications ({hotkey})",...a}=e,i=wy(a3,o),s=WZ(o),l=be.useRef(null),u=be.useRef(null),c=be.useRef(null),d=be.useRef(null),f=de(t,d,i.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=i.toastCount>0;be.useEffect(()=>{let x=h=>{r.length!==0&&r.every(y=>h[y]||h.code===y)&&d.current?.focus()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),be.useEffect(()=>{let x=l.current,h=d.current;if(g&&x&&h){let v=()=>{if(!i.isClosePausedRef.current){let b=new CustomEvent(II);h.dispatchEvent(b),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){let b=new CustomEvent(PI);h.dispatchEvent(b),i.isClosePausedRef.current=!1}},w=b=>{!x.contains(b.relatedTarget)&&y()},C=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",v),x.addEventListener("focusout",w),x.addEventListener("pointermove",v),x.addEventListener("pointerleave",C),window.addEventListener("blur",v),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",v),x.removeEventListener("focusout",w),x.removeEventListener("pointermove",v),x.removeEventListener("pointerleave",C),window.removeEventListener("blur",v),window.removeEventListener("focus",y)}}},[g,i.isClosePausedRef]);let m=be.useCallback(({tabbingDirection:x})=>{let v=s().map(y=>{let w=y.ref.current,C=[w,...iJ(w)];return x==="forwards"?C:C.reverse()});return(x==="forwards"?v.reverse():v).flat()},[s]);return be.useEffect(()=>{let x=d.current;if(x){let h=v=>{let y=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!y){let C=document.activeElement,b=v.shiftKey;if(v.target===x&&b){u.current?.focus();return}let L=m({tabbingDirection:b?"backwards":"forwards"}),T=L.findIndex(k=>k===C);RI(L.slice(T+1))?v.preventDefault():b?u.current?.focus():c.current?.focus()}};return x.addEventListener("keydown",h),()=>x.removeEventListener("keydown",h)}},[s,m]),(0,Ue.jsxs)(c2,{ref:l,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&(0,Ue.jsx)(LI,{ref:u,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"forwards"});RI(x)}}),(0,Ue.jsx)(kI.Slot,{scope:o,children:(0,Ue.jsx)($.ol,{tabIndex:-1,...a,ref:f})}),g&&(0,Ue.jsx)(LI,{ref:c,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"backwards"});RI(x)}})]})});i3.displayName=a3;var s3="ToastFocusProxy",LI=be.forwardRef((e,t)=>{let{__scopeToast:o,onFocusFromOutsideViewport:r,...n}=e,a=wy(s3,o);return(0,Ue.jsx)(Sm,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&r()}})});LI.displayName=s3;var Om="Toast",KZ="toast.swipeStart",XZ="toast.swipeMove",YZ="toast.swipeCancel",QZ="toast.swipeEnd",l3=be.forwardRef((e,t)=>{let{forceMount:o,open:r,defaultOpen:n,onOpenChange:a,...i}=e,[s,l]=qe({prop:r,defaultProp:n??!0,onChange:a,caller:Om});return(0,Ue.jsx)(st,{present:o||s,children:(0,Ue.jsx)(eJ,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:rt(e.onPause),onResume:rt(e.onResume),onSwipeStart:W(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:W(e.onSwipeMove,u=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}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=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});l3.displayName=Om;var[ZZ,JZ]=r3(Om,{onClose(){}}),eJ=be.forwardRef((e,t)=>{let{__scopeToast:o,type:r="foreground",duration:n,open:a,onClose:i,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...g}=e,m=wy(Om,o),[x,h]=be.useState(null),v=de(t,D=>h(D)),y=be.useRef(null),w=be.useRef(null),C=n||m.duration,b=be.useRef(0),S=be.useRef(C),I=be.useRef(0),{onToastAdd:L,onToastRemove:T}=m,k=rt(()=>{x?.contains(document.activeElement)&&m.viewport?.focus(),i()}),E=be.useCallback(D=>{!D||D===1/0||(window.clearTimeout(I.current),b.current=new Date().getTime(),I.current=window.setTimeout(k,D))},[k]);be.useEffect(()=>{let D=m.viewport;if(D){let z=()=>{E(S.current),u?.()},F=()=>{let O=new Date().getTime()-b.current;S.current=S.current-O,window.clearTimeout(I.current),l?.()};return D.addEventListener(II,F),D.addEventListener(PI,z),()=>{D.removeEventListener(II,F),D.removeEventListener(PI,z)}}},[m.viewport,C,l,u,E]),be.useEffect(()=>{a&&!m.isClosePausedRef.current&&E(C)},[a,C,m.isClosePausedRef,E]),be.useEffect(()=>(L(),()=>T()),[L,T]);let _=be.useMemo(()=>x?g3(x):null,[x]);return m.viewport?(0,Ue.jsxs)(Ue.Fragment,{children:[_&&(0,Ue.jsx)(tJ,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:_}),(0,Ue.jsx)(ZZ,{scope:o,onClose:k,children:o3.createPortal((0,Ue.jsx)(kI.ItemSlot,{scope:o,children:(0,Ue.jsx)(u2,{asChild:!0,onEscapeKeyDown:W(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||k(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Ue.jsx)($.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:W(e.onKeyDown,D=>{D.key==="Escape"&&(s?.(D.nativeEvent),D.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:W(e.onPointerDown,D=>{D.button===0&&(y.current={x:D.clientX,y:D.clientY})}),onPointerMove:W(e.onPointerMove,D=>{if(!y.current)return;let z=D.clientX-y.current.x,F=D.clientY-y.current.y,O=!!w.current,B=["left","right"].includes(m.swipeDirection),A=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,te=B?A(0,z):0,ae=B?0:A(0,F),V=D.pointerType==="touch"?10:2,Q={x:te,y:ae},oe={originalEvent:D,delta:Q};O?(w.current=Q,yy(XZ,d,oe,{discrete:!1})):t3(Q,m.swipeDirection,V)?(w.current=Q,yy(KZ,c,oe,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(z)>V||Math.abs(F)>V)&&(y.current=null)}),onPointerUp:W(e.onPointerUp,D=>{let z=w.current,F=D.target;if(F.hasPointerCapture(D.pointerId)&&F.releasePointerCapture(D.pointerId),w.current=null,y.current=null,z){let O=D.currentTarget,B={originalEvent:D,delta:z};t3(z,m.swipeDirection,m.swipeThreshold)?yy(QZ,p,B,{discrete:!0}):yy(YZ,f,B,{discrete:!0}),O.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),tJ=e=>{let{__scopeToast:t,children:o,...r}=e,n=wy(Om,t),[a,i]=be.useState(!1),[s,l]=be.useState(!1);return nJ(()=>i(!0)),be.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:(0,Ue.jsx)(Sr,{asChild:!0,children:(0,Ue.jsx)(Sm,{...r,children:a&&(0,Ue.jsxs)(Ue.Fragment,{children:[n.label," ",o]})})})},oJ="ToastTitle",u3=be.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ue.jsx)($.div,{...r,ref:t})});u3.displayName=oJ;var rJ="ToastDescription",c3=be.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ue.jsx)($.div,{...r,ref:t})});c3.displayName=rJ;var d3="ToastAction",f3=be.forwardRef((e,t)=>{let{altText:o,...r}=e;return o.trim()?(0,Ue.jsx)(m3,{altText:o,asChild:!0,children:(0,Ue.jsx)(MI,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${d3}\`. Expected non-empty \`string\`.`),null)});f3.displayName=d3;var p3="ToastClose",MI=be.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e,n=JZ(p3,o);return(0,Ue.jsx)(m3,{asChild:!0,children:(0,Ue.jsx)($.button,{type:"button",...r,ref:t,onClick:W(e.onClick,n.onClose)})})});MI.displayName=p3;var m3=be.forwardRef((e,t)=>{let{__scopeToast:o,altText:r,...n}=e;return(0,Ue.jsx)($.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...n,ref:t})});function g3(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),aJ(r)){let n=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!n)if(a){let i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...g3(r))}}),t}function yy(e,t,o,{discrete:r}){let n=o.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?Nu(n,a):n.dispatchEvent(a)}var t3=(e,t,o=0)=>{let r=Math.abs(e.x),n=Math.abs(e.y),a=r>n;return t==="left"||t==="right"?a&&r>o:!a&&n>o};function nJ(e=()=>{}){let t=rt(e);_e(()=>{let o=0,r=0;return o=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(r)}},[t])}function aJ(e){return e.nodeType===e.ELEMENT_NODE}function iJ(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function RI(e){let t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var h3=n3,EI=i3,AI=l3,DI=u3,NI=c3,OI=f3,FI=MI;var co=R(N()),x3=h3,VI=Gn.forwardRef(({className:e,...t},o)=>(0,co.jsx)(EI,{ref:o,className:P("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}));VI.displayName=EI.displayName;var lJ=K("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm 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",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-900/20 dark:text-green-100",warning:"border-orange-200 bg-orange-50 text-orange-900 dark:border-orange-800 dark:bg-orange-900/20 dark:text-orange-100",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-900/20 dark:text-blue-100"}},defaultVariants:{variant:"default"}}),BI=Gn.forwardRef(({className:e,variant:t,...o},r)=>(0,co.jsx)(AI,{ref:r,className:P("moonui-theme",lJ({variant:t}),e),...o}));BI.displayName=AI.displayName;var y3=Gn.forwardRef(({className:e,...t},o)=>(0,co.jsx)(OI,{ref:o,className:P("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));y3.displayName=OI.displayName;var HI=Gn.forwardRef(({className:e,...t},o)=>(0,co.jsxs)(FI,{ref:o,className:P("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:[(0,co.jsx)(hr,{className:"h-4 w-4"}),(0,co.jsx)("span",{className:"sr-only",children:"Close"})]}));HI.displayName=FI.displayName;var UI=Gn.forwardRef(({className:e,...t},o)=>(0,co.jsx)(DI,{ref:o,className:P("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));UI.displayName=DI.displayName;var zI=Gn.forwardRef(({className:e,...t},o)=>(0,co.jsx)(NI,{ref:o,className:P("moonui-theme","text-sm opacity-90",e),...t}));zI.displayName=NI.displayName;var uJ=5,cJ=1e6,_I=new Map,v3=e=>{if(_I.has(e))return;let t=setTimeout(()=>{_I.delete(e),Fm({type:"REMOVE_TOAST",toastId:e})},cJ);_I.set(e,t)},dJ=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,uJ)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{let{toastId:o}=t;return o?v3(o):e.toasts.forEach(r=>{v3(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===o||o===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};default:return e}},Cy=[],Sy={toasts:[]},fJ=0;function Fm(e){Sy=dJ(Sy,e),Cy.forEach(t=>{t(Sy)})}function w3({...e}){let t=`toast-${Date.now()}-${++fJ}`,o=n=>Fm({type:"UPDATE_TOAST",toast:{...n,id:t}}),r=()=>Fm({type:"DISMISS_TOAST",toastId:t});return Fm({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||r()}}}),{id:t,dismiss:r,update:o}}function C3(){let[e,t]=Gn.useState(Sy);return Gn.useEffect(()=>(Cy.push(t),()=>{let o=Cy.indexOf(t);o>-1&&Cy.splice(o,1)}),[e]),{...e,toast:w3,dismiss:o=>Fm({type:"DISMISS_TOAST",toastId:o})}}function pJ(){let{toasts:e}=C3();return(0,co.jsxs)(x3,{children:[e.map(function({id:t,title:o,description:r,action:n,variant:a,open:i,onOpenChange:s,...l}){return(0,co.jsxs)(BI,{variant:a,open:i,onOpenChange:s,...l,children:[(0,co.jsxs)("div",{className:"grid gap-1",children:[o&&(0,co.jsx)(UI,{children:o}),r&&(0,co.jsx)(zI,{children:r})]}),n,(0,co.jsx)(HI,{})]},t)}),(0,co.jsx)(VI,{})]})}var S3=R(M());var I3=R(N()),b3=K(["inline-flex items-center justify-center rounded","border border-border bg-muted","px-1.5 font-mono font-medium text-muted-foreground","shadow-[0_1px_0_1px_hsl(var(--border))]","select-none whitespace-nowrap"],{variants:{size:{sm:"h-5 min-w-5 text-[10px]",md:"h-6 min-w-6 text-xs"}},defaultVariants:{size:"md"}}),R3=S3.forwardRef(({className:e,size:t,children:o,...r},n)=>(0,I3.jsx)("kbd",{ref:n,className:P("moonui-theme",b3({size:t}),e),...r,children:o}));R3.displayName="Kbd";var tn=R(M());var Pr=R(N()),P3=K(["moonui-theme inline-flex items-center rounded-md outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"],{variants:{size:{sm:"gap-0.5",md:"gap-1",lg:"gap-1.5"}},defaultVariants:{size:"md"}}),mJ={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},L3=tn.forwardRef(({className:e,value:t,defaultValue:o,onValueChange:r,max:n=5,readOnly:a=!1,precision:i="full",icon:s,size:l,"aria-label":u="Rating",...c},d)=>{let p=mJ[l??"md"],g=i==="half"?.5:1,m=t!==void 0,[x,h]=tn.useState(o??0),v=m?t??0:x,[y,w]=tn.useState(null),C=y!==null?y:v,b=tn.useCallback(T=>{a||(m||h(T),r?.(T))},[a,m,r]),S=tn.useCallback(T=>{if(a)return;let k=null;switch(T.key){case"ArrowRight":case"ArrowUp":k=Math.min(n,v+g);break;case"ArrowLeft":case"ArrowDown":k=Math.max(g,v-g);break;case"Home":k=g;break;case"End":k=n;break;default:return}T.preventDefault(),b(k)},[a,n,v,g,b]),I=T=>{if(tn.isValidElement(s)){let k=s;return tn.cloneElement(k,{className:P(p,"shrink-0",T&&"fill-current",k.props?.className)})}return(0,Pr.jsx)(Ui,{className:P(p,"shrink-0",T&&"fill-current"),"aria-hidden":"true"})},L=Array.from({length:n},(T,k)=>k+1);return(0,Pr.jsx)("div",{ref:d,role:"radiogroup","aria-label":u,"aria-orientation":"horizontal","aria-readonly":a||void 0,tabIndex:a?void 0:0,onKeyDown:S,onMouseLeave:()=>w(null),className:P(P3({size:l}),e),...c,children:L.map(T=>{let k=Math.max(0,Math.min(1,C-(T-1))),E=T-.5;return(0,Pr.jsxs)("span",{"data-slot":"rating-star",className:P("relative inline-flex shrink-0",!a&&"cursor-pointer"),children:[(0,Pr.jsx)("span",{"aria-hidden":"true",className:"inline-flex text-muted-foreground/30",children:I(!1)}),(0,Pr.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-0 top-0 h-full overflow-hidden text-amber-400",style:{width:`${k*100}%`},children:I(!0)}),!a&&i==="half"&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("button",{type:"button",role:"radio","aria-checked":v===E,"aria-label":`${E} stars`,tabIndex:-1,onClick:()=>b(E),onMouseEnter:()=>w(E),className:"absolute inset-y-0 left-0 z-10 w-1/2 cursor-pointer bg-transparent"}),(0,Pr.jsx)("button",{type:"button",role:"radio","aria-checked":v===T,"aria-label":`${T} stars`,tabIndex:-1,onClick:()=>b(T),onMouseEnter:()=>w(T),className:"absolute inset-y-0 right-0 z-10 w-1/2 cursor-pointer bg-transparent"})]}),!a&&i==="full"&&(0,Pr.jsx)("button",{type:"button",role:"radio","aria-checked":v===T,"aria-label":`${T} ${T===1?"star":"stars"}`,tabIndex:-1,onClick:()=>b(T),onMouseEnter:()=>w(T),className:"absolute inset-0 z-10 cursor-pointer bg-transparent"})]},T)})})});L3.displayName="Rating";var T3=R(M());var Zl=R(N()),k3=K(["inline-block shrink-0 rounded-full","border-current border-t-transparent","animate-spin motion-reduce:animate-none"],{variants:{size:{sm:"h-4 w-4 border-2",md:"h-6 w-6 border-2",lg:"h-8 w-8 border-[3px]",xl:"h-10 w-10 border-4"}},defaultVariants:{size:"md"}}),gJ={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},M3=T3.forwardRef(({className:e,size:t,variant:o="default",label:r="Loading",...n},a)=>(0,Zl.jsxs)("div",{ref:a,role:"status","aria-live":"polite",className:P("moonui-theme inline-flex items-center justify-center",e),...n,children:[o==="dots"?(0,Zl.jsx)("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(i=>(0,Zl.jsx)("span",{className:P("inline-block rounded-full bg-current","animate-bounce motion-reduce:animate-none",gJ[t??"md"]),style:{animationDelay:`${i*.15}s`}},i))}):(0,Zl.jsx)("span",{className:P(k3({size:t})),"aria-hidden":"true"}),(0,Zl.jsx)("span",{className:"sr-only",children:r})]}));M3.displayName="Spinner";var Ds=R(M());var D3=R(N()),E3=K("moonui-theme inline-flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col items-stretch"},attached:{true:"",false:"gap-2"}},compoundVariants:[{orientation:"horizontal",attached:!0,class:["[&>*:not(:first-child)]:rounded-l-none","[&>*:not(:last-child)]:rounded-r-none","[&>*:not(:first-child)]:-ml-px"]},{orientation:"vertical",attached:!0,class:["[&>*:not(:first-child)]:rounded-t-none","[&>*:not(:last-child)]:rounded-b-none","[&>*:not(:first-child)]:-mt-px"]}],defaultVariants:{orientation:"horizontal",attached:!0}}),A3=Ds.forwardRef(({className:e,orientation:t,attached:o,size:r,variant:n,children:a,...i},s)=>{let u=r!==void 0||n!==void 0?Ds.Children.map(a,c=>{if(!Ds.isValidElement(c)||c.type!==De)return c;let d=c.props;return Ds.cloneElement(c,{size:d.size??r,variant:d.variant??n})}):a;return(0,D3.jsx)("div",{ref:s,role:"group",className:P(E3({orientation:t,attached:o}),e),...i,children:u})});A3.displayName="ButtonGroup";var tu=R(M());var Go=R(M(),1);var rn=R(M(),1),GI=R(N(),1),hJ=Object.defineProperty,on=(e,t)=>hJ(e,"name",{value:t,configurable:!0});function vJ(e,t){let o=rn.createContext(t);o.displayName=e+"Context";let r=on(a=>{let{children:i,...s}=a,l=rn.useMemo(()=>s,Object.values(s));return(0,GI.jsx)(o.Provider,{value:l,children:i})},"Provider");r.displayName=e+"Provider";function n(a,i={}){let{optional:s=!1}=i,l=rn.useContext(o);if(l)return l;if(t!==void 0)return t;if(!s)throw new Error(`\`${a}\` must be used within \`${e}\``)}return on(n,"useContext"),[r,n]}on(vJ,"createContext");function gi(e,t=[]){let o=[];function r(a,i){let s=rn.createContext(i);s.displayName=a+"Context";let l=o.length;o=[...o,i];let u=on(d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=rn.useMemo(()=>g,Object.values(g));return(0,GI.jsx)(m.Provider,{value:x,children:p})},"Provider");u.displayName=a+"Provider";function c(d,f,p={}){let{optional:g=!1}=p,m=f?.[e]?.[l]||s,x=rn.useContext(m);if(x)return x;if(i!==void 0)return i;if(!g)throw new Error(`\`${d}\` must be used within \`${a}\``)}return on(c,"useContext"),[u,c]}on(r,"createContext");let n=on(()=>{let a=o.map(i=>rn.createContext(i));return on(function(s){let l=s?.[e]||a;return rn.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])},"useScope")},"createScope");return n.scopeName=e,[r,N3(n,...t)]}on(gi,"createContextScope");function N3(...e){let t=e[0];if(e.length===1)return t;let o=on(()=>{let r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return on(function(a){let i=r.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return rn.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return o.scopeName=t.scopeName,o}on(N3,"composeContextScopes");var G3=R(M(),1),W3=R(Aa(),1);var Pt=R(M(),1);var O3=R(M(),1),xJ=Object.defineProperty,jI=(e,t)=>xJ(e,"name",{value:t,configurable:!0});function WI(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}jI(WI,"setRef");function F3(...e){return t=>{let o=!1,r=e.map(n=>{let a=WI(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){let a=r[n];typeof a=="function"?a():WI(e[n],null)}}}}jI(F3,"composeRefs");function nn(...e){return O3.useCallback(F3(...e),e)}jI(nn,"useComposedRefs");var ud=!1;var CJ=R(N(),1),yJ=Object.defineProperty,an=(e,t)=>yJ(e,"name",{value:t,configurable:!0}),wJ=an((e,t)=>{let o={...t};for(let r in t){let n=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(n&&a){let s=typeof n=="function",l=typeof a=="function";ud&&(!s||!l)&&console.warn(`Slot: Expected a function for ${r}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),o[r]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(o[r]=n);else r==="style"?o[r]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:r==="className"?o[r]=[n,a].filter(Boolean).join(" "):r==="aria-describedby"&&(o[r]=_3(a,n))}return{...e,...o}},"mergeProps");function _3(...e){let t=new Set;for(let o of e)if(typeof o=="string")for(let r of String(o).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}an(_3,"concatAriaDescribedby");var V3=Pt.createContext(wJ);V3.displayName="SlotContext";function hi(e){let t=Pt.forwardRef((o,r)=>{let n=Pt.useContext(V3),{children:a,mergeProps:i=n,...s}=o,l=null,u=!1,c=[];qI(a)&&typeof by=="function"&&(a=by(a._payload)),Pt.Children.forEach(a,g=>{if(U3(g)){u=!0;let m=g,x="child"in m.props?m.props.child:m.props.children;qI(x)&&typeof by=="function"&&(x=by(x._payload)),l=bJ(m,x),c.push(l?.props?.children)}else c.push(g)}),l?l=Pt.cloneElement(l,void 0,c):!u&&Pt.Children.count(a)===1&&Pt.isValidElement(a)&&(l=a);let d=l?H3(l):void 0,f=nn(r,d);if(!l){if(a||a===0)throw new Error(u?PJ(e):IJ(e));return a}let p=i(s,l.props??{});return l.type!==Pt.Fragment&&(p.ref=r?f:d),Pt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}an(hi,"createSlot");var B3=Symbol.for("radix.slottable");function SJ(e){let t=an(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=B3,t}an(SJ,"createSlottable");var bJ=an((e,t)=>{if("child"in e.props){let o=e.props.child;return Pt.isValidElement(o)?Pt.cloneElement(o,void 0,e.props.children(o.props.children)):null}return Pt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function H3(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}an(H3,"getElementRef");function U3(e){return Pt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===B3}an(U3,"isSlottable");var RJ=Symbol.for("react.lazy");function qI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===RJ&&"_payload"in e&&z3(e._payload)}an(qI,"isLazyComponent");function z3(e){return typeof e=="object"&&e!==null&&"then"in e}an(z3,"isPromiseLike");var IJ=an(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),PJ=an(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),by=Pt[" use ".trim().toString()];var j3=R(N(),1),LJ=Object.defineProperty,TJ=(e,t)=>LJ(e,"name",{value:t,configurable:!0}),kJ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cd=kJ.reduce((e,t)=>{let o=hi(`Primitive.${t}`),r=G3.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,j3.jsx)(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function MJ(e,t){e&&W3.flushSync(()=>e.dispatchEvent(t))}TJ(MJ,"dispatchDiscreteCustomEvent");var eo=R(M(),1);var EJ=Object.defineProperty,dd=(e,t)=>EJ(e,"name",{value:t,configurable:!0}),q3=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ns(e,t,{checkForDefaultPrevented:o=!0}={}){return dd(function(n){if(e?.(n),o===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}dd(Ns,"composeEventHandlers");function AJ(e){if(!q3)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}dd(AJ,"getOwnerWindow");function $I(e){if(!q3)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}dd($I,"getOwnerDocument");function $3(e,t=!1){let{activeElement:o}=$I(e);if(!o?.nodeName)return null;if(K3(o)&&o.contentDocument)return $3(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let n=$I(o).getElementById(r);if(n)return n}}return o}dd($3,"getActiveElement");function K3(e){return e.tagName==="IFRAME"}dd(K3,"isFrame");var Wn=R(M(),1);var Ry=R(N(),1),sr=R(M(),1);var Jl=R(N(),1);var DJ=Object.defineProperty,Jt=(e,t)=>DJ(e,"name",{value:t,configurable:!0});function YI(e){let t=e+"CollectionProvider",[o,r]=gi(t),[n,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),i=Jt(m=>{let{scope:x,children:h}=m,v=Wn.useRef(null),y=Wn.useRef(new Map).current;return(0,Ry.jsx)(n,{scope:x,itemMap:y,collectionRef:v,children:h})},"CollectionProvider");i.displayName=t;let s=e+"CollectionSlot",l=hi(s),u=Wn.forwardRef((m,x)=>{let{scope:h,children:v}=m,y=a(s,h),w=nn(x,y.collectionRef);return(0,Ry.jsx)(l,{ref:w,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=hi(c),p=Wn.forwardRef((m,x)=>{let{scope:h,children:v,...y}=m,w=Wn.useRef(null),C=nn(x,w),b=a(c,h);return Wn.useEffect(()=>(b.itemMap.set(w,{ref:w,...y}),()=>void b.itemMap.delete(w))),(0,Ry.jsx)(f,{[d]:"",ref:C,children:v})});p.displayName=c;function g(m){let x=a(e+"CollectionConsumer",m);return Wn.useCallback(()=>{let v=x.collectionRef.current;if(!v)return[];let y=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((b,S)=>y.indexOf(b.ref.current)-y.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return Jt(g,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},g,r]}Jt(YI,"createCollection");var X3=new WeakMap,Dt,sn,KI=(sn=class extends Map{constructor(o){super(o);Ey(this,Dt,void 0);Hm(this,Dt,[...super.keys()]),X3.set(this,!0)}set(o,r){return X3.get(this)&&(this.has(o)?to(this,Dt)[to(this,Dt).indexOf(o)]=o:to(this,Dt).push(o)),super.set(o,r),this}insert(o,r,n){let a=this.has(r),i=to(this,Dt).length,s=QI(o),l=s>=0?s:i+s,u=l<0||l>=i?-1:l;if(u===this.size||a&&u===this.size-1||u===-1)return this.set(r,n),this;let c=this.size+(a?0:1);s<0&&l++;let d=[...to(this,Dt)],f,p=!1;for(let g=l;g<c;g++)if(l===g){let m=d[g];d[g]===r&&(m=d[g+1]),a&&this.delete(r),f=this.get(m),this.set(r,n)}else{!p&&d[g-1]===r&&(p=!0);let m=d[p?g:g-1],x=f;f=this.get(m),this.delete(m),this.set(m,x)}return this}with(o,r,n){let a=new sn(this);return a.insert(o,r,n),a}before(o){let r=to(this,Dt).indexOf(o)-1;if(!(r<0))return this.entryAt(r)}setBefore(o,r,n){let a=to(this,Dt).indexOf(o);return a===-1?this:this.insert(a,r,n)}after(o){let r=to(this,Dt).indexOf(o);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(o,r,n){let a=to(this,Dt).indexOf(o);return a===-1?this:this.insert(a+1,r,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Hm(this,Dt,[]),super.clear()}delete(o){let r=super.delete(o);return r&&to(this,Dt).splice(to(this,Dt).indexOf(o),1),r}deleteAt(o){let r=this.keyAt(o);return r!==void 0?this.delete(r):!1}at(o){let r=Iy(to(this,Dt),o);if(r!==void 0)return this.get(r)}entryAt(o){let r=Iy(to(this,Dt),o);if(r!==void 0)return[r,this.get(r)]}indexOf(o){return to(this,Dt).indexOf(o)}keyAt(o){return Iy(to(this,Dt),o)}from(o,r){let n=this.indexOf(o);if(n===-1)return;let a=n+r;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(o,r){let n=this.indexOf(o);if(n===-1)return;let a=n+r;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(o,r){let n=0;for(let a of this){if(Reflect.apply(o,r,[a,n,this]))return a;n++}}findIndex(o,r){let n=0;for(let a of this){if(Reflect.apply(o,r,[a,n,this]))return n;n++}return-1}filter(o,r){let n=[],a=0;for(let i of this)Reflect.apply(o,r,[i,a,this])&&n.push(i),a++;return new sn(n)}map(o,r){let n=[],a=0;for(let i of this)n.push([i[0],Reflect.apply(o,r,[i,a,this])]),a++;return new sn(n)}reduce(...o){let[r,n]=o,a=0,i=n??this.at(0);for(let s of this)a===0&&o.length===1?i=s:i=Reflect.apply(r,this,[i,s,a,this]),a++;return i}reduceRight(...o){let[r,n]=o,a=n??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&o.length===1?a=s:a=Reflect.apply(r,this,[a,s,i,this])}return a}toSorted(o){let r=[...this.entries()].sort(o);return new sn(r)}toReversed(){let o=new sn;for(let r=this.size-1;r>=0;r--){let n=this.keyAt(r),a=this.get(n);o.set(n,a)}return o}toSpliced(...o){let r=[...this.entries()];return r.splice(...o),new sn(r)}slice(o,r){let n=new sn,a=this.size-1;if(o===void 0)return n;o<0&&(o=o+this.size),r!==void 0&&r>0&&(a=r-1);for(let i=o;i<=a;i++){let s=this.keyAt(i),l=this.get(s);n.set(s,l)}return n}every(o,r){let n=0;for(let a of this){if(!Reflect.apply(o,r,[a,n,this]))return!1;n++}return!0}some(o,r){let n=0;for(let a of this){if(Reflect.apply(o,r,[a,n,this]))return!0;n++}return!1}},Dt=new WeakMap,Jt(sn,"OrderedDict"),sn);function Iy(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let o=Y3(e,t);return o===-1?void 0:e[o]}Jt(Iy,"at");function Y3(e,t){let o=e.length,r=QI(t),n=r>=0?r:o+r;return n<0||n>=o?-1:n}Jt(Y3,"toSafeIndex");function QI(e){return e!==e||e===0?0:Math.trunc(e)}Jt(QI,"toSafeInteger");function NJ(e){let t=e+"CollectionProvider",[o,r]=gi(t),[n,a]=o(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new KI,setItemMap:Jt(()=>{},"setItemMap")}),i=Jt(({state:y,...w})=>y?(0,Jl.jsx)(l,{...w,state:y}):(0,Jl.jsx)(s,{...w}),"CollectionProvider");i.displayName=t;let s=Jt(y=>{let w=x();return(0,Jl.jsx)(l,{...y,state:w})},"CollectionInit");s.displayName=t+"Init";let l=Jt(y=>{let{scope:w,children:C,state:b}=y,S=sr.useRef(null),[I,L]=sr.useState(null),T=nn(S,L),[k,E]=b;return sr.useEffect(()=>{if(!I)return;let _=J3(()=>{});return _.observe(I,{childList:!0,subtree:!0}),()=>{_.disconnect()}},[I]),(0,Jl.jsx)(n,{scope:w,itemMap:k,setItemMap:E,collectionRef:T,collectionRefObject:S,collectionElement:I,children:C})},"CollectionProviderImpl");l.displayName=t+"Impl";let u=e+"CollectionSlot",c=hi(u),d=sr.forwardRef((y,w)=>{let{scope:C,children:b}=y,S=a(u,C),I=nn(w,S.collectionRef);return(0,Jl.jsx)(c,{ref:I,children:b})});d.displayName=u;let f=e+"CollectionItemSlot",p="data-radix-collection-item",g=hi(f),m=sr.forwardRef((y,w)=>{let{scope:C,children:b,...S}=y,I=sr.useRef(null),[L,T]=sr.useState(null),k=nn(w,I,T),E=a(f,C),{setItemMap:_}=E,D=sr.useRef(S);Q3(D.current,S)||(D.current=S);let z=D.current;return sr.useEffect(()=>{let F=z;return _(O=>L?O.has(L)?O.set(L,{...F,element:L}).toSorted(XI):(O.set(L,{...F,element:L}),O.toSorted(XI)):O),()=>{_(O=>!L||!O.has(L)?O:(O.delete(L),new KI(O)))}},[L,z,_]),(0,Jl.jsx)(g,{[p]:"",ref:k,children:b})});m.displayName=f;function x(){return sr.useState(new KI)}Jt(x,"useInitCollection");function h(y){let{itemMap:w}=a(e+"CollectionConsumer",y);return w}return Jt(h,"useCollection"),[{Provider:i,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:h,useInitCollection:x}]}Jt(NJ,"createCollection");function Q3(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(let n of o)if(!Object.prototype.hasOwnProperty.call(t,n)||e[n]!==t[n])return!1;return!0}Jt(Q3,"shallowEqual");function Z3(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Jt(Z3,"isElementPreceding");function XI(e,t){return!e[1].element||!t[1].element?0:Z3(e[1].element,t[1].element)?-1:1}Jt(XI,"sortByDocumentPosition");function J3(e){return new MutationObserver(o=>{for(let r of o)if(r.type==="childList"){e();return}})}Jt(J3,"getChildListObserver");var ZI=R(M(),1);var ez=R(M(),1),Os=globalThis?.document?ez.useLayoutEffect:()=>{};var OJ=Object.defineProperty,FJ=(e,t)=>OJ(e,"name",{value:t,configurable:!0}),_J=ZI[" useId ".trim().toString()]||(()=>{}),VJ=0;function JI(e){let[t,o]=ZI.useState(_J());return Os(()=>{e||o(r=>r??String(VJ++))},[e]),e||(t?`radix-${t}`:"")}FJ(JI,"useId");var fd=R(M(),1),BJ=Object.defineProperty,HJ=(e,t)=>BJ(e,"name",{value:t,configurable:!0});function eP(e){let t=fd.useRef(e);return fd.useEffect(()=>{t.current=e}),fd.useMemo(()=>(...o)=>t.current?.(...o),[])}HJ(eP,"useCallbackRef");var ln=R(M(),1);var jn=R(M(),1);var pd=R(M(),1),UJ=Object.defineProperty,zJ=(e,t)=>UJ(e,"name",{value:t,configurable:!0}),tz=pd[" useEffectEvent ".trim().toString()],oz=pd[" useInsertionEffect ".trim().toString()];function tP(e){if(typeof tz=="function")return tz(e);let t=pd.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof oz=="function"?oz(()=>{t.current=e}):Os(()=>{t.current=e}),pd.useMemo(()=>(...o)=>t.current?.(...o),[])}zJ(tP,"useEffectEvent");var GJ=Object.defineProperty,_m=(e,t)=>GJ(e,"name",{value:t,configurable:!0}),WJ=ln[" useInsertionEffect ".trim().toString()]||Os;function md({prop:e,defaultProp:t,onChange:o=_m(()=>{},"onChange"),caller:r}){let[n,a,i]=nz({defaultProp:t,onChange:o}),s=e!==void 0,l=s?e:n;if(ud){let c=ln.useRef(e!==void 0);ln.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),c.current=s},[s,r])}let u=ln.useCallback(c=>{if(s){let d=az(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}_m(md,"useControllableState");function nz({defaultProp:e,onChange:t}){let[o,r]=ln.useState(e),n=ln.useRef(o),a=ln.useRef(t);return WJ(()=>{a.current=t},[t]),ln.useEffect(()=>{n.current!==o&&(a.current?.(o),n.current=o)},[o,n]),[o,r,a]}_m(nz,"useUncontrolledState");function az(e){return typeof e=="function"}_m(az,"isFunction");var rz=Symbol("RADIX:SYNC_STATE");function jJ(e,t,o,r){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=tP(i);if(ud){let x=jn.useRef(n!==void 0);jn.useEffect(()=>{let h=x.current;h!==l&&console.warn(`${s} 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.`),x.current=l},[l,s])}let c=[{...o,state:a}];r&&c.push(r);let[d,f]=jn.useReducer((x,h)=>{if(h.type===rz)return{...x,state:h.state};let v=e(x,h);return l&&!Object.is(v.state,x.state)&&u(v.state),v},...c),p=d.state,g=jn.useRef(p);jn.useEffect(()=>{g.current!==p&&(g.current=p,l||u(p))},[p,g,l]);let m=jn.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return jn.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:rz,state:n})},[n,d.state,l]),[m,f]}_m(jJ,"useControllableStateReducer");var Py=R(M(),1),KJ=R(N(),1),qJ=Object.defineProperty,$J=(e,t)=>qJ(e,"name",{value:t,configurable:!0}),XJ=Py.createContext(void 0);function Vm(e){let t=Py.useContext(XJ);return e||t||"ltr"}$J(Vm,"useDirection");var QJ=R(M(),1),Ly=R(M(),1),YJ=Object.defineProperty,rP=(e,t)=>YJ(e,"name",{value:t,configurable:!0}),oP=!1;function iz(){let[e,t]=Ly.useState(oP);return Ly.useEffect(()=>{oP||(oP=!0,t(!0))},[]),e}rP(iz,"useIsHydrated");var sz=QJ[" useSyncExternalStore ".trim().toString()];function lz(){return()=>{}}rP(lz,"subscribe");function uz(){return sz(lz,()=>!0,()=>!1)}rP(uz,"useIsHydratedModern");var cz=typeof sz=="function"?uz:iz;var Fs=R(N(),1),ZJ=Object.defineProperty,eu=(e,t)=>ZJ(e,"name",{value:t,configurable:!0}),nP="rovingFocusGroup.onEntryFocus",JJ={bubbles:!1,cancelable:!0},Ty="RovingFocusGroup",[aP,dz,eee]=YI(Ty),[tee,iP]=gi(Ty,[eee]),[oee,ree]=tee(Ty),fz=eo.forwardRef(eu(function(t,o){return(0,Fs.jsx)(aP.Provider,{scope:t.__scopeRovingFocusGroup,children:(0,Fs.jsx)(aP.Slot,{scope:t.__scopeRovingFocusGroup,children:(0,Fs.jsx)(nee,{...t,ref:o})})})},"RovingFocusGroup")),nee=eo.forwardRef(eu(function(t,o){let{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,p=eo.useRef(null),g=nn(o,p),m=Vm(i),[x,h]=md({prop:s,defaultProp:l??null,onChange:u,caller:Ty}),[v,y]=eo.useState(!1),w=eP(c),C=dz(r),b=eo.useRef(!1),[S,I]=eo.useState(0);return eo.useEffect(()=>{let L=p.current;if(L)return L.addEventListener(nP,w),()=>L.removeEventListener(nP,w)},[w]),(0,Fs.jsx)(oee,{scope:r,orientation:n,dir:m,loop:a,currentTabStopId:x,onItemFocus:eo.useCallback(L=>h(L),[h]),onItemShiftTab:eo.useCallback(()=>y(!0),[]),onFocusableItemAdd:eo.useCallback(()=>I(L=>L+1),[]),onFocusableItemRemove:eo.useCallback(()=>I(L=>L-1),[]),children:(0,Fs.jsx)(cd.div,{tabIndex:v||S===0?-1:0,"data-orientation":n,...f,ref:g,style:{outline:"none",...t.style},onMouseDown:Ns(t.onMouseDown,()=>{b.current=!0}),onFocus:Ns(t.onFocus,L=>{let T=!b.current;if(L.target===L.currentTarget&&T&&!v){let k=new CustomEvent(nP,JJ);if(L.currentTarget.dispatchEvent(k),!k.defaultPrevented){let E=C().filter(O=>O.focusable),_=E.find(O=>O.active),D=E.find(O=>O.id===x),F=[_,D,...E].filter(Boolean).map(O=>O.ref.current);sP(F,d)}}b.current=!1}),onBlur:Ns(t.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),aee="RovingFocusGroupItem",pz=eo.forwardRef(eu(function(t,o){let{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,children:s,...l}=t,u=JI(),c=i||u,d=ree(aee,r),f=d.currentTabStopId===c,p=dz(r),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:x}=d,h=cz();return Os(()=>{if(!(!h||!n))return g(),()=>m()},[h,n,g,m]),eo.useEffect(()=>{if(!(h||!n))return g(),()=>m()},[h,n,g,m]),(0,Fs.jsx)(aP.ItemSlot,{scope:r,id:c,focusable:n,active:a,children:(0,Fs.jsx)(cd.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:o,onMouseDown:Ns(t.onMouseDown,v=>{n?d.onItemFocus(c):v.preventDefault()}),onFocus:Ns(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:Ns(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;let y=gz(v,d.orientation,d.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=p().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();let b=C.indexOf(v.currentTarget);C=d.loop?hz(C,b+1):C.slice(b+1)}setTimeout(()=>sP(C))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:x!=null}):s})})},"RovingFocusGroupItem")),iee={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function mz(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}eu(mz,"getDirectionAwareKey");function gz(e,t,o){let r=mz(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return iee[r]}eu(gz,"getFocusIntent");function sP(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}eu(sP,"focusFirst");function hz(e,t){return e.map((o,r)=>e[(t+r)%e.length])}eu(hz,"wrapArray");var zo=R(N(),1),lee=Object.defineProperty,_s=(e,t)=>lee(e,"name",{value:t,configurable:!0}),gd="ToggleGroup",[xz,nDe]=gi(gd,[iP]),yz=iP(),wz=Go.forwardRef(_s(function(t,o){let{type:r,...n}=t;if(r==="single")return(0,zo.jsx)(uee,{role:"radiogroup",...n,ref:o});if(r==="multiple")return(0,zo.jsx)(cee,{role:"toolbar",...n,ref:o});throw new Error(`Missing prop \`type\` expected on \`${gd}\``)},"ToggleGroup")),[Cz,Sz]=xz(gd),uee=Go.forwardRef(_s(function(t,o){let{value:r,defaultValue:n,onValueChange:a=_s(()=>{},"onValueChange"),...i}=t,[s,l]=md({prop:r,defaultProp:n??"",onChange:a,caller:gd});return(0,zo.jsx)(Cz,{scope:t.__scopeToggleGroup,type:"single",value:Go.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:Go.useCallback(()=>l(""),[l]),children:(0,zo.jsx)(bz,{...i,ref:o})})},"ToggleGroupImplSingle")),cee=Go.forwardRef(_s(function(t,o){let{value:r,defaultValue:n,onValueChange:a=_s(()=>{},"onValueChange"),...i}=t,[s,l]=md({prop:r,defaultProp:n??[],onChange:a,caller:gd}),u=Go.useCallback(d=>l((f=[])=>[...f,d]),[l]),c=Go.useCallback(d=>l((f=[])=>f.filter(p=>p!==d)),[l]);return(0,zo.jsx)(Cz,{scope:t.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:c,children:(0,zo.jsx)(bz,{...i,ref:o})})},"ToggleGroupImplMultiple")),[dee,fee]=xz(gd),bz=Go.forwardRef(_s(function(t,o){let{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:i,dir:s,loop:l=!0,...u}=t,c=yz(r),d=Vm(s),f={dir:d,...u};return(0,zo.jsx)(dee,{scope:r,rovingFocus:a,disabled:n,children:a?(0,zo.jsx)(fz,{asChild:!0,...c,orientation:i,dir:d,loop:l,children:(0,zo.jsx)(cd.div,{...f,ref:o})}):(0,zo.jsx)(cd.div,{...f,ref:o})})},"ToggleGroupImpl")),lP="ToggleGroupItem",Rz=Go.forwardRef(_s(function(t,o){let r=Sz(lP,t.__scopeToggleGroup),n=fee(lP,t.__scopeToggleGroup),a=yz(t.__scopeToggleGroup),i=r.value.includes(t.value),s=n.disabled||t.disabled,l={...t,pressed:i,disabled:s},u=Go.useRef(null);return n.rovingFocus?(0,zo.jsx)(pz,{asChild:!0,...a,focusable:!s,active:i,ref:u,children:(0,zo.jsx)(vz,{...l,ref:o})}):(0,zo.jsx)(vz,{...l,ref:o})},"ToggleGroupItem")),vz=Go.forwardRef(_s(function(t,o){let{__scopeToggleGroup:r,value:n,...a}=t,i=Sz(lP,r),s={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=i.type==="single"?s:void 0;return(0,zo.jsx)(Mm,{...l,...a,ref:o,onPressedChange:u=>{u?i.onItemActivate(n):i.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var ky=R(N()),Iz=tu.createContext({size:"default",variant:"default"}),Pz=tu.forwardRef(({className:e,variant:t,size:o,children:r,...n},a)=>(0,ky.jsx)(wz,{ref:a,className:P("moonui-theme inline-flex items-center justify-center gap-1","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-start",e),...n,children:(0,ky.jsx)(Iz.Provider,{value:{variant:t,size:o},children:r})}));Pz.displayName="ToggleGroup";var Lz=tu.forwardRef(({className:e,children:t,variant:o,size:r,...n},a)=>{let i=tu.useContext(Iz);return(0,ky.jsx)(Rz,{ref:a,className:P(cy({variant:i.variant??o,size:i.size??r}),e),...n,children:t})});Lz.displayName="ToggleGroupItem";export{XW as Accordion,Rk as AccordionContent,Sk as AccordionItem,bk as AccordionTrigger,Lk as Alert,kk as AlertDescription,Tk as AlertTitle,Ek as AspectRatio,pC as Avatar,mC as AvatarFallback,qk as AvatarGroup,jk as AvatarImage,Zo as Badge,Xk as Breadcrumb,gC as BreadcrumbEllipsis,Qk as BreadcrumbItem,Jk as BreadcrumbLink,Yk as BreadcrumbList,eM as BreadcrumbPage,Zk as BreadcrumbSeparator,De as Button,A3 as ButtonGroup,DD as Card,wN as CardCVCInput,_D as CardContent,FD as CardDescription,yN as CardExpiryInput,VD as CardFooter,ND as CardHeader,xN as CardNumberInput,OD as CardTitle,CN as CardZipInput,AN as Carousel,NN as CarouselContent,FN as CarouselItem,VN as CarouselNext,_N as CarouselPrevious,OS as Checkbox,qN as CheckboxGroup,ex as CheckboxLabel,$N as CheckboxWithLabel,m8 as Collapsible,YN as CollapsibleContent,XN as CollapsibleTrigger,Sb as ColorPicker,Vb as Command,gK as CommandDialog,f_ as CommandEmpty,p_ as CommandGroup,c_ as CommandInput,g_ as CommandItem,d_ as CommandList,m_ as CommandSeparator,h_ as CommandShortcut,nR as DatePicker,F_ as DateRangePicker,__ as DateTimePicker,Ob as Dialog,cK as DialogClose,Nx as DialogContent,_b as DialogDescription,u_ as DialogFooter,pK as DialogForm,Fb as DialogHeader,cm as DialogTitle,lK as DialogTrigger,dX as DraggableList,rY as DropdownMenu,JV as DropdownMenuCheckboxItem,QV as DropdownMenuContent,aY as DropdownMenuGroup,ZV as DropdownMenuItem,tB as DropdownMenuLabel,iY as DropdownMenuPortal,lY as DropdownMenuRadioGroup,eB as DropdownMenuRadioItem,oB as DropdownMenuSeparator,rB as DropdownMenuShortcut,sY as DropdownMenuSub,YV as DropdownMenuSubContent,XV as DropdownMenuSubTrigger,nY as DropdownMenuTrigger,aB as FileUpload,AY as FreeBadge,sB as GestureDrawer,b1e as GitHubStarButton,pY as GitHubStars,k7 as GradientPicker,bo as Input,fB as InputOTP,pB as InputOTPGroup,hB as InputOTPSeparator,gB as InputOTPSlot,R3 as Kbd,rr as Label,vB as LockedComponent,V_ as MonthPicker,kR as MoonLogo,U1e as MoonLogoAnimated,H1e as MoonLogoIcon,XW as MoonUIAccordion,Rk as MoonUIAccordionContent,Sk as MoonUIAccordionItem,bk as MoonUIAccordionTrigger,Lk as MoonUIAlert,kk as MoonUIAlertDescription,Tk as MoonUIAlertTitle,Ek as MoonUIAspectRatio,pC as MoonUIAvatar,mC as MoonUIAvatarFallback,qk as MoonUIAvatarGroup,jk as MoonUIAvatarImage,Zo as MoonUIBadge,Xk as MoonUIBreadcrumb,gC as MoonUIBreadcrumbEllipsis,Qk as MoonUIBreadcrumbItem,Jk as MoonUIBreadcrumbLink,Yk as MoonUIBreadcrumbList,eM as MoonUIBreadcrumbPage,Zk as MoonUIBreadcrumbSeparator,De as MoonUIButton,A3 as MoonUIButtonGroup,Hp as MoonUICalendar,DD as MoonUICard,wN as MoonUICardCVCInput,_D as MoonUICardContent,FD as MoonUICardDescription,yN as MoonUICardExpiryInput,VD as MoonUICardFooter,ND as MoonUICardHeader,xN as MoonUICardNumberInput,OD as MoonUICardTitle,CN as MoonUICardZipInput,AN as MoonUICarousel,NN as MoonUICarouselContent,FN as MoonUICarouselItem,VN as MoonUICarouselNext,_N as MoonUICarouselPrevious,OS as MoonUICheckbox,qN as MoonUICheckboxGroup,ex as MoonUICheckboxLabel,$N as MoonUICheckboxWithLabel,m8 as MoonUICollapsible,YN as MoonUICollapsibleContent,XN as MoonUICollapsibleTrigger,Sb as MoonUIColorPicker,Vb as MoonUICommand,gK as MoonUICommandDialog,f_ as MoonUICommandEmpty,p_ as MoonUICommandGroup,c_ as MoonUICommandInput,g_ as MoonUICommandItem,d_ as MoonUICommandList,m_ as MoonUICommandSeparator,h_ as MoonUICommandShortcut,lX as MoonUIDataTableBasic,nR as MoonUIDatePicker,F_ as MoonUIDateRangePicker,__ as MoonUIDateTimePicker,Ob as MoonUIDialog,cK as MoonUIDialogClose,Nx as MoonUIDialogContent,_b as MoonUIDialogDescription,u_ as MoonUIDialogFooter,Fb as MoonUIDialogHeader,cm as MoonUIDialogTitle,lK as MoonUIDialogTrigger,dX as MoonUIDraggableList,rY as MoonUIDropdownMenu,JV as MoonUIDropdownMenuCheckboxItem,QV as MoonUIDropdownMenuContent,aY as MoonUIDropdownMenuGroup,ZV as MoonUIDropdownMenuItem,tB as MoonUIDropdownMenuLabel,iY as MoonUIDropdownMenuPortal,lY as MoonUIDropdownMenuRadioGroup,eB as MoonUIDropdownMenuRadioItem,oB as MoonUIDropdownMenuSeparator,rB as MoonUIDropdownMenuShortcut,sY as MoonUIDropdownMenuSub,YV as MoonUIDropdownMenuSubContent,XV as MoonUIDropdownMenuSubTrigger,nY as MoonUIDropdownMenuTrigger,aB as MoonUIFileUpload,AY as MoonUIFreeBadge,sB as MoonUIGestureDrawer,pY as MoonUIGitHubStars,k7 as MoonUIGradientPicker,bo as MoonUIInput,fB as MoonUIInputOTP,pB as MoonUIInputOTPGroup,hB as MoonUIInputOTPSeparator,gB as MoonUIInputOTPSlot,R3 as MoonUIKbd,rr as MoonUILabel,vB as MoonUILockedComponent,V_ as MoonUIMonthPicker,kR as MoonUIMoonLogo,yB as MoonUIPagination,wB as MoonUIPaginationContent,RB as MoonUIPaginationEllipsis,CB as MoonUIPaginationItem,Yx as MoonUIPaginationLink,bB as MoonUIPaginationNext,SB as MoonUIPaginationPrevious,mH as MoonUIPhoneInput,oi as MoonUIPopover,ha as MoonUIPopoverContent,ri as MoonUIPopoverTrigger,EY as MoonUIProBadge,MY as MoonUIProComponentWrapper,$x as MoonUIProgress,hH as MoonUIRadioGroup,XR as MoonUIRadioGroupItem,vH as MoonUIRadioItemWithLabel,YR as MoonUIRadioLabel,L3 as MoonUIRating,sQ as MoonUIRichTextEditor,qH as MoonUIScrollArea,rI as MoonUIScrollBar,XH as MoonUIScrollReveal,YH as MoonUIScrollRevealContainer,QH as MoonUIScrollRevealItem,Qc as MoonUISelect,Jc as MoonUISelectContent,oQ as MoonUISelectGroup,Ho as MoonUISelectItem,dH as MoonUISelectLabel,KR as MoonUISelectScrollDownButton,$R as MoonUISelectScrollUpButton,fH as MoonUISelectSeparator,Zc as MoonUISelectTrigger,Rm as MoonUISelectValue,Qr as MoonUISeparator,T7 as MoonUISimpleColorPicker,UU as MoonUISimpleEditor,As as MoonUISkeleton,SI as MoonUISkeletonAvatar,GU as MoonUISkeletonCard,CI as MoonUISkeletonText,si as MoonUISlider,M3 as MoonUISpinner,WU as MoonUISwipeableCard,ZU as MoonUISwitch,Bx as MoonUITable,Ux as MoonUITableBody,O_ as MoonUITableCaption,mm as MoonUITableCell,N_ as MoonUITableFooter,zx as MoonUITableHead,Hx as MoonUITableHeader,Kc as MoonUITableRow,Lx as MoonUITabs,Wc as MoonUITabsContent,Tx as MoonUITabsList,Gc as MoonUITabsTrigger,JU as MoonUITagsInput,e3 as MoonUITextarea,BI as MoonUIToast,y3 as MoonUIToastAction,HI as MoonUIToastClose,zI as MoonUIToastDescription,x3 as MoonUIToastProvider,UI as MoonUIToastTitle,VI as MoonUIToastViewport,pJ as MoonUIToaster,dy as MoonUIToggle,Pz as MoonUIToggleGroup,Lz as MoonUIToggleGroupItem,gy as MoonUITooltip,Dm as MoonUITooltipContent,wI as MoonUITooltipProvider,hy as MoonUITooltipTrigger,yB as Pagination,wB as PaginationContent,RB as PaginationEllipsis,CB as PaginationItem,Yx as PaginationLink,bB as PaginationNext,SB as PaginationPrevious,zu as Palette,mH as PhoneInput,vh as Pipette,oi as Popover,DPe as PopoverAnchor,NPe as PopoverClose,ha as PopoverContent,i7 as PopoverFooter,a7 as PopoverHeader,n7 as PopoverSeparator,ri as PopoverTrigger,EY as ProBadge,MY as ProComponentWrapper,$x as Progress,TY as REGEXP_ONLY_CHARS,LY as REGEXP_ONLY_DIGITS,kY as REGEXP_ONLY_DIGITS_AND_CHARS,hH as RadioGroup,XR as RadioGroupItem,vH as RadioItemWithLabel,YR as RadioLabel,L3 as Rating,sQ as RichTextEditor,qH as ScrollArea,rI as ScrollBar,XH as ScrollReveal,YH as ScrollRevealContainer,QH as ScrollRevealItem,Qc as Select,Jc as SelectContent,oQ as SelectGroup,Ho as SelectItem,dH as SelectLabel,KR as SelectScrollDownButton,$R as SelectScrollUpButton,fH as SelectSeparator,Zc as SelectTrigger,Rm as SelectValue,Qr as Separator,T7 as SimpleColorPicker,UU as SimpleEditor,DZ as SimpleTooltip,As as Skeleton,SI as SkeletonAvatar,GU as SkeletonCard,CI as SkeletonText,si as Slider,M3 as Spinner,WU as SwipeableCard,ZU as Switch,Bx as Table,Ux as TableBody,O_ as TableCaption,mm as TableCell,N_ as TableFooter,zx as TableHead,Hx as TableHeader,Kc as TableRow,Lx as Tabs,Wc as TabsContent,Tx as TabsList,Gc as TabsTrigger,JU as TagsInput,e3 as Textarea,BI as Toast,y3 as ToastAction,HI as ToastClose,zI as ToastDescription,x3 as ToastProvider,UI as ToastTitle,VI as ToastViewport,pJ as Toaster,dy as Toggle,Pz as ToggleGroup,Lz as ToggleGroupItem,gy as Tooltip,HU as TooltipArrow,Dm as TooltipContent,wI as TooltipProvider,hy as TooltipTrigger,QW as aspectRatioVariants,Kk as badgeVariants,E3 as buttonGroupVariants,wh as buttonVariants,DN as carouselContentVariants,ON as carouselItemVariants,P as cn,g8 as collapsibleContentVariants,KN as collapsibleTriggerVariants,Mn as format,mB as inputOTPSlotVariants,b3 as kbdVariants,Kk as moonUIBadgeVariants,E3 as moonUIButtonGroupVariants,wh as moonUIButtonVariants,DN as moonUICarouselContentVariants,ON as moonUICarouselItemVariants,uX as moonUICreateSortableHeader,mB as moonUIInputOTPSlotVariants,b3 as moonUIKbdVariants,P3 as moonUIRatingVariants,zU as moonUISkeletonVariants,k3 as moonUISpinnerVariants,cy as moonUIToggleVariants,r7 as popoverContentVariants,uY as progressVariants,P3 as ratingVariants,WQ as separatorVariants,zU as skeletonVariants,k3 as spinnerVariants,UZ as switchVariants,w3 as toast,cy as toggleVariants,AZ as tooltipVariants,Kp as useCarousel,C3 as useToast};
|
|
86
86
|
/*! Bundled license information:
|
|
87
87
|
|
|
88
88
|
scheduler/cjs/scheduler.production.min.js:
|
|
@@ -639,341 +639,6 @@ lucide-react/dist/esm/lucide-react.js:
|
|
|
639
639
|
*)
|
|
640
640
|
*/
|
|
641
641
|
|
|
642
|
-
if (typeof window !== 'undefined' && !window.React) {
|
|
643
|
-
console.warn('MoonUI: React not found. Please include React and ReactDOM before MoonUI.');
|
|
644
|
-
}
|
|
645
|
-
//# sourceMappingURL=index.global.js.mapy of this source tree.
|
|
646
|
-
*)
|
|
647
|
-
|
|
648
|
-
lucide-react/dist/esm/icons/code.js:
|
|
649
|
-
(**
|
|
650
|
-
* @license lucide-react v0.525.0 - ISC
|
|
651
|
-
*
|
|
652
|
-
* This source code is licensed under the ISC license.
|
|
653
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
654
|
-
*)
|
|
655
|
-
|
|
656
|
-
lucide-react/dist/esm/icons/copy.js:
|
|
657
|
-
(**
|
|
658
|
-
* @license lucide-react v0.525.0 - ISC
|
|
659
|
-
*
|
|
660
|
-
* This source code is licensed under the ISC license.
|
|
661
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
662
|
-
*)
|
|
663
|
-
|
|
664
|
-
lucide-react/dist/esm/icons/credit-card.js:
|
|
665
|
-
(**
|
|
666
|
-
* @license lucide-react v0.525.0 - ISC
|
|
667
|
-
*
|
|
668
|
-
* This source code is licensed under the ISC license.
|
|
669
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
670
|
-
*)
|
|
671
|
-
|
|
672
|
-
lucide-react/dist/esm/icons/crown.js:
|
|
673
|
-
(**
|
|
674
|
-
* @license lucide-react v0.525.0 - ISC
|
|
675
|
-
*
|
|
676
|
-
* This source code is licensed under the ISC license.
|
|
677
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
678
|
-
*)
|
|
679
|
-
|
|
680
|
-
lucide-react/dist/esm/icons/dot.js:
|
|
681
|
-
(**
|
|
682
|
-
* @license lucide-react v0.525.0 - ISC
|
|
683
|
-
*
|
|
684
|
-
* This source code is licensed under the ISC license.
|
|
685
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
686
|
-
*)
|
|
687
|
-
|
|
688
|
-
lucide-react/dist/esm/icons/ellipsis.js:
|
|
689
|
-
(**
|
|
690
|
-
* @license lucide-react v0.525.0 - ISC
|
|
691
|
-
*
|
|
692
|
-
* This source code is licensed under the ISC license.
|
|
693
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
694
|
-
*)
|
|
695
|
-
|
|
696
|
-
lucide-react/dist/esm/icons/external-link.js:
|
|
697
|
-
(**
|
|
698
|
-
* @license lucide-react v0.525.0 - ISC
|
|
699
|
-
*
|
|
700
|
-
* This source code is licensed under the ISC license.
|
|
701
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
702
|
-
*)
|
|
703
|
-
|
|
704
|
-
lucide-react/dist/esm/icons/eye.js:
|
|
705
|
-
(**
|
|
706
|
-
* @license lucide-react v0.525.0 - ISC
|
|
707
|
-
*
|
|
708
|
-
* This source code is licensed under the ISC license.
|
|
709
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
710
|
-
*)
|
|
711
|
-
|
|
712
|
-
lucide-react/dist/esm/icons/file-text.js:
|
|
713
|
-
(**
|
|
714
|
-
* @license lucide-react v0.525.0 - ISC
|
|
715
|
-
*
|
|
716
|
-
* This source code is licensed under the ISC license.
|
|
717
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
718
|
-
*)
|
|
719
|
-
|
|
720
|
-
lucide-react/dist/esm/icons/file.js:
|
|
721
|
-
(**
|
|
722
|
-
* @license lucide-react v0.525.0 - ISC
|
|
723
|
-
*
|
|
724
|
-
* This source code is licensed under the ISC license.
|
|
725
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
726
|
-
*)
|
|
727
|
-
|
|
728
|
-
lucide-react/dist/esm/icons/git-fork.js:
|
|
729
|
-
(**
|
|
730
|
-
* @license lucide-react v0.525.0 - ISC
|
|
731
|
-
*
|
|
732
|
-
* This source code is licensed under the ISC license.
|
|
733
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
734
|
-
*)
|
|
735
|
-
|
|
736
|
-
lucide-react/dist/esm/icons/image.js:
|
|
737
|
-
(**
|
|
738
|
-
* @license lucide-react v0.525.0 - ISC
|
|
739
|
-
*
|
|
740
|
-
* This source code is licensed under the ISC license.
|
|
741
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
742
|
-
*)
|
|
743
|
-
|
|
744
|
-
lucide-react/dist/esm/icons/info.js:
|
|
745
|
-
(**
|
|
746
|
-
* @license lucide-react v0.525.0 - ISC
|
|
747
|
-
*
|
|
748
|
-
* This source code is licensed under the ISC license.
|
|
749
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
750
|
-
*)
|
|
751
|
-
|
|
752
|
-
lucide-react/dist/esm/icons/italic.js:
|
|
753
|
-
(**
|
|
754
|
-
* @license lucide-react v0.525.0 - ISC
|
|
755
|
-
*
|
|
756
|
-
* This source code is licensed under the ISC license.
|
|
757
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
758
|
-
*)
|
|
759
|
-
|
|
760
|
-
lucide-react/dist/esm/icons/link.js:
|
|
761
|
-
(**
|
|
762
|
-
* @license lucide-react v0.525.0 - ISC
|
|
763
|
-
*
|
|
764
|
-
* This source code is licensed under the ISC license.
|
|
765
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
766
|
-
*)
|
|
767
|
-
|
|
768
|
-
lucide-react/dist/esm/icons/list-ordered.js:
|
|
769
|
-
(**
|
|
770
|
-
* @license lucide-react v0.525.0 - ISC
|
|
771
|
-
*
|
|
772
|
-
* This source code is licensed under the ISC license.
|
|
773
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
774
|
-
*)
|
|
775
|
-
|
|
776
|
-
lucide-react/dist/esm/icons/list.js:
|
|
777
|
-
(**
|
|
778
|
-
* @license lucide-react v0.525.0 - ISC
|
|
779
|
-
*
|
|
780
|
-
* This source code is licensed under the ISC license.
|
|
781
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
782
|
-
*)
|
|
783
|
-
|
|
784
|
-
lucide-react/dist/esm/icons/loader-circle.js:
|
|
785
|
-
(**
|
|
786
|
-
* @license lucide-react v0.525.0 - ISC
|
|
787
|
-
*
|
|
788
|
-
* This source code is licensed under the ISC license.
|
|
789
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
790
|
-
*)
|
|
791
|
-
|
|
792
|
-
lucide-react/dist/esm/icons/lock.js:
|
|
793
|
-
(**
|
|
794
|
-
* @license lucide-react v0.525.0 - ISC
|
|
795
|
-
*
|
|
796
|
-
* This source code is licensed under the ISC license.
|
|
797
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
798
|
-
*)
|
|
799
|
-
|
|
800
|
-
lucide-react/dist/esm/icons/minus.js:
|
|
801
|
-
(**
|
|
802
|
-
* @license lucide-react v0.525.0 - ISC
|
|
803
|
-
*
|
|
804
|
-
* This source code is licensed under the ISC license.
|
|
805
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
806
|
-
*)
|
|
807
|
-
|
|
808
|
-
lucide-react/dist/esm/icons/music.js:
|
|
809
|
-
(**
|
|
810
|
-
* @license lucide-react v0.525.0 - ISC
|
|
811
|
-
*
|
|
812
|
-
* This source code is licensed under the ISC license.
|
|
813
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
814
|
-
*)
|
|
815
|
-
|
|
816
|
-
lucide-react/dist/esm/icons/palette.js:
|
|
817
|
-
(**
|
|
818
|
-
* @license lucide-react v0.525.0 - ISC
|
|
819
|
-
*
|
|
820
|
-
* This source code is licensed under the ISC license.
|
|
821
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
822
|
-
*)
|
|
823
|
-
|
|
824
|
-
lucide-react/dist/esm/icons/phone.js:
|
|
825
|
-
(**
|
|
826
|
-
* @license lucide-react v0.525.0 - ISC
|
|
827
|
-
*
|
|
828
|
-
* This source code is licensed under the ISC license.
|
|
829
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
830
|
-
*)
|
|
831
|
-
|
|
832
|
-
lucide-react/dist/esm/icons/pipette.js:
|
|
833
|
-
(**
|
|
834
|
-
* @license lucide-react v0.525.0 - ISC
|
|
835
|
-
*
|
|
836
|
-
* This source code is licensed under the ISC license.
|
|
837
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
838
|
-
*)
|
|
839
|
-
|
|
840
|
-
lucide-react/dist/esm/icons/quote.js:
|
|
841
|
-
(**
|
|
842
|
-
* @license lucide-react v0.525.0 - ISC
|
|
843
|
-
*
|
|
844
|
-
* This source code is licensed under the ISC license.
|
|
845
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
846
|
-
*)
|
|
847
|
-
|
|
848
|
-
lucide-react/dist/esm/icons/redo.js:
|
|
849
|
-
(**
|
|
850
|
-
* @license lucide-react v0.525.0 - ISC
|
|
851
|
-
*
|
|
852
|
-
* This source code is licensed under the ISC license.
|
|
853
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
854
|
-
*)
|
|
855
|
-
|
|
856
|
-
lucide-react/dist/esm/icons/search.js:
|
|
857
|
-
(**
|
|
858
|
-
* @license lucide-react v0.525.0 - ISC
|
|
859
|
-
*
|
|
860
|
-
* This source code is licensed under the ISC license.
|
|
861
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
862
|
-
*)
|
|
863
|
-
|
|
864
|
-
lucide-react/dist/esm/icons/square-pen.js:
|
|
865
|
-
(**
|
|
866
|
-
* @license lucide-react v0.525.0 - ISC
|
|
867
|
-
*
|
|
868
|
-
* This source code is licensed under the ISC license.
|
|
869
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
870
|
-
*)
|
|
871
|
-
|
|
872
|
-
lucide-react/dist/esm/icons/star.js:
|
|
873
|
-
(**
|
|
874
|
-
* @license lucide-react v0.525.0 - ISC
|
|
875
|
-
*
|
|
876
|
-
* This source code is licensed under the ISC license.
|
|
877
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
878
|
-
*)
|
|
879
|
-
|
|
880
|
-
lucide-react/dist/esm/icons/strikethrough.js:
|
|
881
|
-
(**
|
|
882
|
-
* @license lucide-react v0.525.0 - ISC
|
|
883
|
-
*
|
|
884
|
-
* This source code is licensed under the ISC license.
|
|
885
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
886
|
-
*)
|
|
887
|
-
|
|
888
|
-
lucide-react/dist/esm/icons/triangle-alert.js:
|
|
889
|
-
(**
|
|
890
|
-
* @license lucide-react v0.525.0 - ISC
|
|
891
|
-
*
|
|
892
|
-
* This source code is licensed under the ISC license.
|
|
893
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
894
|
-
*)
|
|
895
|
-
|
|
896
|
-
lucide-react/dist/esm/icons/underline.js:
|
|
897
|
-
(**
|
|
898
|
-
* @license lucide-react v0.525.0 - ISC
|
|
899
|
-
*
|
|
900
|
-
* This source code is licensed under the ISC license.
|
|
901
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
902
|
-
*)
|
|
903
|
-
|
|
904
|
-
lucide-react/dist/esm/icons/undo.js:
|
|
905
|
-
(**
|
|
906
|
-
* @license lucide-react v0.525.0 - ISC
|
|
907
|
-
*
|
|
908
|
-
* This source code is licensed under the ISC license.
|
|
909
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
910
|
-
*)
|
|
911
|
-
|
|
912
|
-
lucide-react/dist/esm/icons/upload.js:
|
|
913
|
-
(**
|
|
914
|
-
* @license lucide-react v0.525.0 - ISC
|
|
915
|
-
*
|
|
916
|
-
* This source code is licensed under the ISC license.
|
|
917
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
918
|
-
*)
|
|
919
|
-
|
|
920
|
-
lucide-react/dist/esm/icons/video.js:
|
|
921
|
-
(**
|
|
922
|
-
* @license lucide-react v0.525.0 - ISC
|
|
923
|
-
*
|
|
924
|
-
* This source code is licensed under the ISC license.
|
|
925
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
926
|
-
*)
|
|
927
|
-
|
|
928
|
-
lucide-react/dist/esm/icons/x.js:
|
|
929
|
-
(**
|
|
930
|
-
* @license lucide-react v0.525.0 - ISC
|
|
931
|
-
*
|
|
932
|
-
* This source code is licensed under the ISC license.
|
|
933
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
934
|
-
*)
|
|
935
|
-
|
|
936
|
-
lucide-react/dist/esm/icons/zap.js:
|
|
937
|
-
(**
|
|
938
|
-
* @license lucide-react v0.525.0 - ISC
|
|
939
|
-
*
|
|
940
|
-
* This source code is licensed under the ISC license.
|
|
941
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
942
|
-
*)
|
|
943
|
-
|
|
944
|
-
lucide-react/dist/esm/lucide-react.js:
|
|
945
|
-
(**
|
|
946
|
-
* @license lucide-react v0.525.0 - ISC
|
|
947
|
-
*
|
|
948
|
-
* This source code is licensed under the ISC license.
|
|
949
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
950
|
-
*)
|
|
951
|
-
|
|
952
|
-
@tanstack/table-core/build/lib/index.mjs:
|
|
953
|
-
(**
|
|
954
|
-
* table-core
|
|
955
|
-
*
|
|
956
|
-
* Copyright (c) TanStack
|
|
957
|
-
*
|
|
958
|
-
* This source code is licensed under the MIT license found in the
|
|
959
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
960
|
-
*
|
|
961
|
-
* @license MIT
|
|
962
|
-
*)
|
|
963
|
-
|
|
964
|
-
@tanstack/react-table/build/lib/index.mjs:
|
|
965
|
-
(**
|
|
966
|
-
* react-table
|
|
967
|
-
*
|
|
968
|
-
* Copyright (c) TanStack
|
|
969
|
-
*
|
|
970
|
-
* This source code is licensed under the MIT license found in the
|
|
971
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
972
|
-
*
|
|
973
|
-
* @license MIT
|
|
974
|
-
*)
|
|
975
|
-
*/
|
|
976
|
-
|
|
977
642
|
if (typeof window !== 'undefined' && !window.React) {
|
|
978
643
|
console.warn('MoonUI: React not found. Please include React and ReactDOM before MoonUI.');
|
|
979
644
|
}
|