@theobourgeois/ytdb 0.1.4 → 0.1.5
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +4 -3
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/[connectionId]/[schema]/[table]/page.js +1 -1
- package/.next/server/app/[connectionId]/[schema]/[table]/page.js.nft.json +1 -1
- package/.next/server/app/[connectionId]/[schema]/[table]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[connectionId]/page.js +1 -1
- package/.next/server/app/[connectionId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[connectionId]/query/page.js +1 -1
- package/.next/server/app/[connectionId]/query/page.js.nft.json +1 -1
- package/.next/server/app/[connectionId]/query/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/activity/route.js +2 -2
- package/.next/server/app/api/activity/route.js.nft.json +1 -1
- package/.next/server/app/api/cell/route.js +1 -1
- package/.next/server/app/api/cell/route.js.nft.json +1 -1
- package/.next/server/app/api/definition/route.js +3 -3
- package/.next/server/app/api/definition/route.js.nft.json +1 -1
- package/.next/server/app/api/delete-rows/route.js +2 -2
- package/.next/server/app/api/delete-rows/route.js.nft.json +1 -1
- package/.next/server/app/api/health/route.js +1 -1
- package/.next/server/app/api/insert-row/route.js +2 -2
- package/.next/server/app/api/insert-row/route.js.nft.json +1 -1
- package/.next/server/app/api/lookup/route.js +1 -1
- package/.next/server/app/api/lookup/route.js.nft.json +1 -1
- package/.next/server/app/api/query/route.js +2 -2
- package/.next/server/app/api/query/route.js.nft.json +1 -1
- package/.next/server/app/api/related/route.js +2 -2
- package/.next/server/app/api/related/route.js.nft.json +1 -1
- package/.next/server/app/api/rows/route.js +1 -1
- package/.next/server/app/api/rows/route.js.nft.json +1 -1
- package/.next/server/app/api/tables/route.js +2 -2
- package/.next/server/app/api/tables/route.js.nft.json +1 -1
- package/.next/server/app/api/update-row/route.js +26 -0
- package/.next/server/app/api/update-row/route.js.nft.json +1 -0
- package/.next/server/app/api/update-row/route_client-reference-manifest.js +1 -0
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +4 -3
- package/.next/server/chunks/25.js +1 -0
- package/.next/server/chunks/729.js +1 -1
- package/.next/server/chunks/97.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/2TlHWKLrxFV59N4Moie3r/_buildManifest.js +1 -0
- package/.next/static/chunks/444-bf95622a3be090a4.js +1 -0
- package/.next/static/chunks/541-7100f33afc3f8243.js +1 -0
- package/.next/static/chunks/680-15c080c77c182ea3.js +1 -0
- package/.next/static/chunks/app/[connectionId]/[schema]/[table]/page-bfacbc4a4d34c939.js +1 -0
- package/.next/static/chunks/app/[connectionId]/layout-df25b506d0665861.js +1 -0
- package/.next/static/chunks/app/[connectionId]/page-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/[connectionId]/query/page-fe42ed89c982309e.js +1 -0
- package/.next/static/chunks/app/_global-error/page-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/activity/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/cell/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/definition/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/delete-rows/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/health/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/insert-row/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/lookup/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/query/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/related/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/rows/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/tables/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/app/api/update-row/route-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-82bedb3eb554b308.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-82bedb3eb554b308.js +1 -0
- package/.next/static/css/1915e6393ee4941a.css +1 -0
- package/package.json +2 -1
- package/.next/server/chunks/931.js +0 -1
- package/.next/static/chunks/322-820984c566985a36.js +0 -1
- package/.next/static/chunks/601-799a65f8b7bf9b55.js +0 -1
- package/.next/static/chunks/657-d99f60f84594816d.js +0 -1
- package/.next/static/chunks/app/[connectionId]/[schema]/[table]/page-2074e41ca84763c8.js +0 -1
- package/.next/static/chunks/app/[connectionId]/layout-1ca201b7c77f1f4e.js +0 -1
- package/.next/static/chunks/app/[connectionId]/page-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/[connectionId]/query/page-1369fbf6f5f787c7.js +0 -1
- package/.next/static/chunks/app/_global-error/page-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/api/activity/route-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/api/cell/route-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/api/definition/route-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/api/delete-rows/route-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/api/health/route-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/api/insert-row/route-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/api/lookup/route-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/api/query/route-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/api/related/route-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/api/rows/route-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/app/api/tables/route-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-7dba3ffe5102bbbe.js +0 -1
- package/.next/static/css/8b5d2aa22bcd334e.css +0 -1
- package/.next/static/rFvQ-riu3yHXAFfz6tH5K/_buildManifest.js +0 -1
- /package/.next/static/{rFvQ-riu3yHXAFfz6tH5K → 2TlHWKLrxFV59N4Moie3r}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
exports.id=729,exports.ids=[729],exports.modules={1777:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(5735),e=c(34766);async function f({children:a,params:b}){let{connectionId:c}=await b;return(0,d.jsx)(e.ExplorerShell,{connectionId:c,children:a})}},9769:(a,b,c)=>{"use strict";c.d(b,{ExplorerShell:()=>an});var d=c(48249),e=c(2116),f=c.n(e),g=c(96006),h=c(25297),i=c(98609),j=c(91732),k=c(99598),l=c(78260),m=c(44231),n=c(19099),o=c(67484),p=c(7178),q=c(93217),r=c(29813),s=c(88877),t=c(99058),u=c(40336),v=c(69856),w=c(18656),x=c(41764),y=c(14490);function z({className:a,children:b,...c}){return(0,d.jsxs)(t.V,{"data-slot":"scroll-area",className:(0,y.cn)("relative",a),...c,children:[(0,d.jsx)(u.B,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:b}),(0,d.jsx)(A,{}),(0,d.jsx)(v.I,{})]})}function A({className:a,orientation:b="vertical",...c}){return(0,d.jsx)(w.V,{"data-slot":"scroll-area-scrollbar","data-orientation":b,orientation:b,className:(0,y.cn)("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",a),...c,children:(0,d.jsx)(x.l,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}var B=c(13656),C=c(89366),D=c(89216),E=c(15386),F=c(82244),G=c(30770);function H({current:a}){let b=(0,n.useRouter)(),c=(0,j.Z)(a=>a.connections);return(0,d.jsxs)(F.rI,{children:[(0,d.jsxs)(F.ty,{className:"flex h-8 w-full items-center justify-between gap-2 rounded-lg px-2 text-left font-medium outline-none hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50 data-open:bg-muted/60",children:[(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,d.jsx)(G.F,{connection:a}),(0,d.jsx)("span",{className:"truncate",children:a.name}),a.layoutGroup&&(0,d.jsx)(D.A,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),(0,d.jsx)(E.A,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),(0,d.jsxs)(F.SQ,{align:"start",className:"w-(--anchor-width)",children:[c.map(c=>(0,d.jsxs)(F._2,{onClick:()=>b.push(`/${c.id}`),className:c.id===a.id?"font-medium":void 0,children:[(0,d.jsx)(G.F,{connection:c}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate",children:c.name}),c.layoutGroup&&c.layoutGroup===a.layoutGroup&&(0,d.jsx)(D.A,{className:"size-3.5 shrink-0 text-muted-foreground"})]},c.id)),(0,d.jsx)(F.mB,{}),(0,d.jsx)(F._2,{render:(0,d.jsx)(f(),{href:"/"}),children:"Manage connections"})]})]})}var I=c(54183),J=c(69627);function K({schemas:a,selected:b,onChange:c}){let e=null===b||b.length===a.length;return(0,d.jsxs)(F.rI,{children:[(0,d.jsxs)(F.ty,{className:"group flex h-9 w-full cursor-pointer items-center gap-2 rounded-lg border border-input bg-background/60 px-2.5 text-left text-sm outline-none transition-[border-color,background-color,box-shadow] hover:border-foreground/20 hover:bg-muted/50 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-open:border-foreground/20 data-open:bg-muted/60",children:[(0,d.jsx)(I.A,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium",children:null===b||b.length===a.length?"All schemas":0===b.length?"No schemas":1===b.length?b[0]:`${b.length} schemas`}),!e&&(0,d.jsxs)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] tabular-nums text-muted-foreground",children:[b.length,"/",a.length]}),(0,d.jsx)(J.A,{className:"size-3.5 shrink-0 text-muted-foreground transition-transform group-data-open:rotate-180"})]}),(0,d.jsx)(F.SQ,{align:"start",sideOffset:6,className:"max-h-80 w-(--anchor-width) min-w-52",children:(0,d.jsxs)(F.I,{children:[(0,d.jsxs)(F.lp,{className:"flex items-center justify-between px-2 py-1.5",children:[(0,d.jsx)("span",{children:"Visible schemas"}),(0,d.jsx)("span",{className:"font-normal tabular-nums opacity-70",children:a.length})]}),(0,d.jsx)(F.hO,{checked:e,onCheckedChange:a=>c(a?null:[]),children:(0,d.jsx)("span",{className:"font-medium",children:"Show all schemas"})}),(0,d.jsx)(F.mB,{}),a.map(f=>(0,d.jsx)(F.hO,{checked:e||(b?.includes(f)??!1),onCheckedChange:d=>{let e,g;return e=b??a,void c((g=d?[...new Set([...e,f])]:e.filter(a=>a!==f)).length===a.length?null:g)},children:(0,d.jsx)("span",{className:"truncate",children:f})},f))]})})]})}var L=c(9008),M=c(39470),N=c(91995);function O(a,b){let c=a.trim(),d=c.lastIndexOf(".");return -1===d?c:"schema"===b?c.slice(0,d):c.slice(d+1)}function P({text:a,query:b}){if(!b)return a;let c=[],e=a.toLocaleLowerCase(),f=b.toLocaleLowerCase(),g=0,h=e.indexOf(f);if(-1===h)return a;for(;-1!==h;)h>g&&c.push(a.slice(g,h)),c.push((0,d.jsx)("mark",{className:"rounded-[3px] bg-yellow-300/90 px-px text-yellow-950 dark:bg-yellow-400/85 dark:text-yellow-950",children:a.slice(h,h+b.length)},h)),g=h+b.length,h=e.indexOf(f,g);return g<a.length&&c.push(a.slice(g)),c}function Q({connectionId:a,table:b,search:c,pinned:e,showSchema:g,active:h,reorderable:i,dragging:j,dropEdge:k,onTogglePin:l,onDragStart:m,onDragOver:n,onDrop:o,onDragEnd:p,onMove:q}){return(0,d.jsxs)("li",{onDragOver:n,onDrop:o,className:(0,y.cn)("group/table-row relative flex h-7 items-center rounded-md text-[13px] transition-[color,background-color,opacity] hover:bg-muted/60",h&&"bg-muted text-foreground",!h&&"text-foreground/80",j&&"opacity-45","before"===k&&"before:absolute before:inset-x-1 before:top-0 before:z-10 before:h-0.5 before:-translate-y-1/2 before:rounded-full before:bg-primary","after"===k&&"after:absolute after:inset-x-1 after:bottom-0 after:z-10 after:h-0.5 after:translate-y-1/2 after:rounded-full after:bg-primary"),children:[i&&(0,d.jsx)("button",{type:"button",draggable:!0,"aria-label":`Reorder ${b.schema}.${b.name}`,title:"Drag to reorder; use Up and Down arrow keys",onDragStart:m,onDragEnd:p,onKeyDown:a=>{("ArrowUp"===a.key||"ArrowDown"===a.key)&&(a.preventDefault(),q?.("ArrowUp"===a.key?-1:1))},className:"ml-1.5 flex size-5 shrink-0 cursor-grab touch-none items-center justify-center rounded text-muted-foreground opacity-50 outline-none transition-[color,background-color,opacity] hover:bg-foreground/10 hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:opacity-100 active:cursor-grabbing",children:(0,d.jsx)(L.A,{className:"size-3.5"})}),(0,d.jsxs)(f(),{href:`/${a}/${encodeURIComponent(b.schema)}/${encodeURIComponent(b.name)}`,className:(0,y.cn)("flex h-full min-w-0 flex-1 items-center gap-1.5 rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/60",i?"pl-1":"pl-6"),children:[(0,d.jsx)("span",{className:"truncate",children:(0,d.jsx)(P,{text:b.name,query:O(c,"table")})}),g?(0,d.jsx)("span",{className:"ml-auto max-w-20 truncate text-[10px] text-muted-foreground",children:b.schema}):"view"===b.kind&&(0,d.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:"view"})]}),(0,d.jsx)("button",{type:"button","aria-label":`${e?"Unpin":"Pin"} ${b.schema}.${b.name}`,"aria-pressed":e,title:e?"Unpin table":"Pin table",onClick:()=>l(b),className:(0,y.cn)("mr-0.5 flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground opacity-0 outline-none transition-[color,background-color,opacity] hover:bg-foreground/10 hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:opacity-100 group-hover/table-row:opacity-100",e&&"text-foreground"),children:(0,d.jsx)(M.A,{className:(0,y.cn)("size-3.5",e&&"fill-current")})})]})}function R({label:a,count:b,collapsed:c,pinned:e,search:f,onToggle:g}){return(0,d.jsxs)("button",{type:"button","aria-expanded":!c,onClick:g,className:"flex h-7 w-full cursor-pointer items-center gap-1 rounded-md px-1 text-xs font-medium text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/60",children:[(0,d.jsx)(N.A,{className:(0,y.cn)("size-3.5 transition-transform",!c&&"rotate-90")}),e&&(0,d.jsx)(M.A,{className:"mr-0.5 size-3 fill-current"}),(0,d.jsx)("span",{className:"truncate",children:e?a:(0,d.jsx)(P,{text:a,query:O(f,"schema")})}),(0,d.jsx)("span",{className:"ml-auto pr-1 tabular-nums opacity-60",children:b})]})}function S({connectionId:a,tables:b,search:c,collapsedSchemas:e,pinnedTables:f,onToggleSchema:g,onTogglePin:h,onReorderPinned:i}){let j=(0,n.useParams)(),[k,l]=(0,o.useState)(!1),[m,p]=(0,o.useState)(null),[q,r]=(0,o.useState)(null),s=new Map(b.map(a=>[(0,C.i)(a),a])),t=f.flatMap(a=>{let b=s.get(a);return b?[b]:[]});function u(){p(null),r(null)}return 0===b.length?(0,d.jsx)("p",{className:"px-3 py-8 text-center text-xs text-muted-foreground",children:c.trim()?"No tables match your search":"No tables in these schemas"}):(0,d.jsxs)("div",{className:"flex flex-col gap-1 px-2 pb-4",children:[t.length>0&&(0,d.jsxs)("div",{className:"mb-1 border-b border-border/60 pb-1",children:[(0,d.jsx)(R,{label:"Pinned tables",count:t.length,collapsed:k,pinned:!0,search:c,onToggle:()=>l(a=>!a)}),!k&&(0,d.jsx)("ul",{children:t.map(b=>{let e=(0,C.i)(b);return(0,d.jsx)(Q,{connectionId:a,table:b,search:c,pinned:!0,showSchema:!0,active:j.schema===b.schema&&j.table===b.name,reorderable:!0,dragging:m===e,dropEdge:q?.key===e?q.edge:null,onTogglePin:h,onDragStart:a=>{a.dataTransfer.effectAllowed="move",a.dataTransfer.setData("text/plain",e),p(e),r(null)},onDragOver:a=>(function(a,b){if(!m||m===b)return;a.preventDefault(),a.dataTransfer.dropEffect="move";let c=a.currentTarget.getBoundingClientRect(),d=a.clientY<c.top+c.height/2?"before":"after";r(a=>a?.key===b&&a.edge===d?a:{key:b,edge:d})})(a,e),onDrop:a=>{let b,c;return a.preventDefault(),b=m??a.dataTransfer.getData("text/plain"),c=q?.key===e?q.edge:"before",void(b&&i(b,e,c),u())},onDragEnd:u,onMove:a=>{let b,c;return b=t.findIndex(a=>(0,C.i)(a)===e),void((c=t[b+a])&&i(e,(0,C.i)(c),-1===a?"before":"after"))}},e)})})]}),(function(a){let b=new Map;for(let c of a)b.set(c.schema,[...b.get(c.schema)??[],c]);return[...b.entries()].sort(([a],[b])=>{let c;return((c=new Map([["public",0],["auth",1]])).get(a)??2)-(c.get(b)??2)||a.localeCompare(b)})})(b).map(([b,i])=>{let k=e.includes(b);return(0,d.jsxs)("div",{children:[(0,d.jsx)(R,{label:b,count:i.length,collapsed:k,search:c,onToggle:()=>g(b)}),!k&&(0,d.jsx)("ul",{children:i.map(b=>(0,d.jsx)(Q,{connectionId:a,table:b,search:c,pinned:f.includes((0,C.i)(b)),active:j.schema===b.schema&&j.table===b.name,onTogglePin:h},(0,C.i)(b)))})]},b)})]})}function T(a){return Math.min(480,Math.max(180,Math.round(a)))}function U(a,b){let c=new Map([["public",0],["auth",1]]);return(c.get(a)??2)-(c.get(b)??2)||a.localeCompare(b)}function V(a,b,c){let d=b.trim().toLocaleLowerCase();return a.filter(a=>(null===c||!!c.includes(a.schema))&&(!d||a.name.toLocaleLowerCase().includes(d)||`${a.schema}.${a.name}`.toLocaleLowerCase().includes(d)))}function W({width:a,onWidthChange:b,onCollapse:c}){let e=(0,n.usePathname)(),{connection:g,tables:i}=(0,m.k)(),[j,l]=(0,k.DE)(g.id),[t,u]=(0,o.useState)(()=>T(a)),v=(0,o.useRef)(null),w=(0,o.useMemo)(()=>[...new Set((i.data??[]).map(a=>a.schema))].sort(U),[i.data]),x=(0,o.useMemo)(()=>null===j.selectedSchemas?null:j.selectedSchemas.filter(a=>w.includes(a)),[j.selectedSchemas,w]),A=(0,o.useMemo)(()=>V(i.data??[],j.search,x),[i.data,j.search,x]),D=`/${encodeURIComponent(g.id)}/query`;function E(a,b){let c=new Set(V(i.data??[],a,b).map(a=>a.schema));return j.collapsedSchemas.filter(a=>!c.has(a))}return(0,d.jsxs)("aside",{id:"database-explorer-sidebar",style:{width:t},className:"relative flex h-full shrink-0 flex-col border-r bg-sidebar",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 border-b border-sidebar-border/60 p-2 pb-2.5",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsx)("div",{className:"min-w-0 flex-1",children:(0,d.jsx)(H,{current:g})}),(0,d.jsx)(h.$,{variant:"ghost",size:"icon-sm","aria-label":"Collapse database sidebar",title:"Collapse sidebar",onClick:c,children:(0,d.jsx)(p.A,{})})]}),(0,d.jsxs)(f(),{href:D,"aria-current":e===D?"page":void 0,className:(0,y.cn)((0,h.r)({variant:e===D?"secondary":"ghost",size:"sm"}),"h-8 w-full justify-start px-2"),children:[(0,d.jsx)(q.A,{"data-icon":"inline-start"}),"SQL query"]}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)(r.A,{className:"pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground"}),(0,d.jsx)(s.p,{value:j.search,onChange:a=>{var b;l({search:b=a.target.value,collapsedSchemas:b.trim()?E(b,x):j.collapsedSchemas})},placeholder:"Search tables","aria-label":"Search tables",className:"h-9 bg-background/60 pr-9 pl-8"}),(0,d.jsx)("kbd",{className:"pointer-events-none absolute top-1/2 right-2.5 -translate-y-1/2 font-mono text-[10px] text-muted-foreground/55",children:"⌘P"})]}),(0,d.jsx)(K,{schemas:w,selected:x,onChange:function(a){l({selectedSchemas:a,collapsedSchemas:j.search.trim()?E(j.search,a):j.collapsedSchemas})}})]}),(0,d.jsx)(z,{className:"min-h-0 flex-1 pt-1.5",children:i.error?(0,d.jsx)("p",{className:"px-3 py-4 text-xs text-destructive",children:i.error}):i.data?(0,d.jsx)(S,{connectionId:g.id,tables:A,search:j.search,collapsedSchemas:j.collapsedSchemas,pinnedTables:j.pinnedTables,onToggleSchema:function(a){l({collapsedSchemas:j.collapsedSchemas.includes(a)?j.collapsedSchemas.filter(b=>b!==a):[...j.collapsedSchemas,a]})},onTogglePin:function(a){let b=(0,C.i)(a);l({pinnedTables:j.pinnedTables.includes(b)?j.pinnedTables.filter(a=>a!==b):[...j.pinnedTables,b]})},onReorderPinned:function(a,b,c){if(a===b)return;let d=j.pinnedTables.filter(b=>b!==a),e=d.indexOf(b);-1!==e&&(d.splice(e+ +("after"===c),0,a),l({pinnedTables:d}))}}):(0,d.jsx)("div",{className:"flex flex-col gap-2 px-3 py-2",children:Array.from({length:8},(a,b)=>(0,d.jsx)(B.E,{className:"h-5 w-full"},b))})}),(0,d.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize database sidebar","aria-valuemin":180,"aria-valuemax":480,"aria-valuenow":t,tabIndex:0,title:"Drag to resize; double-click to reset",onPointerDown:function(a){a.preventDefault(),v.current={pointerId:a.pointerId,startX:a.clientX,startWidth:t},a.currentTarget.setPointerCapture(a.pointerId)},onPointerMove:function(a){let b=v.current;b&&b.pointerId===a.pointerId&&(a.preventDefault(),u(T(b.startWidth+a.clientX-b.startX)))},onPointerUp:function(a){let c=v.current;if(!c||c.pointerId!==a.pointerId)return;let d=T(c.startWidth+a.clientX-c.startX);v.current=null,u(d),a.currentTarget.hasPointerCapture(a.pointerId)&&a.currentTarget.releasePointerCapture(a.pointerId),b(d)},onPointerCancel:function(a){let c=v.current;c&&c.pointerId===a.pointerId&&(v.current=null,a.currentTarget.hasPointerCapture(a.pointerId)&&a.currentTarget.releasePointerCapture(a.pointerId),b(t))},onKeyDown:function(a){if("ArrowLeft"!==a.key&&"ArrowRight"!==a.key)return;a.preventDefault();let c=T(t+("ArrowLeft"===a.key?-1:1)*16);u(c),b(c)},onDoubleClick:function(a){a.preventDefault(),u(256),b(256)},className:"group/resize absolute inset-y-0 -right-1 z-30 w-2 cursor-col-resize touch-none outline-none after:absolute after:inset-y-0 after:left-1/2 after:w-px after:-translate-x-1/2 after:bg-transparent after:transition-colors hover:after:bg-primary focus-visible:after:bg-primary"})]})}var X=c(35471),Y=c(89267),Z=c(16280),$=c(61561),_=c(93291);function aa({text:a,query:b}){if(!b)return a;let c=a.toLocaleLowerCase(),e=b.toLocaleLowerCase(),f=c.indexOf(e);return -1===f?a:(0,d.jsxs)(d.Fragment,{children:[a.slice(0,f),(0,d.jsx)("mark",{className:"rounded-[3px] bg-yellow-300/90 px-px text-yellow-950 dark:bg-yellow-400/85 dark:text-yellow-950",children:a.slice(f,f+b.length)}),a.slice(f+b.length)]})}async function ab(a){try{await navigator.clipboard.writeText(a)}catch{let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),b.remove()}}function ac(){let a=(0,n.useRouter)(),b=(0,n.useParams)(),{connection:c,tables:e}=(0,m.k)(),f=(0,j.Z)(a=>a.add),[g,h]=(0,k.DE)(c.id),[i,l]=(0,o.useState)(!1),[p,q]=(0,o.useState)("commands"),[r,s]=(0,o.useState)(""),[t,u]=(0,o.useState)(0),[v,w]=(0,o.useState)(!1),x=(0,o.useRef)(null),z=(0,o.useRef)(null),A=(0,o.useRef)(null),B=(0,o.useRef)(p),D=(0,Z.C)(a=>a.theme),E=b.schema&&b.table?{schema:decodeURIComponent(b.schema),name:decodeURIComponent(b.table)}:null,F=!!E&&g.pinnedTables.includes((0,C.i)(E)),G=(0,k.lz)(a=>E?a.tables[`${c.id}:${(0,C.i)(E)}`]:void 0),H=(0,o.useMemo)(()=>[{id:"new-query",title:"Open SQL Query",keywords:["new","query","sql","console","editor"],enabled:!0,run:()=>a.push(`/${encodeURIComponent(c.id)}/query`)},{id:"reload-tables",title:"Reload Tables",keywords:["refresh","reload","tables","sync"],enabled:!0,run:()=>e.reload()},{id:"pin-table",title:F?"Unpin Table":"Pin Table",keywords:["pin","unpin","favorite","star"],enabled:null!==E,run:()=>{if(!E)return;let a=(0,C.i)(E);h({pinnedTables:g.pinnedTables.includes(a)?g.pinnedTables.filter(b=>b!==a):[...g.pinnedTables,a]})}},{id:"clear-filters",title:"Clear Filters",keywords:["filter","reset","remove"],enabled:null!==E,run:()=>{E&&k.lz.getState().setTable(c.id,E,{filters:[],page:0})}},{id:"clear-search",title:"Clear Search",keywords:["find","search","reset"],enabled:null!==E&&!!G?.search,run:()=>{E&&k.lz.getState().setTable(c.id,E,{search:"",page:0})}},{id:"reset-columns",title:"Reset Columns",keywords:["pin","hide","frozen","layout","show"],enabled:null!==E,run:()=>{E&&k.lz.getState().setTable(c.id,E,{pinnedColumns:void 0,hiddenColumns:[]})}},{id:"copy-table",title:"Copy Schema.Table",keywords:["copy","name","qualified"],enabled:null!==E,run:()=>{E&&ab((0,C.i)(E))}},{id:"color-theme",title:"Color Theme",keywords:["theme","appearance","dark","light","color","set","preferences"],enabled:!0,keepOpen:!0,run:()=>{let a=Z.C.getState().theme,b=$.zG.findIndex(b=>b.id===a);q("themes"),s(""),u(-1===b?0:b)}},{id:"add-connection",title:"Add Connection",keywords:["new","database","postgres"],enabled:!0,run:()=>w(!0)}],[g.pinnedTables,c.id,F,a,h,E,G?.search,e]),I=(0,o.useMemo)(()=>r.trim()?(0,_.R6)(r,H,a=>[a.title,...a.keywords].join(" ")).map(a=>a.item):H,[H,r]),J=(0,o.useMemo)(()=>r.trim()?(0,_.R6)(r,[...$.zG],a=>[a.name,...a.keywords].join(" ")).map(a=>a.item):[...$.zG],[r]),K="themes"===p?J:I,L="commands"===p?I[t]??null:null,M="themes"===p?J[t]??null:null;function N(a){a?.revertTheme&&"themes"===B.current&&(0,$.AZ)(Z.C.getState().theme),l(!1),s(""),u(0),q("commands")}function O(a){a.enabled&&(a.keepOpen||N({revertTheme:!0}),a.run())}function P(a){Z.C.getState().setTheme(a.id),(0,$.AZ)(a.id),N({revertTheme:!1})}return(0,d.jsxs)(d.Fragment,{children:[i&&(0,d.jsxs)("div",{ref:z,"data-command-palette":"",className:"fixed top-3 left-1/2 z-50 flex w-[min(36rem,calc(100%-1.5rem))] -translate-x-1/2 flex-col overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b px-3",children:[(0,d.jsx)("span",{className:"font-mono text-sm text-muted-foreground",children:">"}),(0,d.jsx)("input",{ref:x,value:r,onChange:a=>s(a.target.value),onKeyDown:function(a){if("ArrowDown"===a.key){if(a.preventDefault(),0===K.length)return;u(a=>(a+1)%K.length);return}if("ArrowUp"===a.key){if(a.preventDefault(),0===K.length)return;u(a=>(a-1+K.length)%K.length);return}if("Enter"===a.key){if(a.preventDefault(),"themes"===p){M&&P(M);return}L&&O(L)}},spellCheck:!1,autoComplete:"off",autoCorrect:"off",placeholder:"themes"===p?"Select color theme":"Type a command","aria-label":"themes"===p?"Color theme":"Command palette",className:"h-11 min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),(0,d.jsx)("div",{ref:A,role:"listbox","aria-label":"themes"===p?"Color themes":"Commands",className:"max-h-[min(24rem,50vh)] overflow-auto py-1",children:0===K.length?(0,d.jsx)("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"themes"===p?"No matching themes":"No matching commands"}):"themes"===p?J.map((a,b)=>{let c=b===t,e=a.id===D;return(0,d.jsxs)("button",{type:"button",role:"option","aria-selected":c,"data-active":c||void 0,onMouseEnter:()=>u(b),onClick:()=>P(a),className:(0,y.cn)("flex h-8 w-full cursor-pointer items-center gap-2 px-3 text-left text-[13px] outline-none",c&&"bg-primary/10"),children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"size-3.5 shrink-0 rounded-sm border",style:{background:a.swatch}}),(0,d.jsx)("span",{className:"min-w-0 truncate",children:(0,d.jsx)(aa,{text:a.name,query:r.trim()})}),e&&(0,d.jsx)(X.A,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground"})]},a.id)}):I.map((a,b)=>{let c=b===t;return(0,d.jsx)("button",{type:"button",role:"option","aria-selected":c,"aria-disabled":!a.enabled,"data-active":c||void 0,onMouseEnter:()=>u(b),onClick:()=>O(a),className:(0,y.cn)("flex h-8 w-full cursor-pointer items-center px-3 text-left text-[13px] outline-none",c&&"bg-primary/10",!a.enabled&&"cursor-default opacity-40"),children:(0,d.jsx)("span",{className:"min-w-0 truncate",children:(0,d.jsx)(aa,{text:a.title,query:r.trim()})})},a.id)})})]}),(0,d.jsx)(Y.f,{open:v,onOpenChange:w,onSubmit:b=>{let{shareWith:c,...d}=b,e=f(d);(0,k.mQ)(e.id,c),a.push(`/${e.id}`)}})]})}var ad=c(36274),ae=c(21215),af=c(83254);c(21883);let ag={pinned:"Pinned",recent:"Recent",tables:"Tables",connections:"Connections"};function ah({text:a,query:b}){if(!b)return a;let c=a.toLocaleLowerCase(),e=b.toLocaleLowerCase(),f=c.indexOf(e);return -1===f?a:(0,d.jsxs)(d.Fragment,{children:[a.slice(0,f),(0,d.jsx)("mark",{className:"rounded-[3px] bg-yellow-300/90 px-px text-yellow-950 dark:bg-yellow-400/85 dark:text-yellow-950",children:a.slice(f,f+b.length)}),a.slice(f+b.length)]})}function ai(a){try{return new URL(a).hostname}catch{return""}}function aj(a){return[a.name,ai(a.url)].filter(Boolean)}function ak(a,b){let c=new Map([["public",0],["auth",1]]);return(c.get(a.schema)??2)-(c.get(b.schema)??2)||a.schema.localeCompare(b.schema)||a.name.localeCompare(b.name)}function al(a,b){return a.map((a,c)=>0===c?{...a,section:b}:a)}function am(){let a=(0,n.useRouter)(),b=(0,n.useParams)(),{connection:c,tables:e}=(0,m.k)(),f=(0,j.Z)(a=>a.connections),[g,h]=(0,o.useState)(!1),[i,l]=(0,o.useState)(""),[p,q]=(0,o.useState)(0),[s,t]=(0,o.useState)(null),u=(0,o.useRef)(null),v=(0,o.useRef)(null),w=(0,o.useRef)(null),x=f.find(a=>a.id===s)??null,z=x??c,A=x&&x.id!==c.id?x.url:null,B=function(a){let[b]=(0,o.useState)(()=>new Map),[c,d]=(0,o.useState)({url:"",error:null});if(!a)return{data:void 0,error:null,loading:!1};let e=c.url===a?c.data:b.get(a);return{data:e,error:c.url===a?c.error:null,loading:void 0===e}}(A),[D,E]=(0,k.DE)(c.id),[F,H]=(0,k.DE)(z.id),I=z.id===c.id?D:F,J=(0,o.useMemo)(()=>A?B.data??[]:e.data??[],[B.data,A,e.data]),K=A?B.loading:e.loading,L=A?B.error:null,N=(0,o.useMemo)(()=>[...new Set(J.map(a=>a.schema))],[J]),O=null===I.selectedSchemas?null:I.selectedSchemas.filter(a=>N.includes(a)),P=(0,o.useMemo)(()=>null===O?J:J.filter(a=>O.includes(a.schema)),[J,O]),Q=I.pinnedTables,R=I.recentTables,S=(0,o.useMemo)(()=>{let a,b;return -1===(b=(a=i.trim()).indexOf(":"))?{schema:null,table:a}:{schema:a.slice(0,b).trim(),table:a.slice(b+1).trim()}},[i]),T=S.table||(S.schema?"":i.trim()),U=(0,o.useMemo)(()=>{let a=new Set(Q),b=new Set(R),d=null===S.schema?null:function(a,b){if(!a)return b;let c=a.toLocaleLowerCase(),d=b.filter(a=>a.toLocaleLowerCase()===c);if(d.length>0)return d;let e=b.filter(a=>a.toLocaleLowerCase().startsWith(c));return e.length>0?e:(0,_.R6)(a,b,a=>a).map(a=>a.item)}(S.schema,N),e=null===d?P:J.filter(a=>d.includes(a.schema)),g=new Map(e.map(a=>[(0,C.i)(a),a])),h=Q.flatMap(a=>{let b=g.get(a);return b?[b]:[]}),j=R.flatMap(b=>{let c=g.get(b);return!c||a.has(b)?[]:[c]}),k=(a,b)=>({type:"table",key:`table:${(0,C.i)(a)}`,table:a,...b}),l=a=>({type:"connection",key:`connection:${a.id}`,connection:a,current:a.id===c.id}),m=null===S.schema?i.trim():S.table,n=null===x&&null===S.schema;if(!m){let a=new Set([...h.map(a=>(0,C.i)(a)),...j.map(a=>(0,C.i)(a))]),d=e.filter(b=>!a.has((0,C.i)(b))).sort(ak),g=n?f.filter(a=>a.id!==c.id):[];return[...al(h.map(a=>k(a,{pinned:!0})),"pinned"),...al(j.map(a=>k(a,{pinned:!1,recent:!0})),"recent"),...al(d.map(a=>k(a,{pinned:!1,recent:b.has((0,C.i)(a))})),"tables"),...al(g.map(l),"connections")]}let o=(0,_.UO)(m,e,a=>null===S.schema?[a.name,`${a.schema}.${a.name}`,a.schema]:[a.name]).map(c=>({...c,score:c.score+80*!!a.has((0,C.i)(c.item))+40*!!b.has((0,C.i)(c.item))})).sort((a,b)=>b.score-a.score).map(c=>k(c.item,{pinned:a.has((0,C.i)(c.item)),recent:b.has((0,C.i)(c.item))}));return[...al(n?(0,_.UO)(i,f,aj).map(a=>l(a.item)):[],"connections"),...al(o,"tables")]},[J,c.id,f,x,S.schema,S.table,Q,i,R,N,P]),V=U[p]??null;function W(){t(null),q(0),u.current?.focus()}function X(b){var d,e;if(h(!1),l(""),q(0),t(null),"connection"===b.type){b.connection.id!==c.id&&a.push(`/${b.connection.id}`);return}a.push((d=z.id,e=b.table,`/${d}/${encodeURIComponent(e.schema)}/${encodeURIComponent(e.name)}`))}function Y(a){let b=(0,C.i)(a),d=I.pinnedTables.includes(b)?I.pinnedTables.filter(a=>a!==b):[...I.pinnedTables,b];(z.id===c.id?E:H)({pinnedTables:d})}let Z=z.id===c.id&&b.schema&&b.table?`${decodeURIComponent(b.schema)}.${decodeURIComponent(b.table)}`:null;return g?(0,d.jsxs)("div",{ref:v,"data-table-palette":"",className:"fixed top-3 left-1/2 z-50 flex w-[min(36rem,calc(100%-1.5rem))] -translate-x-1/2 flex-col overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b px-3",children:[(0,d.jsx)(r.A,{className:"size-4 shrink-0 text-muted-foreground"}),x&&(0,d.jsxs)("button",{type:"button",onClick:W,"aria-label":`Stop searching ${x.name}`,className:"flex h-6 max-w-40 shrink-0 items-center gap-1.5 rounded-md bg-muted px-1.5 text-xs outline-none hover:bg-muted/80",children:[(0,d.jsx)(G.F,{connection:x,className:"size-2"}),(0,d.jsx)("span",{className:"truncate",children:x.name})]}),(0,d.jsx)("input",{ref:u,value:i,onChange:a=>l(a.target.value),onKeyDown:function(a){if("ArrowDown"===a.key){if(a.preventDefault(),0===U.length)return;q(a=>(a+1)%U.length);return}if("ArrowUp"===a.key){if(a.preventDefault(),0===U.length)return;q(a=>(a-1+U.length)%U.length);return}if("Tab"===a.key){if(a.preventDefault(),x||a.shiftKey)return;V?.type==="connection"&&(t(V.connection.id),l(""),q(0));return}if("Backspace"===a.key&&""===i&&x){a.preventDefault(),W();return}"Enter"===a.key&&(a.preventDefault(),a.shiftKey&&V?.type==="table"?Y(V.table):V&&X(V))},spellCheck:!1,autoComplete:"off",autoCorrect:"off",placeholder:x?`Search tables in ${x.name}`:"Go to table (schema:name)","aria-label":x?`Go to table in ${x.name}`:"Go to table or connection",className:"h-11 min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),(0,d.jsx)("div",{ref:w,role:"listbox","aria-label":x?`Tables in ${x.name}`:"Tables and connections",className:"max-h-[min(24rem,50vh)] overflow-auto py-1",children:K&&0===J.length&&0===U.length?(0,d.jsx)("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"Loading tables…"}):L&&0===J.length?(0,d.jsx)("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:L}):0===U.length?(0,d.jsx)("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i.trim()?"No matches":"No tables"}):U.map((a,b)=>{let c=b===p;if("connection"===a.type){let e=ai(a.connection.url);return(0,d.jsxs)("div",{children:[a.section&&(0,d.jsx)("p",{className:"px-3 pt-2 pb-1 text-[10px] font-medium tracking-wide text-muted-foreground uppercase",children:ag[a.section]}),(0,d.jsxs)("button",{type:"button",role:"option","aria-selected":c,"data-active":c||void 0,onMouseEnter:()=>q(b),onClick:()=>X(a),className:(0,y.cn)("flex h-8 w-full cursor-pointer items-center gap-2 px-3 text-left text-[13px] outline-none",c&&"bg-primary/10"),children:[(0,d.jsx)(ad.A,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)(G.F,{connection:a.connection,className:"size-2"}),(0,d.jsx)("span",{className:(0,y.cn)("min-w-0 truncate",a.current&&"font-medium"),children:(0,d.jsx)(ah,{text:a.connection.name,query:T})}),(0,d.jsx)("span",{className:"ml-auto flex min-w-0 shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:c?(0,d.jsx)("span",{children:"Tab to search"}):(0,d.jsx)("span",{className:"max-w-36 truncate",children:a.current?"current":e||"connection"})})]})]},a.key)}let e=(0,C.i)(a.table)===Z;return(0,d.jsxs)("div",{children:[a.section&&(0,d.jsx)("p",{className:"px-3 pt-2 pb-1 text-[10px] font-medium tracking-wide text-muted-foreground uppercase",children:ag[a.section]}),(0,d.jsxs)("div",{onMouseEnter:()=>q(b),className:(0,y.cn)("group/table-result flex items-center",c&&"bg-primary/10"),children:[(0,d.jsxs)("button",{type:"button",role:"option","aria-selected":c,"data-active":c||void 0,onClick:()=>X(a),className:"flex h-8 min-w-0 flex-1 cursor-pointer items-center gap-2 pl-3 text-left text-[13px] outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/60",children:[a.recent&&!a.pinned?(0,d.jsx)(ae.A,{className:"size-3.5 shrink-0 text-muted-foreground"}):(0,d.jsx)(af.A,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:(0,y.cn)("min-w-0 truncate",e&&"font-medium"),children:(0,d.jsx)(ah,{text:a.table.name,query:T})}),(0,d.jsxs)("span",{className:"ml-auto flex min-w-0 shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:["view"===a.table.kind&&(0,d.jsx)("span",{children:"view"}),(0,d.jsx)("span",{className:"max-w-36 truncate",children:a.table.schema})]})]}),(0,d.jsx)("button",{type:"button","aria-label":`${a.pinned?"Unpin":"Pin"} ${(0,C.i)(a.table)}`,"aria-pressed":a.pinned,title:a.pinned?"Unpin table":"Pin table",onClick:()=>Y(a.table),className:(0,y.cn)("mr-2 flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground opacity-0 outline-none transition-[color,background-color,opacity] hover:bg-foreground/10 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:opacity-100 group-hover/table-result:opacity-100",(a.pinned||c)&&"opacity-100",a.pinned&&"text-foreground"),children:(0,d.jsx)(M.A,{className:(0,y.cn)("size-3.5",a.pinned&&"fill-current")})})]})]},a.key)})}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-3 border-t px-3 py-1.5 text-[10px] text-muted-foreground",children:[(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("kbd",{className:"font-mono text-foreground/70",children:"↑↓"}),"Navigate"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("kbd",{className:"font-mono text-foreground/70",children:"↵"}),"Open"]}),V?.type==="table"&&(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("kbd",{className:"font-mono text-foreground/70",children:"⇧↵"}),V.pinned?"Unpin":"Pin"]})]})]}):null}function an({connectionId:a,children:b}){let c=(0,i.p)(),e=(0,j.w)(a),[n,o]=(0,k.DE)(a);if(!c)return null;if(!e)return(0,d.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 text-muted-foreground",children:[(0,d.jsx)("p",{children:"Connection not found"}),(0,d.jsx)(f(),{href:"/",className:"text-foreground underline underline-offset-4",children:"Connections"})]});let p=(0,l.Mq)(e);return(0,d.jsxs)(m.Z,{connection:e,children:[(0,d.jsxs)("div",{className:"flex h-dvh flex-col overflow-hidden",children:[(0,d.jsx)("div",{"aria-hidden":!0,title:e.name,className:"h-1.5 w-full shrink-0",style:{background:p}}),(0,d.jsxs)("div",{className:"flex min-h-0 flex-1 overflow-hidden",children:[n.sidebarCollapsed?(0,d.jsxs)("aside",{className:"relative flex h-full w-10 shrink-0 justify-center border-r bg-sidebar pt-2",children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-1",style:{background:p}}),(0,d.jsx)(h.$,{variant:"ghost",size:"icon-sm","aria-label":"Show database sidebar",title:"Show sidebar",onClick:()=>o({sidebarCollapsed:!1}),children:(0,d.jsx)(g.A,{})})]}):(0,d.jsx)(W,{width:n.sidebarWidth,onWidthChange:a=>o({sidebarWidth:a}),onCollapse:()=>o({sidebarCollapsed:!0})},e.id),(0,d.jsx)("main",{className:"flex min-w-0 flex-1 flex-col",children:b})]})]}),(0,d.jsx)(am,{}),(0,d.jsx)(ac,{})]})}},13656:(a,b,c)=>{"use strict";c.d(b,{E:()=>f});var d=c(48249),e=c(14490);function f({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"skeleton",className:(0,e.cn)("animate-pulse rounded-md bg-muted",a),...b})}},20886:(a,b,c)=>{"use strict";c.d(b,{Y:()=>e});var d=c(67484);function e(a,b){let[c,e]=(0,d.useState)(0),[f,g]=(0,d.useState)({key:"",error:null}),h=`${c}:${a}`,i=(0,d.useCallback)(()=>e(a=>a+1),[]),j=f.key!==h;return{data:f.data,error:j?null:f.error,loading:j,reload:i}}},21883:(a,b,c)=>{"use strict";c.d(b,{F:()=>f});var d=c(16950);async function e(a,b,c){let e,f=await (0,d.Qv)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b),signal:c}),g=await f.text();if(!g)throw Error(`YTDB bridge returned an empty response (HTTP ${f.status}). Restart YTDB to update the local bridge.`);try{e=JSON.parse(g)}catch{throw Error(`YTDB bridge returned an invalid response (HTTP ${f.status}).`)}if(!f.ok)throw Error((e&&"object"==typeof e&&"error"in e&&"string"==typeof e.error?e.error:f.statusText)||`YTDB bridge request failed with HTTP ${f.status}.`);return e}let f={tables:(a,b)=>e("/api/tables",{connectionUrl:a},b),rows:(a,b,c)=>e("/api/rows",{connectionUrl:a,query:b},c),query:(a,b,c)=>e("/api/query",{connectionUrl:a,sql:b},c),updateCell:(a,b,c)=>e("/api/cell",{connectionUrl:a,update:b},c),insertRow:(a,b,c)=>e("/api/insert-row",{connectionUrl:a,insertion:b},c),deleteRows:(a,b,c)=>e("/api/delete-rows",{connectionUrl:a,deletion:b},c),related:(a,b,c)=>e("/api/related",{connectionUrl:a,lookups:b},c),lookup:(a,b,c)=>e("/api/lookup",{connectionUrl:a,query:b},c),definition:(a,b,c)=>e("/api/definition",{connectionUrl:a,table:b},c)}},34766:(a,b,c)=>{"use strict";c.d(b,{ExplorerShell:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call ExplorerShell() from the server but ExplorerShell is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/theobourgeois/code/db-studio/src/components/explorer/explorer-shell.tsx","ExplorerShell")},35412:(a,b,c)=>{Promise.resolve().then(c.bind(c,9769))},44231:(a,b,c)=>{"use strict";c.d(b,{Z:()=>i,k:()=>j});var d=c(48249),e=c(67484),f=c(21883),g=c(20886);let h=(0,e.createContext)(null);function i({connection:a,children:b}){let c=(0,g.Y)(a.url,b=>f.F.tables(a.url,b));return(0,d.jsx)(h.Provider,{value:{connection:a,tables:c},children:b})}function j(){let a=(0,e.useContext)(h);if(!a)throw Error("useExplorerContext must be used inside ExplorerProvider");return a}},82676:(a,b,c)=>{Promise.resolve().then(c.bind(c,34766))},93291:(a,b,c)=>{"use strict";function d(a,b){if(0===b)return!0;let c=a[b-1];return"_"===c||"-"===c||" "===c||"."===c}function e(a,b,c){return f(a,b,a=>[c(a)])}function f(a,b,c){if(!a.trim())return[];let e=[];for(let f of b){let b=c(f),g=null;for(let c of b){let b=function(a,b){let c=a.trim().toLocaleLowerCase(),e=b.toLocaleLowerCase();if(!c)return 0;if(0===e.length)return null;if(e===c)return 1e4;if(e.startsWith(c))return 5e3-e.length;let f=e.indexOf(c);if(-1!==f)return 2400+1200*!!d(b,f)-f-e.length;let g=0,h=0,i=0;for(let a=0;a<e.length&&g<c.length;a+=1){if(e[a]!==c[g]){i=0;continue}h+=12,(i+=1)>1&&(h+=18*i),d(b,a)&&(h+=40),g+=1}if(g<c.length)return null;let j=b.split(/[_\-\s.]+/).map(a=>a[0]??"").join("").toLocaleLowerCase();return j.startsWith(c)?h+=2200:j.includes(c)&&(h+=700),h-(e.length-c.length)}(a,c);null!==b&&(null===g||b>g)&&(g=b)}null!==g&&e.push({item:f,score:g})}return e.sort((a,b)=>b.score!==a.score?b.score-a.score:c(a.item)[0]?.localeCompare(c(b.item)[0]??"")??0)}c.d(b,{R6:()=>e,UO:()=>f})}};
|
|
1
|
+
exports.id=729,exports.ids=[729],exports.modules={1777:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(5735),e=c(34766);async function f({children:a,params:b}){let{connectionId:c}=await b;return(0,d.jsx)(e.ExplorerShell,{connectionId:c,children:a})}},9769:(a,b,c)=>{"use strict";c.d(b,{ExplorerShell:()=>an});var d=c(48249),e=c(2116),f=c.n(e),g=c(96006),h=c(25297),i=c(98609),j=c(91732),k=c(99598),l=c(78260),m=c(44231),n=c(19099),o=c(67484),p=c(7178),q=c(93217),r=c(29813),s=c(88877),t=c(99058),u=c(40336),v=c(69856),w=c(18656),x=c(41764),y=c(14490);function z({className:a,children:b,...c}){return(0,d.jsxs)(t.V,{"data-slot":"scroll-area",className:(0,y.cn)("relative",a),...c,children:[(0,d.jsx)(u.B,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:b}),(0,d.jsx)(A,{}),(0,d.jsx)(v.I,{})]})}function A({className:a,orientation:b="vertical",...c}){return(0,d.jsx)(w.V,{"data-slot":"scroll-area-scrollbar","data-orientation":b,orientation:b,className:(0,y.cn)("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",a),...c,children:(0,d.jsx)(x.l,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}var B=c(13656),C=c(89366),D=c(89216),E=c(15386),F=c(82244),G=c(30770);function H({current:a}){let b=(0,n.useRouter)(),c=(0,j.Z)(a=>a.connections);return(0,d.jsxs)(F.rI,{children:[(0,d.jsxs)(F.ty,{className:"flex h-8 w-full items-center justify-between gap-2 rounded-lg px-2 text-left font-medium outline-none hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50 data-open:bg-muted/60",children:[(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,d.jsx)(G.F,{connection:a}),(0,d.jsx)("span",{className:"truncate",children:a.name}),a.layoutGroup&&(0,d.jsx)(D.A,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),(0,d.jsx)(E.A,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),(0,d.jsxs)(F.SQ,{align:"start",className:"w-(--anchor-width)",children:[c.map(c=>(0,d.jsxs)(F._2,{onClick:()=>b.push(`/${c.id}`),className:c.id===a.id?"font-medium":void 0,children:[(0,d.jsx)(G.F,{connection:c}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate",children:c.name}),c.layoutGroup&&c.layoutGroup===a.layoutGroup&&(0,d.jsx)(D.A,{className:"size-3.5 shrink-0 text-muted-foreground"})]},c.id)),(0,d.jsx)(F.mB,{}),(0,d.jsx)(F._2,{render:(0,d.jsx)(f(),{href:"/"}),children:"Manage connections"})]})]})}var I=c(54183),J=c(69627);function K({schemas:a,selected:b,onChange:c}){let e=null===b||b.length===a.length;return(0,d.jsxs)(F.rI,{children:[(0,d.jsxs)(F.ty,{className:"group flex h-9 w-full cursor-pointer items-center gap-2 rounded-lg border border-input bg-background/60 px-2.5 text-left text-sm outline-none transition-[border-color,background-color,box-shadow] hover:border-foreground/20 hover:bg-muted/50 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-open:border-foreground/20 data-open:bg-muted/60",children:[(0,d.jsx)(I.A,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium",children:null===b||b.length===a.length?"All schemas":0===b.length?"No schemas":1===b.length?b[0]:`${b.length} schemas`}),!e&&(0,d.jsxs)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] tabular-nums text-muted-foreground",children:[b.length,"/",a.length]}),(0,d.jsx)(J.A,{className:"size-3.5 shrink-0 text-muted-foreground transition-transform group-data-open:rotate-180"})]}),(0,d.jsx)(F.SQ,{align:"start",sideOffset:6,className:"max-h-80 w-(--anchor-width) min-w-52",children:(0,d.jsxs)(F.I,{children:[(0,d.jsxs)(F.lp,{className:"flex items-center justify-between px-2 py-1.5",children:[(0,d.jsx)("span",{children:"Visible schemas"}),(0,d.jsx)("span",{className:"font-normal tabular-nums opacity-70",children:a.length})]}),(0,d.jsx)(F.hO,{checked:e,onCheckedChange:a=>c(a?null:[]),children:(0,d.jsx)("span",{className:"font-medium",children:"Show all schemas"})}),(0,d.jsx)(F.mB,{}),a.map(f=>(0,d.jsx)(F.hO,{checked:e||(b?.includes(f)??!1),onCheckedChange:d=>{let e,g;return e=b??a,void c((g=d?[...new Set([...e,f])]:e.filter(a=>a!==f)).length===a.length?null:g)},children:(0,d.jsx)("span",{className:"truncate",children:f})},f))]})})]})}var L=c(9008),M=c(39470),N=c(91995);function O(a,b){let c=a.trim(),d=c.lastIndexOf(".");return -1===d?c:"schema"===b?c.slice(0,d):c.slice(d+1)}function P({text:a,query:b}){if(!b)return a;let c=[],e=a.toLocaleLowerCase(),f=b.toLocaleLowerCase(),g=0,h=e.indexOf(f);if(-1===h)return a;for(;-1!==h;)h>g&&c.push(a.slice(g,h)),c.push((0,d.jsx)("mark",{className:"rounded-[3px] bg-yellow-300/90 px-px text-yellow-950 dark:bg-yellow-400/85 dark:text-yellow-950",children:a.slice(h,h+b.length)},h)),g=h+b.length,h=e.indexOf(f,g);return g<a.length&&c.push(a.slice(g)),c}function Q({connectionId:a,table:b,search:c,pinned:e,showSchema:g,active:h,reorderable:i,dragging:j,dropEdge:k,onTogglePin:l,onDragStart:m,onDragOver:n,onDrop:o,onDragEnd:p,onMove:q}){return(0,d.jsxs)("li",{onDragOver:n,onDrop:o,className:(0,y.cn)("group/table-row relative flex h-7 items-center rounded-md text-[13px] transition-[color,background-color,opacity] hover:bg-muted/60",h&&"bg-muted text-foreground",!h&&"text-foreground/80",j&&"opacity-45","before"===k&&"before:absolute before:inset-x-1 before:top-0 before:z-10 before:h-0.5 before:-translate-y-1/2 before:rounded-full before:bg-primary","after"===k&&"after:absolute after:inset-x-1 after:bottom-0 after:z-10 after:h-0.5 after:translate-y-1/2 after:rounded-full after:bg-primary"),children:[i&&(0,d.jsx)("button",{type:"button",draggable:!0,"aria-label":`Reorder ${b.schema}.${b.name}`,title:"Drag to reorder; use Up and Down arrow keys",onDragStart:m,onDragEnd:p,onKeyDown:a=>{("ArrowUp"===a.key||"ArrowDown"===a.key)&&(a.preventDefault(),q?.("ArrowUp"===a.key?-1:1))},className:"ml-1.5 flex size-5 shrink-0 cursor-grab touch-none items-center justify-center rounded text-muted-foreground opacity-50 outline-none transition-[color,background-color,opacity] hover:bg-foreground/10 hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:opacity-100 active:cursor-grabbing",children:(0,d.jsx)(L.A,{className:"size-3.5"})}),(0,d.jsxs)(f(),{href:`/${a}/${encodeURIComponent(b.schema)}/${encodeURIComponent(b.name)}`,className:(0,y.cn)("flex h-full min-w-0 flex-1 items-center gap-1.5 rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/60",i?"pl-1":"pl-6"),children:[(0,d.jsx)("span",{className:"truncate",children:(0,d.jsx)(P,{text:b.name,query:O(c,"table")})}),g?(0,d.jsx)("span",{className:"ml-auto max-w-20 truncate text-[10px] text-muted-foreground",children:b.schema}):"view"===b.kind&&(0,d.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:"view"})]}),(0,d.jsx)("button",{type:"button","aria-label":`${e?"Unpin":"Pin"} ${b.schema}.${b.name}`,"aria-pressed":e,title:e?"Unpin table":"Pin table",onClick:()=>l(b),className:(0,y.cn)("mr-0.5 flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground opacity-0 outline-none transition-[color,background-color,opacity] hover:bg-foreground/10 hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:opacity-100 group-hover/table-row:opacity-100",e&&"text-foreground"),children:(0,d.jsx)(M.A,{className:(0,y.cn)("size-3.5",e&&"fill-current")})})]})}function R({label:a,count:b,collapsed:c,pinned:e,search:f,onToggle:g}){return(0,d.jsxs)("button",{type:"button","aria-expanded":!c,onClick:g,className:"flex h-7 w-full cursor-pointer items-center gap-1 rounded-md px-1 text-xs font-medium text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/60",children:[(0,d.jsx)(N.A,{className:(0,y.cn)("size-3.5 transition-transform",!c&&"rotate-90")}),e&&(0,d.jsx)(M.A,{className:"mr-0.5 size-3 fill-current"}),(0,d.jsx)("span",{className:"truncate",children:e?a:(0,d.jsx)(P,{text:a,query:O(f,"schema")})}),(0,d.jsx)("span",{className:"ml-auto pr-1 tabular-nums opacity-60",children:b})]})}function S({connectionId:a,tables:b,search:c,collapsedSchemas:e,pinnedTables:f,onToggleSchema:g,onTogglePin:h,onReorderPinned:i}){let j=(0,n.useParams)(),[k,l]=(0,o.useState)(!1),[m,p]=(0,o.useState)(null),[q,r]=(0,o.useState)(null),s=new Map(b.map(a=>[(0,C.i)(a),a])),t=f.flatMap(a=>{let b=s.get(a);return b?[b]:[]});function u(){p(null),r(null)}return 0===b.length?(0,d.jsx)("p",{className:"px-3 py-8 text-center text-xs text-muted-foreground",children:c.trim()?"No tables match your search":"No tables in these schemas"}):(0,d.jsxs)("div",{className:"flex flex-col gap-1 px-2 pb-4",children:[t.length>0&&(0,d.jsxs)("div",{className:"mb-1 border-b border-border/60 pb-1",children:[(0,d.jsx)(R,{label:"Pinned tables",count:t.length,collapsed:k,pinned:!0,search:c,onToggle:()=>l(a=>!a)}),!k&&(0,d.jsx)("ul",{children:t.map(b=>{let e=(0,C.i)(b);return(0,d.jsx)(Q,{connectionId:a,table:b,search:c,pinned:!0,showSchema:!0,active:j.schema===b.schema&&j.table===b.name,reorderable:!0,dragging:m===e,dropEdge:q?.key===e?q.edge:null,onTogglePin:h,onDragStart:a=>{a.dataTransfer.effectAllowed="move",a.dataTransfer.setData("text/plain",e),p(e),r(null)},onDragOver:a=>(function(a,b){if(!m||m===b)return;a.preventDefault(),a.dataTransfer.dropEffect="move";let c=a.currentTarget.getBoundingClientRect(),d=a.clientY<c.top+c.height/2?"before":"after";r(a=>a?.key===b&&a.edge===d?a:{key:b,edge:d})})(a,e),onDrop:a=>{let b,c;return a.preventDefault(),b=m??a.dataTransfer.getData("text/plain"),c=q?.key===e?q.edge:"before",void(b&&i(b,e,c),u())},onDragEnd:u,onMove:a=>{let b,c;return b=t.findIndex(a=>(0,C.i)(a)===e),void((c=t[b+a])&&i(e,(0,C.i)(c),-1===a?"before":"after"))}},e)})})]}),(function(a){let b=new Map;for(let c of a)b.set(c.schema,[...b.get(c.schema)??[],c]);return[...b.entries()].sort(([a],[b])=>{let c;return((c=new Map([["public",0],["auth",1]])).get(a)??2)-(c.get(b)??2)||a.localeCompare(b)})})(b).map(([b,i])=>{let k=e.includes(b);return(0,d.jsxs)("div",{children:[(0,d.jsx)(R,{label:b,count:i.length,collapsed:k,search:c,onToggle:()=>g(b)}),!k&&(0,d.jsx)("ul",{children:i.map(b=>(0,d.jsx)(Q,{connectionId:a,table:b,search:c,pinned:f.includes((0,C.i)(b)),active:j.schema===b.schema&&j.table===b.name,onTogglePin:h},(0,C.i)(b)))})]},b)})]})}function T(a){return Math.min(480,Math.max(180,Math.round(a)))}function U(a,b){let c=new Map([["public",0],["auth",1]]);return(c.get(a)??2)-(c.get(b)??2)||a.localeCompare(b)}function V(a,b,c){let d=b.trim().toLocaleLowerCase();return a.filter(a=>(null===c||!!c.includes(a.schema))&&(!d||a.name.toLocaleLowerCase().includes(d)||`${a.schema}.${a.name}`.toLocaleLowerCase().includes(d)))}function W({width:a,onWidthChange:b,onCollapse:c}){let e=(0,n.usePathname)(),{connection:g,tables:i}=(0,m.k)(),[j,l]=(0,k.DE)(g.id),[t,u]=(0,o.useState)(()=>T(a)),v=(0,o.useRef)(null),w=(0,o.useMemo)(()=>[...new Set((i.data??[]).map(a=>a.schema))].sort(U),[i.data]),x=(0,o.useMemo)(()=>null===j.selectedSchemas?null:j.selectedSchemas.filter(a=>w.includes(a)),[j.selectedSchemas,w]),A=(0,o.useMemo)(()=>V(i.data??[],j.search,x),[i.data,j.search,x]),D=`/${encodeURIComponent(g.id)}/query`;function E(a,b){let c=new Set(V(i.data??[],a,b).map(a=>a.schema));return j.collapsedSchemas.filter(a=>!c.has(a))}return(0,d.jsxs)("aside",{id:"database-explorer-sidebar",style:{width:t},className:"relative flex h-full shrink-0 flex-col border-r bg-sidebar",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 border-b border-sidebar-border/60 p-2 pb-2.5",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsx)("div",{className:"min-w-0 flex-1",children:(0,d.jsx)(H,{current:g})}),(0,d.jsx)(h.$,{variant:"ghost",size:"icon-sm","aria-label":"Collapse database sidebar",title:"Collapse sidebar",onClick:c,children:(0,d.jsx)(p.A,{})})]}),(0,d.jsxs)(f(),{href:D,"aria-current":e===D?"page":void 0,className:(0,y.cn)((0,h.r)({variant:e===D?"secondary":"ghost",size:"sm"}),"h-8 w-full justify-start px-2"),children:[(0,d.jsx)(q.A,{"data-icon":"inline-start"}),"SQL query"]}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)(r.A,{className:"pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground"}),(0,d.jsx)(s.p,{value:j.search,onChange:a=>{var b;l({search:b=a.target.value,collapsedSchemas:b.trim()?E(b,x):j.collapsedSchemas})},placeholder:"Search tables","aria-label":"Search tables",className:"h-9 bg-background/60 pr-9 pl-8"}),(0,d.jsx)("kbd",{className:"pointer-events-none absolute top-1/2 right-2.5 -translate-y-1/2 font-mono text-[10px] text-muted-foreground/55",children:"⌘P"})]}),(0,d.jsx)(K,{schemas:w,selected:x,onChange:function(a){l({selectedSchemas:a,collapsedSchemas:j.search.trim()?E(j.search,a):j.collapsedSchemas})}})]}),(0,d.jsx)(z,{className:"min-h-0 flex-1 pt-1.5",children:i.error?(0,d.jsx)("p",{className:"px-3 py-4 text-xs text-destructive",children:i.error}):i.data?(0,d.jsx)(S,{connectionId:g.id,tables:A,search:j.search,collapsedSchemas:j.collapsedSchemas,pinnedTables:j.pinnedTables,onToggleSchema:function(a){l({collapsedSchemas:j.collapsedSchemas.includes(a)?j.collapsedSchemas.filter(b=>b!==a):[...j.collapsedSchemas,a]})},onTogglePin:function(a){let b=(0,C.i)(a);l({pinnedTables:j.pinnedTables.includes(b)?j.pinnedTables.filter(a=>a!==b):[...j.pinnedTables,b]})},onReorderPinned:function(a,b,c){if(a===b)return;let d=j.pinnedTables.filter(b=>b!==a),e=d.indexOf(b);-1!==e&&(d.splice(e+ +("after"===c),0,a),l({pinnedTables:d}))}}):(0,d.jsx)("div",{className:"flex flex-col gap-2 px-3 py-2",children:Array.from({length:8},(a,b)=>(0,d.jsx)(B.E,{className:"h-5 w-full"},b))})}),(0,d.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize database sidebar","aria-valuemin":180,"aria-valuemax":480,"aria-valuenow":t,tabIndex:0,title:"Drag to resize; double-click to reset",onPointerDown:function(a){a.preventDefault(),v.current={pointerId:a.pointerId,startX:a.clientX,startWidth:t},a.currentTarget.setPointerCapture(a.pointerId)},onPointerMove:function(a){let b=v.current;b&&b.pointerId===a.pointerId&&(a.preventDefault(),u(T(b.startWidth+a.clientX-b.startX)))},onPointerUp:function(a){let c=v.current;if(!c||c.pointerId!==a.pointerId)return;let d=T(c.startWidth+a.clientX-c.startX);v.current=null,u(d),a.currentTarget.hasPointerCapture(a.pointerId)&&a.currentTarget.releasePointerCapture(a.pointerId),b(d)},onPointerCancel:function(a){let c=v.current;c&&c.pointerId===a.pointerId&&(v.current=null,a.currentTarget.hasPointerCapture(a.pointerId)&&a.currentTarget.releasePointerCapture(a.pointerId),b(t))},onKeyDown:function(a){if("ArrowLeft"!==a.key&&"ArrowRight"!==a.key)return;a.preventDefault();let c=T(t+("ArrowLeft"===a.key?-1:1)*16);u(c),b(c)},onDoubleClick:function(a){a.preventDefault(),u(256),b(256)},className:"group/resize absolute inset-y-0 -right-1 z-30 w-2 cursor-col-resize touch-none outline-none after:absolute after:inset-y-0 after:left-1/2 after:w-px after:-translate-x-1/2 after:bg-transparent after:transition-colors hover:after:bg-primary focus-visible:after:bg-primary"})]})}var X=c(35471),Y=c(89267),Z=c(16280),$=c(61561),_=c(93291);function aa({text:a,query:b}){if(!b)return a;let c=a.toLocaleLowerCase(),e=b.toLocaleLowerCase(),f=c.indexOf(e);return -1===f?a:(0,d.jsxs)(d.Fragment,{children:[a.slice(0,f),(0,d.jsx)("mark",{className:"rounded-[3px] bg-yellow-300/90 px-px text-yellow-950 dark:bg-yellow-400/85 dark:text-yellow-950",children:a.slice(f,f+b.length)}),a.slice(f+b.length)]})}async function ab(a){try{await navigator.clipboard.writeText(a)}catch{let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),b.remove()}}function ac(){let a=(0,n.useRouter)(),b=(0,n.useParams)(),{connection:c,tables:e}=(0,m.k)(),f=(0,j.Z)(a=>a.add),[g,h]=(0,k.DE)(c.id),[i,l]=(0,o.useState)(!1),[p,q]=(0,o.useState)("commands"),[r,s]=(0,o.useState)(""),[t,u]=(0,o.useState)(0),[v,w]=(0,o.useState)(!1),x=(0,o.useRef)(null),z=(0,o.useRef)(null),A=(0,o.useRef)(null),B=(0,o.useRef)(p),D=(0,Z.C)(a=>a.theme),E=b.schema&&b.table?{schema:decodeURIComponent(b.schema),name:decodeURIComponent(b.table)}:null,F=!!E&&g.pinnedTables.includes((0,C.i)(E)),G=(0,k.lz)(a=>E?a.tables[`${c.id}:${(0,C.i)(E)}`]:void 0),H=(0,o.useMemo)(()=>[{id:"new-query",title:"Open SQL Query",keywords:["new","query","sql","console","editor"],enabled:!0,run:()=>a.push(`/${encodeURIComponent(c.id)}/query`)},{id:"reload-tables",title:"Reload Tables",keywords:["refresh","reload","tables","sync"],enabled:!0,run:()=>e.reload()},{id:"pin-table",title:F?"Unpin Table":"Pin Table",keywords:["pin","unpin","favorite","star"],enabled:null!==E,run:()=>{if(!E)return;let a=(0,C.i)(E);h({pinnedTables:g.pinnedTables.includes(a)?g.pinnedTables.filter(b=>b!==a):[...g.pinnedTables,a]})}},{id:"clear-filters",title:"Clear Filters",keywords:["filter","reset","remove"],enabled:null!==E,run:()=>{E&&k.lz.getState().setTable(c.id,E,{filters:[],page:0})}},{id:"clear-search",title:"Clear Search",keywords:["find","search","reset"],enabled:null!==E&&!!G?.search,run:()=>{E&&k.lz.getState().setTable(c.id,E,{search:"",page:0})}},{id:"reset-columns",title:"Reset Columns",keywords:["pin","hide","frozen","layout","show"],enabled:null!==E,run:()=>{E&&k.lz.getState().setTable(c.id,E,{pinnedColumns:void 0,hiddenColumns:[]})}},{id:"copy-table",title:"Copy Schema.Table",keywords:["copy","name","qualified"],enabled:null!==E,run:()=>{E&&ab((0,C.i)(E))}},{id:"color-theme",title:"Color Theme",keywords:["theme","appearance","dark","light","color","set","preferences"],enabled:!0,keepOpen:!0,run:()=>{let a=Z.C.getState().theme,b=$.zG.findIndex(b=>b.id===a);q("themes"),s(""),u(-1===b?0:b)}},{id:"add-connection",title:"Add Connection",keywords:["new","database","postgres"],enabled:!0,run:()=>w(!0)}],[g.pinnedTables,c.id,F,a,h,E,G?.search,e]),I=(0,o.useMemo)(()=>r.trim()?(0,_.R6)(r,H,a=>[a.title,...a.keywords].join(" ")).map(a=>a.item):H,[H,r]),J=(0,o.useMemo)(()=>r.trim()?(0,_.R6)(r,[...$.zG],a=>[a.name,...a.keywords].join(" ")).map(a=>a.item):[...$.zG],[r]),K="themes"===p?J:I,L="commands"===p?I[t]??null:null,M="themes"===p?J[t]??null:null;function N(a){a?.revertTheme&&"themes"===B.current&&(0,$.AZ)(Z.C.getState().theme),l(!1),s(""),u(0),q("commands")}function O(a){a.enabled&&(a.keepOpen||N({revertTheme:!0}),a.run())}function P(a){Z.C.getState().setTheme(a.id),(0,$.AZ)(a.id),N({revertTheme:!1})}return(0,d.jsxs)(d.Fragment,{children:[i&&(0,d.jsxs)("div",{ref:z,"data-command-palette":"",className:"fixed top-3 left-1/2 z-50 flex w-[min(36rem,calc(100%-1.5rem))] -translate-x-1/2 flex-col overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b px-3",children:[(0,d.jsx)("span",{className:"font-mono text-sm text-muted-foreground",children:">"}),(0,d.jsx)("input",{ref:x,value:r,onChange:a=>s(a.target.value),onKeyDown:function(a){if("ArrowDown"===a.key){if(a.preventDefault(),0===K.length)return;u(a=>(a+1)%K.length);return}if("ArrowUp"===a.key){if(a.preventDefault(),0===K.length)return;u(a=>(a-1+K.length)%K.length);return}if("Enter"===a.key){if(a.preventDefault(),"themes"===p){M&&P(M);return}L&&O(L)}},spellCheck:!1,autoComplete:"off",autoCorrect:"off",placeholder:"themes"===p?"Select color theme":"Type a command","aria-label":"themes"===p?"Color theme":"Command palette",className:"h-11 min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),(0,d.jsx)("div",{ref:A,role:"listbox","aria-label":"themes"===p?"Color themes":"Commands",className:"max-h-[min(24rem,50vh)] overflow-auto py-1",children:0===K.length?(0,d.jsx)("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"themes"===p?"No matching themes":"No matching commands"}):"themes"===p?J.map((a,b)=>{let c=b===t,e=a.id===D;return(0,d.jsxs)("button",{type:"button",role:"option","aria-selected":c,"data-active":c||void 0,onMouseEnter:()=>u(b),onClick:()=>P(a),className:(0,y.cn)("flex h-8 w-full cursor-pointer items-center gap-2 px-3 text-left text-[13px] outline-none",c&&"bg-primary/10"),children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"size-3.5 shrink-0 rounded-sm border",style:{background:a.swatch}}),(0,d.jsx)("span",{className:"min-w-0 truncate",children:(0,d.jsx)(aa,{text:a.name,query:r.trim()})}),e&&(0,d.jsx)(X.A,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground"})]},a.id)}):I.map((a,b)=>{let c=b===t;return(0,d.jsx)("button",{type:"button",role:"option","aria-selected":c,"aria-disabled":!a.enabled,"data-active":c||void 0,onMouseEnter:()=>u(b),onClick:()=>O(a),className:(0,y.cn)("flex h-8 w-full cursor-pointer items-center px-3 text-left text-[13px] outline-none",c&&"bg-primary/10",!a.enabled&&"cursor-default opacity-40"),children:(0,d.jsx)("span",{className:"min-w-0 truncate",children:(0,d.jsx)(aa,{text:a.title,query:r.trim()})})},a.id)})})]}),(0,d.jsx)(Y.f,{open:v,onOpenChange:w,onSubmit:b=>{let{shareWith:c,...d}=b,e=f(d);(0,k.mQ)(e.id,c),a.push(`/${e.id}`)}})]})}var ad=c(36274),ae=c(21215),af=c(83254);c(21883);let ag={pinned:"Pinned",recent:"Recent",tables:"Tables",connections:"Connections"};function ah({text:a,query:b}){if(!b)return a;let c=a.toLocaleLowerCase(),e=b.toLocaleLowerCase(),f=c.indexOf(e);return -1===f?a:(0,d.jsxs)(d.Fragment,{children:[a.slice(0,f),(0,d.jsx)("mark",{className:"rounded-[3px] bg-yellow-300/90 px-px text-yellow-950 dark:bg-yellow-400/85 dark:text-yellow-950",children:a.slice(f,f+b.length)}),a.slice(f+b.length)]})}function ai(a){try{return new URL(a).hostname}catch{return""}}function aj(a){return[a.name,ai(a.url)].filter(Boolean)}function ak(a,b){let c=new Map([["public",0],["auth",1]]);return(c.get(a.schema)??2)-(c.get(b.schema)??2)||a.schema.localeCompare(b.schema)||a.name.localeCompare(b.name)}function al(a,b){return a.map((a,c)=>0===c?{...a,section:b}:a)}function am(){let a=(0,n.useRouter)(),b=(0,n.useParams)(),{connection:c,tables:e}=(0,m.k)(),f=(0,j.Z)(a=>a.connections),[g,h]=(0,o.useState)(!1),[i,l]=(0,o.useState)(""),[p,q]=(0,o.useState)(0),[s,t]=(0,o.useState)(null),u=(0,o.useRef)(null),v=(0,o.useRef)(null),w=(0,o.useRef)(null),x=f.find(a=>a.id===s)??null,z=x??c,A=x&&x.id!==c.id?x.url:null,B=function(a){let[b]=(0,o.useState)(()=>new Map),[c,d]=(0,o.useState)({url:"",error:null});if(!a)return{data:void 0,error:null,loading:!1};let e=c.url===a?c.data:b.get(a);return{data:e,error:c.url===a?c.error:null,loading:void 0===e}}(A),[D,E]=(0,k.DE)(c.id),[F,H]=(0,k.DE)(z.id),I=z.id===c.id?D:F,J=(0,o.useMemo)(()=>A?B.data??[]:e.data??[],[B.data,A,e.data]),K=A?B.loading:e.loading,L=A?B.error:null,N=(0,o.useMemo)(()=>[...new Set(J.map(a=>a.schema))],[J]),O=null===I.selectedSchemas?null:I.selectedSchemas.filter(a=>N.includes(a)),P=(0,o.useMemo)(()=>null===O?J:J.filter(a=>O.includes(a.schema)),[J,O]),Q=I.pinnedTables,R=I.recentTables,S=(0,o.useMemo)(()=>{let a,b;return -1===(b=(a=i.trim()).indexOf(":"))?{schema:null,table:a}:{schema:a.slice(0,b).trim(),table:a.slice(b+1).trim()}},[i]),T=S.table||(S.schema?"":i.trim()),U=(0,o.useMemo)(()=>{let a=new Set(Q),b=new Set(R),d=null===S.schema?null:function(a,b){if(!a)return b;let c=a.toLocaleLowerCase(),d=b.filter(a=>a.toLocaleLowerCase()===c);if(d.length>0)return d;let e=b.filter(a=>a.toLocaleLowerCase().startsWith(c));return e.length>0?e:(0,_.R6)(a,b,a=>a).map(a=>a.item)}(S.schema,N),e=null===d?P:J.filter(a=>d.includes(a.schema)),g=new Map(e.map(a=>[(0,C.i)(a),a])),h=Q.flatMap(a=>{let b=g.get(a);return b?[b]:[]}),j=R.flatMap(b=>{let c=g.get(b);return!c||a.has(b)?[]:[c]}),k=(a,b)=>({type:"table",key:`table:${(0,C.i)(a)}`,table:a,...b}),l=a=>({type:"connection",key:`connection:${a.id}`,connection:a,current:a.id===c.id}),m=null===S.schema?i.trim():S.table,n=null===x&&null===S.schema;if(!m){let a=new Set([...h.map(a=>(0,C.i)(a)),...j.map(a=>(0,C.i)(a))]),d=e.filter(b=>!a.has((0,C.i)(b))).sort(ak),g=n?f.filter(a=>a.id!==c.id):[];return[...al(h.map(a=>k(a,{pinned:!0})),"pinned"),...al(j.map(a=>k(a,{pinned:!1,recent:!0})),"recent"),...al(d.map(a=>k(a,{pinned:!1,recent:b.has((0,C.i)(a))})),"tables"),...al(g.map(l),"connections")]}let o=(0,_.UO)(m,e,a=>null===S.schema?[a.name,`${a.schema}.${a.name}`,a.schema]:[a.name]).map(c=>({...c,score:c.score+80*!!a.has((0,C.i)(c.item))+40*!!b.has((0,C.i)(c.item))})).sort((a,b)=>b.score-a.score).map(c=>k(c.item,{pinned:a.has((0,C.i)(c.item)),recent:b.has((0,C.i)(c.item))}));return[...al(n?(0,_.UO)(i,f,aj).map(a=>l(a.item)):[],"connections"),...al(o,"tables")]},[J,c.id,f,x,S.schema,S.table,Q,i,R,N,P]),V=U[p]??null;function W(){t(null),q(0),u.current?.focus()}function X(b){var d,e;if(h(!1),l(""),q(0),t(null),"connection"===b.type){b.connection.id!==c.id&&a.push(`/${b.connection.id}`);return}a.push((d=z.id,e=b.table,`/${d}/${encodeURIComponent(e.schema)}/${encodeURIComponent(e.name)}`))}function Y(a){let b=(0,C.i)(a),d=I.pinnedTables.includes(b)?I.pinnedTables.filter(a=>a!==b):[...I.pinnedTables,b];(z.id===c.id?E:H)({pinnedTables:d})}let Z=z.id===c.id&&b.schema&&b.table?`${decodeURIComponent(b.schema)}.${decodeURIComponent(b.table)}`:null;return g?(0,d.jsxs)("div",{ref:v,"data-table-palette":"",className:"fixed top-3 left-1/2 z-50 flex w-[min(36rem,calc(100%-1.5rem))] -translate-x-1/2 flex-col overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b px-3",children:[(0,d.jsx)(r.A,{className:"size-4 shrink-0 text-muted-foreground"}),x&&(0,d.jsxs)("button",{type:"button",onClick:W,"aria-label":`Stop searching ${x.name}`,className:"flex h-6 max-w-40 shrink-0 items-center gap-1.5 rounded-md bg-muted px-1.5 text-xs outline-none hover:bg-muted/80",children:[(0,d.jsx)(G.F,{connection:x,className:"size-2"}),(0,d.jsx)("span",{className:"truncate",children:x.name})]}),(0,d.jsx)("input",{ref:u,value:i,onChange:a=>l(a.target.value),onKeyDown:function(a){if("ArrowDown"===a.key){if(a.preventDefault(),0===U.length)return;q(a=>(a+1)%U.length);return}if("ArrowUp"===a.key){if(a.preventDefault(),0===U.length)return;q(a=>(a-1+U.length)%U.length);return}if("Tab"===a.key){if(a.preventDefault(),x||a.shiftKey)return;V?.type==="connection"&&(t(V.connection.id),l(""),q(0));return}if("Backspace"===a.key&&""===i&&x){a.preventDefault(),W();return}"Enter"===a.key&&(a.preventDefault(),a.shiftKey&&V?.type==="table"?Y(V.table):V&&X(V))},spellCheck:!1,autoComplete:"off",autoCorrect:"off",placeholder:x?`Search tables in ${x.name}`:"Go to table (schema:name)","aria-label":x?`Go to table in ${x.name}`:"Go to table or connection",className:"h-11 min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),(0,d.jsx)("div",{ref:w,role:"listbox","aria-label":x?`Tables in ${x.name}`:"Tables and connections",className:"max-h-[min(24rem,50vh)] overflow-auto py-1",children:K&&0===J.length&&0===U.length?(0,d.jsx)("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"Loading tables…"}):L&&0===J.length?(0,d.jsx)("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:L}):0===U.length?(0,d.jsx)("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i.trim()?"No matches":"No tables"}):U.map((a,b)=>{let c=b===p;if("connection"===a.type){let e=ai(a.connection.url);return(0,d.jsxs)("div",{children:[a.section&&(0,d.jsx)("p",{className:"px-3 pt-2 pb-1 text-[10px] font-medium tracking-wide text-muted-foreground uppercase",children:ag[a.section]}),(0,d.jsxs)("button",{type:"button",role:"option","aria-selected":c,"data-active":c||void 0,onMouseEnter:()=>q(b),onClick:()=>X(a),className:(0,y.cn)("flex h-8 w-full cursor-pointer items-center gap-2 px-3 text-left text-[13px] outline-none",c&&"bg-primary/10"),children:[(0,d.jsx)(ad.A,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)(G.F,{connection:a.connection,className:"size-2"}),(0,d.jsx)("span",{className:(0,y.cn)("min-w-0 truncate",a.current&&"font-medium"),children:(0,d.jsx)(ah,{text:a.connection.name,query:T})}),(0,d.jsx)("span",{className:"ml-auto flex min-w-0 shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:c?(0,d.jsx)("span",{children:"Tab to search"}):(0,d.jsx)("span",{className:"max-w-36 truncate",children:a.current?"current":e||"connection"})})]})]},a.key)}let e=(0,C.i)(a.table)===Z;return(0,d.jsxs)("div",{children:[a.section&&(0,d.jsx)("p",{className:"px-3 pt-2 pb-1 text-[10px] font-medium tracking-wide text-muted-foreground uppercase",children:ag[a.section]}),(0,d.jsxs)("div",{onMouseEnter:()=>q(b),className:(0,y.cn)("group/table-result flex items-center",c&&"bg-primary/10"),children:[(0,d.jsxs)("button",{type:"button",role:"option","aria-selected":c,"data-active":c||void 0,onClick:()=>X(a),className:"flex h-8 min-w-0 flex-1 cursor-pointer items-center gap-2 pl-3 text-left text-[13px] outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/60",children:[a.recent&&!a.pinned?(0,d.jsx)(ae.A,{className:"size-3.5 shrink-0 text-muted-foreground"}):(0,d.jsx)(af.A,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:(0,y.cn)("min-w-0 truncate",e&&"font-medium"),children:(0,d.jsx)(ah,{text:a.table.name,query:T})}),(0,d.jsxs)("span",{className:"ml-auto flex min-w-0 shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:["view"===a.table.kind&&(0,d.jsx)("span",{children:"view"}),(0,d.jsx)("span",{className:"max-w-36 truncate",children:a.table.schema})]})]}),(0,d.jsx)("button",{type:"button","aria-label":`${a.pinned?"Unpin":"Pin"} ${(0,C.i)(a.table)}`,"aria-pressed":a.pinned,title:a.pinned?"Unpin table":"Pin table",onClick:()=>Y(a.table),className:(0,y.cn)("mr-2 flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground opacity-0 outline-none transition-[color,background-color,opacity] hover:bg-foreground/10 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:opacity-100 group-hover/table-result:opacity-100",(a.pinned||c)&&"opacity-100",a.pinned&&"text-foreground"),children:(0,d.jsx)(M.A,{className:(0,y.cn)("size-3.5",a.pinned&&"fill-current")})})]})]},a.key)})}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-3 border-t px-3 py-1.5 text-[10px] text-muted-foreground",children:[(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("kbd",{className:"font-mono text-foreground/70",children:"↑↓"}),"Navigate"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("kbd",{className:"font-mono text-foreground/70",children:"↵"}),"Open"]}),V?.type==="table"&&(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("kbd",{className:"font-mono text-foreground/70",children:"⇧↵"}),V.pinned?"Unpin":"Pin"]})]})]}):null}function an({connectionId:a,children:b}){let c=(0,i.p)(),e=(0,j.w)(a),[n,o]=(0,k.DE)(a);if(!c)return null;if(!e)return(0,d.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 text-muted-foreground",children:[(0,d.jsx)("p",{children:"Connection not found"}),(0,d.jsx)(f(),{href:"/",className:"text-foreground underline underline-offset-4",children:"Connections"})]});let p=(0,l.Mq)(e);return(0,d.jsxs)(m.Z,{connection:e,children:[(0,d.jsxs)("div",{className:"flex h-dvh flex-col overflow-hidden",children:[(0,d.jsx)("div",{"aria-hidden":!0,title:e.name,className:"h-1.5 w-full shrink-0",style:{background:p}}),(0,d.jsxs)("div",{className:"flex min-h-0 flex-1 overflow-hidden",children:[n.sidebarCollapsed?(0,d.jsxs)("aside",{className:"relative flex h-full w-10 shrink-0 justify-center border-r bg-sidebar pt-2",children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-1",style:{background:p}}),(0,d.jsx)(h.$,{variant:"ghost",size:"icon-sm","aria-label":"Show database sidebar",title:"Show sidebar",onClick:()=>o({sidebarCollapsed:!1}),children:(0,d.jsx)(g.A,{})})]}):(0,d.jsx)(W,{width:n.sidebarWidth,onWidthChange:a=>o({sidebarWidth:a}),onCollapse:()=>o({sidebarCollapsed:!0})},e.id),(0,d.jsx)("main",{className:"flex min-w-0 flex-1 flex-col",children:b})]})]}),(0,d.jsx)(am,{}),(0,d.jsx)(ac,{})]})}},13656:(a,b,c)=>{"use strict";c.d(b,{E:()=>f});var d=c(48249),e=c(14490);function f({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"skeleton",className:(0,e.cn)("animate-pulse rounded-md bg-muted",a),...b})}},20886:(a,b,c)=>{"use strict";c.d(b,{Y:()=>e});var d=c(67484);function e(a,b){let[c,e]=(0,d.useState)(0),[f,g]=(0,d.useState)({key:"",error:null}),h=`${c}:${a}`,i=(0,d.useCallback)(()=>e(a=>a+1),[]),j=f.key!==h;return{data:f.data,error:j?null:f.error,loading:j,reload:i}}},21883:(a,b,c)=>{"use strict";c.d(b,{F:()=>f});var d=c(16950);async function e(a,b,c){let e,f=await (0,d.Qv)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b),signal:c}),g=await f.text();if(!g)throw Error(`YTDB bridge returned an empty response (HTTP ${f.status}). Restart YTDB to update the local bridge.`);try{e=JSON.parse(g)}catch{throw Error(`YTDB bridge returned an invalid response (HTTP ${f.status}).`)}if(!f.ok)throw Error((e&&"object"==typeof e&&"error"in e&&"string"==typeof e.error?e.error:f.statusText)||`YTDB bridge request failed with HTTP ${f.status}.`);return e}let f={tables:(a,b)=>e("/api/tables",{connectionUrl:a},b),rows:(a,b,c)=>e("/api/rows",{connectionUrl:a,query:b},c),query:(a,b,c)=>e("/api/query",{connectionUrl:a,sql:b},c),updateCell:(a,b,c)=>e("/api/cell",{connectionUrl:a,update:b},c),insertRow:(a,b,c)=>e("/api/insert-row",{connectionUrl:a,insertion:b},c),updateRow:(a,b,c)=>e("/api/update-row",{connectionUrl:a,update:b},c),deleteRows:(a,b,c)=>e("/api/delete-rows",{connectionUrl:a,deletion:b},c),related:(a,b,c)=>e("/api/related",{connectionUrl:a,lookups:b},c),lookup:(a,b,c)=>e("/api/lookup",{connectionUrl:a,query:b},c),definition:(a,b,c)=>e("/api/definition",{connectionUrl:a,table:b},c)}},34766:(a,b,c)=>{"use strict";c.d(b,{ExplorerShell:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call ExplorerShell() from the server but ExplorerShell is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/theobourgeois/code/db-studio/src/components/explorer/explorer-shell.tsx","ExplorerShell")},35412:(a,b,c)=>{Promise.resolve().then(c.bind(c,9769))},44231:(a,b,c)=>{"use strict";c.d(b,{Z:()=>i,k:()=>j});var d=c(48249),e=c(67484),f=c(21883),g=c(20886);let h=(0,e.createContext)(null);function i({connection:a,children:b}){let c=(0,g.Y)(a.url,b=>f.F.tables(a.url,b));return(0,d.jsx)(h.Provider,{value:{connection:a,tables:c},children:b})}function j(){let a=(0,e.useContext)(h);if(!a)throw Error("useExplorerContext must be used inside ExplorerProvider");return a}},82676:(a,b,c)=>{Promise.resolve().then(c.bind(c,34766))},93291:(a,b,c)=>{"use strict";function d(a,b){if(0===b)return!0;let c=a[b-1];return"_"===c||"-"===c||" "===c||"."===c}function e(a,b,c){return f(a,b,a=>[c(a)])}function f(a,b,c){if(!a.trim())return[];let e=[];for(let f of b){let b=c(f),g=null;for(let c of b){let b=function(a,b){let c=a.trim().toLocaleLowerCase(),e=b.toLocaleLowerCase();if(!c)return 0;if(0===e.length)return null;if(e===c)return 1e4;if(e.startsWith(c))return 5e3-e.length;let f=e.indexOf(c);if(-1!==f)return 2400+1200*!!d(b,f)-f-e.length;let g=0,h=0,i=0;for(let a=0;a<e.length&&g<c.length;a+=1){if(e[a]!==c[g]){i=0;continue}h+=12,(i+=1)>1&&(h+=18*i),d(b,a)&&(h+=40),g+=1}if(g<c.length)return null;let j=b.split(/[_\-\s.]+/).map(a=>a[0]??"").join("").toLocaleLowerCase();return j.startsWith(c)?h+=2200:j.includes(c)&&(h+=700),h-(e.length-c.length)}(a,c);null!==b&&(null===g||b>g)&&(g=b)}null!==g&&e.push({item:f,score:g})}return e.sort((a,b)=>b.score!==a.score?b.score-a.score:c(a.item)[0]?.localeCompare(c(b.item)[0]??"")??0)}c.d(b,{R6:()=>e,UO:()=>f})}};
|
|
@@ -33,4 +33,4 @@ exports.id=97,exports.ids=[97],exports.modules={19225:(a,b,c)=>{"use strict";a.e
|
|
|
33
33
|
), 0)::bigint AS bytes
|
|
34
34
|
FROM tree
|
|
35
35
|
`,r=new Set(["date","interval","json","jsonb","time","timestamp","timestamptz","timetz"]);function j(a){return null==a?null:"string"==typeof a||"number"==typeof a||"boolean"==typeof a?a:a instanceof Date?a.toISOString():Buffer.isBuffer(a)?`\\x${a.toString("hex")}`:JSON.stringify(a)}function k(a,b){let c=(0,f.v4)(a);return r.has(b)?`${c}::text`:c}async function l(a,b){let c=(0,e.d)(a),d=await c.query(p,[b.table.schema,b.table.name]),i=d.rows.map(a=>a.name);if(0===i.length)throw Error(`Table ${b.table.schema}.${b.table.name} not found`);let l=new Set(i),n=b.filters.filter(a=>(0,g.eK)(a)&&l.has(a.column)),o=(0,f.MC)(n),q=b.search?.trim()??"",r=!1;if(q){let a=d.rows.filter(a=>(0,f.p_)(a.data_type,a.type_category));if(a.length>0){o.params.push(`%${(0,f.q3)(q)}%`);let b=a.map(a=>`${(0,f.v4)(a.name)}::text ILIKE $${o.params.length} ESCAPE '\\'`).join(" OR ");o.sql=o.sql?`${o.sql} AND (${b})`:`WHERE ${b}`,r=!0}}let s=d.rows.filter(a=>a.is_pk).map(a=>a.name),t=b.sort&&l.has(b.sort.column)?b.sort:null,u=t?[`${(0,f.v4)(t.column)} ${"desc"===t.direction?"DESC":"ASC"}`,...s.filter(a=>a!==t.column).map(a=>`${(0,f.v4)(a)} ASC`)]:s.map(a=>`${(0,f.v4)(a)} ASC`),v=u.length?`ORDER BY ${u.join(", ")}`:"",w=(0,f.Z8)(b.table),x=d.rows.map(a=>k(a.name,a.data_type)),y=Math.max(1,Math.min(b.pageSize,500)),z=Math.floor(h.d6/y),A=Math.min(Math.max(0,b.page),z),B=A*y,C=A>=z,[D,E]=await Promise.all([c.query({text:`SELECT ${x.join(", ")} FROM ${w} ${o.sql} ${v} LIMIT ${y+1} OFFSET ${B}`,values:o.params,rowMode:"array"}),m(c,b.table,w,o,r)]),F=D.rows,G=F.length>y,H=G?F.slice(0,y):F;return{columns:i,rows:H.map(a=>a.map(j)),total:E.total,estimated:E.estimated,hasMore:G&&!C,capped:G&&C}}async function m(a,b,c,d,e){var f;if((f=await n(a,b))&&("r"===f.relkind||"p"===f.relkind||"m"===f.relkind)&&f.bytes<=h.Be){let b=await a.query(`SELECT count(*)::bigint AS count FROM ${c} ${d.sql}`,d.params);return{total:Number(b.rows[0]?.count??0),estimated:!1}}if(e)return{total:null,estimated:!0};try{return{total:await o(a,c,d),estimated:!0}}catch{return{total:null,estimated:!0}}}async function n(a,b){let c=(await a.query(q,[b.schema,b.name])).rows[0];return c?.relkind?{relkind:c.relkind,bytes:Number(c.bytes)}:null}async function o(a,b,c){let d=await a.query(`EXPLAIN (FORMAT JSON) SELECT 1 FROM ${b} ${c.sql}`,c.params);return function(a){let b="string"==typeof a?JSON.parse(a):a,c=Array.isArray(b)?b[0]:b;if(!c||"object"!=typeof c)return 0;let d="Plan"in c?c.Plan:null;if(!d||"object"!=typeof d||!("Plan Rows"in d))return 0;let e=Number(d["Plan Rows"]);return Number.isFinite(e)?Math.max(0,Math.round(e)):0}(d.rows[0]?.["QUERY PLAN"])}d()}catch(a){d(a)}})},21446:(a,b,c)=>{"use strict";c.d(b,{eK:()=>e});let d={eq:{label:"Equals",symbol:"=",hasValue:!0,group:"comparison"},neq:{label:"Not equal",symbol:"<>",hasValue:!0,group:"comparison"},gt:{label:"Greater than",symbol:">",hasValue:!0,group:"comparison"},gte:{label:"Greater or equal",symbol:">=",hasValue:!0,group:"comparison"},lt:{label:"Less than",symbol:"<",hasValue:!0,group:"comparison"},lte:{label:"Less or equal",symbol:"<=",hasValue:!0,group:"comparison"},like:{label:"Like",symbol:"~~",hasValue:!0,group:"pattern"},ilike:{label:"iLike",symbol:"~~*",hasValue:!0,group:"pattern"},is_null:{label:"Is null",symbol:"IS NULL",hasValue:!1,group:"null"},is_not_null:{label:"Is not null",symbol:"IS NOT NULL",hasValue:!1,group:"null"}};function e(a){return!!a.column&&(!d[a.operator].hasValue||a.value.length>0)}Object.keys(d).map(a=>({value:a,label:d[a].label,symbol:d[a].symbol,group:d[a].group}))},41834:(a,b,c)=>{"use strict";c.d(b,{$F:()=>g,Be:()=>e,H4:()=>i,d6:()=>f,mb:()=>h,nc:()=>d,qX:()=>j});let d=8e3,e=8388608,f=1e4,g=500,h=6e4,i=5e4;function j(a){return!function(a){if("object"!=typeof a||null===a)return!1;if("57014"===("code"in a?a.code:void 0))return!0;let b="message"in a&&"string"==typeof a.message?a.message:"";return/timeout|cancell?ed|cancell?ing/i.test(b)}(a)?a instanceof Error?a.message:"Unknown error":"Query took too long and was cancelled. Add a filter or limit the result set."}},70613:(a,b,c)=>{"use strict";c.d(b,{Ai:()=>o,EB:()=>n,L1:()=>m,v_:()=>q});var d=c(77598),e=c(51455),f=c(76760),g=c.n(f),h=c(89194);let i=process.env.YTDB_LOG_DIR??g().join(process.cwd(),".ytdb","activity"),j=null,k=Promise.resolve(),l=!1;function m(a){if(["0","off","false"].includes((process.env.YTDB_LOG??"").toLowerCase()))return;let b=`${JSON.stringify({v:h.aH,id:(0,d.randomUUID)(),ts:new Date().toISOString(),...a})}
|
|
36
|
-
`;k=k.then(async()=>{var a;j??=(0,e.mkdir)(i,{recursive:!0}).then(()=>void 0),await j,await (0,e.appendFile)((a=new Date,g().join(i,`${a.toISOString().slice(0,10)}.jsonl`)),b,"utf8")}).catch(a=>{j=null,l||(l=!0,console.warn("[activity-log] disabled for this run:",a))})}function n(a){if("string"!=typeof a||0===a.length)return null;try{let b=new URL(a),c=b.username?`${decodeURIComponent(b.username)}@`:"",d=b.port?`:${b.port}`:"";return`${b.protocol}//${c}${b.hostname}${d}${b.pathname}`}catch{return"invalid-url"}}function o(a){return!a||"object"!=typeof a||Array.isArray(a)?p(a):p(Object.fromEntries(Object.entries(a).filter(([a])=>"connectionUrl"!==a)))}function p(a){let b;try{b=JSON.stringify(a)??"null"}catch{return{unserializable:!0}}return b.length<=2e4?a:{truncated:!0,bytes:b.length,preview:b.slice(0,1e3)}}function q(a,b){switch(a){case"tables":return{tables:Array.isArray(b)?b.length:0};case"rows":case"lookup":return{rows:r(b?.rows),columns:r(b?.columns),total:b?.total??null,estimated:b?.estimated??!1,capped:b?.capped??!1};case"query":{let a=Array.isArray(b?.statements)?b.statements:[];return{statements:a.length,commands:a.map(a=>a.command),rows:a.reduce((a,b)=>a+r(b.rows),0),durationMs:b?.durationMs??null}}case"cell.update":return{updated:+!!b?.row};case"rows.insert":return{inserted:+!!b?.row};case"rows.delete":return{deleted:b?.deleted??0};case"related":{let a=Array.isArray(b)?b:[];return{lookups:a.length,matched:a.reduce((a,b)=>a+r(b.rows),0)}}case"definition":return{sqlLength:"string"==typeof b?.sql?b.sql.length:0};default:return}}function r(a){return Array.isArray(a)?a.length:0}},74568:(a,b,c)=>{"use strict";function d(a){return`"${a.replace(/"/g,'""')}"`}function e(a){return`${d(a.schema)}.${d(a.name)}`}function f(a){return a.replace(/[\\%_]/g,"\\$&")}c.d(b,{MC:()=>j,Z8:()=>e,p_:()=>h,q3:()=>f,v4:()=>d});let g=new Set(["text","varchar","bpchar","citext","name","uuid"]);function h(a,b){return"S"===b||g.has(a)}let i={eq:"=",neq:"<>",gt:">",gte:">=",lt:"<",lte:"<="};function j(a){let b=[],c=a.map(a=>{let c=d(a.column);switch(a.operator){case"is_null":return`${c} IS NULL`;case"is_not_null":return`${c} IS NOT NULL`;case"like":case"ilike":return b.push(a.value),`${c}::text ${a.operator.toUpperCase()} $${b.length}`;case"eq":case"neq":case"gt":case"gte":case"lt":case"lte":return b.push(a.value),`${c} ${i[a.operator]} $${b.length}`;default:return a.operator}});return{sql:c.length?`WHERE ${c.join(" AND ")}`:"",params:b}}},78335:()=>{},82428:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{d:()=>h});var e=c(64939),f=c(41834),g=a([e]);e=(g.then?(await g)():g)[0];let i=new Map;function h(a){let b=i.get(a);return b||((b=new e.Pool({connectionString:a,max:4,idleTimeoutMillis:3e4,application_name:"ytdb",statement_timeout:f.nc,query_timeout:f.nc,ssl:!function(a){try{let{hostname:b,searchParams:c}=new URL(a);if(c.has("sslmode"))return"disable"!==c.get("sslmode");return!["localhost","127.0.0.1","::1"].includes(b)}catch{return!1}}(a)?void 0:{rejectUnauthorized:!1}})).on("error",()=>i.delete(a)),i.set(a,b)),b}d()}catch(a){d(a)}})},84152:(a,b,c)=>{"use strict";c.d(b,{VW:()=>g,fx:()=>f,ms:()=>h});var d=c(41834),e=c(70613);function f(a,b){return async c=>{let f;if("1"===process.env.VERCEL)return Response.json({error:"Database API is local-only"},{status:404});let g=performance.now();try{f=await c.json()}catch{return(0,e.L1)({source:"api",action:a,connection:null,status:"error",durationMs:Math.round(performance.now()-g),error:"Invalid JSON body"}),Response.json({error:"Invalid JSON body"},{status:400})}let h=(0,e.EB)(f?.connectionUrl),i=(0,e.Ai)(f);try{let c=await b(f);return(0,e.L1)({source:"api",action:a,connection:h,status:"ok",durationMs:Math.round(performance.now()-g),params:i,result:(0,e.v_)(a,c)}),Response.json(c)}catch(c){let b=(0,d.qX)(c);return(0,e.L1)({source:"api",action:a,connection:h,status:"error",durationMs:Math.round(performance.now()-g),params:i,error:b}),Response.json({error:b},{status:500})}}}function g(a,b){if("string"!=typeof a||0===a.length)throw Error(`Missing ${b}`);return a}function h(a,b="table"){if(!a||"object"!=typeof a)throw Error(`Missing ${b}`);return{schema:g(a.schema,`${b}.schema`),name:g(a.name,`${b}.name`)}}},89194:(a,b,c)=>{"use strict";c.d(b,{P7:()=>f,aH:()=>d});let d=1,e=["connection.add","connection.update","connection.remove","config.export","config.import"];function f(a){return"string"==typeof a&&e.includes(a)}},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};
|
|
36
|
+
`;k=k.then(async()=>{var a;j??=(0,e.mkdir)(i,{recursive:!0}).then(()=>void 0),await j,await (0,e.appendFile)((a=new Date,g().join(i,`${a.toISOString().slice(0,10)}.jsonl`)),b,"utf8")}).catch(a=>{j=null,l||(l=!0,console.warn("[activity-log] disabled for this run:",a))})}function n(a){if("string"!=typeof a||0===a.length)return null;try{let b=new URL(a),c=b.username?`${decodeURIComponent(b.username)}@`:"",d=b.port?`:${b.port}`:"";return`${b.protocol}//${c}${b.hostname}${d}${b.pathname}`}catch{return"invalid-url"}}function o(a){return!a||"object"!=typeof a||Array.isArray(a)?p(a):p(Object.fromEntries(Object.entries(a).filter(([a])=>"connectionUrl"!==a)))}function p(a){let b;try{b=JSON.stringify(a)??"null"}catch{return{unserializable:!0}}return b.length<=2e4?a:{truncated:!0,bytes:b.length,preview:b.slice(0,1e3)}}function q(a,b){switch(a){case"tables":return{tables:Array.isArray(b)?b.length:0};case"rows":case"lookup":return{rows:r(b?.rows),columns:r(b?.columns),total:b?.total??null,estimated:b?.estimated??!1,capped:b?.capped??!1};case"query":{let a=Array.isArray(b?.statements)?b.statements:[];return{statements:a.length,commands:a.map(a=>a.command),rows:a.reduce((a,b)=>a+r(b.rows),0),durationMs:b?.durationMs??null}}case"cell.update":return{updated:+!!b?.row};case"rows.insert":return{inserted:+!!b?.row};case"rows.update":return{updated:b?.updated??0};case"rows.delete":return{deleted:b?.deleted??0};case"related":{let a=Array.isArray(b)?b:[];return{lookups:a.length,matched:a.reduce((a,b)=>a+r(b.rows),0)}}case"definition":return{sqlLength:"string"==typeof b?.sql?b.sql.length:0};default:return}}function r(a){return Array.isArray(a)?a.length:0}},74568:(a,b,c)=>{"use strict";function d(a){return`"${a.replace(/"/g,'""')}"`}function e(a){return`${d(a.schema)}.${d(a.name)}`}function f(a){return a.replace(/[\\%_]/g,"\\$&")}c.d(b,{MC:()=>j,Z8:()=>e,p_:()=>h,q3:()=>f,v4:()=>d});let g=new Set(["text","varchar","bpchar","citext","name","uuid"]);function h(a,b){return"S"===b||g.has(a)}let i={eq:"=",neq:"<>",gt:">",gte:">=",lt:"<",lte:"<="};function j(a){let b=[],c=a.map(a=>{let c=d(a.column);switch(a.operator){case"is_null":return`${c} IS NULL`;case"is_not_null":return`${c} IS NOT NULL`;case"like":case"ilike":return b.push(a.value),`${c}::text ${a.operator.toUpperCase()} $${b.length}`;case"eq":case"neq":case"gt":case"gte":case"lt":case"lte":return b.push(a.value),`${c} ${i[a.operator]} $${b.length}`;default:return a.operator}});return{sql:c.length?`WHERE ${c.join(" AND ")}`:"",params:b}}},78335:()=>{},82428:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{d:()=>h});var e=c(64939),f=c(41834),g=a([e]);e=(g.then?(await g)():g)[0];let i=new Map;function h(a){let b=i.get(a);return b||((b=new e.Pool({connectionString:a,max:4,idleTimeoutMillis:3e4,application_name:"ytdb",statement_timeout:f.nc,query_timeout:f.nc,ssl:!function(a){try{let{hostname:b,searchParams:c}=new URL(a);if(c.has("sslmode"))return"disable"!==c.get("sslmode");return!["localhost","127.0.0.1","::1"].includes(b)}catch{return!1}}(a)?void 0:{rejectUnauthorized:!1}})).on("error",()=>i.delete(a)),i.set(a,b)),b}d()}catch(a){d(a)}})},84152:(a,b,c)=>{"use strict";c.d(b,{VW:()=>g,fx:()=>f,ms:()=>h});var d=c(41834),e=c(70613);function f(a,b){return async c=>{let f;if("1"===process.env.VERCEL)return Response.json({error:"Database API is local-only"},{status:404});let g=performance.now();try{f=await c.json()}catch{return(0,e.L1)({source:"api",action:a,connection:null,status:"error",durationMs:Math.round(performance.now()-g),error:"Invalid JSON body"}),Response.json({error:"Invalid JSON body"},{status:400})}let h=(0,e.EB)(f?.connectionUrl),i=(0,e.Ai)(f);try{let c=await b(f);return(0,e.L1)({source:"api",action:a,connection:h,status:"ok",durationMs:Math.round(performance.now()-g),params:i,result:(0,e.v_)(a,c)}),Response.json(c)}catch(c){let b=(0,d.qX)(c);return(0,e.L1)({source:"api",action:a,connection:h,status:"error",durationMs:Math.round(performance.now()-g),params:i,error:b}),Response.json({error:b},{status:500})}}}function g(a,b){if("string"!=typeof a||0===a.length)throw Error(`Missing ${b}`);return a}function h(a,b="table"){if(!a||"object"!=typeof a)throw Error(`Missing ${b}`);return{schema:g(a.schema,`${b}.schema`),name:g(a.name,`${b}.name`)}}},89194:(a,b,c)=>{"use strict";c.d(b,{P7:()=>f,aH:()=>d});let d=1,e=["connection.add","connection.update","connection.remove","config.export","config.import"];function f(a){return"string"==typeof a&&e.includes(a)}},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/
|
|
1
|
+
globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/2TlHWKLrxFV59N4Moie3r/_buildManifest.js","static/2TlHWKLrxFV59N4Moie3r/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-51196f53e7d6229d.js","static/chunks/4bd1b696-c9cc1fe3b38e59bb.js","static/chunks/794-5400405c4012cb77.js","static/chunks/main-app-f0a2b35cb4db2c5e.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="__variable_246ccd __variable_c29908 dark h-full" data-theme="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/22a5144ee8d83bca-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/7d4881bb7e1bf84d-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/e02ab5db9ff2dca2.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="__variable_246ccd __variable_c29908 dark h-full" data-theme="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/22a5144ee8d83bca-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/7d4881bb7e1bf84d-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/e02ab5db9ff2dca2.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/1915e6393ee4941a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-51196f53e7d6229d.js"/><script src="/_next/static/chunks/4bd1b696-c9cc1fe3b38e59bb.js" async=""></script><script src="/_next/static/chunks/794-5400405c4012cb77.js" async=""></script><script src="/_next/static/chunks/main-app-f0a2b35cb4db2c5e.js" async=""></script><script src="/_next/static/chunks/39-3411368bf75bda4b.js" async=""></script><script src="/_next/static/chunks/app/layout-6c0fa591484fc6df.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>YTDB</title><meta name="description" content="A database management UI"/><link rel="icon" href="/favicon.ico?603d046c9a6fdfbb" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icon.svg?38bdd49dcdf01715" type="image/svg+xml" sizes="any"/><script>(function(){try{var allowed=["dark","light","one-dark-pro","nord","dracula","tokyo-night"];var light=["light"];var id="dark";var raw=localStorage.getItem("ytdb:theme")||localStorage.getItem("db-studio:theme");if(raw){var parsed=JSON.parse(raw);var value=parsed&&parsed.state&&parsed.state.theme;if(typeof value==="string"&&allowed.indexOf(value)!==-1)id=value;}var root=document.documentElement;root.setAttribute("data-theme",id);root.classList.toggle("dark",light.indexOf(id)===-1);}catch(e){}})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="flex min-h-full flex-col"><div hidden=""><!--$--><!--/$--></div><main class="grid min-h-dvh place-items-center bg-background px-6 text-foreground"><div class="max-w-lg space-y-4"><p class="font-mono text-xs tracking-[0.22em] text-muted-foreground">YTDB</p><h1 class="text-2xl font-semibold tracking-tight">Connecting to YTDB…</h1></div></main><script src="/_next/static/chunks/webpack-51196f53e7d6229d.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[72737,[\"39\",\"static/chunks/39-3411368bf75bda4b.js\",\"177\",\"static/chunks/app/layout-6c0fa591484fc6df.js\"],\"ThemeProvider\"]\n3:I[94821,[\"39\",\"static/chunks/39-3411368bf75bda4b.js\",\"177\",\"static/chunks/app/layout-6c0fa591484fc6df.js\"],\"ConvexClientProvider\"]\n4:I[87758,[\"39\",\"static/chunks/39-3411368bf75bda4b.js\",\"177\",\"static/chunks/app/layout-6c0fa591484fc6df.js\"],\"LocalBridgeGate\"]\n5:I[57121,[],\"\"]\n6:I[74581,[],\"\"]\n7:I[90484,[],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\nb:I[90484,[],\"ViewportBoundary\"]\nd:I[90484,[],\"MetadataBoundary\"]\nf:I[27123,[],\"default\",1]\n:HL[\"/_next/static/media/22a5144ee8d83bca-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/7d4881bb7e1bf84d-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/e02ab5db9ff2dca2.css\",\"style\"]\n:HL[\"/_next/static/css/1915e6393ee4941a.css\",\"style\"]\na:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/e02ab5db9ff2dca2.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/1915e6393ee4941a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_246ccd __variable_c29908 dark h-full\",\"data-theme\":\"dark\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var allowed=[\\\"dark\\\",\\\"light\\\",\\\"one-dark-pro\\\",\\\"nord\\\",\\\"dracula\\\",\\\"tokyo-night\\\"];var light=[\\\"light\\\"];var id=\\\"dark\\\";var raw=localStorage.getItem(\\\"ytdb:theme\\\")||localStorage.getItem(\\\"db-studio:theme\\\");if(raw){var parsed=JSON.parse(raw);var value=parsed\u0026\u0026parsed.state\u0026\u0026parsed.state.theme;if(typeof value===\\\"string\\\"\u0026\u0026allowed.indexOf(value)!==-1)id=value;}var root=document.documentElement;root.setAttribute(\\\"data-theme\\\",id);root.classList.toggle(\\\"dark\\\",light.indexOf(id)===-1);}catch(e){}})();\"}}]}],[\"$\",\"body\",null,{\"className\":\"flex min-h-full flex-col\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],{},null,false,null]},null,false,\"$a\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Le\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"2TlHWKLrxFV59N4Moie3r\"}\n"])</script><script>self.__next_f.push([1,"a:C\nc:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[86869,[],\"IconMark\"]\n9:null\ne:[[\"$\",\"title\",\"0\",{\"children\":\"YTDB\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"A database management UI\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?603d046c9a6fdfbb\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.svg?38bdd49dcdf01715\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"$L10\",\"4\",{}]]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-51196f53e7d6229d.js"/><script src="/_next/static/chunks/4bd1b696-c9cc1fe3b38e59bb.js" async=""></script><script src="/_next/static/chunks/794-5400405c4012cb77.js" async=""></script><script src="/_next/static/chunks/main-app-f0a2b35cb4db2c5e.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-51196f53e7d6229d.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[90484,[],\"ViewportBoundary\"]\na:I[90484,[],\"MetadataBoundary\"]\nc:I[27123,[],\"default\",1]\n7:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"]},null,false,\"$7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-51196f53e7d6229d.js"/><script src="/_next/static/chunks/4bd1b696-c9cc1fe3b38e59bb.js" async=""></script><script src="/_next/static/chunks/794-5400405c4012cb77.js" async=""></script><script src="/_next/static/chunks/main-app-f0a2b35cb4db2c5e.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-51196f53e7d6229d.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[90484,[],\"ViewportBoundary\"]\na:I[90484,[],\"MetadataBoundary\"]\nc:I[27123,[],\"default\",1]\n7:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"]},null,false,\"$7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"2TlHWKLrxFV59N4Moie3r\"}\n"])</script><script>self.__next_f.push([1,"7:C\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"4uijSgydctt7DxP47CyAAIqrzB6CT8S/mvOWCj+3zoA="}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:17,errorRate:1e-4,numBits:326,numHashes:14,bitArray:[0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,0,1,0,0,0,0,1,0,0,1,0,1,1,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,0,0,1,1,0,0,1,1,0,1,1,0,0,1,0,1,1,1,0,1,1,0,0,1,1,1,1,0,0,0,1,0,1,1,0,1,0,1,0,0,1,1,1,0,0,1,1,1,0,1,0,1,1,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,0,1,0,0,1,1,0,1,0,1,1,0,1,1,1,0,0,1,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,0,0,1,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,1,0,0,1,1,1,1,1,0,1,1,1,1,0,1,0,1,1,1,1,0,0,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,1,0,0,1,0,0,0,1,0,0,1,0,1,0,1,1,0,0,1,1,1,0,1,0,1,1,0,1,0,0,1,1,0,0,1,1,1,1,1,0,1,0,0,1,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,1,0,1,1,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0,1,1,1,0,0,0,1,1,0,1,0,1,0,1,1,0,0,1,0,1,0]},__routerFilterDynamic:{numItems:3,errorRate:1e-4,numBits:58,numHashes:14,bitArray:[0,1,1,1,0,0,0,1,1,1,1,0,0,1,0,0,1,1,0,0,0,1,1,0,1,0,0,0,1,1,0,1,1,1,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1]},sortedPages:["/_app"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[444],{2125:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},2385:(e,t,n)=>{n.d(t,{K:()=>d});var r=n(12115),l=n(30271),o=n(34934),a=n(65440),i=n(39096),u=n(27540),s=n(95155);let d=r.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,d=(0,a.Ee)(),c=(0,l.P)(d,u.T.mounted),p=(0,l.P)(d,u.T.forceMounted);return c||n||p?(0,s.jsx)(i.P.Provider,{value:n,children:(0,s.jsx)(o.XF,{ref:t,...r})}):null})},2866:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("file-braces-corner",[["path",{d:"M14 22h4a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v6",key:"14cnrg"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M5 14a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1 1 1 0 0 1 1 1v2a1 1 0 0 0 1 1",key:"sr0ebq"}],["path",{d:"M9 22a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-2a1 1 0 0 0-1-1",key:"w793db"}]])},6276:(e,t,n)=>{function r(e){return null==e?void 0:`${e}-popup`}function l(e,t){return(n,r)=>null!=n&&e.contains(n,r,t)}n.d(t,{I2:()=>l,xj:()=>r})},6923:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]])},8962:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},9751:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]])},13003:(e,t,n)=>{n.d(t,{p:()=>c});var r=n(12115),l=n(55218),o=n(46468),a=n(27091),i=n(7049),u=n(76175),s=n(65440),d=n(95155);let c=r.forwardRef(function(e,t){let n=(0,s.Ee)(),{buttonRef:r,getButtonProps:c}=(0,a.s)({native:!1}),p=(0,l.a)(t,r),f=c({onClick:function(e){n.state.setOpen(!1,(0,i.d)(u.SR,e.nativeEvent,e.currentTarget))}});return(0,d.jsx)("span",{ref:p,...f,"aria-label":"Dismiss",tabIndex:void 0,style:o.a})})},15330:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]])},18986:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},19001:(e,t,n)=>{n.d(t,{o:()=>P});var r=n(12115),l=n(30271),o=n(66652),a=n(23068),i=n(96354),u=n(65440),s=n(44512),d=n(90491),c=n(53536),p=n(39096),f=n(69679),v=n(27540),h=n(53976),g=n(62424),m=n(15702),y=n(95155);let P=r.forwardRef(function(e,t){let{render:n,className:r,anchor:P,positionMethod:x,side:O,align:R,sideOffset:T,alignOffset:b,collisionBoundary:I="clipping-ancestors",collisionPadding:E,arrowPadding:k,sticky:C,disableAnchorTracking:A=!1,collisionAvoidance:M=f.uD,style:S,...w}=e,j=(0,u.Ee)(),V=(0,u.ui)(),Q=(0,p.s)(),q=(0,l.P)(j,v.T.modal),D=(0,l.P)(j,v.T.open),F=(0,l.P)(j,v.T.mounted),H=(0,l.P)(j,v.T.openMethod),W=(0,l.P)(j,v.T.positionerElement),$=(0,l.P)(j,v.T.triggerElement),z=(0,l.P)(j,v.T.inputElement),K=(0,l.P)(j,v.T.inputGroupElement),L=(0,l.P)(j,v.T.inputInsidePopup),X=(0,l.P)(j,v.T.transitionStatus),N=(0,d.$B)(),B=(0,c.s)({anchor:P??(L?$:K??z),floatingRootContext:V,positionMethod:x,mounted:F,side:O,sideOffset:T,align:R,alignOffset:b,arrowPadding:k,collisionBoundary:I,collisionPadding:E,sticky:C,disableAnchorTracking:A,keepMounted:Q,collisionAvoidance:M,lazyFlip:!0});(0,m.G)(D&&q,"touch"===H,W,$);let G={open:D,side:B.side,align:B.align,anchorHidden:B.anchorHidden,empty:N};(0,o.g)(()=>{j.set("popupSide",B.side)},[j,B.side]);let Z=(0,a.K)(e=>{j.set("positionerElement",e)}),_=(0,g.i)(e,G,{styles:B.positionerStyles,transitionStatus:X,props:w,refs:[t,Z],hidden:!F,inert:!D});return(0,y.jsxs)(s.Z.Provider,{value:B,children:[F&&q&&(0,y.jsx)(h.W,{inert:(0,i.Y)(!D),cutout:K??z??$}),_]})})},19805:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},25182:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},25460:(e,t,n)=>{n.d(t,{Pq:()=>s});var r=n(2320),l=n(32638);let o=(0,l.pn)({String:l._A.string,Number:l._A.number,"True False":l._A.bool,PropertyName:l._A.propertyName,Null:l._A.null,", :":l._A.separator,"[ ]":l._A.squareBracket,"{ }":l._A.brace}),a=r.U1.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[o],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});var i=n(46732);let u=i.bj.define({name:"json",parser:a.configure({props:[i.Oh.add({Object:(0,i.mz)({except:/^\s*\}/}),Array:(0,i.mz)({except:/^\s*\]/})}),i.b_.add({"Object Array":i.yd})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function s(){return new i.Yy(u)}},27540:(e,t,n)=>{n.d(t,{T:()=>o});var r=n(70035),l=n(15483);let o={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return null!=t&&(!("multiple"===n&&Array.isArray(t))||t.length>0)},hasNullItemLabel:(e,t)=>!!t&&(0,l.Dp)(e.items),open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,l=e.selectedValue;return Array.isArray(l)?l.some(e=>(0,r.tl)(t,e,n)):(0,r.tl)(t,l,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemProps:e=>e.itemProps,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight}},29432:(e,t,n)=>{n.d(t,{e:()=>g});var r=n(12115),l=n(30271),o=n(23068),a=n(69938),i=n(65440),u=n(44512),s=n(27540),d=n(95155);let c=r.createContext(null);function p(e){let{children:t}=e,{filteredItems:n}=(0,i.Dc)(),l=r.useContext(c),o=l?l.items:n;return(0,d.jsx)(r.Fragment,{children:o.map(t)})}var f=n(67894),v=n(17947),h=n(90491);let g=r.forwardRef(function(e,t){var n;let{render:c,className:g,style:m,children:y,...P}=e,x=(0,i.Ee)(),O=(0,i.ui)(),R=!!(0,u.O)(!0),{filteredItems:T,hasItems:b}=(0,i.Dc)(),I=(0,l.P)(x,s.T.selectionMode),E=(0,l.P)(x,s.T.grid),k=(0,l.P)(x,s.T.listProps),C=(0,l.P)(x,s.T.virtualized),A=(0,l.P)(x,s.T.forceMounted),M=0===T.length,S=(0,o.K)(e=>{x.set("positionerElement",e)}),w=(0,o.K)(e=>{x.set("listElement",e)}),j=r.useMemo(()=>"function"==typeof y?n||(n=(0,d.jsx)(p,{children:y})):y,[y]),V=O.useState("floatingId"),Q=(0,a.o)("div",e,{state:{empty:M},ref:[t,w,R?null:S],props:[k,{children:j,tabIndex:-1,id:V,role:E?"grid":"listbox","aria-multiselectable":"multiple"===I?"true":void 0,onKeyDown(e){if(!x.state.disabled&&!x.state.readOnly&&"Enter"===e.key){let t=x.state.activeIndex;null!=t&&((0,v.jo)(e),(0,h.L6)(x,t,e.nativeEvent))}},onKeyDownCapture(){x.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){x.state.keyboardActiveRef.current=!1}},P]});if(C)return Q;let q=b&&!A?void 0:x.state.labelsRef;return(0,d.jsx)(f.u,{elementsRef:x.state.listRef,labelsRef:q,children:Q})})},31458:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("file-spreadsheet",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]])},34304:(e,t,n)=>{n.d(t,{W:()=>O});var r=n(25803),l=n(12115),o=n(45594),a=n(27091),i=n(84052),u=n(69938),s=n(69679),d=n(66610),c=n(7118),p=n(9569),f=n(62955),v=n(6522),h=n(76175),g=n(95327),m=n(26713),y=n(11974),P=n(22713),x=n(95155);let O=l.forwardRef(function(e,t){let{render:n,className:O,style:R,disabled:T=!1,nativeButton:b=!0,handle:I,payload:E,openOnHover:k=!1,delay:C=300,closeDelay:A=0,id:M,...S}=e,w=(0,o.s)(!0),j=(0,g.f)(I)??w;if(!j)throw Error((0,r.A)(74));let V=(0,f.e)(M),Q=j.useState("isTriggerActive",V),q=j.useState("floatingRootContext"),D=j.useState("isOpenedByTrigger",V),F=j.useState("triggerPopupId",V),H=l.useRef(null),{registerTrigger:W,isMountedByThisTrigger:$}=(0,m.L_)(V,H,j,{payload:E,disabled:T,openOnHover:k,closeDelay:A}),z=j.useState("openChangeReason"),K=j.useState("stickIfOpen"),L=j.useState("openMethod"),X=j.useState("focusManagerModal"),N=(0,d.j)(q,{enabled:!T&&k&&("touch"!==L||z!==h.Ui),mouseOnly:!0,move:!1,handleClose:(0,c.i)(),restMs:C,delay:{close:A},triggerElementRef:H,isActiveTrigger:Q,isClosing:()=>"ending"===j.select("transitionStatus")}),B=(0,p.k)(q,{stickIfOpen:K}),G=(0,P.L)(()=>j.select("open"),e=>{j.set("openMethod",e)}),Z=j.useState("triggerProps",$),{getButtonProps:_,buttonRef:Y}=(0,a.s)({disabled:T,native:b}),{preFocusGuardRef:U,handlePreFocusGuardFocus:J,handleFocusTargetFocus:ee}=(0,y.a)(j,H),et=(0,u.o)("button",e,{state:{disabled:T,open:D},ref:[Y,t,W,H],props:[B.reference,N,Z,G,{[s.Kd]:"",id:V,"aria-haspopup":"dialog","aria-expanded":D,"aria-controls":F},S,_],stateAttributesMapping:{open:e=>e&&z===h.Ui?i.jL.open(e):i.qV.open(e)}}),en=(0,x.jsx)(l.Fragment,{children:et},V);return $&&!X?(0,x.jsxs)(l.Fragment,{children:[(0,x.jsx)(v.U,{ref:U,onFocus:J}),en,(0,x.jsx)(v.U,{ref:j.context.triggerFocusTargetRef,onFocus:ee})]}):en})},34574:(e,t,n)=>{n.d(t,{A:()=>a,n:()=>o});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function a(){let e=l.useContext(o);if(void 0===e)throw Error((0,r.A)(45));return e}},34738:(e,t,n)=>{n.d(t,{b:()=>a,s:()=>o});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function a(){let e=l.useContext(o);if(!e)throw Error((0,r.A)(19));return e}},36565:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},38158:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},39096:(e,t,n)=>{n.d(t,{P:()=>o,s:()=>a});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function a(){let e=l.useContext(o);if(void 0===e)throw Error((0,r.A)(20));return e}},44118:(e,t,n)=>{n.d(t,{i:()=>x});var r=n(12115),l=n(6791),o=n(62081),a=n(2052),i=n(45594),u=n(65610),s=n(84052),d=n(72924),c=n(69938),p=n(76175),f=n(5313),v=n(95846),h=n(36050),g=n(23068);let m=r.createContext(void 0);var y=n(26713),P=n(95155);let x=r.forwardRef(function(e,t){let{render:n,className:x,style:O,initialFocus:R,finalFocus:T,...b}=e,I=(0,i.s)(),E=(0,u.k)(),k=null!=(0,v.S)(!0),{context:C,hasClosePart:A}=function(){let[e,t]=r.useState(0),n=(0,g.K)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:r.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),M=I.useState("open"),S=I.useState("openMethod"),w=I.useState("instantType"),j=I.useState("transitionStatus"),V=I.useState("popupProps"),Q=I.useState("titleElementId"),q=I.useState("descriptionElementId"),D=I.useState("modal"),F=I.useState("mounted"),H=I.useState("openChangeReason"),W=I.useState("activeTriggerElement"),$=I.useState("floatingRootContext"),z=$.useState("floatingId"),K=I.useState("disabled"),L=I.useState("openOnHover"),X=I.useState("closeDelay");(0,d.v)({open:M,ref:I.context.popupRef,onComplete(){M&&I.context.onOpenChangeComplete?.(!0)}}),(0,o.a)($,{enabled:L&&!K,closeDelay:X});let N=void 0===R?(0,y.UM)(I.context.popupRef):R,B=!1!==D&&A;I.useSyncedValue("focusManagerModal",B);let G=I.useStateSetter("popupElement"),Z={open:M,side:E.side,align:E.align,instant:w,transitionStatus:j},_=(0,c.o)("div",e,{state:Z,ref:[t,I.context.popupRef,G],props:[V,{id:z,role:"dialog",...y.Ls,"aria-labelledby":Q,"aria-describedby":q,onKeyDown(e){k&&f.jF.has(e.key)&&e.stopPropagation()}},(0,h.d)(j),b],stateAttributesMapping:s.LM});return(0,P.jsx)(a.s,{context:$,openInteractionType:S,modal:B,disabled:!F||H===p.N7,initialFocus:N,returnFocus:T,restoreFocus:"popup",previousFocusableElement:(0,l.sb)(W)?W:void 0,nextFocusableElement:I.context.triggerFocusTargetRef,beforeContentFocusGuardRef:I.context.beforeContentFocusGuardRef,children:(0,P.jsx)(m.Provider,{value:C,children:_})})})},44512:(e,t,n)=>{n.d(t,{O:()=>a,Z:()=>o});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function a(e){let t=l.useContext(o);if(void 0===t&&!e)throw Error((0,r.A)(21));return t}},45594:(e,t,n)=>{n.d(t,{r:()=>o,s:()=>a});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function a(e){let t=l.useContext(o);if(void 0===t&&!e)throw Error((0,r.A)(47));return t}},47028:(e,t,n)=>{n.d(t,{Q:()=>d});var r=n(12115),l=n(34738),o=n(97378),a=n(72924),i=n(69938),u=n(41900),s=n(95155);let d=r.forwardRef(function(e,t){let{selected:n}=(0,l.b)();return e.keepMounted||n?(0,s.jsx)(c,{...e,ref:t}):null}),c=r.memo(r.forwardRef((e,t)=>{let{render:n,className:s,style:d,keepMounted:c,...p}=e,{selected:f}=(0,l.b)(),v=r.useRef(null),{transitionStatus:h,setMounted:g}=(0,o.$)(f),m=(0,i.o)("span",e,{ref:[t,v],state:{selected:f,transitionStatus:h},props:[{"aria-hidden":!0,children:"✔️"},p],stateAttributesMapping:u.G});return(0,a.v)({open:f,ref:v,onComplete(){f||g(!1)}}),m}))},50825:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},51128:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},56758:(e,t,n)=>{n.d(t,{x:()=>y});var r=n(12115),l=n(47650),o=n(30271),a=n(66652),i=n(65440),u=n(54068),s=n(69938),d=n(34738),c=n(27540),p=n(27091);let f=r.createContext(!1);var v=n(70035),h=n(95155);function g(e){let{componentProps:t,forwardedRef:n,virtualized:g,indexFromFilter:m}=e,{render:y,className:P,style:x,value:O=null,index:R,disabled:T=!1,nativeButton:b=!1,...I}=t,E=r.useRef(null),k=(0,u.q)({guess:!0,index:R,textRef:E}),C=(0,i.Ee)(),A=r.useContext(f),M=(0,i.Eg)(),S=(0,o.P)(C,c.T.selectionMode),w=(0,o.P)(C,c.T.disabled),j=(0,o.P)(C,c.T.readOnly),V=(0,o.P)(C,c.T.isItemEqualToValue),Q=w||T,q="none"!==S,D=R??m??k.index,F=-1!==D,H=(0,o.P)(C,c.T.id),W=(0,o.P)(C,c.T.isActive,D),$=(0,o.P)(C,c.T.isSelected,O),z=(0,o.P)(C,c.T.itemProps),K=r.useRef(null),L=null!=H&&F?`${H}-${D}`:void 0,X=$&&q;(0,a.g)(()=>{if(!(F&&(g||null!=R)))return;let e=C.state.listRef.current;return e[D]=K.current,()=>{delete e[D]}},[F,g,D,R,C]),(0,a.g)(()=>{if(!F||M)return;let e=C.state.valuesRef.current;return e[D]=O,()=>{delete e[D]}},[F,M,D,O,C]),(0,a.g)(()=>{if(!F||M)return;let e=C.state.selectedValue,t=Array.isArray(e)?e[e.length-1]:e;(0,v.tl)(O,t,V)&&C.set("selectedIndex",D)},[F,M,C,D,O,V]);let{getButtonProps:N,buttonRef:B}=(0,p.s)({disabled:Q,focusableWhenDisabled:!0,native:b,composite:!0});function G(e){function t(){C.state.handleSelection(e,O)}C.state.submitOnItemClick?(l.flushSync(t),C.state.requestSubmit()):t()}let Z=(0,s.o)("div",t,{ref:[B,n,k.ref,K],state:{disabled:Q,selected:X,highlighted:W},props:[z,{id:L,role:A?"gridcell":"option","aria-selected":q?X:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(C.state.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){Q||j||G(e.nativeEvent)},onMouseUp(e){let t=C.state.pointerDownItemRef.current===e.currentTarget;C.state.pointerDownItemRef.current=null,Q||j||0!==e.button||t||!W||G(e.nativeEvent)}},I,N]}),_=r.useMemo(()=>({selected:X,textRef:E}),[X,E]);return(0,h.jsx)(d.s.Provider,{value:_,children:Z})}function m(e){let{componentProps:t,forwardedRef:n}=e,r=(0,i.Ee)(),l=(0,o.P)(r,c.T.isItemEqualToValue),{flatFilteredItems:a}=(0,i.Dc)(),u=(0,v.Vz)(a,t.value??null,l);return(0,h.jsx)(g,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:u})}let y=r.memo(r.forwardRef(function(e,t){let n=(0,i.Ee)(),r=(0,o.P)(n,c.T.virtualized);return r&&null==e.index?(0,h.jsx)(m,{componentProps:e,forwardedRef:t}):(0,h.jsx)(g,{componentProps:e,forwardedRef:t,virtualized:r,indexFromFilter:void 0})}))},58565:(e,t,n)=>{n.d(t,{V:()=>m});var r=n(12115),l=n(30271),o=n(65440),a=n(69938),i=n(27540),u=n(27091),s=n(12991),d=n(97378),c=n(41900),p=n(72924),f=n(7049),v=n(76175),h=n(84052);let g={...c.G,...h.qV},m=r.forwardRef(function(e,t){let{render:n,className:r,disabled:c=!1,nativeButton:h=!0,keepMounted:m=!1,style:y,...P}=e,{disabled:x}=(0,s.V$)(),O=(0,o.Ee)(),R=(0,l.P)(O,i.T.selectionMode),T=(0,l.P)(O,i.T.disabled),b=(0,l.P)(O,i.T.readOnly),I=(0,l.P)(O,i.T.open),E=(0,l.P)(O,i.T.selectedValue),k=(0,l.P)(O,i.T.hasSelectionChips),C=(0,o.dc)(),A=!1;A="none"===R?""!==C:"single"===R?null!=E:k;let M=x||T||c,{buttonRef:S,getButtonProps:w}=(0,u.s)({native:h,disabled:M}),{mounted:j,transitionStatus:V,setMounted:Q}=(0,d.$)(A),q={disabled:M,visible:A,open:I,transitionStatus:V};(0,p.v)({open:A,ref:O.state.clearRef,onComplete(){A||Q(!1)}});let D=(0,a.o)("button",e,{state:q,ref:[t,S,O.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(e){e.preventDefault()},onClick(e){if(M||b)return;let t=O.state.keyboardActiveRef.current?v.QJ:v.Wn;O.state.setInputValue("",(0,f.d)(v.R0,e.nativeEvent)),"none"!==R?(O.state.setSelectedValue(Array.isArray(E)?[]:null,(0,f.d)(v.R0,e.nativeEvent)),O.state.setIndices({activeIndex:null,selectedIndex:null,type:t})):O.state.setIndices({activeIndex:null,type:t}),O.state.inputRef.current?.focus()}},P,w],stateAttributesMapping:g});return m||j?D:null})},58777:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]])},62700:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]])},63205:(e,t,n)=>{n.d(t,{$:()=>u});var r=n(12115),l=n(69938),o=n(65440),a=n(97827),i=n(64951);let u=r.forwardRef(function(e,t){let n,u,{render:s,className:d,style:c,children:p,...f}=e,{filteredItems:v}=(0,o.Dc)(),h=(0,o.Ee)(),g=(n=(0,i.Z)(),u=r.useRef(null),r.useEffect(()=>{if(a.s4)return;let e=u.current;if(null==e)return;let t=function(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;""!==e.nodeValue&&(n=e)}return n}(e);if(null==t)return;let r=t.data,l=`${r}\u2060`;return t.nodeValue=l,n.start(200,()=>{t.nodeValue===l&&(t.nodeValue=r)}),()=>{n.clear(),t.nodeValue===l&&(t.nodeValue=r)}},[u,n]),u),m=0===v.length?p:null;return(0,l.o)("div",e,{ref:[t,h.state.emptyRef,g],props:[{children:m,role:"status","aria-live":"polite","aria-atomic":!0},f]})})},65440:(e,t,n)=>{n.d(t,{Dc:()=>p,Ee:()=>d,Eg:()=>v,Hw:()=>a,KR:()=>s,XD:()=>u,dc:()=>f,kN:()=>i,ui:()=>c,vx:()=>o});var r=n(25803),l=n(12115);let o=l.createContext(void 0),a=l.createContext(void 0),i=l.createContext(void 0),u=l.createContext(!1),s=l.createContext("");function d(){let e=l.useContext(o);if(!e)throw Error((0,r.A)(22));return e}function c(){let e=l.useContext(a);if(!e)throw Error((0,r.A)(23));return e}function p(){let e=l.useContext(i);if(!e)throw Error((0,r.A)(24));return e}function f(){return l.useContext(s)}function v(){return l.useContext(u)}},65610:(e,t,n)=>{n.d(t,{f:()=>o,k:()=>a});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function a(){let e=l.useContext(o);if(!e)throw Error((0,r.A)(46));return e}},66289:(e,t,n)=>{n.d(t,{M:()=>E});var r=n(12115),l=n(30271),o=n(23068),a=n(64951),i=n(81456),u=n(69938),s=n(27091),d=n(65440),c=n(75391),p=n(27540),f=n(12991),v=n(57960),h=n(51464),g=n(17947),m=n(8272),y=n(7049),P=n(76175),x=n(73562),O=n(9569),R=n(3017),T=n(68516),b=n(6276),I=n(90491);let E=r.forwardRef(function(e,t){let n,{render:E,className:k,nativeButton:C=!0,disabled:A=!1,id:M,style:S,...w}=e,{state:j,disabled:V,setTouched:Q,setFocused:q,validationMode:D,validation:F}=(0,f.V$)(),{labelId:H}=(0,v.H)(),W=(0,d.Ee)(),$=(0,l.P)(W,p.T.selectionMode),z=(0,l.P)(W,p.T.disabled),K=(0,l.P)(W,p.T.readOnly),L=(0,l.P)(W,p.T.required),X=(0,l.P)(W,p.T.positionerElement),N=(0,l.P)(W,p.T.listElement),B=(0,l.P)(W,p.T.popupId),G=(0,l.P)(W,p.T.triggerProps),Z=(0,l.P)(W,p.T.inputInsidePopup),_=(0,l.P)(W,p.T.id),Y=(0,l.P)(W,p.T.labelId),U=(0,l.P)(W,p.T.open),J=(0,l.P)(W,p.T.selectedValue),ee=(0,l.P)(W,p.T.activeIndex),et=(0,l.P)(W,p.T.selectedIndex),en=(0,l.P)(W,p.T.hasSelectedValue),er=(0,d.ui)(),el=(0,d.dc)(),eo=(0,a.Z)(),ea=V||z||A,ei=(0,I.$B)(),eu=(0,I.Xb)(W);(0,R.l)({id:Z?M:void 0});let es=Z?M??_:M,ed=(0,T._)(H,Y);U&&Z?n=B??(0,b.xj)(_):U&&(n=N?.id);let ec=r.useRef("");function ep(e){ec.current=e.pointerType}let{reference:ef}=(0,x.l)(er,{enabled:!U&&!K&&!z&&"single"===$,listRef:W.state.labelsRef,activeIndex:ee,selectedIndex:et,onMatch(e){let t=W.state.valuesRef.current[e];void 0!==t&&W.state.setSelectedValue(t,(0,y.d)(P.dv))}}),{reference:ev}=(0,O.k)(er,{enabled:!K&&!z,event:"mousedown"}),{buttonRef:eh,getButtonProps:eg}=(0,s.s)({native:C,disabled:ea}),em={...j,open:U,disabled:ea,popupSide:eu,listEmpty:ei,placeholder:"none"!==$&&!en},ey=(0,o.K)(e=>{W.set("triggerElement",e)});return(0,u.o)("button",e,{ref:[t,eh,ey],state:em,props:[G,ev,ef,{id:es,tabIndex:Z?0:-1,role:Z?"combobox":void 0,"aria-expanded":U,"aria-haspopup":Z?"dialog":"listbox","aria-controls":n,"aria-required":Z&&L||void 0,"aria-labelledby":ed,onPointerDown:ep,onPointerEnter:ep,onFocus(){q(!0),ea||K||eo.start(0,W.state.forceMount)},onBlur(e){(0,h.gR)(X,e.relatedTarget)||(Q(!0),q(!1),"onBlur"===D&&F.commit("none"===$?el:J))},onMouseDown(e){if(ea||K||(Z||er.set("domReferenceElement",e.currentTarget),W.state.forceMount(),"touch"!==ec.current&&(W.state.inputRef.current?.focus(),Z||e.preventDefault()),U))return;let t=(0,i.R)(e.currentTarget);Z&&t.addEventListener("mouseup",function(e){let t=W.state.triggerElement;if(!t)return;let n=(0,h.EW)(e),r=W.state.positionerElement,l=W.state.listElement;(0,h.gR)(t,n)||(0,h.gR)(r,n)||(0,h.gR)(l,n)||(0,m.U)(e,t)||W.state.setOpen(!1,(0,y.d)(P.LO,e))},{once:!0})},onKeyDown(e){K||("ArrowDown"===e.key||"ArrowUp"===e.key)&&((0,g.jo)(e),W.state.setOpen(!0,(0,y.d)(P.Dq,e.nativeEvent)),W.state.inputRef.current?.focus())}},F.getValidationProps(ea,w),eg],stateAttributesMapping:c.d})})},70532:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("square-arrow-out-up-right",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]])},71849:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]])},73321:(e,t,n)=>{var r=n(74645);n.o(r,"useParams")&&n.d(t,{useParams:function(){return r.useParams}}),n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}}),n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}})},75391:(e,t,n)=>{n.d(t,{d:()=>o});var r=n(84052),l=n(95478);let o={...r.jL,...l.dc,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null}},78780:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},79504:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("columns-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]])},81312:(e,t,n)=>{n.d(t,{D:()=>s});var r=n(12115),l=n(47247),o=n(98339),a=n(31139),i=n(39048),u=n(95155);function s(e){let[t,n]=r.useState({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,x:0,y:0})}),s=r.useRef(null),d=r.useRef(null),c=r.useRef(null),p=r.useRef(null),f=r.useRef(!0),v=r.useRef(null),h=(0,l.B)(),g=r.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:c,backdropRef:s,internalBackdropRef:d,positionerRef:p,allowMouseUpTriggerRef:f,initialCursorPointRef:v,rootId:h}),[t,h]);return(0,u.jsx)(o.Y.Provider,{value:g,children:(0,u.jsx)(i.J.Provider,{value:void 0,children:(0,u.jsx)(a.i,{...e})})})}},81499:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])},82208:(e,t,n)=>{n.d(t,{y:()=>x});var r=n(12115),l=n(80120),o=n(87541),a=n(45594),i=n(47650),u=n(98419),s=n(64951),d=n(76175),c=n(34785),p=n(52313),f=n(26713),v=n(69679);let h={...c.ol,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class g extends u.H{constructor(e,t,n){const l=new p.Z;super(function(e,t,n,r=!1){let l={...(0,c.rJ)(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return l.open&&e?.mounted===void 0&&(l.mounted=!0),l.floatingRootContext=(0,c.OB)(t,n,r),l}(e,l,t,n),function(e){return{popupRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),stickIfOpenTimeout:new s.E,triggerElements:e}}(l),h),this.setOpen=(e,t)=>{let n,r=t.reason===d.N7,l=t.reason===d.Ui&&0===t.event.detail,o=!e&&(t.reason===d.jv||null==t.reason),a=(0,f.T1)(t),u=this.select("activeTriggerId");if(e||t.reason!==d.SR||null!=t.trigger||null==u||(t.trigger=this.context.triggerElements.getById(u)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n={open:e,openChangeReason:t.reason};(0,f.i)(n,e,t.trigger,a()),this.update(n)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(v.X3,()=>{this.set("stickIfOpen",!1)}),i.flushSync(s)):s(),l?n="click":o?n="dismiss":t.reason===d.Xn&&(n="focus"),this.set("instantType",n)}}}var m=n(7049),y=n(95155);function P({props:e}){var t;let n,{children:l,open:o,defaultOpen:i=!1,onOpenChange:u,onOpenChangeComplete:s,modal:c=!1,handle:p,triggerId:v,defaultTriggerId:h=null}=e,x=(t={modal:c,open:i,openProp:o,activeTriggerId:h,triggerIdProp:v},n=(0,f.xp)((e,n)=>new g(t,e,n)),r.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n);x.useControlledProp("openProp",o),x.useControlledProp("triggerIdProp",v);let R=x.useState("open"),T=x.useState("mounted"),b=x.useState("payload");x.useContextCallback("onOpenChange",u),x.useContextCallback("onOpenChangeComplete",s),(0,f.xs)(x,R),(0,f.tr)(x);let{forceUnmount:I}=(0,f.l$)(R,x,()=>{x.update({stickIfOpen:!0,openChangeReason:null})});x.useSyncedValues({modal:c}),r.useEffect(()=>{R||x.context.stickIfOpenTimeout.clear()},[x,R]),r.useImperativeHandle(e.actionsRef,()=>({unmount:I,close:()=>x.setOpen(!1,(0,m.d)(d.zJ))}),[I,x]);let E=R||T;return(0,y.jsxs)(a.r.Provider,{value:x,children:[p&&(0,y.jsx)(f.Ae,{handle:p,store:x}),E&&(0,y.jsx)(O,{store:x,modal:c}),"function"==typeof l?l({payload:b}):l]})}function x(e){return(0,a.s)(!0)?(0,y.jsx)(P,{props:e}):(0,y.jsx)(l.P6,{children:(0,y.jsx)(P,{props:e})})}function O({store:e,modal:t}){let n=e.useState("floatingRootContext"),r=(0,o.s)(n,{outsidePressEvent:{mouse:"trap-focus"===t?"sloppy":"intentional",touch:"sloppy"}}),l=r.reference,a=r.floating;return(0,f.i6)(e,{activeTriggerProps:l,inactiveTriggerProps:l,popupProps:a}),null}},89034:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},90491:(e,t,n)=>{n.d(t,{$B:()=>i,L6:()=>d,Xb:()=>a,jr:()=>s,ln:()=>u});var r=n(30271),l=n(65440),o=n(27540);function a(e){let t=(0,r.P)(e,o.T.mounted),n=(0,r.P)(e,o.T.popupSide),l=(0,r.P)(e,o.T.positionerElement);return t&&l?n:null}function i(){return 0===(0,l.Dc)().filteredItems.length}function u(e){return"rtl"===e?["ArrowRight","ArrowLeft"]:["ArrowLeft","ArrowRight"]}function s(e,t){let n=e>=t-1?t-2:e;return n>=0?n:void 0}function d(e,t,n){let r=e.state.listRef.current[t];r&&(e.state.selectionEventRef.current=n,r.click(),e.state.selectionEventRef.current=null)}},91075:(e,t,n)=>{n.d(t,{o:()=>I});var r=n(12115),l=n(30271),o=n(23068),a=n(97827),i=n(15495),u=n(62955),s=n(69938),d=n(65440),c=n(75391),p=n(27540),f=n(12991),v=n(95478),h=n(57960);let g=r.createContext(void 0);var m=n(17947),y=n(44512),P=n(7049),x=n(76175),O=n(30458),R=n(13003),T=n(90491),b=n(95155);let I=r.forwardRef(function(e,t){let{render:n,className:I,disabled:E=!1,id:k,style:C,...A}=e,{state:M,disabled:S,setTouched:w,setFocused:j,validationMode:V,validation:Q}=(0,f.V$)(),{labelId:q}=(0,h.H)(),D=r.useContext(g),F=!!(0,y.O)(!0),H=(0,d.Ee)(),W=(0,d.dc)(),$=(0,O.j)(),z=(0,l.P)(H,p.T.required),K=(0,l.P)(H,p.T.disabled),L=(0,l.P)(H,p.T.readOnly),X=(0,l.P)(H,p.T.name),N=(0,l.P)(H,p.T.form),B=(0,l.P)(H,p.T.selectionMode),G=(0,l.P)(H,p.T.autoHighlight),Z=(0,l.P)(H,p.T.inputProps),_=(0,l.P)(H,p.T.triggerProps),Y=(0,l.P)(H,p.T.open),U=(0,l.P)(H,p.T.mounted),J=(0,l.P)(H,p.T.selectedValue),ee=(0,l.P)(H,p.T.id),et=(0,l.P)(H,p.T.inline),en=(0,l.P)(H,p.T.modal),er=!!G,el=(0,T.Xb)(H),eo=S||K||E,ea=(0,T.$B)(),ei=F||et,eu=(0,u.e)(k??(ei?void 0:ee)),es=F?v.HH:M,[ed,ec]=r.useState(null),ep=r.useRef(!1),ef=r.useRef(null),ev=r.useRef(!1),eh="none"===B&&!F,eg=(0,o.K)(e=>{let t=F||H.state.inline;t&&!H.state.hasInputValue&&H.state.setInputValue("",(0,P.d)(x.dv)),H.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:eh})}),em=F?A:Q.getValidationProps(eo,A);function ey(){H.state.setIndices({activeIndex:null,selectedIndex:null,type:H.state.keyboardActiveRef.current?x.QJ:x.Wn})}function eP(){H.state.keyboardActiveRef.current=!1}let ex={...es,open:Y,disabled:eo,readOnly:L,popupSide:el,listEmpty:ea},eO=(0,s.o)("input",e,{state:ex,ref:[t,H.state.inputRef,eg],props:[Z,_,{value:ed??W,"aria-readonly":L||void 0,"aria-required":z||void 0,"aria-labelledby":q,disabled:eo,readOnly:L,required:"none"===B?z:void 0,form:N,...eh&&X&&{name:X},id:eu,onFocus(){if(j(!0),!et||!ev.current)return;ev.current=!1;let e=ef.current;null!=e&&Object.hasOwn(H.state.valuesRef.current,e)&&H.state.setIndices({activeIndex:e})},onBlur(){w(!0),j(!1);let e=H.state.activeIndex;if(et&&null!==e&&"always"!==G&&(ef.current=e,ev.current=!0,H.state.setIndices({activeIndex:null})),"onBlur"===V){let e="none"===B?W:J;Q.commit(e)}},onCompositionStart(e){a.yA||(ep.current=!0,ec(e.currentTarget.value))},onCompositionEnd(e){ep.current=!1;let t=e.currentTarget.value;ec(null),H.state.setInputValue(t,(0,P.d)(x.pf,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=ep.current||!(!n||"insertReplacementText"===n);function l(e){!L&&!eo&&e&&r&&(H.state.setOpen(!0,(0,P.d)(x.pf,t)),er||ey())}if(ep.current){let n=e.currentTarget.value;ec(n),""!==n||H.state.openOnInputClick||H.state.inputInsidePopup||H.state.setOpen(!1,(0,P.d)(x.qs,t));let r=n.trim(),o=er&&""!==r;l(r),Y&&null!==H.state.activeIndex&&!o&&ey();return}let o=(0,P.d)(x.pf,t);if(H.state.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let a=""===e.currentTarget.value,i=(0,P.d)(x.qs,t);a&&!H.state.inputInsidePopup&&("single"===B&&H.state.setSelectedValue(null,i),H.state.openOnInputClick||H.state.setOpen(!1,i)),l(e.currentTarget.value.trim()),Y&&null!==H.state.activeIndex&&!er&&ey()},onKeyDown(e){if(eo||L||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;H.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r="rtl"===$;if("Home"===e.key){(0,m.jo)(e);let n=i.cn&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if("End"===e.key){(0,m.jo)(e);let l=i.cn&&r?0:t.value.length;t.setSelectionRange(l,l),t.scrollLeft=r?-n:n;return}if(!U&&"Escape"===e.key){let t="multiple"===B&&Array.isArray(J)?0===J.length:null===J,n=(0,P.d)(x.jv,e.nativeEvent);H.state.setInputValue("",n),H.state.setSelectedValue("multiple"===B?[]:null,n),t||H.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(D&&"Backspace"===e.key&&""===t.value&&void 0===D.highlightedChipIndex&&Array.isArray(J)&&J.length>0){let t=D.chipsRef.current.length,n=t>0?t-1:J.length-1,r=J.filter((e,t)=>t!==n);ey(),H.state.setSelectedValue(r,(0,P.d)(x.dv,e.nativeEvent));return}let l=D?.highlightedChipIndex!==void 0,o=function(e){let t;if(!D)return;let{highlightedChipIndex:n}=D,r=D.chipsRef.current.length,[l,o]=(0,T.ln)($);return void 0!==n?e.key===l?(e.preventDefault(),t=n>0?n-1:void 0):e.key===o?(e.preventDefault(),t=n<r-1?n+1:void 0):("Backspace"===e.key||"Delete"===e.key)&&(e.preventDefault(),t=(0,T.jr)(n,J.length),ey()):e.key===l&&(e.currentTarget.selectionStart??0)===0&&J.length>0&&(e.preventDefault(),t=r>0?r-1:void 0),t}(e);if(D?.setHighlightedChipIndex(o),void 0!==o?D?.chipsRef.current[o]?.focus():l&&H.state.inputRef.current?.focus(),229!==e.which&&"Enter"===e.key&&Y){let t=H.state.activeIndex,n=e.nativeEvent;if(null===t){if(et)return;H.state.setOpen(!1,(0,P.d)(x.dv,n));return}(0,m.jo)(e),(0,T.L6)(H,t,n)}},onPointerMove:eP,onPointerDown:eP},em],stateAttributesMapping:c.d}),eR=F?(0,b.jsx)(f.eZ.Provider,{value:f.er,children:eO}):eO;return(0,b.jsxs)(r.Fragment,{children:[Y&&(!ei||en)&&(0,b.jsx)(R.p,{ref:H.state.startDismissRef}),eR]})})},91763:(e,t,n)=>{n.d(t,{U:()=>y});var r=n(12115),l=n(96354),o=n(66652),a=n(80120),i=n(45594),u=n(65610),s=n(53536),d=n(34574),c=n(53976),p=n(76175),f=n(69679),v=n(73070),h=n(62424),g=n(15702),m=n(95155);let y=r.forwardRef(function(e,t){let{render:n,className:y,style:P,anchor:x,positionMethod:O,side:R,align:T,sideOffset:b,alignOffset:I,collisionBoundary:E="clipping-ancestors",collisionPadding:k,arrowPadding:C,sticky:A,disableAnchorTracking:M=!1,collisionAvoidance:S=f.Pe,...w}=e,j=(0,i.s)(),V=(0,d.A)(),Q=(0,a.fI)(),q=j.useState("floatingRootContext"),D=j.useState("mounted"),F=j.useState("open"),H=j.useState("openChangeReason"),W=j.useState("activeTriggerElement"),$=j.useState("modal"),z=j.useState("openMethod"),K=j.useState("positionerElement"),L=j.useState("instantType"),X=j.useState("transitionStatus"),N=j.useState("adaptiveOrigin"),B=r.useRef(null),G=(0,v.V)(K),Z=(0,s.s)({anchor:x,floatingRootContext:q,positionMethod:O,mounted:D,side:R,sideOffset:b,align:T,alignOffset:I,arrowPadding:C,collisionBoundary:E,collisionPadding:k,sticky:A,disableAnchorTracking:M,keepMounted:V,nodeId:Q,collisionAvoidance:S,adaptiveOrigin:N}),_=q.useState("domReferenceElement");(0,o.g)(()=>{let e=B.current;if(_&&(B.current=_),e&&_&&_!==e){j.set("instantType",void 0);let e=new AbortController;return G(()=>{j.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[_,G,j]);let Y=!0===$&&H!==p.N7;(0,g.G)(F&&Y,"touch"===z,K,W);let U=j.useStateSetter("positionerElement"),J={open:F,side:Z.side,align:Z.align,anchorHidden:Z.anchorHidden,instant:L},ee=(0,h.i)(e,J,{styles:Z.positionerStyles,transitionStatus:X,props:w,refs:[t,U],hidden:!D,inert:!F});return(0,m.jsxs)(u.f.Provider,{value:Z,children:[D&&Y&&(0,m.jsx)(c.W,{inert:(0,l.Y)(!F),cutout:W}),(0,m.jsx)(a.$c,{id:Q,children:ee})]})})},92298:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(99537).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},92953:(e,t,n)=>{n.d(t,{i:()=>G});var r=n(12115),l=n(50602),o=n(66652),a=n(95313),i=n(23068),u=n(55218),s=n(2474),d=n(46468),c=n(14187),p=n(2368),f=n(30271),v=n(8994),h=n(6791),g=n(57134),m=n(9569),y=n(87541),P=n(61243),x=n(86058);function O(e,t,n,r,l,o,a,i,u,s=2){let d=(0,x.Kg)(n.current,{event:e,orientation:r,loopFocus:l,rtl:o,cols:s,disabledIndices:a,minIndex:i,maxIndex:u,prevIndex:t>u?i:t,stopEvent:!0});return(0,x.du)(n.current,d)?void 0:d}var R=n(51464),T=n(7049),b=n(76175),I=n(65440),E=n(27540),k=n(72924),C=n(12991),A=n(1272),M=n(10232),S=n(3017),w=n(6276),j=n(15483);let V=new Map,Q=function(e={}){let t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${function e(t){return Array.isArray(t)?t.map(t=>e(t)).join(","):null==t?"":String(t)}(e.locale)}|${JSON.stringify(t)}`,r=V.get(n);if(r)return r;let l=new Intl.Collator(e.locale,t),o={contains(e,t,n){if(!t)return!0;let r=(0,j.yg)(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(0===l.compare(r.slice(e,e+t.length),t))return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=(0,j.yg)(e,n);return 0===l.compare(r.slice(0,t.length),t)},endsWith(e,t,n){if(!t)return!0;let r=(0,j.yg)(e,n),o=t.length;return r.length>=o&&0===l.compare(r.slice(r.length-o),t)}};return V.set(n,o),o};var q=n(97378),D=n(22713),F=n(42240),H=n(26713),W=n(40253),$=n(70035),z=n(62386);let K=Symbol("none"),L={value:K,index:-1};var X=n(30458),N=n(95155);function B(e){let t,{id:n,onOpenChangeComplete:x,defaultSelectedValue:V=null,selectedValue:B,onSelectedValueChange:G,defaultInputValue:Z,inputValue:_,open:Y,defaultOpen:U=!1,selectionMode:J,onItemHighlighted:ee,name:et,form:en,disabled:er=!1,readOnly:el=!1,required:eo=!1,inputRef:ea,grid:ei=!1,items:eu,filteredItems:es,filter:ed,openOnInputClick:ec=!0,autoHighlight:ep=!1,keepHighlight:ef=!1,highlightItemOnHover:ev=!0,loopFocus:eh=!0,itemToStringLabel:eg,itemToStringValue:em,isItemEqualToValue:ey=$.jd,virtualized:eP=!1,inline:ex=!1,fillInputOnItemPress:eO=!0,modal:eR=!1,limit:eT=-1,autoComplete:eb="list",formAutoComplete:eI,locale:eE,submitOnItemClick:ek=!1}=e,{clearErrors:eC}=(0,M.x)(),{setDirty:eA,validityData:eM,setFilled:eS,name:ew,disabled:ej,setTouched:eV,setFocused:eQ,validationMode:eq,validation:eD}=(0,C.V$)(),eF=(0,X.j)(),eH=(0,S.l)({id:n}),eW=Q({locale:eE}),[e$,ez]=r.useState(!1),[eK,eL]=r.useState(null),eX=r.useRef([]),eN=r.useRef([]),eB=r.useRef(null),eG=r.useRef(null),eZ=r.useRef(null),e_=r.useRef(null),eY=r.useRef(null),eU=r.useRef(!0),eJ=r.useRef(!1),e0=r.useRef(null),e1=r.useRef(null),e5=r.useRef(null),e2=r.useRef(L),e9=r.useRef(null),e4=r.useRef([]),e7=r.useRef(null),e6=ej||er,e3=ew??et,e8="multiple"===J,te="single"===J,tt=void 0!==_||void 0!==Z,tn=void 0!==eu,tr=void 0!==es;t="always"===ep?"always":!!ep&&"input-change";let[tl,to]=(0,l.q)({controlled:B,default:e8?V??v.Ml:V,name:"Combobox",state:"selectedValue"}),ta=r.useMemo(()=>null===ed?()=>!0:void 0!==ed?ed:(0,w.I2)(eW,eg),[ed,eW,eg]),ti=(0,c.j)(()=>tt?Z??"":te?(0,j.yg)(tl,eg):"").current,[tu,ts]=(0,l.q)({controlled:_,default:ti,name:"Combobox",state:"inputValue"}),[td,tc]=(0,l.q)({controlled:Y,default:U,name:"Combobox",state:"open"}),tp=(0,j.Li)(eu),tf=eK??String(tu).trim(),tv=te?(0,j.yg)(tl,eg):"",th=te&&!e$&&""!==tf&&tv.length===tf.length&&eW.contains(tv,tf),tg=th?"":tf,tm=tn&&tr&&th,ty=r.useMemo(()=>eu?tp?eu.flatMap(e=>e.items):eu:v.Ml,[eu,tp]),tP=r.useMemo(()=>{if(es&&!tm)return es;if(!eu)return v.Ml;if(tp){let e=[],t=0;for(let n of eu){if(eT>-1&&t>=eT)break;let r=eT>-1?eT-t:1/0,l=""===tg?n.items.slice(0,r):[];if(""!==tg)for(let e of n.items){if(l.length>=r)break;ta(e,tg,eg)&&l.push(e)}if(l.length>0){let r={...n,items:l};e.push(r),t+=l.length}}return e}if(""===tg)return eT>-1?ty.slice(0,eT):ty;let e=[];for(let t of ty){if(eT>-1&&e.length>=eT)break;ta(t,tg,eg)&&e.push(t)}return e},[es,tm,eu,tp,tg,eT,ta,eg,ty]),tx=r.useMemo(()=>tp?tP.flatMap(e=>e.items):tP,[tP,tp]),tO=(0,c.j)(()=>{let e=null;return ex&&td&&tn&&"none"!==J&&(e=(0,$.Gu)(tx,tl,ey,e8)),new p.i({id:eH,labelId:void 0,selectedValue:tl,open:td,items:eu,selectionMode:J,listRef:eX,labelsRef:eN,popupRef:eB,emptyRef:eY,inputRef:eG,startDismissRef:eZ,endDismissRef:e_,keyboardActiveRef:eU,chipsContainerRef:e0,clearRef:e1,valuesRef:e4,pointerDownItemRef:e7,selectionEventRef:e5,name:e3,form:en,disabled:e6,readOnly:el,required:eo,grid:ei,virtualized:eP,openOnInputClick:ec,itemToStringLabel:eg,isItemEqualToValue:ey,modal:eR,autoHighlight:t,submitOnItemClick:ek,hasInputValue:tt,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:ex,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemProps:v.t0,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:"none"===J,onOpenChangeComplete:v.tE,setOpen:v.tE,setInputValue:v.tE,setSelectedValue:v.tE,setIndices:v.tE,handleSelection:v.tE,forceMount:v.tE,requestSubmit:v.tE})}).current,tR="none"===J?tu:tl,tT=r.useMemo(()=>"none"===J?tR:Array.isArray(tl)?tl.map(e=>(0,j.T)(e,em)):(0,j.T)(tl,em),[tR,em,J,tl]),tb=(0,i.K)(ee),tI=(0,i.K)(x),tE=(0,f.P)(tO,E.T.activeIndex),tk=(0,f.P)(tO,E.T.selectedIndex),tC=(0,f.P)(tO,E.T.positionerElement),tA=(0,f.P)(tO,E.T.listElement),tM=(0,f.P)(tO,E.T.triggerElement),tS=(0,f.P)(tO,E.T.inputElement),tw=(0,f.P)(tO,E.T.inputGroupElement),tj=(0,f.P)(tO,E.T.inline),tV=(0,f.P)(tO,E.T.inputInsidePopup),tQ=(0,f.P)(tO,E.T.inputOwnsFormValue),tq=(0,s.u)(tM),{mounted:tD,setMounted:tF,transitionStatus:tH}=(0,q.$)(td),{openMethod:tW,triggerProps:t$}=(0,D.G)(td),tz=(0,i.K)(()=>tT);(0,A.I)(tV?tq:eG,eH,tR,tz,!e6,et);let tK=(0,i.K)(()=>{eu?eN.current=tx.map(e=>(0,j.yg)(e,eg)):tO.set("forceMounted",!0)}),tL=(0,i.K)((e,t,n)=>{if(-1===t){if(e2.current===L)return;e2.current=L}else e2.current={value:e,index:t};tb(e,(0,T.M)(n,void 0,{index:t}))}),tX=(0,i.K)(e=>{tO.update(e);let t=e.activeIndex;if(void 0===t)return;let n=e.type||b.dv;null===t?tL(void 0,-1,n):tL(e4.current[t],t,n)}),tN=(0,i.K)((n,r)=>{if(eJ.current=r.reason===b.qs,e.onInputValueChange?.(n,r),!r.isCanceled){if(r.reason===b.pf){td&&null!==eK&&eL(null);let e=r.event,l=e.inputType;if("compositionend"===e.type||null!=l&&""!==l&&"insertReplacementText"!==l){let e=""!==n.trim();e&&ez(!0),e9.current={hasQuery:e};let r=tO.state.listElement;if(!tO.state.virtualized&&r){let e=eB.current;for(let t of(0,h.v9)(r.firstElementChild??r)){if(!(0,h.sb)(t)||(e?!(0,R.gR)(e,t):"dialog"===t.getAttribute("role")))break;if(function(e,t=!1){let{overflowY:n}=(0,h.L9)(e);return("auto"===n||"scroll"===n)&&(t?e.clientHeight>0:e.scrollHeight>e.clientHeight)}(t)){t.scrollTop=0;break}}}e&&t&&null==tO.state.activeIndex&&(td||tj)&&tO.set("activeIndex",0)}}else r.reason===b.qs&&""===n&&tO.state.inputInsidePopup&&(e9.current={hasQuery:!1,selection:!0});ts(n)}}),tB=(0,i.K)((t,n)=>{if(td!==t&&(n.reason===b.jv&&tn&&0===tx.length&&!eY.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&tV&&!tj&&null!==eK&&(ez(!1),eL(null),""!==tu&&n.reason!==b.pf&&tN("",(0,T.d)(b.qs,n.event))),!t&&e$&&(te?(tj||eL(tf),""===tf&&ez(!1)):e8&&(tj||eL(tf),tV&&tX({activeIndex:null}),(!tV||tj)&&tN("",(0,T.d)(b.qs,n.event)))),tc(t),!t&&tV&&(n.reason===b.Xn||n.reason===b.Np))&&(eV(!0),eQ(!1),"onBlur"===eq))){let e="none"===J?tu:tl;eD.commit(e)}}),tG=(0,i.K)((e,t)=>{G?.(e,t),t.isCanceled||(to(e),("none"===J&&eB.current&&eO||te&&!tO.state.inputInsidePopup)&&tN((0,j.yg)(e,eg),(0,T.d)(t.reason,t.event)))}),tZ=(0,i.K)((e,t)=>{let n=(0,R.EW)(e),r=e5.current??e;e5.current=null;let l=(0,T.d)(b.Bo,r),o=n?.closest("a")?.getAttribute("href");if(o){o.startsWith("#")&&tB(!1,l);return}if(e8){let e=Array.isArray(tl)?tl:[];if(tG((0,$.kJ)(e,t,ey)?(0,$.Ai)(e,t,ey):[...e,t],l),l.isCanceled||!(eG.current&&""!==eG.current.value.trim()))return;tO.state.inputInsidePopup?tN("",(0,T.d)(b.qs,l.event)):tB(!1,l)}else{if(tG(t,l),l.isCanceled)return;tB(!1,l)}}),t_=(0,i.K)(()=>{let e=eD.inputRef.current?.form??tO.state.inputElement?.form;e&&"function"==typeof e.requestSubmit&&e.requestSubmit()}),tY=(0,i.K)(()=>{if(tF(!1),tI?.(!1),ez(!1),eL(null),"none"===J?tX({activeIndex:null,selectedIndex:null}):tX({activeIndex:null}),e8&&eG.current&&""!==eG.current.value&&!eJ.current&&tN("",(0,T.d)(b.qs)),te)if(tO.state.inputInsidePopup)eG.current&&""!==eG.current.value&&tN("",(0,T.d)(b.qs));else{let e=(0,j.yg)(tl,eg);if(eG.current&&eG.current.value!==e){let t=""===e?b.qs:b.dv;tN(e,(0,T.d)(t))}}}),tU=r.useMemo(()=>tj&&tC?{current:tC.closest('[role="dialog"]')}:eB,[tj,tC]);function tJ(){let e=(0,j.yg)(tl,eg);tu!==e&&tN(e,(0,T.d)(b.dv))}(0,k.v)({enabled:!e.actionsRef,open:td,ref:tU,onComplete(){td||tY()}}),r.useImperativeHandle(e.actionsRef,()=>({unmount:tY}),[tY]),(0,o.g)(function(){if(td||(e7.current=null,"none"===J))return;let e=tn?ty:e4.current;tX({selectedIndex:(0,$.Gu)(e,tl,ey,e8)})},[td,tl,J,e8,tn,ty,ey,tX]),(0,o.g)(()=>{eu&&(e4.current=tx,eX.current.length=tx.length)},[eu,tx]),(0,o.g)(()=>{let e=e9.current;if(e){let n=td||tj||tO.state.positionerElement?.hidden===!1;if(e.hasQuery)t&&n&&tO.set("activeIndex",0),e9.current=null;else if(""===String(tu).trim()&&(e9.current=null,n)){let n=e.selection;"always"!==t||n||"none"!==tO.state.selectionMode||tO.set("activeIndex",0),queueMicrotask(()=>{if(!tO.state.open&&!tO.state.inline||eG.current&&""!==eG.current.value.trim())return;let e=tO.state.selectedValue,r="multiple"===tO.state.selectionMode,l=r&&Array.isArray(e)?e[e.length-1]:e,o="none"!==tO.state.selectionMode&&null!=l;if(o||n){let t=tn||tr?tx:e4.current;tO.set("activeIndex",o?(0,$.Gu)(t,e,tO.state.isItemEqualToValue,r):null)}else"always"===t&&tO.set("activeIndex",0)})}}if(!td&&!tj)return;let n=tn||tr?tx:e4.current,r=tO.state.activeIndex;if(null==r)return"always"===t&&n.length>0?void tO.set("activeIndex",0):void tL(void 0,-1,b.dv);if(r>=n.length){tL(void 0,-1,b.dv),tO.set("activeIndex",null);return}let l=n[r],o=e2.current.value,a=o!==K&&(0,$.tl)(l,o,tO.state.isItemEqualToValue);e2.current.index===r&&a||tL(l,r,b.dv)},[tE,t,tL,tr,tn,tx,tj,td,tO,tu]),(0,o.g)(()=>{"none"===J?eS(""!==String(tu)):eS(e8?Array.isArray(tl)&&tl.length>0:null!=tl)},[eS,J,tu,tl,e8]),r.useEffect(()=>{tn&&t&&0===tx.length&&tX({activeIndex:null})},[tn,t,tx.length,tX]),(0,F.x)(tf,()=>{td&&""!==tf&&tf!==String(ti)&&ez(!0)}),(0,F.x)(tl,()=>{if("none"!==J){let e;eC(e3),eA((e=eM.initialValue,Array.isArray(tl)&&Array.isArray(e)?!(0,z.B)(tl,e,(e,t)=>(0,$.tl)(e,t,ey)):tl!==e)),eD.change(tl),!te||tt||tV||tJ()}}),(0,F.x)(tu,()=>{"none"===J&&(eC(e3),eA(tu!==eM.initialValue),eD.change(tu))}),(0,F.x)(eu,()=>{!te||tt||tV||e$||tJ()});let t0=(0,g.P)({open:!!tj||td,onOpenChange:tB,elements:{reference:tV?tM:tS,floating:tC}}),t1=ei?"grid":"listbox",t5=td||tj,t2=t5?"true":"false",t9=r.useMemo(()=>{let e=tS?.tagName==="INPUT",t=null==tS||e,n=t||t5,r=t?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return n&&(r.role="combobox",r["aria-expanded"]=t2,r["aria-haspopup"]=t1,r["aria-controls"]=t5?tA?.id:void 0,r["aria-autocomplete"]=eb),{reference:r,floating:{role:"presentation"}}},[tS,t5,t2,t1,tA?.id,eb]),t4=(0,m.k)(t0,{enabled:!el&&!e6&&ec,event:"mousedown-only",toggle:!1,touchOpenDelay:100*!tV,reason:b._J}),t7=(0,y.s)(t0,{enabled:!el&&!e6&&!tj,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:!!tj||void 0,outsidePress(e){let t=(0,R.EW)(e);return!(0,R.gR)(tM,t)&&!(0,R.gR)(e1.current,t)&&!(0,R.gR)(e0.current,t)&&!(0,R.gR)(tw,t)}}),t6=(0,P.C)(t0,{enabled:!el&&!e6,id:eH,listRef:eX,activeIndex:tE,selectedIndex:tk,virtual:!0,loopFocus:eh,allowEscape:eh&&!t,focusItemOnOpen:!e$&&("none"!==J||!!t)&&"auto",focusItemOnHover:ev,resetOnPointerLeave:!ef,orientation:ei?"horizontal":void 0,rtl:"rtl"===eF,disabledIndices:v.Ml,grid:ei?O:void 0,onNavigate(e,t){(t||td)&&"ending"!==tH&&(t?tX({activeIndex:e,type:eU.current?b.QJ:b.Wn}):tX({activeIndex:e}))}}),t3=r.useMemo(()=>(0,W.v6)(t6.reference,{onKeyDown(e){ei&&null==tO.state.activeIndex&&("ArrowLeft"===e.key||"ArrowRight"===e.key)&&e.preventBaseUIHandler()}},t7.reference,t4.reference,t9.reference),[t6.reference,t7.reference,t4.reference,t9.reference,ei,tO]),t8=r.useMemo(()=>(0,W.v6)(H.Ls,t7.floating),[t7.floating]),ne=r.useMemo(()=>(0,W.v6)(t6.floating,t9.floating),[t6.floating,t9.floating]),nt=r.useMemo(()=>{let e=t6.item;return e?{...e,onFocus:void 0}:v.t0},[t6.item]);(0,a.j)(()=>{tO.update({inline:ex,popupProps:t8,listProps:ne,inputProps:t3,triggerProps:t$,itemProps:nt,setOpen:tB,setInputValue:tN,setSelectedValue:tG,setIndices:tX,handleSelection:tZ,forceMount:tK,requestSubmit:t_,onOpenChangeComplete:tI})}),(0,o.g)(()=>{tO.update({id:eH,selectedValue:tl,open:td,mounted:tD,transitionStatus:tH,items:eu,inline:ex,popupProps:t8,listProps:ne,inputProps:t3,triggerProps:t$,openMethod:tW,itemProps:nt,selectionMode:J,name:e3,form:en,disabled:e6,readOnly:el,required:eo,grid:ei,virtualized:eP,openOnInputClick:ec,itemToStringLabel:eg,modal:eR,autoHighlight:t,isItemEqualToValue:ey,submitOnItemClick:ek,hasInputValue:tt,inputOwnsFormValue:"none"===J&&(ex||!tO.state.inputInsidePopup)})},[tO,eH,tl,td,tD,tH,eu,t8,ne,t3,nt,tW,t$,J,e3,e6,el,eo,ei,eP,ec,eg,eR,ey,ek,tt,ex,t,en]);let nn=(0,u.a)(ea,eD.inputRef),nr=r.useMemo(()=>({query:tf,hasItems:tn,filteredItems:tP,flatFilteredItems:tx}),[tf,tn,tP,tx]),nl=r.useMemo(()=>Array.isArray(tR)?"":(0,j.T)(tR,em),[tR,em]),no=e8&&Array.isArray(tl)&&tl.length>0,na=e8||"none"===J&&tQ?void 0:e3,ni=r.useMemo(()=>e8&&Array.isArray(tl)&&e3?tl.map(e=>{let t=(0,j.T)(e,em);return(0,N.jsx)("input",{type:"hidden",form:en,name:e3,value:t,disabled:e6},t)}):null,[e8,tl,en,e3,em,e6]),nu=(0,N.jsxs)(r.Fragment,{children:[e.children,(0,N.jsx)("input",{...eD.getValidationProps(e6,{onFocus(){tV?tM?.focus():(eG.current||tM)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||e6||el)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=(0,T.d)(b.dv,e.nativeEvent),l=()=>e4.current.findIndex(e=>(0,j.T)(e,em).toLowerCase()===n||(0,j.yg)(e,eg).toLowerCase()===n);te&&(tK(),eu&&-1===l()&&tO.set("forceMounted",!0)),queueMicrotask(function(){if(e8)return;if("none"===J)return void tN(t,r);let e=l();-1===e&&(e=e4.current.findIndex((e,t)=>{let r=eN.current[t];return null!=r&&r.toLowerCase()===n}));let o=-1===e?void 0:e4.current[e];null!=o&&tG?.(o,r)})}}),id:eH&&null==na?`${eH}-hidden-input`:void 0,form:en,name:na,autoComplete:eI,disabled:e6,required:eo&&!no,readOnly:el,value:nl,ref:nn,style:na?d.a:d.Q,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ni]});return(0,N.jsx)(I.vx.Provider,{value:tO,children:(0,N.jsx)(I.Hw.Provider,{value:t0,children:(0,N.jsx)(I.XD.Provider,{value:tn,children:(0,N.jsx)(I.kN.Provider,{value:nr,children:(0,N.jsx)(I.KR.Provider,{value:tu,children:nu})})})})})}function G(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:l,autoComplete:o,...a}=e;return(0,N.jsx)(B,{...a,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:l,formAutoComplete:o})}},93313:(e,t,n)=>{n.d(t,{I:()=>O});var r=n(12115),l=n(30271),o=n(66652),a=n(2052),i=n(69938),u=n(65440),s=n(27540),d=n(84052),c=n(44512),p=n(72924),f=n(41900),v=n(51464),h=n(36050),g=n(13003),m=n(6276),y=n(90491),P=n(95155);let x={...d.GW,...f.G},O=r.forwardRef(function(e,t){let{render:n,className:d,style:f,initialFocus:O,finalFocus:R,...T}=e,b=(0,u.Ee)(),I=(0,c.O)(),E=(0,u.ui)(),k=(0,l.P)(b,s.T.mounted),C=(0,l.P)(b,s.T.open),A=(0,l.P)(b,s.T.openMethod),M=(0,l.P)(b,s.T.popupProps),S=(0,l.P)(b,s.T.transitionStatus),w=(0,l.P)(b,s.T.inputInsidePopup),j=(0,l.P)(b,s.T.inputElement),V=(0,l.P)(b,s.T.modal),Q=(0,l.P)(b,s.T.id),q=(0,y.$B)(),D=T.id??(w?(0,m.xj)(Q):void 0);(0,o.g)(()=>(b.set("popupId",b.state.popupRef.current?.id||D),()=>{b.set("popupId",void 0)}),[b,D]),(0,p.v)({open:C,ref:b.state.popupRef,onComplete(){C&&b.state.onOpenChangeComplete(!0)}});let F={open:C,side:I.side,align:I.align,anchorHidden:I.anchorHidden,transitionStatus:S,empty:q},H=(0,i.o)("div",e,{state:F,ref:[t,b.state.popupRef],props:[M,{id:D,role:w?"dialog":"presentation",onFocus(e){let t=(0,v.EW)(e.nativeEvent);"touch"!==A&&((0,v.gR)(b.state.listElement,t)||t===e.currentTarget)&&b.state.inputRef.current?.focus()}},(0,h.d)(S),T],stateAttributesMapping:x}),W=!!w&&(e=>"touch"===e?b.state.popupRef.current:j),$=!w||V;return(0,P.jsx)(a.s,{context:E,disabled:!k,modal:$,openInteractionType:A,initialFocus:void 0===O?W:O,returnFocus:null!=R?R:!!w&&void 0,getInsideElements:()=>[b.state.startDismissRef.current,b.state.endDismissRef.current],children:(0,P.jsxs)(r.Fragment,{children:[H,$&&(0,P.jsx)(g.p,{ref:b.state.endDismissRef})]})})})},98770:(e,t,n)=>{n.d(t,{R:()=>g});var r=n(12115),l=n(14718),o=n(81456),a=n(64951),i=n(17947),u=n(51464),s=n(98339),d=n(39048),c=n(69938),p=n(7049),f=n(84052),v=n(76175),h=n(59236);let g=r.forwardRef(function(e,t){let{render:n,className:g,style:m,...y}=e,{setAnchor:P,actionsRef:x,internalBackdropRef:O,backdropRef:R,positionerRef:T,allowMouseUpTriggerRef:b,initialCursorPointRef:I,rootId:E}=(0,s.v)(!1),{store:k}=(0,d.Y)(!1),C=k.useState("open"),A=k.useState("disabled"),M=r.useRef(null),S=r.useRef(null),w=(0,a.Z)(),j=(0,a.Z)(),V=r.useRef(!1),Q=r.useRef(null);function q(e,t,n){let r=n.type.startsWith("touch");I.current={x:e,y:t},P({getBoundingClientRect:()=>DOMRect.fromRect({width:10*!!r,height:10*!!r,x:e,y:t})}),V.current=!1,x.current?.setOpen(!0,(0,p.d)(v.Ui,n)),j.start(500,()=>{V.current=!0})}function D(){w.clear(),S.current=null}return r.useEffect(()=>()=>{Q.current?.abort()},[]),r.useEffect(()=>{let e=(0,o.R)(M.current);return(0,l.q)(e,"contextmenu",function(e){if(A)return;let t=(0,u.EW)(e);((0,u.gR)(M.current,t)||(0,u.gR)(O.current,t)||(0,u.gR)(R.current,t))&&e.preventDefault()})},[R,A,O]),(0,c.o)("div",e,{state:{open:C},ref:[M,t],props:[{onContextMenu:function(e){if(A)return;b.current=!0,(0,i.jo)(e),q(e.clientX,e.clientY,e.nativeEvent);let t=(0,o.R)(M.current);Q.current?.abort();let n=new AbortController;Q.current=n,t.addEventListener("mouseup",e=>{if(b.current=!1,!V.current)return;j.clear(),V.current=!1;let t=(0,u.EW)(e);(0,u.gR)(T.current,t)||E&&t&&(0,h.Q)(t)===E||x.current?.setOpen(!1,(0,p.d)(v.LO,e))},{once:!0,signal:n.signal})},onTouchStart:function(e){if(A||(b.current=!1,1!==e.touches.length))return void D();e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};S.current=n,w.start(500,()=>{q(n.x,n.y,e.nativeEvent)})},onTouchMove:function(e){if(1!==e.touches.length)return void D();if(w.isStarted()&&S.current){let t=e.touches[0],n=Math.abs(t.clientX-S.current.x),r=Math.abs(t.clientY-S.current.y);(n>10||r>10)&&D()}},onTouchEnd:D,onTouchCancel:D,style:{WebkitTouchCallout:"none"}},y],stateAttributesMapping:f.jL})})},99447:(e,t,n)=>{n.d(t,{i:()=>u});var r=n(12115),l=n(34934),o=n(45594),a=n(34574),i=n(95155);let u=r.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return(0,o.s)().useState("mounted")||n?(0,i.jsx)(a.n.Provider,{value:n,children:(0,i.jsx)(l.XF,{ref:t,...r})}):null})}}]);
|