@moontra/moonui 6.7.0 → 6.9.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 +1 -6
- package/dist/hooks/index.global.js.map +1 -1
- package/dist/index.d.mts +33 -25
- package/dist/index.d.ts +33 -25
- package/dist/index.global.js +18 -18
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +441 -388
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +403 -353
- package/dist/index.mjs.map +1 -1
- package/dist/lib/theme.global.js +1 -14
- package/dist/lib/theme.global.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/__tests__/a11y-group-c.test.tsx +266 -0
- package/src/components/ui/__tests__/breadcrumb.test.tsx +24 -9
- package/src/components/ui/__tests__/carousel.test.tsx +37 -0
- package/src/components/ui/__tests__/quality-group-de.test.tsx +159 -0
- package/src/components/ui/breadcrumb.tsx +85 -27
- package/src/components/ui/carousel.tsx +24 -0
- package/src/components/ui/command.tsx +25 -0
- package/src/components/ui/pagination.tsx +64 -44
- package/src/components/ui/scroll-area.tsx +23 -3
- package/src/components/ui/skeleton.tsx +16 -1
- package/src/components/ui/tabs.tsx +66 -16
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
|
-
var J4=Object.create;var ig=Object.defineProperty;var e5=Object.getOwnPropertyDescriptor;var t5=Object.getOwnPropertyNames;var r5=Object.getPrototypeOf,o5=Object.prototype.hasOwnProperty;var Zn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),n5=(e,t)=>{for(var r in t)ig(e,r,{get:t[r],enumerable:!0})},DT=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of t5(t))!o5.call(e,n)&&n!==r&&ig(e,n,{get:()=>t[n],enumerable:!(o=e5(t,n))||o.enumerable});return e};var R=(e,t,r)=>(r=e!=null?J4(r5(e)):{},DT(t||!e||!e.__esModule?ig(r,"default",{value:e,enumerable:!0}):r,e)),a5=e=>DT(ig({},"__esModule",{value:!0}),e);var NT=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var or=(e,t,r)=>(NT(e,t,"read from private field"),r?r.call(e):t.get(e)),d0=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},sg=(e,t,r,o)=>(NT(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r);var $T=Zn(Me=>{"use strict";var Td=Symbol.for("react.element"),i5=Symbol.for("react.portal"),s5=Symbol.for("react.fragment"),l5=Symbol.for("react.strict_mode"),u5=Symbol.for("react.profiler"),c5=Symbol.for("react.provider"),d5=Symbol.for("react.context"),f5=Symbol.for("react.forward_ref"),p5=Symbol.for("react.suspense"),m5=Symbol.for("react.memo"),g5=Symbol.for("react.lazy"),OT=Symbol.iterator;function h5(e){return e===null||typeof e!="object"?null:(e=OT&&e[OT]||e["@@iterator"],typeof e=="function"?e:null)}var VT={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},BT=Object.assign,HT={};function pu(e,t,r){this.props=e,this.context=t,this.refs=HT,this.updater=r||VT}pu.prototype.isReactComponent={};pu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};pu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function UT(){}UT.prototype=pu.prototype;function p0(e,t,r){this.props=e,this.context=t,this.refs=HT,this.updater=r||VT}var m0=p0.prototype=new UT;m0.constructor=p0;BT(m0,pu.prototype);m0.isPureReactComponent=!0;var FT=Array.isArray,zT=Object.prototype.hasOwnProperty,g0={current:null},GT={key:!0,ref:!0,__self:!0,__source:!0};function WT(e,t,r){var o,n={},a=null,i=null;if(t!=null)for(o in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)zT.call(t,o)&&!GT.hasOwnProperty(o)&&(n[o]=t[o]);var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];n.children=l}if(e&&e.defaultProps)for(o in s=e.defaultProps,s)n[o]===void 0&&(n[o]=s[o]);return{$$typeof:Td,type:e,key:a,ref:i,props:n,_owner:g0.current}}function v5(e,t){return{$$typeof:Td,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function h0(e){return typeof e=="object"&&e!==null&&e.$$typeof===Td}function x5(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var _T=/\/+/g;function f0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?x5(""+e.key):t.toString(36)}function ug(e,t,r,o,n){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Td:case i5:i=!0}}if(i)return i=e,n=n(i),e=o===""?"."+f0(i,0):o,FT(n)?(r="",e!=null&&(r=e.replace(_T,"$&/")+"/"),ug(n,t,r,"",function(u){return u})):n!=null&&(h0(n)&&(n=v5(n,r+(!n.key||i&&i.key===n.key?"":(""+n.key).replace(_T,"$&/")+"/")+e)),t.push(n)),1;if(i=0,o=o===""?".":o+":",FT(e))for(var s=0;s<e.length;s++){a=e[s];var l=o+f0(a,s);i+=ug(a,t,r,l,n)}else if(l=h5(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=o+f0(a,s++),i+=ug(a,t,r,l,n);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function lg(e,t,r){if(e==null)return e;var o=[],n=0;return ug(e,o,"","",function(a){return t.call(r,a,n++)}),o}function y5(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ar={current:null},cg={transition:null},w5={ReactCurrentDispatcher:Ar,ReactCurrentBatchConfig:cg,ReactCurrentOwner:g0};function jT(){throw Error("act(...) is not supported in production builds of React.")}Me.Children={map:lg,forEach:function(e,t,r){lg(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return lg(e,function(){t++}),t},toArray:function(e){return lg(e,function(t){return t})||[]},only:function(e){if(!h0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Me.Component=pu;Me.Fragment=s5;Me.Profiler=u5;Me.PureComponent=p0;Me.StrictMode=l5;Me.Suspense=p5;Me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=w5;Me.act=jT;Me.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=BT({},e.props),n=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=g0.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)zT.call(t,l)&&!GT.hasOwnProperty(l)&&(o[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)o.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];o.children=s}return{$$typeof:Td,type:e.type,key:n,ref:a,props:o,_owner:i}};Me.createContext=function(e){return e={$$typeof:d5,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:c5,_context:e},e.Consumer=e};Me.createElement=WT;Me.createFactory=function(e){var t=WT.bind(null,e);return t.type=e,t};Me.createRef=function(){return{current:null}};Me.forwardRef=function(e){return{$$typeof:f5,render:e}};Me.isValidElement=h0;Me.lazy=function(e){return{$$typeof:g5,_payload:{_status:-1,_result:e},_init:y5}};Me.memo=function(e,t){return{$$typeof:m5,type:e,compare:t===void 0?null:t}};Me.startTransition=function(e){var t=cg.transition;cg.transition={};try{e()}finally{cg.transition=t}};Me.unstable_act=jT;Me.useCallback=function(e,t){return Ar.current.useCallback(e,t)};Me.useContext=function(e){return Ar.current.useContext(e)};Me.useDebugValue=function(){};Me.useDeferredValue=function(e){return Ar.current.useDeferredValue(e)};Me.useEffect=function(e,t){return Ar.current.useEffect(e,t)};Me.useId=function(){return Ar.current.useId()};Me.useImperativeHandle=function(e,t,r){return Ar.current.useImperativeHandle(e,t,r)};Me.useInsertionEffect=function(e,t){return Ar.current.useInsertionEffect(e,t)};Me.useLayoutEffect=function(e,t){return Ar.current.useLayoutEffect(e,t)};Me.useMemo=function(e,t){return Ar.current.useMemo(e,t)};Me.useReducer=function(e,t,r){return Ar.current.useReducer(e,t,r)};Me.useRef=function(e){return Ar.current.useRef(e)};Me.useState=function(e){return Ar.current.useState(e)};Me.useSyncExternalStore=function(e,t,r){return Ar.current.useSyncExternalStore(e,t,r)};Me.useTransition=function(){return Ar.current.useTransition()};Me.version="18.3.1"});var M=Zn((kte,qT)=>{"use strict";qT.exports=$T()});var XT=Zn(dg=>{"use strict";var C5=M(),S5=Symbol.for("react.element"),b5=Symbol.for("react.fragment"),R5=Object.prototype.hasOwnProperty,I5=C5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P5={key:!0,ref:!0,__self:!0,__source:!0};function KT(e,t,r){var o,n={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(o in t)R5.call(t,o)&&!P5.hasOwnProperty(o)&&(n[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)n[o]===void 0&&(n[o]=t[o]);return{$$typeof:S5,type:e,key:a,ref:i,props:n,_owner:I5.current}}dg.Fragment=b5;dg.jsx=KT;dg.jsxs=KT});var N=Zn((Ete,YT)=>{"use strict";YT.exports=XT()});var f1=Zn(Ye=>{"use strict";function C0(e,t){var r=e.length;e.push(t);e:for(;0<r;){var o=r-1>>>1,n=e[o];if(0<mg(n,t))e[o]=t,e[r]=n,r=o;else break e}}function mn(e){return e.length===0?null:e[0]}function hg(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var o=0,n=e.length,a=n>>>1;o<a;){var i=2*(o+1)-1,s=e[i],l=i+1,u=e[l];if(0>mg(s,r))l<n&&0>mg(u,s)?(e[o]=u,e[l]=r,o=l):(e[o]=s,e[i]=r,o=i);else if(l<n&&0>mg(u,r))e[o]=u,e[l]=r,o=l;else break e}}return t}function mg(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(o1=performance,Ye.unstable_now=function(){return o1.now()}):(x0=Date,n1=x0.now(),Ye.unstable_now=function(){return x0.now()-n1});var o1,x0,n1,ea=[],bi=[],_5=1,No=null,mr=3,vg=!1,Us=!1,Md=!1,s1=typeof setTimeout=="function"?setTimeout:null,l1=typeof clearTimeout=="function"?clearTimeout:null,a1=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S0(e){for(var t=mn(bi);t!==null;){if(t.callback===null)hg(bi);else if(t.startTime<=e)hg(bi),t.sortIndex=t.expirationTime,C0(ea,t);else break;t=mn(bi)}}function b0(e){if(Md=!1,S0(e),!Us)if(mn(ea)!==null)Us=!0,I0(R0);else{var t=mn(bi);t!==null&&P0(b0,t.startTime-e)}}function R0(e,t){Us=!1,Md&&(Md=!1,l1(Ed),Ed=-1),vg=!0;var r=mr;try{for(S0(t),No=mn(ea);No!==null&&(!(No.expirationTime>t)||e&&!d1());){var o=No.callback;if(typeof o=="function"){No.callback=null,mr=No.priorityLevel;var n=o(No.expirationTime<=t);t=Ye.unstable_now(),typeof n=="function"?No.callback=n:No===mn(ea)&&hg(ea),S0(t)}else hg(ea);No=mn(ea)}if(No!==null)var a=!0;else{var i=mn(bi);i!==null&&P0(b0,i.startTime-t),a=!1}return a}finally{No=null,mr=r,vg=!1}}var xg=!1,gg=null,Ed=-1,u1=5,c1=-1;function d1(){return!(Ye.unstable_now()-c1<u1)}function y0(){if(gg!==null){var e=Ye.unstable_now();c1=e;var t=!0;try{t=gg(!0,e)}finally{t?kd():(xg=!1,gg=null)}}else xg=!1}var kd;typeof a1=="function"?kd=function(){a1(y0)}:typeof MessageChannel<"u"?(w0=new MessageChannel,i1=w0.port2,w0.port1.onmessage=y0,kd=function(){i1.postMessage(null)}):kd=function(){s1(y0,0)};var w0,i1;function I0(e){gg=e,xg||(xg=!0,kd())}function P0(e,t){Ed=s1(function(){e(Ye.unstable_now())},t)}Ye.unstable_IdlePriority=5;Ye.unstable_ImmediatePriority=1;Ye.unstable_LowPriority=4;Ye.unstable_NormalPriority=3;Ye.unstable_Profiling=null;Ye.unstable_UserBlockingPriority=2;Ye.unstable_cancelCallback=function(e){e.callback=null};Ye.unstable_continueExecution=function(){Us||vg||(Us=!0,I0(R0))};Ye.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"):u1=0<e?Math.floor(1e3/e):5};Ye.unstable_getCurrentPriorityLevel=function(){return mr};Ye.unstable_getFirstCallbackNode=function(){return mn(ea)};Ye.unstable_next=function(e){switch(mr){case 1:case 2:case 3:var t=3;break;default:t=mr}var r=mr;mr=t;try{return e()}finally{mr=r}};Ye.unstable_pauseExecution=function(){};Ye.unstable_requestPaint=function(){};Ye.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=mr;mr=e;try{return t()}finally{mr=r}};Ye.unstable_scheduleCallback=function(e,t,r){var o=Ye.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?o+r:o):r=o,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=r+n,e={id:_5++,callback:t,priorityLevel:e,startTime:r,expirationTime:n,sortIndex:-1},r>o?(e.sortIndex=r,C0(bi,e),mn(ea)===null&&e===mn(bi)&&(Md?(l1(Ed),Ed=-1):Md=!0,P0(b0,r-o))):(e.sortIndex=n,C0(ea,e),Us||vg||(Us=!0,I0(R0))),e};Ye.unstable_shouldYield=d1;Ye.unstable_wrapCallback=function(e){var t=mr;return function(){var r=mr;mr=t;try{return e.apply(this,arguments)}finally{mr=r}}}});var m1=Zn((Kte,p1)=>{"use strict";p1.exports=f1()});var xE=Zn(vo=>{"use strict";var V5=M(),go=m1();function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 Ck=new Set,Jd={};function el(e,t){Ou(e,t),Ou(e+"Capture",t)}function Ou(e,t){for(Jd[e]=t,e=0;e<t.length;e++)Ck.add(t[e])}var Da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),X0=Object.prototype.hasOwnProperty,B5=/^[: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]*$/,g1={},h1={};function H5(e){return X0.call(h1,e)?!0:X0.call(g1,e)?!1:B5.test(e)?h1[e]=!0:(g1[e]=!0,!1)}function U5(e,t,r,o){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function z5(e,t,r,o){if(t===null||typeof t>"u"||U5(e,t,r,o))return!0;if(o)return!1;if(r!==null)switch(r.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 Or(e,t,r,o,n,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var ir={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ir[e]=new Or(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ir[t]=new Or(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ir[e]=new Or(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ir[e]=new Or(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){ir[e]=new Or(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ir[e]=new Or(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ir[e]=new Or(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ir[e]=new Or(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ir[e]=new Or(e,5,!1,e.toLowerCase(),null,!1,!1)});var Uw=/[\-:]([a-z])/g;function zw(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(Uw,zw);ir[t]=new Or(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(Uw,zw);ir[t]=new Or(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(Uw,zw);ir[t]=new Or(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ir[e]=new Or(e,1,!1,e.toLowerCase(),null,!1,!1)});ir.xlinkHref=new Or("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ir[e]=new Or(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gw(e,t,r,o){var n=ir.hasOwnProperty(t)?ir[t]:null;(n!==null?n.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(z5(t,r,n,o)&&(r=null),o||n===null?H5(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):n.mustUseProperty?e[n.propertyName]=r===null?n.type===3?!1:"":r:(t=n.attributeName,o=n.attributeNamespace,r===null?e.removeAttribute(t):(n=n.type,r=n===3||n===4&&r===!0?"":""+r,o?e.setAttributeNS(o,t,r):e.setAttribute(t,r))))}var _a=V5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,yg=Symbol.for("react.element"),vu=Symbol.for("react.portal"),xu=Symbol.for("react.fragment"),Ww=Symbol.for("react.strict_mode"),Y0=Symbol.for("react.profiler"),Sk=Symbol.for("react.provider"),bk=Symbol.for("react.context"),jw=Symbol.for("react.forward_ref"),Q0=Symbol.for("react.suspense"),Z0=Symbol.for("react.suspense_list"),$w=Symbol.for("react.memo"),Ii=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var Rk=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var v1=Symbol.iterator;function Ad(e){return e===null||typeof e!="object"?null:(e=v1&&e[v1]||e["@@iterator"],typeof e=="function"?e:null)}var gt=Object.assign,L0;function Hd(e){if(L0===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);L0=t&&t[1]||""}return`
|
|
5
|
-
`+
|
|
4
|
+
var i5=Object.create;var sg=Object.defineProperty;var s5=Object.getOwnPropertyDescriptor;var l5=Object.getOwnPropertyNames;var u5=Object.getPrototypeOf,c5=Object.prototype.hasOwnProperty;var Jn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),d5=(e,t)=>{for(var r in t)sg(e,r,{get:t[r],enumerable:!0})},NT=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of l5(t))!c5.call(e,n)&&n!==r&&sg(e,n,{get:()=>t[n],enumerable:!(o=s5(t,n))||o.enumerable});return e};var R=(e,t,r)=>(r=e!=null?i5(u5(e)):{},NT(t||!e||!e.__esModule?sg(r,"default",{value:e,enumerable:!0}):r,e)),f5=e=>NT(sg({},"__esModule",{value:!0}),e);var OT=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var or=(e,t,r)=>(OT(e,t,"read from private field"),r?r.call(e):t.get(e)),f0=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},lg=(e,t,r,o)=>(OT(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r);var qT=Jn(Me=>{"use strict";var Md=Symbol.for("react.element"),p5=Symbol.for("react.portal"),m5=Symbol.for("react.fragment"),g5=Symbol.for("react.strict_mode"),h5=Symbol.for("react.profiler"),v5=Symbol.for("react.provider"),x5=Symbol.for("react.context"),y5=Symbol.for("react.forward_ref"),C5=Symbol.for("react.suspense"),w5=Symbol.for("react.memo"),S5=Symbol.for("react.lazy"),FT=Symbol.iterator;function b5(e){return e===null||typeof e!="object"?null:(e=FT&&e[FT]||e["@@iterator"],typeof e=="function"?e:null)}var BT={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},HT=Object.assign,UT={};function gu(e,t,r){this.props=e,this.context=t,this.refs=UT,this.updater=r||BT}gu.prototype.isReactComponent={};gu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};gu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zT(){}zT.prototype=gu.prototype;function m0(e,t,r){this.props=e,this.context=t,this.refs=UT,this.updater=r||BT}var g0=m0.prototype=new zT;g0.constructor=m0;HT(g0,gu.prototype);g0.isPureReactComponent=!0;var _T=Array.isArray,GT=Object.prototype.hasOwnProperty,h0={current:null},WT={key:!0,ref:!0,__self:!0,__source:!0};function jT(e,t,r){var o,n={},a=null,i=null;if(t!=null)for(o in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)GT.call(t,o)&&!WT.hasOwnProperty(o)&&(n[o]=t[o]);var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];n.children=l}if(e&&e.defaultProps)for(o in s=e.defaultProps,s)n[o]===void 0&&(n[o]=s[o]);return{$$typeof:Md,type:e,key:a,ref:i,props:n,_owner:h0.current}}function R5(e,t){return{$$typeof:Md,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function v0(e){return typeof e=="object"&&e!==null&&e.$$typeof===Md}function I5(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var VT=/\/+/g;function p0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?I5(""+e.key):t.toString(36)}function cg(e,t,r,o,n){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Md:case p5:i=!0}}if(i)return i=e,n=n(i),e=o===""?"."+p0(i,0):o,_T(n)?(r="",e!=null&&(r=e.replace(VT,"$&/")+"/"),cg(n,t,r,"",function(u){return u})):n!=null&&(v0(n)&&(n=R5(n,r+(!n.key||i&&i.key===n.key?"":(""+n.key).replace(VT,"$&/")+"/")+e)),t.push(n)),1;if(i=0,o=o===""?".":o+":",_T(e))for(var s=0;s<e.length;s++){a=e[s];var l=o+p0(a,s);i+=cg(a,t,r,l,n)}else if(l=b5(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=o+p0(a,s++),i+=cg(a,t,r,l,n);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ug(e,t,r){if(e==null)return e;var o=[],n=0;return cg(e,o,"","",function(a){return t.call(r,a,n++)}),o}function P5(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Nr={current:null},dg={transition:null},L5={ReactCurrentDispatcher:Nr,ReactCurrentBatchConfig:dg,ReactCurrentOwner:h0};function $T(){throw Error("act(...) is not supported in production builds of React.")}Me.Children={map:ug,forEach:function(e,t,r){ug(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ug(e,function(){t++}),t},toArray:function(e){return ug(e,function(t){return t})||[]},only:function(e){if(!v0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Me.Component=gu;Me.Fragment=m5;Me.Profiler=h5;Me.PureComponent=m0;Me.StrictMode=g5;Me.Suspense=C5;Me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L5;Me.act=$T;Me.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=HT({},e.props),n=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=h0.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)GT.call(t,l)&&!WT.hasOwnProperty(l)&&(o[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)o.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];o.children=s}return{$$typeof:Md,type:e.type,key:n,ref:a,props:o,_owner:i}};Me.createContext=function(e){return e={$$typeof:x5,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:v5,_context:e},e.Consumer=e};Me.createElement=jT;Me.createFactory=function(e){var t=jT.bind(null,e);return t.type=e,t};Me.createRef=function(){return{current:null}};Me.forwardRef=function(e){return{$$typeof:y5,render:e}};Me.isValidElement=v0;Me.lazy=function(e){return{$$typeof:S5,_payload:{_status:-1,_result:e},_init:P5}};Me.memo=function(e,t){return{$$typeof:w5,type:e,compare:t===void 0?null:t}};Me.startTransition=function(e){var t=dg.transition;dg.transition={};try{e()}finally{dg.transition=t}};Me.unstable_act=$T;Me.useCallback=function(e,t){return Nr.current.useCallback(e,t)};Me.useContext=function(e){return Nr.current.useContext(e)};Me.useDebugValue=function(){};Me.useDeferredValue=function(e){return Nr.current.useDeferredValue(e)};Me.useEffect=function(e,t){return Nr.current.useEffect(e,t)};Me.useId=function(){return Nr.current.useId()};Me.useImperativeHandle=function(e,t,r){return Nr.current.useImperativeHandle(e,t,r)};Me.useInsertionEffect=function(e,t){return Nr.current.useInsertionEffect(e,t)};Me.useLayoutEffect=function(e,t){return Nr.current.useLayoutEffect(e,t)};Me.useMemo=function(e,t){return Nr.current.useMemo(e,t)};Me.useReducer=function(e,t,r){return Nr.current.useReducer(e,t,r)};Me.useRef=function(e){return Nr.current.useRef(e)};Me.useState=function(e){return Nr.current.useState(e)};Me.useSyncExternalStore=function(e,t,r){return Nr.current.useSyncExternalStore(e,t,r)};Me.useTransition=function(){return Nr.current.useTransition()};Me.version="18.3.1"});var M=Jn((Dte,KT)=>{"use strict";KT.exports=qT()});var YT=Jn(fg=>{"use strict";var T5=M(),k5=Symbol.for("react.element"),M5=Symbol.for("react.fragment"),E5=Object.prototype.hasOwnProperty,A5=T5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,D5={key:!0,ref:!0,__self:!0,__source:!0};function XT(e,t,r){var o,n={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(o in t)E5.call(t,o)&&!D5.hasOwnProperty(o)&&(n[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)n[o]===void 0&&(n[o]=t[o]);return{$$typeof:k5,type:e,key:a,ref:i,props:n,_owner:A5.current}}fg.Fragment=M5;fg.jsx=XT;fg.jsxs=XT});var N=Jn((Ote,QT)=>{"use strict";QT.exports=YT()});var m1=Jn(Ye=>{"use strict";function S0(e,t){var r=e.length;e.push(t);e:for(;0<r;){var o=r-1>>>1,n=e[o];if(0<gg(n,t))e[o]=t,e[r]=n,r=o;else break e}}function gn(e){return e.length===0?null:e[0]}function vg(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var o=0,n=e.length,a=n>>>1;o<a;){var i=2*(o+1)-1,s=e[i],l=i+1,u=e[l];if(0>gg(s,r))l<n&&0>gg(u,s)?(e[o]=u,e[l]=r,o=l):(e[o]=s,e[i]=r,o=i);else if(l<n&&0>gg(u,r))e[o]=u,e[l]=r,o=l;else break e}}return t}function gg(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(a1=performance,Ye.unstable_now=function(){return a1.now()}):(y0=Date,i1=y0.now(),Ye.unstable_now=function(){return y0.now()-i1});var a1,y0,i1,ta=[],Ri=[],W5=1,No=null,gr=3,xg=!1,Gs=!1,Ad=!1,u1=typeof setTimeout=="function"?setTimeout:null,c1=typeof clearTimeout=="function"?clearTimeout:null,s1=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b0(e){for(var t=gn(Ri);t!==null;){if(t.callback===null)vg(Ri);else if(t.startTime<=e)vg(Ri),t.sortIndex=t.expirationTime,S0(ta,t);else break;t=gn(Ri)}}function R0(e){if(Ad=!1,b0(e),!Gs)if(gn(ta)!==null)Gs=!0,P0(I0);else{var t=gn(Ri);t!==null&&L0(R0,t.startTime-e)}}function I0(e,t){Gs=!1,Ad&&(Ad=!1,c1(Dd),Dd=-1),xg=!0;var r=gr;try{for(b0(t),No=gn(ta);No!==null&&(!(No.expirationTime>t)||e&&!p1());){var o=No.callback;if(typeof o=="function"){No.callback=null,gr=No.priorityLevel;var n=o(No.expirationTime<=t);t=Ye.unstable_now(),typeof n=="function"?No.callback=n:No===gn(ta)&&vg(ta),b0(t)}else vg(ta);No=gn(ta)}if(No!==null)var a=!0;else{var i=gn(Ri);i!==null&&L0(R0,i.startTime-t),a=!1}return a}finally{No=null,gr=r,xg=!1}}var yg=!1,hg=null,Dd=-1,d1=5,f1=-1;function p1(){return!(Ye.unstable_now()-f1<d1)}function C0(){if(hg!==null){var e=Ye.unstable_now();f1=e;var t=!0;try{t=hg(!0,e)}finally{t?Ed():(yg=!1,hg=null)}}else yg=!1}var Ed;typeof s1=="function"?Ed=function(){s1(C0)}:typeof MessageChannel<"u"?(w0=new MessageChannel,l1=w0.port2,w0.port1.onmessage=C0,Ed=function(){l1.postMessage(null)}):Ed=function(){u1(C0,0)};var w0,l1;function P0(e){hg=e,yg||(yg=!0,Ed())}function L0(e,t){Dd=u1(function(){e(Ye.unstable_now())},t)}Ye.unstable_IdlePriority=5;Ye.unstable_ImmediatePriority=1;Ye.unstable_LowPriority=4;Ye.unstable_NormalPriority=3;Ye.unstable_Profiling=null;Ye.unstable_UserBlockingPriority=2;Ye.unstable_cancelCallback=function(e){e.callback=null};Ye.unstable_continueExecution=function(){Gs||xg||(Gs=!0,P0(I0))};Ye.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"):d1=0<e?Math.floor(1e3/e):5};Ye.unstable_getCurrentPriorityLevel=function(){return gr};Ye.unstable_getFirstCallbackNode=function(){return gn(ta)};Ye.unstable_next=function(e){switch(gr){case 1:case 2:case 3:var t=3;break;default:t=gr}var r=gr;gr=t;try{return e()}finally{gr=r}};Ye.unstable_pauseExecution=function(){};Ye.unstable_requestPaint=function(){};Ye.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=gr;gr=e;try{return t()}finally{gr=r}};Ye.unstable_scheduleCallback=function(e,t,r){var o=Ye.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?o+r:o):r=o,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=r+n,e={id:W5++,callback:t,priorityLevel:e,startTime:r,expirationTime:n,sortIndex:-1},r>o?(e.sortIndex=r,S0(Ri,e),gn(ta)===null&&e===gn(Ri)&&(Ad?(c1(Dd),Dd=-1):Ad=!0,L0(R0,r-o))):(e.sortIndex=n,S0(ta,e),Gs||xg||(Gs=!0,P0(I0))),e};Ye.unstable_shouldYield=p1;Ye.unstable_wrapCallback=function(e){var t=gr;return function(){var r=gr;gr=t;try{return e.apply(this,arguments)}finally{gr=r}}}});var h1=Jn((Zte,g1)=>{"use strict";g1.exports=m1()});var CE=Jn(xo=>{"use strict";var j5=M(),ho=h1();function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 bk=new Set,tf={};function rl(e,t){_u(e,t),_u(e+"Capture",t)}function _u(e,t){for(tf[e]=t,e=0;e<t.length;e++)bk.add(t[e])}var Oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Y0=Object.prototype.hasOwnProperty,$5=/^[: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]*$/,v1={},x1={};function q5(e){return Y0.call(x1,e)?!0:Y0.call(v1,e)?!1:$5.test(e)?x1[e]=!0:(v1[e]=!0,!1)}function K5(e,t,r,o){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function X5(e,t,r,o){if(t===null||typeof t>"u"||K5(e,t,r,o))return!0;if(o)return!1;if(r!==null)switch(r.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 _r(e,t,r,o,n,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var ir={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ir[e]=new _r(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ir[t]=new _r(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ir[e]=new _r(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ir[e]=new _r(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){ir[e]=new _r(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ir[e]=new _r(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ir[e]=new _r(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ir[e]=new _r(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ir[e]=new _r(e,5,!1,e.toLowerCase(),null,!1,!1)});var zC=/[\-:]([a-z])/g;function GC(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(zC,GC);ir[t]=new _r(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(zC,GC);ir[t]=new _r(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(zC,GC);ir[t]=new _r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ir[e]=new _r(e,1,!1,e.toLowerCase(),null,!1,!1)});ir.xlinkHref=new _r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ir[e]=new _r(e,1,!1,e.toLowerCase(),null,!0,!0)});function WC(e,t,r,o){var n=ir.hasOwnProperty(t)?ir[t]:null;(n!==null?n.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(X5(t,r,n,o)&&(r=null),o||n===null?q5(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):n.mustUseProperty?e[n.propertyName]=r===null?n.type===3?!1:"":r:(t=n.attributeName,o=n.attributeNamespace,r===null?e.removeAttribute(t):(n=n.type,r=n===3||n===4&&r===!0?"":""+r,o?e.setAttributeNS(o,t,r):e.setAttribute(t,r))))}var Ba=j5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Cg=Symbol.for("react.element"),yu=Symbol.for("react.portal"),Cu=Symbol.for("react.fragment"),jC=Symbol.for("react.strict_mode"),Q0=Symbol.for("react.profiler"),Rk=Symbol.for("react.provider"),Ik=Symbol.for("react.context"),$C=Symbol.for("react.forward_ref"),Z0=Symbol.for("react.suspense"),J0=Symbol.for("react.suspense_list"),qC=Symbol.for("react.memo"),Pi=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var Pk=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var y1=Symbol.iterator;function Nd(e){return e===null||typeof e!="object"?null:(e=y1&&e[y1]||e["@@iterator"],typeof e=="function"?e:null)}var gt=Object.assign,T0;function zd(e){if(T0===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);T0=t&&t[1]||""}return`
|
|
5
|
+
`+T0+e}var k0=!1;function M0(e,t){if(!e||k0)return"";k0=!0;var r=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 o=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){o=u}e.call(t.prototype)}else{try{throw Error()}catch(u){o=u}e()}}catch(u){if(u&&o&&typeof u.stack=="string"){for(var n=u.stack.split(`
|
|
6
6
|
`),a=o.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{T0=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Hd(e):""}function G5(e){switch(e.tag){case 5:return Hd(e.type);case 16:return Hd("Lazy");case 13:return Hd("Suspense");case 19:return Hd("SuspenseList");case 0:case 2:case 15:return e=k0(e.type,!1),e;case 11:return e=k0(e.type.render,!1),e;case 1:return e=k0(e.type,!0),e;default:return""}}function J0(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 xu:return"Fragment";case vu:return"Portal";case Y0:return"Profiler";case Ww:return"StrictMode";case Q0:return"Suspense";case Z0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bk:return(e.displayName||"Context")+".Consumer";case Sk:return(e._context.displayName||"Context")+".Provider";case jw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $w:return t=e.displayName||null,t!==null?t:J0(e.type)||"Memo";case Ii:t=e._payload,e=e._init;try{return J0(e(t))}catch{}}return null}function W5(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 J0(t);case 8:return t===Ww?"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 Bi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ik(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function j5(e){var t=Ik(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var n=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){o=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(i){o=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wg(e){e._valueTracker||(e._valueTracker=j5(e))}function Pk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=Ik(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function Kg(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 ew(e,t){var r=t.checked;return gt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function x1(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=Bi(t.value!=null?t.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Lk(e,t){t=t.checked,t!=null&&Gw(e,"checked",t,!1)}function tw(e,t){Lk(e,t);var r=Bi(t.value),o=t.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?rw(e,t.type,r):t.hasOwnProperty("defaultValue")&&rw(e,t.type,Bi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function y1(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function rw(e,t,r){(t!=="number"||Kg(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ud=Array.isArray;function ku(e,t,r,o){if(e=e.options,t){t={};for(var n=0;n<r.length;n++)t["$"+r[n]]=!0;for(r=0;r<e.length;r++)n=t.hasOwnProperty("$"+e[r].value),e[r].selected!==n&&(e[r].selected=n),n&&o&&(e[r].defaultSelected=!0)}else{for(r=""+Bi(r),t=null,n=0;n<e.length;n++){if(e[n].value===r){e[n].selected=!0,o&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function ow(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return gt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function w1(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error($(92));if(Ud(r)){if(1<r.length)throw Error($(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Bi(r)}}function Tk(e,t){var r=Bi(t.value),o=Bi(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),o!=null&&(e.defaultValue=""+o)}function C1(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kk(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 nw(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kk(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Cg,Mk=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,o,n){MSApp.execUnsafeLocalFunction(function(){return e(t,r,o,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Cg=Cg||document.createElement("div"),Cg.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Cg.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ef(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Wd={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},$5=["Webkit","ms","Moz","O"];Object.keys(Wd).forEach(function(e){$5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wd[t]=Wd[e]})});function Ek(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Wd.hasOwnProperty(e)&&Wd[e]?(""+t).trim():t+"px"}function Ak(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,n=Ek(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}var q5=gt({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 aw(e,t){if(t){if(q5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function iw(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 sw=null;function qw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var lw=null,Mu=null,Eu=null;function S1(e){if(e=yf(e)){if(typeof lw!="function")throw Error($(280));var t=e.stateNode;t&&(t=Sh(t),lw(e.stateNode,e.type,t))}}function Dk(e){Mu?Eu?Eu.push(e):Eu=[e]:Mu=e}function Nk(){if(Mu){var e=Mu,t=Eu;if(Eu=Mu=null,S1(e),t)for(e=0;e<t.length;e++)S1(t[e])}}function Ok(e,t){return e(t)}function Fk(){}var M0=!1;function _k(e,t,r){if(M0)return e(t,r);M0=!0;try{return Ok(e,t,r)}finally{M0=!1,(Mu!==null||Eu!==null)&&(Fk(),Nk())}}function tf(e,t){var r=e.stateNode;if(r===null)return null;var o=Sh(r);if(o===null)return null;r=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error($(231,t,typeof r));return r}var uw=!1;if(Da)try{gu={},Object.defineProperty(gu,"passive",{get:function(){uw=!0}}),window.addEventListener("test",gu,gu),window.removeEventListener("test",gu,gu)}catch{uw=!1}var gu;function K5(e,t,r,o,n,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var jd=!1,Xg=null,Yg=!1,cw=null,X5={onError:function(e){jd=!0,Xg=e}};function Y5(e,t,r,o,n,a,i,s,l){jd=!1,Xg=null,K5.apply(X5,arguments)}function Q5(e,t,r,o,n,a,i,s,l){if(Y5.apply(this,arguments),jd){if(jd){var u=Xg;jd=!1,Xg=null}else throw Error($(198));Yg||(Yg=!0,cw=u)}}function tl(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Vk(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 b1(e){if(tl(e)!==e)throw Error($(188))}function Z5(e){var t=e.alternate;if(!t){if(t=tl(e),t===null)throw Error($(188));return t!==e?null:e}for(var r=e,o=t;;){var n=r.return;if(n===null)break;var a=n.alternate;if(a===null){if(o=n.return,o!==null){r=o;continue}break}if(n.child===a.child){for(a=n.child;a;){if(a===r)return b1(n),e;if(a===o)return b1(n),t;a=a.sibling}throw Error($(188))}if(r.return!==o.return)r=n,o=a;else{for(var i=!1,s=n.child;s;){if(s===r){i=!0,r=n,o=a;break}if(s===o){i=!0,o=n,r=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===r){i=!0,r=a,o=n;break}if(s===o){i=!0,o=a,r=n;break}s=s.sibling}if(!i)throw Error($(189))}}if(r.alternate!==o)throw Error($(190))}if(r.tag!==3)throw Error($(188));return r.stateNode.current===r?e:t}function Bk(e){return e=Z5(e),e!==null?Hk(e):null}function Hk(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Hk(e);if(t!==null)return t;e=e.sibling}return null}var Uk=go.unstable_scheduleCallback,R1=go.unstable_cancelCallback,J5=go.unstable_shouldYield,eG=go.unstable_requestPaint,Rt=go.unstable_now,tG=go.unstable_getCurrentPriorityLevel,Kw=go.unstable_ImmediatePriority,zk=go.unstable_UserBlockingPriority,Qg=go.unstable_NormalPriority,rG=go.unstable_LowPriority,Gk=go.unstable_IdlePriority,xh=null,na=null;function oG(e){if(na&&typeof na.onCommitFiberRoot=="function")try{na.onCommitFiberRoot(xh,e,void 0,(e.current.flags&128)===128)}catch{}}var yn=Math.clz32?Math.clz32:iG,nG=Math.log,aG=Math.LN2;function iG(e){return e>>>=0,e===0?32:31-(nG(e)/aG|0)|0}var Sg=64,bg=4194304;function zd(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 Zg(e,t){var r=e.pendingLanes;if(r===0)return 0;var o=0,n=e.suspendedLanes,a=e.pingedLanes,i=r&268435455;if(i!==0){var s=i&~n;s!==0?o=zd(s):(a&=i,a!==0&&(o=zd(a)))}else i=r&~n,i!==0?o=zd(i):a!==0&&(o=zd(a));if(o===0)return 0;if(t!==0&&t!==o&&!(t&n)&&(n=o&-o,a=t&-t,n>=a||n===16&&(a&4194240)!==0))return t;if(o&4&&(o|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)r=31-yn(t),n=1<<r,o|=e[r],t&=~n;return o}function sG(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 lG(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-yn(a),s=1<<i,l=n[i];l===-1?(!(s&r)||s&o)&&(n[i]=sG(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function dw(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Wk(){var e=Sg;return Sg<<=1,!(Sg&4194240)&&(Sg=64),e}function E0(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function vf(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yn(t),e[t]=r}function uG(e,t){var r=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 o=e.eventTimes;for(e=e.expirationTimes;0<r;){var n=31-yn(r),a=1<<n;t[n]=0,o[n]=-1,e[n]=-1,r&=~a}}function Xw(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-yn(r),n=1<<o;n&t|e[o]&t&&(e[o]|=t),r&=~n}}var We=0;function jk(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var $k,Yw,qk,Kk,Xk,fw=!1,Rg=[],Ei=null,Ai=null,Di=null,rf=new Map,of=new Map,Li=[],cG="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 I1(e,t){switch(e){case"focusin":case"focusout":Ei=null;break;case"dragenter":case"dragleave":Ai=null;break;case"mouseover":case"mouseout":Di=null;break;case"pointerover":case"pointerout":rf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":of.delete(t.pointerId)}}function Dd(e,t,r,o,n,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:a,targetContainers:[n]},t!==null&&(t=yf(t),t!==null&&Yw(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function dG(e,t,r,o,n){switch(t){case"focusin":return Ei=Dd(Ei,e,t,r,o,n),!0;case"dragenter":return Ai=Dd(Ai,e,t,r,o,n),!0;case"mouseover":return Di=Dd(Di,e,t,r,o,n),!0;case"pointerover":var a=n.pointerId;return rf.set(a,Dd(rf.get(a)||null,e,t,r,o,n)),!0;case"gotpointercapture":return a=n.pointerId,of.set(a,Dd(of.get(a)||null,e,t,r,o,n)),!0}return!1}function Yk(e){var t=Ws(e.target);if(t!==null){var r=tl(t);if(r!==null){if(t=r.tag,t===13){if(t=Vk(r),t!==null){e.blockedOn=t,Xk(e.priority,function(){qk(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=pw(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);sw=o,r.target.dispatchEvent(o),sw=null}else return t=yf(r),t!==null&&Yw(t),e.blockedOn=r,!1;t.shift()}return!0}function P1(e,t,r){Vg(e)&&r.delete(t)}function fG(){fw=!1,Ei!==null&&Vg(Ei)&&(Ei=null),Ai!==null&&Vg(Ai)&&(Ai=null),Di!==null&&Vg(Di)&&(Di=null),rf.forEach(P1),of.forEach(P1)}function Nd(e,t){e.blockedOn===t&&(e.blockedOn=null,fw||(fw=!0,go.unstable_scheduleCallback(go.unstable_NormalPriority,fG)))}function nf(e){function t(n){return Nd(n,e)}if(0<Rg.length){Nd(Rg[0],e);for(var r=1;r<Rg.length;r++){var o=Rg[r];o.blockedOn===e&&(o.blockedOn=null)}}for(Ei!==null&&Nd(Ei,e),Ai!==null&&Nd(Ai,e),Di!==null&&Nd(Di,e),rf.forEach(t),of.forEach(t),r=0;r<Li.length;r++)o=Li[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<Li.length&&(r=Li[0],r.blockedOn===null);)Yk(r),r.blockedOn===null&&Li.shift()}var Au=_a.ReactCurrentBatchConfig,Jg=!0;function pG(e,t,r,o){var n=We,a=Au.transition;Au.transition=null;try{We=1,Qw(e,t,r,o)}finally{We=n,Au.transition=a}}function mG(e,t,r,o){var n=We,a=Au.transition;Au.transition=null;try{We=4,Qw(e,t,r,o)}finally{We=n,Au.transition=a}}function Qw(e,t,r,o){if(Jg){var n=pw(e,t,r,o);if(n===null)V0(e,t,o,eh,r),I1(e,o);else if(dG(n,e,t,r,o))o.stopPropagation();else if(I1(e,o),t&4&&-1<cG.indexOf(e)){for(;n!==null;){var a=yf(n);if(a!==null&&$k(a),a=pw(e,t,r,o),a===null&&V0(e,t,o,eh,r),a===n)break;n=a}n!==null&&o.stopPropagation()}else V0(e,t,o,null,r)}}var eh=null;function pw(e,t,r,o){if(eh=null,e=qw(o),e=Ws(e),e!==null)if(t=tl(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Vk(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return eh=e,null}function Qk(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(tG()){case Kw:return 1;case zk:return 4;case Qg:case rG:return 16;case Gk:return 536870912;default:return 16}default:return 16}}var ki=null,Zw=null,Bg=null;function Zk(){if(Bg)return Bg;var e,t=Zw,r=t.length,o,n="value"in ki?ki.value:ki.textContent,a=n.length;for(e=0;e<r&&t[e]===n[e];e++);var i=r-e;for(o=1;o<=i&&t[r-o]===n[a-o];o++);return Bg=n.slice(e,1<o?1-o:void 0)}function Hg(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 Ig(){return!0}function L1(){return!1}function ho(e){function t(r,o,n,a,i){this._reactName=r,this._targetInst=n,this.type=o,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Ig:L1,this.isPropagationStopped=L1,this}return gt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ig)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ig)},persist:function(){},isPersistent:Ig}),t}var zu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jw=ho(zu),xf=gt({},zu,{view:0,detail:0}),gG=ho(xf),A0,D0,Od,yh=gt({},xf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eC,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!==Od&&(Od&&e.type==="mousemove"?(A0=e.screenX-Od.screenX,D0=e.screenY-Od.screenY):D0=A0=0,Od=e),A0)},movementY:function(e){return"movementY"in e?e.movementY:D0}}),T1=ho(yh),hG=gt({},yh,{dataTransfer:0}),vG=ho(hG),xG=gt({},xf,{relatedTarget:0}),N0=ho(xG),yG=gt({},zu,{animationName:0,elapsedTime:0,pseudoElement:0}),wG=ho(yG),CG=gt({},zu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),SG=ho(CG),bG=gt({},zu,{data:0}),k1=ho(bG),RG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},IG={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"},PG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function LG(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=PG[e])?!!t[e]:!1}function eC(){return LG}var TG=gt({},xf,{key:function(e){if(e.key){var t=RG[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hg(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?IG[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eC,charCode:function(e){return e.type==="keypress"?Hg(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hg(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kG=ho(TG),MG=gt({},yh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),M1=ho(MG),EG=gt({},xf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eC}),AG=ho(EG),DG=gt({},zu,{propertyName:0,elapsedTime:0,pseudoElement:0}),NG=ho(DG),OG=gt({},yh,{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}),FG=ho(OG),_G=[9,13,27,32],tC=Da&&"CompositionEvent"in window,$d=null;Da&&"documentMode"in document&&($d=document.documentMode);var VG=Da&&"TextEvent"in window&&!$d,Jk=Da&&(!tC||$d&&8<$d&&11>=$d),E1=String.fromCharCode(32),A1=!1;function eM(e,t){switch(e){case"keyup":return _G.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yu=!1;function BG(e,t){switch(e){case"compositionend":return tM(t);case"keypress":return t.which!==32?null:(A1=!0,E1);case"textInput":return e=t.data,e===E1&&A1?null:e;default:return null}}function HG(e,t){if(yu)return e==="compositionend"||!tC&&eM(e,t)?(e=Zk(),Bg=Zw=ki=null,yu=!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 Jk&&t.locale!=="ko"?null:t.data;default:return null}}var UG={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 D1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!UG[e.type]:t==="textarea"}function rM(e,t,r,o){Dk(o),t=th(t,"onChange"),0<t.length&&(r=new Jw("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var qd=null,af=null;function zG(e){pM(e,0)}function wh(e){var t=Su(e);if(Pk(t))return e}function GG(e,t){if(e==="change")return t}var oM=!1;Da&&(Da?(Lg="oninput"in document,Lg||(O0=document.createElement("div"),O0.setAttribute("oninput","return;"),Lg=typeof O0.oninput=="function"),Pg=Lg):Pg=!1,oM=Pg&&(!document.documentMode||9<document.documentMode));var Pg,Lg,O0;function N1(){qd&&(qd.detachEvent("onpropertychange",nM),af=qd=null)}function nM(e){if(e.propertyName==="value"&&wh(af)){var t=[];rM(t,af,e,qw(e)),_k(zG,t)}}function WG(e,t,r){e==="focusin"?(N1(),qd=t,af=r,qd.attachEvent("onpropertychange",nM)):e==="focusout"&&N1()}function jG(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wh(af)}function $G(e,t){if(e==="click")return wh(t)}function qG(e,t){if(e==="input"||e==="change")return wh(t)}function KG(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Cn=typeof Object.is=="function"?Object.is:KG;function sf(e,t){if(Cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var n=r[o];if(!X0.call(t,n)||!Cn(e[n],t[n]))return!1}return!0}function O1(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function F1(e,t){var r=O1(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=O1(r)}}function aM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?aM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iM(){for(var e=window,t=Kg();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Kg(e.document)}return t}function rC(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 XG(e){var t=iM(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&aM(r.ownerDocument.documentElement,r)){if(o!==null&&rC(r)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=r.textContent.length,a=Math.min(o.start,n);o=o.end===void 0?a:Math.min(o.end,n),!e.extend&&a>o&&(n=o,o=a,a=n),n=F1(r,a);var i=F1(r,o);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>o?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var YG=Da&&"documentMode"in document&&11>=document.documentMode,wu=null,mw=null,Kd=null,gw=!1;function _1(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;gw||wu==null||wu!==Kg(o)||(o=wu,"selectionStart"in o&&rC(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Kd&&sf(Kd,o)||(Kd=o,o=th(mw,"onSelect"),0<o.length&&(t=new Jw("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=wu)))}function Tg(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Cu={animationend:Tg("Animation","AnimationEnd"),animationiteration:Tg("Animation","AnimationIteration"),animationstart:Tg("Animation","AnimationStart"),transitionend:Tg("Transition","TransitionEnd")},F0={},sM={};Da&&(sM=document.createElement("div").style,"AnimationEvent"in window||(delete Cu.animationend.animation,delete Cu.animationiteration.animation,delete Cu.animationstart.animation),"TransitionEvent"in window||delete Cu.transitionend.transition);function Ch(e){if(F0[e])return F0[e];if(!Cu[e])return e;var t=Cu[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in sM)return F0[e]=t[r];return e}var lM=Ch("animationend"),uM=Ch("animationiteration"),cM=Ch("animationstart"),dM=Ch("transitionend"),fM=new Map,V1="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 Ui(e,t){fM.set(e,t),el(t,[e])}for(kg=0;kg<V1.length;kg++)Mg=V1[kg],B1=Mg.toLowerCase(),H1=Mg[0].toUpperCase()+Mg.slice(1),Ui(B1,"on"+H1);var Mg,B1,H1,kg;Ui(lM,"onAnimationEnd");Ui(uM,"onAnimationIteration");Ui(cM,"onAnimationStart");Ui("dblclick","onDoubleClick");Ui("focusin","onFocus");Ui("focusout","onBlur");Ui(dM,"onTransitionEnd");Ou("onMouseEnter",["mouseout","mouseover"]);Ou("onMouseLeave",["mouseout","mouseover"]);Ou("onPointerEnter",["pointerout","pointerover"]);Ou("onPointerLeave",["pointerout","pointerover"]);el("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));el("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));el("onBeforeInput",["compositionend","keypress","textInput","paste"]);el("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));el("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));el("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gd="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(" "),QG=new Set("cancel close invalid load scroll toggle".split(" ").concat(Gd));function U1(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,Q5(o,t,void 0,e),e.currentTarget=null}function pM(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],n=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var i=o.length-1;0<=i;i--){var s=o[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&n.isPropagationStopped())break e;U1(n,s,u),a=l}else for(i=0;i<o.length;i++){if(s=o[i],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&n.isPropagationStopped())break e;U1(n,s,u),a=l}}}if(Yg)throw e=cw,Yg=!1,cw=null,e}function tt(e,t){var r=t[ww];r===void 0&&(r=t[ww]=new Set);var o=e+"__bubble";r.has(o)||(mM(t,e,2,!1),r.add(o))}function _0(e,t,r){var o=0;t&&(o|=4),mM(r,e,o,t)}var Eg="_reactListening"+Math.random().toString(36).slice(2);function lf(e){if(!e[Eg]){e[Eg]=!0,Ck.forEach(function(r){r!=="selectionchange"&&(QG.has(r)||_0(r,!1,e),_0(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Eg]||(t[Eg]=!0,_0("selectionchange",!1,t))}}function mM(e,t,r,o){switch(Qk(t)){case 1:var n=pG;break;case 4:n=mG;break;default:n=Qw}r=n.bind(null,t,r,e),n=void 0,!uw||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),o?n!==void 0?e.addEventListener(t,r,{capture:!0,passive:n}):e.addEventListener(t,r,!0):n!==void 0?e.addEventListener(t,r,{passive:n}):e.addEventListener(t,r,!1)}function V0(e,t,r,o,n){var a=o;if(!(t&1)&&!(t&2)&&o!==null)e:for(;;){if(o===null)return;var i=o.tag;if(i===3||i===4){var s=o.stateNode.containerInfo;if(s===n||s.nodeType===8&&s.parentNode===n)break;if(i===4)for(i=o.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=Ws(s),i===null)return;if(l=i.tag,l===5||l===6){o=a=i;continue e}s=s.parentNode}}o=o.return}_k(function(){var u=a,c=qw(r),d=[];e:{var f=fM.get(e);if(f!==void 0){var p=Jw,g=e;switch(e){case"keypress":if(Hg(r)===0)break e;case"keydown":case"keyup":p=kG;break;case"focusin":g="focus",p=N0;break;case"focusout":g="blur",p=N0;break;case"beforeblur":case"afterblur":p=N0;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=T1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=vG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=AG;break;case lM:case uM:case cM:p=wG;break;case dM:p=NG;break;case"scroll":p=gG;break;case"wheel":p=FG;break;case"copy":case"cut":case"paste":p=SG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=M1}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=tf(v,h),w!=null&&m.push(uf(v,w,y)))),x)break;v=v.return}0<m.length&&(f=new p(f,g,null,r,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&r!==sw&&(g=r.relatedTarget||r.fromElement)&&(Ws(g)||g[Na]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=r.relatedTarget||r.toElement,p=u,g=g?Ws(g):null,g!==null&&(x=tl(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(m=T1,w="onMouseLeave",h="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=M1,w="onPointerLeave",h="onPointerEnter",v="pointer"),x=p==null?f:Su(p),y=g==null?f:Su(g),f=new m(w,v+"leave",p,r,c),f.target=x,f.relatedTarget=y,w=null,Ws(c)===u&&(m=new m(h,v+"enter",g,r,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=hu(y))v++;for(y=0,w=h;w;w=hu(w))y++;for(;0<v-y;)m=hu(m),v--;for(;0<y-v;)h=hu(h),y--;for(;v--;){if(m===h||h!==null&&m===h.alternate)break t;m=hu(m),h=hu(h)}m=null}else m=null;p!==null&&z1(d,f,p,m,!1),g!==null&&x!==null&&z1(d,x,g,m,!0)}}e:{if(f=u?Su(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=GG;else if(D1(f))if(oM)C=qG;else{C=jG;var b=WG}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=$G);if(C&&(C=C(e,u))){rM(d,C,r,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&rw(f,"number",f.value)}switch(b=u?Su(u):window,e){case"focusin":(D1(b)||b.contentEditable==="true")&&(wu=b,mw=u,Kd=null);break;case"focusout":Kd=mw=wu=null;break;case"mousedown":gw=!0;break;case"contextmenu":case"mouseup":case"dragend":gw=!1,_1(d,r,c);break;case"selectionchange":if(YG)break;case"keydown":case"keyup":_1(d,r,c)}var S;if(tC)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 yu?eM(e,r)&&(I="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(I="onCompositionStart");I&&(Jk&&r.locale!=="ko"&&(yu||I!=="onCompositionStart"?I==="onCompositionEnd"&&yu&&(S=Zk()):(ki=c,Zw="value"in ki?ki.value:ki.textContent,yu=!0)),b=th(u,I),0<b.length&&(I=new k1(I,e,null,r,c),d.push({event:I,listeners:b}),S?I.data=S:(S=tM(r),S!==null&&(I.data=S)))),(S=VG?BG(e,r):HG(e,r))&&(u=th(u,"onBeforeInput"),0<u.length&&(c=new k1("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=S))}pM(d,t)})}function uf(e,t,r){return{instance:e,listener:t,currentTarget:r}}function th(e,t){for(var r=t+"Capture",o=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=tf(e,r),a!=null&&o.unshift(uf(e,a,n)),a=tf(e,t),a!=null&&o.push(uf(e,a,n))),e=e.return}return o}function hu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function z1(e,t,r,o,n){for(var a=t._reactName,i=[];r!==null&&r!==o;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===o)break;s.tag===5&&u!==null&&(s=u,n?(l=tf(r,a),l!=null&&i.unshift(uf(r,l,s))):n||(l=tf(r,a),l!=null&&i.push(uf(r,l,s)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var ZG=/\r\n?/g,JG=/\u0000|\uFFFD/g;function G1(e){return(typeof e=="string"?e:""+e).replace(ZG,`
|
|
9
|
-
`).replace(JG,"")}function Ag(e,t,r){if(t=G1(t),G1(e)!==t&&r)throw Error($(425))}function rh(){}var hw=null,vw=null;function xw(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 yw=typeof setTimeout=="function"?setTimeout:void 0,eW=typeof clearTimeout=="function"?clearTimeout:void 0,W1=typeof Promise=="function"?Promise:void 0,tW=typeof queueMicrotask=="function"?queueMicrotask:typeof W1<"u"?function(e){return W1.resolve(null).then(e).catch(rW)}:yw;function rW(e){setTimeout(function(){throw e})}function B0(e,t){var r=t,o=0;do{var n=r.nextSibling;if(e.removeChild(r),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(o===0){e.removeChild(n),nf(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=n}while(r);nf(t)}function Ni(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 j1(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Gu=Math.random().toString(36).slice(2),oa="__reactFiber$"+Gu,cf="__reactProps$"+Gu,Na="__reactContainer$"+Gu,ww="__reactEvents$"+Gu,oW="__reactListeners$"+Gu,nW="__reactHandles$"+Gu;function Ws(e){var t=e[oa];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Na]||r[oa]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=j1(e);e!==null;){if(r=e[oa])return r;e=j1(e)}return t}e=r,r=e.parentNode}return null}function yf(e){return e=e[oa]||e[Na],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Su(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function Sh(e){return e[cf]||null}var Cw=[],bu=-1;function zi(e){return{current:e}}function rt(e){0>bu||(e.current=Cw[bu],Cw[bu]=null,bu--)}function Qe(e,t){bu++,Cw[bu]=e.current,e.current=t}var Hi={},xr=zi(Hi),Xr=zi(!1),Xs=Hi;function Fu(e,t){var r=e.type.contextTypes;if(!r)return Hi;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var n={},a;for(a in r)n[a]=t[a];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function Yr(e){return e=e.childContextTypes,e!=null}function oh(){rt(Xr),rt(xr)}function $1(e,t,r){if(xr.current!==Hi)throw Error($(168));Qe(xr,t),Qe(Xr,r)}function gM(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var n in o)if(!(n in t))throw Error($(108,W5(e)||"Unknown",n));return gt({},r,o)}function nh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hi,Xs=xr.current,Qe(xr,e),Qe(Xr,Xr.current),!0}function q1(e,t,r){var o=e.stateNode;if(!o)throw Error($(169));r?(e=gM(e,t,Xs),o.__reactInternalMemoizedMergedChildContext=e,rt(Xr),rt(xr),Qe(xr,e)):rt(Xr),Qe(Xr,r)}var ka=null,bh=!1,H0=!1;function hM(e){ka===null?ka=[e]:ka.push(e)}function aW(e){bh=!0,hM(e)}function Gi(){if(!H0&&ka!==null){H0=!0;var e=0,t=We;try{var r=ka;for(We=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}ka=null,bh=!1}catch(n){throw ka!==null&&(ka=ka.slice(e+1)),Uk(Kw,Gi),n}finally{We=t,H0=!1}}return null}var Ru=[],Iu=0,ah=null,ih=0,Oo=[],Fo=0,Ys=null,Ma=1,Ea="";function zs(e,t){Ru[Iu++]=ih,Ru[Iu++]=ah,ah=e,ih=t}function vM(e,t,r){Oo[Fo++]=Ma,Oo[Fo++]=Ea,Oo[Fo++]=Ys,Ys=e;var o=Ma;e=Ea;var n=32-yn(o)-1;o&=~(1<<n),r+=1;var a=32-yn(t)+n;if(30<a){var i=n-n%5;a=(o&(1<<i)-1).toString(32),o>>=i,n-=i,Ma=1<<32-yn(t)+n|r<<n|o,Ea=a+e}else Ma=1<<a|r<<n|o,Ea=e}function oC(e){e.return!==null&&(zs(e,1),vM(e,1,0))}function nC(e){for(;e===ah;)ah=Ru[--Iu],Ru[Iu]=null,ih=Ru[--Iu],Ru[Iu]=null;for(;e===Ys;)Ys=Oo[--Fo],Oo[Fo]=null,Ea=Oo[--Fo],Oo[Fo]=null,Ma=Oo[--Fo],Oo[Fo]=null}var mo=null,po=null,lt=!1,xn=null;function xM(e,t){var r=_o(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function K1(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,mo=e,po=Ni(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,mo=e,po=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Ys!==null?{id:Ma,overflow:Ea}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=_o(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,mo=e,po=null,!0):!1;default:return!1}}function Sw(e){return(e.mode&1)!==0&&(e.flags&128)===0}function bw(e){if(lt){var t=po;if(t){var r=t;if(!K1(e,t)){if(Sw(e))throw Error($(418));t=Ni(r.nextSibling);var o=mo;t&&K1(e,t)?xM(o,r):(e.flags=e.flags&-4097|2,lt=!1,mo=e)}}else{if(Sw(e))throw Error($(418));e.flags=e.flags&-4097|2,lt=!1,mo=e}}}function X1(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mo=e}function Dg(e){if(e!==mo)return!1;if(!lt)return X1(e),lt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!xw(e.type,e.memoizedProps)),t&&(t=po)){if(Sw(e))throw yM(),Error($(418));for(;t;)xM(e,t),t=Ni(t.nextSibling)}if(X1(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){po=Ni(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}po=null}}else po=mo?Ni(e.stateNode.nextSibling):null;return!0}function yM(){for(var e=po;e;)e=Ni(e.nextSibling)}function _u(){po=mo=null,lt=!1}function aC(e){xn===null?xn=[e]:xn.push(e)}var iW=_a.ReactCurrentBatchConfig;function Fd(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error($(309));var o=r.stateNode}if(!o)throw Error($(147,e));var n=o,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($(284));if(!r._owner)throw Error($(290,e))}return e}function Ng(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Y1(e){var t=e._init;return t(e._payload)}function wM(e){function t(h,v){if(e){var y=h.deletions;y===null?(h.deletions=[v],h.flags|=16):y.push(v)}}function r(h,v){if(!e)return null;for(;v!==null;)t(h,v),v=v.sibling;return null}function o(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=Vi(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=q0(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===xu?c(h,v,y.props.children,w,y.key):v!==null&&(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ii&&Y1(C)===v.type)?(w=n(v,y.props),w.ref=Fd(h,v,y),w.return=h,w):(w=qg(y.type,y.key,y.props,null,h.mode,w),w.ref=Fd(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=K0(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=Ks(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=q0(""+v,h.mode,y),v.return=h,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case yg:return y=qg(v.type,v.key,v.props,null,h.mode,y),y.ref=Fd(h,null,v),y.return=h,y;case vu:return v=K0(v,h.mode,y),v.return=h,v;case Ii:var w=v._init;return d(h,w(v._payload),y)}if(Ud(v)||Ad(v))return v=Ks(v,h.mode,y,null),v.return=h,v;Ng(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 yg:return y.key===C?l(h,v,y,w):null;case vu:return y.key===C?u(h,v,y,w):null;case Ii:return C=y._init,f(h,v,C(y._payload),w)}if(Ud(y)||Ad(y))return C!==null?null:c(h,v,y,w,null);Ng(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 yg:return h=h.get(w.key===null?y:w.key)||null,l(v,h,w,C);case vu:return h=h.get(w.key===null?y:w.key)||null,u(v,h,w,C);case Ii:var b=w._init;return p(h,v,y,b(w._payload),C)}if(Ud(w)||Ad(w))return h=h.get(y)||null,c(v,h,w,C,null);Ng(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 r(h,S),lt&&zs(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 lt&&zs(h,I),C}for(S=o(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)}),lt&&zs(h,I),C}function m(h,v,y,w){var C=Ad(y);if(typeof C!="function")throw Error($(150));if(y=C.call(y),y==null)throw Error($(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 r(h,S),lt&&zs(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 lt&&zs(h,I),C}for(S=o(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)}),lt&&zs(h,I),C}function x(h,v,y,w){if(typeof y=="object"&&y!==null&&y.type===xu&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case yg:e:{for(var C=y.key,b=v;b!==null;){if(b.key===C){if(C=y.type,C===xu){if(b.tag===7){r(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===Ii&&Y1(C)===b.type){r(h,b.sibling),v=n(b,y.props),v.ref=Fd(h,b,y),v.return=h,h=v;break e}r(h,b);break}else t(h,b);b=b.sibling}y.type===xu?(v=Ks(y.props.children,h.mode,w,y.key),v.return=h,h=v):(w=qg(y.type,y.key,y.props,null,h.mode,w),w.ref=Fd(h,v,y),w.return=h,h=w)}return i(h);case vu: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){r(h,v.sibling),v=n(v,y.children||[]),v.return=h,h=v;break e}else{r(h,v);break}else t(h,v);v=v.sibling}v=K0(y,h.mode,w),v.return=h,h=v}return i(h);case Ii:return b=y._init,x(h,v,b(y._payload),w)}if(Ud(y))return g(h,v,y,w);if(Ad(y))return m(h,v,y,w);Ng(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,v!==null&&v.tag===6?(r(h,v.sibling),v=n(v,y),v.return=h,h=v):(r(h,v),v=q0(y,h.mode,w),v.return=h,h=v),i(h)):r(h,v)}return x}var Vu=wM(!0),CM=wM(!1),sh=zi(null),lh=null,Pu=null,iC=null;function sC(){iC=Pu=lh=null}function lC(e){var t=sh.current;rt(sh),e._currentValue=t}function Rw(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function Du(e,t){lh=e,iC=Pu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Kr=!0),e.firstContext=null)}function Bo(e){var t=e._currentValue;if(iC!==e)if(e={context:e,memoizedValue:t,next:null},Pu===null){if(lh===null)throw Error($(308));Pu=e,lh.dependencies={lanes:0,firstContext:e}}else Pu=Pu.next=e;return t}var js=null;function uC(e){js===null?js=[e]:js.push(e)}function SM(e,t,r,o){var n=t.interleaved;return n===null?(r.next=r,uC(t)):(r.next=n.next,n.next=r),t.interleaved=r,Oa(e,o)}function Oa(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Pi=!1;function cC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bM(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 Aa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Oi(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,De&2){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,Oa(e,r)}return n=o.interleaved,n===null?(t.next=t,uC(o)):(t.next=n.next,n.next=t),o.interleaved=t,Oa(e,r)}function Ug(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,Xw(e,r)}}function Q1(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var n=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?n=a=i:a=a.next=i,r=r.next}while(r!==null);a===null?n=a=t:a=a.next=t}else n=a=t;r={baseState:o.baseState,firstBaseUpdate:n,lastBaseUpdate:a,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function uh(e,t,r,o){var n=e.updateQueue;Pi=!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((o&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=r,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=gt({},d,f);break e;case 2:Pi=!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);Zs|=i,e.lanes=i,e.memoizedState=d}}function Z1(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],n=o.callback;if(n!==null){if(o.callback=null,o=r,typeof n!="function")throw Error($(191,n));n.call(o)}}}var wf={},aa=zi(wf),df=zi(wf),ff=zi(wf);function $s(e){if(e===wf)throw Error($(174));return e}function dC(e,t){switch(Qe(ff,t),Qe(df,e),Qe(aa,wf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:nw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=nw(t,e)}rt(aa),Qe(aa,t)}function Bu(){rt(aa),rt(df),rt(ff)}function RM(e){$s(ff.current);var t=$s(aa.current),r=nw(t,e.type);t!==r&&(Qe(df,e),Qe(aa,r))}function fC(e){df.current===e&&(rt(aa),rt(df))}var pt=zi(0);function ch(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 U0=[];function pC(){for(var e=0;e<U0.length;e++)U0[e]._workInProgressVersionPrimary=null;U0.length=0}var zg=_a.ReactCurrentDispatcher,z0=_a.ReactCurrentBatchConfig,Qs=0,mt=null,_t=null,qt=null,dh=!1,Xd=!1,pf=0,sW=0;function gr(){throw Error($(321))}function mC(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Cn(e[r],t[r]))return!1;return!0}function gC(e,t,r,o,n,a){if(Qs=a,mt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,zg.current=e===null||e.memoizedState===null?dW:fW,e=r(o,n),Xd){a=0;do{if(Xd=!1,pf=0,25<=a)throw Error($(301));a+=1,qt=_t=null,t.updateQueue=null,zg.current=pW,e=r(o,n)}while(Xd)}if(zg.current=fh,t=_t!==null&&_t.next!==null,Qs=0,qt=_t=mt=null,dh=!1,t)throw Error($(300));return e}function hC(){var e=pf!==0;return pf=0,e}function ra(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?mt.memoizedState=qt=e:qt=qt.next=e,qt}function Ho(){if(_t===null){var e=mt.alternate;e=e!==null?e.memoizedState:null}else e=_t.next;var t=qt===null?mt.memoizedState:qt.next;if(t!==null)qt=t,_t=e;else{if(e===null)throw Error($(310));_t=e,e={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},qt===null?mt.memoizedState=qt=e:qt=qt.next=e}return qt}function mf(e,t){return typeof t=="function"?t(e):t}function G0(e){var t=Ho(),r=t.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=e;var o=_t,n=o.baseQueue,a=r.pending;if(a!==null){if(n!==null){var i=n.next;n.next=a.next,a.next=i}o.baseQueue=n=a,r.pending=null}if(n!==null){a=n.next,o=o.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if((Qs&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),o=u.hasEagerState?u.eagerState:e(o,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,i=o):l=l.next=d,mt.lanes|=c,Zs|=c}u=u.next}while(u!==null&&u!==a);l===null?i=o:l.next=s,Cn(o,t.memoizedState)||(Kr=!0),t.memoizedState=o,t.baseState=i,t.baseQueue=l,r.lastRenderedState=o}if(e=r.interleaved,e!==null){n=e;do a=n.lane,mt.lanes|=a,Zs|=a,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function W0(e){var t=Ho(),r=t.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=e;var o=r.dispatch,n=r.pending,a=t.memoizedState;if(n!==null){r.pending=null;var i=n=n.next;do a=e(a,i.action),i=i.next;while(i!==n);Cn(a,t.memoizedState)||(Kr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function IM(){}function PM(e,t){var r=mt,o=Ho(),n=t(),a=!Cn(o.memoizedState,n);if(a&&(o.memoizedState=n,Kr=!0),o=o.queue,vC(kM.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||qt!==null&&qt.memoizedState.tag&1){if(r.flags|=2048,gf(9,TM.bind(null,r,o,n,t),void 0,null),Kt===null)throw Error($(349));Qs&30||LM(r,t,n)}return n}function LM(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=mt.updateQueue,t===null?(t={lastEffect:null,stores:null},mt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function TM(e,t,r,o){t.value=r,t.getSnapshot=o,MM(t)&&EM(e)}function kM(e,t,r){return r(function(){MM(t)&&EM(e)})}function MM(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Cn(e,r)}catch{return!0}}function EM(e){var t=Oa(e,1);t!==null&&wn(t,e,1,-1)}function J1(e){var t=ra();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mf,lastRenderedState:e},t.queue=e,e=e.dispatch=cW.bind(null,mt,e),[t.memoizedState,e]}function gf(e,t,r,o){return e={tag:e,create:t,destroy:r,deps:o,next:null},t=mt.updateQueue,t===null?(t={lastEffect:null,stores:null},mt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e)),e}function AM(){return Ho().memoizedState}function Gg(e,t,r,o){var n=ra();mt.flags|=e,n.memoizedState=gf(1|t,r,void 0,o===void 0?null:o)}function Rh(e,t,r,o){var n=Ho();o=o===void 0?null:o;var a=void 0;if(_t!==null){var i=_t.memoizedState;if(a=i.destroy,o!==null&&mC(o,i.deps)){n.memoizedState=gf(t,r,a,o);return}}mt.flags|=e,n.memoizedState=gf(1|t,r,a,o)}function ek(e,t){return Gg(8390656,8,e,t)}function vC(e,t){return Rh(2048,8,e,t)}function DM(e,t){return Rh(4,2,e,t)}function NM(e,t){return Rh(4,4,e,t)}function OM(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 FM(e,t,r){return r=r!=null?r.concat([e]):null,Rh(4,4,OM.bind(null,t,e),r)}function xC(){}function _M(e,t){var r=Ho();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&mC(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function VM(e,t){var r=Ho();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&mC(t,o[1])?o[0]:(e=e(),r.memoizedState=[e,t],e)}function BM(e,t,r){return Qs&21?(Cn(r,t)||(r=Wk(),mt.lanes|=r,Zs|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Kr=!0),e.memoizedState=r)}function lW(e,t){var r=We;We=r!==0&&4>r?r:4,e(!0);var o=z0.transition;z0.transition={};try{e(!1),t()}finally{We=r,z0.transition=o}}function HM(){return Ho().memoizedState}function uW(e,t,r){var o=_i(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},UM(e))zM(t,r);else if(r=SM(e,t,r,o),r!==null){var n=Nr();wn(r,e,o,n),GM(r,t,o)}}function cW(e,t,r){var o=_i(e),n={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(UM(e))zM(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,r);if(n.hasEagerState=!0,n.eagerState=s,Cn(s,i)){var l=t.interleaved;l===null?(n.next=n,uC(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}r=SM(e,t,n,o),r!==null&&(n=Nr(),wn(r,e,o,n),GM(r,t,o))}}function UM(e){var t=e.alternate;return e===mt||t!==null&&t===mt}function zM(e,t){Xd=dh=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function GM(e,t,r){if(r&4194240){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,Xw(e,r)}}var fh={readContext:Bo,useCallback:gr,useContext:gr,useEffect:gr,useImperativeHandle:gr,useInsertionEffect:gr,useLayoutEffect:gr,useMemo:gr,useReducer:gr,useRef:gr,useState:gr,useDebugValue:gr,useDeferredValue:gr,useTransition:gr,useMutableSource:gr,useSyncExternalStore:gr,useId:gr,unstable_isNewReconciler:!1},dW={readContext:Bo,useCallback:function(e,t){return ra().memoizedState=[e,t===void 0?null:t],e},useContext:Bo,useEffect:ek,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Gg(4194308,4,OM.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Gg(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gg(4,2,e,t)},useMemo:function(e,t){var r=ra();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=ra();return t=r!==void 0?r(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=uW.bind(null,mt,e),[o.memoizedState,e]},useRef:function(e){var t=ra();return e={current:e},t.memoizedState=e},useState:J1,useDebugValue:xC,useDeferredValue:function(e){return ra().memoizedState=e},useTransition:function(){var e=J1(!1),t=e[0];return e=lW.bind(null,e[1]),ra().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=mt,n=ra();if(lt){if(r===void 0)throw Error($(407));r=r()}else{if(r=t(),Kt===null)throw Error($(349));Qs&30||LM(o,t,r)}n.memoizedState=r;var a={value:r,getSnapshot:t};return n.queue=a,ek(kM.bind(null,o,a,e),[e]),o.flags|=2048,gf(9,TM.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=ra(),t=Kt.identifierPrefix;if(lt){var r=Ea,o=Ma;r=(o&~(1<<32-yn(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=pf++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=sW++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},fW={readContext:Bo,useCallback:_M,useContext:Bo,useEffect:vC,useImperativeHandle:FM,useInsertionEffect:DM,useLayoutEffect:NM,useMemo:VM,useReducer:G0,useRef:AM,useState:function(){return G0(mf)},useDebugValue:xC,useDeferredValue:function(e){var t=Ho();return BM(t,_t.memoizedState,e)},useTransition:function(){var e=G0(mf)[0],t=Ho().memoizedState;return[e,t]},useMutableSource:IM,useSyncExternalStore:PM,useId:HM,unstable_isNewReconciler:!1},pW={readContext:Bo,useCallback:_M,useContext:Bo,useEffect:vC,useImperativeHandle:FM,useInsertionEffect:DM,useLayoutEffect:NM,useMemo:VM,useReducer:W0,useRef:AM,useState:function(){return W0(mf)},useDebugValue:xC,useDeferredValue:function(e){var t=Ho();return _t===null?t.memoizedState=e:BM(t,_t.memoizedState,e)},useTransition:function(){var e=W0(mf)[0],t=Ho().memoizedState;return[e,t]},useMutableSource:IM,useSyncExternalStore:PM,useId:HM,unstable_isNewReconciler:!1};function hn(e,t){if(e&&e.defaultProps){t=gt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Iw(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:gt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Ih={isMounted:function(e){return(e=e._reactInternals)?tl(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var o=Nr(),n=_i(e),a=Aa(o,n);a.payload=t,r!=null&&(a.callback=r),t=Oi(e,a,n),t!==null&&(wn(t,e,n,o),Ug(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=Nr(),n=_i(e),a=Aa(o,n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Oi(e,a,n),t!==null&&(wn(t,e,n,o),Ug(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Nr(),o=_i(e),n=Aa(r,o);n.tag=2,t!=null&&(n.callback=t),t=Oi(e,n,o),t!==null&&(wn(t,e,o,r),Ug(t,e,o))}};function tk(e,t,r,o,n,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,i):t.prototype&&t.prototype.isPureReactComponent?!sf(r,o)||!sf(n,a):!0}function WM(e,t,r){var o=!1,n=Hi,a=t.contextType;return typeof a=="object"&&a!==null?a=Bo(a):(n=Yr(t)?Xs:xr.current,o=t.contextTypes,a=(o=o!=null)?Fu(e,n):Hi),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ih,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function rk(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&Ih.enqueueReplaceState(t,t.state,null)}function Pw(e,t,r,o){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},cC(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=Bo(a):(a=Yr(t)?Xs:xr.current,n.context=Fu(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Iw(e,t,a,r),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&&Ih.enqueueReplaceState(n,n.state,null),uh(e,r,n,o),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function Hu(e,t){try{var r="",o=t;do r+=G5(o),o=o.return;while(o);var n=r}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{k0=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?zd(e):""}function Y5(e){switch(e.tag){case 5:return zd(e.type);case 16:return zd("Lazy");case 13:return zd("Suspense");case 19:return zd("SuspenseList");case 0:case 2:case 15:return e=M0(e.type,!1),e;case 11:return e=M0(e.type.render,!1),e;case 1:return e=M0(e.type,!0),e;default:return""}}function eC(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 Cu:return"Fragment";case yu:return"Portal";case Q0:return"Profiler";case jC:return"StrictMode";case Z0:return"Suspense";case J0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ik:return(e.displayName||"Context")+".Consumer";case Rk:return(e._context.displayName||"Context")+".Provider";case $C:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qC:return t=e.displayName||null,t!==null?t:eC(e.type)||"Memo";case Pi:t=e._payload,e=e._init;try{return eC(e(t))}catch{}}return null}function Q5(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 eC(t);case 8:return t===jC?"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 Hi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lk(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Z5(e){var t=Lk(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var n=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){o=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(i){o=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wg(e){e._valueTracker||(e._valueTracker=Z5(e))}function Tk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=Lk(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function Xg(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 tC(e,t){var r=t.checked;return gt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function C1(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=Hi(t.value!=null?t.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function kk(e,t){t=t.checked,t!=null&&WC(e,"checked",t,!1)}function rC(e,t){kk(e,t);var r=Hi(t.value),o=t.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?oC(e,t.type,r):t.hasOwnProperty("defaultValue")&&oC(e,t.type,Hi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function w1(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function oC(e,t,r){(t!=="number"||Xg(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Gd=Array.isArray;function Eu(e,t,r,o){if(e=e.options,t){t={};for(var n=0;n<r.length;n++)t["$"+r[n]]=!0;for(r=0;r<e.length;r++)n=t.hasOwnProperty("$"+e[r].value),e[r].selected!==n&&(e[r].selected=n),n&&o&&(e[r].defaultSelected=!0)}else{for(r=""+Hi(r),t=null,n=0;n<e.length;n++){if(e[n].value===r){e[n].selected=!0,o&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function nC(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return gt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function S1(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error($(92));if(Gd(r)){if(1<r.length)throw Error($(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Hi(r)}}function Mk(e,t){var r=Hi(t.value),o=Hi(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),o!=null&&(e.defaultValue=""+o)}function b1(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ek(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 aC(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ek(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Sg,Ak=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,o,n){MSApp.execUnsafeLocalFunction(function(){return e(t,r,o,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Sg=Sg||document.createElement("div"),Sg.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Sg.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function rf(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var $d={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},J5=["Webkit","ms","Moz","O"];Object.keys($d).forEach(function(e){J5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$d[t]=$d[e]})});function Dk(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||$d.hasOwnProperty(e)&&$d[e]?(""+t).trim():t+"px"}function Nk(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,n=Dk(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}var eG=gt({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 iC(e,t){if(t){if(eG[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function sC(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 lC=null;function KC(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uC=null,Au=null,Du=null;function R1(e){if(e=wf(e)){if(typeof uC!="function")throw Error($(280));var t=e.stateNode;t&&(t=bh(t),uC(e.stateNode,e.type,t))}}function Ok(e){Au?Du?Du.push(e):Du=[e]:Au=e}function Fk(){if(Au){var e=Au,t=Du;if(Du=Au=null,R1(e),t)for(e=0;e<t.length;e++)R1(t[e])}}function _k(e,t){return e(t)}function Vk(){}var E0=!1;function Bk(e,t,r){if(E0)return e(t,r);E0=!0;try{return _k(e,t,r)}finally{E0=!1,(Au!==null||Du!==null)&&(Vk(),Fk())}}function of(e,t){var r=e.stateNode;if(r===null)return null;var o=bh(r);if(o===null)return null;r=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error($(231,t,typeof r));return r}var cC=!1;if(Oa)try{vu={},Object.defineProperty(vu,"passive",{get:function(){cC=!0}}),window.addEventListener("test",vu,vu),window.removeEventListener("test",vu,vu)}catch{cC=!1}var vu;function tG(e,t,r,o,n,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var qd=!1,Yg=null,Qg=!1,dC=null,rG={onError:function(e){qd=!0,Yg=e}};function oG(e,t,r,o,n,a,i,s,l){qd=!1,Yg=null,tG.apply(rG,arguments)}function nG(e,t,r,o,n,a,i,s,l){if(oG.apply(this,arguments),qd){if(qd){var u=Yg;qd=!1,Yg=null}else throw Error($(198));Qg||(Qg=!0,dC=u)}}function ol(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Hk(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 I1(e){if(ol(e)!==e)throw Error($(188))}function aG(e){var t=e.alternate;if(!t){if(t=ol(e),t===null)throw Error($(188));return t!==e?null:e}for(var r=e,o=t;;){var n=r.return;if(n===null)break;var a=n.alternate;if(a===null){if(o=n.return,o!==null){r=o;continue}break}if(n.child===a.child){for(a=n.child;a;){if(a===r)return I1(n),e;if(a===o)return I1(n),t;a=a.sibling}throw Error($(188))}if(r.return!==o.return)r=n,o=a;else{for(var i=!1,s=n.child;s;){if(s===r){i=!0,r=n,o=a;break}if(s===o){i=!0,o=n,r=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===r){i=!0,r=a,o=n;break}if(s===o){i=!0,o=a,r=n;break}s=s.sibling}if(!i)throw Error($(189))}}if(r.alternate!==o)throw Error($(190))}if(r.tag!==3)throw Error($(188));return r.stateNode.current===r?e:t}function Uk(e){return e=aG(e),e!==null?zk(e):null}function zk(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=zk(e);if(t!==null)return t;e=e.sibling}return null}var Gk=ho.unstable_scheduleCallback,P1=ho.unstable_cancelCallback,iG=ho.unstable_shouldYield,sG=ho.unstable_requestPaint,It=ho.unstable_now,lG=ho.unstable_getCurrentPriorityLevel,XC=ho.unstable_ImmediatePriority,Wk=ho.unstable_UserBlockingPriority,Zg=ho.unstable_NormalPriority,uG=ho.unstable_LowPriority,jk=ho.unstable_IdlePriority,yh=null,aa=null;function cG(e){if(aa&&typeof aa.onCommitFiberRoot=="function")try{aa.onCommitFiberRoot(yh,e,void 0,(e.current.flags&128)===128)}catch{}}var Cn=Math.clz32?Math.clz32:pG,dG=Math.log,fG=Math.LN2;function pG(e){return e>>>=0,e===0?32:31-(dG(e)/fG|0)|0}var bg=64,Rg=4194304;function Wd(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 Jg(e,t){var r=e.pendingLanes;if(r===0)return 0;var o=0,n=e.suspendedLanes,a=e.pingedLanes,i=r&268435455;if(i!==0){var s=i&~n;s!==0?o=Wd(s):(a&=i,a!==0&&(o=Wd(a)))}else i=r&~n,i!==0?o=Wd(i):a!==0&&(o=Wd(a));if(o===0)return 0;if(t!==0&&t!==o&&!(t&n)&&(n=o&-o,a=t&-t,n>=a||n===16&&(a&4194240)!==0))return t;if(o&4&&(o|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)r=31-Cn(t),n=1<<r,o|=e[r],t&=~n;return o}function mG(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 gG(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-Cn(a),s=1<<i,l=n[i];l===-1?(!(s&r)||s&o)&&(n[i]=mG(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function fC(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $k(){var e=bg;return bg<<=1,!(bg&4194240)&&(bg=64),e}function A0(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function yf(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Cn(t),e[t]=r}function hG(e,t){var r=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 o=e.eventTimes;for(e=e.expirationTimes;0<r;){var n=31-Cn(r),a=1<<n;t[n]=0,o[n]=-1,e[n]=-1,r&=~a}}function YC(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-Cn(r),n=1<<o;n&t|e[o]&t&&(e[o]|=t),r&=~n}}var We=0;function qk(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Kk,QC,Xk,Yk,Qk,pC=!1,Ig=[],Ai=null,Di=null,Ni=null,nf=new Map,af=new Map,Ti=[],vG="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 L1(e,t){switch(e){case"focusin":case"focusout":Ai=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Ni=null;break;case"pointerover":case"pointerout":nf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":af.delete(t.pointerId)}}function Od(e,t,r,o,n,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:a,targetContainers:[n]},t!==null&&(t=wf(t),t!==null&&QC(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function xG(e,t,r,o,n){switch(t){case"focusin":return Ai=Od(Ai,e,t,r,o,n),!0;case"dragenter":return Di=Od(Di,e,t,r,o,n),!0;case"mouseover":return Ni=Od(Ni,e,t,r,o,n),!0;case"pointerover":var a=n.pointerId;return nf.set(a,Od(nf.get(a)||null,e,t,r,o,n)),!0;case"gotpointercapture":return a=n.pointerId,af.set(a,Od(af.get(a)||null,e,t,r,o,n)),!0}return!1}function Zk(e){var t=$s(e.target);if(t!==null){var r=ol(t);if(r!==null){if(t=r.tag,t===13){if(t=Hk(r),t!==null){e.blockedOn=t,Qk(e.priority,function(){Xk(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=mC(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);lC=o,r.target.dispatchEvent(o),lC=null}else return t=wf(r),t!==null&&QC(t),e.blockedOn=r,!1;t.shift()}return!0}function T1(e,t,r){Bg(e)&&r.delete(t)}function yG(){pC=!1,Ai!==null&&Bg(Ai)&&(Ai=null),Di!==null&&Bg(Di)&&(Di=null),Ni!==null&&Bg(Ni)&&(Ni=null),nf.forEach(T1),af.forEach(T1)}function Fd(e,t){e.blockedOn===t&&(e.blockedOn=null,pC||(pC=!0,ho.unstable_scheduleCallback(ho.unstable_NormalPriority,yG)))}function sf(e){function t(n){return Fd(n,e)}if(0<Ig.length){Fd(Ig[0],e);for(var r=1;r<Ig.length;r++){var o=Ig[r];o.blockedOn===e&&(o.blockedOn=null)}}for(Ai!==null&&Fd(Ai,e),Di!==null&&Fd(Di,e),Ni!==null&&Fd(Ni,e),nf.forEach(t),af.forEach(t),r=0;r<Ti.length;r++)o=Ti[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<Ti.length&&(r=Ti[0],r.blockedOn===null);)Zk(r),r.blockedOn===null&&Ti.shift()}var Nu=Ba.ReactCurrentBatchConfig,eh=!0;function CG(e,t,r,o){var n=We,a=Nu.transition;Nu.transition=null;try{We=1,ZC(e,t,r,o)}finally{We=n,Nu.transition=a}}function wG(e,t,r,o){var n=We,a=Nu.transition;Nu.transition=null;try{We=4,ZC(e,t,r,o)}finally{We=n,Nu.transition=a}}function ZC(e,t,r,o){if(eh){var n=mC(e,t,r,o);if(n===null)B0(e,t,o,th,r),L1(e,o);else if(xG(n,e,t,r,o))o.stopPropagation();else if(L1(e,o),t&4&&-1<vG.indexOf(e)){for(;n!==null;){var a=wf(n);if(a!==null&&Kk(a),a=mC(e,t,r,o),a===null&&B0(e,t,o,th,r),a===n)break;n=a}n!==null&&o.stopPropagation()}else B0(e,t,o,null,r)}}var th=null;function mC(e,t,r,o){if(th=null,e=KC(o),e=$s(e),e!==null)if(t=ol(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Hk(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return th=e,null}function Jk(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(lG()){case XC:return 1;case Wk:return 4;case Zg:case uG:return 16;case jk:return 536870912;default:return 16}default:return 16}}var Mi=null,JC=null,Hg=null;function eM(){if(Hg)return Hg;var e,t=JC,r=t.length,o,n="value"in Mi?Mi.value:Mi.textContent,a=n.length;for(e=0;e<r&&t[e]===n[e];e++);var i=r-e;for(o=1;o<=i&&t[r-o]===n[a-o];o++);return Hg=n.slice(e,1<o?1-o:void 0)}function Ug(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 Pg(){return!0}function k1(){return!1}function vo(e){function t(r,o,n,a,i){this._reactName=r,this._targetInst=n,this.type=o,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Pg:k1,this.isPropagationStopped=k1,this}return gt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Pg)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Pg)},persist:function(){},isPersistent:Pg}),t}var Wu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ew=vo(Wu),Cf=gt({},Wu,{view:0,detail:0}),SG=vo(Cf),D0,N0,_d,Ch=gt({},Cf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tw,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!==_d&&(_d&&e.type==="mousemove"?(D0=e.screenX-_d.screenX,N0=e.screenY-_d.screenY):N0=D0=0,_d=e),D0)},movementY:function(e){return"movementY"in e?e.movementY:N0}}),M1=vo(Ch),bG=gt({},Ch,{dataTransfer:0}),RG=vo(bG),IG=gt({},Cf,{relatedTarget:0}),O0=vo(IG),PG=gt({},Wu,{animationName:0,elapsedTime:0,pseudoElement:0}),LG=vo(PG),TG=gt({},Wu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kG=vo(TG),MG=gt({},Wu,{data:0}),E1=vo(MG),EG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AG={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"},DG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function NG(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=DG[e])?!!t[e]:!1}function tw(){return NG}var OG=gt({},Cf,{key:function(e){if(e.key){var t=EG[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ug(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?AG[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tw,charCode:function(e){return e.type==="keypress"?Ug(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ug(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),FG=vo(OG),_G=gt({},Ch,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),A1=vo(_G),VG=gt({},Cf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tw}),BG=vo(VG),HG=gt({},Wu,{propertyName:0,elapsedTime:0,pseudoElement:0}),UG=vo(HG),zG=gt({},Ch,{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}),GG=vo(zG),WG=[9,13,27,32],rw=Oa&&"CompositionEvent"in window,Kd=null;Oa&&"documentMode"in document&&(Kd=document.documentMode);var jG=Oa&&"TextEvent"in window&&!Kd,tM=Oa&&(!rw||Kd&&8<Kd&&11>=Kd),D1=String.fromCharCode(32),N1=!1;function rM(e,t){switch(e){case"keyup":return WG.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wu=!1;function $G(e,t){switch(e){case"compositionend":return oM(t);case"keypress":return t.which!==32?null:(N1=!0,D1);case"textInput":return e=t.data,e===D1&&N1?null:e;default:return null}}function qG(e,t){if(wu)return e==="compositionend"||!rw&&rM(e,t)?(e=eM(),Hg=JC=Mi=null,wu=!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 tM&&t.locale!=="ko"?null:t.data;default:return null}}var KG={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 O1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!KG[e.type]:t==="textarea"}function nM(e,t,r,o){Ok(o),t=rh(t,"onChange"),0<t.length&&(r=new ew("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var Xd=null,lf=null;function XG(e){gM(e,0)}function wh(e){var t=Ru(e);if(Tk(t))return e}function YG(e,t){if(e==="change")return t}var aM=!1;Oa&&(Oa?(Tg="oninput"in document,Tg||(F0=document.createElement("div"),F0.setAttribute("oninput","return;"),Tg=typeof F0.oninput=="function"),Lg=Tg):Lg=!1,aM=Lg&&(!document.documentMode||9<document.documentMode));var Lg,Tg,F0;function F1(){Xd&&(Xd.detachEvent("onpropertychange",iM),lf=Xd=null)}function iM(e){if(e.propertyName==="value"&&wh(lf)){var t=[];nM(t,lf,e,KC(e)),Bk(XG,t)}}function QG(e,t,r){e==="focusin"?(F1(),Xd=t,lf=r,Xd.attachEvent("onpropertychange",iM)):e==="focusout"&&F1()}function ZG(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wh(lf)}function JG(e,t){if(e==="click")return wh(t)}function eW(e,t){if(e==="input"||e==="change")return wh(t)}function tW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sn=typeof Object.is=="function"?Object.is:tW;function uf(e,t){if(Sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var n=r[o];if(!Y0.call(t,n)||!Sn(e[n],t[n]))return!1}return!0}function _1(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function V1(e,t){var r=_1(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=_1(r)}}function sM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lM(){for(var e=window,t=Xg();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Xg(e.document)}return t}function ow(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 rW(e){var t=lM(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&sM(r.ownerDocument.documentElement,r)){if(o!==null&&ow(r)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=r.textContent.length,a=Math.min(o.start,n);o=o.end===void 0?a:Math.min(o.end,n),!e.extend&&a>o&&(n=o,o=a,a=n),n=V1(r,a);var i=V1(r,o);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>o?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var oW=Oa&&"documentMode"in document&&11>=document.documentMode,Su=null,gC=null,Yd=null,hC=!1;function B1(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;hC||Su==null||Su!==Xg(o)||(o=Su,"selectionStart"in o&&ow(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Yd&&uf(Yd,o)||(Yd=o,o=rh(gC,"onSelect"),0<o.length&&(t=new ew("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=Su)))}function kg(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var bu={animationend:kg("Animation","AnimationEnd"),animationiteration:kg("Animation","AnimationIteration"),animationstart:kg("Animation","AnimationStart"),transitionend:kg("Transition","TransitionEnd")},_0={},uM={};Oa&&(uM=document.createElement("div").style,"AnimationEvent"in window||(delete bu.animationend.animation,delete bu.animationiteration.animation,delete bu.animationstart.animation),"TransitionEvent"in window||delete bu.transitionend.transition);function Sh(e){if(_0[e])return _0[e];if(!bu[e])return e;var t=bu[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in uM)return _0[e]=t[r];return e}var cM=Sh("animationend"),dM=Sh("animationiteration"),fM=Sh("animationstart"),pM=Sh("transitionend"),mM=new Map,H1="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 zi(e,t){mM.set(e,t),rl(t,[e])}for(Mg=0;Mg<H1.length;Mg++)Eg=H1[Mg],U1=Eg.toLowerCase(),z1=Eg[0].toUpperCase()+Eg.slice(1),zi(U1,"on"+z1);var Eg,U1,z1,Mg;zi(cM,"onAnimationEnd");zi(dM,"onAnimationIteration");zi(fM,"onAnimationStart");zi("dblclick","onDoubleClick");zi("focusin","onFocus");zi("focusout","onBlur");zi(pM,"onTransitionEnd");_u("onMouseEnter",["mouseout","mouseover"]);_u("onMouseLeave",["mouseout","mouseover"]);_u("onPointerEnter",["pointerout","pointerover"]);_u("onPointerLeave",["pointerout","pointerover"]);rl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));rl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));rl("onBeforeInput",["compositionend","keypress","textInput","paste"]);rl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));rl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));rl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jd="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(" "),nW=new Set("cancel close invalid load scroll toggle".split(" ").concat(jd));function G1(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,nG(o,t,void 0,e),e.currentTarget=null}function gM(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],n=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var i=o.length-1;0<=i;i--){var s=o[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&n.isPropagationStopped())break e;G1(n,s,u),a=l}else for(i=0;i<o.length;i++){if(s=o[i],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&n.isPropagationStopped())break e;G1(n,s,u),a=l}}}if(Qg)throw e=dC,Qg=!1,dC=null,e}function tt(e,t){var r=t[wC];r===void 0&&(r=t[wC]=new Set);var o=e+"__bubble";r.has(o)||(hM(t,e,2,!1),r.add(o))}function V0(e,t,r){var o=0;t&&(o|=4),hM(r,e,o,t)}var Ag="_reactListening"+Math.random().toString(36).slice(2);function cf(e){if(!e[Ag]){e[Ag]=!0,bk.forEach(function(r){r!=="selectionchange"&&(nW.has(r)||V0(r,!1,e),V0(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ag]||(t[Ag]=!0,V0("selectionchange",!1,t))}}function hM(e,t,r,o){switch(Jk(t)){case 1:var n=CG;break;case 4:n=wG;break;default:n=ZC}r=n.bind(null,t,r,e),n=void 0,!cC||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),o?n!==void 0?e.addEventListener(t,r,{capture:!0,passive:n}):e.addEventListener(t,r,!0):n!==void 0?e.addEventListener(t,r,{passive:n}):e.addEventListener(t,r,!1)}function B0(e,t,r,o,n){var a=o;if(!(t&1)&&!(t&2)&&o!==null)e:for(;;){if(o===null)return;var i=o.tag;if(i===3||i===4){var s=o.stateNode.containerInfo;if(s===n||s.nodeType===8&&s.parentNode===n)break;if(i===4)for(i=o.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=$s(s),i===null)return;if(l=i.tag,l===5||l===6){o=a=i;continue e}s=s.parentNode}}o=o.return}Bk(function(){var u=a,c=KC(r),d=[];e:{var f=mM.get(e);if(f!==void 0){var p=ew,g=e;switch(e){case"keypress":if(Ug(r)===0)break e;case"keydown":case"keyup":p=FG;break;case"focusin":g="focus",p=O0;break;case"focusout":g="blur",p=O0;break;case"beforeblur":case"afterblur":p=O0;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=M1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=RG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=BG;break;case cM:case dM:case fM:p=LG;break;case pM:p=UG;break;case"scroll":p=SG;break;case"wheel":p=GG;break;case"copy":case"cut":case"paste":p=kG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=A1}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 C=y.stateNode;if(y.tag===5&&C!==null&&(y=C,h!==null&&(C=of(v,h),C!=null&&m.push(df(v,C,y)))),x)break;v=v.return}0<m.length&&(f=new p(f,g,null,r,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&r!==lC&&(g=r.relatedTarget||r.fromElement)&&($s(g)||g[Fa]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=r.relatedTarget||r.toElement,p=u,g=g?$s(g):null,g!==null&&(x=ol(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(m=M1,C="onMouseLeave",h="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=A1,C="onPointerLeave",h="onPointerEnter",v="pointer"),x=p==null?f:Ru(p),y=g==null?f:Ru(g),f=new m(C,v+"leave",p,r,c),f.target=x,f.relatedTarget=y,C=null,$s(c)===u&&(m=new m(h,v+"enter",g,r,c),m.target=y,m.relatedTarget=x,C=m),x=C,p&&g)t:{for(m=p,h=g,v=0,y=m;y;y=xu(y))v++;for(y=0,C=h;C;C=xu(C))y++;for(;0<v-y;)m=xu(m),v--;for(;0<y-v;)h=xu(h),y--;for(;v--;){if(m===h||h!==null&&m===h.alternate)break t;m=xu(m),h=xu(h)}m=null}else m=null;p!==null&&W1(d,f,p,m,!1),g!==null&&x!==null&&W1(d,x,g,m,!0)}}e:{if(f=u?Ru(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var w=YG;else if(O1(f))if(aM)w=eW;else{w=ZG;var b=QG}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(w=JG);if(w&&(w=w(e,u))){nM(d,w,r,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&oC(f,"number",f.value)}switch(b=u?Ru(u):window,e){case"focusin":(O1(b)||b.contentEditable==="true")&&(Su=b,gC=u,Yd=null);break;case"focusout":Yd=gC=Su=null;break;case"mousedown":hC=!0;break;case"contextmenu":case"mouseup":case"dragend":hC=!1,B1(d,r,c);break;case"selectionchange":if(oW)break;case"keydown":case"keyup":B1(d,r,c)}var S;if(rw)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 wu?rM(e,r)&&(I="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(I="onCompositionStart");I&&(tM&&r.locale!=="ko"&&(wu||I!=="onCompositionStart"?I==="onCompositionEnd"&&wu&&(S=eM()):(Mi=c,JC="value"in Mi?Mi.value:Mi.textContent,wu=!0)),b=rh(u,I),0<b.length&&(I=new E1(I,e,null,r,c),d.push({event:I,listeners:b}),S?I.data=S:(S=oM(r),S!==null&&(I.data=S)))),(S=jG?$G(e,r):qG(e,r))&&(u=rh(u,"onBeforeInput"),0<u.length&&(c=new E1("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=S))}gM(d,t)})}function df(e,t,r){return{instance:e,listener:t,currentTarget:r}}function rh(e,t){for(var r=t+"Capture",o=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=of(e,r),a!=null&&o.unshift(df(e,a,n)),a=of(e,t),a!=null&&o.push(df(e,a,n))),e=e.return}return o}function xu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function W1(e,t,r,o,n){for(var a=t._reactName,i=[];r!==null&&r!==o;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===o)break;s.tag===5&&u!==null&&(s=u,n?(l=of(r,a),l!=null&&i.unshift(df(r,l,s))):n||(l=of(r,a),l!=null&&i.push(df(r,l,s)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var aW=/\r\n?/g,iW=/\u0000|\uFFFD/g;function j1(e){return(typeof e=="string"?e:""+e).replace(aW,`
|
|
9
|
+
`).replace(iW,"")}function Dg(e,t,r){if(t=j1(t),j1(e)!==t&&r)throw Error($(425))}function oh(){}var vC=null,xC=null;function yC(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 CC=typeof setTimeout=="function"?setTimeout:void 0,sW=typeof clearTimeout=="function"?clearTimeout:void 0,$1=typeof Promise=="function"?Promise:void 0,lW=typeof queueMicrotask=="function"?queueMicrotask:typeof $1<"u"?function(e){return $1.resolve(null).then(e).catch(uW)}:CC;function uW(e){setTimeout(function(){throw e})}function H0(e,t){var r=t,o=0;do{var n=r.nextSibling;if(e.removeChild(r),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(o===0){e.removeChild(n),sf(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=n}while(r);sf(t)}function Oi(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 q1(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var ju=Math.random().toString(36).slice(2),na="__reactFiber$"+ju,ff="__reactProps$"+ju,Fa="__reactContainer$"+ju,wC="__reactEvents$"+ju,cW="__reactListeners$"+ju,dW="__reactHandles$"+ju;function $s(e){var t=e[na];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Fa]||r[na]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=q1(e);e!==null;){if(r=e[na])return r;e=q1(e)}return t}e=r,r=e.parentNode}return null}function wf(e){return e=e[na]||e[Fa],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ru(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function bh(e){return e[ff]||null}var SC=[],Iu=-1;function Gi(e){return{current:e}}function rt(e){0>Iu||(e.current=SC[Iu],SC[Iu]=null,Iu--)}function Qe(e,t){Iu++,SC[Iu]=e.current,e.current=t}var Ui={},yr=Gi(Ui),Yr=Gi(!1),Qs=Ui;function Vu(e,t){var r=e.type.contextTypes;if(!r)return Ui;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var n={},a;for(a in r)n[a]=t[a];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function Qr(e){return e=e.childContextTypes,e!=null}function nh(){rt(Yr),rt(yr)}function K1(e,t,r){if(yr.current!==Ui)throw Error($(168));Qe(yr,t),Qe(Yr,r)}function vM(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var n in o)if(!(n in t))throw Error($(108,Q5(e)||"Unknown",n));return gt({},r,o)}function ah(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ui,Qs=yr.current,Qe(yr,e),Qe(Yr,Yr.current),!0}function X1(e,t,r){var o=e.stateNode;if(!o)throw Error($(169));r?(e=vM(e,t,Qs),o.__reactInternalMemoizedMergedChildContext=e,rt(Yr),rt(yr),Qe(yr,e)):rt(Yr),Qe(Yr,r)}var Ea=null,Rh=!1,U0=!1;function xM(e){Ea===null?Ea=[e]:Ea.push(e)}function fW(e){Rh=!0,xM(e)}function Wi(){if(!U0&&Ea!==null){U0=!0;var e=0,t=We;try{var r=Ea;for(We=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}Ea=null,Rh=!1}catch(n){throw Ea!==null&&(Ea=Ea.slice(e+1)),Gk(XC,Wi),n}finally{We=t,U0=!1}}return null}var Pu=[],Lu=0,ih=null,sh=0,Oo=[],Fo=0,Zs=null,Aa=1,Da="";function Ws(e,t){Pu[Lu++]=sh,Pu[Lu++]=ih,ih=e,sh=t}function yM(e,t,r){Oo[Fo++]=Aa,Oo[Fo++]=Da,Oo[Fo++]=Zs,Zs=e;var o=Aa;e=Da;var n=32-Cn(o)-1;o&=~(1<<n),r+=1;var a=32-Cn(t)+n;if(30<a){var i=n-n%5;a=(o&(1<<i)-1).toString(32),o>>=i,n-=i,Aa=1<<32-Cn(t)+n|r<<n|o,Da=a+e}else Aa=1<<a|r<<n|o,Da=e}function nw(e){e.return!==null&&(Ws(e,1),yM(e,1,0))}function aw(e){for(;e===ih;)ih=Pu[--Lu],Pu[Lu]=null,sh=Pu[--Lu],Pu[Lu]=null;for(;e===Zs;)Zs=Oo[--Fo],Oo[Fo]=null,Da=Oo[--Fo],Oo[Fo]=null,Aa=Oo[--Fo],Oo[Fo]=null}var go=null,mo=null,lt=!1,yn=null;function CM(e,t){var r=_o(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Y1(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,go=e,mo=Oi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,go=e,mo=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Zs!==null?{id:Aa,overflow:Da}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=_o(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,go=e,mo=null,!0):!1;default:return!1}}function bC(e){return(e.mode&1)!==0&&(e.flags&128)===0}function RC(e){if(lt){var t=mo;if(t){var r=t;if(!Y1(e,t)){if(bC(e))throw Error($(418));t=Oi(r.nextSibling);var o=go;t&&Y1(e,t)?CM(o,r):(e.flags=e.flags&-4097|2,lt=!1,go=e)}}else{if(bC(e))throw Error($(418));e.flags=e.flags&-4097|2,lt=!1,go=e}}}function Q1(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;go=e}function Ng(e){if(e!==go)return!1;if(!lt)return Q1(e),lt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yC(e.type,e.memoizedProps)),t&&(t=mo)){if(bC(e))throw wM(),Error($(418));for(;t;)CM(e,t),t=Oi(t.nextSibling)}if(Q1(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){mo=Oi(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}mo=null}}else mo=go?Oi(e.stateNode.nextSibling):null;return!0}function wM(){for(var e=mo;e;)e=Oi(e.nextSibling)}function Bu(){mo=go=null,lt=!1}function iw(e){yn===null?yn=[e]:yn.push(e)}var pW=Ba.ReactCurrentBatchConfig;function Vd(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error($(309));var o=r.stateNode}if(!o)throw Error($(147,e));var n=o,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($(284));if(!r._owner)throw Error($(290,e))}return e}function Og(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Z1(e){var t=e._init;return t(e._payload)}function SM(e){function t(h,v){if(e){var y=h.deletions;y===null?(h.deletions=[v],h.flags|=16):y.push(v)}}function r(h,v){if(!e)return null;for(;v!==null;)t(h,v),v=v.sibling;return null}function o(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=Bi(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,C){return v===null||v.tag!==6?(v=K0(y,h.mode,C),v.return=h,v):(v=n(v,y),v.return=h,v)}function l(h,v,y,C){var w=y.type;return w===Cu?c(h,v,y.props.children,C,y.key):v!==null&&(v.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Pi&&Z1(w)===v.type)?(C=n(v,y.props),C.ref=Vd(h,v,y),C.return=h,C):(C=Kg(y.type,y.key,y.props,null,h.mode,C),C.ref=Vd(h,v,y),C.return=h,C)}function u(h,v,y,C){return v===null||v.tag!==4||v.stateNode.containerInfo!==y.containerInfo||v.stateNode.implementation!==y.implementation?(v=X0(y,h.mode,C),v.return=h,v):(v=n(v,y.children||[]),v.return=h,v)}function c(h,v,y,C,w){return v===null||v.tag!==7?(v=Ys(y,h.mode,C,w),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=K0(""+v,h.mode,y),v.return=h,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Cg:return y=Kg(v.type,v.key,v.props,null,h.mode,y),y.ref=Vd(h,null,v),y.return=h,y;case yu:return v=X0(v,h.mode,y),v.return=h,v;case Pi:var C=v._init;return d(h,C(v._payload),y)}if(Gd(v)||Nd(v))return v=Ys(v,h.mode,y,null),v.return=h,v;Og(h,v)}return null}function f(h,v,y,C){var w=v!==null?v.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return w!==null?null:s(h,v,""+y,C);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Cg:return y.key===w?l(h,v,y,C):null;case yu:return y.key===w?u(h,v,y,C):null;case Pi:return w=y._init,f(h,v,w(y._payload),C)}if(Gd(y)||Nd(y))return w!==null?null:c(h,v,y,C,null);Og(h,y)}return null}function p(h,v,y,C,w){if(typeof C=="string"&&C!==""||typeof C=="number")return h=h.get(y)||null,s(v,h,""+C,w);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Cg:return h=h.get(C.key===null?y:C.key)||null,l(v,h,C,w);case yu:return h=h.get(C.key===null?y:C.key)||null,u(v,h,C,w);case Pi:var b=C._init;return p(h,v,y,b(C._payload),w)}if(Gd(C)||Nd(C))return h=h.get(y)||null,c(v,h,C,w,null);Og(v,C)}return null}function g(h,v,y,C){for(var w=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],C);if(T===null){S===null&&(S=L);break}e&&S&&T.alternate===null&&t(h,S),v=a(T,v,I),b===null?w=T:b.sibling=T,b=T,S=L}if(I===y.length)return r(h,S),lt&&Ws(h,I),w;if(S===null){for(;I<y.length;I++)S=d(h,y[I],C),S!==null&&(v=a(S,v,I),b===null?w=S:b.sibling=S,b=S);return lt&&Ws(h,I),w}for(S=o(h,S);I<y.length;I++)L=p(S,h,I,y[I],C),L!==null&&(e&&L.alternate!==null&&S.delete(L.key===null?I:L.key),v=a(L,v,I),b===null?w=L:b.sibling=L,b=L);return e&&S.forEach(function(k){return t(h,k)}),lt&&Ws(h,I),w}function m(h,v,y,C){var w=Nd(y);if(typeof w!="function")throw Error($(150));if(y=w.call(y),y==null)throw Error($(151));for(var b=w=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,C);if(k===null){S===null&&(S=L);break}e&&S&&k.alternate===null&&t(h,S),v=a(k,v,I),b===null?w=k:b.sibling=k,b=k,S=L}if(T.done)return r(h,S),lt&&Ws(h,I),w;if(S===null){for(;!T.done;I++,T=y.next())T=d(h,T.value,C),T!==null&&(v=a(T,v,I),b===null?w=T:b.sibling=T,b=T);return lt&&Ws(h,I),w}for(S=o(h,S);!T.done;I++,T=y.next())T=p(S,h,I,T.value,C),T!==null&&(e&&T.alternate!==null&&S.delete(T.key===null?I:T.key),v=a(T,v,I),b===null?w=T:b.sibling=T,b=T);return e&&S.forEach(function(E){return t(h,E)}),lt&&Ws(h,I),w}function x(h,v,y,C){if(typeof y=="object"&&y!==null&&y.type===Cu&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Cg:e:{for(var w=y.key,b=v;b!==null;){if(b.key===w){if(w=y.type,w===Cu){if(b.tag===7){r(h,b.sibling),v=n(b,y.props.children),v.return=h,h=v;break e}}else if(b.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Pi&&Z1(w)===b.type){r(h,b.sibling),v=n(b,y.props),v.ref=Vd(h,b,y),v.return=h,h=v;break e}r(h,b);break}else t(h,b);b=b.sibling}y.type===Cu?(v=Ys(y.props.children,h.mode,C,y.key),v.return=h,h=v):(C=Kg(y.type,y.key,y.props,null,h.mode,C),C.ref=Vd(h,v,y),C.return=h,h=C)}return i(h);case yu: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){r(h,v.sibling),v=n(v,y.children||[]),v.return=h,h=v;break e}else{r(h,v);break}else t(h,v);v=v.sibling}v=X0(y,h.mode,C),v.return=h,h=v}return i(h);case Pi:return b=y._init,x(h,v,b(y._payload),C)}if(Gd(y))return g(h,v,y,C);if(Nd(y))return m(h,v,y,C);Og(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,v!==null&&v.tag===6?(r(h,v.sibling),v=n(v,y),v.return=h,h=v):(r(h,v),v=K0(y,h.mode,C),v.return=h,h=v),i(h)):r(h,v)}return x}var Hu=SM(!0),bM=SM(!1),lh=Gi(null),uh=null,Tu=null,sw=null;function lw(){sw=Tu=uh=null}function uw(e){var t=lh.current;rt(lh),e._currentValue=t}function IC(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function Ou(e,t){uh=e,sw=Tu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xr=!0),e.firstContext=null)}function Bo(e){var t=e._currentValue;if(sw!==e)if(e={context:e,memoizedValue:t,next:null},Tu===null){if(uh===null)throw Error($(308));Tu=e,uh.dependencies={lanes:0,firstContext:e}}else Tu=Tu.next=e;return t}var qs=null;function cw(e){qs===null?qs=[e]:qs.push(e)}function RM(e,t,r,o){var n=t.interleaved;return n===null?(r.next=r,cw(t)):(r.next=n.next,n.next=r),t.interleaved=r,_a(e,o)}function _a(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Li=!1;function dw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function IM(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 Na(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fi(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,De&2){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,_a(e,r)}return n=o.interleaved,n===null?(t.next=t,cw(o)):(t.next=n.next,n.next=t),o.interleaved=t,_a(e,r)}function zg(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,YC(e,r)}}function J1(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var n=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?n=a=i:a=a.next=i,r=r.next}while(r!==null);a===null?n=a=t:a=a.next=t}else n=a=t;r={baseState:o.baseState,firstBaseUpdate:n,lastBaseUpdate:a,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ch(e,t,r,o){var n=e.updateQueue;Li=!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((o&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=r,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=gt({},d,f);break e;case 2:Li=!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);el|=i,e.lanes=i,e.memoizedState=d}}function ek(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],n=o.callback;if(n!==null){if(o.callback=null,o=r,typeof n!="function")throw Error($(191,n));n.call(o)}}}var Sf={},ia=Gi(Sf),pf=Gi(Sf),mf=Gi(Sf);function Ks(e){if(e===Sf)throw Error($(174));return e}function fw(e,t){switch(Qe(mf,t),Qe(pf,e),Qe(ia,Sf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:aC(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=aC(t,e)}rt(ia),Qe(ia,t)}function Uu(){rt(ia),rt(pf),rt(mf)}function PM(e){Ks(mf.current);var t=Ks(ia.current),r=aC(t,e.type);t!==r&&(Qe(pf,e),Qe(ia,r))}function pw(e){pf.current===e&&(rt(ia),rt(pf))}var pt=Gi(0);function dh(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 z0=[];function mw(){for(var e=0;e<z0.length;e++)z0[e]._workInProgressVersionPrimary=null;z0.length=0}var Gg=Ba.ReactCurrentDispatcher,G0=Ba.ReactCurrentBatchConfig,Js=0,mt=null,_t=null,qt=null,fh=!1,Qd=!1,gf=0,mW=0;function hr(){throw Error($(321))}function gw(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Sn(e[r],t[r]))return!1;return!0}function hw(e,t,r,o,n,a){if(Js=a,mt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gg.current=e===null||e.memoizedState===null?xW:yW,e=r(o,n),Qd){a=0;do{if(Qd=!1,gf=0,25<=a)throw Error($(301));a+=1,qt=_t=null,t.updateQueue=null,Gg.current=CW,e=r(o,n)}while(Qd)}if(Gg.current=ph,t=_t!==null&&_t.next!==null,Js=0,qt=_t=mt=null,fh=!1,t)throw Error($(300));return e}function vw(){var e=gf!==0;return gf=0,e}function oa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?mt.memoizedState=qt=e:qt=qt.next=e,qt}function Ho(){if(_t===null){var e=mt.alternate;e=e!==null?e.memoizedState:null}else e=_t.next;var t=qt===null?mt.memoizedState:qt.next;if(t!==null)qt=t,_t=e;else{if(e===null)throw Error($(310));_t=e,e={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},qt===null?mt.memoizedState=qt=e:qt=qt.next=e}return qt}function hf(e,t){return typeof t=="function"?t(e):t}function W0(e){var t=Ho(),r=t.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=e;var o=_t,n=o.baseQueue,a=r.pending;if(a!==null){if(n!==null){var i=n.next;n.next=a.next,a.next=i}o.baseQueue=n=a,r.pending=null}if(n!==null){a=n.next,o=o.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if((Js&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),o=u.hasEagerState?u.eagerState:e(o,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,i=o):l=l.next=d,mt.lanes|=c,el|=c}u=u.next}while(u!==null&&u!==a);l===null?i=o:l.next=s,Sn(o,t.memoizedState)||(Xr=!0),t.memoizedState=o,t.baseState=i,t.baseQueue=l,r.lastRenderedState=o}if(e=r.interleaved,e!==null){n=e;do a=n.lane,mt.lanes|=a,el|=a,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function j0(e){var t=Ho(),r=t.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=e;var o=r.dispatch,n=r.pending,a=t.memoizedState;if(n!==null){r.pending=null;var i=n=n.next;do a=e(a,i.action),i=i.next;while(i!==n);Sn(a,t.memoizedState)||(Xr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function LM(){}function TM(e,t){var r=mt,o=Ho(),n=t(),a=!Sn(o.memoizedState,n);if(a&&(o.memoizedState=n,Xr=!0),o=o.queue,xw(EM.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||qt!==null&&qt.memoizedState.tag&1){if(r.flags|=2048,vf(9,MM.bind(null,r,o,n,t),void 0,null),Kt===null)throw Error($(349));Js&30||kM(r,t,n)}return n}function kM(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=mt.updateQueue,t===null?(t={lastEffect:null,stores:null},mt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function MM(e,t,r,o){t.value=r,t.getSnapshot=o,AM(t)&&DM(e)}function EM(e,t,r){return r(function(){AM(t)&&DM(e)})}function AM(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Sn(e,r)}catch{return!0}}function DM(e){var t=_a(e,1);t!==null&&wn(t,e,1,-1)}function tk(e){var t=oa();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hf,lastRenderedState:e},t.queue=e,e=e.dispatch=vW.bind(null,mt,e),[t.memoizedState,e]}function vf(e,t,r,o){return e={tag:e,create:t,destroy:r,deps:o,next:null},t=mt.updateQueue,t===null?(t={lastEffect:null,stores:null},mt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e)),e}function NM(){return Ho().memoizedState}function Wg(e,t,r,o){var n=oa();mt.flags|=e,n.memoizedState=vf(1|t,r,void 0,o===void 0?null:o)}function Ih(e,t,r,o){var n=Ho();o=o===void 0?null:o;var a=void 0;if(_t!==null){var i=_t.memoizedState;if(a=i.destroy,o!==null&&gw(o,i.deps)){n.memoizedState=vf(t,r,a,o);return}}mt.flags|=e,n.memoizedState=vf(1|t,r,a,o)}function rk(e,t){return Wg(8390656,8,e,t)}function xw(e,t){return Ih(2048,8,e,t)}function OM(e,t){return Ih(4,2,e,t)}function FM(e,t){return Ih(4,4,e,t)}function _M(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 VM(e,t,r){return r=r!=null?r.concat([e]):null,Ih(4,4,_M.bind(null,t,e),r)}function yw(){}function BM(e,t){var r=Ho();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&gw(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function HM(e,t){var r=Ho();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&gw(t,o[1])?o[0]:(e=e(),r.memoizedState=[e,t],e)}function UM(e,t,r){return Js&21?(Sn(r,t)||(r=$k(),mt.lanes|=r,el|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xr=!0),e.memoizedState=r)}function gW(e,t){var r=We;We=r!==0&&4>r?r:4,e(!0);var o=G0.transition;G0.transition={};try{e(!1),t()}finally{We=r,G0.transition=o}}function zM(){return Ho().memoizedState}function hW(e,t,r){var o=Vi(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},GM(e))WM(t,r);else if(r=RM(e,t,r,o),r!==null){var n=Fr();wn(r,e,o,n),jM(r,t,o)}}function vW(e,t,r){var o=Vi(e),n={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(GM(e))WM(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,r);if(n.hasEagerState=!0,n.eagerState=s,Sn(s,i)){var l=t.interleaved;l===null?(n.next=n,cw(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}r=RM(e,t,n,o),r!==null&&(n=Fr(),wn(r,e,o,n),jM(r,t,o))}}function GM(e){var t=e.alternate;return e===mt||t!==null&&t===mt}function WM(e,t){Qd=fh=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function jM(e,t,r){if(r&4194240){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,YC(e,r)}}var ph={readContext:Bo,useCallback:hr,useContext:hr,useEffect:hr,useImperativeHandle:hr,useInsertionEffect:hr,useLayoutEffect:hr,useMemo:hr,useReducer:hr,useRef:hr,useState:hr,useDebugValue:hr,useDeferredValue:hr,useTransition:hr,useMutableSource:hr,useSyncExternalStore:hr,useId:hr,unstable_isNewReconciler:!1},xW={readContext:Bo,useCallback:function(e,t){return oa().memoizedState=[e,t===void 0?null:t],e},useContext:Bo,useEffect:rk,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Wg(4194308,4,_M.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Wg(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wg(4,2,e,t)},useMemo:function(e,t){var r=oa();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=oa();return t=r!==void 0?r(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=hW.bind(null,mt,e),[o.memoizedState,e]},useRef:function(e){var t=oa();return e={current:e},t.memoizedState=e},useState:tk,useDebugValue:yw,useDeferredValue:function(e){return oa().memoizedState=e},useTransition:function(){var e=tk(!1),t=e[0];return e=gW.bind(null,e[1]),oa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=mt,n=oa();if(lt){if(r===void 0)throw Error($(407));r=r()}else{if(r=t(),Kt===null)throw Error($(349));Js&30||kM(o,t,r)}n.memoizedState=r;var a={value:r,getSnapshot:t};return n.queue=a,rk(EM.bind(null,o,a,e),[e]),o.flags|=2048,vf(9,MM.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=oa(),t=Kt.identifierPrefix;if(lt){var r=Da,o=Aa;r=(o&~(1<<32-Cn(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=gf++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=mW++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},yW={readContext:Bo,useCallback:BM,useContext:Bo,useEffect:xw,useImperativeHandle:VM,useInsertionEffect:OM,useLayoutEffect:FM,useMemo:HM,useReducer:W0,useRef:NM,useState:function(){return W0(hf)},useDebugValue:yw,useDeferredValue:function(e){var t=Ho();return UM(t,_t.memoizedState,e)},useTransition:function(){var e=W0(hf)[0],t=Ho().memoizedState;return[e,t]},useMutableSource:LM,useSyncExternalStore:TM,useId:zM,unstable_isNewReconciler:!1},CW={readContext:Bo,useCallback:BM,useContext:Bo,useEffect:xw,useImperativeHandle:VM,useInsertionEffect:OM,useLayoutEffect:FM,useMemo:HM,useReducer:j0,useRef:NM,useState:function(){return j0(hf)},useDebugValue:yw,useDeferredValue:function(e){var t=Ho();return _t===null?t.memoizedState=e:UM(t,_t.memoizedState,e)},useTransition:function(){var e=j0(hf)[0],t=Ho().memoizedState;return[e,t]},useMutableSource:LM,useSyncExternalStore:TM,useId:zM,unstable_isNewReconciler:!1};function vn(e,t){if(e&&e.defaultProps){t=gt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function PC(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:gt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Ph={isMounted:function(e){return(e=e._reactInternals)?ol(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var o=Fr(),n=Vi(e),a=Na(o,n);a.payload=t,r!=null&&(a.callback=r),t=Fi(e,a,n),t!==null&&(wn(t,e,n,o),zg(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=Fr(),n=Vi(e),a=Na(o,n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Fi(e,a,n),t!==null&&(wn(t,e,n,o),zg(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Fr(),o=Vi(e),n=Na(r,o);n.tag=2,t!=null&&(n.callback=t),t=Fi(e,n,o),t!==null&&(wn(t,e,o,r),zg(t,e,o))}};function ok(e,t,r,o,n,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,i):t.prototype&&t.prototype.isPureReactComponent?!uf(r,o)||!uf(n,a):!0}function $M(e,t,r){var o=!1,n=Ui,a=t.contextType;return typeof a=="object"&&a!==null?a=Bo(a):(n=Qr(t)?Qs:yr.current,o=t.contextTypes,a=(o=o!=null)?Vu(e,n):Ui),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ph,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function nk(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&Ph.enqueueReplaceState(t,t.state,null)}function LC(e,t,r,o){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},dw(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=Bo(a):(a=Qr(t)?Qs:yr.current,n.context=Vu(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(PC(e,t,a,r),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&&Ph.enqueueReplaceState(n,n.state,null),ch(e,r,n,o),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function zu(e,t){try{var r="",o=t;do r+=Y5(o),o=o.return;while(o);var n=r}catch(a){n=`
|
|
10
10
|
Error generating stack: `+a.message+`
|
|
11
|
-
`+a.stack}return{value:e,source:t,stack:n,digest:null}}function j0(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Lw(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var mW=typeof WeakMap=="function"?WeakMap:Map;function jM(e,t,r){r=Aa(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){mh||(mh=!0,_w=o),Lw(e,t)},r}function $M(e,t,r){r=Aa(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var n=t.value;r.payload=function(){return o(n)},r.callback=function(){Lw(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Lw(e,t),typeof o!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function ok(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new mW;var n=new Set;o.set(t,n)}else n=o.get(t),n===void 0&&(n=new Set,o.set(t,n));n.has(r)||(n.add(r),e=TW.bind(null,e,t,r),t.then(e,e))}function nk(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 ak(e,t,r,o,n){return e.mode&1?(e.flags|=65536,e.lanes=n,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Aa(-1,1),t.tag=2,Oi(r,t,1))),r.lanes|=1),e)}var gW=_a.ReactCurrentOwner,Kr=!1;function Dr(e,t,r,o){t.child=e===null?CM(t,null,r,o):Vu(t,e.child,r,o)}function ik(e,t,r,o,n){r=r.render;var a=t.ref;return Du(t,n),o=gC(e,t,r,o,a,n),r=hC(),e!==null&&!Kr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Fa(e,t,n)):(lt&&r&&oC(t),t.flags|=1,Dr(e,t,o,n),t.child)}function sk(e,t,r,o,n){if(e===null){var a=r.type;return typeof a=="function"&&!PC(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,qM(e,t,a,o,n)):(e=qg(r.type,null,o,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(r=r.compare,r=r!==null?r:sf,r(i,o)&&e.ref===t.ref)return Fa(e,t,n)}return t.flags|=1,e=Vi(a,o),e.ref=t.ref,e.return=t,t.child=e}function qM(e,t,r,o,n){if(e!==null){var a=e.memoizedProps;if(sf(a,o)&&e.ref===t.ref)if(Kr=!1,t.pendingProps=o=a,(e.lanes&n)!==0)e.flags&131072&&(Kr=!0);else return t.lanes=e.lanes,Fa(e,t,n)}return Tw(e,t,r,o,n)}function KM(e,t,r){var o=t.pendingProps,n=o.children,a=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qe(Tu,fo),fo|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Qe(Tu,fo),fo|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=a!==null?a.baseLanes:r,Qe(Tu,fo),fo|=o}else a!==null?(o=a.baseLanes|r,t.memoizedState=null):o=r,Qe(Tu,fo),fo|=o;return Dr(e,t,n,r),t.child}function XM(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Tw(e,t,r,o,n){var a=Yr(r)?Xs:xr.current;return a=Fu(t,a),Du(t,n),r=gC(e,t,r,o,a,n),o=hC(),e!==null&&!Kr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Fa(e,t,n)):(lt&&o&&oC(t),t.flags|=1,Dr(e,t,r,n),t.child)}function lk(e,t,r,o,n){if(Yr(r)){var a=!0;nh(t)}else a=!1;if(Du(t,n),t.stateNode===null)Wg(e,t),WM(t,r,o),Pw(t,r,o,n),o=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=Bo(u):(u=Yr(r)?Xs:xr.current,u=Fu(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==o||l!==u)&&rk(t,i,o,u),Pi=!1;var f=t.memoizedState;i.state=f,uh(t,o,i,n),l=t.memoizedState,s!==o||f!==l||Xr.current||Pi?(typeof c=="function"&&(Iw(t,r,c,o),l=t.memoizedState),(s=Pi||tk(t,r,s,o,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=o,t.memoizedState=l),i.props=o,i.state=l,i.context=u,o=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{i=t.stateNode,bM(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:hn(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=Bo(l):(l=Yr(r)?Xs:xr.current,l=Fu(t,l));var p=r.getDerivedStateFromProps;(c=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==l)&&rk(t,i,o,l),Pi=!1,f=t.memoizedState,i.state=f,uh(t,o,i,n);var g=t.memoizedState;s!==d||f!==g||Xr.current||Pi?(typeof p=="function"&&(Iw(t,r,p,o),g=t.memoizedState),(u=Pi||tk(t,r,u,o,f,g,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(o,g,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(o,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=o,t.memoizedState=g),i.props=o,i.state=g,i.context=l,o=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),o=!1)}return kw(e,t,r,o,a,n)}function kw(e,t,r,o,n,a){XM(e,t);var i=(t.flags&128)!==0;if(!o&&!i)return n&&q1(t,r,!1),Fa(e,t,a);o=t.stateNode,gW.current=t;var s=i&&typeof r.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&i?(t.child=Vu(t,e.child,null,a),t.child=Vu(t,null,s,a)):Dr(e,t,s,a),t.memoizedState=o.state,n&&q1(t,r,!0),t.child}function YM(e){var t=e.stateNode;t.pendingContext?$1(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$1(e,t.context,!1),dC(e,t.containerInfo)}function uk(e,t,r,o,n){return _u(),aC(n),t.flags|=256,Dr(e,t,r,o),t.child}var Mw={dehydrated:null,treeContext:null,retryLane:0};function Ew(e){return{baseLanes:e,cachePool:null,transitions:null}}function QM(e,t,r){var o=t.pendingProps,n=pt.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),Qe(pt,n&1),e===null)return bw(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=o.children,e=o.fallback,a?(o=t.mode,a=t.child,i={mode:"hidden",children:i},!(o&1)&&a!==null?(a.childLanes=0,a.pendingProps=i):a=Th(i,o,0,null),e=Ks(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ew(r),t.memoizedState=Mw,e):yC(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return hW(e,t,i,o,s,n,r);if(a){a=o.fallback,i=t.mode,n=e.child,s=n.sibling;var l={mode:"hidden",children:o.children};return!(i&1)&&t.child!==n?(o=t.child,o.childLanes=0,o.pendingProps=l,t.deletions=null):(o=Vi(n,l),o.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=Vi(s,a):(a=Ks(a,i,r,null),a.flags|=2),a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,i=e.child.memoizedState,i=i===null?Ew(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=Mw,o}return a=e.child,e=a.sibling,o=Vi(a,{mode:"visible",children:o.children}),!(t.mode&1)&&(o.lanes=r),o.return=t,o.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function yC(e,t){return t=Th({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Og(e,t,r,o){return o!==null&&aC(o),Vu(t,e.child,null,r),e=yC(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hW(e,t,r,o,n,a,i){if(r)return t.flags&256?(t.flags&=-257,o=j0(Error($(422))),Og(e,t,i,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=o.fallback,n=t.mode,o=Th({mode:"visible",children:o.children},n,0,null),a=Ks(a,n,i,null),a.flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,t.mode&1&&Vu(t,e.child,null,i),t.child.memoizedState=Ew(i),t.memoizedState=Mw,a);if(!(t.mode&1))return Og(e,t,i,null);if(n.data==="$!"){if(o=n.nextSibling&&n.nextSibling.dataset,o)var s=o.dgst;return o=s,a=Error($(419)),o=j0(a,o,void 0),Og(e,t,i,o)}if(s=(i&e.childLanes)!==0,Kr||s){if(o=Kt,o!==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&(o.suspendedLanes|i)?0:n,n!==0&&n!==a.retryLane&&(a.retryLane=n,Oa(e,n),wn(o,e,n,-1))}return IC(),o=j0(Error($(421))),Og(e,t,i,o)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=kW.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,po=Ni(n.nextSibling),mo=t,lt=!0,xn=null,e!==null&&(Oo[Fo++]=Ma,Oo[Fo++]=Ea,Oo[Fo++]=Ys,Ma=e.id,Ea=e.overflow,Ys=t),t=yC(t,o.children),t.flags|=4096,t)}function ck(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Rw(e.return,t,r)}function $0(e,t,r,o,n){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:n}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=o,a.tail=r,a.tailMode=n)}function ZM(e,t,r){var o=t.pendingProps,n=o.revealOrder,a=o.tail;if(Dr(e,t,o.children,r),o=pt.current,o&2)o=o&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&&ck(e,r,t);else if(e.tag===19)ck(e,r,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}o&=1}if(Qe(pt,o),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(r=t.child,n=null;r!==null;)e=r.alternate,e!==null&&ch(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),$0(t,!1,n,r,a);break;case"backwards":for(r=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&ch(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}$0(t,!0,r,null,a);break;case"together":$0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wg(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Fa(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Zs|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,r=Vi(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Vi(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function vW(e,t,r){switch(t.tag){case 3:YM(t),_u();break;case 5:RM(t);break;case 1:Yr(t.type)&&nh(t);break;case 4:dC(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,n=t.memoizedProps.value;Qe(sh,o._currentValue),o._currentValue=n;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Qe(pt,pt.current&1),t.flags|=128,null):r&t.child.childLanes?QM(e,t,r):(Qe(pt,pt.current&1),e=Fa(e,t,r),e!==null?e.sibling:null);Qe(pt,pt.current&1);break;case 19:if(o=(r&t.childLanes)!==0,e.flags&128){if(o)return ZM(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Qe(pt,pt.current),o)break;return null;case 22:case 23:return t.lanes=0,KM(e,t,r)}return Fa(e,t,r)}var JM,Aw,eE,tE;JM=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Aw=function(){};eE=function(e,t,r,o){var n=e.memoizedProps;if(n!==o){e=t.stateNode,$s(aa.current);var a=null;switch(r){case"input":n=ew(e,n),o=ew(e,o),a=[];break;case"select":n=gt({},n,{value:void 0}),o=gt({},o,{value:void 0}),a=[];break;case"textarea":n=ow(e,n),o=ow(e,o),a=[];break;default:typeof n.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=rh)}aw(r,o);var i;r=null;for(u in n)if(!o.hasOwnProperty(u)&&n.hasOwnProperty(u)&&n[u]!=null)if(u==="style"){var s=n[u];for(i in s)s.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Jd.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in o){var l=o[u];if(s=n?.[u],o.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(a||(a=[]),a.push(u,r)),r=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"&&(Jd.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&tt("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};tE=function(e,t,r,o){r!==o&&(t.flags|=4)};function _d(e,t){if(!lt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function hr(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var n=e.child;n!==null;)r|=n.lanes|n.childLanes,o|=n.subtreeFlags&14680064,o|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)r|=n.lanes|n.childLanes,o|=n.subtreeFlags,o|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function xW(e,t,r){var o=t.pendingProps;switch(nC(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hr(t),null;case 1:return Yr(t.type)&&oh(),hr(t),null;case 3:return o=t.stateNode,Bu(),rt(Xr),rt(xr),pC(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Dg(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,xn!==null&&(Hw(xn),xn=null))),Aw(e,t),hr(t),null;case 5:fC(t);var n=$s(ff.current);if(r=t.type,e!==null&&t.stateNode!=null)eE(e,t,r,o,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error($(166));return hr(t),null}if(e=$s(aa.current),Dg(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[oa]=t,o[cf]=a,e=(t.mode&1)!==0,r){case"dialog":tt("cancel",o),tt("close",o);break;case"iframe":case"object":case"embed":tt("load",o);break;case"video":case"audio":for(n=0;n<Gd.length;n++)tt(Gd[n],o);break;case"source":tt("error",o);break;case"img":case"image":case"link":tt("error",o),tt("load",o);break;case"details":tt("toggle",o);break;case"input":x1(o,a),tt("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},tt("invalid",o);break;case"textarea":w1(o,a),tt("invalid",o)}aw(r,a),n=null;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];i==="children"?typeof s=="string"?o.textContent!==s&&(a.suppressHydrationWarning!==!0&&Ag(o.textContent,s,e),n=["children",s]):typeof s=="number"&&o.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Ag(o.textContent,s,e),n=["children",""+s]):Jd.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&tt("scroll",o)}switch(r){case"input":wg(o),y1(o,a,!0);break;case"textarea":wg(o),C1(o);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(o.onclick=rh)}o=n,t.updateQueue=o,o!==null&&(t.flags|=4)}else{i=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kk(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=i.createElement(r,{is:o.is}):(e=i.createElement(r),r==="select"&&(i=e,o.multiple?i.multiple=!0:o.size&&(i.size=o.size))):e=i.createElementNS(e,r),e[oa]=t,e[cf]=o,JM(e,t,!1,!1),t.stateNode=e;e:{switch(i=iw(r,o),r){case"dialog":tt("cancel",e),tt("close",e),n=o;break;case"iframe":case"object":case"embed":tt("load",e),n=o;break;case"video":case"audio":for(n=0;n<Gd.length;n++)tt(Gd[n],e);n=o;break;case"source":tt("error",e),n=o;break;case"img":case"image":case"link":tt("error",e),tt("load",e),n=o;break;case"details":tt("toggle",e),n=o;break;case"input":x1(e,o),n=ew(e,o),tt("invalid",e);break;case"option":n=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},n=gt({},o,{value:void 0}),tt("invalid",e);break;case"textarea":w1(e,o),n=ow(e,o),tt("invalid",e);break;default:n=o}aw(r,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?Ak(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Mk(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&ef(e,l):typeof l=="number"&&ef(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Jd.hasOwnProperty(a)?l!=null&&a==="onScroll"&&tt("scroll",e):l!=null&&Gw(e,a,l,i))}switch(r){case"input":wg(e),y1(e,o,!1);break;case"textarea":wg(e),C1(e);break;case"option":o.value!=null&&e.setAttribute("value",""+Bi(o.value));break;case"select":e.multiple=!!o.multiple,a=o.value,a!=null?ku(e,!!o.multiple,a,!1):o.defaultValue!=null&&ku(e,!!o.multiple,o.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=rh)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return hr(t),null;case 6:if(e&&t.stateNode!=null)tE(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error($(166));if(r=$s(ff.current),$s(aa.current),Dg(t)){if(o=t.stateNode,r=t.memoizedProps,o[oa]=t,(a=o.nodeValue!==r)&&(e=mo,e!==null))switch(e.tag){case 3:Ag(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ag(o.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[oa]=t,t.stateNode=o}return hr(t),null;case 13:if(rt(pt),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(lt&&po!==null&&t.mode&1&&!(t.flags&128))yM(),_u(),t.flags|=98560,a=!1;else if(a=Dg(t),o!==null&&o.dehydrated!==null){if(e===null){if(!a)throw Error($(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error($(317));a[oa]=t}else _u(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hr(t),a=!1}else xn!==null&&(Hw(xn),xn=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,t.mode&1&&(e===null||pt.current&1?Vt===0&&(Vt=3):IC())),t.updateQueue!==null&&(t.flags|=4),hr(t),null);case 4:return Bu(),Aw(e,t),e===null&&lf(t.stateNode.containerInfo),hr(t),null;case 10:return lC(t.type._context),hr(t),null;case 17:return Yr(t.type)&&oh(),hr(t),null;case 19:if(rt(pt),a=t.memoizedState,a===null)return hr(t),null;if(o=(t.flags&128)!==0,i=a.rendering,i===null)if(o)_d(a,!1);else{if(Vt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ch(e),i!==null){for(t.flags|=128,_d(a,!1),o=i.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;r!==null;)a=r,e=o,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}),r=r.sibling;return Qe(pt,pt.current&1|2),t.child}e=e.sibling}a.tail!==null&&Rt()>Uu&&(t.flags|=128,o=!0,_d(a,!1),t.lanes=4194304)}else{if(!o)if(e=ch(i),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),_d(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!lt)return hr(t),null}else 2*Rt()-a.renderingStartTime>Uu&&r!==1073741824&&(t.flags|=128,o=!0,_d(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(r=a.last,r!==null?r.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Rt(),t.sibling=null,r=pt.current,Qe(pt,o?r&1|2:r&1),t):(hr(t),null);case 22:case 23:return RC(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?fo&1073741824&&(hr(t),t.subtreeFlags&6&&(t.flags|=8192)):hr(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function yW(e,t){switch(nC(t),t.tag){case 1:return Yr(t.type)&&oh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bu(),rt(Xr),rt(xr),pC(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return fC(t),null;case 13:if(rt(pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));_u()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(pt),null;case 4:return Bu(),null;case 10:return lC(t.type._context),null;case 22:case 23:return RC(),null;case 24:return null;default:return null}}var Fg=!1,vr=!1,wW=typeof WeakSet=="function"?WeakSet:Set,oe=null;function Lu(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){yt(e,t,o)}else r.current=null}function Dw(e,t,r){try{r()}catch(o){yt(e,t,o)}}var dk=!1;function CW(e,t){if(hw=Jg,e=iM(),rC(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var n=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==r||n!==0&&d.nodeType!==3||(s=i+n),d!==a||o!==0&&d.nodeType!==3||(l=i+o),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++u===n&&(s=i),f===a&&++c===o&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(vw={focusedElem:e,selectionRange:r},Jg=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;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:hn(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($(163))}}catch(w){yt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return g=dk,dk=!1,g}function Yd(e,t,r){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var n=o=o.next;do{if((n.tag&e)===e){var a=n.destroy;n.destroy=void 0,a!==void 0&&Dw(t,r,a)}n=n.next}while(n!==o)}}function Ph(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==t)}}function Nw(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function rE(e){var t=e.alternate;t!==null&&(e.alternate=null,rE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[oa],delete t[cf],delete t[ww],delete t[oW],delete t[nW])),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 oE(e){return e.tag===5||e.tag===3||e.tag===4}function fk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||oE(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 Ow(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=rh));else if(o!==4&&(e=e.child,e!==null))for(Ow(e,t,r),e=e.sibling;e!==null;)Ow(e,t,r),e=e.sibling}function Fw(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Fw(e,t,r),e=e.sibling;e!==null;)Fw(e,t,r),e=e.sibling}var nr=null,vn=!1;function Ri(e,t,r){for(r=r.child;r!==null;)nE(e,t,r),r=r.sibling}function nE(e,t,r){if(na&&typeof na.onCommitFiberUnmount=="function")try{na.onCommitFiberUnmount(xh,r)}catch{}switch(r.tag){case 5:vr||Lu(r,t);case 6:var o=nr,n=vn;nr=null,Ri(e,t,r),nr=o,vn=n,nr!==null&&(vn?(e=nr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):nr.removeChild(r.stateNode));break;case 18:nr!==null&&(vn?(e=nr,r=r.stateNode,e.nodeType===8?B0(e.parentNode,r):e.nodeType===1&&B0(e,r),nf(e)):B0(nr,r.stateNode));break;case 4:o=nr,n=vn,nr=r.stateNode.containerInfo,vn=!0,Ri(e,t,r),nr=o,vn=n;break;case 0:case 11:case 14:case 15:if(!vr&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){n=o=o.next;do{var a=n,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&Dw(r,t,i),n=n.next}while(n!==o)}Ri(e,t,r);break;case 1:if(!vr&&(Lu(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(s){yt(r,t,s)}Ri(e,t,r);break;case 21:Ri(e,t,r);break;case 22:r.mode&1?(vr=(o=vr)||r.memoizedState!==null,Ri(e,t,r),vr=o):Ri(e,t,r);break;default:Ri(e,t,r)}}function pk(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new wW),t.forEach(function(o){var n=MW.bind(null,e,o);r.has(o)||(r.add(o),o.then(n,n))})}}function gn(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var n=r[o];try{var a=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:nr=s.stateNode,vn=!1;break e;case 3:nr=s.stateNode.containerInfo,vn=!0;break e;case 4:nr=s.stateNode.containerInfo,vn=!0;break e}s=s.return}if(nr===null)throw Error($(160));nE(a,i,n),nr=null,vn=!1;var l=n.alternate;l!==null&&(l.return=null),n.return=null}catch(u){yt(n,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)aE(t,e),t=t.sibling}function aE(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gn(t,e),ta(e),o&4){try{Yd(3,e,e.return),Ph(3,e)}catch(m){yt(e,e.return,m)}try{Yd(5,e,e.return)}catch(m){yt(e,e.return,m)}}break;case 1:gn(t,e),ta(e),o&512&&r!==null&&Lu(r,r.return);break;case 5:if(gn(t,e),ta(e),o&512&&r!==null&&Lu(r,r.return),e.flags&32){var n=e.stateNode;try{ef(n,"")}catch(m){yt(e,e.return,m)}}if(o&4&&(n=e.stateNode,n!=null)){var a=e.memoizedProps,i=r!==null?r.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&Lk(n,a),iw(s,i);var u=iw(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?Ak(n,d):c==="dangerouslySetInnerHTML"?Mk(n,d):c==="children"?ef(n,d):Gw(n,c,d,u)}switch(s){case"input":tw(n,a);break;case"textarea":Tk(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?ku(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?ku(n,!!a.multiple,a.defaultValue,!0):ku(n,!!a.multiple,a.multiple?[]:"",!1))}n[cf]=a}catch(m){yt(e,e.return,m)}}break;case 6:if(gn(t,e),ta(e),o&4){if(e.stateNode===null)throw Error($(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(m){yt(e,e.return,m)}}break;case 3:if(gn(t,e),ta(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{nf(t.containerInfo)}catch(m){yt(e,e.return,m)}break;case 4:gn(t,e),ta(e);break;case 13:gn(t,e),ta(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(SC=Rt())),o&4&&pk(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(vr=(u=vr)||c,gn(t,e),vr=u):gn(t,e),ta(e),o&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(oe=e,c=e.child;c!==null;){for(d=oe=c;oe!==null;){switch(f=oe,p=f.child,f.tag){case 0:case 11:case 14:case 15:Yd(4,f,f.return);break;case 1:Lu(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){o=f,r=f.return;try{t=o,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){yt(o,r,m)}}break;case 5:Lu(f,f.return);break;case 22:if(f.memoizedState!==null){gk(d);continue}}p!==null?(p.return=f,oe=p):gk(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=Ek("display",i))}catch(m){yt(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){yt(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:gn(t,e),ta(e),o&4&&pk(e);break;case 21:break;default:gn(t,e),ta(e)}}function ta(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(oE(r)){var o=r;break e}r=r.return}throw Error($(160))}switch(o.tag){case 5:var n=o.stateNode;o.flags&32&&(ef(n,""),o.flags&=-33);var a=fk(e);Fw(e,a,n);break;case 3:case 4:var i=o.stateNode.containerInfo,s=fk(e);Ow(e,s,i);break;default:throw Error($(161))}}catch(l){yt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function SW(e,t,r){oe=e,iE(e,t,r)}function iE(e,t,r){for(var o=(e.mode&1)!==0;oe!==null;){var n=oe,a=n.child;if(n.tag===22&&o){var i=n.memoizedState!==null||Fg;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||vr;s=Fg;var u=vr;if(Fg=i,(vr=l)&&!u)for(oe=n;oe!==null;)i=oe,l=i.child,i.tag===22&&i.memoizedState!==null?hk(n):l!==null?(l.return=i,oe=l):hk(n);for(;a!==null;)oe=a,iE(a,t,r),a=a.sibling;oe=n,Fg=s,vr=u}mk(e,t,r)}else n.subtreeFlags&8772&&a!==null?(a.return=n,oe=a):mk(e,t,r)}}function mk(e){for(;oe!==null;){var t=oe;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:vr||Ph(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!vr)if(r===null)o.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:hn(t.type,r.memoizedProps);o.componentDidUpdate(n,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&Z1(t,a,o);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Z1(t,i,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.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&&nf(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}vr||t.flags&512&&Nw(t)}catch(f){yt(t,t.return,f)}}if(t===e){oe=null;break}if(r=t.sibling,r!==null){r.return=t.return,oe=r;break}oe=t.return}}function gk(e){for(;oe!==null;){var t=oe;if(t===e){oe=null;break}var r=t.sibling;if(r!==null){r.return=t.return,oe=r;break}oe=t.return}}function hk(e){for(;oe!==null;){var t=oe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ph(4,t)}catch(l){yt(t,r,l)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var n=t.return;try{o.componentDidMount()}catch(l){yt(t,n,l)}}var a=t.return;try{Nw(t)}catch(l){yt(t,a,l)}break;case 5:var i=t.return;try{Nw(t)}catch(l){yt(t,i,l)}}}catch(l){yt(t,t.return,l)}if(t===e){oe=null;break}var s=t.sibling;if(s!==null){s.return=t.return,oe=s;break}oe=t.return}}var bW=Math.ceil,ph=_a.ReactCurrentDispatcher,wC=_a.ReactCurrentOwner,Vo=_a.ReactCurrentBatchConfig,De=0,Kt=null,Mt=null,ar=0,fo=0,Tu=zi(0),Vt=0,hf=null,Zs=0,Lh=0,CC=0,Qd=null,qr=null,SC=0,Uu=1/0,Ta=null,mh=!1,_w=null,Fi=null,_g=!1,Mi=null,gh=0,Zd=0,Vw=null,jg=-1,$g=0;function Nr(){return De&6?Rt():jg!==-1?jg:jg=Rt()}function _i(e){return e.mode&1?De&2&&ar!==0?ar&-ar:iW.transition!==null?($g===0&&($g=Wk()),$g):(e=We,e!==0||(e=window.event,e=e===void 0?16:Qk(e.type)),e):1}function wn(e,t,r,o){if(50<Zd)throw Zd=0,Vw=null,Error($(185));vf(e,r,o),(!(De&2)||e!==Kt)&&(e===Kt&&(!(De&2)&&(Lh|=r),Vt===4&&Ti(e,ar)),Qr(e,o),r===1&&De===0&&!(t.mode&1)&&(Uu=Rt()+500,bh&&Gi()))}function Qr(e,t){var r=e.callbackNode;lG(e,t);var o=Zg(e,e===Kt?ar:0);if(o===0)r!==null&&R1(r),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(r!=null&&R1(r),t===1)e.tag===0?aW(vk.bind(null,e)):hM(vk.bind(null,e)),tW(function(){!(De&6)&&Gi()}),r=null;else{switch(jk(o)){case 1:r=Kw;break;case 4:r=zk;break;case 16:r=Qg;break;case 536870912:r=Gk;break;default:r=Qg}r=mE(r,sE.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function sE(e,t){if(jg=-1,$g=0,De&6)throw Error($(327));var r=e.callbackNode;if(Nu()&&e.callbackNode!==r)return null;var o=Zg(e,e===Kt?ar:0);if(o===0)return null;if(o&30||o&e.expiredLanes||t)t=hh(e,o);else{t=o;var n=De;De|=2;var a=uE();(Kt!==e||ar!==t)&&(Ta=null,Uu=Rt()+500,qs(e,t));do try{PW();break}catch(s){lE(e,s)}while(1);sC(),ph.current=a,De=n,Mt!==null?t=0:(Kt=null,ar=0,t=Vt)}if(t!==0){if(t===2&&(n=dw(e),n!==0&&(o=n,t=Bw(e,n))),t===1)throw r=hf,qs(e,0),Ti(e,o),Qr(e,Rt()),r;if(t===6)Ti(e,o);else{if(n=e.current.alternate,!(o&30)&&!RW(n)&&(t=hh(e,o),t===2&&(a=dw(e),a!==0&&(o=a,t=Bw(e,a))),t===1))throw r=hf,qs(e,0),Ti(e,o),Qr(e,Rt()),r;switch(e.finishedWork=n,e.finishedLanes=o,t){case 0:case 1:throw Error($(345));case 2:Gs(e,qr,Ta);break;case 3:if(Ti(e,o),(o&130023424)===o&&(t=SC+500-Rt(),10<t)){if(Zg(e,0)!==0)break;if(n=e.suspendedLanes,(n&o)!==o){Nr(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=yw(Gs.bind(null,e,qr,Ta),t);break}Gs(e,qr,Ta);break;case 4:if(Ti(e,o),(o&4194240)===o)break;for(t=e.eventTimes,n=-1;0<o;){var i=31-yn(o);a=1<<i,i=t[i],i>n&&(n=i),o&=~a}if(o=n,o=Rt()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*bW(o/1960))-o,10<o){e.timeoutHandle=yw(Gs.bind(null,e,qr,Ta),o);break}Gs(e,qr,Ta);break;case 5:Gs(e,qr,Ta);break;default:throw Error($(329))}}}return Qr(e,Rt()),e.callbackNode===r?sE.bind(null,e):null}function Bw(e,t){var r=Qd;return e.current.memoizedState.isDehydrated&&(qs(e,t).flags|=256),e=hh(e,t),e!==2&&(t=qr,qr=r,t!==null&&Hw(t)),e}function Hw(e){qr===null?qr=e:qr.push.apply(qr,e)}function RW(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var o=0;o<r.length;o++){var n=r[o],a=n.getSnapshot;n=n.value;try{if(!Cn(a(),n))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Ti(e,t){for(t&=~CC,t&=~Lh,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-yn(t),o=1<<r;e[r]=-1,t&=~o}}function vk(e){if(De&6)throw Error($(327));Nu();var t=Zg(e,0);if(!(t&1))return Qr(e,Rt()),null;var r=hh(e,t);if(e.tag!==0&&r===2){var o=dw(e);o!==0&&(t=o,r=Bw(e,o))}if(r===1)throw r=hf,qs(e,0),Ti(e,t),Qr(e,Rt()),r;if(r===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Gs(e,qr,Ta),Qr(e,Rt()),null}function bC(e,t){var r=De;De|=1;try{return e(t)}finally{De=r,De===0&&(Uu=Rt()+500,bh&&Gi())}}function Js(e){Mi!==null&&Mi.tag===0&&!(De&6)&&Nu();var t=De;De|=1;var r=Vo.transition,o=We;try{if(Vo.transition=null,We=1,e)return e()}finally{We=o,Vo.transition=r,De=t,!(De&6)&&Gi()}}function RC(){fo=Tu.current,rt(Tu)}function qs(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,eW(r)),Mt!==null)for(r=Mt.return;r!==null;){var o=r;switch(nC(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&oh();break;case 3:Bu(),rt(Xr),rt(xr),pC();break;case 5:fC(o);break;case 4:Bu();break;case 13:rt(pt);break;case 19:rt(pt);break;case 10:lC(o.type._context);break;case 22:case 23:RC()}r=r.return}if(Kt=e,Mt=e=Vi(e.current,null),ar=fo=t,Vt=0,hf=null,CC=Lh=Zs=0,qr=Qd=null,js!==null){for(t=0;t<js.length;t++)if(r=js[t],o=r.interleaved,o!==null){r.interleaved=null;var n=o.next,a=r.pending;if(a!==null){var i=a.next;a.next=n,o.next=i}r.pending=o}js=null}return e}function lE(e,t){do{var r=Mt;try{if(sC(),zg.current=fh,dh){for(var o=mt.memoizedState;o!==null;){var n=o.queue;n!==null&&(n.pending=null),o=o.next}dh=!1}if(Qs=0,qt=_t=mt=null,Xd=!1,pf=0,wC.current=null,r===null||r.return===null){Vt=1,hf=t,Mt=null;break}e:{var a=e,i=r.return,s=r,l=t;if(t=ar,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=nk(i);if(p!==null){p.flags&=-257,ak(p,i,s,a,t),p.mode&1&&ok(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)){ok(a,u,t),IC();break e}l=Error($(426))}}else if(lt&&s.mode&1){var x=nk(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),ak(x,i,s,a,t),aC(Hu(l,s));break e}}a=l=Hu(l,s),Vt!==4&&(Vt=2),Qd===null?Qd=[a]:Qd.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var h=jM(a,l,t);Q1(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"&&(Fi===null||!Fi.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=$M(a,s,t);Q1(a,w);break e}}a=a.return}while(a!==null)}dE(r)}catch(C){t=C,Mt===r&&r!==null&&(Mt=r=r.return);continue}break}while(1)}function uE(){var e=ph.current;return ph.current=fh,e===null?fh:e}function IC(){(Vt===0||Vt===3||Vt===2)&&(Vt=4),Kt===null||!(Zs&268435455)&&!(Lh&268435455)||Ti(Kt,ar)}function hh(e,t){var r=De;De|=2;var o=uE();(Kt!==e||ar!==t)&&(Ta=null,qs(e,t));do try{IW();break}catch(n){lE(e,n)}while(1);if(sC(),De=r,ph.current=o,Mt!==null)throw Error($(261));return Kt=null,ar=0,Vt}function IW(){for(;Mt!==null;)cE(Mt)}function PW(){for(;Mt!==null&&!J5();)cE(Mt)}function cE(e){var t=pE(e.alternate,e,fo);e.memoizedProps=e.pendingProps,t===null?dE(e):Mt=t,wC.current=null}function dE(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=yW(r,t),r!==null){r.flags&=32767,Mt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Vt=6,Mt=null;return}}else if(r=xW(r,t,fo),r!==null){Mt=r;return}if(t=t.sibling,t!==null){Mt=t;return}Mt=t=e}while(t!==null);Vt===0&&(Vt=5)}function Gs(e,t,r){var o=We,n=Vo.transition;try{Vo.transition=null,We=1,LW(e,t,r,o)}finally{Vo.transition=n,We=o}return null}function LW(e,t,r,o){do Nu();while(Mi!==null);if(De&6)throw Error($(327));r=e.finishedWork;var n=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error($(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(uG(e,a),e===Kt&&(Mt=Kt=null,ar=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||_g||(_g=!0,mE(Qg,function(){return Nu(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=Vo.transition,Vo.transition=null;var i=We;We=1;var s=De;De|=4,wC.current=null,CW(e,r),aE(r,e),XG(vw),Jg=!!hw,vw=hw=null,e.current=r,SW(r,e,n),eG(),De=s,We=i,Vo.transition=a}else e.current=r;if(_g&&(_g=!1,Mi=e,gh=n),a=e.pendingLanes,a===0&&(Fi=null),oG(r.stateNode,o),Qr(e,Rt()),t!==null)for(o=e.onRecoverableError,r=0;r<t.length;r++)n=t[r],o(n.value,{componentStack:n.stack,digest:n.digest});if(mh)throw mh=!1,e=_w,_w=null,e;return gh&1&&e.tag!==0&&Nu(),a=e.pendingLanes,a&1?e===Vw?Zd++:(Zd=0,Vw=e):Zd=0,Gi(),null}function Nu(){if(Mi!==null){var e=jk(gh),t=Vo.transition,r=We;try{if(Vo.transition=null,We=16>e?16:e,Mi===null)var o=!1;else{if(e=Mi,Mi=null,gh=0,De&6)throw Error($(331));var n=De;for(De|=4,oe=e.current;oe!==null;){var a=oe,i=a.child;if(oe.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(oe=u;oe!==null;){var c=oe;switch(c.tag){case 0:case 11:case 15:Yd(8,c,a)}var d=c.child;if(d!==null)d.return=c,oe=d;else for(;oe!==null;){c=oe;var f=c.sibling,p=c.return;if(rE(c),c===u){oe=null;break}if(f!==null){f.return=p,oe=f;break}oe=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)}}oe=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,oe=i;else e:for(;oe!==null;){if(a=oe,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Yd(9,a,a.return)}var h=a.sibling;if(h!==null){h.return=a.return,oe=h;break e}oe=a.return}}var v=e.current;for(oe=v;oe!==null;){i=oe;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,oe=y;else e:for(i=v;oe!==null;){if(s=oe,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Ph(9,s)}}catch(C){yt(s,s.return,C)}if(s===i){oe=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,oe=w;break e}oe=s.return}}if(De=n,Gi(),na&&typeof na.onPostCommitFiberRoot=="function")try{na.onPostCommitFiberRoot(xh,e)}catch{}o=!0}return o}finally{We=r,Vo.transition=t}}return!1}function xk(e,t,r){t=Hu(r,t),t=jM(e,t,1),e=Oi(e,t,1),t=Nr(),e!==null&&(vf(e,1,t),Qr(e,t))}function yt(e,t,r){if(e.tag===3)xk(e,e,r);else for(;t!==null;){if(t.tag===3){xk(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Fi===null||!Fi.has(o))){e=Hu(r,e),e=$M(t,e,1),t=Oi(t,e,1),e=Nr(),t!==null&&(vf(t,1,e),Qr(t,e));break}}t=t.return}}function TW(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),t=Nr(),e.pingedLanes|=e.suspendedLanes&r,Kt===e&&(ar&r)===r&&(Vt===4||Vt===3&&(ar&130023424)===ar&&500>Rt()-SC?qs(e,0):CC|=r),Qr(e,t)}function fE(e,t){t===0&&(e.mode&1?(t=bg,bg<<=1,!(bg&130023424)&&(bg=4194304)):t=1);var r=Nr();e=Oa(e,t),e!==null&&(vf(e,t,r),Qr(e,r))}function kW(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),fE(e,r)}function MW(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:o=e.stateNode;break;default:throw Error($(314))}o!==null&&o.delete(t),fE(e,r)}var pE;pE=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xr.current)Kr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Kr=!1,vW(e,t,r);Kr=!!(e.flags&131072)}else Kr=!1,lt&&t.flags&1048576&&vM(t,ih,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Wg(e,t),e=t.pendingProps;var n=Fu(t,xr.current);Du(t,r),n=gC(null,t,o,e,n,r);var a=hC();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,Yr(o)?(a=!0,nh(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,cC(t),n.updater=Ih,t.stateNode=n,n._reactInternals=t,Pw(t,o,e,r),t=kw(null,t,o,!0,a,r)):(t.tag=0,lt&&a&&oC(t),Dr(null,t,n,r),t=t.child),t;case 16:o=t.elementType;e:{switch(Wg(e,t),e=t.pendingProps,n=o._init,o=n(o._payload),t.type=o,n=t.tag=AW(o),e=hn(o,e),n){case 0:t=Tw(null,t,o,e,r);break e;case 1:t=lk(null,t,o,e,r);break e;case 11:t=ik(null,t,o,e,r);break e;case 14:t=sk(null,t,o,hn(o.type,e),r);break e}throw Error($(306,o,""))}return t;case 0:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),Tw(e,t,o,n,r);case 1:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),lk(e,t,o,n,r);case 3:e:{if(YM(t),e===null)throw Error($(387));o=t.pendingProps,a=t.memoizedState,n=a.element,bM(e,t),uh(t,o,null,r);var i=t.memoizedState;if(o=i.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){n=Hu(Error($(423)),t),t=uk(e,t,o,r,n);break e}else if(o!==n){n=Hu(Error($(424)),t),t=uk(e,t,o,r,n);break e}else for(po=Ni(t.stateNode.containerInfo.firstChild),mo=t,lt=!0,xn=null,r=CM(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(_u(),o===n){t=Fa(e,t,r);break e}Dr(e,t,o,r)}t=t.child}return t;case 5:return RM(t),e===null&&bw(t),o=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,xw(o,n)?i=null:a!==null&&xw(o,a)&&(t.flags|=32),XM(e,t),Dr(e,t,i,r),t.child;case 6:return e===null&&bw(t),null;case 13:return QM(e,t,r);case 4:return dC(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Vu(t,null,o,r):Dr(e,t,o,r),t.child;case 11:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),ik(e,t,o,n,r);case 7:return Dr(e,t,t.pendingProps,r),t.child;case 8:return Dr(e,t,t.pendingProps.children,r),t.child;case 12:return Dr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(o=t.type._context,n=t.pendingProps,a=t.memoizedProps,i=n.value,Qe(sh,o._currentValue),o._currentValue=i,a!==null)if(Cn(a.value,i)){if(a.children===n.children&&!Xr.current){t=Fa(e,t,r);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===o){if(a.tag===1){l=Aa(-1,r&-r),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|=r,l=a.alternate,l!==null&&(l.lanes|=r),Rw(a.return,r,t),s.lanes|=r;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($(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),Rw(i,r,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}Dr(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,o=t.pendingProps.children,Du(t,r),n=Bo(n),o=o(n),t.flags|=1,Dr(e,t,o,r),t.child;case 14:return o=t.type,n=hn(o,t.pendingProps),n=hn(o.type,n),sk(e,t,o,n,r);case 15:return qM(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),Wg(e,t),t.tag=1,Yr(o)?(e=!0,nh(t)):e=!1,Du(t,r),WM(t,o,n),Pw(t,o,n,r),kw(null,t,o,!0,e,r);case 19:return ZM(e,t,r);case 22:return KM(e,t,r)}throw Error($(156,t.tag))};function mE(e,t){return Uk(e,t)}function EW(e,t,r,o){this.tag=e,this.key=r,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _o(e,t,r,o){return new EW(e,t,r,o)}function PC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function AW(e){if(typeof e=="function")return PC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jw)return 11;if(e===$w)return 14}return 2}function Vi(e,t){var r=e.alternate;return r===null?(r=_o(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function qg(e,t,r,o,n,a){var i=2;if(o=e,typeof e=="function")PC(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case xu:return Ks(r.children,n,a,t);case Ww:i=8,n|=8;break;case Y0:return e=_o(12,r,t,n|2),e.elementType=Y0,e.lanes=a,e;case Q0:return e=_o(13,r,t,n),e.elementType=Q0,e.lanes=a,e;case Z0:return e=_o(19,r,t,n),e.elementType=Z0,e.lanes=a,e;case Rk:return Th(r,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Sk:i=10;break e;case bk:i=9;break e;case jw:i=11;break e;case $w:i=14;break e;case Ii:i=16,o=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=_o(i,r,t,n),t.elementType=e,t.type=o,t.lanes=a,t}function Ks(e,t,r,o){return e=_o(7,e,o,t),e.lanes=r,e}function Th(e,t,r,o){return e=_o(22,e,o,t),e.elementType=Rk,e.lanes=r,e.stateNode={isHidden:!1},e}function q0(e,t,r){return e=_o(6,e,null,t),e.lanes=r,e}function K0(e,t,r){return t=_o(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function DW(e,t,r,o,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=E0(0),this.expirationTimes=E0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=E0(0),this.identifierPrefix=o,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function LC(e,t,r,o,n,a,i,s,l){return e=new DW(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=_o(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},cC(a),e}function NW(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:vu,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}function gE(e){if(!e)return Hi;e=e._reactInternals;e:{if(tl(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Yr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var r=e.type;if(Yr(r))return gM(e,r,t)}return t}function hE(e,t,r,o,n,a,i,s,l){return e=LC(r,o,!0,e,n,a,i,s,l),e.context=gE(null),r=e.current,o=Nr(),n=_i(r),a=Aa(o,n),a.callback=t??null,Oi(r,a,n),e.current.lanes=n,vf(e,n,o),Qr(e,o),e}function kh(e,t,r,o){var n=t.current,a=Nr(),i=_i(n);return r=gE(r),t.context===null?t.context=r:t.pendingContext=r,t=Aa(a,i),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=Oi(n,t,i),e!==null&&(wn(e,n,i,a),Ug(e,n,i)),i}function vh(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 yk(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function TC(e,t){yk(e,t),(e=e.alternate)&&yk(e,t)}function OW(){return null}var vE=typeof reportError=="function"?reportError:function(e){console.error(e)};function kC(e){this._internalRoot=e}Mh.prototype.render=kC.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));kh(e,t,null,null)};Mh.prototype.unmount=kC.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Js(function(){kh(null,e,null,null)}),t[Na]=null}};function Mh(e){this._internalRoot=e}Mh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kk();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Li.length&&t!==0&&t<Li[r].priority;r++);Li.splice(r,0,e),r===0&&Yk(e)}};function MC(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Eh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function wk(){}function FW(e,t,r,o,n){if(n){if(typeof o=="function"){var a=o;o=function(){var u=vh(i);a.call(u)}}var i=hE(t,o,e,0,null,!1,!1,"",wk);return e._reactRootContainer=i,e[Na]=i.current,lf(e.nodeType===8?e.parentNode:e),Js(),i}for(;n=e.lastChild;)e.removeChild(n);if(typeof o=="function"){var s=o;o=function(){var u=vh(l);s.call(u)}}var l=LC(e,0,!1,null,null,!1,!1,"",wk);return e._reactRootContainer=l,e[Na]=l.current,lf(e.nodeType===8?e.parentNode:e),Js(function(){kh(t,l,r,o)}),l}function Ah(e,t,r,o,n){var a=r._reactRootContainer;if(a){var i=a;if(typeof n=="function"){var s=n;n=function(){var l=vh(i);s.call(l)}}kh(t,i,e,n)}else i=FW(r,t,e,n,o);return vh(i)}$k=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=zd(t.pendingLanes);r!==0&&(Xw(t,r|1),Qr(t,Rt()),!(De&6)&&(Uu=Rt()+500,Gi()))}break;case 13:Js(function(){var o=Oa(e,1);if(o!==null){var n=Nr();wn(o,e,1,n)}}),TC(e,1)}};Yw=function(e){if(e.tag===13){var t=Oa(e,134217728);if(t!==null){var r=Nr();wn(t,e,134217728,r)}TC(e,134217728)}};qk=function(e){if(e.tag===13){var t=_i(e),r=Oa(e,t);if(r!==null){var o=Nr();wn(r,e,t,o)}TC(e,t)}};Kk=function(){return We};Xk=function(e,t){var r=We;try{return We=e,t()}finally{We=r}};lw=function(e,t,r){switch(t){case"input":if(tw(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var n=Sh(o);if(!n)throw Error($(90));Pk(o),tw(o,n)}}}break;case"textarea":Tk(e,r);break;case"select":t=r.value,t!=null&&ku(e,!!r.multiple,t,!1)}};Ok=bC;Fk=Js;var _W={usingClientEntryPoint:!1,Events:[yf,Su,Sh,Dk,Nk,bC]},Vd={findFiberByHostInstance:Ws,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},VW={bundleType:Vd.bundleType,version:Vd.version,rendererPackageName:Vd.rendererPackageName,rendererConfig:Vd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_a.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Bk(e),e===null?null:e.stateNode},findFiberByHostInstance:Vd.findFiberByHostInstance||OW,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Bd=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Bd.isDisabled&&Bd.supportsFiber))try{xh=Bd.inject(VW),na=Bd}catch{}var Bd;vo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_W;vo.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!MC(t))throw Error($(200));return NW(e,t,null,r)};vo.createRoot=function(e,t){if(!MC(e))throw Error($(299));var r=!1,o="",n=vE;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=LC(e,1,!1,null,null,r,!1,o,n),e[Na]=t.current,lf(e.nodeType===8?e.parentNode:e),new kC(t)};vo.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($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=Bk(t),e=e===null?null:e.stateNode,e};vo.flushSync=function(e){return Js(e)};vo.hydrate=function(e,t,r){if(!Eh(t))throw Error($(200));return Ah(null,e,t,!0,r)};vo.hydrateRoot=function(e,t,r){if(!MC(e))throw Error($(405));var o=r!=null&&r.hydratedSources||null,n=!1,a="",i=vE;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=hE(t,null,e,1,r??null,n,!1,a,i),e[Na]=t.current,lf(e),o)for(e=0;e<o.length;e++)r=o[e],n=r._getVersion,n=n(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,n]:t.mutableSourceEagerHydrationData.push(r,n);return new Mh(t)};vo.render=function(e,t,r){if(!Eh(t))throw Error($(200));return Ah(null,e,t,!1,r)};vo.unmountComponentAtNode=function(e){if(!Eh(e))throw Error($(40));return e._reactRootContainer?(Js(function(){Ah(null,null,e,!1,function(){e._reactRootContainer=null,e[Na]=null})}),!0):!1};vo.unstable_batchedUpdates=bC;vo.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!Eh(r))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return Ah(e,t,r,!1,o)};vo.version="18.3.1-next-f1338f8080-20240426"});var Va=Zn((Yte,wE)=>{"use strict";function yE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yE)}catch(e){console.error(e)}}yE(),wE.exports=xE()});var cA=Zn(uA=>{"use strict";var oc=M();function z$(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var G$=typeof Object.is=="function"?Object.is:z$,W$=oc.useState,j$=oc.useEffect,$$=oc.useLayoutEffect,q$=oc.useDebugValue;function K$(e,t){var r=t(),o=W$({inst:{value:r,getSnapshot:t}}),n=o[0].inst,a=o[1];return $$(function(){n.value=r,n.getSnapshot=t,eS(n)&&a({inst:n})},[e,r,t]),j$(function(){return eS(n)&&a({inst:n}),e(function(){eS(n)&&a({inst:n})})},[e]),q$(r),r}function eS(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!G$(e,r)}catch{return!0}}function X$(e,t){return t()}var Y$=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?X$:K$;uA.useSyncExternalStore=oc.useSyncExternalStore!==void 0?oc.useSyncExternalStore:Y$});var fA=Zn((iie,dA)=>{"use strict";dA.exports=cA()});var Pte={};n5(Pte,{Accordion:()=>nA,AccordionContent:()=>KC,AccordionItem:()=>$C,AccordionTrigger:()=>qC,Alert:()=>XC,AlertDescription:()=>QC,AlertTitle:()=>YC,AspectRatio:()=>JC,Avatar:()=>Wh,AvatarFallback:()=>jh,AvatarGroup:()=>iS,AvatarImage:()=>aS,Badge:()=>_r,Breadcrumb:()=>lS,BreadcrumbEllipsis:()=>$h,BreadcrumbItem:()=>cS,BreadcrumbLink:()=>fS,BreadcrumbList:()=>uS,BreadcrumbPage:()=>pS,BreadcrumbSeparator:()=>dS,Button:()=>Ee,ButtonGroup:()=>nT,Card:()=>Sb,CardCVCInput:()=>Nb,CardContent:()=>Pb,CardDescription:()=>Ib,CardExpiryInput:()=>Db,CardFooter:()=>Lb,CardHeader:()=>bb,CardNumberInput:()=>Ab,CardTitle:()=>Rb,CardZipInput:()=>Ob,Carousel:()=>Ub,CarouselContent:()=>Gb,CarouselItem:()=>jb,CarouselNext:()=>qb,CarouselPrevious:()=>$b,Checkbox:()=>Px,CheckboxGroup:()=>Yb,CheckboxLabel:()=>am,CheckboxWithLabel:()=>Qb,Collapsible:()=>QO,CollapsibleContent:()=>tR,CollapsibleTrigger:()=>eR,ColorPicker:()=>Jx,Command:()=>ly,CommandDialog:()=>vB,CommandEmpty:()=>sI,CommandGroup:()=>lI,CommandInput:()=>aI,CommandItem:()=>cI,CommandList:()=>iI,CommandSeparator:()=>uI,CommandShortcut:()=>dI,DatePicker:()=>py,DateRangePicker:()=>DI,DateTimePicker:()=>NI,Dialog:()=>ay,DialogClose:()=>gB,DialogContent:()=>bm,DialogDescription:()=>sy,DialogFooter:()=>oI,DialogForm:()=>nI,DialogHeader:()=>iy,DialogTitle:()=>od,DialogTrigger:()=>mB,DraggableList:()=>BB,DropdownMenu:()=>XH,DropdownMenuCheckboxItem:()=>sP,DropdownMenuContent:()=>aP,DropdownMenuGroup:()=>QH,DropdownMenuItem:()=>iP,DropdownMenuLabel:()=>uP,DropdownMenuPortal:()=>ZH,DropdownMenuRadioGroup:()=>eU,DropdownMenuRadioItem:()=>lP,DropdownMenuSeparator:()=>cP,DropdownMenuShortcut:()=>dP,DropdownMenuSub:()=>JH,DropdownMenuSubContent:()=>nP,DropdownMenuSubTrigger:()=>oP,DropdownMenuTrigger:()=>YH,FileUpload:()=>pP,FreeBadge:()=>mU,GestureDrawer:()=>mP,GitHubStarButton:()=>FQ,GitHubStars:()=>nU,GradientPicker:()=>_V,Input:()=>cr,InputOTP:()=>vP,InputOTPGroup:()=>xP,InputOTPSeparator:()=>CP,InputOTPSlot:()=>wP,Kbd:()=>ZL,Label:()=>Ur,LockedComponent:()=>SP,MonthPicker:()=>OI,MoonLogo:()=>wy,MoonLogoAnimated:()=>QQ,MoonLogoIcon:()=>YQ,MoonUIAccordion:()=>nA,MoonUIAccordionContent:()=>KC,MoonUIAccordionItem:()=>$C,MoonUIAccordionTrigger:()=>qC,MoonUIAlert:()=>XC,MoonUIAlertDescription:()=>QC,MoonUIAlertTitle:()=>YC,MoonUIAspectRatio:()=>JC,MoonUIAvatar:()=>Wh,MoonUIAvatarFallback:()=>jh,MoonUIAvatarGroup:()=>iS,MoonUIAvatarImage:()=>aS,MoonUIBadge:()=>_r,MoonUIBreadcrumb:()=>lS,MoonUIBreadcrumbEllipsis:()=>$h,MoonUIBreadcrumbItem:()=>cS,MoonUIBreadcrumbLink:()=>fS,MoonUIBreadcrumbList:()=>uS,MoonUIBreadcrumbPage:()=>pS,MoonUIBreadcrumbSeparator:()=>dS,MoonUIButton:()=>Ee,MoonUIButtonGroup:()=>nT,MoonUICalendar:()=>Uc,MoonUICard:()=>Sb,MoonUICardCVCInput:()=>Nb,MoonUICardContent:()=>Pb,MoonUICardDescription:()=>Ib,MoonUICardExpiryInput:()=>Db,MoonUICardFooter:()=>Lb,MoonUICardHeader:()=>bb,MoonUICardNumberInput:()=>Ab,MoonUICardTitle:()=>Rb,MoonUICardZipInput:()=>Ob,MoonUICarousel:()=>Ub,MoonUICarouselContent:()=>Gb,MoonUICarouselItem:()=>jb,MoonUICarouselNext:()=>qb,MoonUICarouselPrevious:()=>$b,MoonUICheckbox:()=>Px,MoonUICheckboxGroup:()=>Yb,MoonUICheckboxLabel:()=>am,MoonUICheckboxWithLabel:()=>Qb,MoonUICollapsible:()=>QO,MoonUICollapsibleContent:()=>tR,MoonUICollapsibleTrigger:()=>eR,MoonUIColorPicker:()=>Jx,MoonUICommand:()=>ly,MoonUICommandDialog:()=>vB,MoonUICommandEmpty:()=>sI,MoonUICommandGroup:()=>lI,MoonUICommandInput:()=>aI,MoonUICommandItem:()=>cI,MoonUICommandList:()=>iI,MoonUICommandSeparator:()=>uI,MoonUICommandShortcut:()=>dI,MoonUIDataTableBasic:()=>FB,MoonUIDatePicker:()=>py,MoonUIDateRangePicker:()=>DI,MoonUIDateTimePicker:()=>NI,MoonUIDialog:()=>ay,MoonUIDialogClose:()=>gB,MoonUIDialogContent:()=>bm,MoonUIDialogDescription:()=>sy,MoonUIDialogFooter:()=>oI,MoonUIDialogForm:()=>nI,MoonUIDialogHeader:()=>iy,MoonUIDialogTitle:()=>od,MoonUIDialogTrigger:()=>mB,MoonUIDraggableList:()=>BB,MoonUIDropdownMenu:()=>XH,MoonUIDropdownMenuCheckboxItem:()=>sP,MoonUIDropdownMenuContent:()=>aP,MoonUIDropdownMenuGroup:()=>QH,MoonUIDropdownMenuItem:()=>iP,MoonUIDropdownMenuLabel:()=>uP,MoonUIDropdownMenuPortal:()=>ZH,MoonUIDropdownMenuRadioGroup:()=>eU,MoonUIDropdownMenuRadioItem:()=>lP,MoonUIDropdownMenuSeparator:()=>cP,MoonUIDropdownMenuShortcut:()=>dP,MoonUIDropdownMenuSub:()=>JH,MoonUIDropdownMenuSubContent:()=>nP,MoonUIDropdownMenuSubTrigger:()=>oP,MoonUIDropdownMenuTrigger:()=>YH,MoonUIFileUpload:()=>pP,MoonUIFreeBadge:()=>mU,MoonUIGestureDrawer:()=>mP,MoonUIGitHubStars:()=>nU,MoonUIGradientPicker:()=>_V,MoonUIInput:()=>cr,MoonUIInputOTP:()=>vP,MoonUIInputOTPGroup:()=>xP,MoonUIInputOTPSeparator:()=>CP,MoonUIInputOTPSlot:()=>wP,MoonUIKbd:()=>ZL,MoonUILabel:()=>Ur,MoonUILockedComponent:()=>SP,MoonUIMonthPicker:()=>OI,MoonUIMoonLogo:()=>wy,MoonUIPagination:()=>RP,MoonUIPaginationContent:()=>IP,MoonUIPaginationEllipsis:()=>kP,MoonUIPaginationItem:()=>PP,MoonUIPaginationLink:()=>Bm,MoonUIPaginationNext:()=>TP,MoonUIPaginationPrevious:()=>LP,MoonUIPhoneInput:()=>KP,MoonUIPopover:()=>wa,MoonUIPopoverAnchor:()=>mV,MoonUIPopoverClose:()=>gV,MoonUIPopoverContent:()=>Vn,MoonUIPopoverFooter:()=>_R,MoonUIPopoverHeader:()=>FR,MoonUIPopoverSeparator:()=>OR,MoonUIPopoverTrigger:()=>Ca,MoonUIProBadge:()=>pU,MoonUIProComponentWrapper:()=>fU,MoonUIProgress:()=>_m,MoonUIRadioGroup:()=>XP,MoonUIRadioGroupItem:()=>Ly,MoonUIRadioItemWithLabel:()=>YP,MoonUIRadioLabel:()=>Ty,MoonUIRating:()=>eT,MoonUIRichTextEditor:()=>a3,MoonUIScrollArea:()=>oL,MoonUIScrollBar:()=>Fy,MoonUIScrollReveal:()=>nL,MoonUIScrollRevealContainer:()=>aL,MoonUIScrollRevealItem:()=>iL,MoonUISelect:()=>nu,MoonUISelectContent:()=>iu,MoonUISelectGroup:()=>r3,MoonUISelectItem:()=>kr,MoonUISelectLabel:()=>$P,MoonUISelectScrollDownButton:()=>Py,MoonUISelectScrollUpButton:()=>Iy,MoonUISelectSeparator:()=>qP,MoonUISelectTrigger:()=>au,MoonUISelectValue:()=>sd,MoonUISeparator:()=>To,MoonUISimpleColorPicker:()=>FV,MoonUISimpleEditor:()=>IL,MoonUISimpleTooltip:()=>RL,MoonUISkeleton:()=>xi,MoonUISkeletonAvatar:()=>jy,MoonUISkeletonCard:()=>LL,MoonUISkeletonText:()=>Wy,MoonUISlider:()=>ba,MoonUISpinner:()=>rT,MoonUISwipeableCard:()=>TL,MoonUISwitch:()=>ML,MoonUITable:()=>Lm,MoonUITableBody:()=>km,MoonUITableCaption:()=>MI,MoonUITableCell:()=>nd,MoonUITableFooter:()=>kI,MoonUITableHead:()=>Mm,MoonUITableHeader:()=>Tm,MoonUITableRow:()=>Zl,MoonUITabs:()=>vm,MoonUITabsContent:()=>Xl,MoonUITabsList:()=>xm,MoonUITabsTrigger:()=>Kl,MoonUITagsInput:()=>EL,MoonUITextarea:()=>AL,MoonUIToast:()=>Jy,MoonUIToastAction:()=>KL,MoonUIToastClose:()=>e0,MoonUIToastDescription:()=>r0,MoonUIToastProvider:()=>qL,MoonUIToastTitle:()=>t0,MoonUIToastViewport:()=>Zy,MoonUIToaster:()=>Yz,MoonUIToggle:()=>Xm,MoonUIToggleGroup:()=>IT,MoonUIToggleGroupItem:()=>PT,MoonUITooltip:()=>Zm,MoonUITooltipArrow:()=>Gy,MoonUITooltipContent:()=>hd,MoonUITooltipProvider:()=>zy,MoonUITooltipTrigger:()=>Jm,Pagination:()=>RP,PaginationContent:()=>IP,PaginationEllipsis:()=>kP,PaginationItem:()=>PP,PaginationLink:()=>Bm,PaginationNext:()=>TP,PaginationPrevious:()=>LP,Palette:()=>sl,PhoneInput:()=>KP,Pipette:()=>qf,Popover:()=>wa,PopoverAnchor:()=>mV,PopoverClose:()=>gV,PopoverContent:()=>Vn,PopoverFooter:()=>_R,PopoverHeader:()=>FR,PopoverSeparator:()=>OR,PopoverTrigger:()=>Ca,ProBadge:()=>pU,ProComponentWrapper:()=>fU,Progress:()=>_m,REGEXP_ONLY_CHARS:()=>cU,REGEXP_ONLY_DIGITS:()=>uU,REGEXP_ONLY_DIGITS_AND_CHARS:()=>dU,RadioGroup:()=>XP,RadioGroupItem:()=>Ly,RadioItemWithLabel:()=>YP,RadioLabel:()=>Ty,Rating:()=>eT,RichTextEditor:()=>a3,ScrollArea:()=>oL,ScrollBar:()=>Fy,ScrollReveal:()=>nL,ScrollRevealContainer:()=>aL,ScrollRevealItem:()=>iL,Select:()=>nu,SelectContent:()=>iu,SelectGroup:()=>r3,SelectItem:()=>kr,SelectLabel:()=>$P,SelectScrollDownButton:()=>Py,SelectScrollUpButton:()=>Iy,SelectSeparator:()=>qP,SelectTrigger:()=>au,SelectValue:()=>sd,Separator:()=>To,SimpleColorPicker:()=>FV,SimpleEditor:()=>IL,SimpleTooltip:()=>RL,Skeleton:()=>xi,SkeletonAvatar:()=>jy,SkeletonCard:()=>LL,SkeletonText:()=>Wy,Slider:()=>ba,Spinner:()=>rT,SwipeableCard:()=>TL,Switch:()=>ML,Table:()=>Lm,TableBody:()=>km,TableCaption:()=>MI,TableCell:()=>nd,TableFooter:()=>kI,TableHead:()=>Mm,TableHeader:()=>Tm,TableRow:()=>Zl,Tabs:()=>vm,TabsContent:()=>Xl,TabsList:()=>xm,TabsTrigger:()=>Kl,TagsInput:()=>EL,Textarea:()=>AL,Toast:()=>Jy,ToastAction:()=>KL,ToastClose:()=>e0,ToastDescription:()=>r0,ToastProvider:()=>qL,ToastTitle:()=>t0,ToastViewport:()=>Zy,Toaster:()=>Yz,Toggle:()=>Xm,ToggleGroup:()=>IT,ToggleGroupItem:()=>PT,Tooltip:()=>Zm,TooltipArrow:()=>Gy,TooltipContent:()=>hd,TooltipProvider:()=>zy,TooltipTrigger:()=>Jm,aspectRatioVariants:()=>lA,badgeVariants:()=>sS,buttonGroupVariants:()=>oT,buttonVariants:()=>ap,carouselContentVariants:()=>zb,carouselItemVariants:()=>Wb,cn:()=>P,collapsibleContentVariants:()=>ZO,collapsibleTriggerVariants:()=>Zb,format:()=>Wo,inputOTPSlotVariants:()=>yP,kbdVariants:()=>QL,moonUIBadgeVariants:()=>sS,moonUIButtonGroupVariants:()=>oT,moonUIButtonVariants:()=>ap,moonUICarouselContentVariants:()=>zb,moonUICarouselItemVariants:()=>Wb,moonUICreateSortableHeader:()=>_B,moonUIInputOTPSlotVariants:()=>yP,moonUIKbdVariants:()=>QL,moonUIPopoverContentVariants:()=>NR,moonUIRatingVariants:()=>JL,moonUISkeletonVariants:()=>PL,moonUISpinnerVariants:()=>tT,moonUIToggleVariants:()=>Km,moonUITooltipVariants:()=>bL,popoverContentVariants:()=>NR,progressVariants:()=>rU,ratingVariants:()=>JL,separatorVariants:()=>U3,skeletonVariants:()=>PL,spinnerVariants:()=>tT,switchVariants:()=>Az,toast:()=>XL,toggleVariants:()=>Km,tooltipVariants:()=>bL,useCarousel:()=>zc,useToast:()=>YL});module.exports=a5(Pte);var Gh=R(M());var Jr=R(M(),1);var Ao=R(M(),1),v0=R(N(),1);function QT(e,t){let r=Ao.createContext(t),o=a=>{let{children:i,...s}=a,l=Ao.useMemo(()=>s,Object.values(s));return(0,v0.jsx)(r.Provider,{value:l,children:i})};o.displayName=e+"Provider";function n(a){let i=Ao.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,n]}function Fe(e,t=[]){let r=[];function o(a,i){let s=Ao.createContext(i),l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=Ao.useMemo(()=>g,Object.values(g));return(0,v0.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,g=Ao.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=r.map(i=>Ao.createContext(i));return function(s){let l=s?.[e]||a;return Ao.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,L5(n,...t)]}function L5(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return Ao.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var Si=R(M(),1);var JT=R(M(),1);function ZT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uo(...e){return t=>{let r=!1,o=e.map(n=>{let a=ZT(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():ZT(e[n],null)}}}}function de(...e){return JT.useCallback(uo(...e),e)}var Ft=R(M(),1);var mu=R(N(),1);function co(e){let t=T5(e),r=Ft.forwardRef((o,n)=>{let{children:a,...i}=o,s=Ft.Children.toArray(a),l=s.find(k5);if(l){let u=l.props.children,c=s.map(d=>d===l?Ft.Children.count(u)>1?Ft.Children.only(null):Ft.isValidElement(u)?u.props.children:null:d);return(0,mu.jsx)(t,{...i,ref:n,children:Ft.isValidElement(u)?Ft.cloneElement(u,void 0,c):null})}return(0,mu.jsx)(t,{...i,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}function T5(e){let t=Ft.forwardRef((r,o)=>{let{children:n,...a}=r;if(Ft.isValidElement(n)){let i=E5(n),s=M5(a,n.props);return n.type!==Ft.Fragment&&(s.ref=o?uo(o,i):i),Ft.cloneElement(n,s)}return Ft.Children.count(n)>1?Ft.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var e1=Symbol("radix.slottable");function t1(e){let t=({children:r})=>(0,mu.jsx)(mu.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=e1,t}function k5(e){return Ft.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===e1}function M5(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function E5(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var fg=R(N(),1),A5=R(M(),1);var D5=R(N(),1);function Jn(e){let t=e+"CollectionProvider",[r,o]=Fe(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:x,children:h}=m,v=Si.default.useRef(null),y=Si.default.useRef(new Map).current;return(0,fg.jsx)(n,{scope:x,itemMap:y,collectionRef:v,children:h})};i.displayName=t;let s=e+"CollectionSlot",l=co(s),u=Si.default.forwardRef((m,x)=>{let{scope:h,children:v}=m,y=a(s,h),w=de(x,y.collectionRef);return(0,fg.jsx)(l,{ref:w,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=co(c),p=Si.default.forwardRef((m,x)=>{let{scope:h,children:v,...y}=m,w=Si.default.useRef(null),C=de(x,w),b=a(c,h);return Si.default.useEffect(()=>(b.itemMap.set(w,{ref:w,...y}),()=>void b.itemMap.delete(w))),(0,fg.jsx)(f,{[d]:"",ref:C,children:v})});p.displayName=c;function g(m){let x=a(e+"CollectionConsumer",m);return Si.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,o]}var Ute=!!(typeof window<"u"&&window.document&&window.document.createElement);function W(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var Do=R(M(),1);var r1=R(M(),1),Ve=globalThis?.document?r1.useLayoutEffect:()=>{};var pg=R(M(),1);var N5=Do[" useInsertionEffect ".trim().toString()]||Ve;function qe({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=O5({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=Do.useRef(e!==void 0);Do.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${o} 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,o])}let u=Do.useCallback(c=>{if(s){let d=F5(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function O5({defaultProp:e,onChange:t}){let[r,o]=Do.useState(e),n=Do.useRef(r),a=Do.useRef(t);return N5(()=>{a.current=t},[t]),Do.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function F5(e){return typeof e=="function"}var jte=Symbol("RADIX:SYNC_STATE");var CE=R(M(),1),SE=R(Va(),1);var bE=R(N(),1),BW=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],q=BW.reduce((e,t)=>{let r=co(`Primitive.${t}`),o=CE.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,bE.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Wu(e,t){e&&SE.flushSync(()=>e.dispatchEvent(t))}var sr=R(M(),1);var Zr=R(M(),1);var RE=R(M(),1);function HW(e,t){return RE.useReducer((r,o)=>t[r][o]??r,e)}var ut=e=>{let{present:t,children:r}=e,o=UW(t),n=typeof r=="function"?r({present:o.isPresent}):Zr.Children.only(r),a=de(o.ref,zW(n));return typeof r=="function"||o.isPresent?Zr.cloneElement(n,{ref:a}):null};ut.displayName="Presence";function UW(e){let[t,r]=Zr.useState(),o=Zr.useRef(null),n=Zr.useRef(e),a=Zr.useRef("none"),i=e?"mounted":"unmounted",[s,l]=HW(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Zr.useEffect(()=>{let u=Dh(o.current);a.current=s==="mounted"?u:"none"},[s]),Ve(()=>{let u=o.current,c=n.current;if(c!==e){let f=a.current,p=Dh(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),Ve(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let m=Dh(o.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=Dh(o.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:Zr.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function Dh(e){return e?.animationName||"none"}function zW(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var EC=R(M(),1);var GW=EC[" useId ".trim().toString()]||(()=>{}),WW=0;function Ne(e){let[t,r]=EC.useState(GW());return Ve(()=>{e||r(o=>o??String(WW++))},[e]),e||(t?`radix-${t}`:"")}var rl=R(N(),1),Nh="Collapsible",[jW,AC]=Fe(Nh),[$W,DC]=jW(Nh),IE=sr.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:o,defaultOpen:n,disabled:a,onOpenChange:i,...s}=e,[l,u]=qe({prop:o,defaultProp:n??!1,onChange:i,caller:Nh});return(0,rl.jsx)($W,{scope:r,disabled:a,contentId:Ne(),open:l,onOpenToggle:sr.useCallback(()=>u(c=>!c),[u]),children:(0,rl.jsx)(q.div,{"data-state":OC(l),"data-disabled":a?"":void 0,...s,ref:t})})});IE.displayName=Nh;var PE="CollapsibleTrigger",LE=sr.forwardRef((e,t)=>{let{__scopeCollapsible:r,...o}=e,n=DC(PE,r);return(0,rl.jsx)(q.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":OC(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:W(e.onClick,n.onOpenToggle)})});LE.displayName=PE;var NC="CollapsibleContent",TE=sr.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=DC(NC,e.__scopeCollapsible);return(0,rl.jsx)(ut,{present:r||n.open,children:({present:a})=>(0,rl.jsx)(qW,{...o,ref:t,present:a})})});TE.displayName=NC;var qW=sr.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:o,children:n,...a}=e,i=DC(NC,r),[s,l]=sr.useState(o),u=sr.useRef(null),c=de(t,u),d=sr.useRef(0),f=d.current,p=sr.useRef(0),g=p.current,m=i.open||s,x=sr.useRef(m),h=sr.useRef(void 0);return sr.useEffect(()=>{let v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),Ve(()=>{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(o)}},[i.open,o]),(0,rl.jsx)(q.div,{"data-state":OC(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 OC(e){return e?"open":"closed"}var Oh=IE,ju=LE,Cf=TE;var Fh=R(M(),1),KW=R(N(),1),XW=Fh.createContext(void 0);function ia(e){let t=Fh.useContext(XW);return e||t||"ltr"}var Bt=R(N(),1),Sn="Accordion",YW=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[_C,QW,ZW]=Jn(Sn),[Vh,Sre]=Fe(Sn,[ZW,AC]),VC=AC(),ME=Jr.default.forwardRef((e,t)=>{let{type:r,...o}=e,n=o,a=o;return(0,Bt.jsx)(_C.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Bt.jsx)(rj,{...a,ref:t}):(0,Bt.jsx)(tj,{...n,ref:t})})});ME.displayName=Sn;var[EE,JW]=Vh(Sn),[AE,ej]=Vh(Sn,{collapsible:!1}),tj=Jr.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},collapsible:a=!1,...i}=e,[s,l]=qe({prop:r,defaultProp:o??"",onChange:n,caller:Sn});return(0,Bt.jsx)(EE,{scope:e.__scopeAccordion,value:Jr.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Jr.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Bt.jsx)(AE,{scope:e.__scopeAccordion,collapsible:a,children:(0,Bt.jsx)(DE,{...i,ref:t})})})}),rj=Jr.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},...a}=e,[i,s]=qe({prop:r,defaultProp:o??[],onChange:n,caller:Sn}),l=Jr.default.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=Jr.default.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return(0,Bt.jsx)(EE,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:(0,Bt.jsx)(AE,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Bt.jsx)(DE,{...a,ref:t})})})}),[oj,Bh]=Vh(Sn),DE=Jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:o,dir:n,orientation:a="vertical",...i}=e,s=Jr.default.useRef(null),l=de(s,t),u=QW(r),d=ia(n)==="ltr",f=W(e.onKeyDown,p=>{if(!YW.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,Bt.jsx)(oj,{scope:r,disabled:o,direction:n,orientation:a,children:(0,Bt.jsx)(_C.Slot,{scope:r,children:(0,Bt.jsx)(q.div,{...i,"data-orientation":a,ref:l,onKeyDown:o?void 0:f})})})}),_h="AccordionItem",[nj,BC]=Vh(_h),NE=Jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:o,...n}=e,a=Bh(_h,r),i=JW(_h,r),s=VC(r),l=Ne(),u=o&&i.value.includes(o)||!1,c=a.disabled||e.disabled;return(0,Bt.jsx)(nj,{scope:r,open:u,disabled:c,triggerId:l,children:(0,Bt.jsx)(Oh,{"data-orientation":a.orientation,"data-state":HE(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:d=>{d?i.onItemOpen(o):i.onItemClose(o)}})})});NE.displayName=_h;var OE="AccordionHeader",FE=Jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Bh(Sn,r),a=BC(OE,r);return(0,Bt.jsx)(q.h3,{"data-orientation":n.orientation,"data-state":HE(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:t})});FE.displayName=OE;var FC="AccordionTrigger",_E=Jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Bh(Sn,r),a=BC(FC,r),i=ej(FC,r),s=VC(r);return(0,Bt.jsx)(_C.ItemSlot,{scope:r,children:(0,Bt.jsx)(ju,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:a.triggerId,...s,...o,ref:t})})});_E.displayName=FC;var VE="AccordionContent",BE=Jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Bh(Sn,r),a=BC(VE,r),i=VC(r);return(0,Bt.jsx)(Cf,{role:"region","aria-labelledby":a.triggerId,"data-orientation":n.orientation,...i,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});BE.displayName=VE;function HE(e){return e?"open":"closed"}var UE=ME,zE=NE,GE=FE,HC=_E,UC=BE;var Uh=R(M());var WE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ij=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.toLowerCase()),zC=e=>{let t=ij(e);return t.charAt(0).toUpperCase()+t.slice(1)},Hh=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim(),jE=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Sf=R(M());var $E={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 qE=(0,Sf.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:i,...s},l)=>(0,Sf.createElement)("svg",{ref:l,...$E,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:Hh("lucide",n),...!a&&!jE(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,Sf.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var H=(e,t)=>{let r=(0,Uh.forwardRef)(({className:o,...n},a)=>(0,Uh.createElement)(qE,{ref:a,iconNode:t,className:Hh(`lucide-${WE(zC(e))}`,`lucide-${e}`,o),...n}));return r.displayName=zC(e),r};var sj=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],bf=H("align-center",sj);var lj=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],Rf=H("align-justify",lj);var uj=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],If=H("align-left",uj);var cj=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Pf=H("align-right",cj);var dj=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],$u=H("arrow-down",dj);var fj=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Lf=H("arrow-left",fj);var pj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Tf=H("arrow-right",pj);var mj=[["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"}]],qu=H("arrow-up-down",mj);var gj=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Ku=H("arrow-up",gj);var hj=[["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"}]],kf=H("bold",hj);var vj=[["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"}]],ol=H("calendar",vj);var xj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yr=H("check",xj);var yj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],sa=H("chevron-down",yj);var wj=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],bn=H("chevron-left",wj);var Cj=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Fr=H("chevron-right",Cj);var Sj=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Mf=H("chevron-up",Sj);var bj=[["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"}]],Rn=H("circle-alert",bj);var Rj=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Wi=H("circle-check-big",Rj);var Ij=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nl=H("circle",Ij);var Pj=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ef=H("clock",Pj);var Lj=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Af=H("code",Lj);var Tj=[["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"}]],Df=H("copy",Tj);var kj=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Nf=H("credit-card",kj);var Mj=[["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"}]],Xu=H("crown",Mj);var Ej=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],Of=H("dot",Ej);var Aj=[["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"}]],la=H("ellipsis",Aj);var Dj=[["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"}]],Ff=H("external-link",Dj);var Nj=[["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"}]],al=H("eye",Nj);var Oj=[["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"}]],_f=H("file-text",Oj);var Fj=[["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"}]],Vf=H("file",Fj);var _j=[["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"}]],Bf=H("git-fork",_j);var Vj=[["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"}]],il=H("image",Vj);var Bj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Yu=H("info",Bj);var Hj=[["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"}]],Hf=H("italic",Hj);var Uj=[["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"}]],Uf=H("link",Uj);var zj=[["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"}]],zf=H("list-ordered",zj);var Gj=[["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"}]],Gf=H("list",Gj);var Wj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ht=H("loader-circle",Wj);var jj=[["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"}]],Qu=H("lock",jj);var $j=[["path",{d:"M5 12h14",key:"1ays0h"}]],Wf=H("minus",$j);var qj=[["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"}]],jf=H("music",qj);var Kj=[["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"}]],sl=H("palette",Kj);var Xj=[["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"}]],$f=H("phone",Xj);var Yj=[["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"}]],qf=H("pipette",Yj);var Qj=[["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"}]],Kf=H("quote",Qj);var Zj=[["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"}]],Xf=H("redo",Zj);var Jj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ll=H("search",Jj);var e$=[["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"}]],eo=H("square-pen",e$);var t$=[["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"}]],ji=H("star",t$);var r$=[["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"}]],Yf=H("strikethrough",r$);var o$=[["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"}]],$i=H("triangle-alert",o$);var n$=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Qf=H("underline",n$);var a$=[["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"}]],Zf=H("undo",a$);var i$=[["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"}]],Jf=H("upload",i$);var s$=[["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"}]],ep=H("video",s$);var l$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xo=H("x",l$);var u$=[["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"}]],Zu=H("zap",u$);var oA=R(M());function KE(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=KE(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function zh(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=KE(e))&&(o&&(o+=" "),o+=t);return o}var jC="-",c$=e=>{let t=f$(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let s=i.split(jC);return s[0]===""&&s.length!==1&&s.shift(),QE(s,t)||d$(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&o[i]?[...l,...o[i]]:l}}},QE=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),n=o?QE(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(jC);return t.validators.find(({validator:i})=>i(a))?.classGroupId},XE=/^\[(.+)\]$/,d$=e=>{if(XE.test(e)){let t=XE.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},f$=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return m$(Object.entries(e.classGroups),r).forEach(([a,i])=>{WC(i,o,a,t)}),o},WC=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:YE(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(p$(n)){WC(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,i])=>{WC(i,YE(t,a),r,o)})})},YE=(e,t)=>{let r=e;return t.split(jC).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},p$=e=>e.isThemeGetter,m$=(e,t)=>t?e.map(([r,o])=>{let n=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[r,n]}):e,g$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,n=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,o=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=o.get(a))!==void 0)return n(a,i),i},set(a,i){r.has(a)?r.set(a,i):n(a,i)}}},ZE="!",h$=e=>{let{separator:t,experimentalParseClassName:r}=e,o=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&&(o||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(ZE),g=p?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:i}):i},v$=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},x$=e=>({cache:g$(e.cacheSize),parseClassName:h$(e),...c$(e)}),y$=/\s+/,w$=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(y$),s="";for(let l=i.length-1;l>=0;l-=1){let u=i[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(u),g=!!p,m=o(g?f.substring(0,p):f);if(!m){if(!g){s=u+(s.length>0?" "+s:s);continue}if(m=o(f),!m){s=u+(s.length>0?" "+s:s);continue}g=!1}let x=v$(c).join(":"),h=d?x+ZE: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 C$(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=JE(t))&&(o&&(o+=" "),o+=r);return o}var JE=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=JE(e[o]))&&(r&&(r+=" "),r+=t);return r};function S$(e,...t){let r,o,n,a=i;function i(l){let u=t.reduce((c,d)=>d(c),e());return r=x$(u),o=r.cache.get,n=r.cache.set,a=s,s(l)}function s(l){let u=o(l);if(u)return u;let c=w$(l,r);return n(l,c),c}return function(){return a(C$.apply(null,arguments))}}var ot=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},eA=/^\[(?:([a-z-]+):)?(.+)\]$/i,b$=/^\d+\/\d+$/,R$=new Set(["px","full","screen"]),I$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,P$=/\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$/,L$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,T$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,k$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ba=e=>Ju(e)||R$.has(e)||b$.test(e),qi=e=>ec(e,"length",_$),Ju=e=>!!e&&!Number.isNaN(Number(e)),GC=e=>ec(e,"number",Ju),tp=e=>!!e&&Number.isInteger(Number(e)),M$=e=>e.endsWith("%")&&Ju(e.slice(0,-1)),Pe=e=>eA.test(e),Ki=e=>I$.test(e),E$=new Set(["length","size","percentage"]),A$=e=>ec(e,E$,tA),D$=e=>ec(e,"position",tA),N$=new Set(["image","url"]),O$=e=>ec(e,N$,B$),F$=e=>ec(e,"",V$),rp=()=>!0,ec=(e,t,r)=>{let o=eA.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},_$=e=>P$.test(e)&&!L$.test(e),tA=()=>!1,V$=e=>T$.test(e),B$=e=>k$.test(e);var H$=()=>{let e=ot("colors"),t=ot("spacing"),r=ot("blur"),o=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],_=()=>["",Ba,qi],D=()=>["auto",Ju,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=()=>[Ju,Pe];return{cacheSize:500,separator:":",theme:{colors:[rp],spacing:[Ba,qi],blur:["none","",Ki,Pe],brightness:ae(),borderColor:[e],borderRadius:["none","","full",Ki,Pe],borderSpacing:E(),borderWidth:_(),contrast:ae(),grayscale:A(),hueRotate:ae(),invert:A(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[M$,qi],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:[Ki]}],"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",tp,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",tp,Pe]}],"grid-cols":[{"grid-cols":[rp]}],"col-start-end":[{col:["auto",{span:["full",tp,Pe]},Pe]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[rp]}],"row-start-end":[{row:["auto",{span:[tp,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:[Ki]},Ki]}],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",Ki,qi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",GC]}],"font-family":[{font:[rp]}],"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",Ju,GC]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ba,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",Ba,qi]}],"underline-offset":[{"underline-offset":["auto",Ba,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(),D$]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",A$]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},O$]}],"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":[Ba,Pe]}],"outline-w":[{outline:[Ba,qi]}],"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":[Ba,qi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ki,F$]}],"shadow-color":[{shadow:[rp]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ki,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":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"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:[tp,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:[Ba,qi,GC]}],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 rA=S$(H$);function P(...e){return rA(zh(e))}function op(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(op).filter(Boolean).join(" ").trim();if(oA.isValidElement(e)){let t=e.props;return op(t.children)}return""}var Xi=R(N()),nA=UE,$C=Gh.forwardRef(({className:e,...t},r)=>(0,Xi.jsx)(zE,{ref:r,className:P("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));$C.displayName="AccordionItem";var qC=Gh.forwardRef(({className:e,children:t,...r},o)=>(0,Xi.jsx)(GE,{className:"flex",children:(0,Xi.jsxs)(HC,{ref:o,className:P("flex flex-1 items-center justify-between py-4 font-medium transition-all dark:text-gray-100","hover:underline hover:text-primary","[&[data-state=open]>svg]:rotate-180",e),...r,children:[t,(0,Xi.jsx)(sa,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));qC.displayName=HC.displayName;var KC=Gh.forwardRef(({className:e,children:t,...r},o)=>(0,Xi.jsx)(UC,{ref:o,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),...r,children:(0,Xi.jsx)("div",{className:"pb-4 pt-0",children:t})}));KC.displayName=UC.displayName;var tc=R(M());var aA=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,iA=zh,K=(e,t)=>r=>{var o;if(t?.variants==null)return iA(e,r?.class,r?.className);let{variants:n,defaultVariants:a}=t,i=Object.keys(n).map(u=>{let c=r?.[u],d=a?.[u];if(c===null)return null;let f=aA(c)||aA(d);return n[u][f]}),s=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.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 iA(e,i,l,r?.class,r?.className)};var Ha=R(N()),U$=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}}),XC=tc.forwardRef(({className:e,variant:t="default",size:r,radius:o,hideIcon:n=!1,closable:a=!1,onClose:i,children:s,...l},u)=>{let c=tc.useMemo(()=>{switch(t){case"success":return yr;case"warning":return $i;case"error":return Rn;case"info":return Yu;default:return Yu}},[t]);return(0,Ha.jsxs)("div",{ref:u,role:"alert",className:P("moonui-theme",U$({variant:t,size:r,radius:o,withClose:a}),e),...l,children:[!n&&(0,Ha.jsx)(c,{className:"h-5 w-5"}),(0,Ha.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,Ha.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,Ha.jsx)(xo,{className:"h-4 w-4"})})]})});XC.displayName="Alert";var YC=tc.forwardRef(({className:e,...t},r)=>(0,Ha.jsx)("h5",{ref:r,className:P("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));YC.displayName="AlertTitle";var QC=tc.forwardRef(({className:e,...t},r)=>(0,Ha.jsx)("div",{ref:r,className:P("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));QC.displayName="AlertDescription";var sA=R(M());var ZC=R(N()),lA=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"}}),JC=sA.forwardRef(({className:e,variant:t,radius:r,ratio:o=16/9,style:n,children:a,...i},s)=>(0,ZC.jsx)("div",{ref:s,className:P("moonui-theme",lA({variant:t,radius:r}),e),style:{position:"relative",paddingBottom:`${1/o*100}%`,...n},...i,children:(0,ZC.jsx)("div",{className:"absolute inset-0",children:a})}));JC.displayName="AspectRatio";var ul=R(M());var Uo=R(M(),1);var rc=R(M(),1);function nt(e){let t=rc.useRef(e);return rc.useEffect(()=>{t.current=e}),rc.useMemo(()=>(...r)=>t.current?.(...r),[])}var pA=R(fA(),1);function mA(){return(0,pA.useSyncExternalStore)(Q$,()=>!0,()=>!1)}function Q$(){return()=>{}}var np=R(N(),1),tS="Avatar",[Z$,pie]=Fe(tS),[J$,hA]=Z$(tS),vA=Uo.forwardRef((e,t)=>{let{__scopeAvatar:r,...o}=e,[n,a]=Uo.useState("idle");return(0,np.jsx)(J$,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:(0,np.jsx)(q.span,{...o,ref:t})})});vA.displayName=tS;var xA="AvatarImage",yA=Uo.forwardRef((e,t)=>{let{__scopeAvatar:r,src:o,onLoadingStatusChange:n=()=>{},...a}=e,i=hA(xA,r),s=eq(o,a),l=nt(u=>{n(u),i.onImageLoadingStatusChange(u)});return Ve(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,np.jsx)(q.img,{...a,ref:t,src:o}):null});yA.displayName=xA;var wA="AvatarFallback",CA=Uo.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:o,...n}=e,a=hA(wA,r),[i,s]=Uo.useState(o===void 0);return Uo.useEffect(()=>{if(o!==void 0){let l=window.setTimeout(()=>s(!0),o);return()=>window.clearTimeout(l)}},[o]),i&&a.imageLoadingStatus!=="loaded"?(0,np.jsx)(q.span,{...n,ref:t}):null});CA.displayName=wA;function gA(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function eq(e,{referrerPolicy:t,crossOrigin:r}){let o=mA(),n=Uo.useRef(null),a=(()=>o?(n.current||(n.current=new window.Image),n.current):null)(),[i,s]=Uo.useState(()=>gA(a,e));return Ve(()=>{s(gA(a,e))},[a,e]),Ve(()=>{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 r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",u),a.removeEventListener("error",c)}},[a,r,t]),i}var rS=vA,oS=yA,nS=CA;var In=R(N()),rq=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"}}),Wh=ul.forwardRef(({className:e,size:t,radius:r,variant:o,...n},a)=>(0,In.jsx)(rS,{ref:a,className:P("moonui-theme",rq({size:t,radius:r,variant:o}),e),...n}));Wh.displayName=rS.displayName;var aS=ul.forwardRef(({className:e,...t},r)=>(0,In.jsx)(oS,{ref:r,className:P("moonui-theme","aspect-square h-full w-full",e),...t}));aS.displayName=oS.displayName;var jh=ul.forwardRef(({className:e,...t},r)=>(0,In.jsx)(nS,{ref:r,className:P("flex h-full w-full items-center justify-center bg-muted",e),...t}));jh.displayName=nS.displayName;var iS=ul.forwardRef(({className:e,max:t,children:r,overlapOffset:o=-8,...n},a)=>{let i=ul.Children.toArray(r),s=t?i.slice(0,t):i,l=t?Math.max(0,i.length-t):0;return(0,In.jsx)("div",{ref:a,className:P("moonui-theme","flex items-center",e),...n,children:(0,In.jsxs)("div",{className:"flex",children:[s.map((u,c)=>(0,In.jsx)("div",{className:"relative",style:{marginLeft:c===0?0:`${o}px`,zIndex:s.length-c},children:u},c)),l>0&&(0,In.jsx)("div",{className:"relative z-0",style:{marginLeft:`${o}px`},children:(0,In.jsx)(Wh,{variant:"border",children:(0,In.jsxs)(jh,{children:["+",l]})})})]})})});iS.displayName="AvatarGroup";var SA=R(M());var wr=R(N()),sS=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"}}),_r=SA.forwardRef(({className:e,variant:t,size:r,radius:o,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,wr.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,wr.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,wr.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,wr.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,wr.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,wr.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,wr.jsxs)("div",{ref:g,className:P("moonui-theme",sS({variant:t,size:r,radius:o}),d&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...p,children:[n&&(0,wr.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,wr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:m}),(0,wr.jsx)("span",{className:"inline-flex items-center",children:x}),c&&(0,wr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:c}),i&&s&&(0,wr.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||(op(x)?`Remove ${op(x)}`:"Remove badge"),children:(0,wr.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,wr.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"})})})]})});_r.displayName="Badge";var ua=R(M());var Vr=R(N()),oq=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"}}),lS=ua.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Vr.jsx)("nav",{ref:n,className:P("moonui-theme",oq({variant:t,size:r}),e),"aria-label":"breadcrumb",...o}));lS.displayName="Breadcrumb";var uS=ua.forwardRef(({className:e,collapsed:t,collapsedWidth:r=3,...o},n)=>{let a=ua.Children.toArray(o.children).filter(Boolean),i=a.length;if(t&&i>r){let s=a[0],l=a.slice(-2);return(0,Vr.jsxs)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o,children:[s,(0,Vr.jsx)($h,{}),l]})}return(0,Vr.jsx)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o})});uS.displayName="BreadcrumbList";var cS=ua.forwardRef(({className:e,isCurrent:t,href:r,asChild:o=!1,...n},a)=>{let i=o?ua.Fragment:r?"a":"span",s=o?{}:r?{href:r}:{};return(0,Vr.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,Vr.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})})});cS.displayName="BreadcrumbItem";var dS=({children:e,className:t,...r})=>(0,Vr.jsx)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","text-muted-foreground opacity-70",t),...r,children:e||(0,Vr.jsx)(Fr,{className:"h-3.5 w-3.5"})});dS.displayName="BreadcrumbSeparator";var $h=({className:e,...t})=>(0,Vr.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,Vr.jsx)(la,{className:"h-4 w-4"}),(0,Vr.jsx)("span",{className:"sr-only",children:"More pages"})]});$h.displayName="BreadcrumbEllipsis";var fS=ua.forwardRef(({className:e,href:t,...r},o)=>(0,Vr.jsx)("a",{ref:o,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),...r}));fS.displayName="BreadcrumbLink";var pS=ua.forwardRef(({className:e,...t},r)=>(0,Vr.jsx)("span",{ref:r,className:P("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));pS.displayName="BreadcrumbPage";var bA=R(M());var qh=R(N()),ap=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}}),Ee=bA.forwardRef(({className:e,variant:t,size:r,rounded:o,fullWidth:n,asChild:a=!1,loading:i=!1,leftIcon:s,rightIcon:l,children:u,disabled:c,...d},f)=>(0,qh.jsxs)("button",{className:P("moonui-theme",ap({variant:t,size:r,rounded:o,fullWidth:n,className:e})),ref:f,disabled:c||i,"aria-busy":i||void 0,"data-loading":i?"":void 0,...d,children:[i&&(0,qh.jsx)(Ht,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,u,!i&&l]}));Ee.displayName="Button";var El=R(M());var Gp=R(N(),1),pa=R(M(),1);var RA=R(M(),1),nc=(0,RA.createContext)({});var IA=R(M(),1);function ca(e){let t=(0,IA.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Kh=R(M(),1);var ac=typeof window<"u";var ic=ac?Kh.useLayoutEffect:Kh.useEffect;var qS=R(N(),1),ED=R(M(),1),Up=R(M(),1);var PA=R(M(),1),Yi=(0,PA.createContext)(null);var kD=R(N(),1);function cl(e,t){e.indexOf(t)===-1&&e.push(t)}function Pn(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var Xt=(e,t,r)=>r>t?t:r<e?e:r;var Ua=()=>{},lr=()=>{};var Cr={};var ip=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function sp(e){return typeof e=="object"&&e!==null}var lp=e=>/^0[^.\s]+$/u.test(e);function dl(e){let t;return()=>(t===void 0&&(t=e()),t)}var ht=e=>e;var nq=(e,t)=>r=>t(e(r)),Ln=(...e)=>e.reduce(nq);var zo=(e,t,r)=>{let o=t-e;return o===0?1:(r-e)/o};var za=class{constructor(){this.subscriptions=[]}add(t){return cl(this.subscriptions,t),()=>Pn(this.subscriptions,t)}notify(t,r,o){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](t,r,o);else for(let a=0;a<n;a++){let i=this.subscriptions[a];i&&i(t,r,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var It=e=>e*1e3,Ut=e=>e/1e3;function up(e,t){return t?e*(1e3/t):0}var LA=(e,t,r)=>{let o=t-e;return((r-e)%o+o)%o+e};var TA=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,aq=1e-7,iq=12;function sq(e,t,r,o,n){let a,i,s=0;do i=t+(r-t)/2,a=TA(i,o,n)-e,a>0?r=i:t=i;while(Math.abs(a)>aq&&++s<iq);return i}function Qi(e,t,r,o){if(e===t&&r===o)return ht;let n=a=>sq(a,0,1,e,r);return a=>a===0||a===1?a:TA(n(a),t,o)}var Xh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Yh=e=>t=>1-e(1-t);var Qh=Qi(.33,1.53,.69,.99),sc=Yh(Qh),cp=Xh(sc);var dp=e=>(e*=2)<1?.5*sc(e):.5*(2-Math.pow(2,-10*(e-1)));var fp=e=>1-Math.sin(Math.acos(e)),pp=Yh(fp),mp=Xh(fp);var mS=Qi(.42,0,1,1),gS=Qi(0,0,.58,1),gp=Qi(.42,0,.58,1);var hp=e=>Array.isArray(e)&&typeof e[0]!="number";function vp(e,t){return hp(e)?e[LA(0,e.length,t)]:e}var xp=e=>Array.isArray(e)&&typeof e[0]=="number";var kA={linear:ht,easeIn:mS,easeInOut:gp,easeOut:gS,circIn:fp,circInOut:mp,circOut:pp,backIn:sc,backInOut:cp,backOut:Qh,anticipate:dp},lq=e=>typeof e=="string",Zh=e=>{if(xp(e)){lr(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,o,n]=e;return Qi(t,r,o,n)}else if(lq(e))return lr(kA[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),kA[e];return e};var yp=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var to={value:null,addProjectionMetrics:null};function MA(e,t){let r=new Set,o=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?r:o;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{o.delete(d),i.delete(d)},process:d=>{if(s=d,n){a=!0;return}n=!0,[r,o]=[o,r],r.forEach(u),t&&to.value&&to.value.frameloop[t].push(l),l=0,r.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}var uq=40;function Jh(e,t){let r=!1,o=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=yp.reduce((y,w)=>(y[w]=MA(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=Cr.useManualTiming?n.timestamp:performance.now();r=!1,Cr.useManualTiming||(n.delta=o?1e3/60:Math.max(Math.min(y-n.timestamp,uq),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,r&&t&&(o=!1,e(m))},x=()=>{r=!0,o=!0,n.isProcessing||e(m)};return{schedule:yp.reduce((y,w)=>{let C=i[w];return y[w]=(b,S=!1,I=!1)=>(r||x(),C.schedule(b,S,I)),y},{}),cancel:y=>{for(let w=0;w<yp.length;w++)i[yp[w]].cancel(y)},state:n,steps:i}}var{schedule:Le,cancel:Sr,state:wt,steps:wp}=Jh(typeof requestAnimationFrame<"u"?requestAnimationFrame:ht,!0);var ev;function cq(){ev=void 0}var Ct={now:()=>(ev===void 0&&Ct.set(wt.isProcessing||Cr.useManualTiming?wt.timestamp:performance.now()),ev),set:e=>{ev=e,queueMicrotask(cq)}};var Tn={layout:0,mainThread:0,waapi:0};var EA=e=>t=>typeof t=="string"&&t.startsWith(e),fl=EA("--"),dq=EA("var(--"),pl=e=>dq(e)?fq.test(e.split("/*")[0].trim()):!1,fq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var da={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ga={...da,transform:e=>Xt(0,1,e)},Cp={...da,default:1};var Zi=e=>Math.round(e*1e5)/1e5;var lc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function AA(e){return e==null}var DA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var uc=(e,t)=>r=>!!(typeof r=="string"&&DA.test(r)&&r.startsWith(e)||t&&!AA(r)&&Object.prototype.hasOwnProperty.call(r,t)),tv=(e,t,r)=>o=>{if(typeof o!="string")return o;let[n,a,i,s]=o.match(lc);return{[e]:parseFloat(n),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var pq=e=>Xt(0,255,e),hS={...da,transform:e=>Math.round(pq(e))},fa={test:uc("rgb","red"),parse:tv("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:o=1})=>"rgba("+hS.transform(e)+", "+hS.transform(t)+", "+hS.transform(r)+", "+Zi(Ga.transform(o))+")"};function mq(e){let t="",r="",o="",n="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),o=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),o=e.substring(3,4),n=e.substring(4,5),t+=t,r+=r,o+=o,n+=n),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(o,16),alpha:n?parseInt(n,16)/255:1}}var Sp={test:uc("#"),parse:mq,transform:fa.transform};var bp=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kn=bp("deg"),br=bp("%"),ue=bp("px"),vS=bp("vh"),xS=bp("vw"),rv=(()=>({...br,parse:e=>br.parse(e)/100,transform:e=>br.transform(e*100)}))();var Ji={test:uc("hsl","hue"),parse:tv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+br.transform(Zi(t))+", "+br.transform(Zi(r))+", "+Zi(Ga.transform(o))+")"};var ct={test:e=>fa.test(e)||Sp.test(e)||Ji.test(e),parse:e=>fa.test(e)?fa.parse(e):Ji.test(e)?Ji.parse(e):Sp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fa.transform(e):Ji.transform(e),getAnimatableNone:e=>{let t=ct.parse(e);return t.alpha=0,ct.transform(t)}};var NA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function gq(e){return isNaN(e)&&typeof e=="string"&&(e.match(lc)?.length||0)+(e.match(NA)?.length||0)>0}var FA="number",_A="color",hq="var",vq="var(",OA="${}",xq=/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 es(e){let t=e.toString(),r=[],o={color:[],number:[],var:[]},n=[],a=0,s=t.replace(xq,l=>(ct.test(l)?(o.color.push(a),n.push(_A),r.push(ct.parse(l))):l.startsWith(vq)?(o.var.push(a),n.push(hq),r.push(l)):(o.number.push(a),n.push(FA),r.push(parseFloat(l))),++a,OA)).split(OA);return{values:r,split:s,indexes:o,types:n}}function VA(e){return es(e).values}function BA(e){let{split:t,types:r}=es(e),o=t.length;return n=>{let a="";for(let i=0;i<o;i++)if(a+=t[i],n[i]!==void 0){let s=r[i];s===FA?a+=Zi(n[i]):s===_A?a+=ct.transform(n[i]):a+=n[i]}return a}}var yq=e=>typeof e=="number"?0:ct.test(e)?ct.getAnimatableNone(e):e;function wq(e){let t=VA(e);return BA(e)(t.map(yq))}var Rr={test:gq,parse:VA,createTransformer:BA,getAnimatableNone:wq};function yS(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function HA({hue:e,saturation:t,lightness:r,alpha:o}){e/=360,t/=100,r/=100;let n=0,a=0,i=0;if(!t)n=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=yS(l,s,e+1/3),a=yS(l,s,e),i=yS(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:o}}function cc(e,t){return r=>r>0?t:e}var ke=(e,t,r)=>e+(t-e)*r;var wS=(e,t,r)=>{let o=e*e,n=r*(t*t-o)+o;return n<0?0:Math.sqrt(n)},Cq=[Sp,fa,Ji],Sq=e=>Cq.find(t=>t.test(e));function UA(e){let t=Sq(e);if(Ua(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===Ji&&(r=HA(r)),r}var CS=(e,t)=>{let r=UA(e),o=UA(t);if(!r||!o)return cc(e,t);let n={...r};return a=>(n.red=wS(r.red,o.red,a),n.green=wS(r.green,o.green,a),n.blue=wS(r.blue,o.blue,a),n.alpha=ke(r.alpha,o.alpha,a),fa.transform(n))};var ov=new Set(["none","hidden"]);function zA(e,t){return ov.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function bq(e,t){return r=>ke(e,t,r)}function nv(e){return typeof e=="number"?bq:typeof e=="string"?pl(e)?cc:ct.test(e)?CS:Pq:Array.isArray(e)?GA:typeof e=="object"?ct.test(e)?CS:Rq:cc}function GA(e,t){let r=[...e],o=r.length,n=e.map((a,i)=>nv(a)(a,t[i]));return a=>{for(let i=0;i<o;i++)r[i]=n[i](a);return r}}function Rq(e,t){let r={...e,...t},o={};for(let n in r)e[n]!==void 0&&t[n]!==void 0&&(o[n]=nv(e[n])(e[n],t[n]));return n=>{for(let a in o)r[a]=o[a](n);return r}}function Iq(e,t){let r=[],o={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let a=t.types[n],i=e.indexes[a][o[a]],s=e.values[i]??0;r[n]=s,o[a]++}return r}var Pq=(e,t)=>{let r=Rr.createTransformer(t),o=es(e),n=es(t);return o.indexes.var.length===n.indexes.var.length&&o.indexes.color.length===n.indexes.color.length&&o.indexes.number.length>=n.indexes.number.length?ov.has(e)&&!n.values.length||ov.has(t)&&!o.values.length?zA(e,t):Ln(GA(Iq(o,n),n.values),r):(Ua(!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"),cc(e,t))};function av(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?ke(e,t,r):nv(e)(e,t)}var WA=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>Le.update(t,r),stop:()=>Sr(t),now:()=>wt.isProcessing?wt.timestamp:Ct.now()}};var iv=(e,t,r=10)=>{let o="",n=Math.max(Math.round(t/r),2);for(let a=0;a<n;a++)o+=Math.round(e(a/(n-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`};function dc(e){let t=0,r=50,o=e.next(t);for(;!o.done&&t<2e4;)t+=r,o=e.next(t);return t>=2e4?1/0:t}function Rp(e,t=100,r){let o=r({...e,keyframes:[0,t]}),n=Math.min(dc(o),2e4);return{type:"keyframes",ease:a=>o.next(n*a).value/t,duration:Ut(n)}}var Lq=5;function sv(e,t,r){let o=Math.max(t-Lq,0);return up(r-e(o),t-o)}var at={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 bS=.001;function jA({duration:e=at.duration,bounce:t=at.bounce,velocity:r=at.velocity,mass:o=at.mass}){let n,a;Ua(e<=It(at.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Xt(at.minDamping,at.maxDamping,i),e=Xt(at.minDuration,at.maxDuration,Ut(e)),i<1?(n=u=>{let c=u*i,d=c*e,f=c-r,p=lv(u,i),g=Math.exp(-d);return bS-f/p*g},a=u=>{let d=u*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(u,2)*e,g=Math.exp(-d),m=lv(Math.pow(u,2),i);return(-n(u)+bS>0?-1:1)*((f-p)*g)/m}):(n=u=>{let c=Math.exp(-u*e),d=(u-r)*e+1;return-bS+c*d},a=u=>{let c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});let s=5/e,l=kq(n,a,s);if(e=It(e),isNaN(l))return{stiffness:at.stiffness,damping:at.damping,duration:e};{let u=Math.pow(l,2)*o;return{stiffness:u,damping:i*2*Math.sqrt(o*u),duration:e}}}var Tq=12;function kq(e,t,r){let o=r;for(let n=1;n<Tq;n++)o=o-e(o)/t(o);return o}function lv(e,t){return e*Math.sqrt(1-t*t)}var Mq=["duration","bounce"],Eq=["stiffness","damping","mass"];function $A(e,t){return t.some(r=>e[r]!==void 0)}function Aq(e){let t={velocity:at.velocity,stiffness:at.stiffness,damping:at.damping,mass:at.mass,isResolvedFromDuration:!1,...e};if(!$A(e,Eq)&&$A(e,Mq))if(e.visualDuration){let r=e.visualDuration,o=2*Math.PI/(r*1.2),n=o*o,a=2*Xt(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:at.mass,stiffness:n,damping:a}}else{let r=jA(e);t={...t,...r,mass:at.mass},t.isResolvedFromDuration=!0}return t}function Wa(e=at.visualDuration,t=at.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:o,restDelta:n}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=Aq({...r,velocity:-Ut(r.velocity||0)}),g=f||0,m=u/(2*Math.sqrt(l*c)),x=i-a,h=Ut(Math.sqrt(l/c)),v=Math.abs(x)<5;o||(o=v?at.restSpeed.granular:at.restSpeed.default),n||(n=v?at.restDelta.granular:at.restDelta.default);let y;if(m<1){let C=lv(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?It(g):sv(y,C,b));let I=Math.abs(S)<=o,L=Math.abs(i-b)<=n;s.done=I&&L}return s.value=s.done?i:b,s},toString:()=>{let C=Math.min(dc(w),2e4),b=iv(S=>w.next(C*S).value,C,30);return C+"ms "+b},toTransition:()=>{}};return w}Wa.applyToOptions=e=>{let t=Rp(e,100,Wa);return e.ease=t.ease,e.duration=It(t.duration),e.type="keyframes",e};function Ip({keyframes:e,velocity:t=0,power:r=.8,timeConstant:o=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=r*t,x=d+m,h=i===void 0?x:i(x);h!==x&&(m=h-d);let v=I=>-m*Math.exp(-I/o),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=Wa({keyframes:[f.value,g(f.value)],velocity:sv(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 Dq(e,t,r){let o=[],n=r||Cr.mix||av,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]||ht:t;s=Ln(l,s)}o.push(s)}return o}function uv(e,t,{clamp:r=!0,ease:o,mixer:n}={}){let a=e.length;if(lr(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=Dq(t,o,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=zo(e[d],e[d+1],c);return s[d](f)};return r?c=>u(Xt(e[0],e[a-1],c)):u}function Pp(e,t){let r=e[e.length-1];for(let o=1;o<=t;o++){let n=zo(0,t,o);e.push(ke(r,1,n))}}function Lp(e){let t=[0];return Pp(t,e.length-1),t}function qA(e,t){return e.map(r=>r*t)}function Nq(e,t){return e.map(()=>t||gp).splice(0,e.length-1)}function ml({duration:e=300,keyframes:t,times:r,ease:o="easeInOut"}){let n=hp(o)?o.map(Zh):Zh(o),a={done:!1,value:t[0]},i=qA(r&&r.length===t.length?r:Lp(t),e),s=uv(i,t,{ease:Array.isArray(n)?n:Nq(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var Oq=e=>e!==null;function fc(e,{repeat:t,repeatType:r="loop"},o,n=1){let a=e.filter(Oq),s=n<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||o===void 0?a[s]:o}var Fq={decay:Ip,inertia:Ip,tween:ml,keyframes:ml,spring:Wa};function cv(e){typeof e.type=="string"&&(e.type=Fq[e.type])}var ts=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var _q=e=>e/100,ja=class extends ts{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:r}=this.options;r&&r.updatedAt!==Ct.now()&&this.tick(Ct.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},Tn.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;cv(t);let{type:r=ml,repeat:o=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||ml;l!==ml&&typeof s[0]!="number"&&(this.mixKeyframes=Ln(_q,av(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=dc(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(o+1)-n,this.generator=u}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:o,totalDuration:n,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return o.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)),r?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=o;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=Xt(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!==Ip&&(C.value=fc(c,this.options,x,this.speed)),m&&m(C.value),S&&this.finish(),C}then(t,r){return this.finished.then(t,r)}get duration(){return Ut(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ut(t)}get time(){return Ut(this.currentTime)}set time(t){t=It(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(Ct.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Ut(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=WA,startTime:r}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),this.options.onPlay?.();let o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=r??o),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(Ct.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,Tn.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 KA(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var gl=e=>e*180/Math.PI,RS=e=>{let t=gl(Math.atan2(e[1],e[0]));return IS(t)},Vq={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:RS,rotateZ:RS,skewX:e=>gl(Math.atan(e[1])),skewY:e=>gl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},IS=e=>(e=e%360,e<0&&(e+=360),e),XA=RS,YA=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),QA=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Bq={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:YA,scaleY:QA,scale:e=>(YA(e)+QA(e))/2,rotateX:e=>IS(gl(Math.atan2(e[6],e[5]))),rotateY:e=>IS(gl(Math.atan2(-e[2],e[0]))),rotateZ:XA,rotate:XA,skewX:e=>gl(Math.atan(e[4])),skewY:e=>gl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Tp(e){return e.includes("scale")?1:0}function kp(e,t){if(!e||e==="none")return Tp(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,n;if(r)o=Bq,n=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Vq,n=s}if(!n)return Tp(t);let a=o[t],i=n[1].split(",").map(Hq);return typeof a=="function"?a(i):i[a]}var PS=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return kp(r,t)};function Hq(e){return parseFloat(e.trim())}var Mn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yo=(()=>new Set(Mn))();var LS=e=>e===da||e===ue,Uq=new Set(["x","y","z"]),zq=Mn.filter(e=>!Uq.has(e));function ZA(e){let t=[];return zq.forEach(r=>{let o=e.getValue(r);o!==void 0&&(t.push([r,o.get()]),o.set(r.startsWith("scale")?1:0))}),t}var rs={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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})=>kp(t,"x"),y:(e,{transform:t})=>kp(t,"y")};rs.translateX=rs.x;rs.translateY=rs.y;var hl=new Set,TS=!1,kS=!1,MS=!1;function JA(){if(kS){let e=Array.from(hl).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),r=new Map;t.forEach(o=>{let n=ZA(o);n.length&&(r.set(o,n),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();let n=r.get(o);n&&n.forEach(([a,i])=>{o.getValue(a)?.set(i)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}kS=!1,TS=!1,hl.forEach(e=>e.complete(MS)),hl.clear()}function eD(){hl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(kS=!0)})}function ES(){MS=!0,eD(),JA(),MS=!1}var $a=class{constructor(t,r,o,n,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=o,this.motionValue=n,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(hl.add(this),TS||(TS=!0,Le.read(eD),Le.resolveKeyframes(JA))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:o,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(o&&r){let s=o.readValue(r,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),n&&a===void 0&&n.set(t[0])}KA(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),hl.delete(this)}cancel(){this.state==="scheduled"&&(hl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var tD=e=>e.startsWith("--");function rD(e,t,r){tD(t)?e.style.setProperty(t,r):e.style[t]=r}var oD=dl(()=>window.ScrollTimeline!==void 0);var nD={};function aD(e,t){let r=dl(e);return()=>nD[t]??r()}var dv=aD(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var vl=([e,t,r,o])=>`cubic-bezier(${e}, ${t}, ${r}, ${o})`;var AS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vl([0,.65,.55,1]),circOut:vl([.55,0,1,.45]),backIn:vl([.31,.01,.66,-.59]),backOut:vl([.33,1.53,.69,.99])};function DS(e,t){if(e)return typeof e=="function"?dv()?iv(e,t):"ease-out":xp(e)?vl(e):Array.isArray(e)?e.map(r=>DS(r,t)||AS.easeOut):AS[e]}function iD(e,t,r,{delay:o=0,duration:n=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){let c={[t]:r};l&&(c.offset=l);let d=DS(s,n);Array.isArray(d)&&(c.easing=d),to.value&&Tn.waapi++;let f={delay:o,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 to.value&&p.finished.finally(()=>{Tn.waapi--}),p}function xl(e){return typeof e=="function"&&"applyToOptions"in e}function sD({type:e,...t}){return xl(e)&&dv()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var fv=class extends ts{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:r,name:o,keyframes:n,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,lr(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=sD(t);this.animation=iD(r,o,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=fc(n,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):rD(r,o,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 Ut(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ut(t)}get time(){return Ut(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=It(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:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&oD()?(this.animation.timeline=t,ht):r(this)}};var lD={anticipate:dp,backInOut:cp,circInOut:mp};function Gq(e){return e in lD}function uD(e){typeof e.ease=="string"&&Gq(e.ease)&&(e.ease=lD[e.ease])}var cD=10,pv=class extends fv{constructor(t){uD(t),cv(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:o,onComplete:n,element:a,...i}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let s=new ja({...i,autoplay:!1}),l=It(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-cD).value,s.sample(l).value,cD),s.stop()}};var NS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Rr.test(e)||e==="0")&&!e.startsWith("url("));function Wq(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function dD(e,t,r,o){let n=e[0];if(n===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=NS(n,t),s=NS(a,t);return Ua(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:Wq(e)||(r==="spring"||xl(r))&&o}function pc(e){e.duration=0,e.type="keyframes"}var jq=new Set(["opacity","clipPath","filter","transform"]),$q=dl(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function fD(e){let{motionValue:t,name:r,repeatDelay:o,repeatType:n,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return $q()&&r&&jq.has(r)&&(r!=="transform"||!u)&&!l&&!o&&n!=="mirror"&&a!==0&&i!=="inertia"}var qq=40,Mp=class extends ts{constructor({autoplay:t=!0,delay:r=0,type:o="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=Ct.now();let f={autoplay:t,delay:r,type:o,repeat:n,repeatDelay:a,repeatType:i,name:l,motionValue:u,element:c,...d},p=c?.KeyframeResolver||$a;this.keyframeResolver=new p(s,(g,m,x)=>this.onKeyframesResolved(g,m,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,o,n){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:c}=o;this.resolvedAt=Ct.now(),dD(t,a,i,s)||((Cr.instantAnimations||!l)&&c?.(fc(t,o,r)),t[0]=t[t.length-1],pc(o),o.repeat=0);let f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>qq?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:t},p=!u&&fD(f)?new pv({...f,element:f.motionValue.owner.current}):new ja(f);p.finished.then(()=>this.notifyFinished()).catch(ht),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,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ES()),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 mv=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,r){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=r}attachTimeline(t){let r=this.animations.map(o=>o.attachTimeline(t));return()=>{r.forEach((o,n)=>{o&&o(),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 pD(this.animations,"duration")}get iterationDuration(){return pD(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};function pD(e,t){let r=0;for(let o=0;o<e.length;o++){let n=e[o][t];n!==null&&n>r&&(r=n)}return r}var Ep=class extends mv{then(t,r){return this.finished.finally(t).then(()=>{})}};var Kq=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Xq(e){let t=Kq.exec(e);if(!t)return[,];let[,r,o,n]=t;return[`--${r??o}`,n]}var Yq=4;function OS(e,t,r=1){lr(r<=Yq,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[o,n]=Xq(e);if(!o)return;let a=window.getComputedStyle(t).getPropertyValue(o);if(a){let i=a.trim();return ip(i)?parseFloat(i):i}return pl(n)?OS(n,t,r+1):n}function yl(e,t){return e?.[t]??e?.default??e}var Ap=new Set(["width","height","top","left","right","bottom",...Mn]);var mD={test:e=>e==="auto",parse:e=>e};var gv=e=>t=>t.test(e);var FS=[da,ue,br,kn,xS,vS,mD],_S=e=>FS.find(gv(e));function gD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||lp(e):!0}var Qq=new Set(["brightness","contrast","saturate","opacity"]);function Zq(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[o]=r.match(lc)||[];if(!o)return e;let n=r.replace(o,""),a=Qq.has(t)?1:0;return o!==r&&(a*=100),t+"("+a+n+")"}var Jq=/\b([a-z-]*)\(.*?\)/gu,Dp={...Rr,getAnimatableNone:e=>{let t=e.match(Jq);return t?t.map(Zq).join(" "):e}};var VS={...da,transform:Math.round};var hD={rotate:kn,rotateX:kn,rotateY:kn,rotateZ:kn,scale:Cp,scaleX:Cp,scaleY:Cp,scaleZ:Cp,skew:kn,skewX:kn,skewY:kn,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:Ga,originX:rv,originY:rv,originZ:ue};var wl={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,...hD,zIndex:VS,fillOpacity:Ga,strokeOpacity:Ga,numOctaves:VS};var vD={...wl,color:ct,backgroundColor:ct,outlineColor:ct,fill:ct,stroke:ct,borderColor:ct,borderTopColor:ct,borderRightColor:ct,borderBottomColor:ct,borderLeftColor:ct,filter:Dp,WebkitFilter:Dp},Np=e=>vD[e];function Op(e,t){let r=Np(e);return r!==Dp&&(r=Rr),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var e6=new Set(["auto","none","0"]);function xD(e,t,r){let o=0,n;for(;o<e.length&&!n;){let a=e[o];typeof a=="string"&&!e6.has(a)&&es(a).values.length&&(n=e[o]),o++}if(n&&r)for(let a of t)e[a]=Op(r,n)}var Fp=class extends $a{constructor(t,r,o,n,a){super(t,r,o,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:o}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),pl(u))){let c=OS(u,r.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Ap.has(o)||t.length!==2)return;let[n,a]=t,i=_S(n),s=_S(a);if(i!==s)if(LS(i)&&LS(s))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else rs[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,o=[];for(let n=0;n<t.length;n++)(t[n]===null||gD(t[n]))&&o.push(n);o.length&&xD(t,o,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rs[o](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let n=r[r.length-1];n!==void 0&&t.getValue(o,n).jump(n,!1)}measureEndState(){let{element:t,name:r,unresolvedKeyframes:o}=this;if(!t||!t.current)return;let n=t.getValue(r);n&&n.jump(this.measuredOrigin,!1);let a=o.length-1,i=o[a];o[a]=rs[r](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 _p(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let n=r?.[e]??o.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}var Vp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Bp(e){return sp(e)&&"offsetHeight"in e}var yD=30,t6=e=>!isNaN(parseFloat(e)),Cl={current:void 0},hv=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{let n=Ct.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),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=r.owner}setCurrent(t){this.current=t,this.updatedAt=Ct.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=t6(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new za);let o=this.events[t].add(r);return t==="change"?()=>{o(),Le.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,o){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&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 Cl.current&&Cl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Ct.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>yD)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,yD);return up(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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 ro(e,t){return new hv(e,t)}var{schedule:Sl,cancel:r6}=Jh(queueMicrotask,!1);var Go={x:!1,y:!1};function vv(){return Go.x||Go.y}function BS(e){return e==="x"||e==="y"?Go[e]?null:(Go[e]=!0,()=>{Go[e]=!1}):Go.x||Go.y?null:(Go.x=Go.y=!0,()=>{Go.x=Go.y=!1})}function xv(e,t){let r=_p(e),o=new AbortController,n={passive:!0,...t,signal:o.signal};return[r,n,()=>o.abort()]}function wD(e){return!(e.pointerType==="touch"||vv())}function HS(e,t,r={}){let[o,n,a]=xv(e,r),i=s=>{if(!wD(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{wD(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,n)};return o.forEach(s=>{s.addEventListener("pointerenter",i,n)}),a}var US=(e,t)=>t?e===t?!0:US(e,t.parentElement):!1;var bl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var o6=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function CD(e){return o6.has(e.tagName)||e.tabIndex!==-1}var mc=new WeakSet;function SD(e){return t=>{t.key==="Enter"&&e(t)}}function zS(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var bD=(e,t)=>{let r=e.currentTarget;if(!r)return;let o=SD(()=>{if(mc.has(r))return;zS(r,"down");let n=SD(()=>{zS(r,"up")}),a=()=>zS(r,"cancel");r.addEventListener("keyup",n,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",o,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",o),t)};function RD(e){return bl(e)&&!vv()}function GS(e,t,r={}){let[o,n,a]=xv(e,r),i=s=>{let l=s.currentTarget;if(!RD(s))return;mc.add(l);let u=t(l,s),c=(p,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),mc.has(l)&&mc.delete(l),RD(p)&&typeof u=="function"&&u(p,{success:g})},d=p=>{c(p,l===window||l===document||r.useGlobalTarget||US(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",d,n),window.addEventListener("pointercancel",f,n)};return o.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,n),Bp(s)&&(s.addEventListener("focus",u=>bD(u,n)),!CD(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function Rl(e){return sp(e)&&"ownerSVGElement"in e}function Hp(e){return Rl(e)&&e.tagName==="svg"}function WS(...e){let t=!Array.isArray(e[0]),r=t?0:-1,o=e[0+r],n=e[1+r],a=e[2+r],i=e[3+r],s=uv(n,a,i);return t?s(o):s}var Be=e=>!!(e&&e.getVelocity);var n6=[...FS,ct,Rr],jS=e=>n6.find(gv(e));var yv=R(M(),1),qa=R(M(),1);var ID=R(M(),1),os=(0,ID.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var LD=R(M(),1);function PD(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function a6(...e){return t=>{let r=!1,o=e.map(n=>{let a=PD(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():PD(e[n],null)}}}}function TD(...e){return LD.useCallback(a6(...e),e)}var $S=class extends yv.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let o=r.offsetParent,n=Bp(o)&&o.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=n-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function MD({children:e,isPresent:t,anchorX:r,root:o}){let n=(0,qa.useId)(),a=(0,qa.useRef)(null),i=(0,qa.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,qa.useContext)(os),l=TD(a,e?.ref);return(0,qa.useInsertionEffect)(()=>{let{width:u,height:c,top:d,left:f,right:p}=i.current;if(t||!a.current||!u||!c)return;let g=r==="left"?`left: ${f}`:`right: ${p}`;a.current.dataset.motionPopId=n;let m=document.createElement("style");s&&(m.nonce=s);let x=o??document.head;return x.appendChild(m),m.sheet&&m.sheet.insertRule(`
|
|
11
|
+
`+a.stack}return{value:e,source:t,stack:n,digest:null}}function $0(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function TC(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var wW=typeof WeakMap=="function"?WeakMap:Map;function qM(e,t,r){r=Na(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){gh||(gh=!0,VC=o),TC(e,t)},r}function KM(e,t,r){r=Na(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var n=t.value;r.payload=function(){return o(n)},r.callback=function(){TC(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){TC(e,t),typeof o!="function"&&(_i===null?_i=new Set([this]):_i.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function ak(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new wW;var n=new Set;o.set(t,n)}else n=o.get(t),n===void 0&&(n=new Set,o.set(t,n));n.has(r)||(n.add(r),e=OW.bind(null,e,t,r),t.then(e,e))}function ik(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 sk(e,t,r,o,n){return e.mode&1?(e.flags|=65536,e.lanes=n,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Na(-1,1),t.tag=2,Fi(r,t,1))),r.lanes|=1),e)}var SW=Ba.ReactCurrentOwner,Xr=!1;function Or(e,t,r,o){t.child=e===null?bM(t,null,r,o):Hu(t,e.child,r,o)}function lk(e,t,r,o,n){r=r.render;var a=t.ref;return Ou(t,n),o=hw(e,t,r,o,a,n),r=vw(),e!==null&&!Xr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Va(e,t,n)):(lt&&r&&nw(t),t.flags|=1,Or(e,t,o,n),t.child)}function uk(e,t,r,o,n){if(e===null){var a=r.type;return typeof a=="function"&&!Lw(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,XM(e,t,a,o,n)):(e=Kg(r.type,null,o,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(r=r.compare,r=r!==null?r:uf,r(i,o)&&e.ref===t.ref)return Va(e,t,n)}return t.flags|=1,e=Bi(a,o),e.ref=t.ref,e.return=t,t.child=e}function XM(e,t,r,o,n){if(e!==null){var a=e.memoizedProps;if(uf(a,o)&&e.ref===t.ref)if(Xr=!1,t.pendingProps=o=a,(e.lanes&n)!==0)e.flags&131072&&(Xr=!0);else return t.lanes=e.lanes,Va(e,t,n)}return kC(e,t,r,o,n)}function YM(e,t,r){var o=t.pendingProps,n=o.children,a=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qe(Mu,po),po|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Qe(Mu,po),po|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=a!==null?a.baseLanes:r,Qe(Mu,po),po|=o}else a!==null?(o=a.baseLanes|r,t.memoizedState=null):o=r,Qe(Mu,po),po|=o;return Or(e,t,n,r),t.child}function QM(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function kC(e,t,r,o,n){var a=Qr(r)?Qs:yr.current;return a=Vu(t,a),Ou(t,n),r=hw(e,t,r,o,a,n),o=vw(),e!==null&&!Xr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Va(e,t,n)):(lt&&o&&nw(t),t.flags|=1,Or(e,t,r,n),t.child)}function ck(e,t,r,o,n){if(Qr(r)){var a=!0;ah(t)}else a=!1;if(Ou(t,n),t.stateNode===null)jg(e,t),$M(t,r,o),LC(t,r,o,n),o=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=Bo(u):(u=Qr(r)?Qs:yr.current,u=Vu(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==o||l!==u)&&nk(t,i,o,u),Li=!1;var f=t.memoizedState;i.state=f,ch(t,o,i,n),l=t.memoizedState,s!==o||f!==l||Yr.current||Li?(typeof c=="function"&&(PC(t,r,c,o),l=t.memoizedState),(s=Li||ok(t,r,s,o,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=o,t.memoizedState=l),i.props=o,i.state=l,i.context=u,o=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{i=t.stateNode,IM(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:vn(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=Bo(l):(l=Qr(r)?Qs:yr.current,l=Vu(t,l));var p=r.getDerivedStateFromProps;(c=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==l)&&nk(t,i,o,l),Li=!1,f=t.memoizedState,i.state=f,ch(t,o,i,n);var g=t.memoizedState;s!==d||f!==g||Yr.current||Li?(typeof p=="function"&&(PC(t,r,p,o),g=t.memoizedState),(u=Li||ok(t,r,u,o,f,g,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(o,g,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(o,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=o,t.memoizedState=g),i.props=o,i.state=g,i.context=l,o=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),o=!1)}return MC(e,t,r,o,a,n)}function MC(e,t,r,o,n,a){QM(e,t);var i=(t.flags&128)!==0;if(!o&&!i)return n&&X1(t,r,!1),Va(e,t,a);o=t.stateNode,SW.current=t;var s=i&&typeof r.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&i?(t.child=Hu(t,e.child,null,a),t.child=Hu(t,null,s,a)):Or(e,t,s,a),t.memoizedState=o.state,n&&X1(t,r,!0),t.child}function ZM(e){var t=e.stateNode;t.pendingContext?K1(e,t.pendingContext,t.pendingContext!==t.context):t.context&&K1(e,t.context,!1),fw(e,t.containerInfo)}function dk(e,t,r,o,n){return Bu(),iw(n),t.flags|=256,Or(e,t,r,o),t.child}var EC={dehydrated:null,treeContext:null,retryLane:0};function AC(e){return{baseLanes:e,cachePool:null,transitions:null}}function JM(e,t,r){var o=t.pendingProps,n=pt.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),Qe(pt,n&1),e===null)return RC(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=o.children,e=o.fallback,a?(o=t.mode,a=t.child,i={mode:"hidden",children:i},!(o&1)&&a!==null?(a.childLanes=0,a.pendingProps=i):a=kh(i,o,0,null),e=Ys(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=AC(r),t.memoizedState=EC,e):Cw(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return bW(e,t,i,o,s,n,r);if(a){a=o.fallback,i=t.mode,n=e.child,s=n.sibling;var l={mode:"hidden",children:o.children};return!(i&1)&&t.child!==n?(o=t.child,o.childLanes=0,o.pendingProps=l,t.deletions=null):(o=Bi(n,l),o.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=Bi(s,a):(a=Ys(a,i,r,null),a.flags|=2),a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,i=e.child.memoizedState,i=i===null?AC(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=EC,o}return a=e.child,e=a.sibling,o=Bi(a,{mode:"visible",children:o.children}),!(t.mode&1)&&(o.lanes=r),o.return=t,o.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Cw(e,t){return t=kh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fg(e,t,r,o){return o!==null&&iw(o),Hu(t,e.child,null,r),e=Cw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bW(e,t,r,o,n,a,i){if(r)return t.flags&256?(t.flags&=-257,o=$0(Error($(422))),Fg(e,t,i,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=o.fallback,n=t.mode,o=kh({mode:"visible",children:o.children},n,0,null),a=Ys(a,n,i,null),a.flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,t.mode&1&&Hu(t,e.child,null,i),t.child.memoizedState=AC(i),t.memoizedState=EC,a);if(!(t.mode&1))return Fg(e,t,i,null);if(n.data==="$!"){if(o=n.nextSibling&&n.nextSibling.dataset,o)var s=o.dgst;return o=s,a=Error($(419)),o=$0(a,o,void 0),Fg(e,t,i,o)}if(s=(i&e.childLanes)!==0,Xr||s){if(o=Kt,o!==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&(o.suspendedLanes|i)?0:n,n!==0&&n!==a.retryLane&&(a.retryLane=n,_a(e,n),wn(o,e,n,-1))}return Pw(),o=$0(Error($(421))),Fg(e,t,i,o)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=FW.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,mo=Oi(n.nextSibling),go=t,lt=!0,yn=null,e!==null&&(Oo[Fo++]=Aa,Oo[Fo++]=Da,Oo[Fo++]=Zs,Aa=e.id,Da=e.overflow,Zs=t),t=Cw(t,o.children),t.flags|=4096,t)}function fk(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),IC(e.return,t,r)}function q0(e,t,r,o,n){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:n}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=o,a.tail=r,a.tailMode=n)}function eE(e,t,r){var o=t.pendingProps,n=o.revealOrder,a=o.tail;if(Or(e,t,o.children,r),o=pt.current,o&2)o=o&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&&fk(e,r,t);else if(e.tag===19)fk(e,r,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}o&=1}if(Qe(pt,o),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(r=t.child,n=null;r!==null;)e=r.alternate,e!==null&&dh(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),q0(t,!1,n,r,a);break;case"backwards":for(r=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&dh(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}q0(t,!0,r,null,a);break;case"together":q0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function jg(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Va(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),el|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,r=Bi(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Bi(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function RW(e,t,r){switch(t.tag){case 3:ZM(t),Bu();break;case 5:PM(t);break;case 1:Qr(t.type)&&ah(t);break;case 4:fw(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,n=t.memoizedProps.value;Qe(lh,o._currentValue),o._currentValue=n;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Qe(pt,pt.current&1),t.flags|=128,null):r&t.child.childLanes?JM(e,t,r):(Qe(pt,pt.current&1),e=Va(e,t,r),e!==null?e.sibling:null);Qe(pt,pt.current&1);break;case 19:if(o=(r&t.childLanes)!==0,e.flags&128){if(o)return eE(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Qe(pt,pt.current),o)break;return null;case 22:case 23:return t.lanes=0,YM(e,t,r)}return Va(e,t,r)}var tE,DC,rE,oE;tE=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};DC=function(){};rE=function(e,t,r,o){var n=e.memoizedProps;if(n!==o){e=t.stateNode,Ks(ia.current);var a=null;switch(r){case"input":n=tC(e,n),o=tC(e,o),a=[];break;case"select":n=gt({},n,{value:void 0}),o=gt({},o,{value:void 0}),a=[];break;case"textarea":n=nC(e,n),o=nC(e,o),a=[];break;default:typeof n.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=oh)}iC(r,o);var i;r=null;for(u in n)if(!o.hasOwnProperty(u)&&n.hasOwnProperty(u)&&n[u]!=null)if(u==="style"){var s=n[u];for(i in s)s.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(tf.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in o){var l=o[u];if(s=n?.[u],o.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(a||(a=[]),a.push(u,r)),r=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"&&(tf.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&tt("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};oE=function(e,t,r,o){r!==o&&(t.flags|=4)};function Bd(e,t){if(!lt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function vr(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var n=e.child;n!==null;)r|=n.lanes|n.childLanes,o|=n.subtreeFlags&14680064,o|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)r|=n.lanes|n.childLanes,o|=n.subtreeFlags,o|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function IW(e,t,r){var o=t.pendingProps;switch(aw(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vr(t),null;case 1:return Qr(t.type)&&nh(),vr(t),null;case 3:return o=t.stateNode,Uu(),rt(Yr),rt(yr),mw(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Ng(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yn!==null&&(UC(yn),yn=null))),DC(e,t),vr(t),null;case 5:pw(t);var n=Ks(mf.current);if(r=t.type,e!==null&&t.stateNode!=null)rE(e,t,r,o,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error($(166));return vr(t),null}if(e=Ks(ia.current),Ng(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[na]=t,o[ff]=a,e=(t.mode&1)!==0,r){case"dialog":tt("cancel",o),tt("close",o);break;case"iframe":case"object":case"embed":tt("load",o);break;case"video":case"audio":for(n=0;n<jd.length;n++)tt(jd[n],o);break;case"source":tt("error",o);break;case"img":case"image":case"link":tt("error",o),tt("load",o);break;case"details":tt("toggle",o);break;case"input":C1(o,a),tt("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},tt("invalid",o);break;case"textarea":S1(o,a),tt("invalid",o)}iC(r,a),n=null;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];i==="children"?typeof s=="string"?o.textContent!==s&&(a.suppressHydrationWarning!==!0&&Dg(o.textContent,s,e),n=["children",s]):typeof s=="number"&&o.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Dg(o.textContent,s,e),n=["children",""+s]):tf.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&tt("scroll",o)}switch(r){case"input":wg(o),w1(o,a,!0);break;case"textarea":wg(o),b1(o);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(o.onclick=oh)}o=n,t.updateQueue=o,o!==null&&(t.flags|=4)}else{i=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ek(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=i.createElement(r,{is:o.is}):(e=i.createElement(r),r==="select"&&(i=e,o.multiple?i.multiple=!0:o.size&&(i.size=o.size))):e=i.createElementNS(e,r),e[na]=t,e[ff]=o,tE(e,t,!1,!1),t.stateNode=e;e:{switch(i=sC(r,o),r){case"dialog":tt("cancel",e),tt("close",e),n=o;break;case"iframe":case"object":case"embed":tt("load",e),n=o;break;case"video":case"audio":for(n=0;n<jd.length;n++)tt(jd[n],e);n=o;break;case"source":tt("error",e),n=o;break;case"img":case"image":case"link":tt("error",e),tt("load",e),n=o;break;case"details":tt("toggle",e),n=o;break;case"input":C1(e,o),n=tC(e,o),tt("invalid",e);break;case"option":n=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},n=gt({},o,{value:void 0}),tt("invalid",e);break;case"textarea":S1(e,o),n=nC(e,o),tt("invalid",e);break;default:n=o}iC(r,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?Nk(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Ak(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&rf(e,l):typeof l=="number"&&rf(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(tf.hasOwnProperty(a)?l!=null&&a==="onScroll"&&tt("scroll",e):l!=null&&WC(e,a,l,i))}switch(r){case"input":wg(e),w1(e,o,!1);break;case"textarea":wg(e),b1(e);break;case"option":o.value!=null&&e.setAttribute("value",""+Hi(o.value));break;case"select":e.multiple=!!o.multiple,a=o.value,a!=null?Eu(e,!!o.multiple,a,!1):o.defaultValue!=null&&Eu(e,!!o.multiple,o.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=oh)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return vr(t),null;case 6:if(e&&t.stateNode!=null)oE(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error($(166));if(r=Ks(mf.current),Ks(ia.current),Ng(t)){if(o=t.stateNode,r=t.memoizedProps,o[na]=t,(a=o.nodeValue!==r)&&(e=go,e!==null))switch(e.tag){case 3:Dg(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Dg(o.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[na]=t,t.stateNode=o}return vr(t),null;case 13:if(rt(pt),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(lt&&mo!==null&&t.mode&1&&!(t.flags&128))wM(),Bu(),t.flags|=98560,a=!1;else if(a=Ng(t),o!==null&&o.dehydrated!==null){if(e===null){if(!a)throw Error($(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error($(317));a[na]=t}else Bu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vr(t),a=!1}else yn!==null&&(UC(yn),yn=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,t.mode&1&&(e===null||pt.current&1?Vt===0&&(Vt=3):Pw())),t.updateQueue!==null&&(t.flags|=4),vr(t),null);case 4:return Uu(),DC(e,t),e===null&&cf(t.stateNode.containerInfo),vr(t),null;case 10:return uw(t.type._context),vr(t),null;case 17:return Qr(t.type)&&nh(),vr(t),null;case 19:if(rt(pt),a=t.memoizedState,a===null)return vr(t),null;if(o=(t.flags&128)!==0,i=a.rendering,i===null)if(o)Bd(a,!1);else{if(Vt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=dh(e),i!==null){for(t.flags|=128,Bd(a,!1),o=i.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;r!==null;)a=r,e=o,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}),r=r.sibling;return Qe(pt,pt.current&1|2),t.child}e=e.sibling}a.tail!==null&&It()>Gu&&(t.flags|=128,o=!0,Bd(a,!1),t.lanes=4194304)}else{if(!o)if(e=dh(i),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Bd(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!lt)return vr(t),null}else 2*It()-a.renderingStartTime>Gu&&r!==1073741824&&(t.flags|=128,o=!0,Bd(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(r=a.last,r!==null?r.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=It(),t.sibling=null,r=pt.current,Qe(pt,o?r&1|2:r&1),t):(vr(t),null);case 22:case 23:return Iw(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?po&1073741824&&(vr(t),t.subtreeFlags&6&&(t.flags|=8192)):vr(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function PW(e,t){switch(aw(t),t.tag){case 1:return Qr(t.type)&&nh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Uu(),rt(Yr),rt(yr),mw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return pw(t),null;case 13:if(rt(pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Bu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(pt),null;case 4:return Uu(),null;case 10:return uw(t.type._context),null;case 22:case 23:return Iw(),null;case 24:return null;default:return null}}var _g=!1,xr=!1,LW=typeof WeakSet=="function"?WeakSet:Set,oe=null;function ku(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){yt(e,t,o)}else r.current=null}function NC(e,t,r){try{r()}catch(o){yt(e,t,o)}}var pk=!1;function TW(e,t){if(vC=eh,e=lM(),ow(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var n=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==r||n!==0&&d.nodeType!==3||(s=i+n),d!==a||o!==0&&d.nodeType!==3||(l=i+o),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++u===n&&(s=i),f===a&&++c===o&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(xC={focusedElem:e,selectionRange:r},eh=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;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:vn(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($(163))}}catch(C){yt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return g=pk,pk=!1,g}function Zd(e,t,r){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var n=o=o.next;do{if((n.tag&e)===e){var a=n.destroy;n.destroy=void 0,a!==void 0&&NC(t,r,a)}n=n.next}while(n!==o)}}function Lh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==t)}}function OC(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function nE(e){var t=e.alternate;t!==null&&(e.alternate=null,nE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[na],delete t[ff],delete t[wC],delete t[cW],delete t[dW])),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 aE(e){return e.tag===5||e.tag===3||e.tag===4}function mk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||aE(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 FC(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=oh));else if(o!==4&&(e=e.child,e!==null))for(FC(e,t,r),e=e.sibling;e!==null;)FC(e,t,r),e=e.sibling}function _C(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(_C(e,t,r),e=e.sibling;e!==null;)_C(e,t,r),e=e.sibling}var nr=null,xn=!1;function Ii(e,t,r){for(r=r.child;r!==null;)iE(e,t,r),r=r.sibling}function iE(e,t,r){if(aa&&typeof aa.onCommitFiberUnmount=="function")try{aa.onCommitFiberUnmount(yh,r)}catch{}switch(r.tag){case 5:xr||ku(r,t);case 6:var o=nr,n=xn;nr=null,Ii(e,t,r),nr=o,xn=n,nr!==null&&(xn?(e=nr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):nr.removeChild(r.stateNode));break;case 18:nr!==null&&(xn?(e=nr,r=r.stateNode,e.nodeType===8?H0(e.parentNode,r):e.nodeType===1&&H0(e,r),sf(e)):H0(nr,r.stateNode));break;case 4:o=nr,n=xn,nr=r.stateNode.containerInfo,xn=!0,Ii(e,t,r),nr=o,xn=n;break;case 0:case 11:case 14:case 15:if(!xr&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){n=o=o.next;do{var a=n,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&NC(r,t,i),n=n.next}while(n!==o)}Ii(e,t,r);break;case 1:if(!xr&&(ku(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(s){yt(r,t,s)}Ii(e,t,r);break;case 21:Ii(e,t,r);break;case 22:r.mode&1?(xr=(o=xr)||r.memoizedState!==null,Ii(e,t,r),xr=o):Ii(e,t,r);break;default:Ii(e,t,r)}}function gk(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new LW),t.forEach(function(o){var n=_W.bind(null,e,o);r.has(o)||(r.add(o),o.then(n,n))})}}function hn(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var n=r[o];try{var a=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:nr=s.stateNode,xn=!1;break e;case 3:nr=s.stateNode.containerInfo,xn=!0;break e;case 4:nr=s.stateNode.containerInfo,xn=!0;break e}s=s.return}if(nr===null)throw Error($(160));iE(a,i,n),nr=null,xn=!1;var l=n.alternate;l!==null&&(l.return=null),n.return=null}catch(u){yt(n,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)sE(t,e),t=t.sibling}function sE(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hn(t,e),ra(e),o&4){try{Zd(3,e,e.return),Lh(3,e)}catch(m){yt(e,e.return,m)}try{Zd(5,e,e.return)}catch(m){yt(e,e.return,m)}}break;case 1:hn(t,e),ra(e),o&512&&r!==null&&ku(r,r.return);break;case 5:if(hn(t,e),ra(e),o&512&&r!==null&&ku(r,r.return),e.flags&32){var n=e.stateNode;try{rf(n,"")}catch(m){yt(e,e.return,m)}}if(o&4&&(n=e.stateNode,n!=null)){var a=e.memoizedProps,i=r!==null?r.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&kk(n,a),sC(s,i);var u=sC(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?Nk(n,d):c==="dangerouslySetInnerHTML"?Ak(n,d):c==="children"?rf(n,d):WC(n,c,d,u)}switch(s){case"input":rC(n,a);break;case"textarea":Mk(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?Eu(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?Eu(n,!!a.multiple,a.defaultValue,!0):Eu(n,!!a.multiple,a.multiple?[]:"",!1))}n[ff]=a}catch(m){yt(e,e.return,m)}}break;case 6:if(hn(t,e),ra(e),o&4){if(e.stateNode===null)throw Error($(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(m){yt(e,e.return,m)}}break;case 3:if(hn(t,e),ra(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{sf(t.containerInfo)}catch(m){yt(e,e.return,m)}break;case 4:hn(t,e),ra(e);break;case 13:hn(t,e),ra(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(bw=It())),o&4&&gk(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(xr=(u=xr)||c,hn(t,e),xr=u):hn(t,e),ra(e),o&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(oe=e,c=e.child;c!==null;){for(d=oe=c;oe!==null;){switch(f=oe,p=f.child,f.tag){case 0:case 11:case 14:case 15:Zd(4,f,f.return);break;case 1:ku(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){o=f,r=f.return;try{t=o,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){yt(o,r,m)}}break;case 5:ku(f,f.return);break;case 22:if(f.memoizedState!==null){vk(d);continue}}p!==null?(p.return=f,oe=p):vk(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=Dk("display",i))}catch(m){yt(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){yt(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:hn(t,e),ra(e),o&4&&gk(e);break;case 21:break;default:hn(t,e),ra(e)}}function ra(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(aE(r)){var o=r;break e}r=r.return}throw Error($(160))}switch(o.tag){case 5:var n=o.stateNode;o.flags&32&&(rf(n,""),o.flags&=-33);var a=mk(e);_C(e,a,n);break;case 3:case 4:var i=o.stateNode.containerInfo,s=mk(e);FC(e,s,i);break;default:throw Error($(161))}}catch(l){yt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kW(e,t,r){oe=e,lE(e,t,r)}function lE(e,t,r){for(var o=(e.mode&1)!==0;oe!==null;){var n=oe,a=n.child;if(n.tag===22&&o){var i=n.memoizedState!==null||_g;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||xr;s=_g;var u=xr;if(_g=i,(xr=l)&&!u)for(oe=n;oe!==null;)i=oe,l=i.child,i.tag===22&&i.memoizedState!==null?xk(n):l!==null?(l.return=i,oe=l):xk(n);for(;a!==null;)oe=a,lE(a,t,r),a=a.sibling;oe=n,_g=s,xr=u}hk(e,t,r)}else n.subtreeFlags&8772&&a!==null?(a.return=n,oe=a):hk(e,t,r)}}function hk(e){for(;oe!==null;){var t=oe;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:xr||Lh(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!xr)if(r===null)o.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:vn(t.type,r.memoizedProps);o.componentDidUpdate(n,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&ek(t,a,o);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}ek(t,i,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.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&&sf(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}xr||t.flags&512&&OC(t)}catch(f){yt(t,t.return,f)}}if(t===e){oe=null;break}if(r=t.sibling,r!==null){r.return=t.return,oe=r;break}oe=t.return}}function vk(e){for(;oe!==null;){var t=oe;if(t===e){oe=null;break}var r=t.sibling;if(r!==null){r.return=t.return,oe=r;break}oe=t.return}}function xk(e){for(;oe!==null;){var t=oe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Lh(4,t)}catch(l){yt(t,r,l)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var n=t.return;try{o.componentDidMount()}catch(l){yt(t,n,l)}}var a=t.return;try{OC(t)}catch(l){yt(t,a,l)}break;case 5:var i=t.return;try{OC(t)}catch(l){yt(t,i,l)}}}catch(l){yt(t,t.return,l)}if(t===e){oe=null;break}var s=t.sibling;if(s!==null){s.return=t.return,oe=s;break}oe=t.return}}var MW=Math.ceil,mh=Ba.ReactCurrentDispatcher,ww=Ba.ReactCurrentOwner,Vo=Ba.ReactCurrentBatchConfig,De=0,Kt=null,Mt=null,ar=0,po=0,Mu=Gi(0),Vt=0,xf=null,el=0,Th=0,Sw=0,Jd=null,Kr=null,bw=0,Gu=1/0,Ma=null,gh=!1,VC=null,_i=null,Vg=!1,Ei=null,hh=0,ef=0,BC=null,$g=-1,qg=0;function Fr(){return De&6?It():$g!==-1?$g:$g=It()}function Vi(e){return e.mode&1?De&2&&ar!==0?ar&-ar:pW.transition!==null?(qg===0&&(qg=$k()),qg):(e=We,e!==0||(e=window.event,e=e===void 0?16:Jk(e.type)),e):1}function wn(e,t,r,o){if(50<ef)throw ef=0,BC=null,Error($(185));yf(e,r,o),(!(De&2)||e!==Kt)&&(e===Kt&&(!(De&2)&&(Th|=r),Vt===4&&ki(e,ar)),Zr(e,o),r===1&&De===0&&!(t.mode&1)&&(Gu=It()+500,Rh&&Wi()))}function Zr(e,t){var r=e.callbackNode;gG(e,t);var o=Jg(e,e===Kt?ar:0);if(o===0)r!==null&&P1(r),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(r!=null&&P1(r),t===1)e.tag===0?fW(yk.bind(null,e)):xM(yk.bind(null,e)),lW(function(){!(De&6)&&Wi()}),r=null;else{switch(qk(o)){case 1:r=XC;break;case 4:r=Wk;break;case 16:r=Zg;break;case 536870912:r=jk;break;default:r=Zg}r=hE(r,uE.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function uE(e,t){if($g=-1,qg=0,De&6)throw Error($(327));var r=e.callbackNode;if(Fu()&&e.callbackNode!==r)return null;var o=Jg(e,e===Kt?ar:0);if(o===0)return null;if(o&30||o&e.expiredLanes||t)t=vh(e,o);else{t=o;var n=De;De|=2;var a=dE();(Kt!==e||ar!==t)&&(Ma=null,Gu=It()+500,Xs(e,t));do try{DW();break}catch(s){cE(e,s)}while(1);lw(),mh.current=a,De=n,Mt!==null?t=0:(Kt=null,ar=0,t=Vt)}if(t!==0){if(t===2&&(n=fC(e),n!==0&&(o=n,t=HC(e,n))),t===1)throw r=xf,Xs(e,0),ki(e,o),Zr(e,It()),r;if(t===6)ki(e,o);else{if(n=e.current.alternate,!(o&30)&&!EW(n)&&(t=vh(e,o),t===2&&(a=fC(e),a!==0&&(o=a,t=HC(e,a))),t===1))throw r=xf,Xs(e,0),ki(e,o),Zr(e,It()),r;switch(e.finishedWork=n,e.finishedLanes=o,t){case 0:case 1:throw Error($(345));case 2:js(e,Kr,Ma);break;case 3:if(ki(e,o),(o&130023424)===o&&(t=bw+500-It(),10<t)){if(Jg(e,0)!==0)break;if(n=e.suspendedLanes,(n&o)!==o){Fr(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=CC(js.bind(null,e,Kr,Ma),t);break}js(e,Kr,Ma);break;case 4:if(ki(e,o),(o&4194240)===o)break;for(t=e.eventTimes,n=-1;0<o;){var i=31-Cn(o);a=1<<i,i=t[i],i>n&&(n=i),o&=~a}if(o=n,o=It()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*MW(o/1960))-o,10<o){e.timeoutHandle=CC(js.bind(null,e,Kr,Ma),o);break}js(e,Kr,Ma);break;case 5:js(e,Kr,Ma);break;default:throw Error($(329))}}}return Zr(e,It()),e.callbackNode===r?uE.bind(null,e):null}function HC(e,t){var r=Jd;return e.current.memoizedState.isDehydrated&&(Xs(e,t).flags|=256),e=vh(e,t),e!==2&&(t=Kr,Kr=r,t!==null&&UC(t)),e}function UC(e){Kr===null?Kr=e:Kr.push.apply(Kr,e)}function EW(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var o=0;o<r.length;o++){var n=r[o],a=n.getSnapshot;n=n.value;try{if(!Sn(a(),n))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 ki(e,t){for(t&=~Sw,t&=~Th,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Cn(t),o=1<<r;e[r]=-1,t&=~o}}function yk(e){if(De&6)throw Error($(327));Fu();var t=Jg(e,0);if(!(t&1))return Zr(e,It()),null;var r=vh(e,t);if(e.tag!==0&&r===2){var o=fC(e);o!==0&&(t=o,r=HC(e,o))}if(r===1)throw r=xf,Xs(e,0),ki(e,t),Zr(e,It()),r;if(r===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,js(e,Kr,Ma),Zr(e,It()),null}function Rw(e,t){var r=De;De|=1;try{return e(t)}finally{De=r,De===0&&(Gu=It()+500,Rh&&Wi())}}function tl(e){Ei!==null&&Ei.tag===0&&!(De&6)&&Fu();var t=De;De|=1;var r=Vo.transition,o=We;try{if(Vo.transition=null,We=1,e)return e()}finally{We=o,Vo.transition=r,De=t,!(De&6)&&Wi()}}function Iw(){po=Mu.current,rt(Mu)}function Xs(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,sW(r)),Mt!==null)for(r=Mt.return;r!==null;){var o=r;switch(aw(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&nh();break;case 3:Uu(),rt(Yr),rt(yr),mw();break;case 5:pw(o);break;case 4:Uu();break;case 13:rt(pt);break;case 19:rt(pt);break;case 10:uw(o.type._context);break;case 22:case 23:Iw()}r=r.return}if(Kt=e,Mt=e=Bi(e.current,null),ar=po=t,Vt=0,xf=null,Sw=Th=el=0,Kr=Jd=null,qs!==null){for(t=0;t<qs.length;t++)if(r=qs[t],o=r.interleaved,o!==null){r.interleaved=null;var n=o.next,a=r.pending;if(a!==null){var i=a.next;a.next=n,o.next=i}r.pending=o}qs=null}return e}function cE(e,t){do{var r=Mt;try{if(lw(),Gg.current=ph,fh){for(var o=mt.memoizedState;o!==null;){var n=o.queue;n!==null&&(n.pending=null),o=o.next}fh=!1}if(Js=0,qt=_t=mt=null,Qd=!1,gf=0,ww.current=null,r===null||r.return===null){Vt=1,xf=t,Mt=null;break}e:{var a=e,i=r.return,s=r,l=t;if(t=ar,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=ik(i);if(p!==null){p.flags&=-257,sk(p,i,s,a,t),p.mode&1&&ak(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)){ak(a,u,t),Pw();break e}l=Error($(426))}}else if(lt&&s.mode&1){var x=ik(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),sk(x,i,s,a,t),iw(zu(l,s));break e}}a=l=zu(l,s),Vt!==4&&(Vt=2),Jd===null?Jd=[a]:Jd.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var h=qM(a,l,t);J1(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"&&(_i===null||!_i.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var C=KM(a,s,t);J1(a,C);break e}}a=a.return}while(a!==null)}pE(r)}catch(w){t=w,Mt===r&&r!==null&&(Mt=r=r.return);continue}break}while(1)}function dE(){var e=mh.current;return mh.current=ph,e===null?ph:e}function Pw(){(Vt===0||Vt===3||Vt===2)&&(Vt=4),Kt===null||!(el&268435455)&&!(Th&268435455)||ki(Kt,ar)}function vh(e,t){var r=De;De|=2;var o=dE();(Kt!==e||ar!==t)&&(Ma=null,Xs(e,t));do try{AW();break}catch(n){cE(e,n)}while(1);if(lw(),De=r,mh.current=o,Mt!==null)throw Error($(261));return Kt=null,ar=0,Vt}function AW(){for(;Mt!==null;)fE(Mt)}function DW(){for(;Mt!==null&&!iG();)fE(Mt)}function fE(e){var t=gE(e.alternate,e,po);e.memoizedProps=e.pendingProps,t===null?pE(e):Mt=t,ww.current=null}function pE(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=PW(r,t),r!==null){r.flags&=32767,Mt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Vt=6,Mt=null;return}}else if(r=IW(r,t,po),r!==null){Mt=r;return}if(t=t.sibling,t!==null){Mt=t;return}Mt=t=e}while(t!==null);Vt===0&&(Vt=5)}function js(e,t,r){var o=We,n=Vo.transition;try{Vo.transition=null,We=1,NW(e,t,r,o)}finally{Vo.transition=n,We=o}return null}function NW(e,t,r,o){do Fu();while(Ei!==null);if(De&6)throw Error($(327));r=e.finishedWork;var n=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error($(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(hG(e,a),e===Kt&&(Mt=Kt=null,ar=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Vg||(Vg=!0,hE(Zg,function(){return Fu(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=Vo.transition,Vo.transition=null;var i=We;We=1;var s=De;De|=4,ww.current=null,TW(e,r),sE(r,e),rW(xC),eh=!!vC,xC=vC=null,e.current=r,kW(r,e,n),sG(),De=s,We=i,Vo.transition=a}else e.current=r;if(Vg&&(Vg=!1,Ei=e,hh=n),a=e.pendingLanes,a===0&&(_i=null),cG(r.stateNode,o),Zr(e,It()),t!==null)for(o=e.onRecoverableError,r=0;r<t.length;r++)n=t[r],o(n.value,{componentStack:n.stack,digest:n.digest});if(gh)throw gh=!1,e=VC,VC=null,e;return hh&1&&e.tag!==0&&Fu(),a=e.pendingLanes,a&1?e===BC?ef++:(ef=0,BC=e):ef=0,Wi(),null}function Fu(){if(Ei!==null){var e=qk(hh),t=Vo.transition,r=We;try{if(Vo.transition=null,We=16>e?16:e,Ei===null)var o=!1;else{if(e=Ei,Ei=null,hh=0,De&6)throw Error($(331));var n=De;for(De|=4,oe=e.current;oe!==null;){var a=oe,i=a.child;if(oe.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(oe=u;oe!==null;){var c=oe;switch(c.tag){case 0:case 11:case 15:Zd(8,c,a)}var d=c.child;if(d!==null)d.return=c,oe=d;else for(;oe!==null;){c=oe;var f=c.sibling,p=c.return;if(nE(c),c===u){oe=null;break}if(f!==null){f.return=p,oe=f;break}oe=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)}}oe=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,oe=i;else e:for(;oe!==null;){if(a=oe,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Zd(9,a,a.return)}var h=a.sibling;if(h!==null){h.return=a.return,oe=h;break e}oe=a.return}}var v=e.current;for(oe=v;oe!==null;){i=oe;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,oe=y;else e:for(i=v;oe!==null;){if(s=oe,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Lh(9,s)}}catch(w){yt(s,s.return,w)}if(s===i){oe=null;break e}var C=s.sibling;if(C!==null){C.return=s.return,oe=C;break e}oe=s.return}}if(De=n,Wi(),aa&&typeof aa.onPostCommitFiberRoot=="function")try{aa.onPostCommitFiberRoot(yh,e)}catch{}o=!0}return o}finally{We=r,Vo.transition=t}}return!1}function Ck(e,t,r){t=zu(r,t),t=qM(e,t,1),e=Fi(e,t,1),t=Fr(),e!==null&&(yf(e,1,t),Zr(e,t))}function yt(e,t,r){if(e.tag===3)Ck(e,e,r);else for(;t!==null;){if(t.tag===3){Ck(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(_i===null||!_i.has(o))){e=zu(r,e),e=KM(t,e,1),t=Fi(t,e,1),e=Fr(),t!==null&&(yf(t,1,e),Zr(t,e));break}}t=t.return}}function OW(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),t=Fr(),e.pingedLanes|=e.suspendedLanes&r,Kt===e&&(ar&r)===r&&(Vt===4||Vt===3&&(ar&130023424)===ar&&500>It()-bw?Xs(e,0):Sw|=r),Zr(e,t)}function mE(e,t){t===0&&(e.mode&1?(t=Rg,Rg<<=1,!(Rg&130023424)&&(Rg=4194304)):t=1);var r=Fr();e=_a(e,t),e!==null&&(yf(e,t,r),Zr(e,r))}function FW(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),mE(e,r)}function _W(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:o=e.stateNode;break;default:throw Error($(314))}o!==null&&o.delete(t),mE(e,r)}var gE;gE=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Yr.current)Xr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Xr=!1,RW(e,t,r);Xr=!!(e.flags&131072)}else Xr=!1,lt&&t.flags&1048576&&yM(t,sh,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;jg(e,t),e=t.pendingProps;var n=Vu(t,yr.current);Ou(t,r),n=hw(null,t,o,e,n,r);var a=vw();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,Qr(o)?(a=!0,ah(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,dw(t),n.updater=Ph,t.stateNode=n,n._reactInternals=t,LC(t,o,e,r),t=MC(null,t,o,!0,a,r)):(t.tag=0,lt&&a&&nw(t),Or(null,t,n,r),t=t.child),t;case 16:o=t.elementType;e:{switch(jg(e,t),e=t.pendingProps,n=o._init,o=n(o._payload),t.type=o,n=t.tag=BW(o),e=vn(o,e),n){case 0:t=kC(null,t,o,e,r);break e;case 1:t=ck(null,t,o,e,r);break e;case 11:t=lk(null,t,o,e,r);break e;case 14:t=uk(null,t,o,vn(o.type,e),r);break e}throw Error($(306,o,""))}return t;case 0:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:vn(o,n),kC(e,t,o,n,r);case 1:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:vn(o,n),ck(e,t,o,n,r);case 3:e:{if(ZM(t),e===null)throw Error($(387));o=t.pendingProps,a=t.memoizedState,n=a.element,IM(e,t),ch(t,o,null,r);var i=t.memoizedState;if(o=i.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){n=zu(Error($(423)),t),t=dk(e,t,o,r,n);break e}else if(o!==n){n=zu(Error($(424)),t),t=dk(e,t,o,r,n);break e}else for(mo=Oi(t.stateNode.containerInfo.firstChild),go=t,lt=!0,yn=null,r=bM(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Bu(),o===n){t=Va(e,t,r);break e}Or(e,t,o,r)}t=t.child}return t;case 5:return PM(t),e===null&&RC(t),o=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,yC(o,n)?i=null:a!==null&&yC(o,a)&&(t.flags|=32),QM(e,t),Or(e,t,i,r),t.child;case 6:return e===null&&RC(t),null;case 13:return JM(e,t,r);case 4:return fw(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Hu(t,null,o,r):Or(e,t,o,r),t.child;case 11:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:vn(o,n),lk(e,t,o,n,r);case 7:return Or(e,t,t.pendingProps,r),t.child;case 8:return Or(e,t,t.pendingProps.children,r),t.child;case 12:return Or(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(o=t.type._context,n=t.pendingProps,a=t.memoizedProps,i=n.value,Qe(lh,o._currentValue),o._currentValue=i,a!==null)if(Sn(a.value,i)){if(a.children===n.children&&!Yr.current){t=Va(e,t,r);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===o){if(a.tag===1){l=Na(-1,r&-r),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|=r,l=a.alternate,l!==null&&(l.lanes|=r),IC(a.return,r,t),s.lanes|=r;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($(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),IC(i,r,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}Or(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,o=t.pendingProps.children,Ou(t,r),n=Bo(n),o=o(n),t.flags|=1,Or(e,t,o,r),t.child;case 14:return o=t.type,n=vn(o,t.pendingProps),n=vn(o.type,n),uk(e,t,o,n,r);case 15:return XM(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:vn(o,n),jg(e,t),t.tag=1,Qr(o)?(e=!0,ah(t)):e=!1,Ou(t,r),$M(t,o,n),LC(t,o,n,r),MC(null,t,o,!0,e,r);case 19:return eE(e,t,r);case 22:return YM(e,t,r)}throw Error($(156,t.tag))};function hE(e,t){return Gk(e,t)}function VW(e,t,r,o){this.tag=e,this.key=r,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _o(e,t,r,o){return new VW(e,t,r,o)}function Lw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function BW(e){if(typeof e=="function")return Lw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$C)return 11;if(e===qC)return 14}return 2}function Bi(e,t){var r=e.alternate;return r===null?(r=_o(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Kg(e,t,r,o,n,a){var i=2;if(o=e,typeof e=="function")Lw(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Cu:return Ys(r.children,n,a,t);case jC:i=8,n|=8;break;case Q0:return e=_o(12,r,t,n|2),e.elementType=Q0,e.lanes=a,e;case Z0:return e=_o(13,r,t,n),e.elementType=Z0,e.lanes=a,e;case J0:return e=_o(19,r,t,n),e.elementType=J0,e.lanes=a,e;case Pk:return kh(r,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Rk:i=10;break e;case Ik:i=9;break e;case $C:i=11;break e;case qC:i=14;break e;case Pi:i=16,o=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=_o(i,r,t,n),t.elementType=e,t.type=o,t.lanes=a,t}function Ys(e,t,r,o){return e=_o(7,e,o,t),e.lanes=r,e}function kh(e,t,r,o){return e=_o(22,e,o,t),e.elementType=Pk,e.lanes=r,e.stateNode={isHidden:!1},e}function K0(e,t,r){return e=_o(6,e,null,t),e.lanes=r,e}function X0(e,t,r){return t=_o(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function HW(e,t,r,o,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=A0(0),this.expirationTimes=A0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=A0(0),this.identifierPrefix=o,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function Tw(e,t,r,o,n,a,i,s,l){return e=new HW(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=_o(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},dw(a),e}function UW(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:yu,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}function vE(e){if(!e)return Ui;e=e._reactInternals;e:{if(ol(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Qr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var r=e.type;if(Qr(r))return vM(e,r,t)}return t}function xE(e,t,r,o,n,a,i,s,l){return e=Tw(r,o,!0,e,n,a,i,s,l),e.context=vE(null),r=e.current,o=Fr(),n=Vi(r),a=Na(o,n),a.callback=t??null,Fi(r,a,n),e.current.lanes=n,yf(e,n,o),Zr(e,o),e}function Mh(e,t,r,o){var n=t.current,a=Fr(),i=Vi(n);return r=vE(r),t.context===null?t.context=r:t.pendingContext=r,t=Na(a,i),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=Fi(n,t,i),e!==null&&(wn(e,n,i,a),zg(e,n,i)),i}function xh(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 wk(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function kw(e,t){wk(e,t),(e=e.alternate)&&wk(e,t)}function zW(){return null}var yE=typeof reportError=="function"?reportError:function(e){console.error(e)};function Mw(e){this._internalRoot=e}Eh.prototype.render=Mw.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));Mh(e,t,null,null)};Eh.prototype.unmount=Mw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;tl(function(){Mh(null,e,null,null)}),t[Fa]=null}};function Eh(e){this._internalRoot=e}Eh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yk();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ti.length&&t!==0&&t<Ti[r].priority;r++);Ti.splice(r,0,e),r===0&&Zk(e)}};function Ew(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 Sk(){}function GW(e,t,r,o,n){if(n){if(typeof o=="function"){var a=o;o=function(){var u=xh(i);a.call(u)}}var i=xE(t,o,e,0,null,!1,!1,"",Sk);return e._reactRootContainer=i,e[Fa]=i.current,cf(e.nodeType===8?e.parentNode:e),tl(),i}for(;n=e.lastChild;)e.removeChild(n);if(typeof o=="function"){var s=o;o=function(){var u=xh(l);s.call(u)}}var l=Tw(e,0,!1,null,null,!1,!1,"",Sk);return e._reactRootContainer=l,e[Fa]=l.current,cf(e.nodeType===8?e.parentNode:e),tl(function(){Mh(t,l,r,o)}),l}function Dh(e,t,r,o,n){var a=r._reactRootContainer;if(a){var i=a;if(typeof n=="function"){var s=n;n=function(){var l=xh(i);s.call(l)}}Mh(t,i,e,n)}else i=GW(r,t,e,n,o);return xh(i)}Kk=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Wd(t.pendingLanes);r!==0&&(YC(t,r|1),Zr(t,It()),!(De&6)&&(Gu=It()+500,Wi()))}break;case 13:tl(function(){var o=_a(e,1);if(o!==null){var n=Fr();wn(o,e,1,n)}}),kw(e,1)}};QC=function(e){if(e.tag===13){var t=_a(e,134217728);if(t!==null){var r=Fr();wn(t,e,134217728,r)}kw(e,134217728)}};Xk=function(e){if(e.tag===13){var t=Vi(e),r=_a(e,t);if(r!==null){var o=Fr();wn(r,e,t,o)}kw(e,t)}};Yk=function(){return We};Qk=function(e,t){var r=We;try{return We=e,t()}finally{We=r}};uC=function(e,t,r){switch(t){case"input":if(rC(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var n=bh(o);if(!n)throw Error($(90));Tk(o),rC(o,n)}}}break;case"textarea":Mk(e,r);break;case"select":t=r.value,t!=null&&Eu(e,!!r.multiple,t,!1)}};_k=Rw;Vk=tl;var WW={usingClientEntryPoint:!1,Events:[wf,Ru,bh,Ok,Fk,Rw]},Hd={findFiberByHostInstance:$s,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jW={bundleType:Hd.bundleType,version:Hd.version,rendererPackageName:Hd.rendererPackageName,rendererConfig:Hd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ba.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Uk(e),e===null?null:e.stateNode},findFiberByHostInstance:Hd.findFiberByHostInstance||zW,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Ud=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ud.isDisabled&&Ud.supportsFiber))try{yh=Ud.inject(jW),aa=Ud}catch{}var Ud;xo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WW;xo.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ew(t))throw Error($(200));return UW(e,t,null,r)};xo.createRoot=function(e,t){if(!Ew(e))throw Error($(299));var r=!1,o="",n=yE;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=Tw(e,1,!1,null,null,r,!1,o,n),e[Fa]=t.current,cf(e.nodeType===8?e.parentNode:e),new Mw(t)};xo.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($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=Uk(t),e=e===null?null:e.stateNode,e};xo.flushSync=function(e){return tl(e)};xo.hydrate=function(e,t,r){if(!Ah(t))throw Error($(200));return Dh(null,e,t,!0,r)};xo.hydrateRoot=function(e,t,r){if(!Ew(e))throw Error($(405));var o=r!=null&&r.hydratedSources||null,n=!1,a="",i=yE;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=xE(t,null,e,1,r??null,n,!1,a,i),e[Fa]=t.current,cf(e),o)for(e=0;e<o.length;e++)r=o[e],n=r._getVersion,n=n(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,n]:t.mutableSourceEagerHydrationData.push(r,n);return new Eh(t)};xo.render=function(e,t,r){if(!Ah(t))throw Error($(200));return Dh(null,e,t,!1,r)};xo.unmountComponentAtNode=function(e){if(!Ah(e))throw Error($(40));return e._reactRootContainer?(tl(function(){Dh(null,null,e,!1,function(){e._reactRootContainer=null,e[Fa]=null})}),!0):!1};xo.unstable_batchedUpdates=Rw;xo.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!Ah(r))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return Dh(e,t,r,!1,o)};xo.version="18.3.1-next-f1338f8080-20240426"});var Ha=Jn((ere,SE)=>{"use strict";function wE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wE)}catch(e){console.error(e)}}wE(),SE.exports=CE()});var fA=Jn(dA=>{"use strict";var ac=M();function X$(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Y$=typeof Object.is=="function"?Object.is:X$,Q$=ac.useState,Z$=ac.useEffect,J$=ac.useLayoutEffect,eq=ac.useDebugValue;function tq(e,t){var r=t(),o=Q$({inst:{value:r,getSnapshot:t}}),n=o[0].inst,a=o[1];return J$(function(){n.value=r,n.getSnapshot=t,tS(n)&&a({inst:n})},[e,r,t]),Z$(function(){return tS(n)&&a({inst:n}),e(function(){tS(n)&&a({inst:n})})},[e]),eq(r),r}function tS(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Y$(e,r)}catch{return!0}}function rq(e,t){return t()}var oq=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?rq:tq;dA.useSyncExternalStore=ac.useSyncExternalStore!==void 0?ac.useSyncExternalStore:oq});var mA=Jn((cie,pA)=>{"use strict";pA.exports=fA()});var Mte={};d5(Mte,{Accordion:()=>iA,AccordionContent:()=>Xw,AccordionItem:()=>qw,AccordionTrigger:()=>Kw,Alert:()=>Yw,AlertDescription:()=>Zw,AlertTitle:()=>Qw,AspectRatio:()=>eS,Avatar:()=>jh,AvatarFallback:()=>$h,AvatarGroup:()=>sS,AvatarImage:()=>iS,Badge:()=>Br,Breadcrumb:()=>uS,BreadcrumbEllipsis:()=>qh,BreadcrumbItem:()=>dS,BreadcrumbLink:()=>pS,BreadcrumbList:()=>cS,BreadcrumbPage:()=>mS,BreadcrumbSeparator:()=>fS,Button:()=>Ee,ButtonGroup:()=>aT,Card:()=>bb,CardCVCInput:()=>Ob,CardContent:()=>Lb,CardDescription:()=>Pb,CardExpiryInput:()=>Nb,CardFooter:()=>Tb,CardHeader:()=>Rb,CardNumberInput:()=>Db,CardTitle:()=>Ib,CardZipInput:()=>Fb,Carousel:()=>zb,CarouselContent:()=>Wb,CarouselItem:()=>$b,CarouselNext:()=>Kb,CarouselPrevious:()=>qb,Checkbox:()=>Lx,CheckboxGroup:()=>Qb,CheckboxLabel:()=>sm,CheckboxWithLabel:()=>Zb,Collapsible:()=>tF,CollapsibleContent:()=>rR,CollapsibleTrigger:()=>tR,ColorPicker:()=>ey,Command:()=>uy,CommandDialog:()=>bB,CommandEmpty:()=>uI,CommandGroup:()=>cI,CommandInput:()=>sI,CommandItem:()=>fI,CommandList:()=>lI,CommandSeparator:()=>dI,CommandShortcut:()=>pI,DatePicker:()=>my,DateRangePicker:()=>OI,DateTimePicker:()=>FI,Dialog:()=>iy,DialogClose:()=>wB,DialogContent:()=>Rm,DialogDescription:()=>ly,DialogFooter:()=>aI,DialogForm:()=>iI,DialogHeader:()=>sy,DialogTitle:()=>ad,DialogTrigger:()=>CB,DraggableList:()=>jB,DropdownMenu:()=>tU,DropdownMenuCheckboxItem:()=>uP,DropdownMenuContent:()=>sP,DropdownMenuGroup:()=>oU,DropdownMenuItem:()=>lP,DropdownMenuLabel:()=>dP,DropdownMenuPortal:()=>nU,DropdownMenuRadioGroup:()=>iU,DropdownMenuRadioItem:()=>cP,DropdownMenuSeparator:()=>fP,DropdownMenuShortcut:()=>pP,DropdownMenuSub:()=>aU,DropdownMenuSubContent:()=>iP,DropdownMenuSubTrigger:()=>aP,DropdownMenuTrigger:()=>rU,FileUpload:()=>gP,FreeBadge:()=>CU,GestureDrawer:()=>hP,GitHubStarButton:()=>HQ,GitHubStars:()=>cU,GradientPicker:()=>GV,Input:()=>dr,InputOTP:()=>yP,InputOTPGroup:()=>CP,InputOTPSeparator:()=>bP,InputOTPSlot:()=>SP,Kbd:()=>JL,Label:()=>zr,LockedComponent:()=>RP,MonthPicker:()=>_I,MoonLogo:()=>wy,MoonLogoAnimated:()=>tZ,MoonLogoIcon:()=>eZ,MoonUIAccordion:()=>iA,MoonUIAccordionContent:()=>Xw,MoonUIAccordionItem:()=>qw,MoonUIAccordionTrigger:()=>Kw,MoonUIAlert:()=>Yw,MoonUIAlertDescription:()=>Zw,MoonUIAlertTitle:()=>Qw,MoonUIAspectRatio:()=>eS,MoonUIAvatar:()=>jh,MoonUIAvatarFallback:()=>$h,MoonUIAvatarGroup:()=>sS,MoonUIAvatarImage:()=>iS,MoonUIBadge:()=>Br,MoonUIBreadcrumb:()=>uS,MoonUIBreadcrumbEllipsis:()=>qh,MoonUIBreadcrumbItem:()=>dS,MoonUIBreadcrumbLink:()=>pS,MoonUIBreadcrumbList:()=>cS,MoonUIBreadcrumbPage:()=>mS,MoonUIBreadcrumbSeparator:()=>fS,MoonUIButton:()=>Ee,MoonUIButtonGroup:()=>aT,MoonUICalendar:()=>Gc,MoonUICard:()=>bb,MoonUICardCVCInput:()=>Ob,MoonUICardContent:()=>Lb,MoonUICardDescription:()=>Pb,MoonUICardExpiryInput:()=>Nb,MoonUICardFooter:()=>Tb,MoonUICardHeader:()=>Rb,MoonUICardNumberInput:()=>Db,MoonUICardTitle:()=>Ib,MoonUICardZipInput:()=>Fb,MoonUICarousel:()=>zb,MoonUICarouselContent:()=>Wb,MoonUICarouselItem:()=>$b,MoonUICarouselNext:()=>Kb,MoonUICarouselPrevious:()=>qb,MoonUICheckbox:()=>Lx,MoonUICheckboxGroup:()=>Qb,MoonUICheckboxLabel:()=>sm,MoonUICheckboxWithLabel:()=>Zb,MoonUICollapsible:()=>tF,MoonUICollapsibleContent:()=>rR,MoonUICollapsibleTrigger:()=>tR,MoonUIColorPicker:()=>ey,MoonUICommand:()=>uy,MoonUICommandDialog:()=>bB,MoonUICommandEmpty:()=>uI,MoonUICommandGroup:()=>cI,MoonUICommandInput:()=>sI,MoonUICommandItem:()=>fI,MoonUICommandList:()=>lI,MoonUICommandSeparator:()=>dI,MoonUICommandShortcut:()=>pI,MoonUIDataTableBasic:()=>zB,MoonUIDatePicker:()=>my,MoonUIDateRangePicker:()=>OI,MoonUIDateTimePicker:()=>FI,MoonUIDialog:()=>iy,MoonUIDialogClose:()=>wB,MoonUIDialogContent:()=>Rm,MoonUIDialogDescription:()=>ly,MoonUIDialogFooter:()=>aI,MoonUIDialogForm:()=>iI,MoonUIDialogHeader:()=>sy,MoonUIDialogTitle:()=>ad,MoonUIDialogTrigger:()=>CB,MoonUIDraggableList:()=>jB,MoonUIDropdownMenu:()=>tU,MoonUIDropdownMenuCheckboxItem:()=>uP,MoonUIDropdownMenuContent:()=>sP,MoonUIDropdownMenuGroup:()=>oU,MoonUIDropdownMenuItem:()=>lP,MoonUIDropdownMenuLabel:()=>dP,MoonUIDropdownMenuPortal:()=>nU,MoonUIDropdownMenuRadioGroup:()=>iU,MoonUIDropdownMenuRadioItem:()=>cP,MoonUIDropdownMenuSeparator:()=>fP,MoonUIDropdownMenuShortcut:()=>pP,MoonUIDropdownMenuSub:()=>aU,MoonUIDropdownMenuSubContent:()=>iP,MoonUIDropdownMenuSubTrigger:()=>aP,MoonUIDropdownMenuTrigger:()=>rU,MoonUIFileUpload:()=>gP,MoonUIFreeBadge:()=>CU,MoonUIGestureDrawer:()=>hP,MoonUIGitHubStars:()=>cU,MoonUIGradientPicker:()=>GV,MoonUIInput:()=>dr,MoonUIInputOTP:()=>yP,MoonUIInputOTPGroup:()=>CP,MoonUIInputOTPSeparator:()=>bP,MoonUIInputOTPSlot:()=>SP,MoonUIKbd:()=>JL,MoonUILabel:()=>zr,MoonUILockedComponent:()=>RP,MoonUIMonthPicker:()=>_I,MoonUIMoonLogo:()=>wy,MoonUIPagination:()=>IP,MoonUIPaginationContent:()=>PP,MoonUIPaginationEllipsis:()=>MP,MoonUIPaginationItem:()=>LP,MoonUIPaginationLink:()=>Hm,MoonUIPaginationNext:()=>kP,MoonUIPaginationPrevious:()=>TP,MoonUIPhoneInput:()=>XP,MoonUIPopover:()=>Ca,MoonUIPopoverAnchor:()=>xV,MoonUIPopoverClose:()=>yV,MoonUIPopoverContent:()=>Bn,MoonUIPopoverFooter:()=>VR,MoonUIPopoverHeader:()=>_R,MoonUIPopoverSeparator:()=>FR,MoonUIPopoverTrigger:()=>wa,MoonUIProBadge:()=>yU,MoonUIProComponentWrapper:()=>xU,MoonUIProgress:()=>Vm,MoonUIRadioGroup:()=>YP,MoonUIRadioGroupItem:()=>Ty,MoonUIRadioItemWithLabel:()=>QP,MoonUIRadioLabel:()=>ky,MoonUIRating:()=>tT,MoonUIRichTextEditor:()=>f3,MoonUIScrollArea:()=>nL,MoonUIScrollBar:()=>_y,MoonUIScrollReveal:()=>aL,MoonUIScrollRevealContainer:()=>iL,MoonUIScrollRevealItem:()=>sL,MoonUISelect:()=>iu,MoonUISelectContent:()=>lu,MoonUISelectGroup:()=>u3,MoonUISelectItem:()=>Er,MoonUISelectLabel:()=>qP,MoonUISelectScrollDownButton:()=>Ly,MoonUISelectScrollUpButton:()=>Py,MoonUISelectSeparator:()=>KP,MoonUISelectTrigger:()=>su,MoonUISelectValue:()=>ud,MoonUISeparator:()=>To,MoonUISimpleColorPicker:()=>zV,MoonUISimpleEditor:()=>PL,MoonUISimpleTooltip:()=>IL,MoonUISkeleton:()=>yi,MoonUISkeletonAvatar:()=>$y,MoonUISkeletonCard:()=>TL,MoonUISkeletonText:()=>jy,MoonUISlider:()=>Ia,MoonUISpinner:()=>oT,MoonUISwipeableCard:()=>kL,MoonUISwitch:()=>EL,MoonUITable:()=>Tm,MoonUITableBody:()=>Mm,MoonUITableCaption:()=>AI,MoonUITableCell:()=>id,MoonUITableFooter:()=>EI,MoonUITableHead:()=>Em,MoonUITableHeader:()=>km,MoonUITableRow:()=>eu,MoonUITabs:()=>xm,MoonUITabsContent:()=>Ql,MoonUITabsList:()=>ym,MoonUITabsTrigger:()=>Yl,MoonUITagsInput:()=>AL,MoonUITextarea:()=>DL,MoonUIToast:()=>e0,MoonUIToastAction:()=>XL,MoonUIToastClose:()=>t0,MoonUIToastDescription:()=>o0,MoonUIToastProvider:()=>KL,MoonUIToastTitle:()=>r0,MoonUIToastViewport:()=>Jy,MoonUIToaster:()=>o4,MoonUIToggle:()=>Ym,MoonUIToggleGroup:()=>PT,MoonUIToggleGroupItem:()=>LT,MoonUITooltip:()=>Jm,MoonUITooltipArrow:()=>Wy,MoonUITooltipContent:()=>xd,MoonUITooltipProvider:()=>Gy,MoonUITooltipTrigger:()=>eg,Pagination:()=>IP,PaginationContent:()=>PP,PaginationEllipsis:()=>MP,PaginationItem:()=>LP,PaginationLink:()=>Hm,PaginationNext:()=>kP,PaginationPrevious:()=>TP,Palette:()=>ul,PhoneInput:()=>XP,Pipette:()=>Xf,Popover:()=>Ca,PopoverAnchor:()=>xV,PopoverClose:()=>yV,PopoverContent:()=>Bn,PopoverFooter:()=>VR,PopoverHeader:()=>_R,PopoverSeparator:()=>FR,PopoverTrigger:()=>wa,ProBadge:()=>yU,ProComponentWrapper:()=>xU,Progress:()=>Vm,REGEXP_ONLY_CHARS:()=>hU,REGEXP_ONLY_DIGITS:()=>gU,REGEXP_ONLY_DIGITS_AND_CHARS:()=>vU,RadioGroup:()=>YP,RadioGroupItem:()=>Ty,RadioItemWithLabel:()=>QP,RadioLabel:()=>ky,Rating:()=>tT,RichTextEditor:()=>f3,ScrollArea:()=>nL,ScrollBar:()=>_y,ScrollReveal:()=>aL,ScrollRevealContainer:()=>iL,ScrollRevealItem:()=>sL,Select:()=>iu,SelectContent:()=>lu,SelectGroup:()=>u3,SelectItem:()=>Er,SelectLabel:()=>qP,SelectScrollDownButton:()=>Ly,SelectScrollUpButton:()=>Py,SelectSeparator:()=>KP,SelectTrigger:()=>su,SelectValue:()=>ud,Separator:()=>To,SimpleColorPicker:()=>zV,SimpleEditor:()=>PL,SimpleTooltip:()=>IL,Skeleton:()=>yi,SkeletonAvatar:()=>$y,SkeletonCard:()=>TL,SkeletonText:()=>jy,Slider:()=>Ia,Spinner:()=>oT,SwipeableCard:()=>kL,Switch:()=>EL,Table:()=>Tm,TableBody:()=>Mm,TableCaption:()=>AI,TableCell:()=>id,TableFooter:()=>EI,TableHead:()=>Em,TableHeader:()=>km,TableRow:()=>eu,Tabs:()=>xm,TabsContent:()=>Ql,TabsList:()=>ym,TabsTrigger:()=>Yl,TagsInput:()=>AL,Textarea:()=>DL,Toast:()=>e0,ToastAction:()=>XL,ToastClose:()=>t0,ToastDescription:()=>o0,ToastProvider:()=>KL,ToastTitle:()=>r0,ToastViewport:()=>Jy,Toaster:()=>o4,Toggle:()=>Ym,ToggleGroup:()=>PT,ToggleGroupItem:()=>LT,Tooltip:()=>Jm,TooltipArrow:()=>Wy,TooltipContent:()=>xd,TooltipProvider:()=>Gy,TooltipTrigger:()=>eg,aspectRatioVariants:()=>cA,badgeVariants:()=>lS,breadcrumbVariants:()=>IA,buttonGroupVariants:()=>nT,buttonVariants:()=>sp,carouselContentVariants:()=>Gb,carouselItemVariants:()=>jb,cn:()=>P,collapsibleContentVariants:()=>rF,collapsibleTriggerVariants:()=>Jb,format:()=>jo,inputOTPSlotVariants:()=>wP,kbdVariants:()=>ZL,moonUIBadgeVariants:()=>lS,moonUIButtonGroupVariants:()=>nT,moonUIButtonVariants:()=>sp,moonUICarouselContentVariants:()=>Gb,moonUICarouselItemVariants:()=>jb,moonUICreateSortableHeader:()=>GB,moonUIInputOTPSlotVariants:()=>wP,moonUIKbdVariants:()=>ZL,moonUIPopoverContentVariants:()=>OR,moonUIRatingVariants:()=>eT,moonUISkeletonVariants:()=>LL,moonUISpinnerVariants:()=>rT,moonUIToggleVariants:()=>Xm,moonUITooltipVariants:()=>RL,popoverContentVariants:()=>OR,progressVariants:()=>lU,ratingVariants:()=>eT,separatorVariants:()=>K3,skeletonVariants:()=>LL,spinnerVariants:()=>rT,switchVariants:()=>Bz,tabsListVariants:()=>FV,tabsTriggerVariants:()=>_V,toast:()=>YL,toggleVariants:()=>Xm,tooltipVariants:()=>RL,useCarousel:()=>Wc,useToast:()=>QL});module.exports=f5(Mte);var Wh=R(M());var eo=R(M(),1);var Ao=R(M(),1),x0=R(N(),1);function ZT(e,t){let r=Ao.createContext(t),o=a=>{let{children:i,...s}=a,l=Ao.useMemo(()=>s,Object.values(s));return(0,x0.jsx)(r.Provider,{value:l,children:i})};o.displayName=e+"Provider";function n(a){let i=Ao.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,n]}function Fe(e,t=[]){let r=[];function o(a,i){let s=Ao.createContext(i),l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=Ao.useMemo(()=>g,Object.values(g));return(0,x0.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,g=Ao.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=r.map(i=>Ao.createContext(i));return function(s){let l=s?.[e]||a;return Ao.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,N5(n,...t)]}function N5(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return Ao.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var bi=R(M(),1);var e1=R(M(),1);function JT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fo(...e){return t=>{let r=!1,o=e.map(n=>{let a=JT(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():JT(e[n],null)}}}}function de(...e){return e1.useCallback(fo(...e),e)}var Ft=R(M(),1);var hu=R(N(),1);function qr(e){let t=O5(e),r=Ft.forwardRef((o,n)=>{let{children:a,...i}=o,s=Ft.Children.toArray(a),l=s.find(F5);if(l){let u=l.props.children,c=s.map(d=>d===l?Ft.Children.count(u)>1?Ft.Children.only(null):Ft.isValidElement(u)?u.props.children:null:d);return(0,hu.jsx)(t,{...i,ref:n,children:Ft.isValidElement(u)?Ft.cloneElement(u,void 0,c):null})}return(0,hu.jsx)(t,{...i,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}var t1=qr("Slot");function O5(e){let t=Ft.forwardRef((r,o)=>{let{children:n,...a}=r;if(Ft.isValidElement(n)){let i=V5(n),s=_5(a,n.props);return n.type!==Ft.Fragment&&(s.ref=o?fo(o,i):i),Ft.cloneElement(n,s)}return Ft.Children.count(n)>1?Ft.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var r1=Symbol("radix.slottable");function o1(e){let t=({children:r})=>(0,hu.jsx)(hu.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=r1,t}function F5(e){return Ft.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===r1}function _5(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function V5(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var pg=R(N(),1),B5=R(M(),1);var H5=R(N(),1);function ea(e){let t=e+"CollectionProvider",[r,o]=Fe(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:x,children:h}=m,v=bi.default.useRef(null),y=bi.default.useRef(new Map).current;return(0,pg.jsx)(n,{scope:x,itemMap:y,collectionRef:v,children:h})};i.displayName=t;let s=e+"CollectionSlot",l=qr(s),u=bi.default.forwardRef((m,x)=>{let{scope:h,children:v}=m,y=a(s,h),C=de(x,y.collectionRef);return(0,pg.jsx)(l,{ref:C,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=qr(c),p=bi.default.forwardRef((m,x)=>{let{scope:h,children:v,...y}=m,C=bi.default.useRef(null),w=de(x,C),b=a(c,h);return bi.default.useEffect(()=>(b.itemMap.set(C,{ref:C,...y}),()=>void b.itemMap.delete(C))),(0,pg.jsx)(f,{[d]:"",ref:w,children:v})});p.displayName=c;function g(m){let x=a(e+"CollectionConsumer",m);return bi.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,o]}var jte=!!(typeof window<"u"&&window.document&&window.document.createElement);function W(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var Do=R(M(),1);var n1=R(M(),1),Ve=globalThis?.document?n1.useLayoutEffect:()=>{};var mg=R(M(),1);var U5=Do[" useInsertionEffect ".trim().toString()]||Ve;function qe({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=z5({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=Do.useRef(e!==void 0);Do.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${o} 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,o])}let u=Do.useCallback(c=>{if(s){let d=G5(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function z5({defaultProp:e,onChange:t}){let[r,o]=Do.useState(e),n=Do.useRef(r),a=Do.useRef(t);return U5(()=>{a.current=t},[t]),Do.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function G5(e){return typeof e=="function"}var Xte=Symbol("RADIX:SYNC_STATE");var bE=R(M(),1),RE=R(Ha(),1);var IE=R(N(),1),$W=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],q=$W.reduce((e,t)=>{let r=qr(`Primitive.${t}`),o=bE.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,IE.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function $u(e,t){e&&RE.flushSync(()=>e.dispatchEvent(t))}var sr=R(M(),1);var Jr=R(M(),1);var PE=R(M(),1);function qW(e,t){return PE.useReducer((r,o)=>t[r][o]??r,e)}var ut=e=>{let{present:t,children:r}=e,o=KW(t),n=typeof r=="function"?r({present:o.isPresent}):Jr.Children.only(r),a=de(o.ref,XW(n));return typeof r=="function"||o.isPresent?Jr.cloneElement(n,{ref:a}):null};ut.displayName="Presence";function KW(e){let[t,r]=Jr.useState(),o=Jr.useRef(null),n=Jr.useRef(e),a=Jr.useRef("none"),i=e?"mounted":"unmounted",[s,l]=qW(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Jr.useEffect(()=>{let u=Nh(o.current);a.current=s==="mounted"?u:"none"},[s]),Ve(()=>{let u=o.current,c=n.current;if(c!==e){let f=a.current,p=Nh(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),Ve(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let m=Nh(o.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=Nh(o.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:Jr.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function Nh(e){return e?.animationName||"none"}function XW(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Aw=R(M(),1);var YW=Aw[" useId ".trim().toString()]||(()=>{}),QW=0;function Ne(e){let[t,r]=Aw.useState(YW());return Ve(()=>{e||r(o=>o??String(QW++))},[e]),e||(t?`radix-${t}`:"")}var nl=R(N(),1),Oh="Collapsible",[ZW,Dw]=Fe(Oh),[JW,Nw]=ZW(Oh),LE=sr.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:o,defaultOpen:n,disabled:a,onOpenChange:i,...s}=e,[l,u]=qe({prop:o,defaultProp:n??!1,onChange:i,caller:Oh});return(0,nl.jsx)(JW,{scope:r,disabled:a,contentId:Ne(),open:l,onOpenToggle:sr.useCallback(()=>u(c=>!c),[u]),children:(0,nl.jsx)(q.div,{"data-state":Fw(l),"data-disabled":a?"":void 0,...s,ref:t})})});LE.displayName=Oh;var TE="CollapsibleTrigger",kE=sr.forwardRef((e,t)=>{let{__scopeCollapsible:r,...o}=e,n=Nw(TE,r);return(0,nl.jsx)(q.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":Fw(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:W(e.onClick,n.onOpenToggle)})});kE.displayName=TE;var Ow="CollapsibleContent",ME=sr.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=Nw(Ow,e.__scopeCollapsible);return(0,nl.jsx)(ut,{present:r||n.open,children:({present:a})=>(0,nl.jsx)(ej,{...o,ref:t,present:a})})});ME.displayName=Ow;var ej=sr.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:o,children:n,...a}=e,i=Nw(Ow,r),[s,l]=sr.useState(o),u=sr.useRef(null),c=de(t,u),d=sr.useRef(0),f=d.current,p=sr.useRef(0),g=p.current,m=i.open||s,x=sr.useRef(m),h=sr.useRef(void 0);return sr.useEffect(()=>{let v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),Ve(()=>{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(o)}},[i.open,o]),(0,nl.jsx)(q.div,{"data-state":Fw(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 Fw(e){return e?"open":"closed"}var Fh=LE,qu=kE,bf=ME;var _h=R(M(),1),tj=R(N(),1),rj=_h.createContext(void 0);function sa(e){let t=_h.useContext(rj);return e||t||"ltr"}var Bt=R(N(),1),bn="Accordion",oj=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Vw,nj,aj]=ea(bn),[Bh,Pre]=Fe(bn,[aj,Dw]),Bw=Dw(),AE=eo.default.forwardRef((e,t)=>{let{type:r,...o}=e,n=o,a=o;return(0,Bt.jsx)(Vw.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Bt.jsx)(uj,{...a,ref:t}):(0,Bt.jsx)(lj,{...n,ref:t})})});AE.displayName=bn;var[DE,ij]=Bh(bn),[NE,sj]=Bh(bn,{collapsible:!1}),lj=eo.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},collapsible:a=!1,...i}=e,[s,l]=qe({prop:r,defaultProp:o??"",onChange:n,caller:bn});return(0,Bt.jsx)(DE,{scope:e.__scopeAccordion,value:eo.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:eo.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Bt.jsx)(NE,{scope:e.__scopeAccordion,collapsible:a,children:(0,Bt.jsx)(OE,{...i,ref:t})})})}),uj=eo.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},...a}=e,[i,s]=qe({prop:r,defaultProp:o??[],onChange:n,caller:bn}),l=eo.default.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=eo.default.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return(0,Bt.jsx)(DE,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:(0,Bt.jsx)(NE,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Bt.jsx)(OE,{...a,ref:t})})})}),[cj,Hh]=Bh(bn),OE=eo.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:o,dir:n,orientation:a="vertical",...i}=e,s=eo.default.useRef(null),l=de(s,t),u=nj(r),d=sa(n)==="ltr",f=W(e.onKeyDown,p=>{if(!oj.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,C=h-1,w=()=>{v=x+1,v>C&&(v=y)},b=()=>{v=x-1,v<y&&(v=C)};switch(p.key){case"Home":v=y;break;case"End":v=C;break;case"ArrowRight":a==="horizontal"&&(d?w():b());break;case"ArrowDown":a==="vertical"&&w();break;case"ArrowLeft":a==="horizontal"&&(d?b():w());break;case"ArrowUp":a==="vertical"&&b();break}let S=v%h;m[S].ref.current?.focus()});return(0,Bt.jsx)(cj,{scope:r,disabled:o,direction:n,orientation:a,children:(0,Bt.jsx)(Vw.Slot,{scope:r,children:(0,Bt.jsx)(q.div,{...i,"data-orientation":a,ref:l,onKeyDown:o?void 0:f})})})}),Vh="AccordionItem",[dj,Hw]=Bh(Vh),FE=eo.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:o,...n}=e,a=Hh(Vh,r),i=ij(Vh,r),s=Bw(r),l=Ne(),u=o&&i.value.includes(o)||!1,c=a.disabled||e.disabled;return(0,Bt.jsx)(dj,{scope:r,open:u,disabled:c,triggerId:l,children:(0,Bt.jsx)(Fh,{"data-orientation":a.orientation,"data-state":zE(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:d=>{d?i.onItemOpen(o):i.onItemClose(o)}})})});FE.displayName=Vh;var _E="AccordionHeader",VE=eo.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Hh(bn,r),a=Hw(_E,r);return(0,Bt.jsx)(q.h3,{"data-orientation":n.orientation,"data-state":zE(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:t})});VE.displayName=_E;var _w="AccordionTrigger",BE=eo.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Hh(bn,r),a=Hw(_w,r),i=sj(_w,r),s=Bw(r);return(0,Bt.jsx)(Vw.ItemSlot,{scope:r,children:(0,Bt.jsx)(qu,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:a.triggerId,...s,...o,ref:t})})});BE.displayName=_w;var HE="AccordionContent",UE=eo.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Hh(bn,r),a=Hw(HE,r),i=Bw(r);return(0,Bt.jsx)(bf,{role:"region","aria-labelledby":a.triggerId,"data-orientation":n.orientation,...i,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});UE.displayName=HE;function zE(e){return e?"open":"closed"}var GE=AE,WE=FE,jE=VE,Uw=BE,zw=UE;var zh=R(M());var $E=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pj=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.toLowerCase()),Gw=e=>{let t=pj(e);return t.charAt(0).toUpperCase()+t.slice(1)},Uh=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim(),qE=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Rf=R(M());var KE={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 XE=(0,Rf.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:i,...s},l)=>(0,Rf.createElement)("svg",{ref:l,...KE,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:Uh("lucide",n),...!a&&!qE(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,Rf.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var H=(e,t)=>{let r=(0,zh.forwardRef)(({className:o,...n},a)=>(0,zh.createElement)(XE,{ref:a,iconNode:t,className:Uh(`lucide-${$E(Gw(e))}`,`lucide-${e}`,o),...n}));return r.displayName=Gw(e),r};var mj=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],If=H("align-center",mj);var gj=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],Pf=H("align-justify",gj);var hj=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Lf=H("align-left",hj);var vj=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Tf=H("align-right",vj);var xj=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ku=H("arrow-down",xj);var yj=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],kf=H("arrow-left",yj);var Cj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Mf=H("arrow-right",Cj);var wj=[["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"}]],Xu=H("arrow-up-down",wj);var Sj=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Yu=H("arrow-up",Sj);var bj=[["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"}]],Ef=H("bold",bj);var Rj=[["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"}]],al=H("calendar",Rj);var Ij=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Cr=H("check",Ij);var Pj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],la=H("chevron-down",Pj);var Lj=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Rn=H("chevron-left",Lj);var Tj=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Vr=H("chevron-right",Tj);var kj=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Af=H("chevron-up",kj);var Mj=[["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"}]],In=H("circle-alert",Mj);var Ej=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ji=H("circle-check-big",Ej);var Aj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],il=H("circle",Aj);var Dj=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Df=H("clock",Dj);var Nj=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Nf=H("code",Nj);var Oj=[["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"}]],Of=H("copy",Oj);var Fj=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Ff=H("credit-card",Fj);var _j=[["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"}]],Qu=H("crown",_j);var Vj=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],_f=H("dot",Vj);var Bj=[["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"}]],ua=H("ellipsis",Bj);var Hj=[["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"}]],Vf=H("external-link",Hj);var Uj=[["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"}]],sl=H("eye",Uj);var zj=[["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"}]],Bf=H("file-text",zj);var Gj=[["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"}]],Hf=H("file",Gj);var Wj=[["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"}]],Uf=H("git-fork",Wj);var jj=[["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"}]],ll=H("image",jj);var $j=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Zu=H("info",$j);var qj=[["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"}]],zf=H("italic",qj);var Kj=[["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"}]],Gf=H("link",Kj);var Xj=[["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"}]],Wf=H("list-ordered",Xj);var Yj=[["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"}]],jf=H("list",Yj);var Qj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ht=H("loader-circle",Qj);var Zj=[["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"}]],Ju=H("lock",Zj);var Jj=[["path",{d:"M5 12h14",key:"1ays0h"}]],$f=H("minus",Jj);var e$=[["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"}]],qf=H("music",e$);var t$=[["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"}]],ul=H("palette",t$);var r$=[["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"}]],Kf=H("phone",r$);var o$=[["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"}]],Xf=H("pipette",o$);var n$=[["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"}]],Yf=H("quote",n$);var a$=[["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"}]],Qf=H("redo",a$);var i$=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],cl=H("search",i$);var s$=[["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"}]],to=H("square-pen",s$);var l$=[["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"}]],$i=H("star",l$);var u$=[["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"}]],Zf=H("strikethrough",u$);var c$=[["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"}]],qi=H("triangle-alert",c$);var d$=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Jf=H("underline",d$);var f$=[["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"}]],ep=H("undo",f$);var p$=[["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"}]],tp=H("upload",p$);var m$=[["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"}]],rp=H("video",m$);var g$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],yo=H("x",g$);var h$=[["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"}]],ec=H("zap",h$);var aA=R(M());function YE(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=YE(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Gh(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=YE(e))&&(o&&(o+=" "),o+=t);return o}var $w="-",v$=e=>{let t=y$(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let s=i.split($w);return s[0]===""&&s.length!==1&&s.shift(),JE(s,t)||x$(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&o[i]?[...l,...o[i]]:l}}},JE=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),n=o?JE(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join($w);return t.validators.find(({validator:i})=>i(a))?.classGroupId},QE=/^\[(.+)\]$/,x$=e=>{if(QE.test(e)){let t=QE.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},y$=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return w$(Object.entries(e.classGroups),r).forEach(([a,i])=>{jw(i,o,a,t)}),o},jw=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:ZE(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(C$(n)){jw(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,i])=>{jw(i,ZE(t,a),r,o)})})},ZE=(e,t)=>{let r=e;return t.split($w).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},C$=e=>e.isThemeGetter,w$=(e,t)=>t?e.map(([r,o])=>{let n=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[r,n]}):e,S$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,n=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,o=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=o.get(a))!==void 0)return n(a,i),i},set(a,i){r.has(a)?r.set(a,i):n(a,i)}}},eA="!",b$=e=>{let{separator:t,experimentalParseClassName:r}=e,o=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&&(o||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(eA),g=p?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:i}):i},R$=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},I$=e=>({cache:S$(e.cacheSize),parseClassName:b$(e),...v$(e)}),P$=/\s+/,L$=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(P$),s="";for(let l=i.length-1;l>=0;l-=1){let u=i[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(u),g=!!p,m=o(g?f.substring(0,p):f);if(!m){if(!g){s=u+(s.length>0?" "+s:s);continue}if(m=o(f),!m){s=u+(s.length>0?" "+s:s);continue}g=!1}let x=R$(c).join(":"),h=d?x+eA:x,v=h+m;if(a.includes(v))continue;a.push(v);let y=n(m,g);for(let C=0;C<y.length;++C){let w=y[C];a.push(h+w)}s=u+(s.length>0?" "+s:s)}return s};function T$(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=tA(t))&&(o&&(o+=" "),o+=r);return o}var tA=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=tA(e[o]))&&(r&&(r+=" "),r+=t);return r};function k$(e,...t){let r,o,n,a=i;function i(l){let u=t.reduce((c,d)=>d(c),e());return r=I$(u),o=r.cache.get,n=r.cache.set,a=s,s(l)}function s(l){let u=o(l);if(u)return u;let c=L$(l,r);return n(l,c),c}return function(){return a(T$.apply(null,arguments))}}var ot=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},rA=/^\[(?:([a-z-]+):)?(.+)\]$/i,M$=/^\d+\/\d+$/,E$=new Set(["px","full","screen"]),A$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,D$=/\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$/,N$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,O$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,F$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ua=e=>tc(e)||E$.has(e)||M$.test(e),Ki=e=>rc(e,"length",W$),tc=e=>!!e&&!Number.isNaN(Number(e)),Ww=e=>rc(e,"number",tc),op=e=>!!e&&Number.isInteger(Number(e)),_$=e=>e.endsWith("%")&&tc(e.slice(0,-1)),Pe=e=>rA.test(e),Xi=e=>A$.test(e),V$=new Set(["length","size","percentage"]),B$=e=>rc(e,V$,oA),H$=e=>rc(e,"position",oA),U$=new Set(["image","url"]),z$=e=>rc(e,U$,$$),G$=e=>rc(e,"",j$),np=()=>!0,rc=(e,t,r)=>{let o=rA.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},W$=e=>D$.test(e)&&!N$.test(e),oA=()=>!1,j$=e=>O$.test(e),$$=e=>F$.test(e);var q$=()=>{let e=ot("colors"),t=ot("spacing"),r=ot("blur"),o=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"),C=ot("scale"),w=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],_=()=>["",Ua,Ki],D=()=>["auto",tc,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=()=>[tc,Pe];return{cacheSize:500,separator:":",theme:{colors:[np],spacing:[Ua,Ki],blur:["none","",Xi,Pe],brightness:ae(),borderColor:[e],borderRadius:["none","","full",Xi,Pe],borderSpacing:E(),borderWidth:_(),contrast:ae(),grayscale:A(),hueRotate:ae(),invert:A(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[_$,Ki],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:[Xi]}],"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",op,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",op,Pe]}],"grid-cols":[{"grid-cols":[np]}],"col-start-end":[{col:["auto",{span:["full",op,Pe]},Pe]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[np]}],"row-start-end":[{row:["auto",{span:[op,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:[Xi]},Xi]}],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",Xi,Ki]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ww]}],"font-family":[{font:[np]}],"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",tc,Ww]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ua,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",Ua,Ki]}],"underline-offset":[{"underline-offset":["auto",Ua,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(),H$]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",B$]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},z$]}],"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":[Ua,Pe]}],"outline-w":[{outline:[Ua,Ki]}],"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":[Ua,Ki]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xi,G$]}],"shadow-color":[{shadow:[np]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Xi,Pe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"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":[w]}],"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:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[op,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:[Ua,Ki,Ww]}],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 nA=k$(q$);function P(...e){return nA(Gh(e))}function ap(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(ap).filter(Boolean).join(" ").trim();if(aA.isValidElement(e)){let t=e.props;return ap(t.children)}return""}var Yi=R(N()),iA=GE,qw=Wh.forwardRef(({className:e,...t},r)=>(0,Yi.jsx)(WE,{ref:r,className:P("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));qw.displayName="AccordionItem";var Kw=Wh.forwardRef(({className:e,children:t,...r},o)=>(0,Yi.jsx)(jE,{className:"flex",children:(0,Yi.jsxs)(Uw,{ref:o,className:P("flex flex-1 items-center justify-between py-4 font-medium transition-all dark:text-gray-100","hover:underline hover:text-primary","[&[data-state=open]>svg]:rotate-180",e),...r,children:[t,(0,Yi.jsx)(la,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));Kw.displayName=Uw.displayName;var Xw=Wh.forwardRef(({className:e,children:t,...r},o)=>(0,Yi.jsx)(zw,{ref:o,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),...r,children:(0,Yi.jsx)("div",{className:"pb-4 pt-0",children:t})}));Xw.displayName=zw.displayName;var oc=R(M());var sA=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lA=Gh,K=(e,t)=>r=>{var o;if(t?.variants==null)return lA(e,r?.class,r?.className);let{variants:n,defaultVariants:a}=t,i=Object.keys(n).map(u=>{let c=r?.[u],d=a?.[u];if(c===null)return null;let f=sA(c)||sA(d);return n[u][f]}),s=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.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 lA(e,i,l,r?.class,r?.className)};var za=R(N()),K$=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}}),Yw=oc.forwardRef(({className:e,variant:t="default",size:r,radius:o,hideIcon:n=!1,closable:a=!1,onClose:i,children:s,...l},u)=>{let c=oc.useMemo(()=>{switch(t){case"success":return Cr;case"warning":return qi;case"error":return In;case"info":return Zu;default:return Zu}},[t]);return(0,za.jsxs)("div",{ref:u,role:"alert",className:P("moonui-theme",K$({variant:t,size:r,radius:o,withClose:a}),e),...l,children:[!n&&(0,za.jsx)(c,{className:"h-5 w-5"}),(0,za.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,za.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,za.jsx)(yo,{className:"h-4 w-4"})})]})});Yw.displayName="Alert";var Qw=oc.forwardRef(({className:e,...t},r)=>(0,za.jsx)("h5",{ref:r,className:P("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));Qw.displayName="AlertTitle";var Zw=oc.forwardRef(({className:e,...t},r)=>(0,za.jsx)("div",{ref:r,className:P("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));Zw.displayName="AlertDescription";var uA=R(M());var Jw=R(N()),cA=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"}}),eS=uA.forwardRef(({className:e,variant:t,radius:r,ratio:o=16/9,style:n,children:a,...i},s)=>(0,Jw.jsx)("div",{ref:s,className:P("moonui-theme",cA({variant:t,radius:r}),e),style:{position:"relative",paddingBottom:`${1/o*100}%`,...n},...i,children:(0,Jw.jsx)("div",{className:"absolute inset-0",children:a})}));eS.displayName="AspectRatio";var dl=R(M());var Uo=R(M(),1);var nc=R(M(),1);function nt(e){let t=nc.useRef(e);return nc.useEffect(()=>{t.current=e}),nc.useMemo(()=>(...r)=>t.current?.(...r),[])}var gA=R(mA(),1);function hA(){return(0,gA.useSyncExternalStore)(nq,()=>!0,()=>!1)}function nq(){return()=>{}}var ip=R(N(),1),rS="Avatar",[aq,vie]=Fe(rS),[iq,xA]=aq(rS),yA=Uo.forwardRef((e,t)=>{let{__scopeAvatar:r,...o}=e,[n,a]=Uo.useState("idle");return(0,ip.jsx)(iq,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:(0,ip.jsx)(q.span,{...o,ref:t})})});yA.displayName=rS;var CA="AvatarImage",wA=Uo.forwardRef((e,t)=>{let{__scopeAvatar:r,src:o,onLoadingStatusChange:n=()=>{},...a}=e,i=xA(CA,r),s=sq(o,a),l=nt(u=>{n(u),i.onImageLoadingStatusChange(u)});return Ve(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,ip.jsx)(q.img,{...a,ref:t,src:o}):null});wA.displayName=CA;var SA="AvatarFallback",bA=Uo.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:o,...n}=e,a=xA(SA,r),[i,s]=Uo.useState(o===void 0);return Uo.useEffect(()=>{if(o!==void 0){let l=window.setTimeout(()=>s(!0),o);return()=>window.clearTimeout(l)}},[o]),i&&a.imageLoadingStatus!=="loaded"?(0,ip.jsx)(q.span,{...n,ref:t}):null});bA.displayName=SA;function vA(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function sq(e,{referrerPolicy:t,crossOrigin:r}){let o=hA(),n=Uo.useRef(null),a=(()=>o?(n.current||(n.current=new window.Image),n.current):null)(),[i,s]=Uo.useState(()=>vA(a,e));return Ve(()=>{s(vA(a,e))},[a,e]),Ve(()=>{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 r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",u),a.removeEventListener("error",c)}},[a,r,t]),i}var oS=yA,nS=wA,aS=bA;var Pn=R(N()),uq=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"}}),jh=dl.forwardRef(({className:e,size:t,radius:r,variant:o,...n},a)=>(0,Pn.jsx)(oS,{ref:a,className:P("moonui-theme",uq({size:t,radius:r,variant:o}),e),...n}));jh.displayName=oS.displayName;var iS=dl.forwardRef(({className:e,...t},r)=>(0,Pn.jsx)(nS,{ref:r,className:P("moonui-theme","aspect-square h-full w-full",e),...t}));iS.displayName=nS.displayName;var $h=dl.forwardRef(({className:e,...t},r)=>(0,Pn.jsx)(aS,{ref:r,className:P("flex h-full w-full items-center justify-center bg-muted",e),...t}));$h.displayName=aS.displayName;var sS=dl.forwardRef(({className:e,max:t,children:r,overlapOffset:o=-8,...n},a)=>{let i=dl.Children.toArray(r),s=t?i.slice(0,t):i,l=t?Math.max(0,i.length-t):0;return(0,Pn.jsx)("div",{ref:a,className:P("moonui-theme","flex items-center",e),...n,children:(0,Pn.jsxs)("div",{className:"flex",children:[s.map((u,c)=>(0,Pn.jsx)("div",{className:"relative",style:{marginLeft:c===0?0:`${o}px`,zIndex:s.length-c},children:u},c)),l>0&&(0,Pn.jsx)("div",{className:"relative z-0",style:{marginLeft:`${o}px`},children:(0,Pn.jsx)(jh,{variant:"border",children:(0,Pn.jsxs)($h,{children:["+",l]})})})]})})});sS.displayName="AvatarGroup";var RA=R(M());var wr=R(N()),lS=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"}}),Br=RA.forwardRef(({className:e,variant:t,size:r,radius:o,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,wr.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,wr.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,wr.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,wr.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,wr.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,wr.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,wr.jsxs)("div",{ref:g,className:P("moonui-theme",lS({variant:t,size:r,radius:o}),d&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...p,children:[n&&(0,wr.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,wr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:m}),(0,wr.jsx)("span",{className:"inline-flex items-center",children:x}),c&&(0,wr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:c}),i&&s&&(0,wr.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||(ap(x)?`Remove ${ap(x)}`:"Remove badge"),children:(0,wr.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,wr.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"})})})]})});Br.displayName="Badge";var zo=R(M());var lr=R(N()),IA=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"}}),PA=zo.createContext(void 0),uS=zo.forwardRef(({className:e,variant:t,size:r,separator:o,showHomeIcon:n,...a},i)=>(0,lr.jsx)(PA.Provider,{value:o,children:(0,lr.jsx)("nav",{ref:i,className:P("moonui-theme",IA({variant:t,size:r}),e),"aria-label":"breadcrumb",...a})}));uS.displayName="Breadcrumb";var cS=zo.forwardRef(({className:e,collapsed:t,collapsedWidth:r=3,...o},n)=>{let a=zo.Children.toArray(o.children).filter(Boolean),i=a.length;if(t&&i>r){let s=a[0],l=a.slice(-2);return(0,lr.jsxs)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o,children:[s,(0,lr.jsx)(qh,{}),l]})}return(0,lr.jsx)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o})});cS.displayName="BreadcrumbList";var dS=zo.forwardRef(({className:e,isCurrent:t,href:r,asChild:o=!1,children:n,...a},i)=>{let s=o?t1:r?"a":"span",l=!o&&r?{href:r}:{};return(0,lr.jsx)("li",{ref:i,className:P("moonui-theme","inline-flex items-center gap-1.5",e),...a,children:(0,lr.jsx)(s,{"aria-current":t?"page":void 0,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"),...l,children:n})})});dS.displayName="BreadcrumbItem";var fS=({children:e,className:t,icon:r,...o})=>{let n=zo.useContext(PA);return(0,lr.jsx)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","text-muted-foreground opacity-70",t),...o,children:e||r||n||(0,lr.jsx)(Vr,{className:"h-3.5 w-3.5"})})};fS.displayName="BreadcrumbSeparator";var qh=({className:e,icon:t,...r})=>(0,lr.jsxs)("span",{role:"presentation",className:P("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...r,children:[(0,lr.jsx)("span",{"aria-hidden":"true",className:"flex items-center",children:t||(0,lr.jsx)(ua,{className:"h-4 w-4"})}),(0,lr.jsx)("span",{className:"sr-only",children:"More pages"})]});qh.displayName="BreadcrumbEllipsis";var pS=zo.forwardRef(({className:e,href:t,...r},o)=>(0,lr.jsx)("a",{ref:o,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),...r}));pS.displayName="BreadcrumbLink";var mS=zo.forwardRef(({className:e,...t},r)=>(0,lr.jsx)("span",{ref:r,className:P("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));mS.displayName="BreadcrumbPage";var LA=R(M());var Kh=R(N()),sp=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}}),Ee=LA.forwardRef(({className:e,variant:t,size:r,rounded:o,fullWidth:n,asChild:a=!1,loading:i=!1,leftIcon:s,rightIcon:l,children:u,disabled:c,...d},f)=>(0,Kh.jsxs)("button",{className:P("moonui-theme",sp({variant:t,size:r,rounded:o,fullWidth:n,className:e})),ref:f,disabled:c||i,"aria-busy":i||void 0,"data-loading":i?"":void 0,...d,children:[i&&(0,Kh.jsx)(Ht,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,u,!i&&l]}));Ee.displayName="Button";var Dl=R(M());var jp=R(N(),1),pa=R(M(),1);var TA=R(M(),1),ic=(0,TA.createContext)({});var kA=R(M(),1);function ca(e){let t=(0,kA.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Xh=R(M(),1);var sc=typeof window<"u";var lc=sc?Xh.useLayoutEffect:Xh.useEffect;var KS=R(N(),1),OD=R(M(),1),Gp=R(M(),1);var MA=R(M(),1),Qi=(0,MA.createContext)(null);var DD=R(N(),1);function fl(e,t){e.indexOf(t)===-1&&e.push(t)}function Ln(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var Xt=(e,t,r)=>r>t?t:r<e?e:r;var Ga=()=>{},ur=()=>{};var Sr={};var lp=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function up(e){return typeof e=="object"&&e!==null}var cp=e=>/^0[^.\s]+$/u.test(e);function pl(e){let t;return()=>(t===void 0&&(t=e()),t)}var ht=e=>e;var cq=(e,t)=>r=>t(e(r)),Tn=(...e)=>e.reduce(cq);var Go=(e,t,r)=>{let o=t-e;return o===0?1:(r-e)/o};var Wa=class{constructor(){this.subscriptions=[]}add(t){return fl(this.subscriptions,t),()=>Ln(this.subscriptions,t)}notify(t,r,o){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](t,r,o);else for(let a=0;a<n;a++){let i=this.subscriptions[a];i&&i(t,r,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var Pt=e=>e*1e3,Ut=e=>e/1e3;function dp(e,t){return t?e*(1e3/t):0}var EA=(e,t,r)=>{let o=t-e;return((r-e)%o+o)%o+e};var AA=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,dq=1e-7,fq=12;function pq(e,t,r,o,n){let a,i,s=0;do i=t+(r-t)/2,a=AA(i,o,n)-e,a>0?r=i:t=i;while(Math.abs(a)>dq&&++s<fq);return i}function Zi(e,t,r,o){if(e===t&&r===o)return ht;let n=a=>pq(a,0,1,e,r);return a=>a===0||a===1?a:AA(n(a),t,o)}var Yh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Qh=e=>t=>1-e(1-t);var Zh=Zi(.33,1.53,.69,.99),uc=Qh(Zh),fp=Yh(uc);var pp=e=>(e*=2)<1?.5*uc(e):.5*(2-Math.pow(2,-10*(e-1)));var mp=e=>1-Math.sin(Math.acos(e)),gp=Qh(mp),hp=Yh(mp);var gS=Zi(.42,0,1,1),hS=Zi(0,0,.58,1),vp=Zi(.42,0,.58,1);var xp=e=>Array.isArray(e)&&typeof e[0]!="number";function yp(e,t){return xp(e)?e[EA(0,e.length,t)]:e}var Cp=e=>Array.isArray(e)&&typeof e[0]=="number";var DA={linear:ht,easeIn:gS,easeInOut:vp,easeOut:hS,circIn:mp,circInOut:hp,circOut:gp,backIn:uc,backInOut:fp,backOut:Zh,anticipate:pp},mq=e=>typeof e=="string",Jh=e=>{if(Cp(e)){ur(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,o,n]=e;return Zi(t,r,o,n)}else if(mq(e))return ur(DA[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),DA[e];return e};var wp=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var ro={value:null,addProjectionMetrics:null};function NA(e,t){let r=new Set,o=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?r:o;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{o.delete(d),i.delete(d)},process:d=>{if(s=d,n){a=!0;return}n=!0,[r,o]=[o,r],r.forEach(u),t&&ro.value&&ro.value.frameloop[t].push(l),l=0,r.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}var gq=40;function ev(e,t){let r=!1,o=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=wp.reduce((y,C)=>(y[C]=NA(a,t?C:void 0),y),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:g}=i,m=()=>{let y=Sr.useManualTiming?n.timestamp:performance.now();r=!1,Sr.useManualTiming||(n.delta=o?1e3/60:Math.max(Math.min(y-n.timestamp,gq),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,r&&t&&(o=!1,e(m))},x=()=>{r=!0,o=!0,n.isProcessing||e(m)};return{schedule:wp.reduce((y,C)=>{let w=i[C];return y[C]=(b,S=!1,I=!1)=>(r||x(),w.schedule(b,S,I)),y},{}),cancel:y=>{for(let C=0;C<wp.length;C++)i[wp[C]].cancel(y)},state:n,steps:i}}var{schedule:Le,cancel:br,state:Ct,steps:Sp}=ev(typeof requestAnimationFrame<"u"?requestAnimationFrame:ht,!0);var tv;function hq(){tv=void 0}var wt={now:()=>(tv===void 0&&wt.set(Ct.isProcessing||Sr.useManualTiming?Ct.timestamp:performance.now()),tv),set:e=>{tv=e,queueMicrotask(hq)}};var kn={layout:0,mainThread:0,waapi:0};var OA=e=>t=>typeof t=="string"&&t.startsWith(e),ml=OA("--"),vq=OA("var(--"),gl=e=>vq(e)?xq.test(e.split("/*")[0].trim()):!1,xq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var da={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ja={...da,transform:e=>Xt(0,1,e)},bp={...da,default:1};var Ji=e=>Math.round(e*1e5)/1e5;var cc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function FA(e){return e==null}var _A=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var dc=(e,t)=>r=>!!(typeof r=="string"&&_A.test(r)&&r.startsWith(e)||t&&!FA(r)&&Object.prototype.hasOwnProperty.call(r,t)),rv=(e,t,r)=>o=>{if(typeof o!="string")return o;let[n,a,i,s]=o.match(cc);return{[e]:parseFloat(n),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var yq=e=>Xt(0,255,e),vS={...da,transform:e=>Math.round(yq(e))},fa={test:dc("rgb","red"),parse:rv("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:o=1})=>"rgba("+vS.transform(e)+", "+vS.transform(t)+", "+vS.transform(r)+", "+Ji(ja.transform(o))+")"};function Cq(e){let t="",r="",o="",n="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),o=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),o=e.substring(3,4),n=e.substring(4,5),t+=t,r+=r,o+=o,n+=n),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(o,16),alpha:n?parseInt(n,16)/255:1}}var Rp={test:dc("#"),parse:Cq,transform:fa.transform};var Ip=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Mn=Ip("deg"),Rr=Ip("%"),ue=Ip("px"),xS=Ip("vh"),yS=Ip("vw"),ov=(()=>({...Rr,parse:e=>Rr.parse(e)/100,transform:e=>Rr.transform(e*100)}))();var es={test:dc("hsl","hue"),parse:rv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+Rr.transform(Ji(t))+", "+Rr.transform(Ji(r))+", "+Ji(ja.transform(o))+")"};var ct={test:e=>fa.test(e)||Rp.test(e)||es.test(e),parse:e=>fa.test(e)?fa.parse(e):es.test(e)?es.parse(e):Rp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fa.transform(e):es.transform(e),getAnimatableNone:e=>{let t=ct.parse(e);return t.alpha=0,ct.transform(t)}};var VA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function wq(e){return isNaN(e)&&typeof e=="string"&&(e.match(cc)?.length||0)+(e.match(VA)?.length||0)>0}var HA="number",UA="color",Sq="var",bq="var(",BA="${}",Rq=/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 ts(e){let t=e.toString(),r=[],o={color:[],number:[],var:[]},n=[],a=0,s=t.replace(Rq,l=>(ct.test(l)?(o.color.push(a),n.push(UA),r.push(ct.parse(l))):l.startsWith(bq)?(o.var.push(a),n.push(Sq),r.push(l)):(o.number.push(a),n.push(HA),r.push(parseFloat(l))),++a,BA)).split(BA);return{values:r,split:s,indexes:o,types:n}}function zA(e){return ts(e).values}function GA(e){let{split:t,types:r}=ts(e),o=t.length;return n=>{let a="";for(let i=0;i<o;i++)if(a+=t[i],n[i]!==void 0){let s=r[i];s===HA?a+=Ji(n[i]):s===UA?a+=ct.transform(n[i]):a+=n[i]}return a}}var Iq=e=>typeof e=="number"?0:ct.test(e)?ct.getAnimatableNone(e):e;function Pq(e){let t=zA(e);return GA(e)(t.map(Iq))}var Ir={test:wq,parse:zA,createTransformer:GA,getAnimatableNone:Pq};function CS(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function WA({hue:e,saturation:t,lightness:r,alpha:o}){e/=360,t/=100,r/=100;let n=0,a=0,i=0;if(!t)n=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=CS(l,s,e+1/3),a=CS(l,s,e),i=CS(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:o}}function fc(e,t){return r=>r>0?t:e}var ke=(e,t,r)=>e+(t-e)*r;var wS=(e,t,r)=>{let o=e*e,n=r*(t*t-o)+o;return n<0?0:Math.sqrt(n)},Lq=[Rp,fa,es],Tq=e=>Lq.find(t=>t.test(e));function jA(e){let t=Tq(e);if(Ga(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===es&&(r=WA(r)),r}var SS=(e,t)=>{let r=jA(e),o=jA(t);if(!r||!o)return fc(e,t);let n={...r};return a=>(n.red=wS(r.red,o.red,a),n.green=wS(r.green,o.green,a),n.blue=wS(r.blue,o.blue,a),n.alpha=ke(r.alpha,o.alpha,a),fa.transform(n))};var nv=new Set(["none","hidden"]);function $A(e,t){return nv.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function kq(e,t){return r=>ke(e,t,r)}function av(e){return typeof e=="number"?kq:typeof e=="string"?gl(e)?fc:ct.test(e)?SS:Aq:Array.isArray(e)?qA:typeof e=="object"?ct.test(e)?SS:Mq:fc}function qA(e,t){let r=[...e],o=r.length,n=e.map((a,i)=>av(a)(a,t[i]));return a=>{for(let i=0;i<o;i++)r[i]=n[i](a);return r}}function Mq(e,t){let r={...e,...t},o={};for(let n in r)e[n]!==void 0&&t[n]!==void 0&&(o[n]=av(e[n])(e[n],t[n]));return n=>{for(let a in o)r[a]=o[a](n);return r}}function Eq(e,t){let r=[],o={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let a=t.types[n],i=e.indexes[a][o[a]],s=e.values[i]??0;r[n]=s,o[a]++}return r}var Aq=(e,t)=>{let r=Ir.createTransformer(t),o=ts(e),n=ts(t);return o.indexes.var.length===n.indexes.var.length&&o.indexes.color.length===n.indexes.color.length&&o.indexes.number.length>=n.indexes.number.length?nv.has(e)&&!n.values.length||nv.has(t)&&!o.values.length?$A(e,t):Tn(qA(Eq(o,n),n.values),r):(Ga(!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"),fc(e,t))};function iv(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?ke(e,t,r):av(e)(e,t)}var KA=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>Le.update(t,r),stop:()=>br(t),now:()=>Ct.isProcessing?Ct.timestamp:wt.now()}};var sv=(e,t,r=10)=>{let o="",n=Math.max(Math.round(t/r),2);for(let a=0;a<n;a++)o+=Math.round(e(a/(n-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`};function pc(e){let t=0,r=50,o=e.next(t);for(;!o.done&&t<2e4;)t+=r,o=e.next(t);return t>=2e4?1/0:t}function Pp(e,t=100,r){let o=r({...e,keyframes:[0,t]}),n=Math.min(pc(o),2e4);return{type:"keyframes",ease:a=>o.next(n*a).value/t,duration:Ut(n)}}var Dq=5;function lv(e,t,r){let o=Math.max(t-Dq,0);return dp(r-e(o),t-o)}var at={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 RS=.001;function XA({duration:e=at.duration,bounce:t=at.bounce,velocity:r=at.velocity,mass:o=at.mass}){let n,a;Ga(e<=Pt(at.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Xt(at.minDamping,at.maxDamping,i),e=Xt(at.minDuration,at.maxDuration,Ut(e)),i<1?(n=u=>{let c=u*i,d=c*e,f=c-r,p=uv(u,i),g=Math.exp(-d);return RS-f/p*g},a=u=>{let d=u*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(u,2)*e,g=Math.exp(-d),m=uv(Math.pow(u,2),i);return(-n(u)+RS>0?-1:1)*((f-p)*g)/m}):(n=u=>{let c=Math.exp(-u*e),d=(u-r)*e+1;return-RS+c*d},a=u=>{let c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});let s=5/e,l=Oq(n,a,s);if(e=Pt(e),isNaN(l))return{stiffness:at.stiffness,damping:at.damping,duration:e};{let u=Math.pow(l,2)*o;return{stiffness:u,damping:i*2*Math.sqrt(o*u),duration:e}}}var Nq=12;function Oq(e,t,r){let o=r;for(let n=1;n<Nq;n++)o=o-e(o)/t(o);return o}function uv(e,t){return e*Math.sqrt(1-t*t)}var Fq=["duration","bounce"],_q=["stiffness","damping","mass"];function YA(e,t){return t.some(r=>e[r]!==void 0)}function Vq(e){let t={velocity:at.velocity,stiffness:at.stiffness,damping:at.damping,mass:at.mass,isResolvedFromDuration:!1,...e};if(!YA(e,_q)&&YA(e,Fq))if(e.visualDuration){let r=e.visualDuration,o=2*Math.PI/(r*1.2),n=o*o,a=2*Xt(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:at.mass,stiffness:n,damping:a}}else{let r=XA(e);t={...t,...r,mass:at.mass},t.isResolvedFromDuration=!0}return t}function $a(e=at.visualDuration,t=at.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:o,restDelta:n}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=Vq({...r,velocity:-Ut(r.velocity||0)}),g=f||0,m=u/(2*Math.sqrt(l*c)),x=i-a,h=Ut(Math.sqrt(l/c)),v=Math.abs(x)<5;o||(o=v?at.restSpeed.granular:at.restSpeed.default),n||(n=v?at.restDelta.granular:at.restDelta.default);let y;if(m<1){let w=uv(h,m);y=b=>{let S=Math.exp(-m*h*b);return i-S*((g+m*h*x)/w*Math.sin(w*b)+x*Math.cos(w*b))}}else if(m===1)y=w=>i-Math.exp(-h*w)*(x+(g+h*x)*w);else{let w=h*Math.sqrt(m*m-1);y=b=>{let S=Math.exp(-m*h*b),I=Math.min(w*b,300);return i-S*((g+m*h*x)*Math.sinh(I)+w*x*Math.cosh(I))/w}}let C={calculatedDuration:p&&d||null,next:w=>{let b=y(w);if(p)s.done=w>=d;else{let S=w===0?g:0;m<1&&(S=w===0?Pt(g):lv(y,w,b));let I=Math.abs(S)<=o,L=Math.abs(i-b)<=n;s.done=I&&L}return s.value=s.done?i:b,s},toString:()=>{let w=Math.min(pc(C),2e4),b=sv(S=>C.next(w*S).value,w,30);return w+"ms "+b},toTransition:()=>{}};return C}$a.applyToOptions=e=>{let t=Pp(e,100,$a);return e.ease=t.ease,e.duration=Pt(t.duration),e.type="keyframes",e};function Lp({keyframes:e,velocity:t=0,power:r=.8,timeConstant:o=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=r*t,x=d+m,h=i===void 0?x:i(x);h!==x&&(m=h-d);let v=I=>-m*Math.exp(-I/o),y=I=>h+v(I),C=I=>{let L=v(I),T=y(I);f.done=Math.abs(L)<=u,f.value=f.done?h:T},w,b,S=I=>{p(f.value)&&(w=I,b=$a({keyframes:[f.value,g(f.value)],velocity:lv(y,I,f.value),damping:n,stiffness:a,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:I=>{let L=!1;return!b&&w===void 0&&(L=!0,C(I),S(I)),w!==void 0&&I>=w?b.next(I-w):(!L&&C(I),f)}}}function Bq(e,t,r){let o=[],n=r||Sr.mix||iv,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]||ht:t;s=Tn(l,s)}o.push(s)}return o}function cv(e,t,{clamp:r=!0,ease:o,mixer:n}={}){let a=e.length;if(ur(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=Bq(t,o,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=Go(e[d],e[d+1],c);return s[d](f)};return r?c=>u(Xt(e[0],e[a-1],c)):u}function Tp(e,t){let r=e[e.length-1];for(let o=1;o<=t;o++){let n=Go(0,t,o);e.push(ke(r,1,n))}}function kp(e){let t=[0];return Tp(t,e.length-1),t}function QA(e,t){return e.map(r=>r*t)}function Hq(e,t){return e.map(()=>t||vp).splice(0,e.length-1)}function hl({duration:e=300,keyframes:t,times:r,ease:o="easeInOut"}){let n=xp(o)?o.map(Jh):Jh(o),a={done:!1,value:t[0]},i=QA(r&&r.length===t.length?r:kp(t),e),s=cv(i,t,{ease:Array.isArray(n)?n:Hq(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var Uq=e=>e!==null;function mc(e,{repeat:t,repeatType:r="loop"},o,n=1){let a=e.filter(Uq),s=n<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||o===void 0?a[s]:o}var zq={decay:Lp,inertia:Lp,tween:hl,keyframes:hl,spring:$a};function dv(e){typeof e.type=="string"&&(e.type=zq[e.type])}var rs=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var Gq=e=>e/100,qa=class extends rs{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:r}=this.options;r&&r.updatedAt!==wt.now()&&this.tick(wt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},kn.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;dv(t);let{type:r=hl,repeat:o=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||hl;l!==hl&&typeof s[0]!="number"&&(this.mixKeyframes=Tn(Gq,iv(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=pc(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(o+1)-n,this.generator=u}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:o,totalDuration:n,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return o.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)),r?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,C=o;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"&&(C=i)),y=Xt(0,1,T)*s}let w=v?{done:!1,value:c[0]}:C.next(y);a&&(w.value=a(w.value));let{done:b}=w;!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!==Lp&&(w.value=mc(c,this.options,x,this.speed)),m&&m(w.value),S&&this.finish(),w}then(t,r){return this.finished.then(t,r)}get duration(){return Ut(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ut(t)}get time(){return Ut(this.currentTime)}set time(t){t=Pt(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(wt.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Ut(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=KA,startTime:r}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),this.options.onPlay?.();let o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=r??o),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(wt.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,kn.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 ZA(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var vl=e=>e*180/Math.PI,IS=e=>{let t=vl(Math.atan2(e[1],e[0]));return PS(t)},Wq={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:IS,rotateZ:IS,skewX:e=>vl(Math.atan(e[1])),skewY:e=>vl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},PS=e=>(e=e%360,e<0&&(e+=360),e),JA=IS,eD=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),tD=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),jq={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:eD,scaleY:tD,scale:e=>(eD(e)+tD(e))/2,rotateX:e=>PS(vl(Math.atan2(e[6],e[5]))),rotateY:e=>PS(vl(Math.atan2(-e[2],e[0]))),rotateZ:JA,rotate:JA,skewX:e=>vl(Math.atan(e[4])),skewY:e=>vl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Mp(e){return e.includes("scale")?1:0}function Ep(e,t){if(!e||e==="none")return Mp(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,n;if(r)o=jq,n=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Wq,n=s}if(!n)return Mp(t);let a=o[t],i=n[1].split(",").map($q);return typeof a=="function"?a(i):i[a]}var LS=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return Ep(r,t)};function $q(e){return parseFloat(e.trim())}var En=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Co=(()=>new Set(En))();var TS=e=>e===da||e===ue,qq=new Set(["x","y","z"]),Kq=En.filter(e=>!qq.has(e));function rD(e){let t=[];return Kq.forEach(r=>{let o=e.getValue(r);o!==void 0&&(t.push([r,o.get()]),o.set(r.startsWith("scale")?1:0))}),t}var os={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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})=>Ep(t,"x"),y:(e,{transform:t})=>Ep(t,"y")};os.translateX=os.x;os.translateY=os.y;var xl=new Set,kS=!1,MS=!1,ES=!1;function oD(){if(MS){let e=Array.from(xl).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),r=new Map;t.forEach(o=>{let n=rD(o);n.length&&(r.set(o,n),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();let n=r.get(o);n&&n.forEach(([a,i])=>{o.getValue(a)?.set(i)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}MS=!1,kS=!1,xl.forEach(e=>e.complete(ES)),xl.clear()}function nD(){xl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(MS=!0)})}function AS(){ES=!0,nD(),oD(),ES=!1}var Ka=class{constructor(t,r,o,n,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=o,this.motionValue=n,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(xl.add(this),kS||(kS=!0,Le.read(nD),Le.resolveKeyframes(oD))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:o,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(o&&r){let s=o.readValue(r,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),n&&a===void 0&&n.set(t[0])}ZA(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),xl.delete(this)}cancel(){this.state==="scheduled"&&(xl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var aD=e=>e.startsWith("--");function iD(e,t,r){aD(t)?e.style.setProperty(t,r):e.style[t]=r}var sD=pl(()=>window.ScrollTimeline!==void 0);var lD={};function uD(e,t){let r=pl(e);return()=>lD[t]??r()}var fv=uD(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var yl=([e,t,r,o])=>`cubic-bezier(${e}, ${t}, ${r}, ${o})`;var DS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yl([0,.65,.55,1]),circOut:yl([.55,0,1,.45]),backIn:yl([.31,.01,.66,-.59]),backOut:yl([.33,1.53,.69,.99])};function NS(e,t){if(e)return typeof e=="function"?fv()?sv(e,t):"ease-out":Cp(e)?yl(e):Array.isArray(e)?e.map(r=>NS(r,t)||DS.easeOut):DS[e]}function cD(e,t,r,{delay:o=0,duration:n=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){let c={[t]:r};l&&(c.offset=l);let d=NS(s,n);Array.isArray(d)&&(c.easing=d),ro.value&&kn.waapi++;let f={delay:o,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 ro.value&&p.finished.finally(()=>{kn.waapi--}),p}function Cl(e){return typeof e=="function"&&"applyToOptions"in e}function dD({type:e,...t}){return Cl(e)&&fv()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var pv=class extends rs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:r,name:o,keyframes:n,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,ur(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=dD(t);this.animation=cD(r,o,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=mc(n,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):iD(r,o,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 Ut(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ut(t)}get time(){return Ut(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Pt(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:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&sD()?(this.animation.timeline=t,ht):r(this)}};var fD={anticipate:pp,backInOut:fp,circInOut:hp};function Xq(e){return e in fD}function pD(e){typeof e.ease=="string"&&Xq(e.ease)&&(e.ease=fD[e.ease])}var mD=10,mv=class extends pv{constructor(t){pD(t),dv(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:o,onComplete:n,element:a,...i}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let s=new qa({...i,autoplay:!1}),l=Pt(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-mD).value,s.sample(l).value,mD),s.stop()}};var OS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ir.test(e)||e==="0")&&!e.startsWith("url("));function Yq(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function gD(e,t,r,o){let n=e[0];if(n===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=OS(n,t),s=OS(a,t);return Ga(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:Yq(e)||(r==="spring"||Cl(r))&&o}function gc(e){e.duration=0,e.type="keyframes"}var Qq=new Set(["opacity","clipPath","filter","transform"]),Zq=pl(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hD(e){let{motionValue:t,name:r,repeatDelay:o,repeatType:n,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Zq()&&r&&Qq.has(r)&&(r!=="transform"||!u)&&!l&&!o&&n!=="mirror"&&a!==0&&i!=="inertia"}var Jq=40,Ap=class extends rs{constructor({autoplay:t=!0,delay:r=0,type:o="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=wt.now();let f={autoplay:t,delay:r,type:o,repeat:n,repeatDelay:a,repeatType:i,name:l,motionValue:u,element:c,...d},p=c?.KeyframeResolver||Ka;this.keyframeResolver=new p(s,(g,m,x)=>this.onKeyframesResolved(g,m,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,o,n){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:c}=o;this.resolvedAt=wt.now(),gD(t,a,i,s)||((Sr.instantAnimations||!l)&&c?.(mc(t,o,r)),t[0]=t[t.length-1],gc(o),o.repeat=0);let f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>Jq?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:t},p=!u&&hD(f)?new mv({...f,element:f.motionValue.owner.current}):new qa(f);p.finished.then(()=>this.notifyFinished()).catch(ht),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,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),AS()),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 gv=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,r){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=r}attachTimeline(t){let r=this.animations.map(o=>o.attachTimeline(t));return()=>{r.forEach((o,n)=>{o&&o(),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 vD(this.animations,"duration")}get iterationDuration(){return vD(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};function vD(e,t){let r=0;for(let o=0;o<e.length;o++){let n=e[o][t];n!==null&&n>r&&(r=n)}return r}var Dp=class extends gv{then(t,r){return this.finished.finally(t).then(()=>{})}};var e6=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function t6(e){let t=e6.exec(e);if(!t)return[,];let[,r,o,n]=t;return[`--${r??o}`,n]}var r6=4;function FS(e,t,r=1){ur(r<=r6,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[o,n]=t6(e);if(!o)return;let a=window.getComputedStyle(t).getPropertyValue(o);if(a){let i=a.trim();return lp(i)?parseFloat(i):i}return gl(n)?FS(n,t,r+1):n}function wl(e,t){return e?.[t]??e?.default??e}var Np=new Set(["width","height","top","left","right","bottom",...En]);var xD={test:e=>e==="auto",parse:e=>e};var hv=e=>t=>t.test(e);var _S=[da,ue,Rr,Mn,yS,xS,xD],VS=e=>_S.find(hv(e));function yD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||cp(e):!0}var o6=new Set(["brightness","contrast","saturate","opacity"]);function n6(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[o]=r.match(cc)||[];if(!o)return e;let n=r.replace(o,""),a=o6.has(t)?1:0;return o!==r&&(a*=100),t+"("+a+n+")"}var a6=/\b([a-z-]*)\(.*?\)/gu,Op={...Ir,getAnimatableNone:e=>{let t=e.match(a6);return t?t.map(n6).join(" "):e}};var BS={...da,transform:Math.round};var CD={rotate:Mn,rotateX:Mn,rotateY:Mn,rotateZ:Mn,scale:bp,scaleX:bp,scaleY:bp,scaleZ:bp,skew:Mn,skewX:Mn,skewY:Mn,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:ja,originX:ov,originY:ov,originZ:ue};var Sl={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,...CD,zIndex:BS,fillOpacity:ja,strokeOpacity:ja,numOctaves:BS};var wD={...Sl,color:ct,backgroundColor:ct,outlineColor:ct,fill:ct,stroke:ct,borderColor:ct,borderTopColor:ct,borderRightColor:ct,borderBottomColor:ct,borderLeftColor:ct,filter:Op,WebkitFilter:Op},Fp=e=>wD[e];function _p(e,t){let r=Fp(e);return r!==Op&&(r=Ir),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var i6=new Set(["auto","none","0"]);function SD(e,t,r){let o=0,n;for(;o<e.length&&!n;){let a=e[o];typeof a=="string"&&!i6.has(a)&&ts(a).values.length&&(n=e[o]),o++}if(n&&r)for(let a of t)e[a]=_p(r,n)}var Vp=class extends Ka{constructor(t,r,o,n,a){super(t,r,o,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:o}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),gl(u))){let c=FS(u,r.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Np.has(o)||t.length!==2)return;let[n,a]=t,i=VS(n),s=VS(a);if(i!==s)if(TS(i)&&TS(s))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else os[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,o=[];for(let n=0;n<t.length;n++)(t[n]===null||yD(t[n]))&&o.push(n);o.length&&SD(t,o,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=os[o](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let n=r[r.length-1];n!==void 0&&t.getValue(o,n).jump(n,!1)}measureEndState(){let{element:t,name:r,unresolvedKeyframes:o}=this;if(!t||!t.current)return;let n=t.getValue(r);n&&n.jump(this.measuredOrigin,!1);let a=o.length-1,i=o[a];o[a]=os[r](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 Bp(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let n=r?.[e]??o.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}var Hp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Up(e){return up(e)&&"offsetHeight"in e}var bD=30,s6=e=>!isNaN(parseFloat(e)),bl={current:void 0},vv=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{let n=wt.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),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=r.owner}setCurrent(t){this.current=t,this.updatedAt=wt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=s6(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Wa);let o=this.events[t].add(r);return t==="change"?()=>{o(),Le.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,o){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&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 bl.current&&bl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=wt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bD)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,bD);return dp(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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 oo(e,t){return new vv(e,t)}var{schedule:Rl,cancel:l6}=ev(queueMicrotask,!1);var Wo={x:!1,y:!1};function xv(){return Wo.x||Wo.y}function HS(e){return e==="x"||e==="y"?Wo[e]?null:(Wo[e]=!0,()=>{Wo[e]=!1}):Wo.x||Wo.y?null:(Wo.x=Wo.y=!0,()=>{Wo.x=Wo.y=!1})}function yv(e,t){let r=Bp(e),o=new AbortController,n={passive:!0,...t,signal:o.signal};return[r,n,()=>o.abort()]}function RD(e){return!(e.pointerType==="touch"||xv())}function US(e,t,r={}){let[o,n,a]=yv(e,r),i=s=>{if(!RD(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{RD(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,n)};return o.forEach(s=>{s.addEventListener("pointerenter",i,n)}),a}var zS=(e,t)=>t?e===t?!0:zS(e,t.parentElement):!1;var Il=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var u6=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ID(e){return u6.has(e.tagName)||e.tabIndex!==-1}var hc=new WeakSet;function PD(e){return t=>{t.key==="Enter"&&e(t)}}function GS(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var LD=(e,t)=>{let r=e.currentTarget;if(!r)return;let o=PD(()=>{if(hc.has(r))return;GS(r,"down");let n=PD(()=>{GS(r,"up")}),a=()=>GS(r,"cancel");r.addEventListener("keyup",n,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",o,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",o),t)};function TD(e){return Il(e)&&!xv()}function WS(e,t,r={}){let[o,n,a]=yv(e,r),i=s=>{let l=s.currentTarget;if(!TD(s))return;hc.add(l);let u=t(l,s),c=(p,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),hc.has(l)&&hc.delete(l),TD(p)&&typeof u=="function"&&u(p,{success:g})},d=p=>{c(p,l===window||l===document||r.useGlobalTarget||zS(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",d,n),window.addEventListener("pointercancel",f,n)};return o.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,n),Up(s)&&(s.addEventListener("focus",u=>LD(u,n)),!ID(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function Pl(e){return up(e)&&"ownerSVGElement"in e}function zp(e){return Pl(e)&&e.tagName==="svg"}function jS(...e){let t=!Array.isArray(e[0]),r=t?0:-1,o=e[0+r],n=e[1+r],a=e[2+r],i=e[3+r],s=cv(n,a,i);return t?s(o):s}var Be=e=>!!(e&&e.getVelocity);var c6=[..._S,ct,Ir],$S=e=>c6.find(hv(e));var Cv=R(M(),1),Xa=R(M(),1);var kD=R(M(),1),ns=(0,kD.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var ED=R(M(),1);function MD(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function d6(...e){return t=>{let r=!1,o=e.map(n=>{let a=MD(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():MD(e[n],null)}}}}function AD(...e){return ED.useCallback(d6(...e),e)}var qS=class extends Cv.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let o=r.offsetParent,n=Up(o)&&o.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=n-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function ND({children:e,isPresent:t,anchorX:r,root:o}){let n=(0,Xa.useId)(),a=(0,Xa.useRef)(null),i=(0,Xa.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,Xa.useContext)(ns),l=AD(a,e?.ref);return(0,Xa.useInsertionEffect)(()=>{let{width:u,height:c,top:d,left:f,right:p}=i.current;if(t||!a.current||!u||!c)return;let g=r==="left"?`left: ${f}`:`right: ${p}`;a.current.dataset.motionPopId=n;let m=document.createElement("style");s&&(m.nonce=s);let x=o??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,12 +16,12 @@ 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,kD.jsx)($S,{isPresent:t,childRef:a,sizeRef:i,children:yv.cloneElement(e,{ref:l})})}var AD=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=ca(i6),c=(0,Up.useId)(),d=!0,f=(0,Up.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:r,custom:n,onExitComplete:p=>{u.set(p,!0);for(let g of u.values())if(!g)return;o&&o()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[r,u,o]);return a&&d&&(f={...f}),(0,Up.useMemo)(()=>{u.forEach((p,g)=>u.set(g,!1))},[r]),ED.useEffect(()=>{!r&&!u.size&&o&&o()},[r]),i==="popLayout"&&(e=(0,qS.jsx)(MD,{isPresent:r,anchorX:s,root:l,children:e})),(0,qS.jsx)(Yi.Provider,{value:f,children:e})};function i6(){return new Map}var ns=R(M(),1);function wv(e=!0){let t=(0,ns.useContext)(Yi);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:o,register:n}=t,a=(0,ns.useId)();(0,ns.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,ns.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!r&&o?[!1,i]:[!0]}var Cv=R(M(),1),zp=e=>e.key||"";function KS(e){let t=[];return Cv.Children.forEach(e,r=>{(0,Cv.isValidElement)(r)&&t.push(r)}),t}var Ka=({children:e,custom:t,initial:r=!0,onExitComplete:o,presenceAffectsLayout:n=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",root:l})=>{let[u,c]=wv(i),d=(0,pa.useMemo)(()=>KS(e),[e]),f=i&&!u?[]:d.map(zp),p=(0,pa.useRef)(!0),g=(0,pa.useRef)(d),m=ca(()=>new Map),[x,h]=(0,pa.useState)(d),[v,y]=(0,pa.useState)(d);ic(()=>{p.current=!1,g.current=d;for(let b=0;b<v.length;b++){let S=zp(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=zp(I);f.includes(L)||(b.splice(S,0,I),w.push(I))}return a==="wait"&&w.length&&(b=w),y(KS(b)),h(d),null}let{forceRender:C}=(0,pa.useContext)(nc);return(0,Gp.jsx)(Gp.Fragment,{children:v.map(b=>{let S=zp(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?.(),o&&o())};return(0,Gp.jsx)(AD,{isPresent:I,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:l,onExitComplete:I?void 0:L,anchorX:s,children:b},S)})})};var DD=R(M(),1),Sv=(0,DD.createContext)({strict:!1});var ND={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"]},Xa={};for(let e in ND)Xa[e]={isEnabled:t=>ND[e].some(r=>!!t[r])};function OD(e){for(let t in e)Xa[t]={...Xa[t],...e[t]}}var s6=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 Wp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||s6.has(e)}var FD=e=>!Wp(e);function l6(e){typeof e=="function"&&(FD=t=>t.startsWith("on")?!Wp(t):e(t))}try{l6(require("@emotion/is-prop-valid").default)}catch{}function _D(e,t,r){let o={};for(let n in e)n==="values"&&typeof e.values=="object"||(FD(n)||r===!0&&Wp(n)||!t&&!Wp(n)||e.draggable&&n.startsWith("onDrag"))&&(o[n]=e[n]);return o}var Nv=R(N(),1);var bc=R(M(),1);var VD=R(M(),1),as=(0,VD.createContext)({});var Iv=R(M(),1);function is(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ya(e){return typeof e=="string"||Array.isArray(e)}var bv=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jp=["initial",...bv];function Il(e){return is(e.animate)||jp.some(t=>Ya(e[t]))}function Rv(e){return!!(Il(e)||e.variants)}function BD(e,t){if(Il(e)){let{initial:r,animate:o}=e;return{initial:r===!1||Ya(r)?r:void 0,animate:Ya(o)?o:void 0}}return e.inherit!==!1?t:{}}function UD(e){let{initial:t,animate:r}=BD(e,(0,Iv.useContext)(as));return(0,Iv.useMemo)(()=>({initial:t,animate:r}),[HD(t),HD(r)])}function HD(e){return Array.isArray(e)?e.join(" "):e}var xc=R(M(),1);var WD=R(M(),1);var Pl={};function zD(e){for(let t in e)Pl[t]=e[t],fl(t)&&(Pl[t].isCSSVariable=!0)}function Pv(e,{layout:t,layoutId:r}){return yo.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Pl[e]||e==="opacity")}var u6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},c6=Mn.length;function GD(e,t,r){let o="",n=!0;for(let a=0;a<c6;a++){let i=Mn[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||r){let u=Vp(s,wl[i]);if(!l){n=!1;let c=u6[i]||i;o+=`${c}(${u}) `}r&&(t[i]=u)}}return o=o.trim(),r?o=r(t,n?"":o):n&&(o="none"),o}function gc(e,t,r){let{style:o,vars:n,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let u=t[l];if(yo.has(l)){i=!0;continue}else if(fl(l)){n[l]=u;continue}else{let c=Vp(u,wl[l]);l.startsWith("origin")?(s=!0,a[l]=c):o[l]=c}}if(t.transform||(i||r?o.transform=GD(t,e.transform,r):o.transform&&(o.transform="none")),s){let{originX:l="50%",originY:u="50%",originZ:c=0}=a;o.transformOrigin=`${l} ${u} ${c}`}}var hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function XS(e,t,r){for(let o in t)!Be(t[o])&&!Pv(o,r)&&(e[o]=t[o])}function d6({transformTemplate:e},t){return(0,WD.useMemo)(()=>{let r=hc();return gc(r,t,e),Object.assign({},r.vars,r.style)},[t])}function f6(e,t){let r=e.style||{},o={};return XS(o,r,e),Object.assign(o,d6(e,t)),o}function jD(e,t){let r={},o=f6(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}var qD=R(M(),1);var p6={offset:"stroke-dashoffset",array:"stroke-dasharray"},m6={offset:"strokeDashoffset",array:"strokeDasharray"};function $D(e,t,r=1,o=0,n=!0){e.pathLength=1;let a=n?p6:m6;e[a.offset]=ue.transform(-o);let i=ue.transform(t),s=ue.transform(r);e[a.array]=`${i} ${s}`}function Lv(e,{attrX:t,attrY:r,attrScale:o,pathLength:n,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(gc(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),r!==void 0&&(d.y=r),o!==void 0&&(d.scale=o),n!==void 0&&$D(d,n,a,i,!1)}var Tv=()=>({...hc(),attrs:{}});var kv=e=>typeof e=="string"&&e.toLowerCase()==="svg";function KD(e,t,r,o){let n=(0,qD.useMemo)(()=>{let a=Tv();return Lv(a,t,kv(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};XS(a,e.style,e),n.style={...a,...n.style}}return n}var XD=["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 vc(e){return typeof e!="string"||e.includes("-")?!1:!!(XD.indexOf(e)>-1||/[A-Z]/u.test(e))}function YD(e,t,r,{latestValues:o},n,a=!1){let s=(vc(e)?KD:jD)(t,o,n,e),l=_D(t,typeof e=="string",a),u=e!==xc.Fragment?{...l,...s,ref:r}:{},{children:c}=t,d=(0,xc.useMemo)(()=>Be(c)?c.get():c,[c]);return(0,xc.createElement)(e,{...u,children:d})}var YS=R(M(),1);function QD(e){let t=[{},{}];return e?.values.forEach((r,o)=>{t[0][o]=r.get(),t[1][o]=r.getVelocity()}),t}function yc(e,t,r,o){if(typeof t=="function"){let[n,a]=QD(o);t=t(r!==void 0?r:e.custom,n,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[n,a]=QD(o);t=t(r!==void 0?r:e.custom,n,a)}return t}function wc(e){return Be(e)?e.get():e}function g6({scrapeMotionValuesFromProps:e,createRenderState:t},r,o,n){return{latestValues:h6(r,o,n,e),renderState:t()}}function h6(e,t,r,o){let n={},a=o(e,{});for(let f in a)n[f]=wc(a[f]);let{initial:i,animate:s}=e,l=Il(e),u=Rv(e);t&&u&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let c=r?r.initial===!1:!1;c=c||i===!1;let d=c?s:i;if(d&&typeof d!="boolean"&&!is(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let g=yc(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 Mv=e=>(t,r)=>{let o=(0,YS.useContext)(as),n=(0,YS.useContext)(Yi),a=()=>g6(e,t,o,n);return r?a():ca(a)};function Cc(e,t,r){let{style:o}=e,n={};for(let a in o)(Be(o[a])||t.style&&Be(t.style[a])||Pv(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(n[a]=o[a]);return n}var ZD=Mv({scrapeMotionValuesFromProps:Cc,createRenderState:hc});function Ev(e,t,r){let o=Cc(e,t,r);for(let n in e)if(Be(e[n])||Be(t[n])){let a=Mn.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;o[a]=e[n]}return o}var JD=Mv({scrapeMotionValuesFromProps:Ev,createRenderState:Tv});var eN=Symbol.for("motionComponentSymbol");var tN=R(M(),1);function Qa(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function rN(e,t,r){return(0,tN.useCallback)(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r&&(typeof r=="function"?r(o):Qa(r)&&(r.current=o))},[t])}var oo=R(M(),1);var Sc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var v6="framerAppearId",Av="data-"+Sc(v6);var oN=R(M(),1),Dv=(0,oN.createContext)({});function nN(e,t,r,o,n){let{visualElement:a}=(0,oo.useContext)(as),i=(0,oo.useContext)(Sv),s=(0,oo.useContext)(Yi),l=(0,oo.useContext)(os).reducedMotion,u=(0,oo.useRef)(null);o=o||i.renderer,!u.current&&o&&(u.current=o(e,{visualState:t,parent:a,props:r,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));let c=u.current,d=(0,oo.useContext)(Dv);c&&!c.projection&&n&&(c.type==="html"||c.type==="svg")&&x6(u.current,r,n,d);let f=(0,oo.useRef)(!1);(0,oo.useInsertionEffect)(()=>{c&&f.current&&c.update(r,s)});let p=r[Av],g=(0,oo.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return ic(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),(0,oo.useEffect)(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),g.current=!1),c.enteringChildren=void 0)}),c}function x6(e,t,r,o){let{layoutId:n,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:aN(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&Qa(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:c,layoutScroll:l,layoutRoot:u})}function aN(e){if(e)return e.options.allowProjection!==!1?e.projection:aN(e.parent)}function Ov(e,{forwardMotionProps:t=!1}={},r,o){r&&OD(r);let n=vc(e)?JD:ZD;function a(s,l){let u,c={...(0,bc.useContext)(os),...s,layoutId:y6(s)},{isStatic:d}=c,f=UD(s),p=n(s,d);if(!d&&ac){w6(c,r);let g=C6(c);u=g.MeasureLayout,f.visualElement=nN(e,p,c,o,g.ProjectionNode)}return(0,Nv.jsxs)(as.Provider,{value:f,children:[u&&f.visualElement?(0,Nv.jsx)(u,{visualElement:f.visualElement,...c}):null,YD(e,s,rN(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,bc.forwardRef)(a);return i[eN]=e,i}function y6({layoutId:e}){let t=(0,bc.useContext)(nc).id;return t&&e!==void 0?t+"-"+e:e}function w6(e,t){let r=(0,bc.useContext)(Sv).strict}function C6(e){let{drag:t,layout:r}=Xa;if(!t&&!r)return{};let o={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function iN(e,t){if(typeof Proxy>"u")return Ov;let r=new Map,o=(a,i)=>Ov(a,i,e,t),n=(a,i)=>o(a,i);return new Proxy(n,{get:(a,i)=>i==="create"?o:(r.has(i)||r.set(i,Ov(i,void 0,e,t)),r.get(i))})}var SN=R(M(),1);function Fv({top:e,left:t,right:r,bottom:o}){return{x:{min:t,max:r},y:{min:e,max:o}}}function sN({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function lN(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:o.y,right:o.x}}function QS(e){return e===void 0||e===1}function _v({scale:e,scaleX:t,scaleY:r}){return!QS(e)||!QS(t)||!QS(r)}function Za(e){return _v(e)||ZS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ZS(e){return uN(e.x)||uN(e.y)}function uN(e){return e&&e!=="0%"}function $p(e,t,r){let o=e-r,n=t*o;return r+n}function cN(e,t,r,o,n){return n!==void 0&&(e=$p(e,n,o)),$p(e,r,o)+t}function JS(e,t=0,r=1,o,n){e.min=cN(e.min,t,r,o,n),e.max=cN(e.max,t,r,o,n)}function eb(e,{x:t,y:r}){JS(e.x,t.translate,t.scale,t.originPoint),JS(e.y,r.translate,r.scale,r.originPoint)}var dN=.999999999999,fN=1.0000000000001;function mN(e,t,r,o=!1){let n=r.length;if(!n)return;t.x=t.y=1;let a,i;for(let s=0;s<n;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Ll(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,eb(e,i)),o&&Za(a.latestValues)&&Ll(e,a.latestValues))}t.x<fN&&t.x>dN&&(t.x=1),t.y<fN&&t.y>dN&&(t.y=1)}function ss(e,t){e.min=e.min+t,e.max=e.max+t}function pN(e,t,r,o,n=.5){let a=ke(e.min,e.max,n);JS(e,t,r,a,o)}function Ll(e,t){pN(e.x,t.x,t.scaleX,t.scale,t.originX),pN(e.y,t.y,t.scaleY,t.scale,t.originY)}function tb(e,t){return Fv(lN(e.getBoundingClientRect(),t))}function gN(e,t,r){let o=tb(e,r),{scroll:n}=t;return n&&(ss(o.x,n.offset.x),ss(o.y,n.offset.y)),o}var hN=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tl=()=>({x:hN(),y:hN()}),vN=()=>({min:0,max:0}),Ke=()=>({x:vN(),y:vN()});var qp={current:null},Vv={current:!1};function xN(){if(Vv.current=!0,!!ac)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>qp.current=e.matches;e.addEventListener("change",t),t()}else qp.current=!1}var ls=new WeakMap;function yN(e,t,r){for(let o in t){let n=t[o],a=r[o];if(Be(n))e.addValue(o,n);else if(Be(a))e.addValue(o,ro(n,{owner:e}));else if(a!==n)if(e.hasValue(o)){let i=e.getValue(o);i.liveStyle===!0?i.jump(n):i.hasAnimated||i.set(n)}else{let i=e.getStaticValue(o);e.addValue(o,ro(i!==void 0?i:n,{owner:e}))}}for(let o in r)t[o]===void 0&&e.removeValue(o);return t}var wN=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Rc=class{scrapeMotionValuesFromProps(t,r,o){return{}}constructor({parent:t,props:r,presenceContext:o,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=$a,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=Ct.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=r.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Il(r),this.isVariantNode=Rv(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(r,{},this);for(let f in d){let p=d[f];l[f]!==void 0&&Be(p)&&p.set(l[f])}}mount(t){this.current=t,ls.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((r,o)=>this.bindToMotionValue(o,r)),Vv.current||xN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qp.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Sr(this.notifyUpdate),Sr(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 r=this.features[t];r&&(r.unmount(),r.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,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let o=yo.has(t);o&&this.onBindTransform&&this.onBindTransform();let n=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Le.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{n(),a&&a(),r.owner&&r.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 Xa){let r=Xa[t];if(!r)continue;let{isEnabled:o,Feature:n}=r;if(!this.features[t]&&n&&o(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):Ke()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let o=0;o<wN.length;o++){let n=wN[o];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=yN(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 r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let o=this.values.get(t);r!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&r!==void 0&&(o=ro(r===null?void 0:r,{owner:this}),this.addValue(t,o)),o}readValue(t,r){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(ip(o)||lp(o))?o=parseFloat(o):!jS(o)&&Rr.test(r)&&(o=Op(t,r)),this.setBaseTarget(t,Be(o)?o.get():o)),Be(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){let{initial:r}=this.props,o;if(typeof r=="string"||typeof r=="object"){let a=yc(this.props,r,this.presenceContext?.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;let n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!Be(n)?n:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new za),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Sl.render(this.render)}};var Ic=class extends Rc{constructor(){super(...arguments),this.KeyframeResolver=Fp}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:o}){delete r[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Be(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function Bv(e,{style:t,vars:r},o,n){let a=e.style,i;for(i in t)a[i]=t[i];n?.applyProjectionStyles(a,o);for(i in r)a.setProperty(i,r[i])}function S6(e){return window.getComputedStyle(e)}var Pc=class extends Ic{constructor(){super(...arguments),this.type="html",this.renderInstance=Bv}readValueFromInstance(t,r){if(yo.has(r))return this.projection?.isProjecting?Tp(r):PS(t,r);{let o=S6(t),n=(fl(r)?o.getPropertyValue(r):o[r])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:r}){return tb(t,r)}build(t,r,o){gc(t,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,r,o){return Cc(t,r,o)}};var Hv=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 CN(e,t,r,o){Bv(e,t,void 0,o);for(let n in t.attrs)e.setAttribute(Hv.has(n)?n:Sc(n),t.attrs[n])}var Lc=class extends Ic{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ke}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(yo.has(r)){let o=Np(r);return o&&o.default||0}return r=Hv.has(r)?r:Sc(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,o){return Ev(t,r,o)}build(t,r,o){Lv(t,r,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,r,o,n){CN(t,r,o,n)}mount(t){this.isSVGTag=kv(t.tagName),super.mount(t)}};var bN=(e,t)=>vc(e)?new Lc(t):new Pc(t,{allowProjection:e!==SN.Fragment});function ma(e,t,r){let o=e.getProps();return yc(o,t,r!==void 0?r:o.custom,e)}var Kp=e=>Array.isArray(e);function b6(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ro(r))}function R6(e){return Kp(e)?e[e.length-1]||0:e}function RN(e,t){let r=ma(e,t),{transitionEnd:o={},transition:n={},...a}=r||{};a={...a,...o};for(let i in a){let s=R6(a[i]);b6(e,i,s)}}function IN(e){return!!(Be(e)&&e.add)}function Xp(e,t){let r=e.getValue("willChange");if(IN(r))return r.add(t);if(!r&&Cr.WillChange){let o=new Cr.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Uv(e){return e.props[Av]}var I6=e=>e!==null;function PN(e,{repeat:t,repeatType:r="loop"},o){let n=e.filter(I6),a=t&&r!=="loop"&&t%2===1?0:n.length-1;return!a||o===void 0?n[a]:o}var P6={type:"spring",stiffness:500,damping:25,restSpeed:10},L6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),T6={type:"keyframes",duration:.8},k6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},LN=(e,{keyframes:t})=>t.length>2?T6:yo.has(e)?e.startsWith("scale")?L6(t[1]):P6:k6;function TN({when:e,delay:t,delayChildren:r,staggerChildren:o,staggerDirection:n,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var Tc=(e,t,r,o={},n,a)=>i=>{let s=yl(o,e)||{},l=s.delay||o.delay||0,{elapsed:u=0}=o;u=u-It(l);let c={keyframes:Array.isArray(r)?r:[null,r],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};TN(s)||Object.assign(c,LN(e,c)),c.duration&&(c.duration=It(c.duration)),c.repeatDelay&&(c.repeatDelay=It(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(pc(c),c.delay===0&&(d=!0)),(Cr.instantAnimations||Cr.skipAnimations)&&(d=!0,pc(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=PN(c.keyframes,s);if(f!==void 0){Le.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new ja(c):new Mp(c)};function M6({protectedKeys:e,needsAnimating:t},r){let o=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,o}function kc(e,t,{delay:r=0,transitionOverride:o,type:n}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...s}=t;o&&(a=o);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&&M6(u,c))continue;let p={delay:r,...yl(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=Uv(e);if(h){let v=window.MotionHandoffAnimation(h,c,Le);v!==null&&(p.startTime=v,m=!0)}}Xp(e,c),d.start(Tc(c,d,f,e.shouldReduceMotion&&Ap.has(c)?{type:!1}:p,e,m));let x=d.animation;x&&l.push(x)}return i&&Promise.all(l).then(()=>{Le.update(()=>{i&&RN(e,i)})}),l}function zv(e,t,r,o=0,n=1){let a=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),i=e.size,s=(i-1)*o;return typeof r=="function"?r(a,i):n===1?a*o:s-a*o}function Gv(e,t,r={}){let o=ma(e,t,r.type==="exit"?e.presenceContext?.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(n=r.transitionOverride);let a=o?()=>Promise.all(kc(e,o,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=n;return E6(e,t,l,u,c,d,r)}:()=>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(r.delay)])}function E6(e,t,r=0,o=0,n=0,a=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(Gv(l,t,{...i,delay:r+(typeof o=="function"?0:o)+zv(e.variantChildren,l,o,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function kN(e,t,r={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){let n=t.map(a=>Gv(e,a,r));o=Promise.all(n)}else if(typeof t=="string")o=Gv(e,t,r);else{let n=typeof t=="function"?ma(e,t,r.custom):t;o=Promise.all(kc(e,n,r))}return o.then(()=>{e.notify("AnimationComplete",t)})}function rb(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let o=0;o<r;o++)if(t[o]!==e[o])return!1;return!0}var A6=jp.length;function ob(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?ob(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<A6;r++){let o=jp[r],n=e.props[o];(Ya(n)||n===!1)&&(t[o]=n)}return t}var D6=[...bv].reverse(),N6=bv.length;function O6(e){return t=>Promise.all(t.map(({animation:r,options:o})=>kN(e,r,o)))}function EN(e){let t=O6(e),r=MN(),o=!0,n=l=>(u,c)=>{let d=ma(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=ob(e.parent)||{},d=[],f=new Set,p={},g=1/0;for(let x=0;x<N6;x++){let h=D6[x],v=r[h],y=u[h]!==void 0?u[h]:c[h],w=Ya(y),C=h===l?v.isActive:null;C===!1&&(g=x);let b=y===c[h]&&y!==u[h]&&w;if(b&&o&&e.manuallyAnimateOnMount&&(b=!1),v.protectedKeys={...p},!v.isActive&&C===null||!y&&!v.prevProp||is(y)||typeof y=="boolean")continue;let S=F6(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;Kp(B)&&Kp(A)?te=!rb(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}),o&&e.blockInitialAnimation&&(I=!1);let z=b&&S;I&&(!z||L)&&d.push(...T.map(O=>{let B={type:h};if(typeof O=="string"&&o&&!z&&e.manuallyAnimateOnMount&&e.parent){let{parent:A}=e,te=ma(A,O);if(A.enteringChildren&&te){let{delayChildren:ae}=te.transition||{};B.delay=zv(A.enteringChildren,e,ae)}}return{animation:O,options:B}}))}if(f.size){let x={};if(typeof u.initial!="boolean"){let h=ma(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 o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),o=!1,m?t(d):Promise.resolve()}function s(l,u){if(r[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),r[l].isActive=u;let c=i(l);for(let d in r)r[d].protectedKeys={};return c}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>r,reset:()=>{r=MN()}}}function F6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rb(t,e):!1}function kl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function MN(){return{animate:kl(!0),whileInView:kl(),whileHover:kl(),whileTap:kl(),whileDrag:kl(),whileFocus:kl(),exit:kl()}}var Yt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var Wv=class extends Yt{constructor(t){super(t),t.animationState||(t.animationState=EN(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();is(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var _6=0,jv=class extends Yt{constructor(){super(...arguments),this.id=_6++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;let n=this.node.animationState.setActive("exit",!t);r&&!t&&n.then(()=>{r(this.id)})}mount(){let{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var AN={animation:{Feature:Wv},exit:{Feature:jv}};function Ja(e,t,r,o={passive:!0}){return e.addEventListener(t,r,o),()=>e.removeEventListener(t,r)}function ei(e){return{point:{x:e.pageX,y:e.pageY}}}var DN=e=>t=>bl(t)&&e(t,ei(t));function us(e,t,r,o){return Ja(e,t,DN(r),o)}var _N=1e-4,V6=1-_N,B6=1+_N,VN=.01,H6=0-VN,U6=0+VN;function zt(e){return e.max-e.min}function BN(e,t,r){return Math.abs(e-t)<=r}function NN(e,t,r,o=.5){e.origin=o,e.originPoint=ke(t.min,t.max,e.origin),e.scale=zt(r)/zt(t),e.translate=ke(r.min,r.max,e.origin)-e.originPoint,(e.scale>=V6&&e.scale<=B6||isNaN(e.scale))&&(e.scale=1),(e.translate>=H6&&e.translate<=U6||isNaN(e.translate))&&(e.translate=0)}function Mc(e,t,r,o){NN(e.x,t.x,r.x,o?o.originX:void 0),NN(e.y,t.y,r.y,o?o.originY:void 0)}function ON(e,t,r){e.min=r.min+t.min,e.max=e.min+zt(t)}function HN(e,t,r){ON(e.x,t.x,r.x),ON(e.y,t.y,r.y)}function FN(e,t,r){e.min=t.min-r.min,e.max=e.min+zt(t)}function Ec(e,t,r){FN(e.x,t.x,r.x),FN(e.y,t.y,r.y)}function no(e){return[e("x"),e("y")]}var $v=({current:e})=>e?e.ownerDocument.defaultView:null;var UN=(e,t)=>Math.abs(e-t);function zN(e,t){let r=UN(e.x,t.x),o=UN(e.y,t.y);return Math.sqrt(r**2+o**2)}var Ac=class{constructor(t,r,{transformPagePoint:o,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=ab(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=zN(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!g)return;let{point:m}=f,{timestamp:x}=wt;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=nb(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=ab(f.type==="pointercancel"?this.lastMoveEventInfo:nb(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,h),m&&m(f,h)},!bl(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=o,this.distanceThreshold=i,this.contextWindow=n||window;let s=ei(t),l=nb(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=wt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=r;d&&d(t,ab(l,this.history)),this.removeListeners=Ln(us(this.contextWindow,"pointermove",this.handlePointerMove),us(this.contextWindow,"pointerup",this.handlePointerUp),us(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Sr(this.updatePoint)}};function nb(e,t){return t?{point:t(e.point)}:e}function GN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ab({point:e},t){return{point:e,delta:GN(e,WN(t)),offset:GN(e,z6(t)),velocity:G6(t,.1)}}function z6(e){return e[0]}function WN(e){return e[e.length-1]}function G6(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,o=null,n=WN(e);for(;r>=0&&(o=e[r],!(n.timestamp-o.timestamp>It(t)));)r--;if(!o)return{x:0,y:0};let a=Ut(n.timestamp-o.timestamp);if(a===0)return{x:0,y:0};let i={x:(n.x-o.x)/a,y:(n.y-o.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function XN(e,{min:t,max:r},o){return t!==void 0&&e<t?e=o?ke(t,e,o.min):Math.max(e,t):r!==void 0&&e>r&&(e=o?ke(r,e,o.max):Math.min(e,r)),e}function jN(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function YN(e,{top:t,left:r,bottom:o,right:n}){return{x:jN(e.x,r,n),y:jN(e.y,t,o)}}function $N(e,t){let r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,o]=[o,r]),{min:r,max:o}}function QN(e,t){return{x:$N(e.x,t.x),y:$N(e.y,t.y)}}function ZN(e,t){let r=.5,o=zt(e),n=zt(t);return n>o?r=zo(t.min,t.max-o,e.min):o>n&&(r=zo(e.min,e.max-n,t.min)),Xt(0,1,r)}function JN(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var qv=.35;function e2(e=qv){return e===!1?e=0:e===!0&&(e=qv),{x:qN(e,"left","right"),y:qN(e,"top","bottom")}}function qN(e,t,r){return{min:KN(e,t),max:KN(e,r)}}function KN(e,t){return typeof e=="number"?e:e[t]||0}var W6=new WeakMap,Xv=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=Ke(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:o}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let a=d=>{let{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(ei(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=BS(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),no(h=>{let v=this.getAxisMotionValue(h).get()||0;if(br.test(v)){let{projection:y}=this.visualElement;if(y&&y.layout){let w=y.layout.layoutBox[h];w&&(v=zt(w)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&Le.postRender(()=>m(d,f)),Xp(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=()=>no(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ac(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:$v(this.visualElement)})}stop(t,r){let o=t||this.latestPointerEvent,n=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!o)return;let{velocity:i}=n;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&Le.postRender(()=>s(o,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,o){let{drag:n}=this.getProps();if(!o||!Kv(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=XN(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){let{dragConstraints:t,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&Qa(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=YN(o.layoutBox,t):this.constraints=!1,this.elastic=e2(r),n!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&no(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=JN(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Qa(t))return!1;let o=t.current;lr(o!==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=gN(o,n.root,this.visualElement.getTransformPagePoint()),i=QN(n.layout.layoutBox,a);if(r){let s=r(sN(i));this.hasMutatedConstraints=!!s,s&&(i=Fv(s))}return i}startAnimation(t){let{drag:r,dragMomentum:o,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=no(c=>{if(!Kv(c,r,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:o?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,r){let o=this.getAxisMotionValue(t);return Xp(this.visualElement,t),o.start(Tc(t,o,0,r,this.visualElement,!1))}stopAnimation(){no(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){no(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),n=o[r];return n||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){no(r=>{let{drag:o}=this.getProps();if(!Kv(r,o,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(r);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[r];a.set(t[r]-ke(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:o}=this.visualElement;if(!Qa(r)||!o||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};no(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=ZN({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),no(i=>{if(!Kv(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;W6.set(this.visualElement,this);let t=this.visualElement.current,r=us(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),o=()=>{let{dragConstraints:l}=this.getProps();Qa(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,a=n.addEventListener("measure",o);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Le.read(o);let i=Ja(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(no(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(),r(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:o=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:i=qv,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:o,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function Kv(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function j6(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var Yv=class extends Yt{constructor(t){super(t),this.removeGroupControls=ht,this.removeListeners=ht,this.controls=new Xv(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ht}unmount(){this.removeGroupControls(),this.removeListeners()}};var t2=e=>(t,r)=>{e&&Le.postRender(()=>e(t,r))},Qv=class extends Yt{constructor(){super(...arguments),this.removePointerDownListener=ht}onPointerDown(t){this.session=new Ac(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$v(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:o,onPanEnd:n}=this.node.getProps();return{onSessionStart:t2(t),onStart:t2(r),onMove:o,onEnd:(a,i)=>{delete this.session,n&&Le.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=us(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 n2=R(N(),1);var Yp=R(M(),1);var Dc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function r2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Nc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ue.test(e))e=parseFloat(e);else return e;let r=r2(e,t.target.x),o=r2(e,t.target.y);return`${r}% ${o}%`}};var o2={correct:(e,{treeScale:t,projectionDelta:r})=>{let o=e,n=Rr.parse(e);if(n.length>5)return o;let a=Rr.createTransformer(e),i=typeof n[0]!="number"?1:0,s=r.x.scale*t.x,l=r.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 ib=!1,sb=class extends Yp.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o,layoutId:n}=this.props,{projection:a}=t;zD($6),a&&(r.group&&r.group.add(a),o&&o.register&&n&&o.register(a),ib&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Dc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:o,drag:n,isPresent:a}=this.props,{projection:i}=o;return i&&(i.isPresent=a,ib=!0,n||t.layoutDependency!==r||r===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(),Sl.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:n}=t;ib=!0,n&&(n.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(n),o&&o.deregister&&o.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function Zv(e){let[t,r]=wv(),o=(0,Yp.useContext)(nc);return(0,n2.jsx)(sb,{...e,layoutGroup:o,switchLayoutGroup:(0,Yp.useContext)(Dv),isPresent:t,safeToRemove:r})}var $6={borderRadius:{...Nc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nc,borderTopRightRadius:Nc,borderBottomLeftRadius:Nc,borderBottomRightRadius:Nc,boxShadow:o2};function Jv(e,t,r){let o=Be(e)?e:ro(e);return o.start(Tc("",o,t,r)),o.animation}var a2=(e,t)=>e.depth-t.depth;var ex=class{constructor(){this.children=[],this.isDirty=!1}add(t){cl(this.children,t),this.isDirty=!0}remove(t){Pn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(a2),this.isDirty=!1,this.children.forEach(t)}};function i2(e,t){let r=Ct.now(),o=({timestamp:n})=>{let a=n-r;a>=t&&(Sr(o),e(a-t))};return Le.setup(o,!0),()=>Sr(o)}var c2=["TopLeft","TopRight","BottomLeft","BottomRight"],q6=c2.length,s2=e=>typeof e=="string"?parseFloat(e):e,l2=e=>typeof e=="number"||ue.test(e);function d2(e,t,r,o,n,a){n?(e.opacity=ke(0,r.opacity??1,K6(o)),e.opacityExit=ke(t.opacity??1,0,X6(o))):a&&(e.opacity=ke(t.opacity??1,r.opacity??1,o));for(let i=0;i<q6;i++){let s=`border${c2[i]}Radius`,l=u2(t,s),u=u2(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||l2(l)===l2(u)?(e[s]=Math.max(ke(s2(l),s2(u),o),0),(br.test(u)||br.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||r.rotate)&&(e.rotate=ke(t.rotate||0,r.rotate||0,o))}function u2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var K6=f2(0,.5,pp),X6=f2(.5,.95,ht);function f2(e,t,r){return o=>o<e?0:o>t?1:r(zo(e,t,o))}function p2(e,t){e.min=t.min,e.max=t.max}function wo(e,t){p2(e.x,t.x),p2(e.y,t.y)}function lb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function m2(e,t,r,o,n){return e-=t,e=$p(e,1/r,o),n!==void 0&&(e=$p(e,1/n,o)),e}function Y6(e,t=0,r=1,o=.5,n,a=e,i=e){if(br.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,o);e===a&&(s-=t),e.min=m2(e.min,t,r,s,n),e.max=m2(e.max,t,r,s,n)}function g2(e,t,[r,o,n],a,i){Y6(e,t[r],t[o],t[n],t.scale,a,i)}var Q6=["x","scaleX","originX"],Z6=["y","scaleY","originY"];function ub(e,t,r,o){g2(e.x,t,Q6,r?r.x:void 0,o?o.x:void 0),g2(e.y,t,Z6,r?r.y:void 0,o?o.y:void 0)}function h2(e){return e.translate===0&&e.scale===1}function cb(e){return h2(e.x)&&h2(e.y)}function v2(e,t){return e.min===t.min&&e.max===t.max}function y2(e,t){return v2(e.x,t.x)&&v2(e.y,t.y)}function x2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function db(e,t){return x2(e.x,t.x)&&x2(e.y,t.y)}function fb(e){return zt(e.x)/zt(e.y)}function pb(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var tx=class{constructor(){this.members=[]}add(t){cl(this.members,t),t.scheduleRender()}remove(t){if(Pn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){let r=this.members.findIndex(n=>t===n);if(r===0)return!1;let o;for(let n=r;n>=0;n--){let a=this.members[n];if(a.isPresent!==!1){o=a;break}}return o?(this.promote(o),!0):!1}promote(t,r){let o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,r&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:n}=t.options;n===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:o}=t;r.onExitComplete&&r.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function w2(e,t,r){let o="",n=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((n||a||i)&&(o=`translate3d(${n}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:g}=r;u&&(o=`perspective(${u}px) ${o}`),c&&(o+=`rotate(${c}deg) `),d&&(o+=`rotateX(${d}deg) `),f&&(o+=`rotateY(${f}deg) `),p&&(o+=`skewX(${p}deg) `),g&&(o+=`skewY(${g}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(o+=`scale(${s}, ${l})`),o||"none"}var Ml={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},mb=["","X","Y","Z"],J6=1e3,e8=0;function gb(e,t,r,o){let{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),o&&(o[e]=0))}function k2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=Uv(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Le,!(n||a))}let{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&k2(o)}function rx({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:o,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=e8++,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,to.value&&(Ml.nodes=Ml.calculatedTargetDeltas=Ml.calculatedProjections=0),this.nodes.forEach(o8),this.nodes.forEach(s8),this.nodes.forEach(l8),this.nodes.forEach(n8),to.addProjectionMetrics&&to.addProjectionMetrics(Ml)},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 ex)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new za),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=Rl(i)&&!Hp(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=i2(f,250),Dc.hasAnimatedSinceResize&&(Dc.hasAnimatedSinceResize=!1,this.nodes.forEach(b2)))})}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()||p8,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=u.getProps(),h=!this.targetLayout||!db(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={...yl(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||b2(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(),Sr(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(u8),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&&k2(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(C2);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(S2);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(i8),this.nodes.forEach(t8),this.nodes.forEach(r8)):this.nodes.forEach(S2),this.clearAllSnapshots();let s=Ct.now();wt.delta=Xt(0,1e3/60,s-wt.timestamp),wt.timestamp=s,wt.isProcessing=!0,wp.update.process(wt),wp.preRender.process(wt),wp.render.process(wt),wt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Sl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(a8),this.sharedNodes.forEach(c8)}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&&!zt(this.snapshot.measuredBox.x)&&!zt(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=Ke(),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=o(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:r(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&&!cb(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||Za(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)),m8(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return Ke();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(g8))){let{scroll:u}=this.root;u&&(ss(s.x,u.offset.x),ss(s.y,u.offset.y))}return s}removeElementScroll(i){let s=Ke();if(wo(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&&wo(s,i),ss(s.x,c.offset.x),ss(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=Ke();wo(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&&Ll(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Za(c.latestValues)&&Ll(l,c.latestValues)}return Za(this.latestValues)&&Ll(l,this.latestValues),l}removeTransform(i){let s=Ke();wo(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!Za(u.latestValues))continue;_v(u.latestValues)&&u.updateSnapshot();let c=Ke(),d=u.measurePageBox();wo(c,d),ub(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Za(this.latestValues)&&ub(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!==wt.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=wt.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ke(),this.relativeTargetOrigin=Ke(),Ec(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),wo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ke(),this.targetWithTransforms=Ke()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):wo(this.target,this.layout.layoutBox),eb(this.target,this.targetDelta)):wo(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=Ke(),this.relativeTargetOrigin=Ke(),Ec(this.relativeTargetOrigin,this.target,f.target),wo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}to.value&&Ml.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||_v(this.parent.latestValues)||ZS(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===wt.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;wo(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;mN(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=Ke());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(lb(this.prevProjectionDelta.x,this.projectionDelta.x),lb(this.prevProjectionDelta.y,this.projectionDelta.y)),Mc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!pb(this.projectionDelta.x,this.prevProjectionDelta.x)||!pb(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),to.value&&Ml.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=Tl(),this.projectionDelta=Tl(),this.projectionDeltaWithTransform=Tl()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Tl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=Ke(),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(f8));this.animationProgress=0;let y;this.mixTargetDelta=w=>{let C=w/1e3;R2(d.x,i.x,C),R2(d.y,i.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ec(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),d8(this.relativeTarget,this.relativeTargetOrigin,f,C),y&&y2(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Ke()),wo(y,this.relativeTarget)),m&&(this.animationValues=c,d2(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&&(Sr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{Dc.hasAnimatedSinceResize=!0,Tn.layout++,this.motionValue||(this.motionValue=ro(0)),this.currentAnimation=Jv(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{Tn.layout--},onComplete:()=>{Tn.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(J6),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&&M2(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ke();let d=zt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=zt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}wo(s,l),Ll(s,c),Mc(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new tx),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&&gb("z",i,u,this.animationValues);for(let c=0;c<mb.length;c++)gb(`rotate${mb[c]}`,i,u,this.animationValues),gb(`skew${mb[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=wc(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=wc(s?.pointerEvents)||""),this.hasProjected&&!Za(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=w2(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 Pl){if(c[g]===void 0)continue;let{correct:m,applyTo:x,isCSSVariable:h}=Pl[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?wc(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(C2),this.root.sharedNodes.clear()}}}function t8(e){e.updateLayout()}function r8(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:o}=e.layout,{animationType:n}=e.options,a=t.source!==e.layout.source;n==="size"?no(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=zt(d);d.min=r[c].min,d.max=d.min+f}):M2(n,t.layoutBox,r)&&no(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=zt(r[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});let i=Tl();Mc(i,r,t.layoutBox);let s=Tl();a?Mc(s,e.applyTransform(o,!0),t.measuredBox):Mc(s,r,t.layoutBox);let l=!cb(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=Ke();Ec(p,t.layoutBox,d.layoutBox);let g=Ke();Ec(g,r,f.layoutBox),db(p,g)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function o8(e){to.value&&Ml.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 n8(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function a8(e){e.clearSnapshot()}function C2(e){e.clearMeasurements()}function S2(e){e.isLayoutDirty=!1}function i8(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function b2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function s8(e){e.resolveTargetDelta()}function l8(e){e.calcProjection()}function u8(e){e.resetSkewAndRotation()}function c8(e){e.removeLeadSnapshot()}function R2(e,t,r){e.translate=ke(t.translate,0,r),e.scale=ke(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function I2(e,t,r,o){e.min=ke(t.min,r.min,o),e.max=ke(t.max,r.max,o)}function d8(e,t,r,o){I2(e.x,t.x,r.x,o),I2(e.y,t.y,r.y,o)}function f8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var p8={duration:.45,ease:[.4,0,.1,1]},P2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),L2=P2("applewebkit/")&&!P2("chrome/")?Math.round:ht;function T2(e){e.min=L2(e.min),e.max=L2(e.max)}function m8(e){T2(e.x),T2(e.y)}function M2(e,t,r){return e==="position"||e==="preserve-aspect"&&!BN(fb(t),fb(r),.2)}function g8(e){return e!==e.root&&e.scroll?.wasRoot}var E2=rx({attachResizeListener:(e,t)=>Ja(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var hb={current:void 0},ox=rx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hb.current){let e=new E2({});e.mount(window),e.setOptions({layoutScroll:!0}),hb.current=e}return hb.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var A2={pan:{Feature:Qv},drag:{Feature:Yv,ProjectionNode:ox,MeasureLayout:Zv}};function D2(e,t,r){let{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",r==="Start");let n="onHover"+r,a=o[n];a&&Le.postRender(()=>a(t,ei(t)))}var nx=class extends Yt{mount(){let{current:t}=this.node;t&&(this.unmount=HS(t,(r,o)=>(D2(this.node,o,"Start"),n=>D2(this.node,n,"End"))))}unmount(){}};var ax=class extends Yt{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=Ln(Ja(this.node.current,"focus",()=>this.onFocus()),Ja(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function N2(e,t,r){let{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",r==="Start");let n="onTap"+(r==="End"?"":r),a=o[n];a&&Le.postRender(()=>a(t,ei(t)))}var ix=class extends Yt{mount(){let{current:t}=this.node;t&&(this.unmount=GS(t,(r,o)=>(N2(this.node,o,"Start"),(n,{success:a})=>N2(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var xb=new WeakMap,vb=new WeakMap,h8=e=>{let t=xb.get(e.target);t&&t(e)},v8=e=>{e.forEach(h8)};function x8({root:e,...t}){let r=e||document;vb.has(r)||vb.set(r,{});let o=vb.get(r),n=JSON.stringify(t);return o[n]||(o[n]=new IntersectionObserver(v8,{root:e,...t})),o[n]}function O2(e,t,r){let o=x8(t);return xb.set(e,r),o.observe(e),()=>{xb.delete(e),o.unobserve(e)}}var y8={some:0,all:1},sx=class extends Yt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:o,amount:n="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:o,threshold:typeof n=="number"?n:y8[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 O2(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(w8(t,r))&&this.startObserver()}unmount(){}};function w8({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var F2={inView:{Feature:sx},tap:{Feature:ix},focus:{Feature:ax},hover:{Feature:nx}};var _2={layout:{ProjectionNode:ox,MeasureLayout:Zv}};var V2={...AN,...F2,...A2,..._2};var He=iN(V2,bN);var Oc=R(M(),1);function Fc(e){let t=ca(()=>ro(e)),{isStatic:r}=(0,Oc.useContext)(os);if(r){let[,o]=(0,Oc.useState)(e);(0,Oc.useEffect)(()=>t.on("change",o),[])}return t}function lx(e,t){let r=Fc(t()),o=()=>r.set(t());return o(),ic(()=>{let n=()=>Le.preRender(o,!1,!0),a=e.map(i=>i.on("change",n));return()=>{a.forEach(i=>i()),Sr(o)}}),r}function B2(e){Cl.current=[],e();let t=lx(Cl.current,e);return Cl.current=void 0,t}function yb(e,t,r,o){if(typeof e=="function")return B2(e);let n=typeof t=="function"?t:WS(t,r,o);return Array.isArray(e)?H2(e,n):H2([e],([a])=>n(a))}function H2(e,t){let r=ca(()=>[]);return lx(e,()=>{r.length=0;let o=e.length;for(let n=0;n<o;n++)r[n]=e[n].get();return t(r)})}function Qp(e){return typeof e=="object"&&!Array.isArray(e)}function ux(e,t,r,o){return typeof e=="string"&&Qp(t)?_p(e,r,o):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function U2(e,t,r){return e*(t+1)}function wb(e,t,r,o){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:t.startsWith("<")?Math.max(0,r+parseFloat(t.slice(1))):o.get(t)??e}function C8(e,t,r){for(let o=0;o<e.length;o++){let n=e[o];n.at>t&&n.at<r&&(Pn(e,n),o--)}}function z2(e,t,r,o,n,a){C8(e,n,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:ke(n,a,o[i]),easing:vp(r,i)})}function G2(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function W2(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var S8="easeInOut",b8=20;function q2(e,{defaultTransition:t={},...r}={},o,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,wb(d,g.at,c,u));continue}let[m,x,h={}]=g;h.at!==void 0&&(d=wb(d,h.at,c,u));let v=0,y=(w,C,b,S=0,I=0)=>{let L=R8(w),{delay:T=0,times:k=Lp(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=xl(E)?E:n?.[E||"keyframes"];if(te<=2&&ae){let Y=100;if(te===2&&L8(L)){let ne=L[1]-L[0];Y=Math.abs(ne)}let ce={...F};B!==void 0&&(ce.duration=It(B));let U=Rp(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),_){lr(_<b8,"Repeat count too high, must be less than 20","repeat-count-high"),B=U2(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":vp(U,he-1))}G2(k,_)}let re=V+B;z2(b,L,O,k,V,re),v=Math.max(A+B,v),f=Math.max(re,f)};if(Be(m)){let w=j2(m,s);y(x,h,$2("default",w))}else{let w=ux(m,x,o,l),C=w.length;for(let b=0;b<C;b++){x=x,h=h;let S=w[b],I=j2(S,s);for(let L in x)y(x[L],I8(h,L),$2(L,I),b,C)}}c=d,d+=v}return s.forEach((p,g)=>{for(let m in p){let x=p[m];x.sort(W2);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(zo(0,f,b)),y.push(I||"easeOut")}v[0]!==0&&(v.unshift(0),h.unshift(h[0]),y.unshift(S8)),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,...r}}}),i}function j2(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function $2(e,t){return t[e]||(t[e]=[]),t[e]}function R8(e){return Array.isArray(e)?e:[e]}function I8(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var P8=e=>typeof e=="number",L8=e=>e.every(P8);function T8(e,t){return e in t}var cx=class extends Rc{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(T8(r,t)){let o=t[r];if(typeof o=="string"||typeof o=="number")return o}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return Ke()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function K2(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=Rl(e)&&!Hp(e)?new Lc(t):new Pc(t);r.mount(e),ls.set(e,r)}function X2(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new cx(t);r.mount(e),ls.set(e,r)}function k8(e,t){return Be(e)||typeof e=="number"||typeof e=="string"&&!Qp(t)}function dx(e,t,r,o){let n=[];if(k8(e,t))n.push(Jv(e,Qp(t)&&t.default||t,r&&(r.default||r)));else{let a=ux(e,t,o),i=a.length;lr(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];lr(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?K2:X2;ls.has(l)||u(l);let c=ls.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),n.push(...kc(c,{...t,transition:d},{}))}}return n}function Y2(e,t,r){let o=[];return q2(e,t,r,{spring:Wa}).forEach(({keyframes:a,transition:i},s)=>{o.push(...dx(s,a,i))}),o}function M8(e){return Array.isArray(e)&&e.some(Array.isArray)}function Q2(e){function t(r,o,n){let a=[],i;if(M8(r))a=Y2(r,o,e);else{let{onComplete:l,...u}=n||{};typeof l=="function"&&(i=l),a=dx(r,o,u,e)}let s=new Ep(a);return i&&s.finished.then(i),e&&(e.animations.push(s),s.finished.then(()=>{Pn(e.animations,s)})),s}return t}var Cb=Q2();var mSe=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"}}),En={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}},fx={lift:{y:-2,transition:En.smooth},scale:{scale:1.05,transition:En.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:En.smooth},rotate:{rotate:2,transition:En.bouncy}},Z2={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},gSe={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:En.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:En.smooth}},hSe={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:En.smooth}}},vSe={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:En.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:En.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:En.smooth}},J2={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var xSe={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:En.bouncy};var cs=R(N()),eO=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-card 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"}}),Sb=El.forwardRef(({className:e,variant:t,size:r,radius:o,interactive:n,microInteraction:a="lift",...i},s)=>{if(n&&a!=="none"){let l={whileHover:a==="scale"?fx.scale:a==="glow"?fx.glow:fx.lift,whileTap:Z2.scale};return(0,cs.jsx)(He.div,{ref:s,className:P("moonui-theme",eO({variant:t,size:r,radius:o,interactive:n,className:e})),...l,...i})}return(0,cs.jsx)("div",{ref:s,className:P("moonui-theme",eO({variant:t,size:r,radius:o,interactive:n,className:e})),...i})});Sb.displayName="Card";var bb=El.forwardRef(({className:e,...t},r)=>(0,cs.jsx)("div",{ref:r,className:P("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));bb.displayName="CardHeader";var Rb=El.forwardRef(({className:e,...t},r)=>(0,cs.jsx)("h3",{ref:r,className:P("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));Rb.displayName="CardTitle";var Ib=El.forwardRef(({className:e,...t},r)=>(0,cs.jsx)("p",{ref:r,className:P("moonui-theme","text-sm text-muted-foreground",e),...t}));Ib.displayName="CardDescription";var Pb=El.forwardRef(({className:e,...t},r)=>(0,cs.jsx)("div",{ref:r,className:P("moonui-theme","p-6 pt-0",e),...t}));Pb.displayName="CardContent";var Lb=El.forwardRef(({className:e,...t},r)=>(0,cs.jsx)("div",{ref:r,className:P("moonui-theme","flex items-center p-6 pt-0",e),...t}));Lb.displayName="CardFooter";var AO=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 ur(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function px(e,t){let r=Te(e);if(isNaN(t))return ur(e,NaN);if(!t)return r;let o=r.getDate(),n=ur(e,r.getTime());n.setMonth(r.getMonth()+t+1,0);let a=n.getDate();return o>=a?n:(r.setFullYear(n.getFullYear(),n.getMonth(),o),r)}var E8=Math.pow(10,8)*24*60*60*1e3,ESe=-E8,mx=6048e5,tO=864e5;var A8=3600;var rO=A8*24,ASe=rO*7,D8=rO*365.2425,N8=D8/12,DSe=N8*3;var O8={};function ga(){return O8}function An(e,t){let r=ga(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Te(e),a=n.getDay(),i=(a<o?7:0)+a-o;return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}function Al(e){return An(e,{weekStartsOn:1})}function gx(e){let t=Te(e),r=t.getFullYear(),o=ur(e,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);let n=Al(o),a=ur(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let i=Al(a);return t.getTime()>=n.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function _c(e){let t=Te(e);return t.setHours(0,0,0,0),t}function Tb(e){let t=Te(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function oO(e,t){let r=_c(e),o=_c(t),n=+r-Tb(r),a=+o-Tb(o);return Math.round((n-a)/tO)}function nO(e){let t=gx(e),r=ur(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Al(r)}function aO(e){return ur(e,Date.now())}function Dl(e,t){let r=_c(e),o=_c(t);return+r==+o}function iO(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function hx(e){if(!iO(e)&&typeof e!="number")return!1;let t=Te(e);return!isNaN(Number(t))}function sO(e){let t=Te(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function vx(e,t){let r=Te(e.start),o=Te(e.end),n=+r>+o,a=n?+r:+o,i=n?o:r;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 lO(e){let t=Te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function uO(e){let t=Te(e),r=ur(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function cO(e,t){let r=ga(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Te(e),a=n.getDay(),i=(a<o?-7:0)+6-(a-o);return n.setDate(n.getDate()+i),n.setHours(23,59,59,999),n}var F8={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"}},dO=(e,t,r)=>{let o,n=F8[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function xx(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var _8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},V8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},B8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fO={date:xx({formats:_8,defaultWidth:"full"}),time:xx({formats:V8,defaultWidth:"full"}),dateTime:xx({formats:B8,defaultWidth:"full"})};var H8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},pO=(e,t,r,o)=>H8[e];function Vc(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let i=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{let i=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;n=e.values[s]||e.values[i]}let a=e.argumentCallback?e.argumentCallback(t):t;return n[a]}}var U8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},z8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},G8={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"]},W8={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"]},j8={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"}},$8={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"}},q8=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},mO={ordinalNumber:q8,era:Vc({values:U8,defaultWidth:"wide"}),quarter:Vc({values:z8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Vc({values:G8,defaultWidth:"wide"}),day:Vc({values:W8,defaultWidth:"wide"}),dayPeriod:Vc({values:j8,defaultWidth:"wide",formattingValues:$8,defaultFormattingWidth:"wide"})};function Bc(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(n);if(!a)return null;let i=a[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?X8(s,d=>d.test(i)):K8(s,d=>d.test(i)),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;let c=t.slice(i.length);return{value:u,rest:c}}}function K8(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function X8(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function gO(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=r.valueCallback?r.valueCallback(i):i;let s=t.slice(n.length);return{value:i,rest:s}}}var Y8=/^(\d+)(th|st|nd|rd)?/i,Q8=/\d+/i,Z8={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},J8={any:[/^b/i,/^(a|c)/i]},e9={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},t9={any:[/1/i,/2/i,/3/i,/4/i]},r9={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},o9={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]},n9={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},a9={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]},i9={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},s9={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}},hO={ordinalNumber:gO({matchPattern:Y8,parsePattern:Q8,valueCallback:e=>parseInt(e,10)}),era:Bc({matchPatterns:Z8,defaultMatchWidth:"wide",parsePatterns:J8,defaultParseWidth:"any"}),quarter:Bc({matchPatterns:e9,defaultMatchWidth:"wide",parsePatterns:t9,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Bc({matchPatterns:r9,defaultMatchWidth:"wide",parsePatterns:o9,defaultParseWidth:"any"}),day:Bc({matchPatterns:n9,defaultMatchWidth:"wide",parsePatterns:a9,defaultParseWidth:"any"}),dayPeriod:Bc({matchPatterns:i9,defaultMatchWidth:"any",parsePatterns:s9,defaultParseWidth:"any"})};var kb={code:"en-US",formatDistance:dO,formatLong:fO,formatRelative:pO,localize:mO,match:hO,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vO(e){let t=Te(e);return oO(t,uO(t))+1}function xO(e){let t=Te(e),r=+Al(t)-+nO(t);return Math.round(r/mx)+1}function yx(e,t){let r=Te(e),o=r.getFullYear(),n=ga(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=ur(e,0);i.setFullYear(o+1,0,a),i.setHours(0,0,0,0);let s=An(i,t),l=ur(e,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);let u=An(l,t);return r.getTime()>=s.getTime()?o+1:r.getTime()>=u.getTime()?o:o-1}function yO(e,t){let r=ga(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=yx(e,t),a=ur(e,0);return a.setFullYear(n,0,o),a.setHours(0,0,0,0),An(a,t)}function wO(e,t){let r=Te(e),o=+An(r,t)-+yO(r,t);return Math.round(o/mx)+1}function Ue(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var ti={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return Ue(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):Ue(r+1,2)},d(e,t){return Ue(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Ue(e.getHours()%12||12,t.length)},H(e,t){return Ue(e.getHours(),t.length)},m(e,t){return Ue(e.getMinutes(),t.length)},s(e,t){return Ue(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return Ue(n,t.length)}};var Hc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Mb={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});case"GGGG":default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return ti.y(e,t)},Y:function(e,t,r,o){let n=yx(e,o),a=n>0?n:1-n;if(t==="YY"){let i=a%100;return Ue(i,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):Ue(a,t.length)},R:function(e,t){let r=gx(e);return Ue(r,t.length)},u:function(e,t){let r=e.getFullYear();return Ue(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return Ue(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return Ue(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return ti.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return Ue(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=wO(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):Ue(n,t.length)},I:function(e,t,r){let o=xO(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):Ue(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):ti.d(e,t)},D:function(e,t,r){let o=vO(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):Ue(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});case"EEEE":default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Ue(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});case"eeee":default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Ue(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});case"cccc":default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return Ue(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});case"iiii":default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=Hc.noon:o===0?n=Hc.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=Hc.evening:o>=12?n=Hc.afternoon:o>=4?n=Hc.morning:n=Hc.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return ti.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):ti.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):Ue(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):Ue(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):ti.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):ti.s(e,t)},S:function(e,t){return ti.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return SO(o);case"XXXX":case"XX":return Nl(o);case"XXXXX":case"XXX":default:return Nl(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return SO(o);case"xxxx":case"xx":return Nl(o);case"xxxxx":case"xxx":default:return Nl(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+CO(o,":");case"OOOO":default:return"GMT"+Nl(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+CO(o,":");case"zzzz":default:return"GMT"+Nl(o,":")}},t:function(e,t,r){let o=Math.trunc(e.getTime()/1e3);return Ue(o,t.length)},T:function(e,t,r){let o=e.getTime();return Ue(o,t.length)}};function CO(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),a=o%60;return a===0?r+String(n):r+String(n)+t+Ue(a,2)}function SO(e,t){return e%60===0?(e>0?"-":"+")+Ue(Math.abs(e)/60,2):Nl(e,t)}function Nl(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Ue(Math.trunc(o/60),2),a=Ue(o%60,2);return r+n+t+a}var bO=(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"})}},RO=(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"})}},l9=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return bO(e,t);let a;switch(o){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}}",bO(o,t)).replace("{{time}}",RO(n,t))},IO={p:RO,P:l9};var u9=/^D+$/,c9=/^Y+$/,d9=["D","DD","YY","YYYY"];function PO(e){return u9.test(e)}function LO(e){return c9.test(e)}function TO(e,t,r){let o=f9(e,t,r);if(console.warn(o),d9.includes(e))throw new RangeError(o)}function f9(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var p9=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,m9=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g9=/^'([^]*?)'?$/,h9=/''/g,v9=/[a-zA-Z]/;function Wo(e,t,r){let o=ga(),n=r?.locale??o.locale??kb,a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,s=Te(e);if(!hx(s))throw new RangeError("Invalid time value");let l=t.match(m9).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=IO[d];return f(c,n.formatLong)}return c}).join("").match(p9).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:x9(c)};if(Mb[d])return{isToken:!0,value:c};if(d.match(v9))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;(!r?.useAdditionalWeekYearTokens&&LO(d)||!r?.useAdditionalDayOfYearTokens&&PO(d))&&TO(d,t,String(e));let f=Mb[d[0]];return f(s,d,n.localize,u)}).join("")}function x9(e){let t=e.match(g9);return t?t[1].replace(h9,"'"):e}function Eb(e){return Te(e).getDay()}function kO(e,t){let r=Te(e),o=Te(t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function MO(e){return Dl(e,aO(e))}function EO(e,t){return px(e,-t)}var Br=R(N());function Uc({mode:e="single",selected:t,onSelect:r,disabled:o,showOutsideDays:n=!1,className:a,classNames:i,numberOfMonths:s=1,defaultMonth:l,...u}){let[c,d]=AO.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(EO(c,1))},g=()=>{d(px(c,1))},m=b=>{if(!o?.(b)){if(e==="single")r?.(b);else if(e==="range"){let S=t;!S?.from||S.from&&S.to?r?.({from:b,to:void 0}):b<S.from?r?.({from:b,to:S.from}):r?.({from:S.from,to:b})}}},x=b=>{if(!t)return!1;if(e==="single")return Dl(b,t);if(e==="range"){let S=t;return S.from&&S.to?b>=S.from&&b<=S.to:S.from?Dl(b,S.from):!1}return!1},h=b=>{if(e!=="range"||!t)return!1;let S=t;return S.from?Dl(b,S.from):!1},v=b=>{if(e!=="range"||!t)return!1;let S=t;return S.to?Dl(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=lO(c),S=sO(c),I=vx({start:b,end:S}),L=Eb(b),T=[];if(L>0&&n){let D=An(b),z=new Date(b);z.setDate(z.getDate()-1),T.push(...vx({start:D,end:z}))}let k=Eb(S),E=[];if(k<6&&n){let D=new Date(S);D.setDate(D.getDate()+1);let z=cO(S);E.push(...vx({start:D,end:z}))}let _=[];if(!n&&L>0)for(let D=0;D<L;D++)_.push(null);return[...T,..._,...I,...E]})();return(0,Br.jsxs)("div",{className:P("moonui-theme","p-0",a),children:[(0,Br.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,Br.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,Br.jsx)(bn,{className:"h-5 w-5"})}),(0,Br.jsx)("h2",{className:"text-base font-medium",children:Wo(c,"MMMM yyyy")}),(0,Br.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,Br.jsx)(Fr,{className:"h-5 w-5"})})]}),(0,Br.jsxs)("div",{className:"px-6 pb-4",children:[(0,Br.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((b,S)=>(0,Br.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,Br.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((b,S)=>{if(!b)return(0,Br.jsx)("div",{className:"h-10 w-10"},`empty-${S}`);let I=!kO(b,c),L=o?.(b)||!1,T=x(b),k=MO(b),E=h(b),_=v(b),D=y(b);return(0,Br.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:Wo(b,"d")},b.toISOString())})})]})]})}Uc.displayName="Calendar";var Ol=R(M());var ds=R(N()),y9=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[r,o]of Object.entries(t))if(o.test(e))return r;return"unknown"},DO=(e,t)=>{let r=e.replace(/\s+/g,""),o=t==="amex"?[4,6,5]:[4,4,4,4],n="",a=0;for(let i of o){if(a>=r.length)break;n&&(n+=" "),n+=r.slice(a,a+i),a+=i}return n},Ab=Ol.forwardRef(({className:e,value:t="",onChange:r,showIcon:o=!0,size:n,...a},i)=>{let[s,l]=Ol.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=y9(d);l(f);let p=f==="amex"?15:16,g=d.slice(0,p),m=DO(g,f);r?.(g,f),c.target.value=m};return(0,ds.jsxs)("div",{className:"relative",children:[(0,ds.jsx)(cr,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:DO(t,s),onChange:u,className:P(o&&"pl-10",e),...a}),o&&(0,ds.jsx)(Nf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});Ab.displayName="CardNumberInput";var Db=Ol.forwardRef(({className:e,value:t="",onChange:r,size:o,...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)),r?.(u),l.target.value=c},s=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return(0,ds.jsx)(cr,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...n})});Db.displayName="CardExpiryInput";var Nb=Ol.forwardRef(({className:e,value:t="",onChange:r,cardType:o="unknown",size:n,...a},i)=>{let s=o==="amex"?4:3;return(0,ds.jsx)(cr,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-csc",placeholder:o==="amex"?"1234":"123",value:t,onChange:u=>{let c=u.target.value.replace(/\D/g,"").slice(0,s);r?.(c)},maxLength:s,className:e,...a})});Nb.displayName="CardCVCInput";var Ob=Ol.forwardRef(({className:e,value:t="",onChange:r,format:o="US",size:n,...a},i)=>{let s=u=>{let c=u.target.value;switch(o){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)}r?.(c.replace(/\s/g,"")),u.target.value=c};return(0,ds.jsx)(cr,{ref:i,type:"text",autoComplete:"postal-code",placeholder:(()=>{switch(o){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})});Ob.displayName="CardZipInput";var Pt=R(M());var jo=R(M(),1);function w9(e){return Object.prototype.toString.call(e)==="[object Object]"}function NO(e){return w9(e)||Array.isArray(e)}function FO(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function wx(e,t){let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;let n=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return n!==a?!1:r.every(i=>{let s=e[i],l=t[i];return typeof s=="function"?`${s}`==`${l}`:!NO(s)||!NO(l)?s===l:wx(s,l)})}function OO(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function _O(e,t){if(e.length!==t.length)return!1;let r=OO(e),o=OO(t);return r.every((n,a)=>{let i=o[a];return wx(n,i)})}function Vb(e){return typeof e=="number"}function Fb(e){return typeof e=="string"}function Cx(e){return typeof e=="boolean"}function VO(e){return Object.prototype.toString.call(e)==="[object Object]"}function vt(e){return Math.abs(e)}function Bb(e){return Math.sign(e)}function Jp(e,t){return vt(e-t)}function C9(e,t){if(e===0||t===0||vt(e)<=vt(t))return 0;let r=Jp(vt(e),vt(t));return vt(r/e)}function S9(e){return Math.round(e*100)/100}function em(e){return tm(e).map(Number)}function Dn(e){return e[om(e)]}function om(e){return Math.max(0,e.length-1)}function Hb(e,t){return t===om(e)}function BO(e,t=0){return Array.from(Array(e),(r,o)=>t+o)}function tm(e){return Object.keys(e)}function HO(e,t){return[e,t].reduce((r,o)=>(tm(o).forEach(n=>{let a=r[n],i=o[n],s=VO(a)&&VO(i);r[n]=s?HO(a,i):i}),r),{})}function _b(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function b9(e,t){let r={start:o,center:n,end:a};function o(){return 0}function n(l){return a(l)/2}function a(l){return t-l}function i(l,u){return Fb(e)?r[e](l):e(t,l,u)}return{measure:i}}function rm(){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),o}function r(){e=e.filter(n=>n())}let o={add:t,clear:r};return o}function R9(e,t,r,o){let n=rm(),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,r(),r());let h=x-i;for(i=x,s+=h;s>=a;)r(),s-=a;let v=s/a;o(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:r,render:o}}function I9(e,t){let r=t==="rtl",o=e==="y",n=o?"y":"x",a=o?"x":"y",i=!o&&r?-1:1,s=c(),l=d();function u(g){let{height:m,width:x}=g;return o?m:x}function c(){return o?"top":r?"right":"left"}function d(){return o?"bottom":r?"left":"right"}function f(g){return g*i}return{scroll:n,cross:a,startEdge:s,endEdge:l,measureSize:u,direction:f}}function Fl(e=0,t=0){let r=vt(e-t);function o(u){return u<e}function n(u){return u>t}function a(u){return o(u)||n(u)}function i(u){return a(u)?o(u)?e:t:u}function s(u){return r?u-r*Math.ceil((u-t)/r):u}return{length:r,max:t,min:e,constrain:i,reachedAny:a,reachedMax:n,reachedMin:o,removeOffset:s}}function UO(e,t,r){let{constrain:o}=Fl(0,e),n=e+1,a=i(t);function i(f){return r?vt((n+f)%n):o(f)}function s(){return a}function l(f){return a=i(f),d}function u(f){return c().set(s()+f)}function c(){return UO(e,s(),r)}let d={get:s,set:l,add:u,clone:c};return d}function P9(e,t,r,o,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=rm(),I=rm(),L=Fl(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){(Cx(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?r: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 re(){return(g?k:T)[A?"mouse":"touch"]}function Y(X,Ie){let J=d.add(Bb(X)*-1),ie=c.byDistance(X,!g).distance;return g||vt(X)<L?ie:x&&Ie?ie*.5:c.byIndex(J.get(),0).distance}function ce(X){let Ie=_b(X,o);A=Ie,B=g&&Ie&&!X.buttons&&_,_=Jp(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(!_b(X,o)&&X.touches.length>=2)return ne(X);let J=a.readPoint(X),ie=a.readPoint(X,y),Ge=Jp(J,D),Xe=Jp(ie,z);if(!O&&!A&&(!X.cancelable||(O=Ge>Xe,!O)))return ne(X);let kt=a.pointerMove(X);Ge>m&&(B=!0),u.useFriction(.3).useDuration(.75),s.start(),n.add(w(kt)),X.preventDefault()}function ne(X){let J=c.byDistance(0,!1).index!==d.get(),ie=a.pointerUp(X)*re(),Ge=Y(w(ie),J),Xe=C9(ie,Ge),kt=E-10*Xe,Oe=h+Xe/50;O=!1,F=!1,I.clear(),u.useDuration(kt).useFriction(Oe),l.distance(Ge,!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 L9(e,t){let o,n;function a(d){return d.timeStamp}function i(d,f){let g=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(_b(d,t)?d:d.touches[0])[g]}function s(d){return o=d,n=d,i(d)}function l(d){let f=i(d)-i(n),p=a(d)-a(o)>170;return n=d,p&&(o=d),f}function u(d){if(!o||!n)return 0;let f=i(n)-i(o),p=a(d)-a(o),g=a(d)-a(n)>170,m=f/p;return p&&!g&&vt(m)>.1?m:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:i}}function T9(){function e(r){let{offsetTop:o,offsetLeft:n,offsetWidth:a,offsetHeight:i}=r;return{top:o,right:n+a,bottom:o+i,left:n,width:a,height:i}}return{measure:e}}function k9(e){function t(o){return e*(o/100)}return{measure:t}}function M9(e,t,r,o,n,a,i){let s=[e].concat(o),l,u,c=[],d=!1;function f(x){return n.measureSize(i.measure(x))}function p(x){if(!a)return;u=f(e),c=o.map(f);function h(v){for(let y of v){if(d)return;let w=y.target===e,C=o.indexOf(y.target),b=w?u:c[C],S=f(w?e:o[C]);if(vt(S-b)>=.5){x.reInit(),t.emit("resize");break}}}l=new ResizeObserver(v=>{(Cx(a)||a(x,v))&&h(v)}),r.requestAnimationFrame(()=>{s.forEach(v=>l.observe(v))})}function g(){d=!0,l&&l.disconnect()}return{init:p,destroy:g}}function E9(e,t,r,o,n,a){let i=0,s=0,l=n,u=a,c=e.get(),d=0;function f(){let b=o.get()-e.get(),S=!l,I=0;return S?(i=0,r.set(o),e.set(o),I=b):(r.set(e),i+=b/l,i*=u,c+=i,e.add(i),I=c-d),s=Bb(I),d=c,C}function p(){let b=o.get()-t.get();return vt(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 A9(e,t,r,o,n){let a=n.measure(10),i=n.measure(50),s=Fl(.1,.99),l=!1;function u(){return!(l||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function c(p){if(!u())return;let g=e.reachedMin(t.get())?"min":"max",m=vt(e[g]-t.get()),x=r.get()-t.get(),h=s.constrain(m/i);r.subtract(x*h),!p&&vt(x)<a&&(r.set(e.constrain(r.get())),o.useDuration(25).useBaseFriction())}function d(p){l=!p}return{shouldConstrain:u,constrain:c,toggleActive:d}}function D9(e,t,r,o,n){let a=Fl(-t+e,0),i=d(),s=c(),l=f();function u(g,m){return Jp(g,m)<=1}function c(){let g=i[0],m=Dn(i),x=i.lastIndexOf(g),h=i.indexOf(m)+1;return Fl(x,h)}function d(){return r.map((g,m)=>{let{min:x,max:h}=a,v=a.constrain(g),y=!m,w=Hb(r,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(o==="keepSnaps")return i;let{min:g,max:m}=s;return i.slice(g,m)}return{snapsContained:l,scrollContainLimit:s}}function N9(e,t,r){let o=t[0],n=r?o-e:Dn(t);return{limit:Fl(n,o)}}function O9(e,t,r,o){let a=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:l}=Fl(a,i);function u(f){return f===1?l(r.get()):f===-1?s(r.get()):!1}function c(f){if(!u(f))return;let p=e*(f*-1);o.forEach(g=>g.add(p))}return{loop:c}}function F9(e){let{max:t,length:r}=e;function o(a){let i=a-t;return r?i/-r:0}return{get:o}}function _9(e,t,r,o,n){let{startEdge:a,endEdge:i}=e,{groupSlides:s}=n,l=d().map(t.measure),u=f(),c=p();function d(){return s(o).map(m=>Dn(m)[i]-m[0][a]).map(vt)}function f(){return o.map(m=>r[a]-m[a]).map(m=>-vt(m))}function p(){return s(u).map(m=>m[0]).map((m,x)=>m+l[x])}return{snaps:u,snapsAligned:c}}function V9(e,t,r,o,n,a){let{groupSlides:i}=n,{min:s,max:l}=o,u=c();function c(){let f=i(a),p=!e||t==="keepSnaps";return r.length===1?[a]:p?f:f.slice(s,l).map((g,m,x)=>{let h=!m,v=Hb(x,m);if(h){let y=Dn(x[0])+1;return BO(y)}if(v){let y=om(a)-Dn(x)[0]+1;return BO(y,Dn(x)[0])}return g})}return{slideRegistry:u}}function B9(e,t,r,o,n){let{reachedAny:a,removeOffset:i,constrain:s}=o;function l(g){return g.concat().sort((m,x)=>vt(m)-vt(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)=>vt(v.diff)-vt(y.diff)),{index:h}=x[0];return{index:h,distance:m}}function c(g,m){let x=[g,g+r,g-r];if(!e)return g;if(!m)return l(x);let h=x.filter(v=>Bb(v)===m);return h.length?l(h):Dn(x)-r}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 H9(e,t,r,o,n,a,i){function s(d){let f=d.distance,p=d.index!==t.get();a.add(f),f&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(r.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 U9(e,t,r,o,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=r.findIndex(y=>y.includes(m));Vb(v)&&(n.useDuration(0),o.index(v,0),i.emit("slideFocus"))}a.add(document,"keydown",d,!1),t.forEach((m,x)=>{a.add(m,"focus",h=>{(Cx(s)||s(p,h))&&g(x)},l)})}function d(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function Zp(e){let t=e;function r(){return t}function o(l){t=i(l)}function n(l){t+=i(l)}function a(l){t-=i(l)}function i(l){return Vb(l)?l:l.get()}return{get:r,set:o,add:n,subtract:a}}function zO(e,t){let r=e.scroll==="x"?i:s,o=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=S9(e.direction(f));p!==n&&(o.transform=r(p),n=p)}function u(f){a=!f}function c(){a||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function z9(e,t,r,o,n,a,i,s,l){let c=em(n),d=em(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-o[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:-r,_=L?r:0,D=L?"end":"start",z=T[k][D];return{index:k,loopPoint:z,slideLocation:Zp(-1),translate:zO(e,l[k]),target:()=>s.get()>z?E:_}})}function h(){let S=i[0],I=g(d,S);return x(I,r,!1)}function v(){let S=t-i[0]-1,I=g(c,S);return x(I,-r,!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 G9(e,t,r){let o,n=!1;function a(l){if(!r)return;function u(c){for(let d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(c=>{n||(Cx(r)||r(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),n=!0}return{init:a,destroy:i}}function W9(e,t,r,o){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,r.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(g=>s.observe(g))}function c(){s&&s.disconnect(),l=!0}function d(g){return tm(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 j9(e,t,r,o,n,a){let{measureSize:i,startEdge:s,endEdge:l}=e,u=r[0]&&n,c=g(),d=m(),f=r.map(i),p=x();function g(){if(!u)return 0;let v=r[0];return vt(t[s]-v[s])}function m(){if(!u)return 0;let v=a.getComputedStyle(Dn(o));return parseFloat(v.getPropertyValue(`margin-${l}`))}function x(){return r.map((v,y,w)=>{let C=!y,b=Hb(w,y);return C?f[y]+c:b?f[y]+d:w[y+1][s]-v[s]}).map(vt)}return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}function $9(e,t,r,o,n,a,i,s,l){let{startEdge:u,endEdge:c,direction:d}=e,f=Vb(r);function p(h,v){return em(h).filter(y=>y%v===0).map(y=>h.slice(y,y+v))}function g(h){return h.length?em(h).reduce((v,y,w)=>{let C=Dn(v)||0,b=C===0,S=y===om(h),I=n[u]-a[C][u],L=n[u]-a[y][c],T=!o&&b?d(i):0,k=!o&&S?d(s):0,E=vt(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,r):g(h)}return{groupSlides:m}}function q9(e,t,r,o,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=T9(),L=I.measure(t),T=r.map(I.measure),k=I9(l,u),E=k.measureSize(L),_=k9(E),D=b9(s,E),z=!d&&!!v,F=d||!!v,{slideSizes:O,slideSizesWithGaps:B,startGap:A,endGap:te}=j9(k,L,T,r,F,n),ae=$9(k,E,x,d,L,T,A,te,S),{snaps:V,snapsAligned:Q}=_9(k,D,L,T,ae),re=-Dn(V)+Dn(B),{snapsContained:Y,scrollContainLimit:ce}=D9(E,re,Q,v,S),U=z?Y:Q,{limit:ne}=N9(re,U,d),he=UO(om(U),c,d),xe=he.clone(),pe=em(r),X=({dragHandler:Ci,scrollBody:Id,scrollBounds:Pd,options:{loop:Eo}})=>{Eo||Pd.constrain(Ci.pointerDown()),Id.seek()},Ie=({scrollBody:Ci,translate:Id,location:Pd,offsetLocation:Eo,previousLocation:Ld,scrollLooper:c0,slideLooper:q4,dragHandler:K4,animation:X4,eventHandler:LT,scrollBounds:Y4,options:{loop:TT}},kT)=>{let MT=Ci.settled(),Q4=!Y4.shouldConstrain(),ET=TT?MT:MT&&Q4,AT=ET&&!K4.pointerDown();AT&&X4.stop();let Z4=Pd.get()*kT+Ld.get()*(1-kT);Eo.set(Z4),TT&&(c0.loop(Ci.direction()),q4.loop()),Id.to(Eo.get()),AT&<.emit("settle"),ET||LT.emit("scroll")},J=R9(o,n,()=>X(fu),Ci=>Ie(fu,Ci)),ie=.68,Ge=U[he.get()],Xe=Zp(Ge),kt=Zp(Ge),Oe=Zp(Ge),bt=Zp(Ge),Xn=E9(Xe,Oe,kt,bt,f,ie),Er=B9(d,U,re,ne,bt),fn=H9(J,he,xe,Xn,Er,bt,i),Mo=F9(ne),pn=rm(),Yn=W9(t,r,i,m),{slideRegistry:Qn}=V9(z,v,U,ce,ae,pe),ag=U9(e,r,Qn,fn,Xn,pn,i,b),fu={ownerDocument:o,ownerWindow:n,eventHandler:i,containerRect:L,slideRects:T,animation:J,axis:k,dragHandler:P9(k,e,o,n,bt,L9(k,n),Xe,J,fn,Xn,Er,he,i,_,p,g,h,ie,C),eventStore:pn,percentOfView:_,index:he,indexPrevious:xe,limit:ne,location:Xe,offsetLocation:Oe,previousLocation:kt,options:a,resizeHandler:M9(t,i,n,r,k,y,I),scrollBody:Xn,scrollBounds:A9(ne,Oe,bt,Xn,_),scrollLooper:O9(re,ne,Oe,[Xe,Oe,kt,bt]),scrollProgress:Mo,scrollSnapList:U.map(Mo.get),scrollSnaps:U,scrollTarget:Er,scrollTo:fn,slideLooper:z9(k,E,re,O,B,V,U,Oe,r),slideFocus:ag,slidesHandler:G9(t,i,w),slidesInView:Yn,slideIndexes:pe,slideRegistry:Qn,slidesToScroll:ae,target:bt,translate:zO(k,t)};return fu}function K9(){let e={},t;function r(u){t=u}function o(u){return e[u]||[]}function n(u){return o(u).forEach(c=>c(t,u)),l}function a(u,c){return e[u]=o(u).concat([c]),l}function i(u,c){return e[u]=o(u).filter(d=>d!==c),l}function s(){e={}}let l={init:r,emit:n,off:i,on:a,clear:s};return l}var X9={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 Y9(e){function t(a,i){return HO(a,i||{})}function r(a){let i=a.breakpoints||{},s=tm(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(a,s)}function o(a){return a.map(i=>tm(i.breakpoints||{})).reduce((i,s)=>i.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:o}}function Q9(e){let t=[];function r(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 o(){t=t.filter(a=>a.destroy())}return{init:r,destroy:o}}function nm(e,t,r){let o=e.ownerDocument,n=o.defaultView,a=Y9(n),i=Q9(a),s=rm(),l=K9(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=a,{on:f,off:p,emit:g}=l,m=k,x=!1,h,v=u(X9,nm.globalOptions),y=u(v),w=[],C,b,S;function I(){let{container:pe,slides:X}=y;b=(Fb(pe)?e.querySelector(pe):pe)||e.children[0];let J=Fb(X)?b.querySelectorAll(X):X;S=[].slice.call(J||b.children)}function L(pe){let X=q9(e,b,S,o,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 re(){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:re};return T(t,r),setTimeout(()=>l.emit("init"),0),xe}nm.globalOptions=void 0;function Sx(e={},t=[]){let r=(0,jo.useRef)(e),o=(0,jo.useRef)(t),[n,a]=(0,jo.useState)(),[i,s]=(0,jo.useState)(),l=(0,jo.useCallback)(()=>{n&&n.reInit(r.current,o.current)},[n]);return(0,jo.useEffect)(()=>{wx(r.current,e)||(r.current=e,l())},[e,l]),(0,jo.useEffect)(()=>{_O(o.current,t)||(o.current=t,l())},[t,l]),(0,jo.useEffect)(()=>{if(FO()&&i){nm.globalOptions=Sx.globalOptions;let u=nm(i,r.current,o.current);return a(u),()=>u.destroy()}else a(void 0)},[i,a]),[s,n]}Sx.globalOptions=void 0;var Co=R(N()),GO=Pt.createContext(null);function zc(){let e=Pt.useContext(GO);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Ub=Pt.forwardRef(({orientation:e="horizontal",opts:t,setApi:r,plugins:o,className:n,children:a,...i},s)=>{let l=e||(t?.axis==="y"?"vertical":"horizontal"),[u,c]=Sx({...t,axis:l==="horizontal"?"x":"y"},o),[d,f]=Pt.useState(!1),[p,g]=Pt.useState(!1),m=Pt.useCallback(y=>{y&&(f(y.canScrollPrev()),g(y.canScrollNext()))},[]),x=Pt.useCallback(()=>{c?.scrollPrev()},[c]),h=Pt.useCallback(()=>{c?.scrollNext()},[c]),v=Pt.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 Pt.useEffect(()=>{!c||!r||r(c)},[c,r]),Pt.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,Co.jsx)(GO.Provider,{value:{carouselRef:u,api:c,opts:t,scrollPrev:x,scrollNext:h,canScrollPrev:d,canScrollNext:p,orientation:l},children:(0,Co.jsx)("div",{ref:s,onKeyDownCapture:v,className:P("moonui-theme","relative",n),role:"region","aria-roledescription":"carousel",...i,children:a})})});Ub.displayName="Carousel";var zb=K("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),Gb=Pt.forwardRef(({className:e,...t},r)=>{let{carouselRef:o,orientation:n}=zc();return(0,Co.jsx)("div",{ref:o,className:"overflow-hidden",children:(0,Co.jsx)("div",{ref:r,className:P(zb({orientation:n}),e),...t})})});Gb.displayName="CarouselContent";var Wb=K("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),jb=Pt.forwardRef(({className:e,...t},r)=>{let{orientation:o}=zc();return(0,Co.jsx)("div",{ref:r,role:"group","aria-roledescription":"slide",className:P(Wb({orientation:o}),e),...t})});jb.displayName="CarouselItem";var $b=Pt.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollPrev:i,canScrollPrev:s}=zc();return(0,Co.jsxs)(Ee,{ref:n,variant:t,size:r,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,...o,children:[(0,Co.jsx)(Lf,{className:"h-4 w-4","aria-hidden":"true"}),(0,Co.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});$b.displayName="CarouselPrevious";var qb=Pt.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollNext:i,canScrollNext:s}=zc();return(0,Co.jsxs)(Ee,{ref:n,variant:t,size:r,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,...o,children:[(0,Co.jsx)(Tf,{className:"h-4 w-4","aria-hidden":"true"}),(0,Co.jsx)("span",{className:"sr-only",children:"Next slide"})]})});qb.displayName="CarouselNext";var _l=R(M());var Hr=R(M(),1);var bx=R(M(),1);function Gc(e){let t=bx.useRef({value:e,previous:e});return bx.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var WO=R(M(),1);function Wc(e){let[t,r]=WO.useState(void 0);return Ve(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let o=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;r({width:i,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}var So=R(N(),1),Rx="Checkbox",[Z9,wIe]=Fe(Rx),[J9,Kb]=Z9(Rx);function e7(e){let{__scopeCheckbox:t,checked:r,children:o,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:r,defaultProp:n??!1,onChange:l,caller:Rx}),[g,m]=Hr.useState(null),[x,h]=Hr.useState(null),v=Hr.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:fs(n)?!1:n,isFormControl:y,bubbleInput:x,setBubbleInput:h};return(0,So.jsx)(J9,{scope:t,...w,children:t7(d)?d(w):o})}var jO="CheckboxTrigger",$O=Hr.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...o},n)=>{let{control:a,value:i,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:g}=Kb(jO,e),m=de(n,c),x=Hr.useRef(l);return Hr.useEffect(()=>{let h=a?.form;if(h){let v=()=>d(x.current);return h.addEventListener("reset",v),()=>h.removeEventListener("reset",v)}},[a,d]),(0,So.jsx)(q.button,{type:"button",role:"checkbox","aria-checked":fs(l)?"mixed":l,"aria-required":u,"data-state":YO(l),"data-disabled":s?"":void 0,disabled:s,value:i,...o,ref:m,onKeyDown:W(t,h=>{h.key==="Enter"&&h.preventDefault()}),onClick:W(r,h=>{d(v=>fs(v)?!0:!v),g&&p&&(f.current=h.isPropagationStopped(),f.current||h.stopPropagation())})})});$O.displayName=jO;var Ix=Hr.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:o,checked:n,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return(0,So.jsx)(e7,{__scopeCheckbox:r,checked:n,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:o,form:c,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,So.jsxs)(So.Fragment,{children:[(0,So.jsx)($O,{...d,ref:t,__scopeCheckbox:r}),f&&(0,So.jsx)(XO,{__scopeCheckbox:r})]})})});Ix.displayName=Rx;var qO="CheckboxIndicator",Xb=Hr.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:o,...n}=e,a=Kb(qO,r);return(0,So.jsx)(ut,{present:o||fs(a.checked)||a.checked===!0,children:(0,So.jsx)(q.span,{"data-state":YO(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});Xb.displayName=qO;var KO="CheckboxBubbleInput",XO=Hr.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:o,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:i,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:p}=Kb(KO,e),g=de(r,p),m=Gc(a),x=Wc(o);Hr.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=fs(a),C.call(v,fs(a)?!1:a),v.dispatchEvent(S)}},[f,m,a,n]);let h=Hr.useRef(fs(a)?!1:a);return(0,So.jsx)(q.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%)"}})});XO.displayName=KO;function t7(e){return typeof e=="function"}function fs(e){return e==="indeterminate"}function YO(e){return fs(e)?"indeterminate":e?"checked":"unchecked"}var $o=R(N()),o7=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"}}),Px=_l.forwardRef(({className:e,variant:t,size:r,radius:o,animation:n,indeterminate:a=!1,icon:i,checked:s,...l},u)=>(0,$o.jsx)(Ix,{ref:u,checked:a?"indeterminate":s,className:P("moonui-theme",o7({variant:t,size:r,radius:o,animation:n}),e),...l,children:(0,$o.jsx)(Xb,{className:P("flex items-center justify-center text-current",n==="bounce"&&"data-[state=checked]:animate-bounce"),children:a?(0,$o.jsx)(Wf,{className:"h-[65%] w-[65%]"}):i||(0,$o.jsx)(yr,{className:"h-[65%] w-[65%]"})})}));Px.displayName=Ix.displayName;var Yb=_l.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:o,...n},a)=>(0,$o.jsx)("div",{ref:a,className:P("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...n,children:o}));Yb.displayName="CheckboxGroup";var am=_l.forwardRef(({className:e,htmlFor:t,children:r,position:o="end",disabled:n=!1,...a},i)=>(0,$o.jsx)("label",{ref:i,htmlFor:t,className:P("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",o==="start"?"mr-2":"ml-2",n&&"cursor-not-allowed opacity-70",e),...a,children:r}));am.displayName="CheckboxLabel";var Qb=_l.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:o,...n},a)=>{let i=_l.useId(),s=e||i;return(0,$o.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,$o.jsx)(am,{htmlFor:s,position:"start",disabled:n.disabled,className:o,children:t}),(0,$o.jsx)(Px,{ref:a,id:s,...n}),r==="end"&&(0,$o.jsx)(am,{htmlFor:s,position:"end",disabled:n.disabled,className:o,children:t})]})});Qb.displayName="CheckboxWithLabel";var Jb=R(M());var Vl=R(N()),QO=Oh,Zb=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"}}),eR=Jb.forwardRef(({className:e,children:t,variant:r,size:o,asChild:n,...a},i)=>n?(0,Vl.jsx)(ju,{ref:i,className:P("moonui-theme",Zb({variant:r,size:o}),e),asChild:n,...a,children:t}):(0,Vl.jsxs)(ju,{ref:i,className:P("moonui-theme",Zb({variant:r,size:o}),e),...a,children:[t,(0,Vl.jsx)(sa,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));eR.displayName=ju.displayName;var ZO=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"}}),tR=Jb.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>(0,Vl.jsx)(Cf,{ref:a,className:P("moonui-theme",ZO({variant:r,size:o}),e),...n,children:(0,Vl.jsx)("div",{className:"p-4",children:t})}));tR.displayName=Cf.displayName;var Zo=R(M());var ri=R(M());var bo=R(N()),n7=K("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),a7=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}}),cr=ri.forwardRef(({className:e,wrapperClassName:t,messageClassName:r,variant:o,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=ri.useId(),T=S.id||L,[k,E]=ri.useState(!1),[_,D]=ri.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)};ri.useEffect(()=>{h!==void 0&&D(h)},[h]);let te=p||s||l,ae=s?"error":l?"success":"normal";return(0,bo.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,bo.jsxs)("div",{className:P("moonui-theme",n7({size:n}),t),children:[m&&g&&(0,bo.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,bo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,bo.jsx)(Ht,{className:"h-4 w-4 animate-spin"}):c}),(0,bo.jsx)("input",{className:P(a7({variant:o,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,bo.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,bo.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,bo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,bo.jsx)(Ht,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),te&&(0,bo.jsx)("p",{className:P("text-xs transition-all",ae==="error"&&"text-error",ae==="success"&&"text-success",ae==="normal"&&"text-muted-foreground",r),id:s?`${T}-error`:l?`${T}-success`:void 0,children:s||l||""})]})});cr.displayName="Input";var rF=R(M());var JO=R(M(),1);var eF=R(N(),1),i7="Label",tF=JO.forwardRef((e,t)=>(0,eF.jsx)(q.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));tF.displayName=i7;var rR=tF;var oF=R(N()),l7=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"),Ur=rF.forwardRef(({className:e,...t},r)=>(0,oF.jsx)(rR,{ref:r,className:P(l7(),e),...t}));Ur.displayName=rR.displayName;var pV=R(M());var dt=R(M(),1);var xt=R(M(),1);var nF=R(M(),1);function aF(e,t=globalThis?.document){let r=nt(e);nF.useEffect(()=>{let o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var nR=R(N(),1),u7="DismissableLayer",oR="dismissableLayer.update",c7="dismissableLayer.pointerDownOutside",d7="dismissableLayer.focusOutside",iF,lF=xt.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qo=xt.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=xt.useContext(lF),[c,d]=xt.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=xt.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=p7(S=>{let I=S.target,L=[...u.branches].some(T=>T.contains(I));!w||L||(n?.(S),i?.(S),S.defaultPrevented||s?.())},f),b=m7(S=>{let I=S.target;[...u.branches].some(T=>T.contains(I))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return aF(S=>{v===u.layers.size-1&&(o?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),xt.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(iF=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),sF(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=iF)}},[c,f,r,u]),xt.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),sF())},[c,u]),xt.useEffect(()=>{let S=()=>p({});return document.addEventListener(oR,S),()=>document.removeEventListener(oR,S)},[]),(0,nR.jsx)(q.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)})});qo.displayName=u7;var f7="DismissableLayerBranch",uF=xt.forwardRef((e,t)=>{let r=xt.useContext(lF),o=xt.useRef(null),n=de(t,o);return xt.useEffect(()=>{let a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,nR.jsx)(q.div,{...e,ref:n})});uF.displayName=f7;function p7(e,t=globalThis?.document){let r=nt(e),o=xt.useRef(!1),n=xt.useRef(()=>{});return xt.useEffect(()=>{let a=s=>{if(s.target&&!o.current){let u=function(){cF(c7,r,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);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function m7(e,t=globalThis?.document){let r=nt(e),o=xt.useRef(!1);return xt.useEffect(()=>{let n=a=>{a.target&&!o.current&&cF(d7,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function sF(){let e=new CustomEvent(oR);document.dispatchEvent(e)}function cF(e,t,r,{discrete:o}){let n=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?Wu(n,a):n.dispatchEvent(a)}var dF=qo,fF=uF;var mF=R(M(),1),aR=0;function ps(){mF.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??pF()),document.body.insertAdjacentElement("beforeend",e[1]??pF()),aR++,()=>{aR===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),aR--}},[])}function pF(){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 Ko=R(M(),1);var yF=R(N(),1),iR="focusScope.autoFocusOnMount",sR="focusScope.autoFocusOnUnmount",gF={bubbles:!1,cancelable:!0},h7="FocusScope",oi=Ko.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=Ko.useState(null),u=nt(n),c=nt(a),d=Ko.useRef(null),f=de(t,m=>l(m)),p=Ko.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Ko.useEffect(()=>{if(o){let v=function(b){if(p.paused||!s)return;let S=b.target;s.contains(S)?d.current=S:ms(d.current,{select:!0})},y=function(b){if(p.paused||!s)return;let S=b.relatedTarget;S!==null&&(s.contains(S)||ms(d.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(let I of b)I.removedNodes.length>0&&ms(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()}}},[o,s,p.paused]),Ko.useEffect(()=>{if(s){vF.add(p);let m=document.activeElement;if(!s.contains(m)){let h=new CustomEvent(iR,gF);s.addEventListener(iR,u),s.dispatchEvent(h),h.defaultPrevented||(v7(S7(wF(s)),{select:!0}),document.activeElement===m&&ms(s))}return()=>{s.removeEventListener(iR,u),setTimeout(()=>{let h=new CustomEvent(sR,gF);s.addEventListener(sR,c),s.dispatchEvent(h),h.defaultPrevented||ms(m??document.body,{select:!0}),s.removeEventListener(sR,c),vF.remove(p)},0)}}},[s,u,c,p]);let g=Ko.useCallback(m=>{if(!r&&!o||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]=x7(v);y&&w?!m.shiftKey&&h===w?(m.preventDefault(),r&&ms(y,{select:!0})):m.shiftKey&&h===y&&(m.preventDefault(),r&&ms(w,{select:!0})):h===v&&m.preventDefault()}},[r,o,p.paused]);return(0,yF.jsx)(q.div,{tabIndex:-1,...i,ref:f,onKeyDown:g})});oi.displayName=h7;function v7(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(ms(o,{select:t}),document.activeElement!==r)return}function x7(e){let t=wF(e),r=hF(t,e),o=hF(t.reverse(),e);return[r,o]}function wF(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function hF(e,t){for(let r of e)if(!y7(r,{upTo:t}))return r}function y7(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 w7(e){return e instanceof HTMLInputElement&&"select"in e}function ms(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&w7(e)&&t&&e.select()}}var vF=C7();function C7(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=xF(e,t),e.unshift(t)},remove(t){e=xF(e,t),e[0]?.resume()}}}function xF(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function S7(e){return e.filter(t=>t.tagName!=="A")}var io=R(M(),1);var bF=["top","right","bottom","left"];var ha=Math.min,zr=Math.max,sm=Math.round,lm=Math.floor,Nn=e=>({x:e,y:e}),b7={left:"right",right:"left",bottom:"top",top:"bottom"},R7={start:"end",end:"start"};function Tx(e,t,r){return zr(e,ha(t,r))}function va(e,t){return typeof e=="function"?e(t):e}function xa(e){return e.split("-")[0]}function Bl(e){return e.split("-")[1]}function kx(e){return e==="x"?"y":"x"}function Mx(e){return e==="y"?"height":"width"}var I7=new Set(["top","bottom"]);function On(e){return I7.has(xa(e))?"y":"x"}function Ex(e){return kx(On(e))}function RF(e,t,r){r===void 0&&(r=!1);let o=Bl(e),n=Ex(e),a=Mx(n),i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=im(i)),[i,im(i)]}function IF(e){let t=im(e);return[Lx(e),t,Lx(t)]}function Lx(e){return e.replace(/start|end/g,t=>R7[t])}var CF=["left","right"],SF=["right","left"],P7=["top","bottom"],L7=["bottom","top"];function T7(e,t,r){switch(e){case"top":case"bottom":return r?t?SF:CF:t?CF:SF;case"left":case"right":return t?P7:L7;default:return[]}}function PF(e,t,r,o){let n=Bl(e),a=T7(xa(e),r==="start",o);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(Lx)))),a}function im(e){return e.replace(/left|right|bottom|top/g,t=>b7[t])}function k7(e){return{top:0,right:0,bottom:0,left:0,...e}}function lR(e){return typeof e!="number"?k7(e):{top:e,right:e,bottom:e,left:e}}function Hl(e){let{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function LF(e,t,r){let{reference:o,floating:n}=e,a=On(t),i=Ex(t),s=Mx(i),l=xa(t),u=a==="y",c=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,f=o[s]/2-n[s]/2,p;switch(l){case"top":p={x:c,y:o.y-n.height};break;case"bottom":p={x:c,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-n.width,y:d};break;default:p={x:o.x,y:o.y}}switch(Bl(t)){case"start":p[i]-=f*(r&&u?-1:1);break;case"end":p[i]+=f*(r&&u?-1:1);break}return p}var MF=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:i}=r,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}=LF(u,o,l),f=o,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:o,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}=LF(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:n,middlewareData:p}};async function jc(e,t){var r;t===void 0&&(t={});let{x:o,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}=va(t,e),g=lR(p),x=s[f?d==="floating"?"reference":"floating":d],h=Hl(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:o,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=Hl(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 EF=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:n,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=va(e,t)||{};if(u==null)return{};let d=lR(c),f={x:r,y:o},p=Ex(n),g=Mx(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=ha(d[h],L),k=ha(d[v],L),E=T,_=S-m[g]-k,D=S/2-m[g]/2+I,z=Tx(E,D,_),F=!l.arrow&&Bl(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 AF=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;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}=va(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let h=xa(n),v=On(s),y=xa(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(y||!m?[im(s)]:IF(s)),b=g!=="none";!f&&b&&C.push(...PF(s,m,g,w));let S=[s,...C],I=await jc(t,x),L=[],T=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&L.push(I[h]),d){let D=RF(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!==On(z):!1)||T.every(B=>On(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=On(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 TF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kF(e){return bF.some(t=>e[t]>=0)}var DF=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...n}=va(e,t);switch(o){case"referenceHidden":{let a=await jc(t,{...n,elementContext:"reference"}),i=TF(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:kF(i)}}}case"escaped":{let a=await jc(t,{...n,altBoundary:!0}),i=TF(a,r.floating);return{data:{escapedOffsets:i,escaped:kF(i)}}}default:return{}}}}};var NF=new Set(["left","top"]);async function M7(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=xa(r),s=Bl(r),l=On(r)==="y",u=NF.has(i)?-1:1,c=a&&l?-1:1,d=va(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 OF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:a,placement:i,middlewareData:s}=t,l=await M7(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:i}}}}},FF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,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}=va(e,t),u={x:r,y:o},c=await jc(t,l),d=On(xa(n)),f=kx(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-r,y:m.y-o,enabled:{[f]:a,[d]:i}}}}}},_F=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:o,placement:n,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=va(e,t),c={x:r,y:o},d=On(n),f=kx(d),p=c[f],g=c[d],m=va(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=NF.has(xa(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}}}},VF=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:n,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=va(e,t),c=await jc(t,u),d=xa(n),f=Bl(n),p=On(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=ha(m-c[x],v),C=ha(g-c[h],y),b=!t.middlewareData.shift,S=w,I=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=v),b&&!f){let T=zr(c.left,0),k=zr(c.right,0),E=zr(c.top,0),_=zr(c.bottom,0);p?I=g-2*(T!==0||k!==0?T+k:zr(c.left,c.right)):S=m-2*(E!==0||_!==0?E+_:zr(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 zl(e){return HF(e)?(e.nodeName||"").toLowerCase():"#document"}function ao(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fn(e){var t;return(t=(HF(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function HF(e){return Ax()?e instanceof Node||e instanceof ao(e).Node:!1}function Xo(e){return Ax()?e instanceof Element||e instanceof ao(e).Element:!1}function _n(e){return Ax()?e instanceof HTMLElement||e instanceof ao(e).HTMLElement:!1}function BF(e){return!Ax()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ao(e).ShadowRoot}var E7=new Set(["inline","contents"]);function $c(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Yo(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!E7.has(n)}var A7=new Set(["table","td","th"]);function UF(e){return A7.has(zl(e))}var D7=[":popover-open",":modal"];function um(e){return D7.some(t=>{try{return e.matches(t)}catch{return!1}})}var N7=["transform","translate","scale","rotate","perspective"],O7=["transform","translate","scale","rotate","perspective","filter"],F7=["paint","layout","strict","content"];function Dx(e){let t=Nx(),r=Xo(e)?Yo(e):e;return N7.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||O7.some(o=>(r.willChange||"").includes(o))||F7.some(o=>(r.contain||"").includes(o))}function zF(e){let t=ni(e);for(;_n(t)&&!Gl(t);){if(Dx(t))return t;if(um(t))return null;t=ni(t)}return null}function Nx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var _7=new Set(["html","body","#document"]);function Gl(e){return _7.has(zl(e))}function Yo(e){return ao(e).getComputedStyle(e)}function cm(e){return Xo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ni(e){if(zl(e)==="html")return e;let t=e.assignedSlot||e.parentNode||BF(e)&&e.host||Fn(e);return BF(t)?t.host:t}function GF(e){let t=ni(e);return Gl(t)?e.ownerDocument?e.ownerDocument.body:e.body:_n(t)&&$c(t)?t:GF(t)}function Ul(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=GF(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),i=ao(n);if(a){let s=Ox(i);return t.concat(i,i.visualViewport||[],$c(n)?n:[],s&&r?Ul(s):[])}return t.concat(n,Ul(n,[],r))}function Ox(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qF(e){let t=Yo(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=_n(e),a=n?e.offsetWidth:r,i=n?e.offsetHeight:o,s=sm(r)!==a||sm(o)!==i;return s&&(r=a,o=i),{width:r,height:o,$:s}}function cR(e){return Xo(e)?e:e.contextElement}function qc(e){let t=cR(e);if(!_n(t))return Nn(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=qF(t),i=(a?sm(r.width):r.width)/o,s=(a?sm(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var V7=Nn(0);function KF(e){let t=ao(e);return!Nx()||!t.visualViewport?V7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function B7(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ao(e)?!1:t}function Wl(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=cR(e),i=Nn(1);t&&(o?Xo(o)&&(i=qc(o)):i=qc(e));let s=B7(a,r,o)?KF(a):Nn(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=ao(a),p=o&&Xo(o)?ao(o):o,g=f,m=Ox(g);for(;m&&o&&p!==g;){let x=qc(m),h=m.getBoundingClientRect(),v=Yo(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=ao(m),m=Ox(g)}}return Hl({width:c,height:d,x:l,y:u})}function Fx(e,t){let r=cm(e).scrollLeft;return t?t.left+r:Wl(Fn(e)).left+r}function XF(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Fx(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function H7(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",i=Fn(o),s=t?um(t.floating):!1;if(o===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=Nn(1),c=Nn(0),d=_n(o);if((d||!d&&!a)&&((zl(o)!=="body"||$c(i))&&(l=cm(o)),_n(o))){let p=Wl(o);u=qc(o),c.x=p.x+o.clientLeft,c.y=p.y+o.clientTop}let f=i&&!d&&!a?XF(i,l):Nn(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function U7(e){return Array.from(e.getClientRects())}function z7(e){let t=Fn(e),r=cm(e),o=e.ownerDocument.body,n=zr(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=zr(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-r.scrollLeft+Fx(e),s=-r.scrollTop;return Yo(o).direction==="rtl"&&(i+=zr(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}var WF=25;function G7(e,t){let r=ao(e),o=Fn(e),n=r.visualViewport,a=o.clientWidth,i=o.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let c=Nx();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let u=Fx(o);if(u<=0){let c=o.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(o.clientWidth-d.clientWidth-p);g<=WF&&(a-=g)}else u<=WF&&(a+=u);return{width:a,height:i,x:s,y:l}}var W7=new Set(["absolute","fixed"]);function j7(e,t){let r=Wl(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=_n(e)?qc(e):Nn(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=n*a.x,u=o*a.y;return{width:i,height:s,x:l,y:u}}function jF(e,t,r){let o;if(t==="viewport")o=G7(e,r);else if(t==="document")o=z7(Fn(e));else if(Xo(t))o=j7(t,r);else{let n=KF(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Hl(o)}function YF(e,t){let r=ni(e);return r===t||!Xo(r)||Gl(r)?!1:Yo(r).position==="fixed"||YF(r,t)}function $7(e,t){let r=t.get(e);if(r)return r;let o=Ul(e,[],!1).filter(s=>Xo(s)&&zl(s)!=="body"),n=null,a=Yo(e).position==="fixed",i=a?ni(e):e;for(;Xo(i)&&!Gl(i);){let s=Yo(i),l=Dx(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&W7.has(n.position)||$c(i)&&!l&&YF(e,i))?o=o.filter(c=>c!==i):n=s,i=ni(i)}return t.set(e,o),o}function q7(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,i=[...r==="clippingAncestors"?um(t)?[]:$7(t,this._c):[].concat(r),o],s=i[0],l=i.reduce((u,c)=>{let d=jF(t,c,n);return u.top=zr(d.top,u.top),u.right=ha(d.right,u.right),u.bottom=ha(d.bottom,u.bottom),u.left=zr(d.left,u.left),u},jF(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function K7(e){let{width:t,height:r}=qF(e);return{width:t,height:r}}function X7(e,t,r){let o=_n(t),n=Fn(t),a=r==="fixed",i=Wl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=Nn(0);function u(){l.x=Fx(n)}if(o||!o&&!a)if((zl(t)!=="body"||$c(n))&&(s=cm(t)),o){let p=Wl(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else n&&u();a&&!o&&n&&u();let c=n&&!o&&!a?XF(n,s):Nn(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 uR(e){return Yo(e).position==="static"}function $F(e,t){if(!_n(e)||Yo(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Fn(e)===r&&(r=r.ownerDocument.body),r}function QF(e,t){let r=ao(e);if(um(e))return r;if(!_n(e)){let n=ni(e);for(;n&&!Gl(n);){if(Xo(n)&&!uR(n))return n;n=ni(n)}return r}let o=$F(e,t);for(;o&&UF(o)&&uR(o);)o=$F(o,t);return o&&Gl(o)&&uR(o)&&!Dx(o)?r:o||zF(e)||r}var Y7=async function(e){let t=this.getOffsetParent||QF,r=this.getDimensions,o=await r(e.floating);return{reference:X7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Q7(e){return Yo(e).direction==="rtl"}var ZF={convertOffsetParentRelativeRectToViewportRelativeRect:H7,getDocumentElement:Fn,getClippingRect:q7,getOffsetParent:QF,getElementRects:Y7,getClientRects:U7,getDimensions:K7,getScale:qc,isElement:Xo,isRTL:Q7};function JF(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Z7(e,t){let r=null,o,n=Fn(e);function a(){var s;clearTimeout(o),(s=r)==null||s.disconnect(),r=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=lm(d),m=lm(n.clientWidth-(c+f)),x=lm(n.clientHeight-(d+p)),h=lm(c),y={rootMargin:-g+"px "+-m+"px "+-x+"px "+-h+"px",threshold:zr(0,ha(1,l))||1},w=!0;function C(b){let S=b[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!JF(u,e.getBoundingClientRect())&&i(),w=!1}try{r=new IntersectionObserver(C,{...y,root:n.ownerDocument})}catch{r=new IntersectionObserver(C,y)}r.observe(e)}return i(!0),a}function dR(e,t,r,o){o===void 0&&(o={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=cR(e),c=n||a?[...u?Ul(u):[],...Ul(t)]:[];c.forEach(h=>{n&&h.addEventListener("scroll",r,{passive:!0}),a&&h.addEventListener("resize",r)});let d=u&&s?Z7(u,r):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)})),r()}),u&&!l&&p.observe(u),p.observe(t));let g,m=l?Wl(e):null;l&&x();function x(){let h=Wl(e);m&&!JF(m,h)&&r(),m=h,g=requestAnimationFrame(x)}return r(),()=>{var h;c.forEach(v=>{n&&v.removeEventListener("scroll",r),a&&v.removeEventListener("resize",r)}),d?.(),(h=p)==null||h.disconnect(),p=null,l&&cancelAnimationFrame(g)}}var e_=OF;var t_=FF,r_=AF,o_=VF,n_=DF,fR=EF;var a_=_F,pR=(e,t,r)=>{let o=new Map,n={platform:ZF,...r},a={...n.platform,_c:o};return MF(e,t,{...n,platform:a})};var Et=R(M(),1),s_=R(M(),1),l_=R(Va(),1),J7=typeof document<"u",eK=function(){},_x=J7?s_.useLayoutEffect:eK;function Vx(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 r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!Vx(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){let a=n[o];if(!(a==="_owner"&&e.$$typeof)&&!Vx(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function u_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function i_(e,t){let r=u_(e);return Math.round(t*r)/r}function mR(e){let t=Et.useRef(e);return _x(()=>{t.current=e}),t}function c_(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=Et.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Et.useState(o);Vx(f,o)||p(o);let[g,m]=Et.useState(null),[x,h]=Et.useState(null),v=Et.useCallback(B=>{B!==b.current&&(b.current=B,m(B))},[]),y=Et.useCallback(B=>{B!==S.current&&(S.current=B,h(B))},[]),w=a||g,C=i||x,b=Et.useRef(null),S=Et.useRef(null),I=Et.useRef(c),L=l!=null,T=mR(l),k=mR(n),E=mR(u),_=Et.useCallback(()=>{if(!b.current||!S.current)return;let B={placement:t,strategy:r,middleware:f};k.current&&(B.platform=k.current),pR(b.current,S.current,B).then(A=>{let te={...A,isPositioned:E.current!==!1};D.current&&!Vx(I.current,te)&&(I.current=te,l_.flushSync(()=>{d(te)}))})},[f,t,r,k,E]);_x(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);let D=Et.useRef(!1);_x(()=>(D.current=!0,()=>{D.current=!1}),[]),_x(()=>{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=Et.useMemo(()=>({reference:b,floating:S,setReference:v,setFloating:y}),[v,y]),F=Et.useMemo(()=>({reference:w,floating:C}),[w,C]),O=Et.useMemo(()=>{let B={position:r,left:0,top:0};if(!F.floating)return B;let A=i_(F.floating,c.x),te=i_(F.floating,c.y);return s?{...B,transform:"translate("+A+"px, "+te+"px)",...u_(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:A,top:te}},[r,s,F.floating,c.x,c.y]);return Et.useMemo(()=>({...c,update:_,refs:z,elements:F,floatingStyles:O}),[c,_,z,F,O])}var tK=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:o,padding:n}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?fR({element:o.current,padding:n}).fn(r):{}:o?fR({element:o,padding:n}).fn(r):{}}}},d_=(e,t)=>({...e_(e),options:[e,t]}),f_=(e,t)=>({...t_(e),options:[e,t]}),p_=(e,t)=>({...a_(e),options:[e,t]}),m_=(e,t)=>({...r_(e),options:[e,t]}),g_=(e,t)=>({...o_(e),options:[e,t]});var h_=(e,t)=>({...n_(e),options:[e,t]});var v_=(e,t)=>({...tK(e),options:[e,t]});var x_=R(M(),1);var gR=R(N(),1),rK="Arrow",y_=x_.forwardRef((e,t)=>{let{children:r,width:o=10,height:n=5,...a}=e;return(0,gR.jsx)(q.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,gR.jsx)("polygon",{points:"0,0 30,0 15,10"})})});y_.displayName=rK;var w_=y_;var gs=R(N(),1);var hR="Popper",[C_,Qo]=Fe(hR),[nK,S_]=C_(hR),b_=e=>{let{__scopePopper:t,children:r}=e,[o,n]=io.useState(null);return(0,gs.jsx)(nK,{scope:t,anchor:o,onAnchorChange:n,children:r})};b_.displayName=hR;var R_="PopperAnchor",I_=io.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:o,...n}=e,a=S_(R_,r),i=io.useRef(null),s=de(t,i),l=io.useRef(null);return io.useEffect(()=>{let u=l.current;l.current=o?.current||i.current,u!==l.current&&a.onAnchorChange(l.current)}),o?null:(0,gs.jsx)(q.div,{...n,ref:s})});I_.displayName=R_;var vR="PopperContent",[aK,iK]=C_(vR),P_=io.forwardRef((e,t)=>{let{__scopePopper:r,side:o="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=S_(vR,r),[h,v]=io.useState(null),y=de(t,U=>v(U)),[w,C]=io.useState(null),b=Wc(w),S=b?.width??0,I=b?.height??0,L=o+(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(lK),altBoundary:E},{refs:D,floatingStyles:z,placement:F,isPositioned:O,middlewareData:B}=c_({strategy:"fixed",placement:L,whileElementsMounted:(...U)=>dR(...U,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[d_({mainAxis:n+I,alignmentAxis:i}),l&&f_({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?p_():void 0,..._}),l&&m_({..._}),g_({..._,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&&v_({element:w,padding:s}),uK({arrowWidth:S,arrowHeight:I}),f&&h_({strategy:"referenceHidden",..._})]}),[A,te]=k_(F),ae=nt(g);Ve(()=>{O&&ae?.()},[O,ae]);let V=B.arrow?.x,Q=B.arrow?.y,re=B.arrow?.centerOffset!==0,[Y,ce]=io.useState();return Ve(()=>{h&&ce(window.getComputedStyle(h).zIndex)},[h]),(0,gs.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,gs.jsx)(aK,{scope:r,placedSide:A,onArrowChange:C,arrowX:V,arrowY:Q,shouldHideArrow:re,children:(0,gs.jsx)(q.div,{"data-side":A,"data-align":te,...m,ref:y,style:{...m.style,animation:O?void 0:"none"}})})})});P_.displayName=vR;var L_="PopperArrow",sK={top:"bottom",right:"left",bottom:"top",left:"right"},T_=io.forwardRef(function(t,r){let{__scopePopper:o,...n}=t,a=iK(L_,o),i=sK[a.placedSide];return(0,gs.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,gs.jsx)(w_,{...n,ref:r,style:{...n.style,display:"block"}})})});T_.displayName=L_;function lK(e){return e!==null}var uK=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:o,middlewareData:n}=t,i=n.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=k_(r),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=`${o.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=i?d:`${p}px`):u==="left"&&(g=`${o.floating.width+l}px`,m=i?d:`${p}px`),{data:{x:g,y:m}}}});function k_(e){let[t,r="center"]=e.split("-");return[t,r]}var ai=b_,ii=I_,hs=P_,vs=T_;var Hx=R(M(),1),M_=R(Va(),1);var E_=R(N(),1),cK="Portal",Ro=Hx.forwardRef((e,t)=>{let{container:r,...o}=e,[n,a]=Hx.useState(!1);Ve(()=>a(!0),[]);let i=r||n&&globalThis?.document?.body;return i?M_.default.createPortal((0,E_.jsx)(q.div,{...o,ref:t}),i):null});Ro.displayName=cK;var dK=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kc=new WeakMap,Ux=new WeakMap,zx={},xR=0,A_=function(e){return e&&(e.host||A_(e.parentNode))},fK=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=A_(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},pK=function(e,t,r,o){var n=fK(t,Array.isArray(e)?e:[e]);zx[r]||(zx[r]=new WeakMap);var a=zx[r],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(o),g=p!==null&&p!=="false",m=(Kc.get(f)||0)+1,x=(a.get(f)||0)+1;Kc.set(f,m),a.set(f,x),i.push(f),m===1&&g&&Ux.set(f,!0),x===1&&f.setAttribute(r,"true"),g||f.setAttribute(o,"true")}catch(h){console.error("aria-hidden: cannot operate on ",f,h)}})};return c(t),s.clear(),xR++,function(){i.forEach(function(d){var f=Kc.get(d)-1,p=a.get(d)-1;Kc.set(d,f),a.set(d,p),f||(Ux.has(d)||d.removeAttribute(o),Ux.delete(d)),p||d.removeAttribute(r)}),xR--,xR||(Kc=new WeakMap,Kc=new WeakMap,Ux=new WeakMap,zx={})}},xs=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||dK(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),pK(o,n,r,"aria-hidden")):function(){return null}};var so=function(){return so=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},so.apply(this,arguments)};function Gx(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function D_(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,a;o<n;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var Kx=R(M());var Ir=R(M());var jl="right-scroll-bar-position",$l="width-before-scroll-bar",yR="with-scroll-bars-hidden",wR="--removed-body-scroll-bar-size";function Wx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var N_=R(M());function O_(e,t){var r=(0,N_.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=t,r.facade}var jx=R(M());var mK=typeof window<"u"?jx.useLayoutEffect:jx.useEffect,F_=new WeakMap;function CR(e,t){var r=O_(t||null,function(o){return e.forEach(function(n){return Wx(n,o)})});return mK(function(){var o=F_.get(r);if(o){var n=new Set(o),a=new Set(e),i=r.current;n.forEach(function(s){a.has(s)||Wx(s,null)}),a.forEach(function(s){n.has(s)||Wx(s,i)})}F_.set(r,e)},[e]),r}function gK(e){return e}function hK(e,t){t===void 0&&(t=gK);var r=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,o);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(o=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){o=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var c=i;i=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),r}}}};return n}function SR(e){e===void 0&&(e={});var t=hK(null);return t.options=so({async:!0,ssr:!1},e),t}var __=R(M()),V_=function(e){var t=e.sideCar,r=Gx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return __.createElement(o,so({},r))};V_.isSideCarExport=!0;function bR(e,t){return e.useMedium(t),V_}var $x=SR();var RR=function(){},dm=Ir.forwardRef(function(e,t){var r=Ir.useRef(null),o=Ir.useState({onScrollCapture:RR,onWheelCapture:RR,onTouchMoveCapture:RR}),n=o[0],a=o[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=Gx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,b=CR([r,t]),S=so(so({},w),n);return Ir.createElement(Ir.Fragment,null,c&&Ir.createElement(C,{sideCar:$x,removeScrollBar:u,shards:d,noRelative:p,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:y}),i?Ir.cloneElement(Ir.Children.only(s),so(so({},S),{ref:b})):Ir.createElement(v,so({},S,{className:l,ref:b}),s))});dm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};dm.classNames={fullWidth:$l,zeroRight:jl};var it=R(M());var Yc=R(M());var U_=R(M());var B_;var H_=function(){if(B_)return B_;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function vK(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=H_();return t&&e.setAttribute("nonce",t),e}function xK(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yK(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var IR=function(){var e=0,t=null;return{add:function(r){e==0&&(t=vK())&&(xK(t,r),yK(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var PR=function(){var e=IR();return function(t,r){U_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var fm=function(){var e=PR(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t};var wK={left:0,top:0,right:0,gap:0},LR=function(e){return parseInt(e||"",10)||0},CK=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[LR(r),LR(o),LR(n)]},TR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wK;var t=CK(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}};var SK=fm(),Xc="data-scroll-locked",bK=function(e,t,r,o){var n=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
20
|
-
.`.concat(
|
|
19
|
+
`),()=>{x.contains(m)&&x.removeChild(m)}},[t]),(0,DD.jsx)(qS,{isPresent:t,childRef:a,sizeRef:i,children:Cv.cloneElement(e,{ref:l})})}var FD=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=ca(f6),c=(0,Gp.useId)(),d=!0,f=(0,Gp.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:r,custom:n,onExitComplete:p=>{u.set(p,!0);for(let g of u.values())if(!g)return;o&&o()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[r,u,o]);return a&&d&&(f={...f}),(0,Gp.useMemo)(()=>{u.forEach((p,g)=>u.set(g,!1))},[r]),OD.useEffect(()=>{!r&&!u.size&&o&&o()},[r]),i==="popLayout"&&(e=(0,KS.jsx)(ND,{isPresent:r,anchorX:s,root:l,children:e})),(0,KS.jsx)(Qi.Provider,{value:f,children:e})};function f6(){return new Map}var as=R(M(),1);function wv(e=!0){let t=(0,as.useContext)(Qi);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:o,register:n}=t,a=(0,as.useId)();(0,as.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,as.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!r&&o?[!1,i]:[!0]}var Sv=R(M(),1),Wp=e=>e.key||"";function XS(e){let t=[];return Sv.Children.forEach(e,r=>{(0,Sv.isValidElement)(r)&&t.push(r)}),t}var Ya=({children:e,custom:t,initial:r=!0,onExitComplete:o,presenceAffectsLayout:n=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",root:l})=>{let[u,c]=wv(i),d=(0,pa.useMemo)(()=>XS(e),[e]),f=i&&!u?[]:d.map(Wp),p=(0,pa.useRef)(!0),g=(0,pa.useRef)(d),m=ca(()=>new Map),[x,h]=(0,pa.useState)(d),[v,y]=(0,pa.useState)(d);lc(()=>{p.current=!1,g.current=d;for(let b=0;b<v.length;b++){let S=Wp(v[b]);f.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[v,f.length,f.join("-")]);let C=[];if(d!==x){let b=[...d];for(let S=0;S<v.length;S++){let I=v[S],L=Wp(I);f.includes(L)||(b.splice(S,0,I),C.push(I))}return a==="wait"&&C.length&&(b=C),y(XS(b)),h(d),null}let{forceRender:w}=(0,pa.useContext)(ic);return(0,jp.jsx)(jp.Fragment,{children:v.map(b=>{let S=Wp(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&&(w?.(),y(g.current),i&&c?.(),o&&o())};return(0,jp.jsx)(FD,{isPresent:I,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:l,onExitComplete:I?void 0:L,anchorX:s,children:b},S)})})};var _D=R(M(),1),bv=(0,_D.createContext)({strict:!1});var VD={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"]},Qa={};for(let e in VD)Qa[e]={isEnabled:t=>VD[e].some(r=>!!t[r])};function BD(e){for(let t in e)Qa[t]={...Qa[t],...e[t]}}var p6=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 $p(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||p6.has(e)}var HD=e=>!$p(e);function m6(e){typeof e=="function"&&(HD=t=>t.startsWith("on")?!$p(t):e(t))}try{m6(require("@emotion/is-prop-valid").default)}catch{}function UD(e,t,r){let o={};for(let n in e)n==="values"&&typeof e.values=="object"||(HD(n)||r===!0&&$p(n)||!t&&!$p(n)||e.draggable&&n.startsWith("onDrag"))&&(o[n]=e[n]);return o}var Ov=R(N(),1);var Ic=R(M(),1);var zD=R(M(),1),is=(0,zD.createContext)({});var Pv=R(M(),1);function ss(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Za(e){return typeof e=="string"||Array.isArray(e)}var Rv=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qp=["initial",...Rv];function Ll(e){return ss(e.animate)||qp.some(t=>Za(e[t]))}function Iv(e){return!!(Ll(e)||e.variants)}function GD(e,t){if(Ll(e)){let{initial:r,animate:o}=e;return{initial:r===!1||Za(r)?r:void 0,animate:Za(o)?o:void 0}}return e.inherit!==!1?t:{}}function jD(e){let{initial:t,animate:r}=GD(e,(0,Pv.useContext)(is));return(0,Pv.useMemo)(()=>({initial:t,animate:r}),[WD(t),WD(r)])}function WD(e){return Array.isArray(e)?e.join(" "):e}var Cc=R(M(),1);var KD=R(M(),1);var Tl={};function $D(e){for(let t in e)Tl[t]=e[t],ml(t)&&(Tl[t].isCSSVariable=!0)}function Lv(e,{layout:t,layoutId:r}){return Co.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Tl[e]||e==="opacity")}var g6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},h6=En.length;function qD(e,t,r){let o="",n=!0;for(let a=0;a<h6;a++){let i=En[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||r){let u=Hp(s,Sl[i]);if(!l){n=!1;let c=g6[i]||i;o+=`${c}(${u}) `}r&&(t[i]=u)}}return o=o.trim(),r?o=r(t,n?"":o):n&&(o="none"),o}function vc(e,t,r){let{style:o,vars:n,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let u=t[l];if(Co.has(l)){i=!0;continue}else if(ml(l)){n[l]=u;continue}else{let c=Hp(u,Sl[l]);l.startsWith("origin")?(s=!0,a[l]=c):o[l]=c}}if(t.transform||(i||r?o.transform=qD(t,e.transform,r):o.transform&&(o.transform="none")),s){let{originX:l="50%",originY:u="50%",originZ:c=0}=a;o.transformOrigin=`${l} ${u} ${c}`}}var xc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function YS(e,t,r){for(let o in t)!Be(t[o])&&!Lv(o,r)&&(e[o]=t[o])}function v6({transformTemplate:e},t){return(0,KD.useMemo)(()=>{let r=xc();return vc(r,t,e),Object.assign({},r.vars,r.style)},[t])}function x6(e,t){let r=e.style||{},o={};return YS(o,r,e),Object.assign(o,v6(e,t)),o}function XD(e,t){let r={},o=x6(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}var QD=R(M(),1);var y6={offset:"stroke-dashoffset",array:"stroke-dasharray"},C6={offset:"strokeDashoffset",array:"strokeDasharray"};function YD(e,t,r=1,o=0,n=!0){e.pathLength=1;let a=n?y6:C6;e[a.offset]=ue.transform(-o);let i=ue.transform(t),s=ue.transform(r);e[a.array]=`${i} ${s}`}function Tv(e,{attrX:t,attrY:r,attrScale:o,pathLength:n,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(vc(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),r!==void 0&&(d.y=r),o!==void 0&&(d.scale=o),n!==void 0&&YD(d,n,a,i,!1)}var kv=()=>({...xc(),attrs:{}});var Mv=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ZD(e,t,r,o){let n=(0,QD.useMemo)(()=>{let a=kv();return Tv(a,t,Mv(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};YS(a,e.style,e),n.style={...a,...n.style}}return n}var JD=["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 yc(e){return typeof e!="string"||e.includes("-")?!1:!!(JD.indexOf(e)>-1||/[A-Z]/u.test(e))}function eN(e,t,r,{latestValues:o},n,a=!1){let s=(yc(e)?ZD:XD)(t,o,n,e),l=UD(t,typeof e=="string",a),u=e!==Cc.Fragment?{...l,...s,ref:r}:{},{children:c}=t,d=(0,Cc.useMemo)(()=>Be(c)?c.get():c,[c]);return(0,Cc.createElement)(e,{...u,children:d})}var QS=R(M(),1);function tN(e){let t=[{},{}];return e?.values.forEach((r,o)=>{t[0][o]=r.get(),t[1][o]=r.getVelocity()}),t}function wc(e,t,r,o){if(typeof t=="function"){let[n,a]=tN(o);t=t(r!==void 0?r:e.custom,n,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[n,a]=tN(o);t=t(r!==void 0?r:e.custom,n,a)}return t}function Sc(e){return Be(e)?e.get():e}function w6({scrapeMotionValuesFromProps:e,createRenderState:t},r,o,n){return{latestValues:S6(r,o,n,e),renderState:t()}}function S6(e,t,r,o){let n={},a=o(e,{});for(let f in a)n[f]=Sc(a[f]);let{initial:i,animate:s}=e,l=Ll(e),u=Iv(e);t&&u&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let c=r?r.initial===!1:!1;c=c||i===!1;let d=c?s:i;if(d&&typeof d!="boolean"&&!ss(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let g=wc(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 C=c?y.length-1:0;y=y[C]}y!==null&&(n[v]=y)}for(let v in m)n[v]=m[v]}}}return n}var Ev=e=>(t,r)=>{let o=(0,QS.useContext)(is),n=(0,QS.useContext)(Qi),a=()=>w6(e,t,o,n);return r?a():ca(a)};function bc(e,t,r){let{style:o}=e,n={};for(let a in o)(Be(o[a])||t.style&&Be(t.style[a])||Lv(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(n[a]=o[a]);return n}var rN=Ev({scrapeMotionValuesFromProps:bc,createRenderState:xc});function Av(e,t,r){let o=bc(e,t,r);for(let n in e)if(Be(e[n])||Be(t[n])){let a=En.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;o[a]=e[n]}return o}var oN=Ev({scrapeMotionValuesFromProps:Av,createRenderState:kv});var nN=Symbol.for("motionComponentSymbol");var aN=R(M(),1);function Ja(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function iN(e,t,r){return(0,aN.useCallback)(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r&&(typeof r=="function"?r(o):Ja(r)&&(r.current=o))},[t])}var no=R(M(),1);var Rc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var b6="framerAppearId",Dv="data-"+Rc(b6);var sN=R(M(),1),Nv=(0,sN.createContext)({});function lN(e,t,r,o,n){let{visualElement:a}=(0,no.useContext)(is),i=(0,no.useContext)(bv),s=(0,no.useContext)(Qi),l=(0,no.useContext)(ns).reducedMotion,u=(0,no.useRef)(null);o=o||i.renderer,!u.current&&o&&(u.current=o(e,{visualState:t,parent:a,props:r,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));let c=u.current,d=(0,no.useContext)(Nv);c&&!c.projection&&n&&(c.type==="html"||c.type==="svg")&&R6(u.current,r,n,d);let f=(0,no.useRef)(!1);(0,no.useInsertionEffect)(()=>{c&&f.current&&c.update(r,s)});let p=r[Dv],g=(0,no.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return lc(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),(0,no.useEffect)(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),g.current=!1),c.enteringChildren=void 0)}),c}function R6(e,t,r,o){let{layoutId:n,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:uN(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&Ja(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:c,layoutScroll:l,layoutRoot:u})}function uN(e){if(e)return e.options.allowProjection!==!1?e.projection:uN(e.parent)}function Fv(e,{forwardMotionProps:t=!1}={},r,o){r&&BD(r);let n=yc(e)?oN:rN;function a(s,l){let u,c={...(0,Ic.useContext)(ns),...s,layoutId:I6(s)},{isStatic:d}=c,f=jD(s),p=n(s,d);if(!d&&sc){P6(c,r);let g=L6(c);u=g.MeasureLayout,f.visualElement=lN(e,p,c,o,g.ProjectionNode)}return(0,Ov.jsxs)(is.Provider,{value:f,children:[u&&f.visualElement?(0,Ov.jsx)(u,{visualElement:f.visualElement,...c}):null,eN(e,s,iN(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,Ic.forwardRef)(a);return i[nN]=e,i}function I6({layoutId:e}){let t=(0,Ic.useContext)(ic).id;return t&&e!==void 0?t+"-"+e:e}function P6(e,t){let r=(0,Ic.useContext)(bv).strict}function L6(e){let{drag:t,layout:r}=Qa;if(!t&&!r)return{};let o={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function cN(e,t){if(typeof Proxy>"u")return Fv;let r=new Map,o=(a,i)=>Fv(a,i,e,t),n=(a,i)=>o(a,i);return new Proxy(n,{get:(a,i)=>i==="create"?o:(r.has(i)||r.set(i,Fv(i,void 0,e,t)),r.get(i))})}var PN=R(M(),1);function _v({top:e,left:t,right:r,bottom:o}){return{x:{min:t,max:r},y:{min:e,max:o}}}function dN({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function fN(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:o.y,right:o.x}}function ZS(e){return e===void 0||e===1}function Vv({scale:e,scaleX:t,scaleY:r}){return!ZS(e)||!ZS(t)||!ZS(r)}function ei(e){return Vv(e)||JS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function JS(e){return pN(e.x)||pN(e.y)}function pN(e){return e&&e!=="0%"}function Kp(e,t,r){let o=e-r,n=t*o;return r+n}function mN(e,t,r,o,n){return n!==void 0&&(e=Kp(e,n,o)),Kp(e,r,o)+t}function eb(e,t=0,r=1,o,n){e.min=mN(e.min,t,r,o,n),e.max=mN(e.max,t,r,o,n)}function tb(e,{x:t,y:r}){eb(e.x,t.translate,t.scale,t.originPoint),eb(e.y,r.translate,r.scale,r.originPoint)}var gN=.999999999999,hN=1.0000000000001;function xN(e,t,r,o=!1){let n=r.length;if(!n)return;t.x=t.y=1;let a,i;for(let s=0;s<n;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&kl(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,tb(e,i)),o&&ei(a.latestValues)&&kl(e,a.latestValues))}t.x<hN&&t.x>gN&&(t.x=1),t.y<hN&&t.y>gN&&(t.y=1)}function ls(e,t){e.min=e.min+t,e.max=e.max+t}function vN(e,t,r,o,n=.5){let a=ke(e.min,e.max,n);eb(e,t,r,a,o)}function kl(e,t){vN(e.x,t.x,t.scaleX,t.scale,t.originX),vN(e.y,t.y,t.scaleY,t.scale,t.originY)}function rb(e,t){return _v(fN(e.getBoundingClientRect(),t))}function yN(e,t,r){let o=rb(e,r),{scroll:n}=t;return n&&(ls(o.x,n.offset.x),ls(o.y,n.offset.y)),o}var CN=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ml=()=>({x:CN(),y:CN()}),wN=()=>({min:0,max:0}),Ke=()=>({x:wN(),y:wN()});var Xp={current:null},Bv={current:!1};function SN(){if(Bv.current=!0,!!sc)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xp.current=e.matches;e.addEventListener("change",t),t()}else Xp.current=!1}var us=new WeakMap;function bN(e,t,r){for(let o in t){let n=t[o],a=r[o];if(Be(n))e.addValue(o,n);else if(Be(a))e.addValue(o,oo(n,{owner:e}));else if(a!==n)if(e.hasValue(o)){let i=e.getValue(o);i.liveStyle===!0?i.jump(n):i.hasAnimated||i.set(n)}else{let i=e.getStaticValue(o);e.addValue(o,oo(i!==void 0?i:n,{owner:e}))}}for(let o in r)t[o]===void 0&&e.removeValue(o);return t}var RN=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Pc=class{scrapeMotionValuesFromProps(t,r,o){return{}}constructor({parent:t,props:r,presenceContext:o,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=Ka,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=wt.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=r.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Ll(r),this.isVariantNode=Iv(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(r,{},this);for(let f in d){let p=d[f];l[f]!==void 0&&Be(p)&&p.set(l[f])}}mount(t){this.current=t,us.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((r,o)=>this.bindToMotionValue(o,r)),Bv.current||SN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xp.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),br(this.notifyUpdate),br(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 r=this.features[t];r&&(r.unmount(),r.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,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let o=Co.has(t);o&&this.onBindTransform&&this.onBindTransform();let n=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Le.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{n(),a&&a(),r.owner&&r.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 Qa){let r=Qa[t];if(!r)continue;let{isEnabled:o,Feature:n}=r;if(!this.features[t]&&n&&o(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):Ke()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let o=0;o<RN.length;o++){let n=RN[o];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=bN(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 r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let o=this.values.get(t);r!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&r!==void 0&&(o=oo(r===null?void 0:r,{owner:this}),this.addValue(t,o)),o}readValue(t,r){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(lp(o)||cp(o))?o=parseFloat(o):!$S(o)&&Ir.test(r)&&(o=_p(t,r)),this.setBaseTarget(t,Be(o)?o.get():o)),Be(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){let{initial:r}=this.props,o;if(typeof r=="string"||typeof r=="object"){let a=wc(this.props,r,this.presenceContext?.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;let n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!Be(n)?n:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Wa),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Rl.render(this.render)}};var Lc=class extends Pc{constructor(){super(...arguments),this.KeyframeResolver=Vp}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:o}){delete r[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Be(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function Hv(e,{style:t,vars:r},o,n){let a=e.style,i;for(i in t)a[i]=t[i];n?.applyProjectionStyles(a,o);for(i in r)a.setProperty(i,r[i])}function T6(e){return window.getComputedStyle(e)}var Tc=class extends Lc{constructor(){super(...arguments),this.type="html",this.renderInstance=Hv}readValueFromInstance(t,r){if(Co.has(r))return this.projection?.isProjecting?Mp(r):LS(t,r);{let o=T6(t),n=(ml(r)?o.getPropertyValue(r):o[r])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:r}){return rb(t,r)}build(t,r,o){vc(t,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,r,o){return bc(t,r,o)}};var Uv=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 IN(e,t,r,o){Hv(e,t,void 0,o);for(let n in t.attrs)e.setAttribute(Uv.has(n)?n:Rc(n),t.attrs[n])}var kc=class extends Lc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ke}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Co.has(r)){let o=Fp(r);return o&&o.default||0}return r=Uv.has(r)?r:Rc(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,o){return Av(t,r,o)}build(t,r,o){Tv(t,r,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,r,o,n){IN(t,r,o,n)}mount(t){this.isSVGTag=Mv(t.tagName),super.mount(t)}};var LN=(e,t)=>yc(e)?new kc(t):new Tc(t,{allowProjection:e!==PN.Fragment});function ma(e,t,r){let o=e.getProps();return wc(o,t,r!==void 0?r:o.custom,e)}var Yp=e=>Array.isArray(e);function k6(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,oo(r))}function M6(e){return Yp(e)?e[e.length-1]||0:e}function TN(e,t){let r=ma(e,t),{transitionEnd:o={},transition:n={},...a}=r||{};a={...a,...o};for(let i in a){let s=M6(a[i]);k6(e,i,s)}}function kN(e){return!!(Be(e)&&e.add)}function Qp(e,t){let r=e.getValue("willChange");if(kN(r))return r.add(t);if(!r&&Sr.WillChange){let o=new Sr.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function zv(e){return e.props[Dv]}var E6=e=>e!==null;function MN(e,{repeat:t,repeatType:r="loop"},o){let n=e.filter(E6),a=t&&r!=="loop"&&t%2===1?0:n.length-1;return!a||o===void 0?n[a]:o}var A6={type:"spring",stiffness:500,damping:25,restSpeed:10},D6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),N6={type:"keyframes",duration:.8},O6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},EN=(e,{keyframes:t})=>t.length>2?N6:Co.has(e)?e.startsWith("scale")?D6(t[1]):A6:O6;function AN({when:e,delay:t,delayChildren:r,staggerChildren:o,staggerDirection:n,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var Mc=(e,t,r,o={},n,a)=>i=>{let s=wl(o,e)||{},l=s.delay||o.delay||0,{elapsed:u=0}=o;u=u-Pt(l);let c={keyframes:Array.isArray(r)?r:[null,r],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};AN(s)||Object.assign(c,EN(e,c)),c.duration&&(c.duration=Pt(c.duration)),c.repeatDelay&&(c.repeatDelay=Pt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(gc(c),c.delay===0&&(d=!0)),(Sr.instantAnimations||Sr.skipAnimations)&&(d=!0,gc(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=MN(c.keyframes,s);if(f!==void 0){Le.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new qa(c):new Ap(c)};function F6({protectedKeys:e,needsAnimating:t},r){let o=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,o}function Ec(e,t,{delay:r=0,transitionOverride:o,type:n}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...s}=t;o&&(a=o);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&&F6(u,c))continue;let p={delay:r,...wl(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=zv(e);if(h){let v=window.MotionHandoffAnimation(h,c,Le);v!==null&&(p.startTime=v,m=!0)}}Qp(e,c),d.start(Mc(c,d,f,e.shouldReduceMotion&&Np.has(c)?{type:!1}:p,e,m));let x=d.animation;x&&l.push(x)}return i&&Promise.all(l).then(()=>{Le.update(()=>{i&&TN(e,i)})}),l}function Gv(e,t,r,o=0,n=1){let a=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),i=e.size,s=(i-1)*o;return typeof r=="function"?r(a,i):n===1?a*o:s-a*o}function Wv(e,t,r={}){let o=ma(e,t,r.type==="exit"?e.presenceContext?.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(n=r.transitionOverride);let a=o?()=>Promise.all(Ec(e,o,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=n;return _6(e,t,l,u,c,d,r)}:()=>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(r.delay)])}function _6(e,t,r=0,o=0,n=0,a=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(Wv(l,t,{...i,delay:r+(typeof o=="function"?0:o)+Gv(e.variantChildren,l,o,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function DN(e,t,r={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){let n=t.map(a=>Wv(e,a,r));o=Promise.all(n)}else if(typeof t=="string")o=Wv(e,t,r);else{let n=typeof t=="function"?ma(e,t,r.custom):t;o=Promise.all(Ec(e,n,r))}return o.then(()=>{e.notify("AnimationComplete",t)})}function ob(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let o=0;o<r;o++)if(t[o]!==e[o])return!1;return!0}var V6=qp.length;function nb(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?nb(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<V6;r++){let o=qp[r],n=e.props[o];(Za(n)||n===!1)&&(t[o]=n)}return t}var B6=[...Rv].reverse(),H6=Rv.length;function U6(e){return t=>Promise.all(t.map(({animation:r,options:o})=>DN(e,r,o)))}function ON(e){let t=U6(e),r=NN(),o=!0,n=l=>(u,c)=>{let d=ma(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=nb(e.parent)||{},d=[],f=new Set,p={},g=1/0;for(let x=0;x<H6;x++){let h=B6[x],v=r[h],y=u[h]!==void 0?u[h]:c[h],C=Za(y),w=h===l?v.isActive:null;w===!1&&(g=x);let b=y===c[h]&&y!==u[h]&&C;if(b&&o&&e.manuallyAnimateOnMount&&(b=!1),v.protectedKeys={...p},!v.isActive&&w===null||!y&&!v.prevProp||ss(y)||typeof y=="boolean")continue;let S=z6(v.prevProp,y),I=S||h===l&&v.isActive&&!b&&C||x>g&&C,L=!1,T=Array.isArray(y)?y:[y],k=T.reduce(n(h),{});w===!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;Yp(B)&&Yp(A)?te=!ob(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}),o&&e.blockInitialAnimation&&(I=!1);let z=b&&S;I&&(!z||L)&&d.push(...T.map(O=>{let B={type:h};if(typeof O=="string"&&o&&!z&&e.manuallyAnimateOnMount&&e.parent){let{parent:A}=e,te=ma(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=ma(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 o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),o=!1,m?t(d):Promise.resolve()}function s(l,u){if(r[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),r[l].isActive=u;let c=i(l);for(let d in r)r[d].protectedKeys={};return c}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>r,reset:()=>{r=NN()}}}function z6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ob(t,e):!1}function El(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function NN(){return{animate:El(!0),whileInView:El(),whileHover:El(),whileTap:El(),whileDrag:El(),whileFocus:El(),exit:El()}}var Yt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var jv=class extends Yt{constructor(t){super(t),t.animationState||(t.animationState=ON(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();ss(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var G6=0,$v=class extends Yt{constructor(){super(...arguments),this.id=G6++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;let n=this.node.animationState.setActive("exit",!t);r&&!t&&n.then(()=>{r(this.id)})}mount(){let{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var FN={animation:{Feature:jv},exit:{Feature:$v}};function ti(e,t,r,o={passive:!0}){return e.addEventListener(t,r,o),()=>e.removeEventListener(t,r)}function ri(e){return{point:{x:e.pageX,y:e.pageY}}}var _N=e=>t=>Il(t)&&e(t,ri(t));function cs(e,t,r,o){return ti(e,t,_N(r),o)}var UN=1e-4,W6=1-UN,j6=1+UN,zN=.01,$6=0-zN,q6=0+zN;function zt(e){return e.max-e.min}function GN(e,t,r){return Math.abs(e-t)<=r}function VN(e,t,r,o=.5){e.origin=o,e.originPoint=ke(t.min,t.max,e.origin),e.scale=zt(r)/zt(t),e.translate=ke(r.min,r.max,e.origin)-e.originPoint,(e.scale>=W6&&e.scale<=j6||isNaN(e.scale))&&(e.scale=1),(e.translate>=$6&&e.translate<=q6||isNaN(e.translate))&&(e.translate=0)}function Ac(e,t,r,o){VN(e.x,t.x,r.x,o?o.originX:void 0),VN(e.y,t.y,r.y,o?o.originY:void 0)}function BN(e,t,r){e.min=r.min+t.min,e.max=e.min+zt(t)}function WN(e,t,r){BN(e.x,t.x,r.x),BN(e.y,t.y,r.y)}function HN(e,t,r){e.min=t.min-r.min,e.max=e.min+zt(t)}function Dc(e,t,r){HN(e.x,t.x,r.x),HN(e.y,t.y,r.y)}function ao(e){return[e("x"),e("y")]}var qv=({current:e})=>e?e.ownerDocument.defaultView:null;var jN=(e,t)=>Math.abs(e-t);function $N(e,t){let r=jN(e.x,t.x),o=jN(e.y,t.y);return Math.sqrt(r**2+o**2)}var Nc=class{constructor(t,r,{transformPagePoint:o,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=ib(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=$N(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!g)return;let{point:m}=f,{timestamp:x}=Ct;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=ab(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=ib(f.type==="pointercancel"?this.lastMoveEventInfo:ab(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,h),m&&m(f,h)},!Il(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=o,this.distanceThreshold=i,this.contextWindow=n||window;let s=ri(t),l=ab(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=Ct;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=r;d&&d(t,ib(l,this.history)),this.removeListeners=Tn(cs(this.contextWindow,"pointermove",this.handlePointerMove),cs(this.contextWindow,"pointerup",this.handlePointerUp),cs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),br(this.updatePoint)}};function ab(e,t){return t?{point:t(e.point)}:e}function qN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ib({point:e},t){return{point:e,delta:qN(e,KN(t)),offset:qN(e,K6(t)),velocity:X6(t,.1)}}function K6(e){return e[0]}function KN(e){return e[e.length-1]}function X6(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,o=null,n=KN(e);for(;r>=0&&(o=e[r],!(n.timestamp-o.timestamp>Pt(t)));)r--;if(!o)return{x:0,y:0};let a=Ut(n.timestamp-o.timestamp);if(a===0)return{x:0,y:0};let i={x:(n.x-o.x)/a,y:(n.y-o.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function JN(e,{min:t,max:r},o){return t!==void 0&&e<t?e=o?ke(t,e,o.min):Math.max(e,t):r!==void 0&&e>r&&(e=o?ke(r,e,o.max):Math.min(e,r)),e}function XN(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function e2(e,{top:t,left:r,bottom:o,right:n}){return{x:XN(e.x,r,n),y:XN(e.y,t,o)}}function YN(e,t){let r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,o]=[o,r]),{min:r,max:o}}function t2(e,t){return{x:YN(e.x,t.x),y:YN(e.y,t.y)}}function r2(e,t){let r=.5,o=zt(e),n=zt(t);return n>o?r=Go(t.min,t.max-o,e.min):o>n&&(r=Go(e.min,e.max-n,t.min)),Xt(0,1,r)}function o2(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var Kv=.35;function n2(e=Kv){return e===!1?e=0:e===!0&&(e=Kv),{x:QN(e,"left","right"),y:QN(e,"top","bottom")}}function QN(e,t,r){return{min:ZN(e,t),max:ZN(e,r)}}function ZN(e,t){return typeof e=="number"?e:e[t]||0}var Y6=new WeakMap,Yv=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=Ke(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:o}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let a=d=>{let{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(ri(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=HS(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),ao(h=>{let v=this.getAxisMotionValue(h).get()||0;if(Rr.test(v)){let{projection:y}=this.visualElement;if(y&&y.layout){let C=y.layout.layoutBox[h];C&&(v=zt(C)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&Le.postRender(()=>m(d,f)),Qp(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=Q6(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=()=>ao(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Nc(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:qv(this.visualElement)})}stop(t,r){let o=t||this.latestPointerEvent,n=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!o)return;let{velocity:i}=n;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&Le.postRender(()=>s(o,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,o){let{drag:n}=this.getProps();if(!o||!Xv(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=JN(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){let{dragConstraints:t,dragElastic:r}=this.getProps(),o=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&&o?this.constraints=e2(o.layoutBox,t):this.constraints=!1,this.elastic=n2(r),n!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ao(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=o2(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Ja(t))return!1;let o=t.current;ur(o!==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=yN(o,n.root,this.visualElement.getTransformPagePoint()),i=t2(n.layout.layoutBox,a);if(r){let s=r(dN(i));this.hasMutatedConstraints=!!s,s&&(i=_v(s))}return i}startAnimation(t){let{drag:r,dragMomentum:o,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ao(c=>{if(!Xv(c,r,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:o?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,r){let o=this.getAxisMotionValue(t);return Qp(this.visualElement,t),o.start(Mc(t,o,0,r,this.visualElement,!1))}stopAnimation(){ao(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ao(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),n=o[r];return n||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){ao(r=>{let{drag:o}=this.getProps();if(!Xv(r,o,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(r);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[r];a.set(t[r]-ke(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:o}=this.visualElement;if(!Ja(r)||!o||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};ao(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=r2({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),ao(i=>{if(!Xv(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;Y6.set(this.visualElement,this);let t=this.visualElement.current,r=cs(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),o=()=>{let{dragConstraints:l}=this.getProps();Ja(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,a=n.addEventListener("measure",o);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Le.read(o);let i=ti(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ao(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(),r(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:o=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:i=Kv,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:o,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function Xv(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Q6(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var Qv=class extends Yt{constructor(t){super(t),this.removeGroupControls=ht,this.removeListeners=ht,this.controls=new Yv(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ht}unmount(){this.removeGroupControls(),this.removeListeners()}};var a2=e=>(t,r)=>{e&&Le.postRender(()=>e(t,r))},Zv=class extends Yt{constructor(){super(...arguments),this.removePointerDownListener=ht}onPointerDown(t){this.session=new Nc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:qv(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:o,onPanEnd:n}=this.node.getProps();return{onSessionStart:a2(t),onStart:a2(r),onMove:o,onEnd:(a,i)=>{delete this.session,n&&Le.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=cs(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 l2=R(N(),1);var Zp=R(M(),1);var Oc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function i2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Fc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ue.test(e))e=parseFloat(e);else return e;let r=i2(e,t.target.x),o=i2(e,t.target.y);return`${r}% ${o}%`}};var s2={correct:(e,{treeScale:t,projectionDelta:r})=>{let o=e,n=Ir.parse(e);if(n.length>5)return o;let a=Ir.createTransformer(e),i=typeof n[0]!="number"?1:0,s=r.x.scale*t.x,l=r.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 sb=!1,lb=class extends Zp.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o,layoutId:n}=this.props,{projection:a}=t;$D(Z6),a&&(r.group&&r.group.add(a),o&&o.register&&n&&o.register(a),sb&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Oc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:o,drag:n,isPresent:a}=this.props,{projection:i}=o;return i&&(i.isPresent=a,sb=!0,n||t.layoutDependency!==r||r===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(),Rl.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:n}=t;sb=!0,n&&(n.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(n),o&&o.deregister&&o.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function Jv(e){let[t,r]=wv(),o=(0,Zp.useContext)(ic);return(0,l2.jsx)(lb,{...e,layoutGroup:o,switchLayoutGroup:(0,Zp.useContext)(Nv),isPresent:t,safeToRemove:r})}var Z6={borderRadius:{...Fc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Fc,borderTopRightRadius:Fc,borderBottomLeftRadius:Fc,borderBottomRightRadius:Fc,boxShadow:s2};function ex(e,t,r){let o=Be(e)?e:oo(e);return o.start(Mc("",o,t,r)),o.animation}var u2=(e,t)=>e.depth-t.depth;var tx=class{constructor(){this.children=[],this.isDirty=!1}add(t){fl(this.children,t),this.isDirty=!0}remove(t){Ln(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(u2),this.isDirty=!1,this.children.forEach(t)}};function c2(e,t){let r=wt.now(),o=({timestamp:n})=>{let a=n-r;a>=t&&(br(o),e(a-t))};return Le.setup(o,!0),()=>br(o)}var m2=["TopLeft","TopRight","BottomLeft","BottomRight"],J6=m2.length,d2=e=>typeof e=="string"?parseFloat(e):e,f2=e=>typeof e=="number"||ue.test(e);function g2(e,t,r,o,n,a){n?(e.opacity=ke(0,r.opacity??1,e8(o)),e.opacityExit=ke(t.opacity??1,0,t8(o))):a&&(e.opacity=ke(t.opacity??1,r.opacity??1,o));for(let i=0;i<J6;i++){let s=`border${m2[i]}Radius`,l=p2(t,s),u=p2(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||f2(l)===f2(u)?(e[s]=Math.max(ke(d2(l),d2(u),o),0),(Rr.test(u)||Rr.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||r.rotate)&&(e.rotate=ke(t.rotate||0,r.rotate||0,o))}function p2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var e8=h2(0,.5,gp),t8=h2(.5,.95,ht);function h2(e,t,r){return o=>o<e?0:o>t?1:r(Go(e,t,o))}function v2(e,t){e.min=t.min,e.max=t.max}function wo(e,t){v2(e.x,t.x),v2(e.y,t.y)}function ub(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function x2(e,t,r,o,n){return e-=t,e=Kp(e,1/r,o),n!==void 0&&(e=Kp(e,1/n,o)),e}function r8(e,t=0,r=1,o=.5,n,a=e,i=e){if(Rr.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,o);e===a&&(s-=t),e.min=x2(e.min,t,r,s,n),e.max=x2(e.max,t,r,s,n)}function y2(e,t,[r,o,n],a,i){r8(e,t[r],t[o],t[n],t.scale,a,i)}var o8=["x","scaleX","originX"],n8=["y","scaleY","originY"];function cb(e,t,r,o){y2(e.x,t,o8,r?r.x:void 0,o?o.x:void 0),y2(e.y,t,n8,r?r.y:void 0,o?o.y:void 0)}function C2(e){return e.translate===0&&e.scale===1}function db(e){return C2(e.x)&&C2(e.y)}function w2(e,t){return e.min===t.min&&e.max===t.max}function b2(e,t){return w2(e.x,t.x)&&w2(e.y,t.y)}function S2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fb(e,t){return S2(e.x,t.x)&&S2(e.y,t.y)}function pb(e){return zt(e.x)/zt(e.y)}function mb(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var rx=class{constructor(){this.members=[]}add(t){fl(this.members,t),t.scheduleRender()}remove(t){if(Ln(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){let r=this.members.findIndex(n=>t===n);if(r===0)return!1;let o;for(let n=r;n>=0;n--){let a=this.members[n];if(a.isPresent!==!1){o=a;break}}return o?(this.promote(o),!0):!1}promote(t,r){let o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,r&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:n}=t.options;n===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:o}=t;r.onExitComplete&&r.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function R2(e,t,r){let o="",n=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((n||a||i)&&(o=`translate3d(${n}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:g}=r;u&&(o=`perspective(${u}px) ${o}`),c&&(o+=`rotate(${c}deg) `),d&&(o+=`rotateX(${d}deg) `),f&&(o+=`rotateY(${f}deg) `),p&&(o+=`skewX(${p}deg) `),g&&(o+=`skewY(${g}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(o+=`scale(${s}, ${l})`),o||"none"}var Al={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},gb=["","X","Y","Z"],a8=1e3,i8=0;function hb(e,t,r,o){let{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),o&&(o[e]=0))}function D2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=zv(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Le,!(n||a))}let{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&D2(o)}function ox({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:o,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=i8++,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,ro.value&&(Al.nodes=Al.calculatedTargetDeltas=Al.calculatedProjections=0),this.nodes.forEach(u8),this.nodes.forEach(p8),this.nodes.forEach(m8),this.nodes.forEach(c8),ro.addProjectionMetrics&&ro.addProjectionMetrics(Al)},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 tx)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Wa),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=Pl(i)&&!zp(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=c2(f,250),Oc.hasAnimatedSinceResize&&(Oc.hasAnimatedSinceResize=!1,this.nodes.forEach(L2)))})}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()||y8,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=u.getProps(),h=!this.targetLayout||!fb(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={...wl(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||L2(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(),br(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(g8),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&&D2(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(I2);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(P2);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(f8),this.nodes.forEach(s8),this.nodes.forEach(l8)):this.nodes.forEach(P2),this.clearAllSnapshots();let s=wt.now();Ct.delta=Xt(0,1e3/60,s-Ct.timestamp),Ct.timestamp=s,Ct.isProcessing=!0,Sp.update.process(Ct),Sp.preRender.process(Ct),Sp.render.process(Ct),Ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Rl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(d8),this.sharedNodes.forEach(h8)}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&&!zt(this.snapshot.measuredBox.x)&&!zt(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=Ke(),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=o(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:r(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&&!db(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||ei(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)),C8(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return Ke();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(w8))){let{scroll:u}=this.root;u&&(ls(s.x,u.offset.x),ls(s.y,u.offset.y))}return s}removeElementScroll(i){let s=Ke();if(wo(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&&wo(s,i),ls(s.x,c.offset.x),ls(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=Ke();wo(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&&kl(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),ei(c.latestValues)&&kl(l,c.latestValues)}return ei(this.latestValues)&&kl(l,this.latestValues),l}removeTransform(i){let s=Ke();wo(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!ei(u.latestValues))continue;Vv(u.latestValues)&&u.updateSnapshot();let c=Ke(),d=u.measurePageBox();wo(c,d),cb(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return ei(this.latestValues)&&cb(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!==Ct.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=Ct.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ke(),this.relativeTargetOrigin=Ke(),Dc(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),wo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ke(),this.targetWithTransforms=Ke()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),WN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):wo(this.target,this.layout.layoutBox),tb(this.target,this.targetDelta)):wo(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=Ke(),this.relativeTargetOrigin=Ke(),Dc(this.relativeTargetOrigin,this.target,f.target),wo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ro.value&&Al.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Vv(this.parent.latestValues)||JS(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===Ct.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;wo(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;xN(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=Ke());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ub(this.prevProjectionDelta.x,this.projectionDelta.x),ub(this.prevProjectionDelta.y,this.projectionDelta.y)),Ac(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!mb(this.projectionDelta.x,this.prevProjectionDelta.x)||!mb(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),ro.value&&Al.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=Ml(),this.projectionDelta=Ml(),this.projectionDeltaWithTransform=Ml()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Ml();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=Ke(),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(x8));this.animationProgress=0;let y;this.mixTargetDelta=C=>{let w=C/1e3;T2(d.x,i.x,w),T2(d.y,i.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),v8(this.relativeTarget,this.relativeTargetOrigin,f,w),y&&b2(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Ke()),wo(y,this.relativeTarget)),m&&(this.animationValues=c,g2(c,u,this.latestValues,w,v,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{Oc.hasAnimatedSinceResize=!0,kn.layout++,this.motionValue||(this.motionValue=oo(0)),this.currentAnimation=ex(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{kn.layout--},onComplete:()=>{kn.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(a8),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&&N2(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ke();let d=zt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=zt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}wo(s,l),kl(s,c),Ac(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new rx),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&&hb("z",i,u,this.animationValues);for(let c=0;c<gb.length;c++)hb(`rotate${gb[c]}`,i,u,this.animationValues),hb(`skew${gb[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=Sc(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=Sc(s?.pointerEvents)||""),this.hasProjected&&!ei(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=R2(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 Tl){if(c[g]===void 0)continue;let{correct:m,applyTo:x,isCSSVariable:h}=Tl[g],v=d==="none"?c[g]:m(c[g],u);if(x){let y=x.length;for(let C=0;C<y;C++)i[x[C]]=v}else h?this.options.visualElement.renderState.vars[g]=v:i[g]=v}this.options.layoutId&&(i.pointerEvents=u===this?Sc(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(I2),this.root.sharedNodes.clear()}}}function s8(e){e.updateLayout()}function l8(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:o}=e.layout,{animationType:n}=e.options,a=t.source!==e.layout.source;n==="size"?ao(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=zt(d);d.min=r[c].min,d.max=d.min+f}):N2(n,t.layoutBox,r)&&ao(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=zt(r[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});let i=Ml();Ac(i,r,t.layoutBox);let s=Ml();a?Ac(s,e.applyTransform(o,!0),t.measuredBox):Ac(s,r,t.layoutBox);let l=!db(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=Ke();Dc(p,t.layoutBox,d.layoutBox);let g=Ke();Dc(g,r,f.layoutBox),fb(p,g)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function u8(e){ro.value&&Al.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 c8(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function d8(e){e.clearSnapshot()}function I2(e){e.clearMeasurements()}function P2(e){e.isLayoutDirty=!1}function f8(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function L2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function p8(e){e.resolveTargetDelta()}function m8(e){e.calcProjection()}function g8(e){e.resetSkewAndRotation()}function h8(e){e.removeLeadSnapshot()}function T2(e,t,r){e.translate=ke(t.translate,0,r),e.scale=ke(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function k2(e,t,r,o){e.min=ke(t.min,r.min,o),e.max=ke(t.max,r.max,o)}function v8(e,t,r,o){k2(e.x,t.x,r.x,o),k2(e.y,t.y,r.y,o)}function x8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var y8={duration:.45,ease:[.4,0,.1,1]},M2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),E2=M2("applewebkit/")&&!M2("chrome/")?Math.round:ht;function A2(e){e.min=E2(e.min),e.max=E2(e.max)}function C8(e){A2(e.x),A2(e.y)}function N2(e,t,r){return e==="position"||e==="preserve-aspect"&&!GN(pb(t),pb(r),.2)}function w8(e){return e!==e.root&&e.scroll?.wasRoot}var O2=ox({attachResizeListener:(e,t)=>ti(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var vb={current:void 0},nx=ox({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!vb.current){let e=new O2({});e.mount(window),e.setOptions({layoutScroll:!0}),vb.current=e}return vb.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var F2={pan:{Feature:Zv},drag:{Feature:Qv,ProjectionNode:nx,MeasureLayout:Jv}};function _2(e,t,r){let{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",r==="Start");let n="onHover"+r,a=o[n];a&&Le.postRender(()=>a(t,ri(t)))}var ax=class extends Yt{mount(){let{current:t}=this.node;t&&(this.unmount=US(t,(r,o)=>(_2(this.node,o,"Start"),n=>_2(this.node,n,"End"))))}unmount(){}};var ix=class extends Yt{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=Tn(ti(this.node.current,"focus",()=>this.onFocus()),ti(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function V2(e,t,r){let{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",r==="Start");let n="onTap"+(r==="End"?"":r),a=o[n];a&&Le.postRender(()=>a(t,ri(t)))}var sx=class extends Yt{mount(){let{current:t}=this.node;t&&(this.unmount=WS(t,(r,o)=>(V2(this.node,o,"Start"),(n,{success:a})=>V2(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var yb=new WeakMap,xb=new WeakMap,S8=e=>{let t=yb.get(e.target);t&&t(e)},b8=e=>{e.forEach(S8)};function R8({root:e,...t}){let r=e||document;xb.has(r)||xb.set(r,{});let o=xb.get(r),n=JSON.stringify(t);return o[n]||(o[n]=new IntersectionObserver(b8,{root:e,...t})),o[n]}function B2(e,t,r){let o=R8(t);return yb.set(e,r),o.observe(e),()=>{yb.delete(e),o.unobserve(e)}}var I8={some:0,all:1},lx=class extends Yt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:o,amount:n="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:o,threshold:typeof n=="number"?n:I8[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 B2(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(P8(t,r))&&this.startObserver()}unmount(){}};function P8({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var H2={inView:{Feature:lx},tap:{Feature:sx},focus:{Feature:ix},hover:{Feature:ax}};var U2={layout:{ProjectionNode:nx,MeasureLayout:Jv}};var z2={...FN,...H2,...F2,...U2};var He=cN(z2,LN);var _c=R(M(),1);function Vc(e){let t=ca(()=>oo(e)),{isStatic:r}=(0,_c.useContext)(ns);if(r){let[,o]=(0,_c.useState)(e);(0,_c.useEffect)(()=>t.on("change",o),[])}return t}function ux(e,t){let r=Vc(t()),o=()=>r.set(t());return o(),lc(()=>{let n=()=>Le.preRender(o,!1,!0),a=e.map(i=>i.on("change",n));return()=>{a.forEach(i=>i()),br(o)}}),r}function G2(e){bl.current=[],e();let t=ux(bl.current,e);return bl.current=void 0,t}function Cb(e,t,r,o){if(typeof e=="function")return G2(e);let n=typeof t=="function"?t:jS(t,r,o);return Array.isArray(e)?W2(e,n):W2([e],([a])=>n(a))}function W2(e,t){let r=ca(()=>[]);return ux(e,()=>{r.length=0;let o=e.length;for(let n=0;n<o;n++)r[n]=e[n].get();return t(r)})}function Jp(e){return typeof e=="object"&&!Array.isArray(e)}function cx(e,t,r,o){return typeof e=="string"&&Jp(t)?Bp(e,r,o):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function j2(e,t,r){return e*(t+1)}function wb(e,t,r,o){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:t.startsWith("<")?Math.max(0,r+parseFloat(t.slice(1))):o.get(t)??e}function L8(e,t,r){for(let o=0;o<e.length;o++){let n=e[o];n.at>t&&n.at<r&&(Ln(e,n),o--)}}function $2(e,t,r,o,n,a){L8(e,n,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:ke(n,a,o[i]),easing:yp(r,i)})}function q2(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function K2(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var T8="easeInOut",k8=20;function Q2(e,{defaultTransition:t={},...r}={},o,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,wb(d,g.at,c,u));continue}let[m,x,h={}]=g;h.at!==void 0&&(d=wb(d,h.at,c,u));let v=0,y=(C,w,b,S=0,I=0)=>{let L=M8(C),{delay:T=0,times:k=kp(L),type:E="keyframes",repeat:_,repeatType:D,repeatDelay:z=0,...F}=w,{ease:O=t.ease||"easeOut",duration:B}=w,A=typeof T=="function"?T(S,I):T,te=L.length,ae=Cl(E)?E:n?.[E||"keyframes"];if(te<=2&&ae){let Y=100;if(te===2&&D8(L)){let ne=L[1]-L[0];Y=Math.abs(ne)}let ce={...F};B!==void 0&&(ce.duration=Pt(B));let U=Pp(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&&Tp(k,Q),L.length===1&&L.unshift(null),_){ur(_<k8,"Repeat count too high, must be less than 20","repeat-count-high"),B=j2(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":yp(U,he-1))}q2(k,_)}let re=V+B;$2(b,L,O,k,V,re),v=Math.max(A+B,v),f=Math.max(re,f)};if(Be(m)){let C=X2(m,s);y(x,h,Y2("default",C))}else{let C=cx(m,x,o,l),w=C.length;for(let b=0;b<w;b++){x=x,h=h;let S=C[b],I=X2(S,s);for(let L in x)y(x[L],E8(h,L),Y2(L,I),b,w)}}c=d,d+=v}return s.forEach((p,g)=>{for(let m in p){let x=p[m];x.sort(K2);let h=[],v=[],y=[];for(let w=0;w<x.length;w++){let{at:b,value:S,easing:I}=x[w];h.push(S),v.push(Go(0,f,b)),y.push(I||"easeOut")}v[0]!==0&&(v.unshift(0),h.unshift(h[0]),y.unshift(T8)),v[v.length-1]!==1&&(v.push(1),h.push(null)),i.has(g)||i.set(g,{keyframes:{},transition:{}});let C=i.get(g);C.keyframes[m]=h,C.transition[m]={...t,duration:f,ease:y,times:v,...r}}}),i}function X2(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Y2(e,t){return t[e]||(t[e]=[]),t[e]}function M8(e){return Array.isArray(e)?e:[e]}function E8(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var A8=e=>typeof e=="number",D8=e=>e.every(A8);function N8(e,t){return e in t}var dx=class extends Pc{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(N8(r,t)){let o=t[r];if(typeof o=="string"||typeof o=="number")return o}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return Ke()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function Z2(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=Pl(e)&&!zp(e)?new kc(t):new Tc(t);r.mount(e),us.set(e,r)}function J2(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new dx(t);r.mount(e),us.set(e,r)}function O8(e,t){return Be(e)||typeof e=="number"||typeof e=="string"&&!Jp(t)}function fx(e,t,r,o){let n=[];if(O8(e,t))n.push(ex(e,Jp(t)&&t.default||t,r&&(r.default||r)));else{let a=cx(e,t,o),i=a.length;ur(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];ur(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?Z2:J2;us.has(l)||u(l);let c=us.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),n.push(...Ec(c,{...t,transition:d},{}))}}return n}function eO(e,t,r){let o=[];return Q2(e,t,r,{spring:$a}).forEach(({keyframes:a,transition:i},s)=>{o.push(...fx(s,a,i))}),o}function F8(e){return Array.isArray(e)&&e.some(Array.isArray)}function tO(e){function t(r,o,n){let a=[],i;if(F8(r))a=eO(r,o,e);else{let{onComplete:l,...u}=n||{};typeof l=="function"&&(i=l),a=fx(r,o,u,e)}let s=new Dp(a);return i&&s.finished.then(i),e&&(e.animations.push(s),s.finished.then(()=>{Ln(e.animations,s)})),s}return t}var Sb=tO();var ySe=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"}}),An={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}},px={lift:{y:-2,transition:An.smooth},scale:{scale:1.05,transition:An.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:An.smooth},rotate:{rotate:2,transition:An.bouncy}},rO={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},CSe={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:An.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:An.smooth}},wSe={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:An.smooth}}},SSe={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:An.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:An.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:An.smooth}},oO={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var bSe={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:An.bouncy};var ds=R(N()),nO=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-card 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"}}),bb=Dl.forwardRef(({className:e,variant:t,size:r,radius:o,interactive:n,microInteraction:a="lift",...i},s)=>{if(n&&a!=="none"){let l={whileHover:a==="scale"?px.scale:a==="glow"?px.glow:px.lift,whileTap:rO.scale};return(0,ds.jsx)(He.div,{ref:s,className:P("moonui-theme",nO({variant:t,size:r,radius:o,interactive:n,className:e})),...l,...i})}return(0,ds.jsx)("div",{ref:s,className:P("moonui-theme",nO({variant:t,size:r,radius:o,interactive:n,className:e})),...i})});bb.displayName="Card";var Rb=Dl.forwardRef(({className:e,...t},r)=>(0,ds.jsx)("div",{ref:r,className:P("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));Rb.displayName="CardHeader";var Ib=Dl.forwardRef(({className:e,...t},r)=>(0,ds.jsx)("h3",{ref:r,className:P("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));Ib.displayName="CardTitle";var Pb=Dl.forwardRef(({className:e,...t},r)=>(0,ds.jsx)("p",{ref:r,className:P("moonui-theme","text-sm text-muted-foreground",e),...t}));Pb.displayName="CardDescription";var Lb=Dl.forwardRef(({className:e,...t},r)=>(0,ds.jsx)("div",{ref:r,className:P("moonui-theme","p-6 pt-0",e),...t}));Lb.displayName="CardContent";var Tb=Dl.forwardRef(({className:e,...t},r)=>(0,ds.jsx)("div",{ref:r,className:P("moonui-theme","flex items-center p-6 pt-0",e),...t}));Tb.displayName="CardFooter";var FO=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 cr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function mx(e,t){let r=Te(e);if(isNaN(t))return cr(e,NaN);if(!t)return r;let o=r.getDate(),n=cr(e,r.getTime());n.setMonth(r.getMonth()+t+1,0);let a=n.getDate();return o>=a?n:(r.setFullYear(n.getFullYear(),n.getMonth(),o),r)}var _8=Math.pow(10,8)*24*60*60*1e3,FSe=-_8,gx=6048e5,aO=864e5;var V8=3600;var iO=V8*24,_Se=iO*7,B8=iO*365.2425,H8=B8/12,VSe=H8*3;var U8={};function ga(){return U8}function Dn(e,t){let r=ga(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Te(e),a=n.getDay(),i=(a<o?7:0)+a-o;return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}function Nl(e){return Dn(e,{weekStartsOn:1})}function hx(e){let t=Te(e),r=t.getFullYear(),o=cr(e,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);let n=Nl(o),a=cr(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let i=Nl(a);return t.getTime()>=n.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function Bc(e){let t=Te(e);return t.setHours(0,0,0,0),t}function kb(e){let t=Te(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function sO(e,t){let r=Bc(e),o=Bc(t),n=+r-kb(r),a=+o-kb(o);return Math.round((n-a)/aO)}function lO(e){let t=hx(e),r=cr(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Nl(r)}function uO(e){return cr(e,Date.now())}function Ol(e,t){let r=Bc(e),o=Bc(t);return+r==+o}function cO(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function vx(e){if(!cO(e)&&typeof e!="number")return!1;let t=Te(e);return!isNaN(Number(t))}function dO(e){let t=Te(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function xx(e,t){let r=Te(e.start),o=Te(e.end),n=+r>+o,a=n?+r:+o,i=n?o:r;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 fO(e){let t=Te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function pO(e){let t=Te(e),r=cr(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function mO(e,t){let r=ga(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Te(e),a=n.getDay(),i=(a<o?-7:0)+6-(a-o);return n.setDate(n.getDate()+i),n.setHours(23,59,59,999),n}var z8={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"}},gO=(e,t,r)=>{let o,n=z8[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function yx(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var G8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},W8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},j8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hO={date:yx({formats:G8,defaultWidth:"full"}),time:yx({formats:W8,defaultWidth:"full"}),dateTime:yx({formats:j8,defaultWidth:"full"})};var $8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},vO=(e,t,r,o)=>$8[e];function Hc(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let i=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{let i=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;n=e.values[s]||e.values[i]}let a=e.argumentCallback?e.argumentCallback(t):t;return n[a]}}var q8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},K8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},X8={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"]},Y8={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"]},Q8={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"}},Z8={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"}},J8=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},xO={ordinalNumber:J8,era:Hc({values:q8,defaultWidth:"wide"}),quarter:Hc({values:K8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Hc({values:X8,defaultWidth:"wide"}),day:Hc({values:Y8,defaultWidth:"wide"}),dayPeriod:Hc({values:Q8,defaultWidth:"wide",formattingValues:Z8,defaultFormattingWidth:"wide"})};function Uc(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(n);if(!a)return null;let i=a[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?t9(s,d=>d.test(i)):e9(s,d=>d.test(i)),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;let c=t.slice(i.length);return{value:u,rest:c}}}function e9(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function t9(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function yO(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=r.valueCallback?r.valueCallback(i):i;let s=t.slice(n.length);return{value:i,rest:s}}}var r9=/^(\d+)(th|st|nd|rd)?/i,o9=/\d+/i,n9={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},a9={any:[/^b/i,/^(a|c)/i]},i9={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},s9={any:[/1/i,/2/i,/3/i,/4/i]},l9={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},u9={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]},c9={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},d9={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]},f9={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},p9={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}},CO={ordinalNumber:yO({matchPattern:r9,parsePattern:o9,valueCallback:e=>parseInt(e,10)}),era:Uc({matchPatterns:n9,defaultMatchWidth:"wide",parsePatterns:a9,defaultParseWidth:"any"}),quarter:Uc({matchPatterns:i9,defaultMatchWidth:"wide",parsePatterns:s9,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Uc({matchPatterns:l9,defaultMatchWidth:"wide",parsePatterns:u9,defaultParseWidth:"any"}),day:Uc({matchPatterns:c9,defaultMatchWidth:"wide",parsePatterns:d9,defaultParseWidth:"any"}),dayPeriod:Uc({matchPatterns:f9,defaultMatchWidth:"any",parsePatterns:p9,defaultParseWidth:"any"})};var Mb={code:"en-US",formatDistance:gO,formatLong:hO,formatRelative:vO,localize:xO,match:CO,options:{weekStartsOn:0,firstWeekContainsDate:1}};function wO(e){let t=Te(e);return sO(t,pO(t))+1}function SO(e){let t=Te(e),r=+Nl(t)-+lO(t);return Math.round(r/gx)+1}function Cx(e,t){let r=Te(e),o=r.getFullYear(),n=ga(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=cr(e,0);i.setFullYear(o+1,0,a),i.setHours(0,0,0,0);let s=Dn(i,t),l=cr(e,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);let u=Dn(l,t);return r.getTime()>=s.getTime()?o+1:r.getTime()>=u.getTime()?o:o-1}function bO(e,t){let r=ga(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=Cx(e,t),a=cr(e,0);return a.setFullYear(n,0,o),a.setHours(0,0,0,0),Dn(a,t)}function RO(e,t){let r=Te(e),o=+Dn(r,t)-+bO(r,t);return Math.round(o/gx)+1}function Ue(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var oi={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return Ue(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):Ue(r+1,2)},d(e,t){return Ue(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Ue(e.getHours()%12||12,t.length)},H(e,t){return Ue(e.getHours(),t.length)},m(e,t){return Ue(e.getMinutes(),t.length)},s(e,t){return Ue(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return Ue(n,t.length)}};var zc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Eb={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});case"GGGG":default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return oi.y(e,t)},Y:function(e,t,r,o){let n=Cx(e,o),a=n>0?n:1-n;if(t==="YY"){let i=a%100;return Ue(i,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):Ue(a,t.length)},R:function(e,t){let r=hx(e);return Ue(r,t.length)},u:function(e,t){let r=e.getFullYear();return Ue(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return Ue(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return Ue(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return oi.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return Ue(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=RO(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):Ue(n,t.length)},I:function(e,t,r){let o=SO(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):Ue(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):oi.d(e,t)},D:function(e,t,r){let o=wO(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):Ue(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});case"EEEE":default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Ue(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});case"eeee":default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Ue(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});case"cccc":default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return Ue(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});case"iiii":default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=zc.noon:o===0?n=zc.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=zc.evening:o>=12?n=zc.afternoon:o>=4?n=zc.morning:n=zc.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return oi.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):oi.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):Ue(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):Ue(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):oi.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):oi.s(e,t)},S:function(e,t){return oi.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return PO(o);case"XXXX":case"XX":return Fl(o);case"XXXXX":case"XXX":default:return Fl(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return PO(o);case"xxxx":case"xx":return Fl(o);case"xxxxx":case"xxx":default:return Fl(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+IO(o,":");case"OOOO":default:return"GMT"+Fl(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+IO(o,":");case"zzzz":default:return"GMT"+Fl(o,":")}},t:function(e,t,r){let o=Math.trunc(e.getTime()/1e3);return Ue(o,t.length)},T:function(e,t,r){let o=e.getTime();return Ue(o,t.length)}};function IO(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),a=o%60;return a===0?r+String(n):r+String(n)+t+Ue(a,2)}function PO(e,t){return e%60===0?(e>0?"-":"+")+Ue(Math.abs(e)/60,2):Fl(e,t)}function Fl(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Ue(Math.trunc(o/60),2),a=Ue(o%60,2);return r+n+t+a}var LO=(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"})}},TO=(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"})}},m9=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return LO(e,t);let a;switch(o){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}}",LO(o,t)).replace("{{time}}",TO(n,t))},kO={p:TO,P:m9};var g9=/^D+$/,h9=/^Y+$/,v9=["D","DD","YY","YYYY"];function MO(e){return g9.test(e)}function EO(e){return h9.test(e)}function AO(e,t,r){let o=x9(e,t,r);if(console.warn(o),v9.includes(e))throw new RangeError(o)}function x9(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var y9=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,C9=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,w9=/^'([^]*?)'?$/,S9=/''/g,b9=/[a-zA-Z]/;function jo(e,t,r){let o=ga(),n=r?.locale??o.locale??Mb,a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,s=Te(e);if(!vx(s))throw new RangeError("Invalid time value");let l=t.match(C9).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=kO[d];return f(c,n.formatLong)}return c}).join("").match(y9).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:R9(c)};if(Eb[d])return{isToken:!0,value:c};if(d.match(b9))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;(!r?.useAdditionalWeekYearTokens&&EO(d)||!r?.useAdditionalDayOfYearTokens&&MO(d))&&AO(d,t,String(e));let f=Eb[d[0]];return f(s,d,n.localize,u)}).join("")}function R9(e){let t=e.match(w9);return t?t[1].replace(S9,"'"):e}function Ab(e){return Te(e).getDay()}function DO(e,t){let r=Te(e),o=Te(t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function NO(e){return Ol(e,uO(e))}function OO(e,t){return mx(e,-t)}var Hr=R(N());function Gc({mode:e="single",selected:t,onSelect:r,disabled:o,showOutsideDays:n=!1,className:a,classNames:i,numberOfMonths:s=1,defaultMonth:l,...u}){let[c,d]=FO.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(OO(c,1))},g=()=>{d(mx(c,1))},m=b=>{if(!o?.(b)){if(e==="single")r?.(b);else if(e==="range"){let S=t;!S?.from||S.from&&S.to?r?.({from:b,to:void 0}):b<S.from?r?.({from:b,to:S.from}):r?.({from:S.from,to:b})}}},x=b=>{if(!t)return!1;if(e==="single")return Ol(b,t);if(e==="range"){let S=t;return S.from&&S.to?b>=S.from&&b<=S.to:S.from?Ol(b,S.from):!1}return!1},h=b=>{if(e!=="range"||!t)return!1;let S=t;return S.from?Ol(b,S.from):!1},v=b=>{if(e!=="range"||!t)return!1;let S=t;return S.to?Ol(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},w=(()=>{let b=fO(c),S=dO(c),I=xx({start:b,end:S}),L=Ab(b),T=[];if(L>0&&n){let D=Dn(b),z=new Date(b);z.setDate(z.getDate()-1),T.push(...xx({start:D,end:z}))}let k=Ab(S),E=[];if(k<6&&n){let D=new Date(S);D.setDate(D.getDate()+1);let z=mO(S);E.push(...xx({start:D,end:z}))}let _=[];if(!n&&L>0)for(let D=0;D<L;D++)_.push(null);return[...T,..._,...I,...E]})();return(0,Hr.jsxs)("div",{className:P("moonui-theme","p-0",a),children:[(0,Hr.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,Hr.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,Hr.jsx)(Rn,{className:"h-5 w-5"})}),(0,Hr.jsx)("h2",{className:"text-base font-medium",children:jo(c,"MMMM yyyy")}),(0,Hr.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,Hr.jsx)(Vr,{className:"h-5 w-5"})})]}),(0,Hr.jsxs)("div",{className:"px-6 pb-4",children:[(0,Hr.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((b,S)=>(0,Hr.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,Hr.jsx)("div",{className:"grid grid-cols-7 gap-1",children:w.map((b,S)=>{if(!b)return(0,Hr.jsx)("div",{className:"h-10 w-10"},`empty-${S}`);let I=!DO(b,c),L=o?.(b)||!1,T=x(b),k=NO(b),E=h(b),_=v(b),D=y(b);return(0,Hr.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:jo(b,"d")},b.toISOString())})})]})]})}Gc.displayName="Calendar";var _l=R(M());var fs=R(N()),I9=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[r,o]of Object.entries(t))if(o.test(e))return r;return"unknown"},_O=(e,t)=>{let r=e.replace(/\s+/g,""),o=t==="amex"?[4,6,5]:[4,4,4,4],n="",a=0;for(let i of o){if(a>=r.length)break;n&&(n+=" "),n+=r.slice(a,a+i),a+=i}return n},Db=_l.forwardRef(({className:e,value:t="",onChange:r,showIcon:o=!0,size:n,...a},i)=>{let[s,l]=_l.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=I9(d);l(f);let p=f==="amex"?15:16,g=d.slice(0,p),m=_O(g,f);r?.(g,f),c.target.value=m};return(0,fs.jsxs)("div",{className:"relative",children:[(0,fs.jsx)(dr,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:_O(t,s),onChange:u,className:P(o&&"pl-10",e),...a}),o&&(0,fs.jsx)(Ff,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});Db.displayName="CardNumberInput";var Nb=_l.forwardRef(({className:e,value:t="",onChange:r,size:o,...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)),r?.(u),l.target.value=c},s=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return(0,fs.jsx)(dr,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...n})});Nb.displayName="CardExpiryInput";var Ob=_l.forwardRef(({className:e,value:t="",onChange:r,cardType:o="unknown",size:n,...a},i)=>{let s=o==="amex"?4:3;return(0,fs.jsx)(dr,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-csc",placeholder:o==="amex"?"1234":"123",value:t,onChange:u=>{let c=u.target.value.replace(/\D/g,"").slice(0,s);r?.(c)},maxLength:s,className:e,...a})});Ob.displayName="CardCVCInput";var Fb=_l.forwardRef(({className:e,value:t="",onChange:r,format:o="US",size:n,...a},i)=>{let s=u=>{let c=u.target.value;switch(o){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)}r?.(c.replace(/\s/g,"")),u.target.value=c};return(0,fs.jsx)(dr,{ref:i,type:"text",autoComplete:"postal-code",placeholder:(()=>{switch(o){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})});Fb.displayName="CardZipInput";var St=R(M());var $o=R(M(),1);function P9(e){return Object.prototype.toString.call(e)==="[object Object]"}function VO(e){return P9(e)||Array.isArray(e)}function HO(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function wx(e,t){let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;let n=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return n!==a?!1:r.every(i=>{let s=e[i],l=t[i];return typeof s=="function"?`${s}`==`${l}`:!VO(s)||!VO(l)?s===l:wx(s,l)})}function BO(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function UO(e,t){if(e.length!==t.length)return!1;let r=BO(e),o=BO(t);return r.every((n,a)=>{let i=o[a];return wx(n,i)})}function Bb(e){return typeof e=="number"}function _b(e){return typeof e=="string"}function Sx(e){return typeof e=="boolean"}function zO(e){return Object.prototype.toString.call(e)==="[object Object]"}function vt(e){return Math.abs(e)}function Hb(e){return Math.sign(e)}function tm(e,t){return vt(e-t)}function L9(e,t){if(e===0||t===0||vt(e)<=vt(t))return 0;let r=tm(vt(e),vt(t));return vt(r/e)}function T9(e){return Math.round(e*100)/100}function rm(e){return om(e).map(Number)}function Nn(e){return e[am(e)]}function am(e){return Math.max(0,e.length-1)}function Ub(e,t){return t===am(e)}function GO(e,t=0){return Array.from(Array(e),(r,o)=>t+o)}function om(e){return Object.keys(e)}function WO(e,t){return[e,t].reduce((r,o)=>(om(o).forEach(n=>{let a=r[n],i=o[n],s=zO(a)&&zO(i);r[n]=s?WO(a,i):i}),r),{})}function Vb(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function k9(e,t){let r={start:o,center:n,end:a};function o(){return 0}function n(l){return a(l)/2}function a(l){return t-l}function i(l,u){return _b(e)?r[e](l):e(t,l,u)}return{measure:i}}function nm(){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),o}function r(){e=e.filter(n=>n())}let o={add:t,clear:r};return o}function M9(e,t,r,o){let n=nm(),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,r(),r());let h=x-i;for(i=x,s+=h;s>=a;)r(),s-=a;let v=s/a;o(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:r,render:o}}function E9(e,t){let r=t==="rtl",o=e==="y",n=o?"y":"x",a=o?"x":"y",i=!o&&r?-1:1,s=c(),l=d();function u(g){let{height:m,width:x}=g;return o?m:x}function c(){return o?"top":r?"right":"left"}function d(){return o?"bottom":r?"left":"right"}function f(g){return g*i}return{scroll:n,cross:a,startEdge:s,endEdge:l,measureSize:u,direction:f}}function Vl(e=0,t=0){let r=vt(e-t);function o(u){return u<e}function n(u){return u>t}function a(u){return o(u)||n(u)}function i(u){return a(u)?o(u)?e:t:u}function s(u){return r?u-r*Math.ceil((u-t)/r):u}return{length:r,max:t,min:e,constrain:i,reachedAny:a,reachedMax:n,reachedMin:o,removeOffset:s}}function jO(e,t,r){let{constrain:o}=Vl(0,e),n=e+1,a=i(t);function i(f){return r?vt((n+f)%n):o(f)}function s(){return a}function l(f){return a=i(f),d}function u(f){return c().set(s()+f)}function c(){return jO(e,s(),r)}let d={get:s,set:l,add:u,clone:c};return d}function A9(e,t,r,o,n,a,i,s,l,u,c,d,f,p,g,m,x,h,v){let{cross:y,direction:C}=e,w=["INPUT","SELECT","TEXTAREA"],b={passive:!1},S=nm(),I=nm(),L=Vl(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){(Sx(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?r: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 w.includes(Ie)}function re(){return(g?k:T)[A?"mouse":"touch"]}function Y(X,Ie){let J=d.add(Hb(X)*-1),ie=c.byDistance(X,!g).distance;return g||vt(X)<L?ie:x&&Ie?ie*.5:c.byIndex(J.get(),0).distance}function ce(X){let Ie=Vb(X,o);A=Ie,B=g&&Ie&&!X.buttons&&_,_=tm(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(!Vb(X,o)&&X.touches.length>=2)return ne(X);let J=a.readPoint(X),ie=a.readPoint(X,y),Ge=tm(J,D),Xe=tm(ie,z);if(!O&&!A&&(!X.cancelable||(O=Ge>Xe,!O)))return ne(X);let kt=a.pointerMove(X);Ge>m&&(B=!0),u.useFriction(.3).useDuration(.75),s.start(),n.add(C(kt)),X.preventDefault()}function ne(X){let J=c.byDistance(0,!1).index!==d.get(),ie=a.pointerUp(X)*re(),Ge=Y(C(ie),J),Xe=L9(ie,Ge),kt=E-10*Xe,Oe=h+Xe/50;O=!1,F=!1,I.clear(),u.useDuration(kt).useFriction(Oe),l.distance(Ge,!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 D9(e,t){let o,n;function a(d){return d.timeStamp}function i(d,f){let g=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(Vb(d,t)?d:d.touches[0])[g]}function s(d){return o=d,n=d,i(d)}function l(d){let f=i(d)-i(n),p=a(d)-a(o)>170;return n=d,p&&(o=d),f}function u(d){if(!o||!n)return 0;let f=i(n)-i(o),p=a(d)-a(o),g=a(d)-a(n)>170,m=f/p;return p&&!g&&vt(m)>.1?m:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:i}}function N9(){function e(r){let{offsetTop:o,offsetLeft:n,offsetWidth:a,offsetHeight:i}=r;return{top:o,right:n+a,bottom:o+i,left:n,width:a,height:i}}return{measure:e}}function O9(e){function t(o){return e*(o/100)}return{measure:t}}function F9(e,t,r,o,n,a,i){let s=[e].concat(o),l,u,c=[],d=!1;function f(x){return n.measureSize(i.measure(x))}function p(x){if(!a)return;u=f(e),c=o.map(f);function h(v){for(let y of v){if(d)return;let C=y.target===e,w=o.indexOf(y.target),b=C?u:c[w],S=f(C?e:o[w]);if(vt(S-b)>=.5){x.reInit(),t.emit("resize");break}}}l=new ResizeObserver(v=>{(Sx(a)||a(x,v))&&h(v)}),r.requestAnimationFrame(()=>{s.forEach(v=>l.observe(v))})}function g(){d=!0,l&&l.disconnect()}return{init:p,destroy:g}}function _9(e,t,r,o,n,a){let i=0,s=0,l=n,u=a,c=e.get(),d=0;function f(){let b=o.get()-e.get(),S=!l,I=0;return S?(i=0,r.set(o),e.set(o),I=b):(r.set(e),i+=b/l,i*=u,c+=i,e.add(i),I=c-d),s=Hb(I),d=c,w}function p(){let b=o.get()-t.get();return vt(b)<.001}function g(){return l}function m(){return s}function x(){return i}function h(){return y(n)}function v(){return C(a)}function y(b){return l=b,w}function C(b){return u=b,w}let w={direction:m,duration:g,velocity:x,seek:f,settled:p,useBaseFriction:v,useBaseDuration:h,useFriction:C,useDuration:y};return w}function V9(e,t,r,o,n){let a=n.measure(10),i=n.measure(50),s=Vl(.1,.99),l=!1;function u(){return!(l||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function c(p){if(!u())return;let g=e.reachedMin(t.get())?"min":"max",m=vt(e[g]-t.get()),x=r.get()-t.get(),h=s.constrain(m/i);r.subtract(x*h),!p&&vt(x)<a&&(r.set(e.constrain(r.get())),o.useDuration(25).useBaseFriction())}function d(p){l=!p}return{shouldConstrain:u,constrain:c,toggleActive:d}}function B9(e,t,r,o,n){let a=Vl(-t+e,0),i=d(),s=c(),l=f();function u(g,m){return tm(g,m)<=1}function c(){let g=i[0],m=Nn(i),x=i.lastIndexOf(g),h=i.indexOf(m)+1;return Vl(x,h)}function d(){return r.map((g,m)=>{let{min:x,max:h}=a,v=a.constrain(g),y=!m,C=Ub(r,m);return y?h:C||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(o==="keepSnaps")return i;let{min:g,max:m}=s;return i.slice(g,m)}return{snapsContained:l,scrollContainLimit:s}}function H9(e,t,r){let o=t[0],n=r?o-e:Nn(t);return{limit:Vl(n,o)}}function U9(e,t,r,o){let a=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:l}=Vl(a,i);function u(f){return f===1?l(r.get()):f===-1?s(r.get()):!1}function c(f){if(!u(f))return;let p=e*(f*-1);o.forEach(g=>g.add(p))}return{loop:c}}function z9(e){let{max:t,length:r}=e;function o(a){let i=a-t;return r?i/-r:0}return{get:o}}function G9(e,t,r,o,n){let{startEdge:a,endEdge:i}=e,{groupSlides:s}=n,l=d().map(t.measure),u=f(),c=p();function d(){return s(o).map(m=>Nn(m)[i]-m[0][a]).map(vt)}function f(){return o.map(m=>r[a]-m[a]).map(m=>-vt(m))}function p(){return s(u).map(m=>m[0]).map((m,x)=>m+l[x])}return{snaps:u,snapsAligned:c}}function W9(e,t,r,o,n,a){let{groupSlides:i}=n,{min:s,max:l}=o,u=c();function c(){let f=i(a),p=!e||t==="keepSnaps";return r.length===1?[a]:p?f:f.slice(s,l).map((g,m,x)=>{let h=!m,v=Ub(x,m);if(h){let y=Nn(x[0])+1;return GO(y)}if(v){let y=am(a)-Nn(x)[0]+1;return GO(y,Nn(x)[0])}return g})}return{slideRegistry:u}}function j9(e,t,r,o,n){let{reachedAny:a,removeOffset:i,constrain:s}=o;function l(g){return g.concat().sort((m,x)=>vt(m)-vt(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)=>vt(v.diff)-vt(y.diff)),{index:h}=x[0];return{index:h,distance:m}}function c(g,m){let x=[g,g+r,g-r];if(!e)return g;if(!m)return l(x);let h=x.filter(v=>Hb(v)===m);return h.length?l(h):Nn(x)-r}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 C=t[h]-v,w=g+c(C,0);return{index:h,distance:w}}return{byDistance:f,byIndex:d,shortcut:c}}function $9(e,t,r,o,n,a,i){function s(d){let f=d.distance,p=d.index!==t.get();a.add(f),f&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(r.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 q9(e,t,r,o,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=r.findIndex(y=>y.includes(m));Bb(v)&&(n.useDuration(0),o.index(v,0),i.emit("slideFocus"))}a.add(document,"keydown",d,!1),t.forEach((m,x)=>{a.add(m,"focus",h=>{(Sx(s)||s(p,h))&&g(x)},l)})}function d(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function em(e){let t=e;function r(){return t}function o(l){t=i(l)}function n(l){t+=i(l)}function a(l){t-=i(l)}function i(l){return Bb(l)?l:l.get()}return{get:r,set:o,add:n,subtract:a}}function $O(e,t){let r=e.scroll==="x"?i:s,o=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=T9(e.direction(f));p!==n&&(o.transform=r(p),n=p)}function u(f){a=!f}function c(){a||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function K9(e,t,r,o,n,a,i,s,l){let c=rm(n),d=rm(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-o[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:-r,_=L?r:0,D=L?"end":"start",z=T[k][D];return{index:k,loopPoint:z,slideLocation:em(-1),translate:$O(e,l[k]),target:()=>s.get()>z?E:_}})}function h(){let S=i[0],I=g(d,S);return x(I,r,!1)}function v(){let S=t-i[0]-1,I=g(c,S);return x(I,-r,!0)}function y(){return f.every(({index:S})=>{let I=c.filter(L=>L!==S);return p(I,t)<=.1})}function C(){f.forEach(S=>{let{target:I,translate:L,slideLocation:T}=S,k=I();k!==T.get()&&(L.to(k),T.set(k))})}function w(){f.forEach(S=>S.translate.clear())}return{canLoop:y,clear:w,loop:C,loopPoints:f}}function X9(e,t,r){let o,n=!1;function a(l){if(!r)return;function u(c){for(let d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(c=>{n||(Sx(r)||r(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),n=!0}return{init:a,destroy:i}}function Y9(e,t,r,o){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,r.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(g=>s.observe(g))}function c(){s&&s.disconnect(),l=!0}function d(g){return om(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 Q9(e,t,r,o,n,a){let{measureSize:i,startEdge:s,endEdge:l}=e,u=r[0]&&n,c=g(),d=m(),f=r.map(i),p=x();function g(){if(!u)return 0;let v=r[0];return vt(t[s]-v[s])}function m(){if(!u)return 0;let v=a.getComputedStyle(Nn(o));return parseFloat(v.getPropertyValue(`margin-${l}`))}function x(){return r.map((v,y,C)=>{let w=!y,b=Ub(C,y);return w?f[y]+c:b?f[y]+d:C[y+1][s]-v[s]}).map(vt)}return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}function Z9(e,t,r,o,n,a,i,s,l){let{startEdge:u,endEdge:c,direction:d}=e,f=Bb(r);function p(h,v){return rm(h).filter(y=>y%v===0).map(y=>h.slice(y,y+v))}function g(h){return h.length?rm(h).reduce((v,y,C)=>{let w=Nn(v)||0,b=w===0,S=y===am(h),I=n[u]-a[w][u],L=n[u]-a[y][c],T=!o&&b?d(i):0,k=!o&&S?d(s):0,E=vt(L-k-(I+T));return C&&E>t+l&&v.push(y),S&&v.push(h.length),v},[]).map((v,y,C)=>{let w=Math.max(C[y-1]||0);return h.slice(w,v)}):[]}function m(h){return f?p(h,r):g(h)}return{groupSlides:m}}function J9(e,t,r,o,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:C,watchDrag:w,watchFocus:b}=a,S=2,I=N9(),L=I.measure(t),T=r.map(I.measure),k=E9(l,u),E=k.measureSize(L),_=O9(E),D=k9(s,E),z=!d&&!!v,F=d||!!v,{slideSizes:O,slideSizesWithGaps:B,startGap:A,endGap:te}=Q9(k,L,T,r,F,n),ae=Z9(k,E,x,d,L,T,A,te,S),{snaps:V,snapsAligned:Q}=G9(k,D,L,T,ae),re=-Nn(V)+Nn(B),{snapsContained:Y,scrollContainLimit:ce}=B9(E,re,Q,v,S),U=z?Y:Q,{limit:ne}=H9(re,U,d),he=jO(am(U),c,d),xe=he.clone(),pe=rm(r),X=({dragHandler:Si,scrollBody:Ld,scrollBounds:Td,options:{loop:Eo}})=>{Eo||Td.constrain(Si.pointerDown()),Ld.seek()},Ie=({scrollBody:Si,translate:Ld,location:Td,offsetLocation:Eo,previousLocation:kd,scrollLooper:d0,slideLooper:e5,dragHandler:t5,animation:r5,eventHandler:TT,scrollBounds:o5,options:{loop:kT}},MT)=>{let ET=Si.settled(),n5=!o5.shouldConstrain(),AT=kT?ET:ET&&n5,DT=AT&&!t5.pointerDown();DT&&r5.stop();let a5=Td.get()*MT+kd.get()*(1-MT);Eo.set(a5),kT&&(d0.loop(Si.direction()),e5.loop()),Ld.to(Eo.get()),DT&&TT.emit("settle"),AT||TT.emit("scroll")},J=M9(o,n,()=>X(mu),Si=>Ie(mu,Si)),ie=.68,Ge=U[he.get()],Xe=em(Ge),kt=em(Ge),Oe=em(Ge),Rt=em(Ge),Yn=_9(Xe,Oe,kt,Rt,f,ie),Dr=j9(d,U,re,ne,Rt),pn=$9(J,he,xe,Yn,Dr,Rt,i),Mo=z9(ne),mn=nm(),Qn=Y9(t,r,i,m),{slideRegistry:Zn}=W9(z,v,U,ce,ae,pe),ig=q9(e,r,Zn,pn,Yn,mn,i,b),mu={ownerDocument:o,ownerWindow:n,eventHandler:i,containerRect:L,slideRects:T,animation:J,axis:k,dragHandler:A9(k,e,o,n,Rt,D9(k,n),Xe,J,pn,Yn,Dr,he,i,_,p,g,h,ie,w),eventStore:mn,percentOfView:_,index:he,indexPrevious:xe,limit:ne,location:Xe,offsetLocation:Oe,previousLocation:kt,options:a,resizeHandler:F9(t,i,n,r,k,y,I),scrollBody:Yn,scrollBounds:V9(ne,Oe,Rt,Yn,_),scrollLooper:U9(re,ne,Oe,[Xe,Oe,kt,Rt]),scrollProgress:Mo,scrollSnapList:U.map(Mo.get),scrollSnaps:U,scrollTarget:Dr,scrollTo:pn,slideLooper:K9(k,E,re,O,B,V,U,Oe,r),slideFocus:ig,slidesHandler:X9(t,i,C),slidesInView:Qn,slideIndexes:pe,slideRegistry:Zn,slidesToScroll:ae,target:Rt,translate:$O(k,t)};return mu}function e7(){let e={},t;function r(u){t=u}function o(u){return e[u]||[]}function n(u){return o(u).forEach(c=>c(t,u)),l}function a(u,c){return e[u]=o(u).concat([c]),l}function i(u,c){return e[u]=o(u).filter(d=>d!==c),l}function s(){e={}}let l={init:r,emit:n,off:i,on:a,clear:s};return l}var t7={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 r7(e){function t(a,i){return WO(a,i||{})}function r(a){let i=a.breakpoints||{},s=om(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(a,s)}function o(a){return a.map(i=>om(i.breakpoints||{})).reduce((i,s)=>i.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:o}}function o7(e){let t=[];function r(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 o(){t=t.filter(a=>a.destroy())}return{init:r,destroy:o}}function im(e,t,r){let o=e.ownerDocument,n=o.defaultView,a=r7(n),i=o7(a),s=nm(),l=e7(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=a,{on:f,off:p,emit:g}=l,m=k,x=!1,h,v=u(t7,im.globalOptions),y=u(v),C=[],w,b,S;function I(){let{container:pe,slides:X}=y;b=(_b(pe)?e.querySelector(pe):pe)||e.children[0];let J=_b(X)?b.querySelectorAll(X):X;S=[].slice.call(J||b.children)}function L(pe){let X=J9(e,b,S,o,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),C=X||C,I(),h=L(y),d([v,...C.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),w=i.init(xe,C)))}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 re(){return h.slidesInView.get(!1)}function Y(){return w}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:re};return T(t,r),setTimeout(()=>l.emit("init"),0),xe}im.globalOptions=void 0;function bx(e={},t=[]){let r=(0,$o.useRef)(e),o=(0,$o.useRef)(t),[n,a]=(0,$o.useState)(),[i,s]=(0,$o.useState)(),l=(0,$o.useCallback)(()=>{n&&n.reInit(r.current,o.current)},[n]);return(0,$o.useEffect)(()=>{wx(r.current,e)||(r.current=e,l())},[e,l]),(0,$o.useEffect)(()=>{UO(o.current,t)||(o.current=t,l())},[t,l]),(0,$o.useEffect)(()=>{if(HO()&&i){im.globalOptions=bx.globalOptions;let u=im(i,r.current,o.current);return a(u),()=>u.destroy()}else a(void 0)},[i,a]),[s,n]}bx.globalOptions=void 0;var io=R(N()),qO=St.createContext(null);function Wc(){let e=St.useContext(qO);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var zb=St.forwardRef(({orientation:e="horizontal",opts:t,setApi:r,plugins:o,className:n,children:a,...i},s)=>{let l=e||(t?.axis==="y"?"vertical":"horizontal"),[u,c]=bx({...t,axis:l==="horizontal"?"x":"y"},o),[d,f]=St.useState(!1),[p,g]=St.useState(!1),[m,x]=St.useState({current:0,total:0}),h=St.useCallback(w=>{w&&(f(w.canScrollPrev()),g(w.canScrollNext()),x({current:w.selectedScrollSnap()+1,total:w.scrollSnapList().length}))},[]),v=St.useCallback(()=>{c?.scrollPrev()},[c]),y=St.useCallback(()=>{c?.scrollNext()},[c]),C=St.useCallback(w=>{let b=l==="horizontal"?"ArrowLeft":"ArrowUp",S=l==="horizontal"?"ArrowRight":"ArrowDown";w.key===b?(w.preventDefault(),v()):w.key===S&&(w.preventDefault(),y())},[l,v,y]);return St.useEffect(()=>{!c||!r||r(c)},[c,r]),St.useEffect(()=>{if(c)return h(c),c.on("reInit",h),c.on("select",h),()=>{c.off("reInit",h),c.off("select",h)}},[c,h]),(0,io.jsx)(qO.Provider,{value:{carouselRef:u,api:c,opts:t,scrollPrev:v,scrollNext:y,canScrollPrev:d,canScrollNext:p,orientation:l},children:(0,io.jsxs)("div",{ref:s,onKeyDownCapture:C,className:P("moonui-theme","relative",n),role:"region","aria-roledescription":"carousel",...i,children:[a,(0,io.jsx)("div",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:m.total>0?`Slide ${m.current} of ${m.total}`:""})]})})});zb.displayName="Carousel";var Gb=K("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),Wb=St.forwardRef(({className:e,...t},r)=>{let{carouselRef:o,orientation:n}=Wc();return(0,io.jsx)("div",{ref:o,className:"overflow-hidden",children:(0,io.jsx)("div",{ref:r,className:P(Gb({orientation:n}),e),...t})})});Wb.displayName="CarouselContent";var jb=K("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),$b=St.forwardRef(({className:e,...t},r)=>{let{orientation:o}=Wc();return(0,io.jsx)("div",{ref:r,role:"group","aria-roledescription":"slide",className:P(jb({orientation:o}),e),...t})});$b.displayName="CarouselItem";var qb=St.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollPrev:i,canScrollPrev:s}=Wc();return(0,io.jsxs)(Ee,{ref:n,variant:t,size:r,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,...o,children:[(0,io.jsx)(kf,{className:"h-4 w-4","aria-hidden":"true"}),(0,io.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});qb.displayName="CarouselPrevious";var Kb=St.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollNext:i,canScrollNext:s}=Wc();return(0,io.jsxs)(Ee,{ref:n,variant:t,size:r,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,...o,children:[(0,io.jsx)(Mf,{className:"h-4 w-4","aria-hidden":"true"}),(0,io.jsx)("span",{className:"sr-only",children:"Next slide"})]})});Kb.displayName="CarouselNext";var Bl=R(M());var Ur=R(M(),1);var Rx=R(M(),1);function jc(e){let t=Rx.useRef({value:e,previous:e});return Rx.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var KO=R(M(),1);function $c(e){let[t,r]=KO.useState(void 0);return Ve(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let o=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;r({width:i,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}var So=R(N(),1),Ix="Checkbox",[n7,IIe]=Fe(Ix),[a7,Xb]=n7(Ix);function i7(e){let{__scopeCheckbox:t,checked:r,children:o,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:r,defaultProp:n??!1,onChange:l,caller:Ix}),[g,m]=Ur.useState(null),[x,h]=Ur.useState(null),v=Ur.useRef(!1),y=g?!!i||!!g.closest("form"):!0,C={checked:f,disabled:a,setChecked:p,control:g,setControl:m,name:s,form:i,value:c,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:ps(n)?!1:n,isFormControl:y,bubbleInput:x,setBubbleInput:h};return(0,So.jsx)(a7,{scope:t,...C,children:s7(d)?d(C):o})}var XO="CheckboxTrigger",YO=Ur.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...o},n)=>{let{control:a,value:i,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:g}=Xb(XO,e),m=de(n,c),x=Ur.useRef(l);return Ur.useEffect(()=>{let h=a?.form;if(h){let v=()=>d(x.current);return h.addEventListener("reset",v),()=>h.removeEventListener("reset",v)}},[a,d]),(0,So.jsx)(q.button,{type:"button",role:"checkbox","aria-checked":ps(l)?"mixed":l,"aria-required":u,"data-state":eF(l),"data-disabled":s?"":void 0,disabled:s,value:i,...o,ref:m,onKeyDown:W(t,h=>{h.key==="Enter"&&h.preventDefault()}),onClick:W(r,h=>{d(v=>ps(v)?!0:!v),g&&p&&(f.current=h.isPropagationStopped(),f.current||h.stopPropagation())})})});YO.displayName=XO;var Px=Ur.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:o,checked:n,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return(0,So.jsx)(i7,{__scopeCheckbox:r,checked:n,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:o,form:c,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,So.jsxs)(So.Fragment,{children:[(0,So.jsx)(YO,{...d,ref:t,__scopeCheckbox:r}),f&&(0,So.jsx)(JO,{__scopeCheckbox:r})]})})});Px.displayName=Ix;var QO="CheckboxIndicator",Yb=Ur.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:o,...n}=e,a=Xb(QO,r);return(0,So.jsx)(ut,{present:o||ps(a.checked)||a.checked===!0,children:(0,So.jsx)(q.span,{"data-state":eF(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});Yb.displayName=QO;var ZO="CheckboxBubbleInput",JO=Ur.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:o,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:i,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:p}=Xb(ZO,e),g=de(r,p),m=jc(a),x=$c(o);Ur.useEffect(()=>{let v=f;if(!v)return;let y=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(y,"checked").set,b=!n.current;if(m!==a&&w){let S=new Event("click",{bubbles:b});v.indeterminate=ps(a),w.call(v,ps(a)?!1:a),v.dispatchEvent(S)}},[f,m,a,n]);let h=Ur.useRef(ps(a)?!1:a);return(0,So.jsx)(q.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%)"}})});JO.displayName=ZO;function s7(e){return typeof e=="function"}function ps(e){return e==="indeterminate"}function eF(e){return ps(e)?"indeterminate":e?"checked":"unchecked"}var qo=R(N()),u7=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"}}),Lx=Bl.forwardRef(({className:e,variant:t,size:r,radius:o,animation:n,indeterminate:a=!1,icon:i,checked:s,...l},u)=>(0,qo.jsx)(Px,{ref:u,checked:a?"indeterminate":s,className:P("moonui-theme",u7({variant:t,size:r,radius:o,animation:n}),e),...l,children:(0,qo.jsx)(Yb,{className:P("flex items-center justify-center text-current",n==="bounce"&&"data-[state=checked]:animate-bounce"),children:a?(0,qo.jsx)($f,{className:"h-[65%] w-[65%]"}):i||(0,qo.jsx)(Cr,{className:"h-[65%] w-[65%]"})})}));Lx.displayName=Px.displayName;var Qb=Bl.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:o,...n},a)=>(0,qo.jsx)("div",{ref:a,className:P("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...n,children:o}));Qb.displayName="CheckboxGroup";var sm=Bl.forwardRef(({className:e,htmlFor:t,children:r,position:o="end",disabled:n=!1,...a},i)=>(0,qo.jsx)("label",{ref:i,htmlFor:t,className:P("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",o==="start"?"mr-2":"ml-2",n&&"cursor-not-allowed opacity-70",e),...a,children:r}));sm.displayName="CheckboxLabel";var Zb=Bl.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:o,...n},a)=>{let i=Bl.useId(),s=e||i;return(0,qo.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,qo.jsx)(sm,{htmlFor:s,position:"start",disabled:n.disabled,className:o,children:t}),(0,qo.jsx)(Lx,{ref:a,id:s,...n}),r==="end"&&(0,qo.jsx)(sm,{htmlFor:s,position:"end",disabled:n.disabled,className:o,children:t})]})});Zb.displayName="CheckboxWithLabel";var eR=R(M());var Hl=R(N()),tF=Fh,Jb=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"}}),tR=eR.forwardRef(({className:e,children:t,variant:r,size:o,asChild:n,...a},i)=>n?(0,Hl.jsx)(qu,{ref:i,className:P("moonui-theme",Jb({variant:r,size:o}),e),asChild:n,...a,children:t}):(0,Hl.jsxs)(qu,{ref:i,className:P("moonui-theme",Jb({variant:r,size:o}),e),...a,children:[t,(0,Hl.jsx)(la,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));tR.displayName=qu.displayName;var rF=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"}}),rR=eR.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>(0,Hl.jsx)(bf,{ref:a,className:P("moonui-theme",rF({variant:r,size:o}),e),...n,children:(0,Hl.jsx)("div",{className:"p-4",children:t})}));rR.displayName=bf.displayName;var Jo=R(M());var ni=R(M());var bo=R(N()),c7=K("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),d7=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}}),dr=ni.forwardRef(({className:e,wrapperClassName:t,messageClassName:r,variant:o,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:C,onBlur:w,placeholder:b,...S},I)=>{let L=ni.useId(),T=S.id||L,[k,E]=ni.useState(!1),[_,D]=ni.useState(h||v||""),F=k||_!==""&&_!==null&&_!==void 0,O=V=>{E(!0),C?.(V)},B=V=>{E(!1),w?.(V)},A=V=>{D(V.target.value),y?.(V)};ni.useEffect(()=>{h!==void 0&&D(h)},[h]);let te=p||s||l,ae=s?"error":l?"success":"normal";return(0,bo.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,bo.jsxs)("div",{className:P("moonui-theme",c7({size:n}),t),children:[m&&g&&(0,bo.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,bo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,bo.jsx)(Ht,{className:"h-4 w-4 animate-spin"}):c}),(0,bo.jsx)("input",{className:P(d7({variant:o,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,bo.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,bo.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,bo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,bo.jsx)(Ht,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),te&&(0,bo.jsx)("p",{className:P("text-xs transition-all",ae==="error"&&"text-error",ae==="success"&&"text-success",ae==="normal"&&"text-muted-foreground",r),id:s?`${T}-error`:l?`${T}-success`:void 0,children:s||l||""})]})});dr.displayName="Input";var iF=R(M());var oF=R(M(),1);var nF=R(N(),1),f7="Label",aF=oF.forwardRef((e,t)=>(0,nF.jsx)(q.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));aF.displayName=f7;var oR=aF;var sF=R(N()),m7=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"),zr=iF.forwardRef(({className:e,...t},r)=>(0,sF.jsx)(oR,{ref:r,className:P(m7(),e),...t}));zr.displayName=oR.displayName;var vV=R(M());var dt=R(M(),1);var xt=R(M(),1);var lF=R(M(),1);function uF(e,t=globalThis?.document){let r=nt(e);lF.useEffect(()=>{let o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var aR=R(N(),1),g7="DismissableLayer",nR="dismissableLayer.update",h7="dismissableLayer.pointerDownOutside",v7="dismissableLayer.focusOutside",cF,fF=xt.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ko=xt.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=xt.useContext(fF),[c,d]=xt.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=xt.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,C=v>=h,w=y7(S=>{let I=S.target,L=[...u.branches].some(T=>T.contains(I));!C||L||(n?.(S),i?.(S),S.defaultPrevented||s?.())},f),b=C7(S=>{let I=S.target;[...u.branches].some(T=>T.contains(I))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return uF(S=>{v===u.layers.size-1&&(o?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),xt.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(cF=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),dF(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=cF)}},[c,f,r,u]),xt.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),dF())},[c,u]),xt.useEffect(()=>{let S=()=>p({});return document.addEventListener(nR,S),()=>document.removeEventListener(nR,S)},[]),(0,aR.jsx)(q.div,{...l,ref:g,style:{pointerEvents:y?C?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,b.onFocusCapture),onBlurCapture:W(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,w.onPointerDownCapture)})});Ko.displayName=g7;var x7="DismissableLayerBranch",pF=xt.forwardRef((e,t)=>{let r=xt.useContext(fF),o=xt.useRef(null),n=de(t,o);return xt.useEffect(()=>{let a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,aR.jsx)(q.div,{...e,ref:n})});pF.displayName=x7;function y7(e,t=globalThis?.document){let r=nt(e),o=xt.useRef(!1),n=xt.useRef(()=>{});return xt.useEffect(()=>{let a=s=>{if(s.target&&!o.current){let u=function(){mF(h7,r,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);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function C7(e,t=globalThis?.document){let r=nt(e),o=xt.useRef(!1);return xt.useEffect(()=>{let n=a=>{a.target&&!o.current&&mF(v7,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function dF(){let e=new CustomEvent(nR);document.dispatchEvent(e)}function mF(e,t,r,{discrete:o}){let n=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?$u(n,a):n.dispatchEvent(a)}var gF=Ko,hF=pF;var xF=R(M(),1),iR=0;function ms(){xF.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vF()),document.body.insertAdjacentElement("beforeend",e[1]??vF()),iR++,()=>{iR===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),iR--}},[])}function vF(){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 Xo=R(M(),1);var bF=R(N(),1),sR="focusScope.autoFocusOnMount",lR="focusScope.autoFocusOnUnmount",yF={bubbles:!1,cancelable:!0},S7="FocusScope",ai=Xo.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=Xo.useState(null),u=nt(n),c=nt(a),d=Xo.useRef(null),f=de(t,m=>l(m)),p=Xo.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Xo.useEffect(()=>{if(o){let v=function(b){if(p.paused||!s)return;let S=b.target;s.contains(S)?d.current=S:gs(d.current,{select:!0})},y=function(b){if(p.paused||!s)return;let S=b.relatedTarget;S!==null&&(s.contains(S)||gs(d.current,{select:!0}))},C=function(b){if(document.activeElement===document.body)for(let I of b)I.removedNodes.length>0&&gs(s)};var m=v,x=y,h=C;document.addEventListener("focusin",v),document.addEventListener("focusout",y);let w=new MutationObserver(C);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[o,s,p.paused]),Xo.useEffect(()=>{if(s){wF.add(p);let m=document.activeElement;if(!s.contains(m)){let h=new CustomEvent(sR,yF);s.addEventListener(sR,u),s.dispatchEvent(h),h.defaultPrevented||(b7(T7(RF(s)),{select:!0}),document.activeElement===m&&gs(s))}return()=>{s.removeEventListener(sR,u),setTimeout(()=>{let h=new CustomEvent(lR,yF);s.addEventListener(lR,c),s.dispatchEvent(h),h.defaultPrevented||gs(m??document.body,{select:!0}),s.removeEventListener(lR,c),wF.remove(p)},0)}}},[s,u,c,p]);let g=Xo.useCallback(m=>{if(!r&&!o||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,C]=R7(v);y&&C?!m.shiftKey&&h===C?(m.preventDefault(),r&&gs(y,{select:!0})):m.shiftKey&&h===y&&(m.preventDefault(),r&&gs(C,{select:!0})):h===v&&m.preventDefault()}},[r,o,p.paused]);return(0,bF.jsx)(q.div,{tabIndex:-1,...i,ref:f,onKeyDown:g})});ai.displayName=S7;function b7(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(gs(o,{select:t}),document.activeElement!==r)return}function R7(e){let t=RF(e),r=CF(t,e),o=CF(t.reverse(),e);return[r,o]}function RF(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function CF(e,t){for(let r of e)if(!I7(r,{upTo:t}))return r}function I7(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 P7(e){return e instanceof HTMLInputElement&&"select"in e}function gs(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&P7(e)&&t&&e.select()}}var wF=L7();function L7(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=SF(e,t),e.unshift(t)},remove(t){e=SF(e,t),e[0]?.resume()}}}function SF(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function T7(e){return e.filter(t=>t.tagName!=="A")}var lo=R(M(),1);var LF=["top","right","bottom","left"];var ha=Math.min,Gr=Math.max,um=Math.round,cm=Math.floor,On=e=>({x:e,y:e}),k7={left:"right",right:"left",bottom:"top",top:"bottom"},M7={start:"end",end:"start"};function kx(e,t,r){return Gr(e,ha(t,r))}function va(e,t){return typeof e=="function"?e(t):e}function xa(e){return e.split("-")[0]}function Ul(e){return e.split("-")[1]}function Mx(e){return e==="x"?"y":"x"}function Ex(e){return e==="y"?"height":"width"}var E7=new Set(["top","bottom"]);function Fn(e){return E7.has(xa(e))?"y":"x"}function Ax(e){return Mx(Fn(e))}function TF(e,t,r){r===void 0&&(r=!1);let o=Ul(e),n=Ax(e),a=Ex(n),i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=lm(i)),[i,lm(i)]}function kF(e){let t=lm(e);return[Tx(e),t,Tx(t)]}function Tx(e){return e.replace(/start|end/g,t=>M7[t])}var IF=["left","right"],PF=["right","left"],A7=["top","bottom"],D7=["bottom","top"];function N7(e,t,r){switch(e){case"top":case"bottom":return r?t?PF:IF:t?IF:PF;case"left":case"right":return t?A7:D7;default:return[]}}function MF(e,t,r,o){let n=Ul(e),a=N7(xa(e),r==="start",o);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(Tx)))),a}function lm(e){return e.replace(/left|right|bottom|top/g,t=>k7[t])}function O7(e){return{top:0,right:0,bottom:0,left:0,...e}}function uR(e){return typeof e!="number"?O7(e):{top:e,right:e,bottom:e,left:e}}function zl(e){let{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function EF(e,t,r){let{reference:o,floating:n}=e,a=Fn(t),i=Ax(t),s=Ex(i),l=xa(t),u=a==="y",c=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,f=o[s]/2-n[s]/2,p;switch(l){case"top":p={x:c,y:o.y-n.height};break;case"bottom":p={x:c,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-n.width,y:d};break;default:p={x:o.x,y:o.y}}switch(Ul(t)){case"start":p[i]-=f*(r&&u?-1:1);break;case"end":p[i]+=f*(r&&u?-1:1);break}return p}var NF=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:i}=r,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}=EF(u,o,l),f=o,p={},g=0;for(let m=0;m<s.length;m++){let{name:x,fn:h}=s[m],{x:v,y,data:C,reset:w}=await h({x:c,y:d,initialPlacement:o,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],...C}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(u=w.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):w.rects),{x:c,y:d}=EF(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:n,middlewareData:p}};async function qc(e,t){var r;t===void 0&&(t={});let{x:o,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}=va(t,e),g=uR(p),x=s[f?d==="floating"?"reference":"floating":d],h=zl(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:o,y:n,width:i.floating.width,height:i.floating.height}:i.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),C=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},w=zl(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(h.top-w.top+g.top)/C.y,bottom:(w.bottom-h.bottom+g.bottom)/C.y,left:(h.left-w.left+g.left)/C.x,right:(w.right-h.right+g.right)/C.x}}var OF=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:n,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=va(e,t)||{};if(u==null)return{};let d=uR(c),f={x:r,y:o},p=Ax(n),g=Ex(p),m=await i.getDimensions(u),x=p==="y",h=x?"top":"left",v=x?"bottom":"right",y=x?"clientHeight":"clientWidth",C=a.reference[g]+a.reference[p]-f[p]-a.floating[g],w=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=C/2-w/2,L=S/2-m[g]/2-1,T=ha(d[h],L),k=ha(d[v],L),E=T,_=S-m[g]-k,D=S/2-m[g]/2+I,z=kx(E,D,_),F=!l.arrow&&Ul(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 FF=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;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}=va(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let h=xa(n),v=Fn(s),y=xa(s)===s,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),w=f||(y||!m?[lm(s)]:kF(s)),b=g!=="none";!f&&b&&w.push(...MF(s,m,g,C));let S=[s,...w],I=await qc(t,x),L=[],T=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&L.push(I[h]),d){let D=TF(n,i,C);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!==Fn(z):!1)||T.every(B=>Fn(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=Fn(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 AF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function DF(e){return LF.some(t=>e[t]>=0)}var _F=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...n}=va(e,t);switch(o){case"referenceHidden":{let a=await qc(t,{...n,elementContext:"reference"}),i=AF(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:DF(i)}}}case"escaped":{let a=await qc(t,{...n,altBoundary:!0}),i=AF(a,r.floating);return{data:{escapedOffsets:i,escaped:DF(i)}}}default:return{}}}}};var VF=new Set(["left","top"]);async function F7(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=xa(r),s=Ul(r),l=Fn(r)==="y",u=VF.has(i)?-1:1,c=a&&l?-1:1,d=va(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 BF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:a,placement:i,middlewareData:s}=t,l=await F7(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:i}}}}},HF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,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}=va(e,t),u={x:r,y:o},c=await qc(t,l),d=Fn(xa(n)),f=Mx(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=kx(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=kx(v,g,y)}let m=s.fn({...t,[f]:p,[d]:g});return{...m,data:{x:m.x-r,y:m.y-o,enabled:{[f]:a,[d]:i}}}}}},UF=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:o,placement:n,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=va(e,t),c={x:r,y:o},d=Fn(n),f=Mx(d),p=c[f],g=c[d],m=va(s,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let y=f==="y"?"height":"width",C=a.reference[f]-a.floating[y]+x.mainAxis,w=a.reference[f]+a.reference[y]-x.mainAxis;p<C?p=C:p>w&&(p=w)}if(u){var h,v;let y=f==="y"?"width":"height",C=VF.has(xa(n)),w=a.reference[d]-a.floating[y]+(C&&((h=i.offset)==null?void 0:h[d])||0)+(C?0:x.crossAxis),b=a.reference[d]+a.reference[y]+(C?0:((v=i.offset)==null?void 0:v[d])||0)-(C?x.crossAxis:0);g<w?g=w:g>b&&(g=b)}return{[f]:p,[d]:g}}}},zF=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:n,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=va(e,t),c=await qc(t,u),d=xa(n),f=Ul(n),p=Fn(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,C=ha(m-c[x],v),w=ha(g-c[h],y),b=!t.middlewareData.shift,S=C,I=w;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=v),b&&!f){let T=Gr(c.left,0),k=Gr(c.right,0),E=Gr(c.top,0),_=Gr(c.bottom,0);p?I=g-2*(T!==0||k!==0?T+k:Gr(c.left,c.right)):S=m-2*(E!==0||_!==0?E+_:Gr(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 Dx(){return typeof window<"u"}function Wl(e){return WF(e)?(e.nodeName||"").toLowerCase():"#document"}function so(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _n(e){var t;return(t=(WF(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function WF(e){return Dx()?e instanceof Node||e instanceof so(e).Node:!1}function Yo(e){return Dx()?e instanceof Element||e instanceof so(e).Element:!1}function Vn(e){return Dx()?e instanceof HTMLElement||e instanceof so(e).HTMLElement:!1}function GF(e){return!Dx()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof so(e).ShadowRoot}var _7=new Set(["inline","contents"]);function Kc(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Qo(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!_7.has(n)}var V7=new Set(["table","td","th"]);function jF(e){return V7.has(Wl(e))}var B7=[":popover-open",":modal"];function dm(e){return B7.some(t=>{try{return e.matches(t)}catch{return!1}})}var H7=["transform","translate","scale","rotate","perspective"],U7=["transform","translate","scale","rotate","perspective","filter"],z7=["paint","layout","strict","content"];function Nx(e){let t=Ox(),r=Yo(e)?Qo(e):e;return H7.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||U7.some(o=>(r.willChange||"").includes(o))||z7.some(o=>(r.contain||"").includes(o))}function $F(e){let t=ii(e);for(;Vn(t)&&!jl(t);){if(Nx(t))return t;if(dm(t))return null;t=ii(t)}return null}function Ox(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var G7=new Set(["html","body","#document"]);function jl(e){return G7.has(Wl(e))}function Qo(e){return so(e).getComputedStyle(e)}function fm(e){return Yo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ii(e){if(Wl(e)==="html")return e;let t=e.assignedSlot||e.parentNode||GF(e)&&e.host||_n(e);return GF(t)?t.host:t}function qF(e){let t=ii(e);return jl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&Kc(t)?t:qF(t)}function Gl(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=qF(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),i=so(n);if(a){let s=Fx(i);return t.concat(i,i.visualViewport||[],Kc(n)?n:[],s&&r?Gl(s):[])}return t.concat(n,Gl(n,[],r))}function Fx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function QF(e){let t=Qo(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=Vn(e),a=n?e.offsetWidth:r,i=n?e.offsetHeight:o,s=um(r)!==a||um(o)!==i;return s&&(r=a,o=i),{width:r,height:o,$:s}}function dR(e){return Yo(e)?e:e.contextElement}function Xc(e){let t=dR(e);if(!Vn(t))return On(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=QF(t),i=(a?um(r.width):r.width)/o,s=(a?um(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var W7=On(0);function ZF(e){let t=so(e);return!Ox()||!t.visualViewport?W7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function j7(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==so(e)?!1:t}function $l(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=dR(e),i=On(1);t&&(o?Yo(o)&&(i=Xc(o)):i=Xc(e));let s=j7(a,r,o)?ZF(a):On(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=so(a),p=o&&Yo(o)?so(o):o,g=f,m=Fx(g);for(;m&&o&&p!==g;){let x=Xc(m),h=m.getBoundingClientRect(),v=Qo(m),y=h.left+(m.clientLeft+parseFloat(v.paddingLeft))*x.x,C=h.top+(m.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=y,u+=C,g=so(m),m=Fx(g)}}return zl({width:c,height:d,x:l,y:u})}function _x(e,t){let r=fm(e).scrollLeft;return t?t.left+r:$l(_n(e)).left+r}function JF(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-_x(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function $7(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",i=_n(o),s=t?dm(t.floating):!1;if(o===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=On(1),c=On(0),d=Vn(o);if((d||!d&&!a)&&((Wl(o)!=="body"||Kc(i))&&(l=fm(o)),Vn(o))){let p=$l(o);u=Xc(o),c.x=p.x+o.clientLeft,c.y=p.y+o.clientTop}let f=i&&!d&&!a?JF(i,l):On(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function q7(e){return Array.from(e.getClientRects())}function K7(e){let t=_n(e),r=fm(e),o=e.ownerDocument.body,n=Gr(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Gr(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-r.scrollLeft+_x(e),s=-r.scrollTop;return Qo(o).direction==="rtl"&&(i+=Gr(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}var KF=25;function X7(e,t){let r=so(e),o=_n(e),n=r.visualViewport,a=o.clientWidth,i=o.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let c=Ox();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let u=_x(o);if(u<=0){let c=o.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(o.clientWidth-d.clientWidth-p);g<=KF&&(a-=g)}else u<=KF&&(a+=u);return{width:a,height:i,x:s,y:l}}var Y7=new Set(["absolute","fixed"]);function Q7(e,t){let r=$l(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=Vn(e)?Xc(e):On(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=n*a.x,u=o*a.y;return{width:i,height:s,x:l,y:u}}function XF(e,t,r){let o;if(t==="viewport")o=X7(e,r);else if(t==="document")o=K7(_n(e));else if(Yo(t))o=Q7(t,r);else{let n=ZF(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return zl(o)}function e_(e,t){let r=ii(e);return r===t||!Yo(r)||jl(r)?!1:Qo(r).position==="fixed"||e_(r,t)}function Z7(e,t){let r=t.get(e);if(r)return r;let o=Gl(e,[],!1).filter(s=>Yo(s)&&Wl(s)!=="body"),n=null,a=Qo(e).position==="fixed",i=a?ii(e):e;for(;Yo(i)&&!jl(i);){let s=Qo(i),l=Nx(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&Y7.has(n.position)||Kc(i)&&!l&&e_(e,i))?o=o.filter(c=>c!==i):n=s,i=ii(i)}return t.set(e,o),o}function J7(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,i=[...r==="clippingAncestors"?dm(t)?[]:Z7(t,this._c):[].concat(r),o],s=i[0],l=i.reduce((u,c)=>{let d=XF(t,c,n);return u.top=Gr(d.top,u.top),u.right=ha(d.right,u.right),u.bottom=ha(d.bottom,u.bottom),u.left=Gr(d.left,u.left),u},XF(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function eK(e){let{width:t,height:r}=QF(e);return{width:t,height:r}}function tK(e,t,r){let o=Vn(t),n=_n(t),a=r==="fixed",i=$l(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=On(0);function u(){l.x=_x(n)}if(o||!o&&!a)if((Wl(t)!=="body"||Kc(n))&&(s=fm(t)),o){let p=$l(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else n&&u();a&&!o&&n&&u();let c=n&&!o&&!a?JF(n,s):On(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 cR(e){return Qo(e).position==="static"}function YF(e,t){if(!Vn(e)||Qo(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return _n(e)===r&&(r=r.ownerDocument.body),r}function t_(e,t){let r=so(e);if(dm(e))return r;if(!Vn(e)){let n=ii(e);for(;n&&!jl(n);){if(Yo(n)&&!cR(n))return n;n=ii(n)}return r}let o=YF(e,t);for(;o&&jF(o)&&cR(o);)o=YF(o,t);return o&&jl(o)&&cR(o)&&!Nx(o)?r:o||$F(e)||r}var rK=async function(e){let t=this.getOffsetParent||t_,r=this.getDimensions,o=await r(e.floating);return{reference:tK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function oK(e){return Qo(e).direction==="rtl"}var r_={convertOffsetParentRelativeRectToViewportRelativeRect:$7,getDocumentElement:_n,getClippingRect:J7,getOffsetParent:t_,getElementRects:rK,getClientRects:q7,getDimensions:eK,getScale:Xc,isElement:Yo,isRTL:oK};function o_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nK(e,t){let r=null,o,n=_n(e);function a(){var s;clearTimeout(o),(s=r)==null||s.disconnect(),r=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=cm(d),m=cm(n.clientWidth-(c+f)),x=cm(n.clientHeight-(d+p)),h=cm(c),y={rootMargin:-g+"px "+-m+"px "+-x+"px "+-h+"px",threshold:Gr(0,ha(1,l))||1},C=!0;function w(b){let S=b[0].intersectionRatio;if(S!==l){if(!C)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!o_(u,e.getBoundingClientRect())&&i(),C=!1}try{r=new IntersectionObserver(w,{...y,root:n.ownerDocument})}catch{r=new IntersectionObserver(w,y)}r.observe(e)}return i(!0),a}function fR(e,t,r,o){o===void 0&&(o={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=dR(e),c=n||a?[...u?Gl(u):[],...Gl(t)]:[];c.forEach(h=>{n&&h.addEventListener("scroll",r,{passive:!0}),a&&h.addEventListener("resize",r)});let d=u&&s?nK(u,r):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)})),r()}),u&&!l&&p.observe(u),p.observe(t));let g,m=l?$l(e):null;l&&x();function x(){let h=$l(e);m&&!o_(m,h)&&r(),m=h,g=requestAnimationFrame(x)}return r(),()=>{var h;c.forEach(v=>{n&&v.removeEventListener("scroll",r),a&&v.removeEventListener("resize",r)}),d?.(),(h=p)==null||h.disconnect(),p=null,l&&cancelAnimationFrame(g)}}var n_=BF;var a_=HF,i_=FF,s_=zF,l_=_F,pR=OF;var u_=UF,mR=(e,t,r)=>{let o=new Map,n={platform:r_,...r},a={...n.platform,_c:o};return NF(e,t,{...n,platform:a})};var Et=R(M(),1),d_=R(M(),1),f_=R(Ha(),1),aK=typeof document<"u",iK=function(){},Vx=aK?d_.useLayoutEffect:iK;function Bx(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 r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!Bx(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){let a=n[o];if(!(a==="_owner"&&e.$$typeof)&&!Bx(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function p_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function c_(e,t){let r=p_(e);return Math.round(t*r)/r}function gR(e){let t=Et.useRef(e);return Vx(()=>{t.current=e}),t}function m_(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=Et.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Et.useState(o);Bx(f,o)||p(o);let[g,m]=Et.useState(null),[x,h]=Et.useState(null),v=Et.useCallback(B=>{B!==b.current&&(b.current=B,m(B))},[]),y=Et.useCallback(B=>{B!==S.current&&(S.current=B,h(B))},[]),C=a||g,w=i||x,b=Et.useRef(null),S=Et.useRef(null),I=Et.useRef(c),L=l!=null,T=gR(l),k=gR(n),E=gR(u),_=Et.useCallback(()=>{if(!b.current||!S.current)return;let B={placement:t,strategy:r,middleware:f};k.current&&(B.platform=k.current),mR(b.current,S.current,B).then(A=>{let te={...A,isPositioned:E.current!==!1};D.current&&!Bx(I.current,te)&&(I.current=te,f_.flushSync(()=>{d(te)}))})},[f,t,r,k,E]);Vx(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);let D=Et.useRef(!1);Vx(()=>(D.current=!0,()=>{D.current=!1}),[]),Vx(()=>{if(C&&(b.current=C),w&&(S.current=w),C&&w){if(T.current)return T.current(C,w,_);_()}},[C,w,_,T,L]);let z=Et.useMemo(()=>({reference:b,floating:S,setReference:v,setFloating:y}),[v,y]),F=Et.useMemo(()=>({reference:C,floating:w}),[C,w]),O=Et.useMemo(()=>{let B={position:r,left:0,top:0};if(!F.floating)return B;let A=c_(F.floating,c.x),te=c_(F.floating,c.y);return s?{...B,transform:"translate("+A+"px, "+te+"px)",...p_(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:A,top:te}},[r,s,F.floating,c.x,c.y]);return Et.useMemo(()=>({...c,update:_,refs:z,elements:F,floatingStyles:O}),[c,_,z,F,O])}var sK=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:o,padding:n}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?pR({element:o.current,padding:n}).fn(r):{}:o?pR({element:o,padding:n}).fn(r):{}}}},g_=(e,t)=>({...n_(e),options:[e,t]}),h_=(e,t)=>({...a_(e),options:[e,t]}),v_=(e,t)=>({...u_(e),options:[e,t]}),x_=(e,t)=>({...i_(e),options:[e,t]}),y_=(e,t)=>({...s_(e),options:[e,t]});var C_=(e,t)=>({...l_(e),options:[e,t]});var w_=(e,t)=>({...sK(e),options:[e,t]});var S_=R(M(),1);var hR=R(N(),1),lK="Arrow",b_=S_.forwardRef((e,t)=>{let{children:r,width:o=10,height:n=5,...a}=e;return(0,hR.jsx)(q.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,hR.jsx)("polygon",{points:"0,0 30,0 15,10"})})});b_.displayName=lK;var R_=b_;var hs=R(N(),1);var vR="Popper",[I_,Zo]=Fe(vR),[cK,P_]=I_(vR),L_=e=>{let{__scopePopper:t,children:r}=e,[o,n]=lo.useState(null);return(0,hs.jsx)(cK,{scope:t,anchor:o,onAnchorChange:n,children:r})};L_.displayName=vR;var T_="PopperAnchor",k_=lo.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:o,...n}=e,a=P_(T_,r),i=lo.useRef(null),s=de(t,i),l=lo.useRef(null);return lo.useEffect(()=>{let u=l.current;l.current=o?.current||i.current,u!==l.current&&a.onAnchorChange(l.current)}),o?null:(0,hs.jsx)(q.div,{...n,ref:s})});k_.displayName=T_;var xR="PopperContent",[dK,fK]=I_(xR),M_=lo.forwardRef((e,t)=>{let{__scopePopper:r,side:o="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=P_(xR,r),[h,v]=lo.useState(null),y=de(t,U=>v(U)),[C,w]=lo.useState(null),b=$c(C),S=b?.width??0,I=b?.height??0,L=o+(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(mK),altBoundary:E},{refs:D,floatingStyles:z,placement:F,isPositioned:O,middlewareData:B}=m_({strategy:"fixed",placement:L,whileElementsMounted:(...U)=>fR(...U,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[g_({mainAxis:n+I,alignmentAxis:i}),l&&h_({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?v_():void 0,..._}),l&&x_({..._}),y_({..._,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`)}}),C&&w_({element:C,padding:s}),gK({arrowWidth:S,arrowHeight:I}),f&&C_({strategy:"referenceHidden",..._})]}),[A,te]=D_(F),ae=nt(g);Ve(()=>{O&&ae?.()},[O,ae]);let V=B.arrow?.x,Q=B.arrow?.y,re=B.arrow?.centerOffset!==0,[Y,ce]=lo.useState();return Ve(()=>{h&&ce(window.getComputedStyle(h).zIndex)},[h]),(0,hs.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,hs.jsx)(dK,{scope:r,placedSide:A,onArrowChange:w,arrowX:V,arrowY:Q,shouldHideArrow:re,children:(0,hs.jsx)(q.div,{"data-side":A,"data-align":te,...m,ref:y,style:{...m.style,animation:O?void 0:"none"}})})})});M_.displayName=xR;var E_="PopperArrow",pK={top:"bottom",right:"left",bottom:"top",left:"right"},A_=lo.forwardRef(function(t,r){let{__scopePopper:o,...n}=t,a=fK(E_,o),i=pK[a.placedSide];return(0,hs.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,hs.jsx)(R_,{...n,ref:r,style:{...n.style,display:"block"}})})});A_.displayName=E_;function mK(e){return e!==null}var gK=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:o,middlewareData:n}=t,i=n.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=D_(r),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=`${o.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=i?d:`${p}px`):u==="left"&&(g=`${o.floating.width+l}px`,m=i?d:`${p}px`),{data:{x:g,y:m}}}});function D_(e){let[t,r="center"]=e.split("-");return[t,r]}var si=L_,li=k_,vs=M_,xs=A_;var Ux=R(M(),1),N_=R(Ha(),1);var O_=R(N(),1),hK="Portal",Ro=Ux.forwardRef((e,t)=>{let{container:r,...o}=e,[n,a]=Ux.useState(!1);Ve(()=>a(!0),[]);let i=r||n&&globalThis?.document?.body;return i?N_.default.createPortal((0,O_.jsx)(q.div,{...o,ref:t}),i):null});Ro.displayName=hK;var vK=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Yc=new WeakMap,zx=new WeakMap,Gx={},yR=0,F_=function(e){return e&&(e.host||F_(e.parentNode))},xK=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=F_(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},yK=function(e,t,r,o){var n=xK(t,Array.isArray(e)?e:[e]);Gx[r]||(Gx[r]=new WeakMap);var a=Gx[r],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(o),g=p!==null&&p!=="false",m=(Yc.get(f)||0)+1,x=(a.get(f)||0)+1;Yc.set(f,m),a.set(f,x),i.push(f),m===1&&g&&zx.set(f,!0),x===1&&f.setAttribute(r,"true"),g||f.setAttribute(o,"true")}catch(h){console.error("aria-hidden: cannot operate on ",f,h)}})};return c(t),s.clear(),yR++,function(){i.forEach(function(d){var f=Yc.get(d)-1,p=a.get(d)-1;Yc.set(d,f),a.set(d,p),f||(zx.has(d)||d.removeAttribute(o),zx.delete(d)),p||d.removeAttribute(r)}),yR--,yR||(Yc=new WeakMap,Yc=new WeakMap,zx=new WeakMap,Gx={})}},ys=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||vK(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),yK(o,n,r,"aria-hidden")):function(){return null}};var uo=function(){return uo=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},uo.apply(this,arguments)};function Wx(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function __(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,a;o<n;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var Xx=R(M());var Pr=R(M());var ql="right-scroll-bar-position",Kl="width-before-scroll-bar",CR="with-scroll-bars-hidden",wR="--removed-body-scroll-bar-size";function jx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var V_=R(M());function B_(e,t){var r=(0,V_.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=t,r.facade}var $x=R(M());var CK=typeof window<"u"?$x.useLayoutEffect:$x.useEffect,H_=new WeakMap;function SR(e,t){var r=B_(t||null,function(o){return e.forEach(function(n){return jx(n,o)})});return CK(function(){var o=H_.get(r);if(o){var n=new Set(o),a=new Set(e),i=r.current;n.forEach(function(s){a.has(s)||jx(s,null)}),a.forEach(function(s){n.has(s)||jx(s,i)})}H_.set(r,e)},[e]),r}function wK(e){return e}function SK(e,t){t===void 0&&(t=wK);var r=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,o);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(o=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){o=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var c=i;i=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),r}}}};return n}function bR(e){e===void 0&&(e={});var t=SK(null);return t.options=uo({async:!0,ssr:!1},e),t}var U_=R(M()),z_=function(e){var t=e.sideCar,r=Wx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return U_.createElement(o,uo({},r))};z_.isSideCarExport=!0;function RR(e,t){return e.useMedium(t),z_}var qx=bR();var IR=function(){},pm=Pr.forwardRef(function(e,t){var r=Pr.useRef(null),o=Pr.useState({onScrollCapture:IR,onWheelCapture:IR,onTouchMoveCapture:IR}),n=o[0],a=o[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,C=Wx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,b=SR([r,t]),S=uo(uo({},C),n);return Pr.createElement(Pr.Fragment,null,c&&Pr.createElement(w,{sideCar:qx,removeScrollBar:u,shards:d,noRelative:p,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:y}),i?Pr.cloneElement(Pr.Children.only(s),uo(uo({},S),{ref:b})):Pr.createElement(v,uo({},S,{className:l,ref:b}),s))});pm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};pm.classNames={fullWidth:Kl,zeroRight:ql};var it=R(M());var Zc=R(M());var j_=R(M());var G_;var W_=function(){if(G_)return G_;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bK(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=W_();return t&&e.setAttribute("nonce",t),e}function RK(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function IK(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var PR=function(){var e=0,t=null;return{add:function(r){e==0&&(t=bK())&&(RK(t,r),IK(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var LR=function(){var e=PR();return function(t,r){j_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var mm=function(){var e=LR(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t};var PK={left:0,top:0,right:0,gap:0},TR=function(e){return parseInt(e||"",10)||0},LK=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[TR(r),TR(o),TR(n)]},kR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return PK;var t=LK(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}};var TK=mm(),Qc="data-scroll-locked",kK=function(e,t,r,o){var n=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
20
|
+
.`.concat(CR,` {
|
|
21
21
|
overflow: hidden `).concat(o,`;
|
|
22
22
|
padding-right: `).concat(s,"px ").concat(o,`;
|
|
23
23
|
}
|
|
24
|
-
body[`).concat(
|
|
24
|
+
body[`).concat(Qc,`] {
|
|
25
25
|
overflow: hidden `).concat(o,`;
|
|
26
26
|
overscroll-behavior: contain;
|
|
27
27
|
`).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
|
|
@@ -34,36 +34,36 @@ Error generating stack: `+a.message+`
|
|
|
34
34
|
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.`).concat(
|
|
37
|
+
.`).concat(ql,` {
|
|
38
38
|
right: `).concat(s,"px ").concat(o,`;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.`).concat(
|
|
41
|
+
.`).concat(Kl,` {
|
|
42
42
|
margin-right: `).concat(s,"px ").concat(o,`;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.`).concat(
|
|
45
|
+
.`).concat(ql," .").concat(ql,` {
|
|
46
46
|
right: 0 `).concat(o,`;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.`).concat(
|
|
49
|
+
.`).concat(Kl," .").concat(Kl,` {
|
|
50
50
|
margin-right: 0 `).concat(o,`;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
body[`).concat(
|
|
53
|
+
body[`).concat(Qc,`] {
|
|
54
54
|
`).concat(wR,": ").concat(s,`px;
|
|
55
55
|
}
|
|
56
|
-
`)}
|
|
56
|
+
`)},$_=function(){var e=parseInt(document.body.getAttribute(Qc)||"0",10);return isFinite(e)?e:0},MK=function(){Zc.useEffect(function(){return document.body.setAttribute(Qc,($_()+1).toString()),function(){var e=$_()-1;e<=0?document.body.removeAttribute(Qc):document.body.setAttribute(Qc,e.toString())}},[])},MR=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;MK();var a=Zc.useMemo(function(){return kR(n)},[n]);return Zc.createElement(TK,{styles:kK(a,!t,n,r?"":"!important")})};var ER=!1;if(typeof window<"u")try{gm=Object.defineProperty({},"passive",{get:function(){return ER=!0,!0}}),window.addEventListener("test",gm,gm),window.removeEventListener("test",gm,gm)}catch{ER=!1}var gm,Xl=ER?{passive:!1}:!1;var EK=function(e){return e.tagName==="TEXTAREA"},q_=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!EK(e)&&r[t]==="visible")},AK=function(e){return q_(e,"overflowY")},DK=function(e){return q_(e,"overflowX")},AR=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=K_(e,o);if(n){var a=X_(e,o),i=a[1],s=a[2];if(i>s)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},NK=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},OK=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},K_=function(e,t){return e==="v"?AK(t):DK(t)},X_=function(e,t){return e==="v"?NK(t):OK(t)},FK=function(e,t){return e==="h"&&t==="rtl"?-1:1},Y_=function(e,t,r,o,n){var a=FK(e,window.getComputedStyle(t).direction),i=a*o,s=r.target,l=t.contains(s),u=!1,c=i>0,d=0,f=0;do{if(!s)break;var p=X_(e,s),g=p[0],m=p[1],x=p[2],h=m-x-a*g;(g||h)&&K_(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 Kx=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Q_=function(e){return[e.deltaX,e.deltaY]},Z_=function(e){return e&&"current"in e?e.current:e},_K=function(e,t){return e[0]===t[0]&&e[1]===t[1]},VK=function(e){return`
|
|
57
57
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
58
58
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
59
|
-
`)},DK=0,Qc=[];function X_(e){var t=it.useRef([]),r=it.useRef([0,0]),o=it.useRef(),n=it.useState(DK++)[0],a=it.useState(fm)[0],i=it.useRef(e);it.useEffect(function(){i.current=e},[e]),it.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var m=D_([e.lockRef.current],(e.shards||[]).map(K_),!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=it.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var h=qx(m),v=r.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=ER(S,b);if(!I)return!0;if(I?C=S:(C=S==="v"?"h":"v",I=ER(S,b)),!I)return!1;if(!o.current&&"changedTouches"in m&&(y||w)&&(o.current=C),!C)return!0;var L=o.current||C;return $_(L,x,m,L==="h"?y:w,!0)},[]),l=it.useCallback(function(m){var x=m;if(!(!Qc.length||Qc[Qc.length-1]!==a)){var h="deltaY"in x?q_(x):qx(x),v=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&EK(C.delta,h)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var y=(i.current.shards||[]).map(K_).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=it.useCallback(function(m,x,h,v){var y={name:m,delta:x,target:h,should:v,shadowParent:NK(h)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),c=it.useCallback(function(m){r.current=qx(m),o.current=void 0},[]),d=it.useCallback(function(m){u(m.type,q_(m),m.target,s(m,e.lockRef.current))},[]),f=it.useCallback(function(m){u(m.type,qx(m),m.target,s(m,e.lockRef.current))},[]);it.useEffect(function(){return Qc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ql),document.addEventListener("touchmove",l,ql),document.addEventListener("touchstart",c,ql),function(){Qc=Qc.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,ql),document.removeEventListener("touchmove",l,ql),document.removeEventListener("touchstart",c,ql)}},[]);var p=e.removeScrollBar,g=e.inert;return it.createElement(it.Fragment,null,g?it.createElement(a,{styles:AK(n)}):null,p?it.createElement(kR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function NK(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Y_=bR($x,X_);var Q_=Kx.forwardRef(function(e,t){return Kx.createElement(dm,so({},e,{ref:t,sideCar:Y_}))});Q_.classNames=dm.classNames;var si=Q_;var At=R(N(),1),Xx="Popover",[Z_,KLe]=Fe(Xx,[Qo]),mm=Qo(),[OK,ys]=Z_(Xx),J_=e=>{let{__scopePopover:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!1}=e,s=mm(t),l=dt.useRef(null),[u,c]=dt.useState(!1),[d,f]=qe({prop:o,defaultProp:n??!1,onChange:a,caller:Xx});return(0,At.jsx)(ai,{...s,children:(0,At.jsx)(OK,{scope:t,contentId:Ne(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:dt.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:dt.useCallback(()=>c(!0),[]),onCustomAnchorRemove:dt.useCallback(()=>c(!1),[]),modal:i,children:r})})};J_.displayName=Xx;var eV="PopoverAnchor",tV=dt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=ys(eV,r),a=mm(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=n;return dt.useEffect(()=>(i(),()=>s()),[i,s]),(0,At.jsx)(ii,{...a,...o,ref:t})});tV.displayName=eV;var rV="PopoverTrigger",oV=dt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=ys(rV,r),a=mm(r),i=de(t,n.triggerRef),s=(0,At.jsx)(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":lV(n.open),...o,ref:i,onClick:W(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:(0,At.jsx)(ii,{asChild:!0,...a,children:s})});oV.displayName=rV;var AR="PopoverPortal",[FK,_K]=Z_(AR,{forceMount:void 0}),VK=e=>{let{__scopePopover:t,forceMount:r,children:o,container:n}=e,a=ys(AR,t);return(0,At.jsx)(FK,{scope:t,forceMount:r,children:(0,At.jsx)(ut,{present:r||a.open,children:(0,At.jsx)(Ro,{asChild:!0,container:n,children:o})})})};VK.displayName=AR;var Zc="PopoverContent",nV=dt.forwardRef((e,t)=>{let r=_K(Zc,e.__scopePopover),{forceMount:o=r.forceMount,...n}=e,a=ys(Zc,e.__scopePopover);return(0,At.jsx)(ut,{present:o||a.open,children:a.modal?(0,At.jsx)(HK,{...n,ref:t}):(0,At.jsx)(UK,{...n,ref:t})})});nV.displayName=Zc;var BK=co("PopoverContent.RemoveScroll"),HK=dt.forwardRef((e,t)=>{let r=ys(Zc,e.__scopePopover),o=dt.useRef(null),n=de(t,o),a=dt.useRef(!1);return dt.useEffect(()=>{let i=o.current;if(i)return xs(i)},[]),(0,At.jsx)(si,{as:BK,allowPinchZoom:!0,children:(0,At.jsx)(aV,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||r.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})})})}),UK=dt.forwardRef((e,t)=>{let r=ys(Zc,e.__scopePopover),o=dt.useRef(!1),n=dt.useRef(!1);return(0,At.jsx)(aV,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),aV=dt.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=ys(Zc,r),p=mm(r);return ps(),(0,At.jsx)(oi,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,At.jsx)(qo,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,At.jsx)(hs,{"data-state":lV(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)"}})})})}),iV="PopoverClose",sV=dt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=ys(iV,r);return(0,At.jsx)(q.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});sV.displayName=iV;var zK="PopoverArrow",GK=dt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=mm(r);return(0,At.jsx)(vs,{...n,...o,ref:t})});GK.displayName=zK;function lV(e){return e?"open":"closed"}var uV=J_,cV=tV,dV=oV;var DR=nV,fV=sV;var ya=R(N()),NR=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"}}),wa=uV,Ca=dV,mV=cV,Vn=pV.forwardRef(({className:e,variant:t,size:r,side:o,position:n,radius:a,shadow:i,backdrop:s=!1,closeOnInteractOutside:l=!0,overlayBackdrop:u=!1,sideOffset:c=4,...d},f)=>(0,ya.jsxs)(ya.Fragment,{children:[u&&(0,ya.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50"}),(0,ya.jsx)(DR,{ref:f,side:o,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:P(NR({variant:t,size:r,side:o,position:n,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));Vn.displayName=DR.displayName;var gV=fV,OR=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","my-2 h-px bg-border",e),...t});OR.displayName="PopoverSeparator";var FR=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});FR.displayName="PopoverHeader";var _R=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});_R.displayName="PopoverFooter";var hm=R(M());var ui=R(M(),1);var Qt=R(M(),1);var ws=R(N(),1),VR="rovingFocusGroup.onEntryFocus",jK={bubbles:!1,cancelable:!0},gm="RovingFocusGroup",[BR,hV,$K]=Jn(gm),[qK,Jc]=Fe(gm,[$K]),[KK,XK]=qK(gm),vV=Qt.forwardRef((e,t)=>(0,ws.jsx)(BR.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,ws.jsx)(BR.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,ws.jsx)(YK,{...e,ref:t})})}));vV.displayName=gm;var YK=Qt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:o,loop:n=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=Qt.useRef(null),p=de(t,f),g=ia(a),[m,x]=qe({prop:i,defaultProp:s??null,onChange:l,caller:gm}),[h,v]=Qt.useState(!1),y=nt(u),w=hV(r),C=Qt.useRef(!1),[b,S]=Qt.useState(0);return Qt.useEffect(()=>{let I=f.current;if(I)return I.addEventListener(VR,y),()=>I.removeEventListener(VR,y)},[y]),(0,ws.jsx)(KK,{scope:r,orientation:o,dir:g,loop:n,currentTabStopId:m,onItemFocus:Qt.useCallback(I=>x(I),[x]),onItemShiftTab:Qt.useCallback(()=>v(!0),[]),onFocusableItemAdd:Qt.useCallback(()=>S(I=>I+1),[]),onFocusableItemRemove:Qt.useCallback(()=>S(I=>I-1),[]),children:(0,ws.jsx)(q.div,{tabIndex:h||b===0?-1:0,"data-orientation":o,...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(VR,jK);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);wV(z,c)}}C.current=!1}),onBlur:W(e.onBlur,()=>v(!1))})})}),xV="RovingFocusGroupItem",yV=Qt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,children:i,...s}=e,l=Ne(),u=a||l,c=XK(xV,r),d=c.currentTabStopId===u,f=hV(r),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=c;return Qt.useEffect(()=>{if(o)return p(),()=>g()},[o,p,g]),(0,ws.jsx)(BR.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:(0,ws.jsx)(q.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:W(e.onMouseDown,x=>{o?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=JK(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?eX(y,w+1):y.slice(w+1)}setTimeout(()=>wV(y))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});yV.displayName=xV;var QK={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZK(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function JK(e,t,r){let o=ZK(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return QK[o]}function wV(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function eX(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var Yx=vV,Qx=yV;var li=R(N(),1),Zx="Tabs",[tX,gTe]=Fe(Zx,[Jc]),SV=Jc(),[rX,HR]=tX(Zx),bV=ui.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=ia(s),[d,f]=qe({prop:o,onChange:n,defaultProp:a??"",caller:Zx});return(0,li.jsx)(rX,{scope:r,baseId:Ne(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:(0,li.jsx)(q.div,{dir:c,"data-orientation":i,...u,ref:t})})});bV.displayName=Zx;var RV="TabsList",IV=ui.forwardRef((e,t)=>{let{__scopeTabs:r,loop:o=!0,...n}=e,a=HR(RV,r),i=SV(r);return(0,li.jsx)(Yx,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:(0,li.jsx)(q.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});IV.displayName=RV;var PV="TabsTrigger",LV=ui.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,i=HR(PV,r),s=SV(r),l=MV(i.baseId,o),u=EV(i.baseId,o),c=o===i.value;return(0,li.jsx)(Qx,{asChild:!0,...s,focusable:!n,active:c,children:(0,li.jsx)(q.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(o):d.preventDefault()}),onKeyDown:W(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(o)}),onFocus:W(e.onFocus,()=>{let d=i.activationMode!=="manual";!c&&!n&&d&&i.onValueChange(o)})})})});LV.displayName=PV;var TV="TabsContent",kV=ui.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,forceMount:n,children:a,...i}=e,s=HR(TV,r),l=MV(s.baseId,o),u=EV(s.baseId,o),c=o===s.value,d=ui.useRef(c);return ui.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,li.jsx)(ut,{present:n||c,children:({present:f})=>(0,li.jsx)(q.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})})});kV.displayName=TV;function MV(e,t){return`${e}-trigger-${t}`}function EV(e,t){return`${e}-content-${t}`}var UR=bV,zR=IV,GR=LV,WR=kV;var ci=R(N()),vm=hm.forwardRef(({vertical:e=!1,...t},r)=>(0,ci.jsx)(UR,{ref:r,className:P("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));vm.displayName=UR.displayName;var nX=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}}),xm=hm.forwardRef(({className:e,variant:t,orientation:r,fullWidth:o,scrollable:n,...a},i)=>(0,ci.jsx)(zR,{ref:i,className:P("moonui-theme",nX({variant:t,orientation:r,fullWidth:o,scrollable:n,className:e})),...a}));xm.displayName=zR.displayName;var aX=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}}),Kl=hm.forwardRef(({className:e,variant:t,size:r,icon:o,iconPosition:n="left",badge:a,fadeTabs:i=!1,orientation:s,fullWidth:l,children:u,...c},d)=>(0,ci.jsxs)(GR,{ref:d,className:P("moonui-theme",aX({variant:t,size:r,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...c,children:[o&&n==="left"&&(0,ci.jsx)("span",{className:"mr-2",children:o}),u,o&&n==="right"&&(0,ci.jsx)("span",{className:"ml-2",children:o}),a&&(0,ci.jsx)("span",{className:"ml-2",children:a})]}));Kl.displayName=GR.displayName;var Xl=hm.forwardRef(({className:e,animated:t=!1,...r},o)=>(0,ci.jsx)(WR,{ref:o,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),...r}));Xl.displayName=WR.displayName;var Cs=R(M());var Sa=R(N()),iX=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"}}),sX=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"}}),lX=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"}}),uX=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"}}),ba=Cs.forwardRef(({className:e,size:t,trackVariant:r,rangeVariant:o,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]=Cs.useState(u||c||[0]);Cs.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=Cs.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,Sa.jsxs)("div",{className:"w-full",ref:g,...p,children:[i&&(0,Sa.jsx)("div",{className:P("flex justify-end mb-1 text-sm text-muted-foreground",l),children:m.length===1?(0,Sa.jsx)("span",{children:h(m[0])}):(0,Sa.jsxs)("span",{children:[h(m[0])," - ",h(m[m.length-1])]})}),(0,Sa.jsxs)("div",{className:P("moonui-theme",iX({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,Sa.jsx)("div",{ref:y,className:P(sX({variant:r||n||"default"})),onClick:I,children:(0,Sa.jsx)("div",{className:P(lX({variant:o||n||"primary"})),style:{left:"0%",width:`${v(m[0],w,C)}%`}})}),m.map((k,E)=>(0,Sa.jsx)("div",{className:P(uX({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))]})]})});ba.displayName="Slider";var j=R(N()),AV=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 DV(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 NV(e,t,r){return"#"+((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1)}function cX(e){let t=DV(e);if(!t)return null;let r=t.r/255,o=t.g/255,n=t.b/255,a=Math.max(r,o,n),i=Math.min(r,o,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 r:s=((o-n)/c+(o<n?6:0))/6;break;case o:s=((n-r)/c+2)/6;break;case n:s=((r-o)/c+4)/6;break}}return{h:Math.round(s*360),s:Math.round(l*100),l:Math.round(u*100)}}function dX(e,t,r){e=e/360,t=t/100,r=r/100;let o,n,a;if(t===0)o=n=a=r;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=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=i(l,s,e+1/3),n=i(l,s,e),a=i(l,s,e-1/3)}return NV(Math.round(o*255),Math.round(n*255),Math.round(a*255))}var OV=["#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 Jx({className:e,size:t,shape:r,value:o="#000000",onChange:n,showInput:a=!0,showPresets:i=!0,presets:s=OV,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[g,m]=Zo.useState(!1),[x,h]=Zo.useState(o),[v,y]=Zo.useState(100),[w,C]=Zo.useState(!1),[b,S]=Zo.useState(o),I=Zo.useMemo(()=>cX(x)||{h:0,s:0,l:0},[x]),L=Zo.useMemo(()=>DV(x)||{r:0,g:0,b:0},[x]);Zo.useEffect(()=>{h(o),S(o)},[o]);let T=F=>{h(F),S(F),n?.(F)},k=(F,O)=>{let B={...I,[F]:O},A=dX(B.h,B.s,B.l);T(A)},E=(F,O)=>{let B={...L,[F]:O},A=NV(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)(wa,{open:g,onOpenChange:m,children:[(0,j.jsx)(Ca,{asChild:!0,children:(0,j.jsx)(Ee,{variant:"outline",className:P(AV({size:t,shape:r}),"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)(Vn,{className:"w-80",align:"start",sideOffset:8,children:[(0,j.jsxs)(vm,{defaultValue:"picker",className:"w-full",children:[(0,j.jsxs)(xm,{className:"grid w-full grid-cols-3",children:[(0,j.jsx)(Kl,{value:"picker",children:"Picker"}),(0,j.jsx)(Kl,{value:"sliders",children:"Sliders"}),(0,j.jsx)(Kl,{value:"input",children:"Input"})]}),(0,j.jsxs)(Xl,{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)(He.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)(Ur,{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)(ba,{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)(Ur,{children:"Opacity"}),(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)(ba,{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)(Xl,{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)(Ur,{children:"Red"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.r})]}),(0,j.jsx)(ba,{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)(Ur,{children:"Green"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.g})]}),(0,j.jsx)(ba,{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)(Ur,{children:"Blue"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.b})]}),(0,j.jsx)(ba,{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)(Xl,{value:"input",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Ur,{children:"Hex Color"}),(0,j.jsxs)("div",{className:"flex gap-2",children:[(0,j.jsx)(cr,{value:b,onChange:_,placeholder:"#000000",className:"font-mono"}),(0,j.jsx)(Ee,{size:"icon",variant:"outline",onClick:()=>T(b),children:(0,j.jsx)(yr,{className:"h-4 w-4"})})]})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Ur,{children:"RGB Values"}),(0,j.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,j.jsx)(cr,{type:"number",value:L.r,onChange:F=>E("r",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(cr,{type:"number",value:L.g,onChange:F=>E("g",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(cr,{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",AV({shape:r})),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)(Ee,{size:"icon",variant:"ghost",onClick:D,className:"h-8 w-8",children:(0,j.jsx)(Ka,{mode:"wait",children:w?(0,j.jsx)(He.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(yr,{className:"h-4 w-4 text-green-600"})},"check"):(0,j.jsx)(He.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(Df,{className:"h-4 w-4"})},"copy")})})]}),i&&s.length>0&&(0,j.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,j.jsx)(Ur,{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 FV({value:e="#000000",onChange:t,colors:r=OV.slice(0,10),className:o,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",o),children:r.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 _V({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:r}){let[o,n]=Zo.useState(e),a=(i,s)=>{let l={...o,[i]:s};n(l),t?.(l)};return(0,j.jsxs)("div",{className:P("moonui-theme","space-y-4",r),children:[(0,j.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${o.angle}deg, ${o.start}, ${o.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)(Ur,{children:"Start Color"}),(0,j.jsx)(Jx,{value:o.start,onChange:i=>a("start",i),size:"sm"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Ur,{children:"End Color"}),(0,j.jsx)(Jx,{value:o.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)(Ur,{children:"Angle"}),(0,j.jsxs)("span",{className:"text-sm text-muted-foreground",children:[o.angle,"\xB0"]})]}),(0,j.jsx)(ba,{value:[o.angle||90],onValueChange:([i])=>a("angle",i),max:360,step:1})]})]})}var Rs=R(M());var VV=1,fX=.9,pX=.8,mX=.17,jR=.1,$R=.999,gX=.9999,hX=.99,vX=/[\\\/_+.#"@\[\(\{&]/,xX=/[\\\/_+.#"@\[\(\{&]/g,yX=/[\s-]/,HV=/[\s-]/g;function qR(e,t,r,o,n,a,i){if(a===t.length)return n===e.length?VV:hX;var s=`${n},${a}`;if(i[s]!==void 0)return i[s];for(var l=o.charAt(a),u=r.indexOf(l,n),c=0,d,f,p,g;u>=0;)d=qR(e,t,r,o,u+1,a+1,i),d>c&&(u===n?d*=VV:vX.test(e.charAt(u-1))?(d*=pX,p=e.slice(n,u-1).match(xX),p&&n>0&&(d*=Math.pow($R,p.length))):yX.test(e.charAt(u-1))?(d*=fX,g=e.slice(n,u-1).match(HV),g&&n>0&&(d*=Math.pow($R,g.length))):(d*=mX,n>0&&(d*=Math.pow($R,u-n))),e.charAt(u)!==t.charAt(a)&&(d*=gX)),(d<jR&&r.charAt(u-1)===o.charAt(a+1)||o.charAt(a+1)===o.charAt(a)&&r.charAt(u-1)!==o.charAt(a))&&(f=qR(e,t,r,o,u+1,a+2,i),f*jR>d&&(d=f*jR)),d>c&&(c=d),u=r.indexOf(l,u+1);return i[s]=c,c}function BV(e){return e.toLowerCase().replace(HV," ")}function UV(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,qR(e,t,BV(e),BV(t),0,0,{})}var Ze=R(M(),1);var je=R(N(),1),ty="Dialog",[zV,QTe]=Fe(ty),[wX,Bn]=zV(ty),GV=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=Ze.useRef(null),l=Ze.useRef(null),[u,c]=qe({prop:o,defaultProp:n??!1,onChange:a,caller:ty});return(0,je.jsx)(wX,{scope:t,triggerRef:s,contentRef:l,contentId:Ne(),titleId:Ne(),descriptionId:Ne(),open:u,onOpenChange:c,onOpenToggle:Ze.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};GV.displayName=ty;var WV="DialogTrigger",jV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(WV,r),a=de(t,n.triggerRef);return(0,je.jsx)(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":YR(n.open),...o,ref:a,onClick:W(e.onClick,n.onOpenToggle)})});jV.displayName=WV;var KR="DialogPortal",[CX,$V]=zV(KR,{forceMount:void 0}),qV=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=Bn(KR,t);return(0,je.jsx)(CX,{scope:t,forceMount:r,children:Ze.Children.map(o,i=>(0,je.jsx)(ut,{present:r||a.open,children:(0,je.jsx)(Ro,{asChild:!0,container:n,children:i})}))})};qV.displayName=KR;var ey="DialogOverlay",KV=Ze.forwardRef((e,t)=>{let r=$V(ey,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Bn(ey,e.__scopeDialog);return a.modal?(0,je.jsx)(ut,{present:o||a.open,children:(0,je.jsx)(bX,{...n,ref:t})}):null});KV.displayName=ey;var SX=co("DialogOverlay.RemoveScroll"),bX=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(ey,r);return(0,je.jsx)(si,{as:SX,allowPinchZoom:!0,shards:[n.contentRef],children:(0,je.jsx)(q.div,{"data-state":YR(n.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Yl="DialogContent",XV=Ze.forwardRef((e,t)=>{let r=$V(Yl,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Bn(Yl,e.__scopeDialog);return(0,je.jsx)(ut,{present:o||a.open,children:a.modal?(0,je.jsx)(RX,{...n,ref:t}):(0,je.jsx)(IX,{...n,ref:t})})});XV.displayName=Yl;var RX=Ze.forwardRef((e,t)=>{let r=Bn(Yl,e.__scopeDialog),o=Ze.useRef(null),n=de(t,r.contentRef,o);return Ze.useEffect(()=>{let a=o.current;if(a)return xs(a)},[]),(0,je.jsx)(YV,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,a=>{a.preventDefault(),r.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())})}),IX=Ze.forwardRef((e,t)=>{let r=Bn(Yl,e.__scopeDialog),o=Ze.useRef(!1),n=Ze.useRef(!1);return(0,je.jsx)(YV,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),YV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=Bn(Yl,r),l=Ze.useRef(null),u=de(t,l);return ps(),(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(oi,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,je.jsx)(qo,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":YR(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(PX,{titleId:s.titleId}),(0,je.jsx)(TX,{contentRef:l,descriptionId:s.descriptionId})]})]})}),XR="DialogTitle",QV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(XR,r);return(0,je.jsx)(q.h2,{id:n.titleId,...o,ref:t})});QV.displayName=XR;var ZV="DialogDescription",JV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(ZV,r);return(0,je.jsx)(q.p,{id:n.descriptionId,...o,ref:t})});JV.displayName=ZV;var eB="DialogClose",tB=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(eB,r);return(0,je.jsx)(q.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});tB.displayName=eB;function YR(e){return e?"open":"closed"}var rB="DialogTitleWarning",[ZTe,oB]=QT(rB,{contentName:Yl,titleName:XR,docsSlug:"dialog"}),PX=({titleId:e})=>{let t=oB(rB),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
59
|
+
`)},BK=0,Jc=[];function J_(e){var t=it.useRef([]),r=it.useRef([0,0]),o=it.useRef(),n=it.useState(BK++)[0],a=it.useState(mm)[0],i=it.useRef(e);it.useEffect(function(){i.current=e},[e]),it.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var m=__([e.lockRef.current],(e.shards||[]).map(Z_),!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=it.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var h=Kx(m),v=r.current,y="deltaX"in m?m.deltaX:v[0]-h[0],C="deltaY"in m?m.deltaY:v[1]-h[1],w,b=m.target,S=Math.abs(y)>Math.abs(C)?"h":"v";if("touches"in m&&S==="h"&&b.type==="range")return!1;var I=AR(S,b);if(!I)return!0;if(I?w=S:(w=S==="v"?"h":"v",I=AR(S,b)),!I)return!1;if(!o.current&&"changedTouches"in m&&(y||C)&&(o.current=w),!w)return!0;var L=o.current||w;return Y_(L,x,m,L==="h"?y:C,!0)},[]),l=it.useCallback(function(m){var x=m;if(!(!Jc.length||Jc[Jc.length-1]!==a)){var h="deltaY"in x?Q_(x):Kx(x),v=t.current.filter(function(w){return w.name===x.type&&(w.target===x.target||x.target===w.shadowParent)&&_K(w.delta,h)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var y=(i.current.shards||[]).map(Z_).filter(Boolean).filter(function(w){return w.contains(x.target)}),C=y.length>0?s(x,y[0]):!i.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),u=it.useCallback(function(m,x,h,v){var y={name:m,delta:x,target:h,should:v,shadowParent:HK(h)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(C){return C!==y})},1)},[]),c=it.useCallback(function(m){r.current=Kx(m),o.current=void 0},[]),d=it.useCallback(function(m){u(m.type,Q_(m),m.target,s(m,e.lockRef.current))},[]),f=it.useCallback(function(m){u(m.type,Kx(m),m.target,s(m,e.lockRef.current))},[]);it.useEffect(function(){return Jc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Xl),document.addEventListener("touchmove",l,Xl),document.addEventListener("touchstart",c,Xl),function(){Jc=Jc.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Xl),document.removeEventListener("touchmove",l,Xl),document.removeEventListener("touchstart",c,Xl)}},[]);var p=e.removeScrollBar,g=e.inert;return it.createElement(it.Fragment,null,g?it.createElement(a,{styles:VK(n)}):null,p?it.createElement(MR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function HK(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var eV=RR(qx,J_);var tV=Xx.forwardRef(function(e,t){return Xx.createElement(pm,uo({},e,{ref:t,sideCar:eV}))});tV.classNames=pm.classNames;var ui=tV;var At=R(N(),1),Yx="Popover",[rV,JLe]=Fe(Yx,[Zo]),hm=Zo(),[UK,Cs]=rV(Yx),oV=e=>{let{__scopePopover:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!1}=e,s=hm(t),l=dt.useRef(null),[u,c]=dt.useState(!1),[d,f]=qe({prop:o,defaultProp:n??!1,onChange:a,caller:Yx});return(0,At.jsx)(si,{...s,children:(0,At.jsx)(UK,{scope:t,contentId:Ne(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:dt.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:dt.useCallback(()=>c(!0),[]),onCustomAnchorRemove:dt.useCallback(()=>c(!1),[]),modal:i,children:r})})};oV.displayName=Yx;var nV="PopoverAnchor",aV=dt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Cs(nV,r),a=hm(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=n;return dt.useEffect(()=>(i(),()=>s()),[i,s]),(0,At.jsx)(li,{...a,...o,ref:t})});aV.displayName=nV;var iV="PopoverTrigger",sV=dt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Cs(iV,r),a=hm(r),i=de(t,n.triggerRef),s=(0,At.jsx)(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":fV(n.open),...o,ref:i,onClick:W(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:(0,At.jsx)(li,{asChild:!0,...a,children:s})});sV.displayName=iV;var DR="PopoverPortal",[zK,GK]=rV(DR,{forceMount:void 0}),WK=e=>{let{__scopePopover:t,forceMount:r,children:o,container:n}=e,a=Cs(DR,t);return(0,At.jsx)(zK,{scope:t,forceMount:r,children:(0,At.jsx)(ut,{present:r||a.open,children:(0,At.jsx)(Ro,{asChild:!0,container:n,children:o})})})};WK.displayName=DR;var ed="PopoverContent",lV=dt.forwardRef((e,t)=>{let r=GK(ed,e.__scopePopover),{forceMount:o=r.forceMount,...n}=e,a=Cs(ed,e.__scopePopover);return(0,At.jsx)(ut,{present:o||a.open,children:a.modal?(0,At.jsx)($K,{...n,ref:t}):(0,At.jsx)(qK,{...n,ref:t})})});lV.displayName=ed;var jK=qr("PopoverContent.RemoveScroll"),$K=dt.forwardRef((e,t)=>{let r=Cs(ed,e.__scopePopover),o=dt.useRef(null),n=de(t,o),a=dt.useRef(!1);return dt.useEffect(()=>{let i=o.current;if(i)return ys(i)},[]),(0,At.jsx)(ui,{as:jK,allowPinchZoom:!0,children:(0,At.jsx)(uV,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||r.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})})})}),qK=dt.forwardRef((e,t)=>{let r=Cs(ed,e.__scopePopover),o=dt.useRef(!1),n=dt.useRef(!1);return(0,At.jsx)(uV,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),uV=dt.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=Cs(ed,r),p=hm(r);return ms(),(0,At.jsx)(ai,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,At.jsx)(Ko,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,At.jsx)(vs,{"data-state":fV(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)"}})})})}),cV="PopoverClose",dV=dt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Cs(cV,r);return(0,At.jsx)(q.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});dV.displayName=cV;var KK="PopoverArrow",XK=dt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=hm(r);return(0,At.jsx)(xs,{...n,...o,ref:t})});XK.displayName=KK;function fV(e){return e?"open":"closed"}var pV=oV,mV=aV,gV=sV;var NR=lV,hV=dV;var ya=R(N()),OR=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"}}),Ca=pV,wa=gV,xV=mV,Bn=vV.forwardRef(({className:e,variant:t,size:r,side:o,position:n,radius:a,shadow:i,backdrop:s=!1,closeOnInteractOutside:l=!0,overlayBackdrop:u=!1,sideOffset:c=4,...d},f)=>(0,ya.jsxs)(ya.Fragment,{children:[u&&(0,ya.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50"}),(0,ya.jsx)(NR,{ref:f,side:o,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:P(OR({variant:t,size:r,side:o,position:n,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));Bn.displayName=NR.displayName;var yV=hV,FR=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","my-2 h-px bg-border",e),...t});FR.displayName="PopoverSeparator";var _R=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});_R.displayName="PopoverHeader";var VR=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});VR.displayName="PopoverFooter";var ba=R(M());var di=R(M(),1);var Qt=R(M(),1);var ws=R(N(),1),BR="rovingFocusGroup.onEntryFocus",QK={bubbles:!1,cancelable:!0},vm="RovingFocusGroup",[HR,CV,ZK]=ea(vm),[JK,td]=Fe(vm,[ZK]),[eX,tX]=JK(vm),wV=Qt.forwardRef((e,t)=>(0,ws.jsx)(HR.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,ws.jsx)(HR.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,ws.jsx)(rX,{...e,ref:t})})}));wV.displayName=vm;var rX=Qt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:o,loop:n=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=Qt.useRef(null),p=de(t,f),g=sa(a),[m,x]=qe({prop:i,defaultProp:s??null,onChange:l,caller:vm}),[h,v]=Qt.useState(!1),y=nt(u),C=CV(r),w=Qt.useRef(!1),[b,S]=Qt.useState(0);return Qt.useEffect(()=>{let I=f.current;if(I)return I.addEventListener(BR,y),()=>I.removeEventListener(BR,y)},[y]),(0,ws.jsx)(eX,{scope:r,orientation:o,dir:g,loop:n,currentTabStopId:m,onItemFocus:Qt.useCallback(I=>x(I),[x]),onItemShiftTab:Qt.useCallback(()=>v(!0),[]),onFocusableItemAdd:Qt.useCallback(()=>S(I=>I+1),[]),onFocusableItemRemove:Qt.useCallback(()=>S(I=>I-1),[]),children:(0,ws.jsx)(q.div,{tabIndex:h||b===0?-1:0,"data-orientation":o,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{w.current=!0}),onFocus:W(e.onFocus,I=>{let L=!w.current;if(I.target===I.currentTarget&&L&&!h){let T=new CustomEvent(BR,QK);if(I.currentTarget.dispatchEvent(T),!T.defaultPrevented){let k=C().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);RV(z,c)}}w.current=!1}),onBlur:W(e.onBlur,()=>v(!1))})})}),SV="RovingFocusGroupItem",bV=Qt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,children:i,...s}=e,l=Ne(),u=a||l,c=tX(SV,r),d=c.currentTabStopId===u,f=CV(r),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=c;return Qt.useEffect(()=>{if(o)return p(),()=>g()},[o,p,g]),(0,ws.jsx)(HR.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:(0,ws.jsx)(q.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:W(e.onMouseDown,x=>{o?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=aX(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(C=>C.focusable).map(C=>C.ref.current);if(h==="last")y.reverse();else if(h==="prev"||h==="next"){h==="prev"&&y.reverse();let C=y.indexOf(x.currentTarget);y=c.loop?iX(y,C+1):y.slice(C+1)}setTimeout(()=>RV(y))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});bV.displayName=SV;var oX={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function nX(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function aX(e,t,r){let o=nX(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return oX[o]}function RV(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function iX(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var Qx=wV,Zx=bV;var ci=R(N(),1),Jx="Tabs",[sX,CTe]=Fe(Jx,[td]),PV=td(),[lX,UR]=sX(Jx),LV=di.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=sa(s),[d,f]=qe({prop:o,onChange:n,defaultProp:a??"",caller:Jx});return(0,ci.jsx)(lX,{scope:r,baseId:Ne(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:(0,ci.jsx)(q.div,{dir:c,"data-orientation":i,...u,ref:t})})});LV.displayName=Jx;var TV="TabsList",kV=di.forwardRef((e,t)=>{let{__scopeTabs:r,loop:o=!0,...n}=e,a=UR(TV,r),i=PV(r);return(0,ci.jsx)(Qx,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:(0,ci.jsx)(q.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});kV.displayName=TV;var MV="TabsTrigger",EV=di.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,i=UR(MV,r),s=PV(r),l=NV(i.baseId,o),u=OV(i.baseId,o),c=o===i.value;return(0,ci.jsx)(Zx,{asChild:!0,...s,focusable:!n,active:c,children:(0,ci.jsx)(q.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(o):d.preventDefault()}),onKeyDown:W(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(o)}),onFocus:W(e.onFocus,()=>{let d=i.activationMode!=="manual";!c&&!n&&d&&i.onValueChange(o)})})})});EV.displayName=MV;var AV="TabsContent",DV=di.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,forceMount:n,children:a,...i}=e,s=UR(AV,r),l=NV(s.baseId,o),u=OV(s.baseId,o),c=o===s.value,d=di.useRef(c);return di.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,ci.jsx)(ut,{present:n||c,children:({present:f})=>(0,ci.jsx)(q.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})})});DV.displayName=AV;function NV(e,t){return`${e}-trigger-${t}`}function OV(e,t){return`${e}-content-${t}`}var zR=LV,GR=kV,WR=EV,jR=DV;var Sa=R(N()),$R=ba.createContext("horizontal"),xm=ba.forwardRef(({vertical:e=!1,orientation:t,className:r,...o},n)=>{let a=t??(e?"vertical":"horizontal");return(0,Sa.jsx)($R.Provider,{value:a,children:(0,Sa.jsx)(zR,{ref:n,className:P("moonui-theme",r),orientation:a,...o})})});xm.displayName=zR.displayName;var FV=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}}),ym=ba.forwardRef(({className:e,variant:t,orientation:r,fullWidth:o,scrollable:n,...a},i)=>{let s=ba.useContext($R);return(0,Sa.jsx)(GR,{ref:i,className:P("moonui-theme",FV({variant:t,orientation:r??s,fullWidth:o,scrollable:n,className:e})),...a})});ym.displayName=GR.displayName;var _V=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}}),Yl=ba.forwardRef(({className:e,variant:t,size:r,icon:o,iconPosition:n="left",badge:a,fadeTabs:i=!1,orientation:s,fullWidth:l,children:u,...c},d)=>{let f=ba.useContext($R);return(0,Sa.jsxs)(WR,{ref:d,className:P("moonui-theme",_V({variant:t,size:r,orientation:s??f,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...c,children:[o&&n==="left"&&(0,Sa.jsx)("span",{className:"mr-2",children:o}),u,o&&n==="right"&&(0,Sa.jsx)("span",{className:"ml-2",children:o}),a&&(0,Sa.jsx)("span",{className:"ml-2",children:a})]})});Yl.displayName=WR.displayName;var Ql=ba.forwardRef(({className:e,animated:t=!1,...r},o)=>(0,Sa.jsx)(jR,{ref:o,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),...r}));Ql.displayName=jR.displayName;var Ss=R(M());var Ra=R(N()),cX=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"}}),dX=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"}}),fX=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"}}),pX=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"}}),Ia=Ss.forwardRef(({className:e,size:t,trackVariant:r,rangeVariant:o,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]=Ss.useState(u||c||[0]);Ss.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=Ss.useRef(null),C=p.min||0,w=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=C+D*(w-C),F=Math.round(z/b)*b,O=Math.max(C,Math.min(w,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=C+B*(w-C),te=Math.round(A/b)*b,ae=Math.max(C,Math.min(w,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=C;break;case"End":z=w;break;default:return}E.preventDefault();let F=k>0?m[k-1]:C,O=k<m.length-1?m[k+1]:w,B=Math.max(F,Math.min(O,z)),A=[...m];A[k]=B,S(A)};return(0,Ra.jsxs)("div",{className:"w-full",ref:g,...p,children:[i&&(0,Ra.jsx)("div",{className:P("flex justify-end mb-1 text-sm text-muted-foreground",l),children:m.length===1?(0,Ra.jsx)("span",{children:h(m[0])}):(0,Ra.jsxs)("span",{children:[h(m[0])," - ",h(m[m.length-1])]})}),(0,Ra.jsxs)("div",{className:P("moonui-theme",cX({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,Ra.jsx)("div",{ref:y,className:P(dX({variant:r||n||"default"})),onClick:I,children:(0,Ra.jsx)("div",{className:P(fX({variant:o||n||"primary"})),style:{left:"0%",width:`${v(m[0],C,w)}%`}})}),m.map((k,E)=>(0,Ra.jsx)("div",{className:P(pX({variant:n||"primary",size:a})),style:{left:`${v(k,C,w)}%`,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":C,"aria-valuemax":w,"aria-valuenow":k,"aria-disabled":f},E))]})]})});Ia.displayName="Slider";var j=R(N()),VV=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 BV(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 HV(e,t,r){return"#"+((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1)}function mX(e){let t=BV(e);if(!t)return null;let r=t.r/255,o=t.g/255,n=t.b/255,a=Math.max(r,o,n),i=Math.min(r,o,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 r:s=((o-n)/c+(o<n?6:0))/6;break;case o:s=((n-r)/c+2)/6;break;case n:s=((r-o)/c+4)/6;break}}return{h:Math.round(s*360),s:Math.round(l*100),l:Math.round(u*100)}}function gX(e,t,r){e=e/360,t=t/100,r=r/100;let o,n,a;if(t===0)o=n=a=r;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=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=i(l,s,e+1/3),n=i(l,s,e),a=i(l,s,e-1/3)}return HV(Math.round(o*255),Math.round(n*255),Math.round(a*255))}var UV=["#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 ey({className:e,size:t,shape:r,value:o="#000000",onChange:n,showInput:a=!0,showPresets:i=!0,presets:s=UV,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[g,m]=Jo.useState(!1),[x,h]=Jo.useState(o),[v,y]=Jo.useState(100),[C,w]=Jo.useState(!1),[b,S]=Jo.useState(o),I=Jo.useMemo(()=>mX(x)||{h:0,s:0,l:0},[x]),L=Jo.useMemo(()=>BV(x)||{r:0,g:0,b:0},[x]);Jo.useEffect(()=>{h(o),S(o)},[o]);let T=F=>{h(F),S(F),n?.(F)},k=(F,O)=>{let B={...I,[F]:O},A=gX(B.h,B.s,B.l);T(A)},E=(F,O)=>{let B={...L,[F]:O},A=HV(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),w(!0),setTimeout(()=>w(!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)(Ca,{open:g,onOpenChange:m,children:[(0,j.jsx)(wa,{asChild:!0,children:(0,j.jsx)(Ee,{variant:"outline",className:P(VV({size:t,shape:r}),"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)(Bn,{className:"w-80",align:"start",sideOffset:8,children:[(0,j.jsxs)(xm,{defaultValue:"picker",className:"w-full",children:[(0,j.jsxs)(ym,{className:"grid w-full grid-cols-3",children:[(0,j.jsx)(Yl,{value:"picker",children:"Picker"}),(0,j.jsx)(Yl,{value:"sliders",children:"Sliders"}),(0,j.jsx)(Yl,{value:"input",children:"Input"})]}),(0,j.jsxs)(Ql,{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)(He.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)(zr,{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)(Ia,{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)(zr,{children:"Opacity"}),(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)(Ia,{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)(Ql,{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)(zr,{children:"Red"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.r})]}),(0,j.jsx)(Ia,{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)(zr,{children:"Green"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.g})]}),(0,j.jsx)(Ia,{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)(zr,{children:"Blue"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.b})]}),(0,j.jsx)(Ia,{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)(Ql,{value:"input",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(zr,{children:"Hex Color"}),(0,j.jsxs)("div",{className:"flex gap-2",children:[(0,j.jsx)(dr,{value:b,onChange:_,placeholder:"#000000",className:"font-mono"}),(0,j.jsx)(Ee,{size:"icon",variant:"outline",onClick:()=>T(b),children:(0,j.jsx)(Cr,{className:"h-4 w-4"})})]})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(zr,{children:"RGB Values"}),(0,j.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,j.jsx)(dr,{type:"number",value:L.r,onChange:F=>E("r",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(dr,{type:"number",value:L.g,onChange:F=>E("g",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(dr,{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",VV({shape:r})),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)(Ee,{size:"icon",variant:"ghost",onClick:D,className:"h-8 w-8",children:(0,j.jsx)(Ya,{mode:"wait",children:C?(0,j.jsx)(He.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(Cr,{className:"h-4 w-4 text-green-600"})},"check"):(0,j.jsx)(He.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(Of,{className:"h-4 w-4"})},"copy")})})]}),i&&s.length>0&&(0,j.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,j.jsx)(zr,{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 zV({value:e="#000000",onChange:t,colors:r=UV.slice(0,10),className:o,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",o),children:r.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 GV({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:r}){let[o,n]=Jo.useState(e),a=(i,s)=>{let l={...o,[i]:s};n(l),t?.(l)};return(0,j.jsxs)("div",{className:P("moonui-theme","space-y-4",r),children:[(0,j.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${o.angle}deg, ${o.start}, ${o.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)(zr,{children:"Start Color"}),(0,j.jsx)(ey,{value:o.start,onChange:i=>a("start",i),size:"sm"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(zr,{children:"End Color"}),(0,j.jsx)(ey,{value:o.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)(zr,{children:"Angle"}),(0,j.jsxs)("span",{className:"text-sm text-muted-foreground",children:[o.angle,"\xB0"]})]}),(0,j.jsx)(Ia,{value:[o.angle||90],onValueChange:([i])=>a("angle",i),max:360,step:1})]})]})}var Is=R(M());var WV=1,hX=.9,vX=.8,xX=.17,qR=.1,KR=.999,yX=.9999,CX=.99,wX=/[\\\/_+.#"@\[\(\{&]/,SX=/[\\\/_+.#"@\[\(\{&]/g,bX=/[\s-]/,$V=/[\s-]/g;function XR(e,t,r,o,n,a,i){if(a===t.length)return n===e.length?WV:CX;var s=`${n},${a}`;if(i[s]!==void 0)return i[s];for(var l=o.charAt(a),u=r.indexOf(l,n),c=0,d,f,p,g;u>=0;)d=XR(e,t,r,o,u+1,a+1,i),d>c&&(u===n?d*=WV:wX.test(e.charAt(u-1))?(d*=vX,p=e.slice(n,u-1).match(SX),p&&n>0&&(d*=Math.pow(KR,p.length))):bX.test(e.charAt(u-1))?(d*=hX,g=e.slice(n,u-1).match($V),g&&n>0&&(d*=Math.pow(KR,g.length))):(d*=xX,n>0&&(d*=Math.pow(KR,u-n))),e.charAt(u)!==t.charAt(a)&&(d*=yX)),(d<qR&&r.charAt(u-1)===o.charAt(a+1)||o.charAt(a+1)===o.charAt(a)&&r.charAt(u-1)!==o.charAt(a))&&(f=XR(e,t,r,o,u+1,a+2,i),f*qR>d&&(d=f*qR)),d>c&&(c=d),u=r.indexOf(l,u+1);return i[s]=c,c}function jV(e){return e.toLowerCase().replace($V," ")}function qV(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,XR(e,t,jV(e),jV(t),0,0,{})}var Ze=R(M(),1);var je=R(N(),1),ry="Dialog",[KV,r1e]=Fe(ry),[RX,Hn]=KV(ry),XV=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=Ze.useRef(null),l=Ze.useRef(null),[u,c]=qe({prop:o,defaultProp:n??!1,onChange:a,caller:ry});return(0,je.jsx)(RX,{scope:t,triggerRef:s,contentRef:l,contentId:Ne(),titleId:Ne(),descriptionId:Ne(),open:u,onOpenChange:c,onOpenToggle:Ze.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};XV.displayName=ry;var YV="DialogTrigger",QV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Hn(YV,r),a=de(t,n.triggerRef);return(0,je.jsx)(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":ZR(n.open),...o,ref:a,onClick:W(e.onClick,n.onOpenToggle)})});QV.displayName=YV;var YR="DialogPortal",[IX,ZV]=KV(YR,{forceMount:void 0}),JV=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=Hn(YR,t);return(0,je.jsx)(IX,{scope:t,forceMount:r,children:Ze.Children.map(o,i=>(0,je.jsx)(ut,{present:r||a.open,children:(0,je.jsx)(Ro,{asChild:!0,container:n,children:i})}))})};JV.displayName=YR;var ty="DialogOverlay",eB=Ze.forwardRef((e,t)=>{let r=ZV(ty,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Hn(ty,e.__scopeDialog);return a.modal?(0,je.jsx)(ut,{present:o||a.open,children:(0,je.jsx)(LX,{...n,ref:t})}):null});eB.displayName=ty;var PX=qr("DialogOverlay.RemoveScroll"),LX=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Hn(ty,r);return(0,je.jsx)(ui,{as:PX,allowPinchZoom:!0,shards:[n.contentRef],children:(0,je.jsx)(q.div,{"data-state":ZR(n.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Zl="DialogContent",tB=Ze.forwardRef((e,t)=>{let r=ZV(Zl,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Hn(Zl,e.__scopeDialog);return(0,je.jsx)(ut,{present:o||a.open,children:a.modal?(0,je.jsx)(TX,{...n,ref:t}):(0,je.jsx)(kX,{...n,ref:t})})});tB.displayName=Zl;var TX=Ze.forwardRef((e,t)=>{let r=Hn(Zl,e.__scopeDialog),o=Ze.useRef(null),n=de(t,r.contentRef,o);return Ze.useEffect(()=>{let a=o.current;if(a)return ys(a)},[]),(0,je.jsx)(rB,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,a=>{a.preventDefault(),r.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())})}),kX=Ze.forwardRef((e,t)=>{let r=Hn(Zl,e.__scopeDialog),o=Ze.useRef(!1),n=Ze.useRef(!1);return(0,je.jsx)(rB,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),rB=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=Hn(Zl,r),l=Ze.useRef(null),u=de(t,l);return ms(),(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(ai,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,je.jsx)(Ko,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ZR(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(MX,{titleId:s.titleId}),(0,je.jsx)(AX,{contentRef:l,descriptionId:s.descriptionId})]})]})}),QR="DialogTitle",oB=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Hn(QR,r);return(0,je.jsx)(q.h2,{id:n.titleId,...o,ref:t})});oB.displayName=QR;var nB="DialogDescription",aB=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Hn(nB,r);return(0,je.jsx)(q.p,{id:n.descriptionId,...o,ref:t})});aB.displayName=nB;var iB="DialogClose",sB=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Hn(iB,r);return(0,je.jsx)(q.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});sB.displayName=iB;function ZR(e){return e?"open":"closed"}var lB="DialogTitleWarning",[o1e,uB]=ZT(lB,{contentName:Zl,titleName:QR,docsSlug:"dialog"}),MX=({titleId:e})=>{let t=uB(lB),r=`\`${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 Ze.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},LX="DialogDescriptionWarning",TX=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${oB(LX).contentName}}.`;return Ze.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},ry=GV,nB=jV,oy=qV,ym=KV,wm=XV,QR=QV,ZR=JV,JR=tB;var ee=R(M(),1);var Cm='[cmdk-group=""]',eI='[cmdk-group-items=""]',kX='[cmdk-group-heading=""]',sB='[cmdk-item=""]',iB=`${sB}:not([aria-disabled="true"])`,tI="cmdk-item-select",ed="data-value",MX=(e,t,r)=>UV(e,t,r),lB=ee.createContext(void 0),Sm=()=>ee.useContext(lB),uB=ee.createContext(void 0),rI=()=>ee.useContext(uB),cB=ee.createContext(void 0),dB=ee.forwardRef((e,t)=>{let r=td(()=>{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}}}),o=td(()=>new Set),n=td(()=>new Map),a=td(()=>new Map),i=td(()=>new Set),s=fB(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:g,disablePointerSelection:m=!1,vimBindings:x=!0,...h}=e,v=Ne(),y=Ne(),w=Ne(),C=ee.useRef(null),b=UX();Ql(()=>{if(c!==void 0){let V=c.trim();r.current.value=V,S.emit()}},[c]),Ql(()=>{b(6,_)},[]);let S=ee.useMemo(()=>({subscribe:V=>(i.current.add(V),()=>i.current.delete(V)),snapshot:()=>r.current,setState:(V,Q,re)=>{var Y,ce,U,ne;if(!Object.is(r.current[V],Q)){if(r.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;r.current.selectedItemId=(he=D())==null?void 0:he.id,S.emit()}),re||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,re)=>{var Y;Q!==((Y=a.current.get(V))==null?void 0:Y.value)&&(a.current.set(V,{value:Q,keywords:re}),r.current.filtered.items.set(V,L(Q,re)),b(2,()=>{T(),S.emit()}))},item:(V,Q)=>(o.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(),r.current.value||k(),S.emit()}),()=>{a.current.delete(V),o.current.delete(V),r.current.filtered.items.delete(V);let re=D();b(4,()=>{E(),re?.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 re,Y;let ce=(Y=(re=s.current)==null?void 0:re.filter)!=null?Y:MX;return V?ce(V,r.current.search,Q):0}function T(){if(!r.current.search||s.current.shouldFilter===!1)return;let V=r.current.filtered.items,Q=[];r.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 re=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(eI);ce?ce.appendChild(Y.parentElement===ce?Y:Y.closest(`${eI} > *`)):re.appendChild(Y.parentElement===re?Y:Y.closest(`${eI} > *`))}),Q.sort((Y,ce)=>ce[1]-Y[1]).forEach(Y=>{var ce;let U=(ce=C.current)==null?void 0:ce.querySelector(`${Cm}[${ed}="${encodeURIComponent(Y[0])}"]`);U?.parentElement.appendChild(U)})}function k(){let V=z().find(re=>re.getAttribute("aria-disabled")!=="true"),Q=V?.getAttribute(ed);S.setState("value",Q||void 0)}function E(){var V,Q,re,Y;if(!r.current.search||s.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let ce=0;for(let U of o.current){let ne=(Q=(V=a.current.get(U))==null?void 0:V.value)!=null?Q:"",he=(Y=(re=a.current.get(U))==null?void 0:re.keywords)!=null?Y:[],xe=L(ne,he);r.current.filtered.items.set(U,xe),xe>0&&ce++}for(let[U,ne]of n.current)for(let he of ne)if(r.current.filtered.items.get(he)>0){r.current.filtered.groups.add(U);break}r.current.filtered.count=ce}function _(){var V,Q,re;let Y=D();Y&&(((V=Y.parentElement)==null?void 0:V.firstChild)===Y&&((re=(Q=Y.closest(Cm))==null?void 0:Q.querySelector(kX))==null||re.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function D(){var V;return(V=C.current)==null?void 0:V.querySelector(`${sB}[aria-selected="true"]`)}function z(){var V;return Array.from(((V=C.current)==null?void 0:V.querySelectorAll(iB))||[])}function F(V){let Q=z()[V];Q&&S.setState("value",Q.getAttribute(ed))}function O(V){var Q;let re=D(),Y=z(),ce=Y.findIndex(ne=>ne===re),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(ed))}function B(V){let Q=D(),re=Q?.closest(Cm),Y;for(;re&&!Y;)re=V>0?BX(re,Cm):HX(re,Cm),Y=re?.querySelector(iB);Y?S.setState("value",Y.getAttribute(ed)):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(q.div,{ref:t,tabIndex:-1,...h,"cmdk-root":"",onKeyDown:V=>{var Q;(Q=h.onKeyDown)==null||Q.call(h,V);let re=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||re))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(tI);Y.dispatchEvent(ce)}}}}},ee.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:GX},l),ny(e,V=>ee.createElement(uB.Provider,{value:S},ee.createElement(lB.Provider,{value:I},V))))}),EX=ee.forwardRef((e,t)=>{var r,o;let n=Ne(),a=ee.useRef(null),i=ee.useContext(cB),s=Sm(),l=fB(e),u=(o=(r=l.current)==null?void 0:r.forceMount)!=null?o:i?.forceMount;Ql(()=>{if(!u)return s.item(n,i?.id)},[u]);let c=pB(n,a,[e.value,e.children,a],e.keywords),d=rI(),f=Ss(b=>b.value&&b.value===c.current),p=Ss(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(tI,g),()=>b.removeEventListener(tI,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(q.div,{ref:uo(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)}),AX=ee.forwardRef((e,t)=>{let{heading:r,children:o,forceMount:n,...a}=e,i=Ne(),s=ee.useRef(null),l=ee.useRef(null),u=Ne(),c=Sm(),d=Ss(p=>n||c.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);Ql(()=>c.group(i),[]),pB(i,s,[e.value,e.heading,l]);let f=ee.useMemo(()=>({id:i,forceMount:n}),[n]);return ee.createElement(q.div,{ref:uo(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&ee.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),ny(e,p=>ee.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},ee.createElement(cB.Provider,{value:f},p))))}),DX=ee.forwardRef((e,t)=>{let{alwaysRender:r,...o}=e,n=ee.useRef(null),a=Ss(i=>!i.search);return!r&&!a?null:ee.createElement(q.div,{ref:uo(n,t),...o,"cmdk-separator":"",role:"separator"})}),NX=ee.forwardRef((e,t)=>{let{onValueChange:r,...o}=e,n=e.value!=null,a=rI(),i=Ss(u=>u.search),s=Ss(u=>u.selectedItemId),l=Sm();return ee.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),ee.createElement(q.input,{ref:t,...o,"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),r?.(u.target.value)}})}),OX=ee.forwardRef((e,t)=>{let{children:r,label:o="Suggestions",...n}=e,a=ee.useRef(null),i=ee.useRef(null),s=Ss(u=>u.selectedItemId),l=Sm();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(q.div,{ref:uo(a,t),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":o,id:l.listId},ny(e,u=>ee.createElement("div",{ref:uo(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),FX=ee.forwardRef((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:n,contentClassName:a,container:i,...s}=e;return ee.createElement(ry,{open:r,onOpenChange:o},ee.createElement(oy,{container:i},ee.createElement(ym,{"cmdk-overlay":"",className:n}),ee.createElement(wm,{"aria-label":e.label,"cmdk-dialog":"",className:a},ee.createElement(dB,{ref:t,...s}))))}),_X=ee.forwardRef((e,t)=>Ss(r=>r.filtered.count===0)?ee.createElement(q.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),VX=ee.forwardRef((e,t)=>{let{progress:r,children:o,label:n="Loading...",...a}=e;return ee.createElement(q.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},ny(e,i=>ee.createElement("div",{"aria-hidden":!0},i)))}),bs=Object.assign(dB,{List:OX,Item:EX,Input:NX,Group:AX,Separator:DX,Dialog:FX,Empty:_X,Loading:VX});function BX(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function HX(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function fB(e){let t=ee.useRef(e);return Ql(()=>{t.current=e}),t}var Ql=typeof window>"u"?ee.useEffect:ee.useLayoutEffect;function td(e){let t=ee.useRef();return t.current===void 0&&(t.current=e()),t}function Ss(e){let t=rI(),r=()=>e(t.snapshot());return ee.useSyncExternalStore(t.subscribe,r,r)}function pB(e,t,r,o=[]){let n=ee.useRef(),a=Sm();return Ql(()=>{var i;let s=(()=>{var u;for(let c of r){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=o.map(u=>u.trim());a.value(e,s,l),(i=t.current)==null||i.setAttribute(ed,s),n.current=s}),n}var UX=()=>{let[e,t]=ee.useState(),r=td(()=>new Map);return Ql(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,n)=>{r.current.set(o,n),t({})}};function zX(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ny({asChild:e,children:t},r){return e&&ee.isValidElement(t)?ee.cloneElement(zX(t),{ref:t.ref},r(t.props.children)):r(t)}var GX={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var rd=R(M());var St=R(N()),ay=ry,mB=nB,WX=oy,gB=JR,jX=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"}}),hB=rd.forwardRef(({className:e,variant:t,animation:r,...o},n)=>(0,St.jsx)(ym,{ref:n,className:P("moonui-theme",jX({variant:t,animation:r}),e),...o}));hB.displayName=ym.displayName;var $X=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"}}),bm=rd.forwardRef(({className:e,children:t,variant:r,size:o,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,St.jsxs)(WX,{children:[(0,St.jsx)(hB,{variant:s,animation:l,onClick:u?void 0:v}),(0,St.jsxs)(wm,{ref:h,onEscapeKeyDown:u?void 0:v,onInteractOutside:u?void 0:v,className:P($X({variant:r,size:o,radius:n,animation:a,position:i}),"outline-none",p&&"pointer-events-none",g&&"border-success/40",e),...x,children:[(c||d||f)&&(0,St.jsxs)(iy,{className:"flex gap-4",children:[(f||p||g)&&(0,St.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,St.jsx)(Ht,{className:"h-5 w-5 animate-spin text-primary"}),g&&(0,St.jsx)(yr,{className:"h-5 w-5 text-success"}),!p&&!g&&f&&(0,St.jsx)("span",{className:"text-primary",children:f})]}),(0,St.jsxs)("div",{className:"flex-1",children:[c&&(0,St.jsx)(od,{children:c}),d&&(0,St.jsx)(sy,{children:d})]})]}),t,!u&&(0,St.jsxs)(JR,{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,St.jsx)(xo,{className:"h-4 w-4"}),(0,St.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});bm.displayName=wm.displayName;var iy=({className:e,...t})=>(0,St.jsx)("div",{className:P("flex flex-col space-y-2 text-center sm:text-left",e),...t});iy.displayName="DialogHeader";var oI=({className:e,...t})=>(0,St.jsx)("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});oI.displayName="DialogFooter";var od=rd.forwardRef(({className:e,...t},r)=>(0,St.jsx)(QR,{ref:r,className:P("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));od.displayName=QR.displayName;var sy=rd.forwardRef(({className:e,...t},r)=>(0,St.jsx)(ZR,{ref:r,className:P("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));sy.displayName=ZR.displayName;var nI=rd.forwardRef(({className:e,...t},r)=>(0,St.jsx)("form",{ref:r,className:P("moonui-theme","flex flex-col gap-4",e),...t}));nI.displayName="DialogForm";var Pr=R(N()),qX=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"}}),ly=Rs.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Pr.jsx)(bs,{ref:n,className:P("moonui-theme",qX({variant:t,size:r}),e),...o}));ly.displayName="Command";var vB=({children:e,commandClassName:t,...r})=>(0,Pr.jsx)(ay,{...r,children:(0,Pr.jsxs)(bm,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,Pr.jsx)(od,{className:"sr-only",children:"Command Menu"}),(0,Pr.jsx)(ly,{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})]})}),aI=Rs.forwardRef(({className:e,...t},r)=>(0,Pr.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Pr.jsx)(ll,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,Pr.jsx)(bs.Input,{ref:r,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})]}));aI.displayName="CommandInput";var iI=Rs.forwardRef(({className:e,...t},r)=>(0,Pr.jsx)(bs.List,{ref:r,className:P("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));iI.displayName="CommandList";var sI=Rs.forwardRef(({className:e,...t},r)=>(0,Pr.jsx)(bs.Empty,{ref:r,className:P("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));sI.displayName="CommandEmpty";var lI=Rs.forwardRef(({className:e,...t},r)=>(0,Pr.jsx)(bs.Group,{ref:r,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}));lI.displayName="CommandGroup";var uI=Rs.forwardRef(({className:e,...t},r)=>(0,Pr.jsx)(bs.Separator,{ref:r,className:P("moonui-theme","-mx-1 h-px bg-border",e),...t}));uI.displayName="CommandSeparator";var cI=Rs.forwardRef(({className:e,...t},r)=>(0,Pr.jsx)(bs.Item,{ref:r,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}));cI.displayName="CommandItem";var dI=({className:e,...t})=>(0,Pr.jsx)("span",{className:P("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});dI.displayName="CommandShortcut";var EI=R(M());var Pm=R(M(),1);function Is(e,t){return typeof e=="function"?e(t):e}function Io(e,t){return r=>{t.setState(o=>({...o,[e]:Is(r,o[e])}))}}function fy(e){return e instanceof Function}function KX(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function XX(e,t){let r=[],o=n=>{n.forEach(a=>{r.push(a);let i=t(a);i!=null&&i.length&&o(i)})};return o(e),r}function me(e,t,r){let o=[],n;return a=>{let i;r.key&&r.debug&&(i=Date.now());let s=e(a);if(!(s.length!==o.length||s.some((c,d)=>o[d]!==c)))return n;o=s;let u;if(r.key&&r.debug&&(u=Date.now()),n=t(...s),r==null||r.onChange==null||r.onChange(n),r.key&&r.debug&&r!=null&&r.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 Ze.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},EX="DialogDescriptionWarning",AX=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${uB(EX).contentName}}.`;return Ze.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},oy=XV,cB=QV,ny=JV,Cm=eB,wm=tB,JR=oB,eI=aB,tI=sB;var ee=R(M(),1);var Sm='[cmdk-group=""]',rI='[cmdk-group-items=""]',DX='[cmdk-group-heading=""]',pB='[cmdk-item=""]',fB=`${pB}:not([aria-disabled="true"])`,oI="cmdk-item-select",rd="data-value",NX=(e,t,r)=>qV(e,t,r),mB=ee.createContext(void 0),bm=()=>ee.useContext(mB),gB=ee.createContext(void 0),nI=()=>ee.useContext(gB),hB=ee.createContext(void 0),vB=ee.forwardRef((e,t)=>{let r=od(()=>{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}}}),o=od(()=>new Set),n=od(()=>new Map),a=od(()=>new Map),i=od(()=>new Set),s=xB(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:g,disablePointerSelection:m=!1,vimBindings:x=!0,...h}=e,v=Ne(),y=Ne(),C=Ne(),w=ee.useRef(null),b=jX();Jl(()=>{if(c!==void 0){let V=c.trim();r.current.value=V,S.emit()}},[c]),Jl(()=>{b(6,_)},[]);let S=ee.useMemo(()=>({subscribe:V=>(i.current.add(V),()=>i.current.delete(V)),snapshot:()=>r.current,setState:(V,Q,re)=>{var Y,ce,U,ne;if(!Object.is(r.current[V],Q)){if(r.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(C);he?he.focus():(Y=document.getElementById(v))==null||Y.focus()}if(b(7,()=>{var he;r.current.selectedItemId=(he=D())==null?void 0:he.id,S.emit()}),re||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,re)=>{var Y;Q!==((Y=a.current.get(V))==null?void 0:Y.value)&&(a.current.set(V,{value:Q,keywords:re}),r.current.filtered.items.set(V,L(Q,re)),b(2,()=>{T(),S.emit()}))},item:(V,Q)=>(o.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(),r.current.value||k(),S.emit()}),()=>{a.current.delete(V),o.current.delete(V),r.current.filtered.items.delete(V);let re=D();b(4,()=>{E(),re?.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:C,labelId:y,listInnerRef:w}),[]);function L(V,Q){var re,Y;let ce=(Y=(re=s.current)==null?void 0:re.filter)!=null?Y:NX;return V?ce(V,r.current.search,Q):0}function T(){if(!r.current.search||s.current.shouldFilter===!1)return;let V=r.current.filtered.items,Q=[];r.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 re=w.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(rI);ce?ce.appendChild(Y.parentElement===ce?Y:Y.closest(`${rI} > *`)):re.appendChild(Y.parentElement===re?Y:Y.closest(`${rI} > *`))}),Q.sort((Y,ce)=>ce[1]-Y[1]).forEach(Y=>{var ce;let U=(ce=w.current)==null?void 0:ce.querySelector(`${Sm}[${rd}="${encodeURIComponent(Y[0])}"]`);U?.parentElement.appendChild(U)})}function k(){let V=z().find(re=>re.getAttribute("aria-disabled")!=="true"),Q=V?.getAttribute(rd);S.setState("value",Q||void 0)}function E(){var V,Q,re,Y;if(!r.current.search||s.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let ce=0;for(let U of o.current){let ne=(Q=(V=a.current.get(U))==null?void 0:V.value)!=null?Q:"",he=(Y=(re=a.current.get(U))==null?void 0:re.keywords)!=null?Y:[],xe=L(ne,he);r.current.filtered.items.set(U,xe),xe>0&&ce++}for(let[U,ne]of n.current)for(let he of ne)if(r.current.filtered.items.get(he)>0){r.current.filtered.groups.add(U);break}r.current.filtered.count=ce}function _(){var V,Q,re;let Y=D();Y&&(((V=Y.parentElement)==null?void 0:V.firstChild)===Y&&((re=(Q=Y.closest(Sm))==null?void 0:Q.querySelector(DX))==null||re.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function D(){var V;return(V=w.current)==null?void 0:V.querySelector(`${pB}[aria-selected="true"]`)}function z(){var V;return Array.from(((V=w.current)==null?void 0:V.querySelectorAll(fB))||[])}function F(V){let Q=z()[V];Q&&S.setState("value",Q.getAttribute(rd))}function O(V){var Q;let re=D(),Y=z(),ce=Y.findIndex(ne=>ne===re),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(rd))}function B(V){let Q=D(),re=Q?.closest(Sm),Y;for(;re&&!Y;)re=V>0?GX(re,Sm):WX(re,Sm),Y=re?.querySelector(fB);Y?S.setState("value",Y.getAttribute(rd)):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(q.div,{ref:t,tabIndex:-1,...h,"cmdk-root":"",onKeyDown:V=>{var Q;(Q=h.onKeyDown)==null||Q.call(h,V);let re=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||re))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(oI);Y.dispatchEvent(ce)}}}}},ee.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:qX},l),ay(e,V=>ee.createElement(gB.Provider,{value:S},ee.createElement(mB.Provider,{value:I},V))))}),OX=ee.forwardRef((e,t)=>{var r,o;let n=Ne(),a=ee.useRef(null),i=ee.useContext(hB),s=bm(),l=xB(e),u=(o=(r=l.current)==null?void 0:r.forceMount)!=null?o:i?.forceMount;Jl(()=>{if(!u)return s.item(n,i?.id)},[u]);let c=yB(n,a,[e.value,e.children,a],e.keywords),d=nI(),f=bs(b=>b.value&&b.value===c.current),p=bs(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(oI,g),()=>b.removeEventListener(oI,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:C,...w}=e;return ee.createElement(q.div,{ref:fo(a,t),...w,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)}),FX=ee.forwardRef((e,t)=>{let{heading:r,children:o,forceMount:n,...a}=e,i=Ne(),s=ee.useRef(null),l=ee.useRef(null),u=Ne(),c=bm(),d=bs(p=>n||c.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);Jl(()=>c.group(i),[]),yB(i,s,[e.value,e.heading,l]);let f=ee.useMemo(()=>({id:i,forceMount:n}),[n]);return ee.createElement(q.div,{ref:fo(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&ee.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),ay(e,p=>ee.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},ee.createElement(hB.Provider,{value:f},p))))}),_X=ee.forwardRef((e,t)=>{let{alwaysRender:r,...o}=e,n=ee.useRef(null),a=bs(i=>!i.search);return!r&&!a?null:ee.createElement(q.div,{ref:fo(n,t),...o,"cmdk-separator":"",role:"separator"})}),VX=ee.forwardRef((e,t)=>{let{onValueChange:r,...o}=e,n=e.value!=null,a=nI(),i=bs(u=>u.search),s=bs(u=>u.selectedItemId),l=bm();return ee.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),ee.createElement(q.input,{ref:t,...o,"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),r?.(u.target.value)}})}),BX=ee.forwardRef((e,t)=>{let{children:r,label:o="Suggestions",...n}=e,a=ee.useRef(null),i=ee.useRef(null),s=bs(u=>u.selectedItemId),l=bm();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(q.div,{ref:fo(a,t),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":o,id:l.listId},ay(e,u=>ee.createElement("div",{ref:fo(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),HX=ee.forwardRef((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:n,contentClassName:a,container:i,...s}=e;return ee.createElement(oy,{open:r,onOpenChange:o},ee.createElement(ny,{container:i},ee.createElement(Cm,{"cmdk-overlay":"",className:n}),ee.createElement(wm,{"aria-label":e.label,"cmdk-dialog":"",className:a},ee.createElement(vB,{ref:t,...s}))))}),UX=ee.forwardRef((e,t)=>bs(r=>r.filtered.count===0)?ee.createElement(q.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),zX=ee.forwardRef((e,t)=>{let{progress:r,children:o,label:n="Loading...",...a}=e;return ee.createElement(q.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},ay(e,i=>ee.createElement("div",{"aria-hidden":!0},i)))}),Rs=Object.assign(vB,{List:BX,Item:OX,Input:VX,Group:FX,Separator:_X,Dialog:HX,Empty:UX,Loading:zX});function GX(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function WX(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function xB(e){let t=ee.useRef(e);return Jl(()=>{t.current=e}),t}var Jl=typeof window>"u"?ee.useEffect:ee.useLayoutEffect;function od(e){let t=ee.useRef();return t.current===void 0&&(t.current=e()),t}function bs(e){let t=nI(),r=()=>e(t.snapshot());return ee.useSyncExternalStore(t.subscribe,r,r)}function yB(e,t,r,o=[]){let n=ee.useRef(),a=bm();return Jl(()=>{var i;let s=(()=>{var u;for(let c of r){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=o.map(u=>u.trim());a.value(e,s,l),(i=t.current)==null||i.setAttribute(rd,s),n.current=s}),n}var jX=()=>{let[e,t]=ee.useState(),r=od(()=>new Map);return Jl(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,n)=>{r.current.set(o,n),t({})}};function $X(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ay({asChild:e,children:t},r){return e&&ee.isValidElement(t)?ee.cloneElement($X(t),{ref:t.ref},r(t.props.children)):r(t)}var qX={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var nd=R(M());var bt=R(N()),iy=oy,CB=cB,KX=ny,wB=tI,XX=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"}}),SB=nd.forwardRef(({className:e,variant:t,animation:r,...o},n)=>(0,bt.jsx)(Cm,{ref:n,className:P("moonui-theme",XX({variant:t,animation:r}),e),...o}));SB.displayName=Cm.displayName;var YX=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"}}),Rm=nd.forwardRef(({className:e,children:t,variant:r,size:o,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,bt.jsxs)(KX,{children:[(0,bt.jsx)(SB,{variant:s,animation:l,onClick:u?void 0:v}),(0,bt.jsxs)(wm,{ref:h,onEscapeKeyDown:u?void 0:v,onInteractOutside:u?void 0:v,className:P(YX({variant:r,size:o,radius:n,animation:a,position:i}),"outline-none",p&&"pointer-events-none",g&&"border-success/40",e),...x,children:[(c||d||f)&&(0,bt.jsxs)(sy,{className:"flex gap-4",children:[(f||p||g)&&(0,bt.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,bt.jsx)(Ht,{className:"h-5 w-5 animate-spin text-primary"}),g&&(0,bt.jsx)(Cr,{className:"h-5 w-5 text-success"}),!p&&!g&&f&&(0,bt.jsx)("span",{className:"text-primary",children:f})]}),(0,bt.jsxs)("div",{className:"flex-1",children:[c&&(0,bt.jsx)(ad,{children:c}),d&&(0,bt.jsx)(ly,{children:d})]})]}),t,!u&&(0,bt.jsxs)(tI,{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,bt.jsx)(yo,{className:"h-4 w-4"}),(0,bt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});Rm.displayName=wm.displayName;var sy=({className:e,...t})=>(0,bt.jsx)("div",{className:P("flex flex-col space-y-2 text-center sm:text-left",e),...t});sy.displayName="DialogHeader";var aI=({className:e,...t})=>(0,bt.jsx)("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});aI.displayName="DialogFooter";var ad=nd.forwardRef(({className:e,...t},r)=>(0,bt.jsx)(JR,{ref:r,className:P("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));ad.displayName=JR.displayName;var ly=nd.forwardRef(({className:e,...t},r)=>(0,bt.jsx)(eI,{ref:r,className:P("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));ly.displayName=eI.displayName;var iI=nd.forwardRef(({className:e,...t},r)=>(0,bt.jsx)("form",{ref:r,className:P("moonui-theme","flex flex-col gap-4",e),...t}));iI.displayName="DialogForm";var Lr=R(N()),QX=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"}}),uy=Is.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Lr.jsx)(Rs,{ref:n,className:P("moonui-theme",QX({variant:t,size:r}),e),...o}));uy.displayName="Command";var bB=({children:e,commandClassName:t,...r})=>(0,Lr.jsx)(iy,{...r,children:(0,Lr.jsxs)(Rm,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,Lr.jsx)(ad,{className:"sr-only",children:"Command Menu"}),(0,Lr.jsx)(uy,{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})]})}),sI=Is.forwardRef(({className:e,...t},r)=>(0,Lr.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Lr.jsx)(cl,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,Lr.jsx)(Rs.Input,{ref:r,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})]}));sI.displayName="CommandInput";var lI=Is.forwardRef(({className:e,...t},r)=>(0,Lr.jsx)(Rs.List,{ref:r,className:P("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));lI.displayName="CommandList";var uI=Is.forwardRef(({className:e,...t},r)=>(0,Lr.jsx)(Rs.Empty,{ref:r,className:P("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));uI.displayName="CommandEmpty";var cI=Is.forwardRef(({className:e,...t},r)=>(0,Lr.jsx)(Rs.Group,{ref:r,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}));cI.displayName="CommandGroup";var dI=Is.forwardRef(({className:e,...t},r)=>(0,Lr.jsx)(Rs.Separator,{ref:r,"aria-hidden":"true",className:P("moonui-theme","-mx-1 h-px bg-border",e),...t}));dI.displayName="CommandSeparator";var fI=Is.forwardRef(({className:e,...t},r)=>(0,Lr.jsx)(Rs.Item,{ref:r,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}));fI.displayName="CommandItem";var pI=({className:e,...t})=>(0,Lr.jsx)("span",{className:P("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});pI.displayName="CommandShortcut";var DI=R(M());var Lm=R(M(),1);function Ps(e,t){return typeof e=="function"?e(t):e}function Io(e,t){return r=>{t.setState(o=>({...o,[e]:Ps(r,o[e])}))}}function py(e){return e instanceof Function}function ZX(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function JX(e,t){let r=[],o=n=>{n.forEach(a=>{r.push(a);let i=t(a);i!=null&&i.length&&o(i)})};return o(e),r}function me(e,t,r){let o=[],n;return a=>{let i;r.key&&r.debug&&(i=Date.now());let s=e(a);if(!(s.length!==o.length||s.some((c,d)=>o[d]!==c)))return n;o=s;let u;if(r.key&&r.debug&&(u=Date.now()),n=t(...s),r==null||r.onChange==null||r.onChange(n),r.key&&r.debug&&r!=null&&r.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%);`,r?.key)}return n}}function ge(e,t,r,o){return{debug:()=>{var n;return(n=e?.debugAll)!=null?n:e[t]},key:!1,onChange:o}}function YX(e,t,r,o){let n=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(o),renderValue:n,getContext:me(()=>[e,r,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,r,t,e)},{}),a}function QX(e,t,r,o){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:o,depth:r,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 Lr="debugHeaders";function xB(e,t,r){var o;let a={id:(o=r.id)!=null?o:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.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 ZX={createTable:e=>{e.getHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o,n)=>{var a,i;let s=(a=o?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?a:[],l=(i=n?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?i:[],u=r.filter(d=>!(o!=null&&o.includes(d.id))&&!(n!=null&&n.includes(d.id)));return uy(t,[...s,...u,...l],e)},ge(e.options,Lr,"getHeaderGroups")),e.getCenterHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o,n)=>(r=r.filter(a=>!(o!=null&&o.includes(a.id))&&!(n!=null&&n.includes(a.id))),uy(t,r,e,"center")),ge(e.options,Lr,"getCenterHeaderGroups")),e.getLeftHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,o)=>{var n;let a=(n=o?.map(i=>r.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return uy(t,a,e,"left")},ge(e.options,Lr,"getLeftHeaderGroups")),e.getRightHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,o)=>{var n;let a=(n=o?.map(i=>r.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return uy(t,a,e,"right")},ge(e.options,Lr,"getRightHeaderGroups")),e.getFooterGroups=me(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ge(e.options,Lr,"getFooterGroups")),e.getLeftFooterGroups=me(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ge(e.options,Lr,"getLeftFooterGroups")),e.getCenterFooterGroups=me(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ge(e.options,Lr,"getCenterFooterGroups")),e.getRightFooterGroups=me(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ge(e.options,Lr,"getRightFooterGroups")),e.getFlatHeaders=me(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Lr,"getFlatHeaders")),e.getLeftFlatHeaders=me(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Lr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=me(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Lr,"getCenterFlatHeaders")),e.getRightFlatHeaders=me(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Lr,"getRightFlatHeaders")),e.getCenterLeafHeaders=me(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Lr,"getCenterLeafHeaders")),e.getLeftLeafHeaders=me(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Lr,"getLeftLeafHeaders")),e.getRightLeafHeaders=me(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Lr,"getRightLeafHeaders")),e.getLeafHeaders=me(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,o)=>{var n,a,i,s,l,u;return[...(n=(a=t[0])==null?void 0:a.headers)!=null?n:[],...(i=(s=r[0])==null?void 0:s.headers)!=null?i:[],...(l=(u=o[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},ge(e.options,Lr,"getLeafHeaders"))}};function uy(e,t,r,o){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:[o,`${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=xB(r,y,{id:[o,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)=>xB(r,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 RI=(e,t,r,o,n,a,i)=>{let s={id:t,index:o,original:r,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,o),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,o),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:()=>XX(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=>YX(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},JX={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()}}},wB=(e,t,r)=>{var o,n;let a=r==null||(o=r.toString())==null?void 0:o.toLowerCase();return!!(!((n=e.getValue(t))==null||(n=n.toString())==null||(n=n.toLowerCase())==null)&&n.includes(a))};wB.autoRemove=e=>Hn(e);var CB=(e,t,r)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(r))};CB.autoRemove=e=>Hn(e);var SB=(e,t,r)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===r?.toLowerCase()};SB.autoRemove=e=>Hn(e);var bB=(e,t,r)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)};bB.autoRemove=e=>Hn(e);var RB=(e,t,r)=>!r.some(o=>{var n;return!((n=e.getValue(t))!=null&&n.includes(o))});RB.autoRemove=e=>Hn(e)||!(e!=null&&e.length);var IB=(e,t,r)=>r.some(o=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(o)});IB.autoRemove=e=>Hn(e)||!(e!=null&&e.length);var PB=(e,t,r)=>e.getValue(t)===r;PB.autoRemove=e=>Hn(e);var LB=(e,t,r)=>e.getValue(t)==r;LB.autoRemove=e=>Hn(e);var II=(e,t,r)=>{let[o,n]=r,a=e.getValue(t);return a>=o&&a<=n};II.resolveFilterValue=e=>{let[t,r]=e,o=typeof t!="number"?parseFloat(t):t,n=typeof r!="number"?parseFloat(r):r,a=t===null||Number.isNaN(o)?-1/0:o,i=r===null||Number.isNaN(n)?1/0:n;if(a>i){let s=a;a=i,i=s}return[a,i]};II.autoRemove=e=>Hn(e)||Hn(e[0])&&Hn(e[1]);var di={includesString:wB,includesStringSensitive:CB,equalsString:SB,arrIncludes:bB,arrIncludesAll:RB,arrIncludesSome:IB,equals:PB,weakEquals:LB,inNumberRange:II};function Hn(e){return e==null||e===""}var eY={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Io("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let r=t.getCoreRowModel().flatRows[0],o=r?.getValue(e.id);return typeof o=="string"?di.includesString:typeof o=="number"?di.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?di.equals:Array.isArray(o)?di.arrIncludes:di.weakEquals},e.getFilterFn=()=>{var r,o;return fy(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(r=(o=t.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?r:di[e.columnDef.filterFn]},e.getCanFilter=()=>{var r,o,n;return((r=e.columnDef.enableColumnFilter)!=null?r:!0)&&((o=t.options.enableColumnFilters)!=null?o:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var r;return(r=t.getState().columnFilters)==null||(r=r.find(o=>o.id===e.id))==null?void 0:r.value},e.getFilterIndex=()=>{var r,o;return(r=(o=t.getState().columnFilters)==null?void 0:o.findIndex(n=>n.id===e.id))!=null?r:-1},e.setFilterValue=r=>{t.setColumnFilters(o=>{let n=e.getFilterFn(),a=o?.find(c=>c.id===e.id),i=Is(r,a?a.value:void 0);if(yB(n,i,e)){var s;return(s=o?.filter(c=>c.id!==e.id))!=null?s:[]}let l={id:e.id,value:i};if(a){var u;return(u=o?.map(c=>c.id===e.id?l:c))!=null?u:[]}return o!=null&&o.length?[...o,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let r=e.getAllLeafColumns(),o=n=>{var a;return(a=Is(t,n))==null?void 0:a.filter(i=>{let s=r.find(l=>l.id===i.id);if(s){let l=s.getFilterFn();if(yB(l,i.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.resetColumnFilters=t=>{var r,o;e.setColumnFilters(t?[]:(r=(o=e.initialState)==null?void 0:o.columnFilters)!=null?r:[])},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 yB(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}var tY=(e,t,r)=>r.reduce((o,n)=>{let a=n.getValue(e);return o+(typeof a=="number"?a:0)},0),rY=(e,t,r)=>{let o;return r.forEach(n=>{let a=n.getValue(e);a!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}),o},oY=(e,t,r)=>{let o;return r.forEach(n=>{let a=n.getValue(e);a!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}),o},nY=(e,t,r)=>{let o,n;return r.forEach(a=>{let i=a.getValue(e);i!=null&&(o===void 0?i>=i&&(o=n=i):(o>i&&(o=i),n<i&&(n=i)))}),[o,n]},aY=(e,t)=>{let r=0,o=0;if(t.forEach(n=>{let a=n.getValue(e);a!=null&&(a=+a)>=a&&(++r,o+=a)}),r)return o/r},iY=(e,t)=>{if(!t.length)return;let r=t.map(a=>a.getValue(e));if(!KX(r))return;if(r.length===1)return r[0];let o=Math.floor(r.length/2),n=r.sort((a,i)=>a-i);return r.length%2!==0?n[o]:(n[o-1]+n[o])/2},sY=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),lY=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,uY=(e,t)=>t.length,fI={sum:tY,min:rY,max:oY,extent:nY,mean:aY,median:iY,unique:sY,uniqueCount:lY,count:uY},cY={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,r;return(t=(r=e.getValue())==null||r.toString==null?void 0:r.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Io("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(r=>r!=null&&r.includes(e.id)?r.filter(o=>o!==e.id):[...r??[],e.id])},e.getCanGroup=()=>{var r,o;return((r=e.columnDef.enableGrouping)!=null?r:!0)&&((o=t.options.enableGrouping)!=null?o:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.includes(e.id)},e.getGroupedIndex=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let r=e.getCanGroup();return()=>{r&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let r=t.getCoreRowModel().flatRows[0],o=r?.getValue(e.id);if(typeof o=="number")return fI.sum;if(Object.prototype.toString.call(o)==="[object Date]")return fI.extent},e.getAggregationFn=()=>{var r,o;if(!e)throw new Error;return fy(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(r=(o=t.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?r:fI[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var r,o;e.setGrouping(t?[]:(r=(o=e.initialState)==null?void 0:o.grouping)!=null?r:[])},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=r=>{if(e._groupingValuesCache.hasOwnProperty(r))return e._groupingValuesCache[r];let o=t.getColumn(r);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[r]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[r]):e.getValue(r)},e._groupingValuesCache={}},createCell:(e,t,r,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===r.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var n;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((n=r.subRows)!=null&&n.length)}}};function dY(e,t,r){if(!(t!=null&&t.length)||!r)return e;let o=e.filter(a=>!t.includes(a.id));return r==="remove"?o:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...o]}var fY={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Io("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=me(r=>[Im(t,r)],r=>r.findIndex(o=>o.id===e.id),ge(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=r=>{var o;return((o=Im(t,r)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=r=>{var o;let n=Im(t,r);return((o=n[n.length-1])==null?void 0:o.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var r;e.setColumnOrder(t?[]:(r=e.initialState.columnOrder)!=null?r:[])},e._getOrderColumnsFn=me(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,r,o)=>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 dY(a,r,o)},ge(e.options,"debugTable","_getOrderColumnsFn"))}},pI=()=>({left:[],right:[]}),pY={getInitialState:e=>({columnPinning:pI(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Io("columnPinning",e)}),createColumn:(e,t)=>{e.pin=r=>{let o=e.getLeafColumns().map(n=>n.id).filter(Boolean);t.setColumnPinning(n=>{var a,i;if(r==="right"){var s,l;return{left:((s=n?.left)!=null?s:[]).filter(d=>!(o!=null&&o.includes(d))),right:[...((l=n?.right)!=null?l:[]).filter(d=>!(o!=null&&o.includes(d))),...o]}}if(r==="left"){var u,c;return{left:[...((u=n?.left)!=null?u:[]).filter(d=>!(o!=null&&o.includes(d))),...o],right:((c=n?.right)!=null?c:[]).filter(d=>!(o!=null&&o.includes(d)))}}return{left:((a=n?.left)!=null?a:[]).filter(d=>!(o!=null&&o.includes(d))),right:((i=n?.right)!=null?i:[]).filter(d=>!(o!=null&&o.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var n,a,i;return((n=o.columnDef.enablePinning)!=null?n:!0)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{let r=e.getLeafColumns().map(s=>s.id),{left:o,right:n}=t.getState().columnPinning,a=r.some(s=>o?.includes(s)),i=r.some(s=>n?.includes(s));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var r,o;let n=e.getIsPinned();return n?(r=(o=t.getState().columnPinning)==null||(o=o[n])==null?void 0:o.indexOf(e.id))!=null?r:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(r,o,n)=>{let a=[...o??[],...n??[]];return r.filter(i=>!a.includes(i.column.id))},ge(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(r,o)=>(o??[]).map(a=>r.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],(r,o)=>(o??[]).map(a=>r.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 r,o;return e.setColumnPinning(t?pI():(r=(o=e.initialState)==null?void 0:o.columnPinning)!=null?r:pI())},e.getIsSomeColumnsPinned=t=>{var r;let o=e.getState().columnPinning;if(!t){var n,a;return!!((n=o.left)!=null&&n.length||(a=o.right)!=null&&a.length)}return!!((r=o[t])!=null&&r.length)},e.getLeftLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),ge(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),ge(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o)=>{let n=[...r??[],...o??[]];return t.filter(a=>!n.includes(a.id))},ge(e.options,"debugColumns","getCenterLeafColumns"))}};function mY(e){return e||(typeof document<"u"?document:null)}var cy={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},mI=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),gY={getDefaultColumnDef:()=>cy,getInitialState:e=>({columnSizing:{},columnSizingInfo:mI(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Io("columnSizing",e),onColumnSizingInfoChange:Io("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var r,o,n;let a=t.getState().columnSizing[e.id];return Math.min(Math.max((r=e.columnDef.minSize)!=null?r:cy.minSize,(o=a??e.columnDef.size)!=null?o:cy.size),(n=e.columnDef.maxSize)!=null?n:cy.maxSize)},e.getStart=me(r=>[r,Im(t,r),t.getState().columnSizing],(r,o)=>o.slice(0,e.getIndex(r)).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getStart")),e.getAfter=me(r=>[r,Im(t,r),t.getState().columnSizing],(r,o)=>o.slice(e.getIndex(r)+1).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(r=>{let{[e.id]:o,...n}=r;return n})},e.getCanResize=()=>{var r,o;return((r=e.columnDef.enableResizing)!=null?r:!0)&&((o=t.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let r=0,o=n=>{if(n.subHeaders.length)n.subHeaders.forEach(o);else{var a;r+=(a=n.column.getSize())!=null?a:0}};return o(e),r},e.getStart=()=>{if(e.index>0){let r=e.headerGroup.headers[e.index-1];return r.getStart()+r.getSize()}return 0},e.getResizeHandler=r=>{let o=t.getColumn(e.column.id),n=o?.getCanResize();return a=>{if(!o||!n||(a.persist==null||a.persist(),gI(a)&&a.touches&&a.touches.length>1))return;let i=e.getSize(),s=e?e.getLeafHeaders().map(h=>[h.column.id,h.column.getSize()]):[[o.id,o.getSize()]],l=gI(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=mY(r),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=hY()?{passive:!1}:!1;gI(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:o.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 r;e.setColumnSizing(t?{}:(r=e.initialState.columnSizing)!=null?r:{})},e.resetHeaderSizeInfo=t=>{var r;e.setColumnSizingInfo(t?mI():(r=e.initialState.columnSizingInfo)!=null?r:mI())},e.getTotalSize=()=>{var t,r;return(t=(r=e.getHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,r;return(t=(r=e.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,r;return(t=(r=e.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,r;return(t=(r=e.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0}}},dy=null;function hY(){if(typeof dy=="boolean")return dy;let e=!1;try{let t={get passive(){return e=!0,!1}},r=()=>{};window.addEventListener("test",r,t),window.removeEventListener("test",r)}catch{e=!1}return dy=e,dy}function gI(e){return e.type==="touchstart"}var vY={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Io("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=r=>{e.getCanHide()&&t.setColumnVisibility(o=>({...o,[e.id]:r??!e.getIsVisible()}))},e.getIsVisible=()=>{var r,o;let n=e.columns;return(r=n.length?n.some(a=>a.getIsVisible()):(o=t.getState().columnVisibility)==null?void 0:o[e.id])!=null?r:!0},e.getCanHide=()=>{var r,o;return((r=e.columnDef.enableHiding)!=null?r:!0)&&((o=t.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>r=>{e.toggleVisibility==null||e.toggleVisibility(r.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=me(()=>[e.getAllCells(),t.getState().columnVisibility],r=>r.filter(o=>o.column.getIsVisible()),ge(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=me(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,o,n)=>[...r,...o,...n],ge(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(r,o)=>me(()=>[o(),o().filter(n=>n.getIsVisible()).map(n=>n.id).join("_")],n=>n.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),ge(e.options,"debugColumns",r));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=r=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(r),e.resetColumnVisibility=r=>{var o;e.setColumnVisibility(r?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=r=>{var o;r=(o=r)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((n,a)=>({...n,[a.id]:r||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>r=>{var o;e.toggleAllColumnsVisible((o=r.target)==null?void 0:o.checked)}}};function Im(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var xY={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()}}},yY={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Io("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var r;let o=(r=e.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[t.id])==null?void 0:r.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var r,o,n,a;return((r=e.columnDef.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!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=()=>di.includesString,e.getGlobalFilterFn=()=>{var t,r;let{globalFilterFn:o}=e.options;return fy(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[o])!=null?t:di[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},wY={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Io("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,r=!1;e._autoResetExpanded=()=>{var o,n;if(!t){e._queue(()=>{t=!0});return}if((o=(n=e.options.autoResetAll)!=null?n:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(r)return;r=!0,e._queue(()=>{e.resetExpanded(),r=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var n,a;e.setExpanded(o?{}:(n=(a=e.initialState)==null?void 0:a.expanded)!=null?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{let o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(n=>!n.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{let i=a.split(".");o=Math.max(o,i.length)}),o},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=r=>{t.setExpanded(o=>{var n;let a=o===!0?!0:!!(o!=null&&o[e.id]),i={};if(o===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=o,r=(n=r)!=null?n:!a,!a&&r)return{...i,[e.id]:!0};if(a&&!r){let{[e.id]:s,...l}=i;return l}return o})},e.getIsExpanded=()=>{var r;let o=t.getState().expanded;return!!((r=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?r:o===!0||o?.[e.id])},e.getCanExpand=()=>{var r,o,n;return(r=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?r:((o=t.options.enableExpanding)!=null?o:!0)&&!!((n=e.subRows)!=null&&n.length)},e.getIsAllParentsExpanded=()=>{let r=!0,o=e;for(;r&&o.parentId;)o=t.getRow(o.parentId,!0),r=o.getIsExpanded();return r},e.getToggleExpandedHandler=()=>{let r=e.getCanExpand();return()=>{r&&e.toggleExpanded()}}}},yI=0,wI=10,hI=()=>({pageIndex:yI,pageSize:wI}),CY={getInitialState:e=>({...e,pagination:{...hI(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Io("pagination",e)}),createTable:e=>{let t=!1,r=!1;e._autoResetPageIndex=()=>{var o,n;if(!t){e._queue(()=>{t=!0});return}if((o=(n=e.options.autoResetAll)!=null?n:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(r)return;r=!0,e._queue(()=>{e.resetPageIndex(),r=!1})}},e.setPagination=o=>{let n=a=>Is(o,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=o=>{var n;e.setPagination(o?hI():(n=e.initialState.pagination)!=null?n:hI())},e.setPageIndex=o=>{e.setPagination(n=>{let a=Is(o,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=o=>{var n,a;e.setPageIndex(o?yI:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?n:yI)},e.resetPageSize=o=>{var n,a;e.setPageSize(o?wI:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?n:wI)},e.setPageSize=o=>{e.setPagination(n=>{let a=Math.max(1,Is(o,n.pageSize)),i=n.pageSize*n.pageIndex,s=Math.floor(i/a);return{...n,pageIndex:s,pageSize:a}})},e.setPageCount=o=>e.setPagination(n=>{var a;let i=Is(o,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=me(()=>[e.getPageCount()],o=>{let n=[];return o&&o>0&&(n=[...new Array(o)].fill(null).map((a,i)=>i)),n},ge(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:o}=e.getState().pagination,n=e.getPageCount();return n===-1?!0:n===0?!1:o<n-1},e.previousPage=()=>e.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+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 o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var o;return(o=e.options.rowCount)!=null?o:e.getPrePaginationRowModel().rows.length}}},vI=()=>({top:[],bottom:[]}),SY={getInitialState:e=>({rowPinning:vI(),...e}),getDefaultOptions:e=>({onRowPinningChange:Io("rowPinning",e)}),createRow:(e,t)=>{e.pin=(r,o,n)=>{let a=o?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(r==="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(r==="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 r;let{enableRowPinning:o,enablePinning:n}=t.options;return typeof o=="function"?o(e):(r=o??n)!=null?r:!0},e.getIsPinned=()=>{let r=[e.id],{top:o,bottom:n}=t.getState().rowPinning,a=r.some(s=>o?.includes(s)),i=r.some(s=>n?.includes(s));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var r,o;let n=e.getIsPinned();if(!n)return-1;let a=(r=n==="top"?t.getTopRows():t.getBottomRows())==null?void 0:r.map(i=>{let{id:s}=i;return s});return(o=a?.indexOf(e.id))!=null?o:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var r,o;return e.setRowPinning(t?vI():(r=(o=e.initialState)==null?void 0:o.rowPinning)!=null?r:vI())},e.getIsSomeRowsPinned=t=>{var r;let o=e.getState().rowPinning;if(!t){var n,a;return!!((n=o.top)!=null&&n.length||(a=o.bottom)!=null&&a.length)}return!!((r=o[t])!=null&&r.length)},e._getPinnedRows=(t,r,o)=>{var n;return((n=e.options.keepPinnedRows)==null||n?(r??[]).map(i=>{let s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(r??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:o}))},e.getTopRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,r)=>e._getPinnedRows(t,r,"top"),ge(e.options,"debugRows","getTopRows")),e.getBottomRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,r)=>e._getPinnedRows(t,r,"bottom"),ge(e.options,"debugRows","getBottomRows")),e.getCenterRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,r,o)=>{let n=new Set([...r??[],...o??[]]);return t.filter(a=>!n.has(a.id))},ge(e.options,"debugRows","getCenterRows"))}},bY={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Io("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 r;return e.setRowSelection(t?{}:(r=e.initialState.rowSelection)!=null?r:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(r=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();let o={...r},n=e.getPreGroupedRowModel().flatRows;return t?n.forEach(a=>{a.getCanSelect()&&(o[a.id]=!0)}):n.forEach(a=>{delete o[a.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(r=>{let o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),n={...r};return e.getRowModel().rows.forEach(a=>{CI(n,a.id,o,!0,e)}),n}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=me(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,r)=>Object.keys(t).length?xI(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=me(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?xI(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=me(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?xI(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:r}=e.getState(),o=!!(t.length&&Object.keys(r).length);return o&&t.some(n=>n.getCanSelect()&&!r[n.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(n=>n.getCanSelect()),{rowSelection:r}=e.getState(),o=!!t.length;return o&&t.some(n=>!r[n.id])&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var t;let r=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return r>0&&r<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(r,o)=>{let n=e.getIsSelected();t.setRowSelection(a=>{var i;if(r=typeof r<"u"?r:!n,e.getCanSelect()&&n===r)return a;let s={...a};return CI(s,e.id,r,(i=o?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:r}=t.getState();return PI(e,r)},e.getIsSomeSelected=()=>{let{rowSelection:r}=t.getState();return SI(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:r}=t.getState();return SI(e,r)==="all"},e.getCanSelect=()=>{var r;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(r=t.options.enableRowSelection)!=null?r:!0},e.getCanSelectSubRows=()=>{var r;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(r=t.options.enableSubRowSelection)!=null?r:!0},e.getCanMultiSelect=()=>{var r;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(r=t.options.enableMultiRowSelection)!=null?r:!0},e.getToggleSelectedHandler=()=>{let r=e.getCanSelect();return o=>{var n;r&&e.toggleSelected((n=o.target)==null?void 0:n.checked)}}}},CI=(e,t,r,o,n)=>{var a;let i=n.getRow(t,!0);r?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[t]=!0)):delete e[t],o&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>CI(e,s.id,r,o,n))};function xI(e,t){let r=e.getState().rowSelection,o=[],n={},a=function(i,s){return i.map(l=>{var u;let c=PI(l,r);if(c&&(o.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:o,rowsById:n}}function PI(e,t){var r;return(r=t[e.id])!=null?r:!1}function SI(e,t,r){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let n=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!n)&&(i.getCanSelect()&&(PI(i,t)?a=!0:n=!1),i.subRows&&i.subRows.length)){let s=SI(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),n=!1)}}),n?"all":a?"some":!1}var bI=/([0-9]+)/gm,RY=(e,t,r)=>TB(Ps(e.getValue(r)).toLowerCase(),Ps(t.getValue(r)).toLowerCase()),IY=(e,t,r)=>TB(Ps(e.getValue(r)),Ps(t.getValue(r))),PY=(e,t,r)=>LI(Ps(e.getValue(r)).toLowerCase(),Ps(t.getValue(r)).toLowerCase()),LY=(e,t,r)=>LI(Ps(e.getValue(r)),Ps(t.getValue(r))),TY=(e,t,r)=>{let o=e.getValue(r),n=t.getValue(r);return o>n?1:o<n?-1:0},kY=(e,t,r)=>LI(e.getValue(r),t.getValue(r));function LI(e,t){return e===t?0:e>t?1:-1}function Ps(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function TB(e,t){let r=e.split(bI).filter(Boolean),o=t.split(bI).filter(Boolean);for(;r.length&&o.length;){let n=r.shift(),a=o.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 r.length-o.length}var Rm={alphanumeric:RY,alphanumericCaseSensitive:IY,text:PY,textCaseSensitive:LY,datetime:TY,basic:kY},MY={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Io("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let r=t.getFilteredRowModel().flatRows.slice(10),o=!1;for(let n of r){let a=n?.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return Rm.datetime;if(typeof a=="string"&&(o=!0,a.split(bI).length>1))return Rm.alphanumeric}return o?Rm.text:Rm.basic},e.getAutoSortDir=()=>{let r=t.getFilteredRowModel().flatRows[0];return typeof r?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var r,o;if(!e)throw new Error;return fy(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(r=(o=t.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?r:Rm[e.columnDef.sortingFn]},e.toggleSorting=(r,o)=>{let n=e.getNextSortingOrder(),a=typeof r<"u"&&r!==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?r:n==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&o?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 r,o;return((r=(o=e.columnDef.sortDescFirst)!=null?o:t.options.sortDescFirst)!=null?r:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=r=>{var o,n;let a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((o=t.options.enableSortingRemoval)==null||o)&&(!(r&&(n=t.options.enableMultiRemove)!=null)||n)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var r,o;return((r=e.columnDef.enableSorting)!=null?r:!0)&&((o=t.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var r,o;return(r=(o=e.columnDef.enableMultiSort)!=null?o:t.options.enableMultiSort)!=null?r:!!e.accessorFn},e.getIsSorted=()=>{var r;let o=(r=t.getState().sorting)==null?void 0:r.find(n=>n.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var r,o;return(r=(o=t.getState().sorting)==null?void 0:o.findIndex(n=>n.id===e.id))!=null?r:-1},e.clearSorting=()=>{t.setSorting(r=>r!=null&&r.length?r.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{let r=e.getCanSort();return o=>{r&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var r,o;e.setSorting(t?[]:(r=(o=e.initialState)==null?void 0:o.sorting)!=null?r:[])},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())}},EY=[ZX,vY,fY,pY,JX,eY,xY,yY,MY,cY,wY,CY,SY,bY,gY];function kB(e){var t,r;let o=[...EY,...(t=e._features)!=null?t:[]],n={_features:o},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={...{},...(r=e.initialState)!=null?r:{}};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:o,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=Is(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=QX(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 MB(){return e=>me(()=>[e.options.data],t=>{let r={rows:[],flatRows:[],rowsById:{}},o=function(n,a,i){a===void 0&&(a=0);let s=[];for(let u=0;u<n.length;u++){let c=RI(e,e._getRowId(n[u],u,i),n[u],u,a,void 0,i?.id);if(r.flatRows.push(c),r.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=o(c.originalSubRows,a+1,c))}}return s};return r.rows=o(t),r},ge(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function AY(e){let t=[],r=o=>{var n;t.push(o),(n=o.subRows)!=null&&n.length&&o.getIsExpanded()&&o.subRows.forEach(r)};return e.rows.forEach(r),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function DY(e,t,r){return r.options.filterFromLeafRows?NY(e,t,r):OY(e,t,r)}function NY(e,t,r){var o;let n=[],a={},i=(o=r.options.maxLeafRowFilterDepth)!=null?o: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=RI(r,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 OY(e,t,r){var o;let n=[],a={},i=(o=r.options.maxLeafRowFilterDepth)!=null?o: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=RI(r,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 EB(){return e=>me(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,r,o)=>{if(!t.rows.length||!(r!=null&&r.length)&&!o){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}let n=[],a=[];(r??[]).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=(r??[]).map(f=>f.id),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());o&&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(o))!=null?p:o})}));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 DY(t.rows,d,e)},ge(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function AB(e){return t=>me(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(r,o)=>{if(!o.rows.length)return o;let{pageSize:n,pageIndex:a}=r,{rows:i,flatRows:s,rowsById:l}=o,u=n*a,c=u+n;i=i.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:i,flatRows:s,rowsById:l}:d=AY({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 DB(){return e=>me(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,r)=>{if(!r.rows.length||!(t!=null&&t.length))return r;let o=e.getState().sorting,n=[],a=o.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(r.rows),flatRows:n,rowsById:r.rowsById}},ge(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function TI(e,t){return e?FY(e)?Pm.createElement(e,t):e:null}function FY(e){return _Y(e)||typeof e=="function"||VY(e)}function _Y(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function VY(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function NB(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=Pm.useState(()=>({current:kB(t)})),[o,n]=Pm.useState(()=>r.current.initialState);return r.current.setOptions(a=>({...a,...e,state:{...o,...e.state},onStateChange:i=>{n(i),e.onStateChange==null||e.onStateChange(i)}})),r.current}var ft=R(M());var st=R(N()),OB=ft.createContext(null);function BY(e){return e==="asc"?"desc":e==="desc"?null:"asc"}var HY=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"}}),Lm=ft.forwardRef(({className:e,variant:t,size:r,loading:o,emptyContent:n,sortColumn:a,sortDirection:i,onSortChange:s,selectedRowIds:l,onRowSelectionChange:u,disableRowSelection:c,getRowId:d,...f},p)=>{let g=t==="striped",m=ft.useMemo(()=>({sortColumn:a,sortDirection:i,onSortChange:s}),[a,i,s]),x=ft.Children.map(f.children,h=>{if(ft.isValidElement(h)&&h.type==="tbody"){let v=h.props;return ft.cloneElement(h,{className:P(v.className,g&&"even:[&>tr]:bg-muted/50")})}return h});return(0,st.jsxs)("div",{className:"relative w-full overflow-auto",children:[o&&(0,st.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,st.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,st.jsx)(OB.Provider,{value:m,children:(0,st.jsx)("table",{ref:p,className:P(HY({variant:t,size:r}),o&&"opacity-70",e),...f,children:x})})]})});Lm.displayName="Table";var Tm=ft.forwardRef(({className:e,...t},r)=>(0,st.jsx)("thead",{ref:r,className:P("moonui-theme","[&_tr]:border-b",e),...t}));Tm.displayName="TableHeader";var km=ft.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:o,...n},a)=>{let i=ft.Children.count(o)>0;return(0,st.jsx)("tbody",{ref:a,className:P("moonui-theme","[&_tr:last-child]:border-0",e),...n,children:i?o:(0,st.jsx)("tr",{children:(0,st.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,st.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,st.jsx)("div",{className:"text-sm",children:r})})})})})});km.displayName="TableBody";var kI=ft.forwardRef(({className:e,...t},r)=>(0,st.jsx)("tfoot",{ref:r,className:P("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));kI.displayName="TableFooter";var Zl=ft.forwardRef(({className:e,...t},r)=>(0,st.jsx)("tr",{ref:r,className:P("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Zl.displayName="TableRow";var Mm=ft.forwardRef(({className:e,sortable:t,sorted:r,onSort:o,columnId:n,align:a="left",children:i,...s},l)=>{let u=ft.useContext(OB),c=n&&u&&u.sortColumn===n?u.sortDirection??null:null,d=r!==void 0?r:c,f=ft.useCallback(()=>{if(o){o();return}n&&u?.onSortChange&&u.onSortChange(n,BY(c))},[o,n,u,c]),p=!!(t&&(o||n&&u?.onSortChange)),g=()=>t?r==="asc"?(0,st.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,st.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"})}):r==="desc"?(0,st.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,st.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,st.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,st.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,m={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};return(0,st.jsx)("th",{ref:l,className:P("h-10 px-4 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",m[a].split(" ")[0],t&&"cursor-pointer hover:text-foreground select-none",e),"aria-sort":t?d==="asc"?"ascending":d==="desc"?"descending":"none":void 0,onClick:p?f:void 0,...s,children:t||a!=="left"?(0,st.jsxs)("div",{className:P("flex items-center",m[a].split(" ")[1]),role:p?"button":void 0,tabIndex:p?0:void 0,onKeyDown:p?x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),f())}:void 0,children:[i,t&&g()]}):i})});Mm.displayName="TableHead";var nd=ft.forwardRef(({className:e,align:t="left",...r},o)=>{let n={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,st.jsx)("td",{ref:o,className:P("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",n,e),...r})});nd.displayName="TableCell";var MI=ft.forwardRef(({className:e,...t},r)=>(0,st.jsx)("caption",{ref:r,className:P("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));MI.displayName="TableCaption";var Ae=R(N());function FB({columns:e,data:t,enableSorting:r=!0,enablePagination:o=!0,enableSearch:n=!0,pageSize:a=10,searchPlaceholder:i="Search...",emptyMessage:s="No results found.",className:l}){let[u,c]=EI.useState([]),[d,f]=EI.useState(""),p=NB({data:t,columns:e,onSortingChange:r?c:void 0,onGlobalFilterChange:n?f:void 0,getCoreRowModel:MB(),getPaginationRowModel:o?AB():void 0,getSortedRowModel:r?DB():void 0,getFilteredRowModel:n?EB():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:a}}});return(0,Ae.jsxs)("div",{className:P("space-y-4",l),children:[n&&(0,Ae.jsx)("div",{className:"flex items-center",children:(0,Ae.jsxs)("div",{className:"relative max-w-sm",children:[(0,Ae.jsx)(ll,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Ae.jsx)(cr,{placeholder:i,value:d,onChange:g=>f(g.target.value),className:"pl-8"})]})}),(0,Ae.jsx)("div",{className:"rounded-md border",children:(0,Ae.jsxs)(Lm,{children:[(0,Ae.jsx)(Tm,{children:p.getHeaderGroups().map(g=>(0,Ae.jsx)(Zl,{children:g.headers.map(m=>(0,Ae.jsx)(Mm,{children:m.isPlaceholder?null:(0,Ae.jsxs)("div",{className:P("flex items-center gap-2",m.column.getCanSort()&&"cursor-pointer select-none"),onClick:m.column.getToggleSortingHandler(),children:[TI(m.column.columnDef.header,m.getContext()),r&&m.column.getCanSort()&&(0,Ae.jsx)("div",{className:"ml-auto",children:m.column.getIsSorted()==="desc"?(0,Ae.jsx)($u,{className:"h-4 w-4"}):m.column.getIsSorted()==="asc"?(0,Ae.jsx)(Ku,{className:"h-4 w-4"}):(0,Ae.jsx)(qu,{className:"h-4 w-4 opacity-50"})})]})},m.id))},g.id))}),(0,Ae.jsx)(km,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(g=>(0,Ae.jsx)(Zl,{"data-state":g.getIsSelected()&&"selected",children:g.getVisibleCells().map(m=>(0,Ae.jsx)(nd,{children:TI(m.column.columnDef.cell,m.getContext())},m.id))},g.id)):(0,Ae.jsx)(Zl,{children:(0,Ae.jsx)(nd,{colSpan:e.length,className:"h-24 text-center",children:s})})})]})}),o&&(0,Ae.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Ae.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[p.getFilteredRowModel().rows.length," row(s)"]}),(0,Ae.jsxs)("div",{className:"space-x-2",children:[(0,Ae.jsxs)(Ee,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Ae.jsx)(bn,{className:"h-4 w-4"}),"Previous"]}),(0,Ae.jsxs)("span",{className:"text-sm",children:["Page ",p.getState().pagination.pageIndex+1," of"," ",p.getPageCount()]}),(0,Ae.jsxs)(Ee,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Ae.jsx)(Fr,{className:"h-4 w-4"})]})]})]})]})}function _B(e){return({column:t})=>(0,Ae.jsxs)(Ee,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Ae.jsx)($u,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Ae.jsx)(Ku,{className:"ml-2 h-4 w-4"}):(0,Ae.jsx)(qu,{className:"ml-2 h-4 w-4"})]})}var Dt=R(M());var ye=R(N()),UY={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},AI=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"}}),py=Dt.forwardRef(function({className:t,variant:r,size:o,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]=Dt.useState(!1),[L,T]=Dt.useState(a);Dt.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&&hx(L)?Wo(L,l):null,F=m||(0,ye.jsx)(ol,{className:"h-4 w-4"});return(0,ye.jsx)("div",{ref:b,className:"moonui-theme",children:(0,ye.jsxs)(wa,{open:S,onOpenChange:I,children:[(0,ye.jsx)(Ca,{asChild:!0,children:(0,ye.jsxs)(Ee,{variant:r==="ghost"?"ghost":"outline",className:P(AI({variant:r,size:o,state:n}),!z&&"text-muted-foreground",t),disabled:w||h,...C,children:[(0,ye.jsx)(Ka,{mode:"wait",children:(0,ye.jsxs)(He.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)(He.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)(Vn,{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)(He.div,{...UY,className:"rounded-2xl bg-background overflow-hidden",children:[(0,ye.jsx)(Uc,{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)(Ee,{variant:"ghost",size:"sm",onClick:_,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]})})});py.displayName="DatePicker";var DI=Dt.forwardRef(function({className:t,value:r,onChange:o,placeholder:n="Pick a date range",formatString:a="LLL dd, y",separator:i=" - ",...s},l){let[u,c]=Dt.useState(!1),[d,f]=Dt.useState(r);Dt.useEffect(()=>{f(r)},[r]);let p=m=>{f(m),o?.(m),m?.from&&m?.to&&c(!1)},g=Dt.useMemo(()=>d?.from?d?.to?`${Wo(d.from,a)}${i}${Wo(d.to,a)}`:Wo(d.from,a):null,[d,a,i]);return(0,ye.jsxs)(wa,{open:u,onOpenChange:c,children:[(0,ye.jsx)(Ca,{asChild:!0,children:(0,ye.jsxs)(Ee,{ref:l,variant:s.variant==="ghost"?"ghost":"outline",className:P(AI({variant:s.variant,size:s.size,state:s.state}),!g&&"text-muted-foreground",t),disabled:s.disabled||s.readOnly,children:[(0,ye.jsx)(ol,{className:"mr-2 h-4 w-4"}),(0,ye.jsx)("span",{className:"flex-1 truncate text-left",children:g||n})]})}),(0,ye.jsx)(Vn,{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)(Uc,{mode:"range",defaultMonth:d?.from,selected:d,onSelect:p,showOutsideDays:!1,...s.calendarProps,className:"rounded-2xl"})})]})});DI.displayName="DateRangePicker";var NI=Dt.forwardRef(function({value:t,onChange:r,formatString:o="PPP",showTimePicker:n=!0,timeFormat:a="24",timeInterval:i=15,...s},l){let[u,c]=Dt.useState(t),[d,f]=Dt.useState(t?Wo(t,a==="24"?"HH:mm":"hh:mm a"):"00:00"),p=x=>{if(!x){c(void 0),r?.(void 0);return}let[h,v]=d.split(":").map(Number);x.setHours(h,v),c(x),r?.(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),r?.(w)}},m=Dt.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)(py,{...s,value:u,onChange:p,formatString:o,showTodayButton:!1}),n&&u&&(0,ye.jsxs)(He.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)(Ef,{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))})]})]})});NI.displayName="DateTimePicker";var OI=Dt.forwardRef(function({value:t,onChange:r,placeholder:o="Pick a month",formatString:n="MMMM yyyy",...a},i){let[s,l]=Dt.useState(!1),[u,c]=Dt.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),r?.(x),l(!1)},p=m=>{let x=new Date(u);x.setFullYear(x.getFullYear()+m),c(x)},g=t?Wo(t,n):null;return(0,ye.jsxs)(wa,{open:s,onOpenChange:l,children:[(0,ye.jsx)(Ca,{asChild:!0,children:(0,ye.jsxs)(Ee,{ref:i,variant:a.variant==="default"?"outline":a.variant||"outline",className:P(AI({variant:a.variant,size:a.size,state:a.state}),!g&&"text-muted-foreground",a.className),disabled:a.disabled||a.readOnly,children:[(0,ye.jsx)(ol,{className:"mr-2 h-4 w-4"}),g||o]})}),(0,ye.jsx)(Vn,{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)(Ee,{variant:"outline",size:"icon","aria-label":`Previous year, ${u.getFullYear()-1}`,onClick:()=>p(-1),children:(0,ye.jsx)(bn,{className:"h-4 w-4"})}),(0,ye.jsx)("span",{className:"font-semibold",children:u.getFullYear()}),(0,ye.jsx)(Ee,{variant:"outline",size:"icon","aria-label":`Next year, ${u.getFullYear()+1}`,onClick:()=>p(1),children:(0,ye.jsx)(Fr,{className:"h-4 w-4"})})]}),(0,ye.jsx)("div",{className:"grid grid-cols-3 gap-2",children:d.map((m,x)=>(0,ye.jsx)(Ee,{variant:t&&t.getMonth()===x?"primary":"outline",size:"sm",onClick:()=>f(x),className:"h-8 text-xs",children:m.slice(0,3)},m))})]})})]})});OI.displayName="MonthPicker";var VB=R(M());var FI=R(N());function BB({items:e,onReorder:t,renderItem:r,keyExtractor:o,className:n,disabled:a=!1}){let[i,s]=VB.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,FI.jsx)("div",{className:P("moonui-theme","space-y-2",n),children:e.map((f,p)=>(0,FI.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:r(f,p)},o(f)))})}var fi=R(M());var Wt=R(M(),1);var le=R(M(),1);var we=R(N(),1),_I=["Enter"," "],zY=["ArrowDown","PageUp","Home"],UB=["ArrowUp","PageDown","End"],GY=[...zY,...UB],WY={ltr:[..._I,"ArrowRight"],rtl:[..._I,"ArrowLeft"]},jY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Nm="Menu",[Am,$Y,qY]=Jn(Nm),[Jl,VI]=Fe(Nm,[qY,Qo,Jc]),Om=Qo(),zB=Jc(),[GB,Ls]=Jl(Nm),[KY,Fm]=Jl(Nm),WB=e=>{let{__scopeMenu:t,open:r=!1,children:o,dir:n,onOpenChange:a,modal:i=!0}=e,s=Om(t),[l,u]=le.useState(null),c=le.useRef(!1),d=nt(a),f=ia(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)(ai,{...s,children:(0,we.jsx)(GB,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,we.jsx)(KY,{scope:t,onClose:le.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:i,children:o})})})};WB.displayName=Nm;var XY="MenuAnchor",BI=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Om(r);return(0,we.jsx)(ii,{...n,...o,ref:t})});BI.displayName=XY;var HI="MenuPortal",[YY,jB]=Jl(HI,{forceMount:void 0}),$B=e=>{let{__scopeMenu:t,forceMount:r,children:o,container:n}=e,a=Ls(HI,t);return(0,we.jsx)(YY,{scope:t,forceMount:r,children:(0,we.jsx)(ut,{present:r||a.open,children:(0,we.jsx)(Ro,{asChild:!0,container:n,children:o})})})};$B.displayName=HI;var Jo="MenuContent",[QY,UI]=Jl(Jo),qB=le.forwardRef((e,t)=>{let r=jB(Jo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Ls(Jo,e.__scopeMenu),i=Fm(Jo,e.__scopeMenu);return(0,we.jsx)(Am.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(ut,{present:o||a.open,children:(0,we.jsx)(Am.Slot,{scope:e.__scopeMenu,children:i.modal?(0,we.jsx)(ZY,{...n,ref:t}):(0,we.jsx)(JY,{...n,ref:t})})})})}),ZY=le.forwardRef((e,t)=>{let r=Ls(Jo,e.__scopeMenu),o=le.useRef(null),n=de(t,o);return le.useEffect(()=>{let a=o.current;if(a)return xs(a)},[]),(0,we.jsx)(zI,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),JY=le.forwardRef((e,t)=>{let r=Ls(Jo,e.__scopeMenu);return(0,we.jsx)(zI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),eQ=co("MenuContent.ScrollLock"),zI=le.forwardRef((e,t)=>{let{__scopeMenu:r,loop:o=!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=Ls(Jo,r),h=Fm(Jo,r),v=Om(r),y=zB(r),w=$Y(r),[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?si:le.Fragment,F=g?{as:eQ,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,re=ae.map(U=>U.textValue),Y=fQ(re,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),[]),ps();let B=le.useCallback(A=>_.current===E.current?.side&&mQ(A,E.current?.area),[]);return(0,we.jsx)(QY,{scope:r,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)(oi,{asChild:!0,trapped:n,onMountAutoFocus:W(a,A=>{A.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,we.jsx)(qo,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,we.jsx)(Yx,{asChild:!0,...y,dir:h.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:b,onEntryFocus:W(l,A=>{h.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,we.jsx)(hs,{role:"menu","aria-orientation":"vertical","data-state":cH(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 re=S.current;if(A.target!==re||!GY.includes(A.key))return;A.preventDefault();let ce=w().filter(U=>!U.disabled).map(U=>U.ref.current);UB.includes(A.key)&&ce.reverse(),cQ(ce)}),onBlur:W(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(L.current),T.current="")}),onPointerMove:W(e.onPointerMove,Dm(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}}))})})})})})})});qB.displayName=Jo;var tQ="MenuGroup",GI=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)(q.div,{role:"group",...o,ref:t})});GI.displayName=tQ;var rQ="MenuLabel",KB=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)(q.div,{...o,ref:t})});KB.displayName=rQ;var my="MenuItem",HB="menu.itemSelect",hy=le.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:o,...n}=e,a=le.useRef(null),i=Fm(my,e.__scopeMenu),s=UI(my,e.__scopeMenu),l=de(t,a),u=le.useRef(!1),c=()=>{let d=a.current;if(!r&&d){let f=new CustomEvent(HB,{bubbles:!0,cancelable:!0});d.addEventListener(HB,p=>o?.(p),{once:!0}),Wu(d,f),f.defaultPrevented?u.current=!1:i.onClose()}};return(0,we.jsx)(XB,{...n,ref:l,disabled:r,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!=="";r||f&&d.key===" "||_I.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});hy.displayName=my;var XB=le.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:o=!1,textValue:n,...a}=e,i=UI(my,r),s=zB(r),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)(Am.ItemSlot,{scope:r,disabled:o,textValue:n??f,children:(0,we.jsx)(Qx,{asChild:!0,...s,focusable:!o,children:(0,we.jsx)(q.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:W(e.onPointerMove,Dm(g=>{o?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,Dm(g=>i.onItemLeave(g))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),oQ="MenuCheckboxItem",YB=le.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:o,...n}=e;return(0,we.jsx)(tH,{scope:e.__scopeMenu,checked:r,children:(0,we.jsx)(hy,{role:"menuitemcheckbox","aria-checked":gy(r)?"mixed":r,...n,ref:t,"data-state":$I(r),onSelect:W(n.onSelect,()=>o?.(gy(r)?!0:!r),{checkForDefaultPrevented:!1})})})});YB.displayName=oQ;var QB="MenuRadioGroup",[nQ,aQ]=Jl(QB,{value:void 0,onValueChange:()=>{}}),ZB=le.forwardRef((e,t)=>{let{value:r,onValueChange:o,...n}=e,a=nt(o);return(0,we.jsx)(nQ,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,we.jsx)(GI,{...n,ref:t})})});ZB.displayName=QB;var JB="MenuRadioItem",eH=le.forwardRef((e,t)=>{let{value:r,...o}=e,n=aQ(JB,e.__scopeMenu),a=r===n.value;return(0,we.jsx)(tH,{scope:e.__scopeMenu,checked:a,children:(0,we.jsx)(hy,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":$I(a),onSelect:W(o.onSelect,()=>n.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});eH.displayName=JB;var WI="MenuItemIndicator",[tH,iQ]=Jl(WI,{checked:!1}),rH=le.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:o,...n}=e,a=iQ(WI,r);return(0,we.jsx)(ut,{present:o||gy(a.checked)||a.checked===!0,children:(0,we.jsx)(q.span,{...n,ref:t,"data-state":$I(a.checked)})})});rH.displayName=WI;var sQ="MenuSeparator",oH=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)(q.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});oH.displayName=sQ;var lQ="MenuArrow",nH=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Om(r);return(0,we.jsx)(vs,{...n,...o,ref:t})});nH.displayName=lQ;var jI="MenuSub",[uQ,aH]=Jl(jI),iH=e=>{let{__scopeMenu:t,children:r,open:o=!1,onOpenChange:n}=e,a=Ls(jI,t),i=Om(t),[s,l]=le.useState(null),[u,c]=le.useState(null),d=nt(n);return le.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,we.jsx)(ai,{...i,children:(0,we.jsx)(GB,{scope:t,open:o,onOpenChange:d,content:u,onContentChange:c,children:(0,we.jsx)(uQ,{scope:t,contentId:Ne(),triggerId:Ne(),trigger:s,onTriggerChange:l,children:r})})})};iH.displayName=jI;var Em="MenuSubTrigger",sH=le.forwardRef((e,t)=>{let r=Ls(Em,e.__scopeMenu),o=Fm(Em,e.__scopeMenu),n=aH(Em,e.__scopeMenu),a=UI(Em,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)(BI,{asChild:!0,...u,children:(0,we.jsx)(XB,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":n.contentId,"data-state":cH(r.open),...e,ref:uo(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,Dm(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),c()},100))})),onPointerLeave:W(e.onPointerLeave,Dm(d=>{c();let f=r.content?.getBoundingClientRect();if(f){let p=r.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===" "||WY[o.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});sH.displayName=Em;var lH="MenuSubContent",uH=le.forwardRef((e,t)=>{let r=jB(Jo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Ls(Jo,e.__scopeMenu),i=Fm(Jo,e.__scopeMenu),s=aH(lH,e.__scopeMenu),l=le.useRef(null),u=de(t,l);return(0,we.jsx)(Am.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(ut,{present:o||a.open,children:(0,we.jsx)(Am.Slot,{scope:e.__scopeMenu,children:(0,we.jsx)(zI,{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=jY[i.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});uH.displayName=lH;function cH(e){return e?"open":"closed"}function gy(e){return e==="indeterminate"}function $I(e){return gy(e)?"indeterminate":e?"checked":"unchecked"}function cQ(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function dQ(e,t){return e.map((r,o)=>e[(t+o)%e.length])}function fQ(e,t,r){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=dQ(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==r));let l=i.find(u=>u.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function pQ(e,t){let{x:r,y:o}=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>o!=f>o&&r<(d-u)*(o-c)/(f-c)+u&&(n=!n)}return n}function mQ(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return pQ(r,t)}function Dm(e){return t=>t.pointerType==="mouse"?e(t):void 0}var dH=WB,fH=BI,pH=$B,mH=qB,gH=GI,hH=KB,vH=hy,xH=YB,yH=ZB,wH=eH,CH=rH,SH=oH,bH=nH,RH=iH,IH=sH,PH=uH;var Gt=R(N(),1),vy="DropdownMenu",[hQ,mke]=Fe(vy,[VI]),Tr=VI(),[vQ,LH]=hQ(vy),TH=e=>{let{__scopeDropdownMenu:t,children:r,dir:o,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=Tr(t),u=Wt.useRef(null),[c,d]=qe({prop:n,defaultProp:a??!1,onChange:i,caller:vy});return(0,Gt.jsx)(vQ,{scope:t,triggerId:Ne(),triggerRef:u,contentId:Ne(),open:c,onOpenChange:d,onOpenToggle:Wt.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,Gt.jsx)(dH,{...l,open:c,onOpenChange:d,dir:o,modal:s,children:r})})};TH.displayName=vy;var kH="DropdownMenuTrigger",MH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:o=!1,...n}=e,a=LH(kH,r),i=Tr(r);return(0,Gt.jsx)(fH,{asChild:!0,...i,children:(0,Gt.jsx)(q.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":o?"":void 0,disabled:o,...n,ref:uo(t,a.triggerRef),onPointerDown:W(e.onPointerDown,s=>{!o&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:W(e.onKeyDown,s=>{o||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});MH.displayName=kH;var xQ="DropdownMenuPortal",EH=e=>{let{__scopeDropdownMenu:t,...r}=e,o=Tr(t);return(0,Gt.jsx)(pH,{...o,...r})};EH.displayName=xQ;var AH="DropdownMenuContent",DH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=LH(AH,r),a=Tr(r),i=Wt.useRef(!1);return(0,Gt.jsx)(mH,{id:n.contentId,"aria-labelledby":n.triggerId,...a,...o,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)"}})});DH.displayName=AH;var yQ="DropdownMenuGroup",NH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,Gt.jsx)(gH,{...n,...o,ref:t})});NH.displayName=yQ;var wQ="DropdownMenuLabel",OH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,Gt.jsx)(hH,{...n,...o,ref:t})});OH.displayName=wQ;var CQ="DropdownMenuItem",FH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,Gt.jsx)(vH,{...n,...o,ref:t})});FH.displayName=CQ;var SQ="DropdownMenuCheckboxItem",_H=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,Gt.jsx)(xH,{...n,...o,ref:t})});_H.displayName=SQ;var bQ="DropdownMenuRadioGroup",VH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,Gt.jsx)(yH,{...n,...o,ref:t})});VH.displayName=bQ;var RQ="DropdownMenuRadioItem",BH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,Gt.jsx)(wH,{...n,...o,ref:t})});BH.displayName=RQ;var IQ="DropdownMenuItemIndicator",HH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,Gt.jsx)(CH,{...n,...o,ref:t})});HH.displayName=IQ;var PQ="DropdownMenuSeparator",UH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,Gt.jsx)(SH,{...n,...o,ref:t})});UH.displayName=PQ;var LQ="DropdownMenuArrow",TQ=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,Gt.jsx)(bH,{...n,...o,ref:t})});TQ.displayName=LQ;var kQ=e=>{let{__scopeDropdownMenu:t,children:r,open:o,onOpenChange:n,defaultOpen:a}=e,i=Tr(t),[s,l]=qe({prop:o,defaultProp:a??!1,onChange:n,caller:"DropdownMenuSub"});return(0,Gt.jsx)(RH,{...i,open:s,onOpenChange:l,children:r})},MQ="DropdownMenuSubTrigger",zH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,Gt.jsx)(IH,{...n,...o,ref:t})});zH.displayName=MQ;var EQ="DropdownMenuSubContent",GH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,Gt.jsx)(PH,{...n,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});GH.displayName=EQ;var WH=TH,jH=MH,qI=EH,KI=DH,$H=NH,XI=OH,YI=FH,QI=_H,qH=VH,ZI=BH,JI=HH,eP=UH;var KH=kQ,tP=zH,rP=GH;var jt=R(N()),XH=WH,YH=jH,QH=$H,ZH=qI,JH=KH,eU=qH,oP=fi.forwardRef(({className:e,inset:t,children:r,...o},n)=>(0,jt.jsxs)(tP,{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),...o,children:[r,(0,jt.jsx)(Fr,{className:"ml-auto h-4 w-4"})]}));oP.displayName=tP.displayName;var nP=fi.forwardRef(({className:e,...t},r)=>(0,jt.jsx)(rP,{ref:r,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}));nP.displayName=rP.displayName;var aP=fi.forwardRef(({className:e,sideOffset:t=4,...r},o)=>(0,jt.jsx)(qI,{children:(0,jt.jsx)(KI,{ref:o,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),...r})}));aP.displayName=KI.displayName;var iP=fi.forwardRef(({className:e,inset:t,...r},o)=>(0,jt.jsx)(YI,{ref:o,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),...r}));iP.displayName=YI.displayName;var sP=fi.forwardRef(({className:e,children:t,checked:r,...o},n)=>(0,jt.jsxs)(QI,{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:r,...o,children:[(0,jt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,jt.jsx)(JI,{children:(0,jt.jsx)(yr,{className:"h-4 w-4"})})}),t]}));sP.displayName=QI.displayName;var lP=fi.forwardRef(({className:e,children:t,...r},o)=>(0,jt.jsxs)(ZI,{ref:o,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),...r,children:[(0,jt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,jt.jsx)(JI,{children:(0,jt.jsx)(nl,{className:"h-2 w-2 fill-current"})})}),t]}));lP.displayName=ZI.displayName;var uP=fi.forwardRef(({className:e,inset:t,...r},o)=>(0,jt.jsx)(XI,{ref:o,className:P("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));uP.displayName=XI.displayName;var cP=fi.forwardRef(({className:e,...t},r)=>(0,jt.jsx)(eP,{ref:r,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));cP.displayName=eP.displayName;var dP=({className:e,...t})=>(0,jt.jsx)("span",{className:P("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});dP.displayName="DropdownMenuShortcut";var Po=R(M());var tU=R(M());var pi=R(N()),rU=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"}}),DQ=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"}}),_m=tU.forwardRef(({className:e,value:t=0,variant:r,size:o,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,pi.jsxs)(pi.Fragment,{children:[s&&(0,pi.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,pi.jsx)("span",{className:P("text-sm font-medium text-muted-foreground",u),children:x})}),(0,pi.jsx)("div",{ref:p,className:P("moonui-theme",rU({variant:r,size:o,radius:n,animation:a}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:g,...f,children:(0,pi.jsx)("div",{className:P(DQ({variant:i??r??"primary",animation:a}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-m}%)`}})})]})});_m.displayName="Progress";var ve=R(N()),NQ=e=>e.startsWith("image/")?(0,ve.jsx)(il,{className:"h-4 w-4"}):e.startsWith("video/")?(0,ve.jsx)(ep,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,ve.jsx)(jf,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,ve.jsx)(_f,{className:"h-4 w-4"}):(0,ve.jsx)(Vf,{className:"h-4 w-4"}),fP=e=>{if(e===0)return"0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,o)).toFixed(2))+" "+r[o]},OQ=({uploadedFile:e,onRemove:t})=>{let{id:r,file:o,progress:n,status:a,preview:i}=e;return(0,ve.jsxs)(He.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:o.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:NQ(o.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:o.name}),(0,ve.jsx)(Ee,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(r),"aria-label":`Remove ${o.name}`,children:(0,ve.jsx)(xo,{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:fP(o.size)}),a==="uploading"&&(0,ve.jsxs)(_r,{variant:"secondary",className:"h-5",children:[(0,ve.jsx)(Ht,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,ve.jsxs)(_r,{variant:"success",className:"h-5",children:[(0,ve.jsx)(Wi,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,ve.jsxs)(_r,{variant:"destructive",className:"h-5",children:[(0,ve.jsx)(Rn,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,ve.jsx)("div",{className:"mt-2",children:(0,ve.jsx)(_m,{value:n,className:"h-1"})})]})]})},pP=Po.default.forwardRef(({accept:e="*",multiple:t=!0,maxSize:r=10*1024*1024,maxFiles:o=5,disabled:n=!1,className:a,onUpload:i,onRemove:s,children:l,...u},c)=>{let[d,f]=(0,Po.useState)([]),[p,g]=(0,Po.useState)(!1),[m,x]=(0,Po.useState)(null),h=I=>I.size>r?`File size exceeds ${fP(r)}`: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,Po.useCallback)(async I=>{let L=Array.from(I);if(x(null),d.length+L.length>o){x(`Maximum ${o} 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,o,r,e,i]),y=(0,Po.useCallback)(I=>{if(I.preventDefault(),g(!1),n)return;let L=I.dataTransfer.files;L.length>0&&v(L)},[v,n]),w=(0,Po.useCallback)(I=>{I.preventDefault(),n||g(!0)},[n]),C=(0,Po.useCallback)(I=>{I.preventDefault(),g(!1)},[]),b=(0,Po.useCallback)(I=>{let L=I.target.files;L&&L.length>0&&v(L),I.target.value=""},[v]),S=(0,Po.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)(He.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)(Jf,{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 ",o," files, ",fP(r)," each"]})]}),(0,ve.jsx)(Ee,{variant:"outline",disabled:n,children:"Select Files"})]})]}),(0,ve.jsx)(Ka,{children:m&&(0,ve.jsxs)(He.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)(Rn,{className:"h-4 w-4"}),(0,ve.jsx)("span",{children:m})]})}),(0,ve.jsx)(Ka,{children:d.length>0&&(0,ve.jsxs)(He.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)(Ka,{children:d.map(I=>(0,ve.jsx)(OQ,{uploadedFile:I,onRemove:S},I.id))})})]})})]})});pP.displayName="FileUpload";var oU=R(M());var eu=R(N()),mP=oU.default.forwardRef(({children:e,isOpen:t,onOpenChange:r,direction:o="up",threshold:n=50,className:a,overlayClassName:i,enableSwipeToClose:s=!0,...l},u)=>{let c=Fc(0),d=Fc(0),f=o==="up"||o==="down",p=f?c:d,g=yb(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(o){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?r(!1):Cb(p,0,{type:"spring",stiffness:300,damping:20})},x=()=>{switch(o){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,eu.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,eu.jsx)(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(!1),className:P("absolute inset-0 bg-black/50",i)}),(0,eu.jsxs)(He.div,{ref:u,drag:s?f?"y":"x":!1,dragConstraints:{top:o==="up"?0:void 0,bottom:o==="down"?0:void 0,left:o==="left"?0:void 0,right:o==="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":o==="up","top-0 left-0 right-0 rounded-b-lg":o==="down","top-0 bottom-0 right-0 rounded-l-lg":o==="left","top-0 bottom-0 left-0 rounded-r-lg":o==="right"},a),...l,children:[(o==="up"||o==="down")&&(0,eu.jsx)("div",{className:"flex justify-center p-2",children:(0,eu.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});mP.displayName="GestureDrawer";var Ts=R(M());var Je=R(N());function nU({className:e,size:t="md",showForks:r=!0,showWatchers:o=!1,repoUrl:n="https://github.com/moonui/moonui"}){let[a,i]=(0,Ts.useState)(null),[s,l]=(0,Ts.useState)(!0);(0,Ts.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,Je.jsxs)("div",{className:P("flex items-center animate-pulse",c[t],e),children:[(0,Je.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Je.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Je.jsx)("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),r&&(0,Je.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Je.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Je.jsx)("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):a?(0,Je.jsxs)("div",{className:P("flex items-center",c[t],e),children:[(0,Je.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,Je.jsx)(ji,{className:"fill-current text-yellow-500",size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.stars)})]}),r&&(0,Je.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,Je.jsx)(Bf,{size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.forks)})]}),o&&(0,Je.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,Je.jsx)(al,{size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.watchers)})]}),!a.isLive&&(0,Je.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function FQ({className:e,size:t="md",repoUrl:r="https://github.com/moonui/moonui"}){let[o,n]=(0,Ts.useState)(null),[a,i]=(0,Ts.useState)(!0);(0,Ts.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,Je.jsx)(Ee,{variant:"outline",size:t,className:P("moonui-theme","group",e),asChild:!0,children:(0,Je.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,Je.jsx)(ji,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,Je.jsx)("span",{children:"Star on GitHub"}),!a&&o&&(0,Je.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-800 rounded-full text-xs font-medium",children:s(o)}),(0,Je.jsx)(Ff,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var tu=R(M());var Se=R(M(),1),yy=R(M(),1),Un=R(M(),1),_Q=Object.defineProperty,VQ=Object.defineProperties,BQ=Object.getOwnPropertyDescriptors,xy=Object.getOwnPropertySymbols,iU=Object.prototype.hasOwnProperty,sU=Object.prototype.propertyIsEnumerable,aU=(e,t,r)=>t in e?_Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HQ=(e,t)=>{for(var r in t||(t={}))iU.call(t,r)&&aU(e,r,t[r]);if(xy)for(var r of xy(t))sU.call(t,r)&&aU(e,r,t[r]);return e},UQ=(e,t)=>VQ(e,BQ(t)),zQ=(e,t)=>{var r={};for(var o in e)iU.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&xy)for(var o of xy(e))t.indexOf(o)<0&&sU.call(e,o)&&(r[o]=e[o]);return r};function GQ(e){let t=setTimeout(e,0),r=setTimeout(e,10),o=setTimeout(e,50);return[t,r,o]}function WQ(e){let t=yy.useRef();return yy.useEffect(()=>{t.current=e}),t.current}var jQ=18,lU=40,$Q=`${lU}px`,qQ=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function KQ({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:o}){let[n,a]=Un.useState(!1),[i,s]=Un.useState(!1),[l,u]=Un.useState(!1),c=Un.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&n&&i,[n,i,r]),d=Un.useCallback(()=>{let f=e.current,p=t.current;if(!f||!p||l||r==="none")return;let g=f,m=g.getBoundingClientRect().left+g.offsetWidth,x=g.getBoundingClientRect().top+g.offsetHeight/2,h=m-jQ,v=x;document.querySelectorAll(qQ).length===0&&document.elementFromPoint(h,v)===f||(a(!0),u(!0))},[e,t,l,r]);return Un.useEffect(()=>{let f=e.current;if(!f||r==="none")return;function p(){let m=window.innerWidth-f.getBoundingClientRect().right;s(m>=lU)}p();let g=setInterval(p,1e3);return()=>{clearInterval(g)}},[e,r]),Un.useEffect(()=>{let f=o||document.activeElement===t.current;if(r==="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,o,r,d]),{hasPWMBadge:n,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:$Q}}var gP=Se.createContext({}),hP=Se.forwardRef((e,t)=>{var r=e,{value:o,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=XQ,render:m,children:x}=r,h=zQ(r,["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=o??S,T=WQ(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 Ge(){if(document.activeElement!==J){V(null),re(null);return}let Oe=J.selectionStart,bt=J.selectionEnd,Xn=J.selectionDirection,Er=J.maxLength,fn=J.value,Mo=F.current.prev,pn=-1,Yn=-1,Qn;if(fn.length!==0&&Oe!==null&&bt!==null){let Id=Oe===bt,Pd=Oe===fn.length&&fn.length<Er;if(Id&&!Pd){let Eo=Oe;if(Eo===0)pn=0,Yn=1,Qn="forward";else if(Eo===Er)pn=Eo-1,Yn=Eo,Qn="backward";else if(Er>1&&fn.length>1){let Ld=0;if(Mo[0]!==null&&Mo[1]!==null){Qn=Eo<Mo[1]?"backward":"forward";let c0=Mo[0]===Mo[1]&&Mo[0]<Er;Qn==="backward"&&!c0&&(Ld=-1)}pn=Ld+Eo,Yn=Ld+Eo+1}}pn!==-1&&Yn!==-1&&pn!==Yn&&_.current.setSelectionRange(pn,Yn,Qn)}let ag=pn!==-1?pn:Oe,fu=Yn!==-1?Yn:bt,Ci=Qn??Xn;V(ag),re(fu),F.current.prev=[ag,fu,Ci]}if(document.addEventListener("selectionchange",Ge,{capture:!0}),Ge(),document.activeElement===J&&te(!0),!document.getElementById("input-otp-style")){let Oe=document.createElement("style");if(Oe.id="input-otp-style",document.head.appendChild(Oe),Oe.sheet){let bt="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;";Vm(Oe.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Vm(Oe.sheet,`[data-input-otp]:autofill { ${bt} }`),Vm(Oe.sheet,`[data-input-otp]:-webkit-autofill { ${bt} }`),Vm(Oe.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; } }"),Vm(Oe.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Xe=()=>{ie&&ie.style.setProperty("--root-height",`${J.clientHeight}px`)};Xe();let kt=new ResizeObserver(Xe);return kt.observe(J),()=>{document.removeEventListener("selectionchange",Ge,{capture:!0}),kt.disconnect()}},[]);let[O,B]=Se.useState(!1),[A,te]=Se.useState(!1),[ae,V]=Se.useState(null),[Q,re]=Se.useState(null);Se.useEffect(()=>{GQ(()=>{var J,ie,Ge,Xe;(J=_.current)==null||J.dispatchEvent(new Event("input"));let kt=(ie=_.current)==null?void 0:ie.selectionStart,Oe=(Ge=_.current)==null?void 0:Ge.selectionEnd,bt=(Xe=_.current)==null?void 0:Xe.selectionDirection;kt!==null&&Oe!==null&&(V(kt),re(Oe),F.current.prev=[kt,Oe,bt])})},[L,A]),Se.useEffect(()=>{T!==void 0&&L!==T&&T.length<a&&L.length===a&&c?.(L)},[a,c,T,L]);let Y=KQ({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),Ge=_.current.value.length;(J=_.current)==null||J.setSelectionRange(ie,Ge),V(ie),re(Ge)}te(!0)},[a]),ne=Se.useCallback(J=>{var ie,Ge;let Xe=_.current;if(!f&&(!z.current.isIOS||!J.clipboardData||!Xe))return;let kt=J.clipboardData.getData("text/plain"),Oe=f?f(kt):kt;J.preventDefault();let bt=(ie=_.current)==null?void 0:ie.selectionStart,Xn=(Ge=_.current)==null?void 0:Ge.selectionEnd,Er=(bt!==Xn?L.slice(0,bt)+Oe+L.slice(Xn):L.slice(0,bt)+Oe+L.slice(bt)).slice(0,a);if(Er.length>0&&E&&!E.test(Er))return;Xe.value=Er,k(Er);let fn=Math.min(Er.length,a-1),Mo=Er.length;Xe.setSelectionRange(fn,Mo),V(fn),re(Mo)},[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",UQ(HQ({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 Ge;let Xe=A&&ae!==null&&Q!==null&&(ae===Q&&ie===ae||ie>=ae&&ie<Q),kt=L[ie]!==void 0?L[ie]:null,Oe=L[0]!==void 0?null:(Ge=l?.[ie])!=null?Ge:null;return{char:kt,placeholderChar:Oe,isActive:Xe,hasFakeCaret:Xe&&kt===null}}),isFocused:A,isHovering:!h.disabled&&O}),[A,O,a,Q,ae,h.disabled,L]),Ie=Se.useMemo(()=>m?m(X):Se.createElement(gP.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)))});hP.displayName="Input";function Vm(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var XQ=`
|
|
66
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,r?.key)}return n}}function ge(e,t,r,o){return{debug:()=>{var n;return(n=e?.debugAll)!=null?n:e[t]},key:!1,onChange:o}}function eY(e,t,r,o){let n=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(o),renderValue:n,getContext:me(()=>[e,r,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,r,t,e)},{}),a}function tY(e,t,r,o){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:o,depth:r,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 Tr="debugHeaders";function RB(e,t,r){var o;let a={id:(o=r.id)!=null?o:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.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 rY={createTable:e=>{e.getHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o,n)=>{var a,i;let s=(a=o?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?a:[],l=(i=n?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?i:[],u=r.filter(d=>!(o!=null&&o.includes(d.id))&&!(n!=null&&n.includes(d.id)));return cy(t,[...s,...u,...l],e)},ge(e.options,Tr,"getHeaderGroups")),e.getCenterHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o,n)=>(r=r.filter(a=>!(o!=null&&o.includes(a.id))&&!(n!=null&&n.includes(a.id))),cy(t,r,e,"center")),ge(e.options,Tr,"getCenterHeaderGroups")),e.getLeftHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,o)=>{var n;let a=(n=o?.map(i=>r.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return cy(t,a,e,"left")},ge(e.options,Tr,"getLeftHeaderGroups")),e.getRightHeaderGroups=me(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,o)=>{var n;let a=(n=o?.map(i=>r.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return cy(t,a,e,"right")},ge(e.options,Tr,"getRightHeaderGroups")),e.getFooterGroups=me(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ge(e.options,Tr,"getFooterGroups")),e.getLeftFooterGroups=me(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ge(e.options,Tr,"getLeftFooterGroups")),e.getCenterFooterGroups=me(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ge(e.options,Tr,"getCenterFooterGroups")),e.getRightFooterGroups=me(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ge(e.options,Tr,"getRightFooterGroups")),e.getFlatHeaders=me(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Tr,"getFlatHeaders")),e.getLeftFlatHeaders=me(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Tr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=me(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Tr,"getCenterFlatHeaders")),e.getRightFlatHeaders=me(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Tr,"getRightFlatHeaders")),e.getCenterLeafHeaders=me(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Tr,"getCenterLeafHeaders")),e.getLeftLeafHeaders=me(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Tr,"getLeftLeafHeaders")),e.getRightLeafHeaders=me(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Tr,"getRightLeafHeaders")),e.getLeafHeaders=me(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,o)=>{var n,a,i,s,l,u;return[...(n=(a=t[0])==null?void 0:a.headers)!=null?n:[],...(i=(s=r[0])==null?void 0:s.headers)!=null?i:[],...(l=(u=o[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},ge(e.options,Tr,"getLeafHeaders"))}};function cy(e,t,r,o){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:[o,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(x=>{let h=[...m].reverse()[0],v=x.column.depth===g.depth,y,C=!1;if(v&&x.column.parent?y=x.column.parent:(y=x.column,C=!0),h&&h?.column===y)h.subHeaders.push(x);else{let w=RB(r,y,{id:[o,p,y.id,x?.id].filter(Boolean).join("_"),isPlaceholder:C,placeholderId:C?`${m.filter(b=>b.column===y).length}`:void 0,depth:p,index:m.length});w.subHeaders.push(x),m.push(w)}g.headers.push(x),x.headerGroup=g}),l.push(g),p>0&&u(m,p-1)},c=t.map((f,p)=>RB(r,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:C,rowSpan:w}=y;m+=C,h.push(w)})):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 PI=(e,t,r,o,n,a,i)=>{let s={id:t,index:o,original:r,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,o),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,o),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:()=>JX(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=>eY(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},oY={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()}}},PB=(e,t,r)=>{var o,n;let a=r==null||(o=r.toString())==null?void 0:o.toLowerCase();return!!(!((n=e.getValue(t))==null||(n=n.toString())==null||(n=n.toLowerCase())==null)&&n.includes(a))};PB.autoRemove=e=>Un(e);var LB=(e,t,r)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(r))};LB.autoRemove=e=>Un(e);var TB=(e,t,r)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===r?.toLowerCase()};TB.autoRemove=e=>Un(e);var kB=(e,t,r)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)};kB.autoRemove=e=>Un(e);var MB=(e,t,r)=>!r.some(o=>{var n;return!((n=e.getValue(t))!=null&&n.includes(o))});MB.autoRemove=e=>Un(e)||!(e!=null&&e.length);var EB=(e,t,r)=>r.some(o=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(o)});EB.autoRemove=e=>Un(e)||!(e!=null&&e.length);var AB=(e,t,r)=>e.getValue(t)===r;AB.autoRemove=e=>Un(e);var DB=(e,t,r)=>e.getValue(t)==r;DB.autoRemove=e=>Un(e);var LI=(e,t,r)=>{let[o,n]=r,a=e.getValue(t);return a>=o&&a<=n};LI.resolveFilterValue=e=>{let[t,r]=e,o=typeof t!="number"?parseFloat(t):t,n=typeof r!="number"?parseFloat(r):r,a=t===null||Number.isNaN(o)?-1/0:o,i=r===null||Number.isNaN(n)?1/0:n;if(a>i){let s=a;a=i,i=s}return[a,i]};LI.autoRemove=e=>Un(e)||Un(e[0])&&Un(e[1]);var fi={includesString:PB,includesStringSensitive:LB,equalsString:TB,arrIncludes:kB,arrIncludesAll:MB,arrIncludesSome:EB,equals:AB,weakEquals:DB,inNumberRange:LI};function Un(e){return e==null||e===""}var nY={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Io("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let r=t.getCoreRowModel().flatRows[0],o=r?.getValue(e.id);return typeof o=="string"?fi.includesString:typeof o=="number"?fi.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?fi.equals:Array.isArray(o)?fi.arrIncludes:fi.weakEquals},e.getFilterFn=()=>{var r,o;return py(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(r=(o=t.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?r:fi[e.columnDef.filterFn]},e.getCanFilter=()=>{var r,o,n;return((r=e.columnDef.enableColumnFilter)!=null?r:!0)&&((o=t.options.enableColumnFilters)!=null?o:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var r;return(r=t.getState().columnFilters)==null||(r=r.find(o=>o.id===e.id))==null?void 0:r.value},e.getFilterIndex=()=>{var r,o;return(r=(o=t.getState().columnFilters)==null?void 0:o.findIndex(n=>n.id===e.id))!=null?r:-1},e.setFilterValue=r=>{t.setColumnFilters(o=>{let n=e.getFilterFn(),a=o?.find(c=>c.id===e.id),i=Ps(r,a?a.value:void 0);if(IB(n,i,e)){var s;return(s=o?.filter(c=>c.id!==e.id))!=null?s:[]}let l={id:e.id,value:i};if(a){var u;return(u=o?.map(c=>c.id===e.id?l:c))!=null?u:[]}return o!=null&&o.length?[...o,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let r=e.getAllLeafColumns(),o=n=>{var a;return(a=Ps(t,n))==null?void 0:a.filter(i=>{let s=r.find(l=>l.id===i.id);if(s){let l=s.getFilterFn();if(IB(l,i.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.resetColumnFilters=t=>{var r,o;e.setColumnFilters(t?[]:(r=(o=e.initialState)==null?void 0:o.columnFilters)!=null?r:[])},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 IB(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}var aY=(e,t,r)=>r.reduce((o,n)=>{let a=n.getValue(e);return o+(typeof a=="number"?a:0)},0),iY=(e,t,r)=>{let o;return r.forEach(n=>{let a=n.getValue(e);a!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}),o},sY=(e,t,r)=>{let o;return r.forEach(n=>{let a=n.getValue(e);a!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}),o},lY=(e,t,r)=>{let o,n;return r.forEach(a=>{let i=a.getValue(e);i!=null&&(o===void 0?i>=i&&(o=n=i):(o>i&&(o=i),n<i&&(n=i)))}),[o,n]},uY=(e,t)=>{let r=0,o=0;if(t.forEach(n=>{let a=n.getValue(e);a!=null&&(a=+a)>=a&&(++r,o+=a)}),r)return o/r},cY=(e,t)=>{if(!t.length)return;let r=t.map(a=>a.getValue(e));if(!ZX(r))return;if(r.length===1)return r[0];let o=Math.floor(r.length/2),n=r.sort((a,i)=>a-i);return r.length%2!==0?n[o]:(n[o-1]+n[o])/2},dY=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),fY=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,pY=(e,t)=>t.length,mI={sum:aY,min:iY,max:sY,extent:lY,mean:uY,median:cY,unique:dY,uniqueCount:fY,count:pY},mY={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,r;return(t=(r=e.getValue())==null||r.toString==null?void 0:r.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Io("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(r=>r!=null&&r.includes(e.id)?r.filter(o=>o!==e.id):[...r??[],e.id])},e.getCanGroup=()=>{var r,o;return((r=e.columnDef.enableGrouping)!=null?r:!0)&&((o=t.options.enableGrouping)!=null?o:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.includes(e.id)},e.getGroupedIndex=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let r=e.getCanGroup();return()=>{r&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let r=t.getCoreRowModel().flatRows[0],o=r?.getValue(e.id);if(typeof o=="number")return mI.sum;if(Object.prototype.toString.call(o)==="[object Date]")return mI.extent},e.getAggregationFn=()=>{var r,o;if(!e)throw new Error;return py(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(r=(o=t.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?r:mI[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var r,o;e.setGrouping(t?[]:(r=(o=e.initialState)==null?void 0:o.grouping)!=null?r:[])},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=r=>{if(e._groupingValuesCache.hasOwnProperty(r))return e._groupingValuesCache[r];let o=t.getColumn(r);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[r]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[r]):e.getValue(r)},e._groupingValuesCache={}},createCell:(e,t,r,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===r.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var n;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((n=r.subRows)!=null&&n.length)}}};function gY(e,t,r){if(!(t!=null&&t.length)||!r)return e;let o=e.filter(a=>!t.includes(a.id));return r==="remove"?o:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...o]}var hY={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Io("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=me(r=>[Pm(t,r)],r=>r.findIndex(o=>o.id===e.id),ge(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=r=>{var o;return((o=Pm(t,r)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=r=>{var o;let n=Pm(t,r);return((o=n[n.length-1])==null?void 0:o.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var r;e.setColumnOrder(t?[]:(r=e.initialState.columnOrder)!=null?r:[])},e._getOrderColumnsFn=me(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,r,o)=>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 gY(a,r,o)},ge(e.options,"debugTable","_getOrderColumnsFn"))}},gI=()=>({left:[],right:[]}),vY={getInitialState:e=>({columnPinning:gI(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Io("columnPinning",e)}),createColumn:(e,t)=>{e.pin=r=>{let o=e.getLeafColumns().map(n=>n.id).filter(Boolean);t.setColumnPinning(n=>{var a,i;if(r==="right"){var s,l;return{left:((s=n?.left)!=null?s:[]).filter(d=>!(o!=null&&o.includes(d))),right:[...((l=n?.right)!=null?l:[]).filter(d=>!(o!=null&&o.includes(d))),...o]}}if(r==="left"){var u,c;return{left:[...((u=n?.left)!=null?u:[]).filter(d=>!(o!=null&&o.includes(d))),...o],right:((c=n?.right)!=null?c:[]).filter(d=>!(o!=null&&o.includes(d)))}}return{left:((a=n?.left)!=null?a:[]).filter(d=>!(o!=null&&o.includes(d))),right:((i=n?.right)!=null?i:[]).filter(d=>!(o!=null&&o.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var n,a,i;return((n=o.columnDef.enablePinning)!=null?n:!0)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{let r=e.getLeafColumns().map(s=>s.id),{left:o,right:n}=t.getState().columnPinning,a=r.some(s=>o?.includes(s)),i=r.some(s=>n?.includes(s));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var r,o;let n=e.getIsPinned();return n?(r=(o=t.getState().columnPinning)==null||(o=o[n])==null?void 0:o.indexOf(e.id))!=null?r:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(r,o,n)=>{let a=[...o??[],...n??[]];return r.filter(i=>!a.includes(i.column.id))},ge(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=me(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(r,o)=>(o??[]).map(a=>r.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],(r,o)=>(o??[]).map(a=>r.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 r,o;return e.setColumnPinning(t?gI():(r=(o=e.initialState)==null?void 0:o.columnPinning)!=null?r:gI())},e.getIsSomeColumnsPinned=t=>{var r;let o=e.getState().columnPinning;if(!t){var n,a;return!!((n=o.left)!=null&&n.length||(a=o.right)!=null&&a.length)}return!!((r=o[t])!=null&&r.length)},e.getLeftLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),ge(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),ge(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o)=>{let n=[...r??[],...o??[]];return t.filter(a=>!n.includes(a.id))},ge(e.options,"debugColumns","getCenterLeafColumns"))}};function xY(e){return e||(typeof document<"u"?document:null)}var dy={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},hI=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),yY={getDefaultColumnDef:()=>dy,getInitialState:e=>({columnSizing:{},columnSizingInfo:hI(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Io("columnSizing",e),onColumnSizingInfoChange:Io("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var r,o,n;let a=t.getState().columnSizing[e.id];return Math.min(Math.max((r=e.columnDef.minSize)!=null?r:dy.minSize,(o=a??e.columnDef.size)!=null?o:dy.size),(n=e.columnDef.maxSize)!=null?n:dy.maxSize)},e.getStart=me(r=>[r,Pm(t,r),t.getState().columnSizing],(r,o)=>o.slice(0,e.getIndex(r)).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getStart")),e.getAfter=me(r=>[r,Pm(t,r),t.getState().columnSizing],(r,o)=>o.slice(e.getIndex(r)+1).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(r=>{let{[e.id]:o,...n}=r;return n})},e.getCanResize=()=>{var r,o;return((r=e.columnDef.enableResizing)!=null?r:!0)&&((o=t.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let r=0,o=n=>{if(n.subHeaders.length)n.subHeaders.forEach(o);else{var a;r+=(a=n.column.getSize())!=null?a:0}};return o(e),r},e.getStart=()=>{if(e.index>0){let r=e.headerGroup.headers[e.index-1];return r.getStart()+r.getSize()}return 0},e.getResizeHandler=r=>{let o=t.getColumn(e.column.id),n=o?.getCanResize();return a=>{if(!o||!n||(a.persist==null||a.persist(),vI(a)&&a.touches&&a.touches.length>1))return;let i=e.getSize(),s=e?e.getLeafHeaders().map(h=>[h.column.id,h.column.getSize()]):[[o.id,o.getSize()]],l=vI(a)?Math.round(a.touches[0].clientX):a.clientX,u={},c=(h,v)=>{typeof v=="number"&&(t.setColumnSizingInfo(y=>{var C,w;let b=t.options.columnResizeDirection==="rtl"?-1:1,S=(v-((C=y?.startOffset)!=null?C:0))*b,I=Math.max(S/((w=y?.startSize)!=null?w: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=xY(r),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=CY()?{passive:!1}:!1;vI(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:o.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 r;e.setColumnSizing(t?{}:(r=e.initialState.columnSizing)!=null?r:{})},e.resetHeaderSizeInfo=t=>{var r;e.setColumnSizingInfo(t?hI():(r=e.initialState.columnSizingInfo)!=null?r:hI())},e.getTotalSize=()=>{var t,r;return(t=(r=e.getHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,r;return(t=(r=e.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,r;return(t=(r=e.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,r;return(t=(r=e.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0}}},fy=null;function CY(){if(typeof fy=="boolean")return fy;let e=!1;try{let t={get passive(){return e=!0,!1}},r=()=>{};window.addEventListener("test",r,t),window.removeEventListener("test",r)}catch{e=!1}return fy=e,fy}function vI(e){return e.type==="touchstart"}var wY={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Io("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=r=>{e.getCanHide()&&t.setColumnVisibility(o=>({...o,[e.id]:r??!e.getIsVisible()}))},e.getIsVisible=()=>{var r,o;let n=e.columns;return(r=n.length?n.some(a=>a.getIsVisible()):(o=t.getState().columnVisibility)==null?void 0:o[e.id])!=null?r:!0},e.getCanHide=()=>{var r,o;return((r=e.columnDef.enableHiding)!=null?r:!0)&&((o=t.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>r=>{e.toggleVisibility==null||e.toggleVisibility(r.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=me(()=>[e.getAllCells(),t.getState().columnVisibility],r=>r.filter(o=>o.column.getIsVisible()),ge(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=me(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,o,n)=>[...r,...o,...n],ge(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(r,o)=>me(()=>[o(),o().filter(n=>n.getIsVisible()).map(n=>n.id).join("_")],n=>n.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),ge(e.options,"debugColumns",r));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=r=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(r),e.resetColumnVisibility=r=>{var o;e.setColumnVisibility(r?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=r=>{var o;r=(o=r)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((n,a)=>({...n,[a.id]:r||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>r=>{var o;e.toggleAllColumnsVisible((o=r.target)==null?void 0:o.checked)}}};function Pm(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var SY={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()}}},bY={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Io("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var r;let o=(r=e.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[t.id])==null?void 0:r.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var r,o,n,a;return((r=e.columnDef.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!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=()=>fi.includesString,e.getGlobalFilterFn=()=>{var t,r;let{globalFilterFn:o}=e.options;return py(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[o])!=null?t:fi[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},RY={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Io("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,r=!1;e._autoResetExpanded=()=>{var o,n;if(!t){e._queue(()=>{t=!0});return}if((o=(n=e.options.autoResetAll)!=null?n:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(r)return;r=!0,e._queue(()=>{e.resetExpanded(),r=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var n,a;e.setExpanded(o?{}:(n=(a=e.initialState)==null?void 0:a.expanded)!=null?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{let o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(n=>!n.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{let i=a.split(".");o=Math.max(o,i.length)}),o},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=r=>{t.setExpanded(o=>{var n;let a=o===!0?!0:!!(o!=null&&o[e.id]),i={};if(o===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=o,r=(n=r)!=null?n:!a,!a&&r)return{...i,[e.id]:!0};if(a&&!r){let{[e.id]:s,...l}=i;return l}return o})},e.getIsExpanded=()=>{var r;let o=t.getState().expanded;return!!((r=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?r:o===!0||o?.[e.id])},e.getCanExpand=()=>{var r,o,n;return(r=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?r:((o=t.options.enableExpanding)!=null?o:!0)&&!!((n=e.subRows)!=null&&n.length)},e.getIsAllParentsExpanded=()=>{let r=!0,o=e;for(;r&&o.parentId;)o=t.getRow(o.parentId,!0),r=o.getIsExpanded();return r},e.getToggleExpandedHandler=()=>{let r=e.getCanExpand();return()=>{r&&e.toggleExpanded()}}}},wI=0,SI=10,xI=()=>({pageIndex:wI,pageSize:SI}),IY={getInitialState:e=>({...e,pagination:{...xI(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Io("pagination",e)}),createTable:e=>{let t=!1,r=!1;e._autoResetPageIndex=()=>{var o,n;if(!t){e._queue(()=>{t=!0});return}if((o=(n=e.options.autoResetAll)!=null?n:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(r)return;r=!0,e._queue(()=>{e.resetPageIndex(),r=!1})}},e.setPagination=o=>{let n=a=>Ps(o,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=o=>{var n;e.setPagination(o?xI():(n=e.initialState.pagination)!=null?n:xI())},e.setPageIndex=o=>{e.setPagination(n=>{let a=Ps(o,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=o=>{var n,a;e.setPageIndex(o?wI:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?n:wI)},e.resetPageSize=o=>{var n,a;e.setPageSize(o?SI:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?n:SI)},e.setPageSize=o=>{e.setPagination(n=>{let a=Math.max(1,Ps(o,n.pageSize)),i=n.pageSize*n.pageIndex,s=Math.floor(i/a);return{...n,pageIndex:s,pageSize:a}})},e.setPageCount=o=>e.setPagination(n=>{var a;let i=Ps(o,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=me(()=>[e.getPageCount()],o=>{let n=[];return o&&o>0&&(n=[...new Array(o)].fill(null).map((a,i)=>i)),n},ge(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:o}=e.getState().pagination,n=e.getPageCount();return n===-1?!0:n===0?!1:o<n-1},e.previousPage=()=>e.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+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 o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var o;return(o=e.options.rowCount)!=null?o:e.getPrePaginationRowModel().rows.length}}},yI=()=>({top:[],bottom:[]}),PY={getInitialState:e=>({rowPinning:yI(),...e}),getDefaultOptions:e=>({onRowPinningChange:Io("rowPinning",e)}),createRow:(e,t)=>{e.pin=(r,o,n)=>{let a=o?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(r==="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(r==="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 r;let{enableRowPinning:o,enablePinning:n}=t.options;return typeof o=="function"?o(e):(r=o??n)!=null?r:!0},e.getIsPinned=()=>{let r=[e.id],{top:o,bottom:n}=t.getState().rowPinning,a=r.some(s=>o?.includes(s)),i=r.some(s=>n?.includes(s));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var r,o;let n=e.getIsPinned();if(!n)return-1;let a=(r=n==="top"?t.getTopRows():t.getBottomRows())==null?void 0:r.map(i=>{let{id:s}=i;return s});return(o=a?.indexOf(e.id))!=null?o:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var r,o;return e.setRowPinning(t?yI():(r=(o=e.initialState)==null?void 0:o.rowPinning)!=null?r:yI())},e.getIsSomeRowsPinned=t=>{var r;let o=e.getState().rowPinning;if(!t){var n,a;return!!((n=o.top)!=null&&n.length||(a=o.bottom)!=null&&a.length)}return!!((r=o[t])!=null&&r.length)},e._getPinnedRows=(t,r,o)=>{var n;return((n=e.options.keepPinnedRows)==null||n?(r??[]).map(i=>{let s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(r??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:o}))},e.getTopRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,r)=>e._getPinnedRows(t,r,"top"),ge(e.options,"debugRows","getTopRows")),e.getBottomRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,r)=>e._getPinnedRows(t,r,"bottom"),ge(e.options,"debugRows","getBottomRows")),e.getCenterRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,r,o)=>{let n=new Set([...r??[],...o??[]]);return t.filter(a=>!n.has(a.id))},ge(e.options,"debugRows","getCenterRows"))}},LY={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Io("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 r;return e.setRowSelection(t?{}:(r=e.initialState.rowSelection)!=null?r:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(r=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();let o={...r},n=e.getPreGroupedRowModel().flatRows;return t?n.forEach(a=>{a.getCanSelect()&&(o[a.id]=!0)}):n.forEach(a=>{delete o[a.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(r=>{let o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),n={...r};return e.getRowModel().rows.forEach(a=>{bI(n,a.id,o,!0,e)}),n}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=me(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,r)=>Object.keys(t).length?CI(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=me(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?CI(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=me(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?CI(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:r}=e.getState(),o=!!(t.length&&Object.keys(r).length);return o&&t.some(n=>n.getCanSelect()&&!r[n.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(n=>n.getCanSelect()),{rowSelection:r}=e.getState(),o=!!t.length;return o&&t.some(n=>!r[n.id])&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var t;let r=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return r>0&&r<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(r,o)=>{let n=e.getIsSelected();t.setRowSelection(a=>{var i;if(r=typeof r<"u"?r:!n,e.getCanSelect()&&n===r)return a;let s={...a};return bI(s,e.id,r,(i=o?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:r}=t.getState();return TI(e,r)},e.getIsSomeSelected=()=>{let{rowSelection:r}=t.getState();return RI(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:r}=t.getState();return RI(e,r)==="all"},e.getCanSelect=()=>{var r;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(r=t.options.enableRowSelection)!=null?r:!0},e.getCanSelectSubRows=()=>{var r;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(r=t.options.enableSubRowSelection)!=null?r:!0},e.getCanMultiSelect=()=>{var r;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(r=t.options.enableMultiRowSelection)!=null?r:!0},e.getToggleSelectedHandler=()=>{let r=e.getCanSelect();return o=>{var n;r&&e.toggleSelected((n=o.target)==null?void 0:n.checked)}}}},bI=(e,t,r,o,n)=>{var a;let i=n.getRow(t,!0);r?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[t]=!0)):delete e[t],o&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>bI(e,s.id,r,o,n))};function CI(e,t){let r=e.getState().rowSelection,o=[],n={},a=function(i,s){return i.map(l=>{var u;let c=TI(l,r);if(c&&(o.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:o,rowsById:n}}function TI(e,t){var r;return(r=t[e.id])!=null?r:!1}function RI(e,t,r){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let n=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!n)&&(i.getCanSelect()&&(TI(i,t)?a=!0:n=!1),i.subRows&&i.subRows.length)){let s=RI(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),n=!1)}}),n?"all":a?"some":!1}var II=/([0-9]+)/gm,TY=(e,t,r)=>NB(Ls(e.getValue(r)).toLowerCase(),Ls(t.getValue(r)).toLowerCase()),kY=(e,t,r)=>NB(Ls(e.getValue(r)),Ls(t.getValue(r))),MY=(e,t,r)=>kI(Ls(e.getValue(r)).toLowerCase(),Ls(t.getValue(r)).toLowerCase()),EY=(e,t,r)=>kI(Ls(e.getValue(r)),Ls(t.getValue(r))),AY=(e,t,r)=>{let o=e.getValue(r),n=t.getValue(r);return o>n?1:o<n?-1:0},DY=(e,t,r)=>kI(e.getValue(r),t.getValue(r));function kI(e,t){return e===t?0:e>t?1:-1}function Ls(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function NB(e,t){let r=e.split(II).filter(Boolean),o=t.split(II).filter(Boolean);for(;r.length&&o.length;){let n=r.shift(),a=o.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 r.length-o.length}var Im={alphanumeric:TY,alphanumericCaseSensitive:kY,text:MY,textCaseSensitive:EY,datetime:AY,basic:DY},NY={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Io("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let r=t.getFilteredRowModel().flatRows.slice(10),o=!1;for(let n of r){let a=n?.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return Im.datetime;if(typeof a=="string"&&(o=!0,a.split(II).length>1))return Im.alphanumeric}return o?Im.text:Im.basic},e.getAutoSortDir=()=>{let r=t.getFilteredRowModel().flatRows[0];return typeof r?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var r,o;if(!e)throw new Error;return py(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(r=(o=t.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?r:Im[e.columnDef.sortingFn]},e.toggleSorting=(r,o)=>{let n=e.getNextSortingOrder(),a=typeof r<"u"&&r!==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?r:n==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&o?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 r,o;return((r=(o=e.columnDef.sortDescFirst)!=null?o:t.options.sortDescFirst)!=null?r:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=r=>{var o,n;let a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((o=t.options.enableSortingRemoval)==null||o)&&(!(r&&(n=t.options.enableMultiRemove)!=null)||n)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var r,o;return((r=e.columnDef.enableSorting)!=null?r:!0)&&((o=t.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var r,o;return(r=(o=e.columnDef.enableMultiSort)!=null?o:t.options.enableMultiSort)!=null?r:!!e.accessorFn},e.getIsSorted=()=>{var r;let o=(r=t.getState().sorting)==null?void 0:r.find(n=>n.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var r,o;return(r=(o=t.getState().sorting)==null?void 0:o.findIndex(n=>n.id===e.id))!=null?r:-1},e.clearSorting=()=>{t.setSorting(r=>r!=null&&r.length?r.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{let r=e.getCanSort();return o=>{r&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var r,o;e.setSorting(t?[]:(r=(o=e.initialState)==null?void 0:o.sorting)!=null?r:[])},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())}},OY=[rY,wY,hY,vY,oY,nY,SY,bY,NY,mY,RY,IY,PY,LY,yY];function OB(e){var t,r;let o=[...OY,...(t=e._features)!=null?t:[]],n={_features:o},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={...{},...(r=e.initialState)!=null?r:{}};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:o,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=Ps(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=tY(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 FB(){return e=>me(()=>[e.options.data],t=>{let r={rows:[],flatRows:[],rowsById:{}},o=function(n,a,i){a===void 0&&(a=0);let s=[];for(let u=0;u<n.length;u++){let c=PI(e,e._getRowId(n[u],u,i),n[u],u,a,void 0,i?.id);if(r.flatRows.push(c),r.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=o(c.originalSubRows,a+1,c))}}return s};return r.rows=o(t),r},ge(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function FY(e){let t=[],r=o=>{var n;t.push(o),(n=o.subRows)!=null&&n.length&&o.getIsExpanded()&&o.subRows.forEach(r)};return e.rows.forEach(r),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function _Y(e,t,r){return r.options.filterFromLeafRows?VY(e,t,r):BY(e,t,r)}function VY(e,t,r){var o;let n=[],a={},i=(o=r.options.maxLeafRowFilterDepth)!=null?o: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=PI(r,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 BY(e,t,r){var o;let n=[],a={},i=(o=r.options.maxLeafRowFilterDepth)!=null?o: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=PI(r,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 _B(){return e=>me(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,r,o)=>{if(!t.rows.length||!(r!=null&&r.length)&&!o){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}let n=[],a=[];(r??[]).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=(r??[]).map(f=>f.id),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());o&&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(o))!=null?p:o})}));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 _Y(t.rows,d,e)},ge(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function VB(e){return t=>me(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(r,o)=>{if(!o.rows.length)return o;let{pageSize:n,pageIndex:a}=r,{rows:i,flatRows:s,rowsById:l}=o,u=n*a,c=u+n;i=i.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:i,flatRows:s,rowsById:l}:d=FY({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 BB(){return e=>me(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,r)=>{if(!r.rows.length||!(t!=null&&t.length))return r;let o=e.getState().sorting,n=[],a=o.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),C=d.getValue(g.id),w=y===void 0,b=C===void 0;if(w||b){if(x==="first")return w?-1:1;if(x==="last")return w?1:-1;v=w&&b?0:w?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(r.rows),flatRows:n,rowsById:r.rowsById}},ge(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function MI(e,t){return e?HY(e)?Lm.createElement(e,t):e:null}function HY(e){return UY(e)||typeof e=="function"||zY(e)}function UY(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function zY(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function HB(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=Lm.useState(()=>({current:OB(t)})),[o,n]=Lm.useState(()=>r.current.initialState);return r.current.setOptions(a=>({...a,...e,state:{...o,...e.state},onStateChange:i=>{n(i),e.onStateChange==null||e.onStateChange(i)}})),r.current}var ft=R(M());var st=R(N()),UB=ft.createContext(null);function GY(e){return e==="asc"?"desc":e==="desc"?null:"asc"}var WY=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"}}),Tm=ft.forwardRef(({className:e,variant:t,size:r,loading:o,emptyContent:n,sortColumn:a,sortDirection:i,onSortChange:s,selectedRowIds:l,onRowSelectionChange:u,disableRowSelection:c,getRowId:d,...f},p)=>{let g=t==="striped",m=ft.useMemo(()=>({sortColumn:a,sortDirection:i,onSortChange:s}),[a,i,s]),x=ft.Children.map(f.children,h=>{if(ft.isValidElement(h)&&h.type==="tbody"){let v=h.props;return ft.cloneElement(h,{className:P(v.className,g&&"even:[&>tr]:bg-muted/50")})}return h});return(0,st.jsxs)("div",{className:"relative w-full overflow-auto",children:[o&&(0,st.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,st.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,st.jsx)(UB.Provider,{value:m,children:(0,st.jsx)("table",{ref:p,className:P(WY({variant:t,size:r}),o&&"opacity-70",e),...f,children:x})})]})});Tm.displayName="Table";var km=ft.forwardRef(({className:e,...t},r)=>(0,st.jsx)("thead",{ref:r,className:P("moonui-theme","[&_tr]:border-b",e),...t}));km.displayName="TableHeader";var Mm=ft.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:o,...n},a)=>{let i=ft.Children.count(o)>0;return(0,st.jsx)("tbody",{ref:a,className:P("moonui-theme","[&_tr:last-child]:border-0",e),...n,children:i?o:(0,st.jsx)("tr",{children:(0,st.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,st.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,st.jsx)("div",{className:"text-sm",children:r})})})})})});Mm.displayName="TableBody";var EI=ft.forwardRef(({className:e,...t},r)=>(0,st.jsx)("tfoot",{ref:r,className:P("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));EI.displayName="TableFooter";var eu=ft.forwardRef(({className:e,...t},r)=>(0,st.jsx)("tr",{ref:r,className:P("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));eu.displayName="TableRow";var Em=ft.forwardRef(({className:e,sortable:t,sorted:r,onSort:o,columnId:n,align:a="left",children:i,...s},l)=>{let u=ft.useContext(UB),c=n&&u&&u.sortColumn===n?u.sortDirection??null:null,d=r!==void 0?r:c,f=ft.useCallback(()=>{if(o){o();return}n&&u?.onSortChange&&u.onSortChange(n,GY(c))},[o,n,u,c]),p=!!(t&&(o||n&&u?.onSortChange)),g=()=>t?r==="asc"?(0,st.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,st.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"})}):r==="desc"?(0,st.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,st.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,st.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,st.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,m={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};return(0,st.jsx)("th",{ref:l,className:P("h-10 px-4 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",m[a].split(" ")[0],t&&"cursor-pointer hover:text-foreground select-none",e),"aria-sort":t?d==="asc"?"ascending":d==="desc"?"descending":"none":void 0,onClick:p?f:void 0,...s,children:t||a!=="left"?(0,st.jsxs)("div",{className:P("flex items-center",m[a].split(" ")[1]),role:p?"button":void 0,tabIndex:p?0:void 0,onKeyDown:p?x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),f())}:void 0,children:[i,t&&g()]}):i})});Em.displayName="TableHead";var id=ft.forwardRef(({className:e,align:t="left",...r},o)=>{let n={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,st.jsx)("td",{ref:o,className:P("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",n,e),...r})});id.displayName="TableCell";var AI=ft.forwardRef(({className:e,...t},r)=>(0,st.jsx)("caption",{ref:r,className:P("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));AI.displayName="TableCaption";var Ae=R(N());function zB({columns:e,data:t,enableSorting:r=!0,enablePagination:o=!0,enableSearch:n=!0,pageSize:a=10,searchPlaceholder:i="Search...",emptyMessage:s="No results found.",className:l}){let[u,c]=DI.useState([]),[d,f]=DI.useState(""),p=HB({data:t,columns:e,onSortingChange:r?c:void 0,onGlobalFilterChange:n?f:void 0,getCoreRowModel:FB(),getPaginationRowModel:o?VB():void 0,getSortedRowModel:r?BB():void 0,getFilteredRowModel:n?_B():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:a}}});return(0,Ae.jsxs)("div",{className:P("space-y-4",l),children:[n&&(0,Ae.jsx)("div",{className:"flex items-center",children:(0,Ae.jsxs)("div",{className:"relative max-w-sm",children:[(0,Ae.jsx)(cl,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Ae.jsx)(dr,{placeholder:i,value:d,onChange:g=>f(g.target.value),className:"pl-8"})]})}),(0,Ae.jsx)("div",{className:"rounded-md border",children:(0,Ae.jsxs)(Tm,{children:[(0,Ae.jsx)(km,{children:p.getHeaderGroups().map(g=>(0,Ae.jsx)(eu,{children:g.headers.map(m=>(0,Ae.jsx)(Em,{children:m.isPlaceholder?null:(0,Ae.jsxs)("div",{className:P("flex items-center gap-2",m.column.getCanSort()&&"cursor-pointer select-none"),onClick:m.column.getToggleSortingHandler(),children:[MI(m.column.columnDef.header,m.getContext()),r&&m.column.getCanSort()&&(0,Ae.jsx)("div",{className:"ml-auto",children:m.column.getIsSorted()==="desc"?(0,Ae.jsx)(Ku,{className:"h-4 w-4"}):m.column.getIsSorted()==="asc"?(0,Ae.jsx)(Yu,{className:"h-4 w-4"}):(0,Ae.jsx)(Xu,{className:"h-4 w-4 opacity-50"})})]})},m.id))},g.id))}),(0,Ae.jsx)(Mm,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(g=>(0,Ae.jsx)(eu,{"data-state":g.getIsSelected()&&"selected",children:g.getVisibleCells().map(m=>(0,Ae.jsx)(id,{children:MI(m.column.columnDef.cell,m.getContext())},m.id))},g.id)):(0,Ae.jsx)(eu,{children:(0,Ae.jsx)(id,{colSpan:e.length,className:"h-24 text-center",children:s})})})]})}),o&&(0,Ae.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Ae.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[p.getFilteredRowModel().rows.length," row(s)"]}),(0,Ae.jsxs)("div",{className:"space-x-2",children:[(0,Ae.jsxs)(Ee,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Ae.jsx)(Rn,{className:"h-4 w-4"}),"Previous"]}),(0,Ae.jsxs)("span",{className:"text-sm",children:["Page ",p.getState().pagination.pageIndex+1," of"," ",p.getPageCount()]}),(0,Ae.jsxs)(Ee,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Ae.jsx)(Vr,{className:"h-4 w-4"})]})]})]})]})}function GB(e){return({column:t})=>(0,Ae.jsxs)(Ee,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Ae.jsx)(Ku,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Ae.jsx)(Yu,{className:"ml-2 h-4 w-4"}):(0,Ae.jsx)(Xu,{className:"ml-2 h-4 w-4"})]})}var Dt=R(M());var ye=R(N()),jY={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},NI=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"}}),my=Dt.forwardRef(function({className:t,variant:r,size:o,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:C,...w},b){let[S,I]=Dt.useState(!1),[L,T]=Dt.useState(a);Dt.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&&vx(L)?jo(L,l):null,F=m||(0,ye.jsx)(al,{className:"h-4 w-4"});return(0,ye.jsx)("div",{ref:b,className:"moonui-theme",children:(0,ye.jsxs)(Ca,{open:S,onOpenChange:I,children:[(0,ye.jsx)(wa,{asChild:!0,children:(0,ye.jsxs)(Ee,{variant:r==="ghost"?"ghost":"outline",className:P(NI({variant:r,size:o,state:n}),!z&&"text-muted-foreground",t),disabled:C||h,...w,children:[(0,ye.jsx)(Ya,{mode:"wait",children:(0,ye.jsxs)(He.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&&!C&&(0,ye.jsxs)(He.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)(Bn,{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)(He.div,{...jY,className:"rounded-2xl bg-background overflow-hidden",children:[(0,ye.jsx)(Gc,{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)(Ee,{variant:"ghost",size:"sm",onClick:_,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]})})});my.displayName="DatePicker";var OI=Dt.forwardRef(function({className:t,value:r,onChange:o,placeholder:n="Pick a date range",formatString:a="LLL dd, y",separator:i=" - ",...s},l){let[u,c]=Dt.useState(!1),[d,f]=Dt.useState(r);Dt.useEffect(()=>{f(r)},[r]);let p=m=>{f(m),o?.(m),m?.from&&m?.to&&c(!1)},g=Dt.useMemo(()=>d?.from?d?.to?`${jo(d.from,a)}${i}${jo(d.to,a)}`:jo(d.from,a):null,[d,a,i]);return(0,ye.jsxs)(Ca,{open:u,onOpenChange:c,children:[(0,ye.jsx)(wa,{asChild:!0,children:(0,ye.jsxs)(Ee,{ref:l,variant:s.variant==="ghost"?"ghost":"outline",className:P(NI({variant:s.variant,size:s.size,state:s.state}),!g&&"text-muted-foreground",t),disabled:s.disabled||s.readOnly,children:[(0,ye.jsx)(al,{className:"mr-2 h-4 w-4"}),(0,ye.jsx)("span",{className:"flex-1 truncate text-left",children:g||n})]})}),(0,ye.jsx)(Bn,{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)(Gc,{mode:"range",defaultMonth:d?.from,selected:d,onSelect:p,showOutsideDays:!1,...s.calendarProps,className:"rounded-2xl"})})]})});OI.displayName="DateRangePicker";var FI=Dt.forwardRef(function({value:t,onChange:r,formatString:o="PPP",showTimePicker:n=!0,timeFormat:a="24",timeInterval:i=15,...s},l){let[u,c]=Dt.useState(t),[d,f]=Dt.useState(t?jo(t,a==="24"?"HH:mm":"hh:mm a"):"00:00"),p=x=>{if(!x){c(void 0),r?.(void 0);return}let[h,v]=d.split(":").map(Number);x.setHours(h,v),c(x),r?.(x)},g=x=>{let h=x.target.value;if(f(h),u){let[v,y]=h.split(":").map(Number),C=new Date(u);C.setHours(v,y),c(C),r?.(C)}},m=Dt.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"),C=v.toString().padStart(2,"0"),w=`${y}:${C}`;if(a==="12"){let b=h===0?12:h>12?h-12:h,S=h<12?"AM":"PM",I=`${b}:${C} ${S}`;x.push({value:w,label:I})}else x.push({value:w,label:w})}return x},[a,i]);return(0,ye.jsxs)("div",{ref:l,className:"flex flex-col gap-2",children:[(0,ye.jsx)(my,{...s,value:u,onChange:p,formatString:o,showTodayButton:!1}),n&&u&&(0,ye.jsxs)(He.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)(Df,{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))})]})]})});FI.displayName="DateTimePicker";var _I=Dt.forwardRef(function({value:t,onChange:r,placeholder:o="Pick a month",formatString:n="MMMM yyyy",...a},i){let[s,l]=Dt.useState(!1),[u,c]=Dt.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),r?.(x),l(!1)},p=m=>{let x=new Date(u);x.setFullYear(x.getFullYear()+m),c(x)},g=t?jo(t,n):null;return(0,ye.jsxs)(Ca,{open:s,onOpenChange:l,children:[(0,ye.jsx)(wa,{asChild:!0,children:(0,ye.jsxs)(Ee,{ref:i,variant:a.variant==="default"?"outline":a.variant||"outline",className:P(NI({variant:a.variant,size:a.size,state:a.state}),!g&&"text-muted-foreground",a.className),disabled:a.disabled||a.readOnly,children:[(0,ye.jsx)(al,{className:"mr-2 h-4 w-4"}),g||o]})}),(0,ye.jsx)(Bn,{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)(Ee,{variant:"outline",size:"icon","aria-label":`Previous year, ${u.getFullYear()-1}`,onClick:()=>p(-1),children:(0,ye.jsx)(Rn,{className:"h-4 w-4"})}),(0,ye.jsx)("span",{className:"font-semibold",children:u.getFullYear()}),(0,ye.jsx)(Ee,{variant:"outline",size:"icon","aria-label":`Next year, ${u.getFullYear()+1}`,onClick:()=>p(1),children:(0,ye.jsx)(Vr,{className:"h-4 w-4"})})]}),(0,ye.jsx)("div",{className:"grid grid-cols-3 gap-2",children:d.map((m,x)=>(0,ye.jsx)(Ee,{variant:t&&t.getMonth()===x?"primary":"outline",size:"sm",onClick:()=>f(x),className:"h-8 text-xs",children:m.slice(0,3)},m))})]})})]})});_I.displayName="MonthPicker";var WB=R(M());var VI=R(N());function jB({items:e,onReorder:t,renderItem:r,keyExtractor:o,className:n,disabled:a=!1}){let[i,s]=WB.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,VI.jsx)("div",{className:P("moonui-theme","space-y-2",n),children:e.map((f,p)=>(0,VI.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:r(f,p)},o(f)))})}var pi=R(M());var Wt=R(M(),1);var le=R(M(),1);var Ce=R(N(),1),BI=["Enter"," "],$Y=["ArrowDown","PageUp","Home"],qB=["ArrowUp","PageDown","End"],qY=[...$Y,...qB],KY={ltr:[...BI,"ArrowRight"],rtl:[...BI,"ArrowLeft"]},XY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Om="Menu",[Dm,YY,QY]=ea(Om),[tu,HI]=Fe(Om,[QY,Zo,td]),Fm=Zo(),KB=td(),[XB,Ts]=tu(Om),[ZY,_m]=tu(Om),YB=e=>{let{__scopeMenu:t,open:r=!1,children:o,dir:n,onOpenChange:a,modal:i=!0}=e,s=Fm(t),[l,u]=le.useState(null),c=le.useRef(!1),d=nt(a),f=sa(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,Ce.jsx)(si,{...s,children:(0,Ce.jsx)(XB,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,Ce.jsx)(ZY,{scope:t,onClose:le.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:i,children:o})})})};YB.displayName=Om;var JY="MenuAnchor",UI=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Fm(r);return(0,Ce.jsx)(li,{...n,...o,ref:t})});UI.displayName=JY;var zI="MenuPortal",[eQ,QB]=tu(zI,{forceMount:void 0}),ZB=e=>{let{__scopeMenu:t,forceMount:r,children:o,container:n}=e,a=Ts(zI,t);return(0,Ce.jsx)(eQ,{scope:t,forceMount:r,children:(0,Ce.jsx)(ut,{present:r||a.open,children:(0,Ce.jsx)(Ro,{asChild:!0,container:n,children:o})})})};ZB.displayName=zI;var en="MenuContent",[tQ,GI]=tu(en),JB=le.forwardRef((e,t)=>{let r=QB(en,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Ts(en,e.__scopeMenu),i=_m(en,e.__scopeMenu);return(0,Ce.jsx)(Dm.Provider,{scope:e.__scopeMenu,children:(0,Ce.jsx)(ut,{present:o||a.open,children:(0,Ce.jsx)(Dm.Slot,{scope:e.__scopeMenu,children:i.modal?(0,Ce.jsx)(rQ,{...n,ref:t}):(0,Ce.jsx)(oQ,{...n,ref:t})})})})}),rQ=le.forwardRef((e,t)=>{let r=Ts(en,e.__scopeMenu),o=le.useRef(null),n=de(t,o);return le.useEffect(()=>{let a=o.current;if(a)return ys(a)},[]),(0,Ce.jsx)(WI,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),oQ=le.forwardRef((e,t)=>{let r=Ts(en,e.__scopeMenu);return(0,Ce.jsx)(WI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),nQ=qr("MenuContent.ScrollLock"),WI=le.forwardRef((e,t)=>{let{__scopeMenu:r,loop:o=!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=Ts(en,r),h=_m(en,r),v=Fm(r),y=KB(r),C=YY(r),[w,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?ui:le.Fragment,F=g?{as:nQ,allowPinchZoom:!0}:void 0,O=A=>{let te=T.current+A,ae=C().filter(U=>!U.disabled),V=document.activeElement,Q=ae.find(U=>U.ref.current===V)?.textValue,re=ae.map(U=>U.textValue),Y=hQ(re,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),[]),ms();let B=le.useCallback(A=>_.current===E.current?.side&&xQ(A,E.current?.area),[]);return(0,Ce.jsx)(tQ,{scope:r,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,Ce.jsx)(z,{...F,children:(0,Ce.jsx)(ai,{asChild:!0,trapped:n,onMountAutoFocus:W(a,A=>{A.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,Ce.jsx)(Ko,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,Ce.jsx)(Qx,{asChild:!0,...y,dir:h.dir,orientation:"vertical",loop:o,currentTabStopId:w,onCurrentTabStopIdChange:b,onEntryFocus:W(l,A=>{h.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,Ce.jsx)(vs,{role:"menu","aria-orientation":"vertical","data-state":hH(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 re=S.current;if(A.target!==re||!qY.includes(A.key))return;A.preventDefault();let ce=C().filter(U=>!U.disabled).map(U=>U.ref.current);qB.includes(A.key)&&ce.reverse(),mQ(ce)}),onBlur:W(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(L.current),T.current="")}),onPointerMove:W(e.onPointerMove,Nm(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}}))})})})})})})});JB.displayName=en;var aQ="MenuGroup",jI=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,Ce.jsx)(q.div,{role:"group",...o,ref:t})});jI.displayName=aQ;var iQ="MenuLabel",eH=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,Ce.jsx)(q.div,{...o,ref:t})});eH.displayName=iQ;var gy="MenuItem",$B="menu.itemSelect",vy=le.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:o,...n}=e,a=le.useRef(null),i=_m(gy,e.__scopeMenu),s=GI(gy,e.__scopeMenu),l=de(t,a),u=le.useRef(!1),c=()=>{let d=a.current;if(!r&&d){let f=new CustomEvent($B,{bubbles:!0,cancelable:!0});d.addEventListener($B,p=>o?.(p),{once:!0}),$u(d,f),f.defaultPrevented?u.current=!1:i.onClose()}};return(0,Ce.jsx)(tH,{...n,ref:l,disabled:r,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!=="";r||f&&d.key===" "||BI.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});vy.displayName=gy;var tH=le.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:o=!1,textValue:n,...a}=e,i=GI(gy,r),s=KB(r),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,Ce.jsx)(Dm.ItemSlot,{scope:r,disabled:o,textValue:n??f,children:(0,Ce.jsx)(Zx,{asChild:!0,...s,focusable:!o,children:(0,Ce.jsx)(q.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:W(e.onPointerMove,Nm(g=>{o?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,Nm(g=>i.onItemLeave(g))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),sQ="MenuCheckboxItem",rH=le.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:o,...n}=e;return(0,Ce.jsx)(sH,{scope:e.__scopeMenu,checked:r,children:(0,Ce.jsx)(vy,{role:"menuitemcheckbox","aria-checked":hy(r)?"mixed":r,...n,ref:t,"data-state":KI(r),onSelect:W(n.onSelect,()=>o?.(hy(r)?!0:!r),{checkForDefaultPrevented:!1})})})});rH.displayName=sQ;var oH="MenuRadioGroup",[lQ,uQ]=tu(oH,{value:void 0,onValueChange:()=>{}}),nH=le.forwardRef((e,t)=>{let{value:r,onValueChange:o,...n}=e,a=nt(o);return(0,Ce.jsx)(lQ,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,Ce.jsx)(jI,{...n,ref:t})})});nH.displayName=oH;var aH="MenuRadioItem",iH=le.forwardRef((e,t)=>{let{value:r,...o}=e,n=uQ(aH,e.__scopeMenu),a=r===n.value;return(0,Ce.jsx)(sH,{scope:e.__scopeMenu,checked:a,children:(0,Ce.jsx)(vy,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":KI(a),onSelect:W(o.onSelect,()=>n.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});iH.displayName=aH;var $I="MenuItemIndicator",[sH,cQ]=tu($I,{checked:!1}),lH=le.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:o,...n}=e,a=cQ($I,r);return(0,Ce.jsx)(ut,{present:o||hy(a.checked)||a.checked===!0,children:(0,Ce.jsx)(q.span,{...n,ref:t,"data-state":KI(a.checked)})})});lH.displayName=$I;var dQ="MenuSeparator",uH=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,Ce.jsx)(q.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});uH.displayName=dQ;var fQ="MenuArrow",cH=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Fm(r);return(0,Ce.jsx)(xs,{...n,...o,ref:t})});cH.displayName=fQ;var qI="MenuSub",[pQ,dH]=tu(qI),fH=e=>{let{__scopeMenu:t,children:r,open:o=!1,onOpenChange:n}=e,a=Ts(qI,t),i=Fm(t),[s,l]=le.useState(null),[u,c]=le.useState(null),d=nt(n);return le.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,Ce.jsx)(si,{...i,children:(0,Ce.jsx)(XB,{scope:t,open:o,onOpenChange:d,content:u,onContentChange:c,children:(0,Ce.jsx)(pQ,{scope:t,contentId:Ne(),triggerId:Ne(),trigger:s,onTriggerChange:l,children:r})})})};fH.displayName=qI;var Am="MenuSubTrigger",pH=le.forwardRef((e,t)=>{let r=Ts(Am,e.__scopeMenu),o=_m(Am,e.__scopeMenu),n=dH(Am,e.__scopeMenu),a=GI(Am,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,Ce.jsx)(UI,{asChild:!0,...u,children:(0,Ce.jsx)(tH,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":n.contentId,"data-state":hH(r.open),...e,ref:fo(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,Nm(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),c()},100))})),onPointerLeave:W(e.onPointerLeave,Nm(d=>{c();let f=r.content?.getBoundingClientRect();if(f){let p=r.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===" "||KY[o.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});pH.displayName=Am;var mH="MenuSubContent",gH=le.forwardRef((e,t)=>{let r=QB(en,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Ts(en,e.__scopeMenu),i=_m(en,e.__scopeMenu),s=dH(mH,e.__scopeMenu),l=le.useRef(null),u=de(t,l);return(0,Ce.jsx)(Dm.Provider,{scope:e.__scopeMenu,children:(0,Ce.jsx)(ut,{present:o||a.open,children:(0,Ce.jsx)(Dm.Slot,{scope:e.__scopeMenu,children:(0,Ce.jsx)(WI,{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=XY[i.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});gH.displayName=mH;function hH(e){return e?"open":"closed"}function hy(e){return e==="indeterminate"}function KI(e){return hy(e)?"indeterminate":e?"checked":"unchecked"}function mQ(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function gQ(e,t){return e.map((r,o)=>e[(t+o)%e.length])}function hQ(e,t,r){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=gQ(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==r));let l=i.find(u=>u.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function vQ(e,t){let{x:r,y:o}=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>o!=f>o&&r<(d-u)*(o-c)/(f-c)+u&&(n=!n)}return n}function xQ(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return vQ(r,t)}function Nm(e){return t=>t.pointerType==="mouse"?e(t):void 0}var vH=YB,xH=UI,yH=ZB,CH=JB,wH=jI,SH=eH,bH=vy,RH=rH,IH=nH,PH=iH,LH=lH,TH=uH,kH=cH,MH=fH,EH=pH,AH=gH;var Gt=R(N(),1),xy="DropdownMenu",[CQ,yke]=Fe(xy,[HI]),kr=HI(),[wQ,DH]=CQ(xy),NH=e=>{let{__scopeDropdownMenu:t,children:r,dir:o,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=kr(t),u=Wt.useRef(null),[c,d]=qe({prop:n,defaultProp:a??!1,onChange:i,caller:xy});return(0,Gt.jsx)(wQ,{scope:t,triggerId:Ne(),triggerRef:u,contentId:Ne(),open:c,onOpenChange:d,onOpenToggle:Wt.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,Gt.jsx)(vH,{...l,open:c,onOpenChange:d,dir:o,modal:s,children:r})})};NH.displayName=xy;var OH="DropdownMenuTrigger",FH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:o=!1,...n}=e,a=DH(OH,r),i=kr(r);return(0,Gt.jsx)(xH,{asChild:!0,...i,children:(0,Gt.jsx)(q.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":o?"":void 0,disabled:o,...n,ref:fo(t,a.triggerRef),onPointerDown:W(e.onPointerDown,s=>{!o&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:W(e.onKeyDown,s=>{o||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});FH.displayName=OH;var SQ="DropdownMenuPortal",_H=e=>{let{__scopeDropdownMenu:t,...r}=e,o=kr(t);return(0,Gt.jsx)(yH,{...o,...r})};_H.displayName=SQ;var VH="DropdownMenuContent",BH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=DH(VH,r),a=kr(r),i=Wt.useRef(!1);return(0,Gt.jsx)(CH,{id:n.contentId,"aria-labelledby":n.triggerId,...a,...o,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)"}})});BH.displayName=VH;var bQ="DropdownMenuGroup",HH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=kr(r);return(0,Gt.jsx)(wH,{...n,...o,ref:t})});HH.displayName=bQ;var RQ="DropdownMenuLabel",UH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=kr(r);return(0,Gt.jsx)(SH,{...n,...o,ref:t})});UH.displayName=RQ;var IQ="DropdownMenuItem",zH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=kr(r);return(0,Gt.jsx)(bH,{...n,...o,ref:t})});zH.displayName=IQ;var PQ="DropdownMenuCheckboxItem",GH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=kr(r);return(0,Gt.jsx)(RH,{...n,...o,ref:t})});GH.displayName=PQ;var LQ="DropdownMenuRadioGroup",WH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=kr(r);return(0,Gt.jsx)(IH,{...n,...o,ref:t})});WH.displayName=LQ;var TQ="DropdownMenuRadioItem",jH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=kr(r);return(0,Gt.jsx)(PH,{...n,...o,ref:t})});jH.displayName=TQ;var kQ="DropdownMenuItemIndicator",$H=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=kr(r);return(0,Gt.jsx)(LH,{...n,...o,ref:t})});$H.displayName=kQ;var MQ="DropdownMenuSeparator",qH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=kr(r);return(0,Gt.jsx)(TH,{...n,...o,ref:t})});qH.displayName=MQ;var EQ="DropdownMenuArrow",AQ=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=kr(r);return(0,Gt.jsx)(kH,{...n,...o,ref:t})});AQ.displayName=EQ;var DQ=e=>{let{__scopeDropdownMenu:t,children:r,open:o,onOpenChange:n,defaultOpen:a}=e,i=kr(t),[s,l]=qe({prop:o,defaultProp:a??!1,onChange:n,caller:"DropdownMenuSub"});return(0,Gt.jsx)(MH,{...i,open:s,onOpenChange:l,children:r})},NQ="DropdownMenuSubTrigger",KH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=kr(r);return(0,Gt.jsx)(EH,{...n,...o,ref:t})});KH.displayName=NQ;var OQ="DropdownMenuSubContent",XH=Wt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=kr(r);return(0,Gt.jsx)(AH,{...n,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});XH.displayName=OQ;var YH=NH,QH=FH,XI=_H,YI=BH,ZH=HH,QI=UH,ZI=zH,JI=GH,JH=WH,eP=jH,tP=$H,rP=qH;var eU=DQ,oP=KH,nP=XH;var jt=R(N()),tU=YH,rU=QH,oU=ZH,nU=XI,aU=eU,iU=JH,aP=pi.forwardRef(({className:e,inset:t,children:r,...o},n)=>(0,jt.jsxs)(oP,{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),...o,children:[r,(0,jt.jsx)(Vr,{className:"ml-auto h-4 w-4"})]}));aP.displayName=oP.displayName;var iP=pi.forwardRef(({className:e,...t},r)=>(0,jt.jsx)(nP,{ref:r,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}));iP.displayName=nP.displayName;var sP=pi.forwardRef(({className:e,sideOffset:t=4,...r},o)=>(0,jt.jsx)(XI,{children:(0,jt.jsx)(YI,{ref:o,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),...r})}));sP.displayName=YI.displayName;var lP=pi.forwardRef(({className:e,inset:t,...r},o)=>(0,jt.jsx)(ZI,{ref:o,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),...r}));lP.displayName=ZI.displayName;var uP=pi.forwardRef(({className:e,children:t,checked:r,...o},n)=>(0,jt.jsxs)(JI,{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:r,...o,children:[(0,jt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,jt.jsx)(tP,{children:(0,jt.jsx)(Cr,{className:"h-4 w-4"})})}),t]}));uP.displayName=JI.displayName;var cP=pi.forwardRef(({className:e,children:t,...r},o)=>(0,jt.jsxs)(eP,{ref:o,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),...r,children:[(0,jt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,jt.jsx)(tP,{children:(0,jt.jsx)(il,{className:"h-2 w-2 fill-current"})})}),t]}));cP.displayName=eP.displayName;var dP=pi.forwardRef(({className:e,inset:t,...r},o)=>(0,jt.jsx)(QI,{ref:o,className:P("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));dP.displayName=QI.displayName;var fP=pi.forwardRef(({className:e,...t},r)=>(0,jt.jsx)(rP,{ref:r,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));fP.displayName=rP.displayName;var pP=({className:e,...t})=>(0,jt.jsx)("span",{className:P("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});pP.displayName="DropdownMenuShortcut";var Po=R(M());var sU=R(M());var mi=R(N()),lU=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"}}),_Q=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"}}),Vm=sU.forwardRef(({className:e,value:t=0,variant:r,size:o,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,mi.jsxs)(mi.Fragment,{children:[s&&(0,mi.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,mi.jsx)("span",{className:P("text-sm font-medium text-muted-foreground",u),children:x})}),(0,mi.jsx)("div",{ref:p,className:P("moonui-theme",lU({variant:r,size:o,radius:n,animation:a}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:g,...f,children:(0,mi.jsx)("div",{className:P(_Q({variant:i??r??"primary",animation:a}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-m}%)`}})})]})});Vm.displayName="Progress";var ve=R(N()),VQ=e=>e.startsWith("image/")?(0,ve.jsx)(ll,{className:"h-4 w-4"}):e.startsWith("video/")?(0,ve.jsx)(rp,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,ve.jsx)(qf,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,ve.jsx)(Bf,{className:"h-4 w-4"}):(0,ve.jsx)(Hf,{className:"h-4 w-4"}),mP=e=>{if(e===0)return"0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,o)).toFixed(2))+" "+r[o]},BQ=({uploadedFile:e,onRemove:t})=>{let{id:r,file:o,progress:n,status:a,preview:i}=e;return(0,ve.jsxs)(He.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:o.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:VQ(o.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:o.name}),(0,ve.jsx)(Ee,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(r),"aria-label":`Remove ${o.name}`,children:(0,ve.jsx)(yo,{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:mP(o.size)}),a==="uploading"&&(0,ve.jsxs)(Br,{variant:"secondary",className:"h-5",children:[(0,ve.jsx)(Ht,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,ve.jsxs)(Br,{variant:"success",className:"h-5",children:[(0,ve.jsx)(ji,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,ve.jsxs)(Br,{variant:"destructive",className:"h-5",children:[(0,ve.jsx)(In,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,ve.jsx)("div",{className:"mt-2",children:(0,ve.jsx)(Vm,{value:n,className:"h-1"})})]})]})},gP=Po.default.forwardRef(({accept:e="*",multiple:t=!0,maxSize:r=10*1024*1024,maxFiles:o=5,disabled:n=!1,className:a,onUpload:i,onRemove:s,children:l,...u},c)=>{let[d,f]=(0,Po.useState)([]),[p,g]=(0,Po.useState)(!1),[m,x]=(0,Po.useState)(null),h=I=>I.size>r?`File size exceeds ${mP(r)}`: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,Po.useCallback)(async I=>{let L=Array.from(I);if(x(null),d.length+L.length>o){x(`Maximum ${o} 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,o,r,e,i]),y=(0,Po.useCallback)(I=>{if(I.preventDefault(),g(!1),n)return;let L=I.dataTransfer.files;L.length>0&&v(L)},[v,n]),C=(0,Po.useCallback)(I=>{I.preventDefault(),n||g(!0)},[n]),w=(0,Po.useCallback)(I=>{I.preventDefault(),g(!1)},[]),b=(0,Po.useCallback)(I=>{let L=I.target.files;L&&L.length>0&&v(L),I.target.value=""},[v]),S=(0,Po.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)(He.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:C,onDragLeave:w,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)(tp,{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 ",o," files, ",mP(r)," each"]})]}),(0,ve.jsx)(Ee,{variant:"outline",disabled:n,children:"Select Files"})]})]}),(0,ve.jsx)(Ya,{children:m&&(0,ve.jsxs)(He.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)(In,{className:"h-4 w-4"}),(0,ve.jsx)("span",{children:m})]})}),(0,ve.jsx)(Ya,{children:d.length>0&&(0,ve.jsxs)(He.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)(Ya,{children:d.map(I=>(0,ve.jsx)(BQ,{uploadedFile:I,onRemove:S},I.id))})})]})})]})});gP.displayName="FileUpload";var uU=R(M());var ru=R(N()),hP=uU.default.forwardRef(({children:e,isOpen:t,onOpenChange:r,direction:o="up",threshold:n=50,className:a,overlayClassName:i,enableSwipeToClose:s=!0,...l},u)=>{let c=Vc(0),d=Vc(0),f=o==="up"||o==="down",p=f?c:d,g=Cb(p,[0,n],[1,.5]),m=(v,y)=>{if(!s)return;let C=f?y.offset.y:y.offset.x,w=f?y.velocity.y:y.velocity.x,b=!1;switch(o){case"up":b=C>n||w>500;break;case"down":b=C<-n||w<-500;break;case"left":b=C>n||w>500;break;case"right":b=C<-n||w<-500;break}b?r(!1):Sb(p,0,{type:"spring",stiffness:300,damping:20})},x=()=>{switch(o){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,ru.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,ru.jsx)(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(!1),className:P("absolute inset-0 bg-black/50",i)}),(0,ru.jsxs)(He.div,{ref:u,drag:s?f?"y":"x":!1,dragConstraints:{top:o==="up"?0:void 0,bottom:o==="down"?0:void 0,left:o==="left"?0:void 0,right:o==="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":o==="up","top-0 left-0 right-0 rounded-b-lg":o==="down","top-0 bottom-0 right-0 rounded-l-lg":o==="left","top-0 bottom-0 left-0 rounded-r-lg":o==="right"},a),...l,children:[(o==="up"||o==="down")&&(0,ru.jsx)("div",{className:"flex justify-center p-2",children:(0,ru.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});hP.displayName="GestureDrawer";var ks=R(M());var Je=R(N());function cU({className:e,size:t="md",showForks:r=!0,showWatchers:o=!1,repoUrl:n="https://github.com/moonui/moonui"}){let[a,i]=(0,ks.useState)(null),[s,l]=(0,ks.useState)(!0);(0,ks.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,Je.jsxs)("div",{className:P("flex items-center animate-pulse",c[t],e),children:[(0,Je.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Je.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Je.jsx)("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),r&&(0,Je.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Je.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Je.jsx)("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):a?(0,Je.jsxs)("div",{className:P("flex items-center",c[t],e),children:[(0,Je.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,Je.jsx)($i,{className:"fill-current text-yellow-500",size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.stars)})]}),r&&(0,Je.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,Je.jsx)(Uf,{size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.forks)})]}),o&&(0,Je.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,Je.jsx)(sl,{size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.watchers)})]}),!a.isLive&&(0,Je.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function HQ({className:e,size:t="md",repoUrl:r="https://github.com/moonui/moonui"}){let[o,n]=(0,ks.useState)(null),[a,i]=(0,ks.useState)(!0);(0,ks.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,Je.jsx)(Ee,{variant:"outline",size:t,className:P("moonui-theme","group",e),asChild:!0,children:(0,Je.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,Je.jsx)($i,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,Je.jsx)("span",{children:"Star on GitHub"}),!a&&o&&(0,Je.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-800 rounded-full text-xs font-medium",children:s(o)}),(0,Je.jsx)(Vf,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var ou=R(M());var Se=R(M(),1),Cy=R(M(),1),zn=R(M(),1),UQ=Object.defineProperty,zQ=Object.defineProperties,GQ=Object.getOwnPropertyDescriptors,yy=Object.getOwnPropertySymbols,fU=Object.prototype.hasOwnProperty,pU=Object.prototype.propertyIsEnumerable,dU=(e,t,r)=>t in e?UQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,WQ=(e,t)=>{for(var r in t||(t={}))fU.call(t,r)&&dU(e,r,t[r]);if(yy)for(var r of yy(t))pU.call(t,r)&&dU(e,r,t[r]);return e},jQ=(e,t)=>zQ(e,GQ(t)),$Q=(e,t)=>{var r={};for(var o in e)fU.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&yy)for(var o of yy(e))t.indexOf(o)<0&&pU.call(e,o)&&(r[o]=e[o]);return r};function qQ(e){let t=setTimeout(e,0),r=setTimeout(e,10),o=setTimeout(e,50);return[t,r,o]}function KQ(e){let t=Cy.useRef();return Cy.useEffect(()=>{t.current=e}),t.current}var XQ=18,mU=40,YQ=`${mU}px`,QQ=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function ZQ({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:o}){let[n,a]=zn.useState(!1),[i,s]=zn.useState(!1),[l,u]=zn.useState(!1),c=zn.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&n&&i,[n,i,r]),d=zn.useCallback(()=>{let f=e.current,p=t.current;if(!f||!p||l||r==="none")return;let g=f,m=g.getBoundingClientRect().left+g.offsetWidth,x=g.getBoundingClientRect().top+g.offsetHeight/2,h=m-XQ,v=x;document.querySelectorAll(QQ).length===0&&document.elementFromPoint(h,v)===f||(a(!0),u(!0))},[e,t,l,r]);return zn.useEffect(()=>{let f=e.current;if(!f||r==="none")return;function p(){let m=window.innerWidth-f.getBoundingClientRect().right;s(m>=mU)}p();let g=setInterval(p,1e3);return()=>{clearInterval(g)}},[e,r]),zn.useEffect(()=>{let f=o||document.activeElement===t.current;if(r==="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,o,r,d]),{hasPWMBadge:n,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:YQ}}var vP=Se.createContext({}),xP=Se.forwardRef((e,t)=>{var r=e,{value:o,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=JQ,render:m,children:x}=r,h=$Q(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),v,y,C,w,b;let[S,I]=Se.useState(typeof h.defaultValue=="string"?h.defaultValue:""),L=o??S,T=KQ(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:[(C=_.current)==null?void 0:C.selectionStart,(w=_.current)==null?void 0:w.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 Ge(){if(document.activeElement!==J){V(null),re(null);return}let Oe=J.selectionStart,Rt=J.selectionEnd,Yn=J.selectionDirection,Dr=J.maxLength,pn=J.value,Mo=F.current.prev,mn=-1,Qn=-1,Zn;if(pn.length!==0&&Oe!==null&&Rt!==null){let Ld=Oe===Rt,Td=Oe===pn.length&&pn.length<Dr;if(Ld&&!Td){let Eo=Oe;if(Eo===0)mn=0,Qn=1,Zn="forward";else if(Eo===Dr)mn=Eo-1,Qn=Eo,Zn="backward";else if(Dr>1&&pn.length>1){let kd=0;if(Mo[0]!==null&&Mo[1]!==null){Zn=Eo<Mo[1]?"backward":"forward";let d0=Mo[0]===Mo[1]&&Mo[0]<Dr;Zn==="backward"&&!d0&&(kd=-1)}mn=kd+Eo,Qn=kd+Eo+1}}mn!==-1&&Qn!==-1&&mn!==Qn&&_.current.setSelectionRange(mn,Qn,Zn)}let ig=mn!==-1?mn:Oe,mu=Qn!==-1?Qn:Rt,Si=Zn??Yn;V(ig),re(mu),F.current.prev=[ig,mu,Si]}if(document.addEventListener("selectionchange",Ge,{capture:!0}),Ge(),document.activeElement===J&&te(!0),!document.getElementById("input-otp-style")){let Oe=document.createElement("style");if(Oe.id="input-otp-style",document.head.appendChild(Oe),Oe.sheet){let Rt="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;";Bm(Oe.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Bm(Oe.sheet,`[data-input-otp]:autofill { ${Rt} }`),Bm(Oe.sheet,`[data-input-otp]:-webkit-autofill { ${Rt} }`),Bm(Oe.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; } }"),Bm(Oe.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Xe=()=>{ie&&ie.style.setProperty("--root-height",`${J.clientHeight}px`)};Xe();let kt=new ResizeObserver(Xe);return kt.observe(J),()=>{document.removeEventListener("selectionchange",Ge,{capture:!0}),kt.disconnect()}},[]);let[O,B]=Se.useState(!1),[A,te]=Se.useState(!1),[ae,V]=Se.useState(null),[Q,re]=Se.useState(null);Se.useEffect(()=>{qQ(()=>{var J,ie,Ge,Xe;(J=_.current)==null||J.dispatchEvent(new Event("input"));let kt=(ie=_.current)==null?void 0:ie.selectionStart,Oe=(Ge=_.current)==null?void 0:Ge.selectionEnd,Rt=(Xe=_.current)==null?void 0:Xe.selectionDirection;kt!==null&&Oe!==null&&(V(kt),re(Oe),F.current.prev=[kt,Oe,Rt])})},[L,A]),Se.useEffect(()=>{T!==void 0&&L!==T&&T.length<a&&L.length===a&&c?.(L)},[a,c,T,L]);let Y=ZQ({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),Ge=_.current.value.length;(J=_.current)==null||J.setSelectionRange(ie,Ge),V(ie),re(Ge)}te(!0)},[a]),ne=Se.useCallback(J=>{var ie,Ge;let Xe=_.current;if(!f&&(!z.current.isIOS||!J.clipboardData||!Xe))return;let kt=J.clipboardData.getData("text/plain"),Oe=f?f(kt):kt;J.preventDefault();let Rt=(ie=_.current)==null?void 0:ie.selectionStart,Yn=(Ge=_.current)==null?void 0:Ge.selectionEnd,Dr=(Rt!==Yn?L.slice(0,Rt)+Oe+L.slice(Yn):L.slice(0,Rt)+Oe+L.slice(Rt)).slice(0,a);if(Dr.length>0&&E&&!E.test(Dr))return;Xe.value=Dr,k(Dr);let pn=Math.min(Dr.length,a-1),Mo=Dr.length;Xe.setSelectionRange(pn,Mo),V(pn),re(Mo)},[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",jQ(WQ({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 Ge;let Xe=A&&ae!==null&&Q!==null&&(ae===Q&&ie===ae||ie>=ae&&ie<Q),kt=L[ie]!==void 0?L[ie]:null,Oe=L[0]!==void 0?null:(Ge=l?.[ie])!=null?Ge:null;return{char:kt,placeholderChar:Oe,isActive:Xe,hasFakeCaret:Xe&&kt===null}}),isFocused:A,isHovering:!h.disabled&&O}),[A,O,a,Q,ae,h.disabled,L]),Ie=Se.useMemo(()=>m?m(X):Se.createElement(vP.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)))});xP.displayName="Input";function Bm(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var JQ=`
|
|
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
|
-
}`,uU="^\\d+$",cU="^[a-zA-Z]+$",dU="^[a-zA-Z0-9]+$";var mi=R(N()),vP=tu.forwardRef(({className:e,containerClassName:t,...r},o)=>(0,mi.jsx)(hP,{ref:o,"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),...r}));vP.displayName="InputOTP";var xP=tu.forwardRef(({className:e,...t},r)=>(0,mi.jsx)("div",{ref:r,className:P("flex items-center",e),...t}));xP.displayName="InputOTPGroup";var yP=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}}),wP=tu.forwardRef(({index:e,className:t,...r},o)=>{let a=tu.useContext(gP)?.slots?.[e],i=a?.char,s=a?.hasFakeCaret,l=a?.isActive;return(0,mi.jsxs)("div",{ref:o,"data-active":l?"":void 0,className:P(yP({isActive:!!l}),t),...r,children:[i,s&&(0,mi.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,mi.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});wP.displayName="InputOTPSlot";var CP=tu.forwardRef(({className:e,...t},r)=>(0,mi.jsx)("div",{ref:r,role:"separator",className:P("text-muted-foreground",e),...t,children:(0,mi.jsx)(Of,{"aria-hidden":"true"})}));CP.displayName="InputOTPSeparator";var ad=R(M());var Ce=R(N());function SP({children:e,componentName:t,className:r,showPreview:o=!0,previewDuration:n=2e3}){let[a,i]=(0,ad.useState)(!1),[s,l]=(0,ad.useState)(null),u=()=>{if(!o)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",r),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)(_r,{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)(Xu,{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)(Qu,{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)(Ee,{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)(Zu,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),o&&!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 fU({children:e,componentId:t,componentName:r,className:o,fallback:n,requireCLI:a=!0}){let[i,s]=(0,ad.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,ad.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",o),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",o),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)(_r,{variant:"destructive",className:"mb-2",children:[(0,Ce.jsx)(Qu,{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",o),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)(_r,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,Ce.jsx)(Zu,{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)(Ee,{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)(SP,{componentName:r||t,className:o,children:n||e})}return(0,Ce.jsx)("div",{className:o,children:e})}function pU({className:e}){return(0,Ce.jsxs)(_r,{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)(Xu,{className:"w-3 h-3 mr-1"}),"PRO"]})}function mU({className:e}){return(0,Ce.jsx)(_r,{variant:"outline",className:P("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var gU=R(M());var Zt=R(N());function wy({className:e,variant:t="default",showText:r=!0,...o}){let n=gU.useId(),a=`moon-gradient-${n}`,i=`moon-mask-${n}`;return(0,Zt.jsxs)("div",{className:P("flex items-center gap-2",e),children:[(0,Zt.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",...o,children:[(0,Zt.jsxs)("defs",{children:[t==="gradient"&&(0,Zt.jsxs)("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,Zt.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,Zt.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,Zt.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]}),(0,Zt.jsxs)("mask",{id:i,children:[(0,Zt.jsx)("rect",{width:"32",height:"32",fill:"white"}),(0,Zt.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),(0,Zt.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${a})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${i})`})]}),r&&(0,Zt.jsxs)("span",{className:"text-xl font-bold",children:[(0,Zt.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,Zt.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function YQ({className:e,variant:t="default",...r}){return(0,Zt.jsx)(wy,{showText:!1,className:e,variant:t,...r})}function QQ({className:e,variant:t="default",showText:r=!0,...o}){return(0,Zt.jsx)(wy,{className:P("transition-all duration-300 hover:scale-105",e),variant:t,showText:r,...o})}var bP=R(M());var Gr=R(N()),RP=({className:e,...t})=>(0,Gr.jsx)("nav",{role:"navigation","aria-label":"pagination",className:P("moonui-theme","mx-auto flex w-full justify-center",e),...t});RP.displayName="Pagination";var IP=bP.forwardRef(({className:e,...t},r)=>(0,Gr.jsx)("ul",{ref:r,className:P("moonui-theme","flex flex-row items-center gap-1",e),...t}));IP.displayName="PaginationContent";var PP=bP.forwardRef(({className:e,...t},r)=>(0,Gr.jsx)("li",{ref:r,className:P("moonui-theme","",e),...t}));PP.displayName="PaginationItem";var Bm=({className:e,isActive:t,size:r="icon",...o})=>(0,Gr.jsx)("a",{"aria-current":t?"page":void 0,className:P(ap({variant:t?"outline":"ghost",size:r}),e),...o});Bm.displayName="PaginationLink";var LP=({className:e,...t})=>(0,Gr.jsxs)(Bm,{"aria-label":"Go to previous page",size:"md",className:P("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Gr.jsx)(bn,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{children:"Previous"})]});LP.displayName="PaginationPrevious";var TP=({className:e,...t})=>(0,Gr.jsxs)(Bm,{"aria-label":"Go to next page",size:"md",className:P("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Gr.jsx)("span",{children:"Next"}),(0,Gr.jsx)(Fr,{className:"h-4 w-4"})]});TP.displayName="PaginationNext";var kP=({className:e,...t})=>(0,Gr.jsxs)("span",{"aria-hidden":!0,className:P("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Gr.jsx)(la,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{className:"sr-only",children:"More pages"})]});kP.displayName="PaginationEllipsis";var zm=R(M());var Es=R(M());var Z=R(M(),1),_P=R(Va(),1);function MP(e,[t,r]){return Math.min(r,Math.max(t,e))}var hU=R(M(),1);var vU=R(N(),1),EP=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"}),ZQ="VisuallyHidden",Hm=hU.forwardRef((e,t)=>(0,vU.jsx)(q.span,{...e,ref:t,style:{...EP,...e.style}}));Hm.displayName=ZQ;var xU=Hm;var fe=R(N(),1),eZ=[" ","Enter","ArrowUp","ArrowDown"],tZ=[" ","Enter"],ru="Select",[Sy,by,rZ]=Jn(ru),[id,MMe]=Fe(ru,[rZ,Qo]),Ry=Qo(),[oZ,ks]=id(ru),[nZ,aZ]=id(ru),yU=e=>{let{__scopeSelect:t,children:r,open:o,defaultOpen:n,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:g}=e,m=Ry(t),[x,h]=Z.useState(null),[v,y]=Z.useState(null),[w,C]=Z.useState(!1),b=ia(u),[S,I]=qe({prop:o,defaultProp:n??!1,onChange:a,caller:ru}),[L,T]=qe({prop:i,defaultProp:s,onChange:l,caller:ru}),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)(ai,{...m,children:(0,fe.jsxs)(oZ,{required:p,scope:t,trigger:x,onTriggerChange:h,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Ne(),value:L,onValueChange:T,open:S,onOpenChange:I,dir:b,triggerPointerDownPosRef:k,disabled:f,children:[(0,fe.jsx)(Sy.Provider,{scope:t,children:(0,fe.jsx)(nZ,{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:r})}),E?(0,fe.jsxs)(WU,{"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]})})};yU.displayName=ru;var wU="SelectTrigger",CU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:o=!1,...n}=e,a=Ry(r),i=ks(wU,r),s=i.disabled||o,l=de(t,i.onTriggerChange),u=by(r),c=Z.useRef("touch"),[d,f,p]=$U(m=>{let x=u().filter(y=>!y.disabled),h=x.find(y=>y.value===i.value),v=qU(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)(ii,{asChild:!0,...a,children:(0,fe.jsx)(q.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":jU(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===" ")&&eZ.includes(m.key)&&(g(),m.preventDefault())})})})});CU.displayName=wU;var SU="SelectValue",bU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,children:a,placeholder:i="",...s}=e,l=ks(SU,r),{onValueNodeHasChildrenChange:u}=l,c=a!==void 0,d=de(t,l.onValueNodeChange);return Ve(()=>{u(c)},[u,c]),(0,fe.jsx)(q.span,{...s,ref:d,style:{pointerEvents:"none"},children:jU(l.value)?(0,fe.jsx)(fe.Fragment,{children:i}):a})});bU.displayName=SU;var iZ="SelectIcon",RU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,children:o,...n}=e;return(0,fe.jsx)(q.span,{"aria-hidden":!0,...n,ref:t,children:o||"\u25BC"})});RU.displayName=iZ;var sZ="SelectPortal",IU=e=>(0,fe.jsx)(Ro,{asChild:!0,...e});IU.displayName=sZ;var ou="SelectContent",PU=Z.forwardRef((e,t)=>{let r=ks(ou,e.__scopeSelect),[o,n]=Z.useState();if(Ve(()=>{n(new DocumentFragment)},[]),!r.open){let a=o;return a?_P.createPortal((0,fe.jsx)(LU,{scope:e.__scopeSelect,children:(0,fe.jsx)(Sy.Slot,{scope:e.__scopeSelect,children:(0,fe.jsx)("div",{children:e.children})})}),a):null}return(0,fe.jsx)(TU,{...e,ref:t})});PU.displayName=ou;var zn=10,[LU,Ms]=id(ou),lZ="SelectContentImpl",uZ=co("SelectContent.RemoveScroll"),TU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,position:o="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=ks(ou,r),[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=by(r),[_,D]=Z.useState(!1),z=Z.useRef(!1);Z.useEffect(()=>{if(y)return xs(y)},[y]),ps();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]=$U(U=>{let ne=E().filter(pe=>!pe.disabled),he=ne.find(pe=>pe.ref.current===document.activeElement),xe=qU(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]),re=Z.useCallback((U,ne,he)=>{let xe=!z.current&&!he;(v.value!==void 0&&v.value===ne||xe)&&k(U)},[v.value]),Y=o==="popper"?AP:kU,ce=Y===AP?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:x}:{};return(0,fe.jsx)(LU,{scope:r,content:y,viewport:C,onViewportChange:b,itemRefCallback:V,selectedItem:I,onItemLeave:Q,itemTextRefCallback:re,focusSelectedItem:O,selectedItemText:T,position:o,isPositioned:_,searchRef:te,children:(0,fe.jsx)(si,{as:uZ,allowPinchZoom:!0,children:(0,fe.jsx)(oi,{asChild:!0,trapped:v.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:W(n,U=>{v.trigger?.focus({preventScroll:!0}),U.preventDefault()}),children:(0,fe.jsx)(qo,{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()}})})})})})})});TU.displayName=lZ;var cZ="SelectItemAlignedPosition",kU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:o,...n}=e,a=ks(ou,r),i=Ms(ou,r),[s,l]=Z.useState(null),[u,c]=Z.useState(null),d=de(t,S=>c(S)),f=by(r),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),Ge=window.innerWidth-zn,Xe=MP(X,[zn,Math.max(zn,Ge-ie)]);s.style.minWidth=J+"px",s.style.left=Xe+"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),Ge=window.innerWidth-zn,Xe=MP(X,[zn,Math.max(zn,Ge-ie)]);s.style.minWidth=J+"px",s.style.right=Xe+"px"}let k=f(),E=window.innerHeight-zn*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),re=S.top+S.height/2-zn,Y=E-re,ce=x.offsetHeight/2,U=x.offsetTop+ce,ne=z+F+U,he=A-ne;if(ne<=re){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(re,z+m.offsetTop+(pe?V:0)+ce)+he;s.style.height=Ie+"px",m.scrollTop=ne-re+m.offsetTop}s.style.margin=`${zn}px 0`,s.style.minHeight=te+"px",s.style.maxHeight=E+"px",o?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,m,x,h,a.dir,o]);Ve(()=>y(),[y]);let[w,C]=Z.useState();Ve(()=>{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)(fZ,{scope:r,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)(q.div,{...n,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});kU.displayName=cZ;var dZ="SelectPopperPosition",AP=Z.forwardRef((e,t)=>{let{__scopeSelect:r,align:o="start",collisionPadding:n=zn,...a}=e,i=Ry(r);return(0,fe.jsx)(hs,{...i,...a,ref:t,align:o,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)"}})});AP.displayName=dZ;var[fZ,VP]=id(ou,{}),DP="SelectViewport",MU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:o,...n}=e,a=Ms(DP,r),i=VP(DP,r),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:o}),(0,fe.jsx)(Sy.Slot,{scope:r,children:(0,fe.jsx)(q.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-zn*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})})})]})});MU.displayName=DP;var EU="SelectGroup",[pZ,mZ]=id(EU),AU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=Ne();return(0,fe.jsx)(pZ,{scope:r,id:n,children:(0,fe.jsx)(q.div,{role:"group","aria-labelledby":n,...o,ref:t})})});AU.displayName=EU;var DU="SelectLabel",NU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=mZ(DU,r);return(0,fe.jsx)(q.div,{id:n.id,...o,ref:t})});NU.displayName=DU;var Cy="SelectItem",[gZ,OU]=id(Cy),FU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...i}=e,s=ks(Cy,r),l=Ms(Cy,r),u=s.value===o,[c,d]=Z.useState(a??""),[f,p]=Z.useState(!1),g=de(t,v=>l.itemRefCallback?.(v,o,n)),m=Ne(),x=Z.useRef("touch"),h=()=>{n||(s.onValueChange(o),s.onOpenChange(!1))};if(o==="")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)(gZ,{scope:r,value:o,disabled:n,textId:m,isSelected:u,onItemTextChange:Z.useCallback(v=>{d(y=>y||(v?.textContent??"").trim())},[]),children:(0,fe.jsx)(Sy.ItemSlot,{scope:r,value:o,disabled:n,textValue:c,children:(0,fe.jsx)(q.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===" "||(tZ.includes(v.key)&&h(),v.key===" "&&v.preventDefault())})})})})});FU.displayName=Cy;var Um="SelectItemText",_U=Z.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,...a}=e,i=ks(Um,r),s=Ms(Um,r),l=OU(Um,r),u=aZ(Um,r),[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 Ve(()=>(m(g),()=>x(g)),[m,x,g]),(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(q.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?_P.createPortal(a.children,i.valueNode):null]})});_U.displayName=Um;var VU="SelectItemIndicator",BU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return OU(VU,r).isSelected?(0,fe.jsx)(q.span,{"aria-hidden":!0,...o,ref:t}):null});BU.displayName=VU;var NP="SelectScrollUpButton",HU=Z.forwardRef((e,t)=>{let r=Ms(NP,e.__scopeSelect),o=VP(NP,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,o.onScrollButtonChange);return Ve(()=>{if(r.viewport&&r.isPositioned){let l=function(){let c=u.scrollTop>0;a(c)};var s=l;let u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),n?(0,fe.jsx)(zU,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});HU.displayName=NP;var OP="SelectScrollDownButton",UU=Z.forwardRef((e,t)=>{let r=Ms(OP,e.__scopeSelect),o=VP(OP,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,o.onScrollButtonChange);return Ve(()=>{if(r.viewport&&r.isPositioned){let l=function(){let c=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<c;a(d)};var s=l;let u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),n?(0,fe.jsx)(zU,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});UU.displayName=OP;var zU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:o,...n}=e,a=Ms("SelectScrollButton",r),i=Z.useRef(null),s=by(r),l=Z.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return Z.useEffect(()=>()=>l(),[l]),Ve(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,fe.jsx)(q.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:W(n.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:W(n.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:W(n.onPointerLeave,()=>{l()})})}),hZ="SelectSeparator",GU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return(0,fe.jsx)(q.div,{"aria-hidden":!0,...o,ref:t})});GU.displayName=hZ;var FP="SelectArrow",vZ=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=Ry(r),a=ks(FP,r),i=Ms(FP,r);return a.open&&i.position==="popper"?(0,fe.jsx)(vs,{...n,...o,ref:t}):null});vZ.displayName=FP;var xZ="SelectBubbleInput",WU=Z.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{let n=Z.useRef(null),a=de(o,n),i=Gc(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)(q.select,{...r,style:{...EP,...r.style},ref:a,defaultValue:t})});WU.displayName=xZ;function jU(e){return e===""||e===void 0}function $U(e){let t=nt(e),r=Z.useRef(""),o=Z.useRef(0),n=Z.useCallback(i=>{let s=r.current+i;t(s),function l(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=Z.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return Z.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function qU(e,t,r){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=yZ(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==r));let l=i.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function yZ(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var KU=yU,BP=CU,XU=bU,YU=RU,QU=IU,HP=PU,ZU=MU,JU=AU,UP=NU,zP=FU,e3=_U,t3=BU,GP=HU,WP=UU,jP=GU;var $e=R(N()),nu=KU;nu.displayName="Select";var r3=JU,sd=XU,CZ=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"}}),au=Es.forwardRef(({className:e,children:t,variant:r,size:o,error:n,success:a,loading:i,leftIcon:s,rightIcon:l,...u},c)=>(0,$e.jsxs)(BP,{ref:c,className:P(CZ({variant:r,size:o,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,$e.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,$e.jsx)("span",{className:"flex items-center justify-center text-muted-foreground",children:s}),i?(0,$e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$e.jsx)(Ht,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,$e.jsx)("span",{className:"text-muted-foreground",children:"Loading..."})]}):t]}),!i&&(0,$e.jsx)(YU,{asChild:!0,children:l?(0,$e.jsx)("span",{className:"opacity-60",children:l}):(0,$e.jsx)(sa,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));au.displayName=BP.displayName;var Iy=Es.forwardRef(({className:e,...t},r)=>(0,$e.jsx)(GP,{ref:r,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,$e.jsx)(Mf,{className:"h-4 w-4"})}));Iy.displayName=GP.displayName;var Py=Es.forwardRef(({className:e,...t},r)=>(0,$e.jsx)(WP,{ref:r,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,$e.jsx)(sa,{className:"h-4 w-4"})}));Py.displayName=WP.displayName;var iu=Es.forwardRef(({className:e,children:t,position:r="popper",side:o="bottom",sideOffset:n=4,align:a="start",...i},s)=>(0,$e.jsx)(QU,{children:(0,$e.jsxs)(HP,{ref:s,side:o,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"],r==="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:r,...i,children:[(0,$e.jsx)(Iy,{}),(0,$e.jsx)(ZU,{className:P("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,$e.jsx)(Py,{})]})}));iu.displayName=HP.displayName;var $P=Es.forwardRef(({className:e,...t},r)=>(0,$e.jsx)(UP,{ref:r,className:P("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));$P.displayName=UP.displayName;var kr=Es.forwardRef(({className:e,children:t,variant:r="default",size:o="md",rightIcon:n,customIndicator:a,...i},s)=>(0,$e.jsxs)(zP,{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",o==="sm"&&"py-1 pl-7 pr-2 text-xs",o==="md"&&"py-1.5 pl-8 pr-2 text-sm",o==="lg"&&"py-2 pl-9 pr-3 text-base",r==="default"&&"focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",r==="subtle"&&"focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",r==="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",r==="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",r==="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,$e.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$e.jsx)(t3,{children:a||(0,$e.jsx)(yr,{className:"h-4 w-4"})})}),(0,$e.jsx)(e3,{children:t}),n&&(0,$e.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:n})]}));kr.displayName=zP.displayName;var qP=Es.forwardRef(({className:e,...t},r)=>(0,$e.jsx)(jP,{ref:r,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));qP.displayName=jP.displayName;var Jt=R(N()),SZ=[{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"}],o3=(e,t)=>{let r=e.replace(/\D/g,"");switch(t){case"+1":return r.length<=3?r:r.length<=6?`(${r.slice(0,3)}) ${r.slice(3)}`:`(${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,10)}`;case"+44":return r.length<=4?r:r.length<=7?`${r.slice(0,4)} ${r.slice(4)}`:`${r.slice(0,4)} ${r.slice(4,7)} ${r.slice(7,11)}`;case"+90":return r.length<=3?r:r.length<=6?`(${r.slice(0,3)}) ${r.slice(3)}`:r.length<=9?`(${r.slice(0,3)}) ${r.slice(3,6)} ${r.slice(6)}`:`(${r.slice(0,3)}) ${r.slice(3,6)} ${r.slice(6,8)} ${r.slice(8,10)}`;default:let o="";for(let n=0;n<r.length;n++)n>0&&n%3===0&&(o+=" "),o+=r[n];return o}},bZ=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},KP=zm.forwardRef(({className:e,value:t="",onChange:r,defaultCountry:o="+1",showIcon:n=!0,showCountrySelect:a=!0,countries:i=SZ,size:s,...l},u)=>{let[c,d]=zm.useState(o),[f,p]=zm.useState(t),g=i.find(v=>v.code===c)||i[0],m=v=>{let y=v.target.value.replace(/\D/g,""),w=bZ(c),C=y.slice(0,w),b=o3(C,c);p(C),r?.(C,c),v.target.value=b},x=v=>{d(v),r?.(f,v)},h=o3(f,c);return(0,Jt.jsxs)("div",{className:P("relative flex gap-2",e),children:[a&&(0,Jt.jsxs)(nu,{value:c,onValueChange:x,children:[(0,Jt.jsx)(au,{className:"w-[120px]",children:(0,Jt.jsx)(sd,{children:(0,Jt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Jt.jsx)("span",{children:g.flag}),(0,Jt.jsx)("span",{children:g.code})]})})}),(0,Jt.jsx)(iu,{children:i.map(v=>(0,Jt.jsx)(kr,{value:v.code,children:(0,Jt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Jt.jsx)("span",{children:v.flag}),(0,Jt.jsx)("span",{children:v.code}),(0,Jt.jsx)("span",{className:"text-muted-foreground",children:v.name})]})},v.code))})]}),(0,Jt.jsxs)("div",{className:"relative flex-1",children:[(0,Jt.jsx)(cr,{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,Jt.jsx)($f,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});KP.displayName="PhoneInput";var Mr=R(M());var Lo=R(N()),RZ=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"}}),n3=Mr.createContext({}),XP=Mr.forwardRef(({className:e,value:t,defaultValue:r,onValueChange:o,disabled:n,name:a,...i},s)=>{let[l,u]=Mr.useState(r),c=t!==void 0,d=c?t:l,f=Mr.useCallback(p=>{c||u(p),o?.(p)},[c,o]);return(0,Lo.jsx)(n3.Provider,{value:{value:d,onValueChange:f,disabled:n,name:a},children:(0,Lo.jsx)("div",{ref:s,role:"radiogroup",className:P("moonui-theme","grid gap-2",e),...i})})});XP.displayName="RadioGroup";var Ly=Mr.forwardRef(({className:e,variant:t,size:r,indicator:o,id:n,value:a,disabled:i,...s},l)=>{let u=Mr.useContext(n3),c=Mr.useId(),d=n||c,f=u.value===a,p=g=>{u.onValueChange&&u.onValueChange(g.target.value),s.onChange&&s.onChange(g)};return(0,Lo.jsxs)("div",{className:"relative flex items-center",children:[(0,Lo.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,Lo.jsx)("label",{htmlFor:d,className:P(RZ({variant:t,size:r}),"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,Lo.jsx)("span",{className:P("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(o||(0,Lo.jsx)(nl,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Ly.displayName="RadioGroupItem";var Ty=Mr.forwardRef(({className:e,htmlFor:t,children:r,disabled:o=!1,...n},a)=>(0,Lo.jsx)("label",{ref:a,htmlFor:t,className:P("text-sm font-medium leading-none ml-2 text-foreground",o&&"cursor-not-allowed opacity-70",e),...n,children:r}));Ty.displayName="RadioLabel";var YP=Mr.forwardRef(({id:e,label:t,labelClassName:r,...o},n)=>{let a=Mr.useId(),i=e||a;return(0,Lo.jsxs)("div",{className:"flex items-center",children:[(0,Lo.jsx)(Ly,{ref:n,id:i,...o}),(0,Lo.jsx)(Ty,{htmlFor:i,disabled:o.disabled,className:r,children:t})]})});YP.displayName="RadioItemWithLabel";var gi=R(N());function a3({value:e="",onChange:t,placeholder:r="Start typing...",className:o,disabled:n=!1}){let a=i=>{!n&&t&&t(i.target.value)};return(0,gi.jsxs)("div",{className:P("border border-input rounded-md",o),children:[(0,gi.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,gi.jsxs)("div",{className:"flex gap-1",children:[(0,gi.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,gi.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,gi.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,gi.jsx)("textarea",{value:e,onChange:a,placeholder:r,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 rL=R(M());var se=R(M(),1);var c3=R(M(),1),OZ=R(Va(),1);var dr=R(M(),1);var s3=R(M(),1);function i3(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function IZ(...e){return t=>{let r=!1,o=e.map(n=>{let a=i3(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():i3(e[n],null)}}}}function hi(...e){return s3.useCallback(IZ(...e),e)}function u3(e){let t=dr.forwardRef((r,o)=>{let{children:n,...a}=r,i=null,s=!1,l=[];l3(n)&&typeof ky=="function"&&(n=ky(n._payload)),dr.Children.forEach(n,f=>{if(MZ(f)){s=!0;let p=f,g="child"in p.props?p.props.child:p.props.children;l3(g)&&typeof ky=="function"&&(g=ky(g._payload)),i=LZ(p,g),l.push(i?.props?.children)}else l.push(f)}),i?i=dr.cloneElement(i,void 0,l):!s&&dr.Children.count(n)===1&&dr.isValidElement(n)&&(i=n);let u=i?kZ(i):void 0,c=hi(o,u);if(!i){if(n||n===0)throw new Error(s?NZ(e):DZ(e));return n}let d=TZ(a,i.props??{});return i.type!==dr.Fragment&&(d.ref=o?c:u),dr.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var PZ=Symbol.for("radix.slottable");var LZ=(e,t)=>{if("child"in e.props){let r=e.props.child;return dr.isValidElement(r)?dr.cloneElement(r,void 0,e.props.children(r.props.children)):null}return dr.isValidElement(t)?t:null};function TZ(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function kZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function MZ(e){return dr.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===PZ}var EZ=Symbol.for("react.lazy");function l3(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===EZ&&"_payload"in e&&AZ(e._payload)}function AZ(e){return typeof e=="object"&&e!==null&&"then"in e}var DZ=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,NZ=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ky=dr[" use ".trim().toString()];var d3=R(N(),1),FZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ld=FZ.reduce((e,t)=>{let r=u3(`Primitive.${t}`),o=c3.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,d3.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var fr=R(M(),1);var f3=R(M(),1),Gm=globalThis?.document?f3.useLayoutEffect:()=>{};var m3=R(M(),1);function _Z(e,t){return m3.useReducer((r,o)=>t[r][o]??r,e)}var ud=e=>{let{present:t,children:r}=e,o=VZ(t),n=typeof r=="function"?r({present:o.isPresent}):fr.Children.only(r),a=BZ(o.ref,HZ(n));return typeof r=="function"||o.isPresent?fr.cloneElement(n,{ref:a}):null};ud.displayName="Presence";function VZ(e){let[t,r]=fr.useState(),o=fr.useRef(null),n=fr.useRef(e),a=fr.useRef("none"),i=fr.useRef(void 0),s=e?"mounted":"unmounted",[l,u]=_Z(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return fr.useEffect(()=>{l==="mounted"?(a.current=i.current??Wm(o.current),i.current=void 0):a.current="none"},[l]),Gm(()=>{let c=o.current,d=n.current;if(d!==e){let p=a.current,g=Wm(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]),Gm(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=g=>{let x=Wm(o.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=Wm(o.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:fr.useCallback(c=>{if(c){let d=getComputedStyle(c);o.current=d,i.current=Wm(d)}else o.current=null;r(c)},[])}}function p3(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function BZ(...e){let t=fr.useRef(e);return t.current=e,fr.useCallback(r=>{let o=t.current,n=!1,a=o.map(i=>{let s=p3(i,r);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():p3(o[i],null)}}},[])}function Wm(e){return e?.animationName||"none"}function HZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var vi=R(M(),1),g3=R(N(),1);function h3(e,t=[]){let r=[];function o(a,i){let s=vi.createContext(i);s.displayName=a+"Context";let l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=vi.useMemo(()=>g,Object.values(g));return(0,g3.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=vi.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=r.map(i=>vi.createContext(i));return function(s){let l=s?.[e]||a;return vi.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,UZ(n,...t)]}function UZ(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return vi.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var cd=R(M(),1);function As(e){let t=cd.useRef(e);return cd.useEffect(()=>{t.current=e}),cd.useMemo(()=>(...r)=>t.current?.(...r),[])}var My=R(M(),1),zZ=R(N(),1),GZ=My.createContext(void 0);function v3(e){let t=My.useContext(GZ);return e||t||"ltr"}function x3(e,[t,r]){return Math.min(r,Math.max(t,e))}var nEe=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ds(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)}}var w3=R(M(),1),_e=R(N(),1);function WZ(e,t){return w3.useReducer((r,o)=>t[r][o]??r,e)}var QP="ScrollArea",[C3,gEe]=h3(QP),[jZ,en]=C3(QP),S3=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:o="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=hi(t,l),T=v3(n);return(0,_e.jsx)(jZ,{scope:r,type:o,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,_e.jsx)(ld.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}})})});S3.displayName=QP;var b3="ScrollAreaViewport",R3=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:o,nonce:n,...a}=e,i=en(b3,r),s=se.useRef(null),l=hi(t,s,i.onViewportChange);return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)($Z,{nonce:n}),(0,_e.jsx)(ld.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,_e.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});R3.displayName=b3;var $Z=se.memo(({nonce:e})=>(0,_e.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),Ra="ScrollAreaScrollbar",Dy=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=en(Ra,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,_e.jsx)(qZ,{...o,ref:t,forceMount:r}):n.type==="scroll"?(0,_e.jsx)(KZ,{...o,ref:t,forceMount:r}):n.type==="auto"?(0,_e.jsx)(I3,{...o,ref:t,forceMount:r}):n.type==="always"?(0,_e.jsx)(ZP,{...o,ref:t,"data-state":"visible"}):null});Dy.displayName=Ra;var qZ=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=en(Ra,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,_e.jsx)(ud,{present:r||a,children:(0,_e.jsx)(I3,{"data-state":a?"visible":"hidden",...o,ref:t})})}),KZ=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=en(Ra,e.__scopeScrollArea),a=e.orientation==="horizontal",i=Oy(()=>l("SCROLL_END"),100),[s,l]=WZ("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,_e.jsx)(ud,{present:r||s!=="hidden",children:(0,_e.jsx)(ZP,{"data-state":s==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:Ds(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Ds(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),I3=se.forwardRef((e,t)=>{let r=en(Ra,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,i]=se.useState(!1),s=e.orientation==="horizontal",l=Oy(()=>{if(r.viewport){let u=r.viewport.offsetWidth<r.viewport.scrollWidth,c=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?u:c)}},10);return dd(r.viewport,l),dd(r.content,l),(0,_e.jsx)(ud,{present:o||a,children:(0,_e.jsx)(ZP,{"data-state":a?"visible":"hidden",...n,ref:t})})}),ZP=se.forwardRef((e,t)=>{let{orientation:r="vertical",...o}=e,n=en(Ra,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=k3(s.viewport,s.content),c={...o,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 eJ(f,i.current,s,p)}return r==="horizontal"?(0,_e.jsx)(XZ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollLeft,p=y3(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))}}):r==="vertical"?(0,_e.jsx)(YZ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollTop,p=y3(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}),XZ=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=en(Ra,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=hi(t,l,a.onScrollbarXChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,_e.jsx)(L3,{"data-orientation":"horizontal",...n,ref:u,sizes:r,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":Ny(r)+"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),E3(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ay(i.paddingLeft),paddingEnd:Ay(i.paddingRight)}})}})}),YZ=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=en(Ra,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=hi(t,l,a.onScrollbarYChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,_e.jsx)(L3,{"data-orientation":"vertical",...n,ref:u,sizes:r,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":Ny(r)+"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),E3(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ay(i.paddingTop),paddingEnd:Ay(i.paddingBottom)}})}})}),[QZ,P3]=C3(Ra),L3=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:o,hasThumb:n,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=en(Ra,r),[g,m]=se.useState(null),x=hi(t,m),h=se.useRef(null),v=se.useRef(""),y=p.viewport,w=o.content-o.viewport,C=As(c),b=As(l),S=Oy(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,[o,b]),dd(g,S),dd(p.content,S),(0,_e.jsx)(QZ,{scope:r,scrollbar:g,hasThumb:n,onThumbChange:As(a),onThumbPointerUp:As(i),onThumbPositionChange:b,onThumbPointerDown:As(s),children:(0,_e.jsx)(ld.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:Ds(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:Ds(e.onPointerMove,I),onPointerUp:Ds(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})})})}),Ey="ScrollAreaThumb",JP=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=P3(Ey,e.__scopeScrollArea);return(0,_e.jsx)(ud,{present:r||n.hasThumb,children:(0,_e.jsx)(ZZ,{ref:t,...o})})}),ZZ=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:o,...n}=e,a=en(Ey,r),i=P3(Ey,r),{onThumbPositionChange:s}=i,l=hi(t,i.onThumbChange),u=se.useRef(void 0),c=Oy(()=>{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=tJ(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,c,s]),(0,_e.jsx)(ld.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)",...o},onPointerDownCapture:Ds(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:Ds(e.onPointerUp,i.onThumbPointerUp)})});JP.displayName=Ey;var eL="ScrollAreaCorner",T3=se.forwardRef((e,t)=>{let r=en(eL,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?(0,_e.jsx)(JZ,{...e,ref:t}):null});T3.displayName=eL;var JZ=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,...o}=e,n=en(eL,r),[a,i]=se.useState(0),[s,l]=se.useState(0),u=!!(a&&s),{onCornerWidthChange:c,onCornerHeightChange:d}=n;return dd(n.scrollbarX,()=>{let f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),l(f)}),dd(n.scrollbarY,()=>{let f=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(f),i(f)}),se.useEffect(()=>()=>{c(0),d(0)},[c,d]),u?(0,_e.jsx)(ld.div,{...o,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 Ay(e){return e?parseInt(e,10):0}function k3(e,t){let r=e/t;return isNaN(r)?0:r}function Ny(e){let t=k3(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function eJ(e,t,r,o="ltr"){let n=Ny(r),a=n/2,i=t||a,s=n-i,l=r.scrollbar.paddingStart+i,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,c=r.content-r.viewport,d=o==="ltr"?[0,c]:[c*-1,0];return M3([l,u],d)(e)}function y3(e,t,r="ltr"){let o=Ny(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,i=t.content-t.viewport,s=a-o,l=r==="ltr"?[0,i]:[i*-1,0],u=x3(e,l);return M3([0,i],[0,s])(u)}function M3(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(r-e[0])}}function E3(e,t){return e>0&&e<t}var tJ=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},o=0;return function n(){let a={left:e.scrollLeft,top:e.scrollTop},i=r.left!==a.left,s=r.top!==a.top;(i||s)&&t(),r=a,o=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(o)};function Oy(e,t){let r=As(e),o=se.useRef(0);return se.useEffect(()=>()=>window.clearTimeout(o.current),[]),se.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function dd(e,t){let r=As(t);Gm(()=>{let o=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(o),n.unobserve(e)}}},[e,r])}var tL=S3,A3=R3;var D3=T3;var Ns=R(N()),oL=rL.forwardRef(({className:e,children:t,...r},o)=>(0,Ns.jsxs)(tL,{ref:o,className:P("relative overflow-hidden",e),...r,children:[(0,Ns.jsx)(A3,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Ns.jsx)(Fy,{}),(0,Ns.jsx)(D3,{})]}));oL.displayName=tL.displayName;var Fy=rL.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,Ns.jsx)(Dy,{ref:o,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),...r,children:(0,Ns.jsx)(JP,{className:"relative flex-1 rounded-full bg-border"})}));Fy.displayName=Dy.displayName;var Gn=R(M());var jm=R(N()),N3=(e,t)=>{let r={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 r[e]||r.up},O3={duration:.5,ease:[.25,.46,.45,.94]},nL=Gn.forwardRef(({children:e,direction:t="up",delay:r=0,duration:o=.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=Gn.useMemo(()=>c||N3(t,n),[t,n,c]),v=Gn.useMemo(()=>({...O3,duration:o,delay:r+l}),[o,r,l]),y=Gn.useMemo(()=>({once:x,amount:a,...g}),[x,a,g]);return d?(0,jm.jsx)(He.div,{ref:m,initial:"hidden",whileInView:"visible",viewport:y,variants:h,transition:v,className:P(u),style:f,id:p,children:e}):(0,jm.jsx)("div",{ref:m,className:u,style:f,id:p,children:e})});nL.displayName="ScrollReveal";var aL=Gn.forwardRef(({children:e,stagger:t=.1,className:r,style:o,id:n,threshold:a=.3,once:i=!0,triggerOnce:s,viewport:l},u)=>{let c=s!==void 0?s:i,d=Gn.useMemo(()=>({once:c,amount:a,...l}),[c,a,l]),f={hidden:{},visible:{transition:{staggerChildren:t,delayChildren:0}}};return(0,jm.jsx)(He.div,{ref:u,initial:"hidden",whileInView:"visible",viewport:d,variants:f,className:P(r),style:o,id:n,children:e})});aL.displayName="ScrollRevealContainer";var iL=Gn.forwardRef(({children:e,direction:t="up",duration:r=.5,distance:o=50,className:n,variants:a,style:i,id:s},l)=>{let u=Gn.useMemo(()=>a||N3(t,o),[t,o,a]),c=Gn.useMemo(()=>({...O3,duration:r}),[r]);return(0,jm.jsx)(He.div,{ref:l,variants:u,transition:c,className:P(n),style:i,id:s,children:e})});iL.displayName="ScrollRevealItem";var H3=R(M());var _3=R(M(),1);var V3=R(N(),1),oJ="Separator",F3="horizontal",nJ=["horizontal","vertical"],B3=_3.forwardRef((e,t)=>{let{decorative:r,orientation:o=F3,...n}=e,a=aJ(o)?o:F3,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,V3.jsx)(q.div,{"data-orientation":a,...s,...n,ref:t})});B3.displayName=oJ;function aJ(e){return nJ.includes(e)}var sL=B3;var z3=R(N()),U3=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"}}),To=H3.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:o="md",decorative:n=!0,...a},i)=>(0,z3.jsx)(sL,{ref:i,decorative:n,orientation:t||void 0,className:P(U3({orientation:t,variant:r,size:o}),e),...a}));To.displayName=sL.displayName;var et=R(M());var fz=R(M());var cz=R(M(),1);var sJ=Object.defineProperty,fd=(e,t)=>sJ(e,"name",{value:t,configurable:!0}),G3=!!(typeof window<"u"&&window.document&&window.document.createElement);function uL(e,t,{checkForDefaultPrevented:r=!0}={}){return fd(function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}fd(uL,"composeEventHandlers");function lJ(e){if(!G3)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}fd(lJ,"getOwnerWindow");function lL(e){if(!G3)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}fd(lL,"getOwnerDocument");function W3(e,t=!1){let{activeElement:r}=lL(e);if(!r?.nodeName)return null;if(j3(r)&&r.contentDocument)return W3(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=lL(r).getElementById(o);if(n)return n}}return r}fd(W3,"getActiveElement");function j3(e){return e.tagName==="IFRAME"}fd(j3,"isFrame");var tn=R(M(),1);var pd=!1;var $3=R(M(),1),_y=globalThis?.document?$3.useLayoutEffect:()=>{};var Wn=R(M(),1);var md=R(M(),1),uJ=Object.defineProperty,cJ=(e,t)=>uJ(e,"name",{value:t,configurable:!0}),q3=md[" useEffectEvent ".trim().toString()],K3=md[" useInsertionEffect ".trim().toString()];function cL(e){if(typeof q3=="function")return q3(e);let t=md.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof K3=="function"?K3(()=>{t.current=e}):_y(()=>{t.current=e}),md.useMemo(()=>(...r)=>t.current?.(...r),[])}cJ(cL,"useEffectEvent");var dJ=Object.defineProperty,$m=(e,t)=>dJ(e,"name",{value:t,configurable:!0}),fJ=tn[" useInsertionEffect ".trim().toString()]||_y;function dL({prop:e,defaultProp:t,onChange:r=$m(()=>{},"onChange"),caller:o}){let[n,a,i]=Y3({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;if(pd){let c=tn.useRef(e!==void 0);tn.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${o} 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,o])}let u=tn.useCallback(c=>{if(s){let d=Q3(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}$m(dL,"useControllableState");function Y3({defaultProp:e,onChange:t}){let[r,o]=tn.useState(e),n=tn.useRef(r),a=tn.useRef(t);return fJ(()=>{a.current=t},[t]),tn.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}$m(Y3,"useUncontrolledState");function Q3(e){return typeof e=="function"}$m(Q3,"isFunction");var X3=Symbol("RADIX:SYNC_STATE");function pJ(e,t,r,o){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=cL(i);if(pd){let x=Wn.useRef(n!==void 0);Wn.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=[{...r,state:a}];o&&c.push(o);let[d,f]=Wn.useReducer((x,h)=>{if(h.type===X3)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=Wn.useRef(p);Wn.useEffect(()=>{g.current!==p&&(g.current=p,l||u(p))},[p,g,l]);let m=Wn.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return Wn.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:X3,state:n})},[n,d.state,l]),[m,f]}$m(pJ,"useControllableStateReducer");var iz=R(M(),1),sz=R(Va(),1);var Lt=R(M(),1);var Z3=R(M(),1),mJ=Object.defineProperty,pL=(e,t)=>mJ(e,"name",{value:t,configurable:!0});function fL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}pL(fL,"setRef");function J3(...e){return t=>{let r=!1,o=e.map(n=>{let a=fL(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():fL(e[n],null)}}}}pL(J3,"composeRefs");function mL(...e){return Z3.useCallback(J3(...e),e)}pL(mL,"useComposedRefs");var vJ=R(N(),1),gJ=Object.defineProperty,rn=(e,t)=>gJ(e,"name",{value:t,configurable:!0}),hJ=rn((e,t)=>{let r={...t};for(let o in t){let n=e[o],a=t[o];if(/^on[A-Z]/.test(o))if(n&&a){let s=typeof n=="function",l=typeof a=="function";pd&&(!s||!l)&&console.warn(`Slot: Expected a function for ${o}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),r[o]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(r[o]=n);else o==="style"?r[o]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:o==="className"?r[o]=[n,a].filter(Boolean).join(" "):o==="aria-describedby"&&(r[o]=ez(a,n))}return{...e,...r}},"mergeProps");function ez(...e){let t=new Set;for(let r of e)if(typeof r=="string")for(let o of String(r).trim().split(/\s+/))o&&t.add(o);return t.size>0?Array.from(t).join(" "):void 0}rn(ez,"concatAriaDescribedby");var tz=Lt.createContext(hJ);tz.displayName="SlotContext";function hL(e){let t=Lt.forwardRef((r,o)=>{let n=Lt.useContext(tz),{children:a,mergeProps:i=n,...s}=r,l=null,u=!1,c=[];gL(a)&&typeof Vy=="function"&&(a=Vy(a._payload)),Lt.Children.forEach(a,g=>{if(nz(g)){u=!0;let m=g,x="child"in m.props?m.props.child:m.props.children;gL(x)&&typeof Vy=="function"&&(x=Vy(x._payload)),l=yJ(m,x),c.push(l?.props?.children)}else c.push(g)}),l?l=Lt.cloneElement(l,void 0,c):!u&&Lt.Children.count(a)===1&&Lt.isValidElement(a)&&(l=a);let d=l?oz(l):void 0,f=mL(o,d);if(!l){if(a||a===0)throw new Error(u?SJ(e):CJ(e));return a}let p=i(s,l.props??{});return l.type!==Lt.Fragment&&(p.ref=o?f:d),Lt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}rn(hL,"createSlot");var rz=Symbol.for("radix.slottable");function xJ(e){let t=rn(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=rz,t}rn(xJ,"createSlottable");var yJ=rn((e,t)=>{if("child"in e.props){let r=e.props.child;return Lt.isValidElement(r)?Lt.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Lt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function oz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}rn(oz,"getElementRef");function nz(e){return Lt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rz}rn(nz,"isSlottable");var wJ=Symbol.for("react.lazy");function gL(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===wJ&&"_payload"in e&&az(e._payload)}rn(gL,"isLazyComponent");function az(e){return typeof e=="object"&&e!==null&&"then"in e}rn(az,"isPromiseLike");var CJ=rn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),SJ=rn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Vy=Lt[" use ".trim().toString()];var lz=R(N(),1),bJ=Object.defineProperty,RJ=(e,t)=>bJ(e,"name",{value:t,configurable:!0}),IJ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],uz=IJ.reduce((e,t)=>{let r=hL(`Primitive.${t}`),o=iz.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,lz.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function PJ(e,t){e&&sz.flushSync(()=>e.dispatchEvent(t))}RJ(PJ,"dispatchDiscreteCustomEvent");var dz=R(N(),1),LJ=Object.defineProperty,TJ=(e,t)=>LJ(e,"name",{value:t,configurable:!0}),kJ="Toggle",qm=cz.forwardRef(TJ(function(t,r){let{pressed:o,defaultPressed:n,onPressedChange:a,...i}=t,[s,l]=dL({prop:o,onChange:a,defaultProp:n??!1,caller:kJ});return(0,dz.jsx)(uz.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:r,onClick:uL(t.onClick,()=>{t.disabled||l(!s)})})},"Toggle"));var pz=R(N()),Km=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"}}),Xm=fz.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,pz.jsx)(qm,{ref:n,className:P("moonui-theme",Km({variant:t,size:r,className:e})),...o}));Xm.displayName=qm.displayName;var Uy=R(M());var Re=R(M(),1);var Nt=R(N(),1),[By,sAe]=Fe("Tooltip",[Qo]),Hy=Qo(),mz="TooltipProvider",EJ=700,vL="tooltip.open",[AJ,yL]=By(mz),gz=e=>{let{__scopeTooltip:t,delayDuration:r=EJ,skipDelayDuration:o=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,Nt.jsx)(AJ,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:Re.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:Re.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:s,onPointerInTransitChange:Re.useCallback(u=>{s.current=u},[]),disableHoverableContent:n,children:a})};gz.displayName=mz;var Ym="Tooltip",[DJ,Qm]=By(Ym),hz=e=>{let{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=yL(Ym,e.__scopeTooltip),u=Hy(t),[c,d]=Re.useState(null),f=Ne(),p=Re.useRef(0),g=i??l.disableHoverableContent,m=s??l.delayDuration,x=Re.useRef(!1),[h,v]=qe({prop:o,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(vL))):l.onClose(),a?.(S)},caller:Ym}),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,Nt.jsx)(ai,{...u,children:(0,Nt.jsx)(DJ,{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:r})})};hz.displayName=Ym;var xL="TooltipTrigger",vz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Qm(xL,r),a=yL(xL,r),i=Hy(r),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,Nt.jsx)(ii,{asChild:!0,...i,children:(0,Nt.jsx)(q.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,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)})})});vz.displayName=xL;var wL="TooltipPortal",[NJ,OJ]=By(wL,{forceMount:void 0}),FJ=e=>{let{__scopeTooltip:t,forceMount:r,children:o,container:n}=e,a=Qm(wL,t);return(0,Nt.jsx)(NJ,{scope:t,forceMount:r,children:(0,Nt.jsx)(ut,{present:r||a.open,children:(0,Nt.jsx)(Ro,{asChild:!0,container:n,children:o})})})};FJ.displayName=wL;var gd="TooltipContent",xz=Re.forwardRef((e,t)=>{let r=OJ(gd,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,i=Qm(gd,e.__scopeTooltip);return(0,Nt.jsx)(ut,{present:o||i.open,children:i.disableHoverableContent?(0,Nt.jsx)(yz,{side:n,...a,ref:t}):(0,Nt.jsx)(_J,{side:n,...a,ref:t})})}),_J=Re.forwardRef((e,t)=>{let r=Qm(gd,e.__scopeTooltip),o=yL(gd,e.__scopeTooltip),n=Re.useRef(null),a=de(t,n),[i,s]=Re.useState(null),{trigger:l,onClose:u}=r,c=n.current,{onPointerInTransitChange:d}=o,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=UJ(h,x.getBoundingClientRect()),y=zJ(h,v),w=GJ(m.getBoundingClientRect()),C=jJ([...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=!WJ(h,i);v?f():y&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,c,i,u,f]),(0,Nt.jsx)(yz,{...e,ref:a})}),[VJ,BJ]=By(Ym,{isInside:!1}),HJ=t1("TooltipContent"),yz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Qm(gd,r),u=Hy(r),{onClose:c}=l;return Re.useEffect(()=>(document.addEventListener(vL,c),()=>document.removeEventListener(vL,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,Nt.jsx)(qo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,Nt.jsxs)(hs,{"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,Nt.jsx)(HJ,{children:o}),(0,Nt.jsx)(VJ,{scope:r,isInside:!0,children:(0,Nt.jsx)(xU,{id:l.contentId,role:"tooltip",children:n||o})})]})})});xz.displayName=gd;var wz="TooltipArrow",Cz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Hy(r);return BJ(wz,r).isInside?null:(0,Nt.jsx)(vs,{...n,...o,ref:t})});Cz.displayName=wz;function UJ(e,t){let r=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,o,n,a)){case a:return"left";case n:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function zJ(e,t,r=5){let o=[];switch(t){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function GJ(e){let{top:t,right:r,bottom:o,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:o},{x:n,y:o}]}function WJ(e,t){let{x:r,y:o}=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>o!=f>o&&r<(d-u)*(o-c)/(f-c)+u&&(n=!n)}return n}function jJ(e){let t=e.slice();return t.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),$J(t)}function $J(e){if(e.length<=1)return e.slice();let t=[];for(let o=0;o<e.length;o++){let n=e[o];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 r=[];for(let o=e.length-1;o>=0;o--){let n=e[o];for(;r.length>=2;){let a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Sz=gz,bz=hz,Rz=vz;var CL=xz,SL=Cz;var Os=R(N()),zy=Sz,bL=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"}}),Zm=bz,Jm=Rz,Gy=Uy.forwardRef(({className:e,...t},r)=>(0,Os.jsx)(SL,{ref:r,className:P("moonui-theme","fill-current",e),...t}));Gy.displayName=SL.displayName;var hd=Uy.forwardRef(({className:e,variant:t,size:r,showArrow:o=!1,sideOffset:n=4,...a},i)=>(0,Os.jsxs)(CL,{ref:i,sideOffset:n,className:P("moonui-theme",bL({variant:t,size:r}),e),...a,children:[a.children,o&&(0,Os.jsx)(Gy,{})]}));hd.displayName=CL.displayName;var RL=Uy.forwardRef(({children:e,content:t,variant:r="default",size:o="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,Os.jsxs)(Zm,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,Os.jsx)(Jm,{asChild:!0,children:e}),(0,Os.jsx)(hd,{ref:g,side:n,align:a,variant:r,size:o,sideOffset:s,showArrow:l,className:u,...p,children:t})]}));RL.displayName="SimpleTooltip";var G=R(N()),$t=({icon:e,tooltip:t,active:r,onClick:o,disabled:n})=>(0,G.jsxs)(Zm,{children:[(0,G.jsx)(Jm,{asChild:!0,children:(0,G.jsx)(Xm,{pressed:r,onPressedChange:()=>o(),disabled:n,"aria-label":t,className:"h-8 w-8 p-0",children:e})}),(0,G.jsx)(hd,{children:(0,G.jsx)("p",{children:t})})]}),KJ=({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(r=>(0,G.jsx)("button",{type:"button","aria-label":`Select color ${r}`,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:r},onClick:()=>e(r)},r))}),IL=et.default.forwardRef(({value:e="",onChange:t,placeholder:r="Start writing...",disabled:o=!1,className:n,minHeight:a=200,maxHeight:i=500,showToolbar:s=!0,showPreview:l=!0,...u},c)=>{let[d,f]=(0,et.useState)(e),[p,g]=(0,et.useState)(!1),[m,x]=(0,et.useState)(e),[h,v]=(0,et.useState)(null),y=et.default.useRef(null),w=et.default.useRef(null),[C,b]=(0,et.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,et.useCallback)(A=>{f(A),t?.(A)},[t]),I=(0,et.useCallback)(()=>{let A=window.getSelection();return A&&A.rangeCount>0?A.getRangeAt(0):null},[]),L=(0,et.useCallback)(A=>{if(!A)return;let te=window.getSelection();te&&(te.removeAllRanges(),te.addRange(A))},[]),T=(0,et.useCallback)((A,te)=>{if(o)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()},[o,I,S]),k=(0,et.useCallback)(A=>{let te=A.currentTarget.innerHTML;S(te)},[S]),E=(0,et.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,et.useCallback)(()=>{let A=prompt("Enter URL:");A&&T("createLink",A)},[T]),D=(0,et.useCallback)(()=>{let A=prompt("Enter image URL:");A&&T("insertImage",A)},[T]),z=(0,et.useCallback)(A=>{T("formatBlock",`<h${A}>`)},[T]),F=(0,et.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||""};et.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),et.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),x(e))},[e,d]);let B=s&&(0,G.jsx)(zy,{children:(0,G.jsxs)(He.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)($t,{icon:(0,G.jsx)(kf,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>T("bold"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Hf,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>T("italic"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Qf,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>T("underline"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Yf,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>T("strikeThrough"),disabled:o})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(nu,{onValueChange:A=>{A.startsWith("h")?z(A.substring(1)):A==="normal"?T("formatBlock","p"):T("fontSize",A)},disabled:o,children:[(0,G.jsx)(au,{className:"w-24 h-8",children:(0,G.jsx)(sd,{placeholder:"Size"})}),(0,G.jsxs)(iu,{children:[(0,G.jsx)(kr,{value:"1",children:"Small"}),(0,G.jsx)(kr,{value:"3",children:"Normal"}),(0,G.jsx)(kr,{value:"5",children:"Large"}),(0,G.jsx)(kr,{value:"7",children:"X-Large"}),(0,G.jsx)(To,{className:"my-1"}),(0,G.jsx)(kr,{value:"h1",children:"Heading 1"}),(0,G.jsx)(kr,{value:"h2",children:"Heading 2"}),(0,G.jsx)(kr,{value:"h3",children:"Heading 3"}),(0,G.jsx)(kr,{value:"h4",children:"Heading 4"}),(0,G.jsx)(kr,{value:"h5",children:"Heading 5"}),(0,G.jsx)(kr,{value:"h6",children:"Heading 6"})]})]}),(0,G.jsx)(To,{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)($t,{icon:(0,G.jsx)(If,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>T("justifyLeft"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(bf,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>T("justifyCenter"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Pf,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>T("justifyRight"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Rf,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>T("justifyFull"),disabled:o})]}),(0,G.jsx)(To,{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)($t,{icon:(0,G.jsx)(Gf,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>T("insertUnorderedList"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(zf,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>T("insertOrderedList"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Kf,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>T("formatBlock","blockquote"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Af,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>T("formatBlock","pre"),disabled:o})]}),(0,G.jsx)(To,{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)($t,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>T("outdent"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>T("indent"),disabled:o})]}),(0,G.jsx)(To,{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)($t,{icon:(0,G.jsx)(Uf,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:_,disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(il,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:D,disabled:o})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(wa,{children:[(0,G.jsx)(Ca,{asChild:!0,children:(0,G.jsx)(Ee,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:o,title:"Text Color",children:(0,G.jsx)(sl,{className:"h-3 w-3"})})}),(0,G.jsx)(Vn,{className:"w-auto p-0",children:(0,G.jsx)(KJ,{onColorSelect:F})})]}),(0,G.jsx)(To,{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)($t,{icon:(0,G.jsx)(Zf,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>T("undo"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Xf,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>T("redo"),disabled:o})]})]}),l&&(0,G.jsxs)(G.Fragment,{children:[!p&&(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsx)($t,{icon:p?(0,G.jsx)(eo,{className:"h-3 w-3"}):(0,G.jsx)(al,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?S(m):x(d),g(!p)},disabled:o})]})]})});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",o&&"opacity-50 cursor-not-allowed",n),...u,children:[B,(0,G.jsxs)("div",{className:"relative",children:[p?(0,G.jsx)(He.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:o,placeholder:"HTML source code..."})}):(0,G.jsx)(He.div,{ref:y,contentEditable:!o,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":r,"aria-disabled":o||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":r,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:r})]}),(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)(XJ,{content:d})})]})});IL.displayName="SimpleEditor";var XJ=({content:e})=>{let[t,r]=(0,et.useState)(0);return(0,et.useEffect)(()=>{r((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 eg=R(M());var er=R(N()),PL=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"}}),xi=eg.forwardRef(({className:e,variant:t,size:r,shape:o,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,er.jsx)(He.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,er.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?He.div:"div";return(0,er.jsx)(C,{ref:p,className:P("moonui-theme",PL({variant:t,size:r,shape:o,animation:n}),"relative isolate",e),style:{height:a,width:i,...d},...c?J2:{},...w})});xi.displayName="Skeleton";var Wy=eg.forwardRef(({className:e,lines:t=3,lineHeight:r="0.85rem",spacing:o="0.5rem",lastLineWidth:n=80,randomWidths:a=!1,variant:i="default",animation:s="pulse",...l},u)=>(0,er.jsx)("div",{ref:u,className:P("moonui-theme","flex flex-col",e),style:{gap:o},...l,children:Array.from({length:t}).map((c,d)=>{let p=d===t-1?n:a?85+d%3*5:100;return(0,er.jsx)(xi,{variant:i,animation:s,className:"w-full",style:{height:r,width:`${p}%`}},d)})}));Wy.displayName="SkeletonText";var jy=eg.forwardRef(({className:e,size:t="2.5rem",variant:r="default",animation:o="pulse",...n},a)=>(0,er.jsx)(xi,{ref:a,variant:r,animation:o,shape:"circle",className:P("moonui-theme","shrink-0",e),style:{height:t,width:t},...n}));jy.displayName="SkeletonAvatar";var LL=eg.forwardRef(({className:e,showHeader:t=!0,contentLines:r=3,showFooter:o=!0,variant:n="default",animation:a="pulse",...i},s)=>(0,er.jsxs)("div",{ref:s,className:P("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,er.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,er.jsx)(jy,{size:"2.5rem",variant:n,animation:a}),(0,er.jsxs)("div",{className:"flex-1",children:[(0,er.jsx)(xi,{variant:n,animation:a,className:"mb-2 h-4 w-1/3"}),(0,er.jsx)(xi,{variant:n,animation:a,className:"h-3 w-1/4"})]})]}),(0,er.jsx)(Wy,{lines:r,variant:n,animation:a,className:"mb-4"}),o&&(0,er.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,er.jsx)(xi,{variant:n,animation:a,className:"h-4 w-1/4"}),(0,er.jsx)(xi,{variant:n,animation:a,className:"h-4 w-1/5"})]})]}));LL.displayName="SkeletonCard";var vd=R(M());var Iz=R(N()),TL=vd.forwardRef(({className:e,children:t,onSwipeLeft:r,onSwipeRight:o,threshold:n=100,disabled:a=!1,...i},s)=>{let[l,u]=vd.useState(0),[c,d]=vd.useState(0),[f,p]=vd.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&&o?o():h<0&&r&&r()),p(!1),d(0),u(0)};return(0,Iz.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})});TL.displayName="SwipeableCard";var qy=R(M());var jn=R(M(),1);var su=R(N(),1),$y="Switch",[YJ,FAe]=Fe($y),[QJ,ZJ]=YJ($y),Pz=jn.forwardRef((e,t)=>{let{__scopeSwitch:r,name:o,checked:n,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,p]=jn.useState(null),g=de(t,y=>p(y)),m=jn.useRef(!1),x=f?c||!!f.closest("form"):!0,[h,v]=qe({prop:n,defaultProp:a??!1,onChange:u,caller:$y});return(0,su.jsxs)(QJ,{scope:r,checked:h,disabled:s,children:[(0,su.jsx)(q.button,{type:"button",role:"switch","aria-checked":h,"aria-required":i,"data-state":Mz(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,su.jsx)(kz,{control:f,bubbles:!m.current,name:o,value:l,checked:h,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});Pz.displayName=$y;var Lz="SwitchThumb",Tz=jn.forwardRef((e,t)=>{let{__scopeSwitch:r,...o}=e,n=ZJ(Lz,r);return(0,su.jsx)(q.span,{"data-state":Mz(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});Tz.displayName=Lz;var JJ="SwitchBubbleInput",kz=jn.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{let i=jn.useRef(null),s=de(i,a),l=Gc(r),u=Wc(t);return jn.useEffect(()=>{let c=i.current;if(!c)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let g=new Event("click",{bubbles:o});p.call(c,r),c.dispatchEvent(g)}},[l,r,o]),(0,su.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:s,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});kz.displayName=JJ;function Mz(e){return e?"checked":"unchecked"}var kL=Pz,Ez=Tz;var Ia=R(N()),Az=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"}}),tee=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"}}),ML=qy.forwardRef(({className:e,size:t,variant:r,loading:o,leftIcon:n,rightIcon:a,description:i,"aria-describedby":s,...l},u)=>{let c=qy.useId(),d=i?`${c}-description`:void 0,f=[s,d].filter(Boolean).join(" ")||void 0;return(0,Ia.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[n&&(0,Ia.jsx)("span",{className:"text-muted-foreground",children:n}),(0,Ia.jsxs)(kL,{className:P(Az({size:t,variant:r}),o&&"opacity-80 cursor-wait",e),disabled:o||l.disabled,"aria-describedby":f,...l,ref:u,children:[o?(0,Ia.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Ia.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-muted border-t-primary"})}):null,(0,Ia.jsx)(Ez,{className:P(tee({size:t}))})]}),a&&(0,Ia.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,Ia.jsx)("span",{id:d,className:"text-sm text-muted-foreground",children:i})]})});ML.displayName=kL.displayName;var on=R(M());var Pa=R(N()),EL=on.forwardRef(({value:e=[],onChange:t,maxTags:r,variant:o="primary",allowDuplicates:n=!1,delimiter:a=",",placeholder:i="Add tag and press Enter",className:s,disabled:l,...u},c)=>{let[d,f]=on.useState(""),[p,g]=on.useState(""),m=on.useRef(null);on.useImperativeHandle(c,()=>m.current);let x=on.useRef([]),h=on.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(r&&e.length>=r){g(`Maximum ${r} tags allowed`),setTimeout(()=>g(""),2e3);return}t([...e,S]),f(""),g("")}},b=S=>{l||t(e.filter((I,L)=>L!==S))};return(0,Pa.jsxs)("div",{className:"relative",children:[(0,Pa.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,Pa.jsxs)(_r,{variant:o,className:"gap-1 pr-1.5",children:[(0,Pa.jsx)("span",{className:"text-xs",children:S}),!l&&(0,Pa.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,Pa.jsx)(xo,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},I)),(0,Pa.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,Pa.jsx)("p",{id:h,role:"status",className:"mt-1 text-xs text-destructive",children:p})]})});EL.displayName="TagsInput";var Wr=R(M());var La=R(N()),ree=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}}),AL=Wr.forwardRef(({className:e,wrapperClassName:t,messageClassName:r,variant:o,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=Wr.useId(),y=x.id||v,w=Wr.useRef(null),[C,b]=Wr.useState(p||g||"");Wr.useImperativeHandle(h,()=>w.current);let S=Wr.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]);Wr.useEffect(()=>{S()},[C,S]),Wr.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,La.jsxs)("div",{className:P("moonui-theme","space-y-1.5 w-full",t),children:[(0,La.jsxs)("div",{className:"relative",children:[(0,La.jsx)("textarea",{ref:w,className:P(ree({variant:o,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,La.jsx)("div",{className:"absolute top-3 right-3 text-gray-500",children:(0,La.jsx)(Ht,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),(0,La.jsxs)("div",{className:"flex items-center justify-between",children:[_&&(0,La.jsx)("p",{className:P("text-xs transition-all",k&&"text-error",E&&"text-success",r),id:k?`${y}-error`:E?`${y}-success`:void 0,children:k||E}),T&&(0,La.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[L,f!==void 0&&` / ${f}`]})]})]})});AL.displayName="Textarea";var $n=R(M());var be=R(M(),1),Nz=R(Va(),1);var ze=R(N(),1),_L="ToastProvider",[VL,oee,nee]=Jn("Toast"),[Oz,aDe]=Fe("Toast",[nee]),[aee,Xy]=Oz(_L),Fz=e=>{let{__scopeToast:t,label:r="Notification",duration:o=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 r.trim()||console.error(`Invalid prop \`label\` supplied to \`${_L}\`. Expected non-empty \`string\`.`),(0,ze.jsx)(VL.Provider,{scope:t,children:(0,ze.jsx)(aee,{scope:t,label:r,duration:o,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})})};Fz.displayName=_L;var _z="ToastViewport",iee=["F8"],NL="toast.viewportPause",OL="toast.viewportResume",Vz=be.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:o=iee,label:n="Notifications ({hotkey})",...a}=e,i=Xy(_z,r),s=oee(r),l=be.useRef(null),u=be.useRef(null),c=be.useRef(null),d=be.useRef(null),f=de(t,d,i.onViewportChange),p=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=i.toastCount>0;be.useEffect(()=>{let x=h=>{o.length!==0&&o.every(y=>h[y]||h.code===y)&&d.current?.focus()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o]),be.useEffect(()=>{let x=l.current,h=d.current;if(g&&x&&h){let v=()=>{if(!i.isClosePausedRef.current){let b=new CustomEvent(NL);h.dispatchEvent(b),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){let b=new CustomEvent(OL);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,...yee(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);DL(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,ze.jsxs)(fF,{ref:l,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&(0,ze.jsx)(FL,{ref:u,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"forwards"});DL(x)}}),(0,ze.jsx)(VL.Slot,{scope:r,children:(0,ze.jsx)(q.ol,{tabIndex:-1,...a,ref:f})}),g&&(0,ze.jsx)(FL,{ref:c,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"backwards"});DL(x)}})]})});Vz.displayName=_z;var Bz="ToastFocusProxy",FL=be.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,a=Xy(Bz,r);return(0,ze.jsx)(Hm,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&o()}})});FL.displayName=Bz;var tg="Toast",see="toast.swipeStart",lee="toast.swipeMove",uee="toast.swipeCancel",cee="toast.swipeEnd",Hz=be.forwardRef((e,t)=>{let{forceMount:r,open:o,defaultOpen:n,onOpenChange:a,...i}=e,[s,l]=qe({prop:o,defaultProp:n??!0,onChange:a,caller:tg});return(0,ze.jsx)(ut,{present:r||s,children:(0,ze.jsx)(pee,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:nt(e.onPause),onResume:nt(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)})})})});Hz.displayName=tg;var[dee,fee]=Oz(tg,{onClose(){}}),pee=be.forwardRef((e,t)=>{let{__scopeToast:r,type:o="foreground",duration:n,open:a,onClose:i,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...g}=e,m=Xy(tg,r),[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=nt(()=>{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(NL,F),D.addEventListener(OL,z),()=>{D.removeEventListener(NL,F),D.removeEventListener(OL,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?qz(x):null,[x]);return m.viewport?(0,ze.jsxs)(ze.Fragment,{children:[_&&(0,ze.jsx)(mee,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:_}),(0,ze.jsx)(dee,{scope:r,onClose:k,children:Nz.createPortal((0,ze.jsx)(VL.ItemSlot,{scope:r,children:(0,ze.jsx)(dF,{asChild:!0,onEscapeKeyDown:W(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||k(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,ze.jsx)(q.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},re={originalEvent:D,delta:Q};O?(w.current=Q,Ky(lee,d,re,{discrete:!1})):Dz(Q,m.swipeDirection,V)?(w.current=Q,Ky(see,c,re,{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};Dz(z,m.swipeDirection,m.swipeThreshold)?Ky(cee,p,B,{discrete:!0}):Ky(uee,f,B,{discrete:!0}),O.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),mee=e=>{let{__scopeToast:t,children:r,...o}=e,n=Xy(tg,t),[a,i]=be.useState(!1),[s,l]=be.useState(!1);return vee(()=>i(!0)),be.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:(0,ze.jsx)(Ro,{asChild:!0,children:(0,ze.jsx)(Hm,{...o,children:a&&(0,ze.jsxs)(ze.Fragment,{children:[n.label," ",r]})})})},gee="ToastTitle",Uz=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ze.jsx)(q.div,{...o,ref:t})});Uz.displayName=gee;var hee="ToastDescription",zz=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ze.jsx)(q.div,{...o,ref:t})});zz.displayName=hee;var Gz="ToastAction",Wz=be.forwardRef((e,t)=>{let{altText:r,...o}=e;return r.trim()?(0,ze.jsx)($z,{altText:r,asChild:!0,children:(0,ze.jsx)(BL,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Gz}\`. Expected non-empty \`string\`.`),null)});Wz.displayName=Gz;var jz="ToastClose",BL=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e,n=fee(jz,r);return(0,ze.jsx)($z,{asChild:!0,children:(0,ze.jsx)(q.button,{type:"button",...o,ref:t,onClick:W(e.onClick,n.onClose)})})});BL.displayName=jz;var $z=be.forwardRef((e,t)=>{let{__scopeToast:r,altText:o,...n}=e;return(0,ze.jsx)(q.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...n,ref:t})});function qz(e){let t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),xee(o)){let n=o.ariaHidden||o.hidden||o.style.display==="none",a=o.dataset.radixToastAnnounceExclude==="";if(!n)if(a){let i=o.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...qz(o))}}),t}function Ky(e,t,r,{discrete:o}){let n=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?Wu(n,a):n.dispatchEvent(a)}var Dz=(e,t,r=0)=>{let o=Math.abs(e.x),n=Math.abs(e.y),a=o>n;return t==="left"||t==="right"?a&&o>r:!a&&n>r};function vee(e=()=>{}){let t=nt(e);Ve(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[t])}function xee(e){return e.nodeType===e.ELEMENT_NODE}function yee(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function DL(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Kz=Fz,HL=Vz,UL=Hz,zL=Uz,GL=zz,WL=Wz,jL=BL;var pr=R(N()),qL=Kz,Zy=$n.forwardRef(({className:e,...t},r)=>(0,pr.jsx)(HL,{ref:r,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}));Zy.displayName=HL.displayName;var Cee=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"}}),Jy=$n.forwardRef(({className:e,variant:t,...r},o)=>(0,pr.jsx)(UL,{ref:o,className:P("moonui-theme",Cee({variant:t}),e),...r}));Jy.displayName=UL.displayName;var KL=$n.forwardRef(({className:e,...t},r)=>(0,pr.jsx)(WL,{ref:r,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}));KL.displayName=WL.displayName;var e0=$n.forwardRef(({className:e,...t},r)=>(0,pr.jsxs)(jL,{ref:r,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,pr.jsx)(xo,{className:"h-4 w-4"}),(0,pr.jsx)("span",{className:"sr-only",children:"Close"})]}));e0.displayName=jL.displayName;var t0=$n.forwardRef(({className:e,...t},r)=>(0,pr.jsx)(zL,{ref:r,className:P("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));t0.displayName=zL.displayName;var r0=$n.forwardRef(({className:e,...t},r)=>(0,pr.jsx)(GL,{ref:r,className:P("moonui-theme","text-sm opacity-90",e),...t}));r0.displayName=GL.displayName;var See=5,bee=1e6,$L=new Map,Xz=e=>{if($L.has(e))return;let t=setTimeout(()=>{$L.delete(e),rg({type:"REMOVE_TOAST",toastId:e})},bee);$L.set(e,t)},Ree=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,See)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?Xz(r):e.toasts.forEach(o=>{Xz(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};default:return e}},Yy=[],Qy={toasts:[]},Iee=0;function rg(e){Qy=Ree(Qy,e),Yy.forEach(t=>{t(Qy)})}function XL({...e}){let t=`toast-${Date.now()}-${++Iee}`,r=n=>rg({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>rg({type:"DISMISS_TOAST",toastId:t});return rg({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:r}}function YL(){let[e,t]=$n.useState(Qy);return $n.useEffect(()=>(Yy.push(t),()=>{let r=Yy.indexOf(t);r>-1&&Yy.splice(r,1)}),[e]),{...e,toast:XL,dismiss:r=>rg({type:"DISMISS_TOAST",toastId:r})}}function Yz(){let{toasts:e}=YL();return(0,pr.jsxs)(qL,{children:[e.map(function({id:t,title:r,description:o,action:n,variant:a,open:i,onOpenChange:s,...l}){return(0,pr.jsxs)(Jy,{variant:a,open:i,onOpenChange:s,...l,children:[(0,pr.jsxs)("div",{className:"grid gap-1",children:[r&&(0,pr.jsx)(t0,{children:r}),o&&(0,pr.jsx)(r0,{children:o})]}),n,(0,pr.jsx)(e0,{})]},t)}),(0,pr.jsx)(Zy,{})]})}var Qz=R(M());var Zz=R(N()),QL=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"}}),ZL=Qz.forwardRef(({className:e,size:t,children:r,...o},n)=>(0,Zz.jsx)("kbd",{ref:n,className:P("moonui-theme",QL({size:t}),e),...o,children:r}));ZL.displayName="Kbd";var nn=R(M());var ko=R(N()),JL=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"}}),Pee={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},eT=nn.forwardRef(({className:e,value:t,defaultValue:r,onValueChange:o,max:n=5,readOnly:a=!1,precision:i="full",icon:s,size:l,"aria-label":u="Rating",...c},d)=>{let p=Pee[l??"md"],g=i==="half"?.5:1,m=t!==void 0,[x,h]=nn.useState(r??0),v=m?t??0:x,[y,w]=nn.useState(null),C=y!==null?y:v,b=nn.useCallback(T=>{a||(m||h(T),o?.(T))},[a,m,o]),S=nn.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(nn.isValidElement(s)){let k=s;return nn.cloneElement(k,{className:P(p,"shrink-0",T&&"fill-current",k.props?.className)})}return(0,ko.jsx)(ji,{className:P(p,"shrink-0",T&&"fill-current"),"aria-hidden":"true"})},L=Array.from({length:n},(T,k)=>k+1);return(0,ko.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(JL({size:l}),e),...c,children:L.map(T=>{let k=Math.max(0,Math.min(1,C-(T-1))),E=T-.5;return(0,ko.jsxs)("span",{"data-slot":"rating-star",className:P("relative inline-flex shrink-0",!a&&"cursor-pointer"),children:[(0,ko.jsx)("span",{"aria-hidden":"true",className:"inline-flex text-muted-foreground/30",children:I(!1)}),(0,ko.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,ko.jsxs)(ko.Fragment,{children:[(0,ko.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,ko.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,ko.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)})})});eT.displayName="Rating";var Jz=R(M());var lu=R(N()),tT=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"}}),Lee={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},rT=Jz.forwardRef(({className:e,size:t,variant:r="default",label:o="Loading",...n},a)=>(0,lu.jsxs)("div",{ref:a,role:"status","aria-live":"polite",className:P("moonui-theme inline-flex items-center justify-center",e),...n,children:[r==="dots"?(0,lu.jsx)("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(i=>(0,lu.jsx)("span",{className:P("inline-block rounded-full bg-current","animate-bounce motion-reduce:animate-none",Lee[t??"md"]),style:{animationDelay:`${i*.15}s`}},i))}):(0,lu.jsx)("span",{className:P(tT({size:t})),"aria-hidden":"true"}),(0,lu.jsx)("span",{className:"sr-only",children:o})]}));rT.displayName="Spinner";var Fs=R(M());var e4=R(N()),oT=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}}),nT=Fs.forwardRef(({className:e,orientation:t,attached:r,size:o,variant:n,children:a,...i},s)=>{let u=o!==void 0||n!==void 0?Fs.Children.map(a,c=>{if(!Fs.isValidElement(c)||c.type!==Ee)return c;let d=c.props;return Fs.cloneElement(c,{size:d.size??o,variant:d.variant??n})}):a;return(0,e4.jsx)("div",{ref:s,role:"group",className:P(oT({orientation:t,attached:r}),e),...i,children:u})});nT.displayName="ButtonGroup";var du=R(M());var $r=R(M(),1);var sn=R(M(),1),aT=R(N(),1),Tee=Object.defineProperty,an=(e,t)=>Tee(e,"name",{value:t,configurable:!0});function kee(e,t){let r=sn.createContext(t);r.displayName=e+"Context";let o=an(a=>{let{children:i,...s}=a,l=sn.useMemo(()=>s,Object.values(s));return(0,aT.jsx)(r.Provider,{value:l,children:i})},"Provider");o.displayName=e+"Provider";function n(a,i={}){let{optional:s=!1}=i,l=sn.useContext(r);if(l)return l;if(t!==void 0)return t;if(!s)throw new Error(`\`${a}\` must be used within \`${e}\``)}return an(n,"useContext"),[o,n]}an(kee,"createContext");function yi(e,t=[]){let r=[];function o(a,i){let s=sn.createContext(i);s.displayName=a+"Context";let l=r.length;r=[...r,i];let u=an(d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=sn.useMemo(()=>g,Object.values(g));return(0,aT.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=sn.useContext(m);if(x)return x;if(i!==void 0)return i;if(!g)throw new Error(`\`${d}\` must be used within \`${a}\``)}return an(c,"useContext"),[u,c]}an(o,"createContext");let n=an(()=>{let a=r.map(i=>sn.createContext(i));return an(function(s){let l=s?.[e]||a;return sn.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])},"useScope")},"createScope");return n.scopeName=e,[o,t4(n,...t)]}an(yi,"createContextScope");function t4(...e){let t=e[0];if(e.length===1)return t;let r=an(()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return an(function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return sn.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return r.scopeName=t.scopeName,r}an(t4,"composeContextScopes");var c4=R(M(),1),d4=R(Va(),1);var Tt=R(M(),1);var r4=R(M(),1),Mee=Object.defineProperty,sT=(e,t)=>Mee(e,"name",{value:t,configurable:!0});function iT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}sT(iT,"setRef");function o4(...e){return t=>{let r=!1,o=e.map(n=>{let a=iT(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():iT(e[n],null)}}}}sT(o4,"composeRefs");function ln(...e){return r4.useCallback(o4(...e),e)}sT(ln,"useComposedRefs");var xd=!1;var Dee=R(N(),1),Eee=Object.defineProperty,un=(e,t)=>Eee(e,"name",{value:t,configurable:!0}),Aee=un((e,t)=>{let r={...t};for(let o in t){let n=e[o],a=t[o];if(/^on[A-Z]/.test(o))if(n&&a){let s=typeof n=="function",l=typeof a=="function";xd&&(!s||!l)&&console.warn(`Slot: Expected a function for ${o}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),r[o]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(r[o]=n);else o==="style"?r[o]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:o==="className"?r[o]=[n,a].filter(Boolean).join(" "):o==="aria-describedby"&&(r[o]=n4(a,n))}return{...e,...r}},"mergeProps");function n4(...e){let t=new Set;for(let r of e)if(typeof r=="string")for(let o of String(r).trim().split(/\s+/))o&&t.add(o);return t.size>0?Array.from(t).join(" "):void 0}un(n4,"concatAriaDescribedby");var a4=Tt.createContext(Aee);a4.displayName="SlotContext";function wi(e){let t=Tt.forwardRef((r,o)=>{let n=Tt.useContext(a4),{children:a,mergeProps:i=n,...s}=r,l=null,u=!1,c=[];lT(a)&&typeof o0=="function"&&(a=o0(a._payload)),Tt.Children.forEach(a,g=>{if(l4(g)){u=!0;let m=g,x="child"in m.props?m.props.child:m.props.children;lT(x)&&typeof o0=="function"&&(x=o0(x._payload)),l=Oee(m,x),c.push(l?.props?.children)}else c.push(g)}),l?l=Tt.cloneElement(l,void 0,c):!u&&Tt.Children.count(a)===1&&Tt.isValidElement(a)&&(l=a);let d=l?s4(l):void 0,f=ln(o,d);if(!l){if(a||a===0)throw new Error(u?Vee(e):_ee(e));return a}let p=i(s,l.props??{});return l.type!==Tt.Fragment&&(p.ref=o?f:d),Tt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}un(wi,"createSlot");var i4=Symbol.for("radix.slottable");function Nee(e){let t=un(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=i4,t}un(Nee,"createSlottable");var Oee=un((e,t)=>{if("child"in e.props){let r=e.props.child;return Tt.isValidElement(r)?Tt.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Tt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function s4(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}un(s4,"getElementRef");function l4(e){return Tt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===i4}un(l4,"isSlottable");var Fee=Symbol.for("react.lazy");function lT(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Fee&&"_payload"in e&&u4(e._payload)}un(lT,"isLazyComponent");function u4(e){return typeof e=="object"&&e!==null&&"then"in e}un(u4,"isPromiseLike");var _ee=un(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Vee=un(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),o0=Tt[" use ".trim().toString()];var f4=R(N(),1),Bee=Object.defineProperty,Hee=(e,t)=>Bee(e,"name",{value:t,configurable:!0}),Uee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yd=Uee.reduce((e,t)=>{let r=wi(`Primitive.${t}`),o=c4.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,f4.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function zee(e,t){e&&d4.flushSync(()=>e.dispatchEvent(t))}Hee(zee,"dispatchDiscreteCustomEvent");var rr=R(M(),1);var Gee=Object.defineProperty,wd=(e,t)=>Gee(e,"name",{value:t,configurable:!0}),p4=!!(typeof window<"u"&&window.document&&window.document.createElement);function _s(e,t,{checkForDefaultPrevented:r=!0}={}){return wd(function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}wd(_s,"composeEventHandlers");function Wee(e){if(!p4)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}wd(Wee,"getOwnerWindow");function uT(e){if(!p4)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}wd(uT,"getOwnerDocument");function m4(e,t=!1){let{activeElement:r}=uT(e);if(!r?.nodeName)return null;if(g4(r)&&r.contentDocument)return m4(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=uT(r).getElementById(o);if(n)return n}}return r}wd(m4,"getActiveElement");function g4(e){return e.tagName==="IFRAME"}wd(g4,"isFrame");var qn=R(M(),1);var n0=R(N(),1),lo=R(M(),1);var uu=R(N(),1);var jee=Object.defineProperty,tr=(e,t)=>jee(e,"name",{value:t,configurable:!0});function fT(e){let t=e+"CollectionProvider",[r,o]=yi(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=tr(m=>{let{scope:x,children:h}=m,v=qn.useRef(null),y=qn.useRef(new Map).current;return(0,n0.jsx)(n,{scope:x,itemMap:y,collectionRef:v,children:h})},"CollectionProvider");i.displayName=t;let s=e+"CollectionSlot",l=wi(s),u=qn.forwardRef((m,x)=>{let{scope:h,children:v}=m,y=a(s,h),w=ln(x,y.collectionRef);return(0,n0.jsx)(l,{ref:w,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=wi(c),p=qn.forwardRef((m,x)=>{let{scope:h,children:v,...y}=m,w=qn.useRef(null),C=ln(x,w),b=a(c,h);return qn.useEffect(()=>(b.itemMap.set(w,{ref:w,...y}),()=>void b.itemMap.delete(w))),(0,n0.jsx)(f,{[d]:"",ref:C,children:v})});p.displayName=c;function g(m){let x=a(e+"CollectionConsumer",m);return qn.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 tr(g,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},g,o]}tr(fT,"createCollection");var h4=new WeakMap,Ot,cn,cT=(cn=class extends Map{constructor(r){super(r);d0(this,Ot,void 0);sg(this,Ot,[...super.keys()]),h4.set(this,!0)}set(r,o){return h4.get(this)&&(this.has(r)?or(this,Ot)[or(this,Ot).indexOf(r)]=r:or(this,Ot).push(r)),super.set(r,o),this}insert(r,o,n){let a=this.has(o),i=or(this,Ot).length,s=pT(r),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(o,n),this;let c=this.size+(a?0:1);s<0&&l++;let d=[...or(this,Ot)],f,p=!1;for(let g=l;g<c;g++)if(l===g){let m=d[g];d[g]===o&&(m=d[g+1]),a&&this.delete(o),f=this.get(m),this.set(o,n)}else{!p&&d[g-1]===o&&(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(r,o,n){let a=new cn(this);return a.insert(r,o,n),a}before(r){let o=or(this,Ot).indexOf(r)-1;if(!(o<0))return this.entryAt(o)}setBefore(r,o,n){let a=or(this,Ot).indexOf(r);return a===-1?this:this.insert(a,o,n)}after(r){let o=or(this,Ot).indexOf(r);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(r,o,n){let a=or(this,Ot).indexOf(r);return a===-1?this:this.insert(a+1,o,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return sg(this,Ot,[]),super.clear()}delete(r){let o=super.delete(r);return o&&or(this,Ot).splice(or(this,Ot).indexOf(r),1),o}deleteAt(r){let o=this.keyAt(r);return o!==void 0?this.delete(o):!1}at(r){let o=a0(or(this,Ot),r);if(o!==void 0)return this.get(o)}entryAt(r){let o=a0(or(this,Ot),r);if(o!==void 0)return[o,this.get(o)]}indexOf(r){return or(this,Ot).indexOf(r)}keyAt(r){return a0(or(this,Ot),r)}from(r,o){let n=this.indexOf(r);if(n===-1)return;let a=n+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(r,o){let n=this.indexOf(r);if(n===-1)return;let a=n+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return a;n++}}findIndex(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return n;n++}return-1}filter(r,o){let n=[],a=0;for(let i of this)Reflect.apply(r,o,[i,a,this])&&n.push(i),a++;return new cn(n)}map(r,o){let n=[],a=0;for(let i of this)n.push([i[0],Reflect.apply(r,o,[i,a,this])]),a++;return new cn(n)}reduce(...r){let[o,n]=r,a=0,i=n??this.at(0);for(let s of this)a===0&&r.length===1?i=s:i=Reflect.apply(o,this,[i,s,a,this]),a++;return i}reduceRight(...r){let[o,n]=r,a=n??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&r.length===1?a=s:a=Reflect.apply(o,this,[a,s,i,this])}return a}toSorted(r){let o=[...this.entries()].sort(r);return new cn(o)}toReversed(){let r=new cn;for(let o=this.size-1;o>=0;o--){let n=this.keyAt(o),a=this.get(n);r.set(n,a)}return r}toSpliced(...r){let o=[...this.entries()];return o.splice(...r),new cn(o)}slice(r,o){let n=new cn,a=this.size-1;if(r===void 0)return n;r<0&&(r=r+this.size),o!==void 0&&o>0&&(a=o-1);for(let i=r;i<=a;i++){let s=this.keyAt(i),l=this.get(s);n.set(s,l)}return n}every(r,o){let n=0;for(let a of this){if(!Reflect.apply(r,o,[a,n,this]))return!1;n++}return!0}some(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return!0;n++}return!1}},Ot=new WeakMap,tr(cn,"OrderedDict"),cn);function a0(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=v4(e,t);return r===-1?void 0:e[r]}tr(a0,"at");function v4(e,t){let r=e.length,o=pT(t),n=o>=0?o:r+o;return n<0||n>=r?-1:n}tr(v4,"toSafeIndex");function pT(e){return e!==e||e===0?0:Math.trunc(e)}tr(pT,"toSafeInteger");function $ee(e){let t=e+"CollectionProvider",[r,o]=yi(t),[n,a]=r(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new cT,setItemMap:tr(()=>{},"setItemMap")}),i=tr(({state:y,...w})=>y?(0,uu.jsx)(l,{...w,state:y}):(0,uu.jsx)(s,{...w}),"CollectionProvider");i.displayName=t;let s=tr(y=>{let w=x();return(0,uu.jsx)(l,{...y,state:w})},"CollectionInit");s.displayName=t+"Init";let l=tr(y=>{let{scope:w,children:C,state:b}=y,S=lo.useRef(null),[I,L]=lo.useState(null),T=ln(S,L),[k,E]=b;return lo.useEffect(()=>{if(!I)return;let _=w4(()=>{});return _.observe(I,{childList:!0,subtree:!0}),()=>{_.disconnect()}},[I]),(0,uu.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=wi(u),d=lo.forwardRef((y,w)=>{let{scope:C,children:b}=y,S=a(u,C),I=ln(w,S.collectionRef);return(0,uu.jsx)(c,{ref:I,children:b})});d.displayName=u;let f=e+"CollectionItemSlot",p="data-radix-collection-item",g=wi(f),m=lo.forwardRef((y,w)=>{let{scope:C,children:b,...S}=y,I=lo.useRef(null),[L,T]=lo.useState(null),k=ln(w,I,T),E=a(f,C),{setItemMap:_}=E,D=lo.useRef(S);x4(D.current,S)||(D.current=S);let z=D.current;return lo.useEffect(()=>{let F=z;return _(O=>L?O.has(L)?O.set(L,{...F,element:L}).toSorted(dT):(O.set(L,{...F,element:L}),O.toSorted(dT)):O),()=>{_(O=>!L||!O.has(L)?O:(O.delete(L),new cT(O)))}},[L,z,_]),(0,uu.jsx)(g,{[p]:"",ref:k,children:b})});m.displayName=f;function x(){return lo.useState(new cT)}tr(x,"useInitCollection");function h(y){let{itemMap:w}=a(e+"CollectionConsumer",y);return w}return tr(h,"useCollection"),[{Provider:i,Slot:d,ItemSlot:m},{createCollectionScope:o,useCollection:h,useInitCollection:x}]}tr($ee,"createCollection");function x4(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(let n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||e[n]!==t[n])return!1;return!0}tr(x4,"shallowEqual");function y4(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}tr(y4,"isElementPreceding");function dT(e,t){return!e[1].element||!t[1].element?0:y4(e[1].element,t[1].element)?-1:1}tr(dT,"sortByDocumentPosition");function w4(e){return new MutationObserver(r=>{for(let o of r)if(o.type==="childList"){e();return}})}tr(w4,"getChildListObserver");var mT=R(M(),1);var C4=R(M(),1),Vs=globalThis?.document?C4.useLayoutEffect:()=>{};var qee=Object.defineProperty,Kee=(e,t)=>qee(e,"name",{value:t,configurable:!0}),Xee=mT[" useId ".trim().toString()]||(()=>{}),Yee=0;function gT(e){let[t,r]=mT.useState(Xee());return Vs(()=>{e||r(o=>o??String(Yee++))},[e]),e||(t?`radix-${t}`:"")}Kee(gT,"useId");var Cd=R(M(),1),Qee=Object.defineProperty,Zee=(e,t)=>Qee(e,"name",{value:t,configurable:!0});function hT(e){let t=Cd.useRef(e);return Cd.useEffect(()=>{t.current=e}),Cd.useMemo(()=>(...r)=>t.current?.(...r),[])}Zee(hT,"useCallbackRef");var dn=R(M(),1);var Kn=R(M(),1);var Sd=R(M(),1),Jee=Object.defineProperty,ete=(e,t)=>Jee(e,"name",{value:t,configurable:!0}),S4=Sd[" useEffectEvent ".trim().toString()],b4=Sd[" useInsertionEffect ".trim().toString()];function vT(e){if(typeof S4=="function")return S4(e);let t=Sd.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof b4=="function"?b4(()=>{t.current=e}):Vs(()=>{t.current=e}),Sd.useMemo(()=>(...r)=>t.current?.(...r),[])}ete(vT,"useEffectEvent");var tte=Object.defineProperty,og=(e,t)=>tte(e,"name",{value:t,configurable:!0}),rte=dn[" useInsertionEffect ".trim().toString()]||Vs;function bd({prop:e,defaultProp:t,onChange:r=og(()=>{},"onChange"),caller:o}){let[n,a,i]=I4({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;if(xd){let c=dn.useRef(e!==void 0);dn.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${o} 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,o])}let u=dn.useCallback(c=>{if(s){let d=P4(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}og(bd,"useControllableState");function I4({defaultProp:e,onChange:t}){let[r,o]=dn.useState(e),n=dn.useRef(r),a=dn.useRef(t);return rte(()=>{a.current=t},[t]),dn.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}og(I4,"useUncontrolledState");function P4(e){return typeof e=="function"}og(P4,"isFunction");var R4=Symbol("RADIX:SYNC_STATE");function ote(e,t,r,o){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=vT(i);if(xd){let x=Kn.useRef(n!==void 0);Kn.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=[{...r,state:a}];o&&c.push(o);let[d,f]=Kn.useReducer((x,h)=>{if(h.type===R4)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=Kn.useRef(p);Kn.useEffect(()=>{g.current!==p&&(g.current=p,l||u(p))},[p,g,l]);let m=Kn.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return Kn.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:R4,state:n})},[n,d.state,l]),[m,f]}og(ote,"useControllableStateReducer");var i0=R(M(),1),ite=R(N(),1),nte=Object.defineProperty,ate=(e,t)=>nte(e,"name",{value:t,configurable:!0}),ste=i0.createContext(void 0);function ng(e){let t=i0.useContext(ste);return e||t||"ltr"}ate(ng,"useDirection");var ute=R(M(),1),s0=R(M(),1),lte=Object.defineProperty,yT=(e,t)=>lte(e,"name",{value:t,configurable:!0}),xT=!1;function L4(){let[e,t]=s0.useState(xT);return s0.useEffect(()=>{xT||(xT=!0,t(!0))},[]),e}yT(L4,"useIsHydrated");var T4=ute[" useSyncExternalStore ".trim().toString()];function k4(){return()=>{}}yT(k4,"subscribe");function M4(){return T4(k4,()=>!0,()=>!1)}yT(M4,"useIsHydratedModern");var E4=typeof T4=="function"?M4:L4;var Bs=R(N(),1),cte=Object.defineProperty,cu=(e,t)=>cte(e,"name",{value:t,configurable:!0}),wT="rovingFocusGroup.onEntryFocus",dte={bubbles:!1,cancelable:!0},l0="RovingFocusGroup",[CT,A4,fte]=fT(l0),[pte,ST]=yi(l0,[fte]),[mte,gte]=pte(l0),D4=rr.forwardRef(cu(function(t,r){return(0,Bs.jsx)(CT.Provider,{scope:t.__scopeRovingFocusGroup,children:(0,Bs.jsx)(CT.Slot,{scope:t.__scopeRovingFocusGroup,children:(0,Bs.jsx)(hte,{...t,ref:r})})})},"RovingFocusGroup")),hte=rr.forwardRef(cu(function(t,r){let{__scopeRovingFocusGroup:o,orientation:n,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,p=rr.useRef(null),g=ln(r,p),m=ng(i),[x,h]=bd({prop:s,defaultProp:l??null,onChange:u,caller:l0}),[v,y]=rr.useState(!1),w=hT(c),C=A4(o),b=rr.useRef(!1),[S,I]=rr.useState(0);return rr.useEffect(()=>{let L=p.current;if(L)return L.addEventListener(wT,w),()=>L.removeEventListener(wT,w)},[w]),(0,Bs.jsx)(mte,{scope:o,orientation:n,dir:m,loop:a,currentTabStopId:x,onItemFocus:rr.useCallback(L=>h(L),[h]),onItemShiftTab:rr.useCallback(()=>y(!0),[]),onFocusableItemAdd:rr.useCallback(()=>I(L=>L+1),[]),onFocusableItemRemove:rr.useCallback(()=>I(L=>L-1),[]),children:(0,Bs.jsx)(yd.div,{tabIndex:v||S===0?-1:0,"data-orientation":n,...f,ref:g,style:{outline:"none",...t.style},onMouseDown:_s(t.onMouseDown,()=>{b.current=!0}),onFocus:_s(t.onFocus,L=>{let T=!b.current;if(L.target===L.currentTarget&&T&&!v){let k=new CustomEvent(wT,dte);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);bT(F,d)}}b.current=!1}),onBlur:_s(t.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),vte="RovingFocusGroupItem",N4=rr.forwardRef(cu(function(t,r){let{__scopeRovingFocusGroup:o,focusable:n=!0,active:a=!1,tabStopId:i,children:s,...l}=t,u=gT(),c=i||u,d=gte(vte,o),f=d.currentTabStopId===c,p=A4(o),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:x}=d,h=E4();return Vs(()=>{if(!(!h||!n))return g(),()=>m()},[h,n,g,m]),rr.useEffect(()=>{if(!(h||!n))return g(),()=>m()},[h,n,g,m]),(0,Bs.jsx)(CT.ItemSlot,{scope:o,id:c,focusable:n,active:a,children:(0,Bs.jsx)(yd.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:r,onMouseDown:_s(t.onMouseDown,v=>{n?d.onItemFocus(c):v.preventDefault()}),onFocus:_s(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:_s(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;let y=F4(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?_4(C,b+1):C.slice(b+1)}setTimeout(()=>bT(C))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:x!=null}):s})})},"RovingFocusGroupItem")),xte={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function O4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}cu(O4,"getDirectionAwareKey");function F4(e,t,r){let o=O4(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return xte[o]}cu(F4,"getFocusIntent");function bT(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}cu(bT,"focusFirst");function _4(e,t){return e.map((r,o)=>e[(t+o)%e.length])}cu(_4,"wrapArray");var jr=R(N(),1),wte=Object.defineProperty,Hs=(e,t)=>wte(e,"name",{value:t,configurable:!0}),Rd="ToggleGroup",[B4,vNe]=yi(Rd,[ST]),H4=ST(),U4=$r.forwardRef(Hs(function(t,r){let{type:o,...n}=t;if(o==="single")return(0,jr.jsx)(Cte,{role:"radiogroup",...n,ref:r});if(o==="multiple")return(0,jr.jsx)(Ste,{role:"toolbar",...n,ref:r});throw new Error(`Missing prop \`type\` expected on \`${Rd}\``)},"ToggleGroup")),[z4,G4]=B4(Rd),Cte=$r.forwardRef(Hs(function(t,r){let{value:o,defaultValue:n,onValueChange:a=Hs(()=>{},"onValueChange"),...i}=t,[s,l]=bd({prop:o,defaultProp:n??"",onChange:a,caller:Rd});return(0,jr.jsx)(z4,{scope:t.__scopeToggleGroup,type:"single",value:$r.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:$r.useCallback(()=>l(""),[l]),children:(0,jr.jsx)(W4,{...i,ref:r})})},"ToggleGroupImplSingle")),Ste=$r.forwardRef(Hs(function(t,r){let{value:o,defaultValue:n,onValueChange:a=Hs(()=>{},"onValueChange"),...i}=t,[s,l]=bd({prop:o,defaultProp:n??[],onChange:a,caller:Rd}),u=$r.useCallback(d=>l((f=[])=>[...f,d]),[l]),c=$r.useCallback(d=>l((f=[])=>f.filter(p=>p!==d)),[l]);return(0,jr.jsx)(z4,{scope:t.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:c,children:(0,jr.jsx)(W4,{...i,ref:r})})},"ToggleGroupImplMultiple")),[bte,Rte]=B4(Rd),W4=$r.forwardRef(Hs(function(t,r){let{__scopeToggleGroup:o,disabled:n=!1,rovingFocus:a=!0,orientation:i,dir:s,loop:l=!0,...u}=t,c=H4(o),d=ng(s),f={dir:d,...u};return(0,jr.jsx)(bte,{scope:o,rovingFocus:a,disabled:n,children:a?(0,jr.jsx)(D4,{asChild:!0,...c,orientation:i,dir:d,loop:l,children:(0,jr.jsx)(yd.div,{...f,ref:r})}):(0,jr.jsx)(yd.div,{...f,ref:r})})},"ToggleGroupImpl")),RT="ToggleGroupItem",j4=$r.forwardRef(Hs(function(t,r){let o=G4(RT,t.__scopeToggleGroup),n=Rte(RT,t.__scopeToggleGroup),a=H4(t.__scopeToggleGroup),i=o.value.includes(t.value),s=n.disabled||t.disabled,l={...t,pressed:i,disabled:s},u=$r.useRef(null);return n.rovingFocus?(0,jr.jsx)(N4,{asChild:!0,...a,focusable:!s,active:i,ref:u,children:(0,jr.jsx)(V4,{...l,ref:r})}):(0,jr.jsx)(V4,{...l,ref:r})},"ToggleGroupItem")),V4=$r.forwardRef(Hs(function(t,r){let{__scopeToggleGroup:o,value:n,...a}=t,i=G4(RT,o),s={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=i.type==="single"?s:void 0;return(0,jr.jsx)(qm,{...l,...a,ref:r,onPressedChange:u=>{u?i.onItemActivate(n):i.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var u0=R(N()),$4=du.createContext({size:"default",variant:"default"}),IT=du.forwardRef(({className:e,variant:t,size:r,children:o,...n},a)=>(0,u0.jsx)(U4,{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,u0.jsx)($4.Provider,{value:{variant:t,size:r},children:o})}));IT.displayName="ToggleGroup";var PT=du.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>{let i=du.useContext($4);return(0,u0.jsx)(j4,{ref:a,className:P(Km({variant:i.variant??r,size:i.size??o}),e),...n,children:t})});PT.displayName="ToggleGroupItem";
|
|
85
|
+
}`,gU="^\\d+$",hU="^[a-zA-Z]+$",vU="^[a-zA-Z0-9]+$";var gi=R(N()),yP=ou.forwardRef(({className:e,containerClassName:t,...r},o)=>(0,gi.jsx)(xP,{ref:o,"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),...r}));yP.displayName="InputOTP";var CP=ou.forwardRef(({className:e,...t},r)=>(0,gi.jsx)("div",{ref:r,className:P("flex items-center",e),...t}));CP.displayName="InputOTPGroup";var wP=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}}),SP=ou.forwardRef(({index:e,className:t,...r},o)=>{let a=ou.useContext(vP)?.slots?.[e],i=a?.char,s=a?.hasFakeCaret,l=a?.isActive;return(0,gi.jsxs)("div",{ref:o,"data-active":l?"":void 0,className:P(wP({isActive:!!l}),t),...r,children:[i,s&&(0,gi.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,gi.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});SP.displayName="InputOTPSlot";var bP=ou.forwardRef(({className:e,...t},r)=>(0,gi.jsx)("div",{ref:r,role:"separator",className:P("text-muted-foreground",e),...t,children:(0,gi.jsx)(_f,{"aria-hidden":"true"})}));bP.displayName="InputOTPSeparator";var sd=R(M());var we=R(N());function RP({children:e,componentName:t,className:r,showPreview:o=!0,previewDuration:n=2e3}){let[a,i]=(0,sd.useState)(!1),[s,l]=(0,sd.useState)(null),u=()=>{if(!o)return;i(!0),s&&clearTimeout(s);let d=setTimeout(()=>{i(!1)},n);l(d)},c=()=>{s&&(clearTimeout(s),l(null)),i(!1)};return(0,we.jsxs)("div",{className:P("relative group cursor-pointer transition-all duration-300",r),onMouseEnter:u,onMouseLeave:c,children:[(0,we.jsx)("div",{className:P("transition-all duration-300",!a&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),(0,we.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,we.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,we.jsx)("div",{className:"flex justify-center",children:(0,we.jsxs)(Br,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[(0,we.jsx)(Qu,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),(0,we.jsx)("div",{className:"flex justify-center",children:(0,we.jsx)("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:(0,we.jsx)(Ju,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),(0,we.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,we.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,we.jsxs)(Ee,{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,we.jsx)(ec,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),o&&!a&&(0,we.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,we.jsx)("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function xU({children:e,componentId:t,componentName:r,className:o,fallback:n,requireCLI:a=!0}){let[i,s]=(0,sd.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,sd.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,we.jsx)("div",{className:P("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",o),children:(0,we.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,we.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,we.jsxs)("div",{className:P("relative",o),children:[(0,we.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,we.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,we.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,we.jsxs)(Br,{variant:"destructive",className:"mb-2",children:[(0,we.jsx)(Ju,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),(0,we.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),(0,we.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),(0,we.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,we.jsxs)("div",{className:P("relative",o),children:[(0,we.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,we.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,we.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,we.jsxs)(Br,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,we.jsx)(ec,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),(0,we.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),(0,we.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,we.jsx)(Ee,{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,we.jsx)(RP,{componentName:r||t,className:o,children:n||e})}return(0,we.jsx)("div",{className:o,children:e})}function yU({className:e}){return(0,we.jsxs)(Br,{variant:"secondary",className:P("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[(0,we.jsx)(Qu,{className:"w-3 h-3 mr-1"}),"PRO"]})}function CU({className:e}){return(0,we.jsx)(Br,{variant:"outline",className:P("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var wU=R(M());var Zt=R(N());function wy({className:e,variant:t="default",showText:r=!0,...o}){let n=wU.useId(),a=`moon-gradient-${n}`,i=`moon-mask-${n}`;return(0,Zt.jsxs)("div",{className:P("flex items-center gap-2",e),children:[(0,Zt.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",...o,children:[(0,Zt.jsxs)("defs",{children:[t==="gradient"&&(0,Zt.jsxs)("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,Zt.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,Zt.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,Zt.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]}),(0,Zt.jsxs)("mask",{id:i,children:[(0,Zt.jsx)("rect",{width:"32",height:"32",fill:"white"}),(0,Zt.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),(0,Zt.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${a})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${i})`})]}),r&&(0,Zt.jsxs)("span",{className:"text-xl font-bold",children:[(0,Zt.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,Zt.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function eZ({className:e,variant:t="default",...r}){return(0,Zt.jsx)(wy,{showText:!1,className:e,variant:t,...r})}function tZ({className:e,variant:t="default",showText:r=!0,...o}){return(0,Zt.jsx)(wy,{className:P("transition-all duration-300 hover:scale-105",e),variant:t,showText:r,...o})}var Ms=R(M());var Mr=R(N()),IP=Ms.forwardRef(({className:e,...t},r)=>(0,Mr.jsx)("nav",{ref:r,role:"navigation","aria-label":"pagination",className:P("moonui-theme","mx-auto flex w-full justify-center",e),...t}));IP.displayName="Pagination";var PP=Ms.forwardRef(({className:e,...t},r)=>(0,Mr.jsx)("ul",{ref:r,className:P("moonui-theme","flex flex-row items-center gap-1",e),...t}));PP.displayName="PaginationContent";var LP=Ms.forwardRef(({className:e,...t},r)=>(0,Mr.jsx)("li",{ref:r,className:P("moonui-theme","",e),...t}));LP.displayName="PaginationItem";var Hm=Ms.forwardRef(({className:e,isActive:t,size:r="icon",...o},n)=>(0,Mr.jsx)("a",{ref:n,"aria-current":t?"page":void 0,className:P(sp({variant:t?"outline":"ghost",size:r}),e),...o}));Hm.displayName="PaginationLink";var SU="hidden sm:inline",TP=Ms.forwardRef(({className:e,...t},r)=>(0,Mr.jsxs)(Hm,{ref:r,"aria-label":"Go to previous page",size:"md",className:P("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Mr.jsx)(Rn,{className:"h-4 w-4"}),(0,Mr.jsx)("span",{className:SU,children:"Previous"})]}));TP.displayName="PaginationPrevious";var kP=Ms.forwardRef(({className:e,...t},r)=>(0,Mr.jsxs)(Hm,{ref:r,"aria-label":"Go to next page",size:"md",className:P("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Mr.jsx)("span",{className:SU,children:"Next"}),(0,Mr.jsx)(Vr,{className:"h-4 w-4"})]}));kP.displayName="PaginationNext";var MP=Ms.forwardRef(({className:e,...t},r)=>(0,Mr.jsxs)("span",{ref:r,className:P("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Mr.jsx)("span",{"aria-hidden":"true",className:"flex items-center",children:(0,Mr.jsx)(ua,{className:"h-4 w-4"})}),(0,Mr.jsx)("span",{className:"sr-only",children:"More pages"})]}));MP.displayName="PaginationEllipsis";var Gm=R(M());var Ds=R(M());var Z=R(M(),1),VP=R(Ha(),1);function EP(e,[t,r]){return Math.min(r,Math.max(t,e))}var bU=R(M(),1);var RU=R(N(),1),AP=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"}),rZ="VisuallyHidden",Um=bU.forwardRef((e,t)=>(0,RU.jsx)(q.span,{...e,ref:t,style:{...AP,...e.style}}));Um.displayName=rZ;var IU=Um;var fe=R(N(),1),nZ=[" ","Enter","ArrowUp","ArrowDown"],aZ=[" ","Enter"],nu="Select",[by,Ry,iZ]=ea(nu),[ld,OMe]=Fe(nu,[iZ,Zo]),Iy=Zo(),[sZ,Es]=ld(nu),[lZ,uZ]=ld(nu),PU=e=>{let{__scopeSelect:t,children:r,open:o,defaultOpen:n,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:g}=e,m=Iy(t),[x,h]=Z.useState(null),[v,y]=Z.useState(null),[C,w]=Z.useState(!1),b=sa(u),[S,I]=qe({prop:o,defaultProp:n??!1,onChange:a,caller:nu}),[L,T]=qe({prop:i,defaultProp:s,onChange:l,caller:nu}),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)(si,{...m,children:(0,fe.jsxs)(sZ,{required:p,scope:t,trigger:x,onTriggerChange:h,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:Ne(),value:L,onValueChange:T,open:S,onOpenChange:I,dir:b,triggerPointerDownPosRef:k,disabled:f,children:[(0,fe.jsx)(by.Provider,{scope:t,children:(0,fe.jsx)(lZ,{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:r})}),E?(0,fe.jsxs)(QU,{"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]})})};PU.displayName=nu;var LU="SelectTrigger",TU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:o=!1,...n}=e,a=Iy(r),i=Es(LU,r),s=i.disabled||o,l=de(t,i.onTriggerChange),u=Ry(r),c=Z.useRef("touch"),[d,f,p]=JU(m=>{let x=u().filter(y=>!y.disabled),h=x.find(y=>y.value===i.value),v=e3(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)(li,{asChild:!0,...a,children:(0,fe.jsx)(q.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":ZU(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===" ")&&nZ.includes(m.key)&&(g(),m.preventDefault())})})})});TU.displayName=LU;var kU="SelectValue",MU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,children:a,placeholder:i="",...s}=e,l=Es(kU,r),{onValueNodeHasChildrenChange:u}=l,c=a!==void 0,d=de(t,l.onValueNodeChange);return Ve(()=>{u(c)},[u,c]),(0,fe.jsx)(q.span,{...s,ref:d,style:{pointerEvents:"none"},children:ZU(l.value)?(0,fe.jsx)(fe.Fragment,{children:i}):a})});MU.displayName=kU;var cZ="SelectIcon",EU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,children:o,...n}=e;return(0,fe.jsx)(q.span,{"aria-hidden":!0,...n,ref:t,children:o||"\u25BC"})});EU.displayName=cZ;var dZ="SelectPortal",AU=e=>(0,fe.jsx)(Ro,{asChild:!0,...e});AU.displayName=dZ;var au="SelectContent",DU=Z.forwardRef((e,t)=>{let r=Es(au,e.__scopeSelect),[o,n]=Z.useState();if(Ve(()=>{n(new DocumentFragment)},[]),!r.open){let a=o;return a?VP.createPortal((0,fe.jsx)(NU,{scope:e.__scopeSelect,children:(0,fe.jsx)(by.Slot,{scope:e.__scopeSelect,children:(0,fe.jsx)("div",{children:e.children})})}),a):null}return(0,fe.jsx)(OU,{...e,ref:t})});DU.displayName=au;var Gn=10,[NU,As]=ld(au),fZ="SelectContentImpl",pZ=qr("SelectContent.RemoveScroll"),OU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,position:o="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=Es(au,r),[y,C]=Z.useState(null),[w,b]=Z.useState(null),S=de(t,U=>C(U)),[I,L]=Z.useState(null),[T,k]=Z.useState(null),E=Ry(r),[_,D]=Z.useState(!1),z=Z.useRef(!1);Z.useEffect(()=>{if(y)return ys(y)},[y]),ms();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&&w&&(w.scrollTop=0),X===xe&&w&&(w.scrollTop=w.scrollHeight),X?.focus(),document.activeElement!==pe))return},[E,w]),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]=JU(U=>{let ne=E().filter(pe=>!pe.disabled),he=ne.find(pe=>pe.ref.current===document.activeElement),xe=e3(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]),re=Z.useCallback((U,ne,he)=>{let xe=!z.current&&!he;(v.value!==void 0&&v.value===ne||xe)&&k(U)},[v.value]),Y=o==="popper"?DP:FU,ce=Y===DP?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:x}:{};return(0,fe.jsx)(NU,{scope:r,content:y,viewport:w,onViewportChange:b,itemRefCallback:V,selectedItem:I,onItemLeave:Q,itemTextRefCallback:re,focusSelectedItem:O,selectedItemText:T,position:o,isPositioned:_,searchRef:te,children:(0,fe.jsx)(ui,{as:pZ,allowPinchZoom:!0,children:(0,fe.jsx)(ai,{asChild:!0,trapped:v.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:W(n,U=>{v.trigger?.focus({preventScroll:!0}),U.preventDefault()}),children:(0,fe.jsx)(Ko,{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()}})})})})})})});OU.displayName=fZ;var mZ="SelectItemAlignedPosition",FU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:o,...n}=e,a=Es(au,r),i=As(au,r),[s,l]=Z.useState(null),[u,c]=Z.useState(null),d=de(t,S=>c(S)),f=Ry(r),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),Ge=window.innerWidth-Gn,Xe=EP(X,[Gn,Math.max(Gn,Ge-ie)]);s.style.minWidth=J+"px",s.style.left=Xe+"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),Ge=window.innerWidth-Gn,Xe=EP(X,[Gn,Math.max(Gn,Ge-ie)]);s.style.minWidth=J+"px",s.style.right=Xe+"px"}let k=f(),E=window.innerHeight-Gn*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),re=S.top+S.height/2-Gn,Y=E-re,ce=x.offsetHeight/2,U=x.offsetTop+ce,ne=z+F+U,he=A-ne;if(ne<=re){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(re,z+m.offsetTop+(pe?V:0)+ce)+he;s.style.height=Ie+"px",m.scrollTop=ne-re+m.offsetTop}s.style.margin=`${Gn}px 0`,s.style.minHeight=te+"px",s.style.maxHeight=E+"px",o?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,m,x,h,a.dir,o]);Ve(()=>y(),[y]);let[C,w]=Z.useState();Ve(()=>{u&&w(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)(hZ,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b,children:(0,fe.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:(0,fe.jsx)(q.div,{...n,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});FU.displayName=mZ;var gZ="SelectPopperPosition",DP=Z.forwardRef((e,t)=>{let{__scopeSelect:r,align:o="start",collisionPadding:n=Gn,...a}=e,i=Iy(r);return(0,fe.jsx)(vs,{...i,...a,ref:t,align:o,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)"}})});DP.displayName=gZ;var[hZ,BP]=ld(au,{}),NP="SelectViewport",_U=Z.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:o,...n}=e,a=As(NP,r),i=BP(NP,r),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:o}),(0,fe.jsx)(by.Slot,{scope:r,children:(0,fe.jsx)(q.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-Gn*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),C=v-y;d.style.height=y+"px",d.style.bottom==="0px"&&(c.scrollTop=C>0?C:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});_U.displayName=NP;var VU="SelectGroup",[vZ,xZ]=ld(VU),BU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=Ne();return(0,fe.jsx)(vZ,{scope:r,id:n,children:(0,fe.jsx)(q.div,{role:"group","aria-labelledby":n,...o,ref:t})})});BU.displayName=VU;var HU="SelectLabel",UU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=xZ(HU,r);return(0,fe.jsx)(q.div,{id:n.id,...o,ref:t})});UU.displayName=HU;var Sy="SelectItem",[yZ,zU]=ld(Sy),GU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...i}=e,s=Es(Sy,r),l=As(Sy,r),u=s.value===o,[c,d]=Z.useState(a??""),[f,p]=Z.useState(!1),g=de(t,v=>l.itemRefCallback?.(v,o,n)),m=Ne(),x=Z.useRef("touch"),h=()=>{n||(s.onValueChange(o),s.onOpenChange(!1))};if(o==="")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)(yZ,{scope:r,value:o,disabled:n,textId:m,isSelected:u,onItemTextChange:Z.useCallback(v=>{d(y=>y||(v?.textContent??"").trim())},[]),children:(0,fe.jsx)(by.ItemSlot,{scope:r,value:o,disabled:n,textValue:c,children:(0,fe.jsx)(q.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===" "||(aZ.includes(v.key)&&h(),v.key===" "&&v.preventDefault())})})})})});GU.displayName=Sy;var zm="SelectItemText",WU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,...a}=e,i=Es(zm,r),s=As(zm,r),l=zU(zm,r),u=uZ(zm,r),[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 Ve(()=>(m(g),()=>x(g)),[m,x,g]),(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(q.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?VP.createPortal(a.children,i.valueNode):null]})});WU.displayName=zm;var jU="SelectItemIndicator",$U=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return zU(jU,r).isSelected?(0,fe.jsx)(q.span,{"aria-hidden":!0,...o,ref:t}):null});$U.displayName=jU;var OP="SelectScrollUpButton",qU=Z.forwardRef((e,t)=>{let r=As(OP,e.__scopeSelect),o=BP(OP,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,o.onScrollButtonChange);return Ve(()=>{if(r.viewport&&r.isPositioned){let l=function(){let c=u.scrollTop>0;a(c)};var s=l;let u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),n?(0,fe.jsx)(XU,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});qU.displayName=OP;var FP="SelectScrollDownButton",KU=Z.forwardRef((e,t)=>{let r=As(FP,e.__scopeSelect),o=BP(FP,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,o.onScrollButtonChange);return Ve(()=>{if(r.viewport&&r.isPositioned){let l=function(){let c=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<c;a(d)};var s=l;let u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),n?(0,fe.jsx)(XU,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});KU.displayName=FP;var XU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:o,...n}=e,a=As("SelectScrollButton",r),i=Z.useRef(null),s=Ry(r),l=Z.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return Z.useEffect(()=>()=>l(),[l]),Ve(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,fe.jsx)(q.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:W(n.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:W(n.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:W(n.onPointerLeave,()=>{l()})})}),CZ="SelectSeparator",YU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return(0,fe.jsx)(q.div,{"aria-hidden":!0,...o,ref:t})});YU.displayName=CZ;var _P="SelectArrow",wZ=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=Iy(r),a=Es(_P,r),i=As(_P,r);return a.open&&i.position==="popper"?(0,fe.jsx)(xs,{...n,...o,ref:t}):null});wZ.displayName=_P;var SZ="SelectBubbleInput",QU=Z.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{let n=Z.useRef(null),a=de(o,n),i=jc(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)(q.select,{...r,style:{...AP,...r.style},ref:a,defaultValue:t})});QU.displayName=SZ;function ZU(e){return e===""||e===void 0}function JU(e){let t=nt(e),r=Z.useRef(""),o=Z.useRef(0),n=Z.useCallback(i=>{let s=r.current+i;t(s),function l(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=Z.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return Z.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function e3(e,t,r){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=bZ(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==r));let l=i.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function bZ(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var t3=PU,HP=TU,r3=MU,o3=EU,n3=AU,UP=DU,a3=_U,i3=BU,zP=UU,GP=GU,s3=WU,l3=$U,WP=qU,jP=KU,$P=YU;var $e=R(N()),iu=t3;iu.displayName="Select";var u3=i3,ud=r3,IZ=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"}}),su=Ds.forwardRef(({className:e,children:t,variant:r,size:o,error:n,success:a,loading:i,leftIcon:s,rightIcon:l,...u},c)=>(0,$e.jsxs)(HP,{ref:c,className:P(IZ({variant:r,size:o,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,$e.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,$e.jsx)("span",{className:"flex items-center justify-center text-muted-foreground",children:s}),i?(0,$e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$e.jsx)(Ht,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,$e.jsx)("span",{className:"text-muted-foreground",children:"Loading..."})]}):t]}),!i&&(0,$e.jsx)(o3,{asChild:!0,children:l?(0,$e.jsx)("span",{className:"opacity-60",children:l}):(0,$e.jsx)(la,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));su.displayName=HP.displayName;var Py=Ds.forwardRef(({className:e,...t},r)=>(0,$e.jsx)(WP,{ref:r,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,$e.jsx)(Af,{className:"h-4 w-4"})}));Py.displayName=WP.displayName;var Ly=Ds.forwardRef(({className:e,...t},r)=>(0,$e.jsx)(jP,{ref:r,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,$e.jsx)(la,{className:"h-4 w-4"})}));Ly.displayName=jP.displayName;var lu=Ds.forwardRef(({className:e,children:t,position:r="popper",side:o="bottom",sideOffset:n=4,align:a="start",...i},s)=>(0,$e.jsx)(n3,{children:(0,$e.jsxs)(UP,{ref:s,side:o,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"],r==="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:r,...i,children:[(0,$e.jsx)(Py,{}),(0,$e.jsx)(a3,{className:P("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,$e.jsx)(Ly,{})]})}));lu.displayName=UP.displayName;var qP=Ds.forwardRef(({className:e,...t},r)=>(0,$e.jsx)(zP,{ref:r,className:P("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));qP.displayName=zP.displayName;var Er=Ds.forwardRef(({className:e,children:t,variant:r="default",size:o="md",rightIcon:n,customIndicator:a,...i},s)=>(0,$e.jsxs)(GP,{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",o==="sm"&&"py-1 pl-7 pr-2 text-xs",o==="md"&&"py-1.5 pl-8 pr-2 text-sm",o==="lg"&&"py-2 pl-9 pr-3 text-base",r==="default"&&"focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",r==="subtle"&&"focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",r==="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",r==="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",r==="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,$e.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$e.jsx)(l3,{children:a||(0,$e.jsx)(Cr,{className:"h-4 w-4"})})}),(0,$e.jsx)(s3,{children:t}),n&&(0,$e.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:n})]}));Er.displayName=GP.displayName;var KP=Ds.forwardRef(({className:e,...t},r)=>(0,$e.jsx)($P,{ref:r,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));KP.displayName=$P.displayName;var Jt=R(N()),PZ=[{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"}],c3=(e,t)=>{let r=e.replace(/\D/g,"");switch(t){case"+1":return r.length<=3?r:r.length<=6?`(${r.slice(0,3)}) ${r.slice(3)}`:`(${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,10)}`;case"+44":return r.length<=4?r:r.length<=7?`${r.slice(0,4)} ${r.slice(4)}`:`${r.slice(0,4)} ${r.slice(4,7)} ${r.slice(7,11)}`;case"+90":return r.length<=3?r:r.length<=6?`(${r.slice(0,3)}) ${r.slice(3)}`:r.length<=9?`(${r.slice(0,3)}) ${r.slice(3,6)} ${r.slice(6)}`:`(${r.slice(0,3)}) ${r.slice(3,6)} ${r.slice(6,8)} ${r.slice(8,10)}`;default:let o="";for(let n=0;n<r.length;n++)n>0&&n%3===0&&(o+=" "),o+=r[n];return o}},LZ=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},XP=Gm.forwardRef(({className:e,value:t="",onChange:r,defaultCountry:o="+1",showIcon:n=!0,showCountrySelect:a=!0,countries:i=PZ,size:s,...l},u)=>{let[c,d]=Gm.useState(o),[f,p]=Gm.useState(t),g=i.find(v=>v.code===c)||i[0],m=v=>{let y=v.target.value.replace(/\D/g,""),C=LZ(c),w=y.slice(0,C),b=c3(w,c);p(w),r?.(w,c),v.target.value=b},x=v=>{d(v),r?.(f,v)},h=c3(f,c);return(0,Jt.jsxs)("div",{className:P("relative flex gap-2",e),children:[a&&(0,Jt.jsxs)(iu,{value:c,onValueChange:x,children:[(0,Jt.jsx)(su,{className:"w-[120px]",children:(0,Jt.jsx)(ud,{children:(0,Jt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Jt.jsx)("span",{children:g.flag}),(0,Jt.jsx)("span",{children:g.code})]})})}),(0,Jt.jsx)(lu,{children:i.map(v=>(0,Jt.jsx)(Er,{value:v.code,children:(0,Jt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Jt.jsx)("span",{children:v.flag}),(0,Jt.jsx)("span",{children:v.code}),(0,Jt.jsx)("span",{className:"text-muted-foreground",children:v.name})]})},v.code))})]}),(0,Jt.jsxs)("div",{className:"relative flex-1",children:[(0,Jt.jsx)(dr,{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,Jt.jsx)(Kf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});XP.displayName="PhoneInput";var Ar=R(M());var Lo=R(N()),TZ=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"}}),d3=Ar.createContext({}),YP=Ar.forwardRef(({className:e,value:t,defaultValue:r,onValueChange:o,disabled:n,name:a,...i},s)=>{let[l,u]=Ar.useState(r),c=t!==void 0,d=c?t:l,f=Ar.useCallback(p=>{c||u(p),o?.(p)},[c,o]);return(0,Lo.jsx)(d3.Provider,{value:{value:d,onValueChange:f,disabled:n,name:a},children:(0,Lo.jsx)("div",{ref:s,role:"radiogroup",className:P("moonui-theme","grid gap-2",e),...i})})});YP.displayName="RadioGroup";var Ty=Ar.forwardRef(({className:e,variant:t,size:r,indicator:o,id:n,value:a,disabled:i,...s},l)=>{let u=Ar.useContext(d3),c=Ar.useId(),d=n||c,f=u.value===a,p=g=>{u.onValueChange&&u.onValueChange(g.target.value),s.onChange&&s.onChange(g)};return(0,Lo.jsxs)("div",{className:"relative flex items-center",children:[(0,Lo.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,Lo.jsx)("label",{htmlFor:d,className:P(TZ({variant:t,size:r}),"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,Lo.jsx)("span",{className:P("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(o||(0,Lo.jsx)(il,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Ty.displayName="RadioGroupItem";var ky=Ar.forwardRef(({className:e,htmlFor:t,children:r,disabled:o=!1,...n},a)=>(0,Lo.jsx)("label",{ref:a,htmlFor:t,className:P("text-sm font-medium leading-none ml-2 text-foreground",o&&"cursor-not-allowed opacity-70",e),...n,children:r}));ky.displayName="RadioLabel";var QP=Ar.forwardRef(({id:e,label:t,labelClassName:r,...o},n)=>{let a=Ar.useId(),i=e||a;return(0,Lo.jsxs)("div",{className:"flex items-center",children:[(0,Lo.jsx)(Ty,{ref:n,id:i,...o}),(0,Lo.jsx)(ky,{htmlFor:i,disabled:o.disabled,className:r,children:t})]})});QP.displayName="RadioItemWithLabel";var hi=R(N());function f3({value:e="",onChange:t,placeholder:r="Start typing...",className:o,disabled:n=!1}){let a=i=>{!n&&t&&t(i.target.value)};return(0,hi.jsxs)("div",{className:P("border border-input rounded-md",o),children:[(0,hi.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,hi.jsxs)("div",{className:"flex gap-1",children:[(0,hi.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,hi.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,hi.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,hi.jsx)("textarea",{value:e,onChange:a,placeholder:r,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 oL=R(M());var se=R(M(),1);var v3=R(M(),1),BZ=R(Ha(),1);var fr=R(M(),1);var m3=R(M(),1);function p3(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kZ(...e){return t=>{let r=!1,o=e.map(n=>{let a=p3(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():p3(e[n],null)}}}}function vi(...e){return m3.useCallback(kZ(...e),e)}function h3(e){let t=fr.forwardRef((r,o)=>{let{children:n,...a}=r,i=null,s=!1,l=[];g3(n)&&typeof My=="function"&&(n=My(n._payload)),fr.Children.forEach(n,f=>{if(NZ(f)){s=!0;let p=f,g="child"in p.props?p.props.child:p.props.children;g3(g)&&typeof My=="function"&&(g=My(g._payload)),i=EZ(p,g),l.push(i?.props?.children)}else l.push(f)}),i?i=fr.cloneElement(i,void 0,l):!s&&fr.Children.count(n)===1&&fr.isValidElement(n)&&(i=n);let u=i?DZ(i):void 0,c=vi(o,u);if(!i){if(n||n===0)throw new Error(s?VZ(e):_Z(e));return n}let d=AZ(a,i.props??{});return i.type!==fr.Fragment&&(d.ref=o?c:u),fr.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var MZ=Symbol.for("radix.slottable");var EZ=(e,t)=>{if("child"in e.props){let r=e.props.child;return fr.isValidElement(r)?fr.cloneElement(r,void 0,e.props.children(r.props.children)):null}return fr.isValidElement(t)?t:null};function AZ(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function DZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function NZ(e){return fr.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MZ}var OZ=Symbol.for("react.lazy");function g3(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===OZ&&"_payload"in e&&FZ(e._payload)}function FZ(e){return typeof e=="object"&&e!==null&&"then"in e}var _Z=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,VZ=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,My=fr[" use ".trim().toString()];var x3=R(N(),1),HZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cd=HZ.reduce((e,t)=>{let r=h3(`Primitive.${t}`),o=v3.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,x3.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var pr=R(M(),1);var y3=R(M(),1),Wm=globalThis?.document?y3.useLayoutEffect:()=>{};var w3=R(M(),1);function UZ(e,t){return w3.useReducer((r,o)=>t[r][o]??r,e)}var dd=e=>{let{present:t,children:r}=e,o=zZ(t),n=typeof r=="function"?r({present:o.isPresent}):pr.Children.only(r),a=GZ(o.ref,WZ(n));return typeof r=="function"||o.isPresent?pr.cloneElement(n,{ref:a}):null};dd.displayName="Presence";function zZ(e){let[t,r]=pr.useState(),o=pr.useRef(null),n=pr.useRef(e),a=pr.useRef("none"),i=pr.useRef(void 0),s=e?"mounted":"unmounted",[l,u]=UZ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return pr.useEffect(()=>{l==="mounted"?(a.current=i.current??jm(o.current),i.current=void 0):a.current="none"},[l]),Wm(()=>{let c=o.current,d=n.current;if(d!==e){let p=a.current,g=jm(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]),Wm(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=g=>{let x=jm(o.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=jm(o.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:pr.useCallback(c=>{if(c){let d=getComputedStyle(c);o.current=d,i.current=jm(d)}else o.current=null;r(c)},[])}}function C3(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function GZ(...e){let t=pr.useRef(e);return t.current=e,pr.useCallback(r=>{let o=t.current,n=!1,a=o.map(i=>{let s=C3(i,r);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():C3(o[i],null)}}},[])}function jm(e){return e?.animationName||"none"}function WZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var xi=R(M(),1),S3=R(N(),1);function b3(e,t=[]){let r=[];function o(a,i){let s=xi.createContext(i);s.displayName=a+"Context";let l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=xi.useMemo(()=>g,Object.values(g));return(0,S3.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=xi.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=r.map(i=>xi.createContext(i));return function(s){let l=s?.[e]||a;return xi.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,jZ(n,...t)]}function jZ(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return xi.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var fd=R(M(),1);function Ns(e){let t=fd.useRef(e);return fd.useEffect(()=>{t.current=e}),fd.useMemo(()=>(...r)=>t.current?.(...r),[])}var Ey=R(M(),1),$Z=R(N(),1),qZ=Ey.createContext(void 0);function R3(e){let t=Ey.useContext(qZ);return e||t||"ltr"}function I3(e,[t,r]){return Math.min(r,Math.max(t,e))}var uEe=!!(typeof window<"u"&&window.document&&window.document.createElement);function Os(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)}}var L3=R(M(),1),_e=R(N(),1);function KZ(e,t){return L3.useReducer((r,o)=>t[r][o]??r,e)}var ZP="ScrollArea",[T3,CEe]=b3(ZP),[XZ,tn]=T3(ZP),k3=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:o="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,C]=se.useState(0),[w,b]=se.useState(!1),[S,I]=se.useState(!1),L=vi(t,l),T=R3(n);return(0,_e.jsx)(XZ,{scope:r,type:o,dir:T,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:w,onScrollbarXEnabledChange:b,scrollbarY:m,onScrollbarYChange:x,scrollbarYEnabled:S,onScrollbarYEnabledChange:I,onCornerWidthChange:v,onCornerHeightChange:C,children:(0,_e.jsx)(cd.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}})})});k3.displayName=ZP;var M3="ScrollAreaViewport",E3=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:o,nonce:n,...a}=e,i=tn(M3,r),s=se.useRef(null),l=vi(t,s,i.onViewportChange);return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(YZ,{nonce:n}),(0,_e.jsx)(cd.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,_e.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});E3.displayName=M3;var YZ=se.memo(({nonce:e})=>(0,_e.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),Pa="ScrollAreaScrollbar",Ny=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=tn(Pa,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,_e.jsx)(QZ,{...o,ref:t,forceMount:r}):n.type==="scroll"?(0,_e.jsx)(ZZ,{...o,ref:t,forceMount:r}):n.type==="auto"?(0,_e.jsx)(A3,{...o,ref:t,forceMount:r}):n.type==="always"?(0,_e.jsx)(JP,{...o,ref:t,"data-state":"visible"}):null});Ny.displayName=Pa;var QZ=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=tn(Pa,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,_e.jsx)(dd,{present:r||a,children:(0,_e.jsx)(A3,{"data-state":a?"visible":"hidden",...o,ref:t})})}),ZZ=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=tn(Pa,e.__scopeScrollArea),a=e.orientation==="horizontal",i=Fy(()=>l("SCROLL_END"),100),[s,l]=KZ("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,_e.jsx)(dd,{present:r||s!=="hidden",children:(0,_e.jsx)(JP,{"data-state":s==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:Os(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Os(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),A3=se.forwardRef((e,t)=>{let r=tn(Pa,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,i]=se.useState(!1),s=e.orientation==="horizontal",l=Fy(()=>{if(r.viewport){let u=r.viewport.offsetWidth<r.viewport.scrollWidth,c=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?u:c)}},10);return pd(r.viewport,l),pd(r.content,l),(0,_e.jsx)(dd,{present:o||a,children:(0,_e.jsx)(JP,{"data-state":a?"visible":"hidden",...n,ref:t})})}),JP=se.forwardRef((e,t)=>{let{orientation:r="vertical",...o}=e,n=tn(Pa,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=F3(s.viewport,s.content),c={...o,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 nJ(f,i.current,s,p)}return r==="horizontal"?(0,_e.jsx)(JZ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollLeft,p=P3(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))}}):r==="vertical"?(0,_e.jsx)(eJ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollTop,p=P3(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}),JZ=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=tn(Pa,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=vi(t,l,a.onScrollbarXChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,_e.jsx)(N3,{"data-orientation":"horizontal",...n,ref:u,sizes:r,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":Oy(r)+"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),V3(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Dy(i.paddingLeft),paddingEnd:Dy(i.paddingRight)}})}})}),eJ=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=tn(Pa,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=vi(t,l,a.onScrollbarYChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,_e.jsx)(N3,{"data-orientation":"vertical",...n,ref:u,sizes:r,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":Oy(r)+"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),V3(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Dy(i.paddingTop),paddingEnd:Dy(i.paddingBottom)}})}})}),[tJ,D3]=T3(Pa),N3=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:o,hasThumb:n,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=tn(Pa,r),[g,m]=se.useState(null),x=vi(t,m),h=se.useRef(null),v=se.useRef(""),y=p.viewport,C=o.content-o.viewport,w=Ns(c),b=Ns(l),S=Fy(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)&&w(T,C)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[y,g,C,w]),se.useEffect(b,[o,b]),pd(g,S),pd(p.content,S),(0,_e.jsx)(tJ,{scope:r,scrollbar:g,hasThumb:n,onThumbChange:Ns(a),onThumbPointerUp:Ns(i),onThumbPositionChange:b,onThumbPointerDown:Ns(s),children:(0,_e.jsx)(cd.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:Os(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:Os(e.onPointerMove,I),onPointerUp:Os(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})})})}),Ay="ScrollAreaThumb",eL=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=D3(Ay,e.__scopeScrollArea);return(0,_e.jsx)(dd,{present:r||n.hasThumb,children:(0,_e.jsx)(rJ,{ref:t,...o})})}),rJ=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:o,...n}=e,a=tn(Ay,r),i=D3(Ay,r),{onThumbPositionChange:s}=i,l=vi(t,i.onThumbChange),u=se.useRef(void 0),c=Fy(()=>{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=aJ(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,c,s]),(0,_e.jsx)(cd.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)",...o},onPointerDownCapture:Os(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:Os(e.onPointerUp,i.onThumbPointerUp)})});eL.displayName=Ay;var tL="ScrollAreaCorner",O3=se.forwardRef((e,t)=>{let r=tn(tL,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?(0,_e.jsx)(oJ,{...e,ref:t}):null});O3.displayName=tL;var oJ=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,...o}=e,n=tn(tL,r),[a,i]=se.useState(0),[s,l]=se.useState(0),u=!!(a&&s),{onCornerWidthChange:c,onCornerHeightChange:d}=n;return pd(n.scrollbarX,()=>{let f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),l(f)}),pd(n.scrollbarY,()=>{let f=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(f),i(f)}),se.useEffect(()=>()=>{c(0),d(0)},[c,d]),u?(0,_e.jsx)(cd.div,{...o,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 Dy(e){return e?parseInt(e,10):0}function F3(e,t){let r=e/t;return isNaN(r)?0:r}function Oy(e){let t=F3(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function nJ(e,t,r,o="ltr"){let n=Oy(r),a=n/2,i=t||a,s=n-i,l=r.scrollbar.paddingStart+i,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,c=r.content-r.viewport,d=o==="ltr"?[0,c]:[c*-1,0];return _3([l,u],d)(e)}function P3(e,t,r="ltr"){let o=Oy(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,i=t.content-t.viewport,s=a-o,l=r==="ltr"?[0,i]:[i*-1,0],u=I3(e,l);return _3([0,i],[0,s])(u)}function _3(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(r-e[0])}}function V3(e,t){return e>0&&e<t}var aJ=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},o=0;return function n(){let a={left:e.scrollLeft,top:e.scrollTop},i=r.left!==a.left,s=r.top!==a.top;(i||s)&&t(),r=a,o=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(o)};function Fy(e,t){let r=Ns(e),o=se.useRef(0);return se.useEffect(()=>()=>window.clearTimeout(o.current),[]),se.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function pd(e,t){let r=Ns(t);Wm(()=>{let o=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(o),n.unobserve(e)}}},[e,r])}var rL=k3,B3=E3;var H3=O3;var Fs=R(N()),nL=oL.forwardRef(({className:e,children:t,focusable:r=!0,...o},n)=>(0,Fs.jsxs)(rL,{ref:n,className:P("relative overflow-hidden",e),...o,children:[(0,Fs.jsx)(B3,{tabIndex:r?0:void 0,className:"h-full w-full rounded-[inherit]",children:t}),(0,Fs.jsx)(_y,{}),(0,Fs.jsx)(H3,{})]}));nL.displayName=rL.displayName;var _y=oL.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,Fs.jsx)(Ny,{ref:o,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),...r,children:(0,Fs.jsx)(eL,{className:"relative flex-1 rounded-full bg-border"})}));_y.displayName=Ny.displayName;var Wn=R(M());var $m=R(N()),U3=(e,t)=>{let r={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 r[e]||r.up},z3={duration:.5,ease:[.25,.46,.45,.94]},aL=Wn.forwardRef(({children:e,direction:t="up",delay:r=0,duration:o=.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=Wn.useMemo(()=>c||U3(t,n),[t,n,c]),v=Wn.useMemo(()=>({...z3,duration:o,delay:r+l}),[o,r,l]),y=Wn.useMemo(()=>({once:x,amount:a,...g}),[x,a,g]);return d?(0,$m.jsx)(He.div,{ref:m,initial:"hidden",whileInView:"visible",viewport:y,variants:h,transition:v,className:P(u),style:f,id:p,children:e}):(0,$m.jsx)("div",{ref:m,className:u,style:f,id:p,children:e})});aL.displayName="ScrollReveal";var iL=Wn.forwardRef(({children:e,stagger:t=.1,className:r,style:o,id:n,threshold:a=.3,once:i=!0,triggerOnce:s,viewport:l},u)=>{let c=s!==void 0?s:i,d=Wn.useMemo(()=>({once:c,amount:a,...l}),[c,a,l]),f={hidden:{},visible:{transition:{staggerChildren:t,delayChildren:0}}};return(0,$m.jsx)(He.div,{ref:u,initial:"hidden",whileInView:"visible",viewport:d,variants:f,className:P(r),style:o,id:n,children:e})});iL.displayName="ScrollRevealContainer";var sL=Wn.forwardRef(({children:e,direction:t="up",duration:r=.5,distance:o=50,className:n,variants:a,style:i,id:s},l)=>{let u=Wn.useMemo(()=>a||U3(t,o),[t,o,a]),c=Wn.useMemo(()=>({...z3,duration:r}),[r]);return(0,$m.jsx)(He.div,{ref:l,variants:u,transition:c,className:P(n),style:i,id:s,children:e})});sL.displayName="ScrollRevealItem";var q3=R(M());var W3=R(M(),1);var j3=R(N(),1),sJ="Separator",G3="horizontal",lJ=["horizontal","vertical"],$3=W3.forwardRef((e,t)=>{let{decorative:r,orientation:o=G3,...n}=e,a=uJ(o)?o:G3,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,j3.jsx)(q.div,{"data-orientation":a,...s,...n,ref:t})});$3.displayName=sJ;function uJ(e){return lJ.includes(e)}var lL=$3;var X3=R(N()),K3=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"}}),To=q3.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:o="md",decorative:n=!0,...a},i)=>(0,X3.jsx)(lL,{ref:i,decorative:n,orientation:t||void 0,className:P(K3({orientation:t,variant:r,size:o}),e),...a}));To.displayName=lL.displayName;var et=R(M());var yz=R(M());var vz=R(M(),1);var dJ=Object.defineProperty,md=(e,t)=>dJ(e,"name",{value:t,configurable:!0}),Y3=!!(typeof window<"u"&&window.document&&window.document.createElement);function cL(e,t,{checkForDefaultPrevented:r=!0}={}){return md(function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}md(cL,"composeEventHandlers");function fJ(e){if(!Y3)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}md(fJ,"getOwnerWindow");function uL(e){if(!Y3)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}md(uL,"getOwnerDocument");function Q3(e,t=!1){let{activeElement:r}=uL(e);if(!r?.nodeName)return null;if(Z3(r)&&r.contentDocument)return Q3(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=uL(r).getElementById(o);if(n)return n}}return r}md(Q3,"getActiveElement");function Z3(e){return e.tagName==="IFRAME"}md(Z3,"isFrame");var rn=R(M(),1);var gd=!1;var J3=R(M(),1),Vy=globalThis?.document?J3.useLayoutEffect:()=>{};var jn=R(M(),1);var hd=R(M(),1),pJ=Object.defineProperty,mJ=(e,t)=>pJ(e,"name",{value:t,configurable:!0}),ez=hd[" useEffectEvent ".trim().toString()],tz=hd[" useInsertionEffect ".trim().toString()];function dL(e){if(typeof ez=="function")return ez(e);let t=hd.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof tz=="function"?tz(()=>{t.current=e}):Vy(()=>{t.current=e}),hd.useMemo(()=>(...r)=>t.current?.(...r),[])}mJ(dL,"useEffectEvent");var gJ=Object.defineProperty,qm=(e,t)=>gJ(e,"name",{value:t,configurable:!0}),hJ=rn[" useInsertionEffect ".trim().toString()]||Vy;function fL({prop:e,defaultProp:t,onChange:r=qm(()=>{},"onChange"),caller:o}){let[n,a,i]=oz({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;if(gd){let c=rn.useRef(e!==void 0);rn.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${o} 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,o])}let u=rn.useCallback(c=>{if(s){let d=nz(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}qm(fL,"useControllableState");function oz({defaultProp:e,onChange:t}){let[r,o]=rn.useState(e),n=rn.useRef(r),a=rn.useRef(t);return hJ(()=>{a.current=t},[t]),rn.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}qm(oz,"useUncontrolledState");function nz(e){return typeof e=="function"}qm(nz,"isFunction");var rz=Symbol("RADIX:SYNC_STATE");function vJ(e,t,r,o){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=dL(i);if(gd){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=[{...r,state:a}];o&&c.push(o);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]}qm(vJ,"useControllableStateReducer");var pz=R(M(),1),mz=R(Ha(),1);var Lt=R(M(),1);var az=R(M(),1),xJ=Object.defineProperty,mL=(e,t)=>xJ(e,"name",{value:t,configurable:!0});function pL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}mL(pL,"setRef");function iz(...e){return t=>{let r=!1,o=e.map(n=>{let a=pL(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():pL(e[n],null)}}}}mL(iz,"composeRefs");function gL(...e){return az.useCallback(iz(...e),e)}mL(gL,"useComposedRefs");var wJ=R(N(),1),yJ=Object.defineProperty,on=(e,t)=>yJ(e,"name",{value:t,configurable:!0}),CJ=on((e,t)=>{let r={...t};for(let o in t){let n=e[o],a=t[o];if(/^on[A-Z]/.test(o))if(n&&a){let s=typeof n=="function",l=typeof a=="function";gd&&(!s||!l)&&console.warn(`Slot: Expected a function for ${o}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),r[o]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(r[o]=n);else o==="style"?r[o]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:o==="className"?r[o]=[n,a].filter(Boolean).join(" "):o==="aria-describedby"&&(r[o]=sz(a,n))}return{...e,...r}},"mergeProps");function sz(...e){let t=new Set;for(let r of e)if(typeof r=="string")for(let o of String(r).trim().split(/\s+/))o&&t.add(o);return t.size>0?Array.from(t).join(" "):void 0}on(sz,"concatAriaDescribedby");var lz=Lt.createContext(CJ);lz.displayName="SlotContext";function vL(e){let t=Lt.forwardRef((r,o)=>{let n=Lt.useContext(lz),{children:a,mergeProps:i=n,...s}=r,l=null,u=!1,c=[];hL(a)&&typeof By=="function"&&(a=By(a._payload)),Lt.Children.forEach(a,g=>{if(dz(g)){u=!0;let m=g,x="child"in m.props?m.props.child:m.props.children;hL(x)&&typeof By=="function"&&(x=By(x._payload)),l=bJ(m,x),c.push(l?.props?.children)}else c.push(g)}),l?l=Lt.cloneElement(l,void 0,c):!u&&Lt.Children.count(a)===1&&Lt.isValidElement(a)&&(l=a);let d=l?cz(l):void 0,f=gL(o,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!==Lt.Fragment&&(p.ref=o?f:d),Lt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}on(vL,"createSlot");var uz=Symbol.for("radix.slottable");function SJ(e){let t=on(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=uz,t}on(SJ,"createSlottable");var bJ=on((e,t)=>{if("child"in e.props){let r=e.props.child;return Lt.isValidElement(r)?Lt.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Lt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function cz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}on(cz,"getElementRef");function dz(e){return Lt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uz}on(dz,"isSlottable");var RJ=Symbol.for("react.lazy");function hL(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===RJ&&"_payload"in e&&fz(e._payload)}on(hL,"isLazyComponent");function fz(e){return typeof e=="object"&&e!==null&&"then"in e}on(fz,"isPromiseLike");var IJ=on(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),PJ=on(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),By=Lt[" use ".trim().toString()];var gz=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"],hz=kJ.reduce((e,t)=>{let r=vL(`Primitive.${t}`),o=pz.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,gz.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function MJ(e,t){e&&mz.flushSync(()=>e.dispatchEvent(t))}TJ(MJ,"dispatchDiscreteCustomEvent");var xz=R(N(),1),EJ=Object.defineProperty,AJ=(e,t)=>EJ(e,"name",{value:t,configurable:!0}),DJ="Toggle",Km=vz.forwardRef(AJ(function(t,r){let{pressed:o,defaultPressed:n,onPressedChange:a,...i}=t,[s,l]=fL({prop:o,onChange:a,defaultProp:n??!1,caller:DJ});return(0,xz.jsx)(hz.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:r,onClick:cL(t.onClick,()=>{t.disabled||l(!s)})})},"Toggle"));var Cz=R(N()),Xm=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"}}),Ym=yz.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Cz.jsx)(Km,{ref:n,className:P("moonui-theme",Xm({variant:t,size:r,className:e})),...o}));Ym.displayName=Km.displayName;var zy=R(M());var Re=R(M(),1);var Nt=R(N(),1),[Hy,fAe]=Fe("Tooltip",[Zo]),Uy=Zo(),wz="TooltipProvider",OJ=700,xL="tooltip.open",[FJ,CL]=Hy(wz),Sz=e=>{let{__scopeTooltip:t,delayDuration:r=OJ,skipDelayDuration:o=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,Nt.jsx)(FJ,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:Re.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:Re.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:s,onPointerInTransitChange:Re.useCallback(u=>{s.current=u},[]),disableHoverableContent:n,children:a})};Sz.displayName=wz;var Qm="Tooltip",[_J,Zm]=Hy(Qm),bz=e=>{let{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=CL(Qm,e.__scopeTooltip),u=Uy(t),[c,d]=Re.useState(null),f=Ne(),p=Re.useRef(0),g=i??l.disableHoverableContent,m=s??l.delayDuration,x=Re.useRef(!1),[h,v]=qe({prop:o,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(xL))):l.onClose(),a?.(S)},caller:Qm}),y=Re.useMemo(()=>h?x.current?"delayed-open":"instant-open":"closed",[h]),C=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,v(!0)},[v]),w=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,Nt.jsx)(si,{...u,children:(0,Nt.jsx)(_J,{scope:t,contentId:f,open:h,stateAttribute:y,trigger:c,onTriggerChange:d,onTriggerEnter:Re.useCallback(()=>{l.isOpenDelayedRef.current?b():C()},[l.isOpenDelayedRef,b,C]),onTriggerLeave:Re.useCallback(()=>{g?w():(window.clearTimeout(p.current),p.current=0)},[w,g]),onOpen:C,onClose:w,disableHoverableContent:g,children:r})})};bz.displayName=Qm;var yL="TooltipTrigger",Rz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Zm(yL,r),a=CL(yL,r),i=Uy(r),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,Nt.jsx)(li,{asChild:!0,...i,children:(0,Nt.jsx)(q.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,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)})})});Rz.displayName=yL;var wL="TooltipPortal",[VJ,BJ]=Hy(wL,{forceMount:void 0}),HJ=e=>{let{__scopeTooltip:t,forceMount:r,children:o,container:n}=e,a=Zm(wL,t);return(0,Nt.jsx)(VJ,{scope:t,forceMount:r,children:(0,Nt.jsx)(ut,{present:r||a.open,children:(0,Nt.jsx)(Ro,{asChild:!0,container:n,children:o})})})};HJ.displayName=wL;var vd="TooltipContent",Iz=Re.forwardRef((e,t)=>{let r=BJ(vd,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,i=Zm(vd,e.__scopeTooltip);return(0,Nt.jsx)(ut,{present:o||i.open,children:i.disableHoverableContent?(0,Nt.jsx)(Pz,{side:n,...a,ref:t}):(0,Nt.jsx)(UJ,{side:n,...a,ref:t})})}),UJ=Re.forwardRef((e,t)=>{let r=Zm(vd,e.__scopeTooltip),o=CL(vd,e.__scopeTooltip),n=Re.useRef(null),a=de(t,n),[i,s]=Re.useState(null),{trigger:l,onClose:u}=r,c=n.current,{onPointerInTransitChange:d}=o,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=jJ(h,x.getBoundingClientRect()),y=$J(h,v),C=qJ(m.getBoundingClientRect()),w=XJ([...y,...C]);s(w),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=!KJ(h,i);v?f():y&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,c,i,u,f]),(0,Nt.jsx)(Pz,{...e,ref:a})}),[zJ,GJ]=Hy(Qm,{isInside:!1}),WJ=o1("TooltipContent"),Pz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Zm(vd,r),u=Uy(r),{onClose:c}=l;return Re.useEffect(()=>(document.addEventListener(xL,c),()=>document.removeEventListener(xL,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,Nt.jsx)(Ko,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,Nt.jsxs)(vs,{"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,Nt.jsx)(WJ,{children:o}),(0,Nt.jsx)(zJ,{scope:r,isInside:!0,children:(0,Nt.jsx)(IU,{id:l.contentId,role:"tooltip",children:n||o})})]})})});Iz.displayName=vd;var Lz="TooltipArrow",Tz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Uy(r);return GJ(Lz,r).isInside?null:(0,Nt.jsx)(xs,{...n,...o,ref:t})});Tz.displayName=Lz;function jJ(e,t){let r=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,o,n,a)){case a:return"left";case n:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function $J(e,t,r=5){let o=[];switch(t){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function qJ(e){let{top:t,right:r,bottom:o,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:o},{x:n,y:o}]}function KJ(e,t){let{x:r,y:o}=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>o!=f>o&&r<(d-u)*(o-c)/(f-c)+u&&(n=!n)}return n}function XJ(e){let t=e.slice();return t.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),YJ(t)}function YJ(e){if(e.length<=1)return e.slice();let t=[];for(let o=0;o<e.length;o++){let n=e[o];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 r=[];for(let o=e.length-1;o>=0;o--){let n=e[o];for(;r.length>=2;){let a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var kz=Sz,Mz=bz,Ez=Rz;var SL=Iz,bL=Tz;var _s=R(N()),Gy=kz,RL=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"}}),Jm=Mz,eg=Ez,Wy=zy.forwardRef(({className:e,...t},r)=>(0,_s.jsx)(bL,{ref:r,className:P("moonui-theme","fill-current",e),...t}));Wy.displayName=bL.displayName;var xd=zy.forwardRef(({className:e,variant:t,size:r,showArrow:o=!1,sideOffset:n=4,...a},i)=>(0,_s.jsxs)(SL,{ref:i,sideOffset:n,className:P("moonui-theme",RL({variant:t,size:r}),e),...a,children:[a.children,o&&(0,_s.jsx)(Wy,{})]}));xd.displayName=SL.displayName;var IL=zy.forwardRef(({children:e,content:t,variant:r="default",size:o="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,_s.jsxs)(Jm,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,_s.jsx)(eg,{asChild:!0,children:e}),(0,_s.jsx)(xd,{ref:g,side:n,align:a,variant:r,size:o,sideOffset:s,showArrow:l,className:u,...p,children:t})]}));IL.displayName="SimpleTooltip";var G=R(N()),$t=({icon:e,tooltip:t,active:r,onClick:o,disabled:n})=>(0,G.jsxs)(Jm,{children:[(0,G.jsx)(eg,{asChild:!0,children:(0,G.jsx)(Ym,{pressed:r,onPressedChange:()=>o(),disabled:n,"aria-label":t,className:"h-8 w-8 p-0",children:e})}),(0,G.jsx)(xd,{children:(0,G.jsx)("p",{children:t})})]}),ZJ=({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(r=>(0,G.jsx)("button",{type:"button","aria-label":`Select color ${r}`,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:r},onClick:()=>e(r)},r))}),PL=et.default.forwardRef(({value:e="",onChange:t,placeholder:r="Start writing...",disabled:o=!1,className:n,minHeight:a=200,maxHeight:i=500,showToolbar:s=!0,showPreview:l=!0,...u},c)=>{let[d,f]=(0,et.useState)(e),[p,g]=(0,et.useState)(!1),[m,x]=(0,et.useState)(e),[h,v]=(0,et.useState)(null),y=et.default.useRef(null),C=et.default.useRef(null),[w,b]=(0,et.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,et.useCallback)(A=>{f(A),t?.(A)},[t]),I=(0,et.useCallback)(()=>{let A=window.getSelection();return A&&A.rangeCount>0?A.getRangeAt(0):null},[]),L=(0,et.useCallback)(A=>{if(!A)return;let te=window.getSelection();te&&(te.removeAllRanges(),te.addRange(A))},[]),T=(0,et.useCallback)((A,te)=>{if(o)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()},[o,I,S]),k=(0,et.useCallback)(A=>{let te=A.currentTarget.innerHTML;S(te)},[S]),E=(0,et.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,et.useCallback)(()=>{let A=prompt("Enter URL:");A&&T("createLink",A)},[T]),D=(0,et.useCallback)(()=>{let A=prompt("Enter image URL:");A&&T("insertImage",A)},[T]),z=(0,et.useCallback)(A=>{T("formatBlock",`<h${A}>`)},[T]),F=(0,et.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||""};et.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),et.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),x(e))},[e,d]);let B=s&&(0,G.jsx)(Gy,{children:(0,G.jsxs)(He.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)($t,{icon:(0,G.jsx)(Ef,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:w.bold,onClick:()=>T("bold"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(zf,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:w.italic,onClick:()=>T("italic"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Jf,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:w.underline,onClick:()=>T("underline"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Zf,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:w.strikethrough,onClick:()=>T("strikeThrough"),disabled:o})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(iu,{onValueChange:A=>{A.startsWith("h")?z(A.substring(1)):A==="normal"?T("formatBlock","p"):T("fontSize",A)},disabled:o,children:[(0,G.jsx)(su,{className:"w-24 h-8",children:(0,G.jsx)(ud,{placeholder:"Size"})}),(0,G.jsxs)(lu,{children:[(0,G.jsx)(Er,{value:"1",children:"Small"}),(0,G.jsx)(Er,{value:"3",children:"Normal"}),(0,G.jsx)(Er,{value:"5",children:"Large"}),(0,G.jsx)(Er,{value:"7",children:"X-Large"}),(0,G.jsx)(To,{className:"my-1"}),(0,G.jsx)(Er,{value:"h1",children:"Heading 1"}),(0,G.jsx)(Er,{value:"h2",children:"Heading 2"}),(0,G.jsx)(Er,{value:"h3",children:"Heading 3"}),(0,G.jsx)(Er,{value:"h4",children:"Heading 4"}),(0,G.jsx)(Er,{value:"h5",children:"Heading 5"}),(0,G.jsx)(Er,{value:"h6",children:"Heading 6"})]})]}),(0,G.jsx)(To,{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)($t,{icon:(0,G.jsx)(Lf,{className:"h-3 w-3"}),tooltip:"Align Left",active:w.alignLeft,onClick:()=>T("justifyLeft"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(If,{className:"h-3 w-3"}),tooltip:"Align Center",active:w.alignCenter,onClick:()=>T("justifyCenter"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Tf,{className:"h-3 w-3"}),tooltip:"Align Right",active:w.alignRight,onClick:()=>T("justifyRight"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Pf,{className:"h-3 w-3"}),tooltip:"Justify",active:w.alignJustify,onClick:()=>T("justifyFull"),disabled:o})]}),(0,G.jsx)(To,{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)($t,{icon:(0,G.jsx)(jf,{className:"h-3 w-3"}),tooltip:"Bullet List",active:w.unorderedList,onClick:()=>T("insertUnorderedList"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Wf,{className:"h-3 w-3"}),tooltip:"Numbered List",active:w.orderedList,onClick:()=>T("insertOrderedList"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Yf,{className:"h-3 w-3"}),tooltip:"Quote",active:w.quote,onClick:()=>T("formatBlock","blockquote"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Nf,{className:"h-3 w-3"}),tooltip:"Code Block",active:w.code,onClick:()=>T("formatBlock","pre"),disabled:o})]}),(0,G.jsx)(To,{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)($t,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>T("outdent"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>T("indent"),disabled:o})]}),(0,G.jsx)(To,{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)($t,{icon:(0,G.jsx)(Gf,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:_,disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(ll,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:D,disabled:o})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(Ca,{children:[(0,G.jsx)(wa,{asChild:!0,children:(0,G.jsx)(Ee,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:o,title:"Text Color",children:(0,G.jsx)(ul,{className:"h-3 w-3"})})}),(0,G.jsx)(Bn,{className:"w-auto p-0",children:(0,G.jsx)(ZJ,{onColorSelect:F})})]}),(0,G.jsx)(To,{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)($t,{icon:(0,G.jsx)(ep,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>T("undo"),disabled:o}),(0,G.jsx)($t,{icon:(0,G.jsx)(Qf,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>T("redo"),disabled:o})]})]}),l&&(0,G.jsxs)(G.Fragment,{children:[!p&&(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsx)($t,{icon:p?(0,G.jsx)(to,{className:"h-3 w-3"}):(0,G.jsx)(sl,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?S(m):x(d),g(!p)},disabled:o})]})]})});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",o&&"opacity-50 cursor-not-allowed",n),...u,children:[B,(0,G.jsxs)("div",{className:"relative",children:[p?(0,G.jsx)(He.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:C,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:o,placeholder:"HTML source code..."})}):(0,G.jsx)(He.div,{ref:y,contentEditable:!o,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":r,"aria-disabled":o||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":r,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:r})]}),(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)(JJ,{content:d})})]})});PL.displayName="SimpleEditor";var JJ=({content:e})=>{let[t,r]=(0,et.useState)(0);return(0,et.useEffect)(()=>{r((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 tg=R(M());var er=R(N()),LL=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"}}),yi=tg.forwardRef(({className:e,variant:t,size:r,shape:o,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,...C}=f;if(s&&l)return c?(0,er.jsx)(He.div,{ref:p,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:P("moonui-theme",e),style:{height:a,width:i,...d},...C,children:l}):(0,er.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 w=c?He.div:"div";return(0,er.jsx)(w,{ref:p,"aria-hidden":"true",className:P("moonui-theme",LL({variant:t,size:r,shape:o,animation:n}),"relative isolate",e),style:{height:a,width:i,...d},...c?oO:{},...C})});yi.displayName="Skeleton";var jy=tg.forwardRef(({className:e,lines:t=3,lineHeight:r="0.85rem",spacing:o="0.5rem",lastLineWidth:n=80,randomWidths:a=!1,variant:i="default",animation:s="pulse",...l},u)=>(0,er.jsx)("div",{ref:u,className:P("moonui-theme","flex flex-col",e),style:{gap:o},...l,children:Array.from({length:t}).map((c,d)=>{let p=d===t-1?n:a?85+d%3*5:100;return(0,er.jsx)(yi,{variant:i,animation:s,className:"w-full",style:{height:r,width:`${p}%`}},d)})}));jy.displayName="SkeletonText";var $y=tg.forwardRef(({className:e,size:t="2.5rem",variant:r="default",animation:o="pulse",...n},a)=>(0,er.jsx)(yi,{ref:a,variant:r,animation:o,shape:"circle",className:P("moonui-theme","shrink-0",e),style:{height:t,width:t},...n}));$y.displayName="SkeletonAvatar";var TL=tg.forwardRef(({className:e,showHeader:t=!0,contentLines:r=3,showFooter:o=!0,variant:n="default",animation:a="pulse",...i},s)=>(0,er.jsxs)("div",{ref:s,className:P("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,er.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,er.jsx)($y,{size:"2.5rem",variant:n,animation:a}),(0,er.jsxs)("div",{className:"flex-1",children:[(0,er.jsx)(yi,{variant:n,animation:a,className:"mb-2 h-4 w-1/3"}),(0,er.jsx)(yi,{variant:n,animation:a,className:"h-3 w-1/4"})]})]}),(0,er.jsx)(jy,{lines:r,variant:n,animation:a,className:"mb-4"}),o&&(0,er.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,er.jsx)(yi,{variant:n,animation:a,className:"h-4 w-1/4"}),(0,er.jsx)(yi,{variant:n,animation:a,className:"h-4 w-1/5"})]})]}));TL.displayName="SkeletonCard";var yd=R(M());var Az=R(N()),kL=yd.forwardRef(({className:e,children:t,onSwipeLeft:r,onSwipeRight:o,threshold:n=100,disabled:a=!1,...i},s)=>{let[l,u]=yd.useState(0),[c,d]=yd.useState(0),[f,p]=yd.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&&o?o():h<0&&r&&r()),p(!1),d(0),u(0)};return(0,Az.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})});kL.displayName="SwipeableCard";var Ky=R(M());var $n=R(M(),1);var uu=R(N(),1),qy="Switch",[eee,UAe]=Fe(qy),[tee,ree]=eee(qy),Dz=$n.forwardRef((e,t)=>{let{__scopeSwitch:r,name:o,checked:n,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,p]=$n.useState(null),g=de(t,y=>p(y)),m=$n.useRef(!1),x=f?c||!!f.closest("form"):!0,[h,v]=qe({prop:n,defaultProp:a??!1,onChange:u,caller:qy});return(0,uu.jsxs)(tee,{scope:r,checked:h,disabled:s,children:[(0,uu.jsx)(q.button,{type:"button",role:"switch","aria-checked":h,"aria-required":i,"data-state":_z(h),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:g,onClick:W(e.onClick,y=>{v(C=>!C),x&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})}),x&&(0,uu.jsx)(Fz,{control:f,bubbles:!m.current,name:o,value:l,checked:h,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});Dz.displayName=qy;var Nz="SwitchThumb",Oz=$n.forwardRef((e,t)=>{let{__scopeSwitch:r,...o}=e,n=ree(Nz,r);return(0,uu.jsx)(q.span,{"data-state":_z(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});Oz.displayName=Nz;var oee="SwitchBubbleInput",Fz=$n.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{let i=$n.useRef(null),s=de(i,a),l=jc(r),u=$c(t);return $n.useEffect(()=>{let c=i.current;if(!c)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let g=new Event("click",{bubbles:o});p.call(c,r),c.dispatchEvent(g)}},[l,r,o]),(0,uu.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:s,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Fz.displayName=oee;function _z(e){return e?"checked":"unchecked"}var ML=Dz,Vz=Oz;var La=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"}}),aee=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"}}),EL=Ky.forwardRef(({className:e,size:t,variant:r,loading:o,leftIcon:n,rightIcon:a,description:i,"aria-describedby":s,...l},u)=>{let c=Ky.useId(),d=i?`${c}-description`:void 0,f=[s,d].filter(Boolean).join(" ")||void 0;return(0,La.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[n&&(0,La.jsx)("span",{className:"text-muted-foreground",children:n}),(0,La.jsxs)(ML,{className:P(Bz({size:t,variant:r}),o&&"opacity-80 cursor-wait",e),disabled:o||l.disabled,"aria-describedby":f,...l,ref:u,children:[o?(0,La.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,La.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-muted border-t-primary"})}):null,(0,La.jsx)(Vz,{className:P(aee({size:t}))})]}),a&&(0,La.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,La.jsx)("span",{id:d,className:"text-sm text-muted-foreground",children:i})]})});EL.displayName=ML.displayName;var nn=R(M());var Ta=R(N()),AL=nn.forwardRef(({value:e=[],onChange:t,maxTags:r,variant:o="primary",allowDuplicates:n=!1,delimiter:a=",",placeholder:i="Add tag and press Enter",className:s,disabled:l,...u},c)=>{let[d,f]=nn.useState(""),[p,g]=nn.useState(""),m=nn.useRef(null);nn.useImperativeHandle(c,()=>m.current);let x=nn.useRef([]),h=nn.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(),w()):S.key==="Backspace"&&d===""&&e.length>0?b(e.length-1):S.key==="ArrowLeft"&&d===""&&e.length>0&&(S.preventDefault(),v(e.length-1))},C=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}},w=()=>{let S=d.trim();if(S){if(!n&&e.includes(S)){g("This tag already exists"),setTimeout(()=>g(""),2e3);return}if(r&&e.length>=r){g(`Maximum ${r} tags allowed`),setTimeout(()=>g(""),2e3);return}t([...e,S]),f(""),g("")}},b=S=>{l||t(e.filter((I,L)=>L!==S))};return(0,Ta.jsxs)("div",{className:"relative",children:[(0,Ta.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,Ta.jsxs)(Br,{variant:o,className:"gap-1 pr-1.5",children:[(0,Ta.jsx)("span",{className:"text-xs",children:S}),!l&&(0,Ta.jsx)("button",{ref:L=>{x.current[I]=L},type:"button","aria-label":`Remove ${S}`,onClick:()=>b(I),onKeyDown:C(I),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,Ta.jsx)(yo,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},I)),(0,Ta.jsx)("input",{ref:m,type:"text",value:d,onChange:S=>f(S.target.value),onKeyDown:y,onBlur:w,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,Ta.jsx)("p",{id:h,role:"status",className:"mt-1 text-xs text-destructive",children:p})]})});AL.displayName="TagsInput";var Wr=R(M());var ka=R(N()),iee=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}}),DL=Wr.forwardRef(({className:e,wrapperClassName:t,messageClassName:r,variant:o,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=Wr.useId(),y=x.id||v,C=Wr.useRef(null),[w,b]=Wr.useState(p||g||"");Wr.useImperativeHandle(h,()=>C.current);let S=Wr.useCallback(()=>{let D=C.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]);Wr.useEffect(()=>{S()},[w,S]),Wr.useEffect(()=>{p!==void 0&&b(p)},[p]);let I=D=>{b(D.target.value),m?.(D)},L=String(w).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,ka.jsxs)("div",{className:P("moonui-theme","space-y-1.5 w-full",t),children:[(0,ka.jsxs)("div",{className:"relative",children:[(0,ka.jsx)("textarea",{ref:C,className:P(iee({variant:o,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,ka.jsx)("div",{className:"absolute top-3 right-3 text-gray-500",children:(0,ka.jsx)(Ht,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),(0,ka.jsxs)("div",{className:"flex items-center justify-between",children:[_&&(0,ka.jsx)("p",{className:P("text-xs transition-all",k&&"text-error",E&&"text-success",r),id:k?`${y}-error`:E?`${y}-success`:void 0,children:k||E}),T&&(0,ka.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[L,f!==void 0&&` / ${f}`]})]})]})});DL.displayName="Textarea";var qn=R(M());var be=R(M(),1),Uz=R(Ha(),1);var ze=R(N(),1),VL="ToastProvider",[BL,see,lee]=ea("Toast"),[zz,cDe]=Fe("Toast",[lee]),[uee,Yy]=zz(VL),Gz=e=>{let{__scopeToast:t,label:r="Notification",duration:o=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 r.trim()||console.error(`Invalid prop \`label\` supplied to \`${VL}\`. Expected non-empty \`string\`.`),(0,ze.jsx)(BL.Provider,{scope:t,children:(0,ze.jsx)(uee,{scope:t,label:r,duration:o,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})})};Gz.displayName=VL;var Wz="ToastViewport",cee=["F8"],OL="toast.viewportPause",FL="toast.viewportResume",jz=be.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:o=cee,label:n="Notifications ({hotkey})",...a}=e,i=Yy(Wz,r),s=see(r),l=be.useRef(null),u=be.useRef(null),c=be.useRef(null),d=be.useRef(null),f=de(t,d,i.onViewportChange),p=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=i.toastCount>0;be.useEffect(()=>{let x=h=>{o.length!==0&&o.every(y=>h[y]||h.code===y)&&d.current?.focus()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o]),be.useEffect(()=>{let x=l.current,h=d.current;if(g&&x&&h){let v=()=>{if(!i.isClosePausedRef.current){let b=new CustomEvent(OL);h.dispatchEvent(b),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){let b=new CustomEvent(FL);h.dispatchEvent(b),i.isClosePausedRef.current=!1}},C=b=>{!x.contains(b.relatedTarget)&&y()},w=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",v),x.addEventListener("focusout",C),x.addEventListener("pointermove",v),x.addEventListener("pointerleave",w),window.addEventListener("blur",v),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",v),x.removeEventListener("focusout",C),x.removeEventListener("pointermove",v),x.removeEventListener("pointerleave",w),window.removeEventListener("blur",v),window.removeEventListener("focus",y)}}},[g,i.isClosePausedRef]);let m=be.useCallback(({tabbingDirection:x})=>{let v=s().map(y=>{let C=y.ref.current,w=[C,...bee(C)];return x==="forwards"?w:w.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 w=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===w);NL(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,ze.jsxs)(hF,{ref:l,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&(0,ze.jsx)(_L,{ref:u,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"forwards"});NL(x)}}),(0,ze.jsx)(BL.Slot,{scope:r,children:(0,ze.jsx)(q.ol,{tabIndex:-1,...a,ref:f})}),g&&(0,ze.jsx)(_L,{ref:c,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"backwards"});NL(x)}})]})});jz.displayName=Wz;var $z="ToastFocusProxy",_L=be.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,a=Yy($z,r);return(0,ze.jsx)(Um,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&o()}})});_L.displayName=$z;var rg="Toast",dee="toast.swipeStart",fee="toast.swipeMove",pee="toast.swipeCancel",mee="toast.swipeEnd",qz=be.forwardRef((e,t)=>{let{forceMount:r,open:o,defaultOpen:n,onOpenChange:a,...i}=e,[s,l]=qe({prop:o,defaultProp:n??!0,onChange:a,caller:rg});return(0,ze.jsx)(ut,{present:r||s,children:(0,ze.jsx)(vee,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:nt(e.onPause),onResume:nt(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)})})})});qz.displayName=rg;var[gee,hee]=zz(rg,{onClose(){}}),vee=be.forwardRef((e,t)=>{let{__scopeToast:r,type:o="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(rg,r),[x,h]=be.useState(null),v=de(t,D=>h(D)),y=be.useRef(null),C=be.useRef(null),w=n||m.duration,b=be.useRef(0),S=be.useRef(w),I=be.useRef(0),{onToastAdd:L,onToastRemove:T}=m,k=nt(()=>{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(OL,F),D.addEventListener(FL,z),()=>{D.removeEventListener(OL,F),D.removeEventListener(FL,z)}}},[m.viewport,w,l,u,E]),be.useEffect(()=>{a&&!m.isClosePausedRef.current&&E(w)},[a,w,m.isClosePausedRef,E]),be.useEffect(()=>(L(),()=>T()),[L,T]);let _=be.useMemo(()=>x?e4(x):null,[x]);return m.viewport?(0,ze.jsxs)(ze.Fragment,{children:[_&&(0,ze.jsx)(xee,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:_}),(0,ze.jsx)(gee,{scope:r,onClose:k,children:Uz.createPortal((0,ze.jsx)(BL.ItemSlot,{scope:r,children:(0,ze.jsx)(gF,{asChild:!0,onEscapeKeyDown:W(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||k(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,ze.jsx)(q.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=!!C.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},re={originalEvent:D,delta:Q};O?(C.current=Q,Xy(fee,d,re,{discrete:!1})):Hz(Q,m.swipeDirection,V)?(C.current=Q,Xy(dee,c,re,{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=C.current,F=D.target;if(F.hasPointerCapture(D.pointerId)&&F.releasePointerCapture(D.pointerId),C.current=null,y.current=null,z){let O=D.currentTarget,B={originalEvent:D,delta:z};Hz(z,m.swipeDirection,m.swipeThreshold)?Xy(mee,p,B,{discrete:!0}):Xy(pee,f,B,{discrete:!0}),O.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),xee=e=>{let{__scopeToast:t,children:r,...o}=e,n=Yy(rg,t),[a,i]=be.useState(!1),[s,l]=be.useState(!1);return wee(()=>i(!0)),be.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:(0,ze.jsx)(Ro,{asChild:!0,children:(0,ze.jsx)(Um,{...o,children:a&&(0,ze.jsxs)(ze.Fragment,{children:[n.label," ",r]})})})},yee="ToastTitle",Kz=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ze.jsx)(q.div,{...o,ref:t})});Kz.displayName=yee;var Cee="ToastDescription",Xz=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ze.jsx)(q.div,{...o,ref:t})});Xz.displayName=Cee;var Yz="ToastAction",Qz=be.forwardRef((e,t)=>{let{altText:r,...o}=e;return r.trim()?(0,ze.jsx)(Jz,{altText:r,asChild:!0,children:(0,ze.jsx)(HL,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Yz}\`. Expected non-empty \`string\`.`),null)});Qz.displayName=Yz;var Zz="ToastClose",HL=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e,n=hee(Zz,r);return(0,ze.jsx)(Jz,{asChild:!0,children:(0,ze.jsx)(q.button,{type:"button",...o,ref:t,onClick:W(e.onClick,n.onClose)})})});HL.displayName=Zz;var Jz=be.forwardRef((e,t)=>{let{__scopeToast:r,altText:o,...n}=e;return(0,ze.jsx)(q.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...n,ref:t})});function e4(e){let t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),See(o)){let n=o.ariaHidden||o.hidden||o.style.display==="none",a=o.dataset.radixToastAnnounceExclude==="";if(!n)if(a){let i=o.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...e4(o))}}),t}function Xy(e,t,r,{discrete:o}){let n=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?$u(n,a):n.dispatchEvent(a)}var Hz=(e,t,r=0)=>{let o=Math.abs(e.x),n=Math.abs(e.y),a=o>n;return t==="left"||t==="right"?a&&o>r:!a&&n>r};function wee(e=()=>{}){let t=nt(e);Ve(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[t])}function See(e){return e.nodeType===e.ELEMENT_NODE}function bee(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function NL(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var t4=Gz,UL=jz,zL=qz,GL=Kz,WL=Xz,jL=Qz,$L=HL;var mr=R(N()),KL=t4,Jy=qn.forwardRef(({className:e,...t},r)=>(0,mr.jsx)(UL,{ref:r,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}));Jy.displayName=UL.displayName;var Iee=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"}}),e0=qn.forwardRef(({className:e,variant:t,...r},o)=>(0,mr.jsx)(zL,{ref:o,className:P("moonui-theme",Iee({variant:t}),e),...r}));e0.displayName=zL.displayName;var XL=qn.forwardRef(({className:e,...t},r)=>(0,mr.jsx)(jL,{ref:r,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}));XL.displayName=jL.displayName;var t0=qn.forwardRef(({className:e,...t},r)=>(0,mr.jsxs)($L,{ref:r,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,mr.jsx)(yo,{className:"h-4 w-4"}),(0,mr.jsx)("span",{className:"sr-only",children:"Close"})]}));t0.displayName=$L.displayName;var r0=qn.forwardRef(({className:e,...t},r)=>(0,mr.jsx)(GL,{ref:r,className:P("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));r0.displayName=GL.displayName;var o0=qn.forwardRef(({className:e,...t},r)=>(0,mr.jsx)(WL,{ref:r,className:P("moonui-theme","text-sm opacity-90",e),...t}));o0.displayName=WL.displayName;var Pee=5,Lee=1e6,qL=new Map,r4=e=>{if(qL.has(e))return;let t=setTimeout(()=>{qL.delete(e),og({type:"REMOVE_TOAST",toastId:e})},Lee);qL.set(e,t)},Tee=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Pee)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?r4(r):e.toasts.forEach(o=>{r4(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};default:return e}},Qy=[],Zy={toasts:[]},kee=0;function og(e){Zy=Tee(Zy,e),Qy.forEach(t=>{t(Zy)})}function YL({...e}){let t=`toast-${Date.now()}-${++kee}`,r=n=>og({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>og({type:"DISMISS_TOAST",toastId:t});return og({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:r}}function QL(){let[e,t]=qn.useState(Zy);return qn.useEffect(()=>(Qy.push(t),()=>{let r=Qy.indexOf(t);r>-1&&Qy.splice(r,1)}),[e]),{...e,toast:YL,dismiss:r=>og({type:"DISMISS_TOAST",toastId:r})}}function o4(){let{toasts:e}=QL();return(0,mr.jsxs)(KL,{children:[e.map(function({id:t,title:r,description:o,action:n,variant:a,open:i,onOpenChange:s,...l}){return(0,mr.jsxs)(e0,{variant:a,open:i,onOpenChange:s,...l,children:[(0,mr.jsxs)("div",{className:"grid gap-1",children:[r&&(0,mr.jsx)(r0,{children:r}),o&&(0,mr.jsx)(o0,{children:o})]}),n,(0,mr.jsx)(t0,{})]},t)}),(0,mr.jsx)(Jy,{})]})}var n4=R(M());var a4=R(N()),ZL=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"}}),JL=n4.forwardRef(({className:e,size:t,children:r,...o},n)=>(0,a4.jsx)("kbd",{ref:n,className:P("moonui-theme",ZL({size:t}),e),...o,children:r}));JL.displayName="Kbd";var an=R(M());var ko=R(N()),eT=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"}}),Mee={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},tT=an.forwardRef(({className:e,value:t,defaultValue:r,onValueChange:o,max:n=5,readOnly:a=!1,precision:i="full",icon:s,size:l,"aria-label":u="Rating",...c},d)=>{let p=Mee[l??"md"],g=i==="half"?.5:1,m=t!==void 0,[x,h]=an.useState(r??0),v=m?t??0:x,[y,C]=an.useState(null),w=y!==null?y:v,b=an.useCallback(T=>{a||(m||h(T),o?.(T))},[a,m,o]),S=an.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(an.isValidElement(s)){let k=s;return an.cloneElement(k,{className:P(p,"shrink-0",T&&"fill-current",k.props?.className)})}return(0,ko.jsx)($i,{className:P(p,"shrink-0",T&&"fill-current"),"aria-hidden":"true"})},L=Array.from({length:n},(T,k)=>k+1);return(0,ko.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:()=>C(null),className:P(eT({size:l}),e),...c,children:L.map(T=>{let k=Math.max(0,Math.min(1,w-(T-1))),E=T-.5;return(0,ko.jsxs)("span",{"data-slot":"rating-star",className:P("relative inline-flex shrink-0",!a&&"cursor-pointer"),children:[(0,ko.jsx)("span",{"aria-hidden":"true",className:"inline-flex text-muted-foreground/30",children:I(!1)}),(0,ko.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,ko.jsxs)(ko.Fragment,{children:[(0,ko.jsx)("button",{type:"button",role:"radio","aria-checked":v===E,"aria-label":`${E} stars`,tabIndex:-1,onClick:()=>b(E),onMouseEnter:()=>C(E),className:"absolute inset-y-0 left-0 z-10 w-1/2 cursor-pointer bg-transparent"}),(0,ko.jsx)("button",{type:"button",role:"radio","aria-checked":v===T,"aria-label":`${T} stars`,tabIndex:-1,onClick:()=>b(T),onMouseEnter:()=>C(T),className:"absolute inset-y-0 right-0 z-10 w-1/2 cursor-pointer bg-transparent"})]}),!a&&i==="full"&&(0,ko.jsx)("button",{type:"button",role:"radio","aria-checked":v===T,"aria-label":`${T} ${T===1?"star":"stars"}`,tabIndex:-1,onClick:()=>b(T),onMouseEnter:()=>C(T),className:"absolute inset-0 z-10 cursor-pointer bg-transparent"})]},T)})})});tT.displayName="Rating";var i4=R(M());var cu=R(N()),rT=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"}}),Eee={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},oT=i4.forwardRef(({className:e,size:t,variant:r="default",label:o="Loading",...n},a)=>(0,cu.jsxs)("div",{ref:a,role:"status","aria-live":"polite",className:P("moonui-theme inline-flex items-center justify-center",e),...n,children:[r==="dots"?(0,cu.jsx)("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(i=>(0,cu.jsx)("span",{className:P("inline-block rounded-full bg-current","animate-bounce motion-reduce:animate-none",Eee[t??"md"]),style:{animationDelay:`${i*.15}s`}},i))}):(0,cu.jsx)("span",{className:P(rT({size:t})),"aria-hidden":"true"}),(0,cu.jsx)("span",{className:"sr-only",children:o})]}));oT.displayName="Spinner";var Vs=R(M());var s4=R(N()),nT=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}}),aT=Vs.forwardRef(({className:e,orientation:t,attached:r,size:o,variant:n,children:a,...i},s)=>{let u=o!==void 0||n!==void 0?Vs.Children.map(a,c=>{if(!Vs.isValidElement(c)||c.type!==Ee)return c;let d=c.props;return Vs.cloneElement(c,{size:d.size??o,variant:d.variant??n})}):a;return(0,s4.jsx)("div",{ref:s,role:"group",className:P(nT({orientation:t,attached:r}),e),...i,children:u})});aT.displayName="ButtonGroup";var pu=R(M());var $r=R(M(),1);var ln=R(M(),1),iT=R(N(),1),Aee=Object.defineProperty,sn=(e,t)=>Aee(e,"name",{value:t,configurable:!0});function Dee(e,t){let r=ln.createContext(t);r.displayName=e+"Context";let o=sn(a=>{let{children:i,...s}=a,l=ln.useMemo(()=>s,Object.values(s));return(0,iT.jsx)(r.Provider,{value:l,children:i})},"Provider");o.displayName=e+"Provider";function n(a,i={}){let{optional:s=!1}=i,l=ln.useContext(r);if(l)return l;if(t!==void 0)return t;if(!s)throw new Error(`\`${a}\` must be used within \`${e}\``)}return sn(n,"useContext"),[o,n]}sn(Dee,"createContext");function Ci(e,t=[]){let r=[];function o(a,i){let s=ln.createContext(i);s.displayName=a+"Context";let l=r.length;r=[...r,i];let u=sn(d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=ln.useMemo(()=>g,Object.values(g));return(0,iT.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=ln.useContext(m);if(x)return x;if(i!==void 0)return i;if(!g)throw new Error(`\`${d}\` must be used within \`${a}\``)}return sn(c,"useContext"),[u,c]}sn(o,"createContext");let n=sn(()=>{let a=r.map(i=>ln.createContext(i));return sn(function(s){let l=s?.[e]||a;return ln.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])},"useScope")},"createScope");return n.scopeName=e,[o,l4(n,...t)]}sn(Ci,"createContextScope");function l4(...e){let t=e[0];if(e.length===1)return t;let r=sn(()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return sn(function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return ln.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return r.scopeName=t.scopeName,r}sn(l4,"composeContextScopes");var v4=R(M(),1),x4=R(Ha(),1);var Tt=R(M(),1);var u4=R(M(),1),Nee=Object.defineProperty,lT=(e,t)=>Nee(e,"name",{value:t,configurable:!0});function sT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}lT(sT,"setRef");function c4(...e){return t=>{let r=!1,o=e.map(n=>{let a=sT(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():sT(e[n],null)}}}}lT(c4,"composeRefs");function un(...e){return u4.useCallback(c4(...e),e)}lT(un,"useComposedRefs");var Cd=!1;var _ee=R(N(),1),Oee=Object.defineProperty,cn=(e,t)=>Oee(e,"name",{value:t,configurable:!0}),Fee=cn((e,t)=>{let r={...t};for(let o in t){let n=e[o],a=t[o];if(/^on[A-Z]/.test(o))if(n&&a){let s=typeof n=="function",l=typeof a=="function";Cd&&(!s||!l)&&console.warn(`Slot: Expected a function for ${o}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),r[o]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(r[o]=n);else o==="style"?r[o]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:o==="className"?r[o]=[n,a].filter(Boolean).join(" "):o==="aria-describedby"&&(r[o]=d4(a,n))}return{...e,...r}},"mergeProps");function d4(...e){let t=new Set;for(let r of e)if(typeof r=="string")for(let o of String(r).trim().split(/\s+/))o&&t.add(o);return t.size>0?Array.from(t).join(" "):void 0}cn(d4,"concatAriaDescribedby");var f4=Tt.createContext(Fee);f4.displayName="SlotContext";function wi(e){let t=Tt.forwardRef((r,o)=>{let n=Tt.useContext(f4),{children:a,mergeProps:i=n,...s}=r,l=null,u=!1,c=[];uT(a)&&typeof n0=="function"&&(a=n0(a._payload)),Tt.Children.forEach(a,g=>{if(g4(g)){u=!0;let m=g,x="child"in m.props?m.props.child:m.props.children;uT(x)&&typeof n0=="function"&&(x=n0(x._payload)),l=Bee(m,x),c.push(l?.props?.children)}else c.push(g)}),l?l=Tt.cloneElement(l,void 0,c):!u&&Tt.Children.count(a)===1&&Tt.isValidElement(a)&&(l=a);let d=l?m4(l):void 0,f=un(o,d);if(!l){if(a||a===0)throw new Error(u?zee(e):Uee(e));return a}let p=i(s,l.props??{});return l.type!==Tt.Fragment&&(p.ref=o?f:d),Tt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}cn(wi,"createSlot");var p4=Symbol.for("radix.slottable");function Vee(e){let t=cn(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=p4,t}cn(Vee,"createSlottable");var Bee=cn((e,t)=>{if("child"in e.props){let r=e.props.child;return Tt.isValidElement(r)?Tt.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Tt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function m4(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}cn(m4,"getElementRef");function g4(e){return Tt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===p4}cn(g4,"isSlottable");var Hee=Symbol.for("react.lazy");function uT(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Hee&&"_payload"in e&&h4(e._payload)}cn(uT,"isLazyComponent");function h4(e){return typeof e=="object"&&e!==null&&"then"in e}cn(h4,"isPromiseLike");var Uee=cn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),zee=cn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),n0=Tt[" use ".trim().toString()];var y4=R(N(),1),Gee=Object.defineProperty,Wee=(e,t)=>Gee(e,"name",{value:t,configurable:!0}),jee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wd=jee.reduce((e,t)=>{let r=wi(`Primitive.${t}`),o=v4.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,y4.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function $ee(e,t){e&&x4.flushSync(()=>e.dispatchEvent(t))}Wee($ee,"dispatchDiscreteCustomEvent");var rr=R(M(),1);var qee=Object.defineProperty,Sd=(e,t)=>qee(e,"name",{value:t,configurable:!0}),C4=!!(typeof window<"u"&&window.document&&window.document.createElement);function Bs(e,t,{checkForDefaultPrevented:r=!0}={}){return Sd(function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}Sd(Bs,"composeEventHandlers");function Kee(e){if(!C4)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Sd(Kee,"getOwnerWindow");function cT(e){if(!C4)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Sd(cT,"getOwnerDocument");function w4(e,t=!1){let{activeElement:r}=cT(e);if(!r?.nodeName)return null;if(S4(r)&&r.contentDocument)return w4(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=cT(r).getElementById(o);if(n)return n}}return r}Sd(w4,"getActiveElement");function S4(e){return e.tagName==="IFRAME"}Sd(S4,"isFrame");var Kn=R(M(),1);var a0=R(N(),1),co=R(M(),1);var du=R(N(),1);var Xee=Object.defineProperty,tr=(e,t)=>Xee(e,"name",{value:t,configurable:!0});function pT(e){let t=e+"CollectionProvider",[r,o]=Ci(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=tr(m=>{let{scope:x,children:h}=m,v=Kn.useRef(null),y=Kn.useRef(new Map).current;return(0,a0.jsx)(n,{scope:x,itemMap:y,collectionRef:v,children:h})},"CollectionProvider");i.displayName=t;let s=e+"CollectionSlot",l=wi(s),u=Kn.forwardRef((m,x)=>{let{scope:h,children:v}=m,y=a(s,h),C=un(x,y.collectionRef);return(0,a0.jsx)(l,{ref:C,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=wi(c),p=Kn.forwardRef((m,x)=>{let{scope:h,children:v,...y}=m,C=Kn.useRef(null),w=un(x,C),b=a(c,h);return Kn.useEffect(()=>(b.itemMap.set(C,{ref:C,...y}),()=>void b.itemMap.delete(C))),(0,a0.jsx)(f,{[d]:"",ref:w,children:v})});p.displayName=c;function g(m){let x=a(e+"CollectionConsumer",m);return Kn.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 tr(g,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},g,o]}tr(pT,"createCollection");var b4=new WeakMap,Ot,dn,dT=(dn=class extends Map{constructor(r){super(r);f0(this,Ot,void 0);lg(this,Ot,[...super.keys()]),b4.set(this,!0)}set(r,o){return b4.get(this)&&(this.has(r)?or(this,Ot)[or(this,Ot).indexOf(r)]=r:or(this,Ot).push(r)),super.set(r,o),this}insert(r,o,n){let a=this.has(o),i=or(this,Ot).length,s=mT(r),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(o,n),this;let c=this.size+(a?0:1);s<0&&l++;let d=[...or(this,Ot)],f,p=!1;for(let g=l;g<c;g++)if(l===g){let m=d[g];d[g]===o&&(m=d[g+1]),a&&this.delete(o),f=this.get(m),this.set(o,n)}else{!p&&d[g-1]===o&&(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(r,o,n){let a=new dn(this);return a.insert(r,o,n),a}before(r){let o=or(this,Ot).indexOf(r)-1;if(!(o<0))return this.entryAt(o)}setBefore(r,o,n){let a=or(this,Ot).indexOf(r);return a===-1?this:this.insert(a,o,n)}after(r){let o=or(this,Ot).indexOf(r);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(r,o,n){let a=or(this,Ot).indexOf(r);return a===-1?this:this.insert(a+1,o,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return lg(this,Ot,[]),super.clear()}delete(r){let o=super.delete(r);return o&&or(this,Ot).splice(or(this,Ot).indexOf(r),1),o}deleteAt(r){let o=this.keyAt(r);return o!==void 0?this.delete(o):!1}at(r){let o=i0(or(this,Ot),r);if(o!==void 0)return this.get(o)}entryAt(r){let o=i0(or(this,Ot),r);if(o!==void 0)return[o,this.get(o)]}indexOf(r){return or(this,Ot).indexOf(r)}keyAt(r){return i0(or(this,Ot),r)}from(r,o){let n=this.indexOf(r);if(n===-1)return;let a=n+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(r,o){let n=this.indexOf(r);if(n===-1)return;let a=n+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return a;n++}}findIndex(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return n;n++}return-1}filter(r,o){let n=[],a=0;for(let i of this)Reflect.apply(r,o,[i,a,this])&&n.push(i),a++;return new dn(n)}map(r,o){let n=[],a=0;for(let i of this)n.push([i[0],Reflect.apply(r,o,[i,a,this])]),a++;return new dn(n)}reduce(...r){let[o,n]=r,a=0,i=n??this.at(0);for(let s of this)a===0&&r.length===1?i=s:i=Reflect.apply(o,this,[i,s,a,this]),a++;return i}reduceRight(...r){let[o,n]=r,a=n??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&r.length===1?a=s:a=Reflect.apply(o,this,[a,s,i,this])}return a}toSorted(r){let o=[...this.entries()].sort(r);return new dn(o)}toReversed(){let r=new dn;for(let o=this.size-1;o>=0;o--){let n=this.keyAt(o),a=this.get(n);r.set(n,a)}return r}toSpliced(...r){let o=[...this.entries()];return o.splice(...r),new dn(o)}slice(r,o){let n=new dn,a=this.size-1;if(r===void 0)return n;r<0&&(r=r+this.size),o!==void 0&&o>0&&(a=o-1);for(let i=r;i<=a;i++){let s=this.keyAt(i),l=this.get(s);n.set(s,l)}return n}every(r,o){let n=0;for(let a of this){if(!Reflect.apply(r,o,[a,n,this]))return!1;n++}return!0}some(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return!0;n++}return!1}},Ot=new WeakMap,tr(dn,"OrderedDict"),dn);function i0(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=R4(e,t);return r===-1?void 0:e[r]}tr(i0,"at");function R4(e,t){let r=e.length,o=mT(t),n=o>=0?o:r+o;return n<0||n>=r?-1:n}tr(R4,"toSafeIndex");function mT(e){return e!==e||e===0?0:Math.trunc(e)}tr(mT,"toSafeInteger");function Yee(e){let t=e+"CollectionProvider",[r,o]=Ci(t),[n,a]=r(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new dT,setItemMap:tr(()=>{},"setItemMap")}),i=tr(({state:y,...C})=>y?(0,du.jsx)(l,{...C,state:y}):(0,du.jsx)(s,{...C}),"CollectionProvider");i.displayName=t;let s=tr(y=>{let C=x();return(0,du.jsx)(l,{...y,state:C})},"CollectionInit");s.displayName=t+"Init";let l=tr(y=>{let{scope:C,children:w,state:b}=y,S=co.useRef(null),[I,L]=co.useState(null),T=un(S,L),[k,E]=b;return co.useEffect(()=>{if(!I)return;let _=L4(()=>{});return _.observe(I,{childList:!0,subtree:!0}),()=>{_.disconnect()}},[I]),(0,du.jsx)(n,{scope:C,itemMap:k,setItemMap:E,collectionRef:T,collectionRefObject:S,collectionElement:I,children:w})},"CollectionProviderImpl");l.displayName=t+"Impl";let u=e+"CollectionSlot",c=wi(u),d=co.forwardRef((y,C)=>{let{scope:w,children:b}=y,S=a(u,w),I=un(C,S.collectionRef);return(0,du.jsx)(c,{ref:I,children:b})});d.displayName=u;let f=e+"CollectionItemSlot",p="data-radix-collection-item",g=wi(f),m=co.forwardRef((y,C)=>{let{scope:w,children:b,...S}=y,I=co.useRef(null),[L,T]=co.useState(null),k=un(C,I,T),E=a(f,w),{setItemMap:_}=E,D=co.useRef(S);I4(D.current,S)||(D.current=S);let z=D.current;return co.useEffect(()=>{let F=z;return _(O=>L?O.has(L)?O.set(L,{...F,element:L}).toSorted(fT):(O.set(L,{...F,element:L}),O.toSorted(fT)):O),()=>{_(O=>!L||!O.has(L)?O:(O.delete(L),new dT(O)))}},[L,z,_]),(0,du.jsx)(g,{[p]:"",ref:k,children:b})});m.displayName=f;function x(){return co.useState(new dT)}tr(x,"useInitCollection");function h(y){let{itemMap:C}=a(e+"CollectionConsumer",y);return C}return tr(h,"useCollection"),[{Provider:i,Slot:d,ItemSlot:m},{createCollectionScope:o,useCollection:h,useInitCollection:x}]}tr(Yee,"createCollection");function I4(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(let n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||e[n]!==t[n])return!1;return!0}tr(I4,"shallowEqual");function P4(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}tr(P4,"isElementPreceding");function fT(e,t){return!e[1].element||!t[1].element?0:P4(e[1].element,t[1].element)?-1:1}tr(fT,"sortByDocumentPosition");function L4(e){return new MutationObserver(r=>{for(let o of r)if(o.type==="childList"){e();return}})}tr(L4,"getChildListObserver");var gT=R(M(),1);var T4=R(M(),1),Hs=globalThis?.document?T4.useLayoutEffect:()=>{};var Qee=Object.defineProperty,Zee=(e,t)=>Qee(e,"name",{value:t,configurable:!0}),Jee=gT[" useId ".trim().toString()]||(()=>{}),ete=0;function hT(e){let[t,r]=gT.useState(Jee());return Hs(()=>{e||r(o=>o??String(ete++))},[e]),e||(t?`radix-${t}`:"")}Zee(hT,"useId");var bd=R(M(),1),tte=Object.defineProperty,rte=(e,t)=>tte(e,"name",{value:t,configurable:!0});function vT(e){let t=bd.useRef(e);return bd.useEffect(()=>{t.current=e}),bd.useMemo(()=>(...r)=>t.current?.(...r),[])}rte(vT,"useCallbackRef");var fn=R(M(),1);var Xn=R(M(),1);var Rd=R(M(),1),ote=Object.defineProperty,nte=(e,t)=>ote(e,"name",{value:t,configurable:!0}),k4=Rd[" useEffectEvent ".trim().toString()],M4=Rd[" useInsertionEffect ".trim().toString()];function xT(e){if(typeof k4=="function")return k4(e);let t=Rd.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof M4=="function"?M4(()=>{t.current=e}):Hs(()=>{t.current=e}),Rd.useMemo(()=>(...r)=>t.current?.(...r),[])}nte(xT,"useEffectEvent");var ate=Object.defineProperty,ng=(e,t)=>ate(e,"name",{value:t,configurable:!0}),ite=fn[" useInsertionEffect ".trim().toString()]||Hs;function Id({prop:e,defaultProp:t,onChange:r=ng(()=>{},"onChange"),caller:o}){let[n,a,i]=A4({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;if(Cd){let c=fn.useRef(e!==void 0);fn.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${o} 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,o])}let u=fn.useCallback(c=>{if(s){let d=D4(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}ng(Id,"useControllableState");function A4({defaultProp:e,onChange:t}){let[r,o]=fn.useState(e),n=fn.useRef(r),a=fn.useRef(t);return ite(()=>{a.current=t},[t]),fn.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}ng(A4,"useUncontrolledState");function D4(e){return typeof e=="function"}ng(D4,"isFunction");var E4=Symbol("RADIX:SYNC_STATE");function ste(e,t,r,o){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=xT(i);if(Cd){let x=Xn.useRef(n!==void 0);Xn.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=[{...r,state:a}];o&&c.push(o);let[d,f]=Xn.useReducer((x,h)=>{if(h.type===E4)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=Xn.useRef(p);Xn.useEffect(()=>{g.current!==p&&(g.current=p,l||u(p))},[p,g,l]);let m=Xn.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return Xn.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:E4,state:n})},[n,d.state,l]),[m,f]}ng(ste,"useControllableStateReducer");var s0=R(M(),1),cte=R(N(),1),lte=Object.defineProperty,ute=(e,t)=>lte(e,"name",{value:t,configurable:!0}),dte=s0.createContext(void 0);function ag(e){let t=s0.useContext(dte);return e||t||"ltr"}ute(ag,"useDirection");var pte=R(M(),1),l0=R(M(),1),fte=Object.defineProperty,CT=(e,t)=>fte(e,"name",{value:t,configurable:!0}),yT=!1;function N4(){let[e,t]=l0.useState(yT);return l0.useEffect(()=>{yT||(yT=!0,t(!0))},[]),e}CT(N4,"useIsHydrated");var O4=pte[" useSyncExternalStore ".trim().toString()];function F4(){return()=>{}}CT(F4,"subscribe");function _4(){return O4(F4,()=>!0,()=>!1)}CT(_4,"useIsHydratedModern");var V4=typeof O4=="function"?_4:N4;var Us=R(N(),1),mte=Object.defineProperty,fu=(e,t)=>mte(e,"name",{value:t,configurable:!0}),wT="rovingFocusGroup.onEntryFocus",gte={bubbles:!1,cancelable:!0},u0="RovingFocusGroup",[ST,B4,hte]=pT(u0),[vte,bT]=Ci(u0,[hte]),[xte,yte]=vte(u0),H4=rr.forwardRef(fu(function(t,r){return(0,Us.jsx)(ST.Provider,{scope:t.__scopeRovingFocusGroup,children:(0,Us.jsx)(ST.Slot,{scope:t.__scopeRovingFocusGroup,children:(0,Us.jsx)(Cte,{...t,ref:r})})})},"RovingFocusGroup")),Cte=rr.forwardRef(fu(function(t,r){let{__scopeRovingFocusGroup:o,orientation:n,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,p=rr.useRef(null),g=un(r,p),m=ag(i),[x,h]=Id({prop:s,defaultProp:l??null,onChange:u,caller:u0}),[v,y]=rr.useState(!1),C=vT(c),w=B4(o),b=rr.useRef(!1),[S,I]=rr.useState(0);return rr.useEffect(()=>{let L=p.current;if(L)return L.addEventListener(wT,C),()=>L.removeEventListener(wT,C)},[C]),(0,Us.jsx)(xte,{scope:o,orientation:n,dir:m,loop:a,currentTabStopId:x,onItemFocus:rr.useCallback(L=>h(L),[h]),onItemShiftTab:rr.useCallback(()=>y(!0),[]),onFocusableItemAdd:rr.useCallback(()=>I(L=>L+1),[]),onFocusableItemRemove:rr.useCallback(()=>I(L=>L-1),[]),children:(0,Us.jsx)(wd.div,{tabIndex:v||S===0?-1:0,"data-orientation":n,...f,ref:g,style:{outline:"none",...t.style},onMouseDown:Bs(t.onMouseDown,()=>{b.current=!0}),onFocus:Bs(t.onFocus,L=>{let T=!b.current;if(L.target===L.currentTarget&&T&&!v){let k=new CustomEvent(wT,gte);if(L.currentTarget.dispatchEvent(k),!k.defaultPrevented){let E=w().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);RT(F,d)}}b.current=!1}),onBlur:Bs(t.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),wte="RovingFocusGroupItem",U4=rr.forwardRef(fu(function(t,r){let{__scopeRovingFocusGroup:o,focusable:n=!0,active:a=!1,tabStopId:i,children:s,...l}=t,u=hT(),c=i||u,d=yte(wte,o),f=d.currentTabStopId===c,p=B4(o),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:x}=d,h=V4();return Hs(()=>{if(!(!h||!n))return g(),()=>m()},[h,n,g,m]),rr.useEffect(()=>{if(!(h||!n))return g(),()=>m()},[h,n,g,m]),(0,Us.jsx)(ST.ItemSlot,{scope:o,id:c,focusable:n,active:a,children:(0,Us.jsx)(wd.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:r,onMouseDown:Bs(t.onMouseDown,v=>{n?d.onItemFocus(c):v.preventDefault()}),onFocus:Bs(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:Bs(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;let y=G4(v,d.orientation,d.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=p().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();let b=w.indexOf(v.currentTarget);w=d.loop?W4(w,b+1):w.slice(b+1)}setTimeout(()=>RT(w))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:x!=null}):s})})},"RovingFocusGroupItem")),Ste={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function z4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}fu(z4,"getDirectionAwareKey");function G4(e,t,r){let o=z4(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Ste[o]}fu(G4,"getFocusIntent");function RT(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}fu(RT,"focusFirst");function W4(e,t){return e.map((r,o)=>e[(t+o)%e.length])}fu(W4,"wrapArray");var jr=R(N(),1),Rte=Object.defineProperty,zs=(e,t)=>Rte(e,"name",{value:t,configurable:!0}),Pd="ToggleGroup",[$4,SNe]=Ci(Pd,[bT]),q4=bT(),K4=$r.forwardRef(zs(function(t,r){let{type:o,...n}=t;if(o==="single")return(0,jr.jsx)(Ite,{role:"radiogroup",...n,ref:r});if(o==="multiple")return(0,jr.jsx)(Pte,{role:"toolbar",...n,ref:r});throw new Error(`Missing prop \`type\` expected on \`${Pd}\``)},"ToggleGroup")),[X4,Y4]=$4(Pd),Ite=$r.forwardRef(zs(function(t,r){let{value:o,defaultValue:n,onValueChange:a=zs(()=>{},"onValueChange"),...i}=t,[s,l]=Id({prop:o,defaultProp:n??"",onChange:a,caller:Pd});return(0,jr.jsx)(X4,{scope:t.__scopeToggleGroup,type:"single",value:$r.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:$r.useCallback(()=>l(""),[l]),children:(0,jr.jsx)(Q4,{...i,ref:r})})},"ToggleGroupImplSingle")),Pte=$r.forwardRef(zs(function(t,r){let{value:o,defaultValue:n,onValueChange:a=zs(()=>{},"onValueChange"),...i}=t,[s,l]=Id({prop:o,defaultProp:n??[],onChange:a,caller:Pd}),u=$r.useCallback(d=>l((f=[])=>[...f,d]),[l]),c=$r.useCallback(d=>l((f=[])=>f.filter(p=>p!==d)),[l]);return(0,jr.jsx)(X4,{scope:t.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:c,children:(0,jr.jsx)(Q4,{...i,ref:r})})},"ToggleGroupImplMultiple")),[Lte,Tte]=$4(Pd),Q4=$r.forwardRef(zs(function(t,r){let{__scopeToggleGroup:o,disabled:n=!1,rovingFocus:a=!0,orientation:i,dir:s,loop:l=!0,...u}=t,c=q4(o),d=ag(s),f={dir:d,...u};return(0,jr.jsx)(Lte,{scope:o,rovingFocus:a,disabled:n,children:a?(0,jr.jsx)(H4,{asChild:!0,...c,orientation:i,dir:d,loop:l,children:(0,jr.jsx)(wd.div,{...f,ref:r})}):(0,jr.jsx)(wd.div,{...f,ref:r})})},"ToggleGroupImpl")),IT="ToggleGroupItem",Z4=$r.forwardRef(zs(function(t,r){let o=Y4(IT,t.__scopeToggleGroup),n=Tte(IT,t.__scopeToggleGroup),a=q4(t.__scopeToggleGroup),i=o.value.includes(t.value),s=n.disabled||t.disabled,l={...t,pressed:i,disabled:s},u=$r.useRef(null);return n.rovingFocus?(0,jr.jsx)(U4,{asChild:!0,...a,focusable:!s,active:i,ref:u,children:(0,jr.jsx)(j4,{...l,ref:r})}):(0,jr.jsx)(j4,{...l,ref:r})},"ToggleGroupItem")),j4=$r.forwardRef(zs(function(t,r){let{__scopeToggleGroup:o,value:n,...a}=t,i=Y4(IT,o),s={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=i.type==="single"?s:void 0;return(0,jr.jsx)(Km,{...l,...a,ref:r,onPressedChange:u=>{u?i.onItemActivate(n):i.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var c0=R(N()),J4=pu.createContext({size:"default",variant:"default"}),PT=pu.forwardRef(({className:e,variant:t,size:r,children:o,...n},a)=>(0,c0.jsx)(K4,{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,c0.jsx)(J4.Provider,{value:{variant:t,size:r},children:o})}));PT.displayName="ToggleGroup";var LT=pu.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>{let i=pu.useContext(J4);return(0,c0.jsx)(Z4,{ref:a,className:P(Xm({variant:i.variant??r,size:i.size??o}),e),...n,children:t})});LT.displayName="ToggleGroupItem";
|
|
86
86
|
/*! Bundled license information:
|
|
87
87
|
|
|
88
88
|
react/cjs/react.production.min.js:
|