@membank/dashboard 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.mjs +25 -6
- package/dist/client/assets/WorkspaceCenter-PpT-8GcH.js +1 -0
- package/dist/client/assets/WorkspaceMemoryDetail-CInd7oVg.js +1 -0
- package/dist/client/assets/_projectId-BBY1t0Aw.js +1 -0
- package/dist/client/assets/_projectId._memoryId-CLFHYqzf.js +1 -0
- package/dist/client/assets/_projectId.index-Cz1w0FSx.js +4 -0
- package/dist/client/assets/{collections-y7eMFwFc.js → collections-CjCv4IBK.js} +1 -1
- package/dist/client/assets/empty-DMv5m460.js +1 -0
- package/dist/client/assets/global-DkkLcPUz.js +1 -0
- package/dist/client/assets/{global._memoryId-DbiHUsW4.js → global._memoryId-C_6uW2wI.js} +1 -1
- package/dist/client/assets/{global.index-w6voN-YE.js → global.index-DLPM4DWb.js} +1 -1
- package/dist/client/assets/index-CP3vA60Z.css +2 -0
- package/dist/client/assets/index-D9OJJPjH.js +10 -0
- package/dist/client/assets/{input-BdBFU9te.js → input-V-rh1Z1b.js} +1 -1
- package/dist/client/assets/preload-helper-CAfwd7qG.js +1 -0
- package/dist/client/assets/routes-D9dF3uY0.js +1 -0
- package/dist/client/assets/{skeleton-BDvkvqhf.js → skeleton-CiFADsZy.js} +1 -1
- package/dist/client/assets/{types-DT_fBrSI.js → types-CKYjb0zP.js} +1 -1
- package/dist/client/assets/{useRenderElement-DhejdWAQ.js → useRenderElement-BpZtIOdZ.js} +1 -1
- package/dist/client/index.html +6 -6
- package/dist/index.cjs +24 -5
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +25 -6
- package/package.json +2 -2
- package/dist/client/assets/WorkspaceCenter-F8ctl0ZL.js +0 -1
- package/dist/client/assets/WorkspaceMemoryDetail-BLFoEX3q.js +0 -1
- package/dist/client/assets/_projectId-D3UHHv9-.js +0 -1
- package/dist/client/assets/_projectId._memoryId-CZOJ7L4F.js +0 -1
- package/dist/client/assets/_projectId.index-Dc3jTh6p.js +0 -1
- package/dist/client/assets/empty-C4Q9vAt-.js +0 -1
- package/dist/client/assets/global-BZgjloNm.js +0 -1
- package/dist/client/assets/index-B3Ej81eU.js +0 -10
- package/dist/client/assets/index-DHtBroPC.css +0 -2
- package/dist/client/assets/preload-helper-DYD3iRAO.js +0 -1
- package/dist/client/assets/routes-DdtLVWUF.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C as e,E as t,O as n,T as r,b as i}from"./collections-CjCv4IBK.js";import{A as a,M as o,O as s,j as c,k as l,o as u,t as d,v as f}from"./useRenderElement-BpZtIOdZ.js";import{D as p,M as m,b as h,j as g,p as _}from"./index-D9OJJPjH.js";var v=n(t());function y({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=v.useRef(e!==void 0),[a,o]=v.useState(t);return[i?e:a,v.useCallback(e=>{i||o(e)},[])]}var b=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),x={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},S={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},C={disabled:!1,...S},w={valid(e){return e===null?null:e?{[b.valid]:``}:{[b.invalid]:``}}},T=v.createContext({invalid:void 0,name:void 0,validityData:{state:x,errors:[],error:``,value:``,initialValue:null},setValidityData:l,disabled:void 0,touched:S.touched,setTouched:l,dirty:S.dirty,setDirty:l,filled:S.filled,setFilled:l,focused:S.focused,setFocused:l,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:C,markedDirtyRef:{current:!1},registerFieldControl:l,validation:{getValidationProps:(e=s)=>e,getInputValidationProps:(e=s)=>e,inputRef:{current:null},commit:async()=>{}}});function E(e=!0){let t=v.useContext(T);if(t.setValidityData===l&&!e)throw Error(a(28));return t}var D=v.createContext({controlId:void 0,registerControlId:l,labelId:void 0,setLabelId:l,messageIds:[],setMessageIds:l,getDescriptionProps:e=>e});function O(){return v.useContext(D)}function k(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=O(),s=_(t),d=n?i:void 0,p=o(()=>Symbol(`labelable-control`)),m=v.useRef(!1),h=v.useRef(t!=null),g=u(()=>{!m.current||a===l||(m.current=!1,a(p.current,void 0))});return c(()=>{if(a===l)return;let e;if(n){let n=r?.current;e=f(n)&&n.closest(`label`)!=null?t??null:d??s}else if(t!=null)h.current=!0,e=t;else if(h.current)e=s;else{g();return}if(e===void 0){g();return}m.current=!0,a(p.current,e)},[t,r,d,a,n,s,p,g]),v.useEffect(()=>g,[g]),i??s}function A(e,t){let{enabled:n=!0,getValue:r,id:i,value:a}=t,{registerFieldControl:o}=E(),s=v.useRef(null);s.current||=Symbol(),c(()=>{let t=s.current;if(!(!t||!n))return o(t,{controlRef:e,getValue:r,id:i,value:a}),()=>{o(t,void 0)}},[e,n,r,i,o,a])}var j=v.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:l,defaultValue:f,autoFocus:_=!1,style:b,...x}=e,{state:S,name:C,disabled:T,setTouched:D,setDirty:j,validityData:M,setFocused:N,setFilled:P,validationMode:F,validation:I}=E(),L=T||s,R=C??a,z={...S,disabled:L},{labelId:B}=O(),V=k({id:i});c(()=>{let e=o!=null;I.inputRef.current?.value||e&&o!==``?P(!0):e&&o===``&&P(!1)},[I.inputRef,P,o]);let H=v.useRef(null);c(()=>{_&&H.current===h(p(H.current))&&N(!0)},[_,N]);let[U]=y({controlled:o,default:f,name:`FieldControl`,state:`value`}),W=o!==void 0,G=W?U:void 0,K=u(()=>I.inputRef.current?.value);return A(I.inputRef,{id:V,value:G,getValue:K}),d(`input`,e,{ref:[t,H],state:z,props:[{id:V,disabled:L,name:R,ref:I.inputRef,"aria-labelledby":B,autoFocus:_,...W?{value:G}:{defaultValue:f},onChange(e){let t=e.currentTarget.value;l?.(t,g(m,e.nativeEvent)),j(t!==M.initialValue),P(t!==``)},onFocus(){N(!0)},onBlur(e){D(!0),N(!1),F===`onBlur`&&I.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(D(!0),I.commit(e.currentTarget.value))}},I.getInputValidationProps(),x],stateAttributesMapping:w})}),M=r(),N=v.forwardRef(function(e,t){return(0,M.jsx)(j,{ref:t,...e})}),P=e();function F(e){let t=(0,P.c)(10),n,r,a;t[0]===e?(n=t[1],r=t[2],a=t[3]):({className:n,type:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a);let o;t[4]===n?o=t[5]:(o=i(`h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==o||t[8]!==a?(s=(0,M.jsx)(N,{type:a,"data-slot":`input`,className:o,...r}),t[6]=r,t[7]=o,t[8]=a,t[9]=s):s=t[9],s}export{y as n,F as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,E as t,O as n,T as r,b as i,v as a}from"./collections-CjCv4IBK.js";import{$ as o,A as s,F as c,G as l,H as u,I as d,K as f,N as p,ct as m,j as h,mt as g,n as _,o as v,pt as y,r as b,t as ee,y as x}from"./useRenderElement-BpZtIOdZ.js";function S(e){return e?.isNotFound===!0}var C=`__root__`;function w(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function T(e){return e instanceof Response&&!!e.options}var E=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=C:this.parentRoute||o();let r=n?C:t?.path;r&&r!==`/`&&(r=l(r));let i=t?.id||r,a=n?C:u([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=u([`/`,a]));let s=a===`__root__`?`/`:u([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=s,this._to=f(s)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>w({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},D=class extends E{constructor(e){super(e)}},O=n(t(),1),k=O.createContext(void 0),te=O.createContext(void 0),A={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function j(e){let t=d(),n=O.useContext(e.from?te:k),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=O.useRef(void 0);return c(i??A,n=>{if((e.shouldThrow??!0)&&!n&&o(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=y(a.current,r);return a.current=e,e}return r})}function M(e){return j({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function N(e){let{select:t,...n}=e;return j({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function P(e){return j({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function F(e){return j({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function I(e){let t=d();return O.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function L(e){return j({...e,select:t=>e.select?e.select(t.context):t.context})}var R=r(),z=class extends E{constructor(e){super(e),this.useMatch=e=>j({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>L({...e,from:this.id}),this.useSearch=e=>F({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>P({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>N({...e,from:this.id}),this.useLoaderData=e=>M({...e,from:this.id}),this.useNavigate=()=>I({from:this.fullPath}),this.Link=O.forwardRef((e,t)=>(0,R.jsx)(p,{ref:t,from:this.fullPath,...e}))}};function B(e){return new z(e)}var V=class extends D{constructor(e){super(e),this.useMatch=e=>j({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>L({...e,from:this.id}),this.useSearch=e=>F({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>P({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>N({...e,from:this.id}),this.useLoaderData=e=>M({...e,from:this.id}),this.useNavigate=()=>I({from:this.fullPath}),this.Link=O.forwardRef((e,t)=>(0,R.jsx)(p,{ref:t,from:this.fullPath,...e}))}};function H(e){return new V(e)}function U(e){return new W(e,{silent:!0}).createRoute}var W=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=B(e);return t.isRoot=!1,t},this.silent=t?.silent}};function G(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,m(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),s=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(g)g(o());else throw o();return O.createElement(r,e)};return s.preload=o,s}var K=(0,O.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),q=O.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=O.useContext(K);return O.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&O.createElement(`title`,null,n),s,c.get(a??f))});q.displayName=`IconBase`;var J=O.createContext(void 0);function Y(e=!1){let t=O.useContext(J);if(t===void 0&&!e)throw Error(s(16));return t}function X(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:O.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Z(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=O.useRef(null),s=Y(!0),c=a??s!==void 0,{props:l}=X({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=O.useCallback(()=>{let e=o.current;Q(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return h(u,[u]),{getButtonProps:O.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return b({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(_(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=Q(a),l=!i&&ne(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(_(e),a?.(e),e.target===e.currentTarget&&i&&c&&Q(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?void 0:{role:`button`},l,u)},[t,l,c,i]),buttonRef:v(e=>{o.current=e,u()})}}function Q(e){return x(e)&&e.tagName===`BUTTON`}function ne(e){return!!(e?.tagName===`A`&&e?.href)}var re=O.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=Z({disabled:i,focusableWhenDisabled:a,native:o});return ee(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),ie=e(),ae=a(`group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,xs:`h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5`,sm:`h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,lg:`h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4`,icon:`size-7 [&_svg:not([class*='size-'])]:size-3.5`,"icon-xs":`size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5`,"icon-sm":`size-6 [&_svg:not([class*='size-'])]:size-3`,"icon-lg":`size-8 [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`,size:`default`}});function oe(e){let t=(0,ie.c)(12),n,r,a,o;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4]):({className:n,variant:a,size:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o);let s=a===void 0?`default`:a,c=o===void 0?`default`:o,l;t[5]!==n||t[6]!==c||t[7]!==s?(l=i(ae({variant:s,size:c,className:n})),t[5]=n,t[6]=c,t[7]=s,t[8]=l):l=t[8];let u;return t[9]!==r||t[10]!==l?(u=(0,R.jsx)(re,{"data-slot":`button`,className:l,...r}),t[9]=r,t[10]=l,t[11]=u):u=t[11],u}var se=`modulepreload`,ce=function(e){return`/`+e},$={},le=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=ce(t,n),t in $)return;$[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:se,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{Y as a,U as c,k as d,T as f,S as h,J as i,H as l,C as m,oe as n,q as o,w as p,Z as r,G as s,le as t,I as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,E as t,O as n,S as r,T as i,b as a,c as o,l as s,m as c,n as l,s as u,t as d,v as f,x as p,y as ee}from"./collections-CjCv4IBK.js";import{P as m}from"./useRenderElement-BpZtIOdZ.js";import{c as h,d as g,l as _,u as v}from"./index-D9OJJPjH.js";import{n as y,r as b,t as x}from"./empty-DMv5m460.js";import{t as S}from"./skeleton-CiFADsZy.js";var C=n(t(),1),w=e(),T=i();function E(e){return e===0?`zero`:e<=3?`low`:e<=7?`mid`:e<=15?`high`:`max`}var D=f(`w-3 h-3 rounded-[2px]`,{variants:{intensity:{zero:`bg-muted`,low:`bg-primary/20`,mid:`bg-primary/40`,high:`bg-primary/65`,max:`bg-primary/85`},inRange:{true:``,false:`opacity-30`}},defaultVariants:{intensity:`zero`,inRange:!0}}),O=30;function k(e,t){let n=new Map(e.map(e=>[e.date,e.count])),r=new Date;r.setHours(0,0,0,0);let i=new Date(r);i.setDate(r.getDate()-t+1);let a=new Date(r);a.setDate(r.getDate()-O+1);let o=a.getDay(),s=o===0?6:o-1,c=new Date(a);c.setDate(a.getDate()-s);let l=[],u=new Date(c);for(;u<=r;){let e=[];for(let t=0;t<7;t++){let t=u.toISOString().slice(0,10);e.push({date:t,count:n.get(t)??0,inRange:u>=i}),u.setDate(u.getDate()+1)}l.push(e)}return l}function A(e,t){return`${new Date(`${e}T00:00:00`).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})} · ${t} ${t===1?`memory`:`memories`}`}function j(e){let t=(0,w.c)(15),{cell:n}=e,r;t[0]!==n.count||t[1]!==n.inRange?(r=D({intensity:E(n.count),inRange:n.inRange}),t[0]=n.count,t[1]=n.inRange,t[2]=r):r=t[2];let i=r;if(!n.inRange){let e;return t[3]===i?e=t[4]:(e=(0,T.jsx)(`div`,{className:i}),t[3]=i,t[4]=e),e}let a;t[5]===i?a=t[6]:(a=(0,T.jsx)(g,{children:(0,T.jsx)(`div`,{className:i})}),t[5]=i,t[6]=a);let o;t[7]!==n.count||t[8]!==n.date?(o=A(n.date,n.count),t[7]=n.count,t[8]=n.date,t[9]=o):o=t[9];let s;t[10]===o?s=t[11]:(s=(0,T.jsx)(_,{children:(0,T.jsx)(`span`,{className:`font-mono text-[11px]`,children:o})}),t[10]=o,t[11]=s);let c;return t[12]!==a||t[13]!==s?(c=(0,T.jsxs)(h,{children:[a,s]}),t[12]=a,t[13]=s,t[14]=c):c=t[14],c}function te(e){let t=(0,w.c)(14),{activity:n,days:r,className:i}=e,o,s,c;if(t[0]!==n||t[1]!==i||t[2]!==r){let e=k(n,r);o=v,t[6]===i?s=t[7]:(s=a(`flex gap-[2px]`,i),t[6]=i,t[7]=s),c=e.map(M),t[0]=n,t[1]=i,t[2]=r,t[3]=o,t[4]=s,t[5]=c}else o=t[3],s=t[4],c=t[5];let l;t[8]!==s||t[9]!==c?(l=(0,T.jsx)(`div`,{className:s,children:c}),t[8]=s,t[9]=c,t[10]=l):l=t[10];let u;return t[11]!==o||t[12]!==l?(u=(0,T.jsx)(o,{children:l}),t[11]=o,t[12]=l,t[13]=u):u=t[13],u}function M(e){return(0,T.jsx)(`div`,{className:`flex flex-col gap-[2px]`,children:e.map(N)},e[0]?.date??e.length)}function N(e){return(0,T.jsx)(j,{cell:e},e.date)}var P=m(C.forwardRef((e,t)=>{let n=(0,w.c)(3),r;return n[0]!==e||n[1]!==t?(r=(0,T.jsx)(`a`,{ref:t,...e}),n[0]=e,n[1]=t,n[2]=r):r=n[2],r})),ne=e=>{let t=(0,w.c)(2),n;return t[0]===e?n=t[1]:(n=(0,T.jsx)(P,{preload:`intent`,...e}),t[0]=e,t[1]=n),n};function F(e){let t=(0,w.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,T.jsx)(`div`,{role:`none`,onClick:L,onKeyDown:I,children:n}),t[0]=n,t[1]=r),r}function I(e){return e.stopPropagation()}function L(e){return e.stopPropagation()}function re(e){let t=(0,w.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o=i===void 0?`default`:i,s;t[4]===n?s=t[5]:(s=a(`group/card flex flex-col gap-4 overflow-hidden rounded-lg bg-card py-4 text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg`,n),t[4]=n,t[5]=s);let c;return t[6]!==r||t[7]!==o||t[8]!==s?(c=(0,T.jsx)(`div`,{"data-slot":`card`,"data-size":o,className:s,...r}),t[6]=r,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function R(e){let t=(0,w.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,T.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function ie(e){let t=(0,w.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`font-heading text-sm font-medium`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,T.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function ae(e){let t=(0,w.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,T.jsx)(`div`,{"data-slot":`card-action`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function z(e){let t=(0,w.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`px-4 group-data-[size=sm]/card:px-3`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,T.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function oe(e){let t=(0,w.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`flex items-center rounded-b-lg px-4 group-data-[size=sm]/card:px-3 [.border-t]:pt-4 group-data-[size=sm]/card:[.border-t]:pt-3`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,T.jsx)(`div`,{"data-slot":`card-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function se(e,t){let n=(0,w.c)(8),r;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],n[0]=r):r=n[0];let[i,a]=(0,C.useState)(r),[s,c]=(0,C.useState)(!1),l,d;n[1]!==t||n[2]!==e?(l=()=>{let n=!1;return c(!0),(e===`global`?u(t):o(e,t)).then(e=>{n||a(e)}).finally(()=>{n||c(!1)}),()=>{n=!0}},d=[e,t],n[1]=t,n[2]=e,n[3]=l,n[4]=d):(l=n[3],d=n[4]),(0,C.useEffect)(l,d);let f;return n[5]!==i||n[6]!==s?(f={activity:i,loading:s},n[5]=i,n[6]=s,n[7]=f):f=n[7],f}function ce(e){let t=(0,w.c)(6),[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),o,c;t[0]===e?(o=t[1],c=t[2]):(o=()=>{if(!e)return;let t=!1;return a(!0),s(e).then(e=>{t||r(e)}).finally(()=>{t||a(!1)}),()=>{t=!0}},c=[e],t[0]=e,t[1]=o,t[2]=c),(0,C.useEffect)(o,c);let l;return t[3]!==i||t[4]!==n?(l={stats:n,loading:i},t[3]=i,t[4]=n,t[5]=l):l=t[5],l}var le={correction:`var(--type-correction, oklch(0.65 0.18 50))`,preference:`var(--type-preference, oklch(0.60 0.14 240))`,decision:`var(--type-decision, oklch(0.60 0.14 290))`,learning:`var(--type-learning, oklch(0.55 0.14 165))`,fact:`var(--type-fact, oklch(0.60 0.008 165))`},ue=[30,14,7],de=f(`text-[11px] font-mono px-1.5 py-0.5 rounded transition-colors`,{variants:{active:{true:`bg-muted text-foreground`,false:`text-muted-foreground hover:text-foreground`}},defaultVariants:{active:!1}});function B(e){let t=(0,w.c)(7),{label:n,children:r}=e,i;t[0]===n?i=t[1]:(i=(0,T.jsx)(`span`,{className:`text-[10px] uppercase tracking-wide text-muted-foreground font-mono`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,T.jsx)(`div`,{className:`text-sm font-mono font-medium text-foreground`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,T.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function V(e){let t=(0,w.c)(78),{projectId:n,projectName:i,linkOptions:o,statsOverride:s,className:c}=e,[l,u]=(0,C.useState)(30),{stats:d,loading:f}=ce(s?null:n),m=s??d,h=s?!1:f,{activity:g,loading:_}=se(n,l),v=m?.needsReview??0,y;t[0]===c?y=t[1]:(y=a(`gap-0 py-0 cursor-pointer transition-colors hover:border-foreground/20`,c),t[0]=c,t[1]=y);let b;t[2]===i?b=t[3]:(b=(0,T.jsx)(ie,{className:`font-mono text-sm font-medium`,children:i}),t[2]=i,t[3]=b);let x;t[4]===l?x=t[5]:(x=ue.map(e=>(0,T.jsx)(`button`,{type:`button`,className:de({active:l===e}),onClick:()=>u(e),children:`${e}d`},e)),t[4]=l,t[5]=x);let E;t[6]===x?E=t[7]:(E=(0,T.jsx)(ae,{children:(0,T.jsx)(F,{children:(0,T.jsx)(`div`,{className:`flex gap-0.5`,children:x})})}),t[6]=x,t[7]=E);let D;t[8]!==b||t[9]!==E?(D=(0,T.jsxs)(R,{className:`items-center pt-4 pb-3`,children:[b,E]}),t[8]=b,t[9]=E,t[10]=D):D=t[10];let O;t[11]!==h||t[12]!==m?.total?(O=h?(0,T.jsx)(S,{className:`h-3 w-8`}):m?.total??0,t[11]=h,t[12]=m?.total,t[13]=O):O=t[13];let k;t[14]===O?k=t[15]:(k=(0,T.jsx)(B,{label:`Total`,children:O}),t[14]=O,t[15]=k);let A;t[16]!==h||t[17]!==m?.activeDays?(A=h?(0,T.jsx)(S,{className:`h-3 w-8`}):m?.activeDays??0,t[16]=h,t[17]=m?.activeDays,t[18]=A):A=t[18];let j;t[19]===A?j=t[20]:(j=(0,T.jsx)(B,{label:`Active Days`,children:A}),t[19]=A,t[20]=j);let M;t[21]!==h||t[22]!==m?.needsReview?(M=h?(0,T.jsx)(S,{className:`h-3 w-8`}):m?.needsReview??0,t[21]=h,t[22]=m?.needsReview,t[23]=M):M=t[23];let N;t[24]===M?N=t[25]:(N=(0,T.jsx)(B,{label:`Needs Review`,children:M}),t[24]=M,t[25]=N);let P;t[26]!==h||t[27]!==m?.pinned?(P=h?(0,T.jsx)(S,{className:`h-3 w-8`}):m?.pinned??0,t[26]=h,t[27]=m?.pinned,t[28]=P):P=t[28];let I;t[29]===P?I=t[30]:(I=(0,T.jsx)(B,{label:`Pinned`,children:P}),t[29]=P,t[30]=I);let L;t[31]!==h||t[32]!==m?(L=h?(0,T.jsx)(S,{className:`h-3 w-8`}):m?.mostCommonType?(0,T.jsx)(`span`,{style:{color:le[m.mostCommonType]},children:ee(m.mostCommonType)}):`—`,t[31]=h,t[32]=m,t[33]=L):L=t[33];let V;t[34]===L?V=t[35]:(V=(0,T.jsx)(B,{label:`Most Common`,children:L}),t[34]=L,t[35]=V);let H;t[36]!==h||t[37]!==m?(H=h?(0,T.jsx)(S,{className:`h-3 w-8`}):m?.lastActive?p(m.lastActive):`—`,t[36]=h,t[37]=m,t[38]=H):H=t[38];let U;t[39]===H?U=t[40]:(U=(0,T.jsx)(B,{label:`Last Active`,children:H}),t[39]=H,t[40]=U);let W;t[41]!==h||t[42]!==m?(W=h?(0,T.jsx)(S,{className:`h-3 w-8`}):m?.harness?r(m.harness,14):`—`,t[41]=h,t[42]=m,t[43]=W):W=t[43];let G;t[44]===W?G=t[45]:(G=(0,T.jsx)(B,{label:`Harness`,children:W}),t[44]=W,t[45]=G);let K;t[46]!==h||t[47]!==m?.byType?(K=h?(0,T.jsx)(S,{className:`h-3 w-8`}):m?.byType.correction??0,t[46]=h,t[47]=m?.byType,t[48]=K):K=t[48];let q;t[49]===K?q=t[50]:(q=(0,T.jsx)(B,{label:`Corrections`,children:K}),t[49]=K,t[50]=q);let J;t[51]!==N||t[52]!==I||t[53]!==V||t[54]!==U||t[55]!==G||t[56]!==q||t[57]!==k||t[58]!==j?(J=(0,T.jsxs)(z,{className:`grid grid-cols-4 gap-4 pb-3 pt-0`,children:[k,j,N,I,V,U,G,q]}),t[51]=N,t[52]=I,t[53]=V,t[54]=U,t[55]=G,t[56]=q,t[57]=k,t[58]=j,t[59]=J):J=t[59];let Y;t[60]!==g||t[61]!==_||t[62]!==l?(Y=(0,T.jsx)(F,{children:(0,T.jsx)(z,{className:`overflow-hidden pb-3 pt-0`,children:_?(0,T.jsx)(S,{className:`h-12 w-full`}):(0,T.jsx)(te,{activity:g,days:l})})}),t[60]=g,t[61]=_,t[62]=l,t[63]=Y):Y=t[63];let X;t[64]!==v||t[65]!==m?(X=m?v>0?(0,T.jsxs)(`span`,{className:`text-[11px] text-muted-foreground font-mono`,children:[v,` `,v===1?`memory`:`memories`,` flagged for review`]}):m.lastActive?(0,T.jsxs)(`span`,{className:`text-[11px] text-muted-foreground font-mono`,children:[`Last active `,p(m.lastActive)]}):(0,T.jsx)(`span`,{className:`text-[11px] text-muted-foreground font-mono`,children:`No activity yet`}):null,t[64]=v,t[65]=m,t[66]=X):X=t[66];let Z;t[67]===X?Z=t[68]:(Z=(0,T.jsx)(oe,{className:`pb-4 pt-0`,children:X}),t[67]=X,t[68]=Z);let Q;t[69]!==y||t[70]!==J||t[71]!==Y||t[72]!==Z||t[73]!==D?(Q=(0,T.jsxs)(re,{className:y,children:[D,J,Y,Z]}),t[69]=y,t[70]=J,t[71]=Y,t[72]=Z,t[73]=D,t[74]=Q):Q=t[74];let $;return t[75]!==o||t[76]!==Q?($=(0,T.jsx)(ne,{...o,className:`block`,children:Q}),t[75]=o,t[76]=Q,t[77]=$):$=t[77],$}function H(){let e=(0,w.c)(13),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let{data:n}=c(q,t),r=n===void 0?[]:n,i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=[],e[1]=i):i=e[1];let{data:a,isLoading:o}=c(K,i),s;e[2]===a?s=e[3]:(s=a===void 0?[]:a,e[2]=a,e[3]=s);let l=s,u;bb0:{if(o){u=void 0;break bb0}let t,n,r;if(e[4]!==l){n=l.filter(G),t={correction:0,preference:0,decision:0,learning:0,fact:0},r=0;for(let e of n){let n=e.type;n in t&&(t[n]=t[n]+1),e.reviewEvents.length>0&&r++}e[4]=l,e[5]=t,e[6]=n,e[7]=r}else t=e[5],n=e[6],r=e[7];let i;e[8]!==t||e[9]!==n.length||e[10]!==r?(i={total:n.length,byType:t,needsReview:r,pinned:0,mostCommonType:null,lastActive:null,harness:null,activeDays:0},e[8]=t,e[9]=n.length,e[10]=r,e[11]=i):i=e[11],u=i}let d=u,f=[...r].sort(W),p;return e[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,T.jsx)(`h1`,{className:`text-sm font-mono font-medium text-foreground`,children:`Projects`}),e[12]=p):p=e[12],(0,T.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-6 space-y-6`,children:[(0,T.jsxs)(`header`,{className:`flex items-center justify-between`,children:[p,(0,T.jsxs)(`span`,{className:`text-[11px] font-mono text-muted-foreground`,children:[r.length,` project`,r.length===1?``:`s`,` · `,l.length,` total`]})]}),r.length===0?(0,T.jsxs)(x,{children:[(0,T.jsx)(b,{children:`No projects yet`}),(0,T.jsx)(y,{children:`Memories are associated with projects automatically as your AI tools work in different repositories.`})]}):(0,T.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4`,children:[(0,T.jsx)(V,{projectId:`global`,projectName:`Global`,linkOptions:{to:`/global`},statsOverride:d}),f.map(U)]})]})}function U(e){return(0,T.jsx)(V,{projectId:e.id,projectName:e.name,linkOptions:{to:`/$projectId`,params:{projectId:e.id}}},e.id)}function W(e,t){return e.name.localeCompare(t.name)}function G(e){return e.projects.length===0}function K(e){return e.from({m:d})}function q(e){return e.from({p:l})}var J=H;export{J as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C as e,T as t,b as n}from"./collections-CjCv4IBK.js";var r=e(),i=t();function a(e){let t=(0,r.c)(8),a,o;t[0]===e?(a=t[1],o=t[2]):({className:a,...o}=e,t[0]=e,t[1]=a,t[2]=o);let s;t[3]===a?s=t[4]:(s=n(`animate-pulse rounded-md bg-muted`,a),t[3]=a,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,i.jsx)(`div`,{"data-slot":`skeleton`,className:s,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C as e,T as t,b as n,v as r}from"./collections-CjCv4IBK.js";var i=e(),a=t(),o=r(`inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-medium leading-none transition-colors`,{variants:{variant:{default:`bg-primary/15 text-primary`,secondary:`bg-secondary text-secondary-foreground`,outline:`border border-border text-muted-foreground`,destructive:`bg-destructive/15 text-destructive`,correction:`bg-correction/15 text-correction`,preference:`bg-preference/15 text-preference`,decision:`bg-decision/15 text-decision`,learning:`bg-learning/15 text-learning`,fact:`bg-fact/15 text-fact`,stale:`bg-stale/15 text-stale`}},defaultVariants:{variant:`default`}});function s(e){let t=(0,i.c)(10),r,s,c;t[0]===e?(r=t[1],s=t[2],c=t[3]):({className:r,variant:c,...s}=e,t[0]=e,t[1]=r,t[2]=s,t[3]=c);let l=c===void 0?`default`:c,u;t[4]!==r||t[5]!==l?(u=n(o({variant:l}),r),t[4]=r,t[5]=l,t[6]=u):u=t[6];let d;return t[7]!==s||t[8]!==u?(d=(0,a.jsx)(`span`,{className:u,...s}),t[7]=s,t[8]=u,t[9]=d):d=t[9],d}var c=[`correction`,`preference`,`decision`,`learning`,`fact`],l={correction:`Overrides or corrects the AI's default behavior`,preference:`Your preferred way of working or coding style`,decision:`A deliberate choice about how to approach something`,learning:`Something the AI learned about your codebase or context`,fact:`A fixed fact about your project or environment`},u=`pending`;export{s as i,u as n,l as r,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,D as t,E as n,T as r,w as i}from"./collections-y7eMFwFc.js";var a=n((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),o=n(((e,t)=>{t.exports=a()})),s=n((e=>{var t=r(),n=o();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,s=n.useSyncExternalStore,c=t.useRef,l=t.useEffect,u=t.useMemo,d=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=c(null);if(o.current===null){var f={hasValue:!1,value:null};o.current=f}else f=o.current;o=u(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=s(e,o[0],o[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),d(p),p}})),c=n(((e,t)=>{t.exports=s()})),l=c(),u=t(r(),1),d=u.use,f=typeof window<`u`?u.useLayoutEffect:u.useEffect;function p(e){let t=u.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function m(e,t,n={},r={}){u.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function h(e){let t=u.useRef(null);return u.useImperativeHandle(e,()=>t.current,[]),t}function g(e){return e[e.length-1]}function _(e){return typeof e==`function`}function v(e,t){return _(e)?e(t):e}var y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,x=()=>Object.create(null),S=(e,t)=>C(e,t,x);function C(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=D(e)&&D(i);if(!a&&!(T(e)&&T(i)))return i;let o=a?e:w(e);if(!o)return i;let s=a?i:w(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:y.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=C(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function w(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!b.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!b.call(e,t))return!1;r.push(t)}return r}function T(e){if(!E(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!E(n)||!n.hasOwnProperty(`isPrototypeOf`))}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function D(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function O(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!O(e[r],t[r],n))return!1;return!0}if(T(e)&&T(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!O(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!O(e[o],t[o],n)))return!1;return i===a}return!1}function ee(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function te(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}function ne(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function re(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function ie(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return re(t)}var ae=[`http:`,`https:`,`mailto:`,`tel:`];function oe(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function se(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=ie(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=ie(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function ce(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function le(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ue(){throw Error(`Invariant failed`)}function k(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var A=4,de=5;function fe(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function j(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=fe(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function M(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;s<o;){let e=j(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=F(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=F(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.skipOnParamError&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=I(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.skipOnParamError&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=I(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=I(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=F(n.fullPath??n.from);e.kind=de,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=F(n.fullPath??n.from);e.kind=A,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=n.options?.params?.parse??null,i.skipOnParamError=l,i.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)M(e,t,r,s,i,a,o)}function N(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function P(e){if(e.pathless)for(let t of e.pathless)P(t);if(e.static)for(let t of e.static.values())P(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())P(t);if(e.dynamic?.length){e.dynamic.sort(N);for(let t of e.dynamic)P(t)}if(e.optional?.length){e.optional.sort(N);for(let t of e.optional)P(t)}if(e.wildcard?.length){e.wildcard.sort(N);for(let t of e.wildcard)P(t)}}function F(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function I(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function L(e,t){let n=F(`/`),r=new Uint16Array(6);for(let t of e)M(!1,r,t,1,n,0);P(n),t.masksTree=n,t.flatCache=k(1e3)}function R(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=H(e,t.masksTree);return t.flatCache.set(e,r),r}function z(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=F(`/`),M(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),H(r,o,n)}function B(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=H(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=he(a.route)),t.matchCache.set(r,a),a}function V(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function pe(e,t=!1,n){let r=F(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return M(t,i,e,1,r,0,e=>{if(n?.(e,s),e.id in a&&ue(),a[e.id]=e,s!==0&&e.path){let t=V(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),P(r),{processedTree:{segmentTree:r,singleCache:k(1e3),matchCache:k(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function H(e,t,n=!1){let r=e.split(`/`),i=U(e,r,t,n);if(!i)return null;let[a]=me(e,r,i);return{route:i.node.route,rawParams:a,parsedParams:i.parsedParams}}function me(e,t,n){let r=ge(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===A)break;if(u.kind===de){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function he(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function ge(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function U(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!g(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_,parsedParams:v}=n;if(i.kind===2&&i.route&&!K(l,n))continue;if(i.skipOnParamError){if(!_e(e,t,n))continue;_=n.rawParams,g=n.extract,v=n.parsedParams}r&&i.route&&i.kind!==A&&K(c,n)&&(c=n);let y=u===o;if(y&&(i.route&&(!a||i.kind===A||i.kind===2)&&K(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let b=y?void 0:t[u],x;if(y&&i.index){let n={node:i.index,index:u,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v},r=!0;if(i.index.skipOnParamError&&(_e(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&G(p,o))return n;K(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(y||!(n.caseSensitive?b:x??=b.toLowerCase()).startsWith(r)))){if(a){if(y)continue;let e=t.slice(u).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:u,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v})}if(!y)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?b:x??=b.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:u+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+W(o,u),extract:g,rawParams:_,parsedParams:v})}}if(!y&&i.dynamic&&b)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?b:x??=b.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:u+1,skipped:d,depth:f+1,statics:p,dynamics:m+W(o,u),optionals:h,extract:g,rawParams:_,parsedParams:v})}if(!y&&i.staticInsensitive){let e=i.staticInsensitive.get(x??=b.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+W(o,u),dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v})}if(!y&&i.static){let e=i.static.get(b);e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+W(o,u),dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:u,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v})}}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function W(e,t){return 2**(e-t-1)}function G(e,t){return e===2**(t-1)-1}function _e(e,t,n){try{let[r,i]=me(e,t,n);n.rawParams=r,n.extract=i;let a=n.node.parse(r);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,a),!0}catch{return null}}function K(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===A)>(e.node.kind===A)||t.node.kind===A==(e.node.kind===A)&&t.depth>e.depth))):!0}function ve(e){return q(e.filter(e=>e!==void 0).join(`/`))}function q(e){return e.replace(/\/{2,}/g,`/`)}function ye(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function be(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function xe(e){return be(ye(e))}function Se(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Ce(e,t,n){return Se(e,n)===Se(t,n)}function we({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&g(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(g(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c,l=``;for(let e=0;e<s.length;e++){e>0&&(l+=`/`);let t=s[e];if(!t)continue;c=j(t,0,c);let n=c[0];if(n===0){l+=t;continue}let r=c[5],i=t.substring(0,c[1]),a=t.substring(c[4],r),o=t.substring(c[2],c[3]);n===1?l+=i||a?`${i}{$${o}}${a}`:`$${o}`:n===2?l+=i||a?`${i}{$}${a}`:`$`:l+=`${i}{-$${o}}${a}`}l=q(l);let u=l||`/`;return o&&r&&r.set(o,u),u}function Te(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Ee(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Oe(e,n)).join(`/`):Oe(r,n):r}function De({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=j(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Ee(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ee(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ee(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Oe(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var ke=`Error preloading route! ☝️`,Ae=i();function je({children:e,fallback:t=null}){return Me()?(0,Ae.jsx)(u.Fragment,{children:e}):(0,Ae.jsx)(u.Fragment,{children:t})}function Me(){return u.useSyncExternalStore(Ne,()=>!0,()=>!1)}function Ne(){return()=>{}}var Pe=u.createContext(null);function Fe(e){return u.useContext(Pe)}function Ie(e,t){return e===t}function Le(e,t,n=Ie){let r=(0,u.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,u.useCallback)(()=>e?.get(),[e]);return(0,l.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Re=t(e(),1);function ze(e,t){let n=Fe(),r=h(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:d,hashScrollIntoView:f,replace:p,startTransition:g,resetScroll:_,viewTransition:y,children:b,target:x,disabled:S,style:C,className:w,onClick:T,onBlur:E,onFocus:D,onMouseEnter:ee,onMouseLeave:te,onTouchStart:ne,ignoreBlocker:re,params:ie,search:ae,hash:se,state:ce,mask:le,reloadDocument:ue,unsafeRelative:k,from:A,_fromLocation:de,...fe}=e,j=Me(),M=u.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),N=Le(n.stores.location,e=>e,(e,t)=>e.href===t.href),P=u.useMemo(()=>{let e={_fromLocation:N,...M};return n.buildLocation(e)},[n,N,M]),F=P.maskedLocation?P.maskedLocation.publicHref:P.publicHref,I=P.maskedLocation?P.maskedLocation.external:P.external,L=u.useMemo(()=>Ke(F,I,n.history,S),[S,I,F,n.history]),R=u.useMemo(()=>{if(L?.external)return oe(L.href,n.protocolAllowlist)?void 0:L.href;if(!qe(s)&&!(typeof s!=`string`||s.indexOf(`:`)===-1))try{return new URL(s),oe(s,n.protocolAllowlist)?void 0:s}catch{}},[s,L,n.protocolAllowlist]),z=u.useMemo(()=>{if(R)return!1;if(o?.exact){if(!Ce(N.pathname,P.pathname,n.basepath))return!1}else{let e=Se(N.pathname,n.basepath),t=Se(P.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!O(N.search,P.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?j&&N.hash===P.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,N,R,j,P.hash,P.pathname,P.search,n.basepath]),B=z?v(i,{})??Ve:Be,V=z?Be:v(a,{})??Be,pe=[w,B.className,V.className].filter(Boolean).join(` `),H=(C||B.style||V.style)&&{...C,...B.style,...V.style},[me,he]=u.useState(!1),ge=u.useRef(!1),U=e.reloadDocument||R?!1:c??n.options.defaultPreload,W=l??n.options.defaultPreloadDelay??0,G=u.useCallback(()=>{n.preloadRoute({...M,_builtLocation:P}).catch(e=>{console.warn(e),console.warn(ke)})},[n,M,P]);m(r,u.useCallback(e=>{e?.isIntersecting&&G()},[G]),Ge,{disabled:!!S||U!==`viewport`}),u.useEffect(()=>{ge.current||!S&&U===`render`&&(G(),ge.current=!0)},[S,G,U]);let _e=e=>{let t=e.currentTarget.getAttribute(`target`),r=x===void 0?t:x;if(!S&&!Xe(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Re.flushSync)(()=>{he(!0)});let t=n.subscribe(`onResolved`,()=>{t(),he(!1)});n.navigate({...M,replace:p,resetScroll:_,hashScrollIntoView:f,startTransition:g,viewTransition:y,ignoreBlocker:re})}};if(R)return{...fe,ref:r,href:R,...b&&{children:b},...x&&{target:x},...S&&{disabled:S},...C&&{style:C},...w&&{className:w},...T&&{onClick:T},...E&&{onBlur:E},...D&&{onFocus:D},...ee&&{onMouseEnter:ee},...te&&{onMouseLeave:te},...ne&&{onTouchStart:ne}};let K=e=>{if(S||U!==`intent`)return;if(!W){G();return}let t=e.currentTarget;if(J.has(t))return;let n=setTimeout(()=>{J.delete(t),G()},W);J.set(t,n)},ve=e=>{S||U!==`intent`||G()},q=e=>{if(S||!U||!W)return;let t=e.currentTarget,n=J.get(t);n&&(clearTimeout(n),J.delete(t))};return{...fe,...B,...V,href:L?.href,ref:r,onClick:Y([T,_e]),onBlur:Y([E,q]),onFocus:Y([D,K]),onMouseEnter:Y([ee,K]),onMouseLeave:Y([te,q]),onTouchStart:Y([ne,ve]),disabled:!!S,target:x,...H&&{style:H},...pe&&{className:pe},...S&&He,...z&&Ue,...j&&me&&We}}var Be={},Ve={className:`active`},He={role:`link`,"aria-disabled":!0},Ue={"data-status":`active`,"aria-current":`page`},We={"data-transitioning":`transitioning`},J=new WeakMap,Ge={rootMargin:`100px`},Y=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Ke(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function qe(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}function Je(e){return u.forwardRef(function(t,n){return(0,Ae.jsx)(Ye,{...t,_asChild:e,ref:n})})}var Ye=u.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=ze(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return u.createElement(`a`,t,o)}return u.createElement(n,a,o)});function Xe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Ze={};function Qe(e,t){let n=u.useRef(Ze);return n.current===Ze&&(n.current=e(t)),n}var $e=typeof document<`u`?u.useLayoutEffect:()=>{};function et(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var tt=et(`https://base-ui.com/production-error`,`Base UI`);function nt(){}Object.freeze([]);var X=Object.freeze({});function rt(){return typeof window<`u`}function it(e){return ot(e)?(e.nodeName||``).toLowerCase():`#document`}function Z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function at(e){return((ot(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ot(e){return rt()?e instanceof Node||e instanceof Z(e).Node:!1}function st(e){return rt()?e instanceof Element||e instanceof Z(e).Element:!1}function ct(e){return rt()?e instanceof HTMLElement||e instanceof Z(e).HTMLElement:!1}function lt(e){return!rt()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Z(e).ShadowRoot}function ut(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=bt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function dt(e){return/^(table|td|th)$/.test(it(e))}function ft(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var pt=/transform|translate|scale|rotate|perspective|filter/,mt=/paint|layout|strict|content/,Q=e=>!!e&&e!==`none`,ht;function gt(e){let t=st(e)?bt(e):e;return Q(t.transform)||Q(t.translate)||Q(t.scale)||Q(t.rotate)||Q(t.perspective)||!vt()&&(Q(t.backdropFilter)||Q(t.filter))||pt.test(t.willChange||``)||mt.test(t.contain||``)}function _t(e){let t=St(e);for(;ct(t)&&!yt(t);){if(gt(t))return t;if(ft(t))return null;t=St(t)}return null}function vt(){return ht??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ht}function yt(e){return/^(html|body|#document)$/.test(it(e))}function bt(e){return Z(e).getComputedStyle(e)}function xt(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function St(e){if(it(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||lt(e)&&e.host||at(e);return lt(t)?t.host:t}function Ct(e){let t=St(e);return yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ct(t)&&ut(t)?t:Ct(t)}function wt(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ct(e),i=r===e.ownerDocument?.body,a=Z(r);if(i){let e=Tt(a);return t.concat(a,a.visualViewport||[],ut(r)?r:[],e&&n?wt(e):[])}else return t.concat(r,wt(r,[],n))}function Tt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Et(e,t,n,r){let i=Qe(Ot).current;return kt(i,e,t,n,r)&&jt(i,[e,t,n,r]),i.callback}function Dt(e){let t=Qe(Ot).current;return At(t,e)&&jt(t,e),t.callback}function Ot(){return{callback:null,cleanup:null,refs:[]}}function kt(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function At(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function jt(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var Mt=u[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Nt=Mt&&Mt!==u.useLayoutEffect?Mt:e=>e();function Pt(e){let t=Qe(Ft).current;return t.next=e,Nt(t.effect),t.trampoline}function Ft(){let e={next:void 0,callback:It,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function It(){}var Lt={...u},Rt=19;function zt(e){return Rt>=e}function Bt(e){if(!u.isValidElement(e))return null;let t=e,n=t.props;return(zt(19)?n?.ref:t.ref)??null}function Vt(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Ht(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Ut(e,t){return typeof e==`function`?e(t):e}function Wt(e,t){return typeof e==`function`?e(t):e}var Gt={};function Kt(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Jt(t);let a=Jt(e);return t&&(a=$(a,t)),n&&(a=$(a,n)),r&&(a=$(a,r)),i&&(a=$(a,i)),a}function qt(e){if(e.length===0)return Gt;if(e.length===1)return Jt(e[0]);let t=Jt(e[0]);for(let n=1;n<e.length;n+=1)t=$(t,e[n]);return t}function Jt(e){return Qt(e)?{...$t(e,Gt)}:Yt(e)}function $(e,t){return Qt(t)?$t(t,e):Xt(e,t)}function Yt(e){let t={...e};for(let e in t){let n=t[e];Zt(e,n)&&(t[e]=tn(n))}return t}function Xt(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Vt(e.style,r);break;case`className`:e[n]=rn(e.className,r);break;default:Zt(n,r)?e[n]=en(e[n],r):e[n]=r}}return e}function Zt(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function Qt(e){return typeof e==`function`}function $t(e,t){return Qt(e)?e(t):e??Gt}function en(e,t){return t?e?(...n)=>{let r=n[0];if(an(r)){let i=r;nn(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:tn(t):e}function tn(e){return e&&((...t)=>{let n=t[0];return an(n)&&nn(n),e(...t)})}function nn(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function rn(e,t){return t?e?t+` `+e:t:e}function an(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function on(e,t,n={}){let r=t.render,i=sn(t,n);return n.enabled===!1?null:un(e,r,i,n.state??X)}function sn(e,t={}){let{className:n,style:r,render:i}=e,{state:a=X,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Ut(n,a):void 0,d=l?Wt(r,a):void 0,f=l?Ht(a,c):X,p=l&&s?cn(s):void 0,m=l?Vt(f,p)??{}:X;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=Dt([m.ref,Bt(i),...o]):m.ref=Et(m.ref,Bt(i),o):Et(null,null)),l?(u!==void 0&&(m.className=rn(m.className,u)),d!==void 0&&(m.style=Vt(m.style,d)),m):X}function cn(e){return Array.isArray(e)?qt(e):Kt(void 0,e)}var ln=Symbol.for(`react.lazy`);function un(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Kt(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===ln&&(i=u.Children.toArray(t)[0]),u.cloneElement(i,e)}if(e&&typeof e==`string`)return dn(e,n);throw Error(tt(8))}function dn(e,t){return e===`button`?(0,u.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,u.createElement)(`img`,{alt:``,...t,key:t.key}):u.createElement(e,t)}export{ae as $,$e as A,De as B,lt as C,X as D,vt as E,Fe as F,be as G,we as H,Pe as I,z as J,R as K,je as L,Ye as M,Je as N,nt as O,Le as P,ue as Q,q as R,ut as S,ft as T,xe as U,ve as V,ye as W,pe as X,L as Y,k as Z,gt as _,o as _t,Lt as a,v as at,yt as b,bt as c,T as ct,Tt as d,S as dt,le as et,it as f,C as ft,Z as g,c as gt,St as h,p as ht,zt as i,ce as it,Qe as j,tt as k,_t as l,ne as lt,wt as m,f as mt,nn as n,se as nt,Pt as o,oe as ot,xt as p,d as pt,B as q,Kt as r,O as rt,Et as s,te as st,on as t,ee as tt,at as u,g as ut,st as v,dt as w,ot as x,ct as y,Te as z};
|
|
1
|
+
import{D as e,E as t,O as n,T as r,w as i}from"./collections-CjCv4IBK.js";var a=e((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),o=e(((e,t)=>{t.exports=a()})),s=e((e=>{var n=t(),r=o();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,s=r.useSyncExternalStore,c=n.useRef,l=n.useEffect,u=n.useMemo,d=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=c(null);if(o.current===null){var f={hasValue:!1,value:null};o.current=f}else f=o.current;o=u(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=s(e,o[0],o[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),d(p),p}})),c=e(((e,t)=>{t.exports=s()})),l=c(),u=n(t(),1),d=u.use,f=typeof window<`u`?u.useLayoutEffect:u.useEffect;function p(e){let t=u.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function m(e,t,n={},r={}){u.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function h(e){let t=u.useRef(null);return u.useImperativeHandle(e,()=>t.current,[]),t}function g(e){return e[e.length-1]}function _(e){return typeof e==`function`}function v(e,t){return _(e)?e(t):e}var y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,x=()=>Object.create(null),S=(e,t)=>C(e,t,x);function C(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=D(e)&&D(i);if(!a&&!(T(e)&&T(i)))return i;let o=a?e:w(e);if(!o)return i;let s=a?i:w(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:y.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=C(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function w(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!b.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!b.call(e,t))return!1;r.push(t)}return r}function T(e){if(!E(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!E(n)||!n.hasOwnProperty(`isPrototypeOf`))}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function D(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function O(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!O(e[r],t[r],n))return!1;return!0}if(T(e)&&T(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!O(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!O(e[o],t[o],n)))return!1;return i===a}return!1}function ee(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function te(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}function ne(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function re(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function ie(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return re(t)}var ae=[`http:`,`https:`,`mailto:`,`tel:`];function oe(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function se(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=ie(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=ie(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function ce(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function le(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ue(){throw Error(`Invariant failed`)}function k(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var A=4,de=5;function fe(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function j(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=fe(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function M(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;s<o;){let e=j(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=F(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=F(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.skipOnParamError&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=I(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.skipOnParamError&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=I(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=I(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=F(n.fullPath??n.from);e.kind=de,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=F(n.fullPath??n.from);e.kind=A,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=n.options?.params?.parse??null,i.skipOnParamError=l,i.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)M(e,t,r,s,i,a,o)}function N(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function P(e){if(e.pathless)for(let t of e.pathless)P(t);if(e.static)for(let t of e.static.values())P(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())P(t);if(e.dynamic?.length){e.dynamic.sort(N);for(let t of e.dynamic)P(t)}if(e.optional?.length){e.optional.sort(N);for(let t of e.optional)P(t)}if(e.wildcard?.length){e.wildcard.sort(N);for(let t of e.wildcard)P(t)}}function F(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function I(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function L(e,t){let n=F(`/`),r=new Uint16Array(6);for(let t of e)M(!1,r,t,1,n,0);P(n),t.masksTree=n,t.flatCache=k(1e3)}function R(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=H(e,t.masksTree);return t.flatCache.set(e,r),r}function z(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=F(`/`),M(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),H(r,o,n)}function B(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=H(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=he(a.route)),t.matchCache.set(r,a),a}function V(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function pe(e,t=!1,n){let r=F(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return M(t,i,e,1,r,0,e=>{if(n?.(e,s),e.id in a&&ue(),a[e.id]=e,s!==0&&e.path){let t=V(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),P(r),{processedTree:{segmentTree:r,singleCache:k(1e3),matchCache:k(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function H(e,t,n=!1){let r=e.split(`/`),i=U(e,r,t,n);if(!i)return null;let[a]=me(e,r,i);return{route:i.node.route,rawParams:a,parsedParams:i.parsedParams}}function me(e,t,n){let r=ge(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===A)break;if(u.kind===de){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function he(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function ge(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function U(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!g(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_,parsedParams:v}=n;if(i.kind===2&&i.route&&!K(l,n))continue;if(i.skipOnParamError){if(!_e(e,t,n))continue;_=n.rawParams,g=n.extract,v=n.parsedParams}r&&i.route&&i.kind!==A&&K(c,n)&&(c=n);let y=u===o;if(y&&(i.route&&(!a||i.kind===A||i.kind===2)&&K(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let b=y?void 0:t[u],x;if(y&&i.index){let n={node:i.index,index:u,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v},r=!0;if(i.index.skipOnParamError&&(_e(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&G(p,o))return n;K(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(y||!(n.caseSensitive?b:x??=b.toLowerCase()).startsWith(r)))){if(a){if(y)continue;let e=t.slice(u).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:u,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v})}if(!y)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?b:x??=b.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:u+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+W(o,u),extract:g,rawParams:_,parsedParams:v})}}if(!y&&i.dynamic&&b)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?b:x??=b.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:u+1,skipped:d,depth:f+1,statics:p,dynamics:m+W(o,u),optionals:h,extract:g,rawParams:_,parsedParams:v})}if(!y&&i.staticInsensitive){let e=i.staticInsensitive.get(x??=b.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+W(o,u),dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v})}if(!y&&i.static){let e=i.static.get(b);e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+W(o,u),dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:u,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_,parsedParams:v})}}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function W(e,t){return 2**(e-t-1)}function G(e,t){return e===2**(t-1)-1}function _e(e,t,n){try{let[r,i]=me(e,t,n);n.rawParams=r,n.extract=i;let a=n.node.parse(r);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,a),!0}catch{return null}}function K(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===A)>(e.node.kind===A)||t.node.kind===A==(e.node.kind===A)&&t.depth>e.depth))):!0}function ve(e){return q(e.filter(e=>e!==void 0).join(`/`))}function q(e){return e.replace(/\/{2,}/g,`/`)}function ye(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function be(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function xe(e){return be(ye(e))}function Se(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Ce(e,t,n){return Se(e,n)===Se(t,n)}function we({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&g(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(g(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c,l=``;for(let e=0;e<s.length;e++){e>0&&(l+=`/`);let t=s[e];if(!t)continue;c=j(t,0,c);let n=c[0];if(n===0){l+=t;continue}let r=c[5],i=t.substring(0,c[1]),a=t.substring(c[4],r),o=t.substring(c[2],c[3]);n===1?l+=i||a?`${i}{$${o}}${a}`:`$${o}`:n===2?l+=i||a?`${i}{$}${a}`:`$`:l+=`${i}{-$${o}}${a}`}l=q(l);let u=l||`/`;return o&&r&&r.set(o,u),u}function Te(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Ee(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Oe(e,n)).join(`/`):Oe(r,n):r}function De({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=j(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Ee(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ee(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ee(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Oe(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var ke=`Error preloading route! ☝️`,Ae=r();function je({children:e,fallback:t=null}){return Me()?(0,Ae.jsx)(u.Fragment,{children:e}):(0,Ae.jsx)(u.Fragment,{children:t})}function Me(){return u.useSyncExternalStore(Ne,()=>!0,()=>!1)}function Ne(){return()=>{}}var Pe=u.createContext(null);function Fe(e){return u.useContext(Pe)}function Ie(e,t){return e===t}function Le(e,t,n=Ie){let r=(0,u.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,u.useCallback)(()=>e?.get(),[e]);return(0,l.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Re=n(i(),1);function ze(e,t){let n=Fe(),r=h(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:d,hashScrollIntoView:f,replace:p,startTransition:g,resetScroll:_,viewTransition:y,children:b,target:x,disabled:S,style:C,className:w,onClick:T,onBlur:E,onFocus:D,onMouseEnter:ee,onMouseLeave:te,onTouchStart:ne,ignoreBlocker:re,params:ie,search:ae,hash:se,state:ce,mask:le,reloadDocument:ue,unsafeRelative:k,from:A,_fromLocation:de,...fe}=e,j=Me(),M=u.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),N=Le(n.stores.location,e=>e,(e,t)=>e.href===t.href),P=u.useMemo(()=>{let e={_fromLocation:N,...M};return n.buildLocation(e)},[n,N,M]),F=P.maskedLocation?P.maskedLocation.publicHref:P.publicHref,I=P.maskedLocation?P.maskedLocation.external:P.external,L=u.useMemo(()=>Ke(F,I,n.history,S),[S,I,F,n.history]),R=u.useMemo(()=>{if(L?.external)return oe(L.href,n.protocolAllowlist)?void 0:L.href;if(!qe(s)&&!(typeof s!=`string`||s.indexOf(`:`)===-1))try{return new URL(s),oe(s,n.protocolAllowlist)?void 0:s}catch{}},[s,L,n.protocolAllowlist]),z=u.useMemo(()=>{if(R)return!1;if(o?.exact){if(!Ce(N.pathname,P.pathname,n.basepath))return!1}else{let e=Se(N.pathname,n.basepath),t=Se(P.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!O(N.search,P.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?j&&N.hash===P.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,N,R,j,P.hash,P.pathname,P.search,n.basepath]),B=z?v(i,{})??Ve:Be,V=z?Be:v(a,{})??Be,pe=[w,B.className,V.className].filter(Boolean).join(` `),H=(C||B.style||V.style)&&{...C,...B.style,...V.style},[me,he]=u.useState(!1),ge=u.useRef(!1),U=e.reloadDocument||R?!1:c??n.options.defaultPreload,W=l??n.options.defaultPreloadDelay??0,G=u.useCallback(()=>{n.preloadRoute({...M,_builtLocation:P}).catch(e=>{console.warn(e),console.warn(ke)})},[n,M,P]);m(r,u.useCallback(e=>{e?.isIntersecting&&G()},[G]),Ge,{disabled:!!S||U!==`viewport`}),u.useEffect(()=>{ge.current||!S&&U===`render`&&(G(),ge.current=!0)},[S,G,U]);let _e=e=>{let t=e.currentTarget.getAttribute(`target`),r=x===void 0?t:x;if(!S&&!Xe(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Re.flushSync)(()=>{he(!0)});let t=n.subscribe(`onResolved`,()=>{t(),he(!1)});n.navigate({...M,replace:p,resetScroll:_,hashScrollIntoView:f,startTransition:g,viewTransition:y,ignoreBlocker:re})}};if(R)return{...fe,ref:r,href:R,...b&&{children:b},...x&&{target:x},...S&&{disabled:S},...C&&{style:C},...w&&{className:w},...T&&{onClick:T},...E&&{onBlur:E},...D&&{onFocus:D},...ee&&{onMouseEnter:ee},...te&&{onMouseLeave:te},...ne&&{onTouchStart:ne}};let K=e=>{if(S||U!==`intent`)return;if(!W){G();return}let t=e.currentTarget;if(J.has(t))return;let n=setTimeout(()=>{J.delete(t),G()},W);J.set(t,n)},ve=e=>{S||U!==`intent`||G()},q=e=>{if(S||!U||!W)return;let t=e.currentTarget,n=J.get(t);n&&(clearTimeout(n),J.delete(t))};return{...fe,...B,...V,href:L?.href,ref:r,onClick:Y([T,_e]),onBlur:Y([E,q]),onFocus:Y([D,K]),onMouseEnter:Y([ee,K]),onMouseLeave:Y([te,q]),onTouchStart:Y([ne,ve]),disabled:!!S,target:x,...H&&{style:H},...pe&&{className:pe},...S&&He,...z&&Ue,...j&&me&&We}}var Be={},Ve={className:`active`},He={role:`link`,"aria-disabled":!0},Ue={"data-status":`active`,"aria-current":`page`},We={"data-transitioning":`transitioning`},J=new WeakMap,Ge={rootMargin:`100px`},Y=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Ke(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function qe(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}function Je(e){return u.forwardRef(function(t,n){return(0,Ae.jsx)(Ye,{...t,_asChild:e,ref:n})})}var Ye=u.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=ze(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return u.createElement(`a`,t,o)}return u.createElement(n,a,o)});function Xe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Ze={};function Qe(e,t){let n=u.useRef(Ze);return n.current===Ze&&(n.current=e(t)),n}var $e=typeof document<`u`?u.useLayoutEffect:()=>{};function et(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var tt=et(`https://base-ui.com/production-error`,`Base UI`);function nt(){}var rt=Object.freeze([]),X=Object.freeze({});function it(){return typeof window<`u`}function at(e){return st(e)?(e.nodeName||``).toLowerCase():`#document`}function Z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ot(e){return((st(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function st(e){return it()?e instanceof Node||e instanceof Z(e).Node:!1}function ct(e){return it()?e instanceof Element||e instanceof Z(e).Element:!1}function lt(e){return it()?e instanceof HTMLElement||e instanceof Z(e).HTMLElement:!1}function ut(e){return!it()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Z(e).ShadowRoot}function dt(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=xt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ft(e){return/^(table|td|th)$/.test(at(e))}function pt(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var mt=/transform|translate|scale|rotate|perspective|filter/,ht=/paint|layout|strict|content/,Q=e=>!!e&&e!==`none`,gt;function _t(e){let t=ct(e)?xt(e):e;return Q(t.transform)||Q(t.translate)||Q(t.scale)||Q(t.rotate)||Q(t.perspective)||!yt()&&(Q(t.backdropFilter)||Q(t.filter))||mt.test(t.willChange||``)||ht.test(t.contain||``)}function vt(e){let t=Ct(e);for(;lt(t)&&!bt(t);){if(_t(t))return t;if(pt(t))return null;t=Ct(t)}return null}function yt(){return gt??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),gt}function bt(e){return/^(html|body|#document)$/.test(at(e))}function xt(e){return Z(e).getComputedStyle(e)}function St(e){return ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ct(e){if(at(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ut(e)&&e.host||ot(e);return ut(t)?t.host:t}function wt(e){let t=Ct(e);return bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:lt(t)&&dt(t)?t:wt(t)}function Tt(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=wt(e),i=r===e.ownerDocument?.body,a=Z(r);if(i){let e=Et(a);return t.concat(a,a.visualViewport||[],dt(r)?r:[],e&&n?Tt(e):[])}else return t.concat(r,Tt(r,[],n))}function Et(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Dt(e,t,n,r){let i=Qe(kt).current;return At(i,e,t,n,r)&&Mt(i,[e,t,n,r]),i.callback}function Ot(e){let t=Qe(kt).current;return jt(t,e)&&Mt(t,e),t.callback}function kt(){return{callback:null,cleanup:null,refs:[]}}function At(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function jt(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Mt(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var Nt=u[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Pt=Nt&&Nt!==u.useLayoutEffect?Nt:e=>e();function Ft(e){let t=Qe(It).current;return t.next=e,Pt(t.effect),t.trampoline}function It(){let e={next:void 0,callback:Lt,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Lt(){}var Rt={...u},zt=19;function Bt(e){return zt>=e}function Vt(e){if(!u.isValidElement(e))return null;let t=e,n=t.props;return(Bt(19)?n?.ref:t.ref)??null}function Ht(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Ut(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Wt(e,t){return typeof e==`function`?e(t):e}function Gt(e,t){return typeof e==`function`?e(t):e}var Kt={};function qt(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Yt(t);let a=Yt(e);return t&&(a=$(a,t)),n&&(a=$(a,n)),r&&(a=$(a,r)),i&&(a=$(a,i)),a}function Jt(e){if(e.length===0)return Kt;if(e.length===1)return Yt(e[0]);let t=Yt(e[0]);for(let n=1;n<e.length;n+=1)t=$(t,e[n]);return t}function Yt(e){return $t(e)?{...en(e,Kt)}:Xt(e)}function $(e,t){return $t(t)?en(t,e):Zt(e,t)}function Xt(e){let t={...e};for(let e in t){let n=t[e];Qt(e,n)&&(t[e]=nn(n))}return t}function Zt(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Ht(e.style,r);break;case`className`:e[n]=an(e.className,r);break;default:Qt(n,r)?e[n]=tn(e[n],r):e[n]=r}}return e}function Qt(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function $t(e){return typeof e==`function`}function en(e,t){return $t(e)?e(t):e??Kt}function tn(e,t){return t?e?(...n)=>{let r=n[0];if(on(r)){let i=r;rn(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:nn(t):e}function nn(e){return e&&((...t)=>{let n=t[0];return on(n)&&rn(n),e(...t)})}function rn(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function an(e,t){return t?e?t+` `+e:t:e}function on(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function sn(e,t,n={}){let r=t.render,i=cn(t,n);return n.enabled===!1?null:dn(e,r,i,n.state??X)}function cn(e,t={}){let{className:n,style:r,render:i}=e,{state:a=X,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Wt(n,a):void 0,d=l?Gt(r,a):void 0,f=l?Ut(a,c):X,p=l&&s?ln(s):void 0,m=l?Ht(f,p)??{}:X;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=Ot([m.ref,Vt(i),...o]):m.ref=Dt(m.ref,Vt(i),o):Dt(null,null)),l?(u!==void 0&&(m.className=an(m.className,u)),d!==void 0&&(m.style=Ht(m.style,d)),m):X}function ln(e){return Array.isArray(e)?Jt(e):qt(void 0,e)}var un=Symbol.for(`react.lazy`);function dn(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=qt(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===un&&(i=u.Children.toArray(t)[0]),u.cloneElement(i,e)}if(e&&typeof e==`string`)return fn(e,n);throw Error(tt(8))}function fn(e,t){return e===`button`?(0,u.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,u.createElement)(`img`,{alt:``,...t,key:t.key}):u.createElement(e,t)}export{ue as $,tt as A,Te as B,ut as C,rt as D,yt as E,Le as F,ye as G,ve as H,Fe as I,B as J,be as K,Pe as L,Qe as M,Ye as N,X as O,Je as P,k as Q,je as R,dt as S,pt as T,we as U,De as V,xe as W,L as X,z as Y,pe as Z,_t as _,c as _t,Rt as a,ce as at,bt as b,xt as c,te as ct,Et as d,g as dt,ae as et,at as f,S as ft,Z as g,p as gt,Ct as h,f as ht,Bt as i,O as it,$e as j,nt as k,vt as l,T as lt,Tt as m,d as mt,rn as n,ee as nt,Ft as o,v as ot,St as p,C as pt,R as q,qt as r,se as rt,Dt as s,oe as st,sn as t,le as tt,ot as u,ne as ut,ct as v,o as vt,ft as w,st as x,lt as y,q as z};
|
package/dist/client/index.html
CHANGED
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
document.documentElement.classList.add(theme);
|
|
13
13
|
})();
|
|
14
14
|
</script>
|
|
15
|
-
<script type="module" crossorigin src="/assets/index-
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/assets/collections-
|
|
17
|
-
<link rel="modulepreload" crossorigin href="/assets/useRenderElement-
|
|
18
|
-
<link rel="modulepreload" crossorigin href="/assets/preload-helper-
|
|
15
|
+
<script type="module" crossorigin src="/assets/index-D9OJJPjH.js"></script>
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/collections-CjCv4IBK.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/assets/useRenderElement-BpZtIOdZ.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/preload-helper-CAfwd7qG.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/assets/schemas-jSuIeSIL.js">
|
|
20
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
21
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/assets/types-CKYjb0zP.js">
|
|
21
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CP3vA60Z.css">
|
|
22
22
|
</head>
|
|
23
23
|
<body>
|
|
24
24
|
<div id="root"></div>
|
package/dist/index.cjs
CHANGED
|
@@ -98,7 +98,7 @@ function aggregateActivity(memories, days) {
|
|
|
98
98
|
count
|
|
99
99
|
})).sort((a, b) => a.date.localeCompare(b.date));
|
|
100
100
|
}
|
|
101
|
-
function createApiApp(repo, projectRepo, embedder, queryEngine, synthRepo) {
|
|
101
|
+
function createApiApp(repo, projectRepo, embedder, queryEngine, synthRepo, activityRepo, activityLogger) {
|
|
102
102
|
const app = new hono.Hono();
|
|
103
103
|
app.get("/api/memories", (c) => {
|
|
104
104
|
const { type, pinned, needsReview, search, projectId } = c.req.query();
|
|
@@ -131,12 +131,13 @@ function createApiApp(repo, projectRepo, embedder, queryEngine, synthRepo) {
|
|
|
131
131
|
type: body.type
|
|
132
132
|
}, {
|
|
133
133
|
repo,
|
|
134
|
-
embedder
|
|
134
|
+
embedder,
|
|
135
|
+
activityLogger
|
|
135
136
|
});
|
|
136
137
|
return c.json(repo.findById(id));
|
|
137
138
|
});
|
|
138
|
-
app.delete("/api/memories/:id", (c) => {
|
|
139
|
-
|
|
139
|
+
app.delete("/api/memories/:id", async (c) => {
|
|
140
|
+
await (0, _membank_core.deleteMemory)(c.req.param("id"), repo, activityLogger);
|
|
140
141
|
return c.json({ ok: true });
|
|
141
142
|
});
|
|
142
143
|
app.post("/api/memories/:id/projects", async (c) => {
|
|
@@ -236,6 +237,22 @@ function createApiApp(repo, projectRepo, embedder, queryEngine, synthRepo) {
|
|
|
236
237
|
const daysParam = Math.max(1, parseInt(c.req.query("days") ?? "365", 10));
|
|
237
238
|
return c.json(aggregateActivity(repo.list(), daysParam));
|
|
238
239
|
});
|
|
240
|
+
app.get("/api/activity/events", (c) => {
|
|
241
|
+
const { scope, type, since, limit } = c.req.query();
|
|
242
|
+
let validatedType;
|
|
243
|
+
if (type !== void 0) {
|
|
244
|
+
const parsed = _membank_core.ActivityEventTypeSchema.safeParse(type);
|
|
245
|
+
if (!parsed.success) return c.json({ error: `Invalid event type: "${type}"` }, 400);
|
|
246
|
+
validatedType = parsed.data;
|
|
247
|
+
}
|
|
248
|
+
const events = (0, _membank_core.listEvents)({
|
|
249
|
+
scope: scope || void 0,
|
|
250
|
+
type: validatedType,
|
|
251
|
+
since: since || void 0,
|
|
252
|
+
limit: limit !== void 0 ? parseInt(limit, 10) : void 0
|
|
253
|
+
}, activityRepo);
|
|
254
|
+
return c.json(events);
|
|
255
|
+
});
|
|
239
256
|
return app;
|
|
240
257
|
}
|
|
241
258
|
async function startDashboard(opts) {
|
|
@@ -244,7 +261,9 @@ async function startDashboard(opts) {
|
|
|
244
261
|
const embedding = new _membank_core.EmbeddingService();
|
|
245
262
|
const projects = (0, _membank_core.createProjectRepository)(db);
|
|
246
263
|
const repo = (0, _membank_core.createMemoryRepository)(db, projects);
|
|
247
|
-
const
|
|
264
|
+
const activityLogger = (0, _membank_core.createActivityLogger)(db);
|
|
265
|
+
const activityRepo = (0, _membank_core.createActivityRepository)(db);
|
|
266
|
+
const app = createApiApp(repo, projects, embedding, new _membank_core.QueryEngine(db, embedding, repo, activityLogger), (0, _membank_core.createSynthesisRepository)(db), activityRepo, activityLogger);
|
|
248
267
|
const clientDir = (0, node_path.join)((0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href)), "client");
|
|
249
268
|
app.get("*", (c) => {
|
|
250
269
|
const filePath = (0, node_path.join)(clientDir, c.req.path === "/" ? "/index.html" : c.req.path);
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Embedder, MemoryRepository, ProjectRepository, QueryEngine, SynthesisRepository } from "@membank/core";
|
|
1
|
+
import { ActivityLogger, ActivityRepository, Embedder, MemoryRepository, ProjectRepository, QueryEngine, SynthesisRepository } from "@membank/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/server/index.d.ts
|
|
5
|
-
declare function createApiApp(repo: MemoryRepository, projectRepo: ProjectRepository, embedder: Embedder, queryEngine: QueryEngine, synthRepo: SynthesisRepository): Hono;
|
|
5
|
+
declare function createApiApp(repo: MemoryRepository, projectRepo: ProjectRepository, embedder: Embedder, queryEngine: QueryEngine, synthRepo: SynthesisRepository, activityRepo: ActivityRepository, activityLogger: ActivityLogger): Hono;
|
|
6
6
|
declare function startDashboard(opts?: {
|
|
7
7
|
port?: number;
|
|
8
8
|
open?: boolean;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Embedder, MemoryRepository, ProjectRepository, QueryEngine, SynthesisRepository } from "@membank/core";
|
|
1
|
+
import { ActivityLogger, ActivityRepository, Embedder, MemoryRepository, ProjectRepository, QueryEngine, SynthesisRepository } from "@membank/core";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/server/index.d.ts
|
|
5
|
-
declare function createApiApp(repo: MemoryRepository, projectRepo: ProjectRepository, embedder: Embedder, queryEngine: QueryEngine, synthRepo: SynthesisRepository): Hono;
|
|
5
|
+
declare function createApiApp(repo: MemoryRepository, projectRepo: ProjectRepository, embedder: Embedder, queryEngine: QueryEngine, synthRepo: SynthesisRepository, activityRepo: ActivityRepository, activityLogger: ActivityLogger): Hono;
|
|
6
6
|
declare function startDashboard(opts?: {
|
|
7
7
|
port?: number;
|
|
8
8
|
open?: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { createServer } from "node:net";
|
|
|
3
3
|
import { dirname, extname, join } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { serve } from "@hono/node-server";
|
|
6
|
-
import { DatabaseManager, EmbeddingService, QueryEngine, createMemoryRepository, createProjectRepository, createSynthesisAgentRunner, createSynthesisRepository, isSynthesisEnabled, runSynthesis, updateMemory } from "@membank/core";
|
|
6
|
+
import { ActivityEventTypeSchema, DatabaseManager, EmbeddingService, QueryEngine, createActivityLogger, createActivityRepository, createMemoryRepository, createProjectRepository, createSynthesisAgentRunner, createSynthesisRepository, deleteMemory, isSynthesisEnabled, listEvents, runSynthesis, updateMemory } from "@membank/core";
|
|
7
7
|
import { Hono } from "hono";
|
|
8
8
|
import open from "open";
|
|
9
9
|
//#region src/server/index.ts
|
|
@@ -74,7 +74,7 @@ function aggregateActivity(memories, days) {
|
|
|
74
74
|
count
|
|
75
75
|
})).sort((a, b) => a.date.localeCompare(b.date));
|
|
76
76
|
}
|
|
77
|
-
function createApiApp(repo, projectRepo, embedder, queryEngine, synthRepo) {
|
|
77
|
+
function createApiApp(repo, projectRepo, embedder, queryEngine, synthRepo, activityRepo, activityLogger) {
|
|
78
78
|
const app = new Hono();
|
|
79
79
|
app.get("/api/memories", (c) => {
|
|
80
80
|
const { type, pinned, needsReview, search, projectId } = c.req.query();
|
|
@@ -107,12 +107,13 @@ function createApiApp(repo, projectRepo, embedder, queryEngine, synthRepo) {
|
|
|
107
107
|
type: body.type
|
|
108
108
|
}, {
|
|
109
109
|
repo,
|
|
110
|
-
embedder
|
|
110
|
+
embedder,
|
|
111
|
+
activityLogger
|
|
111
112
|
});
|
|
112
113
|
return c.json(repo.findById(id));
|
|
113
114
|
});
|
|
114
|
-
app.delete("/api/memories/:id", (c) => {
|
|
115
|
-
|
|
115
|
+
app.delete("/api/memories/:id", async (c) => {
|
|
116
|
+
await deleteMemory(c.req.param("id"), repo, activityLogger);
|
|
116
117
|
return c.json({ ok: true });
|
|
117
118
|
});
|
|
118
119
|
app.post("/api/memories/:id/projects", async (c) => {
|
|
@@ -212,6 +213,22 @@ function createApiApp(repo, projectRepo, embedder, queryEngine, synthRepo) {
|
|
|
212
213
|
const daysParam = Math.max(1, parseInt(c.req.query("days") ?? "365", 10));
|
|
213
214
|
return c.json(aggregateActivity(repo.list(), daysParam));
|
|
214
215
|
});
|
|
216
|
+
app.get("/api/activity/events", (c) => {
|
|
217
|
+
const { scope, type, since, limit } = c.req.query();
|
|
218
|
+
let validatedType;
|
|
219
|
+
if (type !== void 0) {
|
|
220
|
+
const parsed = ActivityEventTypeSchema.safeParse(type);
|
|
221
|
+
if (!parsed.success) return c.json({ error: `Invalid event type: "${type}"` }, 400);
|
|
222
|
+
validatedType = parsed.data;
|
|
223
|
+
}
|
|
224
|
+
const events = listEvents({
|
|
225
|
+
scope: scope || void 0,
|
|
226
|
+
type: validatedType,
|
|
227
|
+
since: since || void 0,
|
|
228
|
+
limit: limit !== void 0 ? parseInt(limit, 10) : void 0
|
|
229
|
+
}, activityRepo);
|
|
230
|
+
return c.json(events);
|
|
231
|
+
});
|
|
215
232
|
return app;
|
|
216
233
|
}
|
|
217
234
|
async function startDashboard(opts) {
|
|
@@ -220,7 +237,9 @@ async function startDashboard(opts) {
|
|
|
220
237
|
const embedding = new EmbeddingService();
|
|
221
238
|
const projects = createProjectRepository(db);
|
|
222
239
|
const repo = createMemoryRepository(db, projects);
|
|
223
|
-
const
|
|
240
|
+
const activityLogger = createActivityLogger(db);
|
|
241
|
+
const activityRepo = createActivityRepository(db);
|
|
242
|
+
const app = createApiApp(repo, projects, embedding, new QueryEngine(db, embedding, repo, activityLogger), createSynthesisRepository(db), activityRepo, activityLogger);
|
|
224
243
|
const clientDir = join(dirname(fileURLToPath(import.meta.url)), "client");
|
|
225
244
|
app.get("*", (c) => {
|
|
226
245
|
const filePath = join(clientDir, c.req.path === "/" ? "/index.html" : c.req.path);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@membank/dashboard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"tailwind-merge": "^3.0.0",
|
|
57
57
|
"tw-animate-css": "^1.0.0",
|
|
58
58
|
"zod": "^4.3.6",
|
|
59
|
-
"@membank/core": "0.
|
|
59
|
+
"@membank/core": "0.12.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@rolldown/plugin-babel": "^0.2.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e,S as t,T as n,v as r,w as i,y as a}from"./collections-y7eMFwFc.js";import{F as o,P as s,ft as c}from"./useRenderElement-DhejdWAQ.js";import{i as l,n as u}from"./preload-helper-DYD3iRAO.js";import{i as d,r as f}from"./types-DT_fBrSI.js";import{s as p}from"./index-B3Ej81eU.js";import{t as m}from"./input-BdBFU9te.js";import{n as ee,r as te,t as h}from"./empty-C4Q9vAt-.js";var g=e(n(),1);function _(e){let t=o({warn:e?.router===void 0}),n=e?.router||t,r=(0,g.useRef)(void 0);return s(n.stores.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=c(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var v=new Map([[`bold`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z`}))],[`duotone`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M112,56V200L40,128Z`,opacity:`0.2`}),g.createElement(`path`,{d:`M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z`}))],[`fill`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z`}))],[`light`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z`}))],[`regular`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z`}))],[`thin`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z`}))]]),y=new Map([[`bold`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,204H141l86.84-86.84a28,28,0,0,0,0-39.6L186.43,36.19a28,28,0,0,0-39.6,0L28.19,154.82a28,28,0,0,0,0,39.6l30.06,30.07A12,12,0,0,0,66.74,228H216a12,12,0,0,0,0-24ZM163.8,53.16a4,4,0,0,1,5.66,0l41.38,41.38a4,4,0,0,1,0,5.65L160,151l-47-47ZM71.71,204,45.16,177.45a4,4,0,0,1,0-5.65L96,121l47,47-36,36Z`}))],[`duotone`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M160,168l-48,48H66.75L36.69,185.94a16,16,0,0,1,0-22.63L96,104Z`,opacity:`0.2`}),g.createElement(`path`,{d:`M225,80.4,183.6,39a24,24,0,0,0-33.94,0L31,157.66a24,24,0,0,0,0,33.94l30.06,30.06A8,8,0,0,0,66.74,224H216a8,8,0,0,0,0-16h-84.7L225,114.34A24,24,0,0,0,225,80.4ZM108.68,208H70.05L42.33,180.28a8,8,0,0,1,0-11.31L96,115.31,148.69,168Zm105-105L160,156.69,107.31,104,161,50.34a8,8,0,0,1,11.32,0l41.38,41.38a8,8,0,0,1,0,11.31Z`}))],[`fill`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M225,80.4,183.6,39a24,24,0,0,0-33.94,0L31,157.66a24,24,0,0,0,0,33.94l30.06,30.06A8,8,0,0,0,66.74,224H216a8,8,0,0,0,0-16h-84.7L225,114.34A24,24,0,0,0,225,80.4ZM213.67,103,160,156.69,107.31,104,161,50.34a8,8,0,0,1,11.32,0l41.38,41.38a8,8,0,0,1,0,11.31Z`}))],[`light`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M223.57,81.81,182.19,40.43a22,22,0,0,0-31.12,0L32.43,159.07a22,22,0,0,0,0,31.11L62.5,220.24A6,6,0,0,0,66.74,222H216a6,6,0,0,0,0-12H126.49l97.08-97.08A22,22,0,0,0,223.57,81.81ZM109.51,210H69.22l-28.3-28.3a10,10,0,0,1,0-14.15L96,112.48,151.52,168ZM215.08,104.44,160,159.51,104.48,104l55.08-55.07a10,10,0,0,1,14.14,0l41.38,41.37A10,10,0,0,1,215.08,104.44Z`}))],[`regular`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M225,80.4,183.6,39a24,24,0,0,0-33.94,0L31,157.66a24,24,0,0,0,0,33.94l30.06,30.06A8,8,0,0,0,66.74,224H216a8,8,0,0,0,0-16h-84.7L225,114.34A24,24,0,0,0,225,80.4ZM108.68,208H70.05L42.33,180.28a8,8,0,0,1,0-11.31L96,115.31,148.69,168Zm105-105L160,156.69,107.31,104,161,50.34a8,8,0,0,1,11.32,0l41.38,41.38a8,8,0,0,1,0,11.31Z`}))],[`thin`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M222.15,83.22,180.77,41.85a20,20,0,0,0-28.28,0L33.85,160.48a20,20,0,0,0,0,28.29l30.06,30.06A4,4,0,0,0,66.74,220H216a4,4,0,0,0,0-8H121.66L222.15,111.51A20,20,0,0,0,222.15,83.22ZM110.34,212H68.4L39.51,183.11a12,12,0,0,1,0-17L96,109.65,154.35,168ZM216.49,105.85,160,162.34,101.65,104l56.49-56.48a12,12,0,0,1,17,0l41.37,41.37A12,12,0,0,1,216.49,105.85Z`}))]]),b=new Map([[`bold`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),g.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),x=new Map([[`bold`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M238.15,78.54,177.46,17.86a20,20,0,0,0-28.3,0L97.2,70c-12.43-3.33-36.68-5.72-61.74,14.5a20,20,0,0,0-1.6,29.73l45.46,45.47-39.8,39.8a12,12,0,0,0,17,17l39.8-39.81,45.47,45.46A20,20,0,0,0,155.91,228c.46,0,.93,0,1.4-.05A20,20,0,0,0,171.87,220c4.69-6.23,11-16.13,14.44-28s3.45-22.88.16-33.4l51.7-51.87A20,20,0,0,0,238.15,78.54Zm-74.26,68.79a12,12,0,0,0-2.23,13.84c3.43,6.86,6.9,21-6.28,40.65L54.08,100.53c21.09-14.59,39.53-6.64,41-6a11.67,11.67,0,0,0,13.81-2.29l54.43-54.61,55,55Z`}))],[`duotone`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M229.66,98.34,172.39,155.8c11.46,22.93-1.72,45.86-10.11,57a8,8,0,0,1-12,.83L42.34,105.76A8,8,0,0,1,43,93.85c29.65-23.92,57.4-10,57.4-10l57.27-57.46a8,8,0,0,1,11.31,0L229.66,87A8,8,0,0,1,229.66,98.34Z`,opacity:`0.2`}),g.createElement(`path`,{d:`M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z`}))],[`fill`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M235.33,104l-53.47,53.65c4.56,12.67,6.45,33.89-13.19,60A15.93,15.93,0,0,1,157,224c-.38,0-.75,0-1.13,0a16,16,0,0,1-11.32-4.69L96.29,171,53.66,213.66a8,8,0,0,1-11.32-11.32L85,159.71l-48.3-48.3A16,16,0,0,1,38,87.63c25.42-20.51,49.75-16.48,60.4-13.14L152,20.7a16,16,0,0,1,22.63,0l60.69,60.68A16,16,0,0,1,235.33,104Z`}))],[`light`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M233.91,82.79,173.22,22.1a14,14,0,0,0-19.81,0L98.93,76.77c-9.52-3.25-34-8.34-59.71,12.41A14,14,0,0,0,38.1,110l49.71,49.71-44.05,44a6,6,0,1,0,8.48,8.48l44.05-44.05L146,217.89a14,14,0,0,0,9.9,4.11q.49,0,1,0a14,14,0,0,0,10.19-5.54c19.72-26.21,17.15-47.23,12.46-59.3l54.37-54.55A14,14,0,0,0,233.91,82.79ZM225.42,94.1h0l-57.27,57.46a6,6,0,0,0-1.11,6.92c9.94,19.88-1.71,40.32-9.54,50.72a2,2,0,0,1-3,.2L46.58,101.51a2,2,0,0,1,.18-3c12.5-10.09,24.5-12.76,33.7-12.76a42.13,42.13,0,0,1,17.25,3.41A6,6,0,0,0,104.64,88L161.9,30.59a2,2,0,0,1,2.83,0l60.69,60.68A2,2,0,0,1,225.42,94.1Z`}))],[`regular`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z`}))],[`thin`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M232.49,84.2,171.8,23.51a12,12,0,0,0-17,0L99.45,79.07c-8.08-3-32.79-9.45-59,11.67a12,12,0,0,0-1,17.84l51.13,51.13L45.17,205.17a4,4,0,0,0,5.66,5.66l45.46-45.47,51.12,51.12A12,12,0,0,0,155.9,220c.28,0,.57,0,.85,0a12,12,0,0,0,8.73-4.74c19.83-26.36,16.51-47.18,11.71-58.57l55.3-55.49A12,12,0,0,0,232.49,84.2Zm-5.66,11.31h0L169.56,153a4,4,0,0,0-.75,4.61c10.43,20.85-1.62,42-9.73,52.83a4,4,0,0,1-6,.4L45.17,102.93a4,4,0,0,1,.33-6C58.44,86.53,70.86,83.74,80.44,83.74A43.9,43.9,0,0,1,98.6,87.38a4,4,0,0,0,4.62-.75l57.27-57.46a4,4,0,0,1,5.66,0l60.68,60.69A4,4,0,0,1,226.83,95.51Z`}))]]),S=new Map([[`bold`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),g.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),C=g.forwardRef((e,t)=>g.createElement(l,{ref:t,...e,weights:v}));C.displayName=`ArrowLeftIcon`;var w=C,T=g.forwardRef((e,t)=>g.createElement(l,{ref:t,...e,weights:y}));T.displayName=`EraserIcon`;var E=T,D=g.forwardRef((e,t)=>g.createElement(l,{ref:t,...e,weights:b}));D.displayName=`MagnifyingGlassIcon`;var O=D,k=g.forwardRef((e,t)=>g.createElement(l,{ref:t,...e,weights:x}));k.displayName=`PushPinIcon`;var A=k,j=g.forwardRef((e,t)=>g.createElement(l,{ref:t,...e,weights:S}));j.displayName=`TrashIcon`;var M=j,ne=t(),N=i(),P=(0,g.forwardRef)(function(e,t){let n=(0,ne.c)(70),{memory:i,selected:o,focused:s,confirming:c,onSelect:l,onPin:m,onDelete:ee,onDeleteStart:te,onDeleteCancel:h}=e,g;n[0]===i.content?g=n[1]:(g=i.content.length>140?`${i.content.slice(0,140)}…`:i.content,n[0]=i.content,n[1]=g);let _=g,v=o&&`bg-accent/60`,y=s&&!o&&`bg-accent/20`,b=s&&`outline-none ring-1 ring-inset ring-primary/40`,x;n[2]!==v||n[3]!==y||n[4]!==b?(x=a(`group relative flex flex-col gap-1.5 border-b border-border px-4 py-3 transition-colors`,`hover:bg-accent/40`,v,y,b),n[2]=v,n[3]=y,n[4]=b,n[5]=x):x=n[5];let S=i.type,C=f[i.type],w;n[6]===i.type?w=n[7]:(w=r(i.type),n[6]=i.type,n[7]=w);let T;n[8]!==S||n[9]!==C||n[10]!==w?(T=(0,N.jsx)(d,{variant:S,className:`mt-px shrink-0`,title:C,children:w}),n[8]=S,n[9]=C,n[10]=w,n[11]=T):T=n[11];let E;n[12]===_?E=n[13]:(E=(0,N.jsx)(`p`,{className:`flex-1 text-xs leading-relaxed text-foreground line-clamp-2 min-w-0 text-left`,children:_}),n[12]=_,n[13]=E);let D;n[14]!==l||n[15]!==E||n[16]!==T?(D=(0,N.jsxs)(u,{variant:`ghost`,onClick:l,className:`h-auto flex-1 min-w-0 items-start justify-start whitespace-normal p-0 font-normal hover:bg-transparent`,children:[T,E]}),n[14]=l,n[15]=E,n[16]=T,n[17]=D):D=n[17];let O=i.pinned?`opacity-100`:`opacity-0 group-hover:opacity-100 group-focus-within:opacity-100`,k;n[18]===O?k=n[19]:(k=a(`flex items-center gap-1 transition-opacity shrink-0`,O),n[18]=O,n[19]=k);let j=i.pinned?`Unpin`:`Pin`,P=i.pinned&&`text-primary`,L;n[20]===P?L=n[21]:(L=a(P),n[20]=P,n[21]=L);let R=i.pinned?`fill`:`regular`,z;n[22]===R?z=n[23]:(z=(0,N.jsx)(A,{weight:R}),n[22]=R,n[23]=z);let B;n[24]!==m||n[25]!==j||n[26]!==L||n[27]!==z?(B=(0,N.jsx)(u,{variant:`ghost`,size:`icon-sm`,onClick:m,"aria-label":j,className:L,children:z}),n[24]=m,n[25]=j,n[26]=L,n[27]=z,n[28]=B):B=n[28];let V=c?ee:te,re=c?`Confirm delete`:`Delete`,ie=c?`text-destructive bg-destructive/10`:`hover:text-destructive`,ae=i.pinned&&`opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity`,H;n[29]!==ie||n[30]!==ae?(H=a(ie,ae),n[29]=ie,n[30]=ae,n[31]=H):H=n[31];let oe=c?`fill`:`regular`,U;n[32]===oe?U=n[33]:(U=(0,N.jsx)(M,{weight:oe}),n[32]=oe,n[33]=U);let W;n[34]!==h||n[35]!==V||n[36]!==re||n[37]!==H||n[38]!==U?(W=(0,N.jsx)(u,{variant:`ghost`,size:`icon-sm`,onClick:V,onBlur:h,"aria-label":re,className:H,children:U}),n[34]=h,n[35]=V,n[36]=re,n[37]=H,n[38]=U,n[39]=W):W=n[39];let G;n[40]!==k||n[41]!==B||n[42]!==W?(G=(0,N.jsxs)(`div`,{className:k,children:[B,W]}),n[40]=k,n[41]=B,n[42]=W,n[43]=G):G=n[43];let K;n[44]!==D||n[45]!==G?(K=(0,N.jsxs)(`div`,{className:`flex items-start gap-2`,children:[D,G]}),n[44]=D,n[45]=G,n[46]=K):K=n[46];let q;n[47]===i.tags?q=n[48]:(q=i.tags.length>0&&(0,N.jsx)(`div`,{className:`flex gap-1 flex-wrap`,children:i.tags.map(F)}),n[47]=i.tags,n[48]=q);let J;n[49]===i.reviewEvents.length?J=n[50]:(J=i.reviewEvents.length>0&&(0,N.jsx)(`span`,{title:`Flagged for review — possible duplicate or conflict with another memory`,children:(0,N.jsx)(p,{weight:`fill`,className:`size-3 text-correction`})}),n[49]=i.reviewEvents.length,n[50]=J);let Y;n[51]===i.projects?Y=n[52]:(Y=i.projects.length>0?(0,N.jsx)(`span`,{className:`text-[11px] text-muted-foreground truncate max-w-32`,children:i.projects.map(I).join(`, `)}):(0,N.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`global`}),n[51]=i.projects,n[52]=Y);let X;n[53]===i.updatedAt?X=n[54]:(X=new Date(i.updatedAt).toLocaleDateString(),n[53]=i.updatedAt,n[54]=X);let Z;n[55]===X?Z=n[56]:(Z=(0,N.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:X}),n[55]=X,n[56]=Z);let Q;n[57]!==J||n[58]!==Y||n[59]!==Z?(Q=(0,N.jsxs)(`div`,{className:`flex items-center gap-1.5 ml-auto`,children:[J,Y,Z]}),n[57]=J,n[58]=Y,n[59]=Z,n[60]=Q):Q=n[60];let $;n[61]!==q||n[62]!==Q?($=(0,N.jsxs)(`div`,{className:`flex items-center gap-2 pl-[42px]`,children:[q,Q]}),n[61]=q,n[62]=Q,n[63]=$):$=n[63];let se;return n[64]!==h||n[65]!==t||n[66]!==K||n[67]!==$||n[68]!==x?(se=(0,N.jsxs)(`li`,{ref:t,className:x,onMouseLeave:h,children:[K,$]}),n[64]=h,n[65]=t,n[66]=K,n[67]=$,n[68]=x,n[69]=se):se=n[69],se});function F(e){return(0,N.jsx)(d,{variant:`outline`,children:e},e)}function I(e){return e.name}function L(e){let t=(0,ne.c)(60),{selectedId:n,list:r}=e,{search:i,searchInput:o,inputRef:s,isLoading:c,filtered:l,focusedIndex:d,confirmingId:f,setConfirmingId:p,rowRefs:g,hasActiveFilters:_,handleSearchChange:v,handleClearFilters:y,handlePin:b,handleDelete:x,handleSelect:S}=r,C=l.length===1?`memory`:`memories`,w=i.search?` matching "${i.search}"`:``,T;t[0]!==l.length||t[1]!==C||t[2]!==w?(T=(0,N.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`sr-only`,children:[l.length,` `,C,w]}),t[0]=l.length,t[1]=C,t[2]=w,t[3]=T):T=t[3];let D;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,N.jsx)(O,{weight:`regular`,className:`absolute left-2.5 top-1/2 -translate-y-1/2 size-3.5 text-muted-foreground pointer-events-none`}),t[4]=D):D=t[4];let k;t[5]===v?k=t[6]:(k=e=>v(e.target.value),t[5]=v,t[6]=k);let A;t[7]!==s||t[8]!==o||t[9]!==k?(A=(0,N.jsxs)(`div`,{className:`relative flex-1 min-w-0`,children:[D,(0,N.jsx)(m,{ref:s,placeholder:`Search…`,value:o,onChange:k,className:`pl-7`,title:`Press / to focus`})]}),t[7]=s,t[8]=o,t[9]=k,t[10]=A):A=t[10];let j;t[11]!==y||t[12]!==_?(j=_&&(0,N.jsx)(u,{variant:`ghost`,size:`icon-sm`,onClick:y,"aria-label":`Clear filters`,title:`Clear all filters`,children:(0,N.jsx)(E,{weight:`regular`})}),t[11]=y,t[12]=_,t[13]=j):j=t[13];let M;t[14]!==A||t[15]!==j?(M=(0,N.jsxs)(`div`,{className:`flex items-center gap-1.5 px-3 pt-3 pb-2 border-b border-border shrink-0`,children:[A,j]}),t[14]=A,t[15]=j,t[16]=M):M=t[16];let F;t[17]!==l.length||t[18]!==c?(F=c&&l.length===0&&(0,N.jsx)(`div`,{className:`flex items-center justify-center h-24 text-xs font-mono text-muted-foreground`,children:`Loading…`}),t[17]=l.length,t[18]=c,t[19]=F):F=t[19];let I;t[20]!==l.length||t[21]!==y||t[22]!==c||t[23]!==i.needsReview||t[24]!==i.pinned||t[25]!==i.search||t[26]!==i.type?(I=!c&&l.length===0&&(0,N.jsxs)(h,{className:`border-0 rounded-none p-0 h-32`,children:[i.search?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(te,{className:`text-xs font-mono font-normal`,children:[`No memories match “`,i.search,`”`]}),(0,N.jsx)(u,{variant:`link`,size:`sm`,onClick:y,children:`Clear search`})]}):(0,N.jsx)(te,{className:`text-xs font-mono font-normal`,children:`No memories`}),(i.type||i.pinned||i.needsReview)&&(0,N.jsx)(ee,{className:`text-[11px] font-mono`,children:`Filters are active — try clearing them in the left panel`})]}),t[20]=l.length,t[21]=y,t[22]=c,t[23]=i.needsReview,t[24]=i.pinned,t[25]=i.search,t[26]=i.type,t[27]=I):I=t[27];let L;if(t[28]!==f||t[29]!==l||t[30]!==d||t[31]!==x||t[32]!==b||t[33]!==S||t[34]!==g||t[35]!==n||t[36]!==p){let e;t[38]!==f||t[39]!==d||t[40]!==x||t[41]!==b||t[42]!==S||t[43]!==g||t[44]!==n||t[45]!==p?(e=(e,t)=>(0,N.jsx)(P,{ref:e=>{g.current[t]=e},memory:e,selected:n===e.id,focused:d===t,confirming:f===e.id,onSelect:()=>S(e.id),onPin:()=>b(e.id,e.pinned),onDelete:()=>{x(e.id),p(null)},onDeleteStart:()=>p(e.id),onDeleteCancel:()=>p(null)},e.id),t[38]=f,t[39]=d,t[40]=x,t[41]=b,t[42]=S,t[43]=g,t[44]=n,t[45]=p,t[46]=e):e=t[46],L=l.map(e),t[28]=f,t[29]=l,t[30]=d,t[31]=x,t[32]=b,t[33]=S,t[34]=g,t[35]=n,t[36]=p,t[37]=L}else L=t[37];let R;t[47]===L?R=t[48]:(R=(0,N.jsx)(`ul`,{className:`m-0 p-0`,children:L}),t[47]=L,t[48]=R);let z;t[49]!==I||t[50]!==R||t[51]!==F?(z=(0,N.jsxs)(`div`,{className:`flex-1 overflow-y-auto`,children:[F,I,R]}),t[49]=I,t[50]=R,t[51]=F,t[52]=z):z=t[52];let B;t[53]===l.length?B=t[54]:(B=l.length>0&&(0,N.jsxs)(`div`,{className:a(`px-4 py-2 border-t border-border shrink-0`,`text-[11px] font-mono text-muted-foreground`),children:[l.length,` `,l.length===1?`memory`:`memories`]}),t[53]=l.length,t[54]=B);let V;return t[55]!==z||t[56]!==B||t[57]!==T||t[58]!==M?(V=(0,N.jsxs)(`div`,{className:`flex flex-col h-full`,children:[T,M,z,B]}),t[55]=z,t[56]=B,t[57]=T,t[58]=M,t[59]=V):V=t[59],V}export{_ as i,A as n,w as r,L as t};
|