@ttianqii/takaui 0.0.7 → 0.0.8
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/takaui.cjs +11 -11
- package/dist/takaui.js +6392 -5648
- package/package.json +2 -6
- package/dist/takaui.css +0 -1
package/dist/takaui.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("react"),Ws=require("react-dom");function Vs(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 l=Vs(J),Zt=Vs(Ws);var hn={exports:{}},Ft={};var zo;function Xl(){if(zo)return Ft;zo=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var i=null;if(s!==void 0&&(i=""+s),o.key!==void 0&&(i=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:i,ref:o!==void 0?o:null,props:s}}return Ft.Fragment=t,Ft.jsx=n,Ft.jsxs=n,Ft}var Lt={};var Ho;function Jl(){return Ho||(Ho=1,process.env.NODE_ENV!=="production"&&(function(){function e(D){if(D==null)return null;if(typeof D=="function")return D.$$typeof===k?null:D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){case x:return"Fragment";case w:return"Profiler";case v:return"StrictMode";case I:return"Suspense";case O:return"SuspenseList";case E:return"Activity"}if(typeof D=="object")switch(typeof D.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),D.$$typeof){case m:return"Portal";case S:return D.displayName||"Context";case C:return(D._context.displayName||"Context")+".Consumer";case T:var z=D.render;return D=D.displayName,D||(D=z.displayName||z.name||"",D=D!==""?"ForwardRef("+D+")":"ForwardRef"),D;case b:return z=D.displayName||null,z!==null?z:e(D.type)||"Memo";case j:z=D._payload,D=D._init;try{return e(D(z))}catch{}}return null}function t(D){return""+D}function n(D){try{t(D);var z=!1}catch{z=!0}if(z){z=console;var K=z.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&D[Symbol.toStringTag]||D.constructor.name||"Object";return K.call(z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",X),t(D)}}function r(D){if(D===x)return"<>";if(typeof D=="object"&&D!==null&&D.$$typeof===j)return"<...>";try{var z=e(D);return z?"<"+z+">":"<...>"}catch{return"<...>"}}function o(){var D=P.A;return D===null?null:D.getOwner()}function s(){return Error("react-stack-top-frame")}function i(D){if(L.call(D,"key")){var z=Object.getOwnPropertyDescriptor(D,"key").get;if(z&&z.isReactWarning)return!1}return D.key!==void 0}function c(D,z){function K(){_||(_=!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)",z))}K.isReactWarning=!0,Object.defineProperty(D,"key",{get:K,configurable:!0})}function u(){var D=e(this.type);return F[D]||(F[D]=!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.")),D=this.props.ref,D!==void 0?D:null}function d(D,z,K,X,le,ue){var A=K.ref;return D={$$typeof:y,type:D,key:z,props:K,_owner:X},(A!==void 0?A:null)!==null?Object.defineProperty(D,"ref",{enumerable:!1,get:u}):Object.defineProperty(D,"ref",{enumerable:!1,value:null}),D._store={},Object.defineProperty(D._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(D,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(D,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty(D,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ue}),Object.freeze&&(Object.freeze(D.props),Object.freeze(D)),D}function p(D,z,K,X,le,ue){var A=z.children;if(A!==void 0)if(X)if(N(A)){for(X=0;X<A.length;X++)f(A[X]);Object.freeze&&Object.freeze(A)}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 f(A);if(L.call(z,"key")){A=e(D);var Q=Object.keys(z).filter(function(ee){return ee!=="key"});X=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",re[A+X]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,X,$,ee,$),Q[$+X]=!0)}if($=null,q!==void 0&&(n(q),$=""+q),i(Y)&&(n(Y.key),$=""+Y.key),"key"in Y){q={};for(var ae in Y)ae!=="key"&&(q[ae]=Y[ae])}else q=Y;return $&&c(q,typeof j=="function"?j.displayName||j.name||"Unknown":j),d(j,$,q,o(),ce,le)}function f(j){h(j)?j._store&&(j._store.validated=1):typeof j=="object"&&j!==null&&j.$$typeof===M&&(j._payload.status==="fulfilled"?h(j._payload.value)&&j._payload.value._store&&(j._payload.value._store.validated=1):j._store&&(j._store.validated=1))}function h(j){return typeof j=="object"&&j!==null&&j.$$typeof===v}var g=U,v=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),w=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),C=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Object.prototype.hasOwnProperty,N=Array.isArray,H=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(j){return j()}};var O,L={},A=g.react_stack_bottom_frame.bind(g,s)(),_=H(r(s)),Q={};Lt.Fragment=x,Lt.jsx=function(j,Y,q){var X=1e4>C.recentlyCreatedOwnerStacks++;return p(j,Y,q,!1,X?Error("react-stack-top-frame"):A,X?H(r(j)):_)},Lt.jsxs=function(j,Y,q){var X=1e4>C.recentlyCreatedOwnerStacks++;return p(j,Y,q,!0,X?Error("react-stack-top-frame"):A,X?H(r(j)):_)}})()),Lt}var Po;function dl(){return Po||(Po=1,process.env.NODE_ENV==="production"?pn.exports=ll():pn.exports=ul()),pn.exports}var a=dl();function Ro(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ue(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Ro(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ro(e[o],null)}}}}function oe(...e){return l.useCallback(ue(...e),e)}var fl=Symbol.for("react.lazy"),Sn=l[" use ".trim().toString()];function pl(e){return typeof e=="object"&&e!==null&&"then"in e}function Ns(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===fl&&"_payload"in e&&pl(e._payload)}function Es(e){const t=hl(e),n=l.forwardRef((r,o)=>{let{children:s,...i}=r;Ns(s)&&typeof Sn=="function"&&(s=Sn(s._payload));const c=l.Children.toArray(s),u=c.find(xl);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var ml=Es("Slot");function hl(e){const t=l.forwardRef((n,r)=>{let{children:o,...s}=n;if(Ns(o)&&typeof Sn=="function"&&(o=Sn(o._payload)),l.isValidElement(o)){const i=yl(o),c=vl(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gl=Symbol("radix.slottable");function xl(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gl}function vl(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function yl(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function js(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=js(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ps(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=js(e))&&(r&&(r+=" "),r+=t);return r}const Mo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Do=Ps,bl=(e,t)=>n=>{var r;if(t?.variants==null)return Do(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(d=>{const p=n?.[d],f=s?.[d];if(p===null)return null;const h=Mo(p)||Mo(f);return o[d][h]}),c=n&&Object.entries(n).reduce((d,p)=>{let[f,h]=p;return h===void 0||(d[f]=h),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,p)=>{let{class:f,className:h,...g}=p;return Object.entries(g).every(v=>{let[m,x]=v;return Array.isArray(x)?x.includes({...s,...c}[m]):{...s,...c}[m]===x})?[...d,f,h]:d},[]);return Do(e,i,u,n?.class,n?.className)},Lr="-",wl=e=>{const t=Sl(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const c=i.split(Lr);return c[0]===""&&c.length!==1&&c.shift(),Rs(c,t)||Cl(i)},getConflictingClassGroupIds:(i,c)=>{const u=n[i]||[];return c&&r[i]?[...u,...r[i]]:u}}},Rs=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Rs(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Lr);return t.validators.find(({validator:i})=>i(s))?.classGroupId},To=/^\[(.+)\]$/,Cl=e=>{if(To.test(e)){const t=To.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Sl=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return El(Object.entries(e.classGroups),n).forEach(([s,i])=>{Nr(i,r,s,t)}),r},Nr=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:ko(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Nl(o)){Nr(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Nr(i,ko(t,s),n,r)})})},ko=(e,t)=>{let n=e;return t.split(Lr).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Nl=e=>e.isThemeGetter,El=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,c])=>[t+i,c])):s);return[n,o]}):e,jl=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Ms="!",Pl=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=c=>{const u=[];let d=0,p=0,f;for(let x=0;x<c.length;x++){let y=c[x];if(d===0){if(y===o&&(r||c.slice(x,x+s)===t)){u.push(c.slice(p,x)),p=x+s;continue}if(y==="/"){f=x;continue}}y==="["?d++:y==="]"&&d--}const h=u.length===0?c:c.substring(p),g=h.startsWith(Ms),v=g?h.substring(1):h,m=f&&f>p?f-p:void 0;return{modifiers:u,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:m}};return n?c=>n({className:c,parseClassName:i}):i},Rl=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},Ml=e=>({cache:jl(e.cacheSize),parseClassName:Pl(e),...wl(e)}),Dl=/\s+/,Tl=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(Dl);let c="";for(let u=i.length-1;u>=0;u-=1){const d=i[u],{modifiers:p,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:g}=n(d);let v=!!g,m=r(v?h.substring(0,g):h);if(!m){if(!v){c=d+(c.length>0?" "+c:c);continue}if(m=r(h),!m){c=d+(c.length>0?" "+c:c);continue}v=!1}const x=Rl(p).join(":"),y=f?x+Ms:x,b=y+m;if(s.includes(b))continue;s.push(b);const S=o(m,v);for(let w=0;w<S.length;++w){const T=S[w];s.push(y+T)}c=d+(c.length>0?" "+c:c)}return c};function kl(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ds(t))&&(r&&(r+=" "),r+=n);return r}const Ds=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ds(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ol(e,...t){let n,r,o,s=i;function i(u){const d=t.reduce((p,f)=>f(p),e());return n=Ml(d),r=n.cache.get,o=n.cache.set,s=c,c(u)}function c(u){const d=r(u);if(d)return d;const p=Tl(u,n);return o(u,p),p}return function(){return s(kl.apply(null,arguments))}}const ie=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ts=/^\[(?:([a-z-]+):)?(.+)\]$/i,_l=/^\d+\/\d+$/,Al=new Set(["px","full","screen"]),Il=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$l=/\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$/,Fl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ll=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ve=e=>Et(e)||Al.has(e)||_l.test(e),Ue=e=>Dt(e,"length",Kl),Et=e=>!!e&&!Number.isNaN(Number(e)),ur=e=>Dt(e,"number",Et),Wt=e=>!!e&&Number.isInteger(Number(e)),Vl=e=>e.endsWith("%")&&Et(e.slice(0,-1)),Z=e=>Ts.test(e),Ke=e=>Il.test(e),Hl=new Set(["length","size","percentage"]),Bl=e=>Dt(e,Hl,ks),zl=e=>Dt(e,"position",ks),Yl=new Set(["image","url"]),Gl=e=>Dt(e,Yl,Xl),Ul=e=>Dt(e,"",ql),Vt=()=>!0,Dt=(e,t,n)=>{const r=Ts.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Kl=e=>$l.test(e)&&!Fl.test(e),ks=()=>!1,ql=e=>Ll.test(e),Xl=e=>Wl.test(e),Jl=()=>{const e=ie("colors"),t=ie("spacing"),n=ie("blur"),r=ie("brightness"),o=ie("borderColor"),s=ie("borderRadius"),i=ie("borderSpacing"),c=ie("borderWidth"),u=ie("contrast"),d=ie("grayscale"),p=ie("hueRotate"),f=ie("invert"),h=ie("gap"),g=ie("gradientColorStops"),v=ie("gradientColorStopPositions"),m=ie("inset"),x=ie("margin"),y=ie("opacity"),b=ie("padding"),S=ie("saturate"),w=ie("scale"),T=ie("sepia"),V=ie("skew"),k=ie("space"),P=ie("translate"),M=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",Z,t],C=()=>[Z,t],W=()=>["",Ve,Ue],N=()=>["auto",Et,Z],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",Z],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[Et,Z];return{cacheSize:500,separator:":",theme:{colors:[Vt],spacing:[Ve,Ue],blur:["none","",Ke,Z],brightness:j(),borderColor:[e],borderRadius:["none","","full",Ke,Z],borderSpacing:C(),borderWidth:W(),contrast:j(),grayscale:_(),hueRotate:j(),invert:_(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Vl,Ue],inset:D(),margin:D(),opacity:j(),padding:C(),saturate:j(),scale:j(),sepia:_(),skew:j(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",Z]}],container:["container"],columns:[{columns:[Ke]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:[...H(),Z]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wt,Z]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Z]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",Wt,Z]}],"grid-cols":[{"grid-cols":[Vt]}],"col-start-end":[{col:["auto",{span:["full",Wt,Z]},Z]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[Vt]}],"row-start-end":[{row:["auto",{span:[Wt,Z]},Z]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Z]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Z,t]}],"min-w":[{"min-w":[Z,t,"min","max","fit"]}],"max-w":[{"max-w":[Z,t,"none","full","min","max","fit","prose",{screen:[Ke]},Ke]}],h:[{h:[Z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ke,Ue]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ur]}],"font-family":[{font:[Vt]}],"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",Z]}],"line-clamp":[{"line-clamp":["none",Et,ur]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ve,Z]}],"list-image":[{"list-image":["none",Z]}],"list-style-type":[{list:["none","disc","decimal",Z]}],"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:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ve,Ue]}],"underline-offset":[{"underline-offset":["auto",Ve,Z]}],"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:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z]}],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",Z]}],"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:[...H(),zl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Bl]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Gl]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:O()}],"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:["",...O()]}],"outline-offset":[{"outline-offset":[Ve,Z]}],"outline-w":[{outline:[Ve,Ue]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Ve,Ue]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ke,Ul]}],"shadow-color":[{shadow:[Vt]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ke,Z]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[T]}],"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":[p]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Z]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",Z]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",Z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Wt,Z]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[V]}],"skew-y":[{"skew-y":[V]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Z]}],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",Z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",Z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ve,Ue,ur]}],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"]}}},Zl=Ol(Jl);function F(...e){return Zl(Ps(e))}const Ql=bl("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 cursor-pointer active:scale-95",{variants:{variant:{default:"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800",destructive:"bg-red-600 text-white hover:bg-red-700 active:bg-red-800",outline:"border border-gray-300 bg-white hover:bg-gray-50 active:bg-gray-100",secondary:"bg-gray-200 text-gray-900 hover:bg-gray-300 active:bg-gray-400",ghost:"hover:bg-gray-100 active:bg-gray-200",link:"text-blue-600 underline-offset-4 hover:underline hover:text-blue-700"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md gap-1.5 px-3 text-xs",lg:"h-10 rounded-md px-6",icon:"h-9 w-9","icon-sm":"h-8 w-8","icon-lg":"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});function G({className:e,variant:t,size:n,asChild:r=!1,...o}){const s=r?ml:"button";return a.jsx(s,{"data-slot":"button",suppressHydrationWarning:!0,className:F(Ql({variant:t,size:n,className:e})),...o})}function eu(e,t){const n=l.createContext(t),r=s=>{const{children:i,...c}=s,u=l.useMemo(()=>c,Object.values(c));return a.jsx(n.Provider,{value:u,children:i})};r.displayName=e+"Provider";function o(s){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Ge(e,t=[]){let n=[];function r(s,i){const c=l.createContext(i),u=n.length;n=[...n,i];const d=f=>{const{scope:h,children:g,...v}=f,m=h?.[e]?.[u]||c,x=l.useMemo(()=>v,Object.values(v));return a.jsx(m.Provider,{value:x,children:g})};d.displayName=s+"Provider";function p(f,h){const g=h?.[e]?.[u]||c,v=l.useContext(g);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,p]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(c){const u=c?.[e]||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,tu(o,...t)]}function tu(...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(s){const i=r.reduce((c,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...c,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var pe=globalThis?.document?l.useLayoutEffect:()=>{},nu=l[" useInsertionEffect ".trim().toString()]||pe;function et({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=ru({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const p=l.useRef(e!==void 0);l.useEffect(()=>{const f=p.current;f!==c&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const d=l.useCallback(p=>{if(c){const f=ou(p)?p(e):p;f!==e&&i.current?.(f)}else s(p)},[c,e,s,i]);return[u,d]}function ru({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return nu(()=>{s.current=t},[t]),l.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function ou(e){return typeof e=="function"}function Os(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])}function _s(e){const[t,n]=l.useState(void 0);return pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,c;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function su(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var ke=e=>{const{present:t,children:n}=e,r=au(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=oe(r.ref,iu(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};ke.displayName="Presence";function au(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,u]=su(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=mn(r.current);s.current=c==="mounted"?d:"none"},[c]),pe(()=>{const d=r.current,p=o.current;if(p!==e){const h=s.current,g=mn(d);e?u("MOUNT"):g==="none"||d?.display==="none"?u("UNMOUNT"):u(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),pe(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,f=g=>{const m=mn(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=g=>{g.target===t&&(s.current=mn(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function mn(e){return e?.animationName||"none"}function iu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function cu(e){const t=lu(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(du);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function lu(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=pu(o),c=fu(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uu=Symbol("radix.slottable");function du(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uu}function fu(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function pu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wr=mu.reduce((e,t)=>{const n=cu(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),_n="Checkbox",[hu]=Ge(_n),[gu,Vr]=hu(_n);function xu(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:c,onCheckedChange:u,required:d,value:p="on",internal_do_not_use_render:f}=e,[h,g]=et({prop:n,defaultProp:o??!1,onChange:u,caller:_n}),[v,m]=l.useState(null),[x,y]=l.useState(null),b=l.useRef(!1),S=v?!!i||!!v.closest("form"):!0,w={checked:h,disabled:s,setChecked:g,control:v,setControl:m,name:c,form:i,value:p,hasConsumerStoppedPropagationRef:b,required:d,defaultChecked:Qe(o)?!1:o,isFormControl:S,bubbleInput:x,setBubbleInput:y};return a.jsx(gu,{scope:t,...w,children:vu(f)?f(w):r})}var As="CheckboxTrigger",Is=l.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:c,checked:u,required:d,setControl:p,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:v}=Vr(As,e),m=oe(o,p),x=l.useRef(u);return l.useEffect(()=>{const y=s?.form;if(y){const b=()=>f(x.current);return y.addEventListener("reset",b),()=>y.removeEventListener("reset",b)}},[s,f]),a.jsx(Wr.button,{type:"button",role:"checkbox","aria-checked":Qe(u)?"mixed":u,"aria-required":d,"data-state":Vs(u),"data-disabled":c?"":void 0,disabled:c,value:i,...r,ref:m,onKeyDown:z(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:z(n,y=>{f(b=>Qe(b)?!0:!b),v&&g&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})});Is.displayName=As;var Hr=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:c,value:u,onCheckedChange:d,form:p,...f}=e;return a.jsx(xu,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:c,required:i,onCheckedChange:d,name:r,form:p,value:u,internal_do_not_use_render:({isFormControl:h})=>a.jsxs(a.Fragment,{children:[a.jsx(Is,{...f,ref:t,__scopeCheckbox:n}),h&&a.jsx(Ws,{__scopeCheckbox:n})]})})});Hr.displayName=_n;var $s="CheckboxIndicator",Fs=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Vr($s,n);return a.jsx(ke,{present:r||Qe(s.checked)||s.checked===!0,children:a.jsx(Wr.span,{"data-state":Vs(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Fs.displayName=$s;var Ls="CheckboxBubbleInput",Ws=l.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:c,disabled:u,name:d,value:p,form:f,bubbleInput:h,setBubbleInput:g}=Vr(Ls,e),v=oe(n,g),m=Os(s),x=_s(r);l.useEffect(()=>{const b=h;if(!b)return;const S=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(S,"checked").set,V=!o.current;if(m!==s&&T){const k=new Event("click",{bubbles:V});b.indeterminate=Qe(s),T.call(b,Qe(s)?!1:s),b.dispatchEvent(k)}},[h,m,s,o]);const y=l.useRef(Qe(s)?!1:s);return a.jsx(Wr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:c,disabled:u,name:d,value:p,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ws.displayName=Ls;function vu(e){return typeof e=="function"}function Qe(e){return e==="indeterminate"}function Vs(e){return Qe(e)?"indeterminate":e?"checked":"unchecked"}const yu=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bu=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Oo=e=>{const t=bu(e);return t.charAt(0).toUpperCase()+t.slice(1)},Hs=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),wu=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Cu={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"};const Su=U.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...c},u)=>U.createElement("svg",{ref:u,...Cu,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Hs("lucide",o),...!s&&!wu(c)&&{"aria-hidden":"true"},...c},[...i.map(([d,p])=>U.createElement(d,p)),...Array.isArray(s)?s:[s]]));const he=(e,t)=>{const n=U.forwardRef(({className:r,...o},s)=>U.createElement(Su,{ref:s,iconNode:t,className:Hs(`lucide-${yu(Oo(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Oo(e),n};const Nu=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Br=he("calendar",Nu);const Eu=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],zr=he("check",Eu);const ju=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Qt=he("chevron-down",ju);const Pu=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Fe=he("chevron-left",Pu);const Ru=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ee=he("chevron-right",Ru);const Mu=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],An=he("chevron-up",Mu);const Du=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],Tu=he("chevrons-left",Du);const ku=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],Ou=he("chevrons-right",ku);const _u=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Yr=he("chevrons-up-down",_u);const Au=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Iu=he("circle",Au);const $u=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Fu=he("clock",$u);const Lu=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],_o=he("plus",Lu);const Wu=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Vu=he("search",Wu);const Hu=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Bu=he("trash-2",Hu);const zu=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Yu=he("x",zu),In=l.forwardRef(({className:e,...t},n)=>a.jsx(Hr,{ref:n,className:F("peer h-4 w-4 shrink-0 rounded border border-gray-200 bg-white ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-400 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-900 data-[state=checked]:border-gray-900 data-[state=checked]:text-white transition-colors",e),...t,children:a.jsx(Fs,{className:F("flex items-center justify-center text-current"),children:a.jsx(zr,{className:"h-3.5 w-3.5 stroke-[2.5]"})})}));In.displayName=Hr.displayName;const He=l.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:F("flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-400 focus:outline-none focus:border-gray-500 hover:border-gray-400 disabled:cursor-not-allowed disabled:opacity-50 transition-colors",e),ref:r,...n}));He.displayName="Input";const Bs=l.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>a.jsx("div",{ref:o,role:n?"none":"separator","aria-orientation":t,className:F("shrink-0 bg-gray-200",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Bs.displayName="Separator";const zs=l.createContext({variant:"default"});function $n({className:e,variant:t="default",...n}){return a.jsx(zs.Provider,{value:{variant:t},children:a.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:a.jsx("table",{"data-slot":"table",className:F("w-full caption-bottom text-sm",e),...n})})})}function Fn({className:e,...t}){return a.jsx("thead",{"data-slot":"table-header",className:F("bg-gray-50 [&_tr]:border-b [&_tr]:border-gray-200",e),...t})}function Ln({className:e,...t}){return a.jsx("tbody",{"data-slot":"table-body",className:F("[&_tr:last-child]:border-b-0",e),...t})}function Gu({className:e,...t}){return a.jsx("tfoot",{"data-slot":"table-footer",className:F("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function Ie({className:e,...t}){const{variant:n}=l.useContext(zs);return a.jsx("tr",{"data-slot":"table-row",className:F("hover:bg-gray-50 data-[state=selected]:bg-gray-50 transition-colors border-b border-gray-200",n==="clean"&&"border-b-0",e),...t})}function Wn({className:e,...t}){return a.jsx("th",{"data-slot":"table-head",className:F("text-foreground h-auto px-3 py-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function pt({className:e,...t}){return a.jsx("td",{"data-slot":"table-cell",className:F("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function Uu({className:e,...t}){return a.jsx("caption",{"data-slot":"table-caption",className:F("text-muted-foreground mt-4 text-sm",e),...t})}function Ku(e){const t=qu(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Ju);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function qu(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=Qu(o),c=Zu(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Xu=Symbol("radix.slottable");function Ju(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Xu}function Zu(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Qu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ed=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],td=ed.reduce((e,t)=>{const n=Ku(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ao(e){const t=nd(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(od);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function nd(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=ad(o),c=sd(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rd=Symbol("radix.slottable");function od(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rd}function sd(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ad(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Gr(e){const t=e+"CollectionProvider",[n,r]=Ge(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:x,children:y}=m,b=U.useRef(null),S=U.useRef(new Map).current;return a.jsx(o,{scope:x,itemMap:S,collectionRef:b,children:y})};i.displayName=t;const c=e+"CollectionSlot",u=Ao(c),d=U.forwardRef((m,x)=>{const{scope:y,children:b}=m,S=s(c,y),w=oe(x,S.collectionRef);return a.jsx(u,{ref:w,children:b})});d.displayName=c;const p=e+"CollectionItemSlot",f="data-radix-collection-item",h=Ao(p),g=U.forwardRef((m,x)=>{const{scope:y,children:b,...S}=m,w=U.useRef(null),T=oe(x,w),V=s(p,y);return U.useEffect(()=>(V.itemMap.set(w,{ref:w,...S}),()=>void V.itemMap.delete(w))),a.jsx(h,{[f]:"",ref:T,children:b})});g.displayName=p;function v(m){const x=s(e+"CollectionConsumer",m);return U.useCallback(()=>{const b=x.collectionRef.current;if(!b)return[];const S=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((V,k)=>S.indexOf(V.ref.current)-S.indexOf(k.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:d,ItemSlot:g},v,r]}var id=l.createContext(void 0);function Ur(e){const t=l.useContext(id);return e||t||"ltr"}function cd(e){const t=ld(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(dd);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function ld(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=pd(o),c=fd(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ud=Symbol("radix.slottable");function dd(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ud}function fd(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function pd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var md=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ys=md.reduce((e,t)=>{const n=cd(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hd(e,t){e&&Zt.flushSync(()=>e.dispatchEvent(t))}function Me(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current?.(...n),[])}function gd(e,t=globalThis?.document){const n=Me(e);l.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 xd="DismissableLayer",Er="dismissableLayer.update",vd="dismissableLayer.pointerDownOutside",yd="dismissableLayer.focusOutside",Io,Gs=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),en=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...u}=e,d=l.useContext(Gs),[p,f]=l.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=l.useState({}),v=oe(t,k=>f(k)),m=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(x),b=p?m.indexOf(p):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,w=b>=y,T=Cd(k=>{const P=k.target,M=[...d.branches].some(E=>E.contains(P));!w||M||(o?.(k),i?.(k),k.defaultPrevented||c?.())},h),V=Sd(k=>{const P=k.target;[...d.branches].some(E=>E.contains(P))||(s?.(k),i?.(k),k.defaultPrevented||c?.())},h);return gd(k=>{b===d.layers.size-1&&(r?.(k),!k.defaultPrevented&&c&&(k.preventDefault(),c()))},h),l.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Io=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),$o(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Io)}},[p,h,n,d]),l.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),$o())},[p,d]),l.useEffect(()=>{const k=()=>g({});return document.addEventListener(Er,k),()=>document.removeEventListener(Er,k)},[]),a.jsx(Ys.div,{...u,ref:v,style:{pointerEvents:S?w?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,V.onFocusCapture),onBlurCapture:z(e.onBlurCapture,V.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,T.onPointerDownCapture)})});en.displayName=xd;var bd="DismissableLayerBranch",wd=l.forwardRef((e,t)=>{const n=l.useContext(Gs),r=l.useRef(null),o=oe(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),a.jsx(Ys.div,{...e,ref:o})});wd.displayName=bd;function Cd(e,t=globalThis?.document){const n=Me(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let u=function(){Us(vd,n,d,{discrete:!0})};const d={originalEvent:c};c.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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Sd(e,t=globalThis?.document){const n=Me(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&Us(yd,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $o(){const e=new CustomEvent(Er);document.dispatchEvent(e)}function Us(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?hd(o,s):o.dispatchEvent(s)}var dr=0;function Vn(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Fo()),document.body.insertAdjacentElement("beforeend",e[1]??Fo()),dr++,()=>{dr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),dr--}},[])}function Fo(){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}function Nd(e){const t=Ed(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Pd);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Ed(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=Md(o),c=Rd(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jd=Symbol("radix.slottable");function Pd(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jd}function Rd(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Md(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Dd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Td=Dd.reduce((e,t)=>{const n=Nd(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),fr="focusScope.autoFocusOnMount",pr="focusScope.autoFocusOnUnmount",Lo={bubbles:!1,cancelable:!0},kd="FocusScope",tn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[c,u]=l.useState(null),d=Me(o),p=Me(s),f=l.useRef(null),h=oe(t,m=>u(m)),g=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let m=function(S){if(g.paused||!c)return;const w=S.target;c.contains(w)?f.current=w:Xe(f.current,{select:!0})},x=function(S){if(g.paused||!c)return;const w=S.relatedTarget;w!==null&&(c.contains(w)||Xe(f.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const T of S)T.removedNodes.length>0&&Xe(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const b=new MutationObserver(y);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),b.disconnect()}}},[r,c,g.paused]),l.useEffect(()=>{if(c){Vo.add(g);const m=document.activeElement;if(!c.contains(m)){const y=new CustomEvent(fr,Lo);c.addEventListener(fr,d),c.dispatchEvent(y),y.defaultPrevented||(Od(Fd(Ks(c)),{select:!0}),document.activeElement===m&&Xe(c))}return()=>{c.removeEventListener(fr,d),setTimeout(()=>{const y=new CustomEvent(pr,Lo);c.addEventListener(pr,p),c.dispatchEvent(y),y.defaultPrevented||Xe(m??document.body,{select:!0}),c.removeEventListener(pr,p),Vo.remove(g)},0)}}},[c,d,p,g]);const v=l.useCallback(m=>{if(!n&&!r||g.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(x&&y){const b=m.currentTarget,[S,w]=_d(b);S&&w?!m.shiftKey&&y===w?(m.preventDefault(),n&&Xe(S,{select:!0})):m.shiftKey&&y===S&&(m.preventDefault(),n&&Xe(w,{select:!0})):y===b&&m.preventDefault()}},[n,r,g.paused]);return a.jsx(Td.div,{tabIndex:-1,...i,ref:h,onKeyDown:v})});tn.displayName=kd;function Od(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Xe(r,{select:t}),document.activeElement!==n)return}function _d(e){const t=Ks(e),n=Wo(t,e),r=Wo(t.reverse(),e);return[n,r]}function Ks(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 Wo(e,t){for(const n of e)if(!Ad(n,{upTo:t}))return n}function Ad(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 Id(e){return e instanceof HTMLInputElement&&"select"in e}function Xe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Id(e)&&t&&e.select()}}var Vo=$d();function $d(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Ho(e,t),e.unshift(t)},remove(t){e=Ho(e,t),e[0]?.resume()}}}function Ho(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Fd(e){return e.filter(t=>t.tagName!=="A")}var Ld=l[" useId ".trim().toString()]||(()=>{}),Wd=0;function je(e){const[t,n]=l.useState(Ld());return pe(()=>{n(r=>r??String(Wd++))},[e]),e||(t?`radix-${t}`:"")}const Vd=["top","right","bottom","left"],tt=Math.min,ye=Math.max,Nn=Math.round,hn=Math.floor,$e=e=>({x:e,y:e}),Hd={left:"right",right:"left",bottom:"top",top:"bottom"},Bd={start:"end",end:"start"};function jr(e,t,n){return ye(e,tt(t,n))}function ze(e,t){return typeof e=="function"?e(t):e}function Ye(e){return e.split("-")[0]}function Tt(e){return e.split("-")[1]}function Kr(e){return e==="x"?"y":"x"}function qr(e){return e==="y"?"height":"width"}const zd=new Set(["top","bottom"]);function Ae(e){return zd.has(Ye(e))?"y":"x"}function Xr(e){return Kr(Ae(e))}function Yd(e,t,n){n===void 0&&(n=!1);const r=Tt(e),o=Xr(e),s=qr(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=En(i)),[i,En(i)]}function Gd(e){const t=En(e);return[Pr(e),t,Pr(t)]}function Pr(e){return e.replace(/start|end/g,t=>Bd[t])}const Bo=["left","right"],zo=["right","left"],Ud=["top","bottom"],Kd=["bottom","top"];function qd(e,t,n){switch(e){case"top":case"bottom":return n?t?zo:Bo:t?Bo:zo;case"left":case"right":return t?Ud:Kd;default:return[]}}function Xd(e,t,n,r){const o=Tt(e);let s=qd(Ye(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Pr)))),s}function En(e){return e.replace(/left|right|bottom|top/g,t=>Hd[t])}function Jd(e){return{top:0,right:0,bottom:0,left:0,...e}}function qs(e){return typeof e!="number"?Jd(e):{top:e,right:e,bottom:e,left:e}}function jn(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 Yo(e,t,n){let{reference:r,floating:o}=e;const s=Ae(t),i=Xr(t),c=qr(i),u=Ye(t),d=s==="y",p=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[c]/2-o[c]/2;let g;switch(u){case"top":g={x:p,y:r.y-o.height};break;case"bottom":g={x:p,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-o.width,y:f};break;default:g={x:r.x,y:r.y}}switch(Tt(t)){case"start":g[i]-=h*(n&&d?-1:1);break;case"end":g[i]+=h*(n&&d?-1:1);break}return g}const Zd=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:f}=Yo(d,r,u),h=r,g={},v=0;for(let m=0;m<c.length;m++){const{name:x,fn:y}=c[m],{x:b,y:S,data:w,reset:T}=await y({x:p,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:g,rects:d,platform:i,elements:{reference:e,floating:t}});p=b??p,f=S??f,g={...g,[x]:{...g[x],...w}},T&&v<=50&&(v++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(d=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:p,y:f}=Yo(d,h,u)),m=-1)}return{x:p,y:f,placement:h,strategy:o,middlewareData:g}};async function Ut(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:h=!1,padding:g=0}=ze(t,e),v=qs(g),x=c[h?f==="floating"?"reference":"floating":f],y=jn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:d,rootBoundary:p,strategy:u})),b=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),w=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},T=jn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:S,strategy:u}):b);return{top:(y.top-T.top+v.top)/w.y,bottom:(T.bottom-y.bottom+v.bottom)/w.y,left:(y.left-T.left+v.left)/w.x,right:(T.right-y.right+v.right)/w.x}}const Qd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:p=0}=ze(e,t)||{};if(d==null)return{};const f=qs(p),h={x:n,y:r},g=Xr(o),v=qr(g),m=await i.getDimensions(d),x=g==="y",y=x?"top":"left",b=x?"bottom":"right",S=x?"clientHeight":"clientWidth",w=s.reference[v]+s.reference[g]-h[g]-s.floating[v],T=h[g]-s.reference[g],V=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let k=V?V[S]:0;(!k||!await(i.isElement==null?void 0:i.isElement(V)))&&(k=c.floating[S]||s.floating[v]);const P=w/2-T/2,M=k/2-m[v]/2-1,E=tt(f[y],M),D=tt(f[b],M),C=E,W=k-m[v]-D,N=k/2-m[v]/2+P,H=jr(C,N,W),O=!u.arrow&&Tt(o)!=null&&N!==H&&s.reference[v]/2-(N<C?E:D)-m[v]/2<0,L=O?N<C?N-C:N-W:0;return{[g]:h[g]+L,data:{[g]:H,centerOffset:N-H-L,...O&&{alignmentOffset:L}},reset:O}}}),ef=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...x}=ze(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Ye(o),b=Ae(c),S=Ye(c)===c,w=await(u.isRTL==null?void 0:u.isRTL(d.floating)),T=h||(S||!m?[En(c)]:Gd(c)),V=v!=="none";!h&&V&&T.push(...Xd(c,m,v,w));const k=[c,...T],P=await Ut(t,x),M=[];let E=((r=s.flip)==null?void 0:r.overflows)||[];if(p&&M.push(P[y]),f){const N=Yd(o,i,w);M.push(P[N[0]],P[N[1]])}if(E=[...E,{placement:o,overflows:M}],!M.every(N=>N<=0)){var D,C;const N=(((D=s.flip)==null?void 0:D.index)||0)+1,H=k[N];if(H&&(!(f==="alignment"?b!==Ae(H):!1)||E.every(A=>Ae(A.placement)===b?A.overflows[0]>0:!0)))return{data:{index:N,overflows:E},reset:{placement:H}};let O=(C=E.filter(L=>L.overflows[0]<=0).sort((L,A)=>L.overflows[1]-A.overflows[1])[0])==null?void 0:C.placement;if(!O)switch(g){case"bestFit":{var W;const L=(W=E.filter(A=>{if(V){const _=Ae(A.placement);return _===b||_==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(_=>_>0).reduce((_,Q)=>_+Q,0)]).sort((A,_)=>A[1]-_[1])[0])==null?void 0:W[0];L&&(O=L);break}case"initialPlacement":O=c;break}if(o!==O)return{reset:{placement:O}}}return{}}}};function Go(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uo(e){return Vd.some(t=>e[t]>=0)}const tf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ze(e,t);switch(r){case"referenceHidden":{const s=await Ut(t,{...o,elementContext:"reference"}),i=Go(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Uo(i)}}}case"escaped":{const s=await Ut(t,{...o,altBoundary:!0}),i=Go(s,n.floating);return{data:{escapedOffsets:i,escaped:Uo(i)}}}default:return{}}}}},Xs=new Set(["left","top"]);async function nf(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ye(n),c=Tt(n),u=Ae(n)==="y",d=Xs.has(i)?-1:1,p=s&&u?-1:1,f=ze(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof v=="number"&&(g=c==="end"?v*-1:v),u?{x:g*p,y:h*d}:{x:h*d,y:g*p}}const rf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:c}=t,u=await nf(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},of=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...u}=ze(e,t),d={x:n,y:r},p=await Ut(t,u),f=Ae(Ye(o)),h=Kr(f);let g=d[h],v=d[f];if(s){const x=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=g+p[x],S=g-p[y];g=jr(b,g,S)}if(i){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=v+p[x],S=v-p[y];v=jr(b,v,S)}const m=c.fn({...t,[h]:g,[f]:v});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:s,[f]:i}}}}}},sf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=ze(e,t),p={x:n,y:r},f=Ae(o),h=Kr(f);let g=p[h],v=p[f];const m=ze(c,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const S=h==="y"?"height":"width",w=s.reference[h]-s.floating[S]+x.mainAxis,T=s.reference[h]+s.reference[S]-x.mainAxis;g<w?g=w:g>T&&(g=T)}if(d){var y,b;const S=h==="y"?"width":"height",w=Xs.has(Ye(o)),T=s.reference[f]-s.floating[S]+(w&&((y=i.offset)==null?void 0:y[f])||0)+(w?0:x.crossAxis),V=s.reference[f]+s.reference[S]+(w?0:((b=i.offset)==null?void 0:b[f])||0)-(w?x.crossAxis:0);v<T?v=T:v>V&&(v=V)}return{[h]:g,[f]:v}}}},af=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...d}=ze(e,t),p=await Ut(t,d),f=Ye(o),h=Tt(o),g=Ae(o)==="y",{width:v,height:m}=s.floating;let x,y;f==="top"||f==="bottom"?(x=f,y=h===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(y=f,x=h==="end"?"top":"bottom");const b=m-p.top-p.bottom,S=v-p.left-p.right,w=tt(m-p[x],b),T=tt(v-p[y],S),V=!t.middlewareData.shift;let k=w,P=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=b),V&&!h){const E=ye(p.left,0),D=ye(p.right,0),C=ye(p.top,0),W=ye(p.bottom,0);g?P=v-2*(E!==0||D!==0?E+D:ye(p.left,p.right)):k=m-2*(C!==0||W!==0?C+W:ye(p.top,p.bottom))}await u({...t,availableWidth:P,availableHeight:k});const M=await i.getDimensions(c.floating);return v!==M.width||m!==M.height?{reset:{rects:!0}}:{}}}};function Hn(){return typeof window<"u"}function kt(e){return Js(e)?(e.nodeName||"").toLowerCase():"#document"}function be(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function We(e){var t;return(t=(Js(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Js(e){return Hn()?e instanceof Node||e instanceof be(e).Node:!1}function De(e){return Hn()?e instanceof Element||e instanceof be(e).Element:!1}function Le(e){return Hn()?e instanceof HTMLElement||e instanceof be(e).HTMLElement:!1}function Ko(e){return!Hn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof be(e).ShadowRoot}const cf=new Set(["inline","contents"]);function nn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!cf.has(o)}const lf=new Set(["table","td","th"]);function uf(e){return lf.has(kt(e))}const df=[":popover-open",":modal"];function Bn(e){return df.some(t=>{try{return e.matches(t)}catch{return!1}})}const ff=["transform","translate","scale","rotate","perspective"],pf=["transform","translate","scale","rotate","perspective","filter"],mf=["paint","layout","strict","content"];function Jr(e){const t=Zr(),n=De(e)?Te(e):e;return ff.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||pf.some(r=>(n.willChange||"").includes(r))||mf.some(r=>(n.contain||"").includes(r))}function hf(e){let t=nt(e);for(;Le(t)&&!Rt(t);){if(Jr(t))return t;if(Bn(t))return null;t=nt(t)}return null}function Zr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gf=new Set(["html","body","#document"]);function Rt(e){return gf.has(kt(e))}function Te(e){return be(e).getComputedStyle(e)}function zn(e){return De(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nt(e){if(kt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ko(e)&&e.host||We(e);return Ko(t)?t.host:t}function Zs(e){const t=nt(e);return Rt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Le(t)&&nn(t)?t:Zs(t)}function Kt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Zs(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=be(o);if(s){const c=Rr(i);return t.concat(i,i.visualViewport||[],nn(o)?o:[],c&&n?Kt(c):[])}return t.concat(o,Kt(o,[],n))}function Rr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qs(e){const t=Te(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Le(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=Nn(n)!==s||Nn(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function Qr(e){return De(e)?e:e.contextElement}function jt(e){const t=Qr(e);if(!Le(t))return $e(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Qs(t);let i=(s?Nn(n.width):n.width)/r,c=(s?Nn(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const xf=$e(0);function ea(e){const t=be(e);return!Zr()||!t.visualViewport?xf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==be(e)?!1:t}function mt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Qr(e);let i=$e(1);t&&(r?De(r)&&(i=jt(r)):i=jt(e));const c=vf(s,n,r)?ea(s):$e(0);let u=(o.left+c.x)/i.x,d=(o.top+c.y)/i.y,p=o.width/i.x,f=o.height/i.y;if(s){const h=be(s),g=r&&De(r)?be(r):r;let v=h,m=Rr(v);for(;m&&r&&g!==v;){const x=jt(m),y=m.getBoundingClientRect(),b=Te(m),S=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*x.x,w=y.top+(m.clientTop+parseFloat(b.paddingTop))*x.y;u*=x.x,d*=x.y,p*=x.x,f*=x.y,u+=S,d+=w,v=be(m),m=Rr(v)}}return jn({width:p,height:f,x:u,y:d})}function Yn(e,t){const n=zn(e).scrollLeft;return t?t.left+n:mt(We(e)).left+n}function ta(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Yn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function yf(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=We(r),c=t?Bn(t.floating):!1;if(r===i||c&&s)return n;let u={scrollLeft:0,scrollTop:0},d=$e(1);const p=$e(0),f=Le(r);if((f||!f&&!s)&&((kt(r)!=="body"||nn(i))&&(u=zn(r)),Le(r))){const g=mt(r);d=jt(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const h=i&&!f&&!s?ta(i,u):$e(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+p.x+h.x,y:n.y*d.y-u.scrollTop*d.y+p.y+h.y}}function bf(e){return Array.from(e.getClientRects())}function wf(e){const t=We(e),n=zn(e),r=e.ownerDocument.body,o=ye(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ye(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Yn(e);const c=-n.scrollTop;return Te(r).direction==="rtl"&&(i+=ye(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}const qo=25;function Cf(e,t){const n=be(e),r=We(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,u=0;if(o){s=o.width,i=o.height;const p=Zr();(!p||p&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const d=Yn(r);if(d<=0){const p=r.ownerDocument,f=p.body,h=getComputedStyle(f),g=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-g);v<=qo&&(s-=v)}else d<=qo&&(s+=d);return{width:s,height:i,x:c,y:u}}const Sf=new Set(["absolute","fixed"]);function Nf(e,t){const n=mt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Le(e)?jt(e):$e(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,u=o*s.x,d=r*s.y;return{width:i,height:c,x:u,y:d}}function Xo(e,t,n){let r;if(t==="viewport")r=Cf(e,n);else if(t==="document")r=wf(We(e));else if(De(t))r=Nf(t,n);else{const o=ea(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return jn(r)}function na(e,t){const n=nt(e);return n===t||!De(n)||Rt(n)?!1:Te(n).position==="fixed"||na(n,t)}function Ef(e,t){const n=t.get(e);if(n)return n;let r=Kt(e,[],!1).filter(c=>De(c)&&kt(c)!=="body"),o=null;const s=Te(e).position==="fixed";let i=s?nt(e):e;for(;De(i)&&!Rt(i);){const c=Te(i),u=Jr(i);!u&&c.position==="fixed"&&(o=null),(s?!u&&!o:!u&&c.position==="static"&&!!o&&Sf.has(o.position)||nn(i)&&!u&&na(e,i))?r=r.filter(p=>p!==i):o=c,i=nt(i)}return t.set(e,r),r}function jf(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Bn(t)?[]:Ef(t,this._c):[].concat(n),r],c=i[0],u=i.reduce((d,p)=>{const f=Xo(t,p,o);return d.top=ye(f.top,d.top),d.right=tt(f.right,d.right),d.bottom=tt(f.bottom,d.bottom),d.left=ye(f.left,d.left),d},Xo(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Pf(e){const{width:t,height:n}=Qs(e);return{width:t,height:n}}function Rf(e,t,n){const r=Le(t),o=We(t),s=n==="fixed",i=mt(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=$e(0);function d(){u.x=Yn(o)}if(r||!r&&!s)if((kt(t)!=="body"||nn(o))&&(c=zn(t)),r){const g=mt(t,!0,s,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else o&&d();s&&!r&&o&&d();const p=o&&!r&&!s?ta(o,c):$e(0),f=i.left+c.scrollLeft-u.x-p.x,h=i.top+c.scrollTop-u.y-p.y;return{x:f,y:h,width:i.width,height:i.height}}function mr(e){return Te(e).position==="static"}function Jo(e,t){if(!Le(e)||Te(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return We(e)===n&&(n=n.ownerDocument.body),n}function ra(e,t){const n=be(e);if(Bn(e))return n;if(!Le(e)){let o=nt(e);for(;o&&!Rt(o);){if(De(o)&&!mr(o))return o;o=nt(o)}return n}let r=Jo(e,t);for(;r&&uf(r)&&mr(r);)r=Jo(r,t);return r&&Rt(r)&&mr(r)&&!Jr(r)?n:r||hf(e)||n}const Mf=async function(e){const t=this.getOffsetParent||ra,n=this.getDimensions,r=await n(e.floating);return{reference:Rf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Df(e){return Te(e).direction==="rtl"}const Tf={convertOffsetParentRelativeRectToViewportRelativeRect:yf,getDocumentElement:We,getClippingRect:jf,getOffsetParent:ra,getElementRects:Mf,getClientRects:bf,getDimensions:Pf,getScale:jt,isElement:De,isRTL:Df};function oa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kf(e,t){let n=null,r;const o=We(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:p,top:f,width:h,height:g}=d;if(c||t(),!h||!g)return;const v=hn(f),m=hn(o.clientWidth-(p+h)),x=hn(o.clientHeight-(f+g)),y=hn(p),S={rootMargin:-v+"px "+-m+"px "+-x+"px "+-y+"px",threshold:ye(0,tt(1,u))||1};let w=!0;function T(V){const k=V[0].intersectionRatio;if(k!==u){if(!w)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!oa(d,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(T,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,S)}n.observe(e)}return i(!0),s}function Of(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=Qr(e),p=o||s?[...d?Kt(d):[],...Kt(t)]:[];p.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=d&&c?kf(d,n):null;let h=-1,g=null;i&&(g=new ResizeObserver(y=>{let[b]=y;b&&b.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=g)==null||S.observe(t)})),n()}),d&&!u&&g.observe(d),g.observe(t));let v,m=u?mt(e):null;u&&x();function x(){const y=mt(e);m&&!oa(m,y)&&n(),m=y,v=requestAnimationFrame(x)}return n(),()=>{var y;p.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f?.(),(y=g)==null||y.disconnect(),g=null,u&&cancelAnimationFrame(v)}}const _f=rf,Af=of,If=ef,$f=af,Ff=tf,Zo=Qd,Lf=sf,Wf=(e,t,n)=>{const r=new Map,o={platform:Tf,...n},s={...o.platform,_c:r};return Zd(e,t,{...o,platform:s})};var Vf=typeof document<"u",Hf=function(){},bn=Vf?U.useLayoutEffect:Hf;function Pn(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(!Pn(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Pn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function sa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qo(e,t){const n=sa(e);return Math.round(t*n)/n}function hr(e){const t=l.useRef(e);return bn(()=>{t.current=e}),t}function Bf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[p,f]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=l.useState(r);Pn(h,r)||g(r);const[v,m]=l.useState(null),[x,y]=l.useState(null),b=l.useCallback(A=>{A!==V.current&&(V.current=A,m(A))},[]),S=l.useCallback(A=>{A!==k.current&&(k.current=A,y(A))},[]),w=s||v,T=i||x,V=l.useRef(null),k=l.useRef(null),P=l.useRef(p),M=u!=null,E=hr(u),D=hr(o),C=hr(d),W=l.useCallback(()=>{if(!V.current||!k.current)return;const A={placement:t,strategy:n,middleware:h};D.current&&(A.platform=D.current),Wf(V.current,k.current,A).then(_=>{const Q={..._,isPositioned:C.current!==!1};N.current&&!Pn(P.current,Q)&&(P.current=Q,Zt.flushSync(()=>{f(Q)}))})},[h,t,n,D,C]);bn(()=>{d===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[d]);const N=l.useRef(!1);bn(()=>(N.current=!0,()=>{N.current=!1}),[]),bn(()=>{if(w&&(V.current=w),T&&(k.current=T),w&&T){if(E.current)return E.current(w,T,W);W()}},[w,T,W,E,M]);const H=l.useMemo(()=>({reference:V,floating:k,setReference:b,setFloating:S}),[b,S]),O=l.useMemo(()=>({reference:w,floating:T}),[w,T]),L=l.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const _=Qo(O.floating,p.x),Q=Qo(O.floating,p.y);return c?{...A,transform:"translate("+_+"px, "+Q+"px)",...sa(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:Q}},[n,c,O.floating,p.x,p.y]);return l.useMemo(()=>({...p,update:W,refs:H,elements:O,floatingStyles:L}),[p,W,H,O,L])}const zf=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?Zo({element:r.current,padding:o}).fn(n):{}:r?Zo({element:r,padding:o}).fn(n):{}}}},Yf=(e,t)=>({..._f(e),options:[e,t]}),Gf=(e,t)=>({...Af(e),options:[e,t]}),Uf=(e,t)=>({...Lf(e),options:[e,t]}),Kf=(e,t)=>({...If(e),options:[e,t]}),qf=(e,t)=>({...$f(e),options:[e,t]}),Xf=(e,t)=>({...Ff(e),options:[e,t]}),Jf=(e,t)=>({...zf(e),options:[e,t]});function Zf(e){const t=Qf(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(tp);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Qf(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=rp(o),c=np(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ep=Symbol("radix.slottable");function tp(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ep}function np(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function rp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var op=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sp=op.reduce((e,t)=>{const n=Zf(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ap="Arrow",aa=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return a.jsx(sp.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});aa.displayName=ap;var ip=aa;function cp(e){const t=lp(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(dp);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function lp(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=pp(o),c=fp(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var up=Symbol("radix.slottable");function dp(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===up}function fp(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function pp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ia=mp.reduce((e,t)=>{const n=cp(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),eo="Popper",[ca,Ot]=Ge(eo),[hp,la]=ca(eo),ua=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return a.jsx(hp,{scope:t,anchor:r,onAnchorChange:o,children:n})};ua.displayName=eo;var da="PopperAnchor",fa=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=la(da,n),i=l.useRef(null),c=oe(t,i),u=l.useRef(null);return l.useEffect(()=>{const d=u.current;u.current=r?.current||i.current,d!==u.current&&s.onAnchorChange(u.current)}),r?null:a.jsx(ia.div,{...o,ref:c})});fa.displayName=da;var to="PopperContent",[gp,xp]=ca(to),pa=l.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:v,...m}=e,x=la(to,n),[y,b]=l.useState(null),S=oe(t,$=>b($)),[w,T]=l.useState(null),V=_s(w),k=V?.width??0,P=V?.height??0,M=r+(s!=="center"?"-"+s:""),E=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},D=Array.isArray(d)?d:[d],C=D.length>0,W={padding:E,boundary:D.filter(yp),altBoundary:C},{refs:N,floatingStyles:H,placement:O,isPositioned:L,middlewareData:A}=Bf({strategy:"fixed",placement:M,whileElementsMounted:(...$)=>Of(...$,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[Yf({mainAxis:o+P,alignmentAxis:i}),u&&Gf({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Uf():void 0,...W}),u&&Kf({...W}),qf({...W,apply:({elements:$,rects:ee,availableWidth:ae,availableHeight:te})=>{const{width:ne,height:R}=ee.reference,B=$.floating.style;B.setProperty("--radix-popper-available-width",`${ae}px`),B.setProperty("--radix-popper-available-height",`${te}px`),B.setProperty("--radix-popper-anchor-width",`${ne}px`),B.setProperty("--radix-popper-anchor-height",`${R}px`)}}),w&&Jf({element:w,padding:c}),bp({arrowWidth:k,arrowHeight:P}),h&&Xf({strategy:"referenceHidden",...W})]}),[_,Q]=ga(O),j=Me(v);pe(()=>{L&&j?.()},[L,j]);const Y=A.arrow?.x,q=A.arrow?.y,X=A.arrow?.centerOffset!==0,[ce,le]=l.useState();return pe(()=>{y&&le(window.getComputedStyle(y).zIndex)},[y]),a.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:L?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(gp,{scope:n,placedSide:_,onArrowChange:T,arrowX:Y,arrowY:q,shouldHideArrow:X,children:a.jsx(ia.div,{"data-side":_,"data-align":Q,...m,ref:S,style:{...m.style,animation:L?void 0:"none"}})})})});pa.displayName=to;var ma="PopperArrow",vp={top:"bottom",right:"left",bottom:"top",left:"right"},ha=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=xp(ma,r),i=vp[s.placedSide];return a.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:a.jsx(ip,{...o,ref:n,style:{...o.style,display:"block"}})})});ha.displayName=ma;function yp(e){return e!==null}var bp=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,p]=ga(n),f={start:"0%",center:"50%",end:"100%"}[p],h=(o.arrow?.x??0)+c/2,g=(o.arrow?.y??0)+u/2;let v="",m="";return d==="bottom"?(v=i?f:`${h}px`,m=`${-u}px`):d==="top"?(v=i?f:`${h}px`,m=`${r.floating.height+u}px`):d==="right"?(v=`${-u}px`,m=i?f:`${g}px`):d==="left"&&(v=`${r.floating.width+u}px`,m=i?f:`${g}px`),{data:{x:v,y:m}}}});function ga(e){const[t,n="center"]=e.split("-");return[t,n]}var Gn=ua,Un=fa,no=pa,ro=ha;function wp(e){const t=Cp(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Np);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Cp(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=jp(o),c=Ep(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Sp=Symbol("radix.slottable");function Np(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Sp}function Ep(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function jp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Pp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rp=Pp.reduce((e,t)=>{const n=wp(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Mp="Portal",rn=l.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=l.useState(!1);pe(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Cs.createPortal(a.jsx(Rp.div,{...r,ref:t}),i):null});rn.displayName=Mp;function xa(e){const t=Dp(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(kp);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Dp(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=_p(o),c=Op(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Tp=Symbol("radix.slottable");function kp(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Tp}function Op(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function _p(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ap=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],on=Ap.reduce((e,t)=>{const n=xa(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ip(e,t){e&&Zt.flushSync(()=>e.dispatchEvent(t))}function $p(e){const t=Fp(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Wp);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Fp(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=Hp(o),c=Vp(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Lp=Symbol("radix.slottable");function Wp(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Lp}function Vp(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Hp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Bp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],va=Bp.reduce((e,t)=>{const n=$p(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),gr="rovingFocusGroup.onEntryFocus",zp={bubbles:!1,cancelable:!0},sn="RovingFocusGroup",[Mr,ya,Yp]=Gr(sn),[Gp,ba]=Ge(sn,[Yp]),[Up,Kp]=Gp(sn),wa=l.forwardRef((e,t)=>a.jsx(Mr.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Mr.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(qp,{...e,ref:t})})}));wa.displayName=sn;var qp=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...f}=e,h=l.useRef(null),g=oe(t,h),v=Ur(s),[m,x]=et({prop:i,defaultProp:c??null,onChange:u,caller:sn}),[y,b]=l.useState(!1),S=Me(d),w=ya(n),T=l.useRef(!1),[V,k]=l.useState(0);return l.useEffect(()=>{const P=h.current;if(P)return P.addEventListener(gr,S),()=>P.removeEventListener(gr,S)},[S]),a.jsx(Up,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:m,onItemFocus:l.useCallback(P=>x(P),[x]),onItemShiftTab:l.useCallback(()=>b(!0),[]),onFocusableItemAdd:l.useCallback(()=>k(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>k(P=>P-1),[]),children:a.jsx(va.div,{tabIndex:y||V===0?-1:0,"data-orientation":r,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:z(e.onMouseDown,()=>{T.current=!0}),onFocus:z(e.onFocus,P=>{const M=!T.current;if(P.target===P.currentTarget&&M&&!y){const E=new CustomEvent(gr,zp);if(P.currentTarget.dispatchEvent(E),!E.defaultPrevented){const D=w().filter(O=>O.focusable),C=D.find(O=>O.active),W=D.find(O=>O.id===m),H=[C,W,...D].filter(Boolean).map(O=>O.ref.current);Na(H,p)}}T.current=!1}),onBlur:z(e.onBlur,()=>b(!1))})})}),Ca="RovingFocusGroupItem",Sa=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...c}=e,u=je(),d=s||u,p=Kp(Ca,n),f=p.currentTabStopId===d,h=ya(n),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:m}=p;return l.useEffect(()=>{if(r)return g(),()=>v()},[r,g,v]),a.jsx(Mr.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:a.jsx(va.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:z(e.onMouseDown,x=>{r?p.onItemFocus(d):x.preventDefault()}),onFocus:z(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:z(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){p.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=Zp(x,p.orientation,p.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let S=h().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();const w=S.indexOf(x.currentTarget);S=p.loop?Qp(S,w+1):S.slice(w+1)}setTimeout(()=>Na(S))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:m!=null}):i})})});Sa.displayName=Ca;var Xp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Jp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Zp(e,t,n){const r=Jp(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Xp[r]}function Na(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Qp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var em=wa,tm=Sa,nm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},yt=new WeakMap,gn=new WeakMap,xn={},xr=0,Ea=function(e){return e&&(e.host||Ea(e.parentNode))},rm=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ea(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})},om=function(e,t,n,r){var o=rm(t,Array.isArray(e)?e:[e]);xn[n]||(xn[n]=new WeakMap);var s=xn[n],i=[],c=new Set,u=new Set(o),d=function(f){!f||c.has(f)||(c.add(f),d(f.parentNode))};o.forEach(d);var p=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(h){if(c.has(h))p(h);else try{var g=h.getAttribute(r),v=g!==null&&g!=="false",m=(yt.get(h)||0)+1,x=(s.get(h)||0)+1;yt.set(h,m),s.set(h,x),i.push(h),m===1&&v&&gn.set(h,!0),x===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return p(t),c.clear(),xr++,function(){i.forEach(function(f){var h=yt.get(f)-1,g=s.get(f)-1;yt.set(f,h),s.set(f,g),h||(gn.has(f)||f.removeAttribute(r),gn.delete(f)),g||f.removeAttribute(n)}),xr--,xr||(yt=new WeakMap,yt=new WeakMap,gn=new WeakMap,xn={})}},Kn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=nm(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),om(r,o,n,"aria-hidden")):function(){return null}},_e=function(){return _e=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},_e.apply(this,arguments)};function ja(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 sm(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var wn="right-scroll-bar-position",Cn="width-before-scroll-bar",am="with-scroll-bars-hidden",im="--removed-body-scroll-bar-size";function vr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function cm(e,t){var n=U.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 lm=typeof window<"u"?l.useLayoutEffect:l.useEffect,es=new WeakMap;function um(e,t){var n=cm(null,function(r){return e.forEach(function(o){return vr(o,r)})});return lm(function(){var r=es.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(c){s.has(c)||vr(c,null)}),s.forEach(function(c){o.has(c)||vr(c,i)})}es.set(n,e)},[e]),n}function dm(e){return e}function fm(e,t){t===void 0&&(t=dm);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(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(s),i=n}var u=function(){var p=i;i=[],p.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(p){i.push(p),d()},filter:function(p){return i=i.filter(p),n}}}};return o}function pm(e){e===void 0&&(e={});var t=fm(null);return t.options=_e({async:!0,ssr:!1},e),t}var Pa=function(e){var t=e.sideCar,n=ja(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 l.createElement(r,_e({},n))};Pa.isSideCarExport=!0;function mm(e,t){return e.useMedium(t),Pa}var Ra=pm(),yr=function(){},qn=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:yr,onWheelCapture:yr,onTouchMoveCapture:yr}),o=r[0],s=r[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,f=e.shards,h=e.sideCar,g=e.noRelative,v=e.noIsolation,m=e.inert,x=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,S=e.gapMode,w=ja(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=h,V=um([n,t]),k=_e(_e({},w),o);return l.createElement(l.Fragment,null,p&&l.createElement(T,{sideCar:Ra,removeScrollBar:d,shards:f,noRelative:g,noIsolation:v,inert:m,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:S}),i?l.cloneElement(l.Children.only(c),_e(_e({},k),{ref:V})):l.createElement(b,_e({},k,{className:u,ref:V}),c))});qn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qn.classNames={fullWidth:Cn,zeroRight:wn};var hm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hm();return t&&e.setAttribute("nonce",t),e}function xm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ym=function(){var e=0,t=null;return{add:function(n){e==0&&(t=gm())&&(xm(t,n),vm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bm=function(){var e=ym();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ma=function(){var e=bm(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},wm={left:0,top:0,right:0,gap:0},br=function(e){return parseInt(e||"",10)||0},Cm=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[br(n),br(r),br(o)]},Sm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wm;var t=Cm(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Nm=Ma(),Pt="data-scroll-locked",Em=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
7
|
-
.`.concat(
|
|
6
|
+
<%s key={someKey} {...props} />`,X,A,Q,A),re[A+X]=!0)}if(A=null,K!==void 0&&(n(K),A=""+K),i(z)&&(n(z.key),A=""+z.key),"key"in z){K={};for(var oe in z)oe!=="key"&&(K[oe]=z[oe])}else K=z;return A&&c(K,typeof D=="function"?D.displayName||D.name||"Unknown":D),d(D,A,K,o(),le,ue)}function f(D){h(D)?D._store&&(D._store.validated=1):typeof D=="object"&&D!==null&&D.$$typeof===j&&(D._payload.status==="fulfilled"?h(D._payload.value)&&D._payload.value._store&&(D._payload.value._store.validated=1):D._store&&(D._store.validated=1))}function h(D){return typeof D=="object"&&D!==null&&D.$$typeof===y}var g=J,y=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),S=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),P=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,N=Array.isArray,W=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(D){return D()}};var _,F={},M=g.react_stack_bottom_frame.bind(g,s)(),$=W(r(s)),re={};Lt.Fragment=x,Lt.jsx=function(D,z,K){var X=1e4>P.recentlyCreatedOwnerStacks++;return p(D,z,K,!1,X?Error("react-stack-top-frame"):M,X?W(r(D)):$)},Lt.jsxs=function(D,z,K){var X=1e4>P.recentlyCreatedOwnerStacks++;return p(D,z,K,!0,X?Error("react-stack-top-frame"):M,X?W(r(D)):$)}})()),Lt}var Yo;function Zl(){return Yo||(Yo=1,process.env.NODE_ENV==="production"?hn.exports=Xl():hn.exports=Jl()),hn.exports}var a=Zl();function Go(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fe(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Go(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Go(e[o],null)}}}}function ie(...e){return l.useCallback(fe(...e),e)}var Ql=Symbol.for("react.lazy"),Rn=l[" use ".trim().toString()];function eu(e){return typeof e=="object"&&e!==null&&"then"in e}function Bs(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Ql&&"_payload"in e&&eu(e._payload)}function zs(e){const t=nu(e),n=l.forwardRef((r,o)=>{let{children:s,...i}=r;Bs(s)&&typeof Rn=="function"&&(s=Rn(s._payload));const c=l.Children.toArray(s),u=c.find(ou);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var tu=zs("Slot");function nu(e){const t=l.forwardRef((n,r)=>{let{children:o,...s}=n;if(Bs(o)&&typeof Rn=="function"&&(o=Rn(o._payload)),l.isValidElement(o)){const i=au(o),c=su(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ru=Symbol("radix.slottable");function ou(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ru}function su(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function au(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function q({variant:e="default",size:t="default",asChild:n=!1,disabled:r,style:o,className:s,onMouseEnter:i,onMouseLeave:c,onMouseDown:u,onMouseUp:d,children:p,...f}){const h=n?tu:"button",[g,y]=l.useState(!1),[m,x]=l.useState(!1),v={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.5rem",whiteSpace:"nowrap",borderRadius:"0.375rem",fontSize:"0.875rem",fontWeight:"500",transition:"all 0.15s ease-in-out",cursor:r?"not-allowed":"pointer",border:"none",outline:"none",fontFamily:"inherit"},w={default:{height:"2.25rem",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem"},sm:{height:"2rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",fontSize:"0.75rem",gap:"0.375rem"},lg:{height:"2.5rem",paddingLeft:"1.5rem",paddingRight:"1.5rem"},icon:{height:"2.25rem",width:"2.25rem",padding:0},"icon-sm":{height:"2rem",width:"2rem",padding:0},"icon-lg":{height:"2.5rem",width:"2.5rem",padding:0}},C={default:{backgroundColor:"#2563eb",color:"#ffffff"},destructive:{backgroundColor:"#dc2626",color:"#ffffff"},outline:{border:"1px solid #d1d5db",backgroundColor:"#ffffff",color:"#111827"},secondary:{backgroundColor:"#e5e7eb",color:"#111827"},ghost:{backgroundColor:"transparent",color:"#111827"},link:{color:"#2563eb",textDecoration:"underline",textUnderlineOffset:"4px",backgroundColor:"transparent"}},S={default:{backgroundColor:"#1d4ed8"},destructive:{backgroundColor:"#b91c1c"},outline:{backgroundColor:"#f9fafb"},secondary:{backgroundColor:"#d1d5db"},ghost:{backgroundColor:"#f3f4f6"},link:{color:"#1d4ed8"}},T={default:{backgroundColor:"#1e40af",transform:"scale(0.95)"},destructive:{backgroundColor:"#991b1b",transform:"scale(0.95)"},outline:{backgroundColor:"#f3f4f6",transform:"scale(0.95)"},secondary:{backgroundColor:"#9ca3af",transform:"scale(0.95)"},ghost:{backgroundColor:"#e5e7eb",transform:"scale(0.95)"},link:{color:"#1e40af"}};let I={...v,...w[t],...C[e]};g&&!r&&(I={...I,...S[e]}),m&&!r&&(I={...I,...T[e]}),r&&(I={...I,pointerEvents:"none",opacity:.5}),I={...I,...o};const O=k=>{y(!0),i?.(k)},b=k=>{y(!1),x(!1),c?.(k)},j=k=>{x(!0),u?.(k)},E=k=>{x(!1),d?.(k)};return a.jsx(h,{"data-takaui":"button",style:I,className:s,disabled:r,onMouseEnter:O,onMouseLeave:b,onMouseDown:j,onMouseUp:E,...f,children:p})}function iu(e,t){const n=l.createContext(t),r=s=>{const{children:i,...c}=s,u=l.useMemo(()=>c,Object.values(c));return a.jsx(n.Provider,{value:u,children:i})};r.displayName=e+"Provider";function o(s){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Ue(e,t=[]){let n=[];function r(s,i){const c=l.createContext(i),u=n.length;n=[...n,i];const d=f=>{const{scope:h,children:g,...y}=f,m=h?.[e]?.[u]||c,x=l.useMemo(()=>y,Object.values(y));return a.jsx(m.Provider,{value:x,children:g})};d.displayName=s+"Provider";function p(f,h){const g=h?.[e]?.[u]||c,y=l.useContext(g);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,p]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(c){const u=c?.[e]||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,cu(o,...t)]}function cu(...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(s){const i=r.reduce((c,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...c,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function G(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var me=globalThis?.document?l.useLayoutEffect:()=>{},lu=l[" useInsertionEffect ".trim().toString()]||me;function et({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=uu({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const p=l.useRef(e!==void 0);l.useEffect(()=>{const f=p.current;f!==c&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const d=l.useCallback(p=>{if(c){const f=du(p)?p(e):p;f!==e&&i.current?.(f)}else s(p)},[c,e,s,i]);return[u,d]}function uu({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return lu(()=>{s.current=t},[t]),l.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function du(e){return typeof e=="function"}function Hs(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])}function Ys(e){const[t,n]=l.useState(void 0);return me(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,c;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function fu(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Oe=e=>{const{present:t,children:n}=e,r=pu(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=ie(r.ref,mu(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Oe.displayName="Presence";function pu(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,u]=fu(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=gn(r.current);s.current=c==="mounted"?d:"none"},[c]),me(()=>{const d=r.current,p=o.current;if(p!==e){const h=s.current,g=gn(d);e?u("MOUNT"):g==="none"||d?.display==="none"?u("UNMOUNT"):u(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),me(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,f=g=>{const m=gn(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=g=>{g.target===t&&(s.current=gn(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function gn(e){return e?.animationName||"none"}function mu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function hu(e){const t=gu(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(yu);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function gu(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=bu(o),c=vu(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xu=Symbol("radix.slottable");function yu(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xu}function vu(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function bu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ur=wu.reduce((e,t)=>{const n=hu(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ln="Checkbox",[Su]=Ue(Ln),[Cu,Kr]=Su(Ln);function Nu(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:c,onCheckedChange:u,required:d,value:p="on",internal_do_not_use_render:f}=e,[h,g]=et({prop:n,defaultProp:o??!1,onChange:u,caller:Ln}),[y,m]=l.useState(null),[x,v]=l.useState(null),w=l.useRef(!1),C=y?!!i||!!y.closest("form"):!0,S={checked:h,disabled:s,setChecked:g,control:y,setControl:m,name:c,form:i,value:p,hasConsumerStoppedPropagationRef:w,required:d,defaultChecked:Qe(o)?!1:o,isFormControl:C,bubbleInput:x,setBubbleInput:v};return a.jsx(Cu,{scope:t,...S,children:Eu(f)?f(S):r})}var Gs="CheckboxTrigger",Us=l.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:c,checked:u,required:d,setControl:p,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:y}=Kr(Gs,e),m=ie(o,p),x=l.useRef(u);return l.useEffect(()=>{const v=s?.form;if(v){const w=()=>f(x.current);return v.addEventListener("reset",w),()=>v.removeEventListener("reset",w)}},[s,f]),a.jsx(Ur.button,{type:"button",role:"checkbox","aria-checked":Qe(u)?"mixed":u,"aria-required":d,"data-state":Zs(u),"data-disabled":c?"":void 0,disabled:c,value:i,...r,ref:m,onKeyDown:G(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:G(n,v=>{f(w=>Qe(w)?!0:!w),y&&g&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})})});Us.displayName=Gs;var qr=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:c,value:u,onCheckedChange:d,form:p,...f}=e;return a.jsx(Nu,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:c,required:i,onCheckedChange:d,name:r,form:p,value:u,internal_do_not_use_render:({isFormControl:h})=>a.jsxs(a.Fragment,{children:[a.jsx(Us,{...f,ref:t,__scopeCheckbox:n}),h&&a.jsx(Js,{__scopeCheckbox:n})]})})});qr.displayName=Ln;var Ks="CheckboxIndicator",qs=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Kr(Ks,n);return a.jsx(Oe,{present:r||Qe(s.checked)||s.checked===!0,children:a.jsx(Ur.span,{"data-state":Zs(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});qs.displayName=Ks;var Xs="CheckboxBubbleInput",Js=l.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:c,disabled:u,name:d,value:p,form:f,bubbleInput:h,setBubbleInput:g}=Kr(Xs,e),y=ie(n,g),m=Hs(s),x=Ys(r);l.useEffect(()=>{const w=h;if(!w)return;const C=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(C,"checked").set,I=!o.current;if(m!==s&&T){const O=new Event("click",{bubbles:I});w.indeterminate=Qe(s),T.call(w,Qe(s)?!1:s),w.dispatchEvent(O)}},[h,m,s,o]);const v=l.useRef(Qe(s)?!1:s);return a.jsx(Ur.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:c,disabled:u,name:d,value:p,form:f,...t,tabIndex:-1,ref:y,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Js.displayName=Xs;function Eu(e){return typeof e=="function"}function Qe(e){return e==="indeterminate"}function Zs(e){return Qe(e)?"indeterminate":e?"checked":"unchecked"}const ju=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ru=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Uo=e=>{const t=Ru(e);return t.charAt(0).toUpperCase()+t.slice(1)},Qs=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Pu=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Mu={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"};const ku=J.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...c},u)=>J.createElement("svg",{ref:u,...Mu,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Qs("lucide",o),...!s&&!Pu(c)&&{"aria-hidden":"true"},...c},[...i.map(([d,p])=>J.createElement(d,p)),...Array.isArray(s)?s:[s]]));const ge=(e,t)=>{const n=J.forwardRef(({className:r,...o},s)=>J.createElement(ku,{ref:s,iconNode:t,className:Qs(`lucide-${ju(Uo(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Uo(e),n};const Du=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Xr=ge("calendar",Du);const Tu=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Jr=ge("check",Tu);const Ou=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Qt=ge("chevron-down",Ou);const _u=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Le=ge("chevron-left",_u);const Au=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ee=ge("chevron-right",Au);const Iu=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Wn=ge("chevron-up",Iu);const $u=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],Fu=ge("chevrons-left",$u);const Lu=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],Wu=ge("chevrons-right",Lu);const Vu=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Zr=ge("chevrons-up-down",Vu);const Bu=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zu=ge("circle",Bu);const Hu=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Yu=ge("clock",Hu);const Gu=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ko=ge("plus",Gu);const Uu=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ku=ge("search",Uu);const qu=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Xu=ge("trash-2",qu);const Ju=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Zu=ge("x",Ju);function ea(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=ea(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qu(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ea(e))&&(r&&(r+=" "),r+=t);return r}const ed=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},td=(e,t)=>({classGroupId:e,validator:t}),ta=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Pn="-",qo=[],nd="arbitrary..",rd=e=>{const t=sd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return od(i);const c=i.split(Pn),u=c[0]===""&&c.length>1?1:0;return na(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=r[i],d=n[i];return u?d?ed(d,u):u:d||qo}return n[i]||qo}}},na=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const d=na(e,t+1,s);if(d)return d}const i=n.validators;if(i===null)return;const c=t===0?e.join(Pn):e.slice(t).join(Pn),u=i.length;for(let d=0;d<u;d++){const p=i[d];if(p.validator(c))return p.classGroupId}},od=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?nd+r:void 0})(),sd=e=>{const{theme:t,classGroups:n}=e;return ad(n,t)},ad=(e,t)=>{const n=ta();for(const r in e){const o=e[r];Qr(o,n,r,t)}return n},Qr=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];id(i,t,n,r)}},id=(e,t,n,r)=>{if(typeof e=="string"){cd(e,t,n);return}if(typeof e=="function"){ld(e,t,n,r);return}ud(e,t,n,r)},cd=(e,t,n)=>{const r=e===""?t:ra(t,e);r.classGroupId=n},ld=(e,t,n,r)=>{if(dd(e)){Qr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(td(n,e))},ud=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[c,u]=o[i];Qr(u,ra(t,c),n,r)}},ra=(e,t)=>{let n=e;const r=t.split(Pn),o=r.length;for(let s=0;s<o;s++){const i=r[s];let c=n.nextPart.get(i);c||(c=ta(),n.nextPart.set(i,c)),n=c}return n},dd=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,fd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},Tr="!",Xo=":",pd=[],Jo=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),md=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,c=0,u=0,d;const p=o.length;for(let m=0;m<p;m++){const x=o[m];if(i===0&&c===0){if(x===Xo){s.push(o.slice(u,m)),u=m+1;continue}if(x==="/"){d=m;continue}}x==="["?i++:x==="]"?i--:x==="("?c++:x===")"&&c--}const f=s.length===0?o:o.slice(u);let h=f,g=!1;f.endsWith(Tr)?(h=f.slice(0,-1),g=!0):f.startsWith(Tr)&&(h=f.slice(1),g=!0);const y=d&&d>u?d-u:void 0;return Jo(s,g,h,y)};if(t){const o=t+Xo,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):Jo(pd,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},hd=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],c=i[0]==="[",u=t.has(i);c||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},gd=e=>({cache:fd(e.cacheSize),parseClassName:md(e),sortModifiers:hd(e),...rd(e)}),xd=/\s+/,yd=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],c=e.trim().split(xd);let u="";for(let d=c.length-1;d>=0;d-=1){const p=c[d],{isExternal:f,modifiers:h,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:m}=n(p);if(f){u=p+(u.length>0?" "+u:u);continue}let x=!!m,v=r(x?y.substring(0,m):y);if(!v){if(!x){u=p+(u.length>0?" "+u:u);continue}if(v=r(y),!v){u=p+(u.length>0?" "+u:u);continue}x=!1}const w=h.length===0?"":h.length===1?h[0]:s(h).join(":"),C=g?w+Tr:w,S=C+v;if(i.indexOf(S)>-1)continue;i.push(S);const T=o(v,x);for(let I=0;I<T.length;++I){const O=T[I];i.push(C+O)}u=p+(u.length>0?" "+u:u)}return u},vd=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=oa(n))&&(o&&(o+=" "),o+=r);return o},oa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=oa(e[r]))&&(n&&(n+=" "),n+=t);return n},bd=(e,...t)=>{let n,r,o,s;const i=u=>{const d=t.reduce((p,f)=>f(p),e());return n=gd(d),r=n.cache.get,o=n.cache.set,s=c,c(u)},c=u=>{const d=r(u);if(d)return d;const p=yd(u,n);return o(u,p),p};return s=i,(...u)=>s(vd(...u))},wd=[],de=e=>{const t=n=>n[e]||wd;return t.isThemeGetter=!0,t},sa=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,aa=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sd=/^\d+\/\d+$/,Cd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Nd=/\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$/,Ed=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bt=e=>Sd.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),Ke=e=>!!e&&Number.isInteger(Number(e)),xr=e=>e.endsWith("%")&&ne(e.slice(0,-1)),Be=e=>Cd.test(e),Pd=()=>!0,Md=e=>Nd.test(e)&&!Ed.test(e),ia=()=>!1,kd=e=>jd.test(e),Dd=e=>Rd.test(e),Td=e=>!H(e)&&!Y(e),Od=e=>Dt(e,ua,ia),H=e=>sa.test(e),lt=e=>Dt(e,da,Md),yr=e=>Dt(e,Fd,ne),Zo=e=>Dt(e,ca,ia),_d=e=>Dt(e,la,Dd),xn=e=>Dt(e,fa,kd),Y=e=>aa.test(e),Wt=e=>Tt(e,da),Ad=e=>Tt(e,Ld),Qo=e=>Tt(e,ca),Id=e=>Tt(e,ua),$d=e=>Tt(e,la),yn=e=>Tt(e,fa,!0),Dt=(e,t,n)=>{const r=sa.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Tt=(e,t,n=!1)=>{const r=aa.exec(e);return r?r[1]?t(r[1]):n:!1},ca=e=>e==="position"||e==="percentage",la=e=>e==="image"||e==="url",ua=e=>e==="length"||e==="size"||e==="bg-size",da=e=>e==="length",Fd=e=>e==="number",Ld=e=>e==="family-name",fa=e=>e==="shadow",Wd=()=>{const e=de("color"),t=de("font"),n=de("text"),r=de("font-weight"),o=de("tracking"),s=de("leading"),i=de("breakpoint"),c=de("container"),u=de("spacing"),d=de("radius"),p=de("shadow"),f=de("inset-shadow"),h=de("text-shadow"),g=de("drop-shadow"),y=de("blur"),m=de("perspective"),x=de("aspect"),v=de("ease"),w=de("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...S(),Y,H],I=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],b=()=>[Y,H,u],j=()=>[bt,"full","auto",...b()],E=()=>[Ke,"none","subgrid",Y,H],k=()=>["auto",{span:["full",Ke,Y,H]},Ke,Y,H],P=()=>[Ke,"auto",Y,H],L=()=>["auto","min","max","fr",Y,H],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...b()],F=()=>[bt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...b()],M=()=>[e,Y,H],$=()=>[...S(),Qo,Zo,{position:[Y,H]}],re=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",Id,Od,{size:[Y,H]}],z=()=>[xr,Wt,lt],K=()=>["","none","full",d,Y,H],X=()=>["",ne,Wt,lt],le=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[ne,xr,Qo,Zo],Q=()=>["","none",y,Y,H],oe=()=>["none",ne,Y,H],ee=()=>["none",ne,Y,H],te=()=>[ne,Y,H],R=()=>[bt,"full",...b()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Be],breakpoint:[Be],color:[Pd],container:[Be],"drop-shadow":[Be],ease:["in","out","in-out"],font:[Td],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Be],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Be],shadow:[Be],spacing:["px",ne],text:[Be],"text-shadow":[Be],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bt,H,Y,x]}],container:["container"],columns:[{columns:[ne,H,Y,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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"],sr:["sr-only","not-sr-only"],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:T()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{start:j()}],end:[{end:j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[Ke,"auto",Y,H]}],basis:[{basis:[bt,"full","auto",c,...b()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,bt,"auto","initial","none",H]}],grow:[{grow:["",ne,Y,H]}],shrink:[{shrink:["",ne,Y,H]}],order:[{order:[Ke,"first","last","none",Y,H]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:b()}],"gap-x":[{"gap-x":b()}],"gap-y":[{"gap-y":b()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:b()}],px:[{px:b()}],py:[{py:b()}],ps:[{ps:b()}],pe:[{pe:b()}],pt:[{pt:b()}],pr:[{pr:b()}],pb:[{pb:b()}],pl:[{pl:b()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":b()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":b()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[c,"screen",...F()]}],"min-w":[{"min-w":[c,"screen","none",...F()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,Wt,lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Y,yr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xr,H]}],"font-family":[{font:[Ad,H,t]}],"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:[o,Y,H]}],"line-clamp":[{"line-clamp":[ne,"none",Y,yr]}],leading:[{leading:[s,...b()]}],"list-image":[{"list-image":["none",Y,H]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Y,H]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",Y,lt]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[ne,"auto",Y,H]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y,H]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y,H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ke,Y,H],radial:["",Y,H],conic:[Ke,Y,H]},$d,_d]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,Y,H]}],"outline-w":[{outline:["",ne,Wt,lt]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",p,yn,xn]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",f,yn,xn]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[ne,lt]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",h,yn,xn]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[ne,Y,H]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Y,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Y,H]}],filter:[{filter:["","none",Y,H]}],blur:[{blur:Q()}],brightness:[{brightness:[ne,Y,H]}],contrast:[{contrast:[ne,Y,H]}],"drop-shadow":[{"drop-shadow":["","none",g,yn,xn]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",ne,Y,H]}],"hue-rotate":[{"hue-rotate":[ne,Y,H]}],invert:[{invert:["",ne,Y,H]}],saturate:[{saturate:[ne,Y,H]}],sepia:[{sepia:["",ne,Y,H]}],"backdrop-filter":[{"backdrop-filter":["","none",Y,H]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[ne,Y,H]}],"backdrop-contrast":[{"backdrop-contrast":[ne,Y,H]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,Y,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,Y,H]}],"backdrop-invert":[{"backdrop-invert":["",ne,Y,H]}],"backdrop-opacity":[{"backdrop-opacity":[ne,Y,H]}],"backdrop-saturate":[{"backdrop-saturate":[ne,Y,H]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,Y,H]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":b()}],"border-spacing-x":[{"border-spacing-x":b()}],"border-spacing-y":[{"border-spacing-y":b()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Y,H]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",Y,H]}],ease:[{ease:["linear","initial",v,Y,H]}],delay:[{delay:[ne,Y,H]}],animate:[{animate:["none",w,Y,H]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Y,H]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:ee()}],"scale-x":[{"scale-x":ee()}],"scale-y":[{"scale-y":ee()}],"scale-z":[{"scale-z":ee()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[Y,H,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Y,H]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"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",Y,H]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[ne,Wt,lt,yr]}],stroke:[{stroke:["none",...M()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Vd=bd(Wd);function V(...e){return Vd(Qu(e))}const Vn=l.forwardRef(({className:e,...t},n)=>a.jsx(qr,{ref:n,className:V("peer h-4 w-4 shrink-0 rounded border border-gray-200 bg-white ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-400 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-900 data-[state=checked]:border-gray-900 data-[state=checked]:text-white transition-colors",e),...t,children:a.jsx(qs,{className:V("flex items-center justify-center text-current"),children:a.jsx(Jr,{className:"h-3.5 w-3.5 stroke-[2.5]"})})}));Vn.displayName=qr.displayName;const ze=l.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,"data-takaui":"input",className:V("flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-400 focus:outline-none focus:border-gray-500 hover:border-gray-400 disabled:cursor-not-allowed disabled:opacity-50 transition-colors",e),ref:r,...n}));ze.displayName="Input";const pa=l.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>a.jsx("div",{ref:o,role:n?"none":"separator","aria-orientation":t,className:V("shrink-0 bg-gray-200",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));pa.displayName="Separator";const ma=l.createContext({variant:"default"});function Bn({className:e,variant:t="default",...n}){return a.jsx(ma.Provider,{value:{variant:t},children:a.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:a.jsx("table",{"data-slot":"table",className:V("w-full caption-bottom text-sm",e),...n})})})}function zn({className:e,...t}){return a.jsx("thead",{"data-slot":"table-header",className:V("bg-gray-50 [&_tr]:border-b [&_tr]:border-gray-200",e),...t})}function Hn({className:e,...t}){return a.jsx("tbody",{"data-slot":"table-body",className:V("[&_tr:last-child]:border-b-0",e),...t})}function Bd({className:e,...t}){return a.jsx("tfoot",{"data-slot":"table-footer",className:V("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function $e({className:e,...t}){const{variant:n}=l.useContext(ma);return a.jsx("tr",{"data-slot":"table-row",className:V("hover:bg-gray-50 data-[state=selected]:bg-gray-50 transition-colors border-b border-gray-200",n==="clean"&&"border-b-0",e),...t})}function Yn({className:e,...t}){return a.jsx("th",{"data-slot":"table-head",className:V("text-foreground h-auto px-3 py-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function pt({className:e,...t}){return a.jsx("td",{"data-slot":"table-cell",className:V("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function zd({className:e,...t}){return a.jsx("caption",{"data-slot":"table-caption",className:V("text-muted-foreground mt-4 text-sm",e),...t})}function Hd(e){const t=Yd(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Ud);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Yd(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=qd(o),c=Kd(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gd=Symbol("radix.slottable");function Ud(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gd}function Kd(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function qd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Jd=Xd.reduce((e,t)=>{const n=Hd(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function es(e){const t=Zd(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(ef);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Zd(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=nf(o),c=tf(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qd=Symbol("radix.slottable");function ef(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qd}function tf(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function nf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function eo(e){const t=e+"CollectionProvider",[n,r]=Ue(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:x,children:v}=m,w=J.useRef(null),C=J.useRef(new Map).current;return a.jsx(o,{scope:x,itemMap:C,collectionRef:w,children:v})};i.displayName=t;const c=e+"CollectionSlot",u=es(c),d=J.forwardRef((m,x)=>{const{scope:v,children:w}=m,C=s(c,v),S=ie(x,C.collectionRef);return a.jsx(u,{ref:S,children:w})});d.displayName=c;const p=e+"CollectionItemSlot",f="data-radix-collection-item",h=es(p),g=J.forwardRef((m,x)=>{const{scope:v,children:w,...C}=m,S=J.useRef(null),T=ie(x,S),I=s(p,v);return J.useEffect(()=>(I.itemMap.set(S,{ref:S,...C}),()=>void I.itemMap.delete(S))),a.jsx(h,{[f]:"",ref:T,children:w})});g.displayName=p;function y(m){const x=s(e+"CollectionConsumer",m);return J.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const C=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((I,O)=>C.indexOf(I.ref.current)-C.indexOf(O.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:d,ItemSlot:g},y,r]}var rf=l.createContext(void 0);function to(e){const t=l.useContext(rf);return e||t||"ltr"}function of(e){const t=sf(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(cf);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function sf(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=uf(o),c=lf(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var af=Symbol("radix.slottable");function cf(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===af}function lf(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function uf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var df=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ha=df.reduce((e,t)=>{const n=of(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ff(e,t){e&&Zt.flushSync(()=>e.dispatchEvent(t))}function ke(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current?.(...n),[])}function pf(e,t=globalThis?.document){const n=ke(e);l.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 mf="DismissableLayer",Or="dismissableLayer.update",hf="dismissableLayer.pointerDownOutside",gf="dismissableLayer.focusOutside",ts,ga=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),en=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...u}=e,d=l.useContext(ga),[p,f]=l.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=l.useState({}),y=ie(t,O=>f(O)),m=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(x),w=p?m.indexOf(p):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=v,T=vf(O=>{const b=O.target,j=[...d.branches].some(E=>E.contains(b));!S||j||(o?.(O),i?.(O),O.defaultPrevented||c?.())},h),I=bf(O=>{const b=O.target;[...d.branches].some(E=>E.contains(b))||(s?.(O),i?.(O),O.defaultPrevented||c?.())},h);return pf(O=>{w===d.layers.size-1&&(r?.(O),!O.defaultPrevented&&c&&(O.preventDefault(),c()))},h),l.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ts=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),ns(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ts)}},[p,h,n,d]),l.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),ns())},[p,d]),l.useEffect(()=>{const O=()=>g({});return document.addEventListener(Or,O),()=>document.removeEventListener(Or,O)},[]),a.jsx(ha.div,{...u,ref:y,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:G(e.onFocusCapture,I.onFocusCapture),onBlurCapture:G(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,T.onPointerDownCapture)})});en.displayName=mf;var xf="DismissableLayerBranch",yf=l.forwardRef((e,t)=>{const n=l.useContext(ga),r=l.useRef(null),o=ie(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),a.jsx(ha.div,{...e,ref:o})});yf.displayName=xf;function vf(e,t=globalThis?.document){const n=ke(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let u=function(){xa(hf,n,d,{discrete:!0})};const d={originalEvent:c};c.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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function bf(e,t=globalThis?.document){const n=ke(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&xa(gf,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ns(){const e=new CustomEvent(Or);document.dispatchEvent(e)}function xa(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ff(o,s):o.dispatchEvent(s)}var vr=0;function Gn(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rs()),document.body.insertAdjacentElement("beforeend",e[1]??rs()),vr++,()=>{vr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),vr--}},[])}function rs(){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}function wf(e){const t=Sf(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Nf);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Sf(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=jf(o),c=Ef(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Cf=Symbol("radix.slottable");function Nf(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Cf}function Ef(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function jf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Rf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pf=Rf.reduce((e,t)=>{const n=wf(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),br="focusScope.autoFocusOnMount",wr="focusScope.autoFocusOnUnmount",os={bubbles:!1,cancelable:!0},Mf="FocusScope",tn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[c,u]=l.useState(null),d=ke(o),p=ke(s),f=l.useRef(null),h=ie(t,m=>u(m)),g=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let m=function(C){if(g.paused||!c)return;const S=C.target;c.contains(S)?f.current=S:Xe(f.current,{select:!0})},x=function(C){if(g.paused||!c)return;const S=C.relatedTarget;S!==null&&(c.contains(S)||Xe(f.current,{select:!0}))},v=function(C){if(document.activeElement===document.body)for(const T of C)T.removedNodes.length>0&&Xe(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const w=new MutationObserver(v);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),w.disconnect()}}},[r,c,g.paused]),l.useEffect(()=>{if(c){as.add(g);const m=document.activeElement;if(!c.contains(m)){const v=new CustomEvent(br,os);c.addEventListener(br,d),c.dispatchEvent(v),v.defaultPrevented||(kf(Af(ya(c)),{select:!0}),document.activeElement===m&&Xe(c))}return()=>{c.removeEventListener(br,d),setTimeout(()=>{const v=new CustomEvent(wr,os);c.addEventListener(wr,p),c.dispatchEvent(v),v.defaultPrevented||Xe(m??document.body,{select:!0}),c.removeEventListener(wr,p),as.remove(g)},0)}}},[c,d,p,g]);const y=l.useCallback(m=>{if(!n&&!r||g.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(x&&v){const w=m.currentTarget,[C,S]=Df(w);C&&S?!m.shiftKey&&v===S?(m.preventDefault(),n&&Xe(C,{select:!0})):m.shiftKey&&v===C&&(m.preventDefault(),n&&Xe(S,{select:!0})):v===w&&m.preventDefault()}},[n,r,g.paused]);return a.jsx(Pf.div,{tabIndex:-1,...i,ref:h,onKeyDown:y})});tn.displayName=Mf;function kf(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Xe(r,{select:t}),document.activeElement!==n)return}function Df(e){const t=ya(e),n=ss(t,e),r=ss(t.reverse(),e);return[n,r]}function ya(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 ss(e,t){for(const n of e)if(!Tf(n,{upTo:t}))return n}function Tf(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 Of(e){return e instanceof HTMLInputElement&&"select"in e}function Xe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Of(e)&&t&&e.select()}}var as=_f();function _f(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=is(e,t),e.unshift(t)},remove(t){e=is(e,t),e[0]?.resume()}}}function is(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Af(e){return e.filter(t=>t.tagName!=="A")}var If=l[" useId ".trim().toString()]||(()=>{}),$f=0;function je(e){const[t,n]=l.useState(If());return me(()=>{n(r=>r??String($f++))},[e]),t?`radix-${t}`:""}const Ff=["top","right","bottom","left"],tt=Math.min,be=Math.max,Mn=Math.round,vn=Math.floor,Fe=e=>({x:e,y:e}),Lf={left:"right",right:"left",bottom:"top",top:"bottom"},Wf={start:"end",end:"start"};function _r(e,t,n){return be(e,tt(t,n))}function Ye(e,t){return typeof e=="function"?e(t):e}function Ge(e){return e.split("-")[0]}function Ot(e){return e.split("-")[1]}function no(e){return e==="x"?"y":"x"}function ro(e){return e==="y"?"height":"width"}const Vf=new Set(["top","bottom"]);function Ie(e){return Vf.has(Ge(e))?"y":"x"}function oo(e){return no(Ie(e))}function Bf(e,t,n){n===void 0&&(n=!1);const r=Ot(e),o=oo(e),s=ro(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=kn(i)),[i,kn(i)]}function zf(e){const t=kn(e);return[Ar(e),t,Ar(t)]}function Ar(e){return e.replace(/start|end/g,t=>Wf[t])}const cs=["left","right"],ls=["right","left"],Hf=["top","bottom"],Yf=["bottom","top"];function Gf(e,t,n){switch(e){case"top":case"bottom":return n?t?ls:cs:t?cs:ls;case"left":case"right":return t?Hf:Yf;default:return[]}}function Uf(e,t,n,r){const o=Ot(e);let s=Gf(Ge(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ar)))),s}function kn(e){return e.replace(/left|right|bottom|top/g,t=>Lf[t])}function Kf(e){return{top:0,right:0,bottom:0,left:0,...e}}function va(e){return typeof e!="number"?Kf(e):{top:e,right:e,bottom:e,left:e}}function Dn(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 us(e,t,n){let{reference:r,floating:o}=e;const s=Ie(t),i=oo(t),c=ro(i),u=Ge(t),d=s==="y",p=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[c]/2-o[c]/2;let g;switch(u){case"top":g={x:p,y:r.y-o.height};break;case"bottom":g={x:p,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-o.width,y:f};break;default:g={x:r.x,y:r.y}}switch(Ot(t)){case"start":g[i]-=h*(n&&d?-1:1);break;case"end":g[i]+=h*(n&&d?-1:1);break}return g}const qf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:f}=us(d,r,u),h=r,g={},y=0;for(let m=0;m<c.length;m++){const{name:x,fn:v}=c[m],{x:w,y:C,data:S,reset:T}=await v({x:p,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:g,rects:d,platform:i,elements:{reference:e,floating:t}});p=w??p,f=C??f,g={...g,[x]:{...g[x],...S}},T&&y<=50&&(y++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(d=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:p,y:f}=us(d,h,u)),m=-1)}return{x:p,y:f,placement:h,strategy:o,middlewareData:g}};async function Ut(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:h=!1,padding:g=0}=Ye(t,e),y=va(g),x=c[h?f==="floating"?"reference":"floating":f],v=Dn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:d,rootBoundary:p,strategy:u})),w=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),S=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},T=Dn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:C,strategy:u}):w);return{top:(v.top-T.top+y.top)/S.y,bottom:(T.bottom-v.bottom+y.bottom)/S.y,left:(v.left-T.left+y.left)/S.x,right:(T.right-v.right+y.right)/S.x}}const Xf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:p=0}=Ye(e,t)||{};if(d==null)return{};const f=va(p),h={x:n,y:r},g=oo(o),y=ro(g),m=await i.getDimensions(d),x=g==="y",v=x?"top":"left",w=x?"bottom":"right",C=x?"clientHeight":"clientWidth",S=s.reference[y]+s.reference[g]-h[g]-s.floating[y],T=h[g]-s.reference[g],I=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let O=I?I[C]:0;(!O||!await(i.isElement==null?void 0:i.isElement(I)))&&(O=c.floating[C]||s.floating[y]);const b=S/2-T/2,j=O/2-m[y]/2-1,E=tt(f[v],j),k=tt(f[w],j),P=E,L=O-m[y]-k,N=O/2-m[y]/2+b,W=_r(P,N,L),_=!u.arrow&&Ot(o)!=null&&N!==W&&s.reference[y]/2-(N<P?E:k)-m[y]/2<0,F=_?N<P?N-P:N-L:0;return{[g]:h[g]+F,data:{[g]:W,centerOffset:N-W-F,..._&&{alignmentOffset:F}},reset:_}}}),Jf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...x}=Ye(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Ge(o),w=Ie(c),C=Ge(c)===c,S=await(u.isRTL==null?void 0:u.isRTL(d.floating)),T=h||(C||!m?[kn(c)]:zf(c)),I=y!=="none";!h&&I&&T.push(...Uf(c,m,y,S));const O=[c,...T],b=await Ut(t,x),j=[];let E=((r=s.flip)==null?void 0:r.overflows)||[];if(p&&j.push(b[v]),f){const N=Bf(o,i,S);j.push(b[N[0]],b[N[1]])}if(E=[...E,{placement:o,overflows:j}],!j.every(N=>N<=0)){var k,P;const N=(((k=s.flip)==null?void 0:k.index)||0)+1,W=O[N];if(W&&(!(f==="alignment"?w!==Ie(W):!1)||E.every(M=>Ie(M.placement)===w?M.overflows[0]>0:!0)))return{data:{index:N,overflows:E},reset:{placement:W}};let _=(P=E.filter(F=>F.overflows[0]<=0).sort((F,M)=>F.overflows[1]-M.overflows[1])[0])==null?void 0:P.placement;if(!_)switch(g){case"bestFit":{var L;const F=(L=E.filter(M=>{if(I){const $=Ie(M.placement);return $===w||$==="y"}return!0}).map(M=>[M.placement,M.overflows.filter($=>$>0).reduce(($,re)=>$+re,0)]).sort((M,$)=>M[1]-$[1])[0])==null?void 0:L[0];F&&(_=F);break}case"initialPlacement":_=c;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function ds(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fs(e){return Ff.some(t=>e[t]>=0)}const Zf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ye(e,t);switch(r){case"referenceHidden":{const s=await Ut(t,{...o,elementContext:"reference"}),i=ds(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:fs(i)}}}case"escaped":{const s=await Ut(t,{...o,altBoundary:!0}),i=ds(s,n.floating);return{data:{escapedOffsets:i,escaped:fs(i)}}}default:return{}}}}},ba=new Set(["left","top"]);async function Qf(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ge(n),c=Ot(n),u=Ie(n)==="y",d=ba.has(i)?-1:1,p=s&&u?-1:1,f=Ye(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof y=="number"&&(g=c==="end"?y*-1:y),u?{x:g*p,y:h*d}:{x:h*d,y:g*p}}const ep=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:c}=t,u=await Qf(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},tp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:x=>{let{x:v,y:w}=x;return{x:v,y:w}}},...u}=Ye(e,t),d={x:n,y:r},p=await Ut(t,u),f=Ie(Ge(o)),h=no(f);let g=d[h],y=d[f];if(s){const x=h==="y"?"top":"left",v=h==="y"?"bottom":"right",w=g+p[x],C=g-p[v];g=_r(w,g,C)}if(i){const x=f==="y"?"top":"left",v=f==="y"?"bottom":"right",w=y+p[x],C=y-p[v];y=_r(w,y,C)}const m=c.fn({...t,[h]:g,[f]:y});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:s,[f]:i}}}}}},np=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Ye(e,t),p={x:n,y:r},f=Ie(o),h=no(f);let g=p[h],y=p[f];const m=Ye(c,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const C=h==="y"?"height":"width",S=s.reference[h]-s.floating[C]+x.mainAxis,T=s.reference[h]+s.reference[C]-x.mainAxis;g<S?g=S:g>T&&(g=T)}if(d){var v,w;const C=h==="y"?"width":"height",S=ba.has(Ge(o)),T=s.reference[f]-s.floating[C]+(S&&((v=i.offset)==null?void 0:v[f])||0)+(S?0:x.crossAxis),I=s.reference[f]+s.reference[C]+(S?0:((w=i.offset)==null?void 0:w[f])||0)-(S?x.crossAxis:0);y<T?y=T:y>I&&(y=I)}return{[h]:g,[f]:y}}}},rp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...d}=Ye(e,t),p=await Ut(t,d),f=Ge(o),h=Ot(o),g=Ie(o)==="y",{width:y,height:m}=s.floating;let x,v;f==="top"||f==="bottom"?(x=f,v=h===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(v=f,x=h==="end"?"top":"bottom");const w=m-p.top-p.bottom,C=y-p.left-p.right,S=tt(m-p[x],w),T=tt(y-p[v],C),I=!t.middlewareData.shift;let O=S,b=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(b=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=w),I&&!h){const E=be(p.left,0),k=be(p.right,0),P=be(p.top,0),L=be(p.bottom,0);g?b=y-2*(E!==0||k!==0?E+k:be(p.left,p.right)):O=m-2*(P!==0||L!==0?P+L:be(p.top,p.bottom))}await u({...t,availableWidth:b,availableHeight:O});const j=await i.getDimensions(c.floating);return y!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function Un(){return typeof window<"u"}function _t(e){return wa(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ve(e){var t;return(t=(wa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wa(e){return Un()?e instanceof Node||e instanceof we(e).Node:!1}function De(e){return Un()?e instanceof Element||e instanceof we(e).Element:!1}function We(e){return Un()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function ps(e){return!Un()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}const op=new Set(["inline","contents"]);function nn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!op.has(o)}const sp=new Set(["table","td","th"]);function ap(e){return sp.has(_t(e))}const ip=[":popover-open",":modal"];function Kn(e){return ip.some(t=>{try{return e.matches(t)}catch{return!1}})}const cp=["transform","translate","scale","rotate","perspective"],lp=["transform","translate","scale","rotate","perspective","filter"],up=["paint","layout","strict","content"];function so(e){const t=ao(),n=De(e)?Te(e):e;return cp.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||lp.some(r=>(n.willChange||"").includes(r))||up.some(r=>(n.contain||"").includes(r))}function dp(e){let t=nt(e);for(;We(t)&&!Mt(t);){if(so(t))return t;if(Kn(t))return null;t=nt(t)}return null}function ao(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fp=new Set(["html","body","#document"]);function Mt(e){return fp.has(_t(e))}function Te(e){return we(e).getComputedStyle(e)}function qn(e){return De(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nt(e){if(_t(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ps(e)&&e.host||Ve(e);return ps(t)?t.host:t}function Sa(e){const t=nt(e);return Mt(t)?e.ownerDocument?e.ownerDocument.body:e.body:We(t)&&nn(t)?t:Sa(t)}function Kt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Sa(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=we(o);if(s){const c=Ir(i);return t.concat(i,i.visualViewport||[],nn(o)?o:[],c&&n?Kt(c):[])}return t.concat(o,Kt(o,[],n))}function Ir(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ca(e){const t=Te(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=We(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=Mn(n)!==s||Mn(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function io(e){return De(e)?e:e.contextElement}function Rt(e){const t=io(e);if(!We(t))return Fe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Ca(t);let i=(s?Mn(n.width):n.width)/r,c=(s?Mn(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const pp=Fe(0);function Na(e){const t=we(e);return!ao()||!t.visualViewport?pp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==we(e)?!1:t}function mt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=io(e);let i=Fe(1);t&&(r?De(r)&&(i=Rt(r)):i=Rt(e));const c=mp(s,n,r)?Na(s):Fe(0);let u=(o.left+c.x)/i.x,d=(o.top+c.y)/i.y,p=o.width/i.x,f=o.height/i.y;if(s){const h=we(s),g=r&&De(r)?we(r):r;let y=h,m=Ir(y);for(;m&&r&&g!==y;){const x=Rt(m),v=m.getBoundingClientRect(),w=Te(m),C=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*x.x,S=v.top+(m.clientTop+parseFloat(w.paddingTop))*x.y;u*=x.x,d*=x.y,p*=x.x,f*=x.y,u+=C,d+=S,y=we(m),m=Ir(y)}}return Dn({width:p,height:f,x:u,y:d})}function Xn(e,t){const n=qn(e).scrollLeft;return t?t.left+n:mt(Ve(e)).left+n}function Ea(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Xn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function hp(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ve(r),c=t?Kn(t.floating):!1;if(r===i||c&&s)return n;let u={scrollLeft:0,scrollTop:0},d=Fe(1);const p=Fe(0),f=We(r);if((f||!f&&!s)&&((_t(r)!=="body"||nn(i))&&(u=qn(r)),We(r))){const g=mt(r);d=Rt(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const h=i&&!f&&!s?Ea(i,u):Fe(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+p.x+h.x,y:n.y*d.y-u.scrollTop*d.y+p.y+h.y}}function gp(e){return Array.from(e.getClientRects())}function xp(e){const t=Ve(e),n=qn(e),r=e.ownerDocument.body,o=be(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=be(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Xn(e);const c=-n.scrollTop;return Te(r).direction==="rtl"&&(i+=be(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}const ms=25;function yp(e,t){const n=we(e),r=Ve(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,u=0;if(o){s=o.width,i=o.height;const p=ao();(!p||p&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const d=Xn(r);if(d<=0){const p=r.ownerDocument,f=p.body,h=getComputedStyle(f),g=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,y=Math.abs(r.clientWidth-f.clientWidth-g);y<=ms&&(s-=y)}else d<=ms&&(s+=d);return{width:s,height:i,x:c,y:u}}const vp=new Set(["absolute","fixed"]);function bp(e,t){const n=mt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=We(e)?Rt(e):Fe(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,u=o*s.x,d=r*s.y;return{width:i,height:c,x:u,y:d}}function hs(e,t,n){let r;if(t==="viewport")r=yp(e,n);else if(t==="document")r=xp(Ve(e));else if(De(t))r=bp(t,n);else{const o=Na(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Dn(r)}function ja(e,t){const n=nt(e);return n===t||!De(n)||Mt(n)?!1:Te(n).position==="fixed"||ja(n,t)}function wp(e,t){const n=t.get(e);if(n)return n;let r=Kt(e,[],!1).filter(c=>De(c)&&_t(c)!=="body"),o=null;const s=Te(e).position==="fixed";let i=s?nt(e):e;for(;De(i)&&!Mt(i);){const c=Te(i),u=so(i);!u&&c.position==="fixed"&&(o=null),(s?!u&&!o:!u&&c.position==="static"&&!!o&&vp.has(o.position)||nn(i)&&!u&&ja(e,i))?r=r.filter(p=>p!==i):o=c,i=nt(i)}return t.set(e,r),r}function Sp(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Kn(t)?[]:wp(t,this._c):[].concat(n),r],c=i[0],u=i.reduce((d,p)=>{const f=hs(t,p,o);return d.top=be(f.top,d.top),d.right=tt(f.right,d.right),d.bottom=tt(f.bottom,d.bottom),d.left=be(f.left,d.left),d},hs(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Cp(e){const{width:t,height:n}=Ca(e);return{width:t,height:n}}function Np(e,t,n){const r=We(t),o=Ve(t),s=n==="fixed",i=mt(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=Fe(0);function d(){u.x=Xn(o)}if(r||!r&&!s)if((_t(t)!=="body"||nn(o))&&(c=qn(t)),r){const g=mt(t,!0,s,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else o&&d();s&&!r&&o&&d();const p=o&&!r&&!s?Ea(o,c):Fe(0),f=i.left+c.scrollLeft-u.x-p.x,h=i.top+c.scrollTop-u.y-p.y;return{x:f,y:h,width:i.width,height:i.height}}function Sr(e){return Te(e).position==="static"}function gs(e,t){if(!We(e)||Te(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ve(e)===n&&(n=n.ownerDocument.body),n}function Ra(e,t){const n=we(e);if(Kn(e))return n;if(!We(e)){let o=nt(e);for(;o&&!Mt(o);){if(De(o)&&!Sr(o))return o;o=nt(o)}return n}let r=gs(e,t);for(;r&&ap(r)&&Sr(r);)r=gs(r,t);return r&&Mt(r)&&Sr(r)&&!so(r)?n:r||dp(e)||n}const Ep=async function(e){const t=this.getOffsetParent||Ra,n=this.getDimensions,r=await n(e.floating);return{reference:Np(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function jp(e){return Te(e).direction==="rtl"}const Rp={convertOffsetParentRelativeRectToViewportRelativeRect:hp,getDocumentElement:Ve,getClippingRect:Sp,getOffsetParent:Ra,getElementRects:Ep,getClientRects:gp,getDimensions:Cp,getScale:Rt,isElement:De,isRTL:jp};function Pa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pp(e,t){let n=null,r;const o=Ve(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:p,top:f,width:h,height:g}=d;if(c||t(),!h||!g)return;const y=vn(f),m=vn(o.clientWidth-(p+h)),x=vn(o.clientHeight-(f+g)),v=vn(p),C={rootMargin:-y+"px "+-m+"px "+-x+"px "+-v+"px",threshold:be(0,tt(1,u))||1};let S=!0;function T(I){const O=I[0].intersectionRatio;if(O!==u){if(!S)return i();O?i(!1,O):r=setTimeout(()=>{i(!1,1e-7)},1e3)}O===1&&!Pa(d,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(T,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,C)}n.observe(e)}return i(!0),s}function Mp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=io(e),p=o||s?[...d?Kt(d):[],...Kt(t)]:[];p.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=d&&c?Pp(d,n):null;let h=-1,g=null;i&&(g=new ResizeObserver(v=>{let[w]=v;w&&w.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),d&&!u&&g.observe(d),g.observe(t));let y,m=u?mt(e):null;u&&x();function x(){const v=mt(e);m&&!Pa(m,v)&&n(),m=v,y=requestAnimationFrame(x)}return n(),()=>{var v;p.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f?.(),(v=g)==null||v.disconnect(),g=null,u&&cancelAnimationFrame(y)}}const kp=ep,Dp=tp,Tp=Jf,Op=rp,_p=Zf,xs=Xf,Ap=np,Ip=(e,t,n)=>{const r=new Map,o={platform:Rp,...n},s={...o.platform,_c:r};return qf(e,t,{...o,platform:s})};var $p=typeof document<"u",Fp=function(){},Nn=$p?J.useLayoutEffect:Fp;function Tn(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(!Tn(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Tn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ma(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ys(e,t){const n=Ma(e);return Math.round(t*n)/n}function Cr(e){const t=l.useRef(e);return Nn(()=>{t.current=e}),t}function Lp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[p,f]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=l.useState(r);Tn(h,r)||g(r);const[y,m]=l.useState(null),[x,v]=l.useState(null),w=l.useCallback(M=>{M!==I.current&&(I.current=M,m(M))},[]),C=l.useCallback(M=>{M!==O.current&&(O.current=M,v(M))},[]),S=s||y,T=i||x,I=l.useRef(null),O=l.useRef(null),b=l.useRef(p),j=u!=null,E=Cr(u),k=Cr(o),P=Cr(d),L=l.useCallback(()=>{if(!I.current||!O.current)return;const M={placement:t,strategy:n,middleware:h};k.current&&(M.platform=k.current),Ip(I.current,O.current,M).then($=>{const re={...$,isPositioned:P.current!==!1};N.current&&!Tn(b.current,re)&&(b.current=re,Zt.flushSync(()=>{f(re)}))})},[h,t,n,k,P]);Nn(()=>{d===!1&&b.current.isPositioned&&(b.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[d]);const N=l.useRef(!1);Nn(()=>(N.current=!0,()=>{N.current=!1}),[]),Nn(()=>{if(S&&(I.current=S),T&&(O.current=T),S&&T){if(E.current)return E.current(S,T,L);L()}},[S,T,L,E,j]);const W=l.useMemo(()=>({reference:I,floating:O,setReference:w,setFloating:C}),[w,C]),_=l.useMemo(()=>({reference:S,floating:T}),[S,T]),F=l.useMemo(()=>{const M={position:n,left:0,top:0};if(!_.floating)return M;const $=ys(_.floating,p.x),re=ys(_.floating,p.y);return c?{...M,transform:"translate("+$+"px, "+re+"px)",...Ma(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:re}},[n,c,_.floating,p.x,p.y]);return l.useMemo(()=>({...p,update:L,refs:W,elements:_,floatingStyles:F}),[p,L,W,_,F])}const Wp=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?xs({element:r.current,padding:o}).fn(n):{}:r?xs({element:r,padding:o}).fn(n):{}}}},Vp=(e,t)=>({...kp(e),options:[e,t]}),Bp=(e,t)=>({...Dp(e),options:[e,t]}),zp=(e,t)=>({...Ap(e),options:[e,t]}),Hp=(e,t)=>({...Tp(e),options:[e,t]}),Yp=(e,t)=>({...Op(e),options:[e,t]}),Gp=(e,t)=>({..._p(e),options:[e,t]}),Up=(e,t)=>({...Wp(e),options:[e,t]});function Kp(e){const t=qp(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Jp);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function qp(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=Qp(o),c=Zp(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Xp=Symbol("radix.slottable");function Jp(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Xp}function Zp(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Qp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var em=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tm=em.reduce((e,t)=>{const n=Kp(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),nm="Arrow",ka=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return a.jsx(tm.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});ka.displayName=nm;var rm=ka;function om(e){const t=sm(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(im);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function sm(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=lm(o),c=cm(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var am=Symbol("radix.slottable");function im(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===am}function cm(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function lm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var um=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Da=um.reduce((e,t)=>{const n=om(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),co="Popper",[Ta,At]=Ue(co),[dm,Oa]=Ta(co),_a=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return a.jsx(dm,{scope:t,anchor:r,onAnchorChange:o,children:n})};_a.displayName=co;var Aa="PopperAnchor",Ia=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Oa(Aa,n),i=l.useRef(null),c=ie(t,i),u=l.useRef(null);return l.useEffect(()=>{const d=u.current;u.current=r?.current||i.current,d!==u.current&&s.onAnchorChange(u.current)}),r?null:a.jsx(Da.div,{...o,ref:c})});Ia.displayName=Aa;var lo="PopperContent",[fm,pm]=Ta(lo),$a=l.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:y,...m}=e,x=Oa(lo,n),[v,w]=l.useState(null),C=ie(t,A=>w(A)),[S,T]=l.useState(null),I=Ys(S),O=I?.width??0,b=I?.height??0,j=r+(s!=="center"?"-"+s:""),E=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},k=Array.isArray(d)?d:[d],P=k.length>0,L={padding:E,boundary:k.filter(hm),altBoundary:P},{refs:N,floatingStyles:W,placement:_,isPositioned:F,middlewareData:M}=Lp({strategy:"fixed",placement:j,whileElementsMounted:(...A)=>Mp(...A,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[Vp({mainAxis:o+b,alignmentAxis:i}),u&&Bp({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?zp():void 0,...L}),u&&Hp({...L}),Yp({...L,apply:({elements:A,rects:Q,availableWidth:oe,availableHeight:ee})=>{const{width:te,height:R}=Q.reference,U=A.floating.style;U.setProperty("--radix-popper-available-width",`${oe}px`),U.setProperty("--radix-popper-available-height",`${ee}px`),U.setProperty("--radix-popper-anchor-width",`${te}px`),U.setProperty("--radix-popper-anchor-height",`${R}px`)}}),S&&Up({element:S,padding:c}),gm({arrowWidth:O,arrowHeight:b}),h&&Gp({strategy:"referenceHidden",...L})]}),[$,re]=Wa(_),D=ke(y);me(()=>{F&&D?.()},[F,D]);const z=M.arrow?.x,K=M.arrow?.y,X=M.arrow?.centerOffset!==0,[le,ue]=l.useState();return me(()=>{v&&ue(window.getComputedStyle(v).zIndex)},[v]),a.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:F?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[M.transformOrigin?.x,M.transformOrigin?.y].join(" "),...M.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(fm,{scope:n,placedSide:$,onArrowChange:T,arrowX:z,arrowY:K,shouldHideArrow:X,children:a.jsx(Da.div,{"data-side":$,"data-align":re,...m,ref:C,style:{...m.style,animation:F?void 0:"none"}})})})});$a.displayName=lo;var Fa="PopperArrow",mm={top:"bottom",right:"left",bottom:"top",left:"right"},La=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=pm(Fa,r),i=mm[s.placedSide];return a.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:a.jsx(rm,{...o,ref:n,style:{...o.style,display:"block"}})})});La.displayName=Fa;function hm(e){return e!==null}var gm=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,p]=Wa(n),f={start:"0%",center:"50%",end:"100%"}[p],h=(o.arrow?.x??0)+c/2,g=(o.arrow?.y??0)+u/2;let y="",m="";return d==="bottom"?(y=i?f:`${h}px`,m=`${-u}px`):d==="top"?(y=i?f:`${h}px`,m=`${r.floating.height+u}px`):d==="right"?(y=`${-u}px`,m=i?f:`${g}px`):d==="left"&&(y=`${r.floating.width+u}px`,m=i?f:`${g}px`),{data:{x:y,y:m}}}});function Wa(e){const[t,n="center"]=e.split("-");return[t,n]}var Jn=_a,Zn=Ia,uo=$a,fo=La;function xm(e){const t=ym(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(bm);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function ym(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=Sm(o),c=wm(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vm=Symbol("radix.slottable");function bm(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vm}function wm(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Sm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Cm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Nm=Cm.reduce((e,t)=>{const n=xm(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Em="Portal",rn=l.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=l.useState(!1);me(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Ws.createPortal(a.jsx(Nm.div,{...r,ref:t}),i):null});rn.displayName=Em;function Va(e){const t=jm(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Pm);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function jm(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=km(o),c=Mm(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Rm=Symbol("radix.slottable");function Pm(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rm}function Mm(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function km(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Dm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],on=Dm.reduce((e,t)=>{const n=Va(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Tm(e,t){e&&Zt.flushSync(()=>e.dispatchEvent(t))}function Om(e){const t=_m(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Im);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function _m(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=Fm(o),c=$m(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Am=Symbol("radix.slottable");function Im(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Am}function $m(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Fm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Lm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ba=Lm.reduce((e,t)=>{const n=Om(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Nr="rovingFocusGroup.onEntryFocus",Wm={bubbles:!1,cancelable:!0},sn="RovingFocusGroup",[$r,za,Vm]=eo(sn),[Bm,Ha]=Ue(sn,[Vm]),[zm,Hm]=Bm(sn),Ya=l.forwardRef((e,t)=>a.jsx($r.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx($r.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Ym,{...e,ref:t})})}));Ya.displayName=sn;var Ym=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...f}=e,h=l.useRef(null),g=ie(t,h),y=to(s),[m,x]=et({prop:i,defaultProp:c??null,onChange:u,caller:sn}),[v,w]=l.useState(!1),C=ke(d),S=za(n),T=l.useRef(!1),[I,O]=l.useState(0);return l.useEffect(()=>{const b=h.current;if(b)return b.addEventListener(Nr,C),()=>b.removeEventListener(Nr,C)},[C]),a.jsx(zm,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:m,onItemFocus:l.useCallback(b=>x(b),[x]),onItemShiftTab:l.useCallback(()=>w(!0),[]),onFocusableItemAdd:l.useCallback(()=>O(b=>b+1),[]),onFocusableItemRemove:l.useCallback(()=>O(b=>b-1),[]),children:a.jsx(Ba.div,{tabIndex:v||I===0?-1:0,"data-orientation":r,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:G(e.onMouseDown,()=>{T.current=!0}),onFocus:G(e.onFocus,b=>{const j=!T.current;if(b.target===b.currentTarget&&j&&!v){const E=new CustomEvent(Nr,Wm);if(b.currentTarget.dispatchEvent(E),!E.defaultPrevented){const k=S().filter(_=>_.focusable),P=k.find(_=>_.active),L=k.find(_=>_.id===m),W=[P,L,...k].filter(Boolean).map(_=>_.ref.current);Ka(W,p)}}T.current=!1}),onBlur:G(e.onBlur,()=>w(!1))})})}),Ga="RovingFocusGroupItem",Ua=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...c}=e,u=je(),d=s||u,p=Hm(Ga,n),f=p.currentTabStopId===d,h=za(n),{onFocusableItemAdd:g,onFocusableItemRemove:y,currentTabStopId:m}=p;return l.useEffect(()=>{if(r)return g(),()=>y()},[r,g,y]),a.jsx($r.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:a.jsx(Ba.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:G(e.onMouseDown,x=>{r?p.onItemFocus(d):x.preventDefault()}),onFocus:G(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:G(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){p.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const v=Km(x,p.orientation,p.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let C=h().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")C.reverse();else if(v==="prev"||v==="next"){v==="prev"&&C.reverse();const S=C.indexOf(x.currentTarget);C=p.loop?qm(C,S+1):C.slice(S+1)}setTimeout(()=>Ka(C))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:m!=null}):i})})});Ua.displayName=Ga;var Gm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Um(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Km(e,t,n){const r=Um(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gm[r]}function Ka(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function qm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Xm=Ya,Jm=Ua,Zm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wt=new WeakMap,bn=new WeakMap,wn={},Er=0,qa=function(e){return e&&(e.host||qa(e.parentNode))},Qm=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=qa(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})},eh=function(e,t,n,r){var o=Qm(t,Array.isArray(e)?e:[e]);wn[n]||(wn[n]=new WeakMap);var s=wn[n],i=[],c=new Set,u=new Set(o),d=function(f){!f||c.has(f)||(c.add(f),d(f.parentNode))};o.forEach(d);var p=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(h){if(c.has(h))p(h);else try{var g=h.getAttribute(r),y=g!==null&&g!=="false",m=(wt.get(h)||0)+1,x=(s.get(h)||0)+1;wt.set(h,m),s.set(h,x),i.push(h),m===1&&y&&bn.set(h,!0),x===1&&h.setAttribute(n,"true"),y||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return p(t),c.clear(),Er++,function(){i.forEach(function(f){var h=wt.get(f)-1,g=s.get(f)-1;wt.set(f,h),s.set(f,g),h||(bn.has(f)||f.removeAttribute(r),bn.delete(f)),g||f.removeAttribute(n)}),Er--,Er||(wt=new WeakMap,wt=new WeakMap,bn=new WeakMap,wn={})}},Qn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Zm(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),eh(r,o,n,"aria-hidden")):function(){return null}},Ae=function(){return Ae=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ae.apply(this,arguments)};function Xa(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 th(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var En="right-scroll-bar-position",jn="width-before-scroll-bar",nh="with-scroll-bars-hidden",rh="--removed-body-scroll-bar-size";function jr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oh(e,t){var n=J.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 sh=typeof window<"u"?l.useLayoutEffect:l.useEffect,vs=new WeakMap;function ah(e,t){var n=oh(null,function(r){return e.forEach(function(o){return jr(o,r)})});return sh(function(){var r=vs.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(c){s.has(c)||jr(c,null)}),s.forEach(function(c){o.has(c)||jr(c,i)})}vs.set(n,e)},[e]),n}function ih(e){return e}function ch(e,t){t===void 0&&(t=ih);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(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(s),i=n}var u=function(){var p=i;i=[],p.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(p){i.push(p),d()},filter:function(p){return i=i.filter(p),n}}}};return o}function lh(e){e===void 0&&(e={});var t=ch(null);return t.options=Ae({async:!0,ssr:!1},e),t}var Ja=function(e){var t=e.sideCar,n=Xa(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 l.createElement(r,Ae({},n))};Ja.isSideCarExport=!0;function uh(e,t){return e.useMedium(t),Ja}var Za=lh(),Rr=function(){},er=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Rr,onWheelCapture:Rr,onTouchMoveCapture:Rr}),o=r[0],s=r[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,f=e.shards,h=e.sideCar,g=e.noRelative,y=e.noIsolation,m=e.inert,x=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,C=e.gapMode,S=Xa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=h,I=ah([n,t]),O=Ae(Ae({},S),o);return l.createElement(l.Fragment,null,p&&l.createElement(T,{sideCar:Za,removeScrollBar:d,shards:f,noRelative:g,noIsolation:y,inert:m,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:C}),i?l.cloneElement(l.Children.only(c),Ae(Ae({},O),{ref:I})):l.createElement(w,Ae({},O,{className:u,ref:I}),c))});er.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};er.classNames={fullWidth:jn,zeroRight:En};var dh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dh();return t&&e.setAttribute("nonce",t),e}function ph(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var hh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=fh())&&(ph(t,n),mh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gh=function(){var e=hh();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Qa=function(){var e=gh(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},xh={left:0,top:0,right:0,gap:0},Pr=function(e){return parseInt(e||"",10)||0},yh=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[Pr(n),Pr(r),Pr(o)]},vh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return xh;var t=yh(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])}},bh=Qa(),Pt="data-scroll-locked",wh=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
7
|
+
.`.concat(nh,` {
|
|
8
8
|
overflow: hidden `).concat(r,`;
|
|
9
9
|
padding-right: `).concat(c,"px ").concat(r,`;
|
|
10
10
|
}
|
|
@@ -21,30 +21,30 @@ React keys must be passed directly to JSX without using spread:
|
|
|
21
21
|
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.`).concat(
|
|
24
|
+
.`).concat(En,` {
|
|
25
25
|
right: `).concat(c,"px ").concat(r,`;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.`).concat(
|
|
28
|
+
.`).concat(jn,` {
|
|
29
29
|
margin-right: `).concat(c,"px ").concat(r,`;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.`).concat(
|
|
32
|
+
.`).concat(En," .").concat(En,` {
|
|
33
33
|
right: 0 `).concat(r,`;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.`).concat(
|
|
36
|
+
.`).concat(jn," .").concat(jn,` {
|
|
37
37
|
margin-right: 0 `).concat(r,`;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
body[`).concat(Pt,`] {
|
|
41
|
-
`).concat(
|
|
41
|
+
`).concat(rh,": ").concat(c,`px;
|
|
42
42
|
}
|
|
43
|
-
`)},
|
|
43
|
+
`)},bs=function(){var e=parseInt(document.body.getAttribute(Pt)||"0",10);return isFinite(e)?e:0},Sh=function(){l.useEffect(function(){return document.body.setAttribute(Pt,(bs()+1).toString()),function(){var e=bs()-1;e<=0?document.body.removeAttribute(Pt):document.body.setAttribute(Pt,e.toString())}},[])},Ch=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Sh();var s=l.useMemo(function(){return vh(o)},[o]);return l.createElement(bh,{styles:wh(s,!t,o,n?"":"!important")})},Fr=!1;if(typeof window<"u")try{var Sn=Object.defineProperty({},"passive",{get:function(){return Fr=!0,!0}});window.addEventListener("test",Sn,Sn),window.removeEventListener("test",Sn,Sn)}catch{Fr=!1}var St=Fr?{passive:!1}:!1,Nh=function(e){return e.tagName==="TEXTAREA"},ei=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Nh(e)&&n[t]==="visible")},Eh=function(e){return ei(e,"overflowY")},jh=function(e){return ei(e,"overflowX")},ws=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ti(e,r);if(o){var s=ni(e,r),i=s[1],c=s[2];if(i>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Rh=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ph=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ti=function(e,t){return e==="v"?Eh(t):jh(t)},ni=function(e,t){return e==="v"?Rh(t):Ph(t)},Mh=function(e,t){return e==="h"&&t==="rtl"?-1:1},kh=function(e,t,n,r,o){var s=Mh(e,window.getComputedStyle(t).direction),i=s*r,c=n.target,u=t.contains(c),d=!1,p=i>0,f=0,h=0;do{if(!c)break;var g=ni(e,c),y=g[0],m=g[1],x=g[2],v=m-x-s*y;(y||v)&&ti(e,c)&&(f+=v,h+=y);var w=c.parentNode;c=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(p&&Math.abs(f)<1||!p&&Math.abs(h)<1)&&(d=!0),d},Cn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ss=function(e){return[e.deltaX,e.deltaY]},Cs=function(e){return e&&"current"in e?e.current:e},Dh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Th=function(e){return`
|
|
44
44
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
45
45
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
46
|
-
`)},$m=0,wt=[];function Fm(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState($m++)[0],s=l.useState(Ma)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=sm([e.lockRef.current],(e.shards||[]).map(os),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=l.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=yn(m),b=n.current,S="deltaX"in m?m.deltaX:b[0]-y[0],w="deltaY"in m?m.deltaY:b[1]-y[1],T,V=m.target,k=Math.abs(S)>Math.abs(w)?"h":"v";if("touches"in m&&k==="h"&&V.type==="range")return!1;var P=ns(k,V);if(!P)return!0;if(P?T=k:(T=k==="v"?"h":"v",P=ns(k,V)),!P)return!1;if(!r.current&&"changedTouches"in m&&(S||w)&&(r.current=T),!T)return!0;var M=r.current||T;return _m(M,x,m,M==="h"?S:w)},[]),u=l.useCallback(function(m){var x=m;if(!(!wt.length||wt[wt.length-1]!==s)){var y="deltaY"in x?rs(x):yn(x),b=t.current.filter(function(T){return T.name===x.type&&(T.target===x.target||x.target===T.shadowParent)&&Am(T.delta,y)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var S=(i.current.shards||[]).map(os).filter(Boolean).filter(function(T){return T.contains(x.target)}),w=S.length>0?c(x,S[0]):!i.current.noIsolation;w&&x.cancelable&&x.preventDefault()}}},[]),d=l.useCallback(function(m,x,y,b){var S={name:m,delta:x,target:y,should:b,shadowParent:Lm(y)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(w){return w!==S})},1)},[]),p=l.useCallback(function(m){n.current=yn(m),r.current=void 0},[]),f=l.useCallback(function(m){d(m.type,rs(m),m.target,c(m,e.lockRef.current))},[]),h=l.useCallback(function(m){d(m.type,yn(m),m.target,c(m,e.lockRef.current))},[]);l.useEffect(function(){return wt.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,bt),document.addEventListener("touchmove",u,bt),document.addEventListener("touchstart",p,bt),function(){wt=wt.filter(function(m){return m!==s}),document.removeEventListener("wheel",u,bt),document.removeEventListener("touchmove",u,bt),document.removeEventListener("touchstart",p,bt)}},[]);var g=e.removeScrollBar,v=e.inert;return l.createElement(l.Fragment,null,v?l.createElement(s,{styles:Im(o)}):null,g?l.createElement(Pm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Lm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Wm=mm(Ra,Fm);var an=l.forwardRef(function(e,t){return l.createElement(qn,_e({},e,{ref:t,sideCar:Wm}))});an.classNames=qn.classNames;var Tr=["Enter"," "],Vm=["ArrowDown","PageUp","Home"],Oa=["ArrowUp","PageDown","End"],Hm=[...Vm,...Oa],Bm={ltr:[...Tr,"ArrowRight"],rtl:[...Tr,"ArrowLeft"]},zm={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cn="Menu",[qt,Ym,Gm]=Gr(cn),[vt,_a]=Ge(cn,[Gm,Ot,ba]),ln=Ot(),Aa=ba(),[Ia,rt]=vt(cn),[Um,un]=vt(cn),$a=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,c=ln(t),[u,d]=l.useState(null),p=l.useRef(!1),f=Me(s),h=Ur(o);return l.useEffect(()=>{const g=()=>{p.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>p.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),a.jsx(Gn,{...c,children:a.jsx(Ia,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:d,children:a.jsx(Um,{scope:t,onClose:l.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:h,modal:i,children:r})})})};$a.displayName=cn;var Km="MenuAnchor",oo=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ln(n);return a.jsx(Un,{...o,...r,ref:t})});oo.displayName=Km;var so="MenuPortal",[qm,Fa]=vt(so,{forceMount:void 0}),La=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=rt(so,t);return a.jsx(qm,{scope:t,forceMount:n,children:a.jsx(ke,{present:n||s.open,children:a.jsx(rn,{asChild:!0,container:o,children:r})})})};La.displayName=so;var Pe="MenuContent",[Xm,ao]=vt(Pe),Wa=l.forwardRef((e,t)=>{const n=Fa(Pe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=rt(Pe,e.__scopeMenu),i=un(Pe,e.__scopeMenu);return a.jsx(qt.Provider,{scope:e.__scopeMenu,children:a.jsx(ke,{present:r||s.open,children:a.jsx(qt.Slot,{scope:e.__scopeMenu,children:i.modal?a.jsx(Jm,{...o,ref:t}):a.jsx(Zm,{...o,ref:t})})})})}),Jm=l.forwardRef((e,t)=>{const n=rt(Pe,e.__scopeMenu),r=l.useRef(null),o=oe(t,r);return l.useEffect(()=>{const s=r.current;if(s)return Kn(s)},[]),a.jsx(io,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:z(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Zm=l.forwardRef((e,t)=>{const n=rt(Pe,e.__scopeMenu);return a.jsx(io,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Qm=xa("MenuContent.ScrollLock"),io=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:g,disableOutsideScroll:v,...m}=e,x=rt(Pe,n),y=un(Pe,n),b=ln(n),S=Aa(n),w=Ym(n),[T,V]=l.useState(null),k=l.useRef(null),P=oe(t,k,x.onContentChange),M=l.useRef(0),E=l.useRef(""),D=l.useRef(0),C=l.useRef(null),W=l.useRef("right"),N=l.useRef(0),H=v?an:l.Fragment,O=v?{as:Qm,allowPinchZoom:!0}:void 0,L=_=>{const Q=E.current+_,j=w().filter($=>!$.disabled),Y=document.activeElement,q=j.find($=>$.ref.current===Y)?.textValue,X=j.map($=>$.textValue),ce=dh(X,Q,q),le=j.find($=>$.textValue===ce)?.ref.current;(function $(ee){E.current=ee,window.clearTimeout(M.current),ee!==""&&(M.current=window.setTimeout(()=>$(""),1e3))})(Q),le&&setTimeout(()=>le.focus())};l.useEffect(()=>()=>window.clearTimeout(M.current),[]),Vn();const A=l.useCallback(_=>W.current===C.current?.side&&ph(_,C.current?.area),[]);return a.jsx(Xm,{scope:n,searchRef:E,onItemEnter:l.useCallback(_=>{A(_)&&_.preventDefault()},[A]),onItemLeave:l.useCallback(_=>{A(_)||(k.current?.focus(),V(null))},[A]),onTriggerLeave:l.useCallback(_=>{A(_)&&_.preventDefault()},[A]),pointerGraceTimerRef:D,onPointerGraceIntentChange:l.useCallback(_=>{C.current=_},[]),children:a.jsx(H,{...O,children:a.jsx(tn,{asChild:!0,trapped:o,onMountAutoFocus:z(s,_=>{_.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(en,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:g,children:a.jsx(em,{asChild:!0,...S,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:V,onEntryFocus:z(u,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(no,{role:"menu","aria-orientation":"vertical","data-state":ri(x.open),"data-radix-menu-content":"",dir:y.dir,...b,...m,ref:P,style:{outline:"none",...m.style},onKeyDown:z(m.onKeyDown,_=>{const j=_.target.closest("[data-radix-menu-content]")===_.currentTarget,Y=_.ctrlKey||_.altKey||_.metaKey,q=_.key.length===1;j&&(_.key==="Tab"&&_.preventDefault(),!Y&&q&&L(_.key));const X=k.current;if(_.target!==X||!Hm.includes(_.key))return;_.preventDefault();const le=w().filter($=>!$.disabled).map($=>$.ref.current);Oa.includes(_.key)&&le.reverse(),lh(le)}),onBlur:z(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(M.current),E.current="")}),onPointerMove:z(e.onPointerMove,Xt(_=>{const Q=_.target,j=N.current!==_.clientX;if(_.currentTarget.contains(Q)&&j){const Y=_.clientX>N.current?"right":"left";W.current=Y,N.current=_.clientX}}))})})})})})})});Wa.displayName=Pe;var eh="MenuGroup",co=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(on.div,{role:"group",...r,ref:t})});co.displayName=eh;var th="MenuLabel",Va=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(on.div,{...r,ref:t})});Va.displayName=th;var Rn="MenuItem",ss="menu.itemSelect",Xn=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=l.useRef(null),i=un(Rn,e.__scopeMenu),c=ao(Rn,e.__scopeMenu),u=oe(t,s),d=l.useRef(!1),p=()=>{const f=s.current;if(!n&&f){const h=new CustomEvent(ss,{bubbles:!0,cancelable:!0});f.addEventListener(ss,g=>r?.(g),{once:!0}),Ip(f,h),h.defaultPrevented?d.current=!1:i.onClose()}};return a.jsx(Ha,{...o,ref:u,disabled:n,onClick:z(e.onClick,p),onPointerDown:f=>{e.onPointerDown?.(f),d.current=!0},onPointerUp:z(e.onPointerUp,f=>{d.current||f.currentTarget?.click()}),onKeyDown:z(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||Tr.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Xn.displayName=Rn;var Ha=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=ao(Rn,n),c=Aa(n),u=l.useRef(null),d=oe(t,u),[p,f]=l.useState(!1),[h,g]=l.useState("");return l.useEffect(()=>{const v=u.current;v&&g((v.textContent??"").trim())},[s.children]),a.jsx(qt.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:a.jsx(tm,{asChild:!0,...c,focusable:!r,children:a.jsx(on.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:d,onPointerMove:z(e.onPointerMove,Xt(v=>{r?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(e.onPointerLeave,Xt(v=>i.onItemLeave(v))),onFocus:z(e.onFocus,()=>f(!0)),onBlur:z(e.onBlur,()=>f(!1))})})})}),nh="MenuCheckboxItem",Ba=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return a.jsx(Ka,{scope:e.__scopeMenu,checked:n,children:a.jsx(Xn,{role:"menuitemcheckbox","aria-checked":Mn(n)?"mixed":n,...o,ref:t,"data-state":fo(n),onSelect:z(o.onSelect,()=>r?.(Mn(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ba.displayName=nh;var za="MenuRadioGroup",[rh,oh]=vt(za,{value:void 0,onValueChange:()=>{}}),Ya=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Me(r);return a.jsx(rh,{scope:e.__scopeMenu,value:n,onValueChange:s,children:a.jsx(co,{...o,ref:t})})});Ya.displayName=za;var Ga="MenuRadioItem",Ua=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=oh(Ga,e.__scopeMenu),s=n===o.value;return a.jsx(Ka,{scope:e.__scopeMenu,checked:s,children:a.jsx(Xn,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":fo(s),onSelect:z(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Ua.displayName=Ga;var lo="MenuItemIndicator",[Ka,sh]=vt(lo,{checked:!1}),qa=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=sh(lo,n);return a.jsx(ke,{present:r||Mn(s.checked)||s.checked===!0,children:a.jsx(on.span,{...o,ref:t,"data-state":fo(s.checked)})})});qa.displayName=lo;var ah="MenuSeparator",Xa=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(on.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Xa.displayName=ah;var ih="MenuArrow",Ja=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ln(n);return a.jsx(ro,{...o,...r,ref:t})});Ja.displayName=ih;var uo="MenuSub",[ch,Za]=vt(uo),Qa=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=rt(uo,t),i=ln(t),[c,u]=l.useState(null),[d,p]=l.useState(null),f=Me(o);return l.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),a.jsx(Gn,{...i,children:a.jsx(Ia,{scope:t,open:r,onOpenChange:f,content:d,onContentChange:p,children:a.jsx(ch,{scope:t,contentId:je(),triggerId:je(),trigger:c,onTriggerChange:u,children:n})})})};Qa.displayName=uo;var Yt="MenuSubTrigger",ei=l.forwardRef((e,t)=>{const n=rt(Yt,e.__scopeMenu),r=un(Yt,e.__scopeMenu),o=Za(Yt,e.__scopeMenu),s=ao(Yt,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},p=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>p,[p]),l.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),u(null)}},[c,u]),a.jsx(oo,{asChild:!0,...d,children:a.jsx(Ha,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":ri(n.open),...e,ref:ue(t,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:z(e.onPointerMove,Xt(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:z(e.onPointerLeave,Xt(f=>{p();const h=n.content?.getBoundingClientRect();if(h){const g=n.content?.dataset.side,v=g==="right",m=v?-5:5,x=h[v?"left":"right"],y=h[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x,y:h.bottom}],side:g}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:z(e.onKeyDown,f=>{const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||Bm[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ei.displayName=Yt;var ti="MenuSubContent",ni=l.forwardRef((e,t)=>{const n=Fa(Pe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=rt(Pe,e.__scopeMenu),i=un(Pe,e.__scopeMenu),c=Za(ti,e.__scopeMenu),u=l.useRef(null),d=oe(t,u);return a.jsx(qt.Provider,{scope:e.__scopeMenu,children:a.jsx(ke,{present:r||s.open,children:a.jsx(qt.Slot,{scope:e.__scopeMenu,children:a.jsx(io,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{i.isUsingKeyboardRef.current&&u.current?.focus(),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:z(e.onFocusOutside,p=>{p.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:z(e.onEscapeKeyDown,p=>{i.onClose(),p.preventDefault()}),onKeyDown:z(e.onKeyDown,p=>{const f=p.currentTarget.contains(p.target),h=zm[i.dir].includes(p.key);f&&h&&(s.onOpenChange(!1),c.trigger?.focus(),p.preventDefault())})})})})})});ni.displayName=ti;function ri(e){return e?"open":"closed"}function Mn(e){return e==="indeterminate"}function fo(e){return Mn(e)?"indeterminate":e?"checked":"unchecked"}function lh(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function uh(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function dh(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=uh(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function fh(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s],u=t[i],d=c.x,p=c.y,f=u.x,h=u.y;p>r!=h>r&&n<(f-d)*(r-p)/(h-p)+d&&(o=!o)}return o}function ph(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return fh(n,t)}function Xt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var mh=$a,hh=oo,gh=La,xh=Wa,vh=co,yh=Va,bh=Xn,wh=Ba,Ch=Ya,Sh=Ua,Nh=qa,Eh=Xa,jh=Ja,Ph=Qa,Rh=ei,Mh=ni,Jn="DropdownMenu",[Dh]=Ge(Jn,[_a]),me=_a(),[Th,oi]=Dh(Jn),si=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:c=!0}=e,u=me(t),d=l.useRef(null),[p,f]=et({prop:o,defaultProp:s??!1,onChange:i,caller:Jn});return a.jsx(Th,{scope:t,triggerId:je(),triggerRef:d,contentId:je(),open:p,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(h=>!h),[f]),modal:c,children:a.jsx(mh,{...u,open:p,onOpenChange:f,dir:r,modal:c,children:n})})};si.displayName=Jn;var ai="DropdownMenuTrigger",ii=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=oi(ai,n),i=me(n);return a.jsx(hh,{asChild:!0,...i,children:a.jsx(td.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:ue(t,s.triggerRef),onPointerDown:z(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:z(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});ii.displayName=ai;var kh="DropdownMenuPortal",ci=e=>{const{__scopeDropdownMenu:t,...n}=e,r=me(t);return a.jsx(gh,{...r,...n})};ci.displayName=kh;var li="DropdownMenuContent",ui=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oi(li,n),s=me(n),i=l.useRef(!1);return a.jsx(xh,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:z(e.onCloseAutoFocus,c=>{i.current||o.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:z(e.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,p=u.button===2||d;(!o.modal||p)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ui.displayName=li;var Oh="DropdownMenuGroup",di=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=me(n);return a.jsx(vh,{...o,...r,ref:t})});di.displayName=Oh;var _h="DropdownMenuLabel",fi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=me(n);return a.jsx(yh,{...o,...r,ref:t})});fi.displayName=_h;var Ah="DropdownMenuItem",pi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=me(n);return a.jsx(bh,{...o,...r,ref:t})});pi.displayName=Ah;var Ih="DropdownMenuCheckboxItem",mi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=me(n);return a.jsx(wh,{...o,...r,ref:t})});mi.displayName=Ih;var $h="DropdownMenuRadioGroup",hi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=me(n);return a.jsx(Ch,{...o,...r,ref:t})});hi.displayName=$h;var Fh="DropdownMenuRadioItem",gi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=me(n);return a.jsx(Sh,{...o,...r,ref:t})});gi.displayName=Fh;var Lh="DropdownMenuItemIndicator",xi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=me(n);return a.jsx(Nh,{...o,...r,ref:t})});xi.displayName=Lh;var Wh="DropdownMenuSeparator",vi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=me(n);return a.jsx(Eh,{...o,...r,ref:t})});vi.displayName=Wh;var Vh="DropdownMenuArrow",Hh=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=me(n);return a.jsx(jh,{...o,...r,ref:t})});Hh.displayName=Vh;var Bh=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,i=me(t),[c,u]=et({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return a.jsx(Ph,{...i,open:c,onOpenChange:u,children:n})},zh="DropdownMenuSubTrigger",yi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=me(n);return a.jsx(Rh,{...o,...r,ref:t})});yi.displayName=zh;var Yh="DropdownMenuSubContent",bi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=me(n);return a.jsx(Mh,{...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)"}})});bi.displayName=Yh;var Gh=si,Uh=ii,wi=ci,Kh=ui,qh=di,Xh=fi,Jh=pi,Zh=mi,Qh=hi,eg=gi,Ci=xi,tg=vi,ng=Bh,rg=yi,og=bi;function sg({...e}){return a.jsx(Gh,{"data-slot":"dropdown-menu",...e})}function ag({...e}){return a.jsx(wi,{"data-slot":"dropdown-menu-portal",...e})}function ig({...e}){return a.jsx(Uh,{"data-slot":"dropdown-menu-trigger",suppressHydrationWarning:!0,...e})}function cg({className:e,sideOffset:t=4,...n}){return a.jsx(wi,{children:a.jsx(Kh,{"data-slot":"dropdown-menu-content",sideOffset:t,className:F("bg-white text-gray-900 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 p-2 shadow-lg",e),...n})})}function lg({...e}){return a.jsx(qh,{"data-slot":"dropdown-menu-group",...e})}function ug({className:e,inset:t,variant:n="default",...r}){return a.jsx(Jh,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:F("focus:bg-gray-100 focus:text-gray-900 data-[variant=destructive]:text-red-600 data-[variant=destructive]:focus:bg-red-50 data-[variant=destructive]:focus:text-red-700 [&_svg:not([class*='text-'])]:text-gray-500 relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function dg({className:e,children:t,checked:n,...r}){return a.jsxs(Zh,{"data-slot":"dropdown-menu-checkbox-item",className:F("focus:bg-gray-100 focus:text-gray-900 relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[a.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a.jsx(Ci,{children:a.jsx(zr,{className:"size-4 text-blue-600"})})}),t]})}function fg({...e}){return a.jsx(Qh,{"data-slot":"dropdown-menu-radio-group",...e})}function pg({className:e,children:t,...n}){return a.jsxs(eg,{"data-slot":"dropdown-menu-radio-item",className:F("focus:bg-gray-100 focus:text-gray-900 relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[a.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a.jsx(Ci,{children:a.jsx(Iu,{className:"size-2 fill-blue-600"})})}),t]})}function mg({className:e,inset:t,...n}){return a.jsx(Xh,{"data-slot":"dropdown-menu-label","data-inset":t,className:F("px-2 py-1.5 text-sm font-semibold text-gray-900 data-[inset]:pl-8",e),...n})}function hg({className:e,...t}){return a.jsx(tg,{"data-slot":"dropdown-menu-separator",className:F("bg-gray-100 my-1 h-px",e),...t})}function gg({className:e,...t}){return a.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:F("text-gray-500 ml-auto text-xs tracking-widest",e),...t})}function xg({...e}){return a.jsx(ng,{"data-slot":"dropdown-menu-sub",...e})}function vg({className:e,inset:t,children:n,...r}){return a.jsxs(rg,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:F("focus:bg-gray-100 focus:text-gray-900 data-[state=open]:bg-gray-100 data-[state=open]:text-gray-900 [&_svg:not([class*='text-'])]:text-gray-500 flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none transition-colors data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,a.jsx(Ee,{className:"ml-auto size-4"})]})}function yg({className:e,...t}){return a.jsx(og,{"data-slot":"dropdown-menu-sub-content",className:F("bg-white text-gray-900 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border border-gray-200 p-2 shadow-lg",e),...t})}function bg({data:e=[],columns:t,searchPlaceholder:n="Search...",onRowClick:r,className:o="",showPagination:s=!0,showSearch:i=!0,pageSize:c=10,renderToolbar:u,variant:d="default"}){const[p,f]=U.useState(1),[h]=U.useState(c),[g,v]=U.useState(""),[m,x]=U.useState(null),[y,b]=U.useState("asc"),S=U.useMemo(()=>{if(!i||!g.trim())return e;const P=g.toLowerCase();return e.filter(M=>t.some(E=>(E.accessor?E.accessor(M):M[E.key])?.toString().toLowerCase().includes(P)))},[e,g,i,t]),w=U.useMemo(()=>m?[...S].sort((P,M)=>{const E=t.find(N=>N.key===m);if(!E)return 0;const D=E.accessor?E.accessor(P):P[E.key],C=E.accessor?E.accessor(M):M[E.key];if(D===C)return 0;if(D==null)return 1;if(C==null)return-1;const W=D<C?-1:1;return y==="asc"?W:-W}):S,[S,m,y,t]),T=U.useMemo(()=>{if(!s)return w;const P=(p-1)*h;return w.slice(P,P+h)},[w,p,h,s]);U.useEffect(()=>f(1),[g]);const V=P=>{m===P?b(y==="asc"?"desc":"asc"):(x(P),b("asc"))},k=(P,M,E)=>{const D=M.accessor?M.accessor(P):P[M.key];return M.cell?M.cell(D,P,E):D};return a.jsxs("div",{className:F("w-full space-y-4",o),children:[(i||u)&&a.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[i&&a.jsxs("div",{className:"relative w-full sm:w-auto",children:[a.jsx(Vu,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),a.jsx(He,{placeholder:n,value:g,onChange:P=>v(P.target.value),className:"pl-10 w-full sm:w-[300px] bg-gray-50 border-gray-300"})]}),u&&a.jsx("div",{className:"w-full sm:w-auto",children:u()})]}),a.jsx("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs($n,{variant:d,children:[a.jsx(Fn,{children:a.jsx(Ie,{children:t.map(P=>a.jsx(Wn,{className:"h-10 px-0 py-0",style:{width:P.width},children:P.align==="center"||!P.align&&typeof P.header!="string"?a.jsx("div",{className:"h-10 flex items-center justify-center",children:typeof P.header!="string"?P.header:a.jsx("span",{className:"text-xs font-normal text-gray-500 uppercase tracking-widest",children:P.header})}):a.jsx("div",{className:"h-10 flex items-center text-xs font-normal text-gray-500 uppercase tracking-widest",children:typeof P.header!="string"?a.jsx("div",{children:P.header}):P.sortable!==!1?a.jsxs(G,{variant:"ghost",className:"h-auto px-3 py-1.5 font-normal hover:bg-transparent hover:text-gray-900",onClick:()=>V(P.key),children:[P.header,m===P.key&&y==="desc"?a.jsx(Qt,{className:"h-4 w-4"}):m===P.key&&y==="asc"?a.jsx(An,{className:"h-4 w-4"}):a.jsx(Yr,{className:"h-4 w-4"})]}):a.jsx("span",{className:"px-3",children:P.header})})},P.key))})}),a.jsx(Ln,{children:T.length===0?a.jsx(Ie,{children:a.jsx(pt,{colSpan:t.length,className:"text-center py-8 text-gray-500",children:"No results found."})}):T.map((P,M)=>a.jsx(Ie,{className:"hover:bg-gray-50 cursor-pointer",onClick:()=>r?.(P),children:t.map(E=>{const D=E.align==="center"||!E.align&&typeof E.header!="string";return a.jsx(pt,{className:D?"px-0 py-4":"px-3 py-4",style:{width:E.width},children:D?a.jsx("div",{className:"flex items-center justify-center h-full",children:k(P,E,M)}):k(P,E,M)},E.key)})},M))})]})})}),s&&a.jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[a.jsxs("div",{className:"text-sm text-gray-600",children:["Showing ",T.length," of ",w.length," row(s)"]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("span",{className:"text-sm text-gray-700",children:["Page ",p," of ",Math.ceil(w.length/h)]}),a.jsxs("div",{className:"flex gap-1",children:[a.jsx(G,{variant:"outline",size:"sm",onClick:()=>f(P=>Math.max(1,P-1)),disabled:p===1,className:"h-8 w-8 p-0",children:a.jsx(Fe,{className:"h-4 w-4"})}),a.jsx(G,{variant:"outline",size:"sm",onClick:()=>f(P=>Math.min(Math.ceil(w.length/h),P+1)),disabled:p===Math.ceil(w.length/h),className:"h-8 w-8 p-0",children:a.jsx(Ee,{className:"h-4 w-4"})})]})]})]})]})}const Si=U.createContext(null);function _t(){const e=U.useContext(Si);if(!e)throw new Error("useDataGrid must be used within DataGrid");return e}function wg({columns:e,data:t,getRowId:n=i=>i.id||String(Math.random()),onRowClick:r,children:o,recordCount:s}){const[i,c]=U.useState({pageIndex:0,pageSize:5}),[u,d]=U.useState([]),[p,f]=U.useState(new Set),h=U.useMemo(()=>u.length===0?t:[...t].sort((D,C)=>{for(const W of u){const N=e.find(A=>A.id===W.id);if(!N?.accessorKey)continue;const H=D[N.accessorKey],O=C[N.accessorKey];if(H===O)continue;const L=H<O?-1:1;return W.desc?-L:L}return 0}),[t,u,e]),g=U.useMemo(()=>{const E=i.pageIndex*i.pageSize,D=E+i.pageSize;return h.slice(E,D)},[h,i]),v=Math.ceil(h.length/i.pageSize),m=v,x=i.pageIndex>0,y=i.pageIndex<v-1,b=()=>c(E=>({...E,pageIndex:E.pageIndex-1})),S=()=>{c(E=>({...E,pageIndex:Math.min(E.pageIndex+1,m-1)}))},w=E=>{c(()=>({pageIndex:0,pageSize:E}))},T=E=>{c(D=>({...D,pageIndex:Math.max(0,Math.min(E,m-1))}))},V=E=>{f(D=>{const C=new Set(D);return C.has(E)?C.delete(E):C.add(E),C})},k=()=>{p.size===g.length?f(new Set):f(new Set(g.map(E=>n(E))))},P=g.length>0&&p.size===g.length,M={columns:e,data:t,getRowId:n,onRowClick:r,pagination:i,setPagination:c,canPreviousPage:x,canNextPage:y,previousPage:b,nextPage:S,setPageSize:w,goToPage:T,pageCount:m,sorting:u,setSorting:d,selectedRows:p,toggleRow:V,toggleAllRows:k,isAllRowsSelected:P,paginatedData:g,sortedData:h,totalPages:v,recordCount:s??t.length};return a.jsx(Si.Provider,{value:M,children:o})}function Cg(){const{columns:e,paginatedData:t,getRowId:n,onRowClick:r}=_t();return a.jsx("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs($n,{children:[a.jsx(Fn,{children:a.jsx(Ie,{children:e.map(o=>a.jsx(Wn,{className:"h-10 px-0 py-0",style:{width:o.size?`${o.size}px`:void 0},children:o.align==="center"?a.jsx("div",{className:"h-10 flex items-center justify-center",children:typeof o.header!="string"?o.header:a.jsx("span",{className:"text-xs font-normal text-gray-500 uppercase tracking-widest",children:o.header})}):a.jsx("div",{className:"h-10 flex items-center text-xs font-normal text-gray-500 uppercase tracking-widest",children:typeof o.header!="string"?a.jsx("div",{children:o.header}):a.jsx("span",{className:"px-3",children:o.header})})},o.id))})}),a.jsx(Ln,{children:t.length===0?a.jsx(Ie,{children:a.jsx(pt,{colSpan:e.length,className:"text-center py-8 text-gray-500",children:"No results found."})}):t.map((o,s)=>a.jsx(Ie,{className:"hover:bg-gray-50 cursor-pointer",onClick:()=>r?.(o),children:e.map(i=>{const c=i.align==="center",u=i.cell?i.cell(o,s):i.accessorKey?o[i.accessorKey]:null;return a.jsx(pt,{className:c?"px-0 py-4":"px-3 py-4",style:{width:i.size?`${i.size}px`:void 0},children:c?a.jsx("div",{className:"flex items-center justify-center h-full",children:u}):u},i.id)})},n(o)))})]})})})}function as(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ni(e){const t=Sg(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Eg);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Sg(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=Pg(o),c=jg(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ng=Symbol("radix.slottable");function Eg(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ng}function jg(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Pg(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Rg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ce=Rg.reduce((e,t)=>{const n=Ni(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Mg(e){const t=Dg(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(kg);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Dg(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=_g(o),c=Og(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Tg=Symbol("radix.slottable");function kg(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Tg}function Og(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function _g(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ag=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ig=Ag.reduce((e,t)=>{const n=Mg(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ei=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),$g="VisuallyHidden",Fg=l.forwardRef((e,t)=>a.jsx(Ig.span,{...e,ref:t,style:{...Ei,...e.style}}));Fg.displayName=$g;var Lg=[" ","Enter","ArrowUp","ArrowDown"],Wg=[" ","Enter"],ht="Select",[Zn,Qn,Vg]=Gr(ht),[At]=Ge(ht,[Vg,Ot]),er=Ot(),[Hg,ot]=At(ht),[Bg,zg]=At(ht),ji=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:c,onValueChange:u,dir:d,name:p,autoComplete:f,disabled:h,required:g,form:v}=e,m=er(t),[x,y]=l.useState(null),[b,S]=l.useState(null),[w,T]=l.useState(!1),V=Ur(d),[k,P]=et({prop:r,defaultProp:o??!1,onChange:s,caller:ht}),[M,E]=et({prop:i,defaultProp:c,onChange:u,caller:ht}),D=l.useRef(null),C=x?v||!!x.closest("form"):!0,[W,N]=l.useState(new Set),H=Array.from(W).map(O=>O.props.value).join(";");return a.jsx(Gn,{...m,children:a.jsxs(Hg,{required:g,scope:t,trigger:x,onTriggerChange:y,valueNode:b,onValueNodeChange:S,valueNodeHasChildren:w,onValueNodeHasChildrenChange:T,contentId:je(),value:M,onValueChange:E,open:k,onOpenChange:P,dir:V,triggerPointerDownPosRef:D,disabled:h,children:[a.jsx(Zn.Provider,{scope:t,children:a.jsx(Bg,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(O=>{N(L=>new Set(L).add(O))},[]),onNativeOptionRemove:l.useCallback(O=>{N(L=>{const A=new Set(L);return A.delete(O),A})},[]),children:n})}),C?a.jsxs(Ji,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:f,value:M,onChange:O=>E(O.target.value),disabled:h,form:v,children:[M===void 0?a.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};ji.displayName=ht;var Pi="SelectTrigger",Ri=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=er(n),i=ot(Pi,n),c=i.disabled||r,u=oe(t,i.onTriggerChange),d=Qn(n),p=l.useRef("touch"),[f,h,g]=Qi(m=>{const x=d().filter(S=>!S.disabled),y=x.find(S=>S.value===i.value),b=ec(x,m,y);b!==void 0&&i.onValueChange(b.value)}),v=m=>{c||(i.onOpenChange(!0),g()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return a.jsx(Un,{asChild:!0,...s,children:a.jsx(Ce.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Zi(i.value)?"":void 0,...o,ref:u,onClick:z(o.onClick,m=>{m.currentTarget.focus(),p.current!=="mouse"&&v(m)}),onPointerDown:z(o.onPointerDown,m=>{p.current=m.pointerType;const x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(v(m),m.preventDefault())}),onKeyDown:z(o.onKeyDown,m=>{const x=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(x&&m.key===" ")&&Lg.includes(m.key)&&(v(),m.preventDefault())})})})});Ri.displayName=Pi;var Mi="SelectValue",Di=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...c}=e,u=ot(Mi,n),{onValueNodeHasChildrenChange:d}=u,p=s!==void 0,f=oe(t,u.onValueNodeChange);return pe(()=>{d(p)},[d,p]),a.jsx(Ce.span,{...c,ref:f,style:{pointerEvents:"none"},children:Zi(u.value)?a.jsx(a.Fragment,{children:i}):s})});Di.displayName=Mi;var Yg="SelectIcon",Ti=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return a.jsx(Ce.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Ti.displayName=Yg;var Gg="SelectPortal",ki=e=>a.jsx(rn,{asChild:!0,...e});ki.displayName=Gg;var gt="SelectContent",Oi=l.forwardRef((e,t)=>{const n=ot(gt,e.__scopeSelect),[r,o]=l.useState();if(pe(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Zt.createPortal(a.jsx(_i,{scope:e.__scopeSelect,children:a.jsx(Zn.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),s):null}return a.jsx(Ai,{...e,ref:t})});Oi.displayName=gt;var Re=10,[_i,st]=At(gt),Ug="SelectContentImpl",Kg=Ni("SelectContent.RemoveScroll"),Ai=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:c,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:v,hideWhenDetached:m,avoidCollisions:x,...y}=e,b=ot(gt,n),[S,w]=l.useState(null),[T,V]=l.useState(null),k=oe(t,$=>w($)),[P,M]=l.useState(null),[E,D]=l.useState(null),C=Qn(n),[W,N]=l.useState(!1),H=l.useRef(!1);l.useEffect(()=>{if(S)return Kn(S)},[S]),Vn();const O=l.useCallback($=>{const[ee,...ae]=C().map(R=>R.ref.current),[te]=ae.slice(-1),ne=document.activeElement;for(const R of $)if(R===ne||(R?.scrollIntoView({block:"nearest"}),R===ee&&T&&(T.scrollTop=0),R===te&&T&&(T.scrollTop=T.scrollHeight),R?.focus(),document.activeElement!==ne))return},[C,T]),L=l.useCallback(()=>O([P,S]),[O,P,S]);l.useEffect(()=>{W&&L()},[W,L]);const{onOpenChange:A,triggerPointerDownPosRef:_}=b;l.useEffect(()=>{if(S){let $={x:0,y:0};const ee=te=>{$={x:Math.abs(Math.round(te.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(te.pageY)-(_.current?.y??0))}},ae=te=>{$.x<=10&&$.y<=10?te.preventDefault():S.contains(te.target)||A(!1),document.removeEventListener("pointermove",ee),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",ee),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",ae,{capture:!0})}}},[S,A,_]),l.useEffect(()=>{const $=()=>A(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[A]);const[Q,j]=Qi($=>{const ee=C().filter(ne=>!ne.disabled),ae=ee.find(ne=>ne.ref.current===document.activeElement),te=ec(ee,$,ae);te&&setTimeout(()=>te.ref.current.focus())}),Y=l.useCallback(($,ee,ae)=>{const te=!H.current&&!ae;(b.value!==void 0&&b.value===ee||te)&&(M($),te&&(H.current=!0))},[b.value]),q=l.useCallback(()=>S?.focus(),[S]),X=l.useCallback(($,ee,ae)=>{const te=!H.current&&!ae;(b.value!==void 0&&b.value===ee||te)&&D($)},[b.value]),ce=r==="popper"?kr:Ii,le=ce===kr?{side:c,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:v,hideWhenDetached:m,avoidCollisions:x}:{};return a.jsx(_i,{scope:n,content:S,viewport:T,onViewportChange:V,itemRefCallback:Y,selectedItem:P,onItemLeave:q,itemTextRefCallback:X,focusSelectedItem:L,selectedItemText:E,position:r,isPositioned:W,searchRef:Q,children:a.jsx(an,{as:Kg,allowPinchZoom:!0,children:a.jsx(tn,{asChild:!0,trapped:b.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:z(o,$=>{b.trigger?.focus({preventScroll:!0}),$.preventDefault()}),children:a.jsx(en,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:a.jsx(ce,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:$=>$.preventDefault(),...y,...le,onPlaced:()=>N(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:z(y.onKeyDown,$=>{const ee=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!ee&&$.key.length===1&&j($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let te=C().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes($.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const ne=$.target,R=te.indexOf(ne);te=te.slice(R+1)}setTimeout(()=>O(te)),$.preventDefault()}})})})})})})});Ai.displayName=Ug;var qg="SelectItemAlignedPosition",Ii=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=ot(gt,n),i=st(gt,n),[c,u]=l.useState(null),[d,p]=l.useState(null),f=oe(t,k=>p(k)),h=Qn(n),g=l.useRef(!1),v=l.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:y,focusSelectedItem:b}=i,S=l.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&d&&m&&x&&y){const k=s.trigger.getBoundingClientRect(),P=d.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),E=y.getBoundingClientRect();if(s.dir!=="rtl"){const ne=E.left-P.left,R=M.left-ne,B=k.left-R,re=k.width+B,K=Math.max(re,P.width),ge=window.innerWidth-Re,fe=as(R,[Re,Math.max(Re,ge-K)]);c.style.minWidth=re+"px",c.style.left=fe+"px"}else{const ne=P.right-E.right,R=window.innerWidth-M.right-ne,B=window.innerWidth-k.right-R,re=k.width+B,K=Math.max(re,P.width),ge=window.innerWidth-Re,fe=as(R,[Re,Math.max(Re,ge-K)]);c.style.minWidth=re+"px",c.style.right=fe+"px"}const D=h(),C=window.innerHeight-Re*2,W=m.scrollHeight,N=window.getComputedStyle(d),H=parseInt(N.borderTopWidth,10),O=parseInt(N.paddingTop,10),L=parseInt(N.borderBottomWidth,10),A=parseInt(N.paddingBottom,10),_=H+O+W+A+L,Q=Math.min(x.offsetHeight*5,_),j=window.getComputedStyle(m),Y=parseInt(j.paddingTop,10),q=parseInt(j.paddingBottom,10),X=k.top+k.height/2-Re,ce=C-X,le=x.offsetHeight/2,$=x.offsetTop+le,ee=H+O+$,ae=_-ee;if(ee<=X){const ne=D.length>0&&x===D[D.length-1].ref.current;c.style.bottom="0px";const R=d.clientHeight-m.offsetTop-m.offsetHeight,B=Math.max(ce,le+(ne?q:0)+R+L),re=ee+B;c.style.height=re+"px"}else{const ne=D.length>0&&x===D[0].ref.current;c.style.top="0px";const B=Math.max(X,H+m.offsetTop+(ne?Y:0)+le)+ae;c.style.height=B+"px",m.scrollTop=ee-X+m.offsetTop}c.style.margin=`${Re}px 0`,c.style.minHeight=Q+"px",c.style.maxHeight=C+"px",r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,c,d,m,x,y,s.dir,r]);pe(()=>S(),[S]);const[w,T]=l.useState();pe(()=>{d&&T(window.getComputedStyle(d).zIndex)},[d]);const V=l.useCallback(k=>{k&&v.current===!0&&(S(),b?.(),v.current=!1)},[S,b]);return a.jsx(Jg,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:V,children:a.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:a.jsx(Ce.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Ii.displayName=qg;var Xg="SelectPopperPosition",kr=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Re,...s}=e,i=er(n);return a.jsx(no,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.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)"}})});kr.displayName=Xg;var[Jg,po]=At(gt,{}),Or="SelectViewport",$i=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=st(Or,n),i=po(Or,n),c=oe(t,s.onViewportChange),u=l.useRef(0);return a.jsxs(a.Fragment,{children:[a.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}),a.jsx(Zn.Slot,{scope:n,children:a.jsx(Ce.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:z(o.onScroll,d=>{const p=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h?.current&&f){const g=Math.abs(u.current-p.scrollTop);if(g>0){const v=window.innerHeight-Re*2,m=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),y=Math.max(m,x);if(y<v){const b=y+g,S=Math.min(v,b),w=b-S;f.style.height=S+"px",f.style.bottom==="0px"&&(p.scrollTop=w>0?w:0,f.style.justifyContent="flex-end")}}}u.current=p.scrollTop})})})]})});$i.displayName=Or;var Fi="SelectGroup",[Zg,Qg]=At(Fi),Li=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=je();return a.jsx(Zg,{scope:n,id:o,children:a.jsx(Ce.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Li.displayName=Fi;var Wi="SelectLabel",Vi=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Qg(Wi,n);return a.jsx(Ce.div,{id:o.id,...r,ref:t})});Vi.displayName=Wi;var Dn="SelectItem",[ex,Hi]=At(Dn),Bi=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,c=ot(Dn,n),u=st(Dn,n),d=c.value===r,[p,f]=l.useState(s??""),[h,g]=l.useState(!1),v=oe(t,b=>u.itemRefCallback?.(b,r,o)),m=je(),x=l.useRef("touch"),y=()=>{o||(c.onValueChange(r),c.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 a.jsx(ex,{scope:n,value:r,disabled:o,textId:m,isSelected:d,onItemTextChange:l.useCallback(b=>{f(S=>S||(b?.textContent??"").trim())},[]),children:a.jsx(Zn.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:a.jsx(Ce.div,{role:"option","aria-labelledby":m,"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,...i,ref:v,onFocus:z(i.onFocus,()=>g(!0)),onBlur:z(i.onBlur,()=>g(!1)),onClick:z(i.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:z(i.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:z(i.onPointerDown,b=>{x.current=b.pointerType}),onPointerMove:z(i.onPointerMove,b=>{x.current=b.pointerType,o?u.onItemLeave?.():x.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(i.onPointerLeave,b=>{b.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:z(i.onKeyDown,b=>{u.searchRef?.current!==""&&b.key===" "||(Wg.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});Bi.displayName=Dn;var Gt="SelectItemText",zi=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=ot(Gt,n),c=st(Gt,n),u=Hi(Gt,n),d=zg(Gt,n),[p,f]=l.useState(null),h=oe(t,y=>f(y),u.onItemTextChange,y=>c.itemTextRefCallback?.(y,u.value,u.disabled)),g=p?.textContent,v=l.useMemo(()=>a.jsx("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=d;return pe(()=>(m(v),()=>x(v)),[m,x,v]),a.jsxs(a.Fragment,{children:[a.jsx(Ce.span,{id:u.textId,...s,ref:h}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Zt.createPortal(s.children,i.valueNode):null]})});zi.displayName=Gt;var Yi="SelectItemIndicator",Gi=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Hi(Yi,n).isSelected?a.jsx(Ce.span,{"aria-hidden":!0,...r,ref:t}):null});Gi.displayName=Yi;var _r="SelectScrollUpButton",Ui=l.forwardRef((e,t)=>{const n=st(_r,e.__scopeSelect),r=po(_r,e.__scopeSelect),[o,s]=l.useState(!1),i=oe(t,r.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollTop>0;s(d)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?a.jsx(qi,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});Ui.displayName=_r;var Ar="SelectScrollDownButton",Ki=l.forwardRef((e,t)=>{const n=st(Ar,e.__scopeSelect),r=po(Ar,e.__scopeSelect),[o,s]=l.useState(!1),i=oe(t,r.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollHeight-u.clientHeight,p=Math.ceil(u.scrollTop)<d;s(p)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?a.jsx(qi,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});Ki.displayName=Ar;var qi=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=st("SelectScrollButton",n),i=l.useRef(null),c=Qn(n),u=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>u(),[u]),pe(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),a.jsx(Ce.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:z(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:z(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:z(o.onPointerLeave,()=>{u()})})}),tx="SelectSeparator",Xi=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(Ce.div,{"aria-hidden":!0,...r,ref:t})});Xi.displayName=tx;var Ir="SelectArrow",nx=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=er(n),s=ot(Ir,n),i=st(Ir,n);return s.open&&i.position==="popper"?a.jsx(ro,{...o,...r,ref:t}):null});nx.displayName=Ir;var rx="SelectBubbleInput",Ji=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),s=oe(r,o),i=Os(t);return l.useEffect(()=>{const c=o.current;if(!c)return;const u=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&p){const f=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(f)}},[i,t]),a.jsx(Ce.select,{...n,style:{...Ei,...n.style},ref:s,defaultValue:t})});Ji.displayName=rx;function Zi(e){return e===""||e===void 0}function Qi(e){const t=Me(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(i=>{const c=n.current+i;t(c),(function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(c)},[t]),s=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function ec(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=ox(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function ox(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var sx=ji,tc=Ri,ax=Di,ix=Ti,cx=ki,nc=Oi,lx=$i,ux=Li,rc=Vi,oc=Bi,dx=zi,fx=Gi,sc=Ui,ac=Ki,ic=Xi;const dt=sx,px=ux,ft=ax,Je=l.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(tc,{ref:r,className:F("flex h-10 w-full items-center justify-between rounded-md border border-gray-300 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-gray-400 focus:outline-none focus:border-gray-500 hover:border-gray-400 disabled:cursor-not-allowed disabled:opacity-50 transition-colors",e),...n,children:[t,a.jsx(ix,{asChild:!0,children:a.jsx(Qt,{className:"h-4 w-4 opacity-50"})})]}));Je.displayName=tc.displayName;const cc=l.forwardRef(({className:e,...t},n)=>a.jsx(sc,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(An,{className:"h-4 w-4"})}));cc.displayName=sc.displayName;const lc=l.forwardRef(({className:e,...t},n)=>a.jsx(ac,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Qt,{className:"h-4 w-4"})}));lc.displayName=ac.displayName;const Ze=l.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>a.jsx(cx,{children:a.jsxs(nc,{ref:o,className:F("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-200 bg-white text-gray-950 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:[a.jsx(cc,{}),a.jsx(lx,{className:F("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(lc,{})]})}));Ze.displayName=nc.displayName;const uc=l.forwardRef(({className:e,...t},n)=>a.jsx(rc,{ref:n,className:F("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));uc.displayName=rc.displayName;const Be=l.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(oc,{ref:r,className:F("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(fx,{children:a.jsx(zr,{className:"h-4 w-4"})})}),a.jsx(dx,{children:t})]}));Be.displayName=oc.displayName;const dc=l.forwardRef(({className:e,...t},n)=>a.jsx(ic,{ref:n,className:F("-mx-1 my-1 h-px bg-gray-100",e),...t}));dc.displayName=ic.displayName;function mx({mode:e="simple",pageSizeOptions:t=[5,10,15,20]}){const{canPreviousPage:n,canNextPage:r,previousPage:o,nextPage:s,pageCount:i,pagination:c,setPageSize:u,goToPage:d}=_t(),p=()=>{const f=c.pageIndex,h=i,g=[];if(h<=7)for(let v=0;v<h;v++)g.push(v);else if(f<=3){for(let v=0;v<=4;v++)g.push(v);g.push("..."),g.push(h-1)}else if(f>=h-4){g.push(0),g.push("...");for(let v=h-5;v<h;v++)g.push(v)}else g.push(0),g.push("..."),g.push(f-1),g.push(f),g.push(f+1),g.push("..."),g.push(h-1);return g};return e==="simple"?a.jsx("div",{className:"flex items-center justify-end px-2 py-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("span",{className:"text-sm text-gray-700 hidden sm:block",children:["Page ",c.pageIndex+1," of ",i]}),a.jsxs("div",{className:"flex gap-1",children:[a.jsx(G,{variant:"outline",size:"sm",onClick:o,disabled:!n,className:"h-8 w-8 p-0",children:a.jsx(Fe,{className:"h-4 w-4"})}),a.jsx(G,{variant:"outline",size:"sm",onClick:s,disabled:!r,className:"h-8 w-8 p-0",children:a.jsx(Ee,{className:"h-4 w-4"})})]})]})}):a.jsxs("div",{className:"flex items-center justify-between gap-3 px-2 py-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-sm text-gray-600 hidden sm:inline",children:"Rows per page:"}),a.jsxs(dt,{value:String(c.pageSize),onValueChange:f=>u(Number(f)),children:[a.jsx(Je,{className:"h-8 w-16",children:a.jsx(ft,{})}),a.jsx(Ze,{children:t.map(f=>a.jsx(Be,{value:String(f),children:f},f))})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(G,{variant:"outline",size:"sm",onClick:o,disabled:!n,className:"h-8 w-8 p-0",children:a.jsx(Fe,{className:"h-4 w-4"})}),a.jsxs("span",{className:"text-sm text-gray-700 sm:hidden px-2",children:[c.pageIndex+1," / ",i]}),a.jsx("div",{className:"hidden sm:flex gap-1",children:p().map((f,h)=>typeof f=="number"?a.jsx(G,{variant:c.pageIndex===f?"default":"outline",size:"sm",onClick:()=>d(f),className:"h-8 w-8 p-0",children:f+1},h):a.jsx("span",{className:"flex h-8 w-8 items-center justify-center text-gray-400",children:f},h))}),a.jsx(G,{variant:"outline",size:"sm",onClick:s,disabled:!r,className:"h-8 w-8 p-0",children:a.jsx(Ee,{className:"h-4 w-4"})})]})]})}function hx({id:e,title:t}){const{sorting:n,setSorting:r}=_t(),o=n.find(u=>u.id===e),s=!!o,i=o?.desc??!1,c=()=>{r(u=>{const d=u.find(p=>p.id===e);return d?d.desc?[]:[{id:e,desc:!0}]:[{id:e,desc:!1}]})};return a.jsxs(G,{variant:"ghost",className:"h-auto px-3 py-1.5 font-normal hover:bg-transparent hover:text-gray-900",onClick:c,children:[t,s&&i?a.jsx(Qt,{className:"h-4 w-4"}):s?a.jsx(An,{className:"h-4 w-4"}):a.jsx(Yr,{className:"h-4 w-4"})]})}function gx(){const{toggleAllRows:e,isAllRowsSelected:t}=_t();return a.jsx(In,{checked:t,onCheckedChange:e})}function xx({row:e}){const{selectedRows:t,toggleRow:n,getRowId:r}=_t(),o=r(e);return a.jsx(In,{checked:t.has(o),onCheckedChange:()=>n(o)})}const fc=l.createContext(null);function pc(){const e=l.useContext(fc);if(!e)throw new Error("useTableContext must be used within a TableRoot component");return e}function vx({table:e,totalRecords:t,children:n}){return a.jsx(fc.Provider,{value:{tableInstance:e,totalRecords:t},children:n})}function yx({children:e,className:t}){return a.jsx("div",{className:F("rounded-xl border border-gray-200 bg-white overflow-hidden",t),children:e})}function is(e,t){return e?bx(e)?l.createElement(e,t):e:null}function bx(e){return wx(e)||typeof e=="function"||Cx(e)}function wx(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Cx(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Sx(){const{tableInstance:e}=pc();return a.jsxs($n,{children:[a.jsx(Fn,{children:e.getHeaderGroups().map(t=>a.jsx(Ie,{children:t.headers.map(n=>a.jsx(Wn,{children:n.isPlaceholder?null:is(n.column.columnDef.header,n.getContext())},n.id))},t.id))}),a.jsx(Ln,{children:e.getRowModel().rows?.length?e.getRowModel().rows.map(t=>a.jsx(Ie,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(n=>a.jsx(pt,{children:is(n.column.columnDef.cell,n.getContext())},n.id))},t.id)):a.jsx(Ie,{children:a.jsx(pt,{colSpan:e.getAllColumns().length,className:"h-24 text-center",children:"No results."})})})]})}function Nx({rowsPerPageOptions:e=[5,10,20,30,50],showPageSelector:t=!0,showRecordInfo:n=!0,showControls:r=!0}={}){const{tableInstance:o,totalRecords:s}=pc(),i=o.getState().pagination.pageIndex+1,c=o.getPageCount(),u=o.getState().pagination.pageSize,d=i===1?1:(i-1)*u+1,p=Math.min(i*u,s);return a.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 px-3 py-4",children:[t&&a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("span",{className:"text-sm text-gray-700 font-medium",children:"Items per page:"}),a.jsxs(dt,{value:`${u}`,onValueChange:f=>{o.setPageSize(Number(f))},children:[a.jsx(Je,{className:"h-9 w-[75px]",children:a.jsx(ft,{placeholder:u})}),a.jsx(Ze,{side:"top",children:e.map(f=>a.jsx(Be,{value:`${f}`,children:f},f))})]})]}),n&&a.jsx("div",{className:"flex items-center gap-2 text-sm text-gray-700",children:a.jsxs("span",{children:[d,"–",p," of ",s]})}),r&&a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsxs(G,{variant:"outline",size:"sm",onClick:()=>o.setPageIndex(0),disabled:!o.getCanPreviousPage(),className:"h-9 w-9 p-0",children:[a.jsx("span",{className:"sr-only",children:"First page"}),a.jsx(Tu,{className:"h-4 w-4"})]}),a.jsxs(G,{variant:"outline",size:"sm",onClick:()=>o.previousPage(),disabled:!o.getCanPreviousPage(),className:"h-9 w-9 p-0",children:[a.jsx("span",{className:"sr-only",children:"Previous page"}),a.jsx(Fe,{className:"h-4 w-4"})]}),a.jsxs("div",{className:"flex items-center justify-center text-sm font-medium min-w-[110px]",children:["Page ",i," of ",c]}),a.jsxs(G,{variant:"outline",size:"sm",onClick:()=>o.nextPage(),disabled:!o.getCanNextPage(),className:"h-9 w-9 p-0",children:[a.jsx("span",{className:"sr-only",children:"Next page"}),a.jsx(Ee,{className:"h-4 w-4"})]}),a.jsxs(G,{variant:"outline",size:"sm",onClick:()=>o.setPageIndex(o.getPageCount()-1),disabled:!o.getCanNextPage(),className:"h-9 w-9 p-0",children:[a.jsx("span",{className:"sr-only",children:"Last page"}),a.jsx(Ou,{className:"h-4 w-4"})]})]})]})}function Ex({column:e,title:t,align:n="left",className:r}){const o=e.getCanSort(),s=e.getIsSorted(),i={left:"",center:"text-center",right:"text-right"},c=()=>s==="asc"?a.jsx(Qt,{className:"h-4 w-4"}):s==="desc"?a.jsx(An,{className:"h-4 w-4"}):a.jsx(Yr,{className:"h-4 w-4"});return o?a.jsx("div",{className:F(i[n]),children:a.jsxs(G,{variant:"ghost",className:"h-auto px-2 py-1 font-normal hover:bg-transparent hover:text-gray-900",onClick:()=>e.toggleSorting(s==="asc"),children:[t,c()]})}):a.jsx("div",{className:F("px-2 py-1",r),children:t})}const jx=e=>new Date(e.getFullYear(),e.getMonth(),1),Px=e=>new Date(e.getFullYear(),e.getMonth()+1,0),Rx=(e,t)=>{const n=[],r=new Date(e);for(;r<=t;)n.push(new Date(r)),r.setDate(r.getDate()+1);return n},cs=(e,t)=>e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear(),Nt=(e,t)=>e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear(),ls=e=>Nt(e,new Date),Mx=e=>{const t=new Date;return t.setDate(t.getDate()+1),Nt(e,t)},us=(e,t)=>{const n=new Date(e);return n.setMonth(n.getMonth()+t),n},wr=(e,t)=>{const n=["January","February","March","April","May","June","July","August","September","October","November","December"],r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return t==="MMMM yyyy"?`${n[e.getMonth()]} ${e.getFullYear()}`:t==="MMM d, yyyy"?`${r[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`:t==="d"?e.getDate().toString():e.toLocaleDateString()};function Dx({selected:e,onSelect:t,events:n=[],holidays:r=[],className:o,...s}){const[i,c]=l.useState(new Date),[u,d]=l.useState("calendar"),p=jx(i),f=Px(i),h=Rx(p,f),g=["January","February","March","April","May","June","July","August","September","October","November","December"],v=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],m=i.getFullYear(),x=Array.from({length:20},(M,E)=>m-10+E),y=()=>{c(us(i,-1))},b=()=>{c(us(i,1))},S=()=>{const M=new Date(i);M.setFullYear(m-1),c(M)},w=()=>{const M=new Date(i);M.setFullYear(m+1),c(M)},T=M=>{const E=new Date(i);E.setMonth(M),c(E),d("calendar")},V=M=>{const E=new Date(i);E.setFullYear(M),c(E),d("calendar")},k=M=>n.filter(E=>Nt(E.date,M)),P=M=>r.some(E=>Nt(E.date,M));return u==="months"?a.jsxs("div",{className:F("bg-white rounded-lg border border-gray-200 w-full",o),...s,children:[a.jsx("div",{className:"px-6 py-4 border-b border-gray-100",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>d("calendar"),className:"h-9 px-3 text-sm font-medium text-gray-600 hover:text-gray-900 hover:bg-gray-50 rounded",children:"← Back"}),a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx(G,{variant:"outline",size:"sm",onClick:S,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Fe,{className:"h-4 w-4"})}),a.jsx(G,{variant:"ghost",onClick:()=>d("years"),className:"h-9 px-4 text-lg font-semibold text-gray-900 hover:bg-gray-50 rounded",children:m}),a.jsx(G,{variant:"outline",size:"sm",onClick:w,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Ee,{className:"h-4 w-4"})})]})]})}),a.jsx("div",{className:"p-6",children:a.jsx("div",{className:"grid grid-cols-3 gap-2",children:g.map((M,E)=>a.jsx(G,{variant:"ghost",onClick:()=>T(E),className:F("h-11 w-full text-sm font-medium rounded transition-all duration-200",E===i.getMonth()?"bg-gray-900 text-white hover:bg-gray-800 shadow-sm":"text-gray-600 hover:text-gray-900 hover:bg-gray-50"),children:M},M))})})]}):u==="years"?a.jsxs("div",{className:F("bg-white rounded-lg border border-gray-200 w-full",o),...s,children:[a.jsx("div",{className:"px-6 py-4 border-b border-gray-100",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>d("months"),className:"h-9 px-3 text-sm font-medium text-gray-600 hover:text-gray-900 hover:bg-gray-50 rounded",children:"← Back"}),a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Select Year"})]})}),a.jsx("div",{className:"p-6",children:a.jsx("div",{className:"grid grid-cols-4 gap-2 max-h-64 overflow-y-auto",children:x.map(M=>a.jsx(G,{variant:"ghost",onClick:()=>V(M),className:F("h-11 w-full text-sm font-medium rounded transition-all duration-200",M===m?"bg-gray-900 text-white hover:bg-gray-800 shadow-sm":"text-gray-600 hover:text-gray-900 hover:bg-gray-50"),children:M},M))})})]}):a.jsxs("div",{className:F("bg-white rounded-lg border border-gray-200 w-full",o),...s,children:[a.jsx("div",{className:"px-6 py-4 border-b border-gray-100",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(G,{variant:"outline",size:"sm",onClick:y,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Fe,{className:"h-4 w-4"})}),a.jsx(G,{variant:"ghost",onClick:()=>d("months"),className:"h-9 px-4 text-lg font-semibold text-gray-900 hover:bg-gray-50 rounded",children:wr(i,"MMMM yyyy")}),a.jsx(G,{variant:"outline",size:"sm",onClick:b,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Ee,{className:"h-4 w-4"})})]})}),a.jsxs("div",{className:"p-6",children:[a.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:v.map((M,E)=>a.jsx("div",{className:"h-10 flex items-center justify-center",children:a.jsx("span",{className:"text-xs font-medium text-gray-400 uppercase",children:M})},E))}),a.jsxs("div",{className:"grid grid-cols-7 gap-1",children:[Array.from({length:p.getDay()}).map((M,E)=>a.jsx("div",{className:"h-12"},`empty-${E}`)),h.map(M=>{const E=k(M),D=e&&Nt(M,e),C=ls(M),W=cs(M,i),N=P(M);return a.jsx("div",{className:"relative",children:a.jsxs(G,{variant:"ghost",size:"sm",className:F("h-12 w-full p-0 text-sm relative rounded transition-all duration-200",!W&&"text-gray-300",W&&!D&&!C&&!N&&"text-gray-700 hover:bg-gray-50",N&&!D&&"text-red-600 font-medium hover:bg-red-50",C&&!D&&"bg-gray-100 text-gray-900 font-medium border border-gray-200",D&&"bg-gray-900 text-white font-medium shadow-sm"),onClick:()=>t?.(M),children:[wr(M,"d"),E.length>0&&a.jsxs("div",{className:"absolute bottom-1 left-1/2 transform -translate-x-1/2 flex space-x-0.5",children:[E.slice(0,3).map((H,O)=>{const L=A=>{if(D)return"bg-white/80";switch(A){case"class":return"bg-blue-500";case"meeting":return"bg-green-500";case"appointment":return"bg-orange-500";case"deadline":return"bg-red-500";default:return"bg-gray-500"}};return a.jsx("div",{className:F("w-1 h-1 rounded-full",L(H.type))},O)}),E.length>3&&a.jsx("div",{className:F("w-1 h-1 rounded-full",D?"bg-white/60":"bg-gray-400")})]})]})},M.toISOString())})]})]}),e&&a.jsx("div",{className:"border-t border-gray-100",children:a.jsxs("div",{className:"p-6",children:[a.jsx("div",{className:"flex items-center justify-between mb-4",children:a.jsx("h4",{className:"text-sm font-semibold text-gray-900",children:ls(e)?"Today":Mx(e)?"Tomorrow":wr(e,"MMM d, yyyy")})}),(()=>{const M=n.filter(E=>Nt(E.date,e));return a.jsxs("div",{className:"space-y-3",children:[M.length>0&&M.map(E=>{const C=(W=>{switch(W){case"class":return{bg:"bg-blue-50",border:"border-blue-100",dot:"bg-blue-500",text:"text-blue-900",subtext:"text-blue-600"};case"meeting":return{bg:"bg-green-50",border:"border-green-100",dot:"bg-green-500",text:"text-green-900",subtext:"text-green-600"};case"appointment":return{bg:"bg-orange-50",border:"border-orange-100",dot:"bg-orange-500",text:"text-orange-900",subtext:"text-orange-600"};case"deadline":return{bg:"bg-red-50",border:"border-red-100",dot:"bg-red-500",text:"text-red-900",subtext:"text-red-600"};default:return{bg:"bg-gray-50",border:"border-gray-100",dot:"bg-gray-500",text:"text-gray-900",subtext:"text-gray-600"}}})(E.type);return a.jsxs("div",{className:`flex items-center space-x-3 p-3 ${C.bg} rounded border ${C.border} hover:shadow-sm transition-shadow cursor-pointer`,children:[a.jsx("div",{className:`w-2 h-2 rounded-full ${C.dot} flex-shrink-0`}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:`text-sm font-medium ${C.text} truncate`,children:E.title}),(E.time||E.location)&&a.jsxs("p",{className:`text-xs ${C.subtext} truncate`,children:[E.time,E.time&&E.location&&" • ",E.location]})]})]},E.id||E.title)}),M.length===0&&a.jsxs("div",{className:"text-center py-8",children:[a.jsx("div",{className:"w-12 h-12 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-3",children:a.jsx(Br,{className:"w-5 h-5 text-gray-400"})}),a.jsx("p",{className:"text-sm text-gray-500",children:"No events scheduled"})]})]})})()]})}),!cs(i,new Date)&&a.jsx("div",{className:"p-6 pt-0",children:a.jsx(G,{variant:"outline",size:"sm",onClick:()=>{const M=new Date;c(M),t?.(M),d("calendar")},className:"w-full h-10 text-sm font-medium border-gray-200 hover:bg-gray-50 rounded",children:"Today"})})]})}const mc=6048e5,Tx=864e5,ds=Symbol.for("constructDateFrom");function we(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ds in e?e[ds](t):e instanceof Date?new e.constructor(t):new Date(t)}function ve(e,t){return we(t||e,e)}function $r(e,t,n){const r=ve(e,n?.in);if(isNaN(t))return we(e,NaN);if(!t)return r;const o=r.getDate(),s=we(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const i=s.getDate();return o>=i?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let kx={};function tr(){return kx}function Jt(e,t){const n=tr(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=ve(e,t?.in),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Tn(e,t){return Jt(e,{...t,weekStartsOn:1})}function hc(e,t){const n=ve(e,t?.in),r=n.getFullYear(),o=we(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=Tn(o),i=we(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const c=Tn(i);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function fs(e){const t=ve(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 nr(e,...t){const n=we.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function kn(e,t){const n=ve(e,t?.in);return n.setHours(0,0,0,0),n}function Ox(e,t,n){const[r,o]=nr(n?.in,e,t),s=kn(r),i=kn(o),c=+s-fs(s),u=+i-fs(i);return Math.round((c-u)/Tx)}function _x(e,t){const n=hc(e,t),r=we(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Tn(r)}function Ax(e){return we(e,Date.now())}function St(e,t,n){const[r,o]=nr(n?.in,e,t);return+kn(r)==+kn(o)}function Ix(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function $x(e){return!(!Ix(e)&&typeof e!="number"||isNaN(+ve(e)))}function ps(e,t){const n=ve(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Fx(e,t){const[n,r]=nr(e,t.start,t.end);return{start:n,end:r}}function ms(e,t){const{start:n,end:r}=Fx(t?.in,e);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let c=1;const u=[];for(;+i<=s;)u.push(we(n,i)),i.setDate(i.getDate()+c),i.setHours(0,0,0,0);return o?u.reverse():u}function hs(e,t){const n=ve(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Lx(e,t){const n=ve(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Wx={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"}},Vx=(e,t,n)=>{let r;const o=Wx[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Cr(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Hx={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Bx={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zx={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Yx={date:Cr({formats:Hx,defaultWidth:"full"}),time:Cr({formats:Bx,defaultWidth:"full"}),dateTime:Cr({formats:zx,defaultWidth:"full"})},Gx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ux=(e,t,n,r)=>Gx[e];function Ht(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):i;o=e.formattingValues[c]||e.formattingValues[i]}else{const i=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const Kx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xx={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"]},Jx={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"]},Zx={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"}},Qx={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"}},ev=(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"},tv={ordinalNumber:ev,era:Ht({values:Kx,defaultWidth:"wide"}),quarter:Ht({values:qx,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ht({values:Xx,defaultWidth:"wide"}),day:Ht({values:Jx,defaultWidth:"wide"}),dayPeriod:Ht({values:Zx,defaultWidth:"wide",formattingValues:Qx,defaultFormattingWidth:"wide"})};function Bt(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?rv(c,f=>f.test(i)):nv(c,f=>f.test(i));let d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const p=t.slice(i.length);return{value:d,rest:p}}}function nv(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function rv(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ov(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const c=t.slice(o.length);return{value:i,rest:c}}}const sv=/^(\d+)(th|st|nd|rd)?/i,av=/\d+/i,iv={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},cv={any:[/^b/i,/^(a|c)/i]},lv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},uv={any:[/1/i,/2/i,/3/i,/4/i]},dv={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},fv={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]},pv={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},mv={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]},hv={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},gv={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}},xv={ordinalNumber:ov({matchPattern:sv,parsePattern:av,valueCallback:e=>parseInt(e,10)}),era:Bt({matchPatterns:iv,defaultMatchWidth:"wide",parsePatterns:cv,defaultParseWidth:"any"}),quarter:Bt({matchPatterns:lv,defaultMatchWidth:"wide",parsePatterns:uv,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Bt({matchPatterns:dv,defaultMatchWidth:"wide",parsePatterns:fv,defaultParseWidth:"any"}),day:Bt({matchPatterns:pv,defaultMatchWidth:"wide",parsePatterns:mv,defaultParseWidth:"any"}),dayPeriod:Bt({matchPatterns:hv,defaultMatchWidth:"any",parsePatterns:gv,defaultParseWidth:"any"})},vv={code:"en-US",formatDistance:Vx,formatLong:Yx,formatRelative:Ux,localize:tv,match:xv,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yv(e,t){const n=ve(e,t?.in);return Ox(n,Lx(n))+1}function bv(e,t){const n=ve(e,t?.in),r=+Tn(n)-+_x(n);return Math.round(r/mc)+1}function gc(e,t){const n=ve(e,t?.in),r=n.getFullYear(),o=tr(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=we(t?.in||e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const c=Jt(i,t),u=we(t?.in||e,0);u.setFullYear(r,0,s),u.setHours(0,0,0,0);const d=Jt(u,t);return+n>=+c?r+1:+n>=+d?r:r-1}function wv(e,t){const n=tr(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=gc(e,t),s=we(t?.in||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),Jt(s,t)}function Cv(e,t){const n=ve(e,t?.in),r=+Jt(n,t)-+wv(n,t);return Math.round(r/mc)+1}function se(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const qe={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return se(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):se(n+1,2)},d(e,t){return se(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 se(e.getHours()%12||12,t.length)},H(e,t){return se(e.getHours(),t.length)},m(e,t){return se(e.getMinutes(),t.length)},s(e,t){return se(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return se(o,t.length)}},Ct={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},gs={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 qe.y(e,t)},Y:function(e,t,n,r){const o=gc(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return se(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):se(s,t.length)},R:function(e,t){const n=hc(e);return se(n,t.length)},u:function(e,t){const n=e.getFullYear();return se(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 se(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 se(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 qe.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 se(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=Cv(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):se(o,t.length)},I:function(e,t,n){const r=bv(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):se(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):qe.d(e,t)},D:function(e,t,n){const r=yv(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):se(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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return se(s,2);case"eo":return n.ordinalNumber(s,{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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return se(s,t.length);case"co":return n.ordinalNumber(s,{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 se(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=Ct.noon:r===0?o=Ct.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=Ct.evening:r>=12?o=Ct.afternoon:r>=4?o=Ct.morning:o=Ct.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 qe.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):qe.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):se(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):se(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):qe.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):qe.s(e,t)},S:function(e,t){return qe.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return vs(r);case"XXXX":case"XX":return ut(r);case"XXXXX":case"XXX":default:return ut(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return vs(r);case"xxxx":case"xx":return ut(r);case"xxxxx":case"xxx":default:return ut(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xs(r,":");case"OOOO":default:return"GMT"+ut(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xs(r,":");case"zzzz":default:return"GMT"+ut(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return se(r,t.length)},T:function(e,t,n){return se(+e,t.length)}};function xs(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+se(s,2)}function vs(e,t){return e%60===0?(e>0?"-":"+")+se(Math.abs(e)/60,2):ut(e,t)}function ut(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=se(Math.trunc(r/60),2),s=se(r%60,2);return n+o+t+s}const ys=(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"})}},xc=(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"})}},Sv=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ys(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",ys(r,t)).replace("{{time}}",xc(o,t))},Nv={p:xc,P:Sv},Ev=/^D+$/,jv=/^Y+$/,Pv=["D","DD","YY","YYYY"];function Rv(e){return Ev.test(e)}function Mv(e){return jv.test(e)}function Dv(e,t,n){const r=Tv(e,t,n);if(console.warn(r),Pv.includes(e))throw new RangeError(r)}function Tv(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 kv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ov=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_v=/^'([^]*?)'?$/,Av=/''/g,Iv=/[a-zA-Z]/;function zt(e,t,n){const r=tr(),o=r.locale??vv,s=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,c=ve(e,n?.in);if(!$x(c))throw new RangeError("Invalid time value");let u=t.match(Ov).map(p=>{const f=p[0];if(f==="p"||f==="P"){const h=Nv[f];return h(p,o.formatLong)}return p}).join("").match(kv).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const f=p[0];if(f==="'")return{isToken:!1,value:$v(p)};if(gs[f])return{isToken:!0,value:p};if(f.match(Iv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(u=o.localize.preprocessor(c,u));const d={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return u.map(p=>{if(!p.isToken)return p.value;const f=p.value;(Mv(f)||Rv(f))&&Dv(f,t,String(e));const h=gs[f[0]];return h(c,f,o.localize,d)}).join("")}function $v(e){const t=e.match(_v);return t?t[1].replace(Av,"'"):e}function bs(e,t,n){const[r,o]=nr(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function ws(e,t){return St(we(e,e),Ax(e))}function Fv(e,t,n){return $r(e,-1,n)}function vc(e){const t=Lv(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Vv);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Lv(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=Bv(o),c=Hv(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wv=Symbol("radix.slottable");function Vv(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wv}function Hv(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Bv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yc=zv.reduce((e,t)=>{const n=vc(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),rr="Popover",[bc]=Ge(rr,[Ot]),dn=Ot(),[Yv,at]=bc(rr),wc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,c=dn(t),u=l.useRef(null),[d,p]=l.useState(!1),[f,h]=et({prop:r,defaultProp:o??!1,onChange:s,caller:rr});return a.jsx(Gn,{...c,children:a.jsx(Yv,{scope:t,contentId:je(),triggerRef:u,open:f,onOpenChange:h,onOpenToggle:l.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:d,onCustomAnchorAdd:l.useCallback(()=>p(!0),[]),onCustomAnchorRemove:l.useCallback(()=>p(!1),[]),modal:i,children:n})})};wc.displayName=rr;var Cc="PopoverAnchor",Sc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=at(Cc,n),s=dn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return l.useEffect(()=>(i(),()=>c()),[i,c]),a.jsx(Un,{...s,...r,ref:t})});Sc.displayName=Cc;var Nc="PopoverTrigger",Ec=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=at(Nc,n),s=dn(n),i=oe(t,o.triggerRef),c=a.jsx(yc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Dc(o.open),...r,ref:i,onClick:z(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:a.jsx(Un,{asChild:!0,...s,children:c})});Ec.displayName=Nc;var mo="PopoverPortal",[Gv,Uv]=bc(mo,{forceMount:void 0}),jc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=at(mo,t);return a.jsx(Gv,{scope:t,forceMount:n,children:a.jsx(ke,{present:n||s.open,children:a.jsx(rn,{asChild:!0,container:o,children:r})})})};jc.displayName=mo;var Mt="PopoverContent",Pc=l.forwardRef((e,t)=>{const n=Uv(Mt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=at(Mt,e.__scopePopover);return a.jsx(ke,{present:r||s.open,children:s.modal?a.jsx(qv,{...o,ref:t}):a.jsx(Xv,{...o,ref:t})})});Pc.displayName=Mt;var Kv=vc("PopoverContent.RemoveScroll"),qv=l.forwardRef((e,t)=>{const n=at(Mt,e.__scopePopover),r=l.useRef(null),o=oe(t,r),s=l.useRef(!1);return l.useEffect(()=>{const i=r.current;if(i)return Kn(i)},[]),a.jsx(an,{as:Kv,allowPinchZoom:!0,children:a.jsx(Rc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:z(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Xv=l.forwardRef((e,t)=>{const n=at(Mt,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return a.jsx(Rc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Rc=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,...f}=e,h=at(Mt,n),g=dn(n);return Vn(),a.jsx(tn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:a.jsx(en,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:p,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:a.jsx(no,{"data-state":Dc(h.open),role:"dialog",id:h.contentId,...g,...f,ref:t,style:{...f.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)"}})})})}),Mc="PopoverClose",Jv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=at(Mc,n);return a.jsx(yc.button,{type:"button",...r,ref:t,onClick:z(e.onClick,()=>o.onOpenChange(!1))})});Jv.displayName=Mc;var Zv="PopoverArrow",Qv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=dn(n);return a.jsx(ro,{...o,...r,ref:t})});Qv.displayName=Zv;function Dc(e){return e?"open":"closed"}var ey=wc,ty=Sc,ny=Ec,ry=jc,Tc=Pc;const ho=ey,go=ny,oy=ty,or=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>a.jsx(ry,{children:a.jsx(Tc,{ref:o,align:t,sideOffset:n,className:F("z-50 w-auto rounded-md border border-gray-200 bg-white p-3 text-gray-950 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})}));or.displayName=Tc.displayName;function sy({date:e,onDateChange:t,mode:n="single",dateRange:r,onDateRangeChange:o,placeholder:s="Pick a date",dateFormat:i="PPP",disabled:c=!1,className:u,variant:d="outline",size:p="default",align:f="start",showIcon:h=!0,icon:g,minDate:v,maxDate:m,disabledDates:x,isDateDisabled:y,fullWidth:b=!1,customTrigger:S,numberOfMonths:w=1,holidays:T=[]}){const[V,k]=l.useState(!1),[P,M]=l.useState(e||new Date),[E,D]=l.useState("calendar"),[C,W]=l.useState(r?.from),[N,H]=l.useState(r?.to),[O,L]=l.useState();l.useEffect(()=>{W(r?.from),H(r?.to)},[r]),l.useEffect(()=>{V&&(D("calendar"),n==="single"&&e?M(e):n==="range"&&r?.from&&M(r.from))},[V,e,r,n]);const A=I=>{if(n==="range")if(!C||C&&N)W(I),H(void 0),o?.({from:I,to:void 0});else{const J=C<I?C:I,Se=C<I?I:C;W(J),H(Se),o?.({from:J,to:Se}),k(!1)}else t?.(I),k(!1)},_=I=>!!(x?.some(J=>J.toDateString()===I.toDateString())||v&&I<v||m&&I>m||y?.(I)),Q=I=>T.some(J=>St(J.date,I)),j=hs(P),Y=ps(P),q=ms({start:j,end:Y}),X=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ce=$r(P,1),le=hs(ce),$=ps(ce),ee=ms({start:le,end:$}),ae=()=>{M(Fv(P))},te=()=>{M($r(P,1))},ne=(I,J)=>zt(I,J),R=I=>{if(C&&N)return I>=C&&I<=N;if(C&&!N&&O){const J=C<O?C:O,Se=C<O?O:C;return I>=J&&I<=Se}return!1},B=I=>C&&St(I,C),re=I=>N&&St(I,N),K=()=>{const I=new Date(P);I.setFullYear(it-1),M(I)},ge=()=>{const I=new Date(P);I.setFullYear(it+1),M(I)},fe=I=>{const J=new Date(P.getFullYear(),I,1);M(J),D("calendar")},xe=I=>{const J=new Date(I,P.getMonth(),1);M(J),D("calendar")},ar=["January","February","March","April","May","June","July","August","September","October","November","December"],it=P.getFullYear(),ir=Array.from({length:20},(I,J)=>it-10+J),No=S||a.jsxs(G,{variant:d,size:p,className:F("justify-start text-left font-normal",!e&&!C&&"text-gray-500",b&&"w-full",u),disabled:c,children:[h&&(g||a.jsx(Br,{className:"mr-2 h-4 w-4"})),n==="range"?C&&N?a.jsxs("span",{children:[zt(C,i)," - ",zt(N,i)]}):C?a.jsxs("span",{children:[zt(C,i)," - ..."]}):a.jsx("span",{children:s}):e?zt(e,i):a.jsx("span",{children:s})]});return a.jsxs(ho,{open:V,onOpenChange:k,children:[a.jsx(go,{asChild:!0,children:No}),a.jsx(or,{className:F("p-0 border-gray-200",w===2?"w-[640px]":"w-[320px]"),align:f,side:"bottom",sideOffset:4,collisionPadding:8,children:a.jsxs("div",{className:"bg-white rounded-lg",children:[a.jsx("div",{className:"border-b border-gray-100 px-6 py-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(G,{variant:"outline",size:"sm",onClick:ae,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Fe,{className:"h-4 w-4"})}),w===2?a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>D("months"),className:"h-9 px-3 font-semibold text-base hover:bg-gray-50",children:ne(P,"MMMM")}),a.jsx("span",{className:"text-gray-400 text-sm",children:"-"}),a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>D("months"),className:"h-9 px-3 font-semibold text-base hover:bg-gray-50",children:ne(ce,"MMMM yyyy")})]}):a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>D("months"),className:"h-9 px-4 font-semibold text-lg hover:bg-gray-50",children:ne(P,"MMMM yyyy")}),a.jsx(G,{variant:"outline",size:"sm",onClick:te,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Ee,{className:"h-4 w-4"})})]})}),a.jsxs("div",{className:"p-6",children:[E==="years"&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>D("months"),className:"h-9 px-3 text-sm font-medium text-gray-600 hover:text-gray-900 hover:bg-gray-50 rounded",children:"← Back"}),a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Select Year"})]}),a.jsx("div",{className:"grid grid-cols-4 gap-2 max-h-64 overflow-y-auto",children:ir.map(I=>a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>xe(I),className:F("h-11 w-full text-sm font-medium rounded transition-all duration-200",I===it?"bg-gray-900 text-white hover:bg-gray-800 shadow-sm":"text-gray-600 hover:text-gray-900 hover:bg-gray-50"),children:I},I))})]}),E==="months"&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>D("calendar"),className:"h-9 px-3 text-sm font-medium text-gray-600 hover:text-gray-900 hover:bg-gray-50 rounded",children:"← Back"}),a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx(G,{variant:"outline",size:"sm",onClick:K,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Fe,{className:"h-4 w-4"})}),a.jsx(G,{variant:"ghost",onClick:()=>D("years"),className:"h-9 px-4 text-lg font-semibold text-gray-900 hover:bg-gray-50 rounded",children:it}),a.jsx(G,{variant:"outline",size:"sm",onClick:ge,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Ee,{className:"h-4 w-4"})})]})]}),a.jsx("div",{className:"grid grid-cols-3 gap-2",children:ar.map((I,J)=>a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>fe(J),className:F("h-11 w-full text-sm font-medium rounded transition-all duration-200",J===P.getMonth()?"bg-gray-900 text-white hover:bg-gray-800 shadow-sm":"text-gray-600 hover:text-gray-900 hover:bg-gray-50"),children:I},I))})]}),E==="calendar"&&a.jsxs("div",{className:F("flex",w===2&&"gap-6"),children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:X.map((I,J)=>a.jsx("div",{className:"h-8 flex items-center justify-center",children:a.jsx("span",{className:"text-xs font-medium text-gray-400 uppercase",children:I})},J))}),a.jsxs("div",{className:"grid grid-cols-7",children:[Array.from({length:j.getDay()}).map((I,J)=>a.jsx("div",{className:"h-10"},`empty-${J}`)),q.map(I=>{const J=n==="single"?e&&St(I,e):B(I)||re(I),Se=ws(I),ct=bs(I,P),lt=_(I),de=n==="range"&&R(I),It=Q(I),$t=I.getDay(),cr=B(I),lr=re(I);return a.jsx("div",{className:F("relative p-0.5",de&&"bg-gray-100",de&&$t===0&&"rounded-l",de&&$t===6&&"rounded-r",de&&cr&&"rounded-l",de&&lr&&"rounded-r"),onMouseEnter:()=>n==="range"&&C&&!N&&L(I),onMouseLeave:()=>L(void 0),children:a.jsx(G,{variant:"ghost",size:"sm",disabled:lt||c,className:F("h-10 w-full p-0 text-sm relative transition-all duration-200",!ct&&"text-gray-300",ct&&!J&&!Se&&!de&&!It&&"text-gray-700 hover:bg-gray-50 rounded",It&&!J&&"text-red-600 font-medium hover:bg-red-50 rounded",Se&&!J&&!de&&"bg-gray-50 text-gray-900 font-medium border border-gray-200 rounded",J&&"bg-gray-900 text-white font-medium shadow-sm z-10 rounded hover:bg-gray-500",de&&!J&&"text-gray-900 hover:bg-gray-200",lt&&"opacity-40 cursor-not-allowed hover:bg-transparent"),onClick:()=>!lt&&A(I),children:ne(I,"d")})},I.toISOString())})]})]}),w===2&&a.jsxs("div",{className:"flex-1",children:[a.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:X.map((I,J)=>a.jsx("div",{className:"h-8 flex items-center justify-center",children:a.jsx("span",{className:"text-xs font-medium text-gray-400 uppercase",children:I})},J))}),a.jsxs("div",{className:"grid grid-cols-7",children:[Array.from({length:le.getDay()}).map((I,J)=>a.jsx("div",{className:"h-10"},`next-empty-${J}`)),ee.map(I=>{const J=n==="single"?e&&St(I,e):B(I)||re(I),Se=ws(I),ct=bs(I,ce),lt=_(I),de=n==="range"&&R(I),It=Q(I),$t=I.getDay(),cr=B(I),lr=re(I);return a.jsx("div",{className:F("relative p-0.5",de&&"bg-gray-100",de&&$t===0&&"rounded-l",de&&$t===6&&"rounded-r",de&&cr&&"rounded-l",de&&lr&&"rounded-r"),onMouseEnter:()=>n==="range"&&C&&!N&&L(I),onMouseLeave:()=>L(void 0),children:a.jsx(G,{variant:"ghost",size:"sm",disabled:lt||c,className:F("h-10 w-full p-0 text-sm relative transition-all duration-200",!ct&&"text-gray-300",ct&&!J&&!Se&&!de&&!It&&"text-gray-700 hover:bg-gray-50 rounded",It&&!J&&"text-red-600 font-medium hover:bg-red-50 rounded",Se&&!J&&!de&&"bg-gray-50 text-gray-900 font-medium border border-gray-200 rounded",J&&"bg-gray-900 text-white font-medium shadow-sm z-10 rounded hover:bg-gray-500",de&&!J&&"text-gray-900 hover:bg-gray-200",lt&&"opacity-40 cursor-not-allowed hover:bg-transparent"),onClick:()=>!lt&&A(I),children:ne(I,"d")})},I.toISOString())})]})]})]})]})]})})]})}const ay=({time:e,onTimeChange:t,timezone:n="UTC",format:r="24h",showTimezone:o=!1,minuteStep:s=1,showSeconds:i=!1,placeholder:c="Select time",variant:u="outline",size:d="default",showClockFace:p=!1})=>{const f=r==="24h",h=e?e.getHours():0,g=e?e.getMinutes():0,v=e?e.getSeconds():0,m=h>=12?"PM":"AM",[x,y]=U.useState(h),[b,S]=U.useState(g),[w,T]=U.useState(v),[V,k]=U.useState(m),[P,M]=U.useState(""),[E,D]=U.useState(""),[C,W]=U.useState(""),N=U.useRef(null),H=U.useRef(null),O=U.useRef(null),L=U.useRef(null),A=U.useRef(null),_=U.useRef(null);U.useEffect(()=>{if(e){const R=e.getHours(),B=e.getMinutes(),re=e.getSeconds(),K=R>=12?"PM":"AM";R!==x&&y(R),B!==b&&S(B),re!==w&&T(re),K!==V&&k(K)}},[e]),U.useEffect(()=>{L.current&&L.current.querySelector('[data-selected="true"]')?.scrollIntoView({block:"center",behavior:"smooth"}),A.current&&A.current.querySelector('[data-selected="true"]')?.scrollIntoView({block:"center",behavior:"smooth"}),_.current&&_.current.querySelector('[data-selected="true"]')?.scrollIntoView({block:"center",behavior:"smooth"})},[x,b,w,f]);const Q=(R,B,re)=>{const K=new Date;K.setHours(R),K.setMinutes(B),K.setSeconds(re),t(K)},j=R=>{let B=R;f||(V==="PM"&&R!==12?B=R+12:V==="AM"&&R===12&&(B=0)),y(B),Q(B,b,w)},Y=R=>{S(R),Q(x,R,w)},q=R=>{T(R),Q(x,b,R)},X=R=>{if(V===R)return;k(R);const B=R==="PM"?x%12+12:x%12;y(B),Q(B,b,w)},ce=()=>{const R=new Date;y(R.getHours()),S(R.getMinutes()),T(R.getSeconds()),k(R.getHours()>=12?"PM":"AM"),t(R)},le=()=>{if(!e)return c;const R=f?x:x%12||12,B=b.toString().padStart(2,"0"),re=w.toString().padStart(2,"0");let K=`${R.toString().padStart(2,"0")}:${B}`;return i&&(K+=`:${re}`),f||(K+=` ${V}`),o&&(K+=` ${n}`),K},$=()=>{const R=f?23:12,B=f?0:1;return Array.from({length:R-B+1},(re,K)=>B+K)},ee=()=>Array.from({length:Math.floor(60/s)},(R,B)=>B*s),ae=()=>Array.from({length:60},(R,B)=>B),te=f?x:x%12||12,ne=()=>{const ge=(te%12*30+b*.5)*(Math.PI/180)-Math.PI/2,fe=b*6*(Math.PI/180)-Math.PI/2,xe=100+50*Math.cos(ge),ar=100+50*Math.sin(ge),it=100+70*Math.cos(fe),ir=100+70*Math.sin(fe);return a.jsxs("svg",{width:200,height:200,className:"mx-auto",children:[a.jsx("circle",{cx:100,cy:100,r:95,fill:"white",stroke:"#e5e7eb",strokeWidth:"2"}),Array.from({length:12},(No,I)=>{const J=I*30*(Math.PI/180)-Math.PI/2,Se=100+80*Math.cos(J),ct=100+80*Math.sin(J);return a.jsx("text",{x:Se,y:ct,textAnchor:"middle",dominantBaseline:"middle",className:"text-sm fill-gray-600",children:I===0?12:I},I)}),a.jsx("line",{x1:100,y1:100,x2:xe,y2:ar,stroke:"#374151",strokeWidth:"6",strokeLinecap:"round"}),a.jsx("line",{x1:100,y1:100,x2:it,y2:ir,stroke:"#ef4444",strokeWidth:"4",strokeLinecap:"round"}),a.jsx("circle",{cx:100,cy:100,r:"6",fill:"#ef4444"})]})};return a.jsxs(ho,{children:[a.jsx(go,{asChild:!0,children:a.jsxs(G,{variant:u,size:d,className:F("justify-start text-left font-normal",!e&&"text-muted-foreground"),children:[a.jsx(Fu,{className:"mr-2 h-4 w-4"}),le()]})}),a.jsx(or,{className:"w-auto p-0",align:"start",children:a.jsxs("div",{className:"p-6 space-y-4 min-w-[460px]",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-center gap-6",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("input",{ref:N,type:"text",inputMode:"numeric",value:P!==""?P.padStart(2,"0"):te.toString().padStart(2,"0"),onKeyDown:R=>{if(R.key>="0"&&R.key<="9"){R.preventDefault();const B=P+R.key;if(B.length===1)M(R.key);else if(B.length===2){const re=parseInt(B),K=f?23:12,ge=f?0:1;let fe=re;re<ge&&(fe=ge),re>K&&(fe=K),M(""),j(fe),setTimeout(()=>H.current?.focus(),0)}}else R.key==="Backspace"?(R.preventDefault(),P.length>0&&M(P.slice(0,-1))):R.key==="ArrowRight"||R.key==="Tab"?(R.key==="ArrowRight"&&R.preventDefault(),H.current?.focus()):R.key===":"&&(R.preventDefault(),H.current?.focus())},onBlur:()=>{if(P){const R=parseInt(P),B=f?23:12,re=f?0:1;let K=R;R<re&&(K=re),R>B&&(K=B),j(K)}M("")},onFocus:()=>{M("")},className:"text-6xl font-medium tabular-nums leading-none w-[85px] text-center bg-transparent outline-none focus:ring-2 focus:ring-primary rounded px-1 cursor-text",readOnly:!0}),a.jsx("div",{className:"text-6xl font-medium leading-none flex items-center px-1",children:":"}),a.jsx("input",{ref:H,type:"text",inputMode:"numeric",value:E!==""?E.padStart(2,"0"):b.toString().padStart(2,"0"),onKeyDown:R=>{if(R.key>="0"&&R.key<="9"){R.preventDefault();const B=E+R.key;if(B.length===1)D(R.key);else if(B.length===2){const re=parseInt(B),K=Math.min(59,Math.max(0,re));D(""),Y(K),i&&setTimeout(()=>O.current?.focus(),0)}}else R.key==="Backspace"?(R.preventDefault(),E.length>0?D(E.slice(0,-1)):N.current?.focus()):R.key==="ArrowLeft"?(R.preventDefault(),N.current?.focus()):R.key==="ArrowRight"||R.key==="Tab"?(R.key==="ArrowRight"&&R.preventDefault(),i&&O.current?.focus()):R.key===":"&&(R.preventDefault(),i&&O.current?.focus())},onBlur:()=>{if(E){const R=parseInt(E),B=Math.min(59,Math.max(0,R));Y(B)}D("")},onFocus:()=>{D("")},className:"text-6xl font-medium tabular-nums leading-none w-[85px] text-center bg-transparent outline-none focus:ring-2 focus:ring-primary rounded px-1 cursor-text",readOnly:!0}),i&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"text-6xl font-medium leading-none flex items-center px-1",children:":"}),a.jsx("input",{ref:O,type:"text",inputMode:"numeric",value:C!==""?C.padStart(2,"0"):w.toString().padStart(2,"0"),onKeyDown:R=>{if(R.key>="0"&&R.key<="9"){R.preventDefault();const B=C+R.key;if(B.length===1)W(R.key);else if(B.length===2){const re=parseInt(B),K=Math.min(59,Math.max(0,re));W(""),q(K)}}else R.key==="Backspace"?(R.preventDefault(),C.length>0?W(C.slice(0,-1)):H.current?.focus()):R.key==="ArrowLeft"&&(R.preventDefault(),H.current?.focus())},onBlur:()=>{if(C){const R=parseInt(C),B=Math.min(59,Math.max(0,R));q(B)}W("")},onFocus:()=>{W("")},className:"text-6xl font-medium tabular-nums leading-none w-[85px] text-center bg-transparent outline-none focus:ring-2 focus:ring-primary rounded px-1 cursor-text",readOnly:!0})]})]}),!f&&a.jsxs("div",{className:"flex flex-col gap-1",children:[a.jsx(G,{size:"sm",variant:V==="AM"?"default":"outline",onClick:()=>X("AM"),className:"h-8 w-12 text-xs font-medium",children:"AM"}),a.jsx(G,{size:"sm",variant:V==="PM"?"default":"outline",onClick:()=>X("PM"),className:"h-8 w-12 text-xs font-medium",children:"PM"})]})]}),o&&a.jsx("div",{className:"text-xs text-gray-500 text-center",children:n})]}),p?a.jsx("div",{className:"space-y-4",children:ne()}):a.jsxs("div",{className:"flex gap-2 justify-center items-start",children:[a.jsxs("div",{className:"flex-1 max-w-[80px]",children:[a.jsx("div",{className:"text-xs text-center text-gray-500 mb-2",children:"Hour"}),a.jsx("div",{ref:L,className:"h-40 overflow-y-scroll border rounded-md scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100",children:$().map(R=>a.jsx("button",{"data-selected":te===R,onClick:()=>j(R),className:F("w-full py-2 text-center transition-colors",te===R?"bg-blue-500 text-white font-medium":"hover:bg-gray-100 text-gray-700"),children:R.toString().padStart(2,"0")},R))})]}),a.jsxs("div",{className:"flex-1 max-w-[80px]",children:[a.jsx("div",{className:"text-xs text-center text-gray-500 mb-2",children:"Min"}),a.jsx("div",{ref:A,className:"h-40 overflow-y-scroll border rounded-md scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100",children:ee().map(R=>a.jsx("button",{"data-selected":b===R,onClick:()=>Y(R),className:F("w-full py-2 text-center transition-colors",b===R?"bg-blue-500 text-white font-medium":"hover:bg-gray-100 text-gray-700"),children:R.toString().padStart(2,"0")},R))})]}),i&&a.jsxs("div",{className:"flex-1 max-w-[80px]",children:[a.jsx("div",{className:"text-xs text-center text-gray-500 mb-2",children:"Sec"}),a.jsx("div",{ref:_,className:"h-40 overflow-y-scroll border rounded-md scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100",children:ae().map(R=>a.jsx("button",{"data-selected":w===R,onClick:()=>q(R),className:F("w-full py-2 text-center transition-colors",w===R?"bg-blue-500 text-white font-medium":"hover:bg-gray-100 text-gray-700"),children:R.toString().padStart(2,"0")},R))})]})]}),a.jsxs("div",{className:"flex gap-2 justify-between pt-2 border-t",children:[a.jsx(G,{size:"sm",variant:"outline",onClick:ce,children:"Now"}),a.jsx(G,{size:"sm",onClick:()=>t(e),children:"Done"})]})]})})]})},xo=l.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:F("rounded-lg border border-gray-200 bg-white text-gray-950 shadow-sm",e),...t}));xo.displayName="Card";const vo=l.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:F("flex flex-col space-y-1.5 p-6",e),...t}));vo.displayName="CardHeader";const yo=l.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:F("text-2xl font-semibold leading-none tracking-tight",e),...t}));yo.displayName="CardTitle";const kc=l.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:F("text-sm text-gray-500",e),...t}));kc.displayName="CardDescription";const bo=l.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:F("p-6 pt-0",e),...t}));bo.displayName="CardContent";const Oc=l.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:F("flex items-center p-6 pt-0",e),...t}));Oc.displayName="CardFooter";var iy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cy=iy.reduce((e,t)=>{const n=Es(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ly="Label",_c=l.forwardRef((e,t)=>a.jsx(cy.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));_c.displayName=ly;var Ac=_c;const Ne=l.forwardRef(({className:e,...t},n)=>a.jsx(Ac,{ref:n,className:F("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));Ne.displayName=Ac.displayName;function Ic(e){const t=uy(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(fy);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function uy(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=my(o),c=py(s,o.props);return o.type!==l.Fragment&&(c.ref=r?ue(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dy=Symbol("radix.slottable");function fy(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dy}function py(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function my(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fn=hy.reduce((e,t)=>{const n=Ic(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),sr="Dialog",[$c]=Ge(sr),[gy,Oe]=$c(sr),Fc=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,c=l.useRef(null),u=l.useRef(null),[d,p]=et({prop:r,defaultProp:o??!1,onChange:s,caller:sr});return a.jsx(gy,{scope:t,triggerRef:c,contentRef:u,contentId:je(),titleId:je(),descriptionId:je(),open:d,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(f=>!f),[p]),modal:i,children:n})};Fc.displayName=sr;var Lc="DialogTrigger",xy=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Lc,n),s=oe(t,o.triggerRef);return a.jsx(fn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":So(o.open),...r,ref:s,onClick:z(e.onClick,o.onOpenToggle)})});xy.displayName=Lc;var wo="DialogPortal",[vy,Wc]=$c(wo,{forceMount:void 0}),Vc=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Oe(wo,t);return a.jsx(vy,{scope:t,forceMount:n,children:l.Children.map(r,i=>a.jsx(ke,{present:n||s.open,children:a.jsx(rn,{asChild:!0,container:o,children:i})}))})};Vc.displayName=wo;var On="DialogOverlay",Hc=l.forwardRef((e,t)=>{const n=Wc(On,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Oe(On,e.__scopeDialog);return s.modal?a.jsx(ke,{present:r||s.open,children:a.jsx(by,{...o,ref:t})}):null});Hc.displayName=On;var yy=Ic("DialogOverlay.RemoveScroll"),by=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(On,n);return a.jsx(an,{as:yy,allowPinchZoom:!0,shards:[o.contentRef],children:a.jsx(fn.div,{"data-state":So(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),xt="DialogContent",Bc=l.forwardRef((e,t)=>{const n=Wc(xt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Oe(xt,e.__scopeDialog);return a.jsx(ke,{present:r||s.open,children:s.modal?a.jsx(wy,{...o,ref:t}):a.jsx(Cy,{...o,ref:t})})});Bc.displayName=xt;var wy=l.forwardRef((e,t)=>{const n=Oe(xt,e.__scopeDialog),r=l.useRef(null),o=oe(t,n.contentRef,r);return l.useEffect(()=>{const s=r.current;if(s)return Kn(s)},[]),a.jsx(zc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&s.preventDefault()}),onFocusOutside:z(e.onFocusOutside,s=>s.preventDefault())})}),Cy=l.forwardRef((e,t)=>{const n=Oe(xt,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return a.jsx(zc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),zc=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,c=Oe(xt,n),u=l.useRef(null),d=oe(t,u);return Vn(),a.jsxs(a.Fragment,{children:[a.jsx(tn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:a.jsx(en,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":So(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(Sy,{titleId:c.titleId}),a.jsx(Ey,{contentRef:u,descriptionId:c.descriptionId})]})]})}),Co="DialogTitle",Yc=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Co,n);return a.jsx(fn.h2,{id:o.titleId,...r,ref:t})});Yc.displayName=Co;var Gc="DialogDescription",Uc=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Gc,n);return a.jsx(fn.p,{id:o.descriptionId,...r,ref:t})});Uc.displayName=Gc;var Kc="DialogClose",qc=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Kc,n);return a.jsx(fn.button,{type:"button",...r,ref:t,onClick:z(e.onClick,()=>o.onOpenChange(!1))})});qc.displayName=Kc;function So(e){return e?"open":"closed"}var Xc="DialogTitleWarning",[Ay,Jc]=eu(Xc,{contentName:xt,titleName:Co,docsSlug:"dialog"}),Sy=({titleId:e})=>{const t=Jc(Xc),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
46
|
+
`)},Oh=0,Ct=[];function _h(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(Oh++)[0],s=l.useState(Qa)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=th([e.lockRef.current],(e.shards||[]).map(Cs),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=l.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var v=Cn(m),w=n.current,C="deltaX"in m?m.deltaX:w[0]-v[0],S="deltaY"in m?m.deltaY:w[1]-v[1],T,I=m.target,O=Math.abs(C)>Math.abs(S)?"h":"v";if("touches"in m&&O==="h"&&I.type==="range")return!1;var b=ws(O,I);if(!b)return!0;if(b?T=O:(T=O==="v"?"h":"v",b=ws(O,I)),!b)return!1;if(!r.current&&"changedTouches"in m&&(C||S)&&(r.current=T),!T)return!0;var j=r.current||T;return kh(j,x,m,j==="h"?C:S)},[]),u=l.useCallback(function(m){var x=m;if(!(!Ct.length||Ct[Ct.length-1]!==s)){var v="deltaY"in x?Ss(x):Cn(x),w=t.current.filter(function(T){return T.name===x.type&&(T.target===x.target||x.target===T.shadowParent)&&Dh(T.delta,v)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var C=(i.current.shards||[]).map(Cs).filter(Boolean).filter(function(T){return T.contains(x.target)}),S=C.length>0?c(x,C[0]):!i.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),d=l.useCallback(function(m,x,v,w){var C={name:m,delta:x,target:v,should:w,shadowParent:Ah(v)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(S){return S!==C})},1)},[]),p=l.useCallback(function(m){n.current=Cn(m),r.current=void 0},[]),f=l.useCallback(function(m){d(m.type,Ss(m),m.target,c(m,e.lockRef.current))},[]),h=l.useCallback(function(m){d(m.type,Cn(m),m.target,c(m,e.lockRef.current))},[]);l.useEffect(function(){return Ct.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,St),document.addEventListener("touchmove",u,St),document.addEventListener("touchstart",p,St),function(){Ct=Ct.filter(function(m){return m!==s}),document.removeEventListener("wheel",u,St),document.removeEventListener("touchmove",u,St),document.removeEventListener("touchstart",p,St)}},[]);var g=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(s,{styles:Th(o)}):null,g?l.createElement(Ch,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ah(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ih=uh(Za,_h);var an=l.forwardRef(function(e,t){return l.createElement(er,Ae({},e,{ref:t,sideCar:Ih}))});an.classNames=er.classNames;var Lr=["Enter"," "],$h=["ArrowDown","PageUp","Home"],ri=["ArrowUp","PageDown","End"],Fh=[...$h,...ri],Lh={ltr:[...Lr,"ArrowRight"],rtl:[...Lr,"ArrowLeft"]},Wh={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cn="Menu",[qt,Vh,Bh]=eo(cn),[yt,oi]=Ue(cn,[Bh,At,Ha]),ln=At(),si=Ha(),[ai,rt]=yt(cn),[zh,un]=yt(cn),ii=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,c=ln(t),[u,d]=l.useState(null),p=l.useRef(!1),f=ke(s),h=to(o);return l.useEffect(()=>{const g=()=>{p.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>p.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),a.jsx(Jn,{...c,children:a.jsx(ai,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:d,children:a.jsx(zh,{scope:t,onClose:l.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:h,modal:i,children:r})})})};ii.displayName=cn;var Hh="MenuAnchor",po=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ln(n);return a.jsx(Zn,{...o,...r,ref:t})});po.displayName=Hh;var mo="MenuPortal",[Yh,ci]=yt(mo,{forceMount:void 0}),li=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=rt(mo,t);return a.jsx(Yh,{scope:t,forceMount:n,children:a.jsx(Oe,{present:n||s.open,children:a.jsx(rn,{asChild:!0,container:o,children:r})})})};li.displayName=mo;var Re="MenuContent",[Gh,ho]=yt(Re),ui=l.forwardRef((e,t)=>{const n=ci(Re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=rt(Re,e.__scopeMenu),i=un(Re,e.__scopeMenu);return a.jsx(qt.Provider,{scope:e.__scopeMenu,children:a.jsx(Oe,{present:r||s.open,children:a.jsx(qt.Slot,{scope:e.__scopeMenu,children:i.modal?a.jsx(Uh,{...o,ref:t}):a.jsx(Kh,{...o,ref:t})})})})}),Uh=l.forwardRef((e,t)=>{const n=rt(Re,e.__scopeMenu),r=l.useRef(null),o=ie(t,r);return l.useEffect(()=>{const s=r.current;if(s)return Qn(s)},[]),a.jsx(go,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:G(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Kh=l.forwardRef((e,t)=>{const n=rt(Re,e.__scopeMenu);return a.jsx(go,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),qh=Va("MenuContent.ScrollLock"),go=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:g,disableOutsideScroll:y,...m}=e,x=rt(Re,n),v=un(Re,n),w=ln(n),C=si(n),S=Vh(n),[T,I]=l.useState(null),O=l.useRef(null),b=ie(t,O,x.onContentChange),j=l.useRef(0),E=l.useRef(""),k=l.useRef(0),P=l.useRef(null),L=l.useRef("right"),N=l.useRef(0),W=y?an:l.Fragment,_=y?{as:qh,allowPinchZoom:!0}:void 0,F=$=>{const re=E.current+$,D=S().filter(A=>!A.disabled),z=document.activeElement,K=D.find(A=>A.ref.current===z)?.textValue,X=D.map(A=>A.textValue),le=ig(X,re,K),ue=D.find(A=>A.textValue===le)?.ref.current;(function A(Q){E.current=Q,window.clearTimeout(j.current),Q!==""&&(j.current=window.setTimeout(()=>A(""),1e3))})(re),ue&&setTimeout(()=>ue.focus())};l.useEffect(()=>()=>window.clearTimeout(j.current),[]),Gn();const M=l.useCallback($=>L.current===P.current?.side&&lg($,P.current?.area),[]);return a.jsx(Gh,{scope:n,searchRef:E,onItemEnter:l.useCallback($=>{M($)&&$.preventDefault()},[M]),onItemLeave:l.useCallback($=>{M($)||(O.current?.focus(),I(null))},[M]),onTriggerLeave:l.useCallback($=>{M($)&&$.preventDefault()},[M]),pointerGraceTimerRef:k,onPointerGraceIntentChange:l.useCallback($=>{P.current=$},[]),children:a.jsx(W,{..._,children:a.jsx(tn,{asChild:!0,trapped:o,onMountAutoFocus:G(s,$=>{$.preventDefault(),O.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(en,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:g,children:a.jsx(Xm,{asChild:!0,...C,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:I,onEntryFocus:G(u,$=>{v.isUsingKeyboardRef.current||$.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(uo,{role:"menu","aria-orientation":"vertical","data-state":Ri(x.open),"data-radix-menu-content":"",dir:v.dir,...w,...m,ref:b,style:{outline:"none",...m.style},onKeyDown:G(m.onKeyDown,$=>{const D=$.target.closest("[data-radix-menu-content]")===$.currentTarget,z=$.ctrlKey||$.altKey||$.metaKey,K=$.key.length===1;D&&($.key==="Tab"&&$.preventDefault(),!z&&K&&F($.key));const X=O.current;if($.target!==X||!Fh.includes($.key))return;$.preventDefault();const ue=S().filter(A=>!A.disabled).map(A=>A.ref.current);ri.includes($.key)&&ue.reverse(),sg(ue)}),onBlur:G(e.onBlur,$=>{$.currentTarget.contains($.target)||(window.clearTimeout(j.current),E.current="")}),onPointerMove:G(e.onPointerMove,Xt($=>{const re=$.target,D=N.current!==$.clientX;if($.currentTarget.contains(re)&&D){const z=$.clientX>N.current?"right":"left";L.current=z,N.current=$.clientX}}))})})})})})})});ui.displayName=Re;var Xh="MenuGroup",xo=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(on.div,{role:"group",...r,ref:t})});xo.displayName=Xh;var Jh="MenuLabel",di=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(on.div,{...r,ref:t})});di.displayName=Jh;var On="MenuItem",Ns="menu.itemSelect",tr=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=l.useRef(null),i=un(On,e.__scopeMenu),c=ho(On,e.__scopeMenu),u=ie(t,s),d=l.useRef(!1),p=()=>{const f=s.current;if(!n&&f){const h=new CustomEvent(Ns,{bubbles:!0,cancelable:!0});f.addEventListener(Ns,g=>r?.(g),{once:!0}),Tm(f,h),h.defaultPrevented?d.current=!1:i.onClose()}};return a.jsx(fi,{...o,ref:u,disabled:n,onClick:G(e.onClick,p),onPointerDown:f=>{e.onPointerDown?.(f),d.current=!0},onPointerUp:G(e.onPointerUp,f=>{d.current||f.currentTarget?.click()}),onKeyDown:G(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||Lr.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});tr.displayName=On;var fi=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=ho(On,n),c=si(n),u=l.useRef(null),d=ie(t,u),[p,f]=l.useState(!1),[h,g]=l.useState("");return l.useEffect(()=>{const y=u.current;y&&g((y.textContent??"").trim())},[s.children]),a.jsx(qt.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:a.jsx(Jm,{asChild:!0,...c,focusable:!r,children:a.jsx(on.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:d,onPointerMove:G(e.onPointerMove,Xt(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:G(e.onPointerLeave,Xt(y=>i.onItemLeave(y))),onFocus:G(e.onFocus,()=>f(!0)),onBlur:G(e.onBlur,()=>f(!1))})})})}),Zh="MenuCheckboxItem",pi=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return a.jsx(yi,{scope:e.__scopeMenu,checked:n,children:a.jsx(tr,{role:"menuitemcheckbox","aria-checked":_n(n)?"mixed":n,...o,ref:t,"data-state":bo(n),onSelect:G(o.onSelect,()=>r?.(_n(n)?!0:!n),{checkForDefaultPrevented:!1})})})});pi.displayName=Zh;var mi="MenuRadioGroup",[Qh,eg]=yt(mi,{value:void 0,onValueChange:()=>{}}),hi=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=ke(r);return a.jsx(Qh,{scope:e.__scopeMenu,value:n,onValueChange:s,children:a.jsx(xo,{...o,ref:t})})});hi.displayName=mi;var gi="MenuRadioItem",xi=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=eg(gi,e.__scopeMenu),s=n===o.value;return a.jsx(yi,{scope:e.__scopeMenu,checked:s,children:a.jsx(tr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":bo(s),onSelect:G(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});xi.displayName=gi;var yo="MenuItemIndicator",[yi,tg]=yt(yo,{checked:!1}),vi=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=tg(yo,n);return a.jsx(Oe,{present:r||_n(s.checked)||s.checked===!0,children:a.jsx(on.span,{...o,ref:t,"data-state":bo(s.checked)})})});vi.displayName=yo;var ng="MenuSeparator",bi=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(on.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});bi.displayName=ng;var rg="MenuArrow",wi=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ln(n);return a.jsx(fo,{...o,...r,ref:t})});wi.displayName=rg;var vo="MenuSub",[og,Si]=yt(vo),Ci=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=rt(vo,t),i=ln(t),[c,u]=l.useState(null),[d,p]=l.useState(null),f=ke(o);return l.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),a.jsx(Jn,{...i,children:a.jsx(ai,{scope:t,open:r,onOpenChange:f,content:d,onContentChange:p,children:a.jsx(og,{scope:t,contentId:je(),triggerId:je(),trigger:c,onTriggerChange:u,children:n})})})};Ci.displayName=vo;var Ht="MenuSubTrigger",Ni=l.forwardRef((e,t)=>{const n=rt(Ht,e.__scopeMenu),r=un(Ht,e.__scopeMenu),o=Si(Ht,e.__scopeMenu),s=ho(Ht,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},p=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>p,[p]),l.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),u(null)}},[c,u]),a.jsx(po,{asChild:!0,...d,children:a.jsx(fi,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ri(n.open),...e,ref:fe(t,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:G(e.onPointerMove,Xt(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:G(e.onPointerLeave,Xt(f=>{p();const h=n.content?.getBoundingClientRect();if(h){const g=n.content?.dataset.side,y=g==="right",m=y?-5:5,x=h[y?"left":"right"],v=h[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x,y:h.top},{x:v,y:h.top},{x:v,y:h.bottom},{x,y:h.bottom}],side:g}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:G(e.onKeyDown,f=>{const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||Lh[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});Ni.displayName=Ht;var Ei="MenuSubContent",ji=l.forwardRef((e,t)=>{const n=ci(Re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=rt(Re,e.__scopeMenu),i=un(Re,e.__scopeMenu),c=Si(Ei,e.__scopeMenu),u=l.useRef(null),d=ie(t,u);return a.jsx(qt.Provider,{scope:e.__scopeMenu,children:a.jsx(Oe,{present:r||s.open,children:a.jsx(qt.Slot,{scope:e.__scopeMenu,children:a.jsx(go,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{i.isUsingKeyboardRef.current&&u.current?.focus(),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:G(e.onFocusOutside,p=>{p.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:G(e.onEscapeKeyDown,p=>{i.onClose(),p.preventDefault()}),onKeyDown:G(e.onKeyDown,p=>{const f=p.currentTarget.contains(p.target),h=Wh[i.dir].includes(p.key);f&&h&&(s.onOpenChange(!1),c.trigger?.focus(),p.preventDefault())})})})})})});ji.displayName=Ei;function Ri(e){return e?"open":"closed"}function _n(e){return e==="indeterminate"}function bo(e){return _n(e)?"indeterminate":e?"checked":"unchecked"}function sg(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ag(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ig(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=ag(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function cg(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s],u=t[i],d=c.x,p=c.y,f=u.x,h=u.y;p>r!=h>r&&n<(f-d)*(r-p)/(h-p)+d&&(o=!o)}return o}function lg(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return cg(n,t)}function Xt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ug=ii,dg=po,fg=li,pg=ui,mg=xo,hg=di,gg=tr,xg=pi,yg=hi,vg=xi,bg=vi,wg=bi,Sg=wi,Cg=Ci,Ng=Ni,Eg=ji,nr="DropdownMenu",[jg]=Ue(nr,[oi]),he=oi(),[Rg,Pi]=jg(nr),Mi=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:c=!0}=e,u=he(t),d=l.useRef(null),[p,f]=et({prop:o,defaultProp:s??!1,onChange:i,caller:nr});return a.jsx(Rg,{scope:t,triggerId:je(),triggerRef:d,contentId:je(),open:p,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(h=>!h),[f]),modal:c,children:a.jsx(ug,{...u,open:p,onOpenChange:f,dir:r,modal:c,children:n})})};Mi.displayName=nr;var ki="DropdownMenuTrigger",Di=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Pi(ki,n),i=he(n);return a.jsx(dg,{asChild:!0,...i,children:a.jsx(Jd.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:fe(t,s.triggerRef),onPointerDown:G(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:G(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Di.displayName=ki;var Pg="DropdownMenuPortal",Ti=e=>{const{__scopeDropdownMenu:t,...n}=e,r=he(t);return a.jsx(fg,{...r,...n})};Ti.displayName=Pg;var Oi="DropdownMenuContent",_i=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pi(Oi,n),s=he(n),i=l.useRef(!1);return a.jsx(pg,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:G(e.onCloseAutoFocus,c=>{i.current||o.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:G(e.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,p=u.button===2||d;(!o.modal||p)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});_i.displayName=Oi;var Mg="DropdownMenuGroup",Ai=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=he(n);return a.jsx(mg,{...o,...r,ref:t})});Ai.displayName=Mg;var kg="DropdownMenuLabel",Ii=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=he(n);return a.jsx(hg,{...o,...r,ref:t})});Ii.displayName=kg;var Dg="DropdownMenuItem",$i=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=he(n);return a.jsx(gg,{...o,...r,ref:t})});$i.displayName=Dg;var Tg="DropdownMenuCheckboxItem",Fi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=he(n);return a.jsx(xg,{...o,...r,ref:t})});Fi.displayName=Tg;var Og="DropdownMenuRadioGroup",Li=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=he(n);return a.jsx(yg,{...o,...r,ref:t})});Li.displayName=Og;var _g="DropdownMenuRadioItem",Wi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=he(n);return a.jsx(vg,{...o,...r,ref:t})});Wi.displayName=_g;var Ag="DropdownMenuItemIndicator",Vi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=he(n);return a.jsx(bg,{...o,...r,ref:t})});Vi.displayName=Ag;var Ig="DropdownMenuSeparator",Bi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=he(n);return a.jsx(wg,{...o,...r,ref:t})});Bi.displayName=Ig;var $g="DropdownMenuArrow",Fg=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=he(n);return a.jsx(Sg,{...o,...r,ref:t})});Fg.displayName=$g;var Lg=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,i=he(t),[c,u]=et({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return a.jsx(Cg,{...i,open:c,onOpenChange:u,children:n})},Wg="DropdownMenuSubTrigger",zi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=he(n);return a.jsx(Ng,{...o,...r,ref:t})});zi.displayName=Wg;var Vg="DropdownMenuSubContent",Hi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=he(n);return a.jsx(Eg,{...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)"}})});Hi.displayName=Vg;var Bg=Mi,zg=Di,Yi=Ti,Hg=_i,Yg=Ai,Gg=Ii,Ug=$i,Kg=Fi,qg=Li,Xg=Wi,Gi=Vi,Jg=Bi,Zg=Lg,Qg=zi,ex=Hi;function tx({...e}){return a.jsx(Bg,{"data-slot":"dropdown-menu",...e})}function nx({...e}){return a.jsx(Yi,{"data-slot":"dropdown-menu-portal",...e})}function rx({...e}){return a.jsx(zg,{"data-slot":"dropdown-menu-trigger",suppressHydrationWarning:!0,...e})}function ox({className:e,sideOffset:t=4,...n}){return a.jsx(Yi,{children:a.jsx(Hg,{"data-slot":"dropdown-menu-content",sideOffset:t,className:V("bg-white text-gray-900 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 p-2 shadow-lg",e),...n})})}function sx({...e}){return a.jsx(Yg,{"data-slot":"dropdown-menu-group",...e})}function ax({className:e,inset:t,variant:n="default",...r}){return a.jsx(Ug,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:V("focus:bg-gray-100 focus:text-gray-900 data-[variant=destructive]:text-red-600 data-[variant=destructive]:focus:bg-red-50 data-[variant=destructive]:focus:text-red-700 [&_svg:not([class*='text-'])]:text-gray-500 relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function ix({className:e,children:t,checked:n,...r}){return a.jsxs(Kg,{"data-slot":"dropdown-menu-checkbox-item",className:V("focus:bg-gray-100 focus:text-gray-900 relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[a.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a.jsx(Gi,{children:a.jsx(Jr,{className:"size-4 text-blue-600"})})}),t]})}function cx({...e}){return a.jsx(qg,{"data-slot":"dropdown-menu-radio-group",...e})}function lx({className:e,children:t,...n}){return a.jsxs(Xg,{"data-slot":"dropdown-menu-radio-item",className:V("focus:bg-gray-100 focus:text-gray-900 relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[a.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a.jsx(Gi,{children:a.jsx(zu,{className:"size-2 fill-blue-600"})})}),t]})}function ux({className:e,inset:t,...n}){return a.jsx(Gg,{"data-slot":"dropdown-menu-label","data-inset":t,className:V("px-2 py-1.5 text-sm font-semibold text-gray-900 data-[inset]:pl-8",e),...n})}function dx({className:e,...t}){return a.jsx(Jg,{"data-slot":"dropdown-menu-separator",className:V("bg-gray-100 my-1 h-px",e),...t})}function fx({className:e,...t}){return a.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:V("text-gray-500 ml-auto text-xs tracking-widest",e),...t})}function px({...e}){return a.jsx(Zg,{"data-slot":"dropdown-menu-sub",...e})}function mx({className:e,inset:t,children:n,...r}){return a.jsxs(Qg,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:V("focus:bg-gray-100 focus:text-gray-900 data-[state=open]:bg-gray-100 data-[state=open]:text-gray-900 [&_svg:not([class*='text-'])]:text-gray-500 flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none transition-colors data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,a.jsx(Ee,{className:"ml-auto size-4"})]})}function hx({className:e,...t}){return a.jsx(ex,{"data-slot":"dropdown-menu-sub-content",className:V("bg-white text-gray-900 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border border-gray-200 p-2 shadow-lg",e),...t})}function gx({data:e=[],columns:t,searchPlaceholder:n="Search...",onRowClick:r,className:o="",showPagination:s=!0,showSearch:i=!0,pageSize:c=10,renderToolbar:u,variant:d="default"}){const[p,f]=J.useState(1),[h]=J.useState(c),[g,y]=J.useState(""),[m,x]=J.useState(null),[v,w]=J.useState("asc"),C=J.useMemo(()=>{if(!i||!g.trim())return e;const b=g.toLowerCase();return e.filter(j=>t.some(E=>(E.accessor?E.accessor(j):j[E.key])?.toString().toLowerCase().includes(b)))},[e,g,i,t]),S=J.useMemo(()=>m?[...C].sort((b,j)=>{const E=t.find(N=>N.key===m);if(!E)return 0;const k=E.accessor?E.accessor(b):b[E.key],P=E.accessor?E.accessor(j):j[E.key];if(k===P)return 0;if(k==null)return 1;if(P==null)return-1;const L=k<P?-1:1;return v==="asc"?L:-L}):C,[C,m,v,t]),T=J.useMemo(()=>{if(!s)return S;const b=(p-1)*h;return S.slice(b,b+h)},[S,p,h,s]);J.useEffect(()=>f(1),[g]);const I=b=>{m===b?w(v==="asc"?"desc":"asc"):(x(b),w("asc"))},O=(b,j,E)=>{const k=j.accessor?j.accessor(b):b[j.key];return j.cell?j.cell(k,b,E):k};return a.jsxs("div",{className:V("w-full space-y-4",o),children:[(i||u)&&a.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[i&&a.jsxs("div",{className:"relative w-full sm:w-auto",children:[a.jsx(Ku,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),a.jsx(ze,{placeholder:n,value:g,onChange:b=>y(b.target.value),className:"pl-10 w-full sm:w-[300px] bg-gray-50 border-gray-300"})]}),u&&a.jsx("div",{className:"w-full sm:w-auto",children:u()})]}),a.jsx("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs(Bn,{variant:d,children:[a.jsx(zn,{children:a.jsx($e,{children:t.map(b=>a.jsx(Yn,{className:"h-10 px-0 py-0",style:{width:b.width},children:b.align==="center"||!b.align&&typeof b.header!="string"?a.jsx("div",{className:"h-10 flex items-center justify-center",children:typeof b.header!="string"?b.header:a.jsx("span",{className:"text-xs font-normal text-gray-500 uppercase tracking-widest",children:b.header})}):a.jsx("div",{className:"h-10 flex items-center text-xs font-normal text-gray-500 uppercase tracking-widest",children:typeof b.header!="string"?a.jsx("div",{children:b.header}):b.sortable!==!1?a.jsxs(q,{variant:"ghost",className:"h-auto px-3 py-1.5 font-normal hover:bg-transparent hover:text-gray-900",onClick:()=>I(b.key),children:[b.header,m===b.key&&v==="desc"?a.jsx(Qt,{className:"h-4 w-4"}):m===b.key&&v==="asc"?a.jsx(Wn,{className:"h-4 w-4"}):a.jsx(Zr,{className:"h-4 w-4"})]}):a.jsx("span",{className:"px-3",children:b.header})})},b.key))})}),a.jsx(Hn,{children:T.length===0?a.jsx($e,{children:a.jsx(pt,{colSpan:t.length,className:"text-center py-8 text-gray-500",children:"No results found."})}):T.map((b,j)=>a.jsx($e,{className:"hover:bg-gray-50 cursor-pointer",onClick:()=>r?.(b),children:t.map(E=>{const k=E.align==="center"||!E.align&&typeof E.header!="string";return a.jsx(pt,{className:k?"px-0 py-4":"px-3 py-4",style:{width:E.width},children:k?a.jsx("div",{className:"flex items-center justify-center h-full",children:O(b,E,j)}):O(b,E,j)},E.key)})},j))})]})})}),s&&a.jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[a.jsxs("div",{className:"text-sm text-gray-600",children:["Showing ",T.length," of ",S.length," row(s)"]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("span",{className:"text-sm text-gray-700",children:["Page ",p," of ",Math.ceil(S.length/h)]}),a.jsxs("div",{className:"flex gap-1",children:[a.jsx(q,{variant:"outline",size:"sm",onClick:()=>f(b=>Math.max(1,b-1)),disabled:p===1,className:"h-8 w-8 p-0",children:a.jsx(Le,{className:"h-4 w-4"})}),a.jsx(q,{variant:"outline",size:"sm",onClick:()=>f(b=>Math.min(Math.ceil(S.length/h),b+1)),disabled:p===Math.ceil(S.length/h),className:"h-8 w-8 p-0",children:a.jsx(Ee,{className:"h-4 w-4"})})]})]})]})]})}const Ui=J.createContext(null);function It(){const e=J.useContext(Ui);if(!e)throw new Error("useDataGrid must be used within DataGrid");return e}function xx({columns:e,data:t,getRowId:n=i=>i.id||String(Math.random()),onRowClick:r,children:o,recordCount:s}){const[i,c]=J.useState({pageIndex:0,pageSize:5}),[u,d]=J.useState([]),[p,f]=J.useState(new Set),h=J.useMemo(()=>u.length===0?t:[...t].sort((k,P)=>{for(const L of u){const N=e.find(M=>M.id===L.id);if(!N?.accessorKey)continue;const W=k[N.accessorKey],_=P[N.accessorKey];if(W===_)continue;const F=W<_?-1:1;return L.desc?-F:F}return 0}),[t,u,e]),g=J.useMemo(()=>{const E=i.pageIndex*i.pageSize,k=E+i.pageSize;return h.slice(E,k)},[h,i]),y=Math.ceil(h.length/i.pageSize),m=y,x=i.pageIndex>0,v=i.pageIndex<y-1,w=()=>c(E=>({...E,pageIndex:E.pageIndex-1})),C=()=>{c(E=>({...E,pageIndex:Math.min(E.pageIndex+1,m-1)}))},S=E=>{c(()=>({pageIndex:0,pageSize:E}))},T=E=>{c(k=>({...k,pageIndex:Math.max(0,Math.min(E,m-1))}))},I=E=>{f(k=>{const P=new Set(k);return P.has(E)?P.delete(E):P.add(E),P})},O=()=>{p.size===g.length?f(new Set):f(new Set(g.map(E=>n(E))))},b=g.length>0&&p.size===g.length,j={columns:e,data:t,getRowId:n,onRowClick:r,pagination:i,setPagination:c,canPreviousPage:x,canNextPage:v,previousPage:w,nextPage:C,setPageSize:S,goToPage:T,pageCount:m,sorting:u,setSorting:d,selectedRows:p,toggleRow:I,toggleAllRows:O,isAllRowsSelected:b,paginatedData:g,sortedData:h,totalPages:y,recordCount:s??t.length};return a.jsx(Ui.Provider,{value:j,children:o})}function yx(){const{columns:e,paginatedData:t,getRowId:n,onRowClick:r}=It();return a.jsx("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs(Bn,{children:[a.jsx(zn,{children:a.jsx($e,{children:e.map(o=>a.jsx(Yn,{className:"h-10 px-0 py-0",style:{width:o.size?`${o.size}px`:void 0},children:o.align==="center"?a.jsx("div",{className:"h-10 flex items-center justify-center",children:typeof o.header!="string"?o.header:a.jsx("span",{className:"text-xs font-normal text-gray-500 uppercase tracking-widest",children:o.header})}):a.jsx("div",{className:"h-10 flex items-center text-xs font-normal text-gray-500 uppercase tracking-widest",children:typeof o.header!="string"?a.jsx("div",{children:o.header}):a.jsx("span",{className:"px-3",children:o.header})})},o.id))})}),a.jsx(Hn,{children:t.length===0?a.jsx($e,{children:a.jsx(pt,{colSpan:e.length,className:"text-center py-8 text-gray-500",children:"No results found."})}):t.map((o,s)=>a.jsx($e,{className:"hover:bg-gray-50 cursor-pointer",onClick:()=>r?.(o),children:e.map(i=>{const c=i.align==="center",u=i.cell?i.cell(o,s):i.accessorKey?o[i.accessorKey]:null;return a.jsx(pt,{className:c?"px-0 py-4":"px-3 py-4",style:{width:i.size?`${i.size}px`:void 0},children:c?a.jsx("div",{className:"flex items-center justify-center h-full",children:u}):u},i.id)})},n(o)))})]})})})}function Es(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ki(e){const t=vx(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(wx);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function vx(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=Cx(o),c=Sx(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bx=Symbol("radix.slottable");function wx(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bx}function Sx(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Cx(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Nx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ce=Nx.reduce((e,t)=>{const n=Ki(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ex(e){const t=jx(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Px);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function jx(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=kx(o),c=Mx(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Rx=Symbol("radix.slottable");function Px(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rx}function Mx(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function kx(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Dx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Tx=Dx.reduce((e,t)=>{const n=Ex(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),qi=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ox="VisuallyHidden",_x=l.forwardRef((e,t)=>a.jsx(Tx.span,{...e,ref:t,style:{...qi,...e.style}}));_x.displayName=Ox;var Ax=[" ","Enter","ArrowUp","ArrowDown"],Ix=[" ","Enter"],ht="Select",[rr,or,$x]=eo(ht),[$t]=Ue(ht,[$x,At]),sr=At(),[Fx,ot]=$t(ht),[Lx,Wx]=$t(ht),Xi=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:c,onValueChange:u,dir:d,name:p,autoComplete:f,disabled:h,required:g,form:y}=e,m=sr(t),[x,v]=l.useState(null),[w,C]=l.useState(null),[S,T]=l.useState(!1),I=to(d),[O,b]=et({prop:r,defaultProp:o??!1,onChange:s,caller:ht}),[j,E]=et({prop:i,defaultProp:c,onChange:u,caller:ht}),k=l.useRef(null),P=x?y||!!x.closest("form"):!0,[L,N]=l.useState(new Set),W=Array.from(L).map(_=>_.props.value).join(";");return a.jsx(Jn,{...m,children:a.jsxs(Fx,{required:g,scope:t,trigger:x,onTriggerChange:v,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:S,onValueNodeHasChildrenChange:T,contentId:je(),value:j,onValueChange:E,open:O,onOpenChange:b,dir:I,triggerPointerDownPosRef:k,disabled:h,children:[a.jsx(rr.Provider,{scope:t,children:a.jsx(Lx,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(_=>{N(F=>new Set(F).add(_))},[]),onNativeOptionRemove:l.useCallback(_=>{N(F=>{const M=new Set(F);return M.delete(_),M})},[]),children:n})}),P?a.jsxs(wc,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:f,value:j,onChange:_=>E(_.target.value),disabled:h,form:y,children:[j===void 0?a.jsx("option",{value:""}):null,Array.from(L)]},W):null]})})};Xi.displayName=ht;var Ji="SelectTrigger",Zi=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=sr(n),i=ot(Ji,n),c=i.disabled||r,u=ie(t,i.onTriggerChange),d=or(n),p=l.useRef("touch"),[f,h,g]=Cc(m=>{const x=d().filter(C=>!C.disabled),v=x.find(C=>C.value===i.value),w=Nc(x,m,v);w!==void 0&&i.onValueChange(w.value)}),y=m=>{c||(i.onOpenChange(!0),g()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return a.jsx(Zn,{asChild:!0,...s,children:a.jsx(Ce.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Sc(i.value)?"":void 0,...o,ref:u,onClick:G(o.onClick,m=>{m.currentTarget.focus(),p.current!=="mouse"&&y(m)}),onPointerDown:G(o.onPointerDown,m=>{p.current=m.pointerType;const x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(y(m),m.preventDefault())}),onKeyDown:G(o.onKeyDown,m=>{const x=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(x&&m.key===" ")&&Ax.includes(m.key)&&(y(),m.preventDefault())})})})});Zi.displayName=Ji;var Qi="SelectValue",ec=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...c}=e,u=ot(Qi,n),{onValueNodeHasChildrenChange:d}=u,p=s!==void 0,f=ie(t,u.onValueNodeChange);return me(()=>{d(p)},[d,p]),a.jsx(Ce.span,{...c,ref:f,style:{pointerEvents:"none"},children:Sc(u.value)?a.jsx(a.Fragment,{children:i}):s})});ec.displayName=Qi;var Vx="SelectIcon",tc=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return a.jsx(Ce.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});tc.displayName=Vx;var Bx="SelectPortal",nc=e=>a.jsx(rn,{asChild:!0,...e});nc.displayName=Bx;var gt="SelectContent",rc=l.forwardRef((e,t)=>{const n=ot(gt,e.__scopeSelect),[r,o]=l.useState();if(me(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Zt.createPortal(a.jsx(oc,{scope:e.__scopeSelect,children:a.jsx(rr.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),s):null}return a.jsx(sc,{...e,ref:t})});rc.displayName=gt;var Me=10,[oc,st]=$t(gt),zx="SelectContentImpl",Hx=Ki("SelectContent.RemoveScroll"),sc=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:c,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:y,hideWhenDetached:m,avoidCollisions:x,...v}=e,w=ot(gt,n),[C,S]=l.useState(null),[T,I]=l.useState(null),O=ie(t,A=>S(A)),[b,j]=l.useState(null),[E,k]=l.useState(null),P=or(n),[L,N]=l.useState(!1),W=l.useRef(!1);l.useEffect(()=>{if(C)return Qn(C)},[C]),Gn();const _=l.useCallback(A=>{const[Q,...oe]=P().map(R=>R.ref.current),[ee]=oe.slice(-1),te=document.activeElement;for(const R of A)if(R===te||(R?.scrollIntoView({block:"nearest"}),R===Q&&T&&(T.scrollTop=0),R===ee&&T&&(T.scrollTop=T.scrollHeight),R?.focus(),document.activeElement!==te))return},[P,T]),F=l.useCallback(()=>_([b,C]),[_,b,C]);l.useEffect(()=>{L&&F()},[L,F]);const{onOpenChange:M,triggerPointerDownPosRef:$}=w;l.useEffect(()=>{if(C){let A={x:0,y:0};const Q=ee=>{A={x:Math.abs(Math.round(ee.pageX)-($.current?.x??0)),y:Math.abs(Math.round(ee.pageY)-($.current?.y??0))}},oe=ee=>{A.x<=10&&A.y<=10?ee.preventDefault():C.contains(ee.target)||M(!1),document.removeEventListener("pointermove",Q),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",oe,{capture:!0})}}},[C,M,$]),l.useEffect(()=>{const A=()=>M(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[M]);const[re,D]=Cc(A=>{const Q=P().filter(te=>!te.disabled),oe=Q.find(te=>te.ref.current===document.activeElement),ee=Nc(Q,A,oe);ee&&setTimeout(()=>ee.ref.current.focus())}),z=l.useCallback((A,Q,oe)=>{const ee=!W.current&&!oe;(w.value!==void 0&&w.value===Q||ee)&&(j(A),ee&&(W.current=!0))},[w.value]),K=l.useCallback(()=>C?.focus(),[C]),X=l.useCallback((A,Q,oe)=>{const ee=!W.current&&!oe;(w.value!==void 0&&w.value===Q||ee)&&k(A)},[w.value]),le=r==="popper"?Wr:ac,ue=le===Wr?{side:c,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:y,hideWhenDetached:m,avoidCollisions:x}:{};return a.jsx(oc,{scope:n,content:C,viewport:T,onViewportChange:I,itemRefCallback:z,selectedItem:b,onItemLeave:K,itemTextRefCallback:X,focusSelectedItem:F,selectedItemText:E,position:r,isPositioned:L,searchRef:re,children:a.jsx(an,{as:Hx,allowPinchZoom:!0,children:a.jsx(tn,{asChild:!0,trapped:w.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:G(o,A=>{w.trigger?.focus({preventScroll:!0}),A.preventDefault()}),children:a.jsx(en,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:a.jsx(le,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:A=>A.preventDefault(),...v,...ue,onPlaced:()=>N(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:G(v.onKeyDown,A=>{const Q=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!Q&&A.key.length===1&&D(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let ee=P().filter(te=>!te.disabled).map(te=>te.ref.current);if(["ArrowUp","End"].includes(A.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const te=A.target,R=ee.indexOf(te);ee=ee.slice(R+1)}setTimeout(()=>_(ee)),A.preventDefault()}})})})})})})});sc.displayName=zx;var Yx="SelectItemAlignedPosition",ac=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=ot(gt,n),i=st(gt,n),[c,u]=l.useState(null),[d,p]=l.useState(null),f=ie(t,O=>p(O)),h=or(n),g=l.useRef(!1),y=l.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:v,focusSelectedItem:w}=i,C=l.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&d&&m&&x&&v){const O=s.trigger.getBoundingClientRect(),b=d.getBoundingClientRect(),j=s.valueNode.getBoundingClientRect(),E=v.getBoundingClientRect();if(s.dir!=="rtl"){const te=E.left-b.left,R=j.left-te,U=O.left-R,se=O.width+U,Z=Math.max(se,b.width),xe=window.innerWidth-Me,pe=Es(R,[Me,Math.max(Me,xe-Z)]);c.style.minWidth=se+"px",c.style.left=pe+"px"}else{const te=b.right-E.right,R=window.innerWidth-j.right-te,U=window.innerWidth-O.right-R,se=O.width+U,Z=Math.max(se,b.width),xe=window.innerWidth-Me,pe=Es(R,[Me,Math.max(Me,xe-Z)]);c.style.minWidth=se+"px",c.style.right=pe+"px"}const k=h(),P=window.innerHeight-Me*2,L=m.scrollHeight,N=window.getComputedStyle(d),W=parseInt(N.borderTopWidth,10),_=parseInt(N.paddingTop,10),F=parseInt(N.borderBottomWidth,10),M=parseInt(N.paddingBottom,10),$=W+_+L+M+F,re=Math.min(x.offsetHeight*5,$),D=window.getComputedStyle(m),z=parseInt(D.paddingTop,10),K=parseInt(D.paddingBottom,10),X=O.top+O.height/2-Me,le=P-X,ue=x.offsetHeight/2,A=x.offsetTop+ue,Q=W+_+A,oe=$-Q;if(Q<=X){const te=k.length>0&&x===k[k.length-1].ref.current;c.style.bottom="0px";const R=d.clientHeight-m.offsetTop-m.offsetHeight,U=Math.max(le,ue+(te?K:0)+R+F),se=Q+U;c.style.height=se+"px"}else{const te=k.length>0&&x===k[0].ref.current;c.style.top="0px";const U=Math.max(X,W+m.offsetTop+(te?z:0)+ue)+oe;c.style.height=U+"px",m.scrollTop=Q-X+m.offsetTop}c.style.margin=`${Me}px 0`,c.style.minHeight=re+"px",c.style.maxHeight=P+"px",r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,c,d,m,x,v,s.dir,r]);me(()=>C(),[C]);const[S,T]=l.useState();me(()=>{d&&T(window.getComputedStyle(d).zIndex)},[d]);const I=l.useCallback(O=>{O&&y.current===!0&&(C(),w?.(),y.current=!1)},[C,w]);return a.jsx(Ux,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:I,children:a.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:a.jsx(Ce.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ac.displayName=Yx;var Gx="SelectPopperPosition",Wr=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Me,...s}=e,i=sr(n);return a.jsx(uo,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.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)"}})});Wr.displayName=Gx;var[Ux,wo]=$t(gt,{}),Vr="SelectViewport",ic=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=st(Vr,n),i=wo(Vr,n),c=ie(t,s.onViewportChange),u=l.useRef(0);return a.jsxs(a.Fragment,{children:[a.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}),a.jsx(rr.Slot,{scope:n,children:a.jsx(Ce.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:G(o.onScroll,d=>{const p=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h?.current&&f){const g=Math.abs(u.current-p.scrollTop);if(g>0){const y=window.innerHeight-Me*2,m=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),v=Math.max(m,x);if(v<y){const w=v+g,C=Math.min(y,w),S=w-C;f.style.height=C+"px",f.style.bottom==="0px"&&(p.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}u.current=p.scrollTop})})})]})});ic.displayName=Vr;var cc="SelectGroup",[Kx,qx]=$t(cc),lc=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=je();return a.jsx(Kx,{scope:n,id:o,children:a.jsx(Ce.div,{role:"group","aria-labelledby":o,...r,ref:t})})});lc.displayName=cc;var uc="SelectLabel",dc=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=qx(uc,n);return a.jsx(Ce.div,{id:o.id,...r,ref:t})});dc.displayName=uc;var An="SelectItem",[Xx,fc]=$t(An),pc=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,c=ot(An,n),u=st(An,n),d=c.value===r,[p,f]=l.useState(s??""),[h,g]=l.useState(!1),y=ie(t,w=>u.itemRefCallback?.(w,r,o)),m=je(),x=l.useRef("touch"),v=()=>{o||(c.onValueChange(r),c.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 a.jsx(Xx,{scope:n,value:r,disabled:o,textId:m,isSelected:d,onItemTextChange:l.useCallback(w=>{f(C=>C||(w?.textContent??"").trim())},[]),children:a.jsx(rr.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:a.jsx(Ce.div,{role:"option","aria-labelledby":m,"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,...i,ref:y,onFocus:G(i.onFocus,()=>g(!0)),onBlur:G(i.onBlur,()=>g(!1)),onClick:G(i.onClick,()=>{x.current!=="mouse"&&v()}),onPointerUp:G(i.onPointerUp,()=>{x.current==="mouse"&&v()}),onPointerDown:G(i.onPointerDown,w=>{x.current=w.pointerType}),onPointerMove:G(i.onPointerMove,w=>{x.current=w.pointerType,o?u.onItemLeave?.():x.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(i.onPointerLeave,w=>{w.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:G(i.onKeyDown,w=>{u.searchRef?.current!==""&&w.key===" "||(Ix.includes(w.key)&&v(),w.key===" "&&w.preventDefault())})})})})});pc.displayName=An;var Yt="SelectItemText",mc=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=ot(Yt,n),c=st(Yt,n),u=fc(Yt,n),d=Wx(Yt,n),[p,f]=l.useState(null),h=ie(t,v=>f(v),u.onItemTextChange,v=>c.itemTextRefCallback?.(v,u.value,u.disabled)),g=p?.textContent,y=l.useMemo(()=>a.jsx("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=d;return me(()=>(m(y),()=>x(y)),[m,x,y]),a.jsxs(a.Fragment,{children:[a.jsx(Ce.span,{id:u.textId,...s,ref:h}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Zt.createPortal(s.children,i.valueNode):null]})});mc.displayName=Yt;var hc="SelectItemIndicator",gc=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return fc(hc,n).isSelected?a.jsx(Ce.span,{"aria-hidden":!0,...r,ref:t}):null});gc.displayName=hc;var Br="SelectScrollUpButton",xc=l.forwardRef((e,t)=>{const n=st(Br,e.__scopeSelect),r=wo(Br,e.__scopeSelect),[o,s]=l.useState(!1),i=ie(t,r.onScrollButtonChange);return me(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollTop>0;s(d)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?a.jsx(vc,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});xc.displayName=Br;var zr="SelectScrollDownButton",yc=l.forwardRef((e,t)=>{const n=st(zr,e.__scopeSelect),r=wo(zr,e.__scopeSelect),[o,s]=l.useState(!1),i=ie(t,r.onScrollButtonChange);return me(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollHeight-u.clientHeight,p=Math.ceil(u.scrollTop)<d;s(p)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?a.jsx(vc,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});yc.displayName=zr;var vc=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=st("SelectScrollButton",n),i=l.useRef(null),c=or(n),u=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>u(),[u]),me(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),a.jsx(Ce.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:G(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:G(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:G(o.onPointerLeave,()=>{u()})})}),Jx="SelectSeparator",bc=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(Ce.div,{"aria-hidden":!0,...r,ref:t})});bc.displayName=Jx;var Hr="SelectArrow",Zx=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=sr(n),s=ot(Hr,n),i=st(Hr,n);return s.open&&i.position==="popper"?a.jsx(fo,{...o,...r,ref:t}):null});Zx.displayName=Hr;var Qx="SelectBubbleInput",wc=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),s=ie(r,o),i=Hs(t);return l.useEffect(()=>{const c=o.current;if(!c)return;const u=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&p){const f=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(f)}},[i,t]),a.jsx(Ce.select,{...n,style:{...qi,...n.style},ref:s,defaultValue:t})});wc.displayName=Qx;function Sc(e){return e===""||e===void 0}function Cc(e){const t=ke(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(i=>{const c=n.current+i;t(c),(function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(c)},[t]),s=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Nc(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=ey(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function ey(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ty=Xi,Ec=Zi,ny=ec,ry=tc,oy=nc,jc=rc,sy=ic,ay=lc,Rc=dc,Pc=pc,iy=mc,cy=gc,Mc=xc,kc=yc,Dc=bc;const dt=ty,ly=ay,ft=ny,Je=l.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(Ec,{ref:r,"data-takaui":"select-trigger",className:V("flex h-10 w-full items-center justify-between rounded-md border border-gray-300 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-gray-400 focus:outline-none focus:border-gray-500 hover:border-gray-400 disabled:cursor-not-allowed disabled:opacity-50 transition-colors",e),...n,children:[t,a.jsx(ry,{asChild:!0,children:a.jsx(Qt,{className:"h-4 w-4 opacity-50"})})]}));Je.displayName=Ec.displayName;const Tc=l.forwardRef(({className:e,...t},n)=>a.jsx(Mc,{ref:n,className:V("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Wn,{className:"h-4 w-4"})}));Tc.displayName=Mc.displayName;const Oc=l.forwardRef(({className:e,...t},n)=>a.jsx(kc,{ref:n,className:V("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Qt,{className:"h-4 w-4"})}));Oc.displayName=kc.displayName;const Ze=l.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>a.jsx(oy,{children:a.jsxs(jc,{ref:o,"data-takaui":"select-content",className:V("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-200 bg-white text-gray-950 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:[a.jsx(Tc,{}),a.jsx(sy,{className:V("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(Oc,{})]})}));Ze.displayName=jc.displayName;const _c=l.forwardRef(({className:e,...t},n)=>a.jsx(Rc,{ref:n,className:V("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));_c.displayName=Rc.displayName;const He=l.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(Pc,{ref:r,className:V("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(cy,{children:a.jsx(Jr,{className:"h-4 w-4"})})}),a.jsx(iy,{children:t})]}));He.displayName=Pc.displayName;const Ac=l.forwardRef(({className:e,...t},n)=>a.jsx(Dc,{ref:n,className:V("-mx-1 my-1 h-px bg-gray-100",e),...t}));Ac.displayName=Dc.displayName;function uy({mode:e="simple",pageSizeOptions:t=[5,10,15,20]}){const{canPreviousPage:n,canNextPage:r,previousPage:o,nextPage:s,pageCount:i,pagination:c,setPageSize:u,goToPage:d}=It(),p=()=>{const f=c.pageIndex,h=i,g=[];if(h<=7)for(let y=0;y<h;y++)g.push(y);else if(f<=3){for(let y=0;y<=4;y++)g.push(y);g.push("..."),g.push(h-1)}else if(f>=h-4){g.push(0),g.push("...");for(let y=h-5;y<h;y++)g.push(y)}else g.push(0),g.push("..."),g.push(f-1),g.push(f),g.push(f+1),g.push("..."),g.push(h-1);return g};return e==="simple"?a.jsx("div",{className:"flex items-center justify-end px-2 py-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("span",{className:"text-sm text-gray-700 hidden sm:block",children:["Page ",c.pageIndex+1," of ",i]}),a.jsxs("div",{className:"flex gap-1",children:[a.jsx(q,{variant:"outline",size:"sm",onClick:o,disabled:!n,className:"h-8 w-8 p-0",children:a.jsx(Le,{className:"h-4 w-4"})}),a.jsx(q,{variant:"outline",size:"sm",onClick:s,disabled:!r,className:"h-8 w-8 p-0",children:a.jsx(Ee,{className:"h-4 w-4"})})]})]})}):a.jsxs("div",{className:"flex items-center justify-between gap-3 px-2 py-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-sm text-gray-600 hidden sm:inline",children:"Rows per page:"}),a.jsxs(dt,{value:String(c.pageSize),onValueChange:f=>u(Number(f)),children:[a.jsx(Je,{className:"h-8 w-16",children:a.jsx(ft,{})}),a.jsx(Ze,{children:t.map(f=>a.jsx(He,{value:String(f),children:f},f))})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(q,{variant:"outline",size:"sm",onClick:o,disabled:!n,className:"h-8 w-8 p-0",children:a.jsx(Le,{className:"h-4 w-4"})}),a.jsxs("span",{className:"text-sm text-gray-700 sm:hidden px-2",children:[c.pageIndex+1," / ",i]}),a.jsx("div",{className:"hidden sm:flex gap-1",children:p().map((f,h)=>typeof f=="number"?a.jsx(q,{variant:c.pageIndex===f?"default":"outline",size:"sm",onClick:()=>d(f),className:"h-8 w-8 p-0",children:f+1},h):a.jsx("span",{className:"flex h-8 w-8 items-center justify-center text-gray-400",children:f},h))}),a.jsx(q,{variant:"outline",size:"sm",onClick:s,disabled:!r,className:"h-8 w-8 p-0",children:a.jsx(Ee,{className:"h-4 w-4"})})]})]})}function dy({id:e,title:t}){const{sorting:n,setSorting:r}=It(),o=n.find(u=>u.id===e),s=!!o,i=o?.desc??!1,c=()=>{r(u=>{const d=u.find(p=>p.id===e);return d?d.desc?[]:[{id:e,desc:!0}]:[{id:e,desc:!1}]})};return a.jsxs(q,{variant:"ghost",className:"h-auto px-3 py-1.5 font-normal hover:bg-transparent hover:text-gray-900",onClick:c,children:[t,s&&i?a.jsx(Qt,{className:"h-4 w-4"}):s?a.jsx(Wn,{className:"h-4 w-4"}):a.jsx(Zr,{className:"h-4 w-4"})]})}function fy(){const{toggleAllRows:e,isAllRowsSelected:t}=It();return a.jsx(Vn,{checked:t,onCheckedChange:e})}function py({row:e}){const{selectedRows:t,toggleRow:n,getRowId:r}=It(),o=r(e);return a.jsx(Vn,{checked:t.has(o),onCheckedChange:()=>n(o)})}const Ic=l.createContext(null);function $c(){const e=l.useContext(Ic);if(!e)throw new Error("useTableContext must be used within a TableRoot component");return e}function my({table:e,totalRecords:t,children:n}){return a.jsx(Ic.Provider,{value:{tableInstance:e,totalRecords:t},children:n})}function hy({children:e,className:t}){return a.jsx("div",{className:V("rounded-xl border border-gray-200 bg-white overflow-hidden",t),children:e})}function js(e,t){return e?gy(e)?l.createElement(e,t):e:null}function gy(e){return xy(e)||typeof e=="function"||yy(e)}function xy(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function yy(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function vy(){const{tableInstance:e}=$c();return a.jsxs(Bn,{children:[a.jsx(zn,{children:e.getHeaderGroups().map(t=>a.jsx($e,{children:t.headers.map(n=>a.jsx(Yn,{children:n.isPlaceholder?null:js(n.column.columnDef.header,n.getContext())},n.id))},t.id))}),a.jsx(Hn,{children:e.getRowModel().rows?.length?e.getRowModel().rows.map(t=>a.jsx($e,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(n=>a.jsx(pt,{children:js(n.column.columnDef.cell,n.getContext())},n.id))},t.id)):a.jsx($e,{children:a.jsx(pt,{colSpan:e.getAllColumns().length,className:"h-24 text-center",children:"No results."})})})]})}function by({rowsPerPageOptions:e=[5,10,20,30,50],showPageSelector:t=!0,showRecordInfo:n=!0,showControls:r=!0}={}){const{tableInstance:o,totalRecords:s}=$c(),i=o.getState().pagination.pageIndex+1,c=o.getPageCount(),u=o.getState().pagination.pageSize,d=i===1?1:(i-1)*u+1,p=Math.min(i*u,s);return a.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 px-3 py-4",children:[t&&a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("span",{className:"text-sm text-gray-700 font-medium",children:"Items per page:"}),a.jsxs(dt,{value:`${u}`,onValueChange:f=>{o.setPageSize(Number(f))},children:[a.jsx(Je,{className:"h-9 w-[75px]",children:a.jsx(ft,{placeholder:u})}),a.jsx(Ze,{side:"top",children:e.map(f=>a.jsx(He,{value:`${f}`,children:f},f))})]})]}),n&&a.jsx("div",{className:"flex items-center gap-2 text-sm text-gray-700",children:a.jsxs("span",{children:[d,"–",p," of ",s]})}),r&&a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsxs(q,{variant:"outline",size:"sm",onClick:()=>o.setPageIndex(0),disabled:!o.getCanPreviousPage(),className:"h-9 w-9 p-0",children:[a.jsx("span",{className:"sr-only",children:"First page"}),a.jsx(Fu,{className:"h-4 w-4"})]}),a.jsxs(q,{variant:"outline",size:"sm",onClick:()=>o.previousPage(),disabled:!o.getCanPreviousPage(),className:"h-9 w-9 p-0",children:[a.jsx("span",{className:"sr-only",children:"Previous page"}),a.jsx(Le,{className:"h-4 w-4"})]}),a.jsxs("div",{className:"flex items-center justify-center text-sm font-medium min-w-[110px]",children:["Page ",i," of ",c]}),a.jsxs(q,{variant:"outline",size:"sm",onClick:()=>o.nextPage(),disabled:!o.getCanNextPage(),className:"h-9 w-9 p-0",children:[a.jsx("span",{className:"sr-only",children:"Next page"}),a.jsx(Ee,{className:"h-4 w-4"})]}),a.jsxs(q,{variant:"outline",size:"sm",onClick:()=>o.setPageIndex(o.getPageCount()-1),disabled:!o.getCanNextPage(),className:"h-9 w-9 p-0",children:[a.jsx("span",{className:"sr-only",children:"Last page"}),a.jsx(Wu,{className:"h-4 w-4"})]})]})]})}function wy({column:e,title:t,align:n="left",className:r}){const o=e.getCanSort(),s=e.getIsSorted(),i={left:"",center:"text-center",right:"text-right"},c=()=>s==="asc"?a.jsx(Qt,{className:"h-4 w-4"}):s==="desc"?a.jsx(Wn,{className:"h-4 w-4"}):a.jsx(Zr,{className:"h-4 w-4"});return o?a.jsx("div",{className:V(i[n]),children:a.jsxs(q,{variant:"ghost",className:"h-auto px-2 py-1 font-normal hover:bg-transparent hover:text-gray-900",onClick:()=>e.toggleSorting(s==="asc"),children:[t,c()]})}):a.jsx("div",{className:V("px-2 py-1",r),children:t})}const Sy=e=>new Date(e.getFullYear(),e.getMonth(),1),Cy=e=>new Date(e.getFullYear(),e.getMonth()+1,0),Ny=(e,t)=>{const n=[],r=new Date(e);for(;r<=t;)n.push(new Date(r)),r.setDate(r.getDate()+1);return n},Rs=(e,t)=>e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear(),jt=(e,t)=>e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear(),Ps=e=>jt(e,new Date),Ey=e=>{const t=new Date;return t.setDate(t.getDate()+1),jt(e,t)},Ms=(e,t)=>{const n=new Date(e);return n.setMonth(n.getMonth()+t),n},Mr=(e,t)=>{const n=["January","February","March","April","May","June","July","August","September","October","November","December"],r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return t==="MMMM yyyy"?`${n[e.getMonth()]} ${e.getFullYear()}`:t==="MMM d, yyyy"?`${r[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`:t==="d"?e.getDate().toString():e.toLocaleDateString()};function jy({selected:e,onSelect:t,events:n=[],holidays:r=[],className:o,...s}){const[i,c]=l.useState(new Date),[u,d]=l.useState("calendar"),p=Sy(i),f=Cy(i),h=Ny(p,f),g=["January","February","March","April","May","June","July","August","September","October","November","December"],y=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],m=i.getFullYear(),x=Array.from({length:20},(j,E)=>m-10+E),v=()=>{c(Ms(i,-1))},w=()=>{c(Ms(i,1))},C=()=>{const j=new Date(i);j.setFullYear(m-1),c(j)},S=()=>{const j=new Date(i);j.setFullYear(m+1),c(j)},T=j=>{const E=new Date(i);E.setMonth(j),c(E),d("calendar")},I=j=>{const E=new Date(i);E.setFullYear(j),c(E),d("calendar")},O=j=>n.filter(E=>jt(E.date,j)),b=j=>r.some(E=>jt(E.date,j));return u==="months"?a.jsxs("div",{className:V("bg-white rounded-lg border border-gray-200 w-full",o),...s,children:[a.jsx("div",{className:"px-6 py-4 border-b border-gray-100",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>d("calendar"),className:"h-9 px-3 text-sm font-medium text-gray-600 hover:text-gray-900 hover:bg-gray-50 rounded",children:"← Back"}),a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx(q,{variant:"outline",size:"sm",onClick:C,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Le,{className:"h-4 w-4"})}),a.jsx(q,{variant:"ghost",onClick:()=>d("years"),className:"h-9 px-4 text-lg font-semibold text-gray-900 hover:bg-gray-50 rounded",children:m}),a.jsx(q,{variant:"outline",size:"sm",onClick:S,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Ee,{className:"h-4 w-4"})})]})]})}),a.jsx("div",{className:"p-6",children:a.jsx("div",{className:"grid grid-cols-3 gap-2",children:g.map((j,E)=>a.jsx(q,{variant:"ghost",onClick:()=>T(E),className:V("h-11 w-full text-sm font-medium rounded transition-all duration-200",E===i.getMonth()?"bg-gray-900 text-white hover:bg-gray-800 shadow-sm":"text-gray-600 hover:text-gray-900 hover:bg-gray-50"),children:j},j))})})]}):u==="years"?a.jsxs("div",{className:V("bg-white rounded-lg border border-gray-200 w-full",o),...s,children:[a.jsx("div",{className:"px-6 py-4 border-b border-gray-100",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>d("months"),className:"h-9 px-3 text-sm font-medium text-gray-600 hover:text-gray-900 hover:bg-gray-50 rounded",children:"← Back"}),a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Select Year"})]})}),a.jsx("div",{className:"p-6",children:a.jsx("div",{className:"grid grid-cols-4 gap-2 max-h-64 overflow-y-auto",children:x.map(j=>a.jsx(q,{variant:"ghost",onClick:()=>I(j),className:V("h-11 w-full text-sm font-medium rounded transition-all duration-200",j===m?"bg-gray-900 text-white hover:bg-gray-800 shadow-sm":"text-gray-600 hover:text-gray-900 hover:bg-gray-50"),children:j},j))})})]}):a.jsxs("div",{className:V("bg-white rounded-lg border border-gray-200 w-full",o),...s,children:[a.jsx("div",{className:"px-6 py-4 border-b border-gray-100",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(q,{variant:"outline",size:"sm",onClick:v,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Le,{className:"h-4 w-4"})}),a.jsx(q,{variant:"ghost",onClick:()=>d("months"),className:"h-9 px-4 text-lg font-semibold text-gray-900 hover:bg-gray-50 rounded",children:Mr(i,"MMMM yyyy")}),a.jsx(q,{variant:"outline",size:"sm",onClick:w,className:"h-9 w-9 p-0 border-gray-200 rounded",children:a.jsx(Ee,{className:"h-4 w-4"})})]})}),a.jsxs("div",{className:"p-6",children:[a.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:y.map((j,E)=>a.jsx("div",{className:"h-10 flex items-center justify-center",children:a.jsx("span",{className:"text-xs font-medium text-gray-400 uppercase",children:j})},E))}),a.jsxs("div",{className:"grid grid-cols-7 gap-1",children:[Array.from({length:p.getDay()}).map((j,E)=>a.jsx("div",{className:"h-12"},`empty-${E}`)),h.map(j=>{const E=O(j),k=e&&jt(j,e),P=Ps(j),L=Rs(j,i),N=b(j);return a.jsx("div",{className:"relative",children:a.jsxs(q,{variant:"ghost",size:"sm",className:V("h-12 w-full p-0 text-sm relative rounded transition-all duration-200",!L&&"text-gray-300",L&&!k&&!P&&!N&&"text-gray-700 hover:bg-gray-50",N&&!k&&"text-red-600 font-medium hover:bg-red-50",P&&!k&&"bg-gray-100 text-gray-900 font-medium border border-gray-200",k&&"bg-gray-900 text-white font-medium shadow-sm"),onClick:()=>t?.(j),children:[Mr(j,"d"),E.length>0&&a.jsxs("div",{className:"absolute bottom-1 left-1/2 transform -translate-x-1/2 flex space-x-0.5",children:[E.slice(0,3).map((W,_)=>{const F=M=>{if(k)return"bg-white/80";switch(M){case"class":return"bg-blue-500";case"meeting":return"bg-green-500";case"appointment":return"bg-orange-500";case"deadline":return"bg-red-500";default:return"bg-gray-500"}};return a.jsx("div",{className:V("w-1 h-1 rounded-full",F(W.type))},_)}),E.length>3&&a.jsx("div",{className:V("w-1 h-1 rounded-full",k?"bg-white/60":"bg-gray-400")})]})]})},j.toISOString())})]})]}),e&&a.jsx("div",{className:"border-t border-gray-100",children:a.jsxs("div",{className:"p-6",children:[a.jsx("div",{className:"flex items-center justify-between mb-4",children:a.jsx("h4",{className:"text-sm font-semibold text-gray-900",children:Ps(e)?"Today":Ey(e)?"Tomorrow":Mr(e,"MMM d, yyyy")})}),(()=>{const j=n.filter(E=>jt(E.date,e));return a.jsxs("div",{className:"space-y-3",children:[j.length>0&&j.map(E=>{const P=(L=>{switch(L){case"class":return{bg:"bg-blue-50",border:"border-blue-100",dot:"bg-blue-500",text:"text-blue-900",subtext:"text-blue-600"};case"meeting":return{bg:"bg-green-50",border:"border-green-100",dot:"bg-green-500",text:"text-green-900",subtext:"text-green-600"};case"appointment":return{bg:"bg-orange-50",border:"border-orange-100",dot:"bg-orange-500",text:"text-orange-900",subtext:"text-orange-600"};case"deadline":return{bg:"bg-red-50",border:"border-red-100",dot:"bg-red-500",text:"text-red-900",subtext:"text-red-600"};default:return{bg:"bg-gray-50",border:"border-gray-100",dot:"bg-gray-500",text:"text-gray-900",subtext:"text-gray-600"}}})(E.type);return a.jsxs("div",{className:`flex items-center space-x-3 p-3 ${P.bg} rounded border ${P.border} hover:shadow-sm transition-shadow cursor-pointer`,children:[a.jsx("div",{className:`w-2 h-2 rounded-full ${P.dot} flex-shrink-0`}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:`text-sm font-medium ${P.text} truncate`,children:E.title}),(E.time||E.location)&&a.jsxs("p",{className:`text-xs ${P.subtext} truncate`,children:[E.time,E.time&&E.location&&" • ",E.location]})]})]},E.id||E.title)}),j.length===0&&a.jsxs("div",{className:"text-center py-8",children:[a.jsx("div",{className:"w-12 h-12 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-3",children:a.jsx(Xr,{className:"w-5 h-5 text-gray-400"})}),a.jsx("p",{className:"text-sm text-gray-500",children:"No events scheduled"})]})]})})()]})}),!Rs(i,new Date)&&a.jsx("div",{className:"p-6 pt-0",children:a.jsx(q,{variant:"outline",size:"sm",onClick:()=>{const j=new Date;c(j),t?.(j),d("calendar")},className:"w-full h-10 text-sm font-medium border-gray-200 hover:bg-gray-50 rounded",children:"Today"})})]})}const Fc=6048e5,Ry=864e5,ks=Symbol.for("constructDateFrom");function Se(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ks in e?e[ks](t):e instanceof Date?new e.constructor(t):new Date(t)}function ve(e,t){return Se(t||e,e)}function Yr(e,t,n){const r=ve(e,n?.in);if(isNaN(t))return Se(e,NaN);if(!t)return r;const o=r.getDate(),s=Se(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const i=s.getDate();return o>=i?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let Py={};function ar(){return Py}function Jt(e,t){const n=ar(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=ve(e,t?.in),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function In(e,t){return Jt(e,{...t,weekStartsOn:1})}function Lc(e,t){const n=ve(e,t?.in),r=n.getFullYear(),o=Se(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=In(o),i=Se(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const c=In(i);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Ds(e){const t=ve(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 ir(e,...t){const n=Se.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function $n(e,t){const n=ve(e,t?.in);return n.setHours(0,0,0,0),n}function My(e,t,n){const[r,o]=ir(n?.in,e,t),s=$n(r),i=$n(o),c=+s-Ds(s),u=+i-Ds(i);return Math.round((c-u)/Ry)}function ky(e,t){const n=Lc(e,t),r=Se(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),In(r)}function Dy(e){return Se(e,Date.now())}function Gt(e,t,n){const[r,o]=ir(n?.in,e,t);return+$n(r)==+$n(o)}function Ty(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Oy(e){return!(!Ty(e)&&typeof e!="number"||isNaN(+ve(e)))}function Ts(e,t){const n=ve(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function _y(e,t){const[n,r]=ir(e,t.start,t.end);return{start:n,end:r}}function Os(e,t){const{start:n,end:r}=_y(t?.in,e);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let c=1;const u=[];for(;+i<=s;)u.push(Se(n,i)),i.setDate(i.getDate()+c),i.setHours(0,0,0,0);return o?u.reverse():u}function _s(e,t){const n=ve(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Ay(e,t){const n=ve(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Iy={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"}},$y=(e,t,n)=>{let r;const o=Iy[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function kr(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Fy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ly={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Wy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Vy={date:kr({formats:Fy,defaultWidth:"full"}),time:kr({formats:Ly,defaultWidth:"full"}),dateTime:kr({formats:Wy,defaultWidth:"full"})},By={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},zy=(e,t,n,r)=>By[e];function Vt(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):i;o=e.formattingValues[c]||e.formattingValues[i]}else{const i=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const Hy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Yy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Gy={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"]},Uy={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"]},Ky={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"}},qy={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"}},Xy=(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"},Jy={ordinalNumber:Xy,era:Vt({values:Hy,defaultWidth:"wide"}),quarter:Vt({values:Yy,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Vt({values:Gy,defaultWidth:"wide"}),day:Vt({values:Uy,defaultWidth:"wide"}),dayPeriod:Vt({values:Ky,defaultWidth:"wide",formattingValues:qy,defaultFormattingWidth:"wide"})};function Bt(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?Qy(c,f=>f.test(i)):Zy(c,f=>f.test(i));let d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const p=t.slice(i.length);return{value:d,rest:p}}}function Zy(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Qy(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ev(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const c=t.slice(o.length);return{value:i,rest:c}}}const tv=/^(\d+)(th|st|nd|rd)?/i,nv=/\d+/i,rv={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},ov={any:[/^b/i,/^(a|c)/i]},sv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},av={any:[/1/i,/2/i,/3/i,/4/i]},iv={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},cv={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]},lv={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},uv={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]},dv={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},fv={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}},pv={ordinalNumber:ev({matchPattern:tv,parsePattern:nv,valueCallback:e=>parseInt(e,10)}),era:Bt({matchPatterns:rv,defaultMatchWidth:"wide",parsePatterns:ov,defaultParseWidth:"any"}),quarter:Bt({matchPatterns:sv,defaultMatchWidth:"wide",parsePatterns:av,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Bt({matchPatterns:iv,defaultMatchWidth:"wide",parsePatterns:cv,defaultParseWidth:"any"}),day:Bt({matchPatterns:lv,defaultMatchWidth:"wide",parsePatterns:uv,defaultParseWidth:"any"}),dayPeriod:Bt({matchPatterns:dv,defaultMatchWidth:"any",parsePatterns:fv,defaultParseWidth:"any"})},mv={code:"en-US",formatDistance:$y,formatLong:Vy,formatRelative:zy,localize:Jy,match:pv,options:{weekStartsOn:0,firstWeekContainsDate:1}};function hv(e,t){const n=ve(e,t?.in);return My(n,Ay(n))+1}function gv(e,t){const n=ve(e,t?.in),r=+In(n)-+ky(n);return Math.round(r/Fc)+1}function Wc(e,t){const n=ve(e,t?.in),r=n.getFullYear(),o=ar(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=Se(t?.in||e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const c=Jt(i,t),u=Se(t?.in||e,0);u.setFullYear(r,0,s),u.setHours(0,0,0,0);const d=Jt(u,t);return+n>=+c?r+1:+n>=+d?r:r-1}function xv(e,t){const n=ar(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Wc(e,t),s=Se(t?.in||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),Jt(s,t)}function yv(e,t){const n=ve(e,t?.in),r=+Jt(n,t)-+xv(n,t);return Math.round(r/Fc)+1}function ce(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const qe={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)}},Nt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},As={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 qe.y(e,t)},Y:function(e,t,n,r){const o=Wc(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return ce(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):ce(s,t.length)},R:function(e,t){const n=Lc(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 qe.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=yv(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ce(o,t.length)},I:function(e,t,n){const r=gv(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"}):qe.d(e,t)},D:function(e,t,n){const r=hv(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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ce(s,2);case"eo":return n.ordinalNumber(s,{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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ce(s,t.length);case"co":return n.ordinalNumber(s,{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=Nt.noon:r===0?o=Nt.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=Nt.evening:r>=12?o=Nt.afternoon:r>=4?o=Nt.morning:o=Nt.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 qe.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):qe.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"}):qe.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):qe.s(e,t)},S:function(e,t){return qe.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return $s(r);case"XXXX":case"XX":return ut(r);case"XXXXX":case"XXX":default:return ut(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $s(r);case"xxxx":case"xx":return ut(r);case"xxxxx":case"xxx":default:return ut(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Is(r,":");case"OOOO":default:return"GMT"+ut(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Is(r,":");case"zzzz":default:return"GMT"+ut(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 Is(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+ce(s,2)}function $s(e,t){return e%60===0?(e>0?"-":"+")+ce(Math.abs(e)/60,2):ut(e,t)}function ut(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ce(Math.trunc(r/60),2),s=ce(r%60,2);return n+o+t+s}const Fs=(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"})}},Vc=(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"})}},vv=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Fs(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Fs(r,t)).replace("{{time}}",Vc(o,t))},bv={p:Vc,P:vv},wv=/^D+$/,Sv=/^Y+$/,Cv=["D","DD","YY","YYYY"];function Nv(e){return wv.test(e)}function Ev(e){return Sv.test(e)}function jv(e,t,n){const r=Rv(e,t,n);if(console.warn(r),Cv.includes(e))throw new RangeError(r)}function Rv(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 Pv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kv=/^'([^]*?)'?$/,Dv=/''/g,Tv=/[a-zA-Z]/;function zt(e,t,n){const r=ar(),o=r.locale??mv,s=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,c=ve(e,n?.in);if(!Oy(c))throw new RangeError("Invalid time value");let u=t.match(Mv).map(p=>{const f=p[0];if(f==="p"||f==="P"){const h=bv[f];return h(p,o.formatLong)}return p}).join("").match(Pv).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const f=p[0];if(f==="'")return{isToken:!1,value:Ov(p)};if(As[f])return{isToken:!0,value:p};if(f.match(Tv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(u=o.localize.preprocessor(c,u));const d={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return u.map(p=>{if(!p.isToken)return p.value;const f=p.value;(Ev(f)||Nv(f))&&jv(f,t,String(e));const h=As[f[0]];return h(c,f,o.localize,d)}).join("")}function Ov(e){const t=e.match(kv);return t?t[1].replace(Dv,"'"):e}function Ls(e,t,n){const[r,o]=ir(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function _v(e,t){return Gt(Se(e,e),Dy(e))}function Av(e,t,n){return Yr(e,-1,n)}function Et(...e){return Object.assign({},...e.filter(Boolean))}function Iv(e,t){return e?t:void 0}function Bc(e){const t=$v(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(Lv);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function $v(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=Vv(o),c=Wv(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fv=Symbol("radix.slottable");function Lv(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fv}function Wv(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Vv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Bv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zc=Bv.reduce((e,t)=>{const n=Bc(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),cr="Popover",[Hc]=Ue(cr,[At]),dn=At(),[zv,at]=Hc(cr),Yc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,c=dn(t),u=l.useRef(null),[d,p]=l.useState(!1),[f,h]=et({prop:r,defaultProp:o??!1,onChange:s,caller:cr});return a.jsx(Jn,{...c,children:a.jsx(zv,{scope:t,contentId:je(),triggerRef:u,open:f,onOpenChange:h,onOpenToggle:l.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:d,onCustomAnchorAdd:l.useCallback(()=>p(!0),[]),onCustomAnchorRemove:l.useCallback(()=>p(!1),[]),modal:i,children:n})})};Yc.displayName=cr;var Gc="PopoverAnchor",Uc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=at(Gc,n),s=dn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return l.useEffect(()=>(i(),()=>c()),[i,c]),a.jsx(Zn,{...s,...r,ref:t})});Uc.displayName=Gc;var Kc="PopoverTrigger",qc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=at(Kc,n),s=dn(n),i=ie(t,o.triggerRef),c=a.jsx(zc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":el(o.open),...r,ref:i,onClick:G(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:a.jsx(Zn,{asChild:!0,...s,children:c})});qc.displayName=Kc;var So="PopoverPortal",[Hv,Yv]=Hc(So,{forceMount:void 0}),Xc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=at(So,t);return a.jsx(Hv,{scope:t,forceMount:n,children:a.jsx(Oe,{present:n||s.open,children:a.jsx(rn,{asChild:!0,container:o,children:r})})})};Xc.displayName=So;var kt="PopoverContent",Jc=l.forwardRef((e,t)=>{const n=Yv(kt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=at(kt,e.__scopePopover);return a.jsx(Oe,{present:r||s.open,children:s.modal?a.jsx(Uv,{...o,ref:t}):a.jsx(Kv,{...o,ref:t})})});Jc.displayName=kt;var Gv=Bc("PopoverContent.RemoveScroll"),Uv=l.forwardRef((e,t)=>{const n=at(kt,e.__scopePopover),r=l.useRef(null),o=ie(t,r),s=l.useRef(!1);return l.useEffect(()=>{const i=r.current;if(i)return Qn(i)},[]),a.jsx(an,{as:Gv,allowPinchZoom:!0,children:a.jsx(Zc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:G(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Kv=l.forwardRef((e,t)=>{const n=at(kt,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return a.jsx(Zc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Zc=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,...f}=e,h=at(kt,n),g=dn(n);return Gn(),a.jsx(tn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:a.jsx(en,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:p,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:a.jsx(uo,{"data-state":el(h.open),role:"dialog",id:h.contentId,...g,...f,ref:t,style:{...f.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)"}})})})}),Qc="PopoverClose",qv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=at(Qc,n);return a.jsx(zc.button,{type:"button",...r,ref:t,onClick:G(e.onClick,()=>o.onOpenChange(!1))})});qv.displayName=Qc;var Xv="PopoverArrow",Jv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=dn(n);return a.jsx(fo,{...o,...r,ref:t})});Jv.displayName=Xv;function el(e){return e?"open":"closed"}var Zv=Yc,Qv=Uc,eb=qc,tb=Xc,tl=Jc;const Co=Zv,No=eb,nb=Qv,lr=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,style:r,...o},s)=>{const i={zIndex:50,width:"auto",borderRadius:"0.375rem",border:"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"0.75rem",color:"#030712",boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",outline:"none",...r};return a.jsx(tb,{children:a.jsx(tl,{ref:s,align:t,sideOffset:n,"data-takaui":"popover",className:e,style:i,...o})})});lr.displayName=tl.displayName;function rb({date:e,onDateChange:t,mode:n="single",dateRange:r,onDateRangeChange:o,placeholder:s="Pick a date",dateFormat:i="PPP",disabled:c=!1,className:u,variant:d="outline",size:p="default",align:f="start",showIcon:h=!0,icon:g,minDate:y,maxDate:m,disabledDates:x,isDateDisabled:v,fullWidth:w=!1,customTrigger:C,numberOfMonths:S=1,holidays:T=[]}){const[I,O]=l.useState(!1),[b,j]=l.useState(e||new Date),[E,k]=l.useState("calendar"),[P,L]=l.useState(r?.from),[N,W]=l.useState(r?.to),[_,F]=l.useState();l.useEffect(()=>{L(r?.from),W(r?.to)},[r]),l.useEffect(()=>{I&&(k("calendar"),n==="single"&&e?j(e):n==="range"&&r?.from&&j(r.from))},[I,e,r,n]);const M=B=>{if(n==="range")if(!P||P&&N)L(B),W(void 0),o?.({from:B,to:void 0});else{const ae=P<B?P:B,Pe=P<B?B:P;L(ae),W(Pe),o?.({from:ae,to:Pe}),O(!1)}else t?.(B),O(!1)},$=B=>!!(x?.some(ae=>ae.toDateString()===B.toDateString())||y&&B<y||m&&B>m||v?.(B)),re=B=>T.some(ae=>Gt(ae.date,B)),D=_s(b),z=Ts(b),K=Os({start:D,end:z}),X=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],le=Yr(b,1),ue=_s(le),A=Ts(le),Q=Os({start:ue,end:A}),oe=()=>{j(Av(b))},ee=()=>{j(Yr(b,1))},te=(B,ae)=>zt(B,ae),R=B=>{if(P&&N)return B>=P&&B<=N;if(P&&!N&&_){const ae=P<_?P:_,Pe=P<_?_:P;return B>=ae&&B<=Pe}return!1},U=B=>P&&Gt(B,P),se=B=>N&&Gt(B,N),Z=()=>{const B=new Date(b);B.setFullYear(it-1),j(B)},xe=()=>{const B=new Date(b);B.setFullYear(it+1),j(B)},pe=B=>{const ae=new Date(b.getFullYear(),B,1);j(ae),k("calendar")},ye=B=>{const ae=new Date(B,b.getMonth(),1);j(ae),k("calendar")},dr=["January","February","March","April","May","June","July","August","September","October","November","December"],it=b.getFullYear(),fr=Array.from({length:20},(B,ae)=>it-10+ae),To=Et({justifyContent:"flex-start",textAlign:"left",fontWeight:"normal"},!e&&!P?{color:"#6b7280"}:void 0,w?{width:"100%"}:void 0),vt={marginRight:"0.5rem",height:"1rem",width:"1rem"},pn={padding:0,borderColor:"#e5e7eb",width:S===2?"640px":"320px"},pr={backgroundColor:"#ffffff",borderRadius:"0.5rem"},mr={borderBottom:"1px solid #f3f4f6",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1rem",paddingBottom:"1rem"},hr={display:"flex",alignItems:"center",justifyContent:"space-between"},mn={height:"2.25rem",width:"2.25rem",padding:0},Ol={display:"flex",alignItems:"center",gap:"0.25rem"},Oo={height:"2.25rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",fontWeight:"600",fontSize:"1rem"},_l={height:"2.25rem",paddingLeft:"1rem",paddingRight:"1rem",fontWeight:"600",fontSize:"1.125rem"},Al={color:"#9ca3af",fontSize:"0.875rem"},Il={padding:"1.5rem"},_o={height:"2.25rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",fontSize:"0.875rem",fontWeight:"500",color:"#4b5563"},$l={fontSize:"1.125rem",fontWeight:"600",color:"#111827"},Fl={display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"0.5rem",maxHeight:"16rem",overflowY:"auto"},Ll={display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"0.5rem"},Wl={display:"flex",alignItems:"center",gap:"0.25rem"},Vl={height:"2.25rem",paddingLeft:"1rem",paddingRight:"1rem",fontSize:"1.125rem",fontWeight:"600",color:"#111827"},Bl={display:"flex",gap:S===2?"1.5rem":"0"},Ao={flex:1},Io={display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"0.25rem",marginBottom:"0.5rem"},$o={height:"2rem",display:"flex",alignItems:"center",justifyContent:"center"},Fo={fontSize:"0.75rem",fontWeight:"500",color:"#9ca3af",textTransform:"uppercase"},Lo={display:"grid",gridTemplateColumns:"repeat(7, 1fr)"},Wo={height:"2.5rem"},zl=C||a.jsxs(q,{variant:d,size:p,style:To,className:u,disabled:c,children:[h&&(g||a.jsx(Xr,{style:vt})),n==="range"?P&&N?a.jsxs("span",{children:[zt(P,i)," - ",zt(N,i)]}):P?a.jsxs("span",{children:[zt(P,i)," - ..."]}):a.jsx("span",{children:s}):e?zt(e,i):a.jsx("span",{children:s})]}),Vo=(B,ae)=>{const Pe=n==="single"?e&&Gt(B,e):U(B)||se(B),Hl=_v(B),gr=$(B),ct=n==="range"&&R(B),Yl=re(B),Bo=B.getDay(),Gl=U(B),Ul=se(B),Kl=Et({position:"relative",padding:"0.125rem"},ct?{backgroundColor:"#f3f4f6"}:void 0,ct&&Bo===0?{borderTopLeftRadius:"0.375rem",borderBottomLeftRadius:"0.375rem"}:void 0,ct&&Bo===6?{borderTopRightRadius:"0.375rem",borderBottomRightRadius:"0.375rem"}:void 0,ct&&Gl?{borderTopLeftRadius:"0.375rem",borderBottomLeftRadius:"0.375rem"}:void 0,ct&&Ul?{borderTopRightRadius:"0.375rem",borderBottomRightRadius:"0.375rem"}:void 0),ql=Et({height:"2.5rem",width:"100%",padding:0,fontSize:"0.875rem",position:"relative",transition:"all 0.2s ease",borderRadius:"0.375rem",color:"#111827"},ae?void 0:{color:"#d1d5db"},Yl&&!Pe?{color:"#dc2626",fontWeight:"500"}:void 0,Hl&&!Pe&&!ct?{backgroundColor:"#f9fafb",color:"#111827",fontWeight:"500",border:"1px solid #e5e7eb"}:void 0,Pe?{backgroundColor:"#2563eb",color:"#ffffff",fontWeight:"500",boxShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)",zIndex:10}:void 0,ct&&!Pe?{color:"#111827",backgroundColor:"#dbeafe"}:void 0,gr?{opacity:.4,cursor:"not-allowed"}:void 0);return a.jsx("div",{style:Kl,onMouseEnter:()=>n==="range"&&P&&!N&&F(B),onMouseLeave:()=>F(void 0),children:a.jsx(q,{variant:"ghost",size:"sm",disabled:gr||c,style:ql,onClick:()=>!gr&&M(B),children:te(B,"d")})},B.toISOString())};return a.jsxs(Co,{open:I,onOpenChange:O,children:[a.jsx(No,{asChild:!0,children:zl}),a.jsx(lr,{style:pn,align:f,side:"bottom",sideOffset:4,collisionPadding:8,children:a.jsxs("div",{style:pr,"data-takaui":"datepicker",children:[a.jsx("div",{style:mr,children:a.jsxs("div",{style:hr,children:[a.jsx(q,{variant:"outline",size:"sm",onClick:oe,style:mn,children:a.jsx(Le,{style:{height:"1rem",width:"1rem"}})}),S===2?a.jsxs("div",{style:Ol,children:[a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>k("months"),style:Oo,children:te(b,"MMMM")}),a.jsx("span",{style:Al,children:"-"}),a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>k("months"),style:Oo,children:te(le,"MMMM yyyy")})]}):a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>k("months"),style:_l,children:te(b,"MMMM yyyy")}),a.jsx(q,{variant:"outline",size:"sm",onClick:ee,style:mn,children:a.jsx(Ee,{style:{height:"1rem",width:"1rem"}})})]})}),a.jsxs("div",{style:Il,children:[E==="years"&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{style:hr,children:[a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>k("months"),style:_o,children:"← Back"}),a.jsx("h3",{style:$l,children:"Select Year"})]}),a.jsx("div",{style:Fl,children:fr.map(B=>{const ae=Et({height:"2.75rem",width:"100%",fontSize:"0.875rem",fontWeight:"500",borderRadius:"0.375rem",transition:"all 0.2s ease"},B===it?{backgroundColor:"#2563eb",color:"#ffffff",boxShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)"}:{color:"#111827",backgroundColor:"transparent"});return a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>ye(B),style:ae,children:B},B)})})]}),E==="months"&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{style:hr,children:[a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>k("calendar"),style:_o,children:"← Back"}),a.jsxs("div",{style:Wl,children:[a.jsx(q,{variant:"outline",size:"sm",onClick:Z,style:mn,children:a.jsx(Le,{style:{height:"1rem",width:"1rem"}})}),a.jsx(q,{variant:"ghost",onClick:()=>k("years"),style:Vl,children:it}),a.jsx(q,{variant:"outline",size:"sm",onClick:xe,style:mn,children:a.jsx(Ee,{style:{height:"1rem",width:"1rem"}})})]})]}),a.jsx("div",{style:Ll,children:dr.map((B,ae)=>{const Pe=Et({height:"2.75rem",width:"100%",fontSize:"0.875rem",fontWeight:"500",borderRadius:"0.375rem",transition:"all 0.2s ease"},ae===b.getMonth()?{backgroundColor:"#2563eb",color:"#ffffff",boxShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)"}:{color:"#111827",backgroundColor:"transparent"});return a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>pe(ae),style:Pe,children:B},B)})})]}),E==="calendar"&&a.jsxs("div",{style:Bl,children:[a.jsxs("div",{style:Ao,children:[a.jsx("div",{style:Io,children:X.map((B,ae)=>a.jsx("div",{style:$o,children:a.jsx("span",{style:Fo,children:B})},ae))}),a.jsxs("div",{style:Lo,children:[Array.from({length:D.getDay()}).map((B,ae)=>a.jsx("div",{style:Wo},`empty-${ae}`)),K.map(B=>Vo(B,Ls(B,b)))]})]}),S===2&&a.jsxs("div",{style:Ao,children:[a.jsx("div",{style:Io,children:X.map((B,ae)=>a.jsx("div",{style:$o,children:a.jsx("span",{style:Fo,children:B})},ae))}),a.jsxs("div",{style:Lo,children:[Array.from({length:ue.getDay()}).map((B,ae)=>a.jsx("div",{style:Wo},`next-empty-${ae}`)),Q.map(B=>Vo(B,Ls(B,le)))]})]})]})]})]})})]})}const ob=({time:e,onTimeChange:t,timezone:n="UTC",format:r="24h",showTimezone:o=!1,minuteStep:s=1,showSeconds:i=!1,placeholder:c="Select time",variant:u="outline",size:d="default",showClockFace:p=!1})=>{const f=r==="24h",h=e?e.getHours():0,g=e?e.getMinutes():0,y=e?e.getSeconds():0,m=h>=12?"PM":"AM",[x,v]=J.useState(h),[w,C]=J.useState(g),[S,T]=J.useState(y),[I,O]=J.useState(m),[b,j]=J.useState(""),[E,k]=J.useState(""),[P,L]=J.useState(""),N=J.useRef(null),W=J.useRef(null),_=J.useRef(null),F=J.useRef(null),M=J.useRef(null),$=J.useRef(null);J.useEffect(()=>{if(e){const R=e.getHours(),U=e.getMinutes(),se=e.getSeconds(),Z=R>=12?"PM":"AM";R!==x&&v(R),U!==w&&C(U),se!==S&&T(se),Z!==I&&O(Z)}},[e]),J.useEffect(()=>{F.current&&F.current.querySelector('[data-selected="true"]')?.scrollIntoView({block:"center",behavior:"smooth"}),M.current&&M.current.querySelector('[data-selected="true"]')?.scrollIntoView({block:"center",behavior:"smooth"}),$.current&&$.current.querySelector('[data-selected="true"]')?.scrollIntoView({block:"center",behavior:"smooth"})},[x,w,S,f]);const re=(R,U,se)=>{const Z=new Date;Z.setHours(R),Z.setMinutes(U),Z.setSeconds(se),t(Z)},D=R=>{let U=R;f||(I==="PM"&&R!==12?U=R+12:I==="AM"&&R===12&&(U=0)),v(U),re(U,w,S)},z=R=>{C(R),re(x,R,S)},K=R=>{T(R),re(x,w,R)},X=R=>{if(I===R)return;O(R);const U=R==="PM"?x%12+12:x%12;v(U),re(U,w,S)},le=()=>{const R=new Date;v(R.getHours()),C(R.getMinutes()),T(R.getSeconds()),O(R.getHours()>=12?"PM":"AM"),t(R)},ue=()=>{if(!e)return c;const R=f?x:x%12||12,U=w.toString().padStart(2,"0"),se=S.toString().padStart(2,"0");let Z=`${R.toString().padStart(2,"0")}:${U}`;return i&&(Z+=`:${se}`),f||(Z+=` ${I}`),o&&(Z+=` ${n}`),Z},A=()=>{const R=f?23:12,U=f?0:1;return Array.from({length:R-U+1},(se,Z)=>U+Z)},Q=()=>Array.from({length:Math.floor(60/s)},(R,U)=>U*s),oe=()=>Array.from({length:60},(R,U)=>U),ee=f?x:x%12||12,te=()=>{const xe=(ee%12*30+w*.5)*(Math.PI/180)-Math.PI/2,pe=w*6*(Math.PI/180)-Math.PI/2,ye=100+50*Math.cos(xe),dr=100+50*Math.sin(xe),it=100+70*Math.cos(pe),fr=100+70*Math.sin(pe);return a.jsxs("svg",{width:200,height:200,className:"mx-auto",children:[a.jsx("circle",{cx:100,cy:100,r:95,fill:"white",stroke:"#e5e7eb",strokeWidth:"2"}),Array.from({length:12},(To,vt)=>{const pn=vt*30*(Math.PI/180)-Math.PI/2,pr=100+80*Math.cos(pn),mr=100+80*Math.sin(pn);return a.jsx("text",{x:pr,y:mr,textAnchor:"middle",dominantBaseline:"middle",className:"text-sm fill-gray-600",children:vt===0?12:vt},vt)}),a.jsx("line",{x1:100,y1:100,x2:ye,y2:dr,stroke:"#374151",strokeWidth:"6",strokeLinecap:"round"}),a.jsx("line",{x1:100,y1:100,x2:it,y2:fr,stroke:"#ef4444",strokeWidth:"4",strokeLinecap:"round"}),a.jsx("circle",{cx:100,cy:100,r:"6",fill:"#ef4444"})]})};return a.jsxs(Co,{children:[a.jsx(No,{asChild:!0,children:a.jsxs(q,{variant:u,size:d,className:V("justify-start text-left font-normal",!e&&"text-muted-foreground"),children:[a.jsx(Yu,{className:"mr-2 h-4 w-4"}),ue()]})}),a.jsx(lr,{className:"w-auto p-0",align:"start",children:a.jsxs("div",{className:"p-6 space-y-4 min-w-[460px]",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-center gap-6",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("input",{ref:N,type:"text",inputMode:"numeric",value:b!==""?b.padStart(2,"0"):ee.toString().padStart(2,"0"),onKeyDown:R=>{if(R.key>="0"&&R.key<="9"){R.preventDefault();const U=b+R.key;if(U.length===1)j(R.key);else if(U.length===2){const se=parseInt(U),Z=f?23:12,xe=f?0:1;let pe=se;se<xe&&(pe=xe),se>Z&&(pe=Z),j(""),D(pe),setTimeout(()=>W.current?.focus(),0)}}else R.key==="Backspace"?(R.preventDefault(),b.length>0&&j(b.slice(0,-1))):R.key==="ArrowRight"||R.key==="Tab"?(R.key==="ArrowRight"&&R.preventDefault(),W.current?.focus()):R.key===":"&&(R.preventDefault(),W.current?.focus())},onBlur:()=>{if(b){const R=parseInt(b),U=f?23:12,se=f?0:1;let Z=R;R<se&&(Z=se),R>U&&(Z=U),D(Z)}j("")},onFocus:()=>{j("")},className:"text-6xl font-medium tabular-nums leading-none w-[85px] text-center bg-transparent outline-none focus:ring-2 focus:ring-primary rounded px-1 cursor-text",readOnly:!0}),a.jsx("div",{className:"text-6xl font-medium leading-none flex items-center px-1",children:":"}),a.jsx("input",{ref:W,type:"text",inputMode:"numeric",value:E!==""?E.padStart(2,"0"):w.toString().padStart(2,"0"),onKeyDown:R=>{if(R.key>="0"&&R.key<="9"){R.preventDefault();const U=E+R.key;if(U.length===1)k(R.key);else if(U.length===2){const se=parseInt(U),Z=Math.min(59,Math.max(0,se));k(""),z(Z),i&&setTimeout(()=>_.current?.focus(),0)}}else R.key==="Backspace"?(R.preventDefault(),E.length>0?k(E.slice(0,-1)):N.current?.focus()):R.key==="ArrowLeft"?(R.preventDefault(),N.current?.focus()):R.key==="ArrowRight"||R.key==="Tab"?(R.key==="ArrowRight"&&R.preventDefault(),i&&_.current?.focus()):R.key===":"&&(R.preventDefault(),i&&_.current?.focus())},onBlur:()=>{if(E){const R=parseInt(E),U=Math.min(59,Math.max(0,R));z(U)}k("")},onFocus:()=>{k("")},className:"text-6xl font-medium tabular-nums leading-none w-[85px] text-center bg-transparent outline-none focus:ring-2 focus:ring-primary rounded px-1 cursor-text",readOnly:!0}),i&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"text-6xl font-medium leading-none flex items-center px-1",children:":"}),a.jsx("input",{ref:_,type:"text",inputMode:"numeric",value:P!==""?P.padStart(2,"0"):S.toString().padStart(2,"0"),onKeyDown:R=>{if(R.key>="0"&&R.key<="9"){R.preventDefault();const U=P+R.key;if(U.length===1)L(R.key);else if(U.length===2){const se=parseInt(U),Z=Math.min(59,Math.max(0,se));L(""),K(Z)}}else R.key==="Backspace"?(R.preventDefault(),P.length>0?L(P.slice(0,-1)):W.current?.focus()):R.key==="ArrowLeft"&&(R.preventDefault(),W.current?.focus())},onBlur:()=>{if(P){const R=parseInt(P),U=Math.min(59,Math.max(0,R));K(U)}L("")},onFocus:()=>{L("")},className:"text-6xl font-medium tabular-nums leading-none w-[85px] text-center bg-transparent outline-none focus:ring-2 focus:ring-primary rounded px-1 cursor-text",readOnly:!0})]})]}),!f&&a.jsxs("div",{className:"flex flex-col gap-1",children:[a.jsx(q,{size:"sm",variant:I==="AM"?"default":"outline",onClick:()=>X("AM"),className:"h-8 w-12 text-xs font-medium",children:"AM"}),a.jsx(q,{size:"sm",variant:I==="PM"?"default":"outline",onClick:()=>X("PM"),className:"h-8 w-12 text-xs font-medium",children:"PM"})]})]}),o&&a.jsx("div",{className:"text-xs text-gray-500 text-center",children:n})]}),p?a.jsx("div",{className:"space-y-4",children:te()}):a.jsxs("div",{className:"flex gap-2 justify-center items-start",children:[a.jsxs("div",{className:"flex-1 max-w-[80px]",children:[a.jsx("div",{className:"text-xs text-center text-gray-500 mb-2",children:"Hour"}),a.jsx("div",{ref:F,className:"h-40 overflow-y-scroll border rounded-md scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100",children:A().map(R=>a.jsx("button",{"data-selected":ee===R,onClick:()=>D(R),className:V("w-full py-2 text-center transition-colors",ee===R?"bg-blue-500 text-white font-medium":"hover:bg-gray-100 text-gray-700"),children:R.toString().padStart(2,"0")},R))})]}),a.jsxs("div",{className:"flex-1 max-w-[80px]",children:[a.jsx("div",{className:"text-xs text-center text-gray-500 mb-2",children:"Min"}),a.jsx("div",{ref:M,className:"h-40 overflow-y-scroll border rounded-md scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100",children:Q().map(R=>a.jsx("button",{"data-selected":w===R,onClick:()=>z(R),className:V("w-full py-2 text-center transition-colors",w===R?"bg-blue-500 text-white font-medium":"hover:bg-gray-100 text-gray-700"),children:R.toString().padStart(2,"0")},R))})]}),i&&a.jsxs("div",{className:"flex-1 max-w-[80px]",children:[a.jsx("div",{className:"text-xs text-center text-gray-500 mb-2",children:"Sec"}),a.jsx("div",{ref:$,className:"h-40 overflow-y-scroll border rounded-md scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100",children:oe().map(R=>a.jsx("button",{"data-selected":S===R,onClick:()=>K(R),className:V("w-full py-2 text-center transition-colors",S===R?"bg-blue-500 text-white font-medium":"hover:bg-gray-100 text-gray-700"),children:R.toString().padStart(2,"0")},R))})]})]}),a.jsxs("div",{className:"flex gap-2 justify-between pt-2 border-t",children:[a.jsx(q,{size:"sm",variant:"outline",onClick:le,children:"Now"}),a.jsx(q,{size:"sm",onClick:()=>t(e),children:"Done"})]})]})})]})},Eo=l.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:V("rounded-lg border border-gray-200 bg-white text-gray-950 shadow-sm",e),...t}));Eo.displayName="Card";const jo=l.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:V("flex flex-col space-y-1.5 p-6",e),...t}));jo.displayName="CardHeader";const Ro=l.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:V("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ro.displayName="CardTitle";const nl=l.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:V("text-sm text-gray-500",e),...t}));nl.displayName="CardDescription";const Po=l.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:V("p-6 pt-0",e),...t}));Po.displayName="CardContent";const rl=l.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:V("flex items-center p-6 pt-0",e),...t}));rl.displayName="CardFooter";var sb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ab=sb.reduce((e,t)=>{const n=zs(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ib="Label",ol=l.forwardRef((e,t)=>a.jsx(ab.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ol.displayName=ib;var sl=ol;const Ne=l.forwardRef(({className:e,...t},n)=>a.jsx(sl,{ref:n,className:V("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));Ne.displayName=sl.displayName;function al(e){const t=cb(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(ub);if(u){const d=u.props.children,p=c.map(f=>f===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:f);return a.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,p):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function cb(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=fb(o),c=db(s,o.props);return o.type!==l.Fragment&&(c.ref=r?fe(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lb=Symbol("radix.slottable");function ub(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lb}function db(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function fb(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fn=pb.reduce((e,t)=>{const n=al(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ur="Dialog",[il]=Ue(ur),[mb,_e]=il(ur),cl=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,c=l.useRef(null),u=l.useRef(null),[d,p]=et({prop:r,defaultProp:o??!1,onChange:s,caller:ur});return a.jsx(mb,{scope:t,triggerRef:c,contentRef:u,contentId:je(),titleId:je(),descriptionId:je(),open:d,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(f=>!f),[p]),modal:i,children:n})};cl.displayName=ur;var ll="DialogTrigger",hb=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_e(ll,n),s=ie(t,o.triggerRef);return a.jsx(fn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Do(o.open),...r,ref:s,onClick:G(e.onClick,o.onOpenToggle)})});hb.displayName=ll;var Mo="DialogPortal",[gb,ul]=il(Mo,{forceMount:void 0}),dl=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=_e(Mo,t);return a.jsx(gb,{scope:t,forceMount:n,children:l.Children.map(r,i=>a.jsx(Oe,{present:n||s.open,children:a.jsx(rn,{asChild:!0,container:o,children:i})}))})};dl.displayName=Mo;var Fn="DialogOverlay",fl=l.forwardRef((e,t)=>{const n=ul(Fn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=_e(Fn,e.__scopeDialog);return s.modal?a.jsx(Oe,{present:r||s.open,children:a.jsx(yb,{...o,ref:t})}):null});fl.displayName=Fn;var xb=al("DialogOverlay.RemoveScroll"),yb=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_e(Fn,n);return a.jsx(an,{as:xb,allowPinchZoom:!0,shards:[o.contentRef],children:a.jsx(fn.div,{"data-state":Do(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),xt="DialogContent",pl=l.forwardRef((e,t)=>{const n=ul(xt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=_e(xt,e.__scopeDialog);return a.jsx(Oe,{present:r||s.open,children:s.modal?a.jsx(vb,{...o,ref:t}):a.jsx(bb,{...o,ref:t})})});pl.displayName=xt;var vb=l.forwardRef((e,t)=>{const n=_e(xt,e.__scopeDialog),r=l.useRef(null),o=ie(t,n.contentRef,r);return l.useEffect(()=>{const s=r.current;if(s)return Qn(s)},[]),a.jsx(ml,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&s.preventDefault()}),onFocusOutside:G(e.onFocusOutside,s=>s.preventDefault())})}),bb=l.forwardRef((e,t)=>{const n=_e(xt,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return a.jsx(ml,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ml=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,c=_e(xt,n),u=l.useRef(null),d=ie(t,u);return Gn(),a.jsxs(a.Fragment,{children:[a.jsx(tn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:a.jsx(en,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Do(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(wb,{titleId:c.titleId}),a.jsx(Cb,{contentRef:u,descriptionId:c.descriptionId})]})]})}),ko="DialogTitle",hl=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_e(ko,n);return a.jsx(fn.h2,{id:o.titleId,...r,ref:t})});hl.displayName=ko;var gl="DialogDescription",xl=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_e(gl,n);return a.jsx(fn.p,{id:o.descriptionId,...r,ref:t})});xl.displayName=gl;var yl="DialogClose",vl=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_e(yl,n);return a.jsx(fn.button,{type:"button",...r,ref:t,onClick:G(e.onClick,()=>o.onOpenChange(!1))})});vl.displayName=yl;function Do(e){return e?"open":"closed"}var bl="DialogTitleWarning",[Ob,wl]=iu(bl,{contentName:xt,titleName:ko,docsSlug:"dialog"}),wb=({titleId:e})=>{const t=wl(bl),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
47
47
|
|
|
48
48
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
49
49
|
|
|
50
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ny="DialogDescriptionWarning",Ey=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Jc(Ny).contentName}}.`;return l.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},jy=Fc,Py=Vc,Zc=Hc,Qc=Bc,el=Yc,tl=Uc,Ry=qc;const nl=jy,My=Py,rl=l.forwardRef(({className:e,...t},n)=>a.jsx(Zc,{ref:n,className:F("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));rl.displayName=Zc.displayName;const ol=l.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(My,{children:[a.jsx(rl,{}),a.jsxs(Qc,{ref:r,className:F("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white 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%] rounded-lg",e),...n,children:[t,a.jsxs(Ry,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100",children:[a.jsx(Yu,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ol.displayName=Qc.displayName;const sl=({className:e,...t})=>a.jsx("div",{className:F("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});sl.displayName="ModalHeader";const al=l.forwardRef(({className:e,...t},n)=>a.jsx(el,{ref:n,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));al.displayName=el.displayName;const il=l.forwardRef(({className:e,...t},n)=>a.jsx(tl,{ref:n,className:F("text-sm text-gray-500",e),...t}));il.displayName=tl.displayName;function Dy({isOpen:e,onClose:t,title:n,description:r,children:o,className:s}){return a.jsx(nl,{open:e,onOpenChange:t,children:a.jsxs(ol,{className:s,children:[(n||r)&&a.jsxs(sl,{children:[n&&a.jsx(al,{children:n}),r&&a.jsx(il,{children:r})]}),o]})})}const Sr=["January","February","March","April","May","June","July","August","September","October","November","December"];function cl({onWeekChange:e,initialDate:t=new Date,className:n,compact:r=!1}){const[o,s]=l.useState(t),[i,c]=l.useState(!1),[u,d]=l.useState(!1),[p,f]=l.useState(!1),[h,g]=l.useState(t.getFullYear()),[v,m]=l.useState(t.getMonth()),[x,y]=l.useState(0),b=l.useRef(null),S=l.useRef(null),w=D=>{const C=[],W=new Date(D),N=W.getDay(),H=N===0?-6:1-N;W.setDate(W.getDate()+H);for(let O=0;O<7;O++){const L=new Date(W);L.setDate(W.getDate()+O),C.push(L)}return C},T=(D,C)=>{const W=new Date(D,C,1),N=new Date(D,C+1,0),H=new Date(W);H.setDate(W.getDate()-(W.getDay()+6)%7);const O=[],L=new Date(H);for(;L<=N||L.getMonth()===C;){const A=new Date(L);if(A.setDate(L.getDate()+6),O.push({start:new Date(L),end:new Date(A)}),L.setDate(L.getDate()+7),O.length>6)break}return O},V=(D,C)=>{const W=D.toLocaleDateString("en-US",{month:"short"}),N=C.toLocaleDateString("en-US",{month:"short"});return W===N?`${W} ${D.getDate()}-${C.getDate()}`:`${W} ${D.getDate()}-${N} ${C.getDate()}`},k=w(o),P=Array.from({length:10},(D,C)=>h-5+C),M=D=>{const C=new Date(o);C.setDate(o.getDate()+(D==="next"?7:-7)),s(C),g(C.getFullYear()),m(C.getMonth()),e?.(C)},E=(D,C)=>{y(C),c(!1),s(D.start),e?.(D.start)};return l.useEffect(()=>{const D=C=>{b.current&&!b.current.contains(C.target)&&S.current&&!S.current.contains(C.target)&&(c(!1),d(!1),f(!1))};return i&&document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[i]),l.useEffect(()=>{const C=T(h,v).findIndex(W=>o>=W.start&&o<=W.end);C!==-1&&y(C)},[o,h,v]),a.jsxs("div",{className:F("flex items-center gap-3",n),children:[a.jsx(G,{variant:"outline",size:"sm",onClick:()=>M("prev"),className:F("rounded-lg border-gray-200 hover:border-gray-300 hover:bg-gray-50",r?"h-8 w-8 p-0":"h-9 w-9 p-0"),children:a.jsx(Fe,{className:F(r?"h-3 w-3":"h-4 w-4","text-gray-600")})}),a.jsxs("div",{className:"relative",children:[a.jsxs("div",{ref:S,className:F("flex items-center gap-2 bg-white rounded-lg border border-gray-200 shadow-sm cursor-pointer hover:bg-gray-50 transition-colors",r?"px-2 py-1":"px-3 py-2"),onClick:()=>c(!i),children:[a.jsx(Br,{className:F(r?"h-3 w-3":"h-4 w-4","text-gray-500")}),a.jsx("span",{className:F(r?"text-xs":"text-sm","font-medium text-gray-700"),children:k.length>=7&&k[0]&&k[6]&&`${k[0].getDate()}-${k[6].getDate()} ${Sr[k[0].getMonth()]} ${k[0].getFullYear()}`}),a.jsx(Ee,{className:F(r?"h-2 w-2":"h-3 w-3","text-gray-400 transition-transform",i&&"rotate-90")})]}),i&&a.jsxs("div",{ref:b,className:"absolute top-full right-0 mt-2 bg-white border border-gray-200 rounded-lg shadow-lg p-4 z-50 w-80 sm:w-96",children:[!u&&!p&&a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>{const D=v===0?11:v-1,C=v===0?h-1:h;m(D),g(C)},className:"h-8 w-8 p-0",children:a.jsx(Fe,{className:"h-4 w-4"})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{className:"text-lg font-semibold text-gray-800 hover:text-blue-600 transition-colors",onClick:()=>d(!u),children:Sr[v]}),a.jsx("button",{className:"text-lg font-semibold text-gray-800 hover:text-blue-600 transition-colors",onClick:()=>f(!p),children:h})]}),a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>{const D=v===11?0:v+1,C=v===11?h+1:h;m(D),g(C)},className:"h-8 w-8 p-0",children:a.jsx(Ee,{className:"h-4 w-4"})})]}),u?a.jsxs("div",{className:"p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>d(!1),className:"h-9 px-3 text-sm font-medium",children:"← Back"}),a.jsx("span",{className:"text-lg font-semibold",children:h})]}),a.jsx("div",{className:"grid grid-cols-3 gap-2",children:Sr.map((D,C)=>a.jsx("button",{className:F("h-11 w-full text-sm font-medium rounded-xl transition-all",v===C?"bg-blue-500 text-white":"text-gray-600 hover:bg-gray-50"),onClick:()=>{m(C),d(!1)},children:D},D))})]}):p?a.jsxs("div",{className:"p-6",children:[a.jsx("div",{className:"flex items-center justify-start mb-4",children:a.jsx(G,{variant:"ghost",size:"sm",onClick:()=>f(!1),className:"h-9 px-3 text-sm font-medium",children:"← Back"})}),a.jsx("div",{className:"grid grid-cols-4 gap-2 max-h-64 overflow-y-auto",children:P.map(D=>a.jsx("button",{className:F("h-11 w-full text-sm font-medium rounded-xl transition-all",h===D?"bg-blue-500 text-white":"text-gray-600 hover:bg-gray-50"),onClick:()=>{g(D),f(!1),d(!0)},children:D},D))})]}):a.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-64 overflow-y-auto",children:T(h,v).map((D,C)=>{const W=new Date>=D.start&&new Date<=D.end,N=x===C;return a.jsx("button",{className:F("w-full p-3 text-left rounded-lg border transition-all",N?"bg-blue-500 text-white border-blue-500":W?"bg-white text-blue-600 border-blue-500":"bg-white border-gray-200 text-gray-700 hover:border-blue-300"),onClick:()=>E(D,C),children:a.jsxs("div",{className:"flex flex-col",children:[a.jsxs("div",{className:F("font-medium text-sm",N?"text-white":"text-gray-800"),children:["Week ",C+1]}),a.jsx("div",{className:F("text-xs",N?"text-blue-100":"text-gray-500"),children:V(D.start,D.end)})]})},C)})}),a.jsx("div",{className:"flex gap-2 pt-3 border-t border-gray-100 mt-3",children:a.jsx(G,{size:"sm",variant:"outline",className:"flex-1",onClick:()=>{const D=new Date;s(D),c(!1),d(!1),f(!1),e?.(D)},children:"This Week"})})]})]}),a.jsx(G,{variant:"outline",size:"sm",onClick:()=>M("next"),className:F("rounded-lg border-gray-200 hover:border-gray-300 hover:bg-gray-50",r?"h-8 w-8 p-0":"h-9 w-9 p-0"),children:a.jsx(Ee,{className:F(r?"h-3 w-3":"h-4 w-4","text-gray-600")})})]})}const Fr={calculateWeekDates:e=>{const t=[],n=new Date(e),r=n.getDay(),o=r===0?-6:1-r;n.setDate(n.getDate()+o);for(let s=0;s<7;s++){const i=new Date(n);i.setDate(n.getDate()+s),t.push(i)}return t},formatDateDisplay:e=>e.toLocaleDateString("en-US",{month:"short",day:"numeric"}),getWeekNumber:e=>{const t=new Date(e.getFullYear(),0,1),n=(e.getTime()-t.getTime())/864e5;return Math.ceil((n+t.getDay()+1)/7)},getWeekOfMonth:e=>{const n=new Date(e.getFullYear(),e.getMonth(),1).getDay(),r=e.getDate()+n-1;return Math.ceil(r/7)}},Ty=["08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00"],ky=["Monday","Tuesday","Wednesday","Thursday","Friday"],Oy=[{name:"Blue",value:"bg-blue-500"},{name:"Green",value:"bg-emerald-500"},{name:"Purple",value:"bg-purple-500"},{name:"Orange",value:"bg-orange-500"},{name:"Pink",value:"bg-pink-500"}];function _y({title:e="Weekly Schedule",subtitle:t,events:n,onEventAdd:r,onEventUpdate:o,onEventDelete:s,className:i,timeSlots:c=Ty,daysOfWeek:u=ky,showAddButton:d=!0,eventColors:p=Oy,customFields:f=[],showWeekNavigation:h=!1,showHalfHourLines:g=!0,showCurrentTimeIndicator:v=!0,slotHeight:m=85}){const[x,y]=U.useState(!1),[b,S]=U.useState(null),[w,T]=U.useState({title:"",day:"",startTime:"",endTime:"",color:"bg-blue-500",description:"",recurrenceType:"none",specificDate:"",scheduleMode:"day"}),[V,k]=U.useState(new Date),P=h?Fr.calculateWeekDates(V):[],M=(N,H,O)=>{if(O){S(O);const L={title:O.title,day:O.day,startTime:O.startTime,endTime:O.endTime,color:O.color,description:O.description||"",recurrenceType:O.recurrenceType||"none",specificDate:O.specificDate||"",scheduleMode:O.specificDate?"date":"day"};f.forEach(A=>{const _=O[A.key];L[A.key]=_ instanceof Date?_.toISOString():_||(A.type==="number"?0:"")}),T(L)}else{S(null);const L={title:"",day:N||"",startTime:H||"",endTime:"",color:"bg-blue-500",description:"",recurrenceType:"none",specificDate:"",scheduleMode:"day"};f.forEach(A=>{L[A.key]=A.type==="number"?0:""}),T(L)}y(!0)},E=()=>{if(!w.title||!w.day||!w.startTime||!w.endTime)return;const N={...w,id:b?.id||Date.now().toString()};b?o?.(N):r?.(w),y(!1)},D=()=>{b&&(s?.(b.id),y(!1))},C=(N,H)=>n.filter(O=>{if(O.day!==N)return!1;const L=parseInt(O.startTime.replace(":","")),A=parseInt(H.replace(":",""));return L===A}),W=N=>{const[H,O]=N.startTime.split(":").map(Number),[L,A]=N.endTime.split(":").map(Number),_=H*60+O,Y=(L*60+A-_)/60,q=Math.max(4,m*.1);return Y*m-q};return a.jsxs(a.Fragment,{children:[a.jsxs(xo,{className:F("w-full",i),children:[a.jsx(vo,{className:"pb-6 bg-gradient-to-r from-slate-50 to-gray-50 border-b border-gray-100",children:a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs("div",{children:[a.jsx(yo,{className:"text-2xl",children:e}),t&&a.jsx("p",{className:"text-sm text-gray-500 mt-1",children:t})]}),a.jsxs("div",{className:"flex items-center gap-4",children:[h&&a.jsx(cl,{onWeekChange:k,initialDate:V}),d&&a.jsxs(G,{onClick:()=>M(),className:"gap-2",children:[a.jsx(_o,{className:"h-4 w-4"}),"Add Event"]})]})]})}),a.jsx(bo,{className:"p-0",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("div",{className:"min-w-[800px]",children:[a.jsxs("div",{className:"grid border-b border-gray-200",style:{gridTemplateColumns:`80px repeat(${u.length}, 1fr)`},children:[a.jsx("div",{className:"p-3 bg-gray-50 border-r border-gray-200",children:a.jsx("span",{className:"text-xs font-medium text-gray-500",children:"Time"})}),u.map((N,H)=>{const O=new Date,L=h&&P[H],A=L&&L.getDate()===O.getDate()&&L.getMonth()===O.getMonth()&&L.getFullYear()===O.getFullYear();return a.jsxs("div",{className:"p-4 text-center border-r border-gray-200 last:border-r-0 bg-gray-50 hover:bg-white/50 transition-colors",children:[a.jsx("div",{className:`font-semibold text-sm ${A?"text-blue-600":"text-gray-800"}`,children:N}),h&&L&&a.jsx("div",{className:`text-xs mt-1 font-medium ${A?"text-blue-600 font-bold":"text-gray-500"}`,children:Fr.formatDateDisplay(L)})]},N)})]}),c.map(N=>{const H=new Date,O=H.getHours(),L=H.getMinutes(),[A,_]=N.split(":"),Q=parseInt(_||"0"),Y=parseInt(A||"0")*60+Q,q=Y+60,X=O*60+L,ce=X>=Y&&X<q,ee=(X-Y)/60*m;return a.jsxs("div",{className:"grid border-b border-gray-100 last:border-b-0",style:{gridTemplateColumns:`80px repeat(${u.length}, 1fr)`},children:[a.jsx("div",{className:"p-2 bg-gray-50/50 border-r border-gray-200",children:a.jsx("span",{className:"text-xs text-gray-600",children:N})}),u.map((ae,te)=>{const ne=C(ae,N),R=new Date,B=h&&P[te],re=B?B.getDate()===R.getDate()&&B.getMonth()===R.getMonth()&&B.getFullYear()===R.getFullYear():!1;return a.jsxs("div",{className:"relative border-r border-gray-200 last:border-r-0 hover:bg-blue-50/30 cursor-pointer transition-colors",style:{minHeight:`${m}px`},onClick:()=>!ne.length&&M(ae,N),children:[g&&a.jsx("div",{className:"absolute top-1/2 left-0 right-0 h-px bg-gray-200/60 z-[5]"}),ne.map(K=>{const ge=W(K),fe=ge<40;return a.jsx("div",{className:F("absolute rounded-md text-white cursor-pointer hover:scale-[1.02] transition-transform overflow-visible",K.color,fe?"inset-x-1 py-0.5 px-1":"inset-1 p-2"),style:{height:`${ge}px`,zIndex:10,minHeight:fe?"auto":void 0},onClick:xe=>{xe.stopPropagation(),M(void 0,void 0,K)},children:fe?a.jsxs("div",{className:"flex items-center justify-between gap-1",children:[a.jsx("div",{className:"font-semibold truncate text-[10px] leading-tight flex-1",children:K.title}),a.jsxs("div",{className:"text-[9px] opacity-80 whitespace-nowrap",children:[K.startTime,"-",K.endTime]})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"text-xs font-semibold truncate",children:K.title}),f.filter(xe=>xe.showInCard&&K[xe.key]).map(xe=>a.jsxs("div",{className:"text-xs opacity-90 flex items-center gap-1 mt-1",children:[xe.icon,a.jsx("span",{className:"truncate",children:K[xe.key]instanceof Date?K[xe.key].toLocaleString():String(K[xe.key]||"")})]},xe.key)),a.jsx("div",{className:"text-xs opacity-80 mt-1",children:a.jsxs("span",{children:[K.startTime,"-",K.endTime]})})]})},K.id)}),v&&re&&ce&&a.jsxs("div",{className:"absolute left-0 right-0 flex items-center z-20",style:{top:`${ee-8}px`},children:[a.jsx("div",{className:"h-[3px] bg-red-500 absolute -left-14 right-0"}),a.jsxs("div",{className:"bg-red-500 text-white text-xs px-2 py-0.5 rounded font-bold whitespace-nowrap relative z-30 -ml-14",children:[H.getHours(),":",H.getMinutes().toString().padStart(2,"0")]})]}),!ne.length&&a.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity",children:a.jsx(_o,{className:"h-5 w-5 text-gray-400"})})]},`${ae}-${N}`)})]},N)})]})})})]}),a.jsx(Dy,{isOpen:x,onClose:()=>y(!1),title:b?"Edit Event":"Add New Event",children:a.jsxs("div",{className:"space-y-4 p-6",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{className:"text-sm font-medium",children:"Schedule Type"}),a.jsxs(dt,{value:String(w.scheduleMode),onValueChange:N=>T({...w,scheduleMode:N}),children:[a.jsx(Je,{children:a.jsx(ft,{placeholder:"Select schedule type"})}),a.jsxs(Ze,{children:[a.jsx(Be,{value:"day",children:"By Day (Monday, Tuesday, etc.)"}),a.jsx(Be,{value:"date",children:"By Date (Specific date)"})]})]}),a.jsx("p",{className:"text-xs text-gray-500",children:w.scheduleMode==="day"?"Schedule by day of the week (e.g., every Monday)":"Schedule by specific date (e.g., January 15, 2025)"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{htmlFor:"title",children:"Title *"}),a.jsx(He,{id:"title",value:String(w.title),onChange:N=>T({...w,title:N.target.value}),placeholder:"Event title"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[w.scheduleMode==="day"?a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{children:"Day *"}),a.jsxs(dt,{value:String(w.day),onValueChange:N=>T({...w,day:N}),children:[a.jsx(Je,{children:a.jsx(ft,{placeholder:"Select day"})}),a.jsx(Ze,{children:u.map(N=>a.jsx(Be,{value:N,children:N},N))})]})]}):a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{htmlFor:"specificDate",children:"Date *"}),a.jsx(He,{id:"specificDate",type:"date",value:String(w.specificDate),onChange:N=>T({...w,specificDate:N.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{htmlFor:"startTime",children:"Start Time *"}),a.jsx(He,{id:"startTime",type:"time",value:String(w.startTime),onChange:N=>T({...w,startTime:N.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{htmlFor:"endTime",children:"End Time *"}),a.jsx(He,{id:"endTime",type:"time",value:String(w.endTime),onChange:N=>T({...w,endTime:N.target.value})})]})]}),f.length>0&&a.jsx("div",{className:"grid grid-cols-2 gap-4",children:f.map(N=>a.jsxs("div",{className:"space-y-2",children:[a.jsxs(Ne,{htmlFor:N.key,children:[N.label," ",N.required&&"*"]}),N.type==="select"?a.jsxs(dt,{value:String(w[N.key]||""),onValueChange:H=>T({...w,[N.key]:H}),children:[a.jsx(Je,{children:a.jsx(ft,{placeholder:N.placeholder||`Select ${N.label}`})}),a.jsx(Ze,{children:N.options?.map(H=>a.jsx(Be,{value:H.value,children:H.label},H.value))})]}):a.jsx(He,{id:N.key,type:N.type,value:N.type==="number"?Number(w[N.key]||0):String(w[N.key]||""),onChange:H=>T({...w,[N.key]:N.type==="number"?parseInt(H.target.value)||0:H.target.value}),placeholder:N.placeholder})]},N.key))}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"checkbox",id:"isRecurring",checked:w.recurrenceType!=="none",onChange:N=>{N.target.checked?T({...w,recurrenceType:w.scheduleMode==="day"?"weekly":"monthly"}):T({...w,recurrenceType:"none"})},className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 focus:ring-2"}),a.jsx(Ne,{htmlFor:"isRecurring",className:"text-sm font-medium text-gray-700 cursor-pointer",children:w.scheduleMode==="day"?"Repeat every week on this day":"Repeat every month on this date"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{children:"Color"}),a.jsxs(dt,{value:String(w.color),onValueChange:N=>T({...w,color:N}),children:[a.jsx(Je,{children:a.jsx(ft,{})}),a.jsx(Ze,{children:p.map(N=>a.jsx(Be,{value:N.value,children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:F("w-4 h-4 rounded",N.value)}),N.name]})},N.value))})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{htmlFor:"description",children:"Description"}),a.jsx(He,{id:"description",value:String(w.description||""),onChange:N=>T({...w,description:N.target.value}),placeholder:"Optional description"})]}),a.jsxs("div",{className:"flex gap-2 pt-4",children:[b&&a.jsxs(G,{variant:"destructive",onClick:D,className:"gap-2",children:[a.jsx(Bu,{className:"h-4 w-4"}),"Delete"]}),a.jsx("div",{className:"flex-1"}),a.jsx(G,{variant:"outline",onClick:()=>y(!1),children:"Cancel"}),a.jsxs(G,{onClick:E,children:[b?"Update":"Add"," Event"]})]})]})})]})}exports.Button=G;exports.Calendar=Dx;exports.Card=xo;exports.CardContent=bo;exports.CardDescription=kc;exports.CardFooter=Oc;exports.CardHeader=vo;exports.CardTitle=yo;exports.Checkbox=In;exports.DataGrid=wg;exports.DataGridColumnHeader=hx;exports.DataGridPagination=mx;exports.DataGridTable=Cg;exports.DataGridTableRowSelect=xx;exports.DataGridTableRowSelectAll=gx;exports.DataTable=bg;exports.DatePicker=sy;exports.DropdownMenu=sg;exports.DropdownMenuCheckboxItem=dg;exports.DropdownMenuContent=cg;exports.DropdownMenuGroup=lg;exports.DropdownMenuItem=ug;exports.DropdownMenuLabel=mg;exports.DropdownMenuPortal=ag;exports.DropdownMenuRadioGroup=fg;exports.DropdownMenuRadioItem=pg;exports.DropdownMenuSeparator=hg;exports.DropdownMenuShortcut=gg;exports.DropdownMenuSub=xg;exports.DropdownMenuSubContent=yg;exports.DropdownMenuSubTrigger=vg;exports.DropdownMenuTrigger=ig;exports.Input=He;exports.Label=Ne;exports.Modal=nl;exports.Popover=ho;exports.PopoverAnchor=oy;exports.PopoverContent=or;exports.PopoverTrigger=go;exports.Schedule=_y;exports.Select=dt;exports.SelectContent=Ze;exports.SelectGroup=px;exports.SelectItem=Be;exports.SelectLabel=uc;exports.SelectSeparator=dc;exports.SelectTrigger=Je;exports.SelectValue=ft;exports.Separator=Bs;exports.SortableHeader=Ex;exports.Table=$n;exports.TableBody=Ln;exports.TableCaption=Uu;exports.TableCell=pt;exports.TableContent=Sx;exports.TableFooter=Gu;exports.TableHead=Wn;exports.TableHeader=Fn;exports.TableNavigator=Nx;exports.TableRoot=vx;exports.TableRow=Ie;exports.TableWrapper=yx;exports.TimePicker=ay;exports.WeekNavigator=cl;exports.cn=F;exports.useDataGrid=_t;exports.weekNavigatorUtils=Fr;
|
|
50
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Sb="DialogDescriptionWarning",Cb=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wl(Sb).contentName}}.`;return l.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Nb=cl,Eb=dl,Sl=fl,Cl=pl,Nl=hl,El=xl,jb=vl;const jl=Nb,Rb=Eb,Rl=l.forwardRef(({className:e,...t},n)=>a.jsx(Sl,{ref:n,className:V("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Rl.displayName=Sl.displayName;const Pl=l.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(Rb,{children:[a.jsx(Rl,{}),a.jsxs(Cl,{ref:r,className:V("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white 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%] rounded-lg",e),...n,children:[t,a.jsxs(jb,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100",children:[a.jsx(Zu,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pl.displayName=Cl.displayName;const Ml=({className:e,...t})=>a.jsx("div",{className:V("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ml.displayName="ModalHeader";const kl=l.forwardRef(({className:e,...t},n)=>a.jsx(Nl,{ref:n,className:V("text-lg font-semibold leading-none tracking-tight",e),...t}));kl.displayName=Nl.displayName;const Dl=l.forwardRef(({className:e,...t},n)=>a.jsx(El,{ref:n,className:V("text-sm text-gray-500",e),...t}));Dl.displayName=El.displayName;function Pb({isOpen:e,onClose:t,title:n,description:r,children:o,className:s}){return a.jsx(jl,{open:e,onOpenChange:t,children:a.jsxs(Pl,{className:s,children:[(n||r)&&a.jsxs(Ml,{children:[n&&a.jsx(kl,{children:n}),r&&a.jsx(Dl,{children:r})]}),o]})})}const Dr=["January","February","March","April","May","June","July","August","September","October","November","December"];function Tl({onWeekChange:e,initialDate:t=new Date,className:n,compact:r=!1}){const[o,s]=l.useState(t),[i,c]=l.useState(!1),[u,d]=l.useState(!1),[p,f]=l.useState(!1),[h,g]=l.useState(t.getFullYear()),[y,m]=l.useState(t.getMonth()),[x,v]=l.useState(0),w=l.useRef(null),C=l.useRef(null),S=k=>{const P=[],L=new Date(k),N=L.getDay(),W=N===0?-6:1-N;L.setDate(L.getDate()+W);for(let _=0;_<7;_++){const F=new Date(L);F.setDate(L.getDate()+_),P.push(F)}return P},T=(k,P)=>{const L=new Date(k,P,1),N=new Date(k,P+1,0),W=new Date(L);W.setDate(L.getDate()-(L.getDay()+6)%7);const _=[],F=new Date(W);for(;F<=N||F.getMonth()===P;){const M=new Date(F);if(M.setDate(F.getDate()+6),_.push({start:new Date(F),end:new Date(M)}),F.setDate(F.getDate()+7),_.length>6)break}return _},I=(k,P)=>{const L=k.toLocaleDateString("en-US",{month:"short"}),N=P.toLocaleDateString("en-US",{month:"short"});return L===N?`${L} ${k.getDate()}-${P.getDate()}`:`${L} ${k.getDate()}-${N} ${P.getDate()}`},O=S(o),b=Array.from({length:10},(k,P)=>h-5+P),j=k=>{const P=new Date(o);P.setDate(o.getDate()+(k==="next"?7:-7)),s(P),g(P.getFullYear()),m(P.getMonth()),e?.(P)},E=(k,P)=>{v(P),c(!1),s(k.start),e?.(k.start)};return l.useEffect(()=>{const k=P=>{w.current&&!w.current.contains(P.target)&&C.current&&!C.current.contains(P.target)&&(c(!1),d(!1),f(!1))};return i&&document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[i]),l.useEffect(()=>{const P=T(h,y).findIndex(L=>o>=L.start&&o<=L.end);P!==-1&&v(P)},[o,h,y]),a.jsxs("div",{className:V("flex items-center gap-3",n),children:[a.jsx(q,{variant:"outline",size:"sm",onClick:()=>j("prev"),className:V("rounded-lg border-gray-200 hover:border-gray-300 hover:bg-gray-50",r?"h-8 w-8 p-0":"h-9 w-9 p-0"),children:a.jsx(Le,{className:V(r?"h-3 w-3":"h-4 w-4","text-gray-600")})}),a.jsxs("div",{className:"relative",children:[a.jsxs("div",{ref:C,className:V("flex items-center gap-2 bg-white rounded-lg border border-gray-200 shadow-sm cursor-pointer hover:bg-gray-50 transition-colors",r?"px-2 py-1":"px-3 py-2"),onClick:()=>c(!i),children:[a.jsx(Xr,{className:V(r?"h-3 w-3":"h-4 w-4","text-gray-500")}),a.jsx("span",{className:V(r?"text-xs":"text-sm","font-medium text-gray-700"),children:O.length>=7&&O[0]&&O[6]&&`${O[0].getDate()}-${O[6].getDate()} ${Dr[O[0].getMonth()]} ${O[0].getFullYear()}`}),a.jsx(Ee,{className:V(r?"h-2 w-2":"h-3 w-3","text-gray-400 transition-transform",i&&"rotate-90")})]}),i&&a.jsxs("div",{ref:w,className:"absolute top-full right-0 mt-2 bg-white border border-gray-200 rounded-lg shadow-lg p-4 z-50 w-80 sm:w-96",children:[!u&&!p&&a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>{const k=y===0?11:y-1,P=y===0?h-1:h;m(k),g(P)},className:"h-8 w-8 p-0",children:a.jsx(Le,{className:"h-4 w-4"})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{className:"text-lg font-semibold text-gray-800 hover:text-blue-600 transition-colors",onClick:()=>d(!u),children:Dr[y]}),a.jsx("button",{className:"text-lg font-semibold text-gray-800 hover:text-blue-600 transition-colors",onClick:()=>f(!p),children:h})]}),a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>{const k=y===11?0:y+1,P=y===11?h+1:h;m(k),g(P)},className:"h-8 w-8 p-0",children:a.jsx(Ee,{className:"h-4 w-4"})})]}),u?a.jsxs("div",{className:"p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>d(!1),className:"h-9 px-3 text-sm font-medium",children:"← Back"}),a.jsx("span",{className:"text-lg font-semibold",children:h})]}),a.jsx("div",{className:"grid grid-cols-3 gap-2",children:Dr.map((k,P)=>a.jsx("button",{className:V("h-11 w-full text-sm font-medium rounded-xl transition-all",y===P?"bg-blue-500 text-white":"text-gray-600 hover:bg-gray-50"),onClick:()=>{m(P),d(!1)},children:k},k))})]}):p?a.jsxs("div",{className:"p-6",children:[a.jsx("div",{className:"flex items-center justify-start mb-4",children:a.jsx(q,{variant:"ghost",size:"sm",onClick:()=>f(!1),className:"h-9 px-3 text-sm font-medium",children:"← Back"})}),a.jsx("div",{className:"grid grid-cols-4 gap-2 max-h-64 overflow-y-auto",children:b.map(k=>a.jsx("button",{className:V("h-11 w-full text-sm font-medium rounded-xl transition-all",h===k?"bg-blue-500 text-white":"text-gray-600 hover:bg-gray-50"),onClick:()=>{g(k),f(!1),d(!0)},children:k},k))})]}):a.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-64 overflow-y-auto",children:T(h,y).map((k,P)=>{const L=new Date>=k.start&&new Date<=k.end,N=x===P;return a.jsx("button",{className:V("w-full p-3 text-left rounded-lg border transition-all",N?"bg-blue-500 text-white border-blue-500":L?"bg-white text-blue-600 border-blue-500":"bg-white border-gray-200 text-gray-700 hover:border-blue-300"),onClick:()=>E(k,P),children:a.jsxs("div",{className:"flex flex-col",children:[a.jsxs("div",{className:V("font-medium text-sm",N?"text-white":"text-gray-800"),children:["Week ",P+1]}),a.jsx("div",{className:V("text-xs",N?"text-blue-100":"text-gray-500"),children:I(k.start,k.end)})]})},P)})}),a.jsx("div",{className:"flex gap-2 pt-3 border-t border-gray-100 mt-3",children:a.jsx(q,{size:"sm",variant:"outline",className:"flex-1",onClick:()=>{const k=new Date;s(k),c(!1),d(!1),f(!1),e?.(k)},children:"This Week"})})]})]}),a.jsx(q,{variant:"outline",size:"sm",onClick:()=>j("next"),className:V("rounded-lg border-gray-200 hover:border-gray-300 hover:bg-gray-50",r?"h-8 w-8 p-0":"h-9 w-9 p-0"),children:a.jsx(Ee,{className:V(r?"h-3 w-3":"h-4 w-4","text-gray-600")})})]})}const Gr={calculateWeekDates:e=>{const t=[],n=new Date(e),r=n.getDay(),o=r===0?-6:1-r;n.setDate(n.getDate()+o);for(let s=0;s<7;s++){const i=new Date(n);i.setDate(n.getDate()+s),t.push(i)}return t},formatDateDisplay:e=>e.toLocaleDateString("en-US",{month:"short",day:"numeric"}),getWeekNumber:e=>{const t=new Date(e.getFullYear(),0,1),n=(e.getTime()-t.getTime())/864e5;return Math.ceil((n+t.getDay()+1)/7)},getWeekOfMonth:e=>{const n=new Date(e.getFullYear(),e.getMonth(),1).getDay(),r=e.getDate()+n-1;return Math.ceil(r/7)}},Mb=["08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00"],kb=["Monday","Tuesday","Wednesday","Thursday","Friday"],Db=[{name:"Blue",value:"bg-blue-500"},{name:"Green",value:"bg-emerald-500"},{name:"Purple",value:"bg-purple-500"},{name:"Orange",value:"bg-orange-500"},{name:"Pink",value:"bg-pink-500"}];function Tb({title:e="Weekly Schedule",subtitle:t,events:n,onEventAdd:r,onEventUpdate:o,onEventDelete:s,className:i,timeSlots:c=Mb,daysOfWeek:u=kb,showAddButton:d=!0,eventColors:p=Db,customFields:f=[],showWeekNavigation:h=!1,showHalfHourLines:g=!0,showCurrentTimeIndicator:y=!0,slotHeight:m=85}){const[x,v]=J.useState(!1),[w,C]=J.useState(null),[S,T]=J.useState({title:"",day:"",startTime:"",endTime:"",color:"bg-blue-500",description:"",recurrenceType:"none",specificDate:"",scheduleMode:"day"}),[I,O]=J.useState(new Date),b=h?Gr.calculateWeekDates(I):[],j=(N,W,_)=>{if(_){C(_);const F={title:_.title,day:_.day,startTime:_.startTime,endTime:_.endTime,color:_.color,description:_.description||"",recurrenceType:_.recurrenceType||"none",specificDate:_.specificDate||"",scheduleMode:_.specificDate?"date":"day"};f.forEach(M=>{const $=_[M.key];F[M.key]=$ instanceof Date?$.toISOString():$||(M.type==="number"?0:"")}),T(F)}else{C(null);const F={title:"",day:N||"",startTime:W||"",endTime:"",color:"bg-blue-500",description:"",recurrenceType:"none",specificDate:"",scheduleMode:"day"};f.forEach(M=>{F[M.key]=M.type==="number"?0:""}),T(F)}v(!0)},E=()=>{if(!S.title||!S.day||!S.startTime||!S.endTime)return;const N={...S,id:w?.id||Date.now().toString()};w?o?.(N):r?.(S),v(!1)},k=()=>{w&&(s?.(w.id),v(!1))},P=(N,W)=>n.filter(_=>{if(_.day!==N)return!1;const F=parseInt(_.startTime.replace(":","")),M=parseInt(W.replace(":",""));return F===M}),L=N=>{const[W,_]=N.startTime.split(":").map(Number),[F,M]=N.endTime.split(":").map(Number),$=W*60+_,z=(F*60+M-$)/60,K=Math.max(4,m*.1);return z*m-K};return a.jsxs(a.Fragment,{children:[a.jsxs(Eo,{className:V("w-full",i),children:[a.jsx(jo,{className:"pb-6 bg-gradient-to-r from-slate-50 to-gray-50 border-b border-gray-100",children:a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs("div",{children:[a.jsx(Ro,{className:"text-2xl",children:e}),t&&a.jsx("p",{className:"text-sm text-gray-500 mt-1",children:t})]}),a.jsxs("div",{className:"flex items-center gap-4",children:[h&&a.jsx(Tl,{onWeekChange:O,initialDate:I}),d&&a.jsxs(q,{onClick:()=>j(),className:"gap-2",children:[a.jsx(Ko,{className:"h-4 w-4"}),"Add Event"]})]})]})}),a.jsx(Po,{className:"p-0",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("div",{className:"min-w-[800px]",children:[a.jsxs("div",{className:"grid border-b border-gray-200",style:{gridTemplateColumns:`80px repeat(${u.length}, 1fr)`},children:[a.jsx("div",{className:"p-3 bg-gray-50 border-r border-gray-200",children:a.jsx("span",{className:"text-xs font-medium text-gray-500",children:"Time"})}),u.map((N,W)=>{const _=new Date,F=h&&b[W],M=F&&F.getDate()===_.getDate()&&F.getMonth()===_.getMonth()&&F.getFullYear()===_.getFullYear();return a.jsxs("div",{className:"p-4 text-center border-r border-gray-200 last:border-r-0 bg-gray-50 hover:bg-white/50 transition-colors",children:[a.jsx("div",{className:`font-semibold text-sm ${M?"text-blue-600":"text-gray-800"}`,children:N}),h&&F&&a.jsx("div",{className:`text-xs mt-1 font-medium ${M?"text-blue-600 font-bold":"text-gray-500"}`,children:Gr.formatDateDisplay(F)})]},N)})]}),c.map(N=>{const W=new Date,_=W.getHours(),F=W.getMinutes(),[M,$]=N.split(":"),re=parseInt($||"0"),z=parseInt(M||"0")*60+re,K=z+60,X=_*60+F,le=X>=z&&X<K,Q=(X-z)/60*m;return a.jsxs("div",{className:"grid border-b border-gray-100 last:border-b-0",style:{gridTemplateColumns:`80px repeat(${u.length}, 1fr)`},children:[a.jsx("div",{className:"p-2 bg-gray-50/50 border-r border-gray-200",children:a.jsx("span",{className:"text-xs text-gray-600",children:N})}),u.map((oe,ee)=>{const te=P(oe,N),R=new Date,U=h&&b[ee],se=U?U.getDate()===R.getDate()&&U.getMonth()===R.getMonth()&&U.getFullYear()===R.getFullYear():!1;return a.jsxs("div",{className:"relative border-r border-gray-200 last:border-r-0 hover:bg-blue-50/30 cursor-pointer transition-colors",style:{minHeight:`${m}px`},onClick:()=>!te.length&&j(oe,N),children:[g&&a.jsx("div",{className:"absolute top-1/2 left-0 right-0 h-px bg-gray-200/60 z-[5]"}),te.map(Z=>{const xe=L(Z),pe=xe<40;return a.jsx("div",{className:V("absolute rounded-md text-white cursor-pointer hover:scale-[1.02] transition-transform overflow-visible",Z.color,pe?"inset-x-1 py-0.5 px-1":"inset-1 p-2"),style:{height:`${xe}px`,zIndex:10,minHeight:pe?"auto":void 0},onClick:ye=>{ye.stopPropagation(),j(void 0,void 0,Z)},children:pe?a.jsxs("div",{className:"flex items-center justify-between gap-1",children:[a.jsx("div",{className:"font-semibold truncate text-[10px] leading-tight flex-1",children:Z.title}),a.jsxs("div",{className:"text-[9px] opacity-80 whitespace-nowrap",children:[Z.startTime,"-",Z.endTime]})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"text-xs font-semibold truncate",children:Z.title}),f.filter(ye=>ye.showInCard&&Z[ye.key]).map(ye=>a.jsxs("div",{className:"text-xs opacity-90 flex items-center gap-1 mt-1",children:[ye.icon,a.jsx("span",{className:"truncate",children:Z[ye.key]instanceof Date?Z[ye.key].toLocaleString():String(Z[ye.key]||"")})]},ye.key)),a.jsx("div",{className:"text-xs opacity-80 mt-1",children:a.jsxs("span",{children:[Z.startTime,"-",Z.endTime]})})]})},Z.id)}),y&&se&&le&&a.jsxs("div",{className:"absolute left-0 right-0 flex items-center z-20",style:{top:`${Q-8}px`},children:[a.jsx("div",{className:"h-[3px] bg-red-500 absolute -left-14 right-0"}),a.jsxs("div",{className:"bg-red-500 text-white text-xs px-2 py-0.5 rounded font-bold whitespace-nowrap relative z-30 -ml-14",children:[W.getHours(),":",W.getMinutes().toString().padStart(2,"0")]})]}),!te.length&&a.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity",children:a.jsx(Ko,{className:"h-5 w-5 text-gray-400"})})]},`${oe}-${N}`)})]},N)})]})})})]}),a.jsx(Pb,{isOpen:x,onClose:()=>v(!1),title:w?"Edit Event":"Add New Event",children:a.jsxs("div",{className:"space-y-4 p-6",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{className:"text-sm font-medium",children:"Schedule Type"}),a.jsxs(dt,{value:String(S.scheduleMode),onValueChange:N=>T({...S,scheduleMode:N}),children:[a.jsx(Je,{children:a.jsx(ft,{placeholder:"Select schedule type"})}),a.jsxs(Ze,{children:[a.jsx(He,{value:"day",children:"By Day (Monday, Tuesday, etc.)"}),a.jsx(He,{value:"date",children:"By Date (Specific date)"})]})]}),a.jsx("p",{className:"text-xs text-gray-500",children:S.scheduleMode==="day"?"Schedule by day of the week (e.g., every Monday)":"Schedule by specific date (e.g., January 15, 2025)"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{htmlFor:"title",children:"Title *"}),a.jsx(ze,{id:"title",value:String(S.title),onChange:N=>T({...S,title:N.target.value}),placeholder:"Event title"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[S.scheduleMode==="day"?a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{children:"Day *"}),a.jsxs(dt,{value:String(S.day),onValueChange:N=>T({...S,day:N}),children:[a.jsx(Je,{children:a.jsx(ft,{placeholder:"Select day"})}),a.jsx(Ze,{children:u.map(N=>a.jsx(He,{value:N,children:N},N))})]})]}):a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{htmlFor:"specificDate",children:"Date *"}),a.jsx(ze,{id:"specificDate",type:"date",value:String(S.specificDate),onChange:N=>T({...S,specificDate:N.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{htmlFor:"startTime",children:"Start Time *"}),a.jsx(ze,{id:"startTime",type:"time",value:String(S.startTime),onChange:N=>T({...S,startTime:N.target.value})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{htmlFor:"endTime",children:"End Time *"}),a.jsx(ze,{id:"endTime",type:"time",value:String(S.endTime),onChange:N=>T({...S,endTime:N.target.value})})]})]}),f.length>0&&a.jsx("div",{className:"grid grid-cols-2 gap-4",children:f.map(N=>a.jsxs("div",{className:"space-y-2",children:[a.jsxs(Ne,{htmlFor:N.key,children:[N.label," ",N.required&&"*"]}),N.type==="select"?a.jsxs(dt,{value:String(S[N.key]||""),onValueChange:W=>T({...S,[N.key]:W}),children:[a.jsx(Je,{children:a.jsx(ft,{placeholder:N.placeholder||`Select ${N.label}`})}),a.jsx(Ze,{children:N.options?.map(W=>a.jsx(He,{value:W.value,children:W.label},W.value))})]}):a.jsx(ze,{id:N.key,type:N.type,value:N.type==="number"?Number(S[N.key]||0):String(S[N.key]||""),onChange:W=>T({...S,[N.key]:N.type==="number"?parseInt(W.target.value)||0:W.target.value}),placeholder:N.placeholder})]},N.key))}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"checkbox",id:"isRecurring",checked:S.recurrenceType!=="none",onChange:N=>{N.target.checked?T({...S,recurrenceType:S.scheduleMode==="day"?"weekly":"monthly"}):T({...S,recurrenceType:"none"})},className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 focus:ring-2"}),a.jsx(Ne,{htmlFor:"isRecurring",className:"text-sm font-medium text-gray-700 cursor-pointer",children:S.scheduleMode==="day"?"Repeat every week on this day":"Repeat every month on this date"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{children:"Color"}),a.jsxs(dt,{value:String(S.color),onValueChange:N=>T({...S,color:N}),children:[a.jsx(Je,{children:a.jsx(ft,{})}),a.jsx(Ze,{children:p.map(N=>a.jsx(He,{value:N.value,children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:V("w-4 h-4 rounded",N.value)}),N.name]})},N.value))})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ne,{htmlFor:"description",children:"Description"}),a.jsx(ze,{id:"description",value:String(S.description||""),onChange:N=>T({...S,description:N.target.value}),placeholder:"Optional description"})]}),a.jsxs("div",{className:"flex gap-2 pt-4",children:[w&&a.jsxs(q,{variant:"destructive",onClick:k,className:"gap-2",children:[a.jsx(Xu,{className:"h-4 w-4"}),"Delete"]}),a.jsx("div",{className:"flex-1"}),a.jsx(q,{variant:"outline",onClick:()=>v(!1),children:"Cancel"}),a.jsxs(q,{onClick:E,children:[w?"Update":"Add"," Event"]})]})]})})]})}exports.Button=q;exports.Calendar=jy;exports.Card=Eo;exports.CardContent=Po;exports.CardDescription=nl;exports.CardFooter=rl;exports.CardHeader=jo;exports.CardTitle=Ro;exports.Checkbox=Vn;exports.DataGrid=xx;exports.DataGridColumnHeader=dy;exports.DataGridPagination=uy;exports.DataGridTable=yx;exports.DataGridTableRowSelect=py;exports.DataGridTableRowSelectAll=fy;exports.DataTable=gx;exports.DatePicker=rb;exports.DropdownMenu=tx;exports.DropdownMenuCheckboxItem=ix;exports.DropdownMenuContent=ox;exports.DropdownMenuGroup=sx;exports.DropdownMenuItem=ax;exports.DropdownMenuLabel=ux;exports.DropdownMenuPortal=nx;exports.DropdownMenuRadioGroup=cx;exports.DropdownMenuRadioItem=lx;exports.DropdownMenuSeparator=dx;exports.DropdownMenuShortcut=fx;exports.DropdownMenuSub=px;exports.DropdownMenuSubContent=hx;exports.DropdownMenuSubTrigger=mx;exports.DropdownMenuTrigger=rx;exports.Input=ze;exports.Label=Ne;exports.Modal=jl;exports.Popover=Co;exports.PopoverAnchor=nb;exports.PopoverContent=lr;exports.PopoverTrigger=No;exports.Schedule=Tb;exports.Select=dt;exports.SelectContent=Ze;exports.SelectGroup=ly;exports.SelectItem=He;exports.SelectLabel=_c;exports.SelectSeparator=Ac;exports.SelectTrigger=Je;exports.SelectValue=ft;exports.Separator=pa;exports.SortableHeader=wy;exports.Table=Bn;exports.TableBody=Hn;exports.TableCaption=zd;exports.TableCell=pt;exports.TableContent=vy;exports.TableFooter=Bd;exports.TableHead=Yn;exports.TableHeader=zn;exports.TableNavigator=by;exports.TableRoot=my;exports.TableRow=$e;exports.TableWrapper=hy;exports.TimePicker=ob;exports.WeekNavigator=Tl;exports.cn=V;exports.conditionalStyle=Iv;exports.mergeStyles=Et;exports.useDataGrid=It;exports.weekNavigatorUtils=Gr;
|