buildgrid-ui 1.1.0-dev.22 → 1.1.0-dev.24
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/buildgrid-ui.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(P,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(P=typeof globalThis<"u"?globalThis:P||self,S(P.BuildgridUI={},P.React,P.ReactDOM))})(this,function(P,S,
|
|
1
|
+
(function(P,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(P=typeof globalThis<"u"?globalThis:P||self,S(P.BuildgridUI={},P.React,P.ReactDOM))})(this,function(P,S,_n){"use strict";function ja(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=ja(S),Dn=ja(_n);var jn={exports:{}},tn={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Ia;function ym(){if(Ia)return tn;Ia=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,a){var s=null;if(a!==void 0&&(s=""+a),o.key!==void 0&&(s=""+o.key),"key"in o){a={};for(var i in o)i!=="key"&&(a[i]=o[i])}else a=o;return o=a.ref,{$$typeof:e,type:r,key:s,ref:o!==void 0?o:null,props:a}}return tn.Fragment=t,tn.jsx=n,tn.jsxs=n,tn}var nn={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,184 +14,184 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
at`)?" (<anonymous>)":-1<
|
|
19
|
-
`+ie+x+
|
|
20
|
-
`),
|
|
21
|
-
`);for(
|
|
22
|
-
`+
|
|
17
|
+
*/var Oa;function wm(){return Oa||(Oa=1,process.env.NODE_ENV!=="production"&&function(){function e(x){if(x==null)return null;if(typeof x=="function")return x.$$typeof===W?null:x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case A:return"Fragment";case E:return"Portal";case _:return"Profiler";case T:return"StrictMode";case O:return"Suspense";case Y:return"SuspenseList"}if(typeof x=="object")switch(typeof x.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),x.$$typeof){case B:return(x.displayName||"Context")+".Provider";case j:return(x._context.displayName||"Context")+".Consumer";case G:var L=x.render;return x=x.displayName,x||(x=L.displayName||L.name||"",x=x!==""?"ForwardRef("+x+")":"ForwardRef"),x;case V:return L=x.displayName||null,L!==null?L:e(x.type)||"Memo";case re:L=x._payload,x=x._init;try{return e(x(L))}catch{}}return null}function t(x){return""+x}function n(x){try{t(x);var L=!1}catch{L=!0}if(L){L=console;var I=L.error,ne=typeof Symbol=="function"&&Symbol.toStringTag&&x[Symbol.toStringTag]||x.constructor.name||"Object";return I.call(L,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ne),t(x)}}function r(){}function o(){if(X===0){ue=console.log,me=console.info,D=console.warn,ae=console.error,se=console.group,te=console.groupCollapsed,oe=console.groupEnd;var x={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}X++}function a(){if(X--,X===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:J({},x,{value:ue}),info:J({},x,{value:me}),warn:J({},x,{value:D}),error:J({},x,{value:ae}),group:J({},x,{value:se}),groupCollapsed:J({},x,{value:te}),groupEnd:J({},x,{value:oe})})}0>X&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function s(x){if(ie===void 0)try{throw Error()}catch(I){var L=I.stack.trim().match(/\n( *(at )?)/);ie=L&&L[1]||"",we=-1<I.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<I.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+ie+x+we}function i(x,L){if(!x||Pe)return"";var I=_e.get(x);if(I!==void 0)return I;Pe=!0,I=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ne=null;ne=M.H,M.H=null,o();try{var Ce={DetermineComponentFrameRoot:function(){try{if(L){var Ge=function(){throw Error()};if(Object.defineProperty(Ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ge,[])}catch(Ie){var en=Ie}Reflect.construct(x,[],Ge)}else{try{Ge.call()}catch(Ie){en=Ie}x.call(Ge.prototype)}}else{try{throw Error()}catch(Ie){en=Ie}(Ge=x())&&typeof Ge.catch=="function"&&Ge.catch(function(){})}}catch(Ie){if(Ie&&en&&typeof Ie.stack=="string")return[Ie.stack,en.stack]}return[null,null]}};Ce.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var fe=Object.getOwnPropertyDescriptor(Ce.DetermineComponentFrameRoot,"name");fe&&fe.configurable&&Object.defineProperty(Ce.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var K=Ce.DetermineComponentFrameRoot(),Ve=K[0],et=K[1];if(Ve&&et){var ge=Ve.split(`
|
|
20
|
+
`),tt=et.split(`
|
|
21
|
+
`);for(K=fe=0;fe<ge.length&&!ge[fe].includes("DetermineComponentFrameRoot");)fe++;for(;K<tt.length&&!tt[K].includes("DetermineComponentFrameRoot");)K++;if(fe===ge.length||K===tt.length)for(fe=ge.length-1,K=tt.length-1;1<=fe&&0<=K&&ge[fe]!==tt[K];)K--;for(;1<=fe&&0<=K;fe--,K--)if(ge[fe]!==tt[K]){if(fe!==1||K!==1)do if(fe--,K--,0>K||ge[fe]!==tt[K]){var nt=`
|
|
22
|
+
`+ge[fe].replace(" at new "," at ");return x.displayName&&nt.includes("<anonymous>")&&(nt=nt.replace("<anonymous>",x.displayName)),typeof x=="function"&&_e.set(x,nt),nt}while(1<=fe&&0<=K);break}}}finally{Pe=!1,M.H=ne,a(),Error.prepareStackTrace=I}return ge=(ge=x?x.displayName||x.name:"")?s(ge):"",typeof x=="function"&&_e.set(x,ge),ge}function u(x){if(x==null)return"";if(typeof x=="function"){var L=x.prototype;return i(x,!(!L||!L.isReactComponent))}if(typeof x=="string")return s(x);switch(x){case O:return s("Suspense");case Y:return s("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case G:return x=i(x.render,!1),x;case V:return u(x.type);case re:L=x._payload,x=x._init;try{return u(x(L))}catch{}}return""}function d(){var x=M.A;return x===null?null:x.getOwner()}function f(x){if(H.call(x,"key")){var L=Object.getOwnPropertyDescriptor(x,"key").get;if(L&&L.isReactWarning)return!1}return x.key!==void 0}function p(x,L){function I(){Be||(Be=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",L))}I.isReactWarning=!0,Object.defineProperty(x,"key",{get:I,configurable:!0})}function h(){var x=e(this.type);return lt[x]||(lt[x]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),x=this.props.ref,x!==void 0?x:null}function m(x,L,I,ne,Ce,fe){return I=fe.ref,x={$$typeof:N,type:x,key:L,props:fe,_owner:Ce},(I!==void 0?I:null)!==null?Object.defineProperty(x,"ref",{enumerable:!1,get:h}):Object.defineProperty(x,"ref",{enumerable:!1,value:null}),x._store={},Object.defineProperty(x._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(x,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(x.props),Object.freeze(x)),x}function v(x,L,I,ne,Ce,fe){if(typeof x=="string"||typeof x=="function"||x===A||x===_||x===T||x===O||x===Y||x===$||typeof x=="object"&&x!==null&&(x.$$typeof===re||x.$$typeof===V||x.$$typeof===B||x.$$typeof===j||x.$$typeof===G||x.$$typeof===q||x.getModuleId!==void 0)){var K=L.children;if(K!==void 0)if(ne)if(U(K)){for(ne=0;ne<K.length;ne++)g(K[ne],x);Object.freeze&&Object.freeze(K)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(K,x)}else K="",(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(K+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),x===null?ne="null":U(x)?ne="array":x!==void 0&&x.$$typeof===N?(ne="<"+(e(x.type)||"Unknown")+" />",K=" Did you accidentally export a JSX literal instead of a component?"):ne=typeof x,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ne,K);if(H.call(L,"key")){K=e(x);var Ve=Object.keys(L).filter(function(ge){return ge!=="key"});ne=0<Ve.length?"{key: someKey, "+Ve.join(": ..., ")+": ...}":"{key: someKey}",Ze[K+ne]||(Ve=0<Ve.length?"{"+Ve.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
23
|
let props = %s;
|
|
24
24
|
<%s {...props} />
|
|
25
25
|
React keys must be passed directly to JSX without using spread:
|
|
26
26
|
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,ne,
|
|
27
|
+
<%s key={someKey} {...props} />`,ne,K,Ve,K),Ze[K+ne]=!0)}if(K=null,I!==void 0&&(n(I),K=""+I),f(L)&&(n(L.key),K=""+L.key),"key"in L){I={};for(var et in L)et!=="key"&&(I[et]=L[et])}else I=L;return K&&p(I,typeof x=="function"?x.displayName||x.name||"Unknown":x),m(x,K,fe,Ce,d(),I)}function g(x,L){if(typeof x=="object"&&x&&x.$$typeof!==ct){if(U(x))for(var I=0;I<x.length;I++){var ne=x[I];b(ne)&&y(ne,L)}else if(b(x))x._store&&(x._store.validated=1);else if(x===null||typeof x!="object"?I=null:(I=z&&x[z]||x["@@iterator"],I=typeof I=="function"?I:null),typeof I=="function"&&I!==x.entries&&(I=I.call(x),I!==x))for(;!(x=I.next()).done;)b(x.value)&&y(x.value,L)}}function b(x){return typeof x=="object"&&x!==null&&x.$$typeof===N}function y(x,L){if(x._store&&!x._store.validated&&x.key==null&&(x._store.validated=1,L=w(L),!ut[L])){ut[L]=!0;var I="";x&&x._owner!=null&&x._owner!==d()&&(I=null,typeof x._owner.tag=="number"?I=e(x._owner.type):typeof x._owner.name=="string"&&(I=x._owner.name),I=" It was passed a child from "+I+".");var ne=M.getCurrentStack;M.getCurrentStack=function(){var Ce=u(x.type);return ne&&(Ce+=ne()||""),Ce},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',L,I),M.getCurrentStack=ne}}function w(x){var L="",I=d();return I&&(I=e(I.type))&&(L=`
|
|
28
28
|
|
|
29
|
-
Check the render method of \``+
|
|
29
|
+
Check the render method of \``+I+"`."),L||(x=e(x))&&(L=`
|
|
30
30
|
|
|
31
|
-
Check the top-level render call using <`+x+">."),F}var C=S,N=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),B=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),oe=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),G=Symbol.iterator,V=Symbol.for("react.client.reference"),T=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,Z=Object.assign,X=Symbol.for("react.client.reference"),K=Array.isArray,q=0,ce,fe,k,ae,se,te,re;o.__reactDisabledLog=!0;var ie,ye,Se=!1,Ae=new(typeof WeakMap=="function"?WeakMap:Map),ot=Symbol.for("react.client.reference"),Fe,rt={},Ye={},at={};Kt.Fragment=A,Kt.jsx=function(x,F,D,ne,xe){return b(x,F,D,!1,ne,xe)},Kt.jsxs=function(x,F,D,ne,xe){return b(x,F,D,!0,ne,xe)}}()),Kt}var Sa;function Jf(){return Sa||(Sa=1,process.env.NODE_ENV==="production"?Pn.exports=Xf():Pn.exports=qf()),Pn.exports}var c=Jf();function Pa(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Pa(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Ta(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Pa(e))&&(o&&(o+=" "),o+=t);return o}const So="-",Zf=e=>{const t=ep(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{const i=s.split(So);return i[0]===""&&i.length!==1&&i.shift(),Ma(i,t)||Qf(s)},getConflictingClassGroupIds:(s,i)=>{const u=n[s]||[];return i&&o[s]?[...u,...o[s]]:u}}},Ma=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?Ma(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const a=e.join(So);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},Ra=/^\[(.+)\]$/,Qf=e=>{if(Ra.test(e)){const t=Ra.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ep=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return np(Object.entries(e.classGroups),n).forEach(([a,s])=>{Po(s,o,a,t)}),o},Po=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const a=r===""?t:Aa(t,r);a.classGroupId=n;return}if(typeof r=="function"){if(tp(r)){Po(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([a,s])=>{Po(s,Aa(t,a),n,o)})})},Aa=(e,t)=>{let n=e;return t.split(So).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},tp=e=>e.isThemeGetter,np=(e,t)=>t?e.map(([n,o])=>{const r=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[n,r]}):e,op=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,o=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=o.get(a))!==void 0)return r(a,s),s},set(a,s){n.has(a)?n.set(a,s):r(a,s)}}},_a="!",rp=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,r=t[0],a=t.length,s=i=>{const u=[];let d=0,f=0,m;for(let v=0;v<i.length;v++){let y=i[v];if(d===0){if(y===r&&(o||i.slice(v,v+a)===t)){u.push(i.slice(f,v)),f=v+a;continue}if(y==="/"){m=v;continue}}y==="["?d++:y==="]"&&d--}const h=u.length===0?i:i.substring(f),p=h.startsWith(_a),b=p?h.substring(1):h,g=m&&m>f?m-f:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:g}};return n?i=>n({className:i,parseClassName:s}):s},ap=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},sp=e=>({cache:op(e.cacheSize),parseClassName:rp(e),...Zf(e)}),ip=/\s+/,lp=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,a=[],s=e.trim().split(ip);let i="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{modifiers:f,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:p}=n(d);let b=!!p,g=o(b?h.substring(0,p):h);if(!g){if(!b){i=d+(i.length>0?" "+i:i);continue}if(g=o(h),!g){i=d+(i.length>0?" "+i:i);continue}b=!1}const v=ap(f).join(":"),y=m?v+_a:v,w=y+g;if(a.includes(w))continue;a.push(w);const C=r(g,b);for(let N=0;N<C.length;++N){const E=C[N];a.push(y+E)}i=d+(i.length>0?" "+i:i)}return i};function cp(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ia(t))&&(o&&(o+=" "),o+=n);return o}const Ia=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=Ia(e[o]))&&(n&&(n+=" "),n+=t);return n};function up(e,...t){let n,o,r,a=s;function s(u){const d=t.reduce((f,m)=>m(f),e());return n=sp(d),o=n.cache.get,r=n.cache.set,a=i,i(u)}function i(u){const d=o(u);if(d)return d;const f=lp(u,n);return r(u,f),f}return function(){return a(cp.apply(null,arguments))}}const ue=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ka=/^\[(?:([a-z-]+):)?(.+)\]$/i,dp=/^\d+\/\d+$/,fp=new Set(["px","full","screen"]),pp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mp=/\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$/,gp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,hp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qe=e=>Pt(e)||fp.has(e)||dp.test(e),st=e=>Tt(e,"length",Sp),Pt=e=>!!e&&!Number.isNaN(Number(e)),To=e=>Tt(e,"number",Pt),Yt=e=>!!e&&Number.isInteger(Number(e)),bp=e=>e.endsWith("%")&&Pt(e.slice(0,-1)),ee=e=>ka.test(e),it=e=>pp.test(e),yp=new Set(["length","size","percentage"]),wp=e=>Tt(e,yp,ja),xp=e=>Tt(e,"position",ja),Cp=new Set(["image","url"]),Np=e=>Tt(e,Cp,Tp),Ep=e=>Tt(e,"",Pp),Xt=()=>!0,Tt=(e,t,n)=>{const o=ka.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},Sp=e=>mp.test(e)&&!gp.test(e),ja=()=>!1,Pp=e=>hp.test(e),Tp=e=>vp.test(e),Mp=up(()=>{const e=ue("colors"),t=ue("spacing"),n=ue("blur"),o=ue("brightness"),r=ue("borderColor"),a=ue("borderRadius"),s=ue("borderSpacing"),i=ue("borderWidth"),u=ue("contrast"),d=ue("grayscale"),f=ue("hueRotate"),m=ue("invert"),h=ue("gap"),p=ue("gradientColorStops"),b=ue("gradientColorStopPositions"),g=ue("inset"),v=ue("margin"),y=ue("opacity"),w=ue("padding"),C=ue("saturate"),N=ue("scale"),E=ue("sepia"),A=ue("skew"),M=ue("space"),I=ue("translate"),j=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",ee,t],O=()=>[ee,t],U=()=>["",Qe,st],W=()=>["auto",Pt,ee],oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",ee],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[Pt,ee];return{cacheSize:500,separator:":",theme:{colors:[Xt],spacing:[Qe,st],blur:["none","",it,ee],brightness:Z(),borderColor:[e],borderRadius:["none","","full",it,ee],borderSpacing:O(),borderWidth:U(),contrast:Z(),grayscale:T(),hueRotate:Z(),invert:T(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[bp,st],inset:z(),margin:z(),opacity:Z(),padding:O(),saturate:Z(),scale:Z(),sepia:T(),skew:Z(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[it]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"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:[...oe(),ee]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Yt,ee]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",Yt,ee]}],"grid-cols":[{"grid-cols":[Xt]}],"col-start-end":[{col:["auto",{span:["full",Yt,ee]},ee]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Xt]}],"row-start-end":[{row:["auto",{span:[Yt,ee]},ee]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[it]},it]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",it,st]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",To]}],"font-family":[{font:[Xt]}],"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",ee]}],"line-clamp":[{"line-clamp":["none",Pt,To]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Qe,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Qe,st]}],"underline-offset":[{"underline-offset":["auto",Qe,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],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",ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...oe(),xp]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wp]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Np]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"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:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:$()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[Qe,ee]}],"outline-w":[{outline:[Qe,st]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Qe,st]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",it,Ep]}],"shadow-color":[{shadow:[Xt]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",it,ee]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[m]}],saturate:[{saturate:[C]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ee]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[Yt,ee]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ee]}],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",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Qe,st,To]}],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"]}}});function R(...e){return Mp(Ta(e))}const Rp=(e,t="pt-BR",n="BRL")=>new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}).format(e),Ap=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long"}).format(new Date(e)),_p=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long",year:"numeric"}).format(new Date(e)),Ip=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long"}).format(new Date(e)),kp=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"long"}).format(typeof e=="string"?new Date(e):e),jp=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(e),Dp=e=>e.slice(0,7),Op=(e,t="pt-BR")=>e.toLocaleDateString(t,{weekday:"short",day:"2-digit",month:"2-digit"}),Da=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Oa=Ta,Mt=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return Oa(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:a}=t,s=Object.keys(r).map(d=>{const f=n==null?void 0:n[d],m=a==null?void 0:a[d];if(f===null)return null;const h=Da(f)||Da(m);return r[d][h]}),i=n&&Object.entries(n).reduce((d,f)=>{let[m,h]=f;return h===void 0||(d[m]=h),d},{}),u=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((d,f)=>{let{class:m,className:h,...p}=f;return Object.entries(p).every(b=>{let[g,v]=b;return Array.isArray(v)?v.includes({...a,...i}[g]):{...a,...i}[g]===v})?[...d,m,h]:d},[]);return Oa(e,s,u,n==null?void 0:n.class,n==null?void 0:n.className)},Lp=Mt("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{sizing:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4",xl:"h-14 text-lg px-5","2xl":"h-16 text-xl px-6"}},defaultVariants:{sizing:"md"}}),Tn=l.forwardRef(({className:e,sizing:t,type:n,...o},r)=>c.jsx("input",{type:n,className:R(Lp({sizing:t,className:e})),ref:r,...o}));Tn.displayName="Input";const Fp=(e,t)=>{const n=e.replace(/\D/g,"");let o="",r=0,a=0;for(;r<t.length&&a<n.length;)t[r]==="0"?(o+=n[a],a++):o+=t[r],r++;return o},Mn=l.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:o,onChange:r,...a},s)=>{const i=u=>{const d=u.target;if(o){const f=Fp(d.value,o);d.value=f}r==null||r(u)};return c.jsxs("div",{className:"relative w-full",children:[t&&c.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),c.jsx(Tn,{className:R(t&&"pl-8",n&&"pr-8",e),ref:s,onInput:i,...a}),n&&c.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});Mn.displayName="AdaptiveInput";function $p(e,t){const n=l.createContext(t),o=a=>{const{children:s,...i}=a,u=l.useMemo(()=>i,Object.values(i));return c.jsx(n.Provider,{value:u,children:s})};o.displayName=e+"Provider";function r(a){const s=l.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,r]}function ve(e,t=[]){let n=[];function o(a,s){const i=l.createContext(s),u=n.length;n=[...n,s];const d=m=>{var y;const{scope:h,children:p,...b}=m,g=((y=h==null?void 0:h[e])==null?void 0:y[u])||i,v=l.useMemo(()=>b,Object.values(b));return c.jsx(g.Provider,{value:v,children:p})};d.displayName=a+"Provider";function f(m,h){var g;const p=((g=h==null?void 0:h[e])==null?void 0:g[u])||i,b=l.useContext(p);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[d,f]}const r=()=>{const a=n.map(s=>l.createContext(s));return function(i){const u=(i==null?void 0:i[e])||a;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return r.scopeName=e,[o,Vp(r,...t)]}function Vp(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const s=o.reduce((i,{useScope:u,scopeName:d})=>{const m=u(a)[`__scope${d}`];return{...i,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function La(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qt(...e){return t=>{let n=!1;const o=e.map(r=>{const a=La(r,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<o.length;r++){const a=o[r];typeof a=="function"?a():La(e[r],null)}}}}function J(...e){return l.useCallback(qt(...e),e)}function _(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var he=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Bp=l.useId||(()=>{}),Wp=0;function Ne(e){const[t,n]=l.useState(Bp());return he(()=>{e||n(o=>o??String(Wp++))},[e]),e||(t?`radix-${t}`:"")}function ge(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function Ce({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=zp({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:o,i=ge(n),u=l.useCallback(d=>{if(a){const m=typeof d=="function"?d(e):d;m!==e&&i(m)}else r(d)},[a,e,r,i]);return[s,u]}function zp({defaultProp:e,onChange:t}){const n=l.useState(e),[o]=n,r=l.useRef(o),a=ge(t);return l.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),n}var We=l.forwardRef((e,t)=>{const{children:n,...o}=e,r=l.Children.toArray(n),a=r.find(Gp);if(a){const s=a.props.children,i=r.map(u=>u===a?l.Children.count(s)>1?l.Children.only(null):l.isValidElement(s)?s.props.children:null:u);return c.jsx(Mo,{...o,ref:t,children:l.isValidElement(s)?l.cloneElement(s,void 0,i):null})}return c.jsx(Mo,{...o,ref:t,children:n})});We.displayName="Slot";var Mo=l.forwardRef((e,t)=>{const{children:n,...o}=e;if(l.isValidElement(n)){const r=Up(n);return l.cloneElement(n,{...Hp(o,n.props),ref:t?qt(t,r):r})}return l.Children.count(n)>1?l.Children.only(null):null});Mo.displayName="SlotClone";var Ro=({children:e})=>c.jsx(c.Fragment,{children:e});function Gp(e){return l.isValidElement(e)&&e.type===Ro}function Hp(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...i)=>{a(...i),r(...i)}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function Up(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],L=Kp.reduce((e,t)=>{const n=l.forwardRef((o,r)=>{const{asChild:a,...s}=o,i=a?We:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(i,{...s,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Rn(e,t){e&&Sn.flushSync(()=>e.dispatchEvent(t))}function Yp(e,t=globalThis==null?void 0:globalThis.document){const n=ge(e);l.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Xp="DismissableLayer",Ao="dismissableLayer.update",qp="dismissableLayer.pointerDownOutside",Jp="dismissableLayer.focusOutside",Fa,$a=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...u}=e,d=l.useContext($a),[f,m]=l.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=l.useState({}),b=J(t,M=>m(M)),g=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),w=f?g.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,N=w>=y,E=em(M=>{const I=M.target,j=[...d.branches].some(B=>B.contains(I));!N||j||(r==null||r(M),s==null||s(M),M.defaultPrevented||i==null||i())},h),A=tm(M=>{const I=M.target;[...d.branches].some(B=>B.contains(I))||(a==null||a(M),s==null||s(M),M.defaultPrevented||i==null||i())},h);return Yp(M=>{w===d.layers.size-1&&(o==null||o(M),!M.defaultPrevented&&i&&(M.preventDefault(),i()))},h),l.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Fa=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Va(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Fa)}},[f,h,n,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Va())},[f,d]),l.useEffect(()=>{const M=()=>p({});return document.addEventListener(Ao,M),()=>document.removeEventListener(Ao,M)},[]),c.jsx(L.div,{...u,ref:b,style:{pointerEvents:C?N?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,A.onFocusCapture),onBlurCapture:_(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,E.onPointerDownCapture)})});wt.displayName=Xp;var Zp="DismissableLayerBranch",Qp=l.forwardRef((e,t)=>{const n=l.useContext($a),o=l.useRef(null),r=J(t,o);return l.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),c.jsx(L.div,{...e,ref:r})});Qp.displayName=Zp;function em(e,t=globalThis==null?void 0:globalThis.document){const n=ge(e),o=l.useRef(!1),r=l.useRef(()=>{});return l.useEffect(()=>{const a=i=>{if(i.target&&!o.current){let u=function(){Ba(qp,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function tm(e,t=globalThis==null?void 0:globalThis.document){const n=ge(e),o=l.useRef(!1);return l.useEffect(()=>{const r=a=>{a.target&&!o.current&&Ba(Jp,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Va(){const e=new CustomEvent(Ao);document.dispatchEvent(e)}function Ba(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Rn(r,a):r.dispatchEvent(a)}var _o="focusScope.autoFocusOnMount",Io="focusScope.autoFocusOnUnmount",Wa={bubbles:!1,cancelable:!0},nm="FocusScope",Jt=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...s}=e,[i,u]=l.useState(null),d=ge(r),f=ge(a),m=l.useRef(null),h=J(t,g=>u(g)),p=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(o){let g=function(C){if(p.paused||!i)return;const N=C.target;i.contains(N)?m.current=N:lt(m.current,{select:!0})},v=function(C){if(p.paused||!i)return;const N=C.relatedTarget;N!==null&&(i.contains(N)||lt(m.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&<(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const w=new MutationObserver(y);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),w.disconnect()}}},[o,i,p.paused]),l.useEffect(()=>{if(i){Ha.add(p);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent(_o,Wa);i.addEventListener(_o,d),i.dispatchEvent(y),y.defaultPrevented||(om(lm(za(i)),{select:!0}),document.activeElement===g&<(i))}return()=>{i.removeEventListener(_o,d),setTimeout(()=>{const y=new CustomEvent(Io,Wa);i.addEventListener(Io,f),i.dispatchEvent(y),y.defaultPrevented||lt(g??document.body,{select:!0}),i.removeEventListener(Io,f),Ha.remove(p)},0)}}},[i,d,f,p]);const b=l.useCallback(g=>{if(!n&&!o||p.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(v&&y){const w=g.currentTarget,[C,N]=rm(w);C&&N?!g.shiftKey&&y===N?(g.preventDefault(),n&<(C,{select:!0})):g.shiftKey&&y===C&&(g.preventDefault(),n&<(N,{select:!0})):y===w&&g.preventDefault()}},[n,o,p.paused]);return c.jsx(L.div,{tabIndex:-1,...s,ref:h,onKeyDown:b})});Jt.displayName=nm;function om(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(lt(o,{select:t}),document.activeElement!==n)return}function rm(e){const t=za(e),n=Ga(t,e),o=Ga(t.reverse(),e);return[n,o]}function za(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ga(e,t){for(const n of e)if(!am(n,{upTo:t}))return n}function am(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 sm(e){return e instanceof HTMLInputElement&&"select"in e}function lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sm(e)&&t&&e.select()}}var Ha=im();function im(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ua(e,t),e.unshift(t)},remove(t){var n;e=Ua(e,t),(n=e[0])==null||n.resume()}}}function Ua(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function lm(e){return e.filter(t=>t.tagName!=="A")}var cm="Portal",Zt=l.forwardRef((e,t)=>{var i;const{container:n,...o}=e,[r,a]=l.useState(!1);he(()=>a(!0),[]);const s=n||r&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?En.createPortal(c.jsx(L.div,{...o,ref:t}),s):null});Zt.displayName=cm;function um(e,t){return l.useReducer((n,o)=>t[n][o]??n,e)}var be=e=>{const{present:t,children:n}=e,o=dm(t),r=typeof n=="function"?n({present:o.isPresent}):l.Children.only(n),a=J(o.ref,fm(r));return typeof n=="function"||o.isPresent?l.cloneElement(r,{ref:a}):null};be.displayName="Presence";function dm(e){const[t,n]=l.useState(),o=l.useRef({}),r=l.useRef(e),a=l.useRef("none"),s=e?"mounted":"unmounted",[i,u]=um(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=An(o.current);a.current=i==="mounted"?d:"none"},[i]),he(()=>{const d=o.current,f=r.current;if(f!==e){const h=a.current,p=An(d);e?u("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),he(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,m=p=>{const g=An(o.current).includes(p.animationName);if(p.target===t&&g&&(u("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=p=>{p.target===t&&(a.current=An(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(d=>{d&&(o.current=getComputedStyle(d)),n(d)},[])}}function An(e){return(e==null?void 0:e.animationName)||"none"}function fm(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ko=0;function _n(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ka()),document.body.insertAdjacentElement("beforeend",e[1]??Ka()),ko++,()=>{ko===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ko--}},[])}function Ka(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ze=function(){return ze=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ze.apply(this,arguments)};function Ya(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function pm(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;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))}typeof SuppressedError=="function"&&SuppressedError;var In="right-scroll-bar-position",kn="width-before-scroll-bar",mm="with-scroll-bars-hidden",gm="--removed-body-scroll-bar-size";function jo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function hm(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var vm=typeof window<"u"?l.useLayoutEffect:l.useEffect,Xa=new WeakMap;function bm(e,t){var n=hm(null,function(o){return e.forEach(function(r){return jo(r,o)})});return vm(function(){var o=Xa.get(n);if(o){var r=new Set(o),a=new Set(e),s=n.current;r.forEach(function(i){a.has(i)||jo(i,null)}),a.forEach(function(i){r.has(i)||jo(i,s)})}Xa.set(n,e)},[e]),n}function ym(e){return e}function wm(e,t){t===void 0&&(t=ym);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,o);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(o=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){o=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var u=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return r}function xm(e){e===void 0&&(e={});var t=wm(null);return t.options=ze({async:!0,ssr:!1},e),t}var qa=function(e){var t=e.sideCar,n=Ya(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 l.createElement(o,ze({},n))};qa.isSideCarExport=!0;function Cm(e,t){return e.useMedium(t),qa}var Ja=xm(),Do=function(){},jn=l.forwardRef(function(e,t){var n=l.useRef(null),o=l.useState({onScrollCapture:Do,onWheelCapture:Do,onTouchMoveCapture:Do}),r=o[0],a=o[1],s=e.forwardProps,i=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,m=e.shards,h=e.sideCar,p=e.noIsolation,b=e.inert,g=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,w=e.gapMode,C=Ya(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=h,E=bm([n,t]),A=ze(ze({},C),r);return l.createElement(l.Fragment,null,f&&l.createElement(N,{sideCar:Ja,removeScrollBar:d,shards:m,noIsolation:p,inert:b,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:w}),s?l.cloneElement(l.Children.only(i),ze(ze({},A),{ref:E})):l.createElement(y,ze({},A,{className:u,ref:E}),i))});jn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},jn.classNames={fullWidth:kn,zeroRight:In};var Nm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Em(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Nm();return t&&e.setAttribute("nonce",t),e}function Sm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Pm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Tm=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Em())&&(Sm(t,n),Pm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mm=function(){var e=Tm();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Za=function(){var e=Mm(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Rm={left:0,top:0,right:0,gap:0},Oo=function(e){return parseInt(e||"",10)||0},Am=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Oo(n),Oo(o),Oo(r)]},_m=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Rm;var t=Am(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Im=Za(),Rt="data-scroll-locked",km=function(e,t,n,o){var r=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
32
|
-
.`.concat(
|
|
33
|
-
overflow: hidden `).concat(
|
|
34
|
-
padding-right: `).concat(i,"px ").concat(
|
|
31
|
+
Check the top-level render call using <`+x+">."),L}var C=S,N=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),B=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),z=Symbol.iterator,W=Symbol.for("react.client.reference"),M=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,J=Object.assign,q=Symbol.for("react.client.reference"),U=Array.isArray,X=0,ue,me,D,ae,se,te,oe;r.__reactDisabledLog=!0;var ie,we,Pe=!1,_e=new(typeof WeakMap=="function"?WeakMap:Map),ct=Symbol.for("react.client.reference"),Be,lt={},Ze={},ut={};nn.Fragment=A,nn.jsx=function(x,L,I,ne,Ce){return v(x,L,I,!1,ne,Ce)},nn.jsxs=function(x,L,I,ne,Ce){return v(x,L,I,!0,ne,Ce)}}()),nn}var Fa;function xm(){return Fa||(Fa=1,process.env.NODE_ENV==="production"?jn.exports=ym():jn.exports=wm()),jn.exports}var l=xm();function La(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=La(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $a(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=La(e))&&(r&&(r+=" "),r+=t);return r}const Ir="-",Cm=e=>{const t=Em(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(Ir);return i[0]===""&&i.length!==1&&i.shift(),Wa(i,t)||Nm(s)},getConflictingClassGroupIds:(s,i)=>{const u=n[s]||[];return i&&r[s]?[...u,...r[s]]:u}}},Wa=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Wa(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Ir);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},Ba=/^\[(.+)\]$/,Nm=e=>{if(Ba.test(e)){const t=Ba.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Em=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Pm(Object.entries(e.classGroups),n).forEach(([a,s])=>{Or(s,r,a,t)}),r},Or=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Va(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Sm(o)){Or(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{Or(s,Va(t,a),n,r)})})},Va=(e,t)=>{let n=e;return t.split(Ir).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Sm=e=>e.isThemeGetter,Pm=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[n,o]}):e,Mm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},Ga="!",Tm=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=i=>{const u=[];let d=0,f=0,p;for(let b=0;b<i.length;b++){let y=i[b];if(d===0){if(y===o&&(r||i.slice(b,b+a)===t)){u.push(i.slice(f,b)),f=b+a;continue}if(y==="/"){p=b;continue}}y==="["?d++:y==="]"&&d--}const h=u.length===0?i:i.substring(f),m=h.startsWith(Ga),v=m?h.substring(1):h,g=p&&p>f?p-f:void 0;return{modifiers:u,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:g}};return n?i=>n({className:i,parseClassName:s}):s},Rm=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Am=e=>({cache:Mm(e.cacheSize),parseClassName:Tm(e),...Cm(e)}),km=/\s+/,_m=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(km);let i="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{modifiers:f,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}=n(d);let v=!!m,g=r(v?h.substring(0,m):h);if(!g){if(!v){i=d+(i.length>0?" "+i:i);continue}if(g=r(h),!g){i=d+(i.length>0?" "+i:i);continue}v=!1}const b=Rm(f).join(":"),y=p?b+Ga:b,w=y+g;if(a.includes(w))continue;a.push(w);const C=o(g,v);for(let N=0;N<C.length;++N){const E=C[N];a.push(y+E)}i=d+(i.length>0?" "+i:i)}return i};function Dm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=za(t))&&(r&&(r+=" "),r+=n);return r}const za=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=za(e[r]))&&(n&&(n+=" "),n+=t);return n};function jm(e,...t){let n,r,o,a=s;function s(u){const d=t.reduce((f,p)=>p(f),e());return n=Am(d),r=n.cache.get,o=n.cache.set,a=i,i(u)}function i(u){const d=r(u);if(d)return d;const f=_m(u,n);return o(u,f),f}return function(){return a(Dm.apply(null,arguments))}}const de=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ha=/^\[(?:([a-z-]+):)?(.+)\]$/i,Im=/^\d+\/\d+$/,Om=new Set(["px","full","screen"]),Fm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lm=/\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$/,$m=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ot=e=>Dt(e)||Om.has(e)||Im.test(e),dt=e=>jt(e,"length",qm),Dt=e=>!!e&&!Number.isNaN(Number(e)),Fr=e=>jt(e,"number",Dt),rn=e=>!!e&&Number.isInteger(Number(e)),Vm=e=>e.endsWith("%")&&Dt(e.slice(0,-1)),ee=e=>Ha.test(e),ft=e=>Fm.test(e),Gm=new Set(["length","size","percentage"]),zm=e=>jt(e,Gm,Ya),Hm=e=>jt(e,"position",Ya),Ym=new Set(["image","url"]),Um=e=>jt(e,Ym,Qm),Km=e=>jt(e,"",Xm),on=()=>!0,jt=(e,t,n)=>{const r=Ha.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},qm=e=>Lm.test(e)&&!$m.test(e),Ya=()=>!1,Xm=e=>Wm.test(e),Qm=e=>Bm.test(e),Jm=jm(()=>{const e=de("colors"),t=de("spacing"),n=de("blur"),r=de("brightness"),o=de("borderColor"),a=de("borderRadius"),s=de("borderSpacing"),i=de("borderWidth"),u=de("contrast"),d=de("grayscale"),f=de("hueRotate"),p=de("invert"),h=de("gap"),m=de("gradientColorStops"),v=de("gradientColorStopPositions"),g=de("inset"),b=de("margin"),y=de("opacity"),w=de("padding"),C=de("saturate"),N=de("scale"),E=de("sepia"),A=de("skew"),T=de("space"),_=de("translate"),j=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",ee,t],O=()=>[ee,t],Y=()=>["",ot,dt],V=()=>["auto",Dt,ee],re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",ee],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Dt,ee];return{cacheSize:500,separator:":",theme:{colors:[on],spacing:[ot,dt],blur:["none","",ft,ee],brightness:J(),borderColor:[e],borderRadius:["none","","full",ft,ee],borderSpacing:O(),borderWidth:Y(),contrast:J(),grayscale:M(),hueRotate:J(),invert:M(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Vm,dt],inset:G(),margin:G(),opacity:J(),padding:O(),saturate:J(),scale:J(),sepia:M(),skew:J(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[ft]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...re(),ee]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",rn,ee]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",rn,ee]}],"grid-cols":[{"grid-cols":[on]}],"col-start-end":[{col:["auto",{span:["full",rn,ee]},ee]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[on]}],"row-start-end":[{row:["auto",{span:[rn,ee]},ee]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[ft]},ft]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ft,dt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Fr]}],"font-family":[{font:[on]}],"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",ee]}],"line-clamp":[{"line-clamp":["none",Dt,Fr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ot,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ot,dt]}],"underline-offset":[{"underline-offset":["auto",ot,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],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",ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...re(),Hm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Um]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:$()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[ot,ee]}],"outline-w":[{outline:[ot,dt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ot,dt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ft,Km]}],"shadow-color":[{shadow:[on]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",ft,ee]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[C]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ee]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[rn,ee]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ee]}],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",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ot,dt,Fr]}],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"]}}});function R(...e){return Jm($a(e))}const Zm=(e,t="pt-BR",n="BRL")=>new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}).format(e),ep=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long"}).format(new Date(e)),tp=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long",year:"numeric"}).format(new Date(e)),np=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long"}).format(new Date(e)),rp=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"long"}).format(typeof e=="string"?new Date(e):e),op=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(e),ap=e=>e.slice(0,7),sp=(e,t="pt-BR")=>e.toLocaleDateString(t,{weekday:"short",day:"2-digit",month:"2-digit"}),Ua=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ka=$a,It=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ka(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],p=a==null?void 0:a[d];if(f===null)return null;const h=Ua(f)||Ua(p);return o[d][h]}),i=n&&Object.entries(n).reduce((d,f)=>{let[p,h]=f;return h===void 0||(d[p]=h),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:p,className:h,...m}=f;return Object.entries(m).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...a,...i}[g]):{...a,...i}[g]===b})?[...d,p,h]:d},[]);return Ka(e,s,u,n==null?void 0:n.class,n==null?void 0:n.className)},ip=It("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{sizing:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4",xl:"h-14 text-lg px-5","2xl":"h-16 text-xl px-6"}},defaultVariants:{sizing:"md"}}),In=c.forwardRef(({className:e,sizing:t,type:n,...r},o)=>l.jsx("input",{type:n,className:R(ip({sizing:t,className:e})),ref:o,...r}));In.displayName="Input";const cp=(e,t)=>{const n=e.replace(/\D/g,"");let r="",o=0,a=0;for(;o<t.length&&a<n.length;)t[o]==="0"?(r+=n[a],a++):r+=t[o],o++;return r},On=c.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:r,onChange:o,...a},s)=>{const i=u=>{const d=u.target;if(r){const f=cp(d.value,r);d.value=f}o==null||o(u)};return l.jsxs("div",{className:"relative w-full",children:[t&&l.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),l.jsx(In,{className:R(t&&"pl-8",n&&"pr-8",e),ref:s,onInput:i,...a}),n&&l.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});On.displayName="AdaptiveInput";function lp(e,t){const n=c.createContext(t),r=a=>{const{children:s,...i}=a,u=c.useMemo(()=>i,Object.values(i));return l.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function o(a){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function be(e,t=[]){let n=[];function r(a,s){const i=c.createContext(s),u=n.length;n=[...n,s];const d=p=>{var y;const{scope:h,children:m,...v}=p,g=((y=h==null?void 0:h[e])==null?void 0:y[u])||i,b=c.useMemo(()=>v,Object.values(v));return l.jsx(g.Provider,{value:b,children:m})};d.displayName=a+"Provider";function f(p,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[u])||i,v=c.useContext(m);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(s=>c.createContext(s));return function(i){const u=(i==null?void 0:i[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return o.scopeName=e,[r,up(o,...t)]}function up(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:u,scopeName:d})=>{const p=u(a)[`__scope${d}`];return{...i,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function qa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function an(...e){return t=>{let n=!1;const r=e.map(o=>{const a=qa(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():qa(e[o],null)}}}}function Q(...e){return c.useCallback(an(...e),e)}function k(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var ve=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},dp=c.useId||(()=>{}),fp=0;function Ee(e){const[t,n]=c.useState(dp());return ve(()=>{e||n(r=>r??String(fp++))},[e]),e||(t?`radix-${t}`:"")}function he(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ne({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=mp({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=he(n),u=c.useCallback(d=>{if(a){const p=typeof d=="function"?d(e):d;p!==e&&i(p)}else o(d)},[a,e,o,i]);return[s,u]}function mp({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),a=he(t);return c.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var He=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),a=o.find(pp);if(a){const s=a.props.children,i=o.map(u=>u===a?c.Children.count(s)>1?c.Children.only(null):c.isValidElement(s)?s.props.children:null:u);return l.jsx(Lr,{...r,ref:t,children:c.isValidElement(s)?c.cloneElement(s,void 0,i):null})}return l.jsx(Lr,{...r,ref:t,children:n})});He.displayName="Slot";var Lr=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=hp(n);return c.cloneElement(n,{...gp(r,n.props),ref:t?an(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});Lr.displayName="SlotClone";var $r=({children:e})=>l.jsx(l.Fragment,{children:e});function pp(e){return c.isValidElement(e)&&e.type===$r}function gp(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{a(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function hp(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],F=vp.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:a,...s}=r,i=a?He:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(i,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Fn(e,t){e&&Dn.flushSync(()=>e.dispatchEvent(t))}function bp(e,t=globalThis==null?void 0:globalThis.document){const n=he(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var yp="DismissableLayer",Wr="dismissableLayer.update",wp="dismissableLayer.pointerDownOutside",xp="dismissableLayer.focusOutside",Xa,Qa=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Pt=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...u}=e,d=c.useContext(Qa),[f,p]=c.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),v=Q(t,T=>p(T)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),w=f?g.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,N=w>=y,E=Ep(T=>{const _=T.target,j=[...d.branches].some(B=>B.contains(_));!N||j||(o==null||o(T),s==null||s(T),T.defaultPrevented||i==null||i())},h),A=Sp(T=>{const _=T.target;[...d.branches].some(B=>B.contains(_))||(a==null||a(T),s==null||s(T),T.defaultPrevented||i==null||i())},h);return bp(T=>{w===d.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&i&&(T.preventDefault(),i()))},h),c.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Xa=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ja(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Xa)}},[f,h,n,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ja())},[f,d]),c.useEffect(()=>{const T=()=>m({});return document.addEventListener(Wr,T),()=>document.removeEventListener(Wr,T)},[]),l.jsx(F.div,{...u,ref:v,style:{pointerEvents:C?N?"auto":"none":void 0,...e.style},onFocusCapture:k(e.onFocusCapture,A.onFocusCapture),onBlurCapture:k(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:k(e.onPointerDownCapture,E.onPointerDownCapture)})});Pt.displayName=yp;var Cp="DismissableLayerBranch",Np=c.forwardRef((e,t)=>{const n=c.useContext(Qa),r=c.useRef(null),o=Q(t,r);return c.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(F.div,{...e,ref:o})});Np.displayName=Cp;function Ep(e,t=globalThis==null?void 0:globalThis.document){const n=he(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let u=function(){Za(wp,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Sp(e,t=globalThis==null?void 0:globalThis.document){const n=he(e),r=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!r.current&&Za(xp,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ja(){const e=new CustomEvent(Wr);document.dispatchEvent(e)}function Za(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Fn(o,a):o.dispatchEvent(a)}var Br="focusScope.autoFocusOnMount",Vr="focusScope.autoFocusOnUnmount",es={bubbles:!1,cancelable:!0},Pp="FocusScope",sn=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,u]=c.useState(null),d=he(o),f=he(a),p=c.useRef(null),h=Q(t,g=>u(g)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let g=function(C){if(m.paused||!i)return;const N=C.target;i.contains(N)?p.current=N:mt(p.current,{select:!0})},b=function(C){if(m.paused||!i)return;const N=C.relatedTarget;N!==null&&(i.contains(N)||mt(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&mt(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const w=new MutationObserver(y);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),w.disconnect()}}},[r,i,m.paused]),c.useEffect(()=>{if(i){rs.add(m);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent(Br,es);i.addEventListener(Br,d),i.dispatchEvent(y),y.defaultPrevented||(Mp(_p(ts(i)),{select:!0}),document.activeElement===g&&mt(i))}return()=>{i.removeEventListener(Br,d),setTimeout(()=>{const y=new CustomEvent(Vr,es);i.addEventListener(Vr,f),i.dispatchEvent(y),y.defaultPrevented||mt(g??document.body,{select:!0}),i.removeEventListener(Vr,f),rs.remove(m)},0)}}},[i,d,f,m]);const v=c.useCallback(g=>{if(!n&&!r||m.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const w=g.currentTarget,[C,N]=Tp(w);C&&N?!g.shiftKey&&y===N?(g.preventDefault(),n&&mt(C,{select:!0})):g.shiftKey&&y===C&&(g.preventDefault(),n&&mt(N,{select:!0})):y===w&&g.preventDefault()}},[n,r,m.paused]);return l.jsx(F.div,{tabIndex:-1,...s,ref:h,onKeyDown:v})});sn.displayName=Pp;function Mp(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(mt(r,{select:t}),document.activeElement!==n)return}function Tp(e){const t=ts(e),n=ns(t,e),r=ns(t.reverse(),e);return[n,r]}function ts(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ns(e,t){for(const n of e)if(!Rp(n,{upTo:t}))return n}function Rp(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 Ap(e){return e instanceof HTMLInputElement&&"select"in e}function mt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ap(e)&&t&&e.select()}}var rs=kp();function kp(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=os(e,t),e.unshift(t)},remove(t){var n;e=os(e,t),(n=e[0])==null||n.resume()}}}function os(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _p(e){return e.filter(t=>t.tagName!=="A")}var Dp="Portal",cn=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=c.useState(!1);ve(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?_n.createPortal(l.jsx(F.div,{...r,ref:t}),s):null});cn.displayName=Dp;function jp(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ye=e=>{const{present:t,children:n}=e,r=Ip(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),a=Q(r.ref,Op(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:a}):null};ye.displayName="Presence";function Ip(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),a=c.useRef("none"),s=e?"mounted":"unmounted",[i,u]=jp(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=Ln(r.current);a.current=i==="mounted"?d:"none"},[i]),ve(()=>{const d=r.current,f=o.current;if(f!==e){const h=a.current,m=Ln(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ve(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const g=Ln(r.current).includes(m.animationName);if(m.target===t&&g&&(u("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=m=>{m.target===t&&(a.current=Ln(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function Ln(e){return(e==null?void 0:e.animationName)||"none"}function Op(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gr=0;function $n(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??as()),document.body.insertAdjacentElement("beforeend",e[1]??as()),Gr++,()=>{Gr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Gr--}},[])}function as(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ye=function(){return Ye=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Ye.apply(this,arguments)};function ss(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Fp(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Wn="right-scroll-bar-position",Bn="width-before-scroll-bar",Lp="with-scroll-bars-hidden",$p="--removed-body-scroll-bar-size";function zr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Wp(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Bp=typeof window<"u"?c.useLayoutEffect:c.useEffect,is=new WeakMap;function Vp(e,t){var n=Wp(null,function(r){return e.forEach(function(o){return zr(o,r)})});return Bp(function(){var r=is.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||zr(i,null)}),a.forEach(function(i){o.has(i)||zr(i,s)})}is.set(n,e)},[e]),n}function Gp(e){return e}function zp(e,t){t===void 0&&(t=Gp);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var u=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return o}function Hp(e){e===void 0&&(e={});var t=zp(null);return t.options=Ye({async:!0,ssr:!1},e),t}var cs=function(e){var t=e.sideCar,n=ss(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,Ye({},n))};cs.isSideCarExport=!0;function Yp(e,t){return e.useMedium(t),cs}var ls=Hp(),Hr=function(){},Vn=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Hr,onWheelCapture:Hr,onTouchMoveCapture:Hr}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,h=e.sideCar,m=e.noIsolation,v=e.inert,g=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,C=ss(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=h,E=Vp([n,t]),A=Ye(Ye({},C),o);return c.createElement(c.Fragment,null,f&&c.createElement(N,{sideCar:ls,removeScrollBar:d,shards:p,noIsolation:m,inert:v,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:w}),s?c.cloneElement(c.Children.only(i),Ye(Ye({},A),{ref:E})):c.createElement(y,Ye({},A,{className:u,ref:E}),i))});Vn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Vn.classNames={fullWidth:Bn,zeroRight:Wn};var Up=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Kp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Up();return t&&e.setAttribute("nonce",t),e}function qp(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Xp(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Qp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Kp())&&(qp(t,n),Xp(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Jp=function(){var e=Qp();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},us=function(){var e=Jp(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Zp={left:0,top:0,right:0,gap:0},Yr=function(e){return parseInt(e||"",10)||0},eg=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Yr(n),Yr(r),Yr(o)]},tg=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Zp;var t=eg(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ng=us(),Ot="data-scroll-locked",rg=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
32
|
+
.`.concat(Lp,` {
|
|
33
|
+
overflow: hidden `).concat(r,`;
|
|
34
|
+
padding-right: `).concat(i,"px ").concat(r,`;
|
|
35
35
|
}
|
|
36
|
-
body[`).concat(
|
|
37
|
-
overflow: hidden `).concat(
|
|
36
|
+
body[`).concat(Ot,`] {
|
|
37
|
+
overflow: hidden `).concat(r,`;
|
|
38
38
|
overscroll-behavior: contain;
|
|
39
|
-
`).concat([t&&"position: relative ".concat(
|
|
40
|
-
padding-left: `.concat(
|
|
39
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
40
|
+
padding-left: `.concat(o,`px;
|
|
41
41
|
padding-top: `).concat(a,`px;
|
|
42
42
|
padding-right: `).concat(s,`px;
|
|
43
43
|
margin-left:0;
|
|
44
44
|
margin-top:0;
|
|
45
|
-
margin-right: `).concat(i,"px ").concat(
|
|
46
|
-
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(
|
|
45
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
46
|
+
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.`).concat(
|
|
50
|
-
right: `).concat(i,"px ").concat(
|
|
49
|
+
.`).concat(Wn,` {
|
|
50
|
+
right: `).concat(i,"px ").concat(r,`;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.`).concat(
|
|
54
|
-
margin-right: `).concat(i,"px ").concat(
|
|
53
|
+
.`).concat(Bn,` {
|
|
54
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
.`).concat(
|
|
58
|
-
right: 0 `).concat(
|
|
57
|
+
.`).concat(Wn," .").concat(Wn,` {
|
|
58
|
+
right: 0 `).concat(r,`;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.`).concat(
|
|
62
|
-
margin-right: 0 `).concat(
|
|
61
|
+
.`).concat(Bn," .").concat(Bn,` {
|
|
62
|
+
margin-right: 0 `).concat(r,`;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
body[`).concat(
|
|
66
|
-
`).concat(
|
|
65
|
+
body[`).concat(Ot,`] {
|
|
66
|
+
`).concat($p,": ").concat(i,`px;
|
|
67
67
|
}
|
|
68
|
-
`)},
|
|
68
|
+
`)},ds=function(){var e=parseInt(document.body.getAttribute(Ot)||"0",10);return isFinite(e)?e:0},og=function(){c.useEffect(function(){return document.body.setAttribute(Ot,(ds()+1).toString()),function(){var e=ds()-1;e<=0?document.body.removeAttribute(Ot):document.body.setAttribute(Ot,e.toString())}},[])},ag=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;og();var a=c.useMemo(function(){return tg(o)},[o]);return c.createElement(ng,{styles:rg(a,!t,o,n?"":"!important")})},Ur=!1;if(typeof window<"u")try{var Gn=Object.defineProperty({},"passive",{get:function(){return Ur=!0,!0}});window.addEventListener("test",Gn,Gn),window.removeEventListener("test",Gn,Gn)}catch{Ur=!1}var Ft=Ur?{passive:!1}:!1,sg=function(e){return e.tagName==="TEXTAREA"},fs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!sg(e)&&n[t]==="visible")},ig=function(e){return fs(e,"overflowY")},cg=function(e){return fs(e,"overflowX")},ms=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ps(e,r);if(o){var a=gs(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lg=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ug=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ps=function(e,t){return e==="v"?ig(t):cg(t)},gs=function(e,t){return e==="v"?lg(t):ug(t)},dg=function(e,t){return e==="h"&&t==="rtl"?-1:1},fg=function(e,t,n,r,o){var a=dg(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,u=t.contains(i),d=!1,f=s>0,p=0,h=0;do{var m=gs(e,i),v=m[0],g=m[1],b=m[2],y=g-b-a*v;(v||y)&&ps(e,i)&&(p+=y,h+=v),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(f&&(Math.abs(p)<1||!o)||!f&&(Math.abs(h)<1||!o))&&(d=!0),d},zn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hs=function(e){return[e.deltaX,e.deltaY]},vs=function(e){return e&&"current"in e?e.current:e},mg=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pg=function(e){return`
|
|
69
69
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
70
70
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
71
|
-
`)},
|
|
71
|
+
`)},gg=0,Lt=[];function hg(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(gg++)[0],a=c.useState(us)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Fp([e.lockRef.current],(e.shards||[]).map(vs),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var y=zn(g),w=n.current,C="deltaX"in g?g.deltaX:w[0]-y[0],N="deltaY"in g?g.deltaY:w[1]-y[1],E,A=g.target,T=Math.abs(C)>Math.abs(N)?"h":"v";if("touches"in g&&T==="h"&&A.type==="range")return!1;var _=ms(T,A);if(!_)return!0;if(_?E=T:(E=T==="v"?"h":"v",_=ms(T,A)),!_)return!1;if(!r.current&&"changedTouches"in g&&(C||N)&&(r.current=E),!E)return!0;var j=r.current||E;return fg(j,b,g,j==="h"?C:N,!0)},[]),u=c.useCallback(function(g){var b=g;if(!(!Lt.length||Lt[Lt.length-1]!==a)){var y="deltaY"in b?hs(b):zn(b),w=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&mg(E.delta,y)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var C=(s.current.shards||[]).map(vs).filter(Boolean).filter(function(E){return E.contains(b.target)}),N=C.length>0?i(b,C[0]):!s.current.noIsolation;N&&b.cancelable&&b.preventDefault()}}},[]),d=c.useCallback(function(g,b,y,w){var C={name:g,delta:b,target:y,should:w,shadowParent:vg(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(N){return N!==C})},1)},[]),f=c.useCallback(function(g){n.current=zn(g),r.current=void 0},[]),p=c.useCallback(function(g){d(g.type,hs(g),g.target,i(g,e.lockRef.current))},[]),h=c.useCallback(function(g){d(g.type,zn(g),g.target,i(g,e.lockRef.current))},[]);c.useEffect(function(){return Lt.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Ft),document.addEventListener("touchmove",u,Ft),document.addEventListener("touchstart",f,Ft),function(){Lt=Lt.filter(function(g){return g!==a}),document.removeEventListener("wheel",u,Ft),document.removeEventListener("touchmove",u,Ft),document.removeEventListener("touchstart",f,Ft)}},[]);var m=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(a,{styles:pg(o)}):null,m?c.createElement(ag,{gapMode:e.gapMode}):null)}function vg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bg=Yp(ls,hg);var ln=c.forwardRef(function(e,t){return c.createElement(Vn,Ye({},e,{ref:t,sideCar:bg}))});ln.classNames=Vn.classNames;var yg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,Hn=new WeakMap,Yn={},Kr=0,bs=function(e){return e&&(e.host||bs(e.parentNode))},wg=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=bs(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},xg=function(e,t,n,r){var o=wg(t,Array.isArray(e)?e:[e]);Yn[n]||(Yn[n]=new WeakMap);var a=Yn[n],s=[],i=new Set,u=new Set(o),d=function(p){!p||i.has(p)||(i.add(p),d(p.parentNode))};o.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(h){if(i.has(h))f(h);else try{var m=h.getAttribute(r),v=m!==null&&m!=="false",g=($t.get(h)||0)+1,b=(a.get(h)||0)+1;$t.set(h,g),a.set(h,b),s.push(h),g===1&&v&&Hn.set(h,!0),b===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),i.clear(),Kr++,function(){s.forEach(function(p){var h=$t.get(p)-1,m=a.get(p)-1;$t.set(p,h),a.set(p,m),h||(Hn.has(p)||p.removeAttribute(r),Hn.delete(p)),m||p.removeAttribute(n)}),Kr--,Kr||($t=new WeakMap,$t=new WeakMap,Hn=new WeakMap,Yn={})}},Un=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=yg(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),xg(r,o,n,"aria-hidden")):function(){return null}},qr="Dialog",[ys,ws]=be(qr),[Cg,Oe]=ys(qr),xs=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=c.useRef(null),u=c.useRef(null),[d=!1,f]=Ne({prop:r,defaultProp:o,onChange:a});return l.jsx(Cg,{scope:t,triggerRef:i,contentRef:u,contentId:Ee(),titleId:Ee(),descriptionId:Ee(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:s,children:n})};xs.displayName=qr;var Cs="DialogTrigger",Ns=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Cs,n),a=Q(t,o.triggerRef);return l.jsx(F.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Jr(o.open),...r,ref:a,onClick:k(e.onClick,o.onOpenToggle)})});Ns.displayName=Cs;var Xr="DialogPortal",[Ng,Es]=ys(Xr,{forceMount:void 0}),Ss=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Oe(Xr,t);return l.jsx(Ng,{scope:t,forceMount:n,children:c.Children.map(r,s=>l.jsx(ye,{present:n||a.open,children:l.jsx(cn,{asChild:!0,container:o,children:s})}))})};Ss.displayName=Xr;var Kn="DialogOverlay",Ps=c.forwardRef((e,t)=>{const n=Es(Kn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Oe(Kn,e.__scopeDialog);return a.modal?l.jsx(ye,{present:r||a.open,children:l.jsx(Eg,{...o,ref:t})}):null});Ps.displayName=Kn;var Eg=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Kn,n);return l.jsx(ln,{as:He,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx(F.div,{"data-state":Jr(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Mt="DialogContent",Ms=c.forwardRef((e,t)=>{const n=Es(Mt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Oe(Mt,e.__scopeDialog);return l.jsx(ye,{present:r||a.open,children:a.modal?l.jsx(Sg,{...o,ref:t}):l.jsx(Pg,{...o,ref:t})})});Ms.displayName=Mt;var Sg=c.forwardRef((e,t)=>{const n=Oe(Mt,e.__scopeDialog),r=c.useRef(null),o=Q(t,n.contentRef,r);return c.useEffect(()=>{const a=r.current;if(a)return Un(a)},[]),l.jsx(Ts,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:k(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:k(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:k(e.onFocusOutside,a=>a.preventDefault())})}),Pg=c.forwardRef((e,t)=>{const n=Oe(Mt,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return l.jsx(Ts,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Ts=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=Oe(Mt,n),u=c.useRef(null),d=Q(t,u);return $n(),l.jsxs(l.Fragment,{children:[l.jsx(sn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(Pt,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Jr(i.open),...s,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(Tg,{titleId:i.titleId}),l.jsx(Ag,{contentRef:u,descriptionId:i.descriptionId})]})]})}),Qr="DialogTitle",Rs=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Qr,n);return l.jsx(F.h2,{id:o.titleId,...r,ref:t})});Rs.displayName=Qr;var As="DialogDescription",ks=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(As,n);return l.jsx(F.p,{id:o.descriptionId,...r,ref:t})});ks.displayName=As;var _s="DialogClose",Ds=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(_s,n);return l.jsx(F.button,{type:"button",...r,ref:t,onClick:k(e.onClick,()=>o.onOpenChange(!1))})});Ds.displayName=_s;function Jr(e){return e?"open":"closed"}var js="DialogTitleWarning",[Mg,Is]=lp(js,{contentName:Mt,titleName:Qr,docsSlug:"dialog"}),Tg=({titleId:e})=>{const t=Is(js),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
72
72
|
|
|
73
73
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
74
74
|
|
|
75
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return
|
|
75
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Rg="DialogDescriptionWarning",Ag=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Is(Rg).contentName}}.`;return c.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Os=xs,Fs=Ns,Ls=Ss,Zr=Ps,eo=Ms,to=Rs,no=ks,qn=Ds,$s="AlertDialog",[kg,HC]=be($s,[ws]),at=ws(),Ws=e=>{const{__scopeAlertDialog:t,...n}=e,r=at(t);return l.jsx(Os,{...r,...n,modal:!0})};Ws.displayName=$s;var _g="AlertDialogTrigger",Bs=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=at(n);return l.jsx(Fs,{...o,...r,ref:t})});Bs.displayName=_g;var Dg="AlertDialogPortal",Vs=e=>{const{__scopeAlertDialog:t,...n}=e,r=at(t);return l.jsx(Ls,{...r,...n})};Vs.displayName=Dg;var jg="AlertDialogOverlay",Gs=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=at(n);return l.jsx(Zr,{...o,...r,ref:t})});Gs.displayName=jg;var Wt="AlertDialogContent",[Ig,Og]=kg(Wt),zs=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=at(n),s=c.useRef(null),i=Q(t,s),u=c.useRef(null);return l.jsx(Mg,{contentName:Wt,titleName:Hs,docsSlug:"alert-dialog",children:l.jsx(Ig,{scope:n,cancelRef:u,children:l.jsxs(eo,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:k(o.onOpenAutoFocus,d=>{var f;d.preventDefault(),(f=u.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[l.jsx($r,{children:r}),l.jsx(Lg,{contentRef:s})]})})})});zs.displayName=Wt;var Hs="AlertDialogTitle",Ys=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=at(n);return l.jsx(to,{...o,...r,ref:t})});Ys.displayName=Hs;var Us="AlertDialogDescription",Ks=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=at(n);return l.jsx(no,{...o,...r,ref:t})});Ks.displayName=Us;var Fg="AlertDialogAction",qs=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=at(n);return l.jsx(qn,{...o,...r,ref:t})});qs.displayName=Fg;var Xs="AlertDialogCancel",Qs=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=Og(Xs,n),a=at(n),s=Q(t,o);return l.jsx(qn,{...a,...r,ref:s})});Qs.displayName=Xs;var Lg=({contentRef:e})=>{const t=`\`${Wt}\` requires a description for the component to be accessible for screen reader users.
|
|
76
76
|
|
|
77
|
-
You can add a description to the \`${
|
|
77
|
+
You can add a description to the \`${Wt}\` by passing a \`${Us}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
78
78
|
|
|
79
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${
|
|
79
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Wt}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
80
80
|
|
|
81
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return
|
|
81
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return c.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},$g=Ws,Wg=Bs,Bg=Vs,Js=Gs,Zs=zs,ei=qs,ti=Qs,ni=Ys,ri=Ks;const un=It("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",xl:"h-12 rounded-md px-10 text-xl",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ue=c.forwardRef(({className:e,variant:t,size:n,isLoading:r=!1,asChild:o=!1,...a},s)=>{const i=o?He:"button";return l.jsxs(i,{className:R(un({variant:t,size:n,className:e})),ref:s,...a,disabled:r||a.disabled,children:[r&&l.jsxs("svg",{className:"animate-spin -ml-1 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a.children]})});Ue.displayName="Button";const Vg=$g,Gg=Wg,oi=Bg,ro=c.forwardRef(({className:e,...t},n)=>l.jsx(Js,{className:R("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));ro.displayName=Js.displayName;const ai=c.forwardRef(({className:e,...t},n)=>l.jsxs(oi,{children:[l.jsx(ro,{}),l.jsx(Zs,{ref:n,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));ai.displayName=Zs.displayName;const si=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col space-y-2 text-center sm:text-left",e),...t});si.displayName="AlertDialogHeader";const ii=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ii.displayName="AlertDialogFooter";const ci=c.forwardRef(({className:e,...t},n)=>l.jsx(ni,{ref:n,className:R("text-lg font-semibold",e),...t}));ci.displayName=ni.displayName;const li=c.forwardRef(({className:e,...t},n)=>l.jsx(ri,{ref:n,className:R("text-sm text-muted-foreground",e),...t}));li.displayName=ri.displayName;const ui=c.forwardRef(({className:e,...t},n)=>l.jsx(ei,{ref:n,className:R(un(),e),...t}));ui.displayName=ei.displayName;const di=c.forwardRef(({className:e,...t},n)=>l.jsx(ti,{ref:n,className:R(un({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));di.displayName=ti.displayName;/**
|
|
82
82
|
* @license lucide-react v0.469.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
86
|
+
*/const zg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
87
87
|
* @license lucide-react v0.469.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/var
|
|
91
|
+
*/var Hg={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"};/**
|
|
92
92
|
* @license lucide-react v0.469.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const Yg=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},u)=>S.createElement("svg",{ref:u,...Hg,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:fi("lucide",o),...i},[...s.map(([d,f])=>S.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
|
|
97
97
|
* @license lucide-react v0.469.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
101
|
+
*/const xe=(e,t)=>{const n=S.forwardRef(({className:r,...o},a)=>S.createElement(Yg,{ref:a,iconNode:t,className:fi(`lucide-${zg(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
102
102
|
* @license lucide-react v0.469.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
106
|
+
*/const Ug=xe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
107
107
|
* @license lucide-react v0.469.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
111
|
+
*/const Kg=xe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
112
112
|
* @license lucide-react v0.469.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const oo=xe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
117
117
|
* @license lucide-react v0.469.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
121
|
+
*/const ao=xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
122
122
|
* @license lucide-react v0.469.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const so=xe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
127
127
|
* @license lucide-react v0.469.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const
|
|
131
|
+
*/const Xn=xe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
132
132
|
* @license lucide-react v0.469.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const
|
|
136
|
+
*/const qg=xe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
137
137
|
* @license lucide-react v0.469.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
141
|
+
*/const Xg=xe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
142
142
|
* @license lucide-react v0.469.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
146
|
+
*/const Qg=xe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
147
147
|
* @license lucide-react v0.469.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
151
|
+
*/const mi=xe("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
152
152
|
* @license lucide-react v0.469.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
156
|
+
*/const Jg=xe("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
157
157
|
* @license lucide-react v0.469.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const
|
|
161
|
+
*/const pi=xe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
162
162
|
* @license lucide-react v0.469.0 - ISC
|
|
163
163
|
*
|
|
164
164
|
* This source code is licensed under the ISC license.
|
|
165
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const
|
|
166
|
+
*/const Zg=xe("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
167
167
|
* @license lucide-react v0.469.0 - ISC
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const
|
|
171
|
+
*/const eh=xe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
172
172
|
* @license lucide-react v0.469.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
175
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const
|
|
176
|
+
*/const th=xe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
177
177
|
* @license lucide-react v0.469.0 - ISC
|
|
178
178
|
*
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const
|
|
181
|
+
*/const nh=xe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
182
182
|
* @license lucide-react v0.469.0 - ISC
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the ISC license.
|
|
185
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const
|
|
186
|
+
*/const rh=xe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
187
187
|
* @license lucide-react v0.469.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const jg=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Dg=["top","right","bottom","left"],ct=Math.min,Te=Math.max,Wn=Math.round,zn=Math.floor,He=e=>({x:e,y:e}),Og={left:"right",right:"left",bottom:"top",top:"bottom"},Lg={start:"end",end:"start"};function Jo(e,t,n){return Te(e,ct(t,n))}function tt(e,t){return typeof e=="function"?e(t):e}function nt(e){return e.split("-")[0]}function jt(e){return e.split("-")[1]}function Zo(e){return e==="x"?"y":"x"}function Qo(e){return e==="y"?"height":"width"}function ut(e){return["top","bottom"].includes(nt(e))?"y":"x"}function er(e){return Zo(ut(e))}function Fg(e,t,n){n===void 0&&(n=!1);const o=jt(e),r=er(e),a=Qo(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Gn(s)),[s,Gn(s)]}function $g(e){const t=Gn(e);return[tr(e),t,tr(t)]}function tr(e){return e.replace(/start|end/g,t=>Lg[t])}function Vg(e,t,n){const o=["left","right"],r=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?a:s;default:return[]}}function Bg(e,t,n,o){const r=jt(e);let a=Vg(nt(e),n==="start",o);return r&&(a=a.map(s=>s+"-"+r),t&&(a=a.concat(a.map(tr)))),a}function Gn(e){return e.replace(/left|right|bottom|top/g,t=>Og[t])}function Wg(e){return{top:0,right:0,bottom:0,left:0,...e}}function ri(e){return typeof e!="number"?Wg(e):{top:e,right:e,bottom:e,left:e}}function Hn(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function ai(e,t,n){let{reference:o,floating:r}=e;const a=ut(t),s=er(t),i=Qo(s),u=nt(t),d=a==="y",f=o.x+o.width/2-r.width/2,m=o.y+o.height/2-r.height/2,h=o[i]/2-r[i]/2;let p;switch(u){case"top":p={x:f,y:o.y-r.height};break;case"bottom":p={x:f,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:m};break;case"left":p={x:o.x-r.width,y:m};break;default:p={x:o.x,y:o.y}}switch(jt(t)){case"start":p[s]-=h*(n&&d?-1:1);break;case"end":p[s]+=h*(n&&d?-1:1);break}return p}const zg=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:m}=ai(d,o,u),h=o,p={},b=0;for(let g=0;g<i.length;g++){const{name:v,fn:y}=i[g],{x:w,y:C,data:N,reset:E}=await y({x:f,y:m,initialPlacement:o,placement:h,strategy:r,middlewareData:p,rects:d,platform:s,elements:{reference:e,floating:t}});f=w??f,m=C??m,p={...p,[v]:{...p[v],...N}},E&&b<=50&&(b++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(d=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:f,y:m}=ai(d,h,u)),g=-1)}return{x:f,y:m,placement:h,strategy:r,middlewareData:p}};async function tn(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:s,elements:i,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:h=!1,padding:p=0}=tt(t,e),b=ri(p),v=i[h?m==="floating"?"reference":"floating":m],y=Hn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:u})),w=m==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),N=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},E=Hn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:C,strategy:u}):w);return{top:(y.top-E.top+b.top)/N.y,bottom:(E.bottom-y.bottom+b.bottom)/N.y,left:(y.left-E.left+b.left)/N.x,right:(E.right-y.right+b.right)/N.x}}const Gg=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:s,elements:i,middlewareData:u}=t,{element:d,padding:f=0}=tt(e,t)||{};if(d==null)return{};const m=ri(f),h={x:n,y:o},p=er(r),b=Qo(p),g=await s.getDimensions(d),v=p==="y",y=v?"top":"left",w=v?"bottom":"right",C=v?"clientHeight":"clientWidth",N=a.reference[b]+a.reference[p]-h[p]-a.floating[b],E=h[p]-a.reference[p],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let M=A?A[C]:0;(!M||!await(s.isElement==null?void 0:s.isElement(A)))&&(M=i.floating[C]||a.floating[b]);const I=N/2-E/2,j=M/2-g[b]/2-1,B=ct(m[y],j),z=ct(m[w],j),O=B,U=M-g[b]-z,W=M/2-g[b]/2+I,oe=Jo(O,W,U),$=!u.arrow&&jt(r)!=null&&W!==oe&&a.reference[b]/2-(W<O?B:z)-g[b]/2<0,G=$?W<O?W-O:W-U:0;return{[p]:h[p]+G,data:{[p]:oe,centerOffset:W-oe-G,...$&&{alignmentOffset:G}},reset:$}}}),Hg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:s,initialPlacement:i,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...v}=tt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=nt(r),w=ut(i),C=nt(i)===i,N=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=h||(C||!g?[Gn(i)]:$g(i)),A=b!=="none";!h&&A&&E.push(...Bg(i,g,b,N));const M=[i,...E],I=await tn(t,v),j=[];let B=((o=a.flip)==null?void 0:o.overflows)||[];if(f&&j.push(I[y]),m){const W=Fg(r,s,N);j.push(I[W[0]],I[W[1]])}if(B=[...B,{placement:r,overflows:j}],!j.every(W=>W<=0)){var z,O;const W=(((z=a.flip)==null?void 0:z.index)||0)+1,oe=M[W];if(oe)return{data:{index:W,overflows:B},reset:{placement:oe}};let $=(O=B.filter(G=>G.overflows[0]<=0).sort((G,V)=>G.overflows[1]-V.overflows[1])[0])==null?void 0:O.placement;if(!$)switch(p){case"bestFit":{var U;const G=(U=B.filter(V=>{if(A){const T=ut(V.placement);return T===w||T==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(T=>T>0).reduce((T,H)=>T+H,0)]).sort((V,T)=>V[1]-T[1])[0])==null?void 0:U[0];G&&($=G);break}case"initialPlacement":$=i;break}if(r!==$)return{reset:{placement:$}}}return{}}}};function si(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ii(e){return Dg.some(t=>e[t]>=0)}const Ug=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=tt(e,t);switch(o){case"referenceHidden":{const a=await tn(t,{...r,elementContext:"reference"}),s=si(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:ii(s)}}}case"escaped":{const a=await tn(t,{...r,altBoundary:!0}),s=si(a,n.floating);return{data:{escapedOffsets:s,escaped:ii(s)}}}default:return{}}}}};async function Kg(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=nt(n),i=jt(n),u=ut(n)==="y",d=["left","top"].includes(s)?-1:1,f=a&&u?-1:1,m=tt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return i&&typeof b=="number"&&(p=i==="end"?b*-1:b),u?{x:p*f,y:h*d}:{x:h*d,y:p*f}}const Yg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:s,middlewareData:i}=t,u=await Kg(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:a+u.y,data:{...u,placement:s}}}}},Xg=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:v=>{let{x:y,y:w}=v;return{x:y,y:w}}},...u}=tt(e,t),d={x:n,y:o},f=await tn(t,u),m=ut(nt(r)),h=Zo(m);let p=d[h],b=d[m];if(a){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=p+f[v],C=p-f[y];p=Jo(w,p,C)}if(s){const v=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=b+f[v],C=b-f[y];b=Jo(w,b,C)}const g=i.fn({...t,[h]:p,[m]:b});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:a,[m]:s}}}}}},qg=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:u=!0,crossAxis:d=!0}=tt(e,t),f={x:n,y:o},m=ut(r),h=Zo(m);let p=f[h],b=f[m];const g=tt(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const C=h==="y"?"height":"width",N=a.reference[h]-a.floating[C]+v.mainAxis,E=a.reference[h]+a.reference[C]-v.mainAxis;p<N?p=N:p>E&&(p=E)}if(d){var y,w;const C=h==="y"?"width":"height",N=["top","left"].includes(nt(r)),E=a.reference[m]-a.floating[C]+(N&&((y=s.offset)==null?void 0:y[m])||0)+(N?0:v.crossAxis),A=a.reference[m]+a.reference[C]+(N?0:((w=s.offset)==null?void 0:w[m])||0)-(N?v.crossAxis:0);b<E?b=E:b>A&&(b=A)}return{[h]:p,[m]:b}}}},Jg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:a,platform:s,elements:i}=t,{apply:u=()=>{},...d}=tt(e,t),f=await tn(t,d),m=nt(r),h=jt(r),p=ut(r)==="y",{width:b,height:g}=a.floating;let v,y;m==="top"||m==="bottom"?(v=m,y=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=m,v=h==="end"?"top":"bottom");const w=g-f.top-f.bottom,C=b-f.left-f.right,N=ct(g-f[v],w),E=ct(b-f[y],C),A=!t.middlewareData.shift;let M=N,I=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(M=w),A&&!h){const B=Te(f.left,0),z=Te(f.right,0),O=Te(f.top,0),U=Te(f.bottom,0);p?I=b-2*(B!==0||z!==0?B+z:Te(f.left,f.right)):M=g-2*(O!==0||U!==0?O+U:Te(f.top,f.bottom))}await u({...t,availableWidth:I,availableHeight:M});const j=await s.getDimensions(i.floating);return b!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function Un(){return typeof window<"u"}function Dt(e){return li(e)?(e.nodeName||"").toLowerCase():"#document"}function Me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ue(e){var t;return(t=(li(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function li(e){return Un()?e instanceof Node||e instanceof Me(e).Node:!1}function De(e){return Un()?e instanceof Element||e instanceof Me(e).Element:!1}function Ke(e){return Un()?e instanceof HTMLElement||e instanceof Me(e).HTMLElement:!1}function ci(e){return!Un()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Me(e).ShadowRoot}function nn(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function Zg(e){return["table","td","th"].includes(Dt(e))}function Kn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function nr(e){const t=or(),n=De(e)?Oe(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Qg(e){let t=dt(e);for(;Ke(t)&&!Ot(t);){if(nr(t))return t;if(Kn(t))return null;t=dt(t)}return null}function or(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ot(e){return["html","body","#document"].includes(Dt(e))}function Oe(e){return Me(e).getComputedStyle(e)}function Yn(e){return De(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dt(e){if(Dt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ci(e)&&e.host||Ue(e);return ci(t)?t.host:t}function ui(e){const t=dt(e);return Ot(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ke(t)&&nn(t)?t:ui(t)}function on(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=ui(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),s=Me(r);if(a){const i=rr(s);return t.concat(s,s.visualViewport||[],nn(r)?r:[],i&&n?on(i):[])}return t.concat(r,on(r,[],n))}function rr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function di(e){const t=Oe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Ke(e),a=r?e.offsetWidth:n,s=r?e.offsetHeight:o,i=Wn(n)!==a||Wn(o)!==s;return i&&(n=a,o=s),{width:n,height:o,$:i}}function ar(e){return De(e)?e:e.contextElement}function Lt(e){const t=ar(e);if(!Ke(t))return He(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=di(t);let s=(a?Wn(n.width):n.width)/o,i=(a?Wn(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const eh=He(0);function fi(e){const t=Me(e);return!or()||!t.visualViewport?eh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function th(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Me(e)?!1:t}function Ct(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=ar(e);let s=He(1);t&&(o?De(o)&&(s=Lt(o)):s=Lt(e));const i=th(a,n,o)?fi(a):He(0);let u=(r.left+i.x)/s.x,d=(r.top+i.y)/s.y,f=r.width/s.x,m=r.height/s.y;if(a){const h=Me(a),p=o&&De(o)?Me(o):o;let b=h,g=rr(b);for(;g&&o&&p!==b;){const v=Lt(g),y=g.getBoundingClientRect(),w=Oe(g),C=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,N=y.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;u*=v.x,d*=v.y,f*=v.x,m*=v.y,u+=C,d+=N,b=Me(g),g=rr(b)}}return Hn({width:f,height:m,x:u,y:d})}function sr(e,t){const n=Yn(e).scrollLeft;return t?t.left+n:Ct(Ue(e)).left+n}function pi(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:sr(e,o)),a=o.top+t.scrollTop;return{x:r,y:a}}function nh(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",s=Ue(o),i=t?Kn(t.floating):!1;if(o===s||i&&a)return n;let u={scrollLeft:0,scrollTop:0},d=He(1);const f=He(0),m=Ke(o);if((m||!m&&!a)&&((Dt(o)!=="body"||nn(s))&&(u=Yn(o)),Ke(o))){const p=Ct(o);d=Lt(o),f.x=p.x+o.clientLeft,f.y=p.y+o.clientTop}const h=s&&!m&&!a?pi(s,u,!0):He(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-u.scrollTop*d.y+f.y+h.y}}function oh(e){return Array.from(e.getClientRects())}function rh(e){const t=Ue(e),n=Yn(e),o=e.ownerDocument.body,r=Te(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Te(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+sr(e);const i=-n.scrollTop;return Oe(o).direction==="rtl"&&(s+=Te(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:s,y:i}}function ah(e,t){const n=Me(e),o=Ue(e),r=n.visualViewport;let a=o.clientWidth,s=o.clientHeight,i=0,u=0;if(r){a=r.width,s=r.height;const d=or();(!d||d&&t==="fixed")&&(i=r.offsetLeft,u=r.offsetTop)}return{width:a,height:s,x:i,y:u}}function sh(e,t){const n=Ct(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=Ke(e)?Lt(e):He(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,u=r*a.x,d=o*a.y;return{width:s,height:i,x:u,y:d}}function mi(e,t,n){let o;if(t==="viewport")o=ah(e,n);else if(t==="document")o=rh(Ue(e));else if(De(t))o=sh(t,n);else{const r=fi(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Hn(o)}function gi(e,t){const n=dt(e);return n===t||!De(n)||Ot(n)?!1:Oe(n).position==="fixed"||gi(n,t)}function ih(e,t){const n=t.get(e);if(n)return n;let o=on(e,[],!1).filter(i=>De(i)&&Dt(i)!=="body"),r=null;const a=Oe(e).position==="fixed";let s=a?dt(e):e;for(;De(s)&&!Ot(s);){const i=Oe(s),u=nr(s);!u&&i.position==="fixed"&&(r=null),(a?!u&&!r:!u&&i.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||nn(s)&&!u&&gi(e,s))?o=o.filter(f=>f!==s):r=i,s=dt(s)}return t.set(e,o),o}function lh(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Kn(t)?[]:ih(t,this._c):[].concat(n),o],i=s[0],u=s.reduce((d,f)=>{const m=mi(t,f,r);return d.top=Te(m.top,d.top),d.right=ct(m.right,d.right),d.bottom=ct(m.bottom,d.bottom),d.left=Te(m.left,d.left),d},mi(t,i,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function ch(e){const{width:t,height:n}=di(e);return{width:t,height:n}}function uh(e,t,n){const o=Ke(t),r=Ue(t),a=n==="fixed",s=Ct(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const u=He(0);if(o||!o&&!a)if((Dt(t)!=="body"||nn(r))&&(i=Yn(t)),o){const h=Ct(t,!0,a,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else r&&(u.x=sr(r));const d=r&&!o&&!a?pi(r,i):He(0),f=s.left+i.scrollLeft-u.x-d.x,m=s.top+i.scrollTop-u.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function ir(e){return Oe(e).position==="static"}function hi(e,t){if(!Ke(e)||Oe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ue(e)===n&&(n=n.ownerDocument.body),n}function vi(e,t){const n=Me(e);if(Kn(e))return n;if(!Ke(e)){let r=dt(e);for(;r&&!Ot(r);){if(De(r)&&!ir(r))return r;r=dt(r)}return n}let o=hi(e,t);for(;o&&Zg(o)&&ir(o);)o=hi(o,t);return o&&Ot(o)&&ir(o)&&!nr(o)?n:o||Qg(e)||n}const dh=async function(e){const t=this.getOffsetParent||vi,n=this.getDimensions,o=await n(e.floating);return{reference:uh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function fh(e){return Oe(e).direction==="rtl"}const ph={convertOffsetParentRelativeRectToViewportRelativeRect:nh,getDocumentElement:Ue,getClippingRect:lh,getOffsetParent:vi,getElementRects:dh,getClientRects:oh,getDimensions:ch,getScale:Lt,isElement:De,isRTL:fh};function mh(e,t){let n=null,o;const r=Ue(e);function a(){var i;clearTimeout(o),(i=n)==null||i.disconnect(),n=null}function s(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),a();const{left:d,top:f,width:m,height:h}=e.getBoundingClientRect();if(i||t(),!m||!h)return;const p=zn(f),b=zn(r.clientWidth-(d+m)),g=zn(r.clientHeight-(f+h)),v=zn(d),w={rootMargin:-p+"px "+-b+"px "+-g+"px "+-v+"px",threshold:Te(0,ct(1,u))||1};let C=!0;function N(E){const A=E[0].intersectionRatio;if(A!==u){if(!C)return s();A?s(!1,A):o=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(N,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(N,w)}n.observe(e)}return s(!0),a}function gh(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=ar(e),f=r||a?[...d?on(d):[],...on(t)]:[];f.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const m=d&&i?mh(d,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),d&&!u&&p.observe(d),p.observe(t));let b,g=u?Ct(e):null;u&&v();function v(){const y=Ct(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,b=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(w=>{r&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),m==null||m(),(y=p)==null||y.disconnect(),p=null,u&&cancelAnimationFrame(b)}}const hh=Yg,vh=Xg,bh=Hg,yh=Jg,wh=Ug,bi=Gg,xh=qg,Ch=(e,t,n)=>{const o=new Map,r={platform:ph,...n},a={...r.platform,_c:o};return zg(e,t,{...r,platform:a})};var Xn=typeof document<"u"?S.useLayoutEffect:S.useEffect;function qn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!qn(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!qn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function yi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wi(e,t){const n=yi(e);return Math.round(t*n)/n}function lr(e){const t=l.useRef(e);return Xn(()=>{t.current=e}),t}function Nh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:u,open:d}=e,[f,m]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=l.useState(o);qn(h,o)||p(o);const[b,g]=l.useState(null),[v,y]=l.useState(null),w=l.useCallback(V=>{V!==A.current&&(A.current=V,g(V))},[]),C=l.useCallback(V=>{V!==M.current&&(M.current=V,y(V))},[]),N=a||b,E=s||v,A=l.useRef(null),M=l.useRef(null),I=l.useRef(f),j=u!=null,B=lr(u),z=lr(r),O=lr(d),U=l.useCallback(()=>{if(!A.current||!M.current)return;const V={placement:t,strategy:n,middleware:h};z.current&&(V.platform=z.current),Ch(A.current,M.current,V).then(T=>{const H={...T,isPositioned:O.current!==!1};W.current&&!qn(I.current,H)&&(I.current=H,Sn.flushSync(()=>{m(H)}))})},[h,t,n,z,O]);Xn(()=>{d===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,m(V=>({...V,isPositioned:!1})))},[d]);const W=l.useRef(!1);Xn(()=>(W.current=!0,()=>{W.current=!1}),[]),Xn(()=>{if(N&&(A.current=N),E&&(M.current=E),N&&E){if(B.current)return B.current(N,E,U);U()}},[N,E,U,B,j]);const oe=l.useMemo(()=>({reference:A,floating:M,setReference:w,setFloating:C}),[w,C]),$=l.useMemo(()=>({reference:N,floating:E}),[N,E]),G=l.useMemo(()=>{const V={position:n,left:0,top:0};if(!$.floating)return V;const T=wi($.floating,f.x),H=wi($.floating,f.y);return i?{...V,transform:"translate("+T+"px, "+H+"px)",...yi($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:H}},[n,i,$.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:U,refs:oe,elements:$,floatingStyles:G}),[f,U,oe,$,G])}const Eh=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?bi({element:o.current,padding:r}).fn(n):{}:o?bi({element:o,padding:r}).fn(n):{}}}},Sh=(e,t)=>({...hh(e),options:[e,t]}),Ph=(e,t)=>({...vh(e),options:[e,t]}),Th=(e,t)=>({...xh(e),options:[e,t]}),Mh=(e,t)=>({...bh(e),options:[e,t]}),Rh=(e,t)=>({...yh(e),options:[e,t]}),Ah=(e,t)=>({...wh(e),options:[e,t]}),_h=(e,t)=>({...Eh(e),options:[e,t]});var Ih="Arrow",xi=l.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return c.jsx(L.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});xi.displayName=Ih;var kh=xi;function Jn(e){const[t,n]=l.useState(void 0);return he(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let s,i;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;s=d.inlineSize,i=d.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var cr="Popper",[Ci,ft]=ve(cr),[jh,Ni]=Ci(cr),Ei=e=>{const{__scopePopper:t,children:n}=e,[o,r]=l.useState(null);return c.jsx(jh,{scope:t,anchor:o,onAnchorChange:r,children:n})};Ei.displayName=cr;var Si="PopperAnchor",Pi=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Ni(Si,n),s=l.useRef(null),i=J(t,s);return l.useEffect(()=>{a.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:c.jsx(L.div,{...r,ref:i})});Pi.displayName=Si;var ur="PopperContent",[Dh,Oh]=Ci(ur),Ti=l.forwardRef((e,t)=>{var k,ae,se,te,re,ie;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:b,...g}=e,v=Ni(ur,n),[y,w]=l.useState(null),C=J(t,ye=>w(ye)),[N,E]=l.useState(null),A=Jn(N),M=(A==null?void 0:A.width)??0,I=(A==null?void 0:A.height)??0,j=o+(a!=="center"?"-"+a:""),B=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(d)?d:[d],O=z.length>0,U={padding:B,boundary:z.filter(Fh),altBoundary:O},{refs:W,floatingStyles:oe,placement:$,isPositioned:G,middlewareData:V}=Nh({strategy:"fixed",placement:j,whileElementsMounted:(...ye)=>gh(...ye,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Sh({mainAxis:r+I,alignmentAxis:s}),u&&Ph({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Th():void 0,...U}),u&&Mh({...U}),Rh({...U,apply:({elements:ye,rects:Se,availableWidth:Ae,availableHeight:ot})=>{const{width:Fe,height:rt}=Se.reference,Ye=ye.floating.style;Ye.setProperty("--radix-popper-available-width",`${Ae}px`),Ye.setProperty("--radix-popper-available-height",`${ot}px`),Ye.setProperty("--radix-popper-anchor-width",`${Fe}px`),Ye.setProperty("--radix-popper-anchor-height",`${rt}px`)}}),N&&_h({element:N,padding:i}),$h({arrowWidth:M,arrowHeight:I}),h&&Ah({strategy:"referenceHidden",...U})]}),[T,H]=Ai($),Z=ge(b);he(()=>{G&&(Z==null||Z())},[G,Z]);const X=(k=V.arrow)==null?void 0:k.x,K=(ae=V.arrow)==null?void 0:ae.y,q=((se=V.arrow)==null?void 0:se.centerOffset)!==0,[ce,fe]=l.useState();return he(()=>{y&&fe(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:G?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(te=V.transformOrigin)==null?void 0:te.x,(re=V.transformOrigin)==null?void 0:re.y].join(" "),...((ie=V.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Dh,{scope:n,placedSide:T,onArrowChange:E,arrowX:X,arrowY:K,shouldHideArrow:q,children:c.jsx(L.div,{"data-side":T,"data-align":H,...g,ref:C,style:{...g.style,animation:G?void 0:"none"}})})})});Ti.displayName=ur;var Mi="PopperArrow",Lh={top:"bottom",right:"left",bottom:"top",left:"right"},Ri=l.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=Oh(Mi,o),s=Lh[a.placedSide];return c.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]: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:c.jsx(kh,{...r,ref:n,style:{...r.style,display:"block"}})})});Ri.displayName=Mi;function Fh(e){return e!==null}var $h=e=>({name:"transformOrigin",options:e,fn(t){var v,y,w;const{placement:n,rects:o,middlewareData:r}=t,s=((v=r.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[d,f]=Ai(n),m={start:"0%",center:"50%",end:"100%"}[f],h=(((y=r.arrow)==null?void 0:y.x)??0)+i/2,p=(((w=r.arrow)==null?void 0:w.y)??0)+u/2;let b="",g="";return d==="bottom"?(b=s?m:`${h}px`,g=`${-u}px`):d==="top"?(b=s?m:`${h}px`,g=`${o.floating.height+u}px`):d==="right"?(b=`${-u}px`,g=s?m:`${p}px`):d==="left"&&(b=`${o.floating.width+u}px`,g=s?m:`${p}px`),{data:{x:b,y:g}}}});function Ai(e){const[t,n="center"]=e.split("-");return[t,n]}var rn=Ei,an=Pi,Zn=Ti,Qn=Ri,dr="Popover",[_i,y0]=ve(dr,[ft]),sn=ft(),[Vh,pt]=_i(dr),Ii=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:s=!1}=e,i=sn(t),u=l.useRef(null),[d,f]=l.useState(!1),[m=!1,h]=Ce({prop:o,defaultProp:r,onChange:a});return c.jsx(rn,{...i,children:c.jsx(Vh,{scope:t,contentId:Ne(),triggerRef:u,open:m,onOpenChange:h,onOpenToggle:l.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:d,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:s,children:n})})};Ii.displayName=dr;var ki="PopoverAnchor",ji=l.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=pt(ki,n),a=sn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=r;return l.useEffect(()=>(s(),()=>i()),[s,i]),c.jsx(an,{...a,...o,ref:t})});ji.displayName=ki;var Di="PopoverTrigger",Oi=l.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=pt(Di,n),a=sn(n),s=J(t,r.triggerRef),i=c.jsx(L.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Bi(r.open),...o,ref:s,onClick:_(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?i:c.jsx(an,{asChild:!0,...a,children:i})});Oi.displayName=Di;var fr="PopoverPortal",[Bh,Wh]=_i(fr,{forceMount:void 0}),Li=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,a=pt(fr,t);return c.jsx(Bh,{scope:t,forceMount:n,children:c.jsx(be,{present:n||a.open,children:c.jsx(Zt,{asChild:!0,container:r,children:o})})})};Li.displayName=fr;var Ft="PopoverContent",Fi=l.forwardRef((e,t)=>{const n=Wh(Ft,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,a=pt(Ft,e.__scopePopover);return c.jsx(be,{present:o||a.open,children:a.modal?c.jsx(zh,{...r,ref:t}):c.jsx(Gh,{...r,ref:t})})});Fi.displayName=Ft;var zh=l.forwardRef((e,t)=>{const n=pt(Ft,e.__scopePopover),o=l.useRef(null),r=J(t,o),a=l.useRef(!1);return l.useEffect(()=>{const s=o.current;if(s)return $n(s)},[]),c.jsx(Qt,{as:We,allowPinchZoom:!0,children:c.jsx($i,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,d=i.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Gh=l.forwardRef((e,t)=>{const n=pt(Ft,e.__scopePopover),o=l.useRef(!1),r=l.useRef(!1);return c.jsx($i,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(o.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),$i=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...m}=e,h=pt(Ft,n),p=sn(n);return _n(),c.jsx(Jt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:c.jsx(wt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:c.jsx(Zn,{"data-state":Bi(h.open),role:"dialog",id:h.contentId,...p,...m,ref:t,style:{...m.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)"}})})})}),Vi="PopoverClose",Hh=l.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=pt(Vi,n);return c.jsx(L.button,{type:"button",...o,ref:t,onClick:_(e.onClick,()=>r.onOpenChange(!1))})});Hh.displayName=Vi;var Uh="PopoverArrow",Kh=l.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=sn(n);return c.jsx(Qn,{...r,...o,ref:t})});Kh.displayName=Uh;function Bi(e){return e?"open":"closed"}var Yh=Ii,Xh=ji,qh=Oi,Jh=Li,Wi=Fi;const zi=Yh,Gi=qh,Zh=Xh,pr=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,...o},r)=>c.jsx(Jh,{children:c.jsx(Wi,{ref:r,align:t,sideOffset:n,className:R("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));pr.displayName=Wi.displayName;function Qh(e){const{value:t="",onChange:n,options:o,className:r,placeholder:a="Search...",emptyMessage:s="Nothing found"}=e,[i,u]=S.useState(t),[d,f]=S.useState(o),[m,h]=S.useState(-1),[p,b]=S.useState(!1),g=N=>{const E=N.target.value;u(E),n==null||n(E),h(-1),b(!0),E.trim()===""?f(o):f(o.filter(A=>A.label.toLowerCase().includes(E.toLowerCase())))},v=N=>{if(N.key==="ArrowDown")N.preventDefault(),h(E=>E<d.length-1?E+1:E);else if(N.key==="ArrowUp")N.preventDefault(),h(E=>E>0?E-1:-1);else if(N.key==="Enter"&&m>=0){const E=d[m];u(E.label),n==null||n(E.value),f([]),h(-1),b(!1)}else N.key==="Escape"&&(f([]),h(-1))},y=N=>{b(!1),u(N.label),n==null||n(N.value),f(o),h(-1)},w=()=>{b(!0)},C=()=>{b(!1)};return c.jsxs(zi,{open:p,children:[c.jsx(Gi,{asChild:!0,children:c.jsx("div",{className:"relative w-full",children:c.jsx(Mn,{type:"text",placeholder:a,value:i,onChange:g,onKeyDown:v,onClick:w,onFocus:w,onBlur:C,className:R("pr-10",r),"aria-label":"Search field","aria-autocomplete":"list","aria-controls":"suggestions-list","aria-expanded":d.length>0,leftIcon:c.jsx(kg,{className:"w-4 h-4"})})})}),c.jsx(pr,{className:"p-0 w-[var(--radix-popover-trigger-width)] max-h-96 overflow-y-auto",children:d.length>0?c.jsx("ul",{id:"suggestions-list",role:"listbox",children:d.map((N,E)=>c.jsx("li",{className:`px-4 py-2 cursor-pointer hover:bg-muted ${E===m?"bg-muted":""}`,onClick:()=>y(N),role:"option","aria-selected":E===m,children:N.label},N.value))}):c.jsx("span",{className:"px-4 py-2 block",children:s})})]})}var mr="Avatar",[ev,w0]=ve(mr),[tv,Hi]=ev(mr),Ui=l.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[r,a]=l.useState("idle");return c.jsx(tv,{scope:n,imageLoadingStatus:r,onImageLoadingStatusChange:a,children:c.jsx(L.span,{...o,ref:t})})});Ui.displayName=mr;var Ki="AvatarImage",Yi=l.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:r=()=>{},...a}=e,s=Hi(Ki,n),i=nv(o,a.referrerPolicy),u=ge(d=>{r(d),s.onImageLoadingStatusChange(d)});return he(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?c.jsx(L.img,{...a,ref:t,src:o}):null});Yi.displayName=Ki;var Xi="AvatarFallback",qi=l.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...r}=e,a=Hi(Xi,n),[s,i]=l.useState(o===void 0);return l.useEffect(()=>{if(o!==void 0){const u=window.setTimeout(()=>i(!0),o);return()=>window.clearTimeout(u)}},[o]),s&&a.imageLoadingStatus!=="loaded"?c.jsx(L.span,{...r,ref:t}):null});qi.displayName=Xi;function nv(e,t){const[n,o]=l.useState("idle");return he(()=>{if(!e){o("error");return}let r=!0;const a=new window.Image,s=i=>()=>{r&&o(i)};return o("loading"),a.onload=s("loaded"),a.onerror=s("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{r=!1}},[e,t]),n}var Ji=Ui,Zi=Yi,Qi=qi;const el=l.forwardRef(({className:e,...t},n)=>c.jsx(Ji,{ref:n,className:R("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));el.displayName=Ji.displayName;const tl=l.forwardRef(({className:e,...t},n)=>c.jsx(Zi,{ref:n,className:R("aspect-square h-full w-full",e),...t}));tl.displayName=Zi.displayName;const nl=l.forwardRef(({className:e,...t},n)=>c.jsx(Qi,{ref:n,className:R("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));nl.displayName=Qi.displayName;const ol=Mt("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ov({className:e,variant:t,...n}){return c.jsx("div",{className:R(ol({variant:t}),e),...n})}const rl=l.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:R("rounded-xl border bg-card text-card-foreground shadow",e),...t}));rl.displayName="Card";const al=l.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:R("flex flex-col space-y-1.5 p-6",e),...t}));al.displayName="CardHeader";const sl=l.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:R("font-semibold leading-none tracking-tight pb-4",e),...t}));sl.displayName="CardTitle";const il=l.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:R("text-sm text-muted-foreground",e),...t}));il.displayName="CardDescription";const ll=l.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:R("p-6 py-0",e),...t}));ll.displayName="CardContent";const cl=l.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:R("flex items-center p-6 pt-6",e),...t}));cl.displayName="CardFooter";function ln(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var gr="Checkbox",[rv,x0]=ve(gr),[av,sv]=rv(gr),ul=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:a,required:s,disabled:i,value:u="on",onCheckedChange:d,form:f,...m}=e,[h,p]=l.useState(null),b=J(t,N=>p(N)),g=l.useRef(!1),v=h?f||!!h.closest("form"):!0,[y=!1,w]=Ce({prop:r,defaultProp:a,onChange:d}),C=l.useRef(y);return l.useEffect(()=>{const N=h==null?void 0:h.form;if(N){const E=()=>w(C.current);return N.addEventListener("reset",E),()=>N.removeEventListener("reset",E)}},[h,w]),c.jsxs(av,{scope:n,state:y,disabled:i,children:[c.jsx(L.button,{type:"button",role:"checkbox","aria-checked":mt(y)?"mixed":y,"aria-required":s,"data-state":pl(y),"data-disabled":i?"":void 0,disabled:i,value:u,...m,ref:b,onKeyDown:_(e.onKeyDown,N=>{N.key==="Enter"&&N.preventDefault()}),onClick:_(e.onClick,N=>{w(E=>mt(E)?!0:!E),v&&(g.current=N.isPropagationStopped(),g.current||N.stopPropagation())})}),v&&c.jsx(iv,{control:h,bubbles:!g.current,name:o,value:u,checked:y,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"},defaultChecked:mt(a)?!1:a})]})});ul.displayName=gr;var dl="CheckboxIndicator",fl=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,a=sv(dl,n);return c.jsx(be,{present:o||mt(a.state)||a.state===!0,children:c.jsx(L.span,{"data-state":pl(a.state),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});fl.displayName=dl;var iv=e=>{const{control:t,checked:n,bubbles:o=!0,defaultChecked:r,...a}=e,s=l.useRef(null),i=ln(n),u=Jn(t);l.useEffect(()=>{const f=s.current,m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(i!==n&&p){const b=new Event("click",{bubbles:o});f.indeterminate=mt(n),p.call(f,mt(n)?!1:n),f.dispatchEvent(b)}},[i,n,o]);const d=l.useRef(mt(n)?!1:n);return c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r??d.current,...a,tabIndex:-1,ref:s,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function mt(e){return e==="indeterminate"}function pl(e){return mt(e)?"indeterminate":e?"checked":"unchecked"}var ml=ul,lv=fl;const gl=l.forwardRef(({className:e,...t},n)=>c.jsx(ml,{ref:n,className:R("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:c.jsx(lv,{className:R("flex items-center justify-center text-current"),children:c.jsx(Yo,{className:"h-4 w-4"})})}));gl.displayName=ml.displayName;const hl=S.forwardRef((e,t)=>{const{currencySymbol:n="$",decimalSeparator:o=".",thousandSeparator:r=",",onValueChange:a,className:s,value:i=0,...u}=e,d=S.useRef(null);S.useImperativeHandle(t,()=>d.current);const[f,m]=S.useState(""),h=g=>{const v=g.toFixed(2).split("."),y=v[0].replace(/\B(?=(\d{3})+(?!\d))/g,r);return`${n} ${y}${o}${v[1]}`},p=g=>{const v=g.target.value,y=parseFloat(v.replace(/\D/g,""))/100;m(h(y)),a(y),d.current&&window.requestAnimationFrame(()=>{var w;(w=d.current)==null||w.setSelectionRange(d.current.value.length,d.current.value.length)})},b=()=>{d.current&&d.current.setSelectionRange(d.current.value.length,d.current.value.length)};return S.useEffect(()=>{m(h(+i))},[i]),c.jsx(Mn,{type:"text",inputMode:"numeric",value:f,ref:d,onChange:p,onFocus:b,onClick:b,placeholder:`${n} 0${o}00`,className:s,...u})});hl.displayName="CurrencyInput";const hr=Es,vl=Ss,bl=Ps,cv=Bn,vr=l.forwardRef(({className:e,...t},n)=>c.jsx(zo,{ref:n,className:R("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));vr.displayName=zo.displayName;const eo=l.forwardRef(({className:e,children:t,...n},o)=>c.jsxs(bl,{children:[c.jsx(vr,{}),c.jsxs(Go,{ref:o,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border","bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","sm:rounded-lg max-h-[100dvh] overflow-y-auto",e),...n,children:[t,c.jsxs(Bn,{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-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c.jsx(jg,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));eo.displayName=Go.displayName;const to=({className:e,...t})=>c.jsx("div",{className:R("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});to.displayName="DialogHeader";const yl=({className:e,...t})=>c.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});yl.displayName="DialogFooter";const no=l.forwardRef(({className:e,...t},n)=>c.jsx(Ho,{ref:n,className:R("text-lg font-semibold leading-none tracking-tight",e),...t}));no.displayName=Ho.displayName;const oo=l.forwardRef(({className:e,...t},n)=>c.jsx(Uo,{ref:n,className:R("text-sm text-muted-foreground",e),...t}));oo.displayName=Uo.displayName;function cn(e){const t=e+"CollectionProvider",[n,o]=ve(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:b,children:g}=p,v=S.useRef(null),y=S.useRef(new Map).current;return c.jsx(r,{scope:b,itemMap:y,collectionRef:v,children:g})};s.displayName=t;const i=e+"CollectionSlot",u=S.forwardRef((p,b)=>{const{scope:g,children:v}=p,y=a(i,g),w=J(b,y.collectionRef);return c.jsx(We,{ref:w,children:v})});u.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=S.forwardRef((p,b)=>{const{scope:g,children:v,...y}=p,w=S.useRef(null),C=J(b,w),N=a(d,g);return S.useEffect(()=>(N.itemMap.set(w,{ref:w,...y}),()=>void N.itemMap.delete(w))),c.jsx(We,{[f]:"",ref:C,children:v})});m.displayName=d;function h(p){const b=a(e+"CollectionConsumer",p);return S.useCallback(()=>{const v=b.collectionRef.current;if(!v)return[];const y=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((N,E)=>y.indexOf(N.ref.current)-y.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},h,o]}var uv=l.createContext(void 0);function Nt(e){const t=l.useContext(uv);return e||t||"ltr"}var br="rovingFocusGroup.onEntryFocus",dv={bubbles:!1,cancelable:!0},ro="RovingFocusGroup",[yr,wl,fv]=cn(ro),[pv,gt]=ve(ro,[fv]),[mv,gv]=pv(ro),xl=l.forwardRef((e,t)=>c.jsx(yr.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(yr.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(hv,{...e,ref:t})})}));xl.displayName=ro;var hv=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...m}=e,h=l.useRef(null),p=J(t,h),b=Nt(a),[g=null,v]=Ce({prop:s,defaultProp:i,onChange:u}),[y,w]=l.useState(!1),C=ge(d),N=wl(n),E=l.useRef(!1),[A,M]=l.useState(0);return l.useEffect(()=>{const I=h.current;if(I)return I.addEventListener(br,C),()=>I.removeEventListener(br,C)},[C]),c.jsx(mv,{scope:n,orientation:o,dir:b,loop:r,currentTabStopId:g,onItemFocus:l.useCallback(I=>v(I),[v]),onItemShiftTab:l.useCallback(()=>w(!0),[]),onFocusableItemAdd:l.useCallback(()=>M(I=>I+1),[]),onFocusableItemRemove:l.useCallback(()=>M(I=>I-1),[]),children:c.jsx(L.div,{tabIndex:y||A===0?-1:0,"data-orientation":o,...m,ref:p,style:{outline:"none",...e.style},onMouseDown:_(e.onMouseDown,()=>{E.current=!0}),onFocus:_(e.onFocus,I=>{const j=!E.current;if(I.target===I.currentTarget&&j&&!y){const B=new CustomEvent(br,dv);if(I.currentTarget.dispatchEvent(B),!B.defaultPrevented){const z=N().filter($=>$.focusable),O=z.find($=>$.active),U=z.find($=>$.id===g),oe=[O,U,...z].filter(Boolean).map($=>$.ref.current);El(oe,f)}}E.current=!1}),onBlur:_(e.onBlur,()=>w(!1))})})}),Cl="RovingFocusGroupItem",Nl=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,...s}=e,i=Ne(),u=a||i,d=gv(Cl,n),f=d.currentTabStopId===u,m=wl(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=d;return l.useEffect(()=>{if(o)return h(),()=>p()},[o,h,p]),c.jsx(yr.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:c.jsx(L.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:_(e.onMouseDown,b=>{o?d.onItemFocus(u):b.preventDefault()}),onFocus:_(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:_(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const g=yv(b,d.orientation,d.dir);if(g!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let y=m().filter(w=>w.focusable).map(w=>w.ref.current);if(g==="last")y.reverse();else if(g==="prev"||g==="next"){g==="prev"&&y.reverse();const w=y.indexOf(b.currentTarget);y=d.loop?wv(y,w+1):y.slice(w+1)}setTimeout(()=>El(y))}})})})});Nl.displayName=Cl;var vv={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function bv(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yv(e,t,n){const o=bv(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return vv[o]}function El(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function wv(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var ao=xl,so=Nl,wr=["Enter"," "],xv=["ArrowDown","PageUp","Home"],Sl=["ArrowUp","PageDown","End"],Cv=[...xv,...Sl],Nv={ltr:[...wr,"ArrowRight"],rtl:[...wr,"ArrowLeft"]},Ev={ltr:["ArrowLeft"],rtl:["ArrowRight"]},un="Menu",[dn,Sv,Pv]=cn(un),[Et,Pl]=ve(un,[Pv,ft,gt]),fn=ft(),Tl=gt(),[Ml,ht]=Et(un),[Tv,pn]=Et(un),Rl=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:a,modal:s=!0}=e,i=fn(t),[u,d]=l.useState(null),f=l.useRef(!1),m=ge(a),h=Nt(r);return l.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),c.jsx(rn,{...i,children:c.jsx(Ml,{scope:t,open:n,onOpenChange:m,content:u,onContentChange:d,children:c.jsx(Tv,{scope:t,onClose:l.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:h,modal:s,children:o})})})};Rl.displayName=un;var Mv="MenuAnchor",xr=l.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=fn(n);return c.jsx(an,{...r,...o,ref:t})});xr.displayName=Mv;var Cr="MenuPortal",[Rv,Al]=Et(Cr,{forceMount:void 0}),_l=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,a=ht(Cr,t);return c.jsx(Rv,{scope:t,forceMount:n,children:c.jsx(be,{present:n||a.open,children:c.jsx(Zt,{asChild:!0,container:r,children:o})})})};_l.displayName=Cr;var _e="MenuContent",[Av,Nr]=Et(_e),Il=l.forwardRef((e,t)=>{const n=Al(_e,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=ht(_e,e.__scopeMenu),s=pn(_e,e.__scopeMenu);return c.jsx(dn.Provider,{scope:e.__scopeMenu,children:c.jsx(be,{present:o||a.open,children:c.jsx(dn.Slot,{scope:e.__scopeMenu,children:s.modal?c.jsx(_v,{...r,ref:t}):c.jsx(Iv,{...r,ref:t})})})})}),_v=l.forwardRef((e,t)=>{const n=ht(_e,e.__scopeMenu),o=l.useRef(null),r=J(t,o);return l.useEffect(()=>{const a=o.current;if(a)return $n(a)},[]),c.jsx(Er,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Iv=l.forwardRef((e,t)=>{const n=ht(_e,e.__scopeMenu);return c.jsx(Er,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Er=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:p,disableOutsideScroll:b,...g}=e,v=ht(_e,n),y=pn(_e,n),w=fn(n),C=Tl(n),N=Sv(n),[E,A]=l.useState(null),M=l.useRef(null),I=J(t,M,v.onContentChange),j=l.useRef(0),B=l.useRef(""),z=l.useRef(0),O=l.useRef(null),U=l.useRef("right"),W=l.useRef(0),oe=b?Qt:l.Fragment,$=b?{as:We,allowPinchZoom:!0}:void 0,G=T=>{var k,ae;const H=B.current+T,Z=N().filter(se=>!se.disabled),X=document.activeElement,K=(k=Z.find(se=>se.ref.current===X))==null?void 0:k.textValue,q=Z.map(se=>se.textValue),ce=Gv(q,H,K),fe=(ae=Z.find(se=>se.textValue===ce))==null?void 0:ae.ref.current;(function se(te){B.current=te,window.clearTimeout(j.current),te!==""&&(j.current=window.setTimeout(()=>se(""),1e3))})(H),fe&&setTimeout(()=>fe.focus())};l.useEffect(()=>()=>window.clearTimeout(j.current),[]),_n();const V=l.useCallback(T=>{var Z,X;return U.current===((Z=O.current)==null?void 0:Z.side)&&Uv(T,(X=O.current)==null?void 0:X.area)},[]);return c.jsx(Av,{scope:n,searchRef:B,onItemEnter:l.useCallback(T=>{V(T)&&T.preventDefault()},[V]),onItemLeave:l.useCallback(T=>{var H;V(T)||((H=M.current)==null||H.focus(),A(null))},[V]),onTriggerLeave:l.useCallback(T=>{V(T)&&T.preventDefault()},[V]),pointerGraceTimerRef:z,onPointerGraceIntentChange:l.useCallback(T=>{O.current=T},[]),children:c.jsx(oe,{...$,children:c.jsx(Jt,{asChild:!0,trapped:r,onMountAutoFocus:_(a,T=>{var H;T.preventDefault(),(H=M.current)==null||H.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:c.jsx(wt,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:p,children:c.jsx(ao,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:A,onEntryFocus:_(u,T=>{y.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Zn,{role:"menu","aria-orientation":"vertical","data-state":ql(v.open),"data-radix-menu-content":"",dir:y.dir,...w,...g,ref:I,style:{outline:"none",...g.style},onKeyDown:_(g.onKeyDown,T=>{const Z=T.target.closest("[data-radix-menu-content]")===T.currentTarget,X=T.ctrlKey||T.altKey||T.metaKey,K=T.key.length===1;Z&&(T.key==="Tab"&&T.preventDefault(),!X&&K&&G(T.key));const q=M.current;if(T.target!==q||!Cv.includes(T.key))return;T.preventDefault();const fe=N().filter(k=>!k.disabled).map(k=>k.ref.current);Sl.includes(T.key)&&fe.reverse(),Wv(fe)}),onBlur:_(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(j.current),B.current="")}),onPointerMove:_(e.onPointerMove,gn(T=>{const H=T.target,Z=W.current!==T.clientX;if(T.currentTarget.contains(H)&&Z){const X=T.clientX>W.current?"right":"left";U.current=X,W.current=T.clientX}}))})})})})})})});Il.displayName=_e;var kv="MenuGroup",Sr=l.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return c.jsx(L.div,{role:"group",...o,ref:t})});Sr.displayName=kv;var jv="MenuLabel",kl=l.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return c.jsx(L.div,{...o,ref:t})});kl.displayName=jv;var io="MenuItem",jl="menu.itemSelect",lo=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,a=l.useRef(null),s=pn(io,e.__scopeMenu),i=Nr(io,e.__scopeMenu),u=J(t,a),d=l.useRef(!1),f=()=>{const m=a.current;if(!n&&m){const h=new CustomEvent(jl,{bubbles:!0,cancelable:!0});m.addEventListener(jl,p=>o==null?void 0:o(p),{once:!0}),Rn(m,h),h.defaultPrevented?d.current=!1:s.onClose()}};return c.jsx(Dl,{...r,ref:u,disabled:n,onClick:_(e.onClick,f),onPointerDown:m=>{var h;(h=e.onPointerDown)==null||h.call(e,m),d.current=!0},onPointerUp:_(e.onPointerUp,m=>{var h;d.current||(h=m.currentTarget)==null||h.click()}),onKeyDown:_(e.onKeyDown,m=>{const h=i.searchRef.current!=="";n||h&&m.key===" "||wr.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});lo.displayName=io;var Dl=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...a}=e,s=Nr(io,n),i=Tl(n),u=l.useRef(null),d=J(t,u),[f,m]=l.useState(!1),[h,p]=l.useState("");return l.useEffect(()=>{const b=u.current;b&&p((b.textContent??"").trim())},[a.children]),c.jsx(dn.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:c.jsx(so,{asChild:!0,...i,focusable:!o,children:c.jsx(L.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:d,onPointerMove:_(e.onPointerMove,gn(b=>{o?s.onItemLeave(b):(s.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_(e.onPointerLeave,gn(b=>s.onItemLeave(b))),onFocus:_(e.onFocus,()=>m(!0)),onBlur:_(e.onBlur,()=>m(!1))})})})}),Dv="MenuCheckboxItem",Ol=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return c.jsx(Bl,{scope:e.__scopeMenu,checked:n,children:c.jsx(lo,{role:"menuitemcheckbox","aria-checked":co(n)?"mixed":n,...r,ref:t,"data-state":Mr(n),onSelect:_(r.onSelect,()=>o==null?void 0:o(co(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ol.displayName=Dv;var Ll="MenuRadioGroup",[Ov,Lv]=Et(Ll,{value:void 0,onValueChange:()=>{}}),Fl=l.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,a=ge(o);return c.jsx(Ov,{scope:e.__scopeMenu,value:n,onValueChange:a,children:c.jsx(Sr,{...r,ref:t})})});Fl.displayName=Ll;var $l="MenuRadioItem",Vl=l.forwardRef((e,t)=>{const{value:n,...o}=e,r=Lv($l,e.__scopeMenu),a=n===r.value;return c.jsx(Bl,{scope:e.__scopeMenu,checked:a,children:c.jsx(lo,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":Mr(a),onSelect:_(o.onSelect,()=>{var s;return(s=r.onValueChange)==null?void 0:s.call(r,n)},{checkForDefaultPrevented:!1})})})});Vl.displayName=$l;var Pr="MenuItemIndicator",[Bl,Fv]=Et(Pr,{checked:!1}),Wl=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,a=Fv(Pr,n);return c.jsx(be,{present:o||co(a.checked)||a.checked===!0,children:c.jsx(L.span,{...r,ref:t,"data-state":Mr(a.checked)})})});Wl.displayName=Pr;var $v="MenuSeparator",zl=l.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return c.jsx(L.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});zl.displayName=$v;var Vv="MenuArrow",Gl=l.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=fn(n);return c.jsx(Qn,{...r,...o,ref:t})});Gl.displayName=Vv;var Tr="MenuSub",[Bv,Hl]=Et(Tr),Ul=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,a=ht(Tr,t),s=fn(t),[i,u]=l.useState(null),[d,f]=l.useState(null),m=ge(r);return l.useEffect(()=>(a.open===!1&&m(!1),()=>m(!1)),[a.open,m]),c.jsx(rn,{...s,children:c.jsx(Ml,{scope:t,open:o,onOpenChange:m,content:d,onContentChange:f,children:c.jsx(Bv,{scope:t,contentId:Ne(),triggerId:Ne(),trigger:i,onTriggerChange:u,children:n})})})};Ul.displayName=Tr;var mn="MenuSubTrigger",Kl=l.forwardRef((e,t)=>{const n=ht(mn,e.__scopeMenu),o=pn(mn,e.__scopeMenu),r=Hl(mn,e.__scopeMenu),a=Nr(mn,e.__scopeMenu),s=l.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{const m=i.current;return()=>{window.clearTimeout(m),u(null)}},[i,u]),c.jsx(xr,{asChild:!0,...d,children:c.jsx(Dl,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ql(n.open),...e,ref:qt(t,r.onTriggerChange),onClick:m=>{var h;(h=e.onClick)==null||h.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_(e.onPointerMove,gn(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:_(e.onPointerLeave,gn(m=>{var p,b;f();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const g=(b=n.content)==null?void 0:b.dataset.side,v=g==="right",y=v?-5:5,w=h[v?"left":"right"],C=h[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+y,y:m.clientY},{x:w,y:h.top},{x:C,y:h.top},{x:C,y:h.bottom},{x:w,y:h.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:_(e.onKeyDown,m=>{var p;const h=a.searchRef.current!=="";e.disabled||h&&m.key===" "||Nv[o.dir].includes(m.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),m.preventDefault())})})})});Kl.displayName=mn;var Yl="MenuSubContent",Xl=l.forwardRef((e,t)=>{const n=Al(_e,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=ht(_e,e.__scopeMenu),s=pn(_e,e.__scopeMenu),i=Hl(Yl,e.__scopeMenu),u=l.useRef(null),d=J(t,u);return c.jsx(dn.Provider,{scope:e.__scopeMenu,children:c.jsx(be,{present:o||a.open,children:c.jsx(dn.Slot,{scope:e.__scopeMenu,children:c.jsx(Er,{id:i.contentId,"aria-labelledby":i.triggerId,...r,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var m;s.isUsingKeyboardRef.current&&((m=u.current)==null||m.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:_(e.onFocusOutside,f=>{f.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:_(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:_(e.onKeyDown,f=>{var p;const m=f.currentTarget.contains(f.target),h=Ev[s.dir].includes(f.key);m&&h&&(a.onOpenChange(!1),(p=i.trigger)==null||p.focus(),f.preventDefault())})})})})})});Xl.displayName=Yl;function ql(e){return e?"open":"closed"}function co(e){return e==="indeterminate"}function Mr(e){return co(e)?"indeterminate":e?"checked":"unchecked"}function Wv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zv(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Gv(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=zv(e,Math.max(a,0));r.length===1&&(s=s.filter(d=>d!==n));const u=s.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Hv(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,u=t[a].y,d=t[s].x,f=t[s].y;u>o!=f>o&&n<(d-i)*(o-u)/(f-u)+i&&(r=!r)}return r}function Uv(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Hv(n,t)}function gn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Kv=Rl,Yv=xr,Xv=_l,qv=Il,Jv=Sr,Zv=kl,Qv=lo,eb=Ol,tb=Fl,nb=Vl,ob=Wl,rb=zl,ab=Gl,sb=Ul,ib=Kl,lb=Xl,Rr="DropdownMenu",[cb,C0]=ve(Rr,[Pl]),Ee=Pl(),[ub,Jl]=cb(Rr),Zl=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,u=Ee(t),d=l.useRef(null),[f=!1,m]=Ce({prop:r,defaultProp:a,onChange:s});return c.jsx(ub,{scope:t,triggerId:Ne(),triggerRef:d,contentId:Ne(),open:f,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(h=>!h),[m]),modal:i,children:c.jsx(Kv,{...u,open:f,onOpenChange:m,dir:o,modal:i,children:n})})};Zl.displayName=Rr;var Ql="DropdownMenuTrigger",ec=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,a=Jl(Ql,n),s=Ee(n);return c.jsx(Yv,{asChild:!0,...s,children:c.jsx(L.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,...r,ref:qt(t,a.triggerRef),onPointerDown:_(e.onPointerDown,i=>{!o&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:_(e.onKeyDown,i=>{o||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});ec.displayName=Ql;var db="DropdownMenuPortal",tc=e=>{const{__scopeDropdownMenu:t,...n}=e,o=Ee(t);return c.jsx(Xv,{...o,...n})};tc.displayName=db;var nc="DropdownMenuContent",oc=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Jl(nc,n),a=Ee(n),s=l.useRef(!1);return c.jsx(qv,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...o,ref:t,onCloseAutoFocus:_(e.onCloseAutoFocus,i=>{var u;s.current||(u=r.triggerRef.current)==null||u.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:_(e.onInteractOutside,i=>{const u=i.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!r.modal||f)&&(s.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)"}})});oc.displayName=nc;var fb="DropdownMenuGroup",rc=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ee(n);return c.jsx(Jv,{...r,...o,ref:t})});rc.displayName=fb;var pb="DropdownMenuLabel",ac=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ee(n);return c.jsx(Zv,{...r,...o,ref:t})});ac.displayName=pb;var mb="DropdownMenuItem",sc=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ee(n);return c.jsx(Qv,{...r,...o,ref:t})});sc.displayName=mb;var gb="DropdownMenuCheckboxItem",ic=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ee(n);return c.jsx(eb,{...r,...o,ref:t})});ic.displayName=gb;var hb="DropdownMenuRadioGroup",lc=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ee(n);return c.jsx(tb,{...r,...o,ref:t})});lc.displayName=hb;var vb="DropdownMenuRadioItem",cc=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ee(n);return c.jsx(nb,{...r,...o,ref:t})});cc.displayName=vb;var bb="DropdownMenuItemIndicator",uc=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ee(n);return c.jsx(ob,{...r,...o,ref:t})});uc.displayName=bb;var yb="DropdownMenuSeparator",dc=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ee(n);return c.jsx(rb,{...r,...o,ref:t})});dc.displayName=yb;var wb="DropdownMenuArrow",xb=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ee(n);return c.jsx(ab,{...r,...o,ref:t})});xb.displayName=wb;var Cb=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:a}=e,s=Ee(t),[i=!1,u]=Ce({prop:o,defaultProp:a,onChange:r});return c.jsx(sb,{...s,open:i,onOpenChange:u,children:n})},Nb="DropdownMenuSubTrigger",fc=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ee(n);return c.jsx(ib,{...r,...o,ref:t})});fc.displayName=Nb;var Eb="DropdownMenuSubContent",pc=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ee(n);return c.jsx(lb,{...r,...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)"}})});pc.displayName=Eb;var Sb=Zl,Pb=ec,mc=tc,gc=oc,Tb=rc,hc=ac,vc=sc,bc=ic,Mb=lc,yc=cc,wc=uc,xc=dc,Rb=Cb,Cc=fc,Nc=pc;const Ab=Sb,_b=Pb,Ib=Tb,kb=mc,jb=Rb,Db=Mb,Ec=l.forwardRef(({className:e,inset:t,children:n,...o},r)=>c.jsxs(Cc,{ref:r,className:R("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[n,c.jsx(qo,{className:"ml-auto"})]}));Ec.displayName=Cc.displayName;const Sc=l.forwardRef(({className:e,...t},n)=>c.jsx(Nc,{ref:n,className:R("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}));Sc.displayName=Nc.displayName;const Pc=l.forwardRef(({className:e,sideOffset:t=4,...n},o)=>c.jsx(mc,{children:c.jsx(gc,{ref:o,sideOffset:t,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Pc.displayName=gc.displayName;const Tc=l.forwardRef(({className:e,inset:t,...n},o)=>c.jsx(vc,{ref:o,className:R("relative flex cursor-default select-none items-center gap-2 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 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Tc.displayName=vc.displayName;const Mc=l.forwardRef(({className:e,children:t,checked:n,...o},r)=>c.jsxs(bc,{ref:r,className:R("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:n,...o,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(wc,{children:c.jsx(Yo,{className:"h-4 w-4"})})}),t]}));Mc.displayName=bc.displayName;const Rc=l.forwardRef(({className:e,children:t,...n},o)=>c.jsxs(yc,{ref:o,className:R("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),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(wc,{children:c.jsx(oi,{className:"h-2 w-2 fill-current"})})}),t]}));Rc.displayName=yc.displayName;const Ac=l.forwardRef(({className:e,inset:t,...n},o)=>c.jsx(hc,{ref:o,className:R("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Ac.displayName=hc.displayName;const _c=l.forwardRef(({className:e,...t},n)=>c.jsx(xc,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));_c.displayName=xc.displayName;const Ic=({className:e,...t})=>c.jsx("span",{className:R("ml-auto text-xs tracking-widest opacity-60",e),...t});Ic.displayName="DropdownMenuShortcut";var Ob=e=>e.type==="checkbox",Lb=e=>e instanceof Date,kc=e=>e==null;const Fb=e=>typeof e=="object";var $t=e=>!kc(e)&&!Array.isArray(e)&&Fb(e)&&!Lb(e),$b=e=>$t(e)&&e.target?Ob(e.target)?e.target.checked:e.target.value:e,Vb=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Bb=(e,t)=>e.has(Vb(t)),Wb=e=>{const t=e.constructor&&e.constructor.prototype;return $t(t)&&t.hasOwnProperty("isPrototypeOf")},zb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ar(e){let t;const n=Array.isArray(e),o=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(zb&&(e instanceof Blob||o))&&(n||$t(e)))if(t=n?[]:{},!n&&!Wb(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Ar(e[r]));else return e;return t}var jc=e=>Array.isArray(e)?e.filter(Boolean):[],_r=e=>e===void 0,Pe=(e,t,n)=>{if(!t||!$t(e))return n;const o=jc(t.split(/[,[\].]+?/)).reduce((r,a)=>kc(r)?r:r[a],e);return _r(o)||o===e?_r(e[t])?n:e[t]:o},Dc=e=>typeof e=="boolean",Gb=e=>/^\w*$/.test(e),Hb=e=>jc(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Oc=(e,t,n)=>{let o=-1;const r=Gb(t)?[t]:Hb(t),a=r.length,s=a-1;for(;++o<a;){const i=r[o];let u=n;if(o!==s){const d=e[i];u=$t(d)||Array.isArray(d)?d:isNaN(+r[o+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=u,e=e[i]}return e};const Lc={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Fc={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},$c=S.createContext(null),uo=()=>S.useContext($c),Ub=e=>{const{children:t,...n}=e;return S.createElement($c.Provider,{value:n},t)};var Kb=(e,t,n,o=!0)=>{const r={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(r,a,{get:()=>{const s=a;return t._proxyFormState[s]!==Fc.all&&(t._proxyFormState[s]=!o||Fc.all),n&&(n[s]=!0),e[s]}});return r},Yb=e=>$t(e)&&!Object.keys(e).length,Xb=(e,t,n,o)=>{n(e);const{name:r,...a}=e;return Yb(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===!o)},qb=e=>Array.isArray(e)?e:[e],Vc=(e,t,n)=>!e||!t||e===t||qb(e).some(o=>o&&(n?o===t:o.startsWith(t)||t.startsWith(o)));function Bc(e){const t=S.useRef(e);t.current=e,S.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function Jb(e){const t=uo(),{control:n=t.control,disabled:o,name:r,exact:a}=e,[s,i]=S.useState(n._formState),u=S.useRef(!0),d=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=S.useRef(r);return f.current=r,Bc({disabled:o,next:m=>u.current&&Vc(f.current,m.name,a)&&Xb(m,d.current,n._updateFormState)&&i({...n._formState,...m}),subject:n._subjects.state}),S.useEffect(()=>(u.current=!0,d.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),S.useMemo(()=>Kb(s,n,d.current,!1),[s,n])}var Zb=e=>typeof e=="string",Qb=(e,t,n,o,r)=>Zb(e)?Pe(n,e,r):Array.isArray(e)?e.map(a=>Pe(n,a)):n;function ey(e){const t=uo(),{control:n=t.control,name:o,defaultValue:r,disabled:a,exact:s}=e,i=S.useRef(o);i.current=o,Bc({disabled:a,subject:n._subjects.values,next:f=>{Vc(i.current,f.name,s)&&d(Ar(Qb(i.current,n._names,f.values||n._formValues,!1,r)))}});const[u,d]=S.useState(n._getWatch(o,r));return S.useEffect(()=>n._removeUnmounted()),u}function ty(e){const t=uo(),{name:n,disabled:o,control:r=t.control,shouldUnregister:a}=e,s=Bb(r._names.array,n),i=ey({control:r,name:n,defaultValue:Pe(r._formValues,n,Pe(r._defaultValues,n,e.defaultValue)),exact:!0}),u=Jb({control:r,name:n,exact:!0}),d=S.useRef(r.register(n,{...e.rules,value:i,...Dc(e.disabled)?{disabled:e.disabled}:{}})),f=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Pe(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Pe(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Pe(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Pe(u.validatingFields,n)},error:{enumerable:!0,get:()=>Pe(u.errors,n)}}),[u,n]),m=S.useMemo(()=>({name:n,value:i,...Dc(o)||u.disabled?{disabled:u.disabled||o}:{},onChange:h=>d.current.onChange({target:{value:$b(h),name:n},type:Lc.CHANGE}),onBlur:()=>d.current.onBlur({target:{value:Pe(r._formValues,n),name:n},type:Lc.BLUR}),ref:h=>{const p=Pe(r._fields,n);p&&h&&(p._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:b=>h.setCustomValidity(b),reportValidity:()=>h.reportValidity()})}}),[n,r._formValues,o,u.disabled,i,r._fields]);return S.useEffect(()=>{const h=r._options.shouldUnregister||a,p=(b,g)=>{const v=Pe(r._fields,b);v&&v._f&&(v._f.mount=g)};if(p(n,!0),h){const b=Ar(Pe(r._options.defaultValues,n));Oc(r._defaultValues,n,b),_r(Pe(r._formValues,n))&&Oc(r._formValues,n,b)}return!s&&r.register(n),()=>{(s?h&&!r._state.action:h)?r.unregister(n):p(n,!1)}},[n,r,s,a]),S.useEffect(()=>{r._updateDisabledField({disabled:o,fields:r._fields,name:n})},[o,n,r]),S.useMemo(()=>({field:m,formState:u,fieldState:f}),[m,u,f])}const ny=e=>e.render(ty(e));var oy="Label",Wc=l.forwardRef((e,t)=>c.jsx(L.label,{...e,ref:t,onMouseDown:n=>{var r;n.target.closest("button, input, select, textarea")||((r=e.onMouseDown)==null||r.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Wc.displayName=oy;var zc=Wc;const ry=Mt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ir=l.forwardRef(({className:e,...t},n)=>c.jsx(zc,{ref:n,className:R(ry(),e),...t}));Ir.displayName=zc.displayName;const ay=Ub,Gc=l.createContext({}),sy=({...e})=>c.jsx(Gc.Provider,{value:{name:e.name},children:c.jsx(ny,{...e})}),hn=()=>{const e=l.useContext(Gc),t=l.useContext(Hc),{getFieldState:n,formState:o}=uo(),r=n(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},Hc=l.createContext({}),Uc=l.forwardRef(({className:e,...t},n)=>{const o=l.useId();return c.jsx(Hc.Provider,{value:{id:o},children:c.jsx("div",{ref:n,className:R("space-y-2",e),...t})})});Uc.displayName="FormItem";const Kc=l.forwardRef(({className:e,...t},n)=>{const{error:o,formItemId:r}=hn();return c.jsx(Ir,{ref:n,className:R(o&&"text-destructive",e),htmlFor:r,...t})});Kc.displayName="FormLabel";const Yc=l.forwardRef(({...e},t)=>{const{error:n,formItemId:o,formDescriptionId:r,formMessageId:a}=hn();return c.jsx(We,{ref:t,id:o,"aria-describedby":n?`${r} ${a}`:`${r}`,"aria-invalid":!!n,...e})});Yc.displayName="FormControl";const Xc=l.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:o}=hn();return c.jsx("p",{ref:n,id:o,className:R("text-[0.8rem] text-muted-foreground",e),...t})});Xc.displayName="FormDescription";const qc=l.forwardRef(({className:e,children:t,...n},o)=>{const{error:r,formMessageId:a}=hn(),s=r?String(r==null?void 0:r.message):t;return s?c.jsx("p",{ref:o,id:a,className:R("text-[0.8rem] font-medium text-destructive",e),...n,children:s}):null});qc.displayName="FormMessage";var iy="VisuallyHidden",kr=l.forwardRef((e,t)=>c.jsx(L.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));kr.displayName=iy;var Jc=kr,Vt="NavigationMenu",[jr,Zc,ly]=cn(Vt),[Dr,cy,uy]=cn(Vt),[Or,N0]=ve(Vt,[ly,uy]),[dy,Ie]=Or(Vt),[fy,py]=Or(Vt),Qc=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,onValueChange:r,defaultValue:a,delayDuration:s=200,skipDelayDuration:i=300,orientation:u="horizontal",dir:d,...f}=e,[m,h]=l.useState(null),p=J(t,j=>h(j)),b=Nt(d),g=l.useRef(0),v=l.useRef(0),y=l.useRef(0),[w,C]=l.useState(!0),[N="",E]=Ce({prop:o,onChange:j=>{const B=j!=="",z=i>0;B?(window.clearTimeout(y.current),z&&C(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>C(!0),i)),r==null||r(j)},defaultProp:a}),A=l.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>E(""),150)},[E]),M=l.useCallback(j=>{window.clearTimeout(v.current),E(j)},[E]),I=l.useCallback(j=>{N===j?window.clearTimeout(v.current):g.current=window.setTimeout(()=>{window.clearTimeout(v.current),E(j)},s)},[N,E,s]);return l.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(v.current),window.clearTimeout(y.current)},[]),c.jsx(tu,{scope:n,isRootMenu:!0,value:N,dir:b,orientation:u,rootNavigationMenu:m,onTriggerEnter:j=>{window.clearTimeout(g.current),w?I(j):M(j)},onTriggerLeave:()=>{window.clearTimeout(g.current),A()},onContentEnter:()=>window.clearTimeout(v.current),onContentLeave:A,onItemSelect:j=>{E(B=>B===j?"":j)},onItemDismiss:()=>E(""),children:c.jsx(L.nav,{"aria-label":"Main","data-orientation":u,dir:b,...f,ref:p})})});Qc.displayName=Vt;var eu="NavigationMenuSub",my=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,onValueChange:r,defaultValue:a,orientation:s="horizontal",...i}=e,u=Ie(eu,n),[d="",f]=Ce({prop:o,onChange:r,defaultProp:a});return c.jsx(tu,{scope:n,isRootMenu:!1,value:d,dir:u.dir,orientation:s,rootNavigationMenu:u.rootNavigationMenu,onTriggerEnter:m=>f(m),onItemSelect:m=>f(m),onItemDismiss:()=>f(""),children:c.jsx(L.div,{"data-orientation":s,...i,ref:t})})});my.displayName=eu;var tu=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:o,dir:r,orientation:a,children:s,value:i,onItemSelect:u,onItemDismiss:d,onTriggerEnter:f,onTriggerLeave:m,onContentEnter:h,onContentLeave:p}=e,[b,g]=l.useState(null),[v,y]=l.useState(new Map),[w,C]=l.useState(null);return c.jsx(dy,{scope:t,isRootMenu:n,rootNavigationMenu:o,value:i,previousValue:ln(i),baseId:Ne(),dir:r,orientation:a,viewport:b,onViewportChange:g,indicatorTrack:w,onIndicatorTrackChange:C,onTriggerEnter:ge(f),onTriggerLeave:ge(m),onContentEnter:ge(h),onContentLeave:ge(p),onItemSelect:ge(u),onItemDismiss:ge(d),onViewportContentChange:l.useCallback((N,E)=>{y(A=>(A.set(N,E),new Map(A)))},[]),onViewportContentRemove:l.useCallback(N=>{y(E=>E.has(N)?(E.delete(N),new Map(E)):E)},[]),children:c.jsx(jr.Provider,{scope:t,children:c.jsx(fy,{scope:t,items:v,children:s})})})},nu="NavigationMenuList",ou=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,r=Ie(nu,n),a=c.jsx(L.ul,{"data-orientation":r.orientation,...o,ref:t});return c.jsx(L.div,{style:{position:"relative"},ref:r.onIndicatorTrackChange,children:c.jsx(jr.Slot,{scope:n,children:r.isRootMenu?c.jsx(mu,{asChild:!0,children:a}):a})})});ou.displayName=nu;var ru="NavigationMenuItem",[gy,au]=Or(ru),su=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,...r}=e,a=Ne(),s=o||a||"LEGACY_REACT_AUTO_VALUE",i=l.useRef(null),u=l.useRef(null),d=l.useRef(null),f=l.useRef(()=>{}),m=l.useRef(!1),h=l.useCallback((b="start")=>{if(i.current){f.current();const g=Vr(i.current);g.length&&Br(b==="start"?g:g.reverse())}},[]),p=l.useCallback(()=>{if(i.current){const b=Vr(i.current);b.length&&(f.current=Cy(b))}},[]);return c.jsx(gy,{scope:n,value:s,triggerRef:u,contentRef:i,focusProxyRef:d,wasEscapeCloseRef:m,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:p,onContentFocusOutside:p,children:c.jsx(L.li,{...r,ref:t})})});su.displayName=ru;var Lr="NavigationMenuTrigger",iu=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:o,...r}=e,a=Ie(Lr,e.__scopeNavigationMenu),s=au(Lr,e.__scopeNavigationMenu),i=l.useRef(null),u=J(i,s.triggerRef,t),d=vu(a.baseId,s.value),f=bu(a.baseId,s.value),m=l.useRef(!1),h=l.useRef(!1),p=s.value===a.value;return c.jsxs(c.Fragment,{children:[c.jsx(jr.ItemSlot,{scope:n,value:s.value,children:c.jsx(hu,{asChild:!0,children:c.jsx(L.button,{id:d,disabled:o,"data-disabled":o?"":void 0,"data-state":zr(p),"aria-expanded":p,"aria-controls":f,...r,ref:u,onPointerEnter:_(e.onPointerEnter,()=>{h.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:_(e.onPointerMove,po(()=>{o||h.current||s.wasEscapeCloseRef.current||m.current||(a.onTriggerEnter(s.value),m.current=!0)})),onPointerLeave:_(e.onPointerLeave,po(()=>{o||(a.onTriggerLeave(),m.current=!1)})),onClick:_(e.onClick,()=>{a.onItemSelect(s.value),h.current=p}),onKeyDown:_(e.onKeyDown,b=>{const v={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];p&&b.key===v&&(s.onEntryKeyDown(),b.preventDefault())})})})}),p&&c.jsxs(c.Fragment,{children:[c.jsx(Jc,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:b=>{const g=s.contentRef.current,v=b.relatedTarget,y=v===i.current,w=g==null?void 0:g.contains(v);(y||!w)&&s.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&c.jsx("span",{"aria-owns":f})]})]})});iu.displayName=Lr;var hy="NavigationMenuLink",lu="navigationMenu.linkSelect",cu=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:o,onSelect:r,...a}=e;return c.jsx(hu,{asChild:!0,children:c.jsx(L.a,{"data-active":o?"":void 0,"aria-current":o?"page":void 0,...a,ref:t,onClick:_(e.onClick,s=>{const i=s.target,u=new CustomEvent(lu,{bubbles:!0,cancelable:!0});if(i.addEventListener(lu,d=>r==null?void 0:r(d),{once:!0}),Rn(i,u),!u.defaultPrevented&&!s.metaKey){const d=new CustomEvent(fo,{bubbles:!0,cancelable:!0});Rn(i,d)}},{checkForDefaultPrevented:!1})})})});cu.displayName=hy;var Fr="NavigationMenuIndicator",uu=l.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=Ie(Fr,e.__scopeNavigationMenu),a=!!r.value;return r.indicatorTrack?En.createPortal(c.jsx(be,{present:n||a,children:c.jsx(vy,{...o,ref:t})}),r.indicatorTrack):null});uu.displayName=Fr;var vy=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,r=Ie(Fr,n),a=Zc(n),[s,i]=l.useState(null),[u,d]=l.useState(null),f=r.orientation==="horizontal",m=!!r.value;l.useEffect(()=>{var g;const b=(g=a().find(v=>v.value===r.value))==null?void 0:g.ref.current;b&&i(b)},[a,r.value]);const h=()=>{s&&d({size:f?s.offsetWidth:s.offsetHeight,offset:f?s.offsetLeft:s.offsetTop})};return Wr(s,h),Wr(r.indicatorTrack,h),u?c.jsx(L.div,{"aria-hidden":!0,"data-state":m?"visible":"hidden","data-orientation":r.orientation,...o,ref:t,style:{position:"absolute",...f?{left:0,width:u.size+"px",transform:`translateX(${u.offset}px)`}:{top:0,height:u.size+"px",transform:`translateY(${u.offset}px)`},...o.style}}):null}),Bt="NavigationMenuContent",du=l.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=Ie(Bt,e.__scopeNavigationMenu),a=au(Bt,e.__scopeNavigationMenu),s=J(a.contentRef,t),i=a.value===r.value,u={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...o};return r.viewport?c.jsx(by,{forceMount:n,...u,ref:s}):c.jsx(be,{present:n||i,children:c.jsx(fu,{"data-state":zr(i),...u,ref:s,onPointerEnter:_(e.onPointerEnter,r.onContentEnter),onPointerLeave:_(e.onPointerLeave,po(r.onContentLeave)),style:{pointerEvents:!i&&r.isRootMenu?"none":void 0,...u.style}})})});du.displayName=Bt;var by=l.forwardRef((e,t)=>{const n=Ie(Bt,e.__scopeNavigationMenu),{onViewportContentChange:o,onViewportContentRemove:r}=n;return he(()=>{o(e.value,{ref:t,...e})},[e,t,o]),he(()=>()=>r(e.value),[e.value,r]),null}),fo="navigationMenu.rootContentDismiss",fu=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,triggerRef:r,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:i,onContentFocusOutside:u,...d}=e,f=Ie(Bt,n),m=l.useRef(null),h=J(m,t),p=vu(f.baseId,o),b=bu(f.baseId,o),g=Zc(n),v=l.useRef(null),{onItemDismiss:y}=f;l.useEffect(()=>{const C=m.current;if(f.isRootMenu&&C){const N=()=>{var E;y(),i(),C.contains(document.activeElement)&&((E=r.current)==null||E.focus())};return C.addEventListener(fo,N),()=>C.removeEventListener(fo,N)}},[f.isRootMenu,e.value,r,y,i]);const w=l.useMemo(()=>{const N=g().map(B=>B.value);f.dir==="rtl"&&N.reverse();const E=N.indexOf(f.value),A=N.indexOf(f.previousValue),M=o===f.value,I=A===N.indexOf(o);if(!M&&!I)return v.current;const j=(()=>{if(E!==A){if(M&&A!==-1)return E>A?"from-end":"from-start";if(I&&E!==-1)return E>A?"to-start":"to-end"}return null})();return v.current=j,j},[f.previousValue,f.value,f.dir,g,o]);return c.jsx(mu,{asChild:!0,children:c.jsx(wt,{id:b,"aria-labelledby":p,"data-motion":w,"data-orientation":f.orientation,...d,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{var N;const C=new Event(fo,{bubbles:!0,cancelable:!0});(N=m.current)==null||N.dispatchEvent(C)},onFocusOutside:_(e.onFocusOutside,C=>{var E;u();const N=C.target;(E=f.rootNavigationMenu)!=null&&E.contains(N)&&C.preventDefault()}),onPointerDownOutside:_(e.onPointerDownOutside,C=>{var M;const N=C.target,E=g().some(I=>{var j;return(j=I.ref.current)==null?void 0:j.contains(N)}),A=f.isRootMenu&&((M=f.viewport)==null?void 0:M.contains(N));(E||A||!f.isRootMenu)&&C.preventDefault()}),onKeyDown:_(e.onKeyDown,C=>{var A;const N=C.altKey||C.ctrlKey||C.metaKey;if(C.key==="Tab"&&!N){const M=Vr(C.currentTarget),I=document.activeElement,j=M.findIndex(O=>O===I),z=C.shiftKey?M.slice(0,j).reverse():M.slice(j+1,M.length);Br(z)?C.preventDefault():(A=a.current)==null||A.focus()}}),onEscapeKeyDown:_(e.onEscapeKeyDown,C=>{s.current=!0})})})}),$r="NavigationMenuViewport",pu=l.forwardRef((e,t)=>{const{forceMount:n,...o}=e,a=!!Ie($r,e.__scopeNavigationMenu).value;return c.jsx(be,{present:n||a,children:c.jsx(yy,{...o,ref:t})})});pu.displayName=$r;var yy=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:o,...r}=e,a=Ie($r,n),s=J(t,a.onViewportChange),i=py(Bt,e.__scopeNavigationMenu),[u,d]=l.useState(null),[f,m]=l.useState(null),h=u?(u==null?void 0:u.width)+"px":void 0,p=u?(u==null?void 0:u.height)+"px":void 0,b=!!a.value,g=b?a.value:a.previousValue;return Wr(f,()=>{f&&d({width:f.offsetWidth,height:f.offsetHeight})}),c.jsx(L.div,{"data-state":zr(b),"data-orientation":a.orientation,...r,ref:s,style:{pointerEvents:!b&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":p,...r.style},onPointerEnter:_(e.onPointerEnter,a.onContentEnter),onPointerLeave:_(e.onPointerLeave,po(a.onContentLeave)),children:Array.from(i.items).map(([y,{ref:w,forceMount:C,...N}])=>{const E=g===y;return c.jsx(be,{present:C||E,children:c.jsx(fu,{...N,ref:qt(w,A=>{E&&A&&m(A)})})},y)})})}),wy="FocusGroup",mu=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,r=Ie(wy,n);return c.jsx(Dr.Provider,{scope:n,children:c.jsx(Dr.Slot,{scope:n,children:c.jsx(L.div,{dir:r.dir,...o,ref:t})})})}),gu=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],xy="FocusGroupItem",hu=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,r=cy(n),a=Ie(xy,n);return c.jsx(Dr.ItemSlot,{scope:n,children:c.jsx(L.button,{...o,ref:t,onKeyDown:_(e.onKeyDown,s=>{if(["Home","End",...gu].includes(s.key)){let u=r().map(m=>m.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&u.reverse(),gu.includes(s.key)){const m=u.indexOf(s.currentTarget);u=u.slice(m+1)}setTimeout(()=>Br(u)),s.preventDefault()}})})})});function Vr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Br(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function Cy(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function Wr(e,t){const n=ge(t);he(()=>{let o=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(o),r.unobserve(e)}}},[e,n])}function zr(e){return e?"open":"closed"}function vu(e,t){return`${e}-trigger-${t}`}function bu(e,t){return`${e}-content-${t}`}function po(e){return t=>t.pointerType==="mouse"?e(t):void 0}var yu=Qc,wu=ou,Ny=su,xu=iu,Ey=cu,Cu=uu,Nu=du,Eu=pu;const Su=l.forwardRef(({className:e,children:t,...n},o)=>c.jsxs(yu,{ref:o,className:R("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,c.jsx(Gr,{})]}));Su.displayName=yu.displayName;const Pu=l.forwardRef(({className:e,...t},n)=>c.jsx(wu,{ref:n,className:R("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Pu.displayName=wu.displayName;const Sy=Ny,Tu=Mt("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Mu=l.forwardRef(({className:e,children:t,...n},o)=>c.jsxs(xu,{ref:o,className:R(Tu(),"group",e),...n,children:[t," ",c.jsx(Xo,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Mu.displayName=xu.displayName;const Ru=l.forwardRef(({className:e,...t},n)=>c.jsx(Nu,{ref:n,className:R("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));Ru.displayName=Nu.displayName;const Py=Ey,Gr=l.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:R("absolute left-0 top-full flex justify-center"),children:c.jsx(Eu,{className:R("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t})}));Gr.displayName=Eu.displayName;const Au=l.forwardRef(({className:e,...t},n)=>c.jsx(Cu,{ref:n,className:R("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:c.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Au.displayName=Cu.displayName;const Hr=({className:e,...t})=>c.jsx("nav",{role:"navigation","aria-label":"pagination",className:R("mx-auto flex w-full justify-center",e),...t});Hr.displayName="Pagination";const Ur=l.forwardRef(({className:e,...t},n)=>c.jsx("ul",{ref:n,className:R("flex flex-row items-center gap-1",e),...t}));Ur.displayName="PaginationContent";const vn=l.forwardRef(({className:e,...t},n)=>c.jsx("li",{ref:n,className:R("",e),...t}));vn.displayName="PaginationItem";const bn=({className:e,isActive:t,size:n="icon",...o})=>c.jsx(Ge,{"aria-current":t?"page":void 0,className:R(en({variant:t?"default":"outline",size:n}),t?"text-primary-foreground":"text-foreground",e),...o,children:o.children});bn.displayName="PaginationLink";const Kr=({className:e,...t})=>c.jsx(bn,{"aria-label":"Previous page",size:"default",className:R("gap-1",e),...t,children:c.jsx(ti,{className:"h-4 w-4"})});Kr.displayName="PaginationPrevious";const Yr=({className:e,...t})=>c.jsx(bn,{"aria-label":"Next page",size:"default",className:R("gap-1",e),...t,children:c.jsx(qo,{className:"h-4 w-4"})});Yr.displayName="PaginationNext";const _u=({className:e,...t})=>c.jsxs("span",{"aria-hidden":!0,className:R("flex h-9 w-9 items-center justify-center",e),...t,children:[c.jsx(Rg,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"More pages"})]});_u.displayName="PaginationEllipsis";var Xr="Progress",qr=100,[Ty,E0]=ve(Xr),[My,Ry]=Ty(Xr),Iu=l.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:r,getValueLabel:a=Ay,...s}=e;(r||r===0)&&!Ou(r)&&console.error(_y(`${r}`,"Progress"));const i=Ou(r)?r:qr;o!==null&&!Lu(o,i)&&console.error(Iy(`${o}`,"Progress"));const u=Lu(o,i)?o:null,d=mo(u)?a(u,i):void 0;return c.jsx(My,{scope:n,value:u,max:i,children:c.jsx(L.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":mo(u)?u:void 0,"aria-valuetext":d,role:"progressbar","data-state":Du(u,i),"data-value":u??void 0,"data-max":i,...s,ref:t})})});Iu.displayName=Xr;var ku="ProgressIndicator",ju=l.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,r=Ry(ku,n);return c.jsx(L.div,{"data-state":Du(r.value,r.max),"data-value":r.value??void 0,"data-max":r.max,...o,ref:t})});ju.displayName=ku;function Ay(e,t){return`${Math.round(e/t*100)}%`}function Du(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function mo(e){return typeof e=="number"}function Ou(e){return mo(e)&&!isNaN(e)&&e>0}function Lu(e,t){return mo(e)&&!isNaN(e)&&e<=t&&e>=0}function _y(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${qr}\`.`}function Iy(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
191
|
+
*/const oh=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ah=["top","right","bottom","left"],pt=Math.min,Re=Math.max,Qn=Math.round,Jn=Math.floor,Ke=e=>({x:e,y:e}),sh={left:"right",right:"left",bottom:"top",top:"bottom"},ih={start:"end",end:"start"};function io(e,t,n){return Re(e,pt(t,n))}function st(e,t){return typeof e=="function"?e(t):e}function it(e){return e.split("-")[0]}function Bt(e){return e.split("-")[1]}function co(e){return e==="x"?"y":"x"}function lo(e){return e==="y"?"height":"width"}function gt(e){return["top","bottom"].includes(it(e))?"y":"x"}function uo(e){return co(gt(e))}function ch(e,t,n){n===void 0&&(n=!1);const r=Bt(e),o=uo(e),a=lo(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Zn(s)),[s,Zn(s)]}function lh(e){const t=Zn(e);return[fo(e),t,fo(t)]}function fo(e){return e.replace(/start|end/g,t=>ih[t])}function uh(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:s;default:return[]}}function dh(e,t,n,r){const o=Bt(e);let a=uh(it(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(fo)))),a}function Zn(e){return e.replace(/left|right|bottom|top/g,t=>sh[t])}function fh(e){return{top:0,right:0,bottom:0,left:0,...e}}function gi(e){return typeof e!="number"?fh(e):{top:e,right:e,bottom:e,left:e}}function er(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function hi(e,t,n){let{reference:r,floating:o}=e;const a=gt(t),s=uo(t),i=lo(s),u=it(t),d=a==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let m;switch(u){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-o.width,y:p};break;default:m={x:r.x,y:r.y}}switch(Bt(t)){case"start":m[s]-=h*(n&&d?-1:1);break;case"end":m[s]+=h*(n&&d?-1:1);break}return m}const mh=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=hi(d,r,u),h=r,m={},v=0;for(let g=0;g<i.length;g++){const{name:b,fn:y}=i[g],{x:w,y:C,data:N,reset:E}=await y({x:f,y:p,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:d,platform:s,elements:{reference:e,floating:t}});f=w??f,p=C??p,m={...m,[b]:{...m[b],...N}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(d=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:p}=hi(d,h,u)),g=-1)}return{x:f,y:p,placement:h,strategy:o,middlewareData:m}};async function dn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:h=!1,padding:m=0}=st(t,e),v=gi(m),b=i[h?p==="floating"?"reference":"floating":p],y=er(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:u})),w=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),N=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},E=er(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:C,strategy:u}):w);return{top:(y.top-E.top+v.top)/N.y,bottom:(E.bottom-y.bottom+v.bottom)/N.y,left:(y.left-E.left+v.left)/N.x,right:(E.right-y.right+v.right)/N.x}}const ph=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:u}=t,{element:d,padding:f=0}=st(e,t)||{};if(d==null)return{};const p=gi(f),h={x:n,y:r},m=uo(o),v=lo(m),g=await s.getDimensions(d),b=m==="y",y=b?"top":"left",w=b?"bottom":"right",C=b?"clientHeight":"clientWidth",N=a.reference[v]+a.reference[m]-h[m]-a.floating[v],E=h[m]-a.reference[m],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let T=A?A[C]:0;(!T||!await(s.isElement==null?void 0:s.isElement(A)))&&(T=i.floating[C]||a.floating[v]);const _=N/2-E/2,j=T/2-g[v]/2-1,B=pt(p[y],j),G=pt(p[w],j),O=B,Y=T-g[v]-G,V=T/2-g[v]/2+_,re=io(O,V,Y),$=!u.arrow&&Bt(o)!=null&&V!==re&&a.reference[v]/2-(V<O?B:G)-g[v]/2<0,z=$?V<O?V-O:V-Y:0;return{[m]:h[m]+z,data:{[m]:re,centerOffset:V-re-z,...$&&{alignmentOffset:z}},reset:$}}}),gh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...b}=st(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=it(o),w=gt(i),C=it(i)===i,N=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=h||(C||!g?[Zn(i)]:lh(i)),A=v!=="none";!h&&A&&E.push(...dh(i,g,v,N));const T=[i,...E],_=await dn(t,b),j=[];let B=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&j.push(_[y]),p){const V=ch(o,s,N);j.push(_[V[0]],_[V[1]])}if(B=[...B,{placement:o,overflows:j}],!j.every(V=>V<=0)){var G,O;const V=(((G=a.flip)==null?void 0:G.index)||0)+1,re=T[V];if(re)return{data:{index:V,overflows:B},reset:{placement:re}};let $=(O=B.filter(z=>z.overflows[0]<=0).sort((z,W)=>z.overflows[1]-W.overflows[1])[0])==null?void 0:O.placement;if(!$)switch(m){case"bestFit":{var Y;const z=(Y=B.filter(W=>{if(A){const M=gt(W.placement);return M===w||M==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(M=>M>0).reduce((M,H)=>M+H,0)]).sort((W,M)=>W[1]-M[1])[0])==null?void 0:Y[0];z&&($=z);break}case"initialPlacement":$=i;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function vi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bi(e){return ah.some(t=>e[t]>=0)}const hh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=st(e,t);switch(r){case"referenceHidden":{const a=await dn(t,{...o,elementContext:"reference"}),s=vi(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:bi(s)}}}case"escaped":{const a=await dn(t,{...o,altBoundary:!0}),s=vi(a,n.floating);return{data:{escapedOffsets:s,escaped:bi(s)}}}default:return{}}}}};async function vh(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=it(n),i=Bt(n),u=gt(n)==="y",d=["left","top"].includes(s)?-1:1,f=a&&u?-1:1,p=st(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof v=="number"&&(m=i==="end"?v*-1:v),u?{x:m*f,y:h*d}:{x:h*d,y:m*f}}const bh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,u=await vh(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:s}}}}},yh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:b=>{let{x:y,y:w}=b;return{x:y,y:w}}},...u}=st(e,t),d={x:n,y:r},f=await dn(t,u),p=gt(it(o)),h=co(p);let m=d[h],v=d[p];if(a){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=m+f[b],C=m-f[y];m=io(w,m,C)}if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=v+f[b],C=v-f[y];v=io(w,v,C)}const g=i.fn({...t,[h]:m,[p]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:a,[p]:s}}}}}},wh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:u=!0,crossAxis:d=!0}=st(e,t),f={x:n,y:r},p=gt(o),h=co(p);let m=f[h],v=f[p];const g=st(i,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const C=h==="y"?"height":"width",N=a.reference[h]-a.floating[C]+b.mainAxis,E=a.reference[h]+a.reference[C]-b.mainAxis;m<N?m=N:m>E&&(m=E)}if(d){var y,w;const C=h==="y"?"width":"height",N=["top","left"].includes(it(o)),E=a.reference[p]-a.floating[C]+(N&&((y=s.offset)==null?void 0:y[p])||0)+(N?0:b.crossAxis),A=a.reference[p]+a.reference[C]+(N?0:((w=s.offset)==null?void 0:w[p])||0)-(N?b.crossAxis:0);v<E?v=E:v>A&&(v=A)}return{[h]:m,[p]:v}}}},xh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:u=()=>{},...d}=st(e,t),f=await dn(t,d),p=it(o),h=Bt(o),m=gt(o)==="y",{width:v,height:g}=a.floating;let b,y;p==="top"||p==="bottom"?(b=p,y=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=p,b=h==="end"?"top":"bottom");const w=g-f.top-f.bottom,C=v-f.left-f.right,N=pt(g-f[b],w),E=pt(v-f[y],C),A=!t.middlewareData.shift;let T=N,_=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=w),A&&!h){const B=Re(f.left,0),G=Re(f.right,0),O=Re(f.top,0),Y=Re(f.bottom,0);m?_=v-2*(B!==0||G!==0?B+G:Re(f.left,f.right)):T=g-2*(O!==0||Y!==0?O+Y:Re(f.top,f.bottom))}await u({...t,availableWidth:_,availableHeight:T});const j=await s.getDimensions(i.floating);return v!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function tr(){return typeof window<"u"}function Vt(e){return yi(e)?(e.nodeName||"").toLowerCase():"#document"}function Ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qe(e){var t;return(t=(yi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yi(e){return tr()?e instanceof Node||e instanceof Ae(e).Node:!1}function Fe(e){return tr()?e instanceof Element||e instanceof Ae(e).Element:!1}function Xe(e){return tr()?e instanceof HTMLElement||e instanceof Ae(e).HTMLElement:!1}function wi(e){return!tr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ae(e).ShadowRoot}function fn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ch(e){return["table","td","th"].includes(Vt(e))}function nr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function mo(e){const t=po(),n=Fe(e)?Le(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Nh(e){let t=ht(e);for(;Xe(t)&&!Gt(t);){if(mo(t))return t;if(nr(t))return null;t=ht(t)}return null}function po(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Gt(e){return["html","body","#document"].includes(Vt(e))}function Le(e){return Ae(e).getComputedStyle(e)}function rr(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(Vt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wi(e)&&e.host||qe(e);return wi(t)?t.host:t}function xi(e){const t=ht(e);return Gt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&fn(t)?t:xi(t)}function mn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=xi(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ae(o);if(a){const i=go(s);return t.concat(s,s.visualViewport||[],fn(o)?o:[],i&&n?mn(i):[])}return t.concat(o,mn(o,[],n))}function go(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ci(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xe(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Qn(n)!==a||Qn(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function ho(e){return Fe(e)?e:e.contextElement}function zt(e){const t=ho(e);if(!Xe(t))return Ke(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ci(t);let s=(a?Qn(n.width):n.width)/r,i=(a?Qn(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Eh=Ke(0);function Ni(e){const t=Ae(e);return!po()||!t.visualViewport?Eh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ae(e)?!1:t}function Tt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=ho(e);let s=Ke(1);t&&(r?Fe(r)&&(s=zt(r)):s=zt(e));const i=Sh(a,n,r)?Ni(a):Ke(0);let u=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){const h=Ae(a),m=r&&Fe(r)?Ae(r):r;let v=h,g=go(v);for(;g&&r&&m!==v;){const b=zt(g),y=g.getBoundingClientRect(),w=Le(g),C=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*b.x,N=y.top+(g.clientTop+parseFloat(w.paddingTop))*b.y;u*=b.x,d*=b.y,f*=b.x,p*=b.y,u+=C,d+=N,v=Ae(g),g=go(v)}}return er({width:f,height:p,x:u,y:d})}function vo(e,t){const n=rr(e).scrollLeft;return t?t.left+n:Tt(qe(e)).left+n}function Ei(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:vo(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function Ph(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=qe(r),i=t?nr(t.floating):!1;if(r===s||i&&a)return n;let u={scrollLeft:0,scrollTop:0},d=Ke(1);const f=Ke(0),p=Xe(r);if((p||!p&&!a)&&((Vt(r)!=="body"||fn(s))&&(u=rr(r)),Xe(r))){const m=Tt(r);d=zt(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const h=s&&!p&&!a?Ei(s,u,!0):Ke(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-u.scrollTop*d.y+f.y+h.y}}function Mh(e){return Array.from(e.getClientRects())}function Th(e){const t=qe(e),n=rr(e),r=e.ownerDocument.body,o=Re(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Re(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+vo(e);const i=-n.scrollTop;return Le(r).direction==="rtl"&&(s+=Re(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function Rh(e,t){const n=Ae(e),r=qe(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,u=0;if(o){a=o.width,s=o.height;const d=po();(!d||d&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:i,y:u}}function Ah(e,t){const n=Tt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Xe(e)?zt(e):Ke(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,u=o*a.x,d=r*a.y;return{width:s,height:i,x:u,y:d}}function Si(e,t,n){let r;if(t==="viewport")r=Rh(e,n);else if(t==="document")r=Th(qe(e));else if(Fe(t))r=Ah(t,n);else{const o=Ni(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return er(r)}function Pi(e,t){const n=ht(e);return n===t||!Fe(n)||Gt(n)?!1:Le(n).position==="fixed"||Pi(n,t)}function kh(e,t){const n=t.get(e);if(n)return n;let r=mn(e,[],!1).filter(i=>Fe(i)&&Vt(i)!=="body"),o=null;const a=Le(e).position==="fixed";let s=a?ht(e):e;for(;Fe(s)&&!Gt(s);){const i=Le(s),u=mo(s);!u&&i.position==="fixed"&&(o=null),(a?!u&&!o:!u&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||fn(s)&&!u&&Pi(e,s))?r=r.filter(f=>f!==s):o=i,s=ht(s)}return t.set(e,r),r}function _h(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?nr(t)?[]:kh(t,this._c):[].concat(n),r],i=s[0],u=s.reduce((d,f)=>{const p=Si(t,f,o);return d.top=Re(p.top,d.top),d.right=pt(p.right,d.right),d.bottom=pt(p.bottom,d.bottom),d.left=Re(p.left,d.left),d},Si(t,i,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Dh(e){const{width:t,height:n}=Ci(e);return{width:t,height:n}}function jh(e,t,n){const r=Xe(t),o=qe(t),a=n==="fixed",s=Tt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const u=Ke(0);if(r||!r&&!a)if((Vt(t)!=="body"||fn(o))&&(i=rr(t)),r){const h=Tt(t,!0,a,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&(u.x=vo(o));const d=o&&!r&&!a?Ei(o,i):Ke(0),f=s.left+i.scrollLeft-u.x-d.x,p=s.top+i.scrollTop-u.y-d.y;return{x:f,y:p,width:s.width,height:s.height}}function bo(e){return Le(e).position==="static"}function Mi(e,t){if(!Xe(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qe(e)===n&&(n=n.ownerDocument.body),n}function Ti(e,t){const n=Ae(e);if(nr(e))return n;if(!Xe(e)){let o=ht(e);for(;o&&!Gt(o);){if(Fe(o)&&!bo(o))return o;o=ht(o)}return n}let r=Mi(e,t);for(;r&&Ch(r)&&bo(r);)r=Mi(r,t);return r&&Gt(r)&&bo(r)&&!mo(r)?n:r||Nh(e)||n}const Ih=async function(e){const t=this.getOffsetParent||Ti,n=this.getDimensions,r=await n(e.floating);return{reference:jh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Oh(e){return Le(e).direction==="rtl"}const Fh={convertOffsetParentRelativeRectToViewportRelativeRect:Ph,getDocumentElement:qe,getClippingRect:_h,getOffsetParent:Ti,getElementRects:Ih,getClientRects:Mh,getDimensions:Dh,getScale:zt,isElement:Fe,isRTL:Oh};function Lh(e,t){let n=null,r;const o=qe(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),a();const{left:d,top:f,width:p,height:h}=e.getBoundingClientRect();if(i||t(),!p||!h)return;const m=Jn(f),v=Jn(o.clientWidth-(d+p)),g=Jn(o.clientHeight-(f+h)),b=Jn(d),w={rootMargin:-m+"px "+-v+"px "+-g+"px "+-b+"px",threshold:Re(0,pt(1,u))||1};let C=!0;function N(E){const A=E[0].intersectionRatio;if(A!==u){if(!C)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(N,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,w)}n.observe(e)}return s(!0),a}function $h(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=ho(e),f=o||a?[...d?mn(d):[],...mn(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const p=d&&i?Lh(d,n):null;let h=-1,m=null;s&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),d&&!u&&m.observe(d),m.observe(t));let v,g=u?Tt(e):null;u&&b();function b(){const y=Tt(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,v=requestAnimationFrame(b)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(v)}}const Wh=bh,Bh=yh,Vh=gh,Gh=xh,zh=hh,Ri=ph,Hh=wh,Yh=(e,t,n)=>{const r=new Map,o={platform:Fh,...n},a={...o.platform,_c:r};return mh(e,t,{...o,platform:a})};var or=typeof document<"u"?S.useLayoutEffect:S.useEffect;function ar(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ar(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!ar(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Ai(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ki(e,t){const n=Ai(e);return Math.round(t*n)/n}function yo(e){const t=c.useRef(e);return or(()=>{t.current=e}),t}function Uh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:u,open:d}=e,[f,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=c.useState(r);ar(h,r)||m(r);const[v,g]=c.useState(null),[b,y]=c.useState(null),w=c.useCallback(W=>{W!==A.current&&(A.current=W,g(W))},[]),C=c.useCallback(W=>{W!==T.current&&(T.current=W,y(W))},[]),N=a||v,E=s||b,A=c.useRef(null),T=c.useRef(null),_=c.useRef(f),j=u!=null,B=yo(u),G=yo(o),O=yo(d),Y=c.useCallback(()=>{if(!A.current||!T.current)return;const W={placement:t,strategy:n,middleware:h};G.current&&(W.platform=G.current),Yh(A.current,T.current,W).then(M=>{const H={...M,isPositioned:O.current!==!1};V.current&&!ar(_.current,H)&&(_.current=H,Dn.flushSync(()=>{p(H)}))})},[h,t,n,G,O]);or(()=>{d===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,p(W=>({...W,isPositioned:!1})))},[d]);const V=c.useRef(!1);or(()=>(V.current=!0,()=>{V.current=!1}),[]),or(()=>{if(N&&(A.current=N),E&&(T.current=E),N&&E){if(B.current)return B.current(N,E,Y);Y()}},[N,E,Y,B,j]);const re=c.useMemo(()=>({reference:A,floating:T,setReference:w,setFloating:C}),[w,C]),$=c.useMemo(()=>({reference:N,floating:E}),[N,E]),z=c.useMemo(()=>{const W={position:n,left:0,top:0};if(!$.floating)return W;const M=ki($.floating,f.x),H=ki($.floating,f.y);return i?{...W,transform:"translate("+M+"px, "+H+"px)",...Ai($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:H}},[n,i,$.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:Y,refs:re,elements:$,floatingStyles:z}),[f,Y,re,$,z])}const Kh=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ri({element:r.current,padding:o}).fn(n):{}:r?Ri({element:r,padding:o}).fn(n):{}}}},qh=(e,t)=>({...Wh(e),options:[e,t]}),Xh=(e,t)=>({...Bh(e),options:[e,t]}),Qh=(e,t)=>({...Hh(e),options:[e,t]}),Jh=(e,t)=>({...Vh(e),options:[e,t]}),Zh=(e,t)=>({...Gh(e),options:[e,t]}),ev=(e,t)=>({...zh(e),options:[e,t]}),tv=(e,t)=>({...Kh(e),options:[e,t]});var nv="Arrow",_i=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return l.jsx(F.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});_i.displayName=nv;var rv=_i;function sr(e){const[t,n]=c.useState(void 0);return ve(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;s=d.inlineSize,i=d.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var wo="Popper",[Di,vt]=be(wo),[ov,ji]=Di(wo),Ii=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return l.jsx(ov,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ii.displayName=wo;var Oi="PopperAnchor",Fi=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=ji(Oi,n),s=c.useRef(null),i=Q(t,s);return c.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:l.jsx(F.div,{...o,ref:i})});Fi.displayName=Oi;var xo="PopperContent",[av,sv]=Di(xo),Li=c.forwardRef((e,t)=>{var D,ae,se,te,oe,ie;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:v,...g}=e,b=ji(xo,n),[y,w]=c.useState(null),C=Q(t,we=>w(we)),[N,E]=c.useState(null),A=sr(N),T=(A==null?void 0:A.width)??0,_=(A==null?void 0:A.height)??0,j=r+(a!=="center"?"-"+a:""),B=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},G=Array.isArray(d)?d:[d],O=G.length>0,Y={padding:B,boundary:G.filter(cv),altBoundary:O},{refs:V,floatingStyles:re,placement:$,isPositioned:z,middlewareData:W}=Uh({strategy:"fixed",placement:j,whileElementsMounted:(...we)=>$h(...we,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[qh({mainAxis:o+_,alignmentAxis:s}),u&&Xh({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Qh():void 0,...Y}),u&&Jh({...Y}),Zh({...Y,apply:({elements:we,rects:Pe,availableWidth:_e,availableHeight:ct})=>{const{width:Be,height:lt}=Pe.reference,Ze=we.floating.style;Ze.setProperty("--radix-popper-available-width",`${_e}px`),Ze.setProperty("--radix-popper-available-height",`${ct}px`),Ze.setProperty("--radix-popper-anchor-width",`${Be}px`),Ze.setProperty("--radix-popper-anchor-height",`${lt}px`)}}),N&&tv({element:N,padding:i}),lv({arrowWidth:T,arrowHeight:_}),h&&ev({strategy:"referenceHidden",...Y})]}),[M,H]=Bi($),J=he(v);ve(()=>{z&&(J==null||J())},[z,J]);const q=(D=W.arrow)==null?void 0:D.x,U=(ae=W.arrow)==null?void 0:ae.y,X=((se=W.arrow)==null?void 0:se.centerOffset)!==0,[ue,me]=c.useState();return ve(()=>{y&&me(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:z?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(te=W.transformOrigin)==null?void 0:te.x,(oe=W.transformOrigin)==null?void 0:oe.y].join(" "),...((ie=W.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(av,{scope:n,placedSide:M,onArrowChange:E,arrowX:q,arrowY:U,shouldHideArrow:X,children:l.jsx(F.div,{"data-side":M,"data-align":H,...g,ref:C,style:{...g.style,animation:z?void 0:"none"}})})})});Li.displayName=xo;var $i="PopperArrow",iv={top:"bottom",right:"left",bottom:"top",left:"right"},Wi=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=sv($i,r),s=iv[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]: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:l.jsx(rv,{...o,ref:n,style:{...o.style,display:"block"}})})});Wi.displayName=$i;function cv(e){return e!==null}var lv=e=>({name:"transformOrigin",options:e,fn(t){var b,y,w;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,i=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[d,f]=Bi(n),p={start:"0%",center:"50%",end:"100%"}[f],h=(((y=o.arrow)==null?void 0:y.x)??0)+i/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let v="",g="";return d==="bottom"?(v=s?p:`${h}px`,g=`${-u}px`):d==="top"?(v=s?p:`${h}px`,g=`${r.floating.height+u}px`):d==="right"?(v=`${-u}px`,g=s?p:`${m}px`):d==="left"&&(v=`${r.floating.width+u}px`,g=s?p:`${m}px`),{data:{x:v,y:g}}}});function Bi(e){const[t,n="center"]=e.split("-");return[t,n]}var pn=Ii,gn=Fi,ir=Li,cr=Wi,Co="Popover",[Vi,YC]=be(Co,[vt]),hn=vt(),[uv,bt]=Vi(Co),Gi=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=hn(t),u=c.useRef(null),[d,f]=c.useState(!1),[p=!1,h]=Ne({prop:r,defaultProp:o,onChange:a});return l.jsx(pn,{...i,children:l.jsx(uv,{scope:t,contentId:Ee(),triggerRef:u,open:p,onOpenChange:h,onOpenToggle:c.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:d,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:s,children:n})})};Gi.displayName=Co;var zi="PopoverAnchor",Hi=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=bt(zi,n),a=hn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return c.useEffect(()=>(s(),()=>i()),[s,i]),l.jsx(gn,{...a,...r,ref:t})});Hi.displayName=zi;var Yi="PopoverTrigger",Ui=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=bt(Yi,n),a=hn(n),s=Q(t,o.triggerRef),i=l.jsx(F.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ji(o.open),...r,ref:s,onClick:k(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(gn,{asChild:!0,...a,children:i})});Ui.displayName=Yi;var No="PopoverPortal",[dv,fv]=Vi(No,{forceMount:void 0}),Ki=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=bt(No,t);return l.jsx(dv,{scope:t,forceMount:n,children:l.jsx(ye,{present:n||a.open,children:l.jsx(cn,{asChild:!0,container:o,children:r})})})};Ki.displayName=No;var Ht="PopoverContent",qi=c.forwardRef((e,t)=>{const n=fv(Ht,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=bt(Ht,e.__scopePopover);return l.jsx(ye,{present:r||a.open,children:a.modal?l.jsx(mv,{...o,ref:t}):l.jsx(pv,{...o,ref:t})})});qi.displayName=Ht;var mv=c.forwardRef((e,t)=>{const n=bt(Ht,e.__scopePopover),r=c.useRef(null),o=Q(t,r),a=c.useRef(!1);return c.useEffect(()=>{const s=r.current;if(s)return Un(s)},[]),l.jsx(ln,{as:He,allowPinchZoom:!0,children:l.jsx(Xi,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:k(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:k(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,d=i.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:k(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),pv=c.forwardRef((e,t)=>{const n=bt(Ht,e.__scopePopover),r=c.useRef(!1),o=c.useRef(!1);return l.jsx(Xi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Xi=c.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...p}=e,h=bt(Ht,n),m=hn(n);return $n(),l.jsx(sn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(Pt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:l.jsx(ir,{"data-state":Ji(h.open),role:"dialog",id:h.contentId,...m,...p,ref:t,style:{...p.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)"}})})})}),Qi="PopoverClose",gv=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=bt(Qi,n);return l.jsx(F.button,{type:"button",...r,ref:t,onClick:k(e.onClick,()=>o.onOpenChange(!1))})});gv.displayName=Qi;var hv="PopoverArrow",vv=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=hn(n);return l.jsx(cr,{...o,...r,ref:t})});vv.displayName=hv;function Ji(e){return e?"open":"closed"}var bv=Gi,yv=Hi,wv=Ui,xv=Ki,Zi=qi;const ec=bv,tc=wv,Cv=yv,Eo=c.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>l.jsx(xv,{children:l.jsx(Zi,{ref:o,align:t,sideOffset:n,className:R("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground 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 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})}));Eo.displayName=Zi.displayName;function Nv(e){const{value:t="",onChange:n,options:r,className:o,placeholder:a="Search...",emptyMessage:s="Nothing found"}=e,[i,u]=S.useState(t),[d,f]=S.useState(r),[p,h]=S.useState(-1),[m,v]=S.useState(!1),g=N=>{const E=N.target.value;u(E),n==null||n(E),h(-1),v(!0),E.trim()===""?f(r):f(r.filter(A=>A.label.toLowerCase().includes(E.toLowerCase())))},b=N=>{if(N.key==="ArrowDown")N.preventDefault(),h(E=>E<d.length-1?E+1:E);else if(N.key==="ArrowUp")N.preventDefault(),h(E=>E>0?E-1:-1);else if(N.key==="Enter"&&p>=0){const E=d[p];u(E.label),n==null||n(E.value),f([]),h(-1),v(!1)}else N.key==="Escape"&&(f([]),h(-1))},y=N=>{v(!1),u(N.label),n==null||n(N.value),f(r),h(-1)},w=()=>{v(!0)},C=()=>{v(!1)};return l.jsxs(ec,{open:m,children:[l.jsx(tc,{asChild:!0,children:l.jsx("div",{className:"relative w-full",children:l.jsx(On,{type:"text",placeholder:a,value:i,onChange:g,onKeyDown:b,onClick:w,onFocus:w,onBlur:C,className:R("pr-10",o),"aria-label":"Search field","aria-autocomplete":"list","aria-controls":"suggestions-list","aria-expanded":d.length>0,leftIcon:l.jsx(rh,{className:"w-4 h-4"})})})}),l.jsx(Eo,{className:"p-0 w-[var(--radix-popover-trigger-width)] max-h-96 overflow-y-auto",children:d.length>0?l.jsx("ul",{id:"suggestions-list",role:"listbox",children:d.map((N,E)=>l.jsx("li",{className:`px-4 py-2 cursor-pointer hover:bg-muted ${E===p?"bg-muted":""}`,onClick:()=>y(N),role:"option","aria-selected":E===p,children:N.label},N.value))}):l.jsx("span",{className:"px-4 py-2 block",children:s})})]})}var So="Avatar",[Ev,UC]=be(So),[Sv,nc]=Ev(So),rc=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=c.useState("idle");return l.jsx(Sv,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:l.jsx(F.span,{...r,ref:t})})});rc.displayName=So;var oc="AvatarImage",ac=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=nc(oc,n),i=Pv(r,a.referrerPolicy),u=he(d=>{o(d),s.onImageLoadingStatusChange(d)});return ve(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?l.jsx(F.img,{...a,ref:t,src:r}):null});ac.displayName=oc;var sc="AvatarFallback",ic=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=nc(sc,n),[s,i]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(u)}},[r]),s&&a.imageLoadingStatus!=="loaded"?l.jsx(F.span,{...o,ref:t}):null});ic.displayName=sc;function Pv(e,t){const[n,r]=c.useState("idle");return ve(()=>{if(!e){r("error");return}let o=!0;const a=new window.Image,s=i=>()=>{o&&r(i)};return r("loading"),a.onload=s("loaded"),a.onerror=s("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{o=!1}},[e,t]),n}var cc=rc,lc=ac,uc=ic;const dc=c.forwardRef(({className:e,...t},n)=>l.jsx(cc,{ref:n,className:R("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));dc.displayName=cc.displayName;const fc=c.forwardRef(({className:e,...t},n)=>l.jsx(lc,{ref:n,className:R("aspect-square h-full w-full",e),...t}));fc.displayName=lc.displayName;const mc=c.forwardRef(({className:e,...t},n)=>l.jsx(uc,{ref:n,className:R("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));mc.displayName=uc.displayName;const pc=It("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Mv({className:e,variant:t,...n}){return l.jsx("div",{className:R(pc({variant:t}),e),...n})}const gc=6048e5,Tv=864e5,hc=Symbol.for("constructDateFrom");function $e(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&hc in e?e[hc](t):e instanceof Date?new e.constructor(t):new Date(t)}function Me(e,t){return $e(t||e,e)}function vc(e,t,n){const r=Me(e,n==null?void 0:n.in);if(isNaN(t))return $e(e,NaN);if(!t)return r;const o=r.getDate(),a=$e(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let Rv={};function lr(){return Rv}function vn(e,t){var i,u,d,f;const n=lr(),r=(t==null?void 0:t.weekStartsOn)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,o=Me(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function ur(e,t){return vn(e,{...t,weekStartsOn:1})}function bc(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=$e(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=ur(o),s=$e(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=ur(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function yc(e){const t=Me(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Av(e,...t){const n=$e.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function wc(e,t){const n=Me(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function kv(e,t,n){const[r,o]=Av(n==null?void 0:n.in,e,t),a=wc(r),s=wc(o),i=+a-yc(a),u=+s-yc(s);return Math.round((i-u)/Tv)}function _v(e,t){const n=bc(e,t),r=$e(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ur(r)}function Dv(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function jv(e){return!(!Dv(e)&&typeof e!="number"||isNaN(+Me(e)))}function Iv(e,t){const n=Me(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Ov(e,t){const n=Me(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Fv={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"}},Lv=(e,t,n)=>{let r;const o=Fv[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Yt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const $v={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Wv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Bv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Vv={date:Yt({formats:$v,defaultWidth:"full"}),time:Yt({formats:Wv,defaultWidth:"full"}),dateTime:Yt({formats:Bv,defaultWidth:"full"})},Gv={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},zv=(e,t,n,r)=>Gv[e];function Qe(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Hv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Yv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Uv={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"]},Kv={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"]},qv={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"}},Xv={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"}},Qv={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Qe({values:Hv,defaultWidth:"wide"}),quarter:Qe({values:Yv,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qe({values:Uv,defaultWidth:"wide"}),day:Qe({values:Kv,defaultWidth:"wide"}),dayPeriod:Qe({values:qv,defaultWidth:"wide",formattingValues:Xv,defaultFormattingWidth:"wide"})};function Je(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(i)?Zv(i,p=>p.test(s)):Jv(i,p=>p.test(s));let d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(s.length);return{value:d,rest:f}}}function Jv(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Zv(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function xc(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const eb=/^(\d+)(th|st|nd|rd)?/i,tb=/\d+/i,nb={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},rb={any:[/^b/i,/^(a|c)/i]},ob={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ab={any:[/1/i,/2/i,/3/i,/4/i]},sb={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},ib={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]},cb={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},lb={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]},ub={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},db={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}},fb={ordinalNumber:xc({matchPattern:eb,parsePattern:tb,valueCallback:e=>parseInt(e,10)}),era:Je({matchPatterns:nb,defaultMatchWidth:"wide",parsePatterns:rb,defaultParseWidth:"any"}),quarter:Je({matchPatterns:ob,defaultMatchWidth:"wide",parsePatterns:ab,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Je({matchPatterns:sb,defaultMatchWidth:"wide",parsePatterns:ib,defaultParseWidth:"any"}),day:Je({matchPatterns:cb,defaultMatchWidth:"wide",parsePatterns:lb,defaultParseWidth:"any"}),dayPeriod:Je({matchPatterns:ub,defaultMatchWidth:"any",parsePatterns:db,defaultParseWidth:"any"})},Po={code:"en-US",formatDistance:Lv,formatLong:Vv,formatRelative:zv,localize:Qv,match:fb,options:{weekStartsOn:0,firstWeekContainsDate:1}};function mb(e,t){const n=Me(e,t==null?void 0:t.in);return kv(n,Ov(n))+1}function pb(e,t){const n=Me(e,t==null?void 0:t.in),r=+ur(n)-+_v(n);return Math.round(r/gc)+1}function Cc(e,t){var f,p,h,m;const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=lr(),a=(t==null?void 0:t.firstWeekContainsDate)??((p=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??o.firstWeekContainsDate??((m=(h=o.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,s=$e((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=vn(s,t),u=$e((t==null?void 0:t.in)||e,0);u.setFullYear(r,0,a),u.setHours(0,0,0,0);const d=vn(u,t);return+n>=+i?r+1:+n>=+d?r:r-1}function gb(e,t){var i,u,d,f;const n=lr(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,o=Cc(e,t),a=$e((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),vn(a,t)}function hb(e,t){const n=Me(e,t==null?void 0:t.in),r=+vn(n,t)-+gb(n,t);return Math.round(r/gc)+1}function ce(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const yt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ce(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ce(n+1,2)},d(e,t){return ce(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ce(e.getHours()%12||12,t.length)},H(e,t){return ce(e.getHours(),t.length)},m(e,t){return ce(e.getMinutes(),t.length)},s(e,t){return ce(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ce(o,t.length)}},Ut={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Nc={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return yt.y(e,t)},Y:function(e,t,n,r){const o=Cc(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return ce(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ce(a,t.length)},R:function(e,t){const n=bc(e);return ce(n,t.length)},u:function(e,t){const n=e.getFullYear();return ce(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ce(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ce(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return yt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ce(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=hb(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ce(o,t.length)},I:function(e,t,n){const r=pb(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ce(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):yt.d(e,t)},D:function(e,t,n){const r=mb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ce(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ce(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ce(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ce(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Ut.noon:r===0?o=Ut.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Ut.evening:r>=12?o=Ut.afternoon:r>=4?o=Ut.morning:o=Ut.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return yt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):yt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ce(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ce(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):yt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):yt.s(e,t)},S:function(e,t){return yt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Sc(r);case"XXXX":case"XX":return Rt(r);case"XXXXX":case"XXX":default:return Rt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Sc(r);case"xxxx":case"xx":return Rt(r);case"xxxxx":case"xxx":default:return Rt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ec(r,":");case"OOOO":default:return"GMT"+Rt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ec(r,":");case"zzzz":default:return"GMT"+Rt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ce(r,t.length)},T:function(e,t,n){return ce(+e,t.length)}};function Ec(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+ce(a,2)}function Sc(e,t){return e%60===0?(e>0?"-":"+")+ce(Math.abs(e)/60,2):Rt(e,t)}function Rt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ce(Math.trunc(r/60),2),a=ce(r%60,2);return n+o+t+a}const Pc=(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"})}},Mc=(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"})}},vb={p:Mc,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Pc(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Pc(r,t)).replace("{{time}}",Mc(o,t))}},bb=/^D+$/,yb=/^Y+$/,wb=["D","DD","YY","YYYY"];function xb(e){return bb.test(e)}function Cb(e){return yb.test(e)}function Nb(e,t,n){const r=Eb(e,t,n);if(console.warn(r),wb.includes(e))throw new RangeError(r)}function Eb(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Sb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Pb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mb=/^'([^]*?)'?$/,Tb=/''/g,Rb=/[a-zA-Z]/;function Mo(e,t,n){var f,p,h,m,v,g,b,y;const r=lr(),o=(n==null?void 0:n.locale)??r.locale??Po,a=(n==null?void 0:n.firstWeekContainsDate)??((p=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(h=r.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((g=(v=n==null?void 0:n.locale)==null?void 0:v.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((y=(b=r.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0,i=Me(e,n==null?void 0:n.in);if(!jv(i))throw new RangeError("Invalid time value");let u=t.match(Pb).map(w=>{const C=w[0];if(C==="p"||C==="P"){const N=vb[C];return N(w,o.formatLong)}return w}).join("").match(Sb).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const C=w[0];if(C==="'")return{isToken:!1,value:Ab(w)};if(Nc[C])return{isToken:!0,value:w};if(C.match(Rb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(u=o.localize.preprocessor(i,u));const d={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return u.map(w=>{if(!w.isToken)return w.value;const C=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Cb(C)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&xb(C))&&Nb(C,t,String(e));const N=Nc[C[0]];return N(i,C,o.localize,d)}).join("")}function Ab(e){const t=e.match(Mb);return t?t[1].replace(Tb,"'"):e}function kb(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=$e(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function _b(e,t,n){return vc(e,-t,n)}const Db={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},jb=(e,t,n)=>{let r;const o=Db[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"em "+r:"há "+r:r},Ib={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},Ob={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Fb={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Lb={date:Yt({formats:Ib,defaultWidth:"full"}),time:Yt({formats:Ob,defaultWidth:"full"}),dateTime:Yt({formats:Fb,defaultWidth:"full"})},$b={lastWeek:e=>{const t=e.getDay();return"'"+(t===0||t===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},Wb=(e,t,n,r)=>{const o=$b[e];return typeof o=="function"?o(t):o},Bb={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},Vb={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Gb={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},zb={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},Hb={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},Yb={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},Ub={ordinalNumber:(e,t)=>{const n=Number(e);return(t==null?void 0:t.unit)==="week"?n+"ª":n+"º"},era:Qe({values:Bb,defaultWidth:"wide"}),quarter:Qe({values:Vb,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qe({values:Gb,defaultWidth:"wide"}),day:Qe({values:zb,defaultWidth:"wide"}),dayPeriod:Qe({values:Hb,defaultWidth:"wide",formattingValues:Yb,defaultFormattingWidth:"wide"})},Kb=/^(\d+)[ºªo]?/i,qb=/\d+/i,Xb={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},Qb={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},Jb={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Zb={any:[/1/i,/2/i,/3/i,/4/i]},ey={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},ty={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,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},ny={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},ry={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},oy={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},ay={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},sy={ordinalNumber:xc({matchPattern:Kb,parsePattern:qb,valueCallback:e=>parseInt(e,10)}),era:Je({matchPatterns:Xb,defaultMatchWidth:"wide",parsePatterns:Qb,defaultParseWidth:"any"}),quarter:Je({matchPatterns:Jb,defaultMatchWidth:"wide",parsePatterns:Zb,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Je({matchPatterns:ey,defaultMatchWidth:"wide",parsePatterns:ty,defaultParseWidth:"any"}),day:Je({matchPatterns:ny,defaultMatchWidth:"wide",parsePatterns:ry,defaultParseWidth:"any"}),dayPeriod:Je({matchPatterns:oy,defaultMatchWidth:"any",parsePatterns:ay,defaultParseWidth:"any"})},iy={code:"pt-BR",formatDistance:jb,formatLong:Lb,formatRelative:Wb,localize:Ub,match:sy,options:{weekStartsOn:0,firstWeekContainsDate:1}},cy=({selectedDate:e,onChange:t,language:n="enUS"})=>{const[r,o]=S.useState(e||new Date),s={ptBR:iy,enUS:Po}[n],i=()=>{o(m=>_b(m,1))},u=()=>{o(m=>vc(m,1))},d=m=>{t&&t(m)},f=Array.from({length:kb(r)}).map((m,v)=>new Date(r.getFullYear(),r.getMonth(),v+1)),p=Iv(r).getDay(),h=Array.from({length:7}).map((m,v)=>Mo(new Date(2021,0,v+3),"EEEEEE",{locale:s}));return l.jsxs("div",{className:"max-w-sm mx-auto p-4 border rounded shadow",role:"application","aria-label":"Calendar",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:i,"aria-label":"Previous Month",children:l.jsx(so,{})}),l.jsx("h2",{className:"text-lg font-bold","aria-live":"polite",children:Mo(r,"MMMM yyyy",{locale:s})}),l.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:u,"aria-label":"Next Month",children:l.jsx(Xn,{})})]}),l.jsxs("div",{className:"grid grid-cols-7 gap-2",children:[h.map((m,v)=>l.jsx("div",{className:"text-center font-medium","aria-hidden":"true",children:m},v)),Array.from({length:p}).map((m,v)=>l.jsx("div",{className:"","aria-hidden":"true"},`empty-${v}`)),f.map(m=>l.jsx("button",{className:`p-2 rounded hover:bg-blue-100 ${e&&m.toDateString()===e.toDateString()&&"bg-blue-200"}`,onClick:()=>d(m),"aria-label":Mo(m,"MMMM do yyyy",{locale:s}),"aria-pressed":e&&m.toDateString()===e.toDateString()?"true":"false",children:m.getDate()},m.toISOString()))]})]})},Tc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Tc.displayName="Card";const Rc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("flex flex-col space-y-1.5 p-6",e),...t}));Rc.displayName="CardHeader";const Ac=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("font-semibold leading-none tracking-tight pb-4",e),...t}));Ac.displayName="CardTitle";const kc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("text-sm text-muted-foreground",e),...t}));kc.displayName="CardDescription";const _c=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("p-6 py-0",e),...t}));_c.displayName="CardContent";const Dc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("flex items-center p-6 pt-6",e),...t}));Dc.displayName="CardFooter";function bn(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var To="Checkbox",[ly,QC]=be(To),[uy,dy]=ly(To),jc=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:u="on",onCheckedChange:d,form:f,...p}=e,[h,m]=c.useState(null),v=Q(t,N=>m(N)),g=c.useRef(!1),b=h?f||!!h.closest("form"):!0,[y=!1,w]=Ne({prop:o,defaultProp:a,onChange:d}),C=c.useRef(y);return c.useEffect(()=>{const N=h==null?void 0:h.form;if(N){const E=()=>w(C.current);return N.addEventListener("reset",E),()=>N.removeEventListener("reset",E)}},[h,w]),l.jsxs(uy,{scope:n,state:y,disabled:i,children:[l.jsx(F.button,{type:"button",role:"checkbox","aria-checked":wt(y)?"mixed":y,"aria-required":s,"data-state":Fc(y),"data-disabled":i?"":void 0,disabled:i,value:u,...p,ref:v,onKeyDown:k(e.onKeyDown,N=>{N.key==="Enter"&&N.preventDefault()}),onClick:k(e.onClick,N=>{w(E=>wt(E)?!0:!E),b&&(g.current=N.isPropagationStopped(),g.current||N.stopPropagation())})}),b&&l.jsx(fy,{control:h,bubbles:!g.current,name:r,value:u,checked:y,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"},defaultChecked:wt(a)?!1:a})]})});jc.displayName=To;var Ic="CheckboxIndicator",Oc=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=dy(Ic,n);return l.jsx(ye,{present:r||wt(a.state)||a.state===!0,children:l.jsx(F.span,{"data-state":Fc(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Oc.displayName=Ic;var fy=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a}=e,s=c.useRef(null),i=bn(n),u=sr(t);c.useEffect(()=>{const f=s.current,p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(i!==n&&m){const v=new Event("click",{bubbles:r});f.indeterminate=wt(n),m.call(f,wt(n)?!1:n),f.dispatchEvent(v)}},[i,n,r]);const d=c.useRef(wt(n)?!1:n);return l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??d.current,...a,tabIndex:-1,ref:s,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function wt(e){return e==="indeterminate"}function Fc(e){return wt(e)?"indeterminate":e?"checked":"unchecked"}var Lc=jc,my=Oc;const $c=c.forwardRef(({className:e,...t},n)=>l.jsx(Lc,{ref:n,className:R("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsx(my,{className:R("flex items-center justify-center text-current"),children:l.jsx(oo,{className:"h-4 w-4"})})}));$c.displayName=Lc.displayName;const Wc=S.forwardRef((e,t)=>{const{currencySymbol:n="$",decimalSeparator:r=".",thousandSeparator:o=",",onValueChange:a,className:s,value:i=0,...u}=e,d=S.useRef(null);S.useImperativeHandle(t,()=>d.current);const[f,p]=S.useState(""),h=g=>{const b=g.toFixed(2).split("."),y=b[0].replace(/\B(?=(\d{3})+(?!\d))/g,o);return`${n} ${y}${r}${b[1]}`},m=g=>{const b=g.target.value,y=parseFloat(b.replace(/\D/g,""))/100;p(h(y)),a(y),d.current&&window.requestAnimationFrame(()=>{var w;(w=d.current)==null||w.setSelectionRange(d.current.value.length,d.current.value.length)})},v=()=>{d.current&&d.current.setSelectionRange(d.current.value.length,d.current.value.length)};return S.useEffect(()=>{p(h(+i))},[i]),l.jsx(On,{type:"text",inputMode:"numeric",value:f,ref:d,onChange:m,onFocus:v,onClick:v,placeholder:`${n} 0${r}00`,className:s,...u})});Wc.displayName="CurrencyInput";const Ro=Os,Bc=Fs,Vc=Ls,py=qn,Ao=c.forwardRef(({className:e,...t},n)=>l.jsx(Zr,{ref:n,className:R("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ao.displayName=Zr.displayName;const dr=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Vc,{children:[l.jsx(Ao,{}),l.jsxs(eo,{ref:r,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border","bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","sm:rounded-lg max-h-[100dvh] overflow-y-auto",e),...n,children:[t,l.jsxs(qn,{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-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(oh,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));dr.displayName=eo.displayName;const fr=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});fr.displayName="DialogHeader";const Gc=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Gc.displayName="DialogFooter";const mr=c.forwardRef(({className:e,...t},n)=>l.jsx(to,{ref:n,className:R("text-lg font-semibold leading-none tracking-tight",e),...t}));mr.displayName=to.displayName;const pr=c.forwardRef(({className:e,...t},n)=>l.jsx(no,{ref:n,className:R("text-sm text-muted-foreground",e),...t}));pr.displayName=no.displayName;function yn(e){const t=e+"CollectionProvider",[n,r]=be(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:g}=m,b=S.useRef(null),y=S.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:y,collectionRef:b,children:g})};s.displayName=t;const i=e+"CollectionSlot",u=S.forwardRef((m,v)=>{const{scope:g,children:b}=m,y=a(i,g),w=Q(v,y.collectionRef);return l.jsx(He,{ref:w,children:b})});u.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=S.forwardRef((m,v)=>{const{scope:g,children:b,...y}=m,w=S.useRef(null),C=Q(v,w),N=a(d,g);return S.useEffect(()=>(N.itemMap.set(w,{ref:w,...y}),()=>void N.itemMap.delete(w))),l.jsx(He,{[f]:"",ref:C,children:b})});p.displayName=d;function h(m){const v=a(e+"CollectionConsumer",m);return S.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((N,E)=>y.indexOf(N.ref.current)-y.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},h,r]}var gy=c.createContext(void 0);function At(e){const t=c.useContext(gy);return e||t||"ltr"}var ko="rovingFocusGroup.onEntryFocus",hy={bubbles:!1,cancelable:!0},gr="RovingFocusGroup",[_o,zc,vy]=yn(gr),[by,xt]=be(gr,[vy]),[yy,wy]=by(gr),Hc=c.forwardRef((e,t)=>l.jsx(_o.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(_o.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(xy,{...e,ref:t})})}));Hc.displayName=gr;var xy=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,h=c.useRef(null),m=Q(t,h),v=At(a),[g=null,b]=Ne({prop:s,defaultProp:i,onChange:u}),[y,w]=c.useState(!1),C=he(d),N=zc(n),E=c.useRef(!1),[A,T]=c.useState(0);return c.useEffect(()=>{const _=h.current;if(_)return _.addEventListener(ko,C),()=>_.removeEventListener(ko,C)},[C]),l.jsx(yy,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(_=>b(_),[b]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>T(_=>_+1),[]),onFocusableItemRemove:c.useCallback(()=>T(_=>_-1),[]),children:l.jsx(F.div,{tabIndex:y||A===0?-1:0,"data-orientation":r,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:k(e.onMouseDown,()=>{E.current=!0}),onFocus:k(e.onFocus,_=>{const j=!E.current;if(_.target===_.currentTarget&&j&&!y){const B=new CustomEvent(ko,hy);if(_.currentTarget.dispatchEvent(B),!B.defaultPrevented){const G=N().filter($=>$.focusable),O=G.find($=>$.active),Y=G.find($=>$.id===g),re=[O,Y,...G].filter(Boolean).map($=>$.ref.current);Kc(re,f)}}E.current=!1}),onBlur:k(e.onBlur,()=>w(!1))})})}),Yc="RovingFocusGroupItem",Uc=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...s}=e,i=Ee(),u=a||i,d=wy(Yc,n),f=d.currentTabStopId===u,p=zc(n),{onFocusableItemAdd:h,onFocusableItemRemove:m}=d;return c.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),l.jsx(_o.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:l.jsx(F.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:k(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:k(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:k(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const g=Ey(v,d.orientation,d.dir);if(g!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let y=p().filter(w=>w.focusable).map(w=>w.ref.current);if(g==="last")y.reverse();else if(g==="prev"||g==="next"){g==="prev"&&y.reverse();const w=y.indexOf(v.currentTarget);y=d.loop?Sy(y,w+1):y.slice(w+1)}setTimeout(()=>Kc(y))}})})})});Uc.displayName=Yc;var Cy={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ny(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ey(e,t,n){const r=Ny(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Cy[r]}function Kc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Sy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var hr=Hc,vr=Uc,Do=["Enter"," "],Py=["ArrowDown","PageUp","Home"],qc=["ArrowUp","PageDown","End"],My=[...Py,...qc],Ty={ltr:[...Do,"ArrowRight"],rtl:[...Do,"ArrowLeft"]},Ry={ltr:["ArrowLeft"],rtl:["ArrowRight"]},wn="Menu",[xn,Ay,ky]=yn(wn),[kt,Xc]=be(wn,[ky,vt,xt]),Cn=vt(),Qc=xt(),[Jc,Ct]=kt(wn),[_y,Nn]=kt(wn),Zc=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=Cn(t),[u,d]=c.useState(null),f=c.useRef(!1),p=he(a),h=At(o);return c.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),l.jsx(pn,{...i,children:l.jsx(Jc,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:l.jsx(_y,{scope:t,onClose:c.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:h,modal:s,children:r})})})};Zc.displayName=wn;var Dy="MenuAnchor",jo=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Cn(n);return l.jsx(gn,{...o,...r,ref:t})});jo.displayName=Dy;var Io="MenuPortal",[jy,el]=kt(Io,{forceMount:void 0}),tl=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Ct(Io,t);return l.jsx(jy,{scope:t,forceMount:n,children:l.jsx(ye,{present:n||a.open,children:l.jsx(cn,{asChild:!0,container:o,children:r})})})};tl.displayName=Io;var De="MenuContent",[Iy,Oo]=kt(De),nl=c.forwardRef((e,t)=>{const n=el(De,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Ct(De,e.__scopeMenu),s=Nn(De,e.__scopeMenu);return l.jsx(xn.Provider,{scope:e.__scopeMenu,children:l.jsx(ye,{present:r||a.open,children:l.jsx(xn.Slot,{scope:e.__scopeMenu,children:s.modal?l.jsx(Oy,{...o,ref:t}):l.jsx(Fy,{...o,ref:t})})})})}),Oy=c.forwardRef((e,t)=>{const n=Ct(De,e.__scopeMenu),r=c.useRef(null),o=Q(t,r);return c.useEffect(()=>{const a=r.current;if(a)return Un(a)},[]),l.jsx(Fo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:k(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Fy=c.forwardRef((e,t)=>{const n=Ct(De,e.__scopeMenu);return l.jsx(Fo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Fo=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:m,disableOutsideScroll:v,...g}=e,b=Ct(De,n),y=Nn(De,n),w=Cn(n),C=Qc(n),N=Ay(n),[E,A]=c.useState(null),T=c.useRef(null),_=Q(t,T,b.onContentChange),j=c.useRef(0),B=c.useRef(""),G=c.useRef(0),O=c.useRef(null),Y=c.useRef("right"),V=c.useRef(0),re=v?ln:c.Fragment,$=v?{as:He,allowPinchZoom:!0}:void 0,z=M=>{var D,ae;const H=B.current+M,J=N().filter(se=>!se.disabled),q=document.activeElement,U=(D=J.find(se=>se.ref.current===q))==null?void 0:D.textValue,X=J.map(se=>se.textValue),ue=qy(X,H,U),me=(ae=J.find(se=>se.textValue===ue))==null?void 0:ae.ref.current;(function se(te){B.current=te,window.clearTimeout(j.current),te!==""&&(j.current=window.setTimeout(()=>se(""),1e3))})(H),me&&setTimeout(()=>me.focus())};c.useEffect(()=>()=>window.clearTimeout(j.current),[]),$n();const W=c.useCallback(M=>{var J,q;return Y.current===((J=O.current)==null?void 0:J.side)&&Qy(M,(q=O.current)==null?void 0:q.area)},[]);return l.jsx(Iy,{scope:n,searchRef:B,onItemEnter:c.useCallback(M=>{W(M)&&M.preventDefault()},[W]),onItemLeave:c.useCallback(M=>{var H;W(M)||((H=T.current)==null||H.focus(),A(null))},[W]),onTriggerLeave:c.useCallback(M=>{W(M)&&M.preventDefault()},[W]),pointerGraceTimerRef:G,onPointerGraceIntentChange:c.useCallback(M=>{O.current=M},[]),children:l.jsx(re,{...$,children:l.jsx(sn,{asChild:!0,trapped:o,onMountAutoFocus:k(a,M=>{var H;M.preventDefault(),(H=T.current)==null||H.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:l.jsx(Pt,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:m,children:l.jsx(hr,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:A,onEntryFocus:k(u,M=>{y.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(ir,{role:"menu","aria-orientation":"vertical","data-state":wl(b.open),"data-radix-menu-content":"",dir:y.dir,...w,...g,ref:_,style:{outline:"none",...g.style},onKeyDown:k(g.onKeyDown,M=>{const J=M.target.closest("[data-radix-menu-content]")===M.currentTarget,q=M.ctrlKey||M.altKey||M.metaKey,U=M.key.length===1;J&&(M.key==="Tab"&&M.preventDefault(),!q&&U&&z(M.key));const X=T.current;if(M.target!==X||!My.includes(M.key))return;M.preventDefault();const me=N().filter(D=>!D.disabled).map(D=>D.ref.current);qc.includes(M.key)&&me.reverse(),Uy(me)}),onBlur:k(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(j.current),B.current="")}),onPointerMove:k(e.onPointerMove,Sn(M=>{const H=M.target,J=V.current!==M.clientX;if(M.currentTarget.contains(H)&&J){const q=M.clientX>V.current?"right":"left";Y.current=q,V.current=M.clientX}}))})})})})})})});nl.displayName=De;var Ly="MenuGroup",Lo=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(F.div,{role:"group",...r,ref:t})});Lo.displayName=Ly;var $y="MenuLabel",rl=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(F.div,{...r,ref:t})});rl.displayName=$y;var br="MenuItem",ol="menu.itemSelect",yr=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=c.useRef(null),s=Nn(br,e.__scopeMenu),i=Oo(br,e.__scopeMenu),u=Q(t,a),d=c.useRef(!1),f=()=>{const p=a.current;if(!n&&p){const h=new CustomEvent(ol,{bubbles:!0,cancelable:!0});p.addEventListener(ol,m=>r==null?void 0:r(m),{once:!0}),Fn(p,h),h.defaultPrevented?d.current=!1:s.onClose()}};return l.jsx(al,{...o,ref:u,disabled:n,onClick:k(e.onClick,f),onPointerDown:p=>{var h;(h=e.onPointerDown)==null||h.call(e,p),d.current=!0},onPointerUp:k(e.onPointerUp,p=>{var h;d.current||(h=p.currentTarget)==null||h.click()}),onKeyDown:k(e.onKeyDown,p=>{const h=i.searchRef.current!=="";n||h&&p.key===" "||Do.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});yr.displayName=br;var al=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=Oo(br,n),i=Qc(n),u=c.useRef(null),d=Q(t,u),[f,p]=c.useState(!1),[h,m]=c.useState("");return c.useEffect(()=>{const v=u.current;v&&m((v.textContent??"").trim())},[a.children]),l.jsx(xn.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:l.jsx(vr,{asChild:!0,...i,focusable:!r,children:l.jsx(F.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:k(e.onPointerMove,Sn(v=>{r?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:k(e.onPointerLeave,Sn(v=>s.onItemLeave(v))),onFocus:k(e.onFocus,()=>p(!0)),onBlur:k(e.onBlur,()=>p(!1))})})})}),Wy="MenuCheckboxItem",sl=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return l.jsx(dl,{scope:e.__scopeMenu,checked:n,children:l.jsx(yr,{role:"menuitemcheckbox","aria-checked":wr(n)?"mixed":n,...o,ref:t,"data-state":Bo(n),onSelect:k(o.onSelect,()=>r==null?void 0:r(wr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});sl.displayName=Wy;var il="MenuRadioGroup",[By,Vy]=kt(il,{value:void 0,onValueChange:()=>{}}),cl=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=he(r);return l.jsx(By,{scope:e.__scopeMenu,value:n,onValueChange:a,children:l.jsx(Lo,{...o,ref:t})})});cl.displayName=il;var ll="MenuRadioItem",ul=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=Vy(ll,e.__scopeMenu),a=n===o.value;return l.jsx(dl,{scope:e.__scopeMenu,checked:a,children:l.jsx(yr,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Bo(a),onSelect:k(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});ul.displayName=ll;var $o="MenuItemIndicator",[dl,Gy]=kt($o,{checked:!1}),fl=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=Gy($o,n);return l.jsx(ye,{present:r||wr(a.checked)||a.checked===!0,children:l.jsx(F.span,{...o,ref:t,"data-state":Bo(a.checked)})})});fl.displayName=$o;var zy="MenuSeparator",ml=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(F.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});ml.displayName=zy;var Hy="MenuArrow",pl=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Cn(n);return l.jsx(cr,{...o,...r,ref:t})});pl.displayName=Hy;var Wo="MenuSub",[Yy,gl]=kt(Wo),hl=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Ct(Wo,t),s=Cn(t),[i,u]=c.useState(null),[d,f]=c.useState(null),p=he(o);return c.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),l.jsx(pn,{...s,children:l.jsx(Jc,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f,children:l.jsx(Yy,{scope:t,contentId:Ee(),triggerId:Ee(),trigger:i,onTriggerChange:u,children:n})})})};hl.displayName=Wo;var En="MenuSubTrigger",vl=c.forwardRef((e,t)=>{const n=Ct(En,e.__scopeMenu),r=Nn(En,e.__scopeMenu),o=gl(En,e.__scopeMenu),a=Oo(En,e.__scopeMenu),s=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const p=i.current;return()=>{window.clearTimeout(p),u(null)}},[i,u]),l.jsx(jo,{asChild:!0,...d,children:l.jsx(al,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":wl(n.open),...e,ref:an(t,o.onTriggerChange),onClick:p=>{var h;(h=e.onClick)==null||h.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:k(e.onPointerMove,Sn(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:k(e.onPointerLeave,Sn(p=>{var m,v;f();const h=(m=n.content)==null?void 0:m.getBoundingClientRect();if(h){const g=(v=n.content)==null?void 0:v.dataset.side,b=g==="right",y=b?-5:5,w=h[b?"left":"right"],C=h[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+y,y:p.clientY},{x:w,y:h.top},{x:C,y:h.top},{x:C,y:h.bottom},{x:w,y:h.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:k(e.onKeyDown,p=>{var m;const h=a.searchRef.current!=="";e.disabled||h&&p.key===" "||Ty[r.dir].includes(p.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),p.preventDefault())})})})});vl.displayName=En;var bl="MenuSubContent",yl=c.forwardRef((e,t)=>{const n=el(De,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Ct(De,e.__scopeMenu),s=Nn(De,e.__scopeMenu),i=gl(bl,e.__scopeMenu),u=c.useRef(null),d=Q(t,u);return l.jsx(xn.Provider,{scope:e.__scopeMenu,children:l.jsx(ye,{present:r||a.open,children:l.jsx(xn.Slot,{scope:e.__scopeMenu,children:l.jsx(Fo,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;s.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:k(e.onFocusOutside,f=>{f.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:k(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:k(e.onKeyDown,f=>{var m;const p=f.currentTarget.contains(f.target),h=Ry[s.dir].includes(f.key);p&&h&&(a.onOpenChange(!1),(m=i.trigger)==null||m.focus(),f.preventDefault())})})})})})});yl.displayName=bl;function wl(e){return e?"open":"closed"}function wr(e){return e==="indeterminate"}function Bo(e){return wr(e)?"indeterminate":e?"checked":"unchecked"}function Uy(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ky(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function qy(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Ky(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const u=s.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Xy(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,u=t[a].y,d=t[s].x,f=t[s].y;u>r!=f>r&&n<(d-i)*(r-u)/(f-u)+i&&(o=!o)}return o}function Qy(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Xy(n,t)}function Sn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Jy=Zc,Zy=jo,ew=tl,tw=nl,nw=Lo,rw=rl,ow=yr,aw=sl,sw=cl,iw=ul,cw=fl,lw=ml,uw=pl,dw=hl,fw=vl,mw=yl,Vo="DropdownMenu",[pw,JC]=be(Vo,[Xc]),Se=Xc(),[gw,xl]=pw(Vo),Cl=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,u=Se(t),d=c.useRef(null),[f=!1,p]=Ne({prop:o,defaultProp:a,onChange:s});return l.jsx(gw,{scope:t,triggerId:Ee(),triggerRef:d,contentId:Ee(),open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(h=>!h),[p]),modal:i,children:l.jsx(Jy,{...u,open:f,onOpenChange:p,dir:r,modal:i,children:n})})};Cl.displayName=Vo;var Nl="DropdownMenuTrigger",El=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=xl(Nl,n),s=Se(n);return l.jsx(Zy,{asChild:!0,...s,children:l.jsx(F.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:an(t,a.triggerRef),onPointerDown:k(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:k(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});El.displayName=Nl;var hw="DropdownMenuPortal",Sl=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Se(t);return l.jsx(ew,{...r,...n})};Sl.displayName=hw;var Pl="DropdownMenuContent",Ml=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xl(Pl,n),a=Se(n),s=c.useRef(!1);return l.jsx(tw,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:k(e.onCloseAutoFocus,i=>{var u;s.current||(u=o.triggerRef.current)==null||u.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:k(e.onInteractOutside,i=>{const u=i.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!o.modal||f)&&(s.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)"}})});Ml.displayName=Pl;var vw="DropdownMenuGroup",Tl=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return l.jsx(nw,{...o,...r,ref:t})});Tl.displayName=vw;var bw="DropdownMenuLabel",Rl=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return l.jsx(rw,{...o,...r,ref:t})});Rl.displayName=bw;var yw="DropdownMenuItem",Al=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return l.jsx(ow,{...o,...r,ref:t})});Al.displayName=yw;var ww="DropdownMenuCheckboxItem",kl=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return l.jsx(aw,{...o,...r,ref:t})});kl.displayName=ww;var xw="DropdownMenuRadioGroup",_l=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return l.jsx(sw,{...o,...r,ref:t})});_l.displayName=xw;var Cw="DropdownMenuRadioItem",Dl=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return l.jsx(iw,{...o,...r,ref:t})});Dl.displayName=Cw;var Nw="DropdownMenuItemIndicator",jl=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return l.jsx(cw,{...o,...r,ref:t})});jl.displayName=Nw;var Ew="DropdownMenuSeparator",Il=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return l.jsx(lw,{...o,...r,ref:t})});Il.displayName=Ew;var Sw="DropdownMenuArrow",Pw=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return l.jsx(uw,{...o,...r,ref:t})});Pw.displayName=Sw;var Mw=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Se(t),[i=!1,u]=Ne({prop:r,defaultProp:a,onChange:o});return l.jsx(dw,{...s,open:i,onOpenChange:u,children:n})},Tw="DropdownMenuSubTrigger",Ol=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return l.jsx(fw,{...o,...r,ref:t})});Ol.displayName=Tw;var Rw="DropdownMenuSubContent",Fl=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return l.jsx(mw,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Fl.displayName=Rw;var Aw=Cl,kw=El,Ll=Sl,$l=Ml,_w=Tl,Wl=Rl,Bl=Al,Vl=kl,Dw=_l,Gl=Dl,zl=jl,Hl=Il,jw=Mw,Yl=Ol,Ul=Fl;const Iw=Aw,Ow=kw,Fw=_w,Lw=Ll,$w=jw,Ww=Dw,Kl=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>l.jsxs(Yl,{ref:o,className:R("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,l.jsx(Xn,{className:"ml-auto"})]}));Kl.displayName=Yl.displayName;const ql=c.forwardRef(({className:e,...t},n)=>l.jsx(Ul,{ref:n,className:R("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}));ql.displayName=Ul.displayName;const Xl=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(Ll,{children:l.jsx($l,{ref:r,sideOffset:t,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Xl.displayName=$l.displayName;const Ql=c.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(Bl,{ref:r,className:R("relative flex cursor-default select-none items-center gap-2 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 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Ql.displayName=Bl.displayName;const Jl=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>l.jsxs(Vl,{ref:o,className:R("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:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(zl,{children:l.jsx(oo,{className:"h-4 w-4"})})}),t]}));Jl.displayName=Vl.displayName;const Zl=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Gl,{ref:r,className:R("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),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(zl,{children:l.jsx(pi,{className:"h-2 w-2 fill-current"})})}),t]}));Zl.displayName=Gl.displayName;const eu=c.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(Wl,{ref:r,className:R("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));eu.displayName=Wl.displayName;const tu=c.forwardRef(({className:e,...t},n)=>l.jsx(Hl,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));tu.displayName=Hl.displayName;const nu=({className:e,...t})=>l.jsx("span",{className:R("ml-auto text-xs tracking-widest opacity-60",e),...t});nu.displayName="DropdownMenuShortcut";var Bw=e=>e.type==="checkbox",Vw=e=>e instanceof Date,ru=e=>e==null;const Gw=e=>typeof e=="object";var Kt=e=>!ru(e)&&!Array.isArray(e)&&Gw(e)&&!Vw(e),zw=e=>Kt(e)&&e.target?Bw(e.target)?e.target.checked:e.target.value:e,Hw=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Yw=(e,t)=>e.has(Hw(t)),Uw=e=>{const t=e.constructor&&e.constructor.prototype;return Kt(t)&&t.hasOwnProperty("isPrototypeOf")},Kw=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Go(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Kw&&(e instanceof Blob||r))&&(n||Kt(e)))if(t=n?[]:{},!n&&!Uw(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Go(e[o]));else return e;return t}var ou=e=>Array.isArray(e)?e.filter(Boolean):[],zo=e=>e===void 0,Te=(e,t,n)=>{if(!t||!Kt(e))return n;const r=ou(t.split(/[,[\].]+?/)).reduce((o,a)=>ru(o)?o:o[a],e);return zo(r)||r===e?zo(e[t])?n:e[t]:r},au=e=>typeof e=="boolean",qw=e=>/^\w*$/.test(e),Xw=e=>ou(e.replace(/["|']|\]/g,"").split(/\.|\[/)),su=(e,t,n)=>{let r=-1;const o=qw(t)?[t]:Xw(t),a=o.length,s=a-1;for(;++r<a;){const i=o[r];let u=n;if(r!==s){const d=e[i];u=Kt(d)||Array.isArray(d)?d:isNaN(+o[r+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=u,e=e[i]}return e};const iu={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},cu={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},lu=S.createContext(null),xr=()=>S.useContext(lu),Qw=e=>{const{children:t,...n}=e;return S.createElement(lu.Provider,{value:n},t)};var Jw=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const s=a;return t._proxyFormState[s]!==cu.all&&(t._proxyFormState[s]=!r||cu.all),n&&(n[s]=!0),e[s]}});return o},Zw=e=>Kt(e)&&!Object.keys(e).length,ex=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return Zw(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===!r)},tx=e=>Array.isArray(e)?e:[e],uu=(e,t,n)=>!e||!t||e===t||tx(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function du(e){const t=S.useRef(e);t.current=e,S.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function nx(e){const t=xr(),{control:n=t.control,disabled:r,name:o,exact:a}=e,[s,i]=S.useState(n._formState),u=S.useRef(!0),d=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=S.useRef(o);return f.current=o,du({disabled:r,next:p=>u.current&&uu(f.current,p.name,a)&&ex(p,d.current,n._updateFormState)&&i({...n._formState,...p}),subject:n._subjects.state}),S.useEffect(()=>(u.current=!0,d.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),S.useMemo(()=>Jw(s,n,d.current,!1),[s,n])}var rx=e=>typeof e=="string",ox=(e,t,n,r,o)=>rx(e)?Te(n,e,o):Array.isArray(e)?e.map(a=>Te(n,a)):n;function ax(e){const t=xr(),{control:n=t.control,name:r,defaultValue:o,disabled:a,exact:s}=e,i=S.useRef(r);i.current=r,du({disabled:a,subject:n._subjects.values,next:f=>{uu(i.current,f.name,s)&&d(Go(ox(i.current,n._names,f.values||n._formValues,!1,o)))}});const[u,d]=S.useState(n._getWatch(r,o));return S.useEffect(()=>n._removeUnmounted()),u}function sx(e){const t=xr(),{name:n,disabled:r,control:o=t.control,shouldUnregister:a}=e,s=Yw(o._names.array,n),i=ax({control:o,name:n,defaultValue:Te(o._formValues,n,Te(o._defaultValues,n,e.defaultValue)),exact:!0}),u=nx({control:o,name:n,exact:!0}),d=S.useRef(o.register(n,{...e.rules,value:i,...au(e.disabled)?{disabled:e.disabled}:{}})),f=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Te(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Te(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Te(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Te(u.validatingFields,n)},error:{enumerable:!0,get:()=>Te(u.errors,n)}}),[u,n]),p=S.useMemo(()=>({name:n,value:i,...au(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:h=>d.current.onChange({target:{value:zw(h),name:n},type:iu.CHANGE}),onBlur:()=>d.current.onBlur({target:{value:Te(o._formValues,n),name:n},type:iu.BLUR}),ref:h=>{const m=Te(o._fields,n);m&&h&&(m._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:v=>h.setCustomValidity(v),reportValidity:()=>h.reportValidity()})}}),[n,o._formValues,r,u.disabled,i,o._fields]);return S.useEffect(()=>{const h=o._options.shouldUnregister||a,m=(v,g)=>{const b=Te(o._fields,v);b&&b._f&&(b._f.mount=g)};if(m(n,!0),h){const v=Go(Te(o._options.defaultValues,n));su(o._defaultValues,n,v),zo(Te(o._formValues,n))&&su(o._formValues,n,v)}return!s&&o.register(n),()=>{(s?h&&!o._state.action:h)?o.unregister(n):m(n,!1)}},[n,o,s,a]),S.useEffect(()=>{o._updateDisabledField({disabled:r,fields:o._fields,name:n})},[r,n,o]),S.useMemo(()=>({field:p,formState:u,fieldState:f}),[p,u,f])}const ix=e=>e.render(sx(e));var cx="Label",fu=c.forwardRef((e,t)=>l.jsx(F.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));fu.displayName=cx;var mu=fu;const lx=It("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ho=c.forwardRef(({className:e,...t},n)=>l.jsx(mu,{ref:n,className:R(lx(),e),...t}));Ho.displayName=mu.displayName;const ux=Qw,pu=c.createContext({}),dx=({...e})=>l.jsx(pu.Provider,{value:{name:e.name},children:l.jsx(ix,{...e})}),Pn=()=>{const e=c.useContext(pu),t=c.useContext(gu),{getFieldState:n,formState:r}=xr(),o=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...o}},gu=c.createContext({}),hu=c.forwardRef(({className:e,...t},n)=>{const r=c.useId();return l.jsx(gu.Provider,{value:{id:r},children:l.jsx("div",{ref:n,className:R("space-y-2",e),...t})})});hu.displayName="FormItem";const vu=c.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:o}=Pn();return l.jsx(Ho,{ref:n,className:R(r&&"text-destructive",e),htmlFor:o,...t})});vu.displayName="FormLabel";const bu=c.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=Pn();return l.jsx(He,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})});bu.displayName="FormControl";const yu=c.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Pn();return l.jsx("p",{ref:n,id:r,className:R("text-[0.8rem] text-muted-foreground",e),...t})});yu.displayName="FormDescription";const wu=c.forwardRef(({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=Pn(),s=o?String(o==null?void 0:o.message):t;return s?l.jsx("p",{ref:r,id:a,className:R("text-[0.8rem] font-medium text-destructive",e),...n,children:s}):null});wu.displayName="FormMessage";var fx="VisuallyHidden",Yo=c.forwardRef((e,t)=>l.jsx(F.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Yo.displayName=fx;var xu=Yo,qt="NavigationMenu",[Uo,Cu,mx]=yn(qt),[Ko,px,gx]=yn(qt),[qo,ZC]=be(qt,[mx,gx]),[hx,je]=qo(qt),[vx,bx]=qo(qt),Nu=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:s=200,skipDelayDuration:i=300,orientation:u="horizontal",dir:d,...f}=e,[p,h]=c.useState(null),m=Q(t,j=>h(j)),v=At(d),g=c.useRef(0),b=c.useRef(0),y=c.useRef(0),[w,C]=c.useState(!0),[N="",E]=Ne({prop:r,onChange:j=>{const B=j!=="",G=i>0;B?(window.clearTimeout(y.current),G&&C(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>C(!0),i)),o==null||o(j)},defaultProp:a}),A=c.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>E(""),150)},[E]),T=c.useCallback(j=>{window.clearTimeout(b.current),E(j)},[E]),_=c.useCallback(j=>{N===j?window.clearTimeout(b.current):g.current=window.setTimeout(()=>{window.clearTimeout(b.current),E(j)},s)},[N,E,s]);return c.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(b.current),window.clearTimeout(y.current)},[]),l.jsx(Su,{scope:n,isRootMenu:!0,value:N,dir:v,orientation:u,rootNavigationMenu:p,onTriggerEnter:j=>{window.clearTimeout(g.current),w?_(j):T(j)},onTriggerLeave:()=>{window.clearTimeout(g.current),A()},onContentEnter:()=>window.clearTimeout(b.current),onContentLeave:A,onItemSelect:j=>{E(B=>B===j?"":j)},onItemDismiss:()=>E(""),children:l.jsx(F.nav,{"aria-label":"Main","data-orientation":u,dir:v,...f,ref:m})})});Nu.displayName=qt;var Eu="NavigationMenuSub",yx=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",...i}=e,u=je(Eu,n),[d="",f]=Ne({prop:r,onChange:o,defaultProp:a});return l.jsx(Su,{scope:n,isRootMenu:!1,value:d,dir:u.dir,orientation:s,rootNavigationMenu:u.rootNavigationMenu,onTriggerEnter:p=>f(p),onItemSelect:p=>f(p),onItemDismiss:()=>f(""),children:l.jsx(F.div,{"data-orientation":s,...i,ref:t})})});yx.displayName=Eu;var Su=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:s,value:i,onItemSelect:u,onItemDismiss:d,onTriggerEnter:f,onTriggerLeave:p,onContentEnter:h,onContentLeave:m}=e,[v,g]=c.useState(null),[b,y]=c.useState(new Map),[w,C]=c.useState(null);return l.jsx(hx,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:i,previousValue:bn(i),baseId:Ee(),dir:o,orientation:a,viewport:v,onViewportChange:g,indicatorTrack:w,onIndicatorTrackChange:C,onTriggerEnter:he(f),onTriggerLeave:he(p),onContentEnter:he(h),onContentLeave:he(m),onItemSelect:he(u),onItemDismiss:he(d),onViewportContentChange:c.useCallback((N,E)=>{y(A=>(A.set(N,E),new Map(A)))},[]),onViewportContentRemove:c.useCallback(N=>{y(E=>E.has(N)?(E.delete(N),new Map(E)):E)},[]),children:l.jsx(Uo.Provider,{scope:t,children:l.jsx(vx,{scope:t,items:b,children:s})})})},Pu="NavigationMenuList",Mu=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=je(Pu,n),a=l.jsx(F.ul,{"data-orientation":o.orientation,...r,ref:t});return l.jsx(F.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:l.jsx(Uo.Slot,{scope:n,children:o.isRootMenu?l.jsx(Lu,{asChild:!0,children:a}):a})})});Mu.displayName=Pu;var Tu="NavigationMenuItem",[wx,Ru]=qo(Tu),Au=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=Ee(),s=r||a||"LEGACY_REACT_AUTO_VALUE",i=c.useRef(null),u=c.useRef(null),d=c.useRef(null),f=c.useRef(()=>{}),p=c.useRef(!1),h=c.useCallback((v="start")=>{if(i.current){f.current();const g=Zo(i.current);g.length&&ea(v==="start"?g:g.reverse())}},[]),m=c.useCallback(()=>{if(i.current){const v=Zo(i.current);v.length&&(f.current=Mx(v))}},[]);return l.jsx(wx,{scope:n,value:s,triggerRef:u,contentRef:i,focusProxyRef:d,wasEscapeCloseRef:p,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:m,onContentFocusOutside:m,children:l.jsx(F.li,{...o,ref:t})})});Au.displayName=Tu;var Xo="NavigationMenuTrigger",ku=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=je(Xo,e.__scopeNavigationMenu),s=Ru(Xo,e.__scopeNavigationMenu),i=c.useRef(null),u=Q(i,s.triggerRef,t),d=Bu(a.baseId,s.value),f=Vu(a.baseId,s.value),p=c.useRef(!1),h=c.useRef(!1),m=s.value===a.value;return l.jsxs(l.Fragment,{children:[l.jsx(Uo.ItemSlot,{scope:n,value:s.value,children:l.jsx(Wu,{asChild:!0,children:l.jsx(F.button,{id:d,disabled:r,"data-disabled":r?"":void 0,"data-state":na(m),"aria-expanded":m,"aria-controls":f,...o,ref:u,onPointerEnter:k(e.onPointerEnter,()=>{h.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:k(e.onPointerMove,Nr(()=>{r||h.current||s.wasEscapeCloseRef.current||p.current||(a.onTriggerEnter(s.value),p.current=!0)})),onPointerLeave:k(e.onPointerLeave,Nr(()=>{r||(a.onTriggerLeave(),p.current=!1)})),onClick:k(e.onClick,()=>{a.onItemSelect(s.value),h.current=m}),onKeyDown:k(e.onKeyDown,v=>{const b={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];m&&v.key===b&&(s.onEntryKeyDown(),v.preventDefault())})})})}),m&&l.jsxs(l.Fragment,{children:[l.jsx(xu,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:v=>{const g=s.contentRef.current,b=v.relatedTarget,y=b===i.current,w=g==null?void 0:g.contains(b);(y||!w)&&s.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&l.jsx("span",{"aria-owns":f})]})]})});ku.displayName=Xo;var xx="NavigationMenuLink",_u="navigationMenu.linkSelect",Du=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return l.jsx(Wu,{asChild:!0,children:l.jsx(F.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:k(e.onClick,s=>{const i=s.target,u=new CustomEvent(_u,{bubbles:!0,cancelable:!0});if(i.addEventListener(_u,d=>o==null?void 0:o(d),{once:!0}),Fn(i,u),!u.defaultPrevented&&!s.metaKey){const d=new CustomEvent(Cr,{bubbles:!0,cancelable:!0});Fn(i,d)}},{checkForDefaultPrevented:!1})})})});Du.displayName=xx;var Qo="NavigationMenuIndicator",ju=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=je(Qo,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?_n.createPortal(l.jsx(ye,{present:n||a,children:l.jsx(Cx,{...r,ref:t})}),o.indicatorTrack):null});ju.displayName=Qo;var Cx=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=je(Qo,n),a=Cu(n),[s,i]=c.useState(null),[u,d]=c.useState(null),f=o.orientation==="horizontal",p=!!o.value;c.useEffect(()=>{var g;const v=(g=a().find(b=>b.value===o.value))==null?void 0:g.ref.current;v&&i(v)},[a,o.value]);const h=()=>{s&&d({size:f?s.offsetWidth:s.offsetHeight,offset:f?s.offsetLeft:s.offsetTop})};return ta(s,h),ta(o.indicatorTrack,h),u?l.jsx(F.div,{"aria-hidden":!0,"data-state":p?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...f?{left:0,width:u.size+"px",transform:`translateX(${u.offset}px)`}:{top:0,height:u.size+"px",transform:`translateY(${u.offset}px)`},...r.style}}):null}),Xt="NavigationMenuContent",Iu=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=je(Xt,e.__scopeNavigationMenu),a=Ru(Xt,e.__scopeNavigationMenu),s=Q(a.contentRef,t),i=a.value===o.value,u={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?l.jsx(Nx,{forceMount:n,...u,ref:s}):l.jsx(ye,{present:n||i,children:l.jsx(Ou,{"data-state":na(i),...u,ref:s,onPointerEnter:k(e.onPointerEnter,o.onContentEnter),onPointerLeave:k(e.onPointerLeave,Nr(o.onContentLeave)),style:{pointerEvents:!i&&o.isRootMenu?"none":void 0,...u.style}})})});Iu.displayName=Xt;var Nx=c.forwardRef((e,t)=>{const n=je(Xt,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return ve(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ve(()=>()=>o(e.value),[e.value,o]),null}),Cr="navigationMenu.rootContentDismiss",Ou=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:i,onContentFocusOutside:u,...d}=e,f=je(Xt,n),p=c.useRef(null),h=Q(p,t),m=Bu(f.baseId,r),v=Vu(f.baseId,r),g=Cu(n),b=c.useRef(null),{onItemDismiss:y}=f;c.useEffect(()=>{const C=p.current;if(f.isRootMenu&&C){const N=()=>{var E;y(),i(),C.contains(document.activeElement)&&((E=o.current)==null||E.focus())};return C.addEventListener(Cr,N),()=>C.removeEventListener(Cr,N)}},[f.isRootMenu,e.value,o,y,i]);const w=c.useMemo(()=>{const N=g().map(B=>B.value);f.dir==="rtl"&&N.reverse();const E=N.indexOf(f.value),A=N.indexOf(f.previousValue),T=r===f.value,_=A===N.indexOf(r);if(!T&&!_)return b.current;const j=(()=>{if(E!==A){if(T&&A!==-1)return E>A?"from-end":"from-start";if(_&&E!==-1)return E>A?"to-start":"to-end"}return null})();return b.current=j,j},[f.previousValue,f.value,f.dir,g,r]);return l.jsx(Lu,{asChild:!0,children:l.jsx(Pt,{id:v,"aria-labelledby":m,"data-motion":w,"data-orientation":f.orientation,...d,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{var N;const C=new Event(Cr,{bubbles:!0,cancelable:!0});(N=p.current)==null||N.dispatchEvent(C)},onFocusOutside:k(e.onFocusOutside,C=>{var E;u();const N=C.target;(E=f.rootNavigationMenu)!=null&&E.contains(N)&&C.preventDefault()}),onPointerDownOutside:k(e.onPointerDownOutside,C=>{var T;const N=C.target,E=g().some(_=>{var j;return(j=_.ref.current)==null?void 0:j.contains(N)}),A=f.isRootMenu&&((T=f.viewport)==null?void 0:T.contains(N));(E||A||!f.isRootMenu)&&C.preventDefault()}),onKeyDown:k(e.onKeyDown,C=>{var A;const N=C.altKey||C.ctrlKey||C.metaKey;if(C.key==="Tab"&&!N){const T=Zo(C.currentTarget),_=document.activeElement,j=T.findIndex(O=>O===_),G=C.shiftKey?T.slice(0,j).reverse():T.slice(j+1,T.length);ea(G)?C.preventDefault():(A=a.current)==null||A.focus()}}),onEscapeKeyDown:k(e.onEscapeKeyDown,C=>{s.current=!0})})})}),Jo="NavigationMenuViewport",Fu=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!je(Jo,e.__scopeNavigationMenu).value;return l.jsx(ye,{present:n||a,children:l.jsx(Ex,{...r,ref:t})})});Fu.displayName=Jo;var Ex=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=je(Jo,n),s=Q(t,a.onViewportChange),i=bx(Xt,e.__scopeNavigationMenu),[u,d]=c.useState(null),[f,p]=c.useState(null),h=u?(u==null?void 0:u.width)+"px":void 0,m=u?(u==null?void 0:u.height)+"px":void 0,v=!!a.value,g=v?a.value:a.previousValue;return ta(f,()=>{f&&d({width:f.offsetWidth,height:f.offsetHeight})}),l.jsx(F.div,{"data-state":na(v),"data-orientation":a.orientation,...o,ref:s,style:{pointerEvents:!v&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":m,...o.style},onPointerEnter:k(e.onPointerEnter,a.onContentEnter),onPointerLeave:k(e.onPointerLeave,Nr(a.onContentLeave)),children:Array.from(i.items).map(([y,{ref:w,forceMount:C,...N}])=>{const E=g===y;return l.jsx(ye,{present:C||E,children:l.jsx(Ou,{...N,ref:an(w,A=>{E&&A&&p(A)})})},y)})})}),Sx="FocusGroup",Lu=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=je(Sx,n);return l.jsx(Ko.Provider,{scope:n,children:l.jsx(Ko.Slot,{scope:n,children:l.jsx(F.div,{dir:o.dir,...r,ref:t})})})}),$u=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Px="FocusGroupItem",Wu=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=px(n),a=je(Px,n);return l.jsx(Ko.ItemSlot,{scope:n,children:l.jsx(F.button,{...r,ref:t,onKeyDown:k(e.onKeyDown,s=>{if(["Home","End",...$u].includes(s.key)){let u=o().map(p=>p.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&u.reverse(),$u.includes(s.key)){const p=u.indexOf(s.currentTarget);u=u.slice(p+1)}setTimeout(()=>ea(u)),s.preventDefault()}})})})});function Zo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ea(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function Mx(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function ta(e,t){const n=he(t);ve(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}function na(e){return e?"open":"closed"}function Bu(e,t){return`${e}-trigger-${t}`}function Vu(e,t){return`${e}-content-${t}`}function Nr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Gu=Nu,zu=Mu,Tx=Au,Hu=ku,Rx=Du,Yu=ju,Uu=Iu,Ku=Fu;const qu=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Gu,{ref:r,className:R("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,l.jsx(ra,{})]}));qu.displayName=Gu.displayName;const Xu=c.forwardRef(({className:e,...t},n)=>l.jsx(zu,{ref:n,className:R("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Xu.displayName=zu.displayName;const Ax=Tx,Qu=It("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Ju=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Hu,{ref:r,className:R(Qu(),"group",e),...n,children:[t," ",l.jsx(ao,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Ju.displayName=Hu.displayName;const Zu=c.forwardRef(({className:e,...t},n)=>l.jsx(Uu,{ref:n,className:R("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));Zu.displayName=Uu.displayName;const kx=Rx,ra=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:R("absolute left-0 top-full flex justify-center"),children:l.jsx(Ku,{className:R("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t})}));ra.displayName=Ku.displayName;const ed=c.forwardRef(({className:e,...t},n)=>l.jsx(Yu,{ref:n,className:R("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:l.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));ed.displayName=Yu.displayName;const oa=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:R("mx-auto flex w-full justify-center",e),...t});oa.displayName="Pagination";const aa=c.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:R("flex flex-row items-center gap-1",e),...t}));aa.displayName="PaginationContent";const Mn=c.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:R("",e),...t}));Mn.displayName="PaginationItem";const Tn=({className:e,isActive:t,size:n="icon",...r})=>l.jsx(Ue,{"aria-current":t?"page":void 0,className:R(un({variant:t?"default":"outline",size:n}),t?"text-primary-foreground":"text-foreground",e),...r,children:r.children});Tn.displayName="PaginationLink";const sa=({className:e,...t})=>l.jsx(Tn,{"aria-label":"Previous page",size:"default",className:R("gap-1",e),...t,children:l.jsx(so,{className:"h-4 w-4"})});sa.displayName="PaginationPrevious";const ia=({className:e,...t})=>l.jsx(Tn,{"aria-label":"Next page",size:"default",className:R("gap-1",e),...t,children:l.jsx(Xn,{className:"h-4 w-4"})});ia.displayName="PaginationNext";const td=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:R("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(Zg,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});td.displayName="PaginationEllipsis";var ca="Progress",la=100,[_x,eN]=be(ca),[Dx,jx]=_x(ca),nd=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=Ix,...s}=e;(o||o===0)&&!sd(o)&&console.error(Ox(`${o}`,"Progress"));const i=sd(o)?o:la;r!==null&&!id(r,i)&&console.error(Fx(`${r}`,"Progress"));const u=id(r,i)?r:null,d=Er(u)?a(u,i):void 0;return l.jsx(Dx,{scope:n,value:u,max:i,children:l.jsx(F.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Er(u)?u:void 0,"aria-valuetext":d,role:"progressbar","data-state":ad(u,i),"data-value":u??void 0,"data-max":i,...s,ref:t})})});nd.displayName=ca;var rd="ProgressIndicator",od=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=jx(rd,n);return l.jsx(F.div,{"data-state":ad(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});od.displayName=rd;function Ix(e,t){return`${Math.round(e/t*100)}%`}function ad(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Er(e){return typeof e=="number"}function sd(e){return Er(e)&&!isNaN(e)&&e>0}function id(e,t){return Er(e)&&!isNaN(e)&&e<=t&&e>=0}function Ox(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${la}\`.`}function Fx(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
192
192
|
- a positive number
|
|
193
|
-
- less than the value passed to \`max\` (or ${
|
|
193
|
+
- less than the value passed to \`max\` (or ${la} if no \`max\` prop is set)
|
|
194
194
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
195
195
|
|
|
196
|
-
Defaulting to \`null\`.`}var Fu=Iu,ky=ju;const Jr=l.forwardRef(({className:e,value:t,...n},o)=>c.jsx(Fu,{ref:o,className:R("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:c.jsx(ky,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Jr.displayName=Fu.displayName;function jy(e){const{showStrengthMeter:t=!0,className:n,strengthLabels:o={veryWeak:"Very weak",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very strong"},showPasswordLabel:r="Show password",hidePasswordLabel:a="Hide password",strengthTitle:s="Password strength",...i}=e,[u,d]=S.useState(""),[f,m]=S.useState(!1),h=y=>{let w=0;return y.length>=8&&(w+=25),y.match(/[a-z]/)&&(w+=25),y.match(/[A-Z]/)&&(w+=25),y.match(/[0-9]/)&&(w+=25),w},p=y=>y===0?o.veryWeak:y<=25?o.weak:y<=50?o.medium:y<=75?o.strong:o.veryStrong,b=h(u),g=p(b),v=y=>{var w;d(y.target.value),(w=e.onChange)==null||w.call(e,y)};return c.jsxs("div",{className:"w-full space-y-4",children:[c.jsxs("div",{className:"relative",children:[c.jsx(Tn,{...i,type:f?"text":"password",value:u,onChange:v,className:`pr-10 ${n||""}`}),c.jsx(Ge,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full",onClick:()=>m(!f),"aria-label":f?a:r,children:f?c.jsx(Ag,{className:"h-4 w-4"}):c.jsx(_g,{className:"h-4 w-4"})})]}),t&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex justify-between text-sm",children:[c.jsxs("span",{children:[s,":"]}),c.jsx("span",{children:g})]}),c.jsx(Jr,{value:b,className:"h-2"})]})]})}var Zr="Radio",[Dy,$u]=ve(Zr),[Oy,Ly]=Dy(Zr),Vu=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:r=!1,required:a,disabled:s,value:i="on",onCheck:u,form:d,...f}=e,[m,h]=l.useState(null),p=J(t,v=>h(v)),b=l.useRef(!1),g=m?d||!!m.closest("form"):!0;return c.jsxs(Oy,{scope:n,checked:r,disabled:s,children:[c.jsx(L.button,{type:"button",role:"radio","aria-checked":r,"data-state":zu(r),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:p,onClick:_(e.onClick,v=>{r||u==null||u(),g&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),g&&c.jsx(Fy,{control:m,bubbles:!b.current,name:o,value:i,checked:r,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});Vu.displayName=Zr;var Bu="RadioIndicator",Wu=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...r}=e,a=Ly(Bu,n);return c.jsx(be,{present:o||a.checked,children:c.jsx(L.span,{"data-state":zu(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})})});Wu.displayName=Bu;var Fy=e=>{const{control:t,checked:n,bubbles:o=!0,...r}=e,a=l.useRef(null),s=ln(n),i=Jn(t);return l.useEffect(()=>{const u=a.current,d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&m){const h=new Event("click",{bubbles:o});m.call(u,n),u.dispatchEvent(h)}},[s,n,o]),c.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function zu(e){return e?"checked":"unchecked"}var $y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qr="RadioGroup",[Vy,S0]=ve(Qr,[gt,$u]),Gu=gt(),Hu=$u(),[By,Wy]=Vy(Qr),Uu=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:r,value:a,required:s=!1,disabled:i=!1,orientation:u,dir:d,loop:f=!0,onValueChange:m,...h}=e,p=Gu(n),b=Nt(d),[g,v]=Ce({prop:a,defaultProp:r,onChange:m});return c.jsx(By,{scope:n,name:o,required:s,disabled:i,value:g,onValueChange:v,children:c.jsx(ao,{asChild:!0,...p,orientation:u,dir:b,loop:f,children:c.jsx(L.div,{role:"radiogroup","aria-required":s,"aria-orientation":u,"data-disabled":i?"":void 0,dir:b,...h,ref:t})})})});Uu.displayName=Qr;var Ku="RadioGroupItem",Yu=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...r}=e,a=Wy(Ku,n),s=a.disabled||o,i=Gu(n),u=Hu(n),d=l.useRef(null),f=J(t,d),m=a.value===r.value,h=l.useRef(!1);return l.useEffect(()=>{const p=g=>{$y.includes(g.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",b)}},[]),c.jsx(so,{asChild:!0,...i,focusable:!s,active:m,children:c.jsx(Vu,{disabled:s,required:a.required,checked:m,...u,...r,name:a.name,ref:f,onCheck:()=>a.onValueChange(r.value),onKeyDown:_(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:_(r.onFocus,()=>{var p;h.current&&((p=d.current)==null||p.click())})})})});Yu.displayName=Ku;var zy="RadioGroupIndicator",Xu=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,r=Hu(n);return c.jsx(Wu,{...r,...o,ref:t})});Xu.displayName=zy;var qu=Uu,Ju=Yu,Gy=Xu;const Zu=l.forwardRef(({className:e,...t},n)=>c.jsx(qu,{className:R("grid gap-2",e),...t,ref:n}));Zu.displayName=qu.displayName;const Qu=l.forwardRef(({className:e,...t},n)=>c.jsx(Ju,{ref:n,className:R("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:c.jsx(Gy,{className:"flex items-center justify-center",children:c.jsx(oi,{className:"h-3.5 w-3.5 fill-primary"})})}));Qu.displayName=Ju.displayName;function ed(e,[t,n]){return Math.min(n,Math.max(t,e))}var Hy=[" ","Enter","ArrowUp","ArrowDown"],Uy=[" ","Enter"],yn="Select",[go,ho,Ky]=cn(yn),[Wt,P0]=ve(yn,[Ky,ft]),vo=ft(),[Yy,vt]=Wt(yn),[Xy,qy]=Wt(yn),td=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:a,value:s,defaultValue:i,onValueChange:u,dir:d,name:f,autoComplete:m,disabled:h,required:p,form:b}=e,g=vo(t),[v,y]=l.useState(null),[w,C]=l.useState(null),[N,E]=l.useState(!1),A=Nt(d),[M=!1,I]=Ce({prop:o,defaultProp:r,onChange:a}),[j,B]=Ce({prop:s,defaultProp:i,onChange:u}),z=l.useRef(null),O=v?b||!!v.closest("form"):!0,[U,W]=l.useState(new Set),oe=Array.from(U).map($=>$.props.value).join(";");return c.jsx(rn,{...g,children:c.jsxs(Yy,{required:p,scope:t,trigger:v,onTriggerChange:y,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:N,onValueNodeHasChildrenChange:E,contentId:Ne(),value:j,onValueChange:B,open:M,onOpenChange:I,dir:A,triggerPointerDownPosRef:z,disabled:h,children:[c.jsx(go.Provider,{scope:t,children:c.jsx(Xy,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback($=>{W(G=>new Set(G).add($))},[]),onNativeOptionRemove:l.useCallback($=>{W(G=>{const V=new Set(G);return V.delete($),V})},[]),children:n})}),O?c.jsxs(Pd,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:m,value:j,onChange:$=>B($.target.value),disabled:h,form:b,children:[j===void 0?c.jsx("option",{value:""}):null,Array.from(U)]},oe):null]})})};td.displayName=yn;var nd="SelectTrigger",od=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,a=vo(n),s=vt(nd,n),i=s.disabled||o,u=J(t,s.onTriggerChange),d=ho(n),f=l.useRef("touch"),[m,h,p]=Td(g=>{const v=d().filter(C=>!C.disabled),y=v.find(C=>C.value===s.value),w=Md(v,g,y);w!==void 0&&s.onValueChange(w.value)}),b=g=>{i||(s.onOpenChange(!0),p()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return c.jsx(an,{asChild:!0,...a,children:c.jsx(L.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Sd(s.value)?"":void 0,...r,ref:u,onClick:_(r.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&b(g)}),onPointerDown:_(r.onPointerDown,g=>{f.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(b(g),g.preventDefault())}),onKeyDown:_(r.onKeyDown,g=>{const v=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(v&&g.key===" ")&&Hy.includes(g.key)&&(b(),g.preventDefault())})})})});od.displayName=nd;var rd="SelectValue",ad=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:a,placeholder:s="",...i}=e,u=vt(rd,n),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,m=J(t,u.onValueNodeChange);return he(()=>{d(f)},[d,f]),c.jsx(L.span,{...i,ref:m,style:{pointerEvents:"none"},children:Sd(u.value)?c.jsx(c.Fragment,{children:s}):a})});ad.displayName=rd;var Jy="SelectIcon",sd=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return c.jsx(L.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});sd.displayName=Jy;var St="SelectContent",id=l.forwardRef((e,t)=>{const n=vt(St,e.__scopeSelect),[o,r]=l.useState();if(he(()=>{r(new DocumentFragment)},[]),!n.open){const a=o;return a?Sn.createPortal(c.jsx(ld,{scope:e.__scopeSelect,children:c.jsx(go.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),a):null}return c.jsx(cd,{...e,ref:t})});id.displayName=St;var Le=10,[ld,bt]=Wt(St),Zy="SelectContentImpl",cd=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:u,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:b,hideWhenDetached:g,avoidCollisions:v,...y}=e,w=vt(St,n),[C,N]=l.useState(null),[E,A]=l.useState(null),M=J(t,k=>N(k)),[I,j]=l.useState(null),[B,z]=l.useState(null),O=ho(n),[U,W]=l.useState(!1),oe=l.useRef(!1);l.useEffect(()=>{if(C)return $n(C)},[C]),_n();const $=l.useCallback(k=>{const[ae,...se]=O().map(ie=>ie.ref.current),[te]=se.slice(-1),re=document.activeElement;for(const ie of k)if(ie===re||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===ae&&E&&(E.scrollTop=0),ie===te&&E&&(E.scrollTop=E.scrollHeight),ie==null||ie.focus(),document.activeElement!==re))return},[O,E]),G=l.useCallback(()=>$([I,C]),[$,I,C]);l.useEffect(()=>{U&&G()},[U,G]);const{onOpenChange:V,triggerPointerDownPosRef:T}=w;l.useEffect(()=>{if(C){let k={x:0,y:0};const ae=te=>{var re,ie;k={x:Math.abs(Math.round(te.pageX)-(((re=T.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(te.pageY)-(((ie=T.current)==null?void 0:ie.y)??0))}},se=te=>{k.x<=10&&k.y<=10?te.preventDefault():C.contains(te.target)||V(!1),document.removeEventListener("pointermove",ae),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",ae),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",se,{capture:!0})}}},[C,V,T]),l.useEffect(()=>{const k=()=>V(!1);return window.addEventListener("blur",k),window.addEventListener("resize",k),()=>{window.removeEventListener("blur",k),window.removeEventListener("resize",k)}},[V]);const[H,Z]=Td(k=>{const ae=O().filter(re=>!re.disabled),se=ae.find(re=>re.ref.current===document.activeElement),te=Md(ae,k,se);te&&setTimeout(()=>te.ref.current.focus())}),X=l.useCallback((k,ae,se)=>{const te=!oe.current&&!se;(w.value!==void 0&&w.value===ae||te)&&(j(k),te&&(oe.current=!0))},[w.value]),K=l.useCallback(()=>C==null?void 0:C.focus(),[C]),q=l.useCallback((k,ae,se)=>{const te=!oe.current&&!se;(w.value!==void 0&&w.value===ae||te)&&z(k)},[w.value]),ce=o==="popper"?ea:ud,fe=ce===ea?{side:i,sideOffset:u,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:b,hideWhenDetached:g,avoidCollisions:v}:{};return c.jsx(ld,{scope:n,content:C,viewport:E,onViewportChange:A,itemRefCallback:X,selectedItem:I,onItemLeave:K,itemTextRefCallback:q,focusSelectedItem:G,selectedItemText:B,position:o,isPositioned:U,searchRef:H,children:c.jsx(Qt,{as:We,allowPinchZoom:!0,children:c.jsx(Jt,{asChild:!0,trapped:w.open,onMountAutoFocus:k=>{k.preventDefault()},onUnmountAutoFocus:_(r,k=>{var ae;(ae=w.trigger)==null||ae.focus({preventScroll:!0}),k.preventDefault()}),children:c.jsx(wt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:k=>k.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:c.jsx(ce,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:k=>k.preventDefault(),...y,...fe,onPlaced:()=>W(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:_(y.onKeyDown,k=>{const ae=k.ctrlKey||k.altKey||k.metaKey;if(k.key==="Tab"&&k.preventDefault(),!ae&&k.key.length===1&&Z(k.key),["ArrowUp","ArrowDown","Home","End"].includes(k.key)){let te=O().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(k.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(k.key)){const re=k.target,ie=te.indexOf(re);te=te.slice(ie+1)}setTimeout(()=>$(te)),k.preventDefault()}})})})})})})});cd.displayName=Zy;var Qy="SelectItemAlignedPosition",ud=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,a=vt(St,n),s=bt(St,n),[i,u]=l.useState(null),[d,f]=l.useState(null),m=J(t,M=>f(M)),h=ho(n),p=l.useRef(!1),b=l.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:w}=s,C=l.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&g&&v&&y){const M=a.trigger.getBoundingClientRect(),I=d.getBoundingClientRect(),j=a.valueNode.getBoundingClientRect(),B=y.getBoundingClientRect();if(a.dir!=="rtl"){const re=B.left-I.left,ie=j.left-re,ye=M.left-ie,Se=M.width+ye,Ae=Math.max(Se,I.width),ot=window.innerWidth-Le,Fe=ed(ie,[Le,Math.max(Le,ot-Ae)]);i.style.minWidth=Se+"px",i.style.left=Fe+"px"}else{const re=I.right-B.right,ie=window.innerWidth-j.right-re,ye=window.innerWidth-M.right-ie,Se=M.width+ye,Ae=Math.max(Se,I.width),ot=window.innerWidth-Le,Fe=ed(ie,[Le,Math.max(Le,ot-Ae)]);i.style.minWidth=Se+"px",i.style.right=Fe+"px"}const z=h(),O=window.innerHeight-Le*2,U=g.scrollHeight,W=window.getComputedStyle(d),oe=parseInt(W.borderTopWidth,10),$=parseInt(W.paddingTop,10),G=parseInt(W.borderBottomWidth,10),V=parseInt(W.paddingBottom,10),T=oe+$+U+V+G,H=Math.min(v.offsetHeight*5,T),Z=window.getComputedStyle(g),X=parseInt(Z.paddingTop,10),K=parseInt(Z.paddingBottom,10),q=M.top+M.height/2-Le,ce=O-q,fe=v.offsetHeight/2,k=v.offsetTop+fe,ae=oe+$+k,se=T-ae;if(ae<=q){const re=z.length>0&&v===z[z.length-1].ref.current;i.style.bottom="0px";const ie=d.clientHeight-g.offsetTop-g.offsetHeight,ye=Math.max(ce,fe+(re?K:0)+ie+G),Se=ae+ye;i.style.height=Se+"px"}else{const re=z.length>0&&v===z[0].ref.current;i.style.top="0px";const ye=Math.max(q,oe+g.offsetTop+(re?X:0)+fe)+se;i.style.height=ye+"px",g.scrollTop=ae-q+g.offsetTop}i.style.margin=`${Le}px 0`,i.style.minHeight=H+"px",i.style.maxHeight=O+"px",o==null||o(),requestAnimationFrame(()=>p.current=!0)}},[h,a.trigger,a.valueNode,i,d,g,v,y,a.dir,o]);he(()=>C(),[C]);const[N,E]=l.useState();he(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const A=l.useCallback(M=>{M&&b.current===!0&&(C(),w==null||w(),b.current=!1)},[C,w]);return c.jsx(tw,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:p,onScrollButtonChange:A,children:c.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:c.jsx(L.div,{...r,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ud.displayName=Qy;var ew="SelectPopperPosition",ea=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=Le,...a}=e,s=vo(n);return c.jsx(Zn,{...s,...a,ref:t,align:o,collisionPadding:r,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)"}})});ea.displayName=ew;var[tw,ta]=Wt(St,{}),na="SelectViewport",dd=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,a=bt(na,n),s=ta(na,n),i=J(t,a.onViewportChange),u=l.useRef(0);return c.jsxs(c.Fragment,{children:[c.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}),c.jsx(go.Slot,{scope:n,children:c.jsx(L.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:_(r.onScroll,d=>{const f=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&m){const p=Math.abs(u.current-f.scrollTop);if(p>0){const b=window.innerHeight-Le*2,g=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),y=Math.max(g,v);if(y<b){const w=y+p,C=Math.min(b,w),N=w-C;m.style.height=C+"px",m.style.bottom==="0px"&&(f.scrollTop=N>0?N:0,m.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});dd.displayName=na;var fd="SelectGroup",[nw,ow]=Wt(fd),pd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ne();return c.jsx(nw,{scope:n,id:r,children:c.jsx(L.div,{role:"group","aria-labelledby":r,...o,ref:t})})});pd.displayName=fd;var md="SelectLabel",gd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ow(md,n);return c.jsx(L.div,{id:r.id,...o,ref:t})});gd.displayName=md;var bo="SelectItem",[rw,hd]=Wt(bo),vd=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:a,...s}=e,i=vt(bo,n),u=bt(bo,n),d=i.value===o,[f,m]=l.useState(a??""),[h,p]=l.useState(!1),b=J(t,w=>{var C;return(C=u.itemRefCallback)==null?void 0:C.call(u,w,o,r)}),g=Ne(),v=l.useRef("touch"),y=()=>{r||(i.onValueChange(o),i.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 c.jsx(rw,{scope:n,value:o,disabled:r,textId:g,isSelected:d,onItemTextChange:l.useCallback(w=>{m(C=>C||((w==null?void 0:w.textContent)??"").trim())},[]),children:c.jsx(go.ItemSlot,{scope:n,value:o,disabled:r,textValue:f,children:c.jsx(L.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:b,onFocus:_(s.onFocus,()=>p(!0)),onBlur:_(s.onBlur,()=>p(!1)),onClick:_(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:_(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:_(s.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:_(s.onPointerMove,w=>{var C;v.current=w.pointerType,r?(C=u.onItemLeave)==null||C.call(u):v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(s.onPointerLeave,w=>{var C;w.currentTarget===document.activeElement&&((C=u.onItemLeave)==null||C.call(u))}),onKeyDown:_(s.onKeyDown,w=>{var N;((N=u.searchRef)==null?void 0:N.current)!==""&&w.key===" "||(Uy.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});vd.displayName=bo;var wn="SelectItemText",bd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...a}=e,s=vt(wn,n),i=bt(wn,n),u=hd(wn,n),d=qy(wn,n),[f,m]=l.useState(null),h=J(t,y=>m(y),u.onItemTextChange,y=>{var w;return(w=i.itemTextRefCallback)==null?void 0:w.call(i,y,u.value,u.disabled)}),p=f==null?void 0:f.textContent,b=l.useMemo(()=>c.jsx("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=d;return he(()=>(g(b),()=>v(b)),[g,v,b]),c.jsxs(c.Fragment,{children:[c.jsx(L.span,{id:u.textId,...a,ref:h}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Sn.createPortal(a.children,s.valueNode):null]})});bd.displayName=wn;var yd="SelectItemIndicator",wd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return hd(yd,n).isSelected?c.jsx(L.span,{"aria-hidden":!0,...o,ref:t}):null});wd.displayName=yd;var oa="SelectScrollUpButton",xd=l.forwardRef((e,t)=>{const n=bt(oa,e.__scopeSelect),o=ta(oa,e.__scopeSelect),[r,a]=l.useState(!1),s=J(t,o.onScrollButtonChange);return he(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollTop>0;a(d)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?c.jsx(Nd,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null});xd.displayName=oa;var ra="SelectScrollDownButton",Cd=l.forwardRef((e,t)=>{const n=bt(ra,e.__scopeSelect),o=ta(ra,e.__scopeSelect),[r,a]=l.useState(!1),s=J(t,o.onScrollButtonChange);return he(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<d;a(f)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?c.jsx(Nd,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null});Cd.displayName=ra;var Nd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,a=bt("SelectScrollButton",n),s=l.useRef(null),i=ho(n),u=l.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return l.useEffect(()=>()=>u(),[u]),he(()=>{var f;const d=i().find(m=>m.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),c.jsx(L.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:_(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:_(r.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:_(r.onPointerLeave,()=>{u()})})}),aw="SelectSeparator",Ed=l.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return c.jsx(L.div,{"aria-hidden":!0,...o,ref:t})});Ed.displayName=aw;var aa="SelectArrow",sw=l.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=vo(n),a=vt(aa,n),s=bt(aa,n);return a.open&&s.position==="popper"?c.jsx(Qn,{...r,...o,ref:t}):null});sw.displayName=aa;function Sd(e){return e===""||e===void 0}var Pd=l.forwardRef((e,t)=>{const{value:n,...o}=e,r=l.useRef(null),a=J(t,r),s=ln(n);return l.useEffect(()=>{const i=r.current,u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(s!==n&&f){const m=new Event("change",{bubbles:!0});f.call(i,n),i.dispatchEvent(m)}},[s,n]),c.jsx(kr,{asChild:!0,children:c.jsx("select",{...o,ref:a,defaultValue:n})})});Pd.displayName="BubbleSelect";function Td(e){const t=ge(e),n=l.useRef(""),o=l.useRef(0),r=l.useCallback(s=>{const i=n.current+s;t(i),function u(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>u(""),1e3))}(i)},[t]),a=l.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,a]}function Md(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=iw(e,Math.max(a,0));r.length===1&&(s=s.filter(d=>d!==n));const u=s.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function iw(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var lw=td,Rd=od,cw=ad,uw=sd,Ad=id,dw=dd,fw=pd,_d=gd,Id=vd,pw=bd,mw=wd,kd=xd,jd=Cd,Dd=Ed;const gw=lw,hw=fw,vw=cw,Od=l.forwardRef(({className:e,children:t,...n},o)=>c.jsxs(Rd,{ref:o,className:R("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,c.jsx(uw,{asChild:!0,children:c.jsx(Xo,{className:"h-4 w-4 opacity-50"})})]}));Od.displayName=Rd.displayName;const sa=l.forwardRef(({className:e,...t},n)=>c.jsx(kd,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Sg,{className:"h-4 w-4"})}));sa.displayName=kd.displayName;const ia=l.forwardRef(({className:e,...t},n)=>c.jsx(jd,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Xo,{className:"h-4 w-4"})}));ia.displayName=jd.displayName;const Ld=l.forwardRef(({className:e,children:t,position:n="popper",...o},r)=>c.jsxs(Ad,{ref:r,className:R("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:[c.jsx(sa,{}),c.jsx(dw,{className:R("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(ia,{})]}));Ld.displayName=Ad.displayName;const Fd=l.forwardRef(({className:e,...t},n)=>c.jsx(_d,{ref:n,className:R("px-2 py-1.5 text-sm font-semibold",e),...t}));Fd.displayName=_d.displayName;const $d=l.forwardRef(({className:e,children:t,...n},o)=>c.jsxs(Id,{ref:o,className:R("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(mw,{children:c.jsx(Yo,{className:"h-4 w-4"})})}),c.jsx(pw,{children:t})]}));$d.displayName=Id.displayName;const Vd=l.forwardRef(({className:e,...t},n)=>c.jsx(Dd,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));Vd.displayName=Dd.displayName;const bw=({className:e,repeat:t=1,...n})=>c.jsx(c.Fragment,{children:Array.from({length:t??1}).map((o,r)=>c.jsx("div",{className:R("animate-pulse rounded-md bg-gray-700/10",e),...n},r))});var la="Switch",[yw,T0]=ve(la),[ww,xw]=yw(la),Bd=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:a,required:s,disabled:i,value:u="on",onCheckedChange:d,form:f,...m}=e,[h,p]=l.useState(null),b=J(t,C=>p(C)),g=l.useRef(!1),v=h?f||!!h.closest("form"):!0,[y=!1,w]=Ce({prop:r,defaultProp:a,onChange:d});return c.jsxs(ww,{scope:n,checked:y,disabled:i,children:[c.jsx(L.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":Gd(y),"data-disabled":i?"":void 0,disabled:i,value:u,...m,ref:b,onClick:_(e.onClick,C=>{w(N=>!N),v&&(g.current=C.isPropagationStopped(),g.current||C.stopPropagation())})}),v&&c.jsx(Cw,{control:h,bubbles:!g.current,name:o,value:u,checked:y,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Bd.displayName=la;var Wd="SwitchThumb",zd=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=xw(Wd,n);return c.jsx(L.span,{"data-state":Gd(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});zd.displayName=Wd;var Cw=e=>{const{control:t,checked:n,bubbles:o=!0,...r}=e,a=l.useRef(null),s=ln(n),i=Jn(t);return l.useEffect(()=>{const u=a.current,d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&m){const h=new Event("click",{bubbles:o});m.call(u,n),u.dispatchEvent(h)}},[s,n,o]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Gd(e){return e?"checked":"unchecked"}var Hd=Bd,Nw=zd;const Ud=l.forwardRef(({className:e,...t},n)=>c.jsx(Hd,{className:R("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm 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=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:c.jsx(Nw,{className:R("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Ud.displayName=Hd.displayName;const Kd=l.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:"relative w-full overflow-auto",children:c.jsx("table",{ref:n,className:R("w-full caption-bottom text-sm",e),...t})}));Kd.displayName="Table";const Yd=l.forwardRef(({className:e,...t},n)=>c.jsx("thead",{ref:n,className:R("[&_tr]:border-b",e),...t}));Yd.displayName="TableHeader";const Xd=l.forwardRef(({className:e,...t},n)=>c.jsx("tbody",{ref:n,className:R("[&_tr:last-child]:border-0",e),...t}));Xd.displayName="TableBody";const qd=l.forwardRef(({className:e,...t},n)=>c.jsx("tfoot",{ref:n,className:R("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));qd.displayName="TableFooter";const Jd=l.forwardRef(({className:e,...t},n)=>c.jsx("tr",{ref:n,className:R("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Jd.displayName="TableRow";const Zd=l.forwardRef(({className:e,...t},n)=>c.jsx("th",{ref:n,className:R("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Zd.displayName="TableHead";const Qd=l.forwardRef(({className:e,...t},n)=>c.jsx("td",{ref:n,className:R("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Qd.displayName="TableCell";const ef=l.forwardRef(({className:e,...t},n)=>c.jsx("caption",{ref:n,className:R("mt-4 text-sm text-muted-foreground",e),...t}));ef.displayName="TableCaption";var ca="Tabs",[Ew,M0]=ve(ca,[gt]),tf=gt(),[Sw,ua]=Ew(ca),nf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:u="automatic",...d}=e,f=Nt(i),[m,h]=Ce({prop:o,onChange:r,defaultProp:a});return c.jsx(Sw,{scope:n,baseId:Ne(),value:m,onValueChange:h,orientation:s,dir:f,activationMode:u,children:c.jsx(L.div,{dir:f,"data-orientation":s,...d,ref:t})})});nf.displayName=ca;var of="TabsList",rf=l.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,a=ua(of,n),s=tf(n);return c.jsx(ao,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:c.jsx(L.div,{role:"tablist","aria-orientation":a.orientation,...r,ref:t})})});rf.displayName=of;var af="TabsTrigger",sf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...a}=e,s=ua(af,n),i=tf(n),u=uf(s.baseId,o),d=df(s.baseId,o),f=o===s.value;return c.jsx(so,{asChild:!0,...i,focusable:!r,active:f,children:c.jsx(L.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:u,...a,ref:t,onMouseDown:_(e.onMouseDown,m=>{!r&&m.button===0&&m.ctrlKey===!1?s.onValueChange(o):m.preventDefault()}),onKeyDown:_(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&s.onValueChange(o)}),onFocus:_(e.onFocus,()=>{const m=s.activationMode!=="manual";!f&&!r&&m&&s.onValueChange(o)})})})});sf.displayName=af;var lf="TabsContent",cf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:a,...s}=e,i=ua(lf,n),u=uf(i.baseId,o),d=df(i.baseId,o),f=o===i.value,m=l.useRef(f);return l.useEffect(()=>{const h=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(h)},[]),c.jsx(be,{present:r||f,children:({present:h})=>c.jsx(L.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:h&&a})})});cf.displayName=lf;function uf(e,t){return`${e}-trigger-${t}`}function df(e,t){return`${e}-content-${t}`}var Pw=nf,ff=rf,pf=sf,mf=cf;const Tw=Pw,gf=l.forwardRef(({className:e,...t},n)=>c.jsx(ff,{ref:n,className:R("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));gf.displayName=ff.displayName;const hf=l.forwardRef(({className:e,...t},n)=>c.jsx(pf,{ref:n,className:R("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all 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=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));hf.displayName=pf.displayName;const vf=l.forwardRef(({className:e,...t},n)=>c.jsx(mf,{ref:n,className:R("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));vf.displayName=mf.displayName;const bf=l.forwardRef(({className:e,...t},n)=>c.jsx("textarea",{className:R("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));bf.displayName="Textarea";var Mw=e=>{switch(e){case"success":return _w;case"info":return kw;case"warning":return Iw;case"error":return jw;default:return null}},Rw=Array(12).fill(0),Aw=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},Rw.map((n,o)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),_w=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Iw=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),kw=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),jw=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Dw=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Ow=()=>{let[e,t]=S.useState(document.hidden);return S.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},da=1,Lw=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...o}=e,r=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:da++,a=this.toasts.find(i=>i.id===r),s=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(i=>i.id===r?(this.publish({...i,...e,id:r,title:n}),{...i,...e,id:r,dismissible:s,title:n}):i):this.addToast({title:n,...o,dismissible:s,id:r}),r},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let o=e instanceof Promise?e:e(),r=n!==void 0,a,s=o.then(async u=>{if(a=["resolve",u],S.isValidElement(u))r=!1,this.create({id:n,type:"default",message:u});else if($w(u)&&!u.ok){r=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:d,description:f})}else if(t.success!==void 0){r=!1;let d=typeof t.success=="function"?await t.success(u):t.success,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:d,description:f})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){r=!1;let d=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:d,description:f})}}).finally(()=>{var u;r&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),i=()=>new Promise((u,d)=>s.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:i}:Object.assign(n,{unwrap:i})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||da++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Re=new Lw,Fw=(e,t)=>{let n=(t==null?void 0:t.id)||da++;return Re.addToast({title:e,...t,id:n}),n},$w=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Vw=Fw,Bw=()=>Re.toasts,Ww=Object.assign(Vw,{success:Re.success,info:Re.info,warning:Re.warning,error:Re.error,custom:Re.custom,message:Re.message,promise:Re.promise,dismiss:Re.dismiss,loading:Re.loading},{getHistory:Bw});function zw(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}zw(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
197
|
-
`);function yo(e){return e.label!==void 0}var Gw=3,Hw="32px",yf=4e3,Uw=356,Kw=14,Yw=20,Xw=200;function qw(...e){return e.filter(Boolean).join(" ")}var Jw=e=>{var t,n,o,r,a,s,i,u,d,f,m;let{invert:h,toast:p,unstyled:b,interacting:g,setHeights:v,visibleToasts:y,heights:w,index:C,toasts:N,expanded:E,removeToast:A,defaultRichColors:M,closeButton:I,style:j,cancelButtonStyle:B,actionButtonStyle:z,className:O="",descriptionClassName:U="",duration:W,position:oe,gap:$,loadingIcon:G,expandByDefault:V,classNames:T,icons:H,closeButtonAriaLabel:Z="Close toast",pauseWhenPageIsHidden:X,cn:K}=e,[q,ce]=S.useState(!1),[fe,k]=S.useState(!1),[ae,se]=S.useState(!1),[te,re]=S.useState(!1),[ie,ye]=S.useState(!1),[Se,Ae]=S.useState(0),[ot,Fe]=S.useState(0),rt=S.useRef(p.duration||W||yf),Ye=S.useRef(null),at=S.useRef(null),x=C===0,F=C+1<=y,D=p.type,ne=p.dismissible!==!1,xe=p.className||"",de=p.descriptionClassName||"",Y=S.useMemo(()=>w.findIndex(Q=>Q.toastId===p.id)||0,[w,p.id]),$e=S.useMemo(()=>{var Q;return(Q=p.closeButton)!=null?Q:I},[p.closeButton,I]);S.useMemo(()=>p.duration||W||yf,[p.duration,W]);let Xe=S.useRef(0),me=S.useRef(0),qe=S.useRef(0),Je=S.useRef(null),[Ve,Ht]=oe.split("-"),ke=S.useMemo(()=>w.reduce((Q,le,pe)=>pe>=Y?Q:Q+le.height,0),[w,Y]),Yf=Ow(),m0=p.invert||h,xa=D==="loading";me.current=S.useMemo(()=>Y*$+ke,[Y,ke]),S.useEffect(()=>{ce(!0)},[]),S.useEffect(()=>{let Q=at.current;if(Q){let le=Q.getBoundingClientRect().height;return Fe(le),v(pe=>[{toastId:p.id,height:le,position:p.position},...pe]),()=>v(pe=>pe.filter(Be=>Be.toastId!==p.id))}},[v,p.id]),S.useLayoutEffect(()=>{if(!q)return;let Q=at.current,le=Q.style.height;Q.style.height="auto";let pe=Q.getBoundingClientRect().height;Q.style.height=le,Fe(pe),v(Be=>Be.find(Ze=>Ze.toastId===p.id)?Be.map(Ze=>Ze.toastId===p.id?{...Ze,height:pe}:Ze):[{toastId:p.id,height:pe,position:p.position},...Be])},[q,p.title,p.description,v,p.id]);let yt=S.useCallback(()=>{k(!0),Ae(me.current),v(Q=>Q.filter(le=>le.toastId!==p.id)),setTimeout(()=>{A(p)},Xw)},[p,A,v,me]);S.useEffect(()=>{if(p.promise&&D==="loading"||p.duration===1/0||p.type==="loading")return;let Q;return E||g||X&&Yf?(()=>{if(qe.current<Xe.current){let le=new Date().getTime()-Xe.current;rt.current=rt.current-le}qe.current=new Date().getTime()})():rt.current!==1/0&&(Xe.current=new Date().getTime(),Q=setTimeout(()=>{var le;(le=p.onAutoClose)==null||le.call(p,p),yt()},rt.current)),()=>clearTimeout(Q)},[E,g,p,D,X,Yf,yt]),S.useEffect(()=>{p.delete&&yt()},[yt,p.delete]);function g0(){var Q,le,pe;return H!=null&&H.loading?S.createElement("div",{className:K(T==null?void 0:T.loader,(Q=p==null?void 0:p.classNames)==null?void 0:Q.loader,"sonner-loader"),"data-visible":D==="loading"},H.loading):G?S.createElement("div",{className:K(T==null?void 0:T.loader,(le=p==null?void 0:p.classNames)==null?void 0:le.loader,"sonner-loader"),"data-visible":D==="loading"},G):S.createElement(Aw,{className:K(T==null?void 0:T.loader,(pe=p==null?void 0:p.classNames)==null?void 0:pe.loader),visible:D==="loading"})}return S.createElement("li",{tabIndex:0,ref:at,className:K(O,xe,T==null?void 0:T.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[D],(n=p==null?void 0:p.classNames)==null?void 0:n[D]),"data-sonner-toast":"","data-rich-colors":(o=p.richColors)!=null?o:M,"data-styled":!(p.jsx||p.unstyled||b),"data-mounted":q,"data-promise":!!p.promise,"data-swiped":ie,"data-removed":fe,"data-visible":F,"data-y-position":Ve,"data-x-position":Ht,"data-index":C,"data-front":x,"data-swiping":ae,"data-dismissible":ne,"data-type":D,"data-invert":m0,"data-swipe-out":te,"data-expanded":!!(E||V&&q),style:{"--index":C,"--toasts-before":C,"--z-index":N.length-C,"--offset":`${fe?Se:me.current}px`,"--initial-height":V?"auto":`${ot}px`,...j,...p.style},onPointerDown:Q=>{xa||!ne||(Ye.current=new Date,Ae(me.current),Q.target.setPointerCapture(Q.pointerId),Q.target.tagName!=="BUTTON"&&(se(!0),Je.current={x:Q.clientX,y:Q.clientY}))},onPointerUp:()=>{var Q,le,pe,Be;if(te||!ne)return;Je.current=null;let Ze=Number(((Q=at.current)==null?void 0:Q.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Eo=new Date().getTime()-((le=Ye.current)==null?void 0:le.getTime()),h0=Math.abs(Ze)/Eo;if(Math.abs(Ze)>=Yw||h0>.11){Ae(me.current),(pe=p.onDismiss)==null||pe.call(p,p),yt(),re(!0),ye(!1);return}(Be=at.current)==null||Be.style.setProperty("--swipe-amount","0px"),se(!1)},onPointerMove:Q=>{var le,pe;if(!Je.current||!ne)return;let Be=Q.clientY-Je.current.y,Ze=((le=window.getSelection())==null?void 0:le.toString().length)>0,Eo=Ve==="top"?Math.min(0,Be):Math.max(0,Be);Math.abs(Eo)>0&&ye(!0),!Ze&&((pe=at.current)==null||pe.style.setProperty("--swipe-amount",`${Eo}px`))}},$e&&!p.jsx?S.createElement("button",{"aria-label":Z,"data-disabled":xa,"data-close-button":!0,onClick:xa||!ne?()=>{}:()=>{var Q;yt(),(Q=p.onDismiss)==null||Q.call(p,p)},className:K(T==null?void 0:T.closeButton,(r=p==null?void 0:p.classNames)==null?void 0:r.closeButton)},(a=H==null?void 0:H.close)!=null?a:Dw):null,p.jsx||S.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:S.createElement(S.Fragment,null,D||p.icon||p.promise?S.createElement("div",{"data-icon":"",className:K(T==null?void 0:T.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||g0():null,p.type!=="loading"?p.icon||(H==null?void 0:H[D])||Mw(D):null):null,S.createElement("div",{"data-content":"",className:K(T==null?void 0:T.content,(i=p==null?void 0:p.classNames)==null?void 0:i.content)},S.createElement("div",{"data-title":"",className:K(T==null?void 0:T.title,(u=p==null?void 0:p.classNames)==null?void 0:u.title)},typeof p.title=="function"?p.title():p.title),p.description?S.createElement("div",{"data-description":"",className:K(U,de,T==null?void 0:T.description,(d=p==null?void 0:p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),S.isValidElement(p.cancel)?p.cancel:p.cancel&&yo(p.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||B,onClick:Q=>{var le,pe;yo(p.cancel)&&ne&&((pe=(le=p.cancel).onClick)==null||pe.call(le,Q),yt())},className:K(T==null?void 0:T.cancelButton,(f=p==null?void 0:p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,S.isValidElement(p.action)?p.action:p.action&&yo(p.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||z,onClick:Q=>{var le,pe;yo(p.action)&&((pe=(le=p.action).onClick)==null||pe.call(le,Q),!Q.defaultPrevented&&yt())},className:K(T==null?void 0:T.actionButton,(m=p==null?void 0:p.classNames)==null?void 0:m.actionButton)},p.action.label):null))};function wf(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Zw=S.forwardRef(function(e,t){let{invert:n,position:o="bottom-right",hotkey:r=["altKey","KeyT"],expand:a,closeButton:s,className:i,offset:u,theme:d="light",richColors:f,duration:m,style:h,visibleToasts:p=Gw,toastOptions:b,dir:g=wf(),gap:v=Kw,loadingIcon:y,icons:w,containerAriaLabel:C="Notifications",pauseWhenPageIsHidden:N,cn:E=qw}=e,[A,M]=S.useState([]),I=S.useMemo(()=>Array.from(new Set([o].concat(A.filter(X=>X.position).map(X=>X.position)))),[A,o]),[j,B]=S.useState([]),[z,O]=S.useState(!1),[U,W]=S.useState(!1),[oe,$]=S.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=S.useRef(null),V=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=S.useRef(null),H=S.useRef(!1),Z=S.useCallback(X=>{M(K=>{var q;return(q=K.find(ce=>ce.id===X.id))!=null&&q.delete||Re.dismiss(X.id),K.filter(({id:ce})=>ce!==X.id)})},[]);return S.useEffect(()=>Re.subscribe(X=>{if(X.dismiss){M(K=>K.map(q=>q.id===X.id?{...q,delete:!0}:q));return}setTimeout(()=>{En.flushSync(()=>{M(K=>{let q=K.findIndex(ce=>ce.id===X.id);return q!==-1?[...K.slice(0,q),{...K[q],...X},...K.slice(q+1)]:[X,...K]})})})}),[]),S.useEffect(()=>{if(d!=="system"){$(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;let X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:K})=>{$(K?"dark":"light")})}catch{X.addListener(({matches:q})=>{try{$(q?"dark":"light")}catch(ce){console.error(ce)}})}},[d]),S.useEffect(()=>{A.length<=1&&O(!1)},[A]),S.useEffect(()=>{let X=K=>{var q,ce;r.every(fe=>K[fe]||K.code===fe)&&(O(!0),(q=G.current)==null||q.focus()),K.code==="Escape"&&(document.activeElement===G.current||(ce=G.current)!=null&&ce.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[r]),S.useEffect(()=>{if(G.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,H.current=!1)}},[G.current]),S.createElement("section",{"aria-label":`${C} ${V}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},I.map((X,K)=>{var q;let[ce,fe]=X.split("-");return A.length?S.createElement("ol",{key:X,dir:g==="auto"?wf():g,tabIndex:-1,ref:G,className:i,"data-sonner-toaster":!0,"data-theme":oe,"data-y-position":ce,"data-lifted":z&&A.length>1&&!a,"data-x-position":fe,style:{"--front-toast-height":`${((q=j[0])==null?void 0:q.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||Hw,"--width":`${Uw}px`,"--gap":`${v}px`,...h},onBlur:k=>{H.current&&!k.currentTarget.contains(k.relatedTarget)&&(H.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:k=>{k.target instanceof HTMLElement&&k.target.dataset.dismissible==="false"||H.current||(H.current=!0,T.current=k.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{U||O(!1)},onPointerDown:k=>{k.target instanceof HTMLElement&&k.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},A.filter(k=>!k.position&&K===0||k.position===X).map((k,ae)=>{var se,te;return S.createElement(Jw,{key:k.id,icons:w,index:ae,toast:k,defaultRichColors:f,duration:(se=b==null?void 0:b.duration)!=null?se:m,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:n,visibleToasts:p,closeButton:(te=b==null?void 0:b.closeButton)!=null?te:s,interacting:U,position:X,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,removeToast:Z,toasts:A.filter(re=>re.position==k.position),heights:j.filter(re=>re.position==k.position),setHeights:B,expandByDefault:a,gap:v,loadingIcon:y,expanded:z,pauseWhenPageIsHidden:N,cn:E})})):null}))});const Qw=({...e})=>c.jsx(Zw,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});var ex="Toggle",fa=l.forwardRef((e,t)=>{const{pressed:n,defaultPressed:o=!1,onPressedChange:r,...a}=e,[s=!1,i]=Ce({prop:n,onChange:r,defaultProp:o});return c.jsx(L.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:_(e.onClick,()=>{e.disabled||i(!s)})})});fa.displayName=ex;var xf=fa;const pa=Mt("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Cf=l.forwardRef(({className:e,variant:t,size:n,...o},r)=>c.jsx(xf,{ref:r,className:R(pa({variant:t,size:n,className:e})),...o}));Cf.displayName=xf.displayName;var zt="ToggleGroup",[Nf,R0]=ve(zt,[gt]),Ef=gt(),ma=S.forwardRef((e,t)=>{const{type:n,...o}=e;if(n==="single"){const r=o;return c.jsx(tx,{...r,ref:t})}if(n==="multiple"){const r=o;return c.jsx(nx,{...r,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${zt}\``)});ma.displayName=zt;var[Sf,Pf]=Nf(zt),tx=S.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...a}=e,[s,i]=Ce({prop:n,defaultProp:o,onChange:r});return c.jsx(Sf,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:i,onItemDeactivate:S.useCallback(()=>i(""),[i]),children:c.jsx(Tf,{...a,ref:t})})}),nx=S.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...a}=e,[s=[],i]=Ce({prop:n,defaultProp:o,onChange:r}),u=S.useCallback(f=>i((m=[])=>[...m,f]),[i]),d=S.useCallback(f=>i((m=[])=>m.filter(h=>h!==f)),[i]);return c.jsx(Sf,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:d,children:c.jsx(Tf,{...a,ref:t})})});ma.displayName=zt;var[ox,rx]=Nf(zt),Tf=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:o=!1,rovingFocus:r=!0,orientation:a,dir:s,loop:i=!0,...u}=e,d=Ef(n),f=Nt(s),m={role:"group",dir:f,...u};return c.jsx(ox,{scope:n,rovingFocus:r,disabled:o,children:r?c.jsx(ao,{asChild:!0,...d,orientation:a,dir:f,loop:i,children:c.jsx(L.div,{...m,ref:t})}):c.jsx(L.div,{...m,ref:t})})}),wo="ToggleGroupItem",Mf=S.forwardRef((e,t)=>{const n=Pf(wo,e.__scopeToggleGroup),o=rx(wo,e.__scopeToggleGroup),r=Ef(e.__scopeToggleGroup),a=n.value.includes(e.value),s=o.disabled||e.disabled,i={...e,pressed:a,disabled:s},u=S.useRef(null);return o.rovingFocus?c.jsx(so,{asChild:!0,...r,focusable:!s,active:a,ref:u,children:c.jsx(Rf,{...i,ref:t})}):c.jsx(Rf,{...i,ref:t})});Mf.displayName=wo;var Rf=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:o,...r}=e,a=Pf(wo,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=a.type==="single"?s:void 0;return c.jsx(fa,{...i,...r,ref:t,onPressedChange:u=>{u?a.onItemActivate(o):a.onItemDeactivate(o)}})}),Af=ma,_f=Mf;const If=l.createContext({size:"default",variant:"default"}),kf=l.forwardRef(({className:e,variant:t,size:n,children:o,...r},a)=>c.jsx(Af,{ref:a,className:R("flex items-center justify-center gap-1",e),...r,children:c.jsx(If.Provider,{value:{variant:t,size:n},children:o})}));kf.displayName=Af.displayName;const jf=l.forwardRef(({className:e,children:t,variant:n,size:o,...r},a)=>{const s=l.useContext(If);return c.jsx(_f,{ref:a,className:R(pa({variant:s.variant||n,size:s.size||o}),e),...r,children:t})});jf.displayName=_f.displayName;var[xo,A0]=ve("Tooltip",[ft]),Co=ft(),Df="TooltipProvider",ax=700,ga="tooltip.open",[sx,ha]=xo(Df),Of=e=>{const{__scopeTooltip:t,delayDuration:n=ax,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:a}=e,[s,i]=l.useState(!0),u=l.useRef(!1),d=l.useRef(0);return l.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),c.jsx(sx,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(d.current),i(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i(!0),o)},[o]),isPointerInTransitRef:u,onPointerInTransitChange:l.useCallback(f=>{u.current=f},[]),disableHoverableContent:r,children:a})};Of.displayName=Df;var No="Tooltip",[ix,xn]=xo(No),Lf=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,u=ha(No,e.__scopeTooltip),d=Co(t),[f,m]=l.useState(null),h=Ne(),p=l.useRef(0),b=s??u.disableHoverableContent,g=i??u.delayDuration,v=l.useRef(!1),[y=!1,w]=Ce({prop:o,defaultProp:r,onChange:M=>{M?(u.onOpen(),document.dispatchEvent(new CustomEvent(ga))):u.onClose(),a==null||a(M)}}),C=l.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),N=l.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,w(!0)},[w]),E=l.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w(!1)},[w]),A=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,w(!0),p.current=0},g)},[g,w]);return l.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),c.jsx(rn,{...d,children:c.jsx(ix,{scope:t,contentId:h,open:y,stateAttribute:C,trigger:f,onTriggerChange:m,onTriggerEnter:l.useCallback(()=>{u.isOpenDelayed?A():N()},[u.isOpenDelayed,A,N]),onTriggerLeave:l.useCallback(()=>{b?E():(window.clearTimeout(p.current),p.current=0)},[E,b]),onOpen:N,onClose:E,disableHoverableContent:b,children:n})})};Lf.displayName=No;var va="TooltipTrigger",Ff=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=xn(va,n),a=ha(va,n),s=Co(n),i=l.useRef(null),u=J(t,i,r.onTriggerChange),d=l.useRef(!1),f=l.useRef(!1),m=l.useCallback(()=>d.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),c.jsx(an,{asChild:!0,...s,children:c.jsx(L.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:u,onPointerMove:_(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:_(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:_(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:_(e.onFocus,()=>{d.current||r.onOpen()}),onBlur:_(e.onBlur,r.onClose),onClick:_(e.onClick,r.onClose)})})});Ff.displayName=va;var ba="TooltipPortal",[lx,cx]=xo(ba,{forceMount:void 0}),$f=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,a=xn(ba,t);return c.jsx(lx,{scope:t,forceMount:n,children:c.jsx(be,{present:n||a.open,children:c.jsx(Zt,{asChild:!0,container:r,children:o})})})};$f.displayName=ba;var Gt="TooltipContent",Vf=l.forwardRef((e,t)=>{const n=cx(Gt,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...a}=e,s=xn(Gt,e.__scopeTooltip);return c.jsx(be,{present:o||s.open,children:s.disableHoverableContent?c.jsx(Bf,{side:r,...a,ref:t}):c.jsx(ux,{side:r,...a,ref:t})})}),ux=l.forwardRef((e,t)=>{const n=xn(Gt,e.__scopeTooltip),o=ha(Gt,e.__scopeTooltip),r=l.useRef(null),a=J(t,r),[s,i]=l.useState(null),{trigger:u,onClose:d}=n,f=r.current,{onPointerInTransitChange:m}=o,h=l.useCallback(()=>{i(null),m(!1)},[m]),p=l.useCallback((b,g)=>{const v=b.currentTarget,y={x:b.clientX,y:b.clientY},w=mx(y,v.getBoundingClientRect()),C=gx(y,w),N=hx(g.getBoundingClientRect()),E=bx([...C,...N]);i(E),m(!0)},[m]);return l.useEffect(()=>()=>h(),[h]),l.useEffect(()=>{if(u&&f){const b=v=>p(v,f),g=v=>p(v,u);return u.addEventListener("pointerleave",b),f.addEventListener("pointerleave",g),()=>{u.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",g)}}},[u,f,p,h]),l.useEffect(()=>{if(s){const b=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},w=(u==null?void 0:u.contains(v))||(f==null?void 0:f.contains(v)),C=!vx(y,s);w?h():C&&(h(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[u,f,s,d,h]),c.jsx(Bf,{...e,ref:a})}),[dx,fx]=xo(No,{isInside:!1}),Bf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,u=xn(Gt,n),d=Co(n),{onClose:f}=u;return l.useEffect(()=>(document.addEventListener(ga,f),()=>document.removeEventListener(ga,f)),[f]),l.useEffect(()=>{if(u.trigger){const m=h=>{const p=h.target;p!=null&&p.contains(u.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[u.trigger,f]),c.jsx(wt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:c.jsxs(Zn,{"data-state":u.stateAttribute,...d,...i,ref:t,style:{...i.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:[c.jsx(Ro,{children:o}),c.jsx(dx,{scope:n,isInside:!0,children:c.jsx(Jc,{id:u.contentId,role:"tooltip",children:r||o})})]})})});Vf.displayName=Gt;var Wf="TooltipArrow",px=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Co(n);return fx(Wf,n).isInside?null:c.jsx(Qn,{...r,...o,ref:t})});px.displayName=Wf;function mx(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,r,a)){case a:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function gx(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function hx(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function vx(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,u=t[a].y,d=t[s].x,f=t[s].y;u>o!=f>o&&n<(d-i)*(o-u)/(f-u)+i&&(r=!r)}return r}function bx(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),yx(t)}function yx(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var wx=Of,xx=Lf,Cx=Ff,Nx=$f,zf=Vf;const Ex=wx,Sx=xx,Px=Cx,Gf=l.forwardRef(({className:e,sideOffset:t=4,...n},o)=>c.jsx(Nx,{children:c.jsx(zf,{ref:o,sideOffset:t,className:R("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Gf.displayName=zf.displayName;function Tx(e){const{triggerElement:t,steps:n}=e,[o,r]=S.useState(!1),[a,s]=S.useState(0),i=()=>{s(d=>d<n.length-1?d+1:d)},u=()=>{s(d=>d>0?d-1:d)};return c.jsxs(hr,{open:o,onOpenChange:r,children:[c.jsx(vl,{asChild:!0,children:t}),c.jsxs(eo,{className:"sm:max-w-[425px]",children:[c.jsxs(to,{className:R(n[a].title===""&&"sr-only"),children:[c.jsx(no,{children:n[a].title}),c.jsx(oo,{className:"sr-only",children:n[a].title})]}),c.jsx("div",{children:n[a].description}),c.jsxs("div",{className:"flex items-center justify-between mt-4",children:[c.jsx(Ge,{variant:"ghost",size:"icon",onClick:u,disabled:a===0,children:c.jsx(ti,{className:"h-4 w-4"})}),c.jsx("div",{className:"flex justify-center gap-1",children:n.map((d,f)=>c.jsx("div",{className:R("h-3 w-3 rounded-full",f===a?"bg-primary":"bg-gray-200")},f))}),c.jsx(Ge,{variant:"ghost",size:"icon",onClick:i,disabled:a===n.length-1,children:c.jsx(qo,{className:"h-4 w-4"})})]})]})]})}function ya(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Cn(e){return(t,n)=>{const o=n!=null&&n.context?String(n.context):"standalone";let r;if(o==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;r=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return r[a]}}function Nn(e){return(t,n={})=>{const o=n.width,r=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;const s=a[0],i=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(i)?Rx(i,m=>m.test(s)):Mx(i,m=>m.test(s));let d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(s.length);return{value:d,rest:f}}}function Mx(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Rx(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Ax(e){return(t,n={})=>{const o=t.match(e.matchPattern);if(!o)return null;const r=o[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(r.length);return{value:s,rest:i}}}const _x={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"}},Ix=(e,t,n)=>{let o;const r=_x[e];return typeof r=="string"?o=r:t===1?o=r.one:o=r.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o},kx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jx=(e,t,n,o)=>kx[e],Dx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ox={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lx={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"]},Fx={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"]},$x={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"}},Vx={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"}},Bx={ordinalNumber:(e,t)=>{const n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Cn({values:Dx,defaultWidth:"wide"}),quarter:Cn({values:Ox,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Cn({values:Lx,defaultWidth:"wide"}),day:Cn({values:Fx,defaultWidth:"wide"}),dayPeriod:Cn({values:$x,defaultWidth:"wide",formattingValues:Vx,defaultFormattingWidth:"wide"})},Wx=/^(\d+)(th|st|nd|rd)?/i,zx=/\d+/i,Gx={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},Hx={any:[/^b/i,/^(a|c)/i]},Ux={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Kx={any:[/1/i,/2/i,/3/i,/4/i]},Yx={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},Xx={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]},qx={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},Jx={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]},Zx={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},Qx={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}},e0={ordinalNumber:Ax({matchPattern:Wx,parsePattern:zx,valueCallback:e=>parseInt(e,10)}),era:Nn({matchPatterns:Gx,defaultMatchWidth:"wide",parsePatterns:Hx,defaultParseWidth:"any"}),quarter:Nn({matchPatterns:Ux,defaultMatchWidth:"wide",parsePatterns:Kx,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Nn({matchPatterns:Yx,defaultMatchWidth:"wide",parsePatterns:Xx,defaultParseWidth:"any"}),day:Nn({matchPatterns:qx,defaultMatchWidth:"wide",parsePatterns:Jx,defaultParseWidth:"any"}),dayPeriod:Nn({matchPatterns:Zx,defaultMatchWidth:"any",parsePatterns:Qx,defaultParseWidth:"any"})},t0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},n0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},o0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},r0={date:ya({formats:t0,defaultWidth:"full"}),time:ya({formats:n0,defaultWidth:"full"}),dateTime:ya({formats:o0,defaultWidth:"full"})},a0={code:"en-US",formatDistance:Ix,formatLong:r0,formatRelative:jx,localize:Bx,match:e0,options:{weekStartsOn:0,firstWeekContainsDate:1}},s0=e=>{const{currentMonth:t,currentYear:n,onChangeMonthYear:o,locale:r=a0}=e,a=s=>{let i=t,u=n;s==="prev"?i===0?(i=11,u--):i--:i===11?(i=0,u++):i++,o(i,u)};return c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(Ge,{variant:"ghost",size:"icon",onClick:()=>a("prev"),"aria-label":"Previous month",children:c.jsx(Ng,{className:"!h-8 !w-8"})}),c.jsxs("div",{className:"text-center",children:[c.jsx("h2",{className:"text-2xl font-bold capitalize",children:r.localize.month(t,{width:"wide"})}),c.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),c.jsx(Ge,{variant:"ghost",size:"icon",onClick:()=>a("next"),"aria-label":"Next month",children:c.jsx(Eg,{className:"!h-8 !w-8"})})]})};function i0({currentPage:e,totalPages:t,onPageChange:n}){const o=Array.from({length:t},(r,a)=>a+1);return c.jsx(Hr,{children:c.jsxs(Ur,{children:[c.jsx(vn,{children:c.jsx(Kr,{onClick:()=>n(Math.max(1,e-1)),disabled:e===1})}),o.map(r=>c.jsx(vn,{children:c.jsx(bn,{onClick:()=>n(r),isActive:e===r,children:r})},r)),c.jsx(vn,{children:c.jsx(Yr,{onClick:()=>n(Math.min(t,e+1)),disabled:e===t})})]})})}function l0(e,t=250){const[n,o]=S.useState(e);return S.useEffect(()=>{const r=setTimeout(()=>{o(e)},t);return()=>{clearTimeout(r)}},[e,t]),n}const Hf=l.createContext(void 0),Uf={sm:"sm:max-w-[425px]",md:"sm:max-w-[550px]",lg:"sm:max-w-[700px]",xl:"sm:max-w-[900px]"},Kf={info:{icon:Ig,className:"text-blue-500"},success:{icon:Tg,className:"text-green-500"},error:{icon:Mg,className:"text-red-500"},warning:{icon:Pg,className:"text-yellow-500"},confirm:{icon:ni,className:"text-blue-500"},custom:{icon:ni,className:"text-gray-500"}};function c0({children:e}){var p,b,g;const[t,n]=l.useState({isOpen:!1,options:null}),o=l.useCallback(v=>{n({isOpen:!0,options:v})},[]),r=l.useCallback(()=>{n(v=>({...v,isOpen:!1}))},[]),a=l.useCallback(v=>{o({...v,type:"info"})},[o]),s=l.useCallback(v=>{o({...v,type:"success"})},[o]),i=l.useCallback(v=>{o({...v,type:"error"})},[o]),u=l.useCallback(v=>{o({...v,type:"warning"})},[o]),d=l.useCallback(v=>{o({...v,type:"custom"})},[o]),f=l.useCallback(v=>{o({...v,type:"confirm"})},[o]),m=(v,y)=>{let w=Kf[v].icon;return y&&(w=y),c.jsx(w,{className:R("h-24 w-24",Kf[v].className)})},h=l.useMemo(()=>({open:o,close:r,info:a,success:s,error:i,warning:u,custom:d,confirm:f}),[o,r,a,s,i,u,d,f]);return c.jsxs(Hf.Provider,{value:h,children:[e,c.jsx(hr,{open:t.isOpen,onOpenChange:v=>!v&&r(),modal:!0,children:c.jsxs(eo,{className:R((p=t.options)!=null&&p.size?Uf[t.options.size]:Uf.sm,(b=t.options)==null?void 0:b.className),children:[t.options&&c.jsxs(to,{children:[c.jsx("div",{className:"mx-auto mb-6",children:m(t.options.type,t.options.icon)}),t.options.title&&c.jsx(no,{className:"text-center",children:t.options.title}),c.jsx(oo,{className:"text-center",children:t.options.message})]}),((g=t.options)==null?void 0:g.type)==="confirm"&&c.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[c.jsx(Ge,{onClick:()=>{var v,y;(y=(v=t.options)==null?void 0:v.onConfirm)==null||y.call(v),r()},children:t.options.confirmLabel||"Confirm"}),t.options.displayCancel&&c.jsx(Ge,{variant:"outline",onClick:r,children:t.options.cancelLabel||"Cancel"})]})]})})]})}function u0(){const e=l.useContext(Hf);if(e===void 0)throw new Error("useDialog must be used within a DialogProvider");return e}function d0(e){const[t,n]=S.useState(!1);return S.useEffect(()=>{const o=window.matchMedia(e);o.matches!==t&&n(o.matches);const r=()=>n(o.matches);return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[t,e]),t}const wa=768;function f0(){const[e,t]=l.useState(void 0);return l.useEffect(()=>{const n=window.matchMedia(`(max-width: ${wa-1}px)`),o=()=>{t(window.innerWidth<wa)};return n.addEventListener("change",o),t(window.innerWidth<wa),()=>n.removeEventListener("change",o)},[]),!!e}const p0=()=>{const[e,t]=S.useState(null),[n,o]=S.useState(!1);return S.useEffect(()=>((()=>{const s=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone;o(s)})(),window.addEventListener("beforeinstallprompt",s=>{s.preventDefault(),t(s)}),window.addEventListener("appinstalled",()=>{o(!0)}),()=>{window.removeEventListener("appinstalled",()=>o(!0))}),[]),{isPromptReady:!!e,isInstalled:n,showInstallPrompt:()=>{e&&(e.prompt(),e.userChoice.then(a=>{console.log(`User choice: ${a.outcome}`),t(null)}))}}};P.AdaptiveInput=Mn,P.AlertDialog=bg,P.AlertDialogAction=Zs,P.AlertDialogCancel=Qs,P.AlertDialogContent=Ks,P.AlertDialogDescription=Js,P.AlertDialogFooter=Xs,P.AlertDialogHeader=Ys,P.AlertDialogOverlay=Ko,P.AlertDialogPortal=Us,P.AlertDialogTitle=qs,P.AlertDialogTrigger=yg,P.Autocomplete=Qh,P.Avatar=el,P.AvatarFallback=nl,P.AvatarImage=tl,P.Badge=ov,P.Button=Ge,P.Card=rl,P.CardContent=ll,P.CardDescription=il,P.CardFooter=cl,P.CardHeader=al,P.CardTitle=sl,P.Checkbox=gl,P.CurrencyInput=hl,P.Dialog=hr,P.DialogClose=cv,P.DialogContent=eo,P.DialogDescription=oo,P.DialogFooter=yl,P.DialogHeader=to,P.DialogOverlay=vr,P.DialogPortal=bl,P.DialogProvider=c0,P.DialogTitle=no,P.DialogTrigger=vl,P.DropdownMenu=Ab,P.DropdownMenuCheckboxItem=Mc,P.DropdownMenuContent=Pc,P.DropdownMenuGroup=Ib,P.DropdownMenuItem=Tc,P.DropdownMenuLabel=Ac,P.DropdownMenuPortal=kb,P.DropdownMenuRadioGroup=Db,P.DropdownMenuRadioItem=Rc,P.DropdownMenuSeparator=_c,P.DropdownMenuShortcut=Ic,P.DropdownMenuSub=jb,P.DropdownMenuSubContent=Sc,P.DropdownMenuSubTrigger=Ec,P.DropdownMenuTrigger=_b,P.Form=ay,P.FormControl=Yc,P.FormDescription=Xc,P.FormField=sy,P.FormItem=Uc,P.FormLabel=Kc,P.FormMessage=qc,P.HelpCarousel=Tx,P.Input=Tn,P.Label=Ir,P.MonthNavigator=s0,P.NavigationMenu=Su,P.NavigationMenuContent=Ru,P.NavigationMenuIndicator=Au,P.NavigationMenuItem=Sy,P.NavigationMenuLink=Py,P.NavigationMenuList=Pu,P.NavigationMenuTrigger=Mu,P.NavigationMenuViewport=Gr,P.Pagination=Hr,P.PaginationContent=Ur,P.PaginationControls=i0,P.PaginationEllipsis=_u,P.PaginationItem=vn,P.PaginationLink=bn,P.PaginationNext=Yr,P.PaginationPrevious=Kr,P.PasswordInput=jy,P.Popover=zi,P.PopoverAnchor=Zh,P.PopoverContent=pr,P.PopoverTrigger=Gi,P.Progress=Jr,P.RadioGroup=Zu,P.RadioGroupItem=Qu,P.Select=gw,P.SelectContent=Ld,P.SelectGroup=hw,P.SelectItem=$d,P.SelectLabel=Fd,P.SelectScrollDownButton=ia,P.SelectScrollUpButton=sa,P.SelectSeparator=Vd,P.SelectTrigger=Od,P.SelectValue=vw,P.Skeleton=bw,P.Switch=Ud,P.Table=Kd,P.TableBody=Xd,P.TableCaption=ef,P.TableCell=Qd,P.TableFooter=qd,P.TableHead=Zd,P.TableHeader=Yd,P.TableRow=Jd,P.Tabs=Tw,P.TabsContent=vf,P.TabsList=gf,P.TabsTrigger=hf,P.Textarea=bf,P.Toaster=Qw,P.Toggle=Cf,P.ToggleGroup=kf,P.ToggleGroupItem=jf,P.Tooltip=Sx,P.TooltipContent=Gf,P.TooltipProvider=Ex,P.TooltipTrigger=Px,P.badgeVariants=ol,P.buttonVariants=en,P.cn=R,P.formatCurrency=Rp,P.formatDateAndMonth=Ip,P.formatDateAndWeekday=Ap,P.formatDateAndWeekdayAndYear=_p,P.formatLongDate=kp,P.formatShortDate=jp,P.formatWeekDayAndShortDate=Op,P.getMonthYearFromISODate=Dp,P.navigationMenuTriggerStyle=Tu,P.toast=Ww,P.toggleVariants=pa,P.useDebounce=l0,P.useDialog=u0,P.useFormField=hn,P.useIsMobile=f0,P.useMediaQuery=d0,P.usePWAInstall=p0,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
|
|
196
|
+
Defaulting to \`null\`.`}var cd=nd,Lx=od;const ua=c.forwardRef(({className:e,value:t,...n},r)=>l.jsx(cd,{ref:r,className:R("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:l.jsx(Lx,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));ua.displayName=cd.displayName;function $x(e){const{showStrengthMeter:t=!0,className:n,strengthLabels:r={veryWeak:"Very weak",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very strong"},showPasswordLabel:o="Show password",hidePasswordLabel:a="Hide password",strengthTitle:s="Password strength",...i}=e,[u,d]=S.useState(""),[f,p]=S.useState(!1),h=y=>{let w=0;return y.length>=8&&(w+=25),y.match(/[a-z]/)&&(w+=25),y.match(/[A-Z]/)&&(w+=25),y.match(/[0-9]/)&&(w+=25),w},m=y=>y===0?r.veryWeak:y<=25?r.weak:y<=50?r.medium:y<=75?r.strong:r.veryStrong,v=h(u),g=m(v),b=y=>{var w;d(y.target.value),(w=e.onChange)==null||w.call(e,y)};return l.jsxs("div",{className:"w-full space-y-4",children:[l.jsxs("div",{className:"relative",children:[l.jsx(In,{...i,type:f?"text":"password",value:u,onChange:b,className:`pr-10 ${n||""}`}),l.jsx(Ue,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full",onClick:()=>p(!f),"aria-label":f?a:o,children:f?l.jsx(eh,{className:"h-4 w-4"}):l.jsx(th,{className:"h-4 w-4"})})]}),t&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsxs("span",{children:[s,":"]}),l.jsx("span",{children:g})]}),l.jsx(ua,{value:v,className:"h-2"})]})]})}var da="Radio",[Wx,ld]=be(da),[Bx,Vx]=Wx(da),ud=c.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:u,form:d,...f}=e,[p,h]=c.useState(null),m=Q(t,b=>h(b)),v=c.useRef(!1),g=p?d||!!p.closest("form"):!0;return l.jsxs(Bx,{scope:n,checked:o,disabled:s,children:[l.jsx(F.button,{type:"button",role:"radio","aria-checked":o,"data-state":md(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:m,onClick:k(e.onClick,b=>{o||u==null||u(),g&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),g&&l.jsx(Gx,{control:p,bubbles:!v.current,name:r,value:i,checked:o,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});ud.displayName=da;var dd="RadioIndicator",fd=c.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=Vx(dd,n);return l.jsx(ye,{present:r||a.checked,children:l.jsx(F.span,{"data-state":md(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});fd.displayName=dd;var Gx=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=c.useRef(null),s=bn(n),i=sr(t);return c.useEffect(()=>{const u=a.current,d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&p){const h=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(h)}},[s,n,r]),l.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function md(e){return e?"checked":"unchecked"}var zx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fa="RadioGroup",[Hx,tN]=be(fa,[xt,ld]),pd=xt(),gd=ld(),[Yx,Ux]=Hx(fa),hd=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:u,dir:d,loop:f=!0,onValueChange:p,...h}=e,m=pd(n),v=At(d),[g,b]=Ne({prop:a,defaultProp:o,onChange:p});return l.jsx(Yx,{scope:n,name:r,required:s,disabled:i,value:g,onValueChange:b,children:l.jsx(hr,{asChild:!0,...m,orientation:u,dir:v,loop:f,children:l.jsx(F.div,{role:"radiogroup","aria-required":s,"aria-orientation":u,"data-disabled":i?"":void 0,dir:v,...h,ref:t})})})});hd.displayName=fa;var vd="RadioGroupItem",bd=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=Ux(vd,n),s=a.disabled||r,i=pd(n),u=gd(n),d=c.useRef(null),f=Q(t,d),p=a.value===o.value,h=c.useRef(!1);return c.useEffect(()=>{const m=g=>{zx.includes(g.key)&&(h.current=!0)},v=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",v)}},[]),l.jsx(vr,{asChild:!0,...i,focusable:!s,active:p,children:l.jsx(ud,{disabled:s,required:a.required,checked:p,...u,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:k(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:k(o.onFocus,()=>{var m;h.current&&((m=d.current)==null||m.click())})})})});bd.displayName=vd;var Kx="RadioGroupIndicator",yd=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=gd(n);return l.jsx(fd,{...o,...r,ref:t})});yd.displayName=Kx;var wd=hd,xd=bd,qx=yd;const Cd=c.forwardRef(({className:e,...t},n)=>l.jsx(wd,{className:R("grid gap-2",e),...t,ref:n}));Cd.displayName=wd.displayName;const Nd=c.forwardRef(({className:e,...t},n)=>l.jsx(xd,{ref:n,className:R("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(qx,{className:"flex items-center justify-center",children:l.jsx(pi,{className:"h-3.5 w-3.5 fill-primary"})})}));Nd.displayName=xd.displayName;function Ed(e,[t,n]){return Math.min(n,Math.max(t,e))}var Xx=[" ","Enter","ArrowUp","ArrowDown"],Qx=[" ","Enter"],Rn="Select",[Sr,Pr,Jx]=yn(Rn),[Qt,nN]=be(Rn,[Jx,vt]),Mr=vt(),[Zx,Nt]=Qt(Rn),[e0,t0]=Qt(Rn),Sd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:h,required:m,form:v}=e,g=Mr(t),[b,y]=c.useState(null),[w,C]=c.useState(null),[N,E]=c.useState(!1),A=At(d),[T=!1,_]=Ne({prop:r,defaultProp:o,onChange:a}),[j,B]=Ne({prop:s,defaultProp:i,onChange:u}),G=c.useRef(null),O=b?v||!!b.closest("form"):!0,[Y,V]=c.useState(new Set),re=Array.from(Y).map($=>$.props.value).join(";");return l.jsx(pn,{...g,children:l.jsxs(Zx,{required:m,scope:t,trigger:b,onTriggerChange:y,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:N,onValueNodeHasChildrenChange:E,contentId:Ee(),value:j,onValueChange:B,open:T,onOpenChange:_,dir:A,triggerPointerDownPosRef:G,disabled:h,children:[l.jsx(Sr.Provider,{scope:t,children:l.jsx(e0,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback($=>{V(z=>new Set(z).add($))},[]),onNativeOptionRemove:c.useCallback($=>{V(z=>{const W=new Set(z);return W.delete($),W})},[]),children:n})}),O?l.jsxs(Xd,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:j,onChange:$=>B($.target.value),disabled:h,form:v,children:[j===void 0?l.jsx("option",{value:""}):null,Array.from(Y)]},re):null]})})};Sd.displayName=Rn;var Pd="SelectTrigger",Md=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Mr(n),s=Nt(Pd,n),i=s.disabled||r,u=Q(t,s.onTriggerChange),d=Pr(n),f=c.useRef("touch"),[p,h,m]=Qd(g=>{const b=d().filter(C=>!C.disabled),y=b.find(C=>C.value===s.value),w=Jd(b,g,y);w!==void 0&&s.onValueChange(w.value)}),v=g=>{i||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return l.jsx(gn,{asChild:!0,...a,children:l.jsx(F.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":qd(s.value)?"":void 0,...o,ref:u,onClick:k(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&v(g)}),onPointerDown:k(o.onPointerDown,g=>{f.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:k(o.onKeyDown,g=>{const b=p.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(b&&g.key===" ")&&Xx.includes(g.key)&&(v(),g.preventDefault())})})})});Md.displayName=Pd;var Td="SelectValue",Rd=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,u=Nt(Td,n),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=Q(t,u.onValueNodeChange);return ve(()=>{d(f)},[d,f]),l.jsx(F.span,{...i,ref:p,style:{pointerEvents:"none"},children:qd(u.value)?l.jsx(l.Fragment,{children:s}):a})});Rd.displayName=Td;var n0="SelectIcon",Ad=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.jsx(F.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Ad.displayName=n0;var _t="SelectContent",kd=c.forwardRef((e,t)=>{const n=Nt(_t,e.__scopeSelect),[r,o]=c.useState();if(ve(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Dn.createPortal(l.jsx(_d,{scope:e.__scopeSelect,children:l.jsx(Sr.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx(Dd,{...e,ref:t})});kd.displayName=_t;var We=10,[_d,Et]=Qt(_t),r0="SelectContentImpl",Dd=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:b,...y}=e,w=Nt(_t,n),[C,N]=c.useState(null),[E,A]=c.useState(null),T=Q(t,D=>N(D)),[_,j]=c.useState(null),[B,G]=c.useState(null),O=Pr(n),[Y,V]=c.useState(!1),re=c.useRef(!1);c.useEffect(()=>{if(C)return Un(C)},[C]),$n();const $=c.useCallback(D=>{const[ae,...se]=O().map(ie=>ie.ref.current),[te]=se.slice(-1),oe=document.activeElement;for(const ie of D)if(ie===oe||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===ae&&E&&(E.scrollTop=0),ie===te&&E&&(E.scrollTop=E.scrollHeight),ie==null||ie.focus(),document.activeElement!==oe))return},[O,E]),z=c.useCallback(()=>$([_,C]),[$,_,C]);c.useEffect(()=>{Y&&z()},[Y,z]);const{onOpenChange:W,triggerPointerDownPosRef:M}=w;c.useEffect(()=>{if(C){let D={x:0,y:0};const ae=te=>{var oe,ie;D={x:Math.abs(Math.round(te.pageX)-(((oe=M.current)==null?void 0:oe.x)??0)),y:Math.abs(Math.round(te.pageY)-(((ie=M.current)==null?void 0:ie.y)??0))}},se=te=>{D.x<=10&&D.y<=10?te.preventDefault():C.contains(te.target)||W(!1),document.removeEventListener("pointermove",ae),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",ae),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",se,{capture:!0})}}},[C,W,M]),c.useEffect(()=>{const D=()=>W(!1);return window.addEventListener("blur",D),window.addEventListener("resize",D),()=>{window.removeEventListener("blur",D),window.removeEventListener("resize",D)}},[W]);const[H,J]=Qd(D=>{const ae=O().filter(oe=>!oe.disabled),se=ae.find(oe=>oe.ref.current===document.activeElement),te=Jd(ae,D,se);te&&setTimeout(()=>te.ref.current.focus())}),q=c.useCallback((D,ae,se)=>{const te=!re.current&&!se;(w.value!==void 0&&w.value===ae||te)&&(j(D),te&&(re.current=!0))},[w.value]),U=c.useCallback(()=>C==null?void 0:C.focus(),[C]),X=c.useCallback((D,ae,se)=>{const te=!re.current&&!se;(w.value!==void 0&&w.value===ae||te)&&G(D)},[w.value]),ue=r==="popper"?ma:jd,me=ue===ma?{side:i,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:b}:{};return l.jsx(_d,{scope:n,content:C,viewport:E,onViewportChange:A,itemRefCallback:q,selectedItem:_,onItemLeave:U,itemTextRefCallback:X,focusSelectedItem:z,selectedItemText:B,position:r,isPositioned:Y,searchRef:H,children:l.jsx(ln,{as:He,allowPinchZoom:!0,children:l.jsx(sn,{asChild:!0,trapped:w.open,onMountAutoFocus:D=>{D.preventDefault()},onUnmountAutoFocus:k(o,D=>{var ae;(ae=w.trigger)==null||ae.focus({preventScroll:!0}),D.preventDefault()}),children:l.jsx(Pt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:D=>D.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:l.jsx(ue,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:D=>D.preventDefault(),...y,...me,onPlaced:()=>V(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:k(y.onKeyDown,D=>{const ae=D.ctrlKey||D.altKey||D.metaKey;if(D.key==="Tab"&&D.preventDefault(),!ae&&D.key.length===1&&J(D.key),["ArrowUp","ArrowDown","Home","End"].includes(D.key)){let te=O().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(D.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(D.key)){const oe=D.target,ie=te.indexOf(oe);te=te.slice(ie+1)}setTimeout(()=>$(te)),D.preventDefault()}})})})})})})});Dd.displayName=r0;var o0="SelectItemAlignedPosition",jd=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Nt(_t,n),s=Et(_t,n),[i,u]=c.useState(null),[d,f]=c.useState(null),p=Q(t,T=>f(T)),h=Pr(n),m=c.useRef(!1),v=c.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:y,focusSelectedItem:w}=s,C=c.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&g&&b&&y){const T=a.trigger.getBoundingClientRect(),_=d.getBoundingClientRect(),j=a.valueNode.getBoundingClientRect(),B=y.getBoundingClientRect();if(a.dir!=="rtl"){const oe=B.left-_.left,ie=j.left-oe,we=T.left-ie,Pe=T.width+we,_e=Math.max(Pe,_.width),ct=window.innerWidth-We,Be=Ed(ie,[We,Math.max(We,ct-_e)]);i.style.minWidth=Pe+"px",i.style.left=Be+"px"}else{const oe=_.right-B.right,ie=window.innerWidth-j.right-oe,we=window.innerWidth-T.right-ie,Pe=T.width+we,_e=Math.max(Pe,_.width),ct=window.innerWidth-We,Be=Ed(ie,[We,Math.max(We,ct-_e)]);i.style.minWidth=Pe+"px",i.style.right=Be+"px"}const G=h(),O=window.innerHeight-We*2,Y=g.scrollHeight,V=window.getComputedStyle(d),re=parseInt(V.borderTopWidth,10),$=parseInt(V.paddingTop,10),z=parseInt(V.borderBottomWidth,10),W=parseInt(V.paddingBottom,10),M=re+$+Y+W+z,H=Math.min(b.offsetHeight*5,M),J=window.getComputedStyle(g),q=parseInt(J.paddingTop,10),U=parseInt(J.paddingBottom,10),X=T.top+T.height/2-We,ue=O-X,me=b.offsetHeight/2,D=b.offsetTop+me,ae=re+$+D,se=M-ae;if(ae<=X){const oe=G.length>0&&b===G[G.length-1].ref.current;i.style.bottom="0px";const ie=d.clientHeight-g.offsetTop-g.offsetHeight,we=Math.max(ue,me+(oe?U:0)+ie+z),Pe=ae+we;i.style.height=Pe+"px"}else{const oe=G.length>0&&b===G[0].ref.current;i.style.top="0px";const we=Math.max(X,re+g.offsetTop+(oe?q:0)+me)+se;i.style.height=we+"px",g.scrollTop=ae-X+g.offsetTop}i.style.margin=`${We}px 0`,i.style.minHeight=H+"px",i.style.maxHeight=O+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,a.trigger,a.valueNode,i,d,g,b,y,a.dir,r]);ve(()=>C(),[C]);const[N,E]=c.useState();ve(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const A=c.useCallback(T=>{T&&v.current===!0&&(C(),w==null||w(),v.current=!1)},[C,w]);return l.jsx(s0,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:A,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:l.jsx(F.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});jd.displayName=o0;var a0="SelectPopperPosition",ma=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=We,...a}=e,s=Mr(n);return l.jsx(ir,{...s,...a,ref:t,align:r,collisionPadding:o,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)"}})});ma.displayName=a0;var[s0,pa]=Qt(_t,{}),ga="SelectViewport",Id=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Et(ga,n),s=pa(ga,n),i=Q(t,a.onViewportChange),u=c.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Sr.Slot,{scope:n,children:l.jsx(F.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:k(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&p){const m=Math.abs(u.current-f.scrollTop);if(m>0){const v=window.innerHeight-We*2,g=parseFloat(p.style.minHeight),b=parseFloat(p.style.height),y=Math.max(g,b);if(y<v){const w=y+m,C=Math.min(v,w),N=w-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=N>0?N:0,p.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});Id.displayName=ga;var Od="SelectGroup",[i0,c0]=Qt(Od),Fd=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ee();return l.jsx(i0,{scope:n,id:o,children:l.jsx(F.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Fd.displayName=Od;var Ld="SelectLabel",$d=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=c0(Ld,n);return l.jsx(F.div,{id:o.id,...r,ref:t})});$d.displayName=Ld;var Tr="SelectItem",[l0,Wd]=Qt(Tr),Bd=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Nt(Tr,n),u=Et(Tr,n),d=i.value===r,[f,p]=c.useState(a??""),[h,m]=c.useState(!1),v=Q(t,w=>{var C;return(C=u.itemRefCallback)==null?void 0:C.call(u,w,r,o)}),g=Ee(),b=c.useRef("touch"),y=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(l0,{scope:n,value:r,disabled:o,textId:g,isSelected:d,onItemTextChange:c.useCallback(w=>{p(C=>C||((w==null?void 0:w.textContent)??"").trim())},[]),children:l.jsx(Sr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:l.jsx(F.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:k(s.onFocus,()=>m(!0)),onBlur:k(s.onBlur,()=>m(!1)),onClick:k(s.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:k(s.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:k(s.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:k(s.onPointerMove,w=>{var C;b.current=w.pointerType,o?(C=u.onItemLeave)==null||C.call(u):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:k(s.onPointerLeave,w=>{var C;w.currentTarget===document.activeElement&&((C=u.onItemLeave)==null||C.call(u))}),onKeyDown:k(s.onKeyDown,w=>{var N;((N=u.searchRef)==null?void 0:N.current)!==""&&w.key===" "||(Qx.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});Bd.displayName=Tr;var An="SelectItemText",Vd=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Nt(An,n),i=Et(An,n),u=Wd(An,n),d=t0(An,n),[f,p]=c.useState(null),h=Q(t,y=>p(y),u.onItemTextChange,y=>{var w;return(w=i.itemTextRefCallback)==null?void 0:w.call(i,y,u.value,u.disabled)}),m=f==null?void 0:f.textContent,v=c.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=d;return ve(()=>(g(v),()=>b(v)),[g,b,v]),l.jsxs(l.Fragment,{children:[l.jsx(F.span,{id:u.textId,...a,ref:h}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Dn.createPortal(a.children,s.valueNode):null]})});Vd.displayName=An;var Gd="SelectItemIndicator",zd=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Wd(Gd,n).isSelected?l.jsx(F.span,{"aria-hidden":!0,...r,ref:t}):null});zd.displayName=Gd;var ha="SelectScrollUpButton",Hd=c.forwardRef((e,t)=>{const n=Et(ha,e.__scopeSelect),r=pa(ha,e.__scopeSelect),[o,a]=c.useState(!1),s=Q(t,r.onScrollButtonChange);return ve(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollTop>0;a(d)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?l.jsx(Ud,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null});Hd.displayName=ha;var va="SelectScrollDownButton",Yd=c.forwardRef((e,t)=>{const n=Et(va,e.__scopeSelect),r=pa(va,e.__scopeSelect),[o,a]=c.useState(!1),s=Q(t,r.onScrollButtonChange);return ve(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<d;a(f)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?l.jsx(Ud,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null});Yd.displayName=va;var Ud=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Et("SelectScrollButton",n),s=c.useRef(null),i=Pr(n),u=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),ve(()=>{var f;const d=i().find(p=>p.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),l.jsx(F.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:k(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:k(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:k(o.onPointerLeave,()=>{u()})})}),u0="SelectSeparator",Kd=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(F.div,{"aria-hidden":!0,...r,ref:t})});Kd.displayName=u0;var ba="SelectArrow",d0=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Mr(n),a=Nt(ba,n),s=Et(ba,n);return a.open&&s.position==="popper"?l.jsx(cr,{...o,...r,ref:t}):null});d0.displayName=ba;function qd(e){return e===""||e===void 0}var Xd=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=c.useRef(null),a=Q(t,o),s=bn(n);return c.useEffect(()=>{const i=o.current,u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(s!==n&&f){const p=new Event("change",{bubbles:!0});f.call(i,n),i.dispatchEvent(p)}},[s,n]),l.jsx(Yo,{asChild:!0,children:l.jsx("select",{...r,ref:a,defaultValue:n})})});Xd.displayName="BubbleSelect";function Qd(e){const t=he(e),n=c.useRef(""),r=c.useRef(0),o=c.useCallback(s=>{const i=n.current+s;t(i),function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(i)},[t]),a=c.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Jd(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=f0(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const u=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function f0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var m0=Sd,Zd=Md,p0=Rd,g0=Ad,ef=kd,h0=Id,v0=Fd,tf=$d,nf=Bd,b0=Vd,y0=zd,rf=Hd,of=Yd,af=Kd;const w0=m0,x0=v0,C0=p0,sf=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Zd,{ref:r,className:R("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,l.jsx(g0,{asChild:!0,children:l.jsx(ao,{className:"h-4 w-4 opacity-50"})})]}));sf.displayName=Zd.displayName;const ya=c.forwardRef(({className:e,...t},n)=>l.jsx(rf,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(qg,{className:"h-4 w-4"})}));ya.displayName=rf.displayName;const wa=c.forwardRef(({className:e,...t},n)=>l.jsx(of,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(ao,{className:"h-4 w-4"})}));wa.displayName=of.displayName;const cf=c.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>l.jsxs(ef,{ref:o,className:R("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[l.jsx(ya,{}),l.jsx(h0,{className:R("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(wa,{})]}));cf.displayName=ef.displayName;const lf=c.forwardRef(({className:e,...t},n)=>l.jsx(tf,{ref:n,className:R("px-2 py-1.5 text-sm font-semibold",e),...t}));lf.displayName=tf.displayName;const uf=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(nf,{ref:r,className:R("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(y0,{children:l.jsx(oo,{className:"h-4 w-4"})})}),l.jsx(b0,{children:t})]}));uf.displayName=nf.displayName;const df=c.forwardRef(({className:e,...t},n)=>l.jsx(af,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));df.displayName=af.displayName;const N0=({className:e,repeat:t=1,...n})=>l.jsx(l.Fragment,{children:Array.from({length:t??1}).map((r,o)=>l.jsx("div",{className:R("animate-pulse rounded-md bg-gray-700/10",e),...n},o))});var xa="Switch",[E0,rN]=be(xa),[S0,P0]=E0(xa),ff=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:u="on",onCheckedChange:d,form:f,...p}=e,[h,m]=c.useState(null),v=Q(t,C=>m(C)),g=c.useRef(!1),b=h?f||!!h.closest("form"):!0,[y=!1,w]=Ne({prop:o,defaultProp:a,onChange:d});return l.jsxs(S0,{scope:n,checked:y,disabled:i,children:[l.jsx(F.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":gf(y),"data-disabled":i?"":void 0,disabled:i,value:u,...p,ref:v,onClick:k(e.onClick,C=>{w(N=>!N),b&&(g.current=C.isPropagationStopped(),g.current||C.stopPropagation())})}),b&&l.jsx(M0,{control:h,bubbles:!g.current,name:r,value:u,checked:y,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});ff.displayName=xa;var mf="SwitchThumb",pf=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=P0(mf,n);return l.jsx(F.span,{"data-state":gf(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});pf.displayName=mf;var M0=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=c.useRef(null),s=bn(n),i=sr(t);return c.useEffect(()=>{const u=a.current,d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&p){const h=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(h)}},[s,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function gf(e){return e?"checked":"unchecked"}var hf=ff,T0=pf;const vf=c.forwardRef(({className:e,...t},n)=>l.jsx(hf,{className:R("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm 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=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:l.jsx(T0,{className:R("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));vf.displayName=hf.displayName;const bf=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:n,className:R("w-full caption-bottom text-sm",e),...t})}));bf.displayName="Table";const yf=c.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:R("[&_tr]:border-b",e),...t}));yf.displayName="TableHeader";const wf=c.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:R("[&_tr:last-child]:border-0",e),...t}));wf.displayName="TableBody";const xf=c.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:R("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));xf.displayName="TableFooter";const Cf=c.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:R("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Cf.displayName="TableRow";const Nf=c.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:R("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Nf.displayName="TableHead";const Ef=c.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:R("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Ef.displayName="TableCell";const Sf=c.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:R("mt-4 text-sm text-muted-foreground",e),...t}));Sf.displayName="TableCaption";var Ca="Tabs",[R0,oN]=be(Ca,[xt]),Pf=xt(),[A0,Na]=R0(Ca),Mf=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:u="automatic",...d}=e,f=At(i),[p,h]=Ne({prop:r,onChange:o,defaultProp:a});return l.jsx(A0,{scope:n,baseId:Ee(),value:p,onValueChange:h,orientation:s,dir:f,activationMode:u,children:l.jsx(F.div,{dir:f,"data-orientation":s,...d,ref:t})})});Mf.displayName=Ca;var Tf="TabsList",Rf=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Na(Tf,n),s=Pf(n);return l.jsx(hr,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:l.jsx(F.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Rf.displayName=Tf;var Af="TabsTrigger",kf=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Na(Af,n),i=Pf(n),u=jf(s.baseId,r),d=If(s.baseId,r),f=r===s.value;return l.jsx(vr,{asChild:!0,...i,focusable:!o,active:f,children:l.jsx(F.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...a,ref:t,onMouseDown:k(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?s.onValueChange(r):p.preventDefault()}),onKeyDown:k(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&s.onValueChange(r)}),onFocus:k(e.onFocus,()=>{const p=s.activationMode!=="manual";!f&&!o&&p&&s.onValueChange(r)})})})});kf.displayName=Af;var _f="TabsContent",Df=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=Na(_f,n),u=jf(i.baseId,r),d=If(i.baseId,r),f=r===i.value,p=c.useRef(f);return c.useEffect(()=>{const h=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(ye,{present:o||f,children:({present:h})=>l.jsx(F.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:h&&a})})});Df.displayName=_f;function jf(e,t){return`${e}-trigger-${t}`}function If(e,t){return`${e}-content-${t}`}var k0=Mf,Of=Rf,Ff=kf,Lf=Df;const _0=k0,$f=c.forwardRef(({className:e,...t},n)=>l.jsx(Of,{ref:n,className:R("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));$f.displayName=Of.displayName;const Wf=c.forwardRef(({className:e,...t},n)=>l.jsx(Ff,{ref:n,className:R("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all 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=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Wf.displayName=Ff.displayName;const Bf=c.forwardRef(({className:e,...t},n)=>l.jsx(Lf,{ref:n,className:R("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Bf.displayName=Lf.displayName;const Vf=c.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:R("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Vf.displayName="Textarea";var D0=e=>{switch(e){case"success":return O0;case"info":return L0;case"warning":return F0;case"error":return $0;default:return null}},j0=Array(12).fill(0),I0=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},j0.map((n,r)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),O0=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),F0=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),L0=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),$0=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),W0=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),B0=()=>{let[e,t]=S.useState(document.hidden);return S.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Ea=1,V0=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Ea++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:n}),{...i,...e,id:o,dismissible:s,title:n}):i):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,s=r.then(async u=>{if(a=["resolve",u],S.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(z0(u)&&!u.ok){o=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:d,description:f})}else if(t.success!==void 0){o=!1;let d=typeof t.success=="function"?await t.success(u):t.success,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:d,description:f})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){o=!1;let d=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:d,description:f})}}).finally(()=>{var u;o&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),i=()=>new Promise((u,d)=>s.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:i}:Object.assign(n,{unwrap:i})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Ea++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},ke=new V0,G0=(e,t)=>{let n=(t==null?void 0:t.id)||Ea++;return ke.addToast({title:e,...t,id:n}),n},z0=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",H0=G0,Y0=()=>ke.toasts,U0=Object.assign(H0,{success:ke.success,info:ke.info,warning:ke.warning,error:ke.error,custom:ke.custom,message:ke.message,promise:ke.promise,dismiss:ke.dismiss,loading:ke.loading},{getHistory:Y0});function K0(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}K0(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
197
|
+
`);function Rr(e){return e.label!==void 0}var q0=3,X0="32px",Gf=4e3,Q0=356,J0=14,Z0=20,eC=200;function tC(...e){return e.filter(Boolean).join(" ")}var nC=e=>{var t,n,r,o,a,s,i,u,d,f,p;let{invert:h,toast:m,unstyled:v,interacting:g,setHeights:b,visibleToasts:y,heights:w,index:C,toasts:N,expanded:E,removeToast:A,defaultRichColors:T,closeButton:_,style:j,cancelButtonStyle:B,actionButtonStyle:G,className:O="",descriptionClassName:Y="",duration:V,position:re,gap:$,loadingIcon:z,expandByDefault:W,classNames:M,icons:H,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:q,cn:U}=e,[X,ue]=S.useState(!1),[me,D]=S.useState(!1),[ae,se]=S.useState(!1),[te,oe]=S.useState(!1),[ie,we]=S.useState(!1),[Pe,_e]=S.useState(0),[ct,Be]=S.useState(0),lt=S.useRef(m.duration||V||Gf),Ze=S.useRef(null),ut=S.useRef(null),x=C===0,L=C+1<=y,I=m.type,ne=m.dismissible!==!1,Ce=m.className||"",fe=m.descriptionClassName||"",K=S.useMemo(()=>w.findIndex(Z=>Z.toastId===m.id)||0,[w,m.id]),Ve=S.useMemo(()=>{var Z;return(Z=m.closeButton)!=null?Z:_},[m.closeButton,_]);S.useMemo(()=>m.duration||V||Gf,[m.duration,V]);let et=S.useRef(0),ge=S.useRef(0),tt=S.useRef(0),nt=S.useRef(null),[Ge,en]=re.split("-"),Ie=S.useMemo(()=>w.reduce((Z,le,pe)=>pe>=K?Z:Z+le.height,0),[w,K]),bm=B0(),BC=m.invert||h,Da=I==="loading";ge.current=S.useMemo(()=>K*$+Ie,[K,Ie]),S.useEffect(()=>{ue(!0)},[]),S.useEffect(()=>{let Z=ut.current;if(Z){let le=Z.getBoundingClientRect().height;return Be(le),b(pe=>[{toastId:m.id,height:le,position:m.position},...pe]),()=>b(pe=>pe.filter(ze=>ze.toastId!==m.id))}},[b,m.id]),S.useLayoutEffect(()=>{if(!X)return;let Z=ut.current,le=Z.style.height;Z.style.height="auto";let pe=Z.getBoundingClientRect().height;Z.style.height=le,Be(pe),b(ze=>ze.find(rt=>rt.toastId===m.id)?ze.map(rt=>rt.toastId===m.id?{...rt,height:pe}:rt):[{toastId:m.id,height:pe,position:m.position},...ze])},[X,m.title,m.description,b,m.id]);let St=S.useCallback(()=>{D(!0),_e(ge.current),b(Z=>Z.filter(le=>le.toastId!==m.id)),setTimeout(()=>{A(m)},eC)},[m,A,b,ge]);S.useEffect(()=>{if(m.promise&&I==="loading"||m.duration===1/0||m.type==="loading")return;let Z;return E||g||q&&bm?(()=>{if(tt.current<et.current){let le=new Date().getTime()-et.current;lt.current=lt.current-le}tt.current=new Date().getTime()})():lt.current!==1/0&&(et.current=new Date().getTime(),Z=setTimeout(()=>{var le;(le=m.onAutoClose)==null||le.call(m,m),St()},lt.current)),()=>clearTimeout(Z)},[E,g,m,I,q,bm,St]),S.useEffect(()=>{m.delete&&St()},[St,m.delete]);function VC(){var Z,le,pe;return H!=null&&H.loading?S.createElement("div",{className:U(M==null?void 0:M.loader,(Z=m==null?void 0:m.classNames)==null?void 0:Z.loader,"sonner-loader"),"data-visible":I==="loading"},H.loading):z?S.createElement("div",{className:U(M==null?void 0:M.loader,(le=m==null?void 0:m.classNames)==null?void 0:le.loader,"sonner-loader"),"data-visible":I==="loading"},z):S.createElement(I0,{className:U(M==null?void 0:M.loader,(pe=m==null?void 0:m.classNames)==null?void 0:pe.loader),visible:I==="loading"})}return S.createElement("li",{tabIndex:0,ref:ut,className:U(O,Ce,M==null?void 0:M.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,M==null?void 0:M.default,M==null?void 0:M[I],(n=m==null?void 0:m.classNames)==null?void 0:n[I]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:T,"data-styled":!(m.jsx||m.unstyled||v),"data-mounted":X,"data-promise":!!m.promise,"data-swiped":ie,"data-removed":me,"data-visible":L,"data-y-position":Ge,"data-x-position":en,"data-index":C,"data-front":x,"data-swiping":ae,"data-dismissible":ne,"data-type":I,"data-invert":BC,"data-swipe-out":te,"data-expanded":!!(E||W&&X),style:{"--index":C,"--toasts-before":C,"--z-index":N.length-C,"--offset":`${me?Pe:ge.current}px`,"--initial-height":W?"auto":`${ct}px`,...j,...m.style},onPointerDown:Z=>{Da||!ne||(Ze.current=new Date,_e(ge.current),Z.target.setPointerCapture(Z.pointerId),Z.target.tagName!=="BUTTON"&&(se(!0),nt.current={x:Z.clientX,y:Z.clientY}))},onPointerUp:()=>{var Z,le,pe,ze;if(te||!ne)return;nt.current=null;let rt=Number(((Z=ut.current)==null?void 0:Z.style.getPropertyValue("--swipe-amount").replace("px",""))||0),jr=new Date().getTime()-((le=Ze.current)==null?void 0:le.getTime()),GC=Math.abs(rt)/jr;if(Math.abs(rt)>=Z0||GC>.11){_e(ge.current),(pe=m.onDismiss)==null||pe.call(m,m),St(),oe(!0),we(!1);return}(ze=ut.current)==null||ze.style.setProperty("--swipe-amount","0px"),se(!1)},onPointerMove:Z=>{var le,pe;if(!nt.current||!ne)return;let ze=Z.clientY-nt.current.y,rt=((le=window.getSelection())==null?void 0:le.toString().length)>0,jr=Ge==="top"?Math.min(0,ze):Math.max(0,ze);Math.abs(jr)>0&&we(!0),!rt&&((pe=ut.current)==null||pe.style.setProperty("--swipe-amount",`${jr}px`))}},Ve&&!m.jsx?S.createElement("button",{"aria-label":J,"data-disabled":Da,"data-close-button":!0,onClick:Da||!ne?()=>{}:()=>{var Z;St(),(Z=m.onDismiss)==null||Z.call(m,m)},className:U(M==null?void 0:M.closeButton,(o=m==null?void 0:m.classNames)==null?void 0:o.closeButton)},(a=H==null?void 0:H.close)!=null?a:W0):null,m.jsx||S.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:S.createElement(S.Fragment,null,I||m.icon||m.promise?S.createElement("div",{"data-icon":"",className:U(M==null?void 0:M.icon,(s=m==null?void 0:m.classNames)==null?void 0:s.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||VC():null,m.type!=="loading"?m.icon||(H==null?void 0:H[I])||D0(I):null):null,S.createElement("div",{"data-content":"",className:U(M==null?void 0:M.content,(i=m==null?void 0:m.classNames)==null?void 0:i.content)},S.createElement("div",{"data-title":"",className:U(M==null?void 0:M.title,(u=m==null?void 0:m.classNames)==null?void 0:u.title)},typeof m.title=="function"?m.title():m.title),m.description?S.createElement("div",{"data-description":"",className:U(Y,fe,M==null?void 0:M.description,(d=m==null?void 0:m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),S.isValidElement(m.cancel)?m.cancel:m.cancel&&Rr(m.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||B,onClick:Z=>{var le,pe;Rr(m.cancel)&&ne&&((pe=(le=m.cancel).onClick)==null||pe.call(le,Z),St())},className:U(M==null?void 0:M.cancelButton,(f=m==null?void 0:m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,S.isValidElement(m.action)?m.action:m.action&&Rr(m.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||G,onClick:Z=>{var le,pe;Rr(m.action)&&((pe=(le=m.action).onClick)==null||pe.call(le,Z),!Z.defaultPrevented&&St())},className:U(M==null?void 0:M.actionButton,(p=m==null?void 0:m.classNames)==null?void 0:p.actionButton)},m.action.label):null))};function zf(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var rC=S.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:i,offset:u,theme:d="light",richColors:f,duration:p,style:h,visibleToasts:m=q0,toastOptions:v,dir:g=zf(),gap:b=J0,loadingIcon:y,icons:w,containerAriaLabel:C="Notifications",pauseWhenPageIsHidden:N,cn:E=tC}=e,[A,T]=S.useState([]),_=S.useMemo(()=>Array.from(new Set([r].concat(A.filter(q=>q.position).map(q=>q.position)))),[A,r]),[j,B]=S.useState([]),[G,O]=S.useState(!1),[Y,V]=S.useState(!1),[re,$]=S.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=S.useRef(null),W=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=S.useRef(null),H=S.useRef(!1),J=S.useCallback(q=>{T(U=>{var X;return(X=U.find(ue=>ue.id===q.id))!=null&&X.delete||ke.dismiss(q.id),U.filter(({id:ue})=>ue!==q.id)})},[]);return S.useEffect(()=>ke.subscribe(q=>{if(q.dismiss){T(U=>U.map(X=>X.id===q.id?{...X,delete:!0}:X));return}setTimeout(()=>{_n.flushSync(()=>{T(U=>{let X=U.findIndex(ue=>ue.id===q.id);return X!==-1?[...U.slice(0,X),{...U[X],...q},...U.slice(X+1)]:[q,...U]})})})}),[]),S.useEffect(()=>{if(d!=="system"){$(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;let q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:U})=>{$(U?"dark":"light")})}catch{q.addListener(({matches:X})=>{try{$(X?"dark":"light")}catch(ue){console.error(ue)}})}},[d]),S.useEffect(()=>{A.length<=1&&O(!1)},[A]),S.useEffect(()=>{let q=U=>{var X,ue;o.every(me=>U[me]||U.code===me)&&(O(!0),(X=z.current)==null||X.focus()),U.code==="Escape"&&(document.activeElement===z.current||(ue=z.current)!=null&&ue.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[o]),S.useEffect(()=>{if(z.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,H.current=!1)}},[z.current]),S.createElement("section",{"aria-label":`${C} ${W}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},_.map((q,U)=>{var X;let[ue,me]=q.split("-");return A.length?S.createElement("ol",{key:q,dir:g==="auto"?zf():g,tabIndex:-1,ref:z,className:i,"data-sonner-toaster":!0,"data-theme":re,"data-y-position":ue,"data-lifted":G&&A.length>1&&!a,"data-x-position":me,style:{"--front-toast-height":`${((X=j[0])==null?void 0:X.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||X0,"--width":`${Q0}px`,"--gap":`${b}px`,...h},onBlur:D=>{H.current&&!D.currentTarget.contains(D.relatedTarget)&&(H.current=!1,M.current&&(M.current.focus({preventScroll:!0}),M.current=null))},onFocus:D=>{D.target instanceof HTMLElement&&D.target.dataset.dismissible==="false"||H.current||(H.current=!0,M.current=D.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{Y||O(!1)},onPointerDown:D=>{D.target instanceof HTMLElement&&D.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},A.filter(D=>!D.position&&U===0||D.position===q).map((D,ae)=>{var se,te;return S.createElement(nC,{key:D.id,icons:w,index:ae,toast:D,defaultRichColors:f,duration:(se=v==null?void 0:v.duration)!=null?se:p,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:m,closeButton:(te=v==null?void 0:v.closeButton)!=null?te:s,interacting:Y,position:q,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:J,toasts:A.filter(oe=>oe.position==D.position),heights:j.filter(oe=>oe.position==D.position),setHeights:B,expandByDefault:a,gap:b,loadingIcon:y,expanded:G,pauseWhenPageIsHidden:N,cn:E})})):null}))});const oC=({...e})=>l.jsx(rC,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});var aC="Toggle",Sa=c.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...a}=e,[s=!1,i]=Ne({prop:n,onChange:o,defaultProp:r});return l.jsx(F.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:k(e.onClick,()=>{e.disabled||i(!s)})})});Sa.displayName=aC;var Hf=Sa;const Pa=It("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Yf=c.forwardRef(({className:e,variant:t,size:n,...r},o)=>l.jsx(Hf,{ref:o,className:R(Pa({variant:t,size:n,className:e})),...r}));Yf.displayName=Hf.displayName;var Jt="ToggleGroup",[Uf,aN]=be(Jt,[xt]),Kf=xt(),Ma=S.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return l.jsx(sC,{...o,ref:t})}if(n==="multiple"){const o=r;return l.jsx(iC,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Jt}\``)});Ma.displayName=Jt;var[qf,Xf]=Uf(Jt),sC=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=Ne({prop:n,defaultProp:r,onChange:o});return l.jsx(qf,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:i,onItemDeactivate:S.useCallback(()=>i(""),[i]),children:l.jsx(Qf,{...a,ref:t})})}),iC=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],i]=Ne({prop:n,defaultProp:r,onChange:o}),u=S.useCallback(f=>i((p=[])=>[...p,f]),[i]),d=S.useCallback(f=>i((p=[])=>p.filter(h=>h!==f)),[i]);return l.jsx(qf,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:d,children:l.jsx(Qf,{...a,ref:t})})});Ma.displayName=Jt;var[cC,lC]=Uf(Jt),Qf=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:i=!0,...u}=e,d=Kf(n),f=At(s),p={role:"group",dir:f,...u};return l.jsx(cC,{scope:n,rovingFocus:o,disabled:r,children:o?l.jsx(hr,{asChild:!0,...d,orientation:a,dir:f,loop:i,children:l.jsx(F.div,{...p,ref:t})}):l.jsx(F.div,{...p,ref:t})})}),Ar="ToggleGroupItem",Jf=S.forwardRef((e,t)=>{const n=Xf(Ar,e.__scopeToggleGroup),r=lC(Ar,e.__scopeToggleGroup),o=Kf(e.__scopeToggleGroup),a=n.value.includes(e.value),s=r.disabled||e.disabled,i={...e,pressed:a,disabled:s},u=S.useRef(null);return r.rovingFocus?l.jsx(vr,{asChild:!0,...o,focusable:!s,active:a,ref:u,children:l.jsx(Zf,{...i,ref:t})}):l.jsx(Zf,{...i,ref:t})});Jf.displayName=Ar;var Zf=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=Xf(Ar,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=a.type==="single"?s:void 0;return l.jsx(Sa,{...i,...o,ref:t,onPressedChange:u=>{u?a.onItemActivate(r):a.onItemDeactivate(r)}})}),em=Ma,tm=Jf;const nm=c.createContext({size:"default",variant:"default"}),rm=c.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>l.jsx(em,{ref:a,className:R("flex items-center justify-center gap-1",e),...o,children:l.jsx(nm.Provider,{value:{variant:t,size:n},children:r})}));rm.displayName=em.displayName;const om=c.forwardRef(({className:e,children:t,variant:n,size:r,...o},a)=>{const s=c.useContext(nm);return l.jsx(tm,{ref:a,className:R(Pa({variant:s.variant||n,size:s.size||r}),e),...o,children:t})});om.displayName=tm.displayName;var[kr,sN]=be("Tooltip",[vt]),_r=vt(),am="TooltipProvider",uC=700,Ta="tooltip.open",[dC,Ra]=kr(am),sm=e=>{const{__scopeTooltip:t,delayDuration:n=uC,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=c.useState(!0),u=c.useRef(!1),d=c.useRef(0);return c.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),l.jsx(dC,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(d.current),i(!1)},[]),onClose:c.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:c.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:a})};sm.displayName=am;var Dr="Tooltip",[fC,kn]=kr(Dr),im=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,u=Ra(Dr,e.__scopeTooltip),d=_r(t),[f,p]=c.useState(null),h=Ee(),m=c.useRef(0),v=s??u.disableHoverableContent,g=i??u.delayDuration,b=c.useRef(!1),[y=!1,w]=Ne({prop:r,defaultProp:o,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(Ta))):u.onClose(),a==null||a(T)}}),C=c.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),N=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b.current=!1,w(!0)},[w]),E=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),A=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{b.current=!0,w(!0),m.current=0},g)},[g,w]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),l.jsx(pn,{...d,children:l.jsx(fC,{scope:t,contentId:h,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayed?A():N()},[u.isOpenDelayed,A,N]),onTriggerLeave:c.useCallback(()=>{v?E():(window.clearTimeout(m.current),m.current=0)},[E,v]),onOpen:N,onClose:E,disableHoverableContent:v,children:n})})};im.displayName=Dr;var Aa="TooltipTrigger",cm=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=kn(Aa,n),a=Ra(Aa,n),s=_r(n),i=c.useRef(null),u=Q(t,i,o.onTriggerChange),d=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>d.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(gn,{asChild:!0,...s,children:l.jsx(F.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:k(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:k(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:k(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:k(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:k(e.onBlur,o.onClose),onClick:k(e.onClick,o.onClose)})})});cm.displayName=Aa;var ka="TooltipPortal",[mC,pC]=kr(ka,{forceMount:void 0}),lm=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=kn(ka,t);return l.jsx(mC,{scope:t,forceMount:n,children:l.jsx(ye,{present:n||a.open,children:l.jsx(cn,{asChild:!0,container:o,children:r})})})};lm.displayName=ka;var Zt="TooltipContent",um=c.forwardRef((e,t)=>{const n=pC(Zt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=kn(Zt,e.__scopeTooltip);return l.jsx(ye,{present:r||s.open,children:s.disableHoverableContent?l.jsx(dm,{side:o,...a,ref:t}):l.jsx(gC,{side:o,...a,ref:t})})}),gC=c.forwardRef((e,t)=>{const n=kn(Zt,e.__scopeTooltip),r=Ra(Zt,e.__scopeTooltip),o=c.useRef(null),a=Q(t,o),[s,i]=c.useState(null),{trigger:u,onClose:d}=n,f=o.current,{onPointerInTransitChange:p}=r,h=c.useCallback(()=>{i(null),p(!1)},[p]),m=c.useCallback((v,g)=>{const b=v.currentTarget,y={x:v.clientX,y:v.clientY},w=yC(y,b.getBoundingClientRect()),C=wC(y,w),N=xC(g.getBoundingClientRect()),E=NC([...C,...N]);i(E),p(!0)},[p]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(u&&f){const v=b=>m(b,f),g=b=>m(b,u);return u.addEventListener("pointerleave",v),f.addEventListener("pointerleave",g),()=>{u.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",g)}}},[u,f,m,h]),c.useEffect(()=>{if(s){const v=g=>{const b=g.target,y={x:g.clientX,y:g.clientY},w=(u==null?void 0:u.contains(b))||(f==null?void 0:f.contains(b)),C=!CC(y,s);w?h():C&&(h(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,f,s,d,h]),l.jsx(dm,{...e,ref:a})}),[hC,vC]=kr(Dr,{isInside:!1}),dm=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,u=kn(Zt,n),d=_r(n),{onClose:f}=u;return c.useEffect(()=>(document.addEventListener(Ta,f),()=>document.removeEventListener(Ta,f)),[f]),c.useEffect(()=>{if(u.trigger){const p=h=>{const m=h.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),l.jsx(Pt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(ir,{"data-state":u.stateAttribute,...d,...i,ref:t,style:{...i.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:[l.jsx($r,{children:r}),l.jsx(hC,{scope:n,isInside:!0,children:l.jsx(xu,{id:u.contentId,role:"tooltip",children:o||r})})]})})});um.displayName=Zt;var fm="TooltipArrow",bC=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=_r(n);return vC(fm,n).isInside?null:l.jsx(cr,{...o,...r,ref:t})});bC.displayName=fm;function yC(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function wC(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function xC(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function CC(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,u=t[a].y,d=t[s].x,f=t[s].y;u>r!=f>r&&n<(d-i)*(r-u)/(f-u)+i&&(o=!o)}return o}function NC(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),EC(t)}function EC(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var SC=sm,PC=im,MC=cm,TC=lm,mm=um;const RC=SC,AC=PC,kC=MC,pm=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(TC,{children:l.jsx(mm,{ref:r,sideOffset:t,className:R("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));pm.displayName=mm.displayName;function _C(e){const{triggerElement:t,steps:n}=e,[r,o]=S.useState(!1),[a,s]=S.useState(0),i=()=>{s(d=>d<n.length-1?d+1:d)},u=()=>{s(d=>d>0?d-1:d)};return l.jsxs(Ro,{open:r,onOpenChange:o,children:[l.jsx(Bc,{asChild:!0,children:t}),l.jsxs(dr,{className:"sm:max-w-[425px]",children:[l.jsxs(fr,{className:R(n[a].title===""&&"sr-only"),children:[l.jsx(mr,{children:n[a].title}),l.jsx(pr,{className:"sr-only",children:n[a].title})]}),l.jsx("div",{children:n[a].description}),l.jsxs("div",{className:"flex items-center justify-between mt-4",children:[l.jsx(Ue,{variant:"ghost",size:"icon",onClick:u,disabled:a===0,children:l.jsx(so,{className:"h-4 w-4"})}),l.jsx("div",{className:"flex justify-center gap-1",children:n.map((d,f)=>l.jsx("div",{className:R("h-3 w-3 rounded-full",f===a?"bg-primary":"bg-gray-200")},f))}),l.jsx(Ue,{variant:"ghost",size:"icon",onClick:i,disabled:a===n.length-1,children:l.jsx(Xn,{className:"h-4 w-4"})})]})]})]})}const DC=e=>{const{currentMonth:t,currentYear:n,onChangeMonthYear:r,locale:o=Po}=e,a=s=>{let i=t,u=n;s==="prev"?i===0?(i=11,u--):i--:i===11?(i=0,u++):i++,r(i,u)};return l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(Ue,{variant:"ghost",size:"icon",onClick:()=>a("prev"),"aria-label":"Previous month",children:l.jsx(Ug,{className:"!h-8 !w-8"})}),l.jsxs("div",{className:"text-center",children:[l.jsx("h2",{className:"text-2xl font-bold capitalize",children:o.localize.month(t,{width:"wide"})}),l.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),l.jsx(Ue,{variant:"ghost",size:"icon",onClick:()=>a("next"),"aria-label":"Next month",children:l.jsx(Kg,{className:"!h-8 !w-8"})})]})};function jC({currentPage:e,totalPages:t,onPageChange:n}){const r=Array.from({length:t},(o,a)=>a+1);return l.jsx(oa,{children:l.jsxs(aa,{children:[l.jsx(Mn,{children:l.jsx(sa,{onClick:()=>n(Math.max(1,e-1)),disabled:e===1})}),r.map(o=>l.jsx(Mn,{children:l.jsx(Tn,{onClick:()=>n(o),isActive:e===o,children:o})},o)),l.jsx(Mn,{children:l.jsx(ia,{onClick:()=>n(Math.min(t,e+1)),disabled:e===t})})]})})}function IC(e,t=250){const[n,r]=S.useState(e);return S.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}const gm=c.createContext(void 0),hm={sm:"sm:max-w-[425px]",md:"sm:max-w-[550px]",lg:"sm:max-w-[700px]",xl:"sm:max-w-[900px]"},vm={info:{icon:nh,className:"text-blue-500"},success:{icon:Qg,className:"text-green-500"},error:{icon:Jg,className:"text-red-500"},warning:{icon:Xg,className:"text-yellow-500"},confirm:{icon:mi,className:"text-blue-500"},custom:{icon:mi,className:"text-gray-500"}};function OC({children:e}){var m,v,g;const[t,n]=c.useState({isOpen:!1,options:null}),r=c.useCallback(b=>{n({isOpen:!0,options:b})},[]),o=c.useCallback(()=>{n(b=>({...b,isOpen:!1}))},[]),a=c.useCallback(b=>{r({...b,type:"info"})},[r]),s=c.useCallback(b=>{r({...b,type:"success"})},[r]),i=c.useCallback(b=>{r({...b,type:"error"})},[r]),u=c.useCallback(b=>{r({...b,type:"warning"})},[r]),d=c.useCallback(b=>{r({...b,type:"custom"})},[r]),f=c.useCallback(b=>{r({...b,type:"confirm"})},[r]),p=(b,y)=>{let w=vm[b].icon;return y&&(w=y),l.jsx(w,{className:R("h-24 w-24",vm[b].className)})},h=c.useMemo(()=>({open:r,close:o,info:a,success:s,error:i,warning:u,custom:d,confirm:f}),[r,o,a,s,i,u,d,f]);return l.jsxs(gm.Provider,{value:h,children:[e,l.jsx(Ro,{open:t.isOpen,onOpenChange:b=>!b&&o(),modal:!0,children:l.jsxs(dr,{className:R((m=t.options)!=null&&m.size?hm[t.options.size]:hm.sm,(v=t.options)==null?void 0:v.className),children:[t.options&&l.jsxs(fr,{children:[l.jsx("div",{className:"mx-auto mb-6",children:p(t.options.type,t.options.icon)}),t.options.title&&l.jsx(mr,{className:"text-center",children:t.options.title}),l.jsx(pr,{className:"text-center",children:t.options.message})]}),((g=t.options)==null?void 0:g.type)==="confirm"&&l.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[l.jsx(Ue,{onClick:()=>{var b,y;(y=(b=t.options)==null?void 0:b.onConfirm)==null||y.call(b),o()},children:t.options.confirmLabel||"Confirm"}),t.options.displayCancel&&l.jsx(Ue,{variant:"outline",onClick:o,children:t.options.cancelLabel||"Cancel"})]})]})})]})}function FC(){const e=c.useContext(gm);if(e===void 0)throw new Error("useDialog must be used within a DialogProvider");return e}function LC(e){const[t,n]=S.useState(!1);return S.useEffect(()=>{const r=window.matchMedia(e);r.matches!==t&&n(r.matches);const o=()=>n(r.matches);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[t,e]),t}const _a=768;function $C(){const[e,t]=c.useState(void 0);return c.useEffect(()=>{const n=window.matchMedia(`(max-width: ${_a-1}px)`),r=()=>{t(window.innerWidth<_a)};return n.addEventListener("change",r),t(window.innerWidth<_a),()=>n.removeEventListener("change",r)},[]),!!e}const WC=()=>{const[e,t]=S.useState(null),[n,r]=S.useState(!1);return S.useEffect(()=>((()=>{const s=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone;r(s)})(),window.addEventListener("beforeinstallprompt",s=>{s.preventDefault(),t(s)}),window.addEventListener("appinstalled",()=>{r(!0)}),()=>{window.removeEventListener("appinstalled",()=>r(!0))}),[]),{isPromptReady:!!e,isInstalled:n,showInstallPrompt:()=>{e&&(e.prompt(),e.userChoice.then(a=>{console.log(`User choice: ${a.outcome}`),t(null)}))}}};P.AdaptiveInput=On,P.AlertDialog=Vg,P.AlertDialogAction=ui,P.AlertDialogCancel=di,P.AlertDialogContent=ai,P.AlertDialogDescription=li,P.AlertDialogFooter=ii,P.AlertDialogHeader=si,P.AlertDialogOverlay=ro,P.AlertDialogPortal=oi,P.AlertDialogTitle=ci,P.AlertDialogTrigger=Gg,P.Autocomplete=Nv,P.Avatar=dc,P.AvatarFallback=mc,P.AvatarImage=fc,P.Badge=Mv,P.Button=Ue,P.Calendar=cy,P.Card=Tc,P.CardContent=_c,P.CardDescription=kc,P.CardFooter=Dc,P.CardHeader=Rc,P.CardTitle=Ac,P.Checkbox=$c,P.CurrencyInput=Wc,P.Dialog=Ro,P.DialogClose=py,P.DialogContent=dr,P.DialogDescription=pr,P.DialogFooter=Gc,P.DialogHeader=fr,P.DialogOverlay=Ao,P.DialogPortal=Vc,P.DialogProvider=OC,P.DialogTitle=mr,P.DialogTrigger=Bc,P.DropdownMenu=Iw,P.DropdownMenuCheckboxItem=Jl,P.DropdownMenuContent=Xl,P.DropdownMenuGroup=Fw,P.DropdownMenuItem=Ql,P.DropdownMenuLabel=eu,P.DropdownMenuPortal=Lw,P.DropdownMenuRadioGroup=Ww,P.DropdownMenuRadioItem=Zl,P.DropdownMenuSeparator=tu,P.DropdownMenuShortcut=nu,P.DropdownMenuSub=$w,P.DropdownMenuSubContent=ql,P.DropdownMenuSubTrigger=Kl,P.DropdownMenuTrigger=Ow,P.Form=ux,P.FormControl=bu,P.FormDescription=yu,P.FormField=dx,P.FormItem=hu,P.FormLabel=vu,P.FormMessage=wu,P.HelpCarousel=_C,P.Input=In,P.Label=Ho,P.MonthNavigator=DC,P.NavigationMenu=qu,P.NavigationMenuContent=Zu,P.NavigationMenuIndicator=ed,P.NavigationMenuItem=Ax,P.NavigationMenuLink=kx,P.NavigationMenuList=Xu,P.NavigationMenuTrigger=Ju,P.NavigationMenuViewport=ra,P.Pagination=oa,P.PaginationContent=aa,P.PaginationControls=jC,P.PaginationEllipsis=td,P.PaginationItem=Mn,P.PaginationLink=Tn,P.PaginationNext=ia,P.PaginationPrevious=sa,P.PasswordInput=$x,P.Popover=ec,P.PopoverAnchor=Cv,P.PopoverContent=Eo,P.PopoverTrigger=tc,P.Progress=ua,P.RadioGroup=Cd,P.RadioGroupItem=Nd,P.Select=w0,P.SelectContent=cf,P.SelectGroup=x0,P.SelectItem=uf,P.SelectLabel=lf,P.SelectScrollDownButton=wa,P.SelectScrollUpButton=ya,P.SelectSeparator=df,P.SelectTrigger=sf,P.SelectValue=C0,P.Skeleton=N0,P.Switch=vf,P.Table=bf,P.TableBody=wf,P.TableCaption=Sf,P.TableCell=Ef,P.TableFooter=xf,P.TableHead=Nf,P.TableHeader=yf,P.TableRow=Cf,P.Tabs=_0,P.TabsContent=Bf,P.TabsList=$f,P.TabsTrigger=Wf,P.Textarea=Vf,P.Toaster=oC,P.Toggle=Yf,P.ToggleGroup=rm,P.ToggleGroupItem=om,P.Tooltip=AC,P.TooltipContent=pm,P.TooltipProvider=RC,P.TooltipTrigger=kC,P.badgeVariants=pc,P.buttonVariants=un,P.cn=R,P.formatCurrency=Zm,P.formatDateAndMonth=np,P.formatDateAndWeekday=ep,P.formatDateAndWeekdayAndYear=tp,P.formatLongDate=rp,P.formatShortDate=op,P.formatWeekDayAndShortDate=sp,P.getMonthYearFromISODate=ap,P.navigationMenuTriggerStyle=Qu,P.toast=U0,P.toggleVariants=Pa,P.useDebounce=IC,P.useDialog=FC,P.useFormField=Pn,P.useIsMobile=$C,P.useMediaQuery=LC,P.usePWAInstall=WC,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
|