@motiadev/ui 0.4.0-beta.90 → 0.4.0-beta.91-094835
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/components/ui/panel.d.ts +7 -0
- package/dist/components/ui/panel.d.ts.map +1 -1
- package/dist/components/ui/panel.stories.d.ts +8 -0
- package/dist/components/ui/panel.stories.d.ts.map +1 -1
- package/dist/index.cjs +23 -23
- package/dist/index.js +1780 -1727
- package/dist/ui.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(q,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],A):(q=typeof globalThis<"u"?globalThis:q||self,A(q.MotiaUI={},q.React,q.ReactDOM))})(this,function(q,A,
|
|
1
|
+
(function(q,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],A):(q=typeof globalThis<"u"?globalThis:q||self,A(q.MotiaUI={},q.React,q.ReactDOM))})(this,function(q,A,Cr){"use strict";function Sr(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 p=Sr(A),Er=Sr(Cr);var Nt={exports:{}},ut={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Pr;function qi(){if(Pr)return ut;Pr=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 a in o)a!=="key"&&(s[a]=o[a])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:i,ref:o!==void 0?o:null,props:s}}return ut.Fragment=t,ut.jsx=n,ut.jsxs=n,ut}var dt={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var kr;function Zi(){return kr||(kr=1,process.env.NODE_ENV!=="production"&&function(){function e(y){if(y==null)return null;if(typeof y=="function")return y.$$typeof===W?null:y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case h:return"Fragment";case x:return"Profiler";case b:return"StrictMode";case N:return"Suspense";case _:return"SuspenseList";case H:return"Activity"}if(typeof y=="object")switch(typeof y.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),y.$$typeof){case v:return"Portal";case w:return(y.displayName||"Context")+".Provider";case E:return(y._context.displayName||"Context")+".Consumer";case C:var L=y.render;return y=y.displayName,y||(y=L.displayName||L.name||"",y=y!==""?"ForwardRef("+y+")":"ForwardRef"),y;case S:return L=y.displayName||null,L!==null?L:e(y.type)||"Memo";case P:L=y._payload,y=y._init;try{return e(y(L))}catch{}}return null}function t(y){return""+y}function n(y){try{t(y);var L=!1}catch{L=!0}if(L){L=console;var K=L.error,k=typeof Symbol=="function"&&Symbol.toStringTag&&y[Symbol.toStringTag]||y.constructor.name||"Object";return K.call(L,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",k),t(y)}}function r(y){if(y===h)return"<>";if(typeof y=="object"&&y!==null&&y.$$typeof===P)return"<...>";try{var L=e(y);return L?"<"+L+">":"<...>"}catch{return"<...>"}}function o(){var y=U.A;return y===null?null:y.getOwner()}function s(){return Error("react-stack-top-frame")}function i(y){if(B.call(y,"key")){var L=Object.getOwnPropertyDescriptor(y,"key").get;if(L&&L.isReactWarning)return!1}return y.key!==void 0}function a(y,L){function K(){V||(V=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",L))}K.isReactWarning=!0,Object.defineProperty(y,"key",{get:K,configurable:!0})}function l(){var y=e(this.type);return $[y]||($[y]=!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.")),y=this.props.ref,y!==void 0?y:null}function u(y,L,K,k,I,j,F,M){return K=j.ref,y={$$typeof:g,type:y,key:L,props:j,_owner:I},(K!==void 0?K:null)!==null?Object.defineProperty(y,"ref",{enumerable:!1,get:l}):Object.defineProperty(y,"ref",{enumerable:!1,value:null}),y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(y,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(y,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:F}),Object.defineProperty(y,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y}function d(y,L,K,k,I,j,F,M){var O=L.children;if(O!==void 0)if(k)if(Q(O)){for(k=0;k<O.length;k++)c(O[k]);Object.freeze&&Object.freeze(O)}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 c(O);if(B.call(L,"key")){O=e(y);var Y=Object.keys(L).filter(function(ae){return ae!=="key"});k=0<Y.length?"{key: someKey, "+Y.join(": ..., ")+": ...}":"{key: someKey}",T[O+k]||(Y=0<Y.length?"{"+Y.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,k,O,Y,O),T[O+k]=!0)}if(O=null,K!==void 0&&(n(K),O=""+K),i(L)&&(n(L.key),O=""+L.key),"key"in L){K={};for(var te in L)te!=="key"&&(K[te]=L[te])}else K=L;return O&&a(K,typeof y=="function"?y.displayName||y.name||"Unknown":y),u(y,O,j,I,o(),K,$,M)}function c(y){typeof y=="object"&&y!==null&&y.$$typeof===h&&y._store&&(y._store.validated=1)}var f=A,h=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),w=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),W=Symbol.for("react.client.reference"),U=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,Q=Array.isArray,G=console.createTask?console.createTask:function(){return null};f={"react-stack-bottom-frame":function(y){return y()}};var V,F={},ee=f["react-stack-bottom-frame"].bind(f,s)(),R=G(r(s)),T={};dt.Fragment=m,dt.jsx=function(y,L,K,k,I){var j=1e4>U.recentlyCreatedOwnerStacks++;return d(y,L,K,!1,k,I,j?Error("react-stack-top-frame"):ee,j?G(r(y)):R)},dt.jsxs=function(y,L,K,k,I){var j=1e4>U.recentlyCreatedOwnerStacks++;return d(y,L,K,!0,k,I,j?Error("react-stack-top-frame"):ee,j?G(r(y)):R)}}()),dt}var Er;function Ji(){return Er||(Er=1,process.env.NODE_ENV==="production"?Nt.exports=qi():Nt.exports=Zi()),Nt.exports}var g=Ji();function Pr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _t(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Pr(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():Pr(e[o],null)}}}}function ue(...e){return p.useCallback(_t(...e),e)}function ft(e){const t=ea(e),n=p.forwardRef((r,o)=>{const{children:s,...i}=r,a=p.Children.toArray(s),l=a.find(na);if(l){const u=l.props.children,d=a.map(c=>c===l?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:c);return g.jsx(t,{...i,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,d):null})}return g.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Qi=ft("Slot");function ea(e){const t=p.forwardRef((n,r)=>{const{children:o,...s}=n;if(p.isValidElement(o)){const i=oa(o),a=ra(s,o.props);return o.type!==p.Fragment&&(a.ref=r?_t(r,i):i),p.cloneElement(o,a)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ta=Symbol("radix.slottable");function na(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ta}function ra(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]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function oa(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 kr(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=kr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Mr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=kr(e))&&(r&&(r+=" "),r+=t);return r}const Rr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ar=Mr,mn=(e,t)=>n=>{var r;if(t?.variants==null)return Ar(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const d=n?.[u],c=s?.[u];if(d===null)return null;const f=Rr(d)||Rr(c);return o[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:f,...h}=d;return Object.entries(h).every(v=>{let[m,b]=v;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...u,c,f]:u},[]);return Ar(e,i,l,n?.class,n?.className)},sa=mn("inline-flex items-center cursor-pointer justify-center gap-2 whitespace-nowrap rounded-md font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-secondary text-secondary-foreground hover:bg-input active:bg-secondary",accent:"bg-accent text-accent-foreground hover:bg-accent/90 active:bg-accent/80",light:"bg-background text-foreground border border-border hover:bg-muted active:bg-muted/80",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:opacity-90 active:opacity-80",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:opacity-90 active:opacity-80",outline:"border border-border bg-transparent hover:bg-muted hover:text-muted-foreground text-foreground",ghost:"hover:bg-muted-foreground/20 text-foreground",link:"text-primary underline-offset-4 hover:underline text-primary-foreground",icon:"hover:bg-muted-foreground/20 text-foreground rounded-full bg-muted-foreground/10"},size:{sm:"h-6 px-3 text-xs [&_svg]:size-3",default:"h-9 px-4 text-sm [&_svg]:size-4",md:"h-9 px-4 text-sm [&_svg]:size-4",lg:"h-11 px-6 text-base [&_svg]:size-5",icon:"h-9 w-9 [&_svg]:size-4"}},defaultVariants:{variant:"default",size:"default"}}),Pe=A.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?Qi:"button";return g.jsx(i,{className:sa({variant:t,size:n,className:e}),ref:s,...o})});Pe.displayName="Button";const gn="-",ia=e=>{const t=la(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(gn);return a[0]===""&&a.length!==1&&a.shift(),Nr(a,t)||aa(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},Nr=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Nr(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(gn);return t.validators.find(({validator:i})=>i(s))?.classGroupId},_r=/^\[(.+)\]$/,aa=e=>{if(_r.test(e)){const t=_r.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},la=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)hn(n[o],r,o,t);return r},hn=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Ir(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(ca(o)){hn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{hn(i,Ir(t,s),n,r)})})},Ir=(e,t)=>{let n=e;return t.split(gn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ca=e=>e.isThemeGetter,ua=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)}}},vn="!",bn=":",da=bn.length,fa=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,l=0,u;for(let v=0;v<o.length;v++){let m=o[v];if(i===0&&a===0){if(m===bn){s.push(o.slice(l,v)),l=v+da;continue}if(m==="/"){u=v;continue}}m==="["?i++:m==="]"?i--:m==="("?a++:m===")"&&a--}const d=s.length===0?o:o.substring(l),c=pa(d),f=c!==d,h=u&&u>l?u-l:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:c,maybePostfixModifierPosition:h}};if(t){const o=t+bn,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},pa=e=>e.endsWith(vn)?e.substring(0,e.length-1):e.startsWith(vn)?e.substring(1):e,ma=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},ga=e=>({cache:ua(e.cacheSize),parseClassName:fa(e),sortModifiers:ma(e),...ia(e)}),ha=/\s+/,va=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(ha);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:c,modifiers:f,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}=n(d);if(c){l=d+(l.length>0?" "+l:l);continue}let b=!!m,x=r(b?v.substring(0,m):v);if(!x){if(!b){l=d+(l.length>0?" "+l:l);continue}if(x=r(v),!x){l=d+(l.length>0?" "+l:l);continue}b=!1}const E=s(f).join(":"),w=h?E+vn:E,C=w+x;if(i.includes(C))continue;i.push(C);const N=o(x,b);for(let _=0;_<N.length;++_){const S=N[_];i.push(w+S)}l=d+(l.length>0?" "+l:l)}return l};function ba(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Tr(t))&&(r&&(r+=" "),r+=n);return r}const Tr=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Tr(e[r]))&&(n&&(n+=" "),n+=t);return n};function xa(e,...t){let n,r,o,s=i;function i(l){const u=t.reduce((d,c)=>c(d),e());return n=ga(u),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=va(l,n);return o(l,d),d}return function(){return s(ba.apply(null,arguments))}}const se=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Or=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Dr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ya=/^\d+\/\d+$/,wa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ca=/\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$/,Sa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ea=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ue=e=>ya.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),Ne=e=>!!e&&Number.isInteger(Number(e)),xn=e=>e.endsWith("%")&&Z(e.slice(0,-1)),ke=e=>wa.test(e),ka=()=>!0,Ma=e=>Ca.test(e)&&!Sa.test(e),zr=()=>!1,Ra=e=>Ea.test(e),Aa=e=>Pa.test(e),Na=e=>!D(e)&&!z(e),_a=e=>Ke(e,Br,zr),D=e=>Or.test(e),$e=e=>Ke(e,Gr,Ma),yn=e=>Ke(e,za,Z),jr=e=>Ke(e,$r,zr),Ia=e=>Ke(e,Fr,Aa),It=e=>Ke(e,Hr,Ra),z=e=>Dr.test(e),pt=e=>Ye(e,Gr),Ta=e=>Ye(e,ja),Lr=e=>Ye(e,$r),Oa=e=>Ye(e,Br),Da=e=>Ye(e,Fr),Tt=e=>Ye(e,Hr,!0),Ke=(e,t,n)=>{const r=Or.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ye=(e,t,n=!1)=>{const r=Dr.exec(e);return r?r[1]?t(r[1]):n:!1},$r=e=>e==="position"||e==="percentage",Fr=e=>e==="image"||e==="url",Br=e=>e==="length"||e==="size"||e==="bg-size",Gr=e=>e==="length",za=e=>e==="number",ja=e=>e==="family-name",Hr=e=>e==="shadow",La=xa(()=>{const e=se("color"),t=se("font"),n=se("text"),r=se("font-weight"),o=se("tracking"),s=se("leading"),i=se("breakpoint"),a=se("container"),l=se("spacing"),u=se("radius"),d=se("shadow"),c=se("inset-shadow"),f=se("text-shadow"),h=se("drop-shadow"),v=se("blur"),m=se("perspective"),b=se("aspect"),x=se("ease"),E=se("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...C(),z,D],_=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],P=()=>[z,D,l],H=()=>[Ue,"full","auto",...P()],W=()=>[Ne,"none","subgrid",z,D],U=()=>["auto",{span:["full",Ne,z,D]},Ne,z,D],B=()=>[Ne,"auto",z,D],Q=()=>["auto","min","max","fr",z,D],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...P()],ee=()=>[Ue,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],R=()=>[e,z,D],T=()=>[...C(),Lr,jr,{position:[z,D]}],y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",Oa,_a,{size:[z,D]}],K=()=>[xn,pt,$e],k=()=>["","none","full",u,z,D],I=()=>["",Z,pt,$e],j=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>[Z,xn,Lr,jr],O=()=>["","none",v,z,D],Y=()=>["none",Z,z,D],te=()=>["none",Z,z,D],ae=()=>[Z,z,D],le=()=>[Ue,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ke],breakpoint:[ke],color:[ka],container:[ke],"drop-shadow":[ke],ease:["in","out","in-out"],font:[Na],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ke],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ke],shadow:[ke],spacing:["px",Z],text:[ke],"text-shadow":[ke],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ue,D,z,b]}],container:["container"],columns:[{columns:[Z,D,z,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:N()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{start:H()}],end:[{end:H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[Ne,"auto",z,D]}],basis:[{basis:[Ue,"full","auto",a,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Z,Ue,"auto","initial","none",D]}],grow:[{grow:["",Z,z,D]}],shrink:[{shrink:["",Z,z,D]}],order:[{order:[Ne,"first","last","none",z,D]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],w:[{w:[a,"screen",...ee()]}],"min-w":[{"min-w":[a,"screen","none",...ee()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,pt,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,z,yn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xn,D]}],"font-family":[{font:[Ta,D,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,z,D]}],"line-clamp":[{"line-clamp":[Z,"none",z,yn]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",z,D]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",z,D]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:[Z,"from-font","auto",z,$e]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[Z,"auto",z,D]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z,D]}],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",z,D]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:y()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ne,z,D],radial:["",z,D],conic:[Ne,z,D]},Da,Ia]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],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:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...j(),"hidden","none"]}],"divide-style":[{divide:[...j(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...j(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Z,z,D]}],"outline-w":[{outline:["",Z,pt,$e]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,Tt,It]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",c,Tt,It]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[Z,$e]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",f,Tt,It]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[Z,z,D]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"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":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":M()}],"mask-image-linear-to-pos":[{"mask-linear-to":M()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":M()}],"mask-image-t-to-pos":[{"mask-t-to":M()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":M()}],"mask-image-r-to-pos":[{"mask-r-to":M()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":M()}],"mask-image-b-to-pos":[{"mask-b-to":M()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":M()}],"mask-image-l-to-pos":[{"mask-l-to":M()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":M()}],"mask-image-x-to-pos":[{"mask-x-to":M()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":M()}],"mask-image-y-to-pos":[{"mask-y-to":M()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[z,D]}],"mask-image-radial-from-pos":[{"mask-radial-from":M()}],"mask-image-radial-to-pos":[{"mask-radial-to":M()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":M()}],"mask-image-conic-to-pos":[{"mask-conic-to":M()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:y()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",z,D]}],filter:[{filter:["","none",z,D]}],blur:[{blur:O()}],brightness:[{brightness:[Z,z,D]}],contrast:[{contrast:[Z,z,D]}],"drop-shadow":[{"drop-shadow":["","none",h,Tt,It]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",Z,z,D]}],"hue-rotate":[{"hue-rotate":[Z,z,D]}],invert:[{invert:["",Z,z,D]}],saturate:[{saturate:[Z,z,D]}],sepia:[{sepia:["",Z,z,D]}],"backdrop-filter":[{"backdrop-filter":["","none",z,D]}],"backdrop-blur":[{"backdrop-blur":O()}],"backdrop-brightness":[{"backdrop-brightness":[Z,z,D]}],"backdrop-contrast":[{"backdrop-contrast":[Z,z,D]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Z,z,D]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,z,D]}],"backdrop-invert":[{"backdrop-invert":["",Z,z,D]}],"backdrop-opacity":[{"backdrop-opacity":[Z,z,D]}],"backdrop-saturate":[{"backdrop-saturate":[Z,z,D]}],"backdrop-sepia":[{"backdrop-sepia":["",Z,z,D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",z,D]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Z,"initial",z,D]}],ease:[{ease:["linear","initial",x,z,D]}],delay:[{delay:[Z,z,D]}],animate:[{animate:["none",E,z,D]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,z,D]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[z,D,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"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",z,D]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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,D]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[Z,pt,$e,yn]}],stroke:[{stroke:["none",...R()]}],"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"]}});function ne(...e){return La(Mr(e))}const Wr=({className:e,...t})=>g.jsx("textarea",{"data-slot":"textarea",className:ne("flex w-full rounded-md px-3 py-2 text-base transition-colors outline-none resize-none","min-h-[80px] field-sizing-content","bg-input","border border-border","text-foreground placeholder:text-muted-foreground","hover:border-border","focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20","aria-invalid:border-destructive","disabled:cursor-not-allowed disabled:opacity-50","text-sm font-medium leading-[1.3] tracking-[-0.01em]",e),...t});Wr.displayName="Textarea";const $a=mn(ne("flex w-full rounded-md px-3 py-2 text-base transition-colors outline-none resize-none","field-sizing-content","aria-invalid:border-destructive","disabled:cursor-not-allowed disabled:opacity-50","text-sm font-medium leading-[1.3] tracking-[-0.01em]"),{variants:{variant:{default:"bg-input border border-border hover:border-border focus-visible:border-ring text-foreground placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/20",shade:"bg-muted-foreground/10 text-muted-foreground hover:bg-muted-foreground/12 focus:bg-muted-foreground/15"}},defaultVariants:{variant:"default"}}),Vr=A.forwardRef(({className:e,type:t,variant:n,...r},o)=>g.jsx("input",{type:t,className:$a({variant:n,className:e}),ref:o,...r}));Vr.displayName="Input";const Ur=({title:e,subtitle:t,details:n,actions:r,className:o,children:s,size:i,contentClassName:a})=>g.jsx("div",{className:ne("relative size-full backdrop-blur-[48px] backdrop-filter","text-foreground","border border-border","rounded-lg overflow-hidden",o),children:g.jsxs("div",{className:"flex flex-col size-full",children:[g.jsx("div",{className:"relative shrink-0 w-full border-b border-border bg-card",children:g.jsxs("div",{className:ne("flex flex-col gap-1",i==="sm"?"px-4 py-3":"px-5 py-4"),children:[g.jsxs("div",{className:"flex items-center w-full",children:[g.jsx("div",{className:ne("font-semibold text-foreground tracking-[-0.25px] leading-tight flex-1",i==="sm"?"text-xs":"text-base"),children:e}),r&&r.length>0&&g.jsx("div",{className:"flex items-center gap-1",children:r.map((l,u)=>g.jsx(Pe,{onClick:l.onClick,variant:"ghost",className:ne(l.active&&"bg-muted-foreground/20 hover:bg-muted-foreground/30"),size:"icon","aria-label":l.label,children:l.icon},u))})]}),t&&g.jsx("p",{className:"text-sm font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:t})]})}),g.jsx("div",{className:"flex-1 overflow-auto",children:g.jsxs("div",{className:ne("flex flex-col gap-2 p-4",a),children:[n?.map((l,u)=>g.jsxs("div",{className:"flex gap-4 items-start",children:[g.jsx("div",{className:"flex items-center h-8 shrink-0",children:g.jsx("span",{className:"text-sm font-medium text-foreground tracking-[-0.25px] w-24 truncate",children:l.label})}),g.jsx("div",{className:ne("flex-1 rounded-lg px-2 py-1 min-h-6",l.highlighted&&"bg-secondary"),children:g.jsx("div",{className:"flex items-center min-h-6",children:typeof l.value=="string"?g.jsx("span",{className:"text-sm font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:l.value}):l.value})})]},u)),s]})})]})});Ur.displayName="Panel";function J(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Xe(e,t=[]){let n=[];function r(s,i){const a=p.createContext(i),l=n.length;n=[...n,i];const u=c=>{const{scope:f,children:h,...v}=c,m=f?.[e]?.[l]||a,b=p.useMemo(()=>v,Object.values(v));return g.jsx(m.Provider,{value:b,children:h})};u.displayName=s+"Provider";function d(c,f){const h=f?.[e]?.[l]||a,v=p.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${c}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>p.createContext(i));return function(a){const l=a?.[e]||s;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,Fa(o,...t)]}function Fa(...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((a,{useScope:l,scopeName:u})=>{const c=l(s)[`__scope${u}`];return{...a,...c}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Kr(e){const t=e+"CollectionProvider",[n,r]=Xe(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:b,children:x}=m,E=A.useRef(null),w=A.useRef(new Map).current;return g.jsx(o,{scope:b,itemMap:w,collectionRef:E,children:x})};i.displayName=t;const a=e+"CollectionSlot",l=ft(a),u=A.forwardRef((m,b)=>{const{scope:x,children:E}=m,w=s(a,x),C=ue(b,w.collectionRef);return g.jsx(l,{ref:C,children:E})});u.displayName=a;const d=e+"CollectionItemSlot",c="data-radix-collection-item",f=ft(d),h=A.forwardRef((m,b)=>{const{scope:x,children:E,...w}=m,C=A.useRef(null),N=ue(b,C),_=s(d,x);return A.useEffect(()=>(_.itemMap.set(C,{ref:C,...w}),()=>void _.itemMap.delete(C))),g.jsx(f,{[c]:"",ref:N,children:E})});h.displayName=d;function v(m){const b=s(e+"CollectionConsumer",m);return A.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const w=Array.from(E.querySelectorAll(`[${c}]`));return Array.from(b.itemMap.values()).sort((_,S)=>w.indexOf(_.ref.current)-w.indexOf(S.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},v,r]}var _e=globalThis?.document?p.useLayoutEffect:()=>{},Ba=p[" useId ".trim().toString()]||(()=>{}),Ga=0;function qe(e){const[t,n]=p.useState(Ba());return _e(()=>{n(r=>r??String(Ga++))},[e]),e||(t?`radix-${t}`:"")}var Ha=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=Ha.reduce((e,t)=>{const n=ft(`Primitive.${t}`),r=p.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Yr(e,t){e&&wr.flushSync(()=>e.dispatchEvent(t))}function ye(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>t.current?.(...n),[])}var Wa=p[" useInsertionEffect ".trim().toString()]||_e;function Ot({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Va({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=p.useRef(e!==void 0);p.useEffect(()=>{const c=d.current;c!==a&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${a?"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.`),d.current=a},[a,r])}const u=p.useCallback(d=>{if(a){const c=Ua(d)?d(e):d;c!==e&&i.current?.(c)}else s(d)},[a,e,s,i]);return[l,u]}function Va({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),o=p.useRef(n),s=p.useRef(t);return Wa(()=>{s.current=t},[t]),p.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Ua(e){return typeof e=="function"}var Ka=p.createContext(void 0);function wn(e){const t=p.useContext(Ka);return e||t||"ltr"}var Cn="rovingFocusGroup.onEntryFocus",Ya={bubbles:!1,cancelable:!0},mt="RovingFocusGroup",[Sn,Xr,Xa]=Kr(mt),[qa,Dt]=Xe(mt,[Xa]),[Za,Ja]=qa(mt),qr=p.forwardRef((e,t)=>g.jsx(Sn.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Sn.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Qa,{...e,ref:t})})}));qr.displayName=mt;var Qa=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...c}=e,f=p.useRef(null),h=ue(t,f),v=wn(s),[m,b]=Ot({prop:i,defaultProp:a??null,onChange:l,caller:mt}),[x,E]=p.useState(!1),w=ye(u),C=Xr(n),N=p.useRef(!1),[_,S]=p.useState(0);return p.useEffect(()=>{const P=f.current;if(P)return P.addEventListener(Cn,w),()=>P.removeEventListener(Cn,w)},[w]),g.jsx(Za,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:m,onItemFocus:p.useCallback(P=>b(P),[b]),onItemShiftTab:p.useCallback(()=>E(!0),[]),onFocusableItemAdd:p.useCallback(()=>S(P=>P+1),[]),onFocusableItemRemove:p.useCallback(()=>S(P=>P-1),[]),children:g.jsx(ie.div,{tabIndex:x||_===0?-1:0,"data-orientation":r,...c,ref:h,style:{outline:"none",...e.style},onMouseDown:J(e.onMouseDown,()=>{N.current=!0}),onFocus:J(e.onFocus,P=>{const H=!N.current;if(P.target===P.currentTarget&&H&&!x){const W=new CustomEvent(Cn,Ya);if(P.currentTarget.dispatchEvent(W),!W.defaultPrevented){const U=C().filter(F=>F.focusable),B=U.find(F=>F.active),Q=U.find(F=>F.id===m),V=[B,Q,...U].filter(Boolean).map(F=>F.ref.current);Qr(V,d)}}N.current=!1}),onBlur:J(e.onBlur,()=>E(!1))})})}),Zr="RovingFocusGroupItem",Jr=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=qe(),u=s||l,d=Ja(Zr,n),c=d.currentTabStopId===u,f=Xr(n),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:m}=d;return p.useEffect(()=>{if(r)return h(),()=>v()},[r,h,v]),g.jsx(Sn.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:g.jsx(ie.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:J(e.onMouseDown,b=>{r?d.onItemFocus(u):b.preventDefault()}),onFocus:J(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:J(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=nl(b,d.orientation,d.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=f().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const C=w.indexOf(b.currentTarget);w=d.loop?rl(w,C+1):w.slice(C+1)}setTimeout(()=>Qr(w))}}),children:typeof i=="function"?i({isCurrentTabStop:c,hasTabStop:m!=null}):i})})});Jr.displayName=Zr;var el={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tl(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function nl(e,t,n){const r=tl(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return el[r]}function Qr(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function rl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var eo=qr,to=Jr;function ol(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Ze=e=>{const{present:t,children:n}=e,r=sl(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),s=ue(r.ref,il(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:s}):null};Ze.displayName="Presence";function sl(e){const[t,n]=p.useState(),r=p.useRef(null),o=p.useRef(e),s=p.useRef("none"),i=e?"mounted":"unmounted",[a,l]=ol(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=zt(r.current);s.current=a==="mounted"?u:"none"},[a]),_e(()=>{const u=r.current,d=o.current;if(d!==e){const f=s.current,h=zt(u);e?l("MOUNT"):h==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),_e(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=h=>{const m=zt(r.current).includes(h.animationName);if(h.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=h=>{h.target===t&&(s.current=zt(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function zt(e){return e?.animationName||"none"}function il(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 jt="Tabs",[al,Yf]=Xe(jt,[Dt]),no=Dt(),[ll,En]=al(jt),ro=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=wn(a),[c,f]=Ot({prop:r,onChange:o,defaultProp:s??"",caller:jt});return g.jsx(ll,{scope:n,baseId:qe(),value:c,onValueChange:f,orientation:i,dir:d,activationMode:l,children:g.jsx(ie.div,{dir:d,"data-orientation":i,...u,ref:t})})});ro.displayName=jt;var oo="TabsList",so=p.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=En(oo,n),i=no(n);return g.jsx(eo,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:g.jsx(ie.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});so.displayName=oo;var io="TabsTrigger",ao=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=En(io,n),a=no(n),l=uo(i.baseId,r),u=fo(i.baseId,r),d=r===i.value;return g.jsx(to,{asChild:!0,...a,focusable:!o,active:d,children:g.jsx(ie.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:J(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?i.onValueChange(r):c.preventDefault()}),onKeyDown:J(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&i.onValueChange(r)}),onFocus:J(e.onFocus,()=>{const c=i.activationMode!=="manual";!d&&!o&&c&&i.onValueChange(r)})})})});ao.displayName=io;var lo="TabsContent",co=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=En(lo,n),l=uo(a.baseId,r),u=fo(a.baseId,r),d=r===a.value,c=p.useRef(d);return p.useEffect(()=>{const f=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(f)},[]),g.jsx(Ze,{present:o||d,children:({present:f})=>g.jsx(ie.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:f&&s})})});co.displayName=lo;function uo(e,t){return`${e}-trigger-${t}`}function fo(e,t){return`${e}-content-${t}`}var cl=ro,ul=so,dl=ao,fl=co;const Pn=({className:e,...t})=>g.jsx(cl,{"data-slot":"tabs",className:ne("flex flex-col",e),...t});Pn.displayName="Tabs";const po=({className:e,...t})=>g.jsx(ul,{"data-slot":"tabs-list",className:ne("inline-flex rounded-none bg-transparent p-0 min-h-10",e),...t});po.displayName="TabsList";const mo=({className:e,...t})=>g.jsx(dl,{"data-slot":"tabs-trigger",className:ne("inline-flex items-center justify-center whitespace-nowrap rounded-none px-4 py-2 text-sm font-medium text-muted-foreground ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 relative data-[state=active]:after:absolute data-[state=active]:after:bottom-0 data-[state=active]:after:left-1/2 data-[state=active]:after:-translate-x-1/2 data-[state=active]:after:h-0.5 data-[state=active]:after:w-[calc(100%-2.5rem)] data-[state=active]:after:bg-foreground data-[state=active]:after:rounded-full",e),...t});mo.displayName="TabsTrigger";const go=({className:e,...t})=>g.jsx(fl,{"data-slot":"tabs-content",className:ne("flex-1 outline-none text-foreground",e),...t});go.displayName="TabsContent";function pl(e,t=globalThis?.document){const n=ye(e);p.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 ml="DismissableLayer",kn="dismissableLayer.update",gl="dismissableLayer.pointerDownOutside",hl="dismissableLayer.focusOutside",ho,vo=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bo=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=p.useContext(vo),[d,c]=p.useState(null),f=d?.ownerDocument??globalThis?.document,[,h]=p.useState({}),v=ue(t,S=>c(S)),m=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(b),E=d?m.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=E>=x,N=xl(S=>{const P=S.target,H=[...u.branches].some(W=>W.contains(P));!C||H||(o?.(S),i?.(S),S.defaultPrevented||a?.())},f),_=yl(S=>{const P=S.target;[...u.branches].some(W=>W.contains(P))||(s?.(S),i?.(S),S.defaultPrevented||a?.())},f);return pl(S=>{E===u.layers.size-1&&(r?.(S),!S.defaultPrevented&&a&&(S.preventDefault(),a()))},f),p.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ho=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),xo(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ho)}},[d,f,n,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),xo())},[d,u]),p.useEffect(()=>{const S=()=>h({});return document.addEventListener(kn,S),()=>document.removeEventListener(kn,S)},[]),g.jsx(ie.div,{...l,ref:v,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:J(e.onFocusCapture,_.onFocusCapture),onBlurCapture:J(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,N.onPointerDownCapture)})});bo.displayName=ml;var vl="DismissableLayerBranch",bl=p.forwardRef((e,t)=>{const n=p.useContext(vo),r=p.useRef(null),o=ue(t,r);return p.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),g.jsx(ie.div,{...e,ref:o})});bl.displayName=vl;function xl(e,t=globalThis?.document){const n=ye(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){yo(gl,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}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 yl(e,t=globalThis?.document){const n=ye(e),r=p.useRef(!1);return p.useEffect(()=>{const o=s=>{s.target&&!r.current&&yo(hl,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 xo(){const e=new CustomEvent(kn);document.dispatchEvent(e)}function yo(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?Yr(o,s):o.dispatchEvent(s)}var Mn=0;function wl(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wo()),document.body.insertAdjacentElement("beforeend",e[1]??wo()),Mn++,()=>{Mn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Mn--}},[])}function wo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Rn="focusScope.autoFocusOnMount",An="focusScope.autoFocusOnUnmount",Co={bubbles:!1,cancelable:!0},Cl="FocusScope",So=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=p.useState(null),u=ye(o),d=ye(s),c=p.useRef(null),f=ue(t,m=>l(m)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let m=function(w){if(h.paused||!a)return;const C=w.target;a.contains(C)?c.current=C:Ie(c.current,{select:!0})},b=function(w){if(h.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||Ie(c.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const N of w)N.removedNodes.length>0&&Ie(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const E=new MutationObserver(x);return a&&E.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),E.disconnect()}}},[r,a,h.paused]),p.useEffect(()=>{if(a){ko.add(h);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(Rn,Co);a.addEventListener(Rn,u),a.dispatchEvent(x),x.defaultPrevented||(Sl(Rl(Eo(a)),{select:!0}),document.activeElement===m&&Ie(a))}return()=>{a.removeEventListener(Rn,u),setTimeout(()=>{const x=new CustomEvent(An,Co);a.addEventListener(An,d),a.dispatchEvent(x),x.defaultPrevented||Ie(m??document.body,{select:!0}),a.removeEventListener(An,d),ko.remove(h)},0)}}},[a,u,d,h]);const v=p.useCallback(m=>{if(!n&&!r||h.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(b&&x){const E=m.currentTarget,[w,C]=El(E);w&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&Ie(w,{select:!0})):m.shiftKey&&x===w&&(m.preventDefault(),n&&Ie(C,{select:!0})):x===E&&m.preventDefault()}},[n,r,h.paused]);return g.jsx(ie.div,{tabIndex:-1,...i,ref:f,onKeyDown:v})});So.displayName=Cl;function Sl(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ie(r,{select:t}),document.activeElement!==n)return}function El(e){const t=Eo(e),n=Po(t,e),r=Po(t.reverse(),e);return[n,r]}function Eo(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 Po(e,t){for(const n of e)if(!Pl(n,{upTo:t}))return n}function Pl(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 kl(e){return e instanceof HTMLInputElement&&"select"in e}function Ie(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&kl(e)&&t&&e.select()}}var ko=Ml();function Ml(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Mo(e,t),e.unshift(t)},remove(t){e=Mo(e,t),e[0]?.resume()}}}function Mo(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Rl(e){return e.filter(t=>t.tagName!=="A")}const Al=["top","right","bottom","left"],Te=Math.min,fe=Math.max,Lt=Math.round,$t=Math.floor,we=e=>({x:e,y:e}),Nl={left:"right",right:"left",bottom:"top",top:"bottom"},_l={start:"end",end:"start"};function Nn(e,t,n){return fe(e,Te(t,n))}function Me(e,t){return typeof e=="function"?e(t):e}function Re(e){return e.split("-")[0]}function Je(e){return e.split("-")[1]}function _n(e){return e==="x"?"y":"x"}function In(e){return e==="y"?"height":"width"}function Oe(e){return["top","bottom"].includes(Re(e))?"y":"x"}function Tn(e){return _n(Oe(e))}function Il(e,t,n){n===void 0&&(n=!1);const r=Je(e),o=Tn(e),s=In(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ft(i)),[i,Ft(i)]}function Tl(e){const t=Ft(e);return[On(e),t,On(t)]}function On(e){return e.replace(/start|end/g,t=>_l[t])}function Ol(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function Dl(e,t,n,r){const o=Je(e);let s=Ol(Re(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(On)))),s}function Ft(e){return e.replace(/left|right|bottom|top/g,t=>Nl[t])}function zl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ro(e){return typeof e!="number"?zl(e):{top:e,right:e,bottom:e,left:e}}function Bt(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 Ao(e,t,n){let{reference:r,floating:o}=e;const s=Oe(t),i=Tn(t),a=In(i),l=Re(t),u=s==="y",d=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-o.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Je(t)){case"start":h[i]-=f*(n&&u?-1:1);break;case"end":h[i]+=f*(n&&u?-1:1);break}return h}const jl=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:c}=Ao(u,r,l),f=r,h={},v=0;for(let m=0;m<a.length;m++){const{name:b,fn:x}=a[m],{x:E,y:w,data:C,reset:N}=await x({x:d,y:c,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});d=E??d,c=w??c,h={...h,[b]:{...h[b],...C}},N&&v<=50&&(v++,typeof N=="object"&&(N.placement&&(f=N.placement),N.rects&&(u=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:d,y:c}=Ao(u,f,l)),m=-1)}return{x:d,y:c,placement:f,strategy:o,middlewareData:h}};async function gt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:f=!1,padding:h=0}=Me(t,e),v=Ro(h),b=a[f?c==="floating"?"reference":"floating":c],x=Bt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),E=c==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},N=Bt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:w,strategy:l}):E);return{top:(x.top-N.top+v.top)/C.y,bottom:(N.bottom-x.bottom+v.bottom)/C.y,left:(x.left-N.left+v.left)/C.x,right:(N.right-x.right+v.right)/C.x}}const Ll=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=Me(e,t)||{};if(u==null)return{};const c=Ro(d),f={x:n,y:r},h=Tn(o),v=In(h),m=await i.getDimensions(u),b=h==="y",x=b?"top":"left",E=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=s.reference[v]+s.reference[h]-f[h]-s.floating[v],N=f[h]-s.reference[h],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=_?_[w]:0;(!S||!await(i.isElement==null?void 0:i.isElement(_)))&&(S=a.floating[w]||s.floating[v]);const P=C/2-N/2,H=S/2-m[v]/2-1,W=Te(c[x],H),U=Te(c[E],H),B=W,Q=S-m[v]-U,G=S/2-m[v]/2+P,V=Nn(B,G,Q),F=!l.arrow&&Je(o)!=null&&G!==V&&s.reference[v]/2-(G<B?W:U)-m[v]/2<0,ee=F?G<B?G-B:G-Q:0;return{[h]:f[h]+ee,data:{[h]:V,centerOffset:G-V-ee,...F&&{alignmentOffset:ee}},reset:F}}}),$l=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:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...b}=Me(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Re(o),E=Oe(a),w=Re(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),N=f||(w||!m?[Ft(a)]:Tl(a)),_=v!=="none";!f&&_&&N.push(...Dl(a,m,v,C));const S=[a,...N],P=await gt(t,b),H=[];let W=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&H.push(P[x]),c){const G=Il(o,i,C);H.push(P[G[0]],P[G[1]])}if(W=[...W,{placement:o,overflows:H}],!H.every(G=>G<=0)){var U,B;const G=(((U=s.flip)==null?void 0:U.index)||0)+1,V=S[G];if(V)return{data:{index:G,overflows:W},reset:{placement:V}};let F=(B=W.filter(ee=>ee.overflows[0]<=0).sort((ee,R)=>ee.overflows[1]-R.overflows[1])[0])==null?void 0:B.placement;if(!F)switch(h){case"bestFit":{var Q;const ee=(Q=W.filter(R=>{if(_){const T=Oe(R.placement);return T===E||T==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,y)=>T+y,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:Q[0];ee&&(F=ee);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function No(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _o(e){return Al.some(t=>e[t]>=0)}const Fl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Me(e,t);switch(r){case"referenceHidden":{const s=await gt(t,{...o,elementContext:"reference"}),i=No(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:_o(i)}}}case"escaped":{const s=await gt(t,{...o,altBoundary:!0}),i=No(s,n.floating);return{data:{escapedOffsets:i,escaped:_o(i)}}}default:return{}}}}};async function Bl(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Re(n),a=Je(n),l=Oe(n)==="y",u=["left","top"].includes(i)?-1:1,d=s&&l?-1:1,c=Me(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:v}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*d,y:f*u}:{x:f*u,y:h*d}}const Gl=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:a}=t,l=await Bl(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Hl=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:a={fn:b=>{let{x,y:E}=b;return{x,y:E}}},...l}=Me(e,t),u={x:n,y:r},d=await gt(t,l),c=Oe(Re(o)),f=_n(c);let h=u[f],v=u[c];if(s){const b=f==="y"?"top":"left",x=f==="y"?"bottom":"right",E=h+d[b],w=h-d[x];h=Nn(E,h,w)}if(i){const b=c==="y"?"top":"left",x=c==="y"?"bottom":"right",E=v+d[b],w=v-d[x];v=Nn(E,v,w)}const m=a.fn({...t,[f]:h,[c]:v});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:s,[c]:i}}}}}},Wl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Me(e,t),d={x:n,y:r},c=Oe(o),f=_n(c);let h=d[f],v=d[c];const m=Me(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=f==="y"?"height":"width",C=s.reference[f]-s.floating[w]+b.mainAxis,N=s.reference[f]+s.reference[w]-b.mainAxis;h<C?h=C:h>N&&(h=N)}if(u){var x,E;const w=f==="y"?"width":"height",C=["top","left"].includes(Re(o)),N=s.reference[c]-s.floating[w]+(C&&((x=i.offset)==null?void 0:x[c])||0)+(C?0:b.crossAxis),_=s.reference[c]+s.reference[w]+(C?0:((E=i.offset)==null?void 0:E[c])||0)-(C?b.crossAxis:0);v<N?v=N:v>_&&(v=_)}return{[f]:h,[c]:v}}}},Vl=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:a}=t,{apply:l=()=>{},...u}=Me(e,t),d=await gt(t,u),c=Re(o),f=Je(o),h=Oe(o)==="y",{width:v,height:m}=s.floating;let b,x;c==="top"||c==="bottom"?(b=c,x=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=c,b=f==="end"?"top":"bottom");const E=m-d.top-d.bottom,w=v-d.left-d.right,C=Te(m-d[b],E),N=Te(v-d[x],w),_=!t.middlewareData.shift;let S=C,P=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=E),_&&!f){const W=fe(d.left,0),U=fe(d.right,0),B=fe(d.top,0),Q=fe(d.bottom,0);h?P=v-2*(W!==0||U!==0?W+U:fe(d.left,d.right)):S=m-2*(B!==0||Q!==0?B+Q:fe(d.top,d.bottom))}await l({...t,availableWidth:P,availableHeight:S});const H=await i.getDimensions(a.floating);return v!==H.width||m!==H.height?{reset:{rects:!0}}:{}}}};function Gt(){return typeof window<"u"}function Qe(e){return Io(e)?(e.nodeName||"").toLowerCase():"#document"}function pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(Io(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Io(e){return Gt()?e instanceof Node||e instanceof pe(e).Node:!1}function he(e){return Gt()?e instanceof Element||e instanceof pe(e).Element:!1}function Se(e){return Gt()?e instanceof HTMLElement||e instanceof pe(e).HTMLElement:!1}function To(e){return!Gt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pe(e).ShadowRoot}function ht(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ul(e){return["table","td","th"].includes(Qe(e))}function Ht(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Dn(e){const t=zn(),n=he(e)?ve(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Kl(e){let t=De(e);for(;Se(t)&&!et(t);){if(Dn(t))return t;if(Ht(t))return null;t=De(t)}return null}function zn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(e){return["html","body","#document"].includes(Qe(e))}function ve(e){return pe(e).getComputedStyle(e)}function Wt(e){return he(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function De(e){if(Qe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||To(e)&&e.host||Ce(e);return To(t)?t.host:t}function Oo(e){const t=De(e);return et(t)?e.ownerDocument?e.ownerDocument.body:e.body:Se(t)&&ht(t)?t:Oo(t)}function vt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Oo(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=pe(o);if(s){const a=jn(i);return t.concat(i,i.visualViewport||[],ht(o)?o:[],a&&n?vt(a):[])}return t.concat(o,vt(o,[],n))}function jn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Do(e){const t=ve(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Se(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Lt(n)!==s||Lt(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Ln(e){return he(e)?e:e.contextElement}function tt(e){const t=Ln(e);if(!Se(t))return we(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Do(t);let i=(s?Lt(n.width):n.width)/r,a=(s?Lt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Yl=we(0);function zo(e){const t=pe(e);return!zn()||!t.visualViewport?Yl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pe(e)?!1:t}function Fe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Ln(e);let i=we(1);t&&(r?he(r)&&(i=tt(r)):i=tt(e));const a=Xl(s,n,r)?zo(s):we(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,c=o.height/i.y;if(s){const f=pe(s),h=r&&he(r)?pe(r):r;let v=f,m=jn(v);for(;m&&r&&h!==v;){const b=tt(m),x=m.getBoundingClientRect(),E=ve(m),w=x.left+(m.clientLeft+parseFloat(E.paddingLeft))*b.x,C=x.top+(m.clientTop+parseFloat(E.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,c*=b.y,l+=w,u+=C,v=pe(m),m=jn(v)}}return Bt({width:d,height:c,x:l,y:u})}function $n(e,t){const n=Wt(e).scrollLeft;return t?t.left+n:Fe(Ce(e)).left+n}function jo(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:$n(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function ql(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ce(r),a=t?Ht(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=we(1);const d=we(0),c=Se(r);if((c||!c&&!s)&&((Qe(r)!=="body"||ht(i))&&(l=Wt(r)),Se(r))){const h=Fe(r);u=tt(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const f=i&&!c&&!s?jo(i,l,!0):we(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-l.scrollTop*u.y+d.y+f.y}}function Zl(e){return Array.from(e.getClientRects())}function Jl(e){const t=Ce(e),n=Wt(e),r=e.ownerDocument.body,o=fe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=fe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+$n(e);const a=-n.scrollTop;return ve(r).direction==="rtl"&&(i+=fe(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function Ql(e,t){const n=pe(e),r=Ce(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const u=zn();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function ec(e,t){const n=Fe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Se(e)?tt(e):we(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function Lo(e,t,n){let r;if(t==="viewport")r=Ql(e,n);else if(t==="document")r=Jl(Ce(e));else if(he(t))r=ec(t,n);else{const o=zo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Bt(r)}function $o(e,t){const n=De(e);return n===t||!he(n)||et(n)?!1:ve(n).position==="fixed"||$o(n,t)}function tc(e,t){const n=t.get(e);if(n)return n;let r=vt(e,[],!1).filter(a=>he(a)&&Qe(a)!=="body"),o=null;const s=ve(e).position==="fixed";let i=s?De(e):e;for(;he(i)&&!et(i);){const a=ve(i),l=Dn(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ht(i)&&!l&&$o(e,i))?r=r.filter(d=>d!==i):o=a,i=De(i)}return t.set(e,r),r}function nc(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Ht(t)?[]:tc(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,d)=>{const c=Lo(t,d,o);return u.top=fe(c.top,u.top),u.right=Te(c.right,u.right),u.bottom=Te(c.bottom,u.bottom),u.left=fe(c.left,u.left),u},Lo(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function rc(e){const{width:t,height:n}=Do(e);return{width:t,height:n}}function oc(e,t,n){const r=Se(t),o=Ce(t),s=n==="fixed",i=Fe(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=we(0);if(r||!r&&!s)if((Qe(t)!=="body"||ht(o))&&(a=Wt(t)),r){const f=Fe(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=$n(o));const u=o&&!r&&!s?jo(o,a):we(0),d=i.left+a.scrollLeft-l.x-u.x,c=i.top+a.scrollTop-l.y-u.y;return{x:d,y:c,width:i.width,height:i.height}}function Fn(e){return ve(e).position==="static"}function Fo(e,t){if(!Se(e)||ve(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ce(e)===n&&(n=n.ownerDocument.body),n}function Bo(e,t){const n=pe(e);if(Ht(e))return n;if(!Se(e)){let o=De(e);for(;o&&!et(o);){if(he(o)&&!Fn(o))return o;o=De(o)}return n}let r=Fo(e,t);for(;r&&Ul(r)&&Fn(r);)r=Fo(r,t);return r&&et(r)&&Fn(r)&&!Dn(r)?n:r||Kl(e)||n}const sc=async function(e){const t=this.getOffsetParent||Bo,n=this.getDimensions,r=await n(e.floating);return{reference:oc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ic(e){return ve(e).direction==="rtl"}const ac={convertOffsetParentRelativeRectToViewportRelativeRect:ql,getDocumentElement:Ce,getClippingRect:nc,getOffsetParent:Bo,getElementRects:sc,getClientRects:Zl,getDimensions:rc,getScale:tt,isElement:he,isRTL:ic};function Go(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lc(e,t){let n=null,r;const o=Ce(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:c,width:f,height:h}=u;if(a||t(),!f||!h)return;const v=$t(c),m=$t(o.clientWidth-(d+f)),b=$t(o.clientHeight-(c+h)),x=$t(d),w={rootMargin:-v+"px "+-m+"px "+-b+"px "+-x+"px",threshold:fe(0,Te(1,l))||1};let C=!0;function N(_){const S=_[0].intersectionRatio;if(S!==l){if(!C)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Go(u,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(N,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,w)}n.observe(e)}return i(!0),s}function cc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ln(e),d=o||s?[...u?vt(u):[],...vt(t)]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const c=u&&a?lc(u,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(x=>{let[E]=x;E&&E.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let v,m=l?Fe(e):null;l&&b();function b(){const x=Fe(e);m&&!Go(m,x)&&n(),m=x,v=requestAnimationFrame(b)}return n(),()=>{var x;d.forEach(E=>{o&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),c?.(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const uc=Gl,dc=Hl,fc=$l,pc=Vl,mc=Fl,Ho=Ll,gc=Wl,hc=(e,t,n)=>{const r=new Map,o={platform:ac,...n},s={...o.platform,_c:r};return jl(e,t,{...o,platform:s})};var Vt=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Ut(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(!Ut(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)&&!Ut(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Wo(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vo(e,t){const n=Wo(e);return Math.round(t*n)/n}function Bn(e){const t=p.useRef(e);return Vt(()=>{t.current=e}),t}function vc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,c]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=p.useState(r);Ut(f,r)||h(r);const[v,m]=p.useState(null),[b,x]=p.useState(null),E=p.useCallback(R=>{R!==_.current&&(_.current=R,m(R))},[]),w=p.useCallback(R=>{R!==S.current&&(S.current=R,x(R))},[]),C=s||v,N=i||b,_=p.useRef(null),S=p.useRef(null),P=p.useRef(d),H=l!=null,W=Bn(l),U=Bn(o),B=Bn(u),Q=p.useCallback(()=>{if(!_.current||!S.current)return;const R={placement:t,strategy:n,middleware:f};U.current&&(R.platform=U.current),hc(_.current,S.current,R).then(T=>{const y={...T,isPositioned:B.current!==!1};G.current&&!Ut(P.current,y)&&(P.current=y,wr.flushSync(()=>{c(y)}))})},[f,t,n,U,B]);Vt(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,c(R=>({...R,isPositioned:!1})))},[u]);const G=p.useRef(!1);Vt(()=>(G.current=!0,()=>{G.current=!1}),[]),Vt(()=>{if(C&&(_.current=C),N&&(S.current=N),C&&N){if(W.current)return W.current(C,N,Q);Q()}},[C,N,Q,W,H]);const V=p.useMemo(()=>({reference:_,floating:S,setReference:E,setFloating:w}),[E,w]),F=p.useMemo(()=>({reference:C,floating:N}),[C,N]),ee=p.useMemo(()=>{const R={position:n,left:0,top:0};if(!F.floating)return R;const T=Vo(F.floating,d.x),y=Vo(F.floating,d.y);return a?{...R,transform:"translate("+T+"px, "+y+"px)",...Wo(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:y}},[n,a,F.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:Q,refs:V,elements:F,floatingStyles:ee}),[d,Q,V,F,ee])}const bc=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?Ho({element:r.current,padding:o}).fn(n):{}:r?Ho({element:r,padding:o}).fn(n):{}}}},xc=(e,t)=>({...uc(e),options:[e,t]}),yc=(e,t)=>({...dc(e),options:[e,t]}),wc=(e,t)=>({...gc(e),options:[e,t]}),Cc=(e,t)=>({...fc(e),options:[e,t]}),Sc=(e,t)=>({...pc(e),options:[e,t]}),Ec=(e,t)=>({...mc(e),options:[e,t]}),Pc=(e,t)=>({...bc(e),options:[e,t]});var kc="Arrow",Uo=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return g.jsx(ie.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Uo.displayName=kc;var Mc=Uo;function Rc(e){const[t,n]=p.useState(void 0);return _e(()=>{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,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Gn="Popper",[Ko,Yo]=Xe(Gn),[Ac,Xo]=Ko(Gn),qo=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return g.jsx(Ac,{scope:t,anchor:r,onAnchorChange:o,children:n})};qo.displayName=Gn;var Zo="PopperAnchor",Jo=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Xo(Zo,n),i=p.useRef(null),a=ue(t,i);return p.useEffect(()=>{s.onAnchorChange(r?.current||i.current)}),r?null:g.jsx(ie.div,{...o,ref:a})});Jo.displayName=Zo;var Hn="PopperContent",[Nc,_c]=Ko(Hn),Qo=p.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:v,...m}=e,b=Xo(Hn,n),[x,E]=p.useState(null),w=ue(t,M=>E(M)),[C,N]=p.useState(null),_=Rc(C),S=_?.width??0,P=_?.height??0,H=r+(s!=="center"?"-"+s:""),W=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},U=Array.isArray(u)?u:[u],B=U.length>0,Q={padding:W,boundary:U.filter(Tc),altBoundary:B},{refs:G,floatingStyles:V,placement:F,isPositioned:ee,middlewareData:R}=vc({strategy:"fixed",placement:H,whileElementsMounted:(...M)=>cc(...M,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[xc({mainAxis:o+P,alignmentAxis:i}),l&&yc({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?wc():void 0,...Q}),l&&Cc({...Q}),Sc({...Q,apply:({elements:M,rects:O,availableWidth:Y,availableHeight:te})=>{const{width:ae,height:le}=O.reference,re=M.floating.style;re.setProperty("--radix-popper-available-width",`${Y}px`),re.setProperty("--radix-popper-available-height",`${te}px`),re.setProperty("--radix-popper-anchor-width",`${ae}px`),re.setProperty("--radix-popper-anchor-height",`${le}px`)}}),C&&Pc({element:C,padding:a}),Oc({arrowWidth:S,arrowHeight:P}),f&&Ec({strategy:"referenceHidden",...Q})]}),[T,y]=ns(F),L=ye(v);_e(()=>{ee&&L?.()},[ee,L]);const K=R.arrow?.x,k=R.arrow?.y,I=R.arrow?.centerOffset!==0,[j,$]=p.useState();return _e(()=>{x&&$(window.getComputedStyle(x).zIndex)},[x]),g.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:ee?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(" "),...R.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(Nc,{scope:n,placedSide:T,onArrowChange:N,arrowX:K,arrowY:k,shouldHideArrow:I,children:g.jsx(ie.div,{"data-side":T,"data-align":y,...m,ref:w,style:{...m.style,animation:ee?void 0:"none"}})})})});Qo.displayName=Hn;var es="PopperArrow",Ic={top:"bottom",right:"left",bottom:"top",left:"right"},ts=p.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=_c(es,r),i=Ic[s.placedSide];return g.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:g.jsx(Mc,{...o,ref:n,style:{...o.style,display:"block"}})})});ts.displayName=es;function Tc(e){return e!==null}var Oc=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=ns(n),c={start:"0%",center:"50%",end:"100%"}[d],f=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+l/2;let v="",m="";return u==="bottom"?(v=i?c:`${f}px`,m=`${-l}px`):u==="top"?(v=i?c:`${f}px`,m=`${r.floating.height+l}px`):u==="right"?(v=`${-l}px`,m=i?c:`${h}px`):u==="left"&&(v=`${r.floating.width+l}px`,m=i?c:`${h}px`),{data:{x:v,y:m}}}});function ns(e){const[t,n="center"]=e.split("-");return[t,n]}var rs=qo,Dc=Jo,zc=Qo,jc=ts,Lc="Portal",os=p.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=p.useState(!1);_e(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?xr.createPortal(g.jsx(ie.div,{...r,ref:t}),i):null});os.displayName=Lc;var $c=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},nt=new WeakMap,Kt=new WeakMap,Yt={},Wn=0,ss=function(e){return e&&(e.host||ss(e.parentNode))},Fc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ss(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})},Bc=function(e,t,n,r){var o=Fc(t,Array.isArray(e)?e:[e]);Yt[n]||(Yt[n]=new WeakMap);var s=Yt[n],i=[],a=new Set,l=new Set(o),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};o.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(f){if(a.has(f))d(f);else try{var h=f.getAttribute(r),v=h!==null&&h!=="false",m=(nt.get(f)||0)+1,b=(s.get(f)||0)+1;nt.set(f,m),s.set(f,b),i.push(f),m===1&&v&&Kt.set(f,!0),b===1&&f.setAttribute(n,"true"),v||f.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",f,x)}})};return d(t),a.clear(),Wn++,function(){i.forEach(function(c){var f=nt.get(c)-1,h=s.get(c)-1;nt.set(c,f),s.set(c,h),f||(Kt.has(c)||c.removeAttribute(r),Kt.delete(c)),h||c.removeAttribute(n)}),Wn--,Wn||(nt=new WeakMap,nt=new WeakMap,Kt=new WeakMap,Yt={})}},Gc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=$c(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Bc(r,o,n,"aria-hidden")):function(){return null}},Ee=function(){return Ee=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},Ee.apply(this,arguments)};function is(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 Hc(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))}typeof SuppressedError=="function"&&SuppressedError;var Xt="right-scroll-bar-position",qt="width-before-scroll-bar",Wc="with-scroll-bars-hidden",Vc="--removed-body-scroll-bar-size";function Vn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Uc(e,t){var n=A.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 Kc=typeof window<"u"?p.useLayoutEffect:p.useEffect,as=new WeakMap;function Yc(e,t){var n=Uc(null,function(r){return e.forEach(function(o){return Vn(o,r)})});return Kc(function(){var r=as.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Vn(a,null)}),s.forEach(function(a){o.has(a)||Vn(a,i)})}as.set(n,e)},[e]),n}function Xc(e){return e}function qc(e,t){t===void 0&&(t=Xc);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(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function Zc(e){e===void 0&&(e={});var t=qc(null);return t.options=Ee({async:!0,ssr:!1},e),t}var ls=function(e){var t=e.sideCar,n=is(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 p.createElement(r,Ee({},n))};ls.isSideCarExport=!0;function Jc(e,t){return e.useMedium(t),ls}var cs=Zc(),Un=function(){},Zt=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Un,onWheelCapture:Un,onTouchMoveCapture:Un}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,f=e.sideCar,h=e.noIsolation,v=e.inert,m=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,E=e.gapMode,w=is(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,N=Yc([n,t]),_=Ee(Ee({},w),o);return p.createElement(p.Fragment,null,d&&p.createElement(C,{sideCar:cs,removeScrollBar:u,shards:c,noIsolation:h,inert:v,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:E}),i?p.cloneElement(p.Children.only(a),Ee(Ee({},_),{ref:N})):p.createElement(x,Ee({},_,{className:l,ref:N}),a))});Zt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zt.classNames={fullWidth:qt,zeroRight:Xt};var Qc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qc();return t&&e.setAttribute("nonce",t),e}function tu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ru=function(){var e=0,t=null;return{add:function(n){e==0&&(t=eu())&&(tu(t,n),nu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ou=function(){var e=ru();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},us=function(){var e=ou(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},su={left:0,top:0,right:0,gap:0},Kn=function(e){return parseInt(e||"",10)||0},iu=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[Kn(n),Kn(r),Kn(o)]},au=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return su;var t=iu(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])}},lu=us(),rt="data-scroll-locked",cu=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
23
|
-
.`.concat(
|
|
22
|
+
<%s key={someKey} {...props} />`,k,O,Y,O),T[O+k]=!0)}if(O=null,K!==void 0&&(n(K),O=""+K),i(L)&&(n(L.key),O=""+L.key),"key"in L){K={};for(var ne in L)ne!=="key"&&(K[ne]=L[ne])}else K=L;return O&&a(K,typeof y=="function"?y.displayName||y.name||"Unknown":y),u(y,O,j,I,o(),K,F,M)}function c(y){typeof y=="object"&&y!==null&&y.$$typeof===g&&y._store&&(y._store.validated=1)}var f=A,g=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),w=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),W=Symbol.for("react.client.reference"),U=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,Q=Array.isArray,G=console.createTask?console.createTask:function(){return null};f={"react-stack-bottom-frame":function(y){return y()}};var V,$={},ee=f["react-stack-bottom-frame"].bind(f,s)(),R=G(r(s)),T={};dt.Fragment=h,dt.jsx=function(y,L,K,k,I){var j=1e4>U.recentlyCreatedOwnerStacks++;return d(y,L,K,!1,k,I,j?Error("react-stack-top-frame"):ee,j?G(r(y)):R)},dt.jsxs=function(y,L,K,k,I){var j=1e4>U.recentlyCreatedOwnerStacks++;return d(y,L,K,!0,k,I,j?Error("react-stack-top-frame"):ee,j?G(r(y)):R)}}()),dt}var Mr;function Ji(){return Mr||(Mr=1,process.env.NODE_ENV==="production"?Nt.exports=qi():Nt.exports=Zi()),Nt.exports}var m=Ji();function Rr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _t(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Rr(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():Rr(e[o],null)}}}}function ue(...e){return p.useCallback(_t(...e),e)}function ft(e){const t=ea(e),n=p.forwardRef((r,o)=>{const{children:s,...i}=r,a=p.Children.toArray(s),l=a.find(na);if(l){const u=l.props.children,d=a.map(c=>c===l?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:c);return m.jsx(t,{...i,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,d):null})}return m.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Qi=ft("Slot");function ea(e){const t=p.forwardRef((n,r)=>{const{children:o,...s}=n;if(p.isValidElement(o)){const i=oa(o),a=ra(s,o.props);return o.type!==p.Fragment&&(a.ref=r?_t(r,i):i),p.cloneElement(o,a)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ta=Symbol("radix.slottable");function na(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ta}function ra(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]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function oa(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 Ar(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=Ar(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Nr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ar(e))&&(r&&(r+=" "),r+=t);return r}const _r=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ir=Nr,gn=(e,t)=>n=>{var r;if(t?.variants==null)return Ir(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const d=n?.[u],c=s?.[u];if(d===null)return null;const f=_r(d)||_r(c);return o[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:f,...g}=d;return Object.entries(g).every(v=>{let[h,b]=v;return Array.isArray(b)?b.includes({...s,...a}[h]):{...s,...a}[h]===b})?[...u,c,f]:u},[]);return Ir(e,i,l,n?.class,n?.className)},sa=gn("inline-flex items-center cursor-pointer justify-center gap-2 whitespace-nowrap rounded-md font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-secondary text-secondary-foreground hover:bg-input active:bg-secondary",accent:"bg-accent text-accent-foreground hover:bg-accent/90 active:bg-accent/80",light:"bg-background text-foreground border border-border hover:bg-muted active:bg-muted/80",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:opacity-90 active:opacity-80",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:opacity-90 active:opacity-80",outline:"border border-border bg-transparent hover:bg-muted hover:text-muted-foreground text-foreground",ghost:"hover:bg-muted-foreground/20 text-foreground",link:"text-primary underline-offset-4 hover:underline text-primary-foreground",icon:"hover:bg-muted-foreground/20 text-foreground rounded-full bg-muted-foreground/10"},size:{sm:"h-6 px-3 text-xs [&_svg]:size-3",default:"h-9 px-4 text-sm [&_svg]:size-4",md:"h-9 px-4 text-sm [&_svg]:size-4",lg:"h-11 px-6 text-base [&_svg]:size-5",icon:"h-9 w-9 [&_svg]:size-4"}},defaultVariants:{variant:"default",size:"default"}}),Pe=A.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?Qi:"button";return m.jsx(i,{className:sa({variant:t,size:n,className:e}),ref:s,...o})});Pe.displayName="Button";const hn="-",ia=e=>{const t=la(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(hn);return a[0]===""&&a.length!==1&&a.shift(),Tr(a,t)||aa(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},Tr=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Tr(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(hn);return t.validators.find(({validator:i})=>i(s))?.classGroupId},Or=/^\[(.+)\]$/,aa=e=>{if(Or.test(e)){const t=Or.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},la=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)vn(n[o],r,o,t);return r},vn=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Dr(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(ca(o)){vn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{vn(i,Dr(t,s),n,r)})})},Dr=(e,t)=>{let n=e;return t.split(hn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ca=e=>e.isThemeGetter,ua=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)}}},bn="!",xn=":",da=xn.length,fa=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,l=0,u;for(let v=0;v<o.length;v++){let h=o[v];if(i===0&&a===0){if(h===xn){s.push(o.slice(l,v)),l=v+da;continue}if(h==="/"){u=v;continue}}h==="["?i++:h==="]"?i--:h==="("?a++:h===")"&&a--}const d=s.length===0?o:o.substring(l),c=pa(d),f=c!==d,g=u&&u>l?u-l:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:c,maybePostfixModifierPosition:g}};if(t){const o=t+xn,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},pa=e=>e.endsWith(bn)?e.substring(0,e.length-1):e.startsWith(bn)?e.substring(1):e,ma=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},ga=e=>({cache:ua(e.cacheSize),parseClassName:fa(e),sortModifiers:ma(e),...ia(e)}),ha=/\s+/,va=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(ha);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:c,modifiers:f,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:h}=n(d);if(c){l=d+(l.length>0?" "+l:l);continue}let b=!!h,x=r(b?v.substring(0,h):v);if(!x){if(!b){l=d+(l.length>0?" "+l:l);continue}if(x=r(v),!x){l=d+(l.length>0?" "+l:l);continue}b=!1}const E=s(f).join(":"),w=g?E+bn:E,C=w+x;if(i.includes(C))continue;i.push(C);const N=o(x,b);for(let _=0;_<N.length;++_){const S=N[_];i.push(w+S)}l=d+(l.length>0?" "+l:l)}return l};function ba(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zr(t))&&(r&&(r+=" "),r+=n);return r}const zr=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zr(e[r]))&&(n&&(n+=" "),n+=t);return n};function xa(e,...t){let n,r,o,s=i;function i(l){const u=t.reduce((d,c)=>c(d),e());return n=ga(u),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=va(l,n);return o(l,d),d}return function(){return s(ba.apply(null,arguments))}}const se=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},jr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Lr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ya=/^\d+\/\d+$/,wa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ca=/\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$/,Sa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ea=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ue=e=>ya.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),Ne=e=>!!e&&Number.isInteger(Number(e)),yn=e=>e.endsWith("%")&&Z(e.slice(0,-1)),ke=e=>wa.test(e),ka=()=>!0,Ma=e=>Ca.test(e)&&!Sa.test(e),Fr=()=>!1,Ra=e=>Ea.test(e),Aa=e=>Pa.test(e),Na=e=>!D(e)&&!z(e),_a=e=>Ke(e,Wr,Fr),D=e=>jr.test(e),Fe=e=>Ke(e,Vr,Ma),wn=e=>Ke(e,za,Z),$r=e=>Ke(e,Gr,Fr),Ia=e=>Ke(e,Hr,Aa),It=e=>Ke(e,Ur,Ra),z=e=>Lr.test(e),pt=e=>Ye(e,Vr),Ta=e=>Ye(e,ja),Br=e=>Ye(e,Gr),Oa=e=>Ye(e,Wr),Da=e=>Ye(e,Hr),Tt=e=>Ye(e,Ur,!0),Ke=(e,t,n)=>{const r=jr.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ye=(e,t,n=!1)=>{const r=Lr.exec(e);return r?r[1]?t(r[1]):n:!1},Gr=e=>e==="position"||e==="percentage",Hr=e=>e==="image"||e==="url",Wr=e=>e==="length"||e==="size"||e==="bg-size",Vr=e=>e==="length",za=e=>e==="number",ja=e=>e==="family-name",Ur=e=>e==="shadow",La=xa(()=>{const e=se("color"),t=se("font"),n=se("text"),r=se("font-weight"),o=se("tracking"),s=se("leading"),i=se("breakpoint"),a=se("container"),l=se("spacing"),u=se("radius"),d=se("shadow"),c=se("inset-shadow"),f=se("text-shadow"),g=se("drop-shadow"),v=se("blur"),h=se("perspective"),b=se("aspect"),x=se("ease"),E=se("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...C(),z,D],_=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],P=()=>[z,D,l],H=()=>[Ue,"full","auto",...P()],W=()=>[Ne,"none","subgrid",z,D],U=()=>["auto",{span:["full",Ne,z,D]},Ne,z,D],B=()=>[Ne,"auto",z,D],Q=()=>["auto","min","max","fr",z,D],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...P()],ee=()=>[Ue,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],R=()=>[e,z,D],T=()=>[...C(),Br,$r,{position:[z,D]}],y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",Oa,_a,{size:[z,D]}],K=()=>[yn,pt,Fe],k=()=>["","none","full",u,z,D],I=()=>["",Z,pt,Fe],j=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>[Z,yn,Br,$r],O=()=>["","none",v,z,D],Y=()=>["none",Z,z,D],ne=()=>["none",Z,z,D],ae=()=>[Z,z,D],le=()=>[Ue,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ke],breakpoint:[ke],color:[ka],container:[ke],"drop-shadow":[ke],ease:["in","out","in-out"],font:[Na],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ke],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ke],shadow:[ke],spacing:["px",Z],text:[ke],"text-shadow":[ke],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ue,D,z,b]}],container:["container"],columns:[{columns:[Z,D,z,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:N()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{start:H()}],end:[{end:H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[Ne,"auto",z,D]}],basis:[{basis:[Ue,"full","auto",a,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Z,Ue,"auto","initial","none",D]}],grow:[{grow:["",Z,z,D]}],shrink:[{shrink:["",Z,z,D]}],order:[{order:[Ne,"first","last","none",z,D]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],w:[{w:[a,"screen",...ee()]}],"min-w":[{"min-w":[a,"screen","none",...ee()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,pt,Fe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,z,wn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yn,D]}],"font-family":[{font:[Ta,D,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,z,D]}],"line-clamp":[{"line-clamp":[Z,"none",z,wn]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",z,D]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",z,D]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:[Z,"from-font","auto",z,Fe]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[Z,"auto",z,D]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z,D]}],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",z,D]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:y()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ne,z,D],radial:["",z,D],conic:[Ne,z,D]},Da,Ia]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],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:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...j(),"hidden","none"]}],"divide-style":[{divide:[...j(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...j(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Z,z,D]}],"outline-w":[{outline:["",Z,pt,Fe]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,Tt,It]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",c,Tt,It]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[Z,Fe]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",f,Tt,It]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[Z,z,D]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],"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":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":M()}],"mask-image-linear-to-pos":[{"mask-linear-to":M()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":M()}],"mask-image-t-to-pos":[{"mask-t-to":M()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":M()}],"mask-image-r-to-pos":[{"mask-r-to":M()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":M()}],"mask-image-b-to-pos":[{"mask-b-to":M()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":M()}],"mask-image-l-to-pos":[{"mask-l-to":M()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":M()}],"mask-image-x-to-pos":[{"mask-x-to":M()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":M()}],"mask-image-y-to-pos":[{"mask-y-to":M()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[z,D]}],"mask-image-radial-from-pos":[{"mask-radial-from":M()}],"mask-image-radial-to-pos":[{"mask-radial-to":M()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":M()}],"mask-image-conic-to-pos":[{"mask-conic-to":M()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:y()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",z,D]}],filter:[{filter:["","none",z,D]}],blur:[{blur:O()}],brightness:[{brightness:[Z,z,D]}],contrast:[{contrast:[Z,z,D]}],"drop-shadow":[{"drop-shadow":["","none",g,Tt,It]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",Z,z,D]}],"hue-rotate":[{"hue-rotate":[Z,z,D]}],invert:[{invert:["",Z,z,D]}],saturate:[{saturate:[Z,z,D]}],sepia:[{sepia:["",Z,z,D]}],"backdrop-filter":[{"backdrop-filter":["","none",z,D]}],"backdrop-blur":[{"backdrop-blur":O()}],"backdrop-brightness":[{"backdrop-brightness":[Z,z,D]}],"backdrop-contrast":[{"backdrop-contrast":[Z,z,D]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Z,z,D]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,z,D]}],"backdrop-invert":[{"backdrop-invert":["",Z,z,D]}],"backdrop-opacity":[{"backdrop-opacity":[Z,z,D]}],"backdrop-saturate":[{"backdrop-saturate":[Z,z,D]}],"backdrop-sepia":[{"backdrop-sepia":["",Z,z,D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",z,D]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Z,"initial",z,D]}],ease:[{ease:["linear","initial",x,z,D]}],delay:[{delay:[Z,z,D]}],animate:[{animate:["none",E,z,D]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,z,D]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[z,D,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"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",z,D]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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,D]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[Z,pt,Fe,wn]}],stroke:[{stroke:["none",...R()]}],"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"]}});function te(...e){return La(Nr(e))}const Kr=({className:e,...t})=>m.jsx("textarea",{"data-slot":"textarea",className:te("flex w-full rounded-md px-3 py-2 text-base transition-colors outline-none resize-none","min-h-[80px] field-sizing-content","bg-input","border border-border","text-foreground placeholder:text-muted-foreground","hover:border-border","focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20","aria-invalid:border-destructive","disabled:cursor-not-allowed disabled:opacity-50","text-sm font-medium leading-[1.3] tracking-[-0.01em]",e),...t});Kr.displayName="Textarea";const Fa=gn(te("flex w-full rounded-md px-3 py-2 text-base transition-colors outline-none resize-none","field-sizing-content","aria-invalid:border-destructive","disabled:cursor-not-allowed disabled:opacity-50","text-sm font-medium leading-[1.3] tracking-[-0.01em]"),{variants:{variant:{default:"bg-input border border-border hover:border-border focus-visible:border-ring text-foreground placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/20",shade:"bg-muted-foreground/10 text-muted-foreground hover:bg-muted-foreground/12 focus:bg-muted-foreground/15"}},defaultVariants:{variant:"default"}}),Yr=A.forwardRef(({className:e,type:t,variant:n,...r},o)=>m.jsx("input",{type:t,className:Fa({variant:n,className:e}),ref:o,...r}));Yr.displayName="Input";function J(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Xe(e,t=[]){let n=[];function r(s,i){const a=p.createContext(i),l=n.length;n=[...n,i];const u=c=>{const{scope:f,children:g,...v}=c,h=f?.[e]?.[l]||a,b=p.useMemo(()=>v,Object.values(v));return m.jsx(h.Provider,{value:b,children:g})};u.displayName=s+"Provider";function d(c,f){const g=f?.[e]?.[l]||a,v=p.useContext(g);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${c}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>p.createContext(i));return function(a){const l=a?.[e]||s;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,$a(o,...t)]}function $a(...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((a,{useScope:l,scopeName:u})=>{const c=l(s)[`__scope${u}`];return{...a,...c}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Xr(e){const t=e+"CollectionProvider",[n,r]=Xe(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:b,children:x}=h,E=A.useRef(null),w=A.useRef(new Map).current;return m.jsx(o,{scope:b,itemMap:w,collectionRef:E,children:x})};i.displayName=t;const a=e+"CollectionSlot",l=ft(a),u=A.forwardRef((h,b)=>{const{scope:x,children:E}=h,w=s(a,x),C=ue(b,w.collectionRef);return m.jsx(l,{ref:C,children:E})});u.displayName=a;const d=e+"CollectionItemSlot",c="data-radix-collection-item",f=ft(d),g=A.forwardRef((h,b)=>{const{scope:x,children:E,...w}=h,C=A.useRef(null),N=ue(b,C),_=s(d,x);return A.useEffect(()=>(_.itemMap.set(C,{ref:C,...w}),()=>void _.itemMap.delete(C))),m.jsx(f,{[c]:"",ref:N,children:E})});g.displayName=d;function v(h){const b=s(e+"CollectionConsumer",h);return A.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const w=Array.from(E.querySelectorAll(`[${c}]`));return Array.from(b.itemMap.values()).sort((_,S)=>w.indexOf(_.ref.current)-w.indexOf(S.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:u,ItemSlot:g},v,r]}var _e=globalThis?.document?p.useLayoutEffect:()=>{},Ba=p[" useId ".trim().toString()]||(()=>{}),Ga=0;function qe(e){const[t,n]=p.useState(Ba());return _e(()=>{n(r=>r??String(Ga++))},[e]),e||(t?`radix-${t}`:"")}var Ha=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=Ha.reduce((e,t)=>{const n=ft(`Primitive.${t}`),r=p.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qr(e,t){e&&Er.flushSync(()=>e.dispatchEvent(t))}function ye(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>t.current?.(...n),[])}var Wa=p[" useInsertionEffect ".trim().toString()]||_e;function Ot({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Va({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=p.useRef(e!==void 0);p.useEffect(()=>{const c=d.current;c!==a&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${a?"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.`),d.current=a},[a,r])}const u=p.useCallback(d=>{if(a){const c=Ua(d)?d(e):d;c!==e&&i.current?.(c)}else s(d)},[a,e,s,i]);return[l,u]}function Va({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),o=p.useRef(n),s=p.useRef(t);return Wa(()=>{s.current=t},[t]),p.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Ua(e){return typeof e=="function"}var Ka=p.createContext(void 0);function Cn(e){const t=p.useContext(Ka);return e||t||"ltr"}var Sn="rovingFocusGroup.onEntryFocus",Ya={bubbles:!1,cancelable:!0},mt="RovingFocusGroup",[En,Zr,Xa]=Xr(mt),[qa,Dt]=Xe(mt,[Xa]),[Za,Ja]=qa(mt),Jr=p.forwardRef((e,t)=>m.jsx(En.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(En.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Qa,{...e,ref:t})})}));Jr.displayName=mt;var Qa=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...c}=e,f=p.useRef(null),g=ue(t,f),v=Cn(s),[h,b]=Ot({prop:i,defaultProp:a??null,onChange:l,caller:mt}),[x,E]=p.useState(!1),w=ye(u),C=Zr(n),N=p.useRef(!1),[_,S]=p.useState(0);return p.useEffect(()=>{const P=f.current;if(P)return P.addEventListener(Sn,w),()=>P.removeEventListener(Sn,w)},[w]),m.jsx(Za,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:h,onItemFocus:p.useCallback(P=>b(P),[b]),onItemShiftTab:p.useCallback(()=>E(!0),[]),onFocusableItemAdd:p.useCallback(()=>S(P=>P+1),[]),onFocusableItemRemove:p.useCallback(()=>S(P=>P-1),[]),children:m.jsx(ie.div,{tabIndex:x||_===0?-1:0,"data-orientation":r,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:J(e.onMouseDown,()=>{N.current=!0}),onFocus:J(e.onFocus,P=>{const H=!N.current;if(P.target===P.currentTarget&&H&&!x){const W=new CustomEvent(Sn,Ya);if(P.currentTarget.dispatchEvent(W),!W.defaultPrevented){const U=C().filter($=>$.focusable),B=U.find($=>$.active),Q=U.find($=>$.id===h),V=[B,Q,...U].filter(Boolean).map($=>$.ref.current);to(V,d)}}N.current=!1}),onBlur:J(e.onBlur,()=>E(!1))})})}),Qr="RovingFocusGroupItem",eo=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=qe(),u=s||l,d=Ja(Qr,n),c=d.currentTabStopId===u,f=Zr(n),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:h}=d;return p.useEffect(()=>{if(r)return g(),()=>v()},[r,g,v]),m.jsx(En.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:m.jsx(ie.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:J(e.onMouseDown,b=>{r?d.onItemFocus(u):b.preventDefault()}),onFocus:J(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:J(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=nl(b,d.orientation,d.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=f().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const C=w.indexOf(b.currentTarget);w=d.loop?rl(w,C+1):w.slice(C+1)}setTimeout(()=>to(w))}}),children:typeof i=="function"?i({isCurrentTabStop:c,hasTabStop:h!=null}):i})})});eo.displayName=Qr;var el={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tl(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function nl(e,t,n){const r=tl(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return el[r]}function to(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function rl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var no=Jr,ro=eo;function ol(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Ze=e=>{const{present:t,children:n}=e,r=sl(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),s=ue(r.ref,il(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:s}):null};Ze.displayName="Presence";function sl(e){const[t,n]=p.useState(),r=p.useRef(null),o=p.useRef(e),s=p.useRef("none"),i=e?"mounted":"unmounted",[a,l]=ol(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=zt(r.current);s.current=a==="mounted"?u:"none"},[a]),_e(()=>{const u=r.current,d=o.current;if(d!==e){const f=s.current,g=zt(u);e?l("MOUNT"):g==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&f!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),_e(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=g=>{const h=zt(r.current).includes(g.animationName);if(g.target===t&&h&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=g=>{g.target===t&&(s.current=zt(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function zt(e){return e?.animationName||"none"}function il(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 jt="Tabs",[al,Xf]=Xe(jt,[Dt]),oo=Dt(),[ll,Pn]=al(jt),so=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=Cn(a),[c,f]=Ot({prop:r,onChange:o,defaultProp:s??"",caller:jt});return m.jsx(ll,{scope:n,baseId:qe(),value:c,onValueChange:f,orientation:i,dir:d,activationMode:l,children:m.jsx(ie.div,{dir:d,"data-orientation":i,...u,ref:t})})});so.displayName=jt;var io="TabsList",ao=p.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=Pn(io,n),i=oo(n);return m.jsx(no,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:m.jsx(ie.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});ao.displayName=io;var lo="TabsTrigger",co=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=Pn(lo,n),a=oo(n),l=po(i.baseId,r),u=mo(i.baseId,r),d=r===i.value;return m.jsx(ro,{asChild:!0,...a,focusable:!o,active:d,children:m.jsx(ie.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:J(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?i.onValueChange(r):c.preventDefault()}),onKeyDown:J(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&i.onValueChange(r)}),onFocus:J(e.onFocus,()=>{const c=i.activationMode!=="manual";!d&&!o&&c&&i.onValueChange(r)})})})});co.displayName=lo;var uo="TabsContent",fo=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=Pn(uo,n),l=po(a.baseId,r),u=mo(a.baseId,r),d=r===a.value,c=p.useRef(d);return p.useEffect(()=>{const f=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(f)},[]),m.jsx(Ze,{present:o||d,children:({present:f})=>m.jsx(ie.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:f&&s})})});fo.displayName=uo;function po(e,t){return`${e}-trigger-${t}`}function mo(e,t){return`${e}-content-${t}`}var cl=so,ul=ao,dl=co,fl=fo;const Lt=({className:e,...t})=>m.jsx(cl,{"data-slot":"tabs",className:te("flex flex-col",e),...t});Lt.displayName="Tabs";const kn=({className:e,...t})=>m.jsx(ul,{"data-slot":"tabs-list",className:te("inline-flex rounded-none bg-transparent p-0 min-h-10",e),...t});kn.displayName="TabsList";const Mn=({className:e,...t})=>m.jsx(dl,{"data-slot":"tabs-trigger",className:te("inline-flex items-center justify-center whitespace-nowrap rounded-none px-4 py-2 text-sm font-medium text-muted-foreground ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 relative data-[state=active]:after:absolute data-[state=active]:after:bottom-0 data-[state=active]:after:left-1/2 data-[state=active]:after:-translate-x-1/2 data-[state=active]:after:h-0.5 data-[state=active]:after:w-[calc(100%-2.5rem)] data-[state=active]:after:bg-foreground data-[state=active]:after:rounded-full",e),...t});Mn.displayName="TabsTrigger";const Rn=({className:e,...t})=>m.jsx(fl,{"data-slot":"tabs-content",className:te("flex-1 outline-none text-foreground",e),...t});Rn.displayName="TabsContent";const pl={default:"bg-card border border-border",outlined:"bg-transparent border-2 border-border",filled:"bg-muted border border-transparent",ghost:"bg-transparent border-transparent shadow-none"},go=({title:e,subtitle:t,details:n,actions:r,className:o,children:s,size:i,variant:a="default",contentClassName:l,tabs:u})=>{const d=u&&u.tabs.length>0,c=A.useMemo(()=>{const f=m.jsxs(m.Fragment,{children:[d&&m.jsx(kn,{className:te("bg-card border-b border-border px-1 pt-5",{"bg-transparent":a==="ghost"}),children:u?.tabs.map(g=>m.jsx(Mn,{value:g.label,children:g.label},g.label))}),m.jsxs("div",{className:te("flex flex-col gap-2 p-4",l),children:[n?.map((g,v)=>m.jsxs("div",{className:"flex gap-4 items-start",children:[m.jsx("div",{className:"flex items-center h-8 shrink-0",children:m.jsx("span",{className:"text-sm font-medium text-foreground tracking-[-0.25px] w-24 truncate",children:g.label})}),m.jsx("div",{className:te("flex-1 rounded-lg px-2 py-1 min-h-6",g.highlighted&&"bg-secondary"),children:m.jsx("div",{className:"flex items-center min-h-6",children:typeof g.value=="string"?m.jsx("span",{className:"text-sm font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:g.value}):g.value})})]},v)),d&&u.tabs.map(g=>m.jsx(Rn,{value:g.label,children:g.content},g.label)),s]})]});return d?m.jsx(Lt,{defaultValue:u?.tabs[0]?.label,children:f}):f},[u,a,i,e,t,n,r,l,s,d]);return m.jsx("div",{className:te("relative size-full backdrop-blur-[48px] backdrop-filter","text-foreground","rounded-lg overflow-hidden",pl[a],o),children:m.jsxs("div",{className:"flex flex-col size-full",children:[m.jsx("div",{className:te("relative shrink-0 w-full border-b border-border bg-card",{"bg-transparent":a==="ghost","border-b-0":d}),children:m.jsxs("div",{className:te("flex flex-col gap-1 px-5 py-4",{"px-4 py-3":i==="sm","px-5 py-4":i==="md","pb-0":d}),children:[m.jsxs("div",{className:"flex items-center w-full",children:[m.jsx("div",{className:te("font-semibold text-foreground tracking-[-0.25px] leading-tight flex-1",i==="sm"?"text-xs":"text-base"),children:e}),r&&r.length>0&&m.jsx("div",{className:"flex items-center gap-1",children:r.map((f,g)=>m.jsx(Pe,{onClick:f.onClick,variant:"ghost",className:te(f.active&&"bg-muted-foreground/20 hover:bg-muted-foreground/30"),size:"icon","aria-label":f.label,children:f.icon},g))})]}),t&&m.jsx("p",{className:"text-sm font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:t})]})}),m.jsx("div",{className:"flex-1 overflow-auto",children:c})]})})};go.displayName="Panel";function ml(e,t=globalThis?.document){const n=ye(e);p.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 gl="DismissableLayer",An="dismissableLayer.update",hl="dismissableLayer.pointerDownOutside",vl="dismissableLayer.focusOutside",ho,vo=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bo=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=p.useContext(vo),[d,c]=p.useState(null),f=d?.ownerDocument??globalThis?.document,[,g]=p.useState({}),v=ue(t,S=>c(S)),h=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=h.indexOf(b),E=d?h.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=E>=x,N=yl(S=>{const P=S.target,H=[...u.branches].some(W=>W.contains(P));!C||H||(o?.(S),i?.(S),S.defaultPrevented||a?.())},f),_=wl(S=>{const P=S.target;[...u.branches].some(W=>W.contains(P))||(s?.(S),i?.(S),S.defaultPrevented||a?.())},f);return ml(S=>{E===u.layers.size-1&&(r?.(S),!S.defaultPrevented&&a&&(S.preventDefault(),a()))},f),p.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ho=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),xo(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ho)}},[d,f,n,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),xo())},[d,u]),p.useEffect(()=>{const S=()=>g({});return document.addEventListener(An,S),()=>document.removeEventListener(An,S)},[]),m.jsx(ie.div,{...l,ref:v,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:J(e.onFocusCapture,_.onFocusCapture),onBlurCapture:J(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,N.onPointerDownCapture)})});bo.displayName=gl;var bl="DismissableLayerBranch",xl=p.forwardRef((e,t)=>{const n=p.useContext(vo),r=p.useRef(null),o=ue(t,r);return p.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(ie.div,{...e,ref:o})});xl.displayName=bl;function yl(e,t=globalThis?.document){const n=ye(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){yo(hl,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}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 wl(e,t=globalThis?.document){const n=ye(e),r=p.useRef(!1);return p.useEffect(()=>{const o=s=>{s.target&&!r.current&&yo(vl,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 xo(){const e=new CustomEvent(An);document.dispatchEvent(e)}function yo(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?qr(o,s):o.dispatchEvent(s)}var Nn=0;function Cl(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wo()),document.body.insertAdjacentElement("beforeend",e[1]??wo()),Nn++,()=>{Nn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Nn--}},[])}function wo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var _n="focusScope.autoFocusOnMount",In="focusScope.autoFocusOnUnmount",Co={bubbles:!1,cancelable:!0},Sl="FocusScope",So=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=p.useState(null),u=ye(o),d=ye(s),c=p.useRef(null),f=ue(t,h=>l(h)),g=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let h=function(w){if(g.paused||!a)return;const C=w.target;a.contains(C)?c.current=C:Ie(c.current,{select:!0})},b=function(w){if(g.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||Ie(c.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const N of w)N.removedNodes.length>0&&Ie(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const E=new MutationObserver(x);return a&&E.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),E.disconnect()}}},[r,a,g.paused]),p.useEffect(()=>{if(a){ko.add(g);const h=document.activeElement;if(!a.contains(h)){const x=new CustomEvent(_n,Co);a.addEventListener(_n,u),a.dispatchEvent(x),x.defaultPrevented||(El(Al(Eo(a)),{select:!0}),document.activeElement===h&&Ie(a))}return()=>{a.removeEventListener(_n,u),setTimeout(()=>{const x=new CustomEvent(In,Co);a.addEventListener(In,d),a.dispatchEvent(x),x.defaultPrevented||Ie(h??document.body,{select:!0}),a.removeEventListener(In,d),ko.remove(g)},0)}}},[a,u,d,g]);const v=p.useCallback(h=>{if(!n&&!r||g.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,x=document.activeElement;if(b&&x){const E=h.currentTarget,[w,C]=Pl(E);w&&C?!h.shiftKey&&x===C?(h.preventDefault(),n&&Ie(w,{select:!0})):h.shiftKey&&x===w&&(h.preventDefault(),n&&Ie(C,{select:!0})):x===E&&h.preventDefault()}},[n,r,g.paused]);return m.jsx(ie.div,{tabIndex:-1,...i,ref:f,onKeyDown:v})});So.displayName=Sl;function El(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ie(r,{select:t}),document.activeElement!==n)return}function Pl(e){const t=Eo(e),n=Po(t,e),r=Po(t.reverse(),e);return[n,r]}function Eo(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 Po(e,t){for(const n of e)if(!kl(n,{upTo:t}))return n}function kl(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 Ml(e){return e instanceof HTMLInputElement&&"select"in e}function Ie(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ml(e)&&t&&e.select()}}var ko=Rl();function Rl(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Mo(e,t),e.unshift(t)},remove(t){e=Mo(e,t),e[0]?.resume()}}}function Mo(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Al(e){return e.filter(t=>t.tagName!=="A")}const Nl=["top","right","bottom","left"],Te=Math.min,fe=Math.max,Ft=Math.round,$t=Math.floor,we=e=>({x:e,y:e}),_l={left:"right",right:"left",bottom:"top",top:"bottom"},Il={start:"end",end:"start"};function Tn(e,t,n){return fe(e,Te(t,n))}function Me(e,t){return typeof e=="function"?e(t):e}function Re(e){return e.split("-")[0]}function Je(e){return e.split("-")[1]}function On(e){return e==="x"?"y":"x"}function Dn(e){return e==="y"?"height":"width"}function Oe(e){return["top","bottom"].includes(Re(e))?"y":"x"}function zn(e){return On(Oe(e))}function Tl(e,t,n){n===void 0&&(n=!1);const r=Je(e),o=zn(e),s=Dn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Bt(i)),[i,Bt(i)]}function Ol(e){const t=Bt(e);return[jn(e),t,jn(t)]}function jn(e){return e.replace(/start|end/g,t=>Il[t])}function Dl(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function zl(e,t,n,r){const o=Je(e);let s=Dl(Re(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(jn)))),s}function Bt(e){return e.replace(/left|right|bottom|top/g,t=>_l[t])}function jl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ro(e){return typeof e!="number"?jl(e):{top:e,right:e,bottom:e,left:e}}function Gt(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 Ao(e,t,n){let{reference:r,floating:o}=e;const s=Oe(t),i=zn(t),a=Dn(i),l=Re(t),u=s==="y",d=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let g;switch(l){case"top":g={x:d,y:r.y-o.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:c};break;case"left":g={x:r.x-o.width,y:c};break;default:g={x:r.x,y:r.y}}switch(Je(t)){case"start":g[i]-=f*(n&&u?-1:1);break;case"end":g[i]+=f*(n&&u?-1:1);break}return g}const Ll=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:c}=Ao(u,r,l),f=r,g={},v=0;for(let h=0;h<a.length;h++){const{name:b,fn:x}=a[h],{x:E,y:w,data:C,reset:N}=await x({x:d,y:c,initialPlacement:r,placement:f,strategy:o,middlewareData:g,rects:u,platform:i,elements:{reference:e,floating:t}});d=E??d,c=w??c,g={...g,[b]:{...g[b],...C}},N&&v<=50&&(v++,typeof N=="object"&&(N.placement&&(f=N.placement),N.rects&&(u=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:d,y:c}=Ao(u,f,l)),h=-1)}return{x:d,y:c,placement:f,strategy:o,middlewareData:g}};async function gt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:f=!1,padding:g=0}=Me(t,e),v=Ro(g),b=a[f?c==="floating"?"reference":"floating":c],x=Gt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),E=c==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},N=Gt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:w,strategy:l}):E);return{top:(x.top-N.top+v.top)/C.y,bottom:(N.bottom-x.bottom+v.bottom)/C.y,left:(x.left-N.left+v.left)/C.x,right:(N.right-x.right+v.right)/C.x}}const Fl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=Me(e,t)||{};if(u==null)return{};const c=Ro(d),f={x:n,y:r},g=zn(o),v=Dn(g),h=await i.getDimensions(u),b=g==="y",x=b?"top":"left",E=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=s.reference[v]+s.reference[g]-f[g]-s.floating[v],N=f[g]-s.reference[g],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=_?_[w]:0;(!S||!await(i.isElement==null?void 0:i.isElement(_)))&&(S=a.floating[w]||s.floating[v]);const P=C/2-N/2,H=S/2-h[v]/2-1,W=Te(c[x],H),U=Te(c[E],H),B=W,Q=S-h[v]-U,G=S/2-h[v]/2+P,V=Tn(B,G,Q),$=!l.arrow&&Je(o)!=null&&G!==V&&s.reference[v]/2-(G<B?W:U)-h[v]/2<0,ee=$?G<B?G-B:G-Q:0;return{[g]:f[g]+ee,data:{[g]:V,centerOffset:G-V-ee,...$&&{alignmentOffset:ee}},reset:$}}}),$l=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:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...b}=Me(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Re(o),E=Oe(a),w=Re(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),N=f||(w||!h?[Bt(a)]:Ol(a)),_=v!=="none";!f&&_&&N.push(...zl(a,h,v,C));const S=[a,...N],P=await gt(t,b),H=[];let W=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&H.push(P[x]),c){const G=Tl(o,i,C);H.push(P[G[0]],P[G[1]])}if(W=[...W,{placement:o,overflows:H}],!H.every(G=>G<=0)){var U,B;const G=(((U=s.flip)==null?void 0:U.index)||0)+1,V=S[G];if(V)return{data:{index:G,overflows:W},reset:{placement:V}};let $=(B=W.filter(ee=>ee.overflows[0]<=0).sort((ee,R)=>ee.overflows[1]-R.overflows[1])[0])==null?void 0:B.placement;if(!$)switch(g){case"bestFit":{var Q;const ee=(Q=W.filter(R=>{if(_){const T=Oe(R.placement);return T===E||T==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,y)=>T+y,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:Q[0];ee&&($=ee);break}case"initialPlacement":$=a;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function No(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _o(e){return Nl.some(t=>e[t]>=0)}const Bl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Me(e,t);switch(r){case"referenceHidden":{const s=await gt(t,{...o,elementContext:"reference"}),i=No(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:_o(i)}}}case"escaped":{const s=await gt(t,{...o,altBoundary:!0}),i=No(s,n.floating);return{data:{escapedOffsets:i,escaped:_o(i)}}}default:return{}}}}};async function Gl(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Re(n),a=Je(n),l=Oe(n)==="y",u=["left","top"].includes(i)?-1:1,d=s&&l?-1:1,c=Me(t,e);let{mainAxis:f,crossAxis:g,alignmentAxis:v}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof v=="number"&&(g=a==="end"?v*-1:v),l?{x:g*d,y:f*u}:{x:f*u,y:g*d}}const Hl=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:a}=t,l=await Gl(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Wl=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:a={fn:b=>{let{x,y:E}=b;return{x,y:E}}},...l}=Me(e,t),u={x:n,y:r},d=await gt(t,l),c=Oe(Re(o)),f=On(c);let g=u[f],v=u[c];if(s){const b=f==="y"?"top":"left",x=f==="y"?"bottom":"right",E=g+d[b],w=g-d[x];g=Tn(E,g,w)}if(i){const b=c==="y"?"top":"left",x=c==="y"?"bottom":"right",E=v+d[b],w=v-d[x];v=Tn(E,v,w)}const h=a.fn({...t,[f]:g,[c]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:s,[c]:i}}}}}},Vl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Me(e,t),d={x:n,y:r},c=Oe(o),f=On(c);let g=d[f],v=d[c];const h=Me(a,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const w=f==="y"?"height":"width",C=s.reference[f]-s.floating[w]+b.mainAxis,N=s.reference[f]+s.reference[w]-b.mainAxis;g<C?g=C:g>N&&(g=N)}if(u){var x,E;const w=f==="y"?"width":"height",C=["top","left"].includes(Re(o)),N=s.reference[c]-s.floating[w]+(C&&((x=i.offset)==null?void 0:x[c])||0)+(C?0:b.crossAxis),_=s.reference[c]+s.reference[w]+(C?0:((E=i.offset)==null?void 0:E[c])||0)-(C?b.crossAxis:0);v<N?v=N:v>_&&(v=_)}return{[f]:g,[c]:v}}}},Ul=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:a}=t,{apply:l=()=>{},...u}=Me(e,t),d=await gt(t,u),c=Re(o),f=Je(o),g=Oe(o)==="y",{width:v,height:h}=s.floating;let b,x;c==="top"||c==="bottom"?(b=c,x=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=c,b=f==="end"?"top":"bottom");const E=h-d.top-d.bottom,w=v-d.left-d.right,C=Te(h-d[b],E),N=Te(v-d[x],w),_=!t.middlewareData.shift;let S=C,P=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=E),_&&!f){const W=fe(d.left,0),U=fe(d.right,0),B=fe(d.top,0),Q=fe(d.bottom,0);g?P=v-2*(W!==0||U!==0?W+U:fe(d.left,d.right)):S=h-2*(B!==0||Q!==0?B+Q:fe(d.top,d.bottom))}await l({...t,availableWidth:P,availableHeight:S});const H=await i.getDimensions(a.floating);return v!==H.width||h!==H.height?{reset:{rects:!0}}:{}}}};function Ht(){return typeof window<"u"}function Qe(e){return Io(e)?(e.nodeName||"").toLowerCase():"#document"}function pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(Io(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Io(e){return Ht()?e instanceof Node||e instanceof pe(e).Node:!1}function he(e){return Ht()?e instanceof Element||e instanceof pe(e).Element:!1}function Se(e){return Ht()?e instanceof HTMLElement||e instanceof pe(e).HTMLElement:!1}function To(e){return!Ht()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pe(e).ShadowRoot}function ht(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Kl(e){return["table","td","th"].includes(Qe(e))}function Wt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ln(e){const t=Fn(),n=he(e)?ve(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Yl(e){let t=De(e);for(;Se(t)&&!et(t);){if(Ln(t))return t;if(Wt(t))return null;t=De(t)}return null}function Fn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(e){return["html","body","#document"].includes(Qe(e))}function ve(e){return pe(e).getComputedStyle(e)}function Vt(e){return he(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function De(e){if(Qe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||To(e)&&e.host||Ce(e);return To(t)?t.host:t}function Oo(e){const t=De(e);return et(t)?e.ownerDocument?e.ownerDocument.body:e.body:Se(t)&&ht(t)?t:Oo(t)}function vt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Oo(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=pe(o);if(s){const a=$n(i);return t.concat(i,i.visualViewport||[],ht(o)?o:[],a&&n?vt(a):[])}return t.concat(o,vt(o,[],n))}function $n(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Do(e){const t=ve(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Se(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ft(n)!==s||Ft(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Bn(e){return he(e)?e:e.contextElement}function tt(e){const t=Bn(e);if(!Se(t))return we(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Do(t);let i=(s?Ft(n.width):n.width)/r,a=(s?Ft(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Xl=we(0);function zo(e){const t=pe(e);return!Fn()||!t.visualViewport?Xl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ql(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pe(e)?!1:t}function $e(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Bn(e);let i=we(1);t&&(r?he(r)&&(i=tt(r)):i=tt(e));const a=ql(s,n,r)?zo(s):we(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,c=o.height/i.y;if(s){const f=pe(s),g=r&&he(r)?pe(r):r;let v=f,h=$n(v);for(;h&&r&&g!==v;){const b=tt(h),x=h.getBoundingClientRect(),E=ve(h),w=x.left+(h.clientLeft+parseFloat(E.paddingLeft))*b.x,C=x.top+(h.clientTop+parseFloat(E.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,c*=b.y,l+=w,u+=C,v=pe(h),h=$n(v)}}return Gt({width:d,height:c,x:l,y:u})}function Gn(e,t){const n=Vt(e).scrollLeft;return t?t.left+n:$e(Ce(e)).left+n}function jo(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Gn(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Zl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ce(r),a=t?Wt(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=we(1);const d=we(0),c=Se(r);if((c||!c&&!s)&&((Qe(r)!=="body"||ht(i))&&(l=Vt(r)),Se(r))){const g=$e(r);u=tt(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const f=i&&!c&&!s?jo(i,l,!0):we(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-l.scrollTop*u.y+d.y+f.y}}function Jl(e){return Array.from(e.getClientRects())}function Ql(e){const t=Ce(e),n=Vt(e),r=e.ownerDocument.body,o=fe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=fe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Gn(e);const a=-n.scrollTop;return ve(r).direction==="rtl"&&(i+=fe(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function ec(e,t){const n=pe(e),r=Ce(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const u=Fn();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function tc(e,t){const n=$e(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Se(e)?tt(e):we(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function Lo(e,t,n){let r;if(t==="viewport")r=ec(e,n);else if(t==="document")r=Ql(Ce(e));else if(he(t))r=tc(t,n);else{const o=zo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gt(r)}function Fo(e,t){const n=De(e);return n===t||!he(n)||et(n)?!1:ve(n).position==="fixed"||Fo(n,t)}function nc(e,t){const n=t.get(e);if(n)return n;let r=vt(e,[],!1).filter(a=>he(a)&&Qe(a)!=="body"),o=null;const s=ve(e).position==="fixed";let i=s?De(e):e;for(;he(i)&&!et(i);){const a=ve(i),l=Ln(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ht(i)&&!l&&Fo(e,i))?r=r.filter(d=>d!==i):o=a,i=De(i)}return t.set(e,r),r}function rc(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Wt(t)?[]:nc(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,d)=>{const c=Lo(t,d,o);return u.top=fe(c.top,u.top),u.right=Te(c.right,u.right),u.bottom=Te(c.bottom,u.bottom),u.left=fe(c.left,u.left),u},Lo(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function oc(e){const{width:t,height:n}=Do(e);return{width:t,height:n}}function sc(e,t,n){const r=Se(t),o=Ce(t),s=n==="fixed",i=$e(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=we(0);if(r||!r&&!s)if((Qe(t)!=="body"||ht(o))&&(a=Vt(t)),r){const f=$e(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Gn(o));const u=o&&!r&&!s?jo(o,a):we(0),d=i.left+a.scrollLeft-l.x-u.x,c=i.top+a.scrollTop-l.y-u.y;return{x:d,y:c,width:i.width,height:i.height}}function Hn(e){return ve(e).position==="static"}function $o(e,t){if(!Se(e)||ve(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ce(e)===n&&(n=n.ownerDocument.body),n}function Bo(e,t){const n=pe(e);if(Wt(e))return n;if(!Se(e)){let o=De(e);for(;o&&!et(o);){if(he(o)&&!Hn(o))return o;o=De(o)}return n}let r=$o(e,t);for(;r&&Kl(r)&&Hn(r);)r=$o(r,t);return r&&et(r)&&Hn(r)&&!Ln(r)?n:r||Yl(e)||n}const ic=async function(e){const t=this.getOffsetParent||Bo,n=this.getDimensions,r=await n(e.floating);return{reference:sc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ac(e){return ve(e).direction==="rtl"}const lc={convertOffsetParentRelativeRectToViewportRelativeRect:Zl,getDocumentElement:Ce,getClippingRect:rc,getOffsetParent:Bo,getElementRects:ic,getClientRects:Jl,getDimensions:oc,getScale:tt,isElement:he,isRTL:ac};function Go(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cc(e,t){let n=null,r;const o=Ce(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:c,width:f,height:g}=u;if(a||t(),!f||!g)return;const v=$t(c),h=$t(o.clientWidth-(d+f)),b=$t(o.clientHeight-(c+g)),x=$t(d),w={rootMargin:-v+"px "+-h+"px "+-b+"px "+-x+"px",threshold:fe(0,Te(1,l))||1};let C=!0;function N(_){const S=_[0].intersectionRatio;if(S!==l){if(!C)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Go(u,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(N,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,w)}n.observe(e)}return i(!0),s}function uc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Bn(e),d=o||s?[...u?vt(u):[],...vt(t)]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const c=u&&a?cc(u,n):null;let f=-1,g=null;i&&(g=new ResizeObserver(x=>{let[E]=x;E&&E.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),n()}),u&&!l&&g.observe(u),g.observe(t));let v,h=l?$e(e):null;l&&b();function b(){const x=$e(e);h&&!Go(h,x)&&n(),h=x,v=requestAnimationFrame(b)}return n(),()=>{var x;d.forEach(E=>{o&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),c?.(),(x=g)==null||x.disconnect(),g=null,l&&cancelAnimationFrame(v)}}const dc=Hl,fc=Wl,pc=$l,mc=Ul,gc=Bl,Ho=Fl,hc=Vl,vc=(e,t,n)=>{const r=new Map,o={platform:lc,...n},s={...o.platform,_c:r};return Ll(e,t,{...o,platform:s})};var Ut=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Kt(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(!Kt(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)&&!Kt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Wo(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vo(e,t){const n=Wo(e);return Math.round(t*n)/n}function Wn(e){const t=p.useRef(e);return Ut(()=>{t.current=e}),t}function bc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,c]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,g]=p.useState(r);Kt(f,r)||g(r);const[v,h]=p.useState(null),[b,x]=p.useState(null),E=p.useCallback(R=>{R!==_.current&&(_.current=R,h(R))},[]),w=p.useCallback(R=>{R!==S.current&&(S.current=R,x(R))},[]),C=s||v,N=i||b,_=p.useRef(null),S=p.useRef(null),P=p.useRef(d),H=l!=null,W=Wn(l),U=Wn(o),B=Wn(u),Q=p.useCallback(()=>{if(!_.current||!S.current)return;const R={placement:t,strategy:n,middleware:f};U.current&&(R.platform=U.current),vc(_.current,S.current,R).then(T=>{const y={...T,isPositioned:B.current!==!1};G.current&&!Kt(P.current,y)&&(P.current=y,Er.flushSync(()=>{c(y)}))})},[f,t,n,U,B]);Ut(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,c(R=>({...R,isPositioned:!1})))},[u]);const G=p.useRef(!1);Ut(()=>(G.current=!0,()=>{G.current=!1}),[]),Ut(()=>{if(C&&(_.current=C),N&&(S.current=N),C&&N){if(W.current)return W.current(C,N,Q);Q()}},[C,N,Q,W,H]);const V=p.useMemo(()=>({reference:_,floating:S,setReference:E,setFloating:w}),[E,w]),$=p.useMemo(()=>({reference:C,floating:N}),[C,N]),ee=p.useMemo(()=>{const R={position:n,left:0,top:0};if(!$.floating)return R;const T=Vo($.floating,d.x),y=Vo($.floating,d.y);return a?{...R,transform:"translate("+T+"px, "+y+"px)",...Wo($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:y}},[n,a,$.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:Q,refs:V,elements:$,floatingStyles:ee}),[d,Q,V,$,ee])}const xc=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?Ho({element:r.current,padding:o}).fn(n):{}:r?Ho({element:r,padding:o}).fn(n):{}}}},yc=(e,t)=>({...dc(e),options:[e,t]}),wc=(e,t)=>({...fc(e),options:[e,t]}),Cc=(e,t)=>({...hc(e),options:[e,t]}),Sc=(e,t)=>({...pc(e),options:[e,t]}),Ec=(e,t)=>({...mc(e),options:[e,t]}),Pc=(e,t)=>({...gc(e),options:[e,t]}),kc=(e,t)=>({...xc(e),options:[e,t]});var Mc="Arrow",Uo=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return m.jsx(ie.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});Uo.displayName=Mc;var Rc=Uo;function Ac(e){const[t,n]=p.useState(void 0);return _e(()=>{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,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Vn="Popper",[Ko,Yo]=Xe(Vn),[Nc,Xo]=Ko(Vn),qo=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return m.jsx(Nc,{scope:t,anchor:r,onAnchorChange:o,children:n})};qo.displayName=Vn;var Zo="PopperAnchor",Jo=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Xo(Zo,n),i=p.useRef(null),a=ue(t,i);return p.useEffect(()=>{s.onAnchorChange(r?.current||i.current)}),r?null:m.jsx(ie.div,{...o,ref:a})});Jo.displayName=Zo;var Un="PopperContent",[_c,Ic]=Ko(Un),Qo=p.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:f=!1,updatePositionStrategy:g="optimized",onPlaced:v,...h}=e,b=Xo(Un,n),[x,E]=p.useState(null),w=ue(t,M=>E(M)),[C,N]=p.useState(null),_=Ac(C),S=_?.width??0,P=_?.height??0,H=r+(s!=="center"?"-"+s:""),W=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},U=Array.isArray(u)?u:[u],B=U.length>0,Q={padding:W,boundary:U.filter(Oc),altBoundary:B},{refs:G,floatingStyles:V,placement:$,isPositioned:ee,middlewareData:R}=bc({strategy:"fixed",placement:H,whileElementsMounted:(...M)=>uc(...M,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[yc({mainAxis:o+P,alignmentAxis:i}),l&&wc({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Cc():void 0,...Q}),l&&Sc({...Q}),Ec({...Q,apply:({elements:M,rects:O,availableWidth:Y,availableHeight:ne})=>{const{width:ae,height:le}=O.reference,re=M.floating.style;re.setProperty("--radix-popper-available-width",`${Y}px`),re.setProperty("--radix-popper-available-height",`${ne}px`),re.setProperty("--radix-popper-anchor-width",`${ae}px`),re.setProperty("--radix-popper-anchor-height",`${le}px`)}}),C&&kc({element:C,padding:a}),Dc({arrowWidth:S,arrowHeight:P}),f&&Pc({strategy:"referenceHidden",...Q})]}),[T,y]=ns($),L=ye(v);_e(()=>{ee&&L?.()},[ee,L]);const K=R.arrow?.x,k=R.arrow?.y,I=R.arrow?.centerOffset!==0,[j,F]=p.useState();return _e(()=>{x&&F(window.getComputedStyle(x).zIndex)},[x]),m.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:ee?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(" "),...R.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(_c,{scope:n,placedSide:T,onArrowChange:N,arrowX:K,arrowY:k,shouldHideArrow:I,children:m.jsx(ie.div,{"data-side":T,"data-align":y,...h,ref:w,style:{...h.style,animation:ee?void 0:"none"}})})})});Qo.displayName=Un;var es="PopperArrow",Tc={top:"bottom",right:"left",bottom:"top",left:"right"},ts=p.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Ic(es,r),i=Tc[s.placedSide];return m.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:m.jsx(Rc,{...o,ref:n,style:{...o.style,display:"block"}})})});ts.displayName=es;function Oc(e){return e!==null}var Dc=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=ns(n),c={start:"0%",center:"50%",end:"100%"}[d],f=(o.arrow?.x??0)+a/2,g=(o.arrow?.y??0)+l/2;let v="",h="";return u==="bottom"?(v=i?c:`${f}px`,h=`${-l}px`):u==="top"?(v=i?c:`${f}px`,h=`${r.floating.height+l}px`):u==="right"?(v=`${-l}px`,h=i?c:`${g}px`):u==="left"&&(v=`${r.floating.width+l}px`,h=i?c:`${g}px`),{data:{x:v,y:h}}}});function ns(e){const[t,n="center"]=e.split("-");return[t,n]}var rs=qo,zc=Jo,jc=Qo,Lc=ts,Fc="Portal",os=p.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=p.useState(!1);_e(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Cr.createPortal(m.jsx(ie.div,{...r,ref:t}),i):null});os.displayName=Fc;var $c=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},nt=new WeakMap,Yt=new WeakMap,Xt={},Kn=0,ss=function(e){return e&&(e.host||ss(e.parentNode))},Bc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ss(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})},Gc=function(e,t,n,r){var o=Bc(t,Array.isArray(e)?e:[e]);Xt[n]||(Xt[n]=new WeakMap);var s=Xt[n],i=[],a=new Set,l=new Set(o),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};o.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(f){if(a.has(f))d(f);else try{var g=f.getAttribute(r),v=g!==null&&g!=="false",h=(nt.get(f)||0)+1,b=(s.get(f)||0)+1;nt.set(f,h),s.set(f,b),i.push(f),h===1&&v&&Yt.set(f,!0),b===1&&f.setAttribute(n,"true"),v||f.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",f,x)}})};return d(t),a.clear(),Kn++,function(){i.forEach(function(c){var f=nt.get(c)-1,g=s.get(c)-1;nt.set(c,f),s.set(c,g),f||(Yt.has(c)||c.removeAttribute(r),Yt.delete(c)),g||c.removeAttribute(n)}),Kn--,Kn||(nt=new WeakMap,nt=new WeakMap,Yt=new WeakMap,Xt={})}},Hc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=$c(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Gc(r,o,n,"aria-hidden")):function(){return null}},Ee=function(){return Ee=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},Ee.apply(this,arguments)};function is(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 Wc(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))}typeof SuppressedError=="function"&&SuppressedError;var qt="right-scroll-bar-position",Zt="width-before-scroll-bar",Vc="with-scroll-bars-hidden",Uc="--removed-body-scroll-bar-size";function Yn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Kc(e,t){var n=A.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 Yc=typeof window<"u"?p.useLayoutEffect:p.useEffect,as=new WeakMap;function Xc(e,t){var n=Kc(null,function(r){return e.forEach(function(o){return Yn(o,r)})});return Yc(function(){var r=as.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Yn(a,null)}),s.forEach(function(a){o.has(a)||Yn(a,i)})}as.set(n,e)},[e]),n}function qc(e){return e}function Zc(e,t){t===void 0&&(t=qc);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(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function Jc(e){e===void 0&&(e={});var t=Zc(null);return t.options=Ee({async:!0,ssr:!1},e),t}var ls=function(e){var t=e.sideCar,n=is(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 p.createElement(r,Ee({},n))};ls.isSideCarExport=!0;function Qc(e,t){return e.useMedium(t),ls}var cs=Jc(),Xn=function(){},Jt=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Xn,onWheelCapture:Xn,onTouchMoveCapture:Xn}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,f=e.sideCar,g=e.noIsolation,v=e.inert,h=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,E=e.gapMode,w=is(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,N=Xc([n,t]),_=Ee(Ee({},w),o);return p.createElement(p.Fragment,null,d&&p.createElement(C,{sideCar:cs,removeScrollBar:u,shards:c,noIsolation:g,inert:v,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:E}),i?p.cloneElement(p.Children.only(a),Ee(Ee({},_),{ref:N})):p.createElement(x,Ee({},_,{className:l,ref:N}),a))});Jt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jt.classNames={fullWidth:Zt,zeroRight:qt};var eu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=eu();return t&&e.setAttribute("nonce",t),e}function nu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ru(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ou=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tu())&&(nu(t,n),ru(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},su=function(){var e=ou();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},us=function(){var e=su(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},iu={left:0,top:0,right:0,gap:0},qn=function(e){return parseInt(e||"",10)||0},au=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[qn(n),qn(r),qn(o)]},lu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return iu;var t=au(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])}},cu=us(),rt="data-scroll-locked",uu=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
23
|
+
.`.concat(Vc,` {
|
|
24
24
|
overflow: hidden `).concat(r,`;
|
|
25
25
|
padding-right: `).concat(a,"px ").concat(r,`;
|
|
26
26
|
}
|
|
@@ -37,81 +37,81 @@ React keys must be passed directly to JSX without using spread:
|
|
|
37
37
|
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.`).concat(
|
|
40
|
+
.`).concat(qt,` {
|
|
41
41
|
right: `).concat(a,"px ").concat(r,`;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
.`).concat(
|
|
44
|
+
.`).concat(Zt,` {
|
|
45
45
|
margin-right: `).concat(a,"px ").concat(r,`;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.`).concat(
|
|
48
|
+
.`).concat(qt," .").concat(qt,` {
|
|
49
49
|
right: 0 `).concat(r,`;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.`).concat(
|
|
52
|
+
.`).concat(Zt," .").concat(Zt,` {
|
|
53
53
|
margin-right: 0 `).concat(r,`;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
body[`).concat(rt,`] {
|
|
57
|
-
`).concat(
|
|
57
|
+
`).concat(Uc,": ").concat(a,`px;
|
|
58
58
|
}
|
|
59
|
-
`)},ds=function(){var e=parseInt(document.body.getAttribute(rt)||"0",10);return isFinite(e)?e:0},
|
|
59
|
+
`)},ds=function(){var e=parseInt(document.body.getAttribute(rt)||"0",10);return isFinite(e)?e:0},du=function(){p.useEffect(function(){return document.body.setAttribute(rt,(ds()+1).toString()),function(){var e=ds()-1;e<=0?document.body.removeAttribute(rt):document.body.setAttribute(rt,e.toString())}},[])},fu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;du();var s=p.useMemo(function(){return lu(o)},[o]);return p.createElement(cu,{styles:uu(s,!t,o,n?"":"!important")})},Zn=!1;if(typeof window<"u")try{var Qt=Object.defineProperty({},"passive",{get:function(){return Zn=!0,!0}});window.addEventListener("test",Qt,Qt),window.removeEventListener("test",Qt,Qt)}catch{Zn=!1}var ot=Zn?{passive:!1}:!1,pu=function(e){return e.tagName==="TEXTAREA"},fs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!pu(e)&&n[t]==="visible")},mu=function(e){return fs(e,"overflowY")},gu=function(e){return fs(e,"overflowX")},ps=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ms(e,r);if(o){var s=gs(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},hu=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},vu=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ms=function(e,t){return e==="v"?mu(t):gu(t)},gs=function(e,t){return e==="v"?hu(t):vu(t)},bu=function(e,t){return e==="h"&&t==="rtl"?-1:1},xu=function(e,t,n,r,o){var s=bu(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),u=!1,d=i>0,c=0,f=0;do{var g=gs(e,a),v=g[0],h=g[1],b=g[2],x=h-b-s*v;(v||x)&&ms(e,a)&&(c+=x,f+=v),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(c)<1||!d&&Math.abs(f)<1)&&(u=!0),u},en=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hs=function(e){return[e.deltaX,e.deltaY]},vs=function(e){return e&&"current"in e?e.current:e},yu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wu=function(e){return`
|
|
60
60
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
61
61
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
62
|
-
`)},wu=0,st=[];function Cu(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(wu++)[0],s=p.useState(us)[0],i=p.useRef(e);p.useEffect(function(){i.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Hc([e.lockRef.current],(e.shards||[]).map(vs),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=p.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var x=Qt(m),E=n.current,w="deltaX"in m?m.deltaX:E[0]-x[0],C="deltaY"in m?m.deltaY:E[1]-x[1],N,_=m.target,S=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in m&&S==="h"&&_.type==="range")return!1;var P=ps(S,_);if(!P)return!0;if(P?N=S:(N=S==="v"?"h":"v",P=ps(S,_)),!P)return!1;if(!r.current&&"changedTouches"in m&&(w||C)&&(r.current=N),!N)return!0;var H=r.current||N;return bu(H,b,m,H==="h"?w:C)},[]),l=p.useCallback(function(m){var b=m;if(!(!st.length||st[st.length-1]!==s)){var x="deltaY"in b?hs(b):Qt(b),E=t.current.filter(function(N){return N.name===b.type&&(N.target===b.target||b.target===N.shadowParent)&&xu(N.delta,x)})[0];if(E&&E.should){b.cancelable&&b.preventDefault();return}if(!E){var w=(i.current.shards||[]).map(vs).filter(Boolean).filter(function(N){return N.contains(b.target)}),C=w.length>0?a(b,w[0]):!i.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=p.useCallback(function(m,b,x,E){var w={name:m,delta:b,target:x,should:E,shadowParent:Su(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),d=p.useCallback(function(m){n.current=Qt(m),r.current=void 0},[]),c=p.useCallback(function(m){u(m.type,hs(m),m.target,a(m,e.lockRef.current))},[]),f=p.useCallback(function(m){u(m.type,Qt(m),m.target,a(m,e.lockRef.current))},[]);p.useEffect(function(){return st.push(s),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ot),document.addEventListener("touchmove",l,ot),document.addEventListener("touchstart",d,ot),function(){st=st.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,ot),document.removeEventListener("touchmove",l,ot),document.removeEventListener("touchstart",d,ot)}},[]);var h=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(s,{styles:yu(o)}):null,h?p.createElement(du,{gapMode:e.gapMode}):null)}function Su(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Eu=Jc(cs,Cu);var bs=p.forwardRef(function(e,t){return p.createElement(Zt,Ee({},e,{ref:t,sideCar:Eu}))});bs.classNames=Zt.classNames;var Xn=["Enter"," "],Pu=["ArrowDown","PageUp","Home"],xs=["ArrowUp","PageDown","End"],ku=[...Pu,...xs],Mu={ltr:[...Xn,"ArrowRight"],rtl:[...Xn,"ArrowLeft"]},Ru={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bt="Menu",[xt,Au,Nu]=Kr(bt),[Be,ys]=Xe(bt,[Nu,Yo,Dt]),yt=Yo(),ws=Dt(),[Cs,ze]=Be(bt),[_u,wt]=Be(bt),Ss=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=yt(t),[l,u]=p.useState(null),d=p.useRef(!1),c=ye(s),f=wn(o);return p.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),g.jsx(rs,{...a,children:g.jsx(Cs,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:g.jsx(_u,{scope:t,onClose:p.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:d,dir:f,modal:i,children:r})})})};Ss.displayName=bt;var Iu="MenuAnchor",qn=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yt(n);return g.jsx(Dc,{...o,...r,ref:t})});qn.displayName=Iu;var Zn="MenuPortal",[Tu,Es]=Be(Zn,{forceMount:void 0}),Ps=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=ze(Zn,t);return g.jsx(Tu,{scope:t,forceMount:n,children:g.jsx(Ze,{present:n||s.open,children:g.jsx(os,{asChild:!0,container:o,children:r})})})};Ps.displayName=Zn;var ge="MenuContent",[Ou,Jn]=Be(ge),ks=p.forwardRef((e,t)=>{const n=Es(ge,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=ze(ge,e.__scopeMenu),i=wt(ge,e.__scopeMenu);return g.jsx(xt.Provider,{scope:e.__scopeMenu,children:g.jsx(Ze,{present:r||s.open,children:g.jsx(xt.Slot,{scope:e.__scopeMenu,children:i.modal?g.jsx(Du,{...o,ref:t}):g.jsx(zu,{...o,ref:t})})})})}),Du=p.forwardRef((e,t)=>{const n=ze(ge,e.__scopeMenu),r=p.useRef(null),o=ue(t,r);return p.useEffect(()=>{const s=r.current;if(s)return Gc(s)},[]),g.jsx(Qn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:J(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),zu=p.forwardRef((e,t)=>{const n=ze(ge,e.__scopeMenu);return g.jsx(Qn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ju=ft("MenuContent.ScrollLock"),Qn=p.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:f,onDismiss:h,disableOutsideScroll:v,...m}=e,b=ze(ge,n),x=wt(ge,n),E=yt(n),w=ws(n),C=Au(n),[N,_]=p.useState(null),S=p.useRef(null),P=ue(t,S,b.onContentChange),H=p.useRef(0),W=p.useRef(""),U=p.useRef(0),B=p.useRef(null),Q=p.useRef("right"),G=p.useRef(0),V=v?bs:p.Fragment,F=v?{as:ju,allowPinchZoom:!0}:void 0,ee=T=>{const y=W.current+T,L=C().filter(M=>!M.disabled),K=document.activeElement,k=L.find(M=>M.ref.current===K)?.textValue,I=L.map(M=>M.textValue),j=Xu(I,y,k),$=L.find(M=>M.textValue===j)?.ref.current;(function M(O){W.current=O,window.clearTimeout(H.current),O!==""&&(H.current=window.setTimeout(()=>M(""),1e3))})(y),$&&setTimeout(()=>$.focus())};p.useEffect(()=>()=>window.clearTimeout(H.current),[]),wl();const R=p.useCallback(T=>Q.current===B.current?.side&&Zu(T,B.current?.area),[]);return g.jsx(Ou,{scope:n,searchRef:W,onItemEnter:p.useCallback(T=>{R(T)&&T.preventDefault()},[R]),onItemLeave:p.useCallback(T=>{R(T)||(S.current?.focus(),_(null))},[R]),onTriggerLeave:p.useCallback(T=>{R(T)&&T.preventDefault()},[R]),pointerGraceTimerRef:U,onPointerGraceIntentChange:p.useCallback(T=>{B.current=T},[]),children:g.jsx(V,{...F,children:g.jsx(So,{asChild:!0,trapped:o,onMountAutoFocus:J(s,T=>{T.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:g.jsx(bo,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:f,onDismiss:h,children:g.jsx(eo,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:_,onEntryFocus:J(l,T=>{x.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(zc,{role:"menu","aria-orientation":"vertical","data-state":Ws(b.open),"data-radix-menu-content":"",dir:x.dir,...E,...m,ref:P,style:{outline:"none",...m.style},onKeyDown:J(m.onKeyDown,T=>{const L=T.target.closest("[data-radix-menu-content]")===T.currentTarget,K=T.ctrlKey||T.altKey||T.metaKey,k=T.key.length===1;L&&(T.key==="Tab"&&T.preventDefault(),!K&&k&&ee(T.key));const I=S.current;if(T.target!==I||!ku.includes(T.key))return;T.preventDefault();const $=C().filter(M=>!M.disabled).map(M=>M.ref.current);xs.includes(T.key)&&$.reverse(),Ku($)}),onBlur:J(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(H.current),W.current="")}),onPointerMove:J(e.onPointerMove,St(T=>{const y=T.target,L=G.current!==T.clientX;if(T.currentTarget.contains(y)&&L){const K=T.clientX>G.current?"right":"left";Q.current=K,G.current=T.clientX}}))})})})})})})});ks.displayName=ge;var Lu="MenuGroup",er=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(ie.div,{role:"group",...r,ref:t})});er.displayName=Lu;var $u="MenuLabel",Ms=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(ie.div,{...r,ref:t})});Ms.displayName=$u;var en="MenuItem",Rs="menu.itemSelect",tn=p.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=p.useRef(null),i=wt(en,e.__scopeMenu),a=Jn(en,e.__scopeMenu),l=ue(t,s),u=p.useRef(!1),d=()=>{const c=s.current;if(!n&&c){const f=new CustomEvent(Rs,{bubbles:!0,cancelable:!0});c.addEventListener(Rs,h=>r?.(h),{once:!0}),Yr(c,f),f.defaultPrevented?u.current=!1:i.onClose()}};return g.jsx(As,{...o,ref:l,disabled:n,onClick:J(e.onClick,d),onPointerDown:c=>{e.onPointerDown?.(c),u.current=!0},onPointerUp:J(e.onPointerUp,c=>{u.current||c.currentTarget?.click()}),onKeyDown:J(e.onKeyDown,c=>{const f=a.searchRef.current!=="";n||f&&c.key===" "||Xn.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});tn.displayName=en;var As=p.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Jn(en,n),a=ws(n),l=p.useRef(null),u=ue(t,l),[d,c]=p.useState(!1),[f,h]=p.useState("");return p.useEffect(()=>{const v=l.current;v&&h((v.textContent??"").trim())},[s.children]),g.jsx(xt.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:g.jsx(to,{asChild:!0,...a,focusable:!r,children:g.jsx(ie.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:J(e.onPointerMove,St(v=>{r?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(e.onPointerLeave,St(v=>i.onItemLeave(v))),onFocus:J(e.onFocus,()=>c(!0)),onBlur:J(e.onBlur,()=>c(!1))})})})}),Fu="MenuCheckboxItem",Ns=p.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return g.jsx(Ds,{scope:e.__scopeMenu,checked:n,children:g.jsx(tn,{role:"menuitemcheckbox","aria-checked":nn(n)?"mixed":n,...o,ref:t,"data-state":rr(n),onSelect:J(o.onSelect,()=>r?.(nn(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ns.displayName=Fu;var _s="MenuRadioGroup",[Bu,Gu]=Be(_s,{value:void 0,onValueChange:()=>{}}),Is=p.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=ye(r);return g.jsx(Bu,{scope:e.__scopeMenu,value:n,onValueChange:s,children:g.jsx(er,{...o,ref:t})})});Is.displayName=_s;var Ts="MenuRadioItem",Os=p.forwardRef((e,t)=>{const{value:n,...r}=e,o=Gu(Ts,e.__scopeMenu),s=n===o.value;return g.jsx(Ds,{scope:e.__scopeMenu,checked:s,children:g.jsx(tn,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":rr(s),onSelect:J(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Os.displayName=Ts;var tr="MenuItemIndicator",[Ds,Hu]=Be(tr,{checked:!1}),zs=p.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Hu(tr,n);return g.jsx(Ze,{present:r||nn(s.checked)||s.checked===!0,children:g.jsx(ie.span,{...o,ref:t,"data-state":rr(s.checked)})})});zs.displayName=tr;var Wu="MenuSeparator",js=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(ie.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});js.displayName=Wu;var Vu="MenuArrow",Ls=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yt(n);return g.jsx(jc,{...o,...r,ref:t})});Ls.displayName=Vu;var nr="MenuSub",[Uu,$s]=Be(nr),Fs=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=ze(nr,t),i=yt(t),[a,l]=p.useState(null),[u,d]=p.useState(null),c=ye(o);return p.useEffect(()=>(s.open===!1&&c(!1),()=>c(!1)),[s.open,c]),g.jsx(rs,{...i,children:g.jsx(Cs,{scope:t,open:r,onOpenChange:c,content:u,onContentChange:d,children:g.jsx(Uu,{scope:t,contentId:qe(),triggerId:qe(),trigger:a,onTriggerChange:l,children:n})})})};Fs.displayName=nr;var Ct="MenuSubTrigger",Bs=p.forwardRef((e,t)=>{const n=ze(Ct,e.__scopeMenu),r=wt(Ct,e.__scopeMenu),o=$s(Ct,e.__scopeMenu),s=Jn(Ct,e.__scopeMenu),i=p.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=p.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return p.useEffect(()=>d,[d]),p.useEffect(()=>{const c=a.current;return()=>{window.clearTimeout(c),l(null)}},[a,l]),g.jsx(qn,{asChild:!0,...u,children:g.jsx(As,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ws(n.open),...e,ref:_t(t,o.onTriggerChange),onClick:c=>{e.onClick?.(c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:J(e.onPointerMove,St(c=>{s.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:J(e.onPointerLeave,St(c=>{d();const f=n.content?.getBoundingClientRect();if(f){const h=n.content?.dataset.side,v=h==="right",m=v?-5:5,b=f[v?"left":"right"],x=f[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:c.clientX+m,y:c.clientY},{x:b,y:f.top},{x,y:f.top},{x,y:f.bottom},{x:b,y:f.bottom}],side:h}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(c),c.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:J(e.onKeyDown,c=>{const f=s.searchRef.current!=="";e.disabled||f&&c.key===" "||Mu[r.dir].includes(c.key)&&(n.onOpenChange(!0),n.content?.focus(),c.preventDefault())})})})});Bs.displayName=Ct;var Gs="MenuSubContent",Hs=p.forwardRef((e,t)=>{const n=Es(ge,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=ze(ge,e.__scopeMenu),i=wt(ge,e.__scopeMenu),a=$s(Gs,e.__scopeMenu),l=p.useRef(null),u=ue(t,l);return g.jsx(xt.Provider,{scope:e.__scopeMenu,children:g.jsx(Ze,{present:r||s.open,children:g.jsx(xt.Slot,{scope:e.__scopeMenu,children:g.jsx(Qn,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{i.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:J(e.onFocusOutside,d=>{d.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:J(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:J(e.onKeyDown,d=>{const c=d.currentTarget.contains(d.target),f=Ru[i.dir].includes(d.key);c&&f&&(s.onOpenChange(!1),a.trigger?.focus(),d.preventDefault())})})})})})});Hs.displayName=Gs;function Ws(e){return e?"open":"closed"}function nn(e){return e==="indeterminate"}function rr(e){return nn(e)?"indeterminate":e?"checked":"unchecked"}function Ku(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Xu(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Yu(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function qu(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 a=t[s],l=t[i],u=a.x,d=a.y,c=l.x,f=l.y;d>r!=f>r&&n<(c-u)*(r-d)/(f-d)+u&&(o=!o)}return o}function Zu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return qu(n,t)}function St(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ju=Ss,Qu=qn,ed=Ps,td=ks,nd=er,rd=Ms,od=tn,sd=Ns,id=Is,ad=Os,ld=zs,cd=js,ud=Ls,dd=Fs,fd=Bs,pd=Hs,rn="DropdownMenu",[md,Xf]=Xe(rn,[ys]),ce=ys(),[gd,Vs]=md(rn),Us=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=ce(t),u=p.useRef(null),[d,c]=Ot({prop:o,defaultProp:s??!1,onChange:i,caller:rn});return g.jsx(gd,{scope:t,triggerId:qe(),triggerRef:u,contentId:qe(),open:d,onOpenChange:c,onOpenToggle:p.useCallback(()=>c(f=>!f),[c]),modal:a,children:g.jsx(Ju,{...l,open:d,onOpenChange:c,dir:r,modal:a,children:n})})};Us.displayName=rn;var Ks="DropdownMenuTrigger",Ys=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Vs(Ks,n),i=ce(n);return g.jsx(Qu,{asChild:!0,...i,children:g.jsx(ie.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:_t(t,s.triggerRef),onPointerDown:J(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:J(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Ys.displayName=Ks;var hd="DropdownMenuPortal",Xs=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ce(t);return g.jsx(ed,{...r,...n})};Xs.displayName=hd;var qs="DropdownMenuContent",Zs=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vs(qs,n),s=ce(n),i=p.useRef(!1);return g.jsx(td,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:J(e.onCloseAutoFocus,a=>{i.current||o.triggerRef.current?.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:J(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!o.modal||d)&&(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)"}})});Zs.displayName=qs;var vd="DropdownMenuGroup",Js=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return g.jsx(nd,{...o,...r,ref:t})});Js.displayName=vd;var bd="DropdownMenuLabel",Qs=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return g.jsx(rd,{...o,...r,ref:t})});Qs.displayName=bd;var xd="DropdownMenuItem",ei=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return g.jsx(od,{...o,...r,ref:t})});ei.displayName=xd;var yd="DropdownMenuCheckboxItem",ti=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return g.jsx(sd,{...o,...r,ref:t})});ti.displayName=yd;var wd="DropdownMenuRadioGroup",ni=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return g.jsx(id,{...o,...r,ref:t})});ni.displayName=wd;var Cd="DropdownMenuRadioItem",ri=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return g.jsx(ad,{...o,...r,ref:t})});ri.displayName=Cd;var Sd="DropdownMenuItemIndicator",oi=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return g.jsx(ld,{...o,...r,ref:t})});oi.displayName=Sd;var Ed="DropdownMenuSeparator",si=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return g.jsx(cd,{...o,...r,ref:t})});si.displayName=Ed;var Pd="DropdownMenuArrow",kd=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return g.jsx(ud,{...o,...r,ref:t})});kd.displayName=Pd;var Md=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,i=ce(t),[a,l]=Ot({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return g.jsx(dd,{...i,open:a,onOpenChange:l,children:n})},Rd="DropdownMenuSubTrigger",ii=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return g.jsx(fd,{...o,...r,ref:t})});ii.displayName=Rd;var Ad="DropdownMenuSubContent",ai=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return g.jsx(pd,{...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)"}})});ai.displayName=Ad;var Nd=Us,_d=Ys,Id=Xs,Td=Zs,Od=Js,Dd=Qs,zd=ei,jd=ti,Ld=ni,$d=ri,li=oi,Fd=si,Bd=Md,Gd=ii,Hd=ai;/**
|
|
62
|
+
`)},Cu=0,st=[];function Su(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(Cu++)[0],s=p.useState(us)[0],i=p.useRef(e);p.useEffect(function(){i.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Wc([e.lockRef.current],(e.shards||[]).map(vs),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=p.useCallback(function(h,b){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var x=en(h),E=n.current,w="deltaX"in h?h.deltaX:E[0]-x[0],C="deltaY"in h?h.deltaY:E[1]-x[1],N,_=h.target,S=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in h&&S==="h"&&_.type==="range")return!1;var P=ps(S,_);if(!P)return!0;if(P?N=S:(N=S==="v"?"h":"v",P=ps(S,_)),!P)return!1;if(!r.current&&"changedTouches"in h&&(w||C)&&(r.current=N),!N)return!0;var H=r.current||N;return xu(H,b,h,H==="h"?w:C)},[]),l=p.useCallback(function(h){var b=h;if(!(!st.length||st[st.length-1]!==s)){var x="deltaY"in b?hs(b):en(b),E=t.current.filter(function(N){return N.name===b.type&&(N.target===b.target||b.target===N.shadowParent)&&yu(N.delta,x)})[0];if(E&&E.should){b.cancelable&&b.preventDefault();return}if(!E){var w=(i.current.shards||[]).map(vs).filter(Boolean).filter(function(N){return N.contains(b.target)}),C=w.length>0?a(b,w[0]):!i.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=p.useCallback(function(h,b,x,E){var w={name:h,delta:b,target:x,should:E,shadowParent:Eu(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),d=p.useCallback(function(h){n.current=en(h),r.current=void 0},[]),c=p.useCallback(function(h){u(h.type,hs(h),h.target,a(h,e.lockRef.current))},[]),f=p.useCallback(function(h){u(h.type,en(h),h.target,a(h,e.lockRef.current))},[]);p.useEffect(function(){return st.push(s),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ot),document.addEventListener("touchmove",l,ot),document.addEventListener("touchstart",d,ot),function(){st=st.filter(function(h){return h!==s}),document.removeEventListener("wheel",l,ot),document.removeEventListener("touchmove",l,ot),document.removeEventListener("touchstart",d,ot)}},[]);var g=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(s,{styles:wu(o)}):null,g?p.createElement(fu,{gapMode:e.gapMode}):null)}function Eu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Pu=Qc(cs,Su);var bs=p.forwardRef(function(e,t){return p.createElement(Jt,Ee({},e,{ref:t,sideCar:Pu}))});bs.classNames=Jt.classNames;var Jn=["Enter"," "],ku=["ArrowDown","PageUp","Home"],xs=["ArrowUp","PageDown","End"],Mu=[...ku,...xs],Ru={ltr:[...Jn,"ArrowRight"],rtl:[...Jn,"ArrowLeft"]},Au={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bt="Menu",[xt,Nu,_u]=Xr(bt),[Be,ys]=Xe(bt,[_u,Yo,Dt]),yt=Yo(),ws=Dt(),[Cs,ze]=Be(bt),[Iu,wt]=Be(bt),Ss=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=yt(t),[l,u]=p.useState(null),d=p.useRef(!1),c=ye(s),f=Cn(o);return p.useEffect(()=>{const g=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.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})}},[]),m.jsx(rs,{...a,children:m.jsx(Cs,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:m.jsx(Iu,{scope:t,onClose:p.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:d,dir:f,modal:i,children:r})})})};Ss.displayName=bt;var Tu="MenuAnchor",Qn=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yt(n);return m.jsx(zc,{...o,...r,ref:t})});Qn.displayName=Tu;var er="MenuPortal",[Ou,Es]=Be(er,{forceMount:void 0}),Ps=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=ze(er,t);return m.jsx(Ou,{scope:t,forceMount:n,children:m.jsx(Ze,{present:n||s.open,children:m.jsx(os,{asChild:!0,container:o,children:r})})})};Ps.displayName=er;var ge="MenuContent",[Du,tr]=Be(ge),ks=p.forwardRef((e,t)=>{const n=Es(ge,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=ze(ge,e.__scopeMenu),i=wt(ge,e.__scopeMenu);return m.jsx(xt.Provider,{scope:e.__scopeMenu,children:m.jsx(Ze,{present:r||s.open,children:m.jsx(xt.Slot,{scope:e.__scopeMenu,children:i.modal?m.jsx(zu,{...o,ref:t}):m.jsx(ju,{...o,ref:t})})})})}),zu=p.forwardRef((e,t)=>{const n=ze(ge,e.__scopeMenu),r=p.useRef(null),o=ue(t,r);return p.useEffect(()=>{const s=r.current;if(s)return Hc(s)},[]),m.jsx(nr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:J(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ju=p.forwardRef((e,t)=>{const n=ze(ge,e.__scopeMenu);return m.jsx(nr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Lu=ft("MenuContent.ScrollLock"),nr=p.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:f,onDismiss:g,disableOutsideScroll:v,...h}=e,b=ze(ge,n),x=wt(ge,n),E=yt(n),w=ws(n),C=Nu(n),[N,_]=p.useState(null),S=p.useRef(null),P=ue(t,S,b.onContentChange),H=p.useRef(0),W=p.useRef(""),U=p.useRef(0),B=p.useRef(null),Q=p.useRef("right"),G=p.useRef(0),V=v?bs:p.Fragment,$=v?{as:Lu,allowPinchZoom:!0}:void 0,ee=T=>{const y=W.current+T,L=C().filter(M=>!M.disabled),K=document.activeElement,k=L.find(M=>M.ref.current===K)?.textValue,I=L.map(M=>M.textValue),j=qu(I,y,k),F=L.find(M=>M.textValue===j)?.ref.current;(function M(O){W.current=O,window.clearTimeout(H.current),O!==""&&(H.current=window.setTimeout(()=>M(""),1e3))})(y),F&&setTimeout(()=>F.focus())};p.useEffect(()=>()=>window.clearTimeout(H.current),[]),Cl();const R=p.useCallback(T=>Q.current===B.current?.side&&Ju(T,B.current?.area),[]);return m.jsx(Du,{scope:n,searchRef:W,onItemEnter:p.useCallback(T=>{R(T)&&T.preventDefault()},[R]),onItemLeave:p.useCallback(T=>{R(T)||(S.current?.focus(),_(null))},[R]),onTriggerLeave:p.useCallback(T=>{R(T)&&T.preventDefault()},[R]),pointerGraceTimerRef:U,onPointerGraceIntentChange:p.useCallback(T=>{B.current=T},[]),children:m.jsx(V,{...$,children:m.jsx(So,{asChild:!0,trapped:o,onMountAutoFocus:J(s,T=>{T.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:m.jsx(bo,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:f,onDismiss:g,children:m.jsx(no,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:_,onEntryFocus:J(l,T=>{x.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(jc,{role:"menu","aria-orientation":"vertical","data-state":Ws(b.open),"data-radix-menu-content":"",dir:x.dir,...E,...h,ref:P,style:{outline:"none",...h.style},onKeyDown:J(h.onKeyDown,T=>{const L=T.target.closest("[data-radix-menu-content]")===T.currentTarget,K=T.ctrlKey||T.altKey||T.metaKey,k=T.key.length===1;L&&(T.key==="Tab"&&T.preventDefault(),!K&&k&&ee(T.key));const I=S.current;if(T.target!==I||!Mu.includes(T.key))return;T.preventDefault();const F=C().filter(M=>!M.disabled).map(M=>M.ref.current);xs.includes(T.key)&&F.reverse(),Yu(F)}),onBlur:J(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(H.current),W.current="")}),onPointerMove:J(e.onPointerMove,St(T=>{const y=T.target,L=G.current!==T.clientX;if(T.currentTarget.contains(y)&&L){const K=T.clientX>G.current?"right":"left";Q.current=K,G.current=T.clientX}}))})})})})})})});ks.displayName=ge;var Fu="MenuGroup",rr=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(ie.div,{role:"group",...r,ref:t})});rr.displayName=Fu;var $u="MenuLabel",Ms=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(ie.div,{...r,ref:t})});Ms.displayName=$u;var tn="MenuItem",Rs="menu.itemSelect",nn=p.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=p.useRef(null),i=wt(tn,e.__scopeMenu),a=tr(tn,e.__scopeMenu),l=ue(t,s),u=p.useRef(!1),d=()=>{const c=s.current;if(!n&&c){const f=new CustomEvent(Rs,{bubbles:!0,cancelable:!0});c.addEventListener(Rs,g=>r?.(g),{once:!0}),qr(c,f),f.defaultPrevented?u.current=!1:i.onClose()}};return m.jsx(As,{...o,ref:l,disabled:n,onClick:J(e.onClick,d),onPointerDown:c=>{e.onPointerDown?.(c),u.current=!0},onPointerUp:J(e.onPointerUp,c=>{u.current||c.currentTarget?.click()}),onKeyDown:J(e.onKeyDown,c=>{const f=a.searchRef.current!=="";n||f&&c.key===" "||Jn.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});nn.displayName=tn;var As=p.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=tr(tn,n),a=ws(n),l=p.useRef(null),u=ue(t,l),[d,c]=p.useState(!1),[f,g]=p.useState("");return p.useEffect(()=>{const v=l.current;v&&g((v.textContent??"").trim())},[s.children]),m.jsx(xt.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:m.jsx(ro,{asChild:!0,...a,focusable:!r,children:m.jsx(ie.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:J(e.onPointerMove,St(v=>{r?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(e.onPointerLeave,St(v=>i.onItemLeave(v))),onFocus:J(e.onFocus,()=>c(!0)),onBlur:J(e.onBlur,()=>c(!1))})})})}),Bu="MenuCheckboxItem",Ns=p.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(Ds,{scope:e.__scopeMenu,checked:n,children:m.jsx(nn,{role:"menuitemcheckbox","aria-checked":rn(n)?"mixed":n,...o,ref:t,"data-state":ir(n),onSelect:J(o.onSelect,()=>r?.(rn(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ns.displayName=Bu;var _s="MenuRadioGroup",[Gu,Hu]=Be(_s,{value:void 0,onValueChange:()=>{}}),Is=p.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=ye(r);return m.jsx(Gu,{scope:e.__scopeMenu,value:n,onValueChange:s,children:m.jsx(rr,{...o,ref:t})})});Is.displayName=_s;var Ts="MenuRadioItem",Os=p.forwardRef((e,t)=>{const{value:n,...r}=e,o=Hu(Ts,e.__scopeMenu),s=n===o.value;return m.jsx(Ds,{scope:e.__scopeMenu,checked:s,children:m.jsx(nn,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":ir(s),onSelect:J(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Os.displayName=Ts;var or="MenuItemIndicator",[Ds,Wu]=Be(or,{checked:!1}),zs=p.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Wu(or,n);return m.jsx(Ze,{present:r||rn(s.checked)||s.checked===!0,children:m.jsx(ie.span,{...o,ref:t,"data-state":ir(s.checked)})})});zs.displayName=or;var Vu="MenuSeparator",js=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(ie.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});js.displayName=Vu;var Uu="MenuArrow",Ls=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yt(n);return m.jsx(Lc,{...o,...r,ref:t})});Ls.displayName=Uu;var sr="MenuSub",[Ku,Fs]=Be(sr),$s=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=ze(sr,t),i=yt(t),[a,l]=p.useState(null),[u,d]=p.useState(null),c=ye(o);return p.useEffect(()=>(s.open===!1&&c(!1),()=>c(!1)),[s.open,c]),m.jsx(rs,{...i,children:m.jsx(Cs,{scope:t,open:r,onOpenChange:c,content:u,onContentChange:d,children:m.jsx(Ku,{scope:t,contentId:qe(),triggerId:qe(),trigger:a,onTriggerChange:l,children:n})})})};$s.displayName=sr;var Ct="MenuSubTrigger",Bs=p.forwardRef((e,t)=>{const n=ze(Ct,e.__scopeMenu),r=wt(Ct,e.__scopeMenu),o=Fs(Ct,e.__scopeMenu),s=tr(Ct,e.__scopeMenu),i=p.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=p.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return p.useEffect(()=>d,[d]),p.useEffect(()=>{const c=a.current;return()=>{window.clearTimeout(c),l(null)}},[a,l]),m.jsx(Qn,{asChild:!0,...u,children:m.jsx(As,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ws(n.open),...e,ref:_t(t,o.onTriggerChange),onClick:c=>{e.onClick?.(c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:J(e.onPointerMove,St(c=>{s.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:J(e.onPointerLeave,St(c=>{d();const f=n.content?.getBoundingClientRect();if(f){const g=n.content?.dataset.side,v=g==="right",h=v?-5:5,b=f[v?"left":"right"],x=f[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:c.clientX+h,y:c.clientY},{x:b,y:f.top},{x,y:f.top},{x,y:f.bottom},{x:b,y:f.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(c),c.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:J(e.onKeyDown,c=>{const f=s.searchRef.current!=="";e.disabled||f&&c.key===" "||Ru[r.dir].includes(c.key)&&(n.onOpenChange(!0),n.content?.focus(),c.preventDefault())})})})});Bs.displayName=Ct;var Gs="MenuSubContent",Hs=p.forwardRef((e,t)=>{const n=Es(ge,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=ze(ge,e.__scopeMenu),i=wt(ge,e.__scopeMenu),a=Fs(Gs,e.__scopeMenu),l=p.useRef(null),u=ue(t,l);return m.jsx(xt.Provider,{scope:e.__scopeMenu,children:m.jsx(Ze,{present:r||s.open,children:m.jsx(xt.Slot,{scope:e.__scopeMenu,children:m.jsx(nr,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{i.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:J(e.onFocusOutside,d=>{d.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:J(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:J(e.onKeyDown,d=>{const c=d.currentTarget.contains(d.target),f=Au[i.dir].includes(d.key);c&&f&&(s.onOpenChange(!1),a.trigger?.focus(),d.preventDefault())})})})})})});Hs.displayName=Gs;function Ws(e){return e?"open":"closed"}function rn(e){return e==="indeterminate"}function ir(e){return rn(e)?"indeterminate":e?"checked":"unchecked"}function Yu(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function qu(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Xu(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Zu(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 a=t[s],l=t[i],u=a.x,d=a.y,c=l.x,f=l.y;d>r!=f>r&&n<(c-u)*(r-d)/(f-d)+u&&(o=!o)}return o}function Ju(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Zu(n,t)}function St(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Qu=Ss,ed=Qn,td=Ps,nd=ks,rd=rr,od=Ms,sd=nn,id=Ns,ad=Is,ld=Os,cd=zs,ud=js,dd=Ls,fd=$s,pd=Bs,md=Hs,on="DropdownMenu",[gd,qf]=Xe(on,[ys]),ce=ys(),[hd,Vs]=gd(on),Us=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=ce(t),u=p.useRef(null),[d,c]=Ot({prop:o,defaultProp:s??!1,onChange:i,caller:on});return m.jsx(hd,{scope:t,triggerId:qe(),triggerRef:u,contentId:qe(),open:d,onOpenChange:c,onOpenToggle:p.useCallback(()=>c(f=>!f),[c]),modal:a,children:m.jsx(Qu,{...l,open:d,onOpenChange:c,dir:r,modal:a,children:n})})};Us.displayName=on;var Ks="DropdownMenuTrigger",Ys=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Vs(Ks,n),i=ce(n);return m.jsx(ed,{asChild:!0,...i,children:m.jsx(ie.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:_t(t,s.triggerRef),onPointerDown:J(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:J(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Ys.displayName=Ks;var vd="DropdownMenuPortal",Xs=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ce(t);return m.jsx(td,{...r,...n})};Xs.displayName=vd;var qs="DropdownMenuContent",Zs=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vs(qs,n),s=ce(n),i=p.useRef(!1);return m.jsx(nd,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:J(e.onCloseAutoFocus,a=>{i.current||o.triggerRef.current?.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:J(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!o.modal||d)&&(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)"}})});Zs.displayName=qs;var bd="DropdownMenuGroup",Js=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return m.jsx(rd,{...o,...r,ref:t})});Js.displayName=bd;var xd="DropdownMenuLabel",Qs=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return m.jsx(od,{...o,...r,ref:t})});Qs.displayName=xd;var yd="DropdownMenuItem",ei=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return m.jsx(sd,{...o,...r,ref:t})});ei.displayName=yd;var wd="DropdownMenuCheckboxItem",ti=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return m.jsx(id,{...o,...r,ref:t})});ti.displayName=wd;var Cd="DropdownMenuRadioGroup",ni=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return m.jsx(ad,{...o,...r,ref:t})});ni.displayName=Cd;var Sd="DropdownMenuRadioItem",ri=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return m.jsx(ld,{...o,...r,ref:t})});ri.displayName=Sd;var Ed="DropdownMenuItemIndicator",oi=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return m.jsx(cd,{...o,...r,ref:t})});oi.displayName=Ed;var Pd="DropdownMenuSeparator",si=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return m.jsx(ud,{...o,...r,ref:t})});si.displayName=Pd;var kd="DropdownMenuArrow",Md=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return m.jsx(dd,{...o,...r,ref:t})});Md.displayName=kd;var Rd=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,i=ce(t),[a,l]=Ot({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return m.jsx(fd,{...i,open:a,onOpenChange:l,children:n})},Ad="DropdownMenuSubTrigger",ii=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return m.jsx(pd,{...o,...r,ref:t})});ii.displayName=Ad;var Nd="DropdownMenuSubContent",ai=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ce(n);return m.jsx(md,{...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)"}})});ai.displayName=Nd;var _d=Us,Id=Ys,Td=Xs,Od=Zs,Dd=Js,zd=Qs,jd=ei,Ld=ti,Fd=ni,$d=ri,li=oi,Bd=si,Gd=Rd,Hd=ii,Wd=ai;/**
|
|
63
63
|
* @license lucide-react v0.525.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
67
|
+
*/const Vd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ud=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),ci=e=>{const t=Ud(e);return t.charAt(0).toUpperCase()+t.slice(1)},ui=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Kd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
68
68
|
* @license lucide-react v0.525.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/var
|
|
72
|
+
*/var Yd={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"};/**
|
|
73
73
|
* @license lucide-react v0.525.0 - ISC
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
77
|
+
*/const Xd=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>A.createElement("svg",{ref:l,...Yd,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ui("lucide",o),...!s&&!Kd(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,d])=>A.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
|
|
78
78
|
* @license lucide-react v0.525.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const Ge=(e,t)=>{const n=A.forwardRef(({className:r,...o},s)=>A.createElement(
|
|
82
|
+
*/const Ge=(e,t)=>{const n=A.forwardRef(({className:r,...o},s)=>A.createElement(Xd,{ref:s,iconNode:t,className:ui(`lucide-${Vd(ci(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ci(e),n};/**
|
|
83
83
|
* @license lucide-react v0.525.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const
|
|
87
|
+
*/const qd=Ge("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
88
88
|
* @license lucide-react v0.525.0 - ISC
|
|
89
89
|
*
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
92
|
+
*/const Zd=Ge("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
93
93
|
* @license lucide-react v0.525.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
97
|
+
*/const Jd=Ge("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
98
98
|
* @license lucide-react v0.525.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
102
|
+
*/const Qd=Ge("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
|
|
103
103
|
* @license lucide-react v0.525.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const ef=Ge("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
108
108
|
* @license lucide-react v0.525.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
112
|
+
*/const tf=Ge("equal",[["line",{x1:"5",x2:"19",y1:"9",y2:"9",key:"1nwqeh"}],["line",{x1:"5",x2:"19",y1:"15",y2:"15",key:"g8yjpy"}]]);/**
|
|
113
113
|
* @license lucide-react v0.525.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const tf=Ge("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),di=({...e})=>g.jsx(Nd,{"data-slot":"dropdown-menu",...e}),fi=({...e})=>g.jsx(_d,{"data-slot":"dropdown-menu-trigger",...e}),pi=({className:e,sideOffset:t=4,...n})=>g.jsx(Id,{children:g.jsx(Td,{"data-slot":"dropdown-menu-content",sideOffset:t,className:ne("bg-popover text-popover-foreground 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 p-1 shadow-md",e),...n})}),nf=({...e})=>g.jsx(Od,{"data-slot":"dropdown-menu-group",...e}),mi=({className:e,inset:t,variant:n="default",...r})=>g.jsx(zd,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:ne("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none 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}),rf=({className:e,children:t,checked:n,...r})=>g.jsxs(jd,{"data-slot":"dropdown-menu-checkbox-item",className:ne("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none 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:[g.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:g.jsx(li,{children:g.jsx(Xd,{className:"size-4"})})}),t]}),of=({...e})=>g.jsx(Ld,{"data-slot":"dropdown-menu-radio-group",...e}),sf=({className:e,children:t,...n})=>g.jsxs($d,{"data-slot":"dropdown-menu-radio-item",className:ne("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none 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:[g.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:g.jsx(li,{children:g.jsx(Qd,{className:"size-2 fill-current"})})}),t]}),af=({className:e,inset:t,...n})=>g.jsx(Dd,{"data-slot":"dropdown-menu-label","data-inset":t,className:ne("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n}),lf=({className:e,...t})=>g.jsx(Fd,{"data-slot":"dropdown-menu-separator",className:ne("bg-border -mx-1 my-1 h-px",e),...t}),cf=({...e})=>g.jsx(Bd,{"data-slot":"dropdown-menu-sub",...e}),uf=({className:e,inset:t,children:n,...r})=>g.jsxs(Gd,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:ne("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,g.jsx(Zd,{className:"ml-auto size-4"})]}),df=({className:e,...t})=>g.jsx(Hd,{"data-slot":"dropdown-menu-sub-content",className:ne("bg-popover text-popover-foreground 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 p-1 shadow-lg",e),...t}),or=({label:e,onClick:t,isLast:n,dropdownItems:r,icon:o})=>r?.length?g.jsxs(di,{children:[g.jsx(fi,{asChild:!0,children:g.jsxs(Pe,{variant:"ghost",size:"sm",className:"p-1 gap-2",children:[o,e," ",g.jsx(Jd,{className:"size-4"})]})}),g.jsx(pi,{className:"bg-background text-foreground",children:r.map(s=>g.jsxs(mi,{className:"cursor-pointer gap-2",onClick:s.onClick,children:[s.icon,s.label]},`dropdown-${s.label}`))})]}):n?g.jsx(Pe,{variant:"ghost",size:"sm",className:"cursor-default hover:bg-transparent hover:text-muted-transparent p-1",asChild:!0,children:g.jsxs("div",{className:"flex items-center gap-2",children:[o,e]})}):g.jsxs(Pe,{onClick:t,variant:"ghost",size:"sm",className:"p-1 gap-2",children:[o,e]});or.displayName="BreadcrumbItem";const gi=({className:e,items:t,...n})=>{const r=t.length-1;return g.jsx("div",{className:ne("flex items-center",e),...n,children:t.map((o,s)=>g.jsxs(p.Fragment,{children:[s!==0&&g.jsx("span",{className:"mx-1.5 text-muted-foreground",children:"/"},`${o.label}-separator`),g.jsx(or,{label:o.label,icon:o.icon,isLast:s===r,dropdownItems:o.dropdownItems},`${o.label}-item`)]},`${o.label}-fragment`))})};gi.displayName="Breadcrumb";const sr=A.forwardRef(({className:e,children:t,...n},r)=>g.jsx("div",{ref:r,className:ne("border border-border text-foreground rounded-lg overflow-hidden flex flex-col h-full",e),...n,children:t}));sr.displayName="Container";const ff=mn("w-full bg-card flex min-h-10 items-center",{variants:{variant:{default:"px-5 py-2 items-center",tabs:"p-0"}},defaultVariants:{variant:"default"}}),ir=A.forwardRef(({className:e,variant:t,children:n,...r},o)=>g.jsx("div",{ref:o,className:ne(ff({variant:t,className:e})),...r,children:n}));ir.displayName="ContainerHeader";const ar=A.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:ne("flex-1 overflow-auto bg-default border-border border-t",e),...t}));ar.displayName="ContainerContent";const on=A.createContext(null);on.displayName="PanelGroupContext";const oe={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},lr=10,He=A.useLayoutEffect,hi=p.useId,pf=typeof hi=="function"?hi:()=>null;let mf=0;function cr(e=null){const t=pf(),n=A.useRef(e||t||null);return n.current===null&&(n.current=""+mf++),e??n.current}function vi({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:o,forwardedRef:s,id:i,maxSize:a,minSize:l,onCollapse:u,onExpand:d,onResize:c,order:f,style:h,tagName:v="div",...m}){const b=A.useContext(on);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:E,getPanelSize:w,getPanelStyle:C,groupId:N,isPanelCollapsed:_,reevaluatePanelConstraints:S,registerPanel:P,resizePanel:H,unregisterPanel:W}=b,U=cr(i),B=A.useRef({callbacks:{onCollapse:u,onExpand:d,onResize:c},constraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:a,minSize:l},id:U,idIsFromProps:i!==void 0,order:f});A.useRef({didLogMissingDefaultSizeWarning:!1}),He(()=>{const{callbacks:G,constraints:V}=B.current,F={...V};B.current.id=U,B.current.idIsFromProps=i!==void 0,B.current.order=f,G.onCollapse=u,G.onExpand=d,G.onResize=c,V.collapsedSize=n,V.collapsible=r,V.defaultSize=o,V.maxSize=a,V.minSize=l,(F.collapsedSize!==V.collapsedSize||F.collapsible!==V.collapsible||F.maxSize!==V.maxSize||F.minSize!==V.minSize)&&S(B.current,F)}),He(()=>{const G=B.current;return P(G),()=>{W(G)}},[f,U,P,W]),A.useImperativeHandle(s,()=>({collapse:()=>{x(B.current)},expand:G=>{E(B.current,G)},getId(){return U},getSize(){return w(B.current)},isCollapsed(){return _(B.current)},isExpanded(){return!_(B.current)},resize:G=>{H(B.current,G)}}),[x,E,w,_,U,H]);const Q=C(B.current,o);return A.createElement(v,{...m,children:e,className:t,id:U,style:{...Q,...h},[oe.groupId]:N,[oe.panel]:"",[oe.panelCollapsible]:r||void 0,[oe.panelId]:U,[oe.panelSize]:parseFloat(""+Q.flexGrow).toFixed(1)})}const bi=A.forwardRef((e,t)=>A.createElement(vi,{...e,forwardedRef:t}));vi.displayName="Panel",bi.displayName="forwardRef(Panel)";let ur=null,sn=-1,je=null;function gf(e,t){if(t){const n=(t&ki)!==0,r=(t&Mi)!==0,o=(t&Ri)!==0,s=(t&Ai)!==0;if(n)return o?"se-resize":s?"ne-resize":"e-resize";if(r)return o?"sw-resize":s?"nw-resize":"w-resize";if(o)return"s-resize";if(s)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function hf(){je!==null&&(document.head.removeChild(je),ur=null,je=null,sn=-1)}function dr(e,t){var n,r;const o=gf(e,t);if(ur!==o){if(ur=o,je===null&&(je=document.createElement("style"),document.head.appendChild(je)),sn>=0){var s;(s=je.sheet)===null||s===void 0||s.removeRule(sn)}sn=(n=(r=je.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${o} !important;}`))!==null&&n!==void 0?n:-1}}function xi(e){return e.type==="keydown"}function yi(e){return e.type.startsWith("pointer")}function wi(e){return e.type.startsWith("mouse")}function an(e){if(yi(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(wi(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function vf(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function bf(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function xf(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Ei(e),b:Ei(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;X(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:Si(Ci(n.a)),b:Si(Ci(n.b))};if(o.a===o.b){const s=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)};let a=s.length;for(;a--;){const l=s[a];if(l===i.a)return 1;if(l===i.b)return-1}}return Math.sign(o.a-o.b)}const yf=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function wf(e){var t;const n=getComputedStyle((t=Pi(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function Cf(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||wf(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||yf.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Ci(e){let t=e.length;for(;t--;){const n=e[t];if(X(n,"Missing node"),Cf(n))return n}return null}function Si(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Ei(e){const t=[];for(;e;)t.push(e),e=Pi(e);return t}function Pi(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const ki=1,Mi=2,Ri=4,Ai=8,Sf=vf()==="coarse";let be=[],it=!1,Le=new Map,ln=new Map;const Et=new Set;function Ef(e,t,n,r,o){var s;const{ownerDocument:i}=t,a={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:o},l=(s=Le.get(i))!==null&&s!==void 0?s:0;return Le.set(i,l+1),Et.add(a),cn(),function(){var d;ln.delete(e),Et.delete(a);const c=(d=Le.get(i))!==null&&d!==void 0?d:1;if(Le.set(i,c-1),cn(),c===1&&Le.delete(i),be.includes(a)){const f=be.indexOf(a);f>=0&&be.splice(f,1),hr(),o("up",!0,null)}}}function Pf(e){const{target:t}=e,{x:n,y:r}=an(e);it=!0,mr({target:t,x:n,y:r}),cn(),be.length>0&&(un("down",e),e.preventDefault(),Ni(t)||e.stopImmediatePropagation())}function fr(e){const{x:t,y:n}=an(e);if(it&&e.buttons===0&&(it=!1,un("up",e)),!it){const{target:r}=e;mr({target:r,x:t,y:n})}un("move",e),hr(),be.length>0&&e.preventDefault()}function pr(e){const{target:t}=e,{x:n,y:r}=an(e);ln.clear(),it=!1,be.length>0&&(e.preventDefault(),Ni(t)||e.stopImmediatePropagation()),un("up",e),mr({target:t,x:n,y:r}),hr(),cn()}function Ni(e){let t=e;for(;t;){if(t.hasAttribute(oe.resizeHandle))return!0;t=t.parentElement}return!1}function mr({target:e,x:t,y:n}){be.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),Et.forEach(o=>{const{element:s,hitAreaMargins:i}=o,a=s.getBoundingClientRect(),{bottom:l,left:u,right:d,top:c}=a,f=Sf?i.coarse:i.fine;if(t>=u-f&&t<=d+f&&n>=c-f&&n<=l+f){if(r!==null&&document.contains(r)&&s!==r&&!s.contains(r)&&!r.contains(s)&&xf(r,s)>0){let v=r,m=!1;for(;v&&!v.contains(s);){if(bf(v.getBoundingClientRect(),a)){m=!0;break}v=v.parentElement}if(m)return}be.push(o)}})}function gr(e,t){ln.set(e,t)}function hr(){let e=!1,t=!1;be.forEach(r=>{const{direction:o}=r;o==="horizontal"?e=!0:t=!0});let n=0;ln.forEach(r=>{n|=r}),e&&t?dr("intersection",n):e?dr("horizontal",n):t?dr("vertical",n):hf()}let vr;function cn(){var e;(e=vr)===null||e===void 0||e.abort(),vr=new AbortController;const t={capture:!0,signal:vr.signal};Et.size&&(it?(be.length>0&&Le.forEach((n,r)=>{const{body:o}=r;n>0&&(o.addEventListener("contextmenu",pr,t),o.addEventListener("pointerleave",fr,t),o.addEventListener("pointermove",fr,t))}),Le.forEach((n,r)=>{const{body:o}=r;o.addEventListener("pointerup",pr,t),o.addEventListener("pointercancel",pr,t)})):Le.forEach((n,r)=>{const{body:o}=r;n>0&&(o.addEventListener("pointerdown",Pf,t),o.addEventListener("pointermove",fr,t))}))}function un(e,t){Et.forEach(n=>{const{setResizeHandlerState:r}=n,o=be.includes(n);r(e,o,t)})}function kf(){const[e,t]=A.useState(0);return A.useCallback(()=>t(n=>n+1),[])}function X(e,t){if(!e)throw console.error(t),Error(t)}function We(e,t,n=lr){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ae(e,t,n=lr){return We(e,t,n)===0}function me(e,t,n){return We(e,t,n)===0}function Mf(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const o=e[r],s=t[r];if(!me(o,s,n))return!1}return!0}function at({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];X(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:o=0,collapsible:s,maxSize:i=100,minSize:a=0}=r;if(We(n,a)<0)if(s){const l=(o+a)/2;We(n,l)<0?n=o:n=a}else n=a;return n=Math.min(i,n),n=parseFloat(n.toFixed(lr)),n}function Pt({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:s}){if(me(e,0))return t;const i=[...t],[a,l]=r;X(a!=null,"Invalid first pivot index"),X(l!=null,"Invalid second pivot index");let u=0;if(s==="keyboard"){{const c=e<0?l:a,f=n[c];X(f,`Panel constraints not found for index ${c}`);const{collapsedSize:h=0,collapsible:v,minSize:m=0}=f;if(v){const b=t[c];if(X(b!=null,`Previous layout not found for panel index ${c}`),me(b,h)){const x=m-b;We(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}{const c=e<0?a:l,f=n[c];X(f,`No panel constraints found for index ${c}`);const{collapsedSize:h=0,collapsible:v,minSize:m=0}=f;if(v){const b=t[c];if(X(b!=null,`Previous layout not found for panel index ${c}`),me(b,m)){const x=b-h;We(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}}{const c=e<0?1:-1;let f=e<0?l:a,h=0;for(;;){const m=t[f];X(m!=null,`Previous layout not found for panel index ${f}`);const x=at({panelConstraints:n,panelIndex:f,size:100})-m;if(h+=x,f+=c,f<0||f>=n.length)break}const v=Math.min(Math.abs(e),Math.abs(h));e=e<0?0-v:v}{let f=e<0?a:l;for(;f>=0&&f<n.length;){const h=Math.abs(e)-Math.abs(u),v=t[f];X(v!=null,`Previous layout not found for panel index ${f}`);const m=v-h,b=at({panelConstraints:n,panelIndex:f,size:m});if(!me(v,b)&&(u+=v-b,i[f]=b,u.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(Mf(o,i))return o;{const c=e<0?l:a,f=t[c];X(f!=null,`Previous layout not found for panel index ${c}`);const h=f+u,v=at({panelConstraints:n,panelIndex:c,size:h});if(i[c]=v,!me(v,h)){let m=h-v,x=e<0?l:a;for(;x>=0&&x<n.length;){const E=i[x];X(E!=null,`Previous layout not found for panel index ${x}`);const w=E+m,C=at({panelConstraints:n,panelIndex:x,size:w});if(me(E,C)||(m-=C-E,i[x]=C),me(m,0))break;e>0?x--:x++}}}const d=i.reduce((c,f)=>f+c,0);return me(d,100)?i:o}function Rf({layout:e,panelsArray:t,pivotIndices:n}){let r=0,o=100,s=0,i=0;const a=n[0];X(a!=null,"No pivot index found"),t.forEach((c,f)=>{const{constraints:h}=c,{maxSize:v=100,minSize:m=0}=h;f===a?(r=m,o=v):(s+=m,i+=v)});const l=Math.min(o,100-s),u=Math.max(r,100-i),d=e[a];return{valueMax:l,valueMin:u,valueNow:d}}function kt(e,t=document){return Array.from(t.querySelectorAll(`[${oe.resizeHandleId}][data-panel-group-id="${e}"]`))}function _i(e,t,n=document){const o=kt(e,n).findIndex(s=>s.getAttribute(oe.resizeHandleId)===t);return o??null}function Ii(e,t,n){const r=_i(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function Af(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function Ti(e,t=document){if(Af(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function dn(e,t=document){const n=t.querySelector(`[${oe.resizeHandleId}="${e}"]`);return n||null}function Nf(e,t,n,r=document){var o,s,i,a;const l=dn(t,r),u=kt(e,r),d=l?u.indexOf(l):-1,c=(o=(s=n[d])===null||s===void 0?void 0:s.id)!==null&&o!==void 0?o:null,f=(i=(a=n[d+1])===null||a===void 0?void 0:a.id)!==null&&i!==void 0?i:null;return[c,f]}function _f({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:o,panelGroupElement:s,setLayout:i}){A.useRef({didWarnAboutMissingResizeHandle:!1}),He(()=>{if(!s)return;const a=kt(n,s);for(let l=0;l<o.length-1;l++){const{valueMax:u,valueMin:d,valueNow:c}=Rf({layout:r,panelsArray:o,pivotIndices:[l,l+1]}),f=a[l];if(f!=null){const h=o[l];X(h,`No panel data found for index "${l}"`),f.setAttribute("aria-controls",h.id),f.setAttribute("aria-valuemax",""+Math.round(u)),f.setAttribute("aria-valuemin",""+Math.round(d)),f.setAttribute("aria-valuenow",c!=null?""+Math.round(c):"")}}return()=>{a.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,o,s]),A.useEffect(()=>{if(!s)return;const a=t.current;X(a,"Eager values not found");const{panelDataArray:l}=a,u=Ti(n,s);X(u!=null,`No group found for id "${n}"`);const d=kt(n,s);X(d,`No resize handles found for group id "${n}"`);const c=d.map(f=>{const h=f.getAttribute(oe.resizeHandleId);X(h,"Resize handle element has no handle id attribute");const[v,m]=Nf(n,h,l,s);if(v==null||m==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const E=l.findIndex(w=>w.id===v);if(E>=0){const w=l[E];X(w,`No panel data found for index ${E}`);const C=r[E],{collapsedSize:N=0,collapsible:_,minSize:S=0}=w.constraints;if(C!=null&&_){const P=Pt({delta:me(C,N)?S-N:N-C,initialLayout:r,panelConstraints:l.map(H=>H.constraints),pivotIndices:Ii(n,h,s),prevLayout:r,trigger:"keyboard"});r!==P&&i(P)}}break}}};return f.addEventListener("keydown",b),()=>{f.removeEventListener("keydown",b)}});return()=>{c.forEach(f=>f())}},[s,e,t,n,r,o,i])}function Oi(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Di(e,t){const n=e==="horizontal",{x:r,y:o}=an(t);return n?r:o}function If(e,t,n,r,o){const s=n==="horizontal",i=dn(t,o);X(i,`No resize handle element found for id "${t}"`);const a=i.getAttribute(oe.groupId);X(a,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const u=Di(n,e),d=Ti(a,o);X(d,`No group element found for id "${a}"`);const c=d.getBoundingClientRect(),f=s?c.width:c.height;return(u-l)/f*100}function Tf(e,t,n,r,o,s){if(xi(e)){const i=n==="horizontal";let a=0;e.shiftKey?a=100:o!=null?a=o:a=10;let l=0;switch(e.key){case"ArrowDown":l=i?0:a;break;case"ArrowLeft":l=i?-a:0;break;case"ArrowRight":l=i?a:0;break;case"ArrowUp":l=i?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:If(e,t,n,r,s)}function Of({panelDataArray:e}){const t=Array(e.length),n=e.map(s=>s.constraints);let r=0,o=100;for(let s=0;s<e.length;s++){const i=n[s];X(i,`Panel constraints not found for index ${s}`);const{defaultSize:a}=i;a!=null&&(r++,t[s]=a,o-=a)}for(let s=0;s<e.length;s++){const i=n[s];X(i,`Panel constraints not found for index ${s}`);const{defaultSize:a}=i;if(a!=null)continue;const l=e.length-r,u=o/l;r++,t[s]=u,o-=u}return t}function lt(e,t,n){t.forEach((r,o)=>{const s=e[o];X(s,`Panel data not found for index ${o}`);const{callbacks:i,constraints:a,id:l}=s,{collapsedSize:u=0,collapsible:d}=a,c=n[l];if(c==null||r!==c){n[l]=r;const{onCollapse:f,onExpand:h,onResize:v}=i;v&&v(r,c),d&&(f||h)&&(h&&(c==null||Ae(c,u))&&!Ae(r,u)&&h(),f&&(c==null||!Ae(c,u))&&Ae(r,u)&&f())}})}function fn(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Df({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:o,precision:s=3}){const i=n[o];let a;return i==null?a=e!=null?e.toPrecision(s):"1":r.length===1?a="1":a=i.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function zf(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function zi(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function ji(e){return`react-resizable-panels:${e}`}function Li(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:o,order:s}=t;return o?r:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function $i(e,t){try{const n=ji(e),r=t.getItem(n);if(r){const o=JSON.parse(r);if(typeof o=="object"&&o!=null)return o}}catch{}return null}function jf(e,t,n){var r,o;const s=(r=$i(e,n))!==null&&r!==void 0?r:{},i=Li(t);return(o=s[i])!==null&&o!==void 0?o:null}function Lf(e,t,n,r,o){var s;const i=ji(e),a=Li(t),l=(s=$i(e,o))!==null&&s!==void 0?s:{};l[a]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{o.setItem(i,JSON.stringify(l))}catch(u){console.error(u)}}function Fi({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((s,i)=>s+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!me(r,100)&&n.length>0)for(let s=0;s<t.length;s++){const i=n[s];X(i!=null,`No layout data found for index ${s}`);const a=100/r*i;n[s]=a}let o=0;for(let s=0;s<t.length;s++){const i=n[s];X(i!=null,`No layout data found for index ${s}`);const a=at({panelConstraints:t,panelIndex:s,size:i});i!=a&&(o+=i-a,n[s]=a)}if(!me(o,0))for(let s=0;s<t.length;s++){const i=n[s];X(i!=null,`No layout data found for index ${s}`);const a=i+o,l=at({panelConstraints:t,panelIndex:s,size:a});if(i!==l&&(o-=l-i,n[s]=l,me(o,0)))break}return n}const $f=100,Mt={getItem:e=>(zi(Mt),Mt.getItem(e)),setItem:(e,t)=>{zi(Mt),Mt.setItem(e,t)}},Bi={};function Gi({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:o,id:s=null,onLayout:i=null,keyboardResizeBy:a=null,storage:l=Mt,style:u,tagName:d="div",...c}){const f=cr(s),h=A.useRef(null),[v,m]=A.useState(null),[b,x]=A.useState([]),E=kf(),w=A.useRef({}),C=A.useRef(new Map),N=A.useRef(0),_=A.useRef({autoSaveId:e,direction:r,dragState:v,id:f,keyboardResizeBy:a,onLayout:i,storage:l}),S=A.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});A.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),A.useImperativeHandle(o,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:k}=S.current;return k},setLayout:k=>{const{onLayout:I}=_.current,{layout:j,panelDataArray:$}=S.current,M=Fi({layout:k,panelConstraints:$.map(O=>O.constraints)});Oi(j,M)||(x(M),S.current.layout=M,I&&I(M),lt($,M,w.current))}}),[]),He(()=>{_.current.autoSaveId=e,_.current.direction=r,_.current.dragState=v,_.current.id=f,_.current.onLayout=i,_.current.storage=l}),_f({committedValuesRef:_,eagerValuesRef:S,groupId:f,layout:b,panelDataArray:S.current.panelDataArray,setLayout:x,panelGroupElement:h.current}),A.useEffect(()=>{const{panelDataArray:k}=S.current;if(e){if(b.length===0||b.length!==k.length)return;let I=Bi[e];I==null&&(I=zf(Lf,$f),Bi[e]=I);const j=[...k],$=new Map(C.current);I(e,j,$,b,l)}},[e,b,l]),A.useEffect(()=>{});const P=A.useCallback(k=>{const{onLayout:I}=_.current,{layout:j,panelDataArray:$}=S.current;if(k.constraints.collapsible){const M=$.map(ae=>ae.constraints),{collapsedSize:O=0,panelSize:Y,pivotIndices:te}=Ve($,k,j);if(X(Y!=null,`Panel size not found for panel "${k.id}"`),!Ae(Y,O)){C.current.set(k.id,Y);const le=ct($,k)===$.length-1?Y-O:O-Y,re=Pt({delta:le,initialLayout:j,panelConstraints:M,pivotIndices:te,prevLayout:j,trigger:"imperative-api"});fn(j,re)||(x(re),S.current.layout=re,I&&I(re),lt($,re,w.current))}}},[]),H=A.useCallback((k,I)=>{const{onLayout:j}=_.current,{layout:$,panelDataArray:M}=S.current;if(k.constraints.collapsible){const O=M.map(xe=>xe.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:ae=0,pivotIndices:le}=Ve(M,k,$),re=I??ae;if(Ae(te,Y)){const xe=C.current.get(k.id),Rt=xe!=null&&xe>=re?xe:re,br=ct(M,k)===M.length-1?te-Rt:Rt-te,de=Pt({delta:br,initialLayout:$,panelConstraints:O,pivotIndices:le,prevLayout:$,trigger:"imperative-api"});fn($,de)||(x(de),S.current.layout=de,j&&j(de),lt(M,de,w.current))}}},[]),W=A.useCallback(k=>{const{layout:I,panelDataArray:j}=S.current,{panelSize:$}=Ve(j,k,I);return X($!=null,`Panel size not found for panel "${k.id}"`),$},[]),U=A.useCallback((k,I)=>{const{panelDataArray:j}=S.current,$=ct(j,k);return Df({defaultSize:I,dragState:v,layout:b,panelData:j,panelIndex:$})},[v,b]),B=A.useCallback(k=>{const{layout:I,panelDataArray:j}=S.current,{collapsedSize:$=0,collapsible:M,panelSize:O}=Ve(j,k,I);return X(O!=null,`Panel size not found for panel "${k.id}"`),M===!0&&Ae(O,$)},[]),Q=A.useCallback(k=>{const{layout:I,panelDataArray:j}=S.current,{collapsedSize:$=0,collapsible:M,panelSize:O}=Ve(j,k,I);return X(O!=null,`Panel size not found for panel "${k.id}"`),!M||We(O,$)>0},[]),G=A.useCallback(k=>{const{panelDataArray:I}=S.current;I.push(k),I.sort((j,$)=>{const M=j.order,O=$.order;return M==null&&O==null?0:M==null?-1:O==null?1:M-O}),S.current.panelDataArrayChanged=!0,E()},[E]);He(()=>{if(S.current.panelDataArrayChanged){S.current.panelDataArrayChanged=!1;const{autoSaveId:k,onLayout:I,storage:j}=_.current,{layout:$,panelDataArray:M}=S.current;let O=null;if(k){const te=jf(k,M,j);te&&(C.current=new Map(Object.entries(te.expandToSizes)),O=te.layout)}O==null&&(O=Of({panelDataArray:M}));const Y=Fi({layout:O,panelConstraints:M.map(te=>te.constraints)});Oi($,Y)||(x(Y),S.current.layout=Y,I&&I(Y),lt(M,Y,w.current))}}),He(()=>{const k=S.current;return()=>{k.layout=[]}},[]);const V=A.useCallback(k=>{let I=!1;const j=h.current;return j&&window.getComputedStyle(j,null).getPropertyValue("direction")==="rtl"&&(I=!0),function(M){M.preventDefault();const O=h.current;if(!O)return()=>null;const{direction:Y,dragState:te,id:ae,keyboardResizeBy:le,onLayout:re}=_.current,{layout:xe,panelDataArray:Rt}=S.current,{initialLayout:pn}=te??{},br=Ii(ae,k,O);let de=Tf(M,k,Y,te,le,O);const Yi=Y==="horizontal";Yi&&I&&(de=-de);const Vf=Rt.map(Uf=>Uf.constraints),At=Pt({delta:de,initialLayout:pn??xe,panelConstraints:Vf,pivotIndices:br,prevLayout:xe,trigger:xi(M)?"keyboard":"mouse-or-touch"}),Xi=!fn(xe,At);(yi(M)||wi(M))&&N.current!=de&&(N.current=de,!Xi&&de!==0?Yi?gr(k,de<0?ki:Mi):gr(k,de<0?Ri:Ai):gr(k,0)),Xi&&(x(At),S.current.layout=At,re&&re(At),lt(Rt,At,w.current))}},[]),F=A.useCallback((k,I)=>{const{onLayout:j}=_.current,{layout:$,panelDataArray:M}=S.current,O=M.map(xe=>xe.constraints),{panelSize:Y,pivotIndices:te}=Ve(M,k,$);X(Y!=null,`Panel size not found for panel "${k.id}"`);const le=ct(M,k)===M.length-1?Y-I:I-Y,re=Pt({delta:le,initialLayout:$,panelConstraints:O,pivotIndices:te,prevLayout:$,trigger:"imperative-api"});fn($,re)||(x(re),S.current.layout=re,j&&j(re),lt(M,re,w.current))},[]),ee=A.useCallback((k,I)=>{const{layout:j,panelDataArray:$}=S.current,{collapsedSize:M=0,collapsible:O}=I,{collapsedSize:Y=0,collapsible:te,maxSize:ae=100,minSize:le=0}=k.constraints,{panelSize:re}=Ve($,k,j);re!=null&&(O&&te&&Ae(re,M)?Ae(M,Y)||F(k,Y):re<le?F(k,le):re>ae&&F(k,ae))},[F]),R=A.useCallback((k,I)=>{const{direction:j}=_.current,{layout:$}=S.current;if(!h.current)return;const M=dn(k,h.current);X(M,`Drag handle element not found for id "${k}"`);const O=Di(j,I);m({dragHandleId:k,dragHandleRect:M.getBoundingClientRect(),initialCursorPosition:O,initialLayout:$})},[]),T=A.useCallback(()=>{m(null)},[]),y=A.useCallback(k=>{const{panelDataArray:I}=S.current,j=ct(I,k);j>=0&&(I.splice(j,1),delete w.current[k.id],S.current.panelDataArrayChanged=!0,E())},[E]),L=A.useMemo(()=>({collapsePanel:P,direction:r,dragState:v,expandPanel:H,getPanelSize:W,getPanelStyle:U,groupId:f,isPanelCollapsed:B,isPanelExpanded:Q,reevaluatePanelConstraints:ee,registerPanel:G,registerResizeHandle:V,resizePanel:F,startDragging:R,stopDragging:T,unregisterPanel:y,panelGroupElement:h.current}),[P,v,r,H,W,U,f,B,Q,ee,G,V,F,R,T,y]),K={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return A.createElement(on.Provider,{value:L},A.createElement(d,{...c,children:t,className:n,id:s,ref:h,style:{...K,...u},[oe.group]:"",[oe.groupDirection]:r,[oe.groupId]:f}))}const Hi=A.forwardRef((e,t)=>A.createElement(Gi,{...e,forwardedRef:t}));Gi.displayName="PanelGroup",Hi.displayName="forwardRef(PanelGroup)";function ct(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Ve(e,t,n){const r=ct(e,t),s=r===e.length-1?[r-1,r]:[r,r+1],i=n[r];return{...t.constraints,panelSize:i,pivotIndices:s}}function Ff({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){A.useEffect(()=>{if(e||n==null||r==null)return;const o=dn(t,r);if(o==null)return;const s=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),n(i);break}case"F6":{i.preventDefault();const a=o.getAttribute(oe.groupId);X(a,`No group element found for id "${a}"`);const l=kt(a,r),u=_i(a,t,r);X(u!==null,`No resize element found for id "${t}"`);const d=i.shiftKey?u>0?u-1:l.length-1:u+1<l.length?u+1:0;l[d].focus();break}}};return o.addEventListener("keydown",s),()=>{o.removeEventListener("keydown",s)}},[r,e,t,n])}function Wi({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:o,onBlur:s,onClick:i,onDragging:a,onFocus:l,onPointerDown:u,onPointerUp:d,style:c={},tabIndex:f=0,tagName:h="div",...v}){var m,b;const x=A.useRef(null),E=A.useRef({onClick:i,onDragging:a,onPointerDown:u,onPointerUp:d});A.useEffect(()=>{E.current.onClick=i,E.current.onDragging=a,E.current.onPointerDown=u,E.current.onPointerUp=d});const w=A.useContext(on);if(w===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:C,groupId:N,registerResizeHandle:_,startDragging:S,stopDragging:P,panelGroupElement:H}=w,W=cr(o),[U,B]=A.useState("inactive"),[Q,G]=A.useState(!1),[V,F]=A.useState(null),ee=A.useRef({state:U});He(()=>{ee.current.state=U}),A.useEffect(()=>{if(n)F(null);else{const L=_(W);F(()=>L)}},[n,W,_]);const R=(m=r?.coarse)!==null&&m!==void 0?m:15,T=(b=r?.fine)!==null&&b!==void 0?b:5;A.useEffect(()=>{if(n||V==null)return;const L=x.current;X(L,"Element ref not attached");let K=!1;return Ef(W,L,C,{coarse:R,fine:T},(I,j,$)=>{if(!j){B("inactive");return}switch(I){case"down":{B("drag"),K=!1,X($,'Expected event to be defined for "down" action'),S(W,$);const{onDragging:M,onPointerDown:O}=E.current;M?.(!0),O?.();break}case"move":{const{state:M}=ee.current;K=!0,M!=="drag"&&B("hover"),X($,'Expected event to be defined for "move" action'),V($);break}case"up":{B("hover"),P();const{onClick:M,onDragging:O,onPointerUp:Y}=E.current;O?.(!1),Y?.(),K||M?.();break}}})},[R,C,n,T,_,W,V,S,P]),Ff({disabled:n,handleId:W,resizeHandler:V,panelGroupElement:H});const y={touchAction:"none",userSelect:"none"};return A.createElement(h,{...v,children:e,className:t,id:o,onBlur:()=>{G(!1),s?.()},onFocus:()=>{G(!0),l?.()},ref:x,role:"separator",style:{...y,...c},tabIndex:f,[oe.groupDirection]:C,[oe.groupId]:N,[oe.resizeHandle]:"",[oe.resizeHandleActive]:U==="drag"?"pointer":Q?"keyboard":void 0,[oe.resizeHandleEnabled]:!n,[oe.resizeHandleId]:W,[oe.resizeHandleState]:U})}Wi.displayName="PanelResizeHandle";const Bf=({header:e,isCollapsed:t,onToggle:n,variant:r="default"})=>g.jsxs(ir,{variant:r,children:[e,g.jsx("div",{className:"flex-1"}),n&&g.jsx(Pe,{variant:"default",onClick:n,"aria-label":t?"Expand panel":"Collapse panel",className:ne("h-8 px-3 [&_svg]:size-5",{"mr-5":r==="tabs"}),children:g.jsx(qd,{className:ne("transition-transform",{"-rotate-180":!t})})})]}),Gf=()=>g.jsx("div",{className:"relative",children:g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsx(Wi,{className:"group relative",children:g.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-background border border-border",children:g.jsx(ef,{className:"h-4 w-4 text-muted-foreground"})})})})}),Hf=({id:e,header:t,children:n,withResizeHandle:r,className:o,variant:s,defaultTab:i,onTabChange:a})=>{const[l,u]=A.useState(!1),d=A.useRef(null),c=A.useCallback(()=>{const m=d.current;if(m)try{m.isCollapsed()?m.expand():m.collapse()}catch(b){console.warn("Failed to toggle panel:",b)}},[]),f=A.useCallback(()=>u(!0),[]),h=A.useCallback(()=>u(!1),[]),v=A.useMemo(()=>{const m=g.jsxs(sr,{className:"h-full",children:[g.jsx(Bf,{header:t,isCollapsed:l,variant:s,onToggle:c}),g.jsx(ar,{children:n})]});return s=="tabs"?g.jsx(Pn,{className:"h-full",defaultValue:i,onValueChange:a,children:m}):m},[s,l,t,n,i,c,a]);return g.jsxs(g.Fragment,{children:[g.jsx(bi,{id:e,collapsible:!0,ref:d,className:ne("min-h-[42px]",o),onCollapse:f,onExpand:h,children:v}),r&&g.jsx(Gf,{})]})},Wf=({children:e,...t})=>{const[n,r]=A.useState(0);return g.jsx(Hi,{onLayout:o=>{r(o.length)},...t,children:A.Children.map(e,(o,s)=>{if(A.isValidElement(o)){const i=n-1===s,a=n>1;return A.cloneElement(o,{withResizeHandle:a&&!i})}return o})})},Vi=({title:e,subtitle:t,actions:n,className:r,children:o,onClose:s})=>g.jsx("div",{className:ne("bg-muted-foreground/5 text-foreground border-l border-border overflow-hidden w-1/3",r),children:g.jsxs("div",{className:"flex flex-col size-full",children:[g.jsx("div",{className:"relative shrink-0 w-full border-b border-border",children:g.jsxs("div",{className:"flex flex-col gap-0 p-4",children:[g.jsxs("div",{className:"flex items-center justify-between w-full",children:[g.jsx("div",{className:"text-lg font-semibold text-foreground tracking-[-0.25px] leading-tight",children:e}),g.jsxs("div",{className:"flex items-center gap-1",children:[n?.map((i,a)=>g.jsx(Pe,{onClick:i.onClick,variant:"ghost",size:"icon","aria-label":i.label,children:i.icon},a)),g.jsx(Pe,{onClick:s,variant:"ghost",size:"icon","aria-label":"Close",children:g.jsx(tf,{className:"w-4 h-4 text-muted-foreground"})})]})]}),t&&g.jsx("div",{className:"text-md font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:t})]})}),g.jsx("div",{className:"flex-1 overflow-auto",children:g.jsx("div",{className:"flex flex-col gap-2 p-4",children:o})})]})});Vi.displayName="SidePanel";const Ui=({children:e})=>g.jsx("table",{className:"w-full",children:e}),Ki=({title:e,children:t})=>g.jsxs("tr",{children:[g.jsx("td",{className:"text-md min-w-[100px] font-medium",children:e}),g.jsx("td",{className:"py-2 text-muted-foreground font-medium",children:t})]});Ui.displayName="SidePanelDetail",Ki.displayName="SidePanelDetailItem",q.Breadcrumb=gi,q.BreadcrumbItem=or,q.Button=Pe,q.CollapsiblePanel=Hf,q.CollapsiblePanelGroup=Wf,q.Container=sr,q.ContainerContent=ar,q.ContainerHeader=ir,q.DropdownMenu=di,q.DropdownMenuCheckboxItem=rf,q.DropdownMenuContent=pi,q.DropdownMenuGroup=nf,q.DropdownMenuItem=mi,q.DropdownMenuLabel=af,q.DropdownMenuRadioGroup=of,q.DropdownMenuRadioItem=sf,q.DropdownMenuSeparator=lf,q.DropdownMenuSub=cf,q.DropdownMenuSubContent=df,q.DropdownMenuSubTrigger=uf,q.DropdownMenuTrigger=fi,q.Input=Vr,q.Panel=Ur,q.SidePanel=Vi,q.SidePanelDetail=Ui,q.SidePanelDetailItem=Ki,q.Tabs=Pn,q.TabsContent=go,q.TabsList=po,q.TabsTrigger=mo,q.Textarea=Wr,q.cn=ne,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});
|
|
117
|
+
*/const nf=Ge("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),di=({...e})=>m.jsx(_d,{"data-slot":"dropdown-menu",...e}),fi=({...e})=>m.jsx(Id,{"data-slot":"dropdown-menu-trigger",...e}),pi=({className:e,sideOffset:t=4,...n})=>m.jsx(Td,{children:m.jsx(Od,{"data-slot":"dropdown-menu-content",sideOffset:t,className:te("bg-popover text-popover-foreground 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 p-1 shadow-md",e),...n})}),rf=({...e})=>m.jsx(Dd,{"data-slot":"dropdown-menu-group",...e}),mi=({className:e,inset:t,variant:n="default",...r})=>m.jsx(jd,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:te("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none 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}),of=({className:e,children:t,checked:n,...r})=>m.jsxs(Ld,{"data-slot":"dropdown-menu-checkbox-item",className:te("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none 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:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(li,{children:m.jsx(qd,{className:"size-4"})})}),t]}),sf=({...e})=>m.jsx(Fd,{"data-slot":"dropdown-menu-radio-group",...e}),af=({className:e,children:t,...n})=>m.jsxs($d,{"data-slot":"dropdown-menu-radio-item",className:te("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none 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:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(li,{children:m.jsx(ef,{className:"size-2 fill-current"})})}),t]}),lf=({className:e,inset:t,...n})=>m.jsx(zd,{"data-slot":"dropdown-menu-label","data-inset":t,className:te("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n}),cf=({className:e,...t})=>m.jsx(Bd,{"data-slot":"dropdown-menu-separator",className:te("bg-border -mx-1 my-1 h-px",e),...t}),uf=({...e})=>m.jsx(Gd,{"data-slot":"dropdown-menu-sub",...e}),df=({className:e,inset:t,children:n,...r})=>m.jsxs(Hd,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:te("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,m.jsx(Jd,{className:"ml-auto size-4"})]}),ff=({className:e,...t})=>m.jsx(Wd,{"data-slot":"dropdown-menu-sub-content",className:te("bg-popover text-popover-foreground 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 p-1 shadow-lg",e),...t}),ar=({label:e,onClick:t,isLast:n,dropdownItems:r,icon:o})=>r?.length?m.jsxs(di,{children:[m.jsx(fi,{asChild:!0,children:m.jsxs(Pe,{variant:"ghost",size:"sm",className:"p-1 gap-2",children:[o,e," ",m.jsx(Qd,{className:"size-4"})]})}),m.jsx(pi,{className:"bg-background text-foreground",children:r.map(s=>m.jsxs(mi,{className:"cursor-pointer gap-2",onClick:s.onClick,children:[s.icon,s.label]},`dropdown-${s.label}`))})]}):n?m.jsx(Pe,{variant:"ghost",size:"sm",className:"cursor-default hover:bg-transparent hover:text-muted-transparent p-1",asChild:!0,children:m.jsxs("div",{className:"flex items-center gap-2",children:[o,e]})}):m.jsxs(Pe,{onClick:t,variant:"ghost",size:"sm",className:"p-1 gap-2",children:[o,e]});ar.displayName="BreadcrumbItem";const gi=({className:e,items:t,...n})=>{const r=t.length-1;return m.jsx("div",{className:te("flex items-center",e),...n,children:t.map((o,s)=>m.jsxs(p.Fragment,{children:[s!==0&&m.jsx("span",{className:"mx-1.5 text-muted-foreground",children:"/"},`${o.label}-separator`),m.jsx(ar,{label:o.label,icon:o.icon,isLast:s===r,dropdownItems:o.dropdownItems},`${o.label}-item`)]},`${o.label}-fragment`))})};gi.displayName="Breadcrumb";const lr=A.forwardRef(({className:e,children:t,...n},r)=>m.jsx("div",{ref:r,className:te("border border-border text-foreground rounded-lg overflow-hidden flex flex-col h-full",e),...n,children:t}));lr.displayName="Container";const pf=gn("w-full bg-card flex min-h-10 items-center",{variants:{variant:{default:"px-5 py-2 items-center",tabs:"p-0"}},defaultVariants:{variant:"default"}}),cr=A.forwardRef(({className:e,variant:t,children:n,...r},o)=>m.jsx("div",{ref:o,className:te(pf({variant:t,className:e})),...r,children:n}));cr.displayName="ContainerHeader";const ur=A.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:te("flex-1 overflow-auto bg-default border-border border-t",e),...t}));ur.displayName="ContainerContent";const sn=A.createContext(null);sn.displayName="PanelGroupContext";const oe={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},dr=10,He=A.useLayoutEffect,hi=p.useId,mf=typeof hi=="function"?hi:()=>null;let gf=0;function fr(e=null){const t=mf(),n=A.useRef(e||t||null);return n.current===null&&(n.current=""+gf++),e??n.current}function vi({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:o,forwardedRef:s,id:i,maxSize:a,minSize:l,onCollapse:u,onExpand:d,onResize:c,order:f,style:g,tagName:v="div",...h}){const b=A.useContext(sn);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:E,getPanelSize:w,getPanelStyle:C,groupId:N,isPanelCollapsed:_,reevaluatePanelConstraints:S,registerPanel:P,resizePanel:H,unregisterPanel:W}=b,U=fr(i),B=A.useRef({callbacks:{onCollapse:u,onExpand:d,onResize:c},constraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:a,minSize:l},id:U,idIsFromProps:i!==void 0,order:f});A.useRef({didLogMissingDefaultSizeWarning:!1}),He(()=>{const{callbacks:G,constraints:V}=B.current,$={...V};B.current.id=U,B.current.idIsFromProps=i!==void 0,B.current.order=f,G.onCollapse=u,G.onExpand=d,G.onResize=c,V.collapsedSize=n,V.collapsible=r,V.defaultSize=o,V.maxSize=a,V.minSize=l,($.collapsedSize!==V.collapsedSize||$.collapsible!==V.collapsible||$.maxSize!==V.maxSize||$.minSize!==V.minSize)&&S(B.current,$)}),He(()=>{const G=B.current;return P(G),()=>{W(G)}},[f,U,P,W]),A.useImperativeHandle(s,()=>({collapse:()=>{x(B.current)},expand:G=>{E(B.current,G)},getId(){return U},getSize(){return w(B.current)},isCollapsed(){return _(B.current)},isExpanded(){return!_(B.current)},resize:G=>{H(B.current,G)}}),[x,E,w,_,U,H]);const Q=C(B.current,o);return A.createElement(v,{...h,children:e,className:t,id:U,style:{...Q,...g},[oe.groupId]:N,[oe.panel]:"",[oe.panelCollapsible]:r||void 0,[oe.panelId]:U,[oe.panelSize]:parseFloat(""+Q.flexGrow).toFixed(1)})}const bi=A.forwardRef((e,t)=>A.createElement(vi,{...e,forwardedRef:t}));vi.displayName="Panel",bi.displayName="forwardRef(Panel)";let pr=null,an=-1,je=null;function hf(e,t){if(t){const n=(t&ki)!==0,r=(t&Mi)!==0,o=(t&Ri)!==0,s=(t&Ai)!==0;if(n)return o?"se-resize":s?"ne-resize":"e-resize";if(r)return o?"sw-resize":s?"nw-resize":"w-resize";if(o)return"s-resize";if(s)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function vf(){je!==null&&(document.head.removeChild(je),pr=null,je=null,an=-1)}function mr(e,t){var n,r;const o=hf(e,t);if(pr!==o){if(pr=o,je===null&&(je=document.createElement("style"),document.head.appendChild(je)),an>=0){var s;(s=je.sheet)===null||s===void 0||s.removeRule(an)}an=(n=(r=je.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${o} !important;}`))!==null&&n!==void 0?n:-1}}function xi(e){return e.type==="keydown"}function yi(e){return e.type.startsWith("pointer")}function wi(e){return e.type.startsWith("mouse")}function ln(e){if(yi(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(wi(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function bf(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function xf(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function yf(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Ei(e),b:Ei(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;X(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:Si(Ci(n.a)),b:Si(Ci(n.b))};if(o.a===o.b){const s=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)};let a=s.length;for(;a--;){const l=s[a];if(l===i.a)return 1;if(l===i.b)return-1}}return Math.sign(o.a-o.b)}const wf=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Cf(e){var t;const n=getComputedStyle((t=Pi(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function Sf(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Cf(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||wf.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Ci(e){let t=e.length;for(;t--;){const n=e[t];if(X(n,"Missing node"),Sf(n))return n}return null}function Si(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Ei(e){const t=[];for(;e;)t.push(e),e=Pi(e);return t}function Pi(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const ki=1,Mi=2,Ri=4,Ai=8,Ef=bf()==="coarse";let be=[],it=!1,Le=new Map,cn=new Map;const Et=new Set;function Pf(e,t,n,r,o){var s;const{ownerDocument:i}=t,a={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:o},l=(s=Le.get(i))!==null&&s!==void 0?s:0;return Le.set(i,l+1),Et.add(a),un(),function(){var d;cn.delete(e),Et.delete(a);const c=(d=Le.get(i))!==null&&d!==void 0?d:1;if(Le.set(i,c-1),un(),c===1&&Le.delete(i),be.includes(a)){const f=be.indexOf(a);f>=0&&be.splice(f,1),xr(),o("up",!0,null)}}}function kf(e){const{target:t}=e,{x:n,y:r}=ln(e);it=!0,vr({target:t,x:n,y:r}),un(),be.length>0&&(dn("down",e),e.preventDefault(),Ni(t)||e.stopImmediatePropagation())}function gr(e){const{x:t,y:n}=ln(e);if(it&&e.buttons===0&&(it=!1,dn("up",e)),!it){const{target:r}=e;vr({target:r,x:t,y:n})}dn("move",e),xr(),be.length>0&&e.preventDefault()}function hr(e){const{target:t}=e,{x:n,y:r}=ln(e);cn.clear(),it=!1,be.length>0&&(e.preventDefault(),Ni(t)||e.stopImmediatePropagation()),dn("up",e),vr({target:t,x:n,y:r}),xr(),un()}function Ni(e){let t=e;for(;t;){if(t.hasAttribute(oe.resizeHandle))return!0;t=t.parentElement}return!1}function vr({target:e,x:t,y:n}){be.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),Et.forEach(o=>{const{element:s,hitAreaMargins:i}=o,a=s.getBoundingClientRect(),{bottom:l,left:u,right:d,top:c}=a,f=Ef?i.coarse:i.fine;if(t>=u-f&&t<=d+f&&n>=c-f&&n<=l+f){if(r!==null&&document.contains(r)&&s!==r&&!s.contains(r)&&!r.contains(s)&&yf(r,s)>0){let v=r,h=!1;for(;v&&!v.contains(s);){if(xf(v.getBoundingClientRect(),a)){h=!0;break}v=v.parentElement}if(h)return}be.push(o)}})}function br(e,t){cn.set(e,t)}function xr(){let e=!1,t=!1;be.forEach(r=>{const{direction:o}=r;o==="horizontal"?e=!0:t=!0});let n=0;cn.forEach(r=>{n|=r}),e&&t?mr("intersection",n):e?mr("horizontal",n):t?mr("vertical",n):vf()}let yr;function un(){var e;(e=yr)===null||e===void 0||e.abort(),yr=new AbortController;const t={capture:!0,signal:yr.signal};Et.size&&(it?(be.length>0&&Le.forEach((n,r)=>{const{body:o}=r;n>0&&(o.addEventListener("contextmenu",hr,t),o.addEventListener("pointerleave",gr,t),o.addEventListener("pointermove",gr,t))}),Le.forEach((n,r)=>{const{body:o}=r;o.addEventListener("pointerup",hr,t),o.addEventListener("pointercancel",hr,t)})):Le.forEach((n,r)=>{const{body:o}=r;n>0&&(o.addEventListener("pointerdown",kf,t),o.addEventListener("pointermove",gr,t))}))}function dn(e,t){Et.forEach(n=>{const{setResizeHandlerState:r}=n,o=be.includes(n);r(e,o,t)})}function Mf(){const[e,t]=A.useState(0);return A.useCallback(()=>t(n=>n+1),[])}function X(e,t){if(!e)throw console.error(t),Error(t)}function We(e,t,n=dr){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ae(e,t,n=dr){return We(e,t,n)===0}function me(e,t,n){return We(e,t,n)===0}function Rf(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const o=e[r],s=t[r];if(!me(o,s,n))return!1}return!0}function at({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];X(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:o=0,collapsible:s,maxSize:i=100,minSize:a=0}=r;if(We(n,a)<0)if(s){const l=(o+a)/2;We(n,l)<0?n=o:n=a}else n=a;return n=Math.min(i,n),n=parseFloat(n.toFixed(dr)),n}function Pt({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:s}){if(me(e,0))return t;const i=[...t],[a,l]=r;X(a!=null,"Invalid first pivot index"),X(l!=null,"Invalid second pivot index");let u=0;if(s==="keyboard"){{const c=e<0?l:a,f=n[c];X(f,`Panel constraints not found for index ${c}`);const{collapsedSize:g=0,collapsible:v,minSize:h=0}=f;if(v){const b=t[c];if(X(b!=null,`Previous layout not found for panel index ${c}`),me(b,g)){const x=h-b;We(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}{const c=e<0?a:l,f=n[c];X(f,`No panel constraints found for index ${c}`);const{collapsedSize:g=0,collapsible:v,minSize:h=0}=f;if(v){const b=t[c];if(X(b!=null,`Previous layout not found for panel index ${c}`),me(b,h)){const x=b-g;We(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}}{const c=e<0?1:-1;let f=e<0?l:a,g=0;for(;;){const h=t[f];X(h!=null,`Previous layout not found for panel index ${f}`);const x=at({panelConstraints:n,panelIndex:f,size:100})-h;if(g+=x,f+=c,f<0||f>=n.length)break}const v=Math.min(Math.abs(e),Math.abs(g));e=e<0?0-v:v}{let f=e<0?a:l;for(;f>=0&&f<n.length;){const g=Math.abs(e)-Math.abs(u),v=t[f];X(v!=null,`Previous layout not found for panel index ${f}`);const h=v-g,b=at({panelConstraints:n,panelIndex:f,size:h});if(!me(v,b)&&(u+=v-b,i[f]=b,u.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(Rf(o,i))return o;{const c=e<0?l:a,f=t[c];X(f!=null,`Previous layout not found for panel index ${c}`);const g=f+u,v=at({panelConstraints:n,panelIndex:c,size:g});if(i[c]=v,!me(v,g)){let h=g-v,x=e<0?l:a;for(;x>=0&&x<n.length;){const E=i[x];X(E!=null,`Previous layout not found for panel index ${x}`);const w=E+h,C=at({panelConstraints:n,panelIndex:x,size:w});if(me(E,C)||(h-=C-E,i[x]=C),me(h,0))break;e>0?x--:x++}}}const d=i.reduce((c,f)=>f+c,0);return me(d,100)?i:o}function Af({layout:e,panelsArray:t,pivotIndices:n}){let r=0,o=100,s=0,i=0;const a=n[0];X(a!=null,"No pivot index found"),t.forEach((c,f)=>{const{constraints:g}=c,{maxSize:v=100,minSize:h=0}=g;f===a?(r=h,o=v):(s+=h,i+=v)});const l=Math.min(o,100-s),u=Math.max(r,100-i),d=e[a];return{valueMax:l,valueMin:u,valueNow:d}}function kt(e,t=document){return Array.from(t.querySelectorAll(`[${oe.resizeHandleId}][data-panel-group-id="${e}"]`))}function _i(e,t,n=document){const o=kt(e,n).findIndex(s=>s.getAttribute(oe.resizeHandleId)===t);return o??null}function Ii(e,t,n){const r=_i(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function Nf(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function Ti(e,t=document){if(Nf(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function fn(e,t=document){const n=t.querySelector(`[${oe.resizeHandleId}="${e}"]`);return n||null}function _f(e,t,n,r=document){var o,s,i,a;const l=fn(t,r),u=kt(e,r),d=l?u.indexOf(l):-1,c=(o=(s=n[d])===null||s===void 0?void 0:s.id)!==null&&o!==void 0?o:null,f=(i=(a=n[d+1])===null||a===void 0?void 0:a.id)!==null&&i!==void 0?i:null;return[c,f]}function If({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:o,panelGroupElement:s,setLayout:i}){A.useRef({didWarnAboutMissingResizeHandle:!1}),He(()=>{if(!s)return;const a=kt(n,s);for(let l=0;l<o.length-1;l++){const{valueMax:u,valueMin:d,valueNow:c}=Af({layout:r,panelsArray:o,pivotIndices:[l,l+1]}),f=a[l];if(f!=null){const g=o[l];X(g,`No panel data found for index "${l}"`),f.setAttribute("aria-controls",g.id),f.setAttribute("aria-valuemax",""+Math.round(u)),f.setAttribute("aria-valuemin",""+Math.round(d)),f.setAttribute("aria-valuenow",c!=null?""+Math.round(c):"")}}return()=>{a.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,o,s]),A.useEffect(()=>{if(!s)return;const a=t.current;X(a,"Eager values not found");const{panelDataArray:l}=a,u=Ti(n,s);X(u!=null,`No group found for id "${n}"`);const d=kt(n,s);X(d,`No resize handles found for group id "${n}"`);const c=d.map(f=>{const g=f.getAttribute(oe.resizeHandleId);X(g,"Resize handle element has no handle id attribute");const[v,h]=_f(n,g,l,s);if(v==null||h==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const E=l.findIndex(w=>w.id===v);if(E>=0){const w=l[E];X(w,`No panel data found for index ${E}`);const C=r[E],{collapsedSize:N=0,collapsible:_,minSize:S=0}=w.constraints;if(C!=null&&_){const P=Pt({delta:me(C,N)?S-N:N-C,initialLayout:r,panelConstraints:l.map(H=>H.constraints),pivotIndices:Ii(n,g,s),prevLayout:r,trigger:"keyboard"});r!==P&&i(P)}}break}}};return f.addEventListener("keydown",b),()=>{f.removeEventListener("keydown",b)}});return()=>{c.forEach(f=>f())}},[s,e,t,n,r,o,i])}function Oi(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Di(e,t){const n=e==="horizontal",{x:r,y:o}=ln(t);return n?r:o}function Tf(e,t,n,r,o){const s=n==="horizontal",i=fn(t,o);X(i,`No resize handle element found for id "${t}"`);const a=i.getAttribute(oe.groupId);X(a,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const u=Di(n,e),d=Ti(a,o);X(d,`No group element found for id "${a}"`);const c=d.getBoundingClientRect(),f=s?c.width:c.height;return(u-l)/f*100}function Of(e,t,n,r,o,s){if(xi(e)){const i=n==="horizontal";let a=0;e.shiftKey?a=100:o!=null?a=o:a=10;let l=0;switch(e.key){case"ArrowDown":l=i?0:a;break;case"ArrowLeft":l=i?-a:0;break;case"ArrowRight":l=i?a:0;break;case"ArrowUp":l=i?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:Tf(e,t,n,r,s)}function Df({panelDataArray:e}){const t=Array(e.length),n=e.map(s=>s.constraints);let r=0,o=100;for(let s=0;s<e.length;s++){const i=n[s];X(i,`Panel constraints not found for index ${s}`);const{defaultSize:a}=i;a!=null&&(r++,t[s]=a,o-=a)}for(let s=0;s<e.length;s++){const i=n[s];X(i,`Panel constraints not found for index ${s}`);const{defaultSize:a}=i;if(a!=null)continue;const l=e.length-r,u=o/l;r++,t[s]=u,o-=u}return t}function lt(e,t,n){t.forEach((r,o)=>{const s=e[o];X(s,`Panel data not found for index ${o}`);const{callbacks:i,constraints:a,id:l}=s,{collapsedSize:u=0,collapsible:d}=a,c=n[l];if(c==null||r!==c){n[l]=r;const{onCollapse:f,onExpand:g,onResize:v}=i;v&&v(r,c),d&&(f||g)&&(g&&(c==null||Ae(c,u))&&!Ae(r,u)&&g(),f&&(c==null||!Ae(c,u))&&Ae(r,u)&&f())}})}function pn(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function zf({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:o,precision:s=3}){const i=n[o];let a;return i==null?a=e!=null?e.toPrecision(s):"1":r.length===1?a="1":a=i.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function jf(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function zi(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function ji(e){return`react-resizable-panels:${e}`}function Li(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:o,order:s}=t;return o?r:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function Fi(e,t){try{const n=ji(e),r=t.getItem(n);if(r){const o=JSON.parse(r);if(typeof o=="object"&&o!=null)return o}}catch{}return null}function Lf(e,t,n){var r,o;const s=(r=Fi(e,n))!==null&&r!==void 0?r:{},i=Li(t);return(o=s[i])!==null&&o!==void 0?o:null}function Ff(e,t,n,r,o){var s;const i=ji(e),a=Li(t),l=(s=Fi(e,o))!==null&&s!==void 0?s:{};l[a]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{o.setItem(i,JSON.stringify(l))}catch(u){console.error(u)}}function $i({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((s,i)=>s+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!me(r,100)&&n.length>0)for(let s=0;s<t.length;s++){const i=n[s];X(i!=null,`No layout data found for index ${s}`);const a=100/r*i;n[s]=a}let o=0;for(let s=0;s<t.length;s++){const i=n[s];X(i!=null,`No layout data found for index ${s}`);const a=at({panelConstraints:t,panelIndex:s,size:i});i!=a&&(o+=i-a,n[s]=a)}if(!me(o,0))for(let s=0;s<t.length;s++){const i=n[s];X(i!=null,`No layout data found for index ${s}`);const a=i+o,l=at({panelConstraints:t,panelIndex:s,size:a});if(i!==l&&(o-=l-i,n[s]=l,me(o,0)))break}return n}const $f=100,Mt={getItem:e=>(zi(Mt),Mt.getItem(e)),setItem:(e,t)=>{zi(Mt),Mt.setItem(e,t)}},Bi={};function Gi({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:o,id:s=null,onLayout:i=null,keyboardResizeBy:a=null,storage:l=Mt,style:u,tagName:d="div",...c}){const f=fr(s),g=A.useRef(null),[v,h]=A.useState(null),[b,x]=A.useState([]),E=Mf(),w=A.useRef({}),C=A.useRef(new Map),N=A.useRef(0),_=A.useRef({autoSaveId:e,direction:r,dragState:v,id:f,keyboardResizeBy:a,onLayout:i,storage:l}),S=A.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});A.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),A.useImperativeHandle(o,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:k}=S.current;return k},setLayout:k=>{const{onLayout:I}=_.current,{layout:j,panelDataArray:F}=S.current,M=$i({layout:k,panelConstraints:F.map(O=>O.constraints)});Oi(j,M)||(x(M),S.current.layout=M,I&&I(M),lt(F,M,w.current))}}),[]),He(()=>{_.current.autoSaveId=e,_.current.direction=r,_.current.dragState=v,_.current.id=f,_.current.onLayout=i,_.current.storage=l}),If({committedValuesRef:_,eagerValuesRef:S,groupId:f,layout:b,panelDataArray:S.current.panelDataArray,setLayout:x,panelGroupElement:g.current}),A.useEffect(()=>{const{panelDataArray:k}=S.current;if(e){if(b.length===0||b.length!==k.length)return;let I=Bi[e];I==null&&(I=jf(Ff,$f),Bi[e]=I);const j=[...k],F=new Map(C.current);I(e,j,F,b,l)}},[e,b,l]),A.useEffect(()=>{});const P=A.useCallback(k=>{const{onLayout:I}=_.current,{layout:j,panelDataArray:F}=S.current;if(k.constraints.collapsible){const M=F.map(ae=>ae.constraints),{collapsedSize:O=0,panelSize:Y,pivotIndices:ne}=Ve(F,k,j);if(X(Y!=null,`Panel size not found for panel "${k.id}"`),!Ae(Y,O)){C.current.set(k.id,Y);const le=ct(F,k)===F.length-1?Y-O:O-Y,re=Pt({delta:le,initialLayout:j,panelConstraints:M,pivotIndices:ne,prevLayout:j,trigger:"imperative-api"});pn(j,re)||(x(re),S.current.layout=re,I&&I(re),lt(F,re,w.current))}}},[]),H=A.useCallback((k,I)=>{const{onLayout:j}=_.current,{layout:F,panelDataArray:M}=S.current;if(k.constraints.collapsible){const O=M.map(xe=>xe.constraints),{collapsedSize:Y=0,panelSize:ne=0,minSize:ae=0,pivotIndices:le}=Ve(M,k,F),re=I??ae;if(Ae(ne,Y)){const xe=C.current.get(k.id),Rt=xe!=null&&xe>=re?xe:re,wr=ct(M,k)===M.length-1?ne-Rt:Rt-ne,de=Pt({delta:wr,initialLayout:F,panelConstraints:O,pivotIndices:le,prevLayout:F,trigger:"imperative-api"});pn(F,de)||(x(de),S.current.layout=de,j&&j(de),lt(M,de,w.current))}}},[]),W=A.useCallback(k=>{const{layout:I,panelDataArray:j}=S.current,{panelSize:F}=Ve(j,k,I);return X(F!=null,`Panel size not found for panel "${k.id}"`),F},[]),U=A.useCallback((k,I)=>{const{panelDataArray:j}=S.current,F=ct(j,k);return zf({defaultSize:I,dragState:v,layout:b,panelData:j,panelIndex:F})},[v,b]),B=A.useCallback(k=>{const{layout:I,panelDataArray:j}=S.current,{collapsedSize:F=0,collapsible:M,panelSize:O}=Ve(j,k,I);return X(O!=null,`Panel size not found for panel "${k.id}"`),M===!0&&Ae(O,F)},[]),Q=A.useCallback(k=>{const{layout:I,panelDataArray:j}=S.current,{collapsedSize:F=0,collapsible:M,panelSize:O}=Ve(j,k,I);return X(O!=null,`Panel size not found for panel "${k.id}"`),!M||We(O,F)>0},[]),G=A.useCallback(k=>{const{panelDataArray:I}=S.current;I.push(k),I.sort((j,F)=>{const M=j.order,O=F.order;return M==null&&O==null?0:M==null?-1:O==null?1:M-O}),S.current.panelDataArrayChanged=!0,E()},[E]);He(()=>{if(S.current.panelDataArrayChanged){S.current.panelDataArrayChanged=!1;const{autoSaveId:k,onLayout:I,storage:j}=_.current,{layout:F,panelDataArray:M}=S.current;let O=null;if(k){const ne=Lf(k,M,j);ne&&(C.current=new Map(Object.entries(ne.expandToSizes)),O=ne.layout)}O==null&&(O=Df({panelDataArray:M}));const Y=$i({layout:O,panelConstraints:M.map(ne=>ne.constraints)});Oi(F,Y)||(x(Y),S.current.layout=Y,I&&I(Y),lt(M,Y,w.current))}}),He(()=>{const k=S.current;return()=>{k.layout=[]}},[]);const V=A.useCallback(k=>{let I=!1;const j=g.current;return j&&window.getComputedStyle(j,null).getPropertyValue("direction")==="rtl"&&(I=!0),function(M){M.preventDefault();const O=g.current;if(!O)return()=>null;const{direction:Y,dragState:ne,id:ae,keyboardResizeBy:le,onLayout:re}=_.current,{layout:xe,panelDataArray:Rt}=S.current,{initialLayout:mn}=ne??{},wr=Ii(ae,k,O);let de=Of(M,k,Y,ne,le,O);const Yi=Y==="horizontal";Yi&&I&&(de=-de);const Uf=Rt.map(Kf=>Kf.constraints),At=Pt({delta:de,initialLayout:mn??xe,panelConstraints:Uf,pivotIndices:wr,prevLayout:xe,trigger:xi(M)?"keyboard":"mouse-or-touch"}),Xi=!pn(xe,At);(yi(M)||wi(M))&&N.current!=de&&(N.current=de,!Xi&&de!==0?Yi?br(k,de<0?ki:Mi):br(k,de<0?Ri:Ai):br(k,0)),Xi&&(x(At),S.current.layout=At,re&&re(At),lt(Rt,At,w.current))}},[]),$=A.useCallback((k,I)=>{const{onLayout:j}=_.current,{layout:F,panelDataArray:M}=S.current,O=M.map(xe=>xe.constraints),{panelSize:Y,pivotIndices:ne}=Ve(M,k,F);X(Y!=null,`Panel size not found for panel "${k.id}"`);const le=ct(M,k)===M.length-1?Y-I:I-Y,re=Pt({delta:le,initialLayout:F,panelConstraints:O,pivotIndices:ne,prevLayout:F,trigger:"imperative-api"});pn(F,re)||(x(re),S.current.layout=re,j&&j(re),lt(M,re,w.current))},[]),ee=A.useCallback((k,I)=>{const{layout:j,panelDataArray:F}=S.current,{collapsedSize:M=0,collapsible:O}=I,{collapsedSize:Y=0,collapsible:ne,maxSize:ae=100,minSize:le=0}=k.constraints,{panelSize:re}=Ve(F,k,j);re!=null&&(O&&ne&&Ae(re,M)?Ae(M,Y)||$(k,Y):re<le?$(k,le):re>ae&&$(k,ae))},[$]),R=A.useCallback((k,I)=>{const{direction:j}=_.current,{layout:F}=S.current;if(!g.current)return;const M=fn(k,g.current);X(M,`Drag handle element not found for id "${k}"`);const O=Di(j,I);h({dragHandleId:k,dragHandleRect:M.getBoundingClientRect(),initialCursorPosition:O,initialLayout:F})},[]),T=A.useCallback(()=>{h(null)},[]),y=A.useCallback(k=>{const{panelDataArray:I}=S.current,j=ct(I,k);j>=0&&(I.splice(j,1),delete w.current[k.id],S.current.panelDataArrayChanged=!0,E())},[E]),L=A.useMemo(()=>({collapsePanel:P,direction:r,dragState:v,expandPanel:H,getPanelSize:W,getPanelStyle:U,groupId:f,isPanelCollapsed:B,isPanelExpanded:Q,reevaluatePanelConstraints:ee,registerPanel:G,registerResizeHandle:V,resizePanel:$,startDragging:R,stopDragging:T,unregisterPanel:y,panelGroupElement:g.current}),[P,v,r,H,W,U,f,B,Q,ee,G,V,$,R,T,y]),K={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return A.createElement(sn.Provider,{value:L},A.createElement(d,{...c,children:t,className:n,id:s,ref:g,style:{...K,...u},[oe.group]:"",[oe.groupDirection]:r,[oe.groupId]:f}))}const Hi=A.forwardRef((e,t)=>A.createElement(Gi,{...e,forwardedRef:t}));Gi.displayName="PanelGroup",Hi.displayName="forwardRef(PanelGroup)";function ct(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Ve(e,t,n){const r=ct(e,t),s=r===e.length-1?[r-1,r]:[r,r+1],i=n[r];return{...t.constraints,panelSize:i,pivotIndices:s}}function Bf({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){A.useEffect(()=>{if(e||n==null||r==null)return;const o=fn(t,r);if(o==null)return;const s=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),n(i);break}case"F6":{i.preventDefault();const a=o.getAttribute(oe.groupId);X(a,`No group element found for id "${a}"`);const l=kt(a,r),u=_i(a,t,r);X(u!==null,`No resize element found for id "${t}"`);const d=i.shiftKey?u>0?u-1:l.length-1:u+1<l.length?u+1:0;l[d].focus();break}}};return o.addEventListener("keydown",s),()=>{o.removeEventListener("keydown",s)}},[r,e,t,n])}function Wi({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:o,onBlur:s,onClick:i,onDragging:a,onFocus:l,onPointerDown:u,onPointerUp:d,style:c={},tabIndex:f=0,tagName:g="div",...v}){var h,b;const x=A.useRef(null),E=A.useRef({onClick:i,onDragging:a,onPointerDown:u,onPointerUp:d});A.useEffect(()=>{E.current.onClick=i,E.current.onDragging=a,E.current.onPointerDown=u,E.current.onPointerUp=d});const w=A.useContext(sn);if(w===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:C,groupId:N,registerResizeHandle:_,startDragging:S,stopDragging:P,panelGroupElement:H}=w,W=fr(o),[U,B]=A.useState("inactive"),[Q,G]=A.useState(!1),[V,$]=A.useState(null),ee=A.useRef({state:U});He(()=>{ee.current.state=U}),A.useEffect(()=>{if(n)$(null);else{const L=_(W);$(()=>L)}},[n,W,_]);const R=(h=r?.coarse)!==null&&h!==void 0?h:15,T=(b=r?.fine)!==null&&b!==void 0?b:5;A.useEffect(()=>{if(n||V==null)return;const L=x.current;X(L,"Element ref not attached");let K=!1;return Pf(W,L,C,{coarse:R,fine:T},(I,j,F)=>{if(!j){B("inactive");return}switch(I){case"down":{B("drag"),K=!1,X(F,'Expected event to be defined for "down" action'),S(W,F);const{onDragging:M,onPointerDown:O}=E.current;M?.(!0),O?.();break}case"move":{const{state:M}=ee.current;K=!0,M!=="drag"&&B("hover"),X(F,'Expected event to be defined for "move" action'),V(F);break}case"up":{B("hover"),P();const{onClick:M,onDragging:O,onPointerUp:Y}=E.current;O?.(!1),Y?.(),K||M?.();break}}})},[R,C,n,T,_,W,V,S,P]),Bf({disabled:n,handleId:W,resizeHandler:V,panelGroupElement:H});const y={touchAction:"none",userSelect:"none"};return A.createElement(g,{...v,children:e,className:t,id:o,onBlur:()=>{G(!1),s?.()},onFocus:()=>{G(!0),l?.()},ref:x,role:"separator",style:{...y,...c},tabIndex:f,[oe.groupDirection]:C,[oe.groupId]:N,[oe.resizeHandle]:"",[oe.resizeHandleActive]:U==="drag"?"pointer":Q?"keyboard":void 0,[oe.resizeHandleEnabled]:!n,[oe.resizeHandleId]:W,[oe.resizeHandleState]:U})}Wi.displayName="PanelResizeHandle";const Gf=({header:e,isCollapsed:t,onToggle:n,variant:r="default"})=>m.jsxs(cr,{variant:r,children:[e,m.jsx("div",{className:"flex-1"}),n&&m.jsx(Pe,{variant:"default",onClick:n,"aria-label":t?"Expand panel":"Collapse panel",className:te("h-8 px-3 [&_svg]:size-5",{"mr-5":r==="tabs"}),children:m.jsx(Zd,{className:te("transition-transform",{"-rotate-180":!t})})})]}),Hf=()=>m.jsx("div",{className:"relative",children:m.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:m.jsx(Wi,{className:"group relative",children:m.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-background border border-border",children:m.jsx(tf,{className:"h-4 w-4 text-muted-foreground"})})})})}),Wf=({id:e,header:t,children:n,withResizeHandle:r,className:o,variant:s,defaultTab:i,onTabChange:a})=>{const[l,u]=A.useState(!1),d=A.useRef(null),c=A.useCallback(()=>{const h=d.current;if(h)try{h.isCollapsed()?h.expand():h.collapse()}catch(b){console.warn("Failed to toggle panel:",b)}},[]),f=A.useCallback(()=>u(!0),[]),g=A.useCallback(()=>u(!1),[]),v=A.useMemo(()=>{const h=m.jsxs(lr,{className:"h-full",children:[m.jsx(Gf,{header:t,isCollapsed:l,variant:s,onToggle:c}),m.jsx(ur,{children:n})]});return s=="tabs"?m.jsx(Lt,{className:"h-full",defaultValue:i,onValueChange:a,children:h}):h},[s,l,t,n,i,c,a]);return m.jsxs(m.Fragment,{children:[m.jsx(bi,{id:e,collapsible:!0,ref:d,className:te("min-h-[42px]",o),onCollapse:f,onExpand:g,children:v}),r&&m.jsx(Hf,{})]})},Vf=({children:e,...t})=>{const[n,r]=A.useState(0);return m.jsx(Hi,{onLayout:o=>{r(o.length)},...t,children:A.Children.map(e,(o,s)=>{if(A.isValidElement(o)){const i=n-1===s,a=n>1;return A.cloneElement(o,{withResizeHandle:a&&!i})}return o})})},Vi=({title:e,subtitle:t,actions:n,className:r,children:o,onClose:s})=>m.jsx("div",{className:te("bg-muted-foreground/5 text-foreground border-l border-border overflow-hidden w-1/3",r),children:m.jsxs("div",{className:"flex flex-col size-full",children:[m.jsx("div",{className:"relative shrink-0 w-full border-b border-border",children:m.jsxs("div",{className:"flex flex-col gap-0 p-4",children:[m.jsxs("div",{className:"flex items-center justify-between w-full",children:[m.jsx("div",{className:"text-lg font-semibold text-foreground tracking-[-0.25px] leading-tight",children:e}),m.jsxs("div",{className:"flex items-center gap-1",children:[n?.map((i,a)=>m.jsx(Pe,{onClick:i.onClick,variant:"ghost",size:"icon","aria-label":i.label,children:i.icon},a)),m.jsx(Pe,{onClick:s,variant:"ghost",size:"icon","aria-label":"Close",children:m.jsx(nf,{className:"w-4 h-4 text-muted-foreground"})})]})]}),t&&m.jsx("div",{className:"text-md font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:t})]})}),m.jsx("div",{className:"flex-1 overflow-auto",children:m.jsx("div",{className:"flex flex-col gap-2 p-4",children:o})})]})});Vi.displayName="SidePanel";const Ui=({children:e})=>m.jsx("table",{className:"w-full",children:e}),Ki=({title:e,children:t})=>m.jsxs("tr",{children:[m.jsx("td",{className:"text-md min-w-[100px] font-medium",children:e}),m.jsx("td",{className:"py-2 text-muted-foreground font-medium",children:t})]});Ui.displayName="SidePanelDetail",Ki.displayName="SidePanelDetailItem",q.Breadcrumb=gi,q.BreadcrumbItem=ar,q.Button=Pe,q.CollapsiblePanel=Wf,q.CollapsiblePanelGroup=Vf,q.Container=lr,q.ContainerContent=ur,q.ContainerHeader=cr,q.DropdownMenu=di,q.DropdownMenuCheckboxItem=of,q.DropdownMenuContent=pi,q.DropdownMenuGroup=rf,q.DropdownMenuItem=mi,q.DropdownMenuLabel=lf,q.DropdownMenuRadioGroup=sf,q.DropdownMenuRadioItem=af,q.DropdownMenuSeparator=cf,q.DropdownMenuSub=uf,q.DropdownMenuSubContent=ff,q.DropdownMenuSubTrigger=df,q.DropdownMenuTrigger=fi,q.Input=Yr,q.Panel=go,q.SidePanel=Vi,q.SidePanelDetail=Ui,q.SidePanelDetailItem=Ki,q.Tabs=Lt,q.TabsContent=Rn,q.TabsList=kn,q.TabsTrigger=Mn,q.Textarea=Kr,q.cn=te,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});
|