@vectorize-io/hindsight-control-plane 0.1.12 → 0.1.13
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/package.json +1 -1
- package/standalone/.next/BUILD_ID +1 -1
- package/standalone/.next/build-manifest.json +2 -2
- package/standalone/.next/prerender-manifest.json +3 -3
- package/standalone/.next/server/app/_global-error.html +2 -2
- package/standalone/.next/server/app/_global-error.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.html +1 -1
- package/standalone/.next/server/app/_not-found.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/banks/[bankId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/dashboard.html +1 -1
- package/standalone/.next/server/app/dashboard.rsc +2 -2
- package/standalone/.next/server/app/dashboard.segments/_full.segment.rsc +2 -2
- package/standalone/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/dashboard.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/dashboard.segments/dashboard/__PAGE__.segment.rsc +2 -2
- package/standalone/.next/server/app/dashboard.segments/dashboard.segment.rsc +1 -1
- package/standalone/.next/server/app/index.html +1 -1
- package/standalone/.next/server/app/index.rsc +1 -1
- package/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/chunks/ssr/_5e906836._.js +1 -1
- package/standalone/.next/server/pages/404.html +1 -1
- package/standalone/.next/server/pages/500.html +2 -2
- package/standalone/.next/server/server-reference-manifest.js +1 -1
- package/standalone/.next/server/server-reference-manifest.json +1 -1
- package/standalone/.next/static/chunks/{066a685143de5f7e.js → aab765b99de6028e.js} +1 -1
- package/standalone/package.json +1 -1
- /package/standalone/.next/static/{HBb4Bmt5yCAxM0eUoT0bj → ZnG2ehiB5-BSYmAFEiFyG}/_buildManifest.js +0 -0
- /package/standalone/.next/static/{HBb4Bmt5yCAxM0eUoT0bj → ZnG2ehiB5-BSYmAFEiFyG}/_clientMiddlewareManifest.json +0 -0
- /package/standalone/.next/static/{HBb4Bmt5yCAxM0eUoT0bj → ZnG2ehiB5-BSYmAFEiFyG}/_ssgManifest.js +0 -0
|
@@ -4,4 +4,4 @@ Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpattern
|
|
|
4
4
|
|
|
5
5
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
6
6
|
|
|
7
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},rM=({contentRef:e,descriptionId:t})=>{let r=r_("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return v.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},rI='[cmdk-group=""]',rz='[cmdk-group-items=""]',rT='[cmdk-item=""]',rL=`${rT}:not([aria-disabled="true"])`,rF="cmdk-item-select",r$="data-value",rW=(e,t,r)=>{var n;return n=e,function e(t,r,n,o,a,i,l){if(i===r.length)return a===t.length?1:.99;var s=`${a},${i}`;if(void 0!==l[s])return l[s];for(var c,d,u,f,p=o.charAt(i),m=n.indexOf(p,a),h=0;m>=0;)(c=e(t,r,n,o,m+1,i+1,l))>h&&(m===a?c*=1:eV.test(t.charAt(m-1))?(c*=.8,(u=t.slice(a,m-1).match(eH))&&a>0&&(c*=Math.pow(.999,u.length))):eU.test(t.charAt(m-1))?(c*=.9,(f=t.slice(a,m-1).match(eG))&&a>0&&(c*=Math.pow(.999,f.length))):(c*=.17,a>0&&(c*=Math.pow(.999,m-a))),t.charAt(m)!==r.charAt(i)&&(c*=.9999)),(c<.1&&n.charAt(m-1)===o.charAt(i+1)||o.charAt(i+1)===o.charAt(i)&&n.charAt(m-1)!==o.charAt(i))&&.1*(d=e(t,r,n,o,m+1,i+2,l))>c&&(c=.1*d),c>h&&(h=c),m=n.indexOf(p,m+1);return l[s]=h,h}(n=r&&r.length>0?`${n+" "+r.join(" ")}`:n,t,eq(n),eq(t),0,0,{})},rB=v.createContext(void 0),rV=v.createContext(void 0),rH=v.createContext(void 0),rU=v.forwardRef((e,t)=>{let r=r1(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=r1(()=>new Set),o=r1(()=>new Map),a=r1(()=>new Map),i=r1(()=>new Set),l=rQ(e),{label:s,children:c,value:d,onValueChange:u,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,...b}=e,y=e0(),x=e0(),w=e0(),k=v.useRef(null),E=r4();r0(()=>{if(void 0!==d){let e=d.trim();r.current.value=e,j.emit()}},[d]),r0(()=>{E(6,P)},[]);let j=v.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var o,a,i,s;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)O(),N(),E(1,S);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(o=document.getElementById(y))||o.focus()}if(E(7,()=>{var e;r.current.selectedItemId=null==(e=A())?void 0:e.id,j.emit()}),n||E(5,P),(null==(a=l.current)?void 0:a.value)!==void 0){null==(s=(i=l.current).onValueChange)||s.call(i,null!=t?t:"");return}}j.emit()}},emit:()=>{i.current.forEach(e=>e())}}),[]),C=v.useMemo(()=>({value:(e,t,n)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,R(t,n)),E(2,()=>{N(),j.emit()}))},item:(e,t)=>(n.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),E(3,()=>{O(),N(),r.current.value||S(),j.emit()}),()=>{a.current.delete(e),n.current.delete(e),r.current.filtered.items.delete(e);let t=A();E(4,()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&S(),j.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:s||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:y,inputId:w,labelId:x,listInnerRef:k}),[]);function R(e,t){var n,o;let a=null!=(o=null==(n=l.current)?void 0:n.filter)?o:rW;return e?a(e,r.current.search,t):0}function N(){if(!r.current.search||!1===l.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(r=>{let n=o.current.get(r),a=0;n.forEach(t=>{a=Math.max(e.get(t),a)}),t.push([r,a])});let n=k.current;_().sort((t,r)=>{var n,o;let a=t.getAttribute("id"),i=r.getAttribute("id");return(null!=(n=e.get(i))?n:0)-(null!=(o=e.get(a))?o:0)}).forEach(e=>{let t=e.closest(rz);t?t.appendChild(e.parentElement===t?e:e.closest(`${rz} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${rz} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=k.current)?void 0:t.querySelector(`${rI}[${r$}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)})}function S(){let e=_().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(r$);j.setState("value",t||void 0)}function O(){var e,t,i,s;if(!r.current.search||!1===l.current.shouldFilter){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let c=0;for(let o of n.current){let n=R(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(s=null==(i=a.current.get(o))?void 0:i.keywords)?s:[]);r.current.filtered.items.set(o,n),n>0&&c++}for(let[e,t]of o.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=c}function P(){var e,t,r;let n=A();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(rI))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function A(){var e;return null==(e=k.current)?void 0:e.querySelector(`${rT}[aria-selected="true"]`)}function _(){var e;return Array.from((null==(e=k.current)?void 0:e.querySelectorAll(rL))||[])}function D(e){let t=_()[e];t&&j.setState("value",t.getAttribute(r$))}function M(e){var t;let r=A(),n=_(),o=n.findIndex(e=>e===r),a=n[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?n[n.length-1]:o+e===n.length?n[0]:n[o+e]),a&&j.setState("value",a.getAttribute(r$))}function I(e){let t=A(),r=null==t?void 0:t.closest(rI),n;for(;r&&!n;)n=null==(r=e>0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,rI):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,rI))?void 0:r.querySelector(rL);n?j.setState("value",n.getAttribute(r$)):M(e)}let z=()=>D(_().length-1),T=e=>{e.preventDefault(),e.metaKey?z():e.altKey?I(1):M(1)},L=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?I(-1):M(-1)};return v.createElement(e8.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=b.onKeyDown)||t.call(b,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":g&&e.ctrlKey&&T(e);break;case"ArrowDown":T(e);break;case"p":case"k":g&&e.ctrlKey&&L(e);break;case"ArrowUp":L(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),z();break;case"Enter":{e.preventDefault();let t=A();if(t){let e=new Event(rF);t.dispatchEvent(e)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:r8},s),r3(e,e=>v.createElement(rV.Provider,{value:j},v.createElement(rB.Provider,{value:C},e))))}),rG=v.forwardRef((e,t)=>{var r,n;let o=e0(),a=v.useRef(null),i=v.useContext(rH),l=v.useContext(rB),s=rQ(e),c=null!=(n=null==(r=s.current)?void 0:r.forceMount)?n:null==i?void 0:i.forceMount;r0(()=>{if(!c)return l.item(o,null==i?void 0:i.id)},[c]);let d=r5(o,a,[e.value,e.children,a],e.keywords),u=v.useContext(rV),f=r2(e=>e.value&&e.value===d.current),p=r2(e=>!!c||!1===l.filter()||!e.search||e.filtered.items.get(o)>0);function m(){var e,t;h(),null==(t=(e=s.current).onSelect)||t.call(e,d.current)}function h(){u.setState("value",d.current,!0)}if(v.useEffect(()=>{let t=a.current;if(!(!t||e.disabled))return t.addEventListener(rF,m),()=>t.removeEventListener(rF,m)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:g,value:b,onSelect:y,forceMount:x,keywords:w,...E}=e;return v.createElement(e8.div,{ref:k(a,t),...E,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||l.getDisablePointerSelection()?void 0:h,onClick:g?void 0:m},e.children)}),rq=v.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=e0(),l=v.useRef(null),s=v.useRef(null),c=e0(),d=v.useContext(rB),u=r2(e=>!!o||!1===d.filter()||!e.search||e.filtered.groups.has(i));r0(()=>d.group(i),[]),r5(i,l,[e.value,e.heading,s]);let f=v.useMemo(()=>({id:i,forceMount:o}),[o]);return v.createElement(e8.div,{ref:k(l,t),...a,"cmdk-group":"",role:"presentation",hidden:!u||void 0},r&&v.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),r3(e,e=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},v.createElement(rH.Provider,{value:f},e))))}),rK=v.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=v.useRef(null),a=r2(e=>!e.search);return r||a?v.createElement(e8.div,{ref:k(o,t),...n,"cmdk-separator":"",role:"separator"}):null}),rX=v.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=null!=e.value,a=v.useContext(rV),i=r2(e=>e.search),l=r2(e=>e.selectedItemId),s=v.useContext(rB);return v.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),v.createElement(e8.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":l,id:s.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==r||r(e.target.value)}})}),rY=v.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=v.useRef(null),i=v.useRef(null),l=r2(e=>e.selectedItemId),s=v.useContext(rB);return v.useEffect(()=>{if(i.current&&a.current){let e=i.current,t=a.current,r,n=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return n.observe(e),()=>{cancelAnimationFrame(r),n.unobserve(e)}}},[]),v.createElement(e8.div,{ref:k(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:s.listId},r3(e,e=>v.createElement("div",{ref:k(i,s.listInnerRef),"cmdk-list-sizer":""},e)))}),rZ=v.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...l}=e;return v.createElement(rs,{open:r,onOpenChange:n},v.createElement(rp,{container:i},v.createElement(rh,{"cmdk-overlay":"",className:o}),v.createElement(ry,{"aria-label":e.label,"cmdk-dialog":"",className:a},v.createElement(rU,{ref:t,...l}))))}),rJ=Object.assign(rU,{List:rY,Item:rG,Input:rX,Group:rq,Separator:rK,Dialog:rZ,Empty:v.forwardRef((e,t)=>r2(e=>0===e.filtered.count)?v.createElement(e8.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:v.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return v.createElement(e8.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},r3(e,e=>v.createElement("div",{"aria-hidden":!0},e)))})});function rQ(e){let t=v.useRef(e);return r0(()=>{t.current=e}),t}var r0="undefined"==typeof window?v.useEffect:v.useLayoutEffect;function r1(e){let t=v.useRef();return void 0===t.current&&(t.current=e()),t}function r2(e){let t=v.useContext(rV),r=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,r,r)}function r5(e,t,r,n=[]){let o=v.useRef(),a=v.useContext(rB);return r0(()=>{var i;let l=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),s=n.map(e=>e.trim());a.value(e,l,s),null==(i=t.current)||i.setAttribute(r$,l),o.current=l}),o}var r4=()=>{let[e,t]=v.useState(),r=r1(()=>new Map);return r0(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}};function r3({asChild:e,children:t},r){let n;return e&&v.isValidElement(t)?v.cloneElement("function"==typeof(n=t.type)?n(t.props):"render"in n?n.render(t.props):t,{ref:t.ref},r(t.props.children)):r(t)}var r8={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};let r6=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},r9=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var r7={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"};let ne=(0,v.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},s)=>(0,v.createElement)("svg",{ref:s,...r7,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:r9("lucide",o),...!a&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(a)?a:[a]])),nt=(e,t)=>{let r=(0,v.forwardRef)(({className:r,...n},o)=>(0,v.createElement)(ne,{ref:o,iconNode:t,className:r9(`lucide-${r6(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...n}));return r.displayName=r6(e),r};e.s(["default",()=>nt],75254);let nr=nt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>nr],55436);let nn=nt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>nn],37727);let no=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rh,{ref:r,className:e$("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));no.displayName=rh.displayName;let na=v.forwardRef(({className:e,children:t,...r},n)=>(0,g.jsxs)(rp,{children:[(0,g.jsx)(no,{}),(0,g.jsxs)(ry,{ref:n,className:e$("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,(0,g.jsxs)(rS,{className:"absolute right-4 top-4 rounded-sm ring-offset-background transition-opacity hover:opacity-80 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-foreground",children:[(0,g.jsx)(nn,{className:"h-4 w-4"}),(0,g.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));na.displayName=ry.displayName;let ni=({className:e,...t})=>(0,g.jsx)("div",{className:e$("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ni.displayName="DialogHeader";let nl=({className:e,...t})=>(0,g.jsx)("div",{className:e$("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});nl.displayName="DialogFooter";let ns=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rj,{ref:r,className:e$("text-lg font-semibold leading-none tracking-tight text-foreground",e),...t}));ns.displayName=rj.displayName;let nc=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rR,{ref:r,className:e$("text-sm text-muted-foreground",e),...t}));nc.displayName=rR.displayName,e.s(["Dialog",()=>rs,"DialogContent",()=>na,"DialogDescription",()=>nc,"DialogFooter",()=>nl,"DialogHeader",()=>ni,"DialogTitle",()=>ns],76223);let nd=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rJ,{ref:r,className:e$("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));nd.displayName=rJ.displayName;let nu=v.forwardRef(({className:e,...t},r)=>(0,g.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,g.jsx)(nr,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,g.jsx)(rJ.Input,{ref:r,className:e$("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));nu.displayName=rJ.Input.displayName;let nf=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rJ.List,{ref:r,className:e$("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));nf.displayName=rJ.List.displayName;let np=v.forwardRef((e,t)=>(0,g.jsx)(rJ.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));np.displayName=rJ.Empty.displayName;let nm=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rJ.Group,{ref:r,className:e$("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));nm.displayName=rJ.Group.displayName,v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rJ.Separator,{ref:r,className:e$("-mx-1 h-px bg-border",e),...t})).displayName=rJ.Separator.displayName;let nh=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rJ.Item,{ref:r,className:e$("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));nh.displayName=rJ.Item.displayName;let ng=["top","right","bottom","left"],nv=Math.min,nb=Math.max,ny=Math.round,nx=Math.floor,nw=e=>({x:e,y:e}),nk={left:"right",right:"left",bottom:"top",top:"bottom"},nE={start:"end",end:"start"};function nj(e,t){return"function"==typeof e?e(t):e}function nC(e){return e.split("-")[0]}function nR(e){return e.split("-")[1]}function nN(e){return"x"===e?"y":"x"}function nS(e){return"y"===e?"height":"width"}let nO=new Set(["top","bottom"]);function nP(e){return nO.has(nC(e))?"y":"x"}function nA(e){return e.replace(/start|end/g,e=>nE[e])}let n_=["left","right"],nD=["right","left"],nM=["top","bottom"],nI=["bottom","top"];function nz(e){return e.replace(/left|right|bottom|top/g,e=>nk[e])}function nT(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function nL(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function nF(e,t,r){let n,{reference:o,floating:a}=e,i=nP(t),l=nN(nP(t)),s=nS(l),c=nC(t),d="y"===i,u=o.x+o.width/2-a.width/2,f=o.y+o.height/2-a.height/2,p=o[s]/2-a[s]/2;switch(c){case"top":n={x:u,y:o.y-a.height};break;case"bottom":n={x:u,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:f};break;case"left":n={x:o.x-a.width,y:f};break;default:n={x:o.x,y:o.y}}switch(nR(t)){case"start":n[l]-=p*(r&&d?-1:1);break;case"end":n[l]+=p*(r&&d?-1:1)}return n}let n$=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),s=await (null==i.isRTL?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=nF(c,n,s),f=n,p={},m=0;for(let r=0;r<l.length;r++){let{name:a,fn:h}=l[r],{x:g,y:v,data:b,reset:y}=await h({x:d,y:u,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=v?v:u,p={...p,[a]:{...p[a],...b}},y&&m<=50&&(m++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(c=!0===y.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):y.rects),{x:d,y:u}=nF(c,f,s)),r=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:p}};async function nW(e,t){var r;void 0===t&&(t={});let{x:n,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=nj(t,e),m=nT(p),h=l[f?"floating"===u?"reference":"floating":u],g=nL(await a.getClippingRect({element:null==(r=await (null==a.isElement?void 0:a.isElement(h)))||r?h:h.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),v="floating"===u?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await (null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),y=await (null==a.isElement?void 0:a.isElement(b))&&await (null==a.getScale?void 0:a.getScale(b))||{x:1,y:1},x=nL(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:b,strategy:s}):v);return{top:(g.top-x.top+m.top)/y.y,bottom:(x.bottom-g.bottom+m.bottom)/y.y,left:(g.left-x.left+m.left)/y.x,right:(x.right-g.right+m.right)/y.x}}function nB(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nV(e){return ng.some(t=>e[t]>=0)}let nH=new Set(["left","top"]);async function nU(e,t){let{placement:r,platform:n,elements:o}=e,a=await (null==n.isRTL?void 0:n.isRTL(o.floating)),i=nC(r),l=nR(r),s="y"===nP(r),c=nH.has(i)?-1:1,d=a&&s?-1:1,u=nj(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*d,y:f*c}:{x:f*c,y:p*d}}function nG(){return"undefined"!=typeof window}function nq(e){return nY(e)?(e.nodeName||"").toLowerCase():"#document"}function nK(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function nX(e){var t;return null==(t=(nY(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function nY(e){return!!nG()&&(e instanceof Node||e instanceof nK(e).Node)}function nZ(e){return!!nG()&&(e instanceof Element||e instanceof nK(e).Element)}function nJ(e){return!!nG()&&(e instanceof HTMLElement||e instanceof nK(e).HTMLElement)}function nQ(e){return!!nG()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof nK(e).ShadowRoot)}let n0=new Set(["inline","contents"]);function n1(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=or(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!n0.has(o)}let n2=new Set(["table","td","th"]),n5=[":popover-open",":modal"];function n4(e){return n5.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let n3=["transform","translate","scale","rotate","perspective"],n8=["transform","translate","scale","rotate","perspective","filter"],n6=["paint","layout","strict","content"];function n9(e){let t=n7(),r=nZ(e)?or(e):e;return n3.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||n8.some(e=>(r.willChange||"").includes(e))||n6.some(e=>(r.contain||"").includes(e))}function n7(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let oe=new Set(["html","body","#document"]);function ot(e){return oe.has(nq(e))}function or(e){return nK(e).getComputedStyle(e)}function on(e){return nZ(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oo(e){if("html"===nq(e))return e;let t=e.assignedSlot||e.parentNode||nQ(e)&&e.host||nX(e);return nQ(t)?t.host:t}function oa(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let o=function e(t){let r=oo(t);return ot(r)?t.ownerDocument?t.ownerDocument.body:t.body:nJ(r)&&n1(r)?r:e(r)}(e),a=o===(null==(n=e.ownerDocument)?void 0:n.body),i=nK(o);if(a){let e=oi(i);return t.concat(i,i.visualViewport||[],n1(o)?o:[],e&&r?oa(e):[])}return t.concat(o,oa(o,[],r))}function oi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ol(e){let t=or(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=nJ(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=ny(r)!==a||ny(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function os(e){return nZ(e)?e:e.contextElement}function oc(e){let t=os(e);if(!nJ(t))return nw(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:a}=ol(t),i=(a?ny(r.width):r.width)/n,l=(a?ny(r.height):r.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}let od=nw(0);function ou(e){let t=nK(e);return n7()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:od}function of(e,t,r,n){var o;void 0===t&&(t=!1),void 0===r&&(r=!1);let a=e.getBoundingClientRect(),i=os(e),l=nw(1);t&&(n?nZ(n)&&(l=oc(n)):l=oc(e));let s=(void 0===(o=r)&&(o=!1),n&&(!o||n===nK(i))&&o)?ou(i):nw(0),c=(a.left+s.x)/l.x,d=(a.top+s.y)/l.y,u=a.width/l.x,f=a.height/l.y;if(i){let e=nK(i),t=n&&nZ(n)?nK(n):n,r=e,o=oi(r);for(;o&&n&&t!==r;){let e=oc(o),t=o.getBoundingClientRect(),n=or(o),a=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,d*=e.y,u*=e.x,f*=e.y,c+=a,d+=i,o=oi(r=nK(o))}}return nL({width:u,height:f,x:c,y:d})}function op(e,t){let r=on(e).scrollLeft;return t?t.left+r:of(nX(e)).left+r}function om(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-op(e,r),y:r.top+t.scrollTop}}let oh=new Set(["absolute","fixed"]);function og(e,t,r){var n;let o;if("viewport"===t)o=function(e,t){let r=nK(e),n=nX(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;let e=n7();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}let c=op(n);if(c<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,i=Math.abs(n.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:l,y:s}}(e,r);else if("document"===t){let t,r,a,i,l,s,c;n=nX(e),t=nX(n),r=on(n),a=n.ownerDocument.body,i=nb(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=nb(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),s=-r.scrollLeft+op(n),c=-r.scrollTop,"rtl"===or(a).direction&&(s+=nb(t.clientWidth,a.clientWidth)-i),o={width:i,height:l,x:s,y:c}}else if(nZ(t)){let e,n,a,i,l,s;n=(e=of(t,!0,"fixed"===r)).top+t.clientTop,a=e.left+t.clientLeft,i=nJ(t)?oc(t):nw(1),l=t.clientWidth*i.x,s=t.clientHeight*i.y,o={width:l,height:s,x:a*i.x,y:n*i.y}}else{let r=ou(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return nL(o)}function ov(e){return"static"===or(e).position}function ob(e,t){if(!nJ(e)||"fixed"===or(e).position)return null;if(t)return t(e);let r=e.offsetParent;return nX(e)===r&&(r=r.ownerDocument.body),r}function oy(e,t){var r;let n=nK(e);if(n4(e))return n;if(!nJ(e)){let t=oo(e);for(;t&&!ot(t);){if(nZ(t)&&!ov(t))return t;t=oo(t)}return n}let o=ob(e,t);for(;o&&(r=o,n2.has(nq(r)))&&ov(o);)o=ob(o,t);return o&&ot(o)&&ov(o)&&!n9(o)?n:o||function(e){let t=oo(e);for(;nJ(t)&&!ot(t);){if(n9(t))return t;if(n4(t))break;t=oo(t)}return null}(e)||n}let ox=async function(e){let t=this.getOffsetParent||oy,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=nJ(t),o=nX(t),a="fixed"===r,i=of(e,!0,a,t),l={scrollLeft:0,scrollTop:0},s=nw(0);if(n||!n&&!a)if(("body"!==nq(t)||n1(o))&&(l=on(t)),n){let e=of(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=op(o));a&&!n&&o&&(s.x=op(o));let c=!o||n||a?nw(0):om(o,l);return{x:i.left+l.scrollLeft-s.x-c.x,y:i.top+l.scrollTop-s.y-c.y,width:i.width,height:i.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},ow={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,a="fixed"===o,i=nX(n),l=!!t&&n4(t.floating);if(n===i||l&&a)return r;let s={scrollLeft:0,scrollTop:0},c=nw(1),d=nw(0),u=nJ(n);if((u||!u&&!a)&&(("body"!==nq(n)||n1(i))&&(s=on(n)),nJ(n))){let e=of(n);c=oc(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}let f=!i||u||a?nw(0):om(i,s);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-s.scrollTop*c.y+d.y+f.y}},getDocumentElement:nX,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,a=[..."clippingAncestors"===r?n4(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=oa(e,[],!1).filter(e=>nZ(e)&&"body"!==nq(e)),o=null,a="fixed"===or(e).position,i=a?oo(e):e;for(;nZ(i)&&!ot(i);){let t=or(i),r=n9(i);r||"fixed"!==t.position||(o=null),(a?!r&&!o:!r&&"static"===t.position&&!!o&&oh.has(o.position)||n1(i)&&!r&&function e(t,r){let n=oo(t);return!(n===r||!nZ(n)||ot(n))&&("fixed"===or(n).position||e(n,r))}(e,i))?n=n.filter(e=>e!==i):o=t,i=oo(i)}return t.set(e,n),n}(t,this._c):[].concat(r),n],i=a[0],l=a.reduce((e,r)=>{let n=og(t,r,o);return e.top=nb(n.top,e.top),e.right=nv(n.right,e.right),e.bottom=nv(n.bottom,e.bottom),e.left=nb(n.left,e.left),e},og(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:oy,getElementRects:ox,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=ol(e);return{width:t,height:r}},getScale:oc,isElement:nZ,isRTL:function(e){return"rtl"===or(e).direction}};function ok(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let oE=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=nj(e,t)||{};if(null==c)return{};let u=nT(d),f={x:r,y:n},p=nN(nP(o)),m=nS(p),h=await i.getDimensions(c),g="y"===p,v=g?"clientHeight":"clientWidth",b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],y=f[p]-a.reference[p],x=await (null==i.getOffsetParent?void 0:i.getOffsetParent(c)),w=x?x[v]:0;w&&await (null==i.isElement?void 0:i.isElement(x))||(w=l.floating[v]||a.floating[m]);let k=w/2-h[m]/2-1,E=nv(u[g?"top":"left"],k),j=nv(u[g?"bottom":"right"],k),C=w-h[m]-j,R=w/2-h[m]/2+(b/2-y/2),N=nb(E,nv(R,C)),S=!s.arrow&&null!=nR(o)&&R!==N&&a.reference[m]/2-(R<E?E:j)-h[m]/2<0,O=S?R<E?R-E:R-C:0;return{[p]:f[p]+O,data:{[p]:N,centerOffset:R-N-O,...S&&{alignmentOffset:O}},reset:S}}});var oj="undefined"!=typeof document?v.useLayoutEffect:function(){};function oC(e,t){let r,n,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!oC(e[n],t[n]))return!1;return!0}if((r=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){let r=o[n];if(("_owner"!==r||!e.$$typeof)&&!oC(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function oR(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oN(e,t){let r=oR(e);return Math.round(t*r)/r}function oS(e){let t=v.useRef(e);return oj(()=>{t.current=e}),t}var oO=v.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...a}=e;return(0,g.jsx)(e8.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,g.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function oP(e){let[t,r]=v.useState(void 0);return eZ(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,o;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,o=t.blockSize}else n=e.offsetWidth,o=e.offsetHeight;r({width:n,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}oO.displayName="Arrow",e.s(["useSize",()=>oP],35804);var oA="Popper",[o_,oD]=eY(oA),[oM,oI]=o_(oA),oz=e=>{let{__scopePopper:t,children:r}=e,[n,o]=v.useState(null);return(0,g.jsx)(oM,{scope:t,anchor:n,onAnchorChange:o,children:r})};oz.displayName=oA;var oT="PopperAnchor",oL=v.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...o}=e,a=oI(oT,r),i=v.useRef(null),l=E(t,i),s=v.useRef(null);return v.useEffect(()=>{let e=s.current;s.current=n?.current||i.current,e!==s.current&&a.onAnchorChange(s.current)}),n?null:(0,g.jsx)(e8.div,{...o,ref:l})});oL.displayName=oT;var oF="PopperContent",[o$,oW]=o_(oF),oB=v.forwardRef((e,t)=>{var r,n,o,a,i,l,s,c,d,u,f,p,m,h,b,y,x,w,k,j,C;let{__scopePopper:R,side:N="bottom",sideOffset:S=0,align:O="center",alignOffset:P=0,arrowPadding:A=0,avoidCollisions:_=!0,collisionBoundary:D=[],collisionPadding:M=0,sticky:I="partial",hideWhenDetached:z=!1,updatePositionStrategy:T="optimized",onPlaced:L,...F}=e,$=oI(oF,R),[W,B]=v.useState(null),V=E(t,e=>B(e)),[H,U]=v.useState(null),G=oP(H),q=G?.width??0,K=G?.height??0,X="number"==typeof M?M:{top:0,right:0,bottom:0,left:0,...M},Y=Array.isArray(D)?D:[D],Z=Y.length>0,J={padding:X,boundary:Y.filter(oG),altBoundary:Z},{refs:Q,floatingStyles:ee,placement:et,isPositioned:er,middlewareData:en}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[d,u]=v.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(n);oC(f,n)||p(n);let[m,h]=v.useState(null),[g,b]=v.useState(null),y=v.useCallback(e=>{e!==E.current&&(E.current=e,h(e))},[]),x=v.useCallback(e=>{e!==j.current&&(j.current=e,b(e))},[]),w=a||m,k=i||g,E=v.useRef(null),j=v.useRef(null),C=v.useRef(d),R=null!=s,N=oS(s),S=oS(o),O=oS(c),P=v.useCallback(()=>{var e,n;let o,a,i;if(!E.current||!j.current)return;let l={placement:t,strategy:r,middleware:f};S.current&&(l.platform=S.current),(e=E.current,n=j.current,o=new Map,i={...(a={platform:ow,...l}).platform,_c:o},n$(e,n,{...a,platform:i})).then(e=>{let t={...e,isPositioned:!1!==O.current};A.current&&!oC(C.current,t)&&(C.current=t,e5.flushSync(()=>{u(t)}))})},[f,t,r,S,O]);oj(()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[c]);let A=v.useRef(!1);oj(()=>(A.current=!0,()=>{A.current=!1}),[]),oj(()=>{if(w&&(E.current=w),k&&(j.current=k),w&&k){if(N.current)return N.current(w,k,P);P()}},[w,k,P,N,R]);let _=v.useMemo(()=>({reference:E,floating:j,setReference:y,setFloating:x}),[y,x]),D=v.useMemo(()=>({reference:w,floating:k}),[w,k]),M=v.useMemo(()=>{let e={position:r,left:0,top:0};if(!D.floating)return e;let t=oN(D.floating,d.x),n=oN(D.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...oR(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,D.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:P,refs:_,elements:D,floatingStyles:M}),[d,P,_,D,M])}({strategy:"fixed",placement:N+("center"!==O?"-"+O:""),whileElementsMounted:(...e)=>(function(e,t,r,n){let o;void 0===n&&(n={});let{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:c=!1}=n,d=os(e),u=a||i?[...d?oa(d):[],...oa(t)]:[];u.forEach(e=>{a&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)});let f=d&&s?function(e,t){let r,n=null,o=nX(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),a();let c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:p}=c;if(l||t(),!f||!p)return;let m={rootMargin:-nx(u)+"px "+-nx(o.clientWidth-(d+f))+"px "+-nx(o.clientHeight-(u+p))+"px "+-nx(d)+"px",threshold:nb(0,nv(1,s))||1},h=!0;function g(t){let n=t[0].intersectionRatio;if(n!==s){if(!h)return i();n?i(!1,n):r=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==n||ok(c,e.getBoundingClientRect())||i(),h=!1}try{n=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(g,m)}n.observe(e)}(!0),a}(d,r):null,p=-1,m=null;l&&(m=new ResizeObserver(e=>{let[n]=e;n&&n.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),r()}),d&&!c&&m.observe(d),m.observe(t));let h=c?of(e):null;return c&&function t(){let n=of(e);h&&!ok(h,n)&&r(),h=n,o=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach(e=>{a&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(o)}})(...e,{animationFrame:"always"===T}),elements:{reference:$.anchor},middleware:[{...{name:"offset",options:o=r={mainAxis:S+K,alignmentAxis:P},async fn(e){var t,r;let{x:n,y:a,placement:i,middlewareData:l}=e,s=await nU(e,o);return i===(null==(t=l.offset)?void 0:t.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:n+s.x,y:a+s.y,data:{...s,placement:i}}}},options:[r,n]},_&&{...{name:"shift",options:d=s={mainAxis:!0,crossAxis:!1,limiter:"partial"===I?{...(void 0===(l=a)&&(l={}),{options:l,fn(e){let{x:t,y:r,placement:n,rects:o,middlewareData:a}=e,{offset:i=0,mainAxis:s=!0,crossAxis:c=!0}=nj(l,e),d={x:t,y:r},u=nP(n),f=nN(u),p=d[f],m=d[u],h=nj(i,e),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){let e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+g.mainAxis,r=o.reference[f]+o.reference[e]-g.mainAxis;p<t?p=t:p>r&&(p=r)}if(c){var v,b;let e="y"===f?"width":"height",t=nH.has(nC(n)),r=o.reference[u]-o.floating[e]+(t&&(null==(v=a.offset)?void 0:v[u])||0)+(t?0:g.crossAxis),i=o.reference[u]+o.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[u])||0)-(t?g.crossAxis:0);m<r?m=r:m>i&&(m=i)}return{[f]:p,[u]:m}}}),options:[a,i]}:void 0,...J},async fn(e){let{x:t,y:r,placement:n}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:i={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=nj(d,e),s={x:t,y:r},c=await nW(e,l),u=nP(nC(n)),f=nN(u),p=s[f],m=s[u];if(o){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=p+c[e],n=p-c[t];p=nb(r,nv(p,n))}if(a){let e="y"===u?"top":"left",t="y"===u?"bottom":"right",r=m+c[e],n=m-c[t];m=nb(r,nv(m,n))}let h=i.fn({...e,[f]:p,[u]:m});return{...h,data:{x:h.x-t,y:h.y-r,enabled:{[f]:o,[u]:a}}}}},options:[s,c]},_&&{...{name:"flip",options:p=u={...J},async fn(e){var t,r,n,o,a,i,l,s;let c,d,u,{placement:f,middlewareData:m,rects:h,initialPlacement:g,platform:v,elements:b}=e,{mainAxis:y=!0,crossAxis:x=!0,fallbackPlacements:w,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:j=!0,...C}=nj(p,e);if(null!=(t=m.arrow)&&t.alignmentOffset)return{};let R=nC(f),N=nP(g),S=nC(g)===g,O=await (null==v.isRTL?void 0:v.isRTL(b.floating)),P=w||(S||!j?[nz(g)]:(c=nz(g),[nA(g),c,nA(c)])),A="none"!==E;!w&&A&&P.push(...(d=nR(g),u=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?nD:n_;return t?n_:nD;case"left":case"right":return t?nM:nI;default:return[]}}(nC(g),"start"===E,O),d&&(u=u.map(e=>e+"-"+d),j&&(u=u.concat(u.map(nA)))),u));let _=[g,...P],D=await nW(e,C),M=[],I=(null==(r=m.flip)?void 0:r.overflows)||[];if(y&&M.push(D[R]),x){let e,t,r,n,o=(i=f,l=h,void 0===(s=O)&&(s=!1),e=nR(i),r=nS(t=nN(nP(i))),n="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",l.reference[r]>l.floating[r]&&(n=nz(n)),[n,nz(n)]);M.push(D[o[0]],D[o[1]])}if(I=[...I,{placement:f,overflows:M}],!M.every(e=>e<=0)){let e=((null==(n=m.flip)?void 0:n.index)||0)+1,t=_[e];if(t&&("alignment"!==x||N===nP(t)||I.every(e=>nP(e.placement)!==N||e.overflows[0]>0)))return{data:{index:e,overflows:I},reset:{placement:t}};let r=null==(o=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(k){case"bestFit":{let e=null==(a=I.filter(e=>{if(A){let t=nP(e.placement);return t===N||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=g}if(f!==r)return{reset:{placement:r}}}return{}}},options:[u,f]},{...{name:"size",options:b=m={...J,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${r}px`),i.setProperty("--radix-popper-available-height",`${n}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}},async fn(e){var t,r;let n,o,{placement:a,rects:i,platform:l,elements:s}=e,{apply:c=()=>{},...d}=nj(b,e),u=await nW(e,d),f=nC(a),p=nR(a),m="y"===nP(a),{width:h,height:g}=i.floating;"top"===f||"bottom"===f?(n=f,o=p===(await (null==l.isRTL?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(o=f,n="end"===p?"top":"bottom");let v=g-u.top-u.bottom,y=h-u.left-u.right,x=nv(g-u[n],v),w=nv(h-u[o],y),k=!e.middlewareData.shift,E=x,j=w;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(j=y),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(E=v),k&&!p){let e=nb(u.left,0),t=nb(u.right,0),r=nb(u.top,0),n=nb(u.bottom,0);m?j=h-2*(0!==e||0!==t?e+t:nb(u.left,u.right)):E=g-2*(0!==r||0!==n?r+n:nb(u.top,u.bottom))}await c({...e,availableWidth:j,availableHeight:E});let C=await l.getDimensions(s.floating);return h!==C.width||g!==C.height?{reset:{rects:!0}}:{}}},options:[m,h]},H&&{...{name:"arrow",options:w=y={element:H,padding:A},fn(e){let{element:t,padding:r}="function"==typeof w?w(e):w;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?oE({element:t.current,padding:r}).fn(e):{}:t?oE({element:t,padding:r}).fn(e):{}}},options:[y,x]},oq({arrowWidth:q,arrowHeight:K}),z&&{...{name:"hide",options:C=k={strategy:"referenceHidden",...J},async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...n}=nj(C,e);switch(r){case"referenceHidden":{let r=nB(await nW(e,{...n,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:nV(r)}}}case"escaped":{let r=nB(await nW(e,{...n,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:nV(r)}}}default:return{}}}},options:[k,j]}]}),[eo,ea]=oK(et),ei=e9(L);eZ(()=>{er&&ei?.()},[er,ei]);let el=en.arrow?.x,es=en.arrow?.y,ec=en.arrow?.centerOffset!==0,[ed,eu]=v.useState();return eZ(()=>{W&&eu(window.getComputedStyle(W).zIndex)},[W]),(0,g.jsx)("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:er?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ed,"--radix-popper-transform-origin":[en.transformOrigin?.x,en.transformOrigin?.y].join(" "),...en.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,g.jsx)(o$,{scope:R,placedSide:eo,onArrowChange:U,arrowX:el,arrowY:es,shouldHideArrow:ec,children:(0,g.jsx)(e8.div,{"data-side":eo,"data-align":ea,...F,ref:V,style:{...F.style,animation:er?void 0:"none"}})})})});oB.displayName=oF;var oV="PopperArrow",oH={top:"bottom",right:"left",bottom:"top",left:"right"},oU=v.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,o=oW(oV,r),a=oH[o.placedSide];return(0,g.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,g.jsx)(oO,{...n,ref:t,style:{...n.style,display:"block"}})})});function oG(e){return null!==e}oU.displayName=oV;var oq=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[s,c]=oK(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+l/2,p="",m="";return"bottom"===s?(p=a?d:`${u}px`,m=`${-l}px`):"top"===s?(p=a?d:`${u}px`,m=`${n.floating.height+l}px`):"right"===s?(p=`${-l}px`,m=a?d:`${f}px`):"left"===s&&(p=`${n.floating.width+l}px`,m=a?d:`${f}px`),{data:{x:p,y:m}}}});function oK(e){let[t,r="center"]=e.split("-");return[t,r]}e.s(["Anchor",()=>oL,"Arrow",()=>oU,"Content",()=>oB,"Root",()=>oz,"createPopperScope",()=>oD],53660);var oX=Symbol("radix.slottable");function oY(e){return v.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===oX}var oZ="Popover",[oJ,oQ]=eY(oZ,[oD]),o0=oD(),[o1,o2]=oJ(oZ),o5=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=o0(t),s=v.useRef(null),[c,d]=v.useState(!1),[u,f]=e2({prop:n,defaultProp:o??!1,onChange:a,caller:oZ});return(0,g.jsx)(oz,{...l,children:(0,g.jsx)(o1,{scope:t,contentId:e0(),triggerRef:s,open:u,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:c,onCustomAnchorAdd:v.useCallback(()=>d(!0),[]),onCustomAnchorRemove:v.useCallback(()=>d(!1),[]),modal:i,children:r})})};o5.displayName=oZ;var o4="PopoverAnchor";v.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=o2(o4,r),a=o0(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return v.useEffect(()=>(i(),()=>l()),[i,l]),(0,g.jsx)(oL,{...a,...n,ref:t})}).displayName=o4;var o3="PopoverTrigger",o8=v.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=o2(o3,r),a=o0(r),i=E(t,o.triggerRef),l=(0,g.jsx)(e8.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":as(o.open),...n,ref:i,onClick:eK(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:(0,g.jsx)(oL,{asChild:!0,...a,children:l})});o8.displayName=o3;var o6="PopoverPortal",[o9,o7]=oJ(o6,{forceMount:void 0}),ae=e=>{let{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=o2(o6,t);return(0,g.jsx)(o9,{scope:t,forceMount:r,children:(0,g.jsx)(tm,{present:r||a.open,children:(0,g.jsx)(tp,{asChild:!0,container:o,children:n})})})};ae.displayName=o6;var at="PopoverContent",ar=v.forwardRef((e,t)=>{let r=o7(at,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=o2(at,e.__scopePopover);return(0,g.jsx)(tm,{present:n||a.open,children:a.modal?(0,g.jsx)(ao,{...o,ref:t}):(0,g.jsx)(aa,{...o,ref:t})})});ar.displayName=at;var an=((l=v.forwardRef((e,t)=>{let{children:r,...n}=e;if(v.isValidElement(r)){var o;let e,a,i=(o=r,(a=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(a=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref),l=function(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...e)=>{let t=a(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...a}:"className"===n&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==v.Fragment&&(l.ref=t?k(t,i):i),v.cloneElement(r,l)}return v.Children.count(r)>1?v.Children.only(null):null})).displayName="PopoverContent.RemoveScroll.SlotClone",n=l,(o=v.forwardRef((e,t)=>{let{children:r,...o}=e,a=v.Children.toArray(r),i=a.find(oY);if(i){let e=i.props.children,r=a.map(t=>t!==i?t:v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null);return(0,g.jsx)(n,{...o,ref:t,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return(0,g.jsx)(n,{...o,ref:t,children:r})})).displayName="PopoverContent.RemoveScroll.Slot",o),ao=v.forwardRef((e,t)=>{let r=o2(at,e.__scopePopover),n=v.useRef(null),o=E(t,n),a=v.useRef(!1);return v.useEffect(()=>{let e=n.current;if(e)return re(e)},[]),(0,g.jsx)(t5,{as:an,allowPinchZoom:!0,children:(0,g.jsx)(ai,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:eK(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:eK(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;a.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:eK(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),aa=v.forwardRef((e,t)=>{let r=o2(at,e.__scopePopover),n=v.useRef(!1),o=v.useRef(!1);return(0,g.jsx)(ai,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let a=t.target;r.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),ai=v.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:d,...u}=e,f=o2(at,r),p=o0(r);return tv(),(0,g.jsx)(tl,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,g.jsx)(tt,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:(0,g.jsx)(oB,{"data-state":as(f.open),role:"dialog",id:f.contentId,...p,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),al="PopoverClose";function as(e){return e?"open":"closed"}v.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=o2(al,r);return(0,g.jsx)(e8.button,{type:"button",...n,ref:t,onClick:eK(e.onClick,()=>o.onOpenChange(!1))})}).displayName=al,v.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=o0(r);return(0,g.jsx)(oU,{...o,...n,ref:t})}).displayName="PopoverArrow";let ac=v.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>(0,g.jsx)(ae,{children:(0,g.jsx)(ar,{ref:o,align:t,sideOffset:r,className:e$("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...n})}));ac.displayName=ar.displayName;let ad=v.forwardRef(({className:e,type:t,...r},n)=>(0,g.jsx)("input",{type:t,className:e$("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));ad.displayName="Input",e.s(["Input",()=>ad],80208);let au=nt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>au],43531);let af=nt("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),ap=nt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),am=nt("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),ah=nt("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),ag=nt("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);var av=e.i(42408),ab=e.i(57688);let ay=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)("textarea",{className:e$("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...t}));function ax(e){let t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}ay.displayName="Textarea",e.s(["Textarea",()=>ay],1864),e.s(["usePrevious",()=>ax],99682);var aw="Checkbox",[ak,aE]=eY(aw),[aj,aC]=ak(aw);function aR(e){let{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:l,onCheckedChange:s,required:c,value:d="on",internal_do_not_use_render:u}=e,[f,p]=e2({prop:r,defaultProp:o??!1,onChange:s,caller:aw}),[m,h]=v.useState(null),[b,y]=v.useState(null),x=v.useRef(!1),w=!m||!!i||!!m.closest("form"),k={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:l,form:i,value:d,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:!aM(o)&&o,isFormControl:w,bubbleInput:b,setBubbleInput:y};return(0,g.jsx)(aj,{scope:t,...k,children:"function"==typeof u?u(k):n})}var aN="CheckboxTrigger",aS=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{let{control:a,value:i,disabled:l,checked:s,required:c,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=aC(aN,e),h=E(o,d),b=v.useRef(s);return v.useEffect(()=>{let e=a?.form;if(e){let t=()=>u(b.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[a,u]),(0,g.jsx)(e8.button,{type:"button",role:"checkbox","aria-checked":aM(s)?"mixed":s,"aria-required":c,"data-state":aI(s),"data-disabled":l?"":void 0,disabled:l,value:i,...n,ref:h,onKeyDown:eK(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:eK(r,e=>{u(e=>!!aM(e)||!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});aS.displayName=aN;var aO=v.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:s,onCheckedChange:c,form:d,...u}=e;return(0,g.jsx)(aR,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:l,required:i,onCheckedChange:c,name:n,form:d,value:s,internal_do_not_use_render:({isFormControl:e})=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(aS,{...u,ref:t,__scopeCheckbox:r}),e&&(0,g.jsx)(aD,{__scopeCheckbox:r})]})})});aO.displayName=aw;var aP="CheckboxIndicator",aA=v.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...o}=e,a=aC(aP,r);return(0,g.jsx)(tm,{present:n||aM(a.checked)||!0===a.checked,children:(0,g.jsx)(e8.span,{"data-state":aI(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});aA.displayName=aP;var a_="CheckboxBubbleInput",aD=v.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:l,disabled:s,name:c,value:d,form:u,bubbleInput:f,setBubbleInput:p}=aC(a_,e),m=E(r,p),h=ax(a),b=oP(n);v.useEffect(()=>{if(!f)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!o.current;if(h!==a&&e){let r=new Event("click",{bubbles:t});f.indeterminate=aM(a),e.call(f,!aM(a)&&a),f.dispatchEvent(r)}},[f,h,a,o]);let y=v.useRef(!aM(a)&&a);return(0,g.jsx)(e8.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:l,disabled:s,name:c,value:d,form:u,...t,tabIndex:-1,ref:m,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function aM(e){return"indeterminate"===e}function aI(e){return aM(e)?"indeterminate":e?"checked":"unchecked"}aD.displayName=a_;let az=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(aO,{ref:r,className:e$("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:(0,g.jsx)(aA,{className:e$("grid place-content-center text-current"),children:(0,g.jsx)(au,{className:"h-4 w-4"})})}));function aT(){let e=(0,b.useRouter)(),t=(0,b.useSearchParams)(),{currentBank:r,setCurrentBank:n,banks:o,loadBanks:a}=(0,y.useBank)(),{theme:i,toggleTheme:l}=(0,av.useTheme)(),[s,c]=v.useState(!1),[d,u]=v.useState(!1),[f,p]=v.useState(""),[m,h]=v.useState(!1),[w,k]=v.useState(null),[E,j]=v.useState(!1),[C,R]=v.useState(""),[N,S]=v.useState(""),[O,P]=v.useState(""),[A,_]=v.useState(""),[D,M]=v.useState(!1),[I,z]=v.useState(!1),[T,L]=v.useState(null),F=v.useMemo(()=>[...o].sort((e,t)=>e.localeCompare(t)),[o]),$=async()=>{if(f.trim()){h(!0),k(null);try{await x.client.createBank(f.trim()),await a(),u(!1),p(""),n(f.trim()),e.push(`/banks/${f.trim()}?view=data`)}catch(e){k(e instanceof Error?e.message:"Failed to create bank")}finally{h(!1)}}},W=async()=>{if(r&&C.trim()){z(!0),L(null);try{let t={content:C};N&&(t.context=N),O&&(t.event_date=O);let n={bank_id:r,items:[t]};A&&(n.document_id=A),D?await x.client.retain({...n,async:!0}):await x.client.retain(n),j(!1),R(""),S(""),P(""),_(""),M(!1),e.push(`/banks/${r}?view=documents`)}catch(e){L(e instanceof Error?e.message:"Failed to create document")}finally{z(!1)}}};return(0,g.jsx)("div",{className:"bg-card text-card-foreground px-5 py-3 border-b-4 border-primary-gradient",children:(0,g.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[(0,g.jsx)(ab.default,{src:"/logo.png",alt:"Hindsight",width:40,height:40,className:"h-10 w-auto",unoptimized:!0}),(0,g.jsx)("div",{className:"h-8 w-px bg-border"}),(0,g.jsxs)(o5,{open:s,onOpenChange:c,children:[(0,g.jsx)(o8,{asChild:!0,children:(0,g.jsxs)(eB,{variant:"outline",role:"combobox","aria-expanded":s,className:"w-[250px] justify-between font-bold border-2 border-primary hover:bg-accent",children:[r||"Select a memory bank...",(0,g.jsx)(af,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,g.jsx)(ac,{className:"w-[250px] p-0",children:(0,g.jsxs)(nd,{children:[F.length>0&&(0,g.jsx)(nu,{placeholder:"Search memory banks..."}),(0,g.jsxs)(nf,{children:[(0,g.jsx)(np,{children:"No memory banks yet."}),(0,g.jsx)(nm,{children:F.map(o=>(0,g.jsxs)(nh,{value:o,onSelect:r=>{n(r),c(!1);let o=t.get("view")||"data",a=t.get("subTab"),i=a?`?view=${o}&subTab=${a}`:`?view=${o}`;e.push(`/banks/${r}${i}`)},children:[(0,g.jsx)(au,{className:e$("mr-2 h-4 w-4",r===o?"opacity-100":"opacity-0")}),o]},o))})]}),(0,g.jsx)("div",{className:"border-t border-border p-1",children:(0,g.jsxs)("button",{className:"w-full flex items-center gap-2 px-2 py-2 text-sm rounded-md hover:bg-accent transition-colors text-muted-foreground hover:text-foreground",onClick:()=>{c(!1),u(!0)},children:[(0,g.jsx)(ap,{className:"h-4 w-4"}),(0,g.jsx)("span",{children:"Create new bank"})]})})]})})]}),(0,g.jsx)("div",{className:"h-8 w-px bg-border"}),r&&(0,g.jsxs)(eB,{variant:"outline",size:"sm",className:"h-9 gap-1.5",onClick:()=>j(!0),title:"Add document to current bank",children:[(0,g.jsx)(ap,{className:"h-4 w-4"}),(0,g.jsx)("span",{children:"Add Document"})]}),(0,g.jsx)("div",{className:"flex-1"}),(0,g.jsxs)("a",{href:"https://github.com/vectorize-io/hindsight",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-accent transition-colors text-muted-foreground hover:text-foreground",title:"View on GitHub",children:[(0,g.jsx)(ag,{className:"h-5 w-5"}),(0,g.jsx)("span",{className:"text-sm font-medium",children:"GitHub"})]}),(0,g.jsx)("div",{className:"h-8 w-px bg-border"}),(0,g.jsx)(eB,{variant:"ghost",size:"icon",onClick:l,className:"h-9 w-9",title:"light"===i?"Switch to dark mode":"Switch to light mode",children:"light"===i?(0,g.jsx)(am,{className:"h-5 w-5"}):(0,g.jsx)(ah,{className:"h-5 w-5"})}),(0,g.jsx)(rs,{open:d,onOpenChange:u,children:(0,g.jsxs)(na,{className:"sm:max-w-[425px]",children:[(0,g.jsx)(ni,{children:(0,g.jsx)(ns,{children:"Create New Memory Bank"})}),(0,g.jsxs)("div",{className:"py-4",children:[(0,g.jsx)(ad,{placeholder:"Enter bank ID...",value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"!==e.key||m||$()},autoFocus:!0}),w&&(0,g.jsx)("p",{className:"text-sm text-destructive mt-2",children:w})]}),(0,g.jsxs)(nl,{children:[(0,g.jsx)(eB,{variant:"secondary",onClick:()=>{u(!1),p(""),k(null)},children:"Cancel"}),(0,g.jsx)(eB,{onClick:$,disabled:m||!f.trim(),children:m?"Creating...":"Create"})]})]})}),(0,g.jsx)(rs,{open:E,onOpenChange:j,children:(0,g.jsxs)(na,{className:"sm:max-w-[600px]",children:[(0,g.jsxs)(ni,{children:[(0,g.jsx)(ns,{children:"Add New Document"}),(0,g.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Add a new document to memory bank:"," ",(0,g.jsx)("span",{className:"font-semibold",children:r})]})]}),(0,g.jsxs)("div",{className:"py-4 space-y-4",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Content *"}),(0,g.jsx)(ay,{value:C,onChange:e=>R(e.target.value),placeholder:"Enter the document content...",className:"min-h-[150px] resize-y",autoFocus:!0})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Context"}),(0,g.jsx)(ad,{type:"text",value:N,onChange:e=>S(e.target.value),placeholder:"Optional context about this document..."})]}),(0,g.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Event Date"}),(0,g.jsx)(ad,{type:"datetime-local",value:O,onChange:e=>P(e.target.value),className:"text-foreground"})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Document ID"}),(0,g.jsx)(ad,{type:"text",value:A,onChange:e=>_(e.target.value),placeholder:"Optional document identifier..."})]})]}),(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(az,{id:"async-doc",checked:D,onCheckedChange:e=>M(e)}),(0,g.jsx)("label",{htmlFor:"async-doc",className:"text-sm cursor-pointer text-foreground",children:"Process in background (async)"})]}),T&&(0,g.jsx)("p",{className:"text-sm text-destructive",children:T})]}),(0,g.jsxs)(nl,{children:[(0,g.jsx)(eB,{variant:"secondary",onClick:()=>{j(!1),R(""),S(""),P(""),_(""),M(!1),L(null)},children:"Cancel"}),(0,g.jsx)(eB,{onClick:W,disabled:I||!C.trim(),children:I?"Adding...":"Add Document"})]})]})})]})})}function aL(){return(0,g.jsx)(v.Suspense,{fallback:(0,g.jsx)("div",{className:"bg-card text-card-foreground px-5 py-3 border-b-4 border-primary-gradient",children:(0,g.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[(0,g.jsx)(ab.default,{src:"/logo.png",alt:"Hindsight",width:40,height:40,className:"h-10 w-auto",unoptimized:!0}),(0,g.jsx)("div",{className:"h-8 w-px bg-border"}),(0,g.jsxs)(eB,{variant:"outline",className:"w-[250px] justify-between font-bold border-2 border-primary",disabled:!0,children:["Loading...",(0,g.jsx)(af,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),(0,g.jsx)("div",{className:"flex-1"}),(0,g.jsxs)("a",{href:"https://github.com/vectorize-io/hindsight",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-accent transition-colors text-muted-foreground",children:[(0,g.jsx)(ag,{className:"h-5 w-5"}),(0,g.jsx)("span",{className:"text-sm font-medium",children:"GitHub"})]}),(0,g.jsx)("div",{className:"h-8 w-px bg-border"}),(0,g.jsx)(eB,{variant:"ghost",size:"icon",className:"h-9 w-9",disabled:!0,children:(0,g.jsx)(am,{className:"h-5 w-5"})})]})}),children:(0,g.jsx)(aT,{})})}az.displayName=aO.displayName,e.s(["Checkbox",()=>az],32089),e.s(["BankSelector",()=>aL],99729)}]);
|
|
7
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},rM=({contentRef:e,descriptionId:t})=>{let r=r_("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return v.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},rI='[cmdk-group=""]',rz='[cmdk-group-items=""]',rT='[cmdk-item=""]',rL=`${rT}:not([aria-disabled="true"])`,rF="cmdk-item-select",r$="data-value",rW=(e,t,r)=>{var n;return n=e,function e(t,r,n,o,a,i,l){if(i===r.length)return a===t.length?1:.99;var s=`${a},${i}`;if(void 0!==l[s])return l[s];for(var c,d,u,f,p=o.charAt(i),m=n.indexOf(p,a),h=0;m>=0;)(c=e(t,r,n,o,m+1,i+1,l))>h&&(m===a?c*=1:eV.test(t.charAt(m-1))?(c*=.8,(u=t.slice(a,m-1).match(eH))&&a>0&&(c*=Math.pow(.999,u.length))):eU.test(t.charAt(m-1))?(c*=.9,(f=t.slice(a,m-1).match(eG))&&a>0&&(c*=Math.pow(.999,f.length))):(c*=.17,a>0&&(c*=Math.pow(.999,m-a))),t.charAt(m)!==r.charAt(i)&&(c*=.9999)),(c<.1&&n.charAt(m-1)===o.charAt(i+1)||o.charAt(i+1)===o.charAt(i)&&n.charAt(m-1)!==o.charAt(i))&&.1*(d=e(t,r,n,o,m+1,i+2,l))>c&&(c=.1*d),c>h&&(h=c),m=n.indexOf(p,m+1);return l[s]=h,h}(n=r&&r.length>0?`${n+" "+r.join(" ")}`:n,t,eq(n),eq(t),0,0,{})},rB=v.createContext(void 0),rV=v.createContext(void 0),rH=v.createContext(void 0),rU=v.forwardRef((e,t)=>{let r=r1(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=r1(()=>new Set),o=r1(()=>new Map),a=r1(()=>new Map),i=r1(()=>new Set),l=rQ(e),{label:s,children:c,value:d,onValueChange:u,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,...b}=e,y=e0(),x=e0(),w=e0(),k=v.useRef(null),E=r4();r0(()=>{if(void 0!==d){let e=d.trim();r.current.value=e,j.emit()}},[d]),r0(()=>{E(6,P)},[]);let j=v.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var o,a,i,s;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)O(),N(),E(1,S);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(o=document.getElementById(y))||o.focus()}if(E(7,()=>{var e;r.current.selectedItemId=null==(e=A())?void 0:e.id,j.emit()}),n||E(5,P),(null==(a=l.current)?void 0:a.value)!==void 0){null==(s=(i=l.current).onValueChange)||s.call(i,null!=t?t:"");return}}j.emit()}},emit:()=>{i.current.forEach(e=>e())}}),[]),C=v.useMemo(()=>({value:(e,t,n)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,R(t,n)),E(2,()=>{N(),j.emit()}))},item:(e,t)=>(n.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),E(3,()=>{O(),N(),r.current.value||S(),j.emit()}),()=>{a.current.delete(e),n.current.delete(e),r.current.filtered.items.delete(e);let t=A();E(4,()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&S(),j.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:s||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:y,inputId:w,labelId:x,listInnerRef:k}),[]);function R(e,t){var n,o;let a=null!=(o=null==(n=l.current)?void 0:n.filter)?o:rW;return e?a(e,r.current.search,t):0}function N(){if(!r.current.search||!1===l.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(r=>{let n=o.current.get(r),a=0;n.forEach(t=>{a=Math.max(e.get(t),a)}),t.push([r,a])});let n=k.current;_().sort((t,r)=>{var n,o;let a=t.getAttribute("id"),i=r.getAttribute("id");return(null!=(n=e.get(i))?n:0)-(null!=(o=e.get(a))?o:0)}).forEach(e=>{let t=e.closest(rz);t?t.appendChild(e.parentElement===t?e:e.closest(`${rz} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${rz} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=k.current)?void 0:t.querySelector(`${rI}[${r$}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)})}function S(){let e=_().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(r$);j.setState("value",t||void 0)}function O(){var e,t,i,s;if(!r.current.search||!1===l.current.shouldFilter){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let c=0;for(let o of n.current){let n=R(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(s=null==(i=a.current.get(o))?void 0:i.keywords)?s:[]);r.current.filtered.items.set(o,n),n>0&&c++}for(let[e,t]of o.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=c}function P(){var e,t,r;let n=A();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(rI))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function A(){var e;return null==(e=k.current)?void 0:e.querySelector(`${rT}[aria-selected="true"]`)}function _(){var e;return Array.from((null==(e=k.current)?void 0:e.querySelectorAll(rL))||[])}function D(e){let t=_()[e];t&&j.setState("value",t.getAttribute(r$))}function M(e){var t;let r=A(),n=_(),o=n.findIndex(e=>e===r),a=n[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?n[n.length-1]:o+e===n.length?n[0]:n[o+e]),a&&j.setState("value",a.getAttribute(r$))}function I(e){let t=A(),r=null==t?void 0:t.closest(rI),n;for(;r&&!n;)n=null==(r=e>0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,rI):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,rI))?void 0:r.querySelector(rL);n?j.setState("value",n.getAttribute(r$)):M(e)}let z=()=>D(_().length-1),T=e=>{e.preventDefault(),e.metaKey?z():e.altKey?I(1):M(1)},L=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?I(-1):M(-1)};return v.createElement(e8.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=b.onKeyDown)||t.call(b,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":g&&e.ctrlKey&&T(e);break;case"ArrowDown":T(e);break;case"p":case"k":g&&e.ctrlKey&&L(e);break;case"ArrowUp":L(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),z();break;case"Enter":{e.preventDefault();let t=A();if(t){let e=new Event(rF);t.dispatchEvent(e)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:r8},s),r3(e,e=>v.createElement(rV.Provider,{value:j},v.createElement(rB.Provider,{value:C},e))))}),rG=v.forwardRef((e,t)=>{var r,n;let o=e0(),a=v.useRef(null),i=v.useContext(rH),l=v.useContext(rB),s=rQ(e),c=null!=(n=null==(r=s.current)?void 0:r.forceMount)?n:null==i?void 0:i.forceMount;r0(()=>{if(!c)return l.item(o,null==i?void 0:i.id)},[c]);let d=r5(o,a,[e.value,e.children,a],e.keywords),u=v.useContext(rV),f=r2(e=>e.value&&e.value===d.current),p=r2(e=>!!c||!1===l.filter()||!e.search||e.filtered.items.get(o)>0);function m(){var e,t;h(),null==(t=(e=s.current).onSelect)||t.call(e,d.current)}function h(){u.setState("value",d.current,!0)}if(v.useEffect(()=>{let t=a.current;if(!(!t||e.disabled))return t.addEventListener(rF,m),()=>t.removeEventListener(rF,m)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:g,value:b,onSelect:y,forceMount:x,keywords:w,...E}=e;return v.createElement(e8.div,{ref:k(a,t),...E,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||l.getDisablePointerSelection()?void 0:h,onClick:g?void 0:m},e.children)}),rq=v.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=e0(),l=v.useRef(null),s=v.useRef(null),c=e0(),d=v.useContext(rB),u=r2(e=>!!o||!1===d.filter()||!e.search||e.filtered.groups.has(i));r0(()=>d.group(i),[]),r5(i,l,[e.value,e.heading,s]);let f=v.useMemo(()=>({id:i,forceMount:o}),[o]);return v.createElement(e8.div,{ref:k(l,t),...a,"cmdk-group":"",role:"presentation",hidden:!u||void 0},r&&v.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),r3(e,e=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},v.createElement(rH.Provider,{value:f},e))))}),rK=v.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=v.useRef(null),a=r2(e=>!e.search);return r||a?v.createElement(e8.div,{ref:k(o,t),...n,"cmdk-separator":"",role:"separator"}):null}),rX=v.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=null!=e.value,a=v.useContext(rV),i=r2(e=>e.search),l=r2(e=>e.selectedItemId),s=v.useContext(rB);return v.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),v.createElement(e8.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":l,id:s.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==r||r(e.target.value)}})}),rY=v.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=v.useRef(null),i=v.useRef(null),l=r2(e=>e.selectedItemId),s=v.useContext(rB);return v.useEffect(()=>{if(i.current&&a.current){let e=i.current,t=a.current,r,n=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return n.observe(e),()=>{cancelAnimationFrame(r),n.unobserve(e)}}},[]),v.createElement(e8.div,{ref:k(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:s.listId},r3(e,e=>v.createElement("div",{ref:k(i,s.listInnerRef),"cmdk-list-sizer":""},e)))}),rZ=v.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...l}=e;return v.createElement(rs,{open:r,onOpenChange:n},v.createElement(rp,{container:i},v.createElement(rh,{"cmdk-overlay":"",className:o}),v.createElement(ry,{"aria-label":e.label,"cmdk-dialog":"",className:a},v.createElement(rU,{ref:t,...l}))))}),rJ=Object.assign(rU,{List:rY,Item:rG,Input:rX,Group:rq,Separator:rK,Dialog:rZ,Empty:v.forwardRef((e,t)=>r2(e=>0===e.filtered.count)?v.createElement(e8.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:v.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return v.createElement(e8.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},r3(e,e=>v.createElement("div",{"aria-hidden":!0},e)))})});function rQ(e){let t=v.useRef(e);return r0(()=>{t.current=e}),t}var r0="undefined"==typeof window?v.useEffect:v.useLayoutEffect;function r1(e){let t=v.useRef();return void 0===t.current&&(t.current=e()),t}function r2(e){let t=v.useContext(rV),r=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,r,r)}function r5(e,t,r,n=[]){let o=v.useRef(),a=v.useContext(rB);return r0(()=>{var i;let l=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),s=n.map(e=>e.trim());a.value(e,l,s),null==(i=t.current)||i.setAttribute(r$,l),o.current=l}),o}var r4=()=>{let[e,t]=v.useState(),r=r1(()=>new Map);return r0(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}};function r3({asChild:e,children:t},r){let n;return e&&v.isValidElement(t)?v.cloneElement("function"==typeof(n=t.type)?n(t.props):"render"in n?n.render(t.props):t,{ref:t.ref},r(t.props.children)):r(t)}var r8={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};let r6=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},r9=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var r7={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"};let ne=(0,v.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},s)=>(0,v.createElement)("svg",{ref:s,...r7,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:r9("lucide",o),...!a&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(a)?a:[a]])),nt=(e,t)=>{let r=(0,v.forwardRef)(({className:r,...n},o)=>(0,v.createElement)(ne,{ref:o,iconNode:t,className:r9(`lucide-${r6(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...n}));return r.displayName=r6(e),r};e.s(["default",()=>nt],75254);let nr=nt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>nr],55436);let nn=nt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>nn],37727);let no=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rh,{ref:r,className:e$("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));no.displayName=rh.displayName;let na=v.forwardRef(({className:e,children:t,...r},n)=>(0,g.jsxs)(rp,{children:[(0,g.jsx)(no,{}),(0,g.jsxs)(ry,{ref:n,className:e$("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,(0,g.jsxs)(rS,{className:"absolute right-4 top-4 rounded-sm ring-offset-background transition-opacity hover:opacity-80 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-foreground",children:[(0,g.jsx)(nn,{className:"h-4 w-4"}),(0,g.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));na.displayName=ry.displayName;let ni=({className:e,...t})=>(0,g.jsx)("div",{className:e$("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ni.displayName="DialogHeader";let nl=({className:e,...t})=>(0,g.jsx)("div",{className:e$("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});nl.displayName="DialogFooter";let ns=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rj,{ref:r,className:e$("text-lg font-semibold leading-none tracking-tight text-foreground",e),...t}));ns.displayName=rj.displayName;let nc=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rR,{ref:r,className:e$("text-sm text-muted-foreground",e),...t}));nc.displayName=rR.displayName,e.s(["Dialog",()=>rs,"DialogContent",()=>na,"DialogDescription",()=>nc,"DialogFooter",()=>nl,"DialogHeader",()=>ni,"DialogTitle",()=>ns],76223);let nd=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rJ,{ref:r,className:e$("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));nd.displayName=rJ.displayName;let nu=v.forwardRef(({className:e,...t},r)=>(0,g.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,g.jsx)(nr,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,g.jsx)(rJ.Input,{ref:r,className:e$("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));nu.displayName=rJ.Input.displayName;let nf=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rJ.List,{ref:r,className:e$("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));nf.displayName=rJ.List.displayName;let np=v.forwardRef((e,t)=>(0,g.jsx)(rJ.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));np.displayName=rJ.Empty.displayName;let nm=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rJ.Group,{ref:r,className:e$("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));nm.displayName=rJ.Group.displayName,v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rJ.Separator,{ref:r,className:e$("-mx-1 h-px bg-border",e),...t})).displayName=rJ.Separator.displayName;let nh=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(rJ.Item,{ref:r,className:e$("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));nh.displayName=rJ.Item.displayName;let ng=["top","right","bottom","left"],nv=Math.min,nb=Math.max,ny=Math.round,nx=Math.floor,nw=e=>({x:e,y:e}),nk={left:"right",right:"left",bottom:"top",top:"bottom"},nE={start:"end",end:"start"};function nj(e,t){return"function"==typeof e?e(t):e}function nC(e){return e.split("-")[0]}function nR(e){return e.split("-")[1]}function nN(e){return"x"===e?"y":"x"}function nS(e){return"y"===e?"height":"width"}let nO=new Set(["top","bottom"]);function nP(e){return nO.has(nC(e))?"y":"x"}function nA(e){return e.replace(/start|end/g,e=>nE[e])}let n_=["left","right"],nD=["right","left"],nM=["top","bottom"],nI=["bottom","top"];function nz(e){return e.replace(/left|right|bottom|top/g,e=>nk[e])}function nT(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function nL(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function nF(e,t,r){let n,{reference:o,floating:a}=e,i=nP(t),l=nN(nP(t)),s=nS(l),c=nC(t),d="y"===i,u=o.x+o.width/2-a.width/2,f=o.y+o.height/2-a.height/2,p=o[s]/2-a[s]/2;switch(c){case"top":n={x:u,y:o.y-a.height};break;case"bottom":n={x:u,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:f};break;case"left":n={x:o.x-a.width,y:f};break;default:n={x:o.x,y:o.y}}switch(nR(t)){case"start":n[l]-=p*(r&&d?-1:1);break;case"end":n[l]+=p*(r&&d?-1:1)}return n}let n$=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),s=await (null==i.isRTL?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=nF(c,n,s),f=n,p={},m=0;for(let r=0;r<l.length;r++){let{name:a,fn:h}=l[r],{x:g,y:v,data:b,reset:y}=await h({x:d,y:u,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=v?v:u,p={...p,[a]:{...p[a],...b}},y&&m<=50&&(m++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(c=!0===y.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):y.rects),{x:d,y:u}=nF(c,f,s)),r=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:p}};async function nW(e,t){var r;void 0===t&&(t={});let{x:n,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=nj(t,e),m=nT(p),h=l[f?"floating"===u?"reference":"floating":u],g=nL(await a.getClippingRect({element:null==(r=await (null==a.isElement?void 0:a.isElement(h)))||r?h:h.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),v="floating"===u?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await (null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),y=await (null==a.isElement?void 0:a.isElement(b))&&await (null==a.getScale?void 0:a.getScale(b))||{x:1,y:1},x=nL(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:b,strategy:s}):v);return{top:(g.top-x.top+m.top)/y.y,bottom:(x.bottom-g.bottom+m.bottom)/y.y,left:(g.left-x.left+m.left)/y.x,right:(x.right-g.right+m.right)/y.x}}function nB(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nV(e){return ng.some(t=>e[t]>=0)}let nH=new Set(["left","top"]);async function nU(e,t){let{placement:r,platform:n,elements:o}=e,a=await (null==n.isRTL?void 0:n.isRTL(o.floating)),i=nC(r),l=nR(r),s="y"===nP(r),c=nH.has(i)?-1:1,d=a&&s?-1:1,u=nj(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*d,y:f*c}:{x:f*c,y:p*d}}function nG(){return"undefined"!=typeof window}function nq(e){return nY(e)?(e.nodeName||"").toLowerCase():"#document"}function nK(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function nX(e){var t;return null==(t=(nY(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function nY(e){return!!nG()&&(e instanceof Node||e instanceof nK(e).Node)}function nZ(e){return!!nG()&&(e instanceof Element||e instanceof nK(e).Element)}function nJ(e){return!!nG()&&(e instanceof HTMLElement||e instanceof nK(e).HTMLElement)}function nQ(e){return!!nG()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof nK(e).ShadowRoot)}let n0=new Set(["inline","contents"]);function n1(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=or(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!n0.has(o)}let n2=new Set(["table","td","th"]),n5=[":popover-open",":modal"];function n4(e){return n5.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let n3=["transform","translate","scale","rotate","perspective"],n8=["transform","translate","scale","rotate","perspective","filter"],n6=["paint","layout","strict","content"];function n9(e){let t=n7(),r=nZ(e)?or(e):e;return n3.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||n8.some(e=>(r.willChange||"").includes(e))||n6.some(e=>(r.contain||"").includes(e))}function n7(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let oe=new Set(["html","body","#document"]);function ot(e){return oe.has(nq(e))}function or(e){return nK(e).getComputedStyle(e)}function on(e){return nZ(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oo(e){if("html"===nq(e))return e;let t=e.assignedSlot||e.parentNode||nQ(e)&&e.host||nX(e);return nQ(t)?t.host:t}function oa(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let o=function e(t){let r=oo(t);return ot(r)?t.ownerDocument?t.ownerDocument.body:t.body:nJ(r)&&n1(r)?r:e(r)}(e),a=o===(null==(n=e.ownerDocument)?void 0:n.body),i=nK(o);if(a){let e=oi(i);return t.concat(i,i.visualViewport||[],n1(o)?o:[],e&&r?oa(e):[])}return t.concat(o,oa(o,[],r))}function oi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ol(e){let t=or(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=nJ(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=ny(r)!==a||ny(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function os(e){return nZ(e)?e:e.contextElement}function oc(e){let t=os(e);if(!nJ(t))return nw(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:a}=ol(t),i=(a?ny(r.width):r.width)/n,l=(a?ny(r.height):r.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}let od=nw(0);function ou(e){let t=nK(e);return n7()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:od}function of(e,t,r,n){var o;void 0===t&&(t=!1),void 0===r&&(r=!1);let a=e.getBoundingClientRect(),i=os(e),l=nw(1);t&&(n?nZ(n)&&(l=oc(n)):l=oc(e));let s=(void 0===(o=r)&&(o=!1),n&&(!o||n===nK(i))&&o)?ou(i):nw(0),c=(a.left+s.x)/l.x,d=(a.top+s.y)/l.y,u=a.width/l.x,f=a.height/l.y;if(i){let e=nK(i),t=n&&nZ(n)?nK(n):n,r=e,o=oi(r);for(;o&&n&&t!==r;){let e=oc(o),t=o.getBoundingClientRect(),n=or(o),a=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,d*=e.y,u*=e.x,f*=e.y,c+=a,d+=i,o=oi(r=nK(o))}}return nL({width:u,height:f,x:c,y:d})}function op(e,t){let r=on(e).scrollLeft;return t?t.left+r:of(nX(e)).left+r}function om(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-op(e,r),y:r.top+t.scrollTop}}let oh=new Set(["absolute","fixed"]);function og(e,t,r){var n;let o;if("viewport"===t)o=function(e,t){let r=nK(e),n=nX(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;let e=n7();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}let c=op(n);if(c<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,i=Math.abs(n.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:l,y:s}}(e,r);else if("document"===t){let t,r,a,i,l,s,c;n=nX(e),t=nX(n),r=on(n),a=n.ownerDocument.body,i=nb(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=nb(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),s=-r.scrollLeft+op(n),c=-r.scrollTop,"rtl"===or(a).direction&&(s+=nb(t.clientWidth,a.clientWidth)-i),o={width:i,height:l,x:s,y:c}}else if(nZ(t)){let e,n,a,i,l,s;n=(e=of(t,!0,"fixed"===r)).top+t.clientTop,a=e.left+t.clientLeft,i=nJ(t)?oc(t):nw(1),l=t.clientWidth*i.x,s=t.clientHeight*i.y,o={width:l,height:s,x:a*i.x,y:n*i.y}}else{let r=ou(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return nL(o)}function ov(e){return"static"===or(e).position}function ob(e,t){if(!nJ(e)||"fixed"===or(e).position)return null;if(t)return t(e);let r=e.offsetParent;return nX(e)===r&&(r=r.ownerDocument.body),r}function oy(e,t){var r;let n=nK(e);if(n4(e))return n;if(!nJ(e)){let t=oo(e);for(;t&&!ot(t);){if(nZ(t)&&!ov(t))return t;t=oo(t)}return n}let o=ob(e,t);for(;o&&(r=o,n2.has(nq(r)))&&ov(o);)o=ob(o,t);return o&&ot(o)&&ov(o)&&!n9(o)?n:o||function(e){let t=oo(e);for(;nJ(t)&&!ot(t);){if(n9(t))return t;if(n4(t))break;t=oo(t)}return null}(e)||n}let ox=async function(e){let t=this.getOffsetParent||oy,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=nJ(t),o=nX(t),a="fixed"===r,i=of(e,!0,a,t),l={scrollLeft:0,scrollTop:0},s=nw(0);if(n||!n&&!a)if(("body"!==nq(t)||n1(o))&&(l=on(t)),n){let e=of(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=op(o));a&&!n&&o&&(s.x=op(o));let c=!o||n||a?nw(0):om(o,l);return{x:i.left+l.scrollLeft-s.x-c.x,y:i.top+l.scrollTop-s.y-c.y,width:i.width,height:i.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},ow={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,a="fixed"===o,i=nX(n),l=!!t&&n4(t.floating);if(n===i||l&&a)return r;let s={scrollLeft:0,scrollTop:0},c=nw(1),d=nw(0),u=nJ(n);if((u||!u&&!a)&&(("body"!==nq(n)||n1(i))&&(s=on(n)),nJ(n))){let e=of(n);c=oc(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}let f=!i||u||a?nw(0):om(i,s);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-s.scrollTop*c.y+d.y+f.y}},getDocumentElement:nX,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,a=[..."clippingAncestors"===r?n4(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=oa(e,[],!1).filter(e=>nZ(e)&&"body"!==nq(e)),o=null,a="fixed"===or(e).position,i=a?oo(e):e;for(;nZ(i)&&!ot(i);){let t=or(i),r=n9(i);r||"fixed"!==t.position||(o=null),(a?!r&&!o:!r&&"static"===t.position&&!!o&&oh.has(o.position)||n1(i)&&!r&&function e(t,r){let n=oo(t);return!(n===r||!nZ(n)||ot(n))&&("fixed"===or(n).position||e(n,r))}(e,i))?n=n.filter(e=>e!==i):o=t,i=oo(i)}return t.set(e,n),n}(t,this._c):[].concat(r),n],i=a[0],l=a.reduce((e,r)=>{let n=og(t,r,o);return e.top=nb(n.top,e.top),e.right=nv(n.right,e.right),e.bottom=nv(n.bottom,e.bottom),e.left=nb(n.left,e.left),e},og(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:oy,getElementRects:ox,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=ol(e);return{width:t,height:r}},getScale:oc,isElement:nZ,isRTL:function(e){return"rtl"===or(e).direction}};function ok(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let oE=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=nj(e,t)||{};if(null==c)return{};let u=nT(d),f={x:r,y:n},p=nN(nP(o)),m=nS(p),h=await i.getDimensions(c),g="y"===p,v=g?"clientHeight":"clientWidth",b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],y=f[p]-a.reference[p],x=await (null==i.getOffsetParent?void 0:i.getOffsetParent(c)),w=x?x[v]:0;w&&await (null==i.isElement?void 0:i.isElement(x))||(w=l.floating[v]||a.floating[m]);let k=w/2-h[m]/2-1,E=nv(u[g?"top":"left"],k),j=nv(u[g?"bottom":"right"],k),C=w-h[m]-j,R=w/2-h[m]/2+(b/2-y/2),N=nb(E,nv(R,C)),S=!s.arrow&&null!=nR(o)&&R!==N&&a.reference[m]/2-(R<E?E:j)-h[m]/2<0,O=S?R<E?R-E:R-C:0;return{[p]:f[p]+O,data:{[p]:N,centerOffset:R-N-O,...S&&{alignmentOffset:O}},reset:S}}});var oj="undefined"!=typeof document?v.useLayoutEffect:function(){};function oC(e,t){let r,n,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!oC(e[n],t[n]))return!1;return!0}if((r=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){let r=o[n];if(("_owner"!==r||!e.$$typeof)&&!oC(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function oR(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oN(e,t){let r=oR(e);return Math.round(t*r)/r}function oS(e){let t=v.useRef(e);return oj(()=>{t.current=e}),t}var oO=v.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...a}=e;return(0,g.jsx)(e8.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,g.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function oP(e){let[t,r]=v.useState(void 0);return eZ(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,o;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,o=t.blockSize}else n=e.offsetWidth,o=e.offsetHeight;r({width:n,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}oO.displayName="Arrow",e.s(["useSize",()=>oP],35804);var oA="Popper",[o_,oD]=eY(oA),[oM,oI]=o_(oA),oz=e=>{let{__scopePopper:t,children:r}=e,[n,o]=v.useState(null);return(0,g.jsx)(oM,{scope:t,anchor:n,onAnchorChange:o,children:r})};oz.displayName=oA;var oT="PopperAnchor",oL=v.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...o}=e,a=oI(oT,r),i=v.useRef(null),l=E(t,i),s=v.useRef(null);return v.useEffect(()=>{let e=s.current;s.current=n?.current||i.current,e!==s.current&&a.onAnchorChange(s.current)}),n?null:(0,g.jsx)(e8.div,{...o,ref:l})});oL.displayName=oT;var oF="PopperContent",[o$,oW]=o_(oF),oB=v.forwardRef((e,t)=>{var r,n,o,a,i,l,s,c,d,u,f,p,m,h,b,y,x,w,k,j,C;let{__scopePopper:R,side:N="bottom",sideOffset:S=0,align:O="center",alignOffset:P=0,arrowPadding:A=0,avoidCollisions:_=!0,collisionBoundary:D=[],collisionPadding:M=0,sticky:I="partial",hideWhenDetached:z=!1,updatePositionStrategy:T="optimized",onPlaced:L,...F}=e,$=oI(oF,R),[W,B]=v.useState(null),V=E(t,e=>B(e)),[H,U]=v.useState(null),G=oP(H),q=G?.width??0,K=G?.height??0,X="number"==typeof M?M:{top:0,right:0,bottom:0,left:0,...M},Y=Array.isArray(D)?D:[D],Z=Y.length>0,J={padding:X,boundary:Y.filter(oG),altBoundary:Z},{refs:Q,floatingStyles:ee,placement:et,isPositioned:er,middlewareData:en}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[d,u]=v.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(n);oC(f,n)||p(n);let[m,h]=v.useState(null),[g,b]=v.useState(null),y=v.useCallback(e=>{e!==E.current&&(E.current=e,h(e))},[]),x=v.useCallback(e=>{e!==j.current&&(j.current=e,b(e))},[]),w=a||m,k=i||g,E=v.useRef(null),j=v.useRef(null),C=v.useRef(d),R=null!=s,N=oS(s),S=oS(o),O=oS(c),P=v.useCallback(()=>{var e,n;let o,a,i;if(!E.current||!j.current)return;let l={placement:t,strategy:r,middleware:f};S.current&&(l.platform=S.current),(e=E.current,n=j.current,o=new Map,i={...(a={platform:ow,...l}).platform,_c:o},n$(e,n,{...a,platform:i})).then(e=>{let t={...e,isPositioned:!1!==O.current};A.current&&!oC(C.current,t)&&(C.current=t,e5.flushSync(()=>{u(t)}))})},[f,t,r,S,O]);oj(()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[c]);let A=v.useRef(!1);oj(()=>(A.current=!0,()=>{A.current=!1}),[]),oj(()=>{if(w&&(E.current=w),k&&(j.current=k),w&&k){if(N.current)return N.current(w,k,P);P()}},[w,k,P,N,R]);let _=v.useMemo(()=>({reference:E,floating:j,setReference:y,setFloating:x}),[y,x]),D=v.useMemo(()=>({reference:w,floating:k}),[w,k]),M=v.useMemo(()=>{let e={position:r,left:0,top:0};if(!D.floating)return e;let t=oN(D.floating,d.x),n=oN(D.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...oR(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,D.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:P,refs:_,elements:D,floatingStyles:M}),[d,P,_,D,M])}({strategy:"fixed",placement:N+("center"!==O?"-"+O:""),whileElementsMounted:(...e)=>(function(e,t,r,n){let o;void 0===n&&(n={});let{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:c=!1}=n,d=os(e),u=a||i?[...d?oa(d):[],...oa(t)]:[];u.forEach(e=>{a&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)});let f=d&&s?function(e,t){let r,n=null,o=nX(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),a();let c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:p}=c;if(l||t(),!f||!p)return;let m={rootMargin:-nx(u)+"px "+-nx(o.clientWidth-(d+f))+"px "+-nx(o.clientHeight-(u+p))+"px "+-nx(d)+"px",threshold:nb(0,nv(1,s))||1},h=!0;function g(t){let n=t[0].intersectionRatio;if(n!==s){if(!h)return i();n?i(!1,n):r=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==n||ok(c,e.getBoundingClientRect())||i(),h=!1}try{n=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(g,m)}n.observe(e)}(!0),a}(d,r):null,p=-1,m=null;l&&(m=new ResizeObserver(e=>{let[n]=e;n&&n.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),r()}),d&&!c&&m.observe(d),m.observe(t));let h=c?of(e):null;return c&&function t(){let n=of(e);h&&!ok(h,n)&&r(),h=n,o=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach(e=>{a&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(o)}})(...e,{animationFrame:"always"===T}),elements:{reference:$.anchor},middleware:[{...{name:"offset",options:o=r={mainAxis:S+K,alignmentAxis:P},async fn(e){var t,r;let{x:n,y:a,placement:i,middlewareData:l}=e,s=await nU(e,o);return i===(null==(t=l.offset)?void 0:t.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:n+s.x,y:a+s.y,data:{...s,placement:i}}}},options:[r,n]},_&&{...{name:"shift",options:d=s={mainAxis:!0,crossAxis:!1,limiter:"partial"===I?{...(void 0===(l=a)&&(l={}),{options:l,fn(e){let{x:t,y:r,placement:n,rects:o,middlewareData:a}=e,{offset:i=0,mainAxis:s=!0,crossAxis:c=!0}=nj(l,e),d={x:t,y:r},u=nP(n),f=nN(u),p=d[f],m=d[u],h=nj(i,e),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){let e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+g.mainAxis,r=o.reference[f]+o.reference[e]-g.mainAxis;p<t?p=t:p>r&&(p=r)}if(c){var v,b;let e="y"===f?"width":"height",t=nH.has(nC(n)),r=o.reference[u]-o.floating[e]+(t&&(null==(v=a.offset)?void 0:v[u])||0)+(t?0:g.crossAxis),i=o.reference[u]+o.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[u])||0)-(t?g.crossAxis:0);m<r?m=r:m>i&&(m=i)}return{[f]:p,[u]:m}}}),options:[a,i]}:void 0,...J},async fn(e){let{x:t,y:r,placement:n}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:i={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=nj(d,e),s={x:t,y:r},c=await nW(e,l),u=nP(nC(n)),f=nN(u),p=s[f],m=s[u];if(o){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=p+c[e],n=p-c[t];p=nb(r,nv(p,n))}if(a){let e="y"===u?"top":"left",t="y"===u?"bottom":"right",r=m+c[e],n=m-c[t];m=nb(r,nv(m,n))}let h=i.fn({...e,[f]:p,[u]:m});return{...h,data:{x:h.x-t,y:h.y-r,enabled:{[f]:o,[u]:a}}}}},options:[s,c]},_&&{...{name:"flip",options:p=u={...J},async fn(e){var t,r,n,o,a,i,l,s;let c,d,u,{placement:f,middlewareData:m,rects:h,initialPlacement:g,platform:v,elements:b}=e,{mainAxis:y=!0,crossAxis:x=!0,fallbackPlacements:w,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:j=!0,...C}=nj(p,e);if(null!=(t=m.arrow)&&t.alignmentOffset)return{};let R=nC(f),N=nP(g),S=nC(g)===g,O=await (null==v.isRTL?void 0:v.isRTL(b.floating)),P=w||(S||!j?[nz(g)]:(c=nz(g),[nA(g),c,nA(c)])),A="none"!==E;!w&&A&&P.push(...(d=nR(g),u=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?nD:n_;return t?n_:nD;case"left":case"right":return t?nM:nI;default:return[]}}(nC(g),"start"===E,O),d&&(u=u.map(e=>e+"-"+d),j&&(u=u.concat(u.map(nA)))),u));let _=[g,...P],D=await nW(e,C),M=[],I=(null==(r=m.flip)?void 0:r.overflows)||[];if(y&&M.push(D[R]),x){let e,t,r,n,o=(i=f,l=h,void 0===(s=O)&&(s=!1),e=nR(i),r=nS(t=nN(nP(i))),n="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",l.reference[r]>l.floating[r]&&(n=nz(n)),[n,nz(n)]);M.push(D[o[0]],D[o[1]])}if(I=[...I,{placement:f,overflows:M}],!M.every(e=>e<=0)){let e=((null==(n=m.flip)?void 0:n.index)||0)+1,t=_[e];if(t&&("alignment"!==x||N===nP(t)||I.every(e=>nP(e.placement)!==N||e.overflows[0]>0)))return{data:{index:e,overflows:I},reset:{placement:t}};let r=null==(o=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(k){case"bestFit":{let e=null==(a=I.filter(e=>{if(A){let t=nP(e.placement);return t===N||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=g}if(f!==r)return{reset:{placement:r}}}return{}}},options:[u,f]},{...{name:"size",options:b=m={...J,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${r}px`),i.setProperty("--radix-popper-available-height",`${n}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}},async fn(e){var t,r;let n,o,{placement:a,rects:i,platform:l,elements:s}=e,{apply:c=()=>{},...d}=nj(b,e),u=await nW(e,d),f=nC(a),p=nR(a),m="y"===nP(a),{width:h,height:g}=i.floating;"top"===f||"bottom"===f?(n=f,o=p===(await (null==l.isRTL?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(o=f,n="end"===p?"top":"bottom");let v=g-u.top-u.bottom,y=h-u.left-u.right,x=nv(g-u[n],v),w=nv(h-u[o],y),k=!e.middlewareData.shift,E=x,j=w;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(j=y),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(E=v),k&&!p){let e=nb(u.left,0),t=nb(u.right,0),r=nb(u.top,0),n=nb(u.bottom,0);m?j=h-2*(0!==e||0!==t?e+t:nb(u.left,u.right)):E=g-2*(0!==r||0!==n?r+n:nb(u.top,u.bottom))}await c({...e,availableWidth:j,availableHeight:E});let C=await l.getDimensions(s.floating);return h!==C.width||g!==C.height?{reset:{rects:!0}}:{}}},options:[m,h]},H&&{...{name:"arrow",options:w=y={element:H,padding:A},fn(e){let{element:t,padding:r}="function"==typeof w?w(e):w;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?oE({element:t.current,padding:r}).fn(e):{}:t?oE({element:t,padding:r}).fn(e):{}}},options:[y,x]},oq({arrowWidth:q,arrowHeight:K}),z&&{...{name:"hide",options:C=k={strategy:"referenceHidden",...J},async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...n}=nj(C,e);switch(r){case"referenceHidden":{let r=nB(await nW(e,{...n,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:nV(r)}}}case"escaped":{let r=nB(await nW(e,{...n,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:nV(r)}}}default:return{}}}},options:[k,j]}]}),[eo,ea]=oK(et),ei=e9(L);eZ(()=>{er&&ei?.()},[er,ei]);let el=en.arrow?.x,es=en.arrow?.y,ec=en.arrow?.centerOffset!==0,[ed,eu]=v.useState();return eZ(()=>{W&&eu(window.getComputedStyle(W).zIndex)},[W]),(0,g.jsx)("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:er?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ed,"--radix-popper-transform-origin":[en.transformOrigin?.x,en.transformOrigin?.y].join(" "),...en.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,g.jsx)(o$,{scope:R,placedSide:eo,onArrowChange:U,arrowX:el,arrowY:es,shouldHideArrow:ec,children:(0,g.jsx)(e8.div,{"data-side":eo,"data-align":ea,...F,ref:V,style:{...F.style,animation:er?void 0:"none"}})})})});oB.displayName=oF;var oV="PopperArrow",oH={top:"bottom",right:"left",bottom:"top",left:"right"},oU=v.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,o=oW(oV,r),a=oH[o.placedSide];return(0,g.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,g.jsx)(oO,{...n,ref:t,style:{...n.style,display:"block"}})})});function oG(e){return null!==e}oU.displayName=oV;var oq=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[s,c]=oK(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+l/2,p="",m="";return"bottom"===s?(p=a?d:`${u}px`,m=`${-l}px`):"top"===s?(p=a?d:`${u}px`,m=`${n.floating.height+l}px`):"right"===s?(p=`${-l}px`,m=a?d:`${f}px`):"left"===s&&(p=`${n.floating.width+l}px`,m=a?d:`${f}px`),{data:{x:p,y:m}}}});function oK(e){let[t,r="center"]=e.split("-");return[t,r]}e.s(["Anchor",()=>oL,"Arrow",()=>oU,"Content",()=>oB,"Root",()=>oz,"createPopperScope",()=>oD],53660);var oX=Symbol("radix.slottable");function oY(e){return v.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===oX}var oZ="Popover",[oJ,oQ]=eY(oZ,[oD]),o0=oD(),[o1,o2]=oJ(oZ),o5=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=o0(t),s=v.useRef(null),[c,d]=v.useState(!1),[u,f]=e2({prop:n,defaultProp:o??!1,onChange:a,caller:oZ});return(0,g.jsx)(oz,{...l,children:(0,g.jsx)(o1,{scope:t,contentId:e0(),triggerRef:s,open:u,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:c,onCustomAnchorAdd:v.useCallback(()=>d(!0),[]),onCustomAnchorRemove:v.useCallback(()=>d(!1),[]),modal:i,children:r})})};o5.displayName=oZ;var o4="PopoverAnchor";v.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=o2(o4,r),a=o0(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return v.useEffect(()=>(i(),()=>l()),[i,l]),(0,g.jsx)(oL,{...a,...n,ref:t})}).displayName=o4;var o3="PopoverTrigger",o8=v.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=o2(o3,r),a=o0(r),i=E(t,o.triggerRef),l=(0,g.jsx)(e8.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":as(o.open),...n,ref:i,onClick:eK(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:(0,g.jsx)(oL,{asChild:!0,...a,children:l})});o8.displayName=o3;var o6="PopoverPortal",[o9,o7]=oJ(o6,{forceMount:void 0}),ae=e=>{let{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=o2(o6,t);return(0,g.jsx)(o9,{scope:t,forceMount:r,children:(0,g.jsx)(tm,{present:r||a.open,children:(0,g.jsx)(tp,{asChild:!0,container:o,children:n})})})};ae.displayName=o6;var at="PopoverContent",ar=v.forwardRef((e,t)=>{let r=o7(at,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=o2(at,e.__scopePopover);return(0,g.jsx)(tm,{present:n||a.open,children:a.modal?(0,g.jsx)(ao,{...o,ref:t}):(0,g.jsx)(aa,{...o,ref:t})})});ar.displayName=at;var an=((l=v.forwardRef((e,t)=>{let{children:r,...n}=e;if(v.isValidElement(r)){var o;let e,a,i=(o=r,(a=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(a=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref),l=function(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...e)=>{let t=a(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...a}:"className"===n&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==v.Fragment&&(l.ref=t?k(t,i):i),v.cloneElement(r,l)}return v.Children.count(r)>1?v.Children.only(null):null})).displayName="PopoverContent.RemoveScroll.SlotClone",n=l,(o=v.forwardRef((e,t)=>{let{children:r,...o}=e,a=v.Children.toArray(r),i=a.find(oY);if(i){let e=i.props.children,r=a.map(t=>t!==i?t:v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null);return(0,g.jsx)(n,{...o,ref:t,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return(0,g.jsx)(n,{...o,ref:t,children:r})})).displayName="PopoverContent.RemoveScroll.Slot",o),ao=v.forwardRef((e,t)=>{let r=o2(at,e.__scopePopover),n=v.useRef(null),o=E(t,n),a=v.useRef(!1);return v.useEffect(()=>{let e=n.current;if(e)return re(e)},[]),(0,g.jsx)(t5,{as:an,allowPinchZoom:!0,children:(0,g.jsx)(ai,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:eK(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:eK(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;a.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:eK(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),aa=v.forwardRef((e,t)=>{let r=o2(at,e.__scopePopover),n=v.useRef(!1),o=v.useRef(!1);return(0,g.jsx)(ai,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let a=t.target;r.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),ai=v.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:d,...u}=e,f=o2(at,r),p=o0(r);return tv(),(0,g.jsx)(tl,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,g.jsx)(tt,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:(0,g.jsx)(oB,{"data-state":as(f.open),role:"dialog",id:f.contentId,...p,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),al="PopoverClose";function as(e){return e?"open":"closed"}v.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=o2(al,r);return(0,g.jsx)(e8.button,{type:"button",...n,ref:t,onClick:eK(e.onClick,()=>o.onOpenChange(!1))})}).displayName=al,v.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=o0(r);return(0,g.jsx)(oU,{...o,...n,ref:t})}).displayName="PopoverArrow";let ac=v.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>(0,g.jsx)(ae,{children:(0,g.jsx)(ar,{ref:o,align:t,sideOffset:r,className:e$("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...n})}));ac.displayName=ar.displayName;let ad=v.forwardRef(({className:e,type:t,...r},n)=>(0,g.jsx)("input",{type:t,className:e$("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));ad.displayName="Input",e.s(["Input",()=>ad],80208);let au=nt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>au],43531);let af=nt("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),ap=nt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),am=nt("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),ah=nt("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),ag=nt("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);var av=e.i(42408),ab=e.i(57688);let ay=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)("textarea",{className:e$("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...t}));function ax(e){let t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}ay.displayName="Textarea",e.s(["Textarea",()=>ay],1864),e.s(["usePrevious",()=>ax],99682);var aw="Checkbox",[ak,aE]=eY(aw),[aj,aC]=ak(aw);function aR(e){let{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:l,onCheckedChange:s,required:c,value:d="on",internal_do_not_use_render:u}=e,[f,p]=e2({prop:r,defaultProp:o??!1,onChange:s,caller:aw}),[m,h]=v.useState(null),[b,y]=v.useState(null),x=v.useRef(!1),w=!m||!!i||!!m.closest("form"),k={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:l,form:i,value:d,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:!aM(o)&&o,isFormControl:w,bubbleInput:b,setBubbleInput:y};return(0,g.jsx)(aj,{scope:t,...k,children:"function"==typeof u?u(k):n})}var aN="CheckboxTrigger",aS=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{let{control:a,value:i,disabled:l,checked:s,required:c,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=aC(aN,e),h=E(o,d),b=v.useRef(s);return v.useEffect(()=>{let e=a?.form;if(e){let t=()=>u(b.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[a,u]),(0,g.jsx)(e8.button,{type:"button",role:"checkbox","aria-checked":aM(s)?"mixed":s,"aria-required":c,"data-state":aI(s),"data-disabled":l?"":void 0,disabled:l,value:i,...n,ref:h,onKeyDown:eK(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:eK(r,e=>{u(e=>!!aM(e)||!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});aS.displayName=aN;var aO=v.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:s,onCheckedChange:c,form:d,...u}=e;return(0,g.jsx)(aR,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:l,required:i,onCheckedChange:c,name:n,form:d,value:s,internal_do_not_use_render:({isFormControl:e})=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(aS,{...u,ref:t,__scopeCheckbox:r}),e&&(0,g.jsx)(aD,{__scopeCheckbox:r})]})})});aO.displayName=aw;var aP="CheckboxIndicator",aA=v.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...o}=e,a=aC(aP,r);return(0,g.jsx)(tm,{present:n||aM(a.checked)||!0===a.checked,children:(0,g.jsx)(e8.span,{"data-state":aI(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});aA.displayName=aP;var a_="CheckboxBubbleInput",aD=v.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:l,disabled:s,name:c,value:d,form:u,bubbleInput:f,setBubbleInput:p}=aC(a_,e),m=E(r,p),h=ax(a),b=oP(n);v.useEffect(()=>{if(!f)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!o.current;if(h!==a&&e){let r=new Event("click",{bubbles:t});f.indeterminate=aM(a),e.call(f,!aM(a)&&a),f.dispatchEvent(r)}},[f,h,a,o]);let y=v.useRef(!aM(a)&&a);return(0,g.jsx)(e8.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:l,disabled:s,name:c,value:d,form:u,...t,tabIndex:-1,ref:m,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function aM(e){return"indeterminate"===e}function aI(e){return aM(e)?"indeterminate":e?"checked":"unchecked"}aD.displayName=a_;let az=v.forwardRef(({className:e,...t},r)=>(0,g.jsx)(aO,{ref:r,className:e$("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:(0,g.jsx)(aA,{className:e$("grid place-content-center text-current"),children:(0,g.jsx)(au,{className:"h-4 w-4"})})}));function aT(){let e=(0,b.useRouter)(),t=(0,b.useSearchParams)(),{currentBank:r,setCurrentBank:n,banks:o,loadBanks:a}=(0,y.useBank)(),{theme:i,toggleTheme:l}=(0,av.useTheme)(),[s,c]=v.useState(!1),[d,u]=v.useState(!1),[f,p]=v.useState(""),[m,h]=v.useState(!1),[w,k]=v.useState(null),[E,j]=v.useState(!1),[C,R]=v.useState(""),[N,S]=v.useState(""),[O,P]=v.useState(""),[A,_]=v.useState(""),[D,M]=v.useState(!1),[I,z]=v.useState(!1),[T,L]=v.useState(null),F=v.useMemo(()=>[...o].sort((e,t)=>e.localeCompare(t)),[o]),$=async()=>{if(f.trim()){h(!0),k(null);try{await x.client.createBank(f.trim()),await a(),u(!1),p(""),n(f.trim()),e.push(`/banks/${f.trim()}?view=data`)}catch(e){k(e instanceof Error?e.message:"Failed to create bank")}finally{h(!1)}}},W=async()=>{if(r&&C.trim()){z(!0),L(null);try{let t={content:C};N&&(t.context=N),O&&(t.timestamp=O+":00");let n={bank_id:r,items:[t]};A&&(n.document_id=A),D?await x.client.retain({...n,async:!0}):await x.client.retain(n),j(!1),R(""),S(""),P(""),_(""),M(!1),e.push(`/banks/${r}?view=documents`)}catch(e){L(e instanceof Error?e.message:"Failed to create document")}finally{z(!1)}}};return(0,g.jsx)("div",{className:"bg-card text-card-foreground px-5 py-3 border-b-4 border-primary-gradient",children:(0,g.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[(0,g.jsx)(ab.default,{src:"/logo.png",alt:"Hindsight",width:40,height:40,className:"h-10 w-auto",unoptimized:!0}),(0,g.jsx)("div",{className:"h-8 w-px bg-border"}),(0,g.jsxs)(o5,{open:s,onOpenChange:c,children:[(0,g.jsx)(o8,{asChild:!0,children:(0,g.jsxs)(eB,{variant:"outline",role:"combobox","aria-expanded":s,className:"w-[250px] justify-between font-bold border-2 border-primary hover:bg-accent",children:[r||"Select a memory bank...",(0,g.jsx)(af,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,g.jsx)(ac,{className:"w-[250px] p-0",children:(0,g.jsxs)(nd,{children:[F.length>0&&(0,g.jsx)(nu,{placeholder:"Search memory banks..."}),(0,g.jsxs)(nf,{children:[(0,g.jsx)(np,{children:"No memory banks yet."}),(0,g.jsx)(nm,{children:F.map(o=>(0,g.jsxs)(nh,{value:o,onSelect:r=>{n(r),c(!1);let o=t.get("view")||"data",a=t.get("subTab"),i=a?`?view=${o}&subTab=${a}`:`?view=${o}`;e.push(`/banks/${r}${i}`)},children:[(0,g.jsx)(au,{className:e$("mr-2 h-4 w-4",r===o?"opacity-100":"opacity-0")}),o]},o))})]}),(0,g.jsx)("div",{className:"border-t border-border p-1",children:(0,g.jsxs)("button",{className:"w-full flex items-center gap-2 px-2 py-2 text-sm rounded-md hover:bg-accent transition-colors text-muted-foreground hover:text-foreground",onClick:()=>{c(!1),u(!0)},children:[(0,g.jsx)(ap,{className:"h-4 w-4"}),(0,g.jsx)("span",{children:"Create new bank"})]})})]})})]}),(0,g.jsx)("div",{className:"h-8 w-px bg-border"}),r&&(0,g.jsxs)(eB,{variant:"outline",size:"sm",className:"h-9 gap-1.5",onClick:()=>j(!0),title:"Add document to current bank",children:[(0,g.jsx)(ap,{className:"h-4 w-4"}),(0,g.jsx)("span",{children:"Add Document"})]}),(0,g.jsx)("div",{className:"flex-1"}),(0,g.jsxs)("a",{href:"https://github.com/vectorize-io/hindsight",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-accent transition-colors text-muted-foreground hover:text-foreground",title:"View on GitHub",children:[(0,g.jsx)(ag,{className:"h-5 w-5"}),(0,g.jsx)("span",{className:"text-sm font-medium",children:"GitHub"})]}),(0,g.jsx)("div",{className:"h-8 w-px bg-border"}),(0,g.jsx)(eB,{variant:"ghost",size:"icon",onClick:l,className:"h-9 w-9",title:"light"===i?"Switch to dark mode":"Switch to light mode",children:"light"===i?(0,g.jsx)(am,{className:"h-5 w-5"}):(0,g.jsx)(ah,{className:"h-5 w-5"})}),(0,g.jsx)(rs,{open:d,onOpenChange:u,children:(0,g.jsxs)(na,{className:"sm:max-w-[425px]",children:[(0,g.jsx)(ni,{children:(0,g.jsx)(ns,{children:"Create New Memory Bank"})}),(0,g.jsxs)("div",{className:"py-4",children:[(0,g.jsx)(ad,{placeholder:"Enter bank ID...",value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"!==e.key||m||$()},autoFocus:!0}),w&&(0,g.jsx)("p",{className:"text-sm text-destructive mt-2",children:w})]}),(0,g.jsxs)(nl,{children:[(0,g.jsx)(eB,{variant:"secondary",onClick:()=>{u(!1),p(""),k(null)},children:"Cancel"}),(0,g.jsx)(eB,{onClick:$,disabled:m||!f.trim(),children:m?"Creating...":"Create"})]})]})}),(0,g.jsx)(rs,{open:E,onOpenChange:j,children:(0,g.jsxs)(na,{className:"sm:max-w-[600px]",children:[(0,g.jsxs)(ni,{children:[(0,g.jsx)(ns,{children:"Add New Document"}),(0,g.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Add a new document to memory bank:"," ",(0,g.jsx)("span",{className:"font-semibold",children:r})]})]}),(0,g.jsxs)("div",{className:"py-4 space-y-4",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Content *"}),(0,g.jsx)(ay,{value:C,onChange:e=>R(e.target.value),placeholder:"Enter the document content...",className:"min-h-[150px] resize-y",autoFocus:!0})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Context"}),(0,g.jsx)(ad,{type:"text",value:N,onChange:e=>S(e.target.value),placeholder:"Optional context about this document..."})]}),(0,g.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Event Date"}),(0,g.jsx)(ad,{type:"datetime-local",value:O,onChange:e=>P(e.target.value),className:"text-foreground"})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Document ID"}),(0,g.jsx)(ad,{type:"text",value:A,onChange:e=>_(e.target.value),placeholder:"Optional document identifier..."})]})]}),(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(az,{id:"async-doc",checked:D,onCheckedChange:e=>M(e)}),(0,g.jsx)("label",{htmlFor:"async-doc",className:"text-sm cursor-pointer text-foreground",children:"Process in background (async)"})]}),T&&(0,g.jsx)("p",{className:"text-sm text-destructive",children:T})]}),(0,g.jsxs)(nl,{children:[(0,g.jsx)(eB,{variant:"secondary",onClick:()=>{j(!1),R(""),S(""),P(""),_(""),M(!1),L(null)},children:"Cancel"}),(0,g.jsx)(eB,{onClick:W,disabled:I||!C.trim(),children:I?"Adding...":"Add Document"})]})]})})]})})}function aL(){return(0,g.jsx)(v.Suspense,{fallback:(0,g.jsx)("div",{className:"bg-card text-card-foreground px-5 py-3 border-b-4 border-primary-gradient",children:(0,g.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[(0,g.jsx)(ab.default,{src:"/logo.png",alt:"Hindsight",width:40,height:40,className:"h-10 w-auto",unoptimized:!0}),(0,g.jsx)("div",{className:"h-8 w-px bg-border"}),(0,g.jsxs)(eB,{variant:"outline",className:"w-[250px] justify-between font-bold border-2 border-primary",disabled:!0,children:["Loading...",(0,g.jsx)(af,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),(0,g.jsx)("div",{className:"flex-1"}),(0,g.jsxs)("a",{href:"https://github.com/vectorize-io/hindsight",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-accent transition-colors text-muted-foreground",children:[(0,g.jsx)(ag,{className:"h-5 w-5"}),(0,g.jsx)("span",{className:"text-sm font-medium",children:"GitHub"})]}),(0,g.jsx)("div",{className:"h-8 w-px bg-border"}),(0,g.jsx)(eB,{variant:"ghost",size:"icon",className:"h-9 w-9",disabled:!0,children:(0,g.jsx)(am,{className:"h-5 w-5"})})]})}),children:(0,g.jsx)(aT,{})})}az.displayName=aO.displayName,e.s(["Checkbox",()=>az],32089),e.s(["BankSelector",()=>aL],99729)}]);
|
package/standalone/package.json
CHANGED
/package/standalone/.next/static/{HBb4Bmt5yCAxM0eUoT0bj → ZnG2ehiB5-BSYmAFEiFyG}/_buildManifest.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/standalone/.next/static/{HBb4Bmt5yCAxM0eUoT0bj → ZnG2ehiB5-BSYmAFEiFyG}/_ssgManifest.js
RENAMED
|
File without changes
|