diff --git a/assets/index-BIG7Mclk.js b/assets/index-BIG7Mclk.js deleted file mode 100644 index 84e3c88..0000000 --- a/assets/index-BIG7Mclk.js +++ /dev/null @@ -1,5 +0,0 @@ -import{r as n,j as e,R as F}from"./react-DmpIMwDM.js";import{c as ft}from"./react-dom-tIxIBQuZ.js";import{c as pt}from"./zustand-B1IM3DrU.js";import{i as xt}from"./sql.js-lzln2bbd.js";import{F as ae}from"./file-saver-DhbZvGod.js";import{c as ht}from"./clsx-B-dksMZM.js";import{t as gt}from"./tailwind-merge-BkWO730n.js";import{S as bt,c as re,I as yt,d as oe,e as ne,f as jt,g as le,V as wt,L as ie,h as ce,i as Nt,j as vt,k as de,l as Ct,G as Rt,m as St,n as ue,o as Et,p as Tt,q as Dt,r as me,s as Lt,t as Pt,u as fe,v as kt,w as Ft,x as pe,y as Ot,z as xe,A as he,B as ge,E as be,F as At,H as ye,J as je,K as we,M as Ne,N as ve,Q as Ce,U as It,W as Mt}from"./@radix-ui-Dtk-Z1Mr.js";import{c as _}from"./class-variance-authority-Bb4qSo10.js";import{C as $t,a as Qt,b as Re,c as Ht,d as qt,T as Bt,K as zt,e as Ut,f as Vt,g as _t,L as Kt,D as Gt,P as Wt,h as Jt,i as Yt,M as Zt,j as Xt,k as es,S as ts,l as ss,m as as,G as rs}from"./lucide-react-UOeYhQAl.js";import{f as os,a as M}from"./date-fns-fqmN70Xj.js";import{u as ns}from"./react-dropzone-D-IBOhIS.js";import{J as B,T as ls}from"./sonner-BJG0sXho.js";import{D as C}from"./vaul-Bkmv171v.js";import"./attr-accept-BWI1aNlo.js";import"./scheduler-CzFDRTuY.js";import"./use-sync-external-store-ByYeed7R.js";import"./aria-hidden-DQ5UC2Eg.js";import"./react-remove-scroll-BOyN_WUU.js";import"./tslib-CuZy2iRz.js";import"./react-remove-scroll-bar-DZjhPxUV.js";import"./react-style-singleton-CpxBwIWS.js";import"./get-nonce-C-Z93AgS.js";import"./use-sidecar-D8_hMcUG.js";import"./use-callback-ref-DRzK4jWO.js";import"./@floating-ui-DGkE6due.js";import"./prop-types-psm7UO16.js";import"./file-selector-CBHVlu32.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const i of l.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function a(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=a(o);fetch(o.href,l)}})();const is="/sql.wasm",cs=async t=>{try{const[s,a]=await Promise.all([t.arrayBuffer(),xt({locateFile:()=>is})]);return new a.Database(new Uint8Array(s))}catch(s){throw console.error("Failed to load database:",s),s}},K=t=>{var s;try{return((s=t.exec("SELECT name FROM sqlite_master WHERE type='table';")[0])==null?void 0:s.values.flat())||[]}catch(a){return console.error("Failed to get table names:",a),[]}},ds=async(t,s)=>{try{const[a,r]=t.exec(` - PRAGMA table_info("${s}"); - PRAGMA foreign_key_list("${s}"); - `),o=a.values.reduce((l,i)=>(l[i[1]]={type:i[2],isPrimaryKey:i[5]===1,isForeignKey:!1},l),{});return r==null||r.values.forEach(l=>{const i=l[3];o[i]&&(o[i].isForeignKey=!0)}),o}catch(a){throw console.error(`Failed to get schema for table "${s}":`,a),a}},z=t=>{if(t.length===0)return{data:[],columns:[]};const{columns:s,values:a}=t[0];return{data:a.map(o=>Object.fromEntries(s.map((l,i)=>[l,o[i]]))),columns:s}},us=t=>{try{const s=t.export(),a=new Blob([s],{type:"application/x-sqlite3"});ae.saveAs(a,"database.sqlite")}catch(s){throw console.error("Failed to export database:",s),s}},ms=(t,s)=>{const a=t.map(o=>`"${o}"`).join(","),r=s.map(o=>t.map(l=>`"${o[l]??""}"`).join(","));return[a,...r].join(` -`)},G=(t,s,a)=>{try{const r=s.exec(t);if(r.length===0)throw new Error(`Query "${t}" returned no results.`);const{data:o,columns:l}=z(r),i=ms(l,o),c=new Blob([i],{type:"text/csv;charset=utf-8;"});ae.saveAs(c,`${a}.csv`)}catch(r){throw console.error(`Failed to get CSV for query "${t}":`,r),r}},fs=(t,s)=>{const r=K(t)[s],o=`SELECT * FROM "${r}"`;G(o,t,r)},ps=t=>{K(t).forEach(s=>{const a=`SELECT * FROM "${s}"`;G(a,t,s)})},xs=(t,s)=>{G(s,t,"custom_query")},R=pt((t,s)=>({db:null,isLoading:!1,queryError:null,tables:[],selectedTable:"0",tableSchemas:{},rowPerPageOrAuto:"auto",isCustomQuery:!1,loadDatabase:async a=>{t({isLoading:!0,queryError:null});try{const r=await cs(a),o=K(r),l=await Promise.all(o.map(async u=>{const m=r.exec(`SELECT COUNT(*) FROM "${u}"`),x=parseInt(m[0].values[0][0],10),f=await ds(r,u);return{name:u,count:x,schema:f}})),i=l.map(({name:u,count:m})=>({name:u,count:m})),c=l.reduce((u,{name:m,schema:x})=>(u[m]=x,u),{});t({db:r,tables:i,tableSchemas:c,isLoading:!1})}catch(r){console.error("Failed to load database:",r),t({isLoading:!1,queryError:"Failed to load database"})}},query:a=>{const{db:r}=s();return r?r.exec(a):(console.warn("Database is not loaded."),[])},setQueryError:a=>t({queryError:a}),setTables:a=>t({tables:a}),setSelectedTable:a=>t({selectedTable:a}),setRowPerPageOrAuto:a=>t({rowPerPageOrAuto:a}),customQuery:"",setIsCustomQuery:a=>t({isCustomQuery:a}),setCustomQuery:a=>t({customQuery:a}),queryHestory:[],unShiftToQueryHestory:a=>t(r=>({queryHestory:[a,...r.queryHestory]})),expandPage:!1,setExpandPage:a=>t({expandPage:a}),dateFormatValue:"formatDateFormatted",setDateFormatValue:a=>t({dateFormatValue:a}),filters:{},setFilters:a=>t({filters:a}),appendToFilters:(a,r)=>t(o=>({filters:{...o.filters,[a]:r}})),totalRows:0,setTotalRows:a=>t({totalRows:a})}));function hs(t,s,a,r){const{db:o,setQueryError:l,setIsCustomQuery:i,query:c,unShiftToQueryHestory:u,customQuery:m,setCustomQuery:x,filters:f,totalRows:w,setTotalRows:p}=R(),[h,j]=n.useState([]),[P,b]=n.useState([]),[S,N]=n.useState(!0);n.useEffect(()=>{o&&t&&!r&&(N(!0),(async()=>{try{const g=`PRAGMA table_info("${t}");`,L=c(g)[0].values.map(v=>({name:v[1],type:v[2]})).map(v=>v.type.toUpperCase()==="BLOB"?`hex(${v.name}) as ${v.name}`:v.name).join(", ");let O=`SELECT COUNT(*) as count FROM "${t}"`;if(Object.keys(f).length>0){const v=Object.entries(f).map(([H,q])=>`LOWER(${H}) LIKE LOWER('%${q}%')`).join(" AND ");O=`SELECT COUNT(*) as count FROM "${t}" WHERE ${v}`}const Q=c(O)[0].values[0][0];p(Q);let T=`SELECT ${L} FROM "${t}" LIMIT ${s} OFFSET ${a};`;if(Object.keys(f).length>0){const v=Object.entries(f).map(([H,q])=>`LOWER(${H}) LIKE LOWER('%${q}%')`).join(" AND ");T=`SELECT ${L} FROM "${t}" WHERE ${v} LIMIT ${s} OFFSET ${a};`}const dt=c(T),{data:ut,columns:mt}=z(dt);b(mt),j(ut),l(null),x(T),u(T)}catch(g){g instanceof Error&&l(g.message)}finally{N(!1)}})())},[o,t,a,s,r,l,c,x,u,f,p]);const E=n.useCallback(()=>{if(m.trim()===""){l(null);return}N(!0),(async()=>{try{const g=c(m),{data:D,columns:k}=z(g);b(k),j(D),i(!0),l(null)}catch(g){g instanceof Error&&l(g.message)}finally{N(!1)}})()},[m,c,l,i]);return{data:h,columns:P,customQuery:m,setCustomQuery:x,isQueryLoading:S,handleCustomQuery:E,totalRows:w}}function gs(t){const{setIsCustomQuery:s}=R(),[a,r]=n.useState(0);n.useEffect(()=>{r(0),s(!1)},[s]);let o=30;if(t==="auto"){const l=window.innerHeight,i=[{height:1700,rowHeight:65},{height:1300,rowHeight:70},{height:1200,rowHeight:75},{height:1100,rowHeight:75},{height:1e3,rowHeight:80},{height:950,rowHeight:85},{height:900,rowHeight:90},{height:850,rowHeight:95},{height:800,rowHeight:100},{height:750,rowHeight:105},{height:700,rowHeight:110},{height:600,rowHeight:120},{height:550,rowHeight:150},{height:500,rowHeight:190},{height:0,rowHeight:280}];let u=120;for(const m of i)if(l>m.height){u=m.rowHeight;break}o=Math.max(1,Math.floor(l/u))}else o=t;return{page:a,setPage:r,rowsPerPage:o}}function d(...t){return gt(ht(t))}const $=n.forwardRef(({className:t,type:s,...a},r)=>e.jsx("input",{type:s,className:d("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...a}));$.displayName="Input";const W=_("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),y=n.forwardRef(({className:t,variant:s,size:a,asChild:r=!1,...o},l)=>{const i=r?bt:"button";return e.jsx(i,{className:d(W({variant:s,size:a,className:t})),ref:l,...o})});y.displayName="Button";function bs({page:t,setPage:s,rowsPerPage:a}){const{totalRows:r}=R(),o=Math.ceil(r/a),l=Math.floor(t/a)+1,i=()=>{l{l>1&&s(t-a)};return e.jsx("section",{className:"fixed bottom-[8px] left-0 right-0 z-10 mx-auto w-[270px]",children:e.jsxs("div",{className:"flex justify-between gap-2 rounded border bg-secondary p-[6px]",children:[e.jsx(y,{onClick:c,title:"Previous page",disabled:l===1,children:e.jsx($t,{className:"h-4 w-4"})}),e.jsxs("span",{className:"flex items-center justify-center text-sm",children:["Page ",l," of ",o]}),e.jsx(y,{onClick:i,title:"Next page",disabled:l>=o,children:e.jsx(Qt,{className:"h-4 w-4"})})]})})}const ys=Ct,js=Rt,ws=St,Se=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(re,{ref:r,className:d("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[s,e.jsx(yt,{asChild:!0,children:e.jsx(Re,{className:"h-4 w-4 opacity-50"})})]}));Se.displayName=re.displayName;const Ee=n.forwardRef(({className:t,...s},a)=>e.jsx(oe,{ref:a,className:d("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(Ht,{className:"h-4 w-4"})}));Ee.displayName=oe.displayName;const Te=n.forwardRef(({className:t,...s},a)=>e.jsx(ne,{ref:a,className:d("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(Re,{className:"h-4 w-4"})}));Te.displayName=ne.displayName;const De=n.forwardRef(({className:t,children:s,position:a="popper",...r},o)=>e.jsx(jt,{children:e.jsxs(le,{ref:o,className:d("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...r,children:[e.jsx(Ee,{}),e.jsx(wt,{className:d("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),e.jsx(Te,{})]})}));De.displayName=le.displayName;const Le=n.forwardRef(({className:t,...s},a)=>e.jsx(ie,{ref:a,className:d("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...s}));Le.displayName=ie.displayName;const Pe=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(ce,{ref:r,className:d("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Nt,{children:e.jsx(qt,{className:"h-4 w-4"})})}),e.jsx(vt,{children:s})]}));Pe.displayName=ce.displayName;const Ns=n.forwardRef(({className:t,...s},a)=>e.jsx(de,{ref:a,className:d("-mx-1 my-1 h-px bg-muted",t),...s}));Ns.displayName=de.displayName;const vs=_("inline-flex items-center rounded border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ke({className:t,variant:s,...a}){return e.jsx("div",{className:d(vs({variant:s}),t),...a})}function Cs(){const{tables:t,selectedTable:s,setSelectedTable:a,setIsCustomQuery:r}=R(),o=n.useMemo(()=>{var u;const c=parseInt(s);return isNaN(c)?0:((u=t[c])==null?void 0:u.count)||0},[t,s]),l=n.useMemo(()=>t.map((c,u)=>e.jsx(Pe,{value:`${u}`,children:c.name},c.name)),[t]);function i(c){r(!1),a(c)}return e.jsxs("section",{className:"flex grow items-center justify-center gap-1",children:[e.jsxs(ys,{value:s,onValueChange:i,children:[e.jsx(Se,{className:"grow",children:e.jsx(ws,{placeholder:"Select a table"})}),e.jsx(De,{children:e.jsxs(js,{children:[e.jsx(Le,{children:"Tables"}),l]})})]}),e.jsx(ke,{title:"Rows",className:"min-w-[100px] grow py-2 text-sm md:min-w-[200px]",variant:"outline",children:e.jsx("span",{className:"w-full text-center",children:o})})]})}const A=t=>t instanceof Date&&!isNaN(t.getTime()),Rs=t=>{const s=new Date(t);return A(s)?os(s,{addSuffix:!0}):t},Ss=t=>{const s=new Date(t);return A(s)?M(s,"MMMM do, yyyy"):t},Es=t=>{const s=new Date(t);return A(s)?M(s,"hh:mm a"):t},Ts=t=>{const s=new Date(t);return A(s)?M(s,"MM/dd/yyyy"):t},Ds=t=>{const s=new Date(t);return A(s)?M(s,"EEEE, MMMM do, yyyy"):t},I={formatDateRelative:{label:"over 56 years ago",func:Rs},formatDateFormatted:{label:"January 9th, 1968",func:Ss},formatTime:{label:"12:00 am",func:Es},formatDateShort:{label:"01/09/1968",func:Ts},formatDateLong:{label:"Monday, January 9th, 1968",func:Ds}},Fe=Et,Oe=Tt,J=n.forwardRef(({className:t,align:s="start",side:a="bottom",sideOffset:r=4,...o},l)=>e.jsx(ue,{ref:l,align:s,side:a,sideOffset:r,className:d("z-50 w-64 text-balance break-words rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...o}));J.displayName=ue.displayName;const Ae=n.forwardRef(({className:t,...s},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:d("w-full caption-bottom text-sm",t),...s})}));Ae.displayName="Table";const Ie=n.forwardRef(({className:t,...s},a)=>e.jsx("thead",{ref:a,className:d("[&_tr]:border-b",t),...s}));Ie.displayName="TableHeader";const Me=n.forwardRef(({className:t,...s},a)=>e.jsx("tbody",{ref:a,className:d("[&_tr:last-child]:border-0",t),...s}));Me.displayName="TableBody";const Ls=n.forwardRef(({className:t,...s},a)=>e.jsx("tfoot",{ref:a,className:d("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...s}));Ls.displayName="TableFooter";const U=n.forwardRef(({className:t,...s},a)=>e.jsx("tr",{ref:a,className:d("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...s}));U.displayName="TableRow";const $e=n.forwardRef(({className:t,...s},a)=>e.jsx("th",{ref:a,className:d("h-12 min-w-[150px] px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...s}));$e.displayName="TableHead";const Ps=t=>{const s=new Uint8Array(t.match(/.{1,2}/g).map(r=>parseInt(r,16))),a=new Blob([s],{type:"image/jpeg"});return URL.createObjectURL(a)},Qe=n.forwardRef(({className:t,children:s,dataType:a,...r},o)=>{const l=(a==null?void 0:a.toUpperCase())==="BLOB",i=n.useMemo(()=>typeof s=="string"&&s.length>40?s.slice(0,40)+"...":s,[s]);return e.jsx("td",{ref:o,className:d("max-w-[200px] overflow-hidden truncate text-ellipsis whitespace-nowrap p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...r,children:e.jsxs(Fe,{children:[e.jsx(Oe,{asChild:!0,children:e.jsx("span",{className:"cursor-pointer hover:underline",children:l?e.jsx("span",{className:"italic opacity-40",children:"BLOB"}):i})}),e.jsx(J,{side:"bottom",align:"start",children:e.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[l&&typeof s=="string"?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:Ps(s),alt:"BLOB content",className:"flex max-h-40 flex-col items-center justify-center gap-2 rounded object-contain",onError:c=>{c.currentTarget.style.display="none"}}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["Blob length: ",s.length]})]}):e.jsx("span",{className:"max-w-full break-words",children:s}),a&&e.jsx(ke,{className:"w-full self-start text-xs font-semibold",children:a})]})})]})})});Qe.displayName="TableCell";const ks=n.forwardRef(({className:t,...s},a)=>e.jsx("caption",{ref:a,className:d("mt-4 text-sm text-muted-foreground",t),...s}));ks.displayName="TableCaption";function V({children:t}){return e.jsxs("div",{className:"flex items-center justify-center gap-4 rounded border p-4",children:[e.jsx(Bt,{className:"h-6 w-6"}),e.jsx("span",{className:"font-semibold",children:t})]})}const Fs=F.memo(({columnSchema:t})=>{var s;return t!=null&&t.isPrimaryKey?e.jsx(zt,{className:"h-4 w-4"}):t!=null&&t.isForeignKey?e.jsx(Ut,{className:"h-4 w-4"}):(t==null?void 0:t.type)==="BLOB"?e.jsx(Vt,{className:"h-4 w-4"}):(s=t==null?void 0:t.type)!=null&&s.includes("DATE")?e.jsx(_t,{className:"h-4 w-4"}):null}),Os=F.memo(({col:t,columnSchema:s,children:a})=>e.jsx($e,{className:"py-2",children:e.jsxs(Fe,{children:[e.jsx(Oe,{asChild:!0,children:e.jsxs("span",{className:"cursor-pointer hover:underline",children:[e.jsxs("div",{className:"flex gap-1",children:[t,e.jsx(Fs,{columnSchema:s})]}),a]})}),e.jsx(J,{side:"bottom",align:"start",children:(s==null?void 0:s.type)||"Unknown"})]})})),As=F.memo(({value:t,dataType:s})=>{const{dateFormatValue:a}=R(),r=s==="DATE"||s==="DATETIME",o=()=>t?r&&I[a]?I[a].func(t):t:e.jsx("span",{className:"italic opacity-40",children:"NULL"});return e.jsx(Qe,{dataType:s,children:o()})});function Is({col:t}){const{appendToFilters:s,selectedTable:a}=R(),[r,o]=n.useState(""),l=i=>{o(i.target.value),s(t,i.target.value)};return n.useEffect(()=>{o("")},[a]),e.jsx($,{value:r,onChange:l,className:"w-full",placeholder:"Filter"})}function Ms({data:t,columns:s,tableName:a,tableSchemas:r}){const o=n.useMemo(()=>e.jsx(Ie,{children:e.jsx(U,{children:s.map((i,c)=>e.jsx(Os,{col:i,columnSchema:r[a][i],children:e.jsx(Is,{col:i})},c))})}),[s,r,a]),l=n.useMemo(()=>e.jsx(Me,{children:t.map((i,c)=>e.jsx(U,{children:s.map((u,m)=>{var x;return e.jsx(As,{value:i[u],dataType:(x=r[a][u])==null?void 0:x.type},m)})},c))}),[t,s,r,a]);return e.jsxs(e.Fragment,{children:[e.jsxs(Ae,{children:[o,t.length>0&&l]}),t.length===0&&e.jsxs(V,{children:[a," return no data"]})]})}function He({children:t}){return e.jsxs("div",{className:"flex items-center justify-center gap-4 rounded border p-4",children:[e.jsx(Kt,{className:"h-6 w-6 animate-spin"}),e.jsx("span",{className:"font-semibold",children:t})]})}const $s=Lt,Qs=Pt,qe=n.forwardRef(({className:t,align:s="center",sideOffset:a=4,...r},o)=>e.jsx(Dt,{children:e.jsx(me,{ref:o,align:s,sideOffset:a,className:d("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r})}));qe.displayName=me.displayName;function Hs(){const{selectedTable:t,tables:s,customQuery:a,db:r}=R(),o=n.useCallback((i,c,u,m)=>e.jsx(y,{className:m,onClick:i,title:u,children:e.jsx("span",{className:"ml-2",children:c})}),[]),l=n.useMemo(()=>{var i;return r&&e.jsxs("div",{className:"flex flex-col gap-1",children:[o(()=>us(r),"Export as SQLite","Download database as SQLite"),o(()=>fs(r,parseInt(t)),`Export ${((i=s[parseInt(t)])==null?void 0:i.name)||"selected"} table as CSV`,"Export selected table as CSV"),o(()=>ps(r),"Export all tables as CSV","Export all tables as CSV"),o(()=>xs(r,a),"Export custom query as CSV","Export the result of the custom query as CSV")]})},[r,o,t,s,a]);return e.jsxs($s,{children:[e.jsx(Qs,{asChild:!0,children:e.jsx(y,{title:"Open export options",children:e.jsx(Gt,{className:"h-5 w-5"})})}),e.jsx(qe,{align:"end",className:"w-80",children:l})]})}function qs(){const{tables:t,selectedTable:s,tableSchemas:a,queryError:r,setQueryError:o,rowPerPageOrAuto:l,isCustomQuery:i,setIsCustomQuery:c,customQuery:u,setCustomQuery:m,expandPage:x,setExpandPage:f,filters:w,setFilters:p}=R(),{page:h,setPage:j,rowsPerPage:P}=gs(l),b=n.useMemo(()=>{var T;return(T=t[parseInt(s)])==null?void 0:T.name},[t,s]),{data:S,columns:N,isQueryLoading:E,handleCustomQuery:g}=hs(b,P,h,i),[D,k]=n.useState([]);n.useEffect(()=>{N.length>0&&k(N)},[b,N]);const L=n.useCallback(()=>{o(null),m(""),c(!1)},[c,o,m]),O=n.useCallback(()=>{j(0),L()},[L,j]);n.useEffect(()=>{j(0),p({})},[s]);const Y=n.useMemo(()=>e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[e.jsx($,{type:"text",value:u,onChange:T=>m(T.target.value),placeholder:"Enter your custom query",className:"w-full"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(y,{className:"w-full",onClick:g,title:"Run custom query",children:e.jsx(Wt,{className:"h-5 w-5"})}),e.jsx(y,{className:"w-full",onClick:L,title:"Reset query",children:e.jsx(Jt,{className:"h-5 w-5"})}),e.jsx(y,{className:"w-full",onClick:O,title:"Reset to first page",disabled:h===0,children:e.jsx(Yt,{className:"h-5 w-5"})})]})]}),[u,g,L,O,h]),Q=n.useMemo(()=>E?e.jsxs(He,{children:["Loading ",b]}):e.jsx("div",{className:"rounded border",children:e.jsx(Ms,{data:S,columns:D.length>0?D:N,tableName:b,tableSchemas:a})}),[E,S,N,b,a,w,D]);return e.jsxs("div",{className:"flex flex-col gap-3 pb-8",children:[e.jsxs("section",{className:"flex flex-col gap-2 rounded border p-3 pb-2",children:[e.jsxs("div",{className:"flex h-full gap-1",children:[e.jsx(Cs,{}),e.jsxs("div",{className:"ml-1 flex gap-1",children:[e.jsx(Hs,{}),e.jsx(y,{className:"hidden expand:block",onClick:()=>f(!x),title:"Toggle page size",children:x?e.jsx(Zt,{className:"h-5 w-5"}):e.jsx(Xt,{className:"h-5 w-5"})})]})]}),Y,r&&e.jsx("p",{className:"text-center text-xs capitalize text-red-500",children:r})]}),Q,!i&&e.jsx(bs,{page:h,setPage:j,rowsPerPage:P})]})}const Be=({shouldScaleBackground:t=!0,...s})=>e.jsx(C.Root,{shouldScaleBackground:t,...s});Be.displayName="Drawer";const Bs=C.Trigger,zs=C.Portal,Us=C.Close,ze=n.forwardRef(({className:t,...s},a)=>e.jsx(C.Overlay,{ref:a,className:d("fixed inset-0 z-50 bg-black/80",t),...s}));ze.displayName=C.Overlay.displayName;const Ue=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(zs,{children:[e.jsx(ze,{}),e.jsxs(C.Content,{ref:r,className:d("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...a,children:[e.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),s]})]}));Ue.displayName="DrawerContent";const Ve=({className:t,...s})=>e.jsx("div",{className:d("grid gap-1.5 p-4 text-center sm:text-left",t),...s});Ve.displayName="DrawerHeader";const _e=({className:t,...s})=>e.jsx("div",{className:d("mt-auto flex flex-col gap-2 p-4",t),...s});_e.displayName="DrawerFooter";const Ke=n.forwardRef(({className:t,...s},a)=>e.jsx(C.Title,{ref:a,className:d("text-lg font-semibold leading-none tracking-tight",t),...s}));Ke.displayName=C.Title.displayName;const Ge=n.forwardRef(({className:t,...s},a)=>e.jsx(C.Description,{ref:a,className:d("text-sm text-muted-foreground",t),...s}));Ge.displayName=C.Description.displayName;const We=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(fe,{ref:r,className:d("relative overflow-hidden",t),...a,children:[e.jsx(kt,{className:"h-full w-full rounded-[inherit]",children:s}),e.jsx(Je,{}),e.jsx(Ft,{})]}));We.displayName=fe.displayName;const Je=n.forwardRef(({className:t,orientation:s="vertical",...a},r)=>e.jsx(pe,{ref:r,orientation:s,className:d("flex touch-none select-none transition-colors",s==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...a,children:e.jsx(Ot,{className:"relative flex-1 rounded-full bg-border"})}));Je.displayName=pe.displayName;const Ye=n.forwardRef(({className:t,orientation:s="horizontal",decorative:a=!0,...r},o)=>e.jsx(xe,{ref:o,decorative:a,orientation:s,className:d("shrink-0 bg-border",s==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));Ye.displayName=xe.displayName;const Vs=_("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ze=n.forwardRef(({className:t,...s},a)=>e.jsx(he,{ref:a,className:d(Vs(),t),...s}));Ze.displayName=he.displayName;const Xe=n.forwardRef(({className:t,...s},a)=>e.jsx(ge,{className:d("grid gap-2",t),...s,ref:a}));Xe.displayName=ge.displayName;const et=n.forwardRef(({className:t,...s},a)=>e.jsx(be,{ref:a,className:d("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(At,{className:"flex items-center justify-center",children:e.jsx(es,{className:"h-2.5 w-2.5 fill-current text-current"})})}));et.displayName=be.displayName;const Z="rowsPerPage",X="dateFormat";function _s(){const{setRowPerPageOrAuto:t,setIsCustomQuery:s,queryHestory:a,dateFormatValue:r,setDateFormatValue:o}=R(),[l,i]=n.useState(null),[c,u]=n.useState(!1);n.useEffect(()=>{const p=localStorage.getItem(Z),h=localStorage.getItem(X);if(p)if(p==="auto")u(!0);else{const j=Number(p);i(j),t(j)}h&&o(h)},[t,o]);const m=n.useCallback(p=>{const h=Number(p.target.value);isNaN(h)||(i(h),u(!1))},[]),x=n.useCallback(()=>{u(p=>!p)},[]),f=n.useCallback(()=>{if(s(!1),l===null){B.error("Please provide a number of rows per page or set it to auto.");return}if(l<1){B.error("Please provide a positive number of rows per page.");return}const p=c?"auto":l.toString();localStorage.setItem(Z,p),t(c?"auto":l)},[l,c,s,t]),w=p=>{o(p),localStorage.setItem(X,p)};return e.jsxs(Be,{children:[e.jsx(Bs,{asChild:!0,children:e.jsx(y,{className:"grow",title:"Open settings drawer",children:e.jsx(ts,{className:"h-5 w-5"})})}),e.jsx(Ue,{children:e.jsxs("div",{className:"mx-auto w-full max-w-md",children:[e.jsxs(Ve,{children:[e.jsx(Ke,{children:"Settings"}),e.jsx(Ge,{children:"Personalize your site experience here."})]}),e.jsxs("div",{className:"flex flex-col gap-4 p-4 pb-0",children:[e.jsx(Ks,{selectedRowsPerPage:l,isAutoRowsPerPage:c,handleInputChange:m,toggleAutoRowsPerPage:x,handleRowsPerPageSave:f}),e.jsx(Gs,{dateFormatValue:r,handleDateFormatChange:w}),e.jsx(Ws,{queryHestory:a})]}),e.jsx(_e,{children:e.jsx(Us,{asChild:!0,children:e.jsx(y,{title:"Close settings drawer",variant:"outline",children:"Close"})})})]})})]})}function Ks({selectedRowsPerPage:t,isAutoRowsPerPage:s,handleInputChange:a,toggleAutoRowsPerPage:r,handleRowsPerPageSave:o}){return e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm text-muted-foreground",children:"Rows Per Page"}),e.jsxs("div",{className:"flex items-center justify-center gap-1 rounded border p-2",children:[e.jsx($,{value:t||"",onChange:a,disabled:s,placeholder:"Number of rows",type:"number",name:"rowsPerPage"}),e.jsx("span",{className:"h-full text-center text-sm text-muted-foreground",children:"OR"}),e.jsx(y,{className:s?"border border-primary":"",onClick:r,title:"Toggle auto rows per page",variant:"outline",children:"Auto Calculate"})]}),e.jsx(y,{className:"mt-2 w-full",onClick:o,title:"Save rows per page settings",variant:"outline",children:e.jsx("span",{children:"Save"})})]})}function Gs({dateFormatValue:t,handleDateFormatChange:s}){return e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm text-muted-foreground",children:"Date type format"}),e.jsxs(Xe,{className:"flex flex-col gap-2",name:"dateType",value:t,onValueChange:s,children:[e.jsx(ee,{value:"default",label:"Default"}),Object.keys(I).map(a=>e.jsx(ee,{value:a,label:I[a].label},a))]})]})}function ee({value:t,label:s}){return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(et,{value:t,id:`r-${t}`}),e.jsx(Ze,{htmlFor:`r-${t}`,children:s})]})}function Ws({queryHestory:t}){return e.jsxs("div",{children:[e.jsxs("p",{className:"mb-1 text-sm text-muted-foreground",children:["Query History (",t.length,")"]}),e.jsx(We,{className:"h-48 rounded-md border",children:e.jsx("div",{className:"p-4",children:t.map((s,a)=>e.jsxs("div",{children:[e.jsx("div",{className:"text-xs",children:s}),e.jsx(Ye,{className:"my-2"})]},a))})})]})}const te="darkMode",se="animate-circular-reveal";function tt(){const[t,s]=n.useState(!1),a=n.useCallback(o=>{s(o),document.body.classList.toggle("dark",o),localStorage.setItem(te,o.toString()),document.body.classList.add(se),setTimeout(()=>{document.body.classList.remove(se)},500)},[]);n.useEffect(()=>{const o=localStorage.getItem(te),l=o!==null?o==="true":window.matchMedia("(prefers-color-scheme: dark)").matches;a(l);const i=u=>{a(u.matches)},c=window.matchMedia("(prefers-color-scheme: dark)");return c.addEventListener("change",i),()=>{c.removeEventListener("change",i)}},[a]);const r=n.useCallback(()=>{a(!t)},[t,a]);return e.jsx(y,{className:"relative grow",onClick:r,title:t?"Enable light mode":"Enable dark mode",children:t?e.jsx(ss,{className:"h-5 w-5"}):e.jsx(as,{className:"h-5 w-5"})})}const Js={"application/vnd.sqlite3":[".sqlite",".sqlite3"],"application/x-sqlite3":[".sqlite",".sqlite3"],"application/octet-stream":[".db"],"application/sql":[".sql"]},Ys={CHINOOK:"https://github.com/vwh/sqlite-viewer/raw/main/db_examples/chinook.db"};function Zs(){const{loadDatabase:t,setTables:s,setSelectedTable:a,db:r}=R(),[o,l]=n.useState([]),i=n.useCallback(async(f,w)=>{if(l([]),s([]),a("0"),f.length>0&&await t(f[0]),w.length>0){const p=w.flatMap(h=>h.errors);l(p)}},[t,s,a]),{getRootProps:c,getInputProps:u}=ns({onDrop:i,multiple:!1,accept:Js}),m=n.useCallback(f=>e.jsxs("div",{className:`flex h-full items-center justify-center gap-2 ${f?"px-[10px]":"px-0"}`,children:[e.jsxs("div",{...c(),className:`flex h-full grow cursor-pointer flex-col items-center justify-center rounded border p-6 text-center ${f?"py-0":"py-32"}`,children:[e.jsx("input",{id:"file-upload",...u()}),e.jsx("label",{htmlFor:"file-upload",className:"sr-only",children:"Upload SQLite File"}),e.jsx("p",{className:"hidden sm:block",children:"Drag and drop a SQLite file here, or click to select one"}),e.jsx("p",{className:"block sm:hidden",children:f?"Click to select a file":"Click to select a SQLite file"}),!f&&e.jsx("a",{href:Ys.CHINOOK,className:"text-sm text-link hover:underline",title:"Download sample file",children:"Or download & try this sample file"})]}),f&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(tt,{}),e.jsx(_s,{})]})]}),[c,u]),x=n.useMemo(()=>m(!!r),[m,r]);return e.jsxs("section",{children:[x,e.jsx(Xs,{errors:o})]})}const Xs=F.memo(({errors:t})=>(F.useEffect(()=>{t==null||t.forEach(s=>B(s.message,{position:"bottom-right"}))},[t]),null));function ea(){const[t,s]=n.useState(()=>document.body.classList.contains("dark"));return n.useEffect(()=>{const a=new MutationObserver(()=>{s(document.body.classList.contains("dark"))});return a.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>a.disconnect()},[]),t}function ta(){const s=ea()?"/sqlite-dark.webp":"/sqlite-light.webp";return e.jsx("section",{className:"flex justify-center rounded border py-3",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("img",{id:"logo",title:"SQLite Logo",src:s,alt:"SQLite Logo",width:"170",height:"80",draggable:"false"}),e.jsx("p",{className:"text-sm",children:"View SQLite files in the browser"})]})})}const sa=Mt,aa=It,st=n.forwardRef(({className:t,...s},a)=>e.jsx(ye,{className:d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...s,ref:a}));st.displayName=ye.displayName;const at=n.forwardRef(({className:t,...s},a)=>e.jsxs(aa,{children:[e.jsx(st,{}),e.jsx(je,{ref:a,className:d("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...s})]}));at.displayName=je.displayName;const rt=({className:t,...s})=>e.jsx("div",{className:d("flex flex-col space-y-2 text-left",t),...s});rt.displayName="AlertDialogHeader";const ot=({className:t,...s})=>e.jsx("div",{className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s});ot.displayName="AlertDialogFooter";const nt=n.forwardRef(({className:t,...s},a)=>e.jsx(we,{ref:a,className:d("text-lg font-semibold",t),...s}));nt.displayName=we.displayName;const lt=n.forwardRef(({className:t,...s},a)=>e.jsx(Ne,{ref:a,className:d("text-sm",t),...s}));lt.displayName=Ne.displayName;const it=n.forwardRef(({className:t,...s},a)=>e.jsx(ve,{ref:a,className:d(W(),t),...s}));it.displayName=ve.displayName;const ct=n.forwardRef(({className:t,...s},a)=>e.jsx(Ce,{ref:a,className:d(W({variant:"outline"}),"mt-2 sm:mt-0",t),...s}));ct.displayName=Ce.displayName;function ra({showDialog:t,setShowDialog:s,fn:a}){return e.jsx(sa,{open:t,onOpenChange:s,children:e.jsxs(at,{children:[e.jsxs(rt,{children:[e.jsx(nt,{children:"Retry using a proxy?"}),e.jsx(lt,{children:"Failed to load the database from the provided URL due to possible CORS restrictions."})]}),e.jsx("div",{className:"text-sm font-semibold",children:"Using the proxy may expose your database to corsproxy.io services."}),e.jsxs(ot,{children:[e.jsx(ct,{onClick:()=>s(!1),children:"Cancel"}),e.jsx(it,{onClick:a,children:"Confirm"})]})]})})}const oa="https://github.com/vwh/sqlite-viewer";function na(){return e.jsxs("footer",{className:"flex items-center justify-between rounded border p-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"hidden text-xs sm:block",children:"No file will be uploaded to server. using JavaScript, sql.js"}),e.jsx("p",{className:"block text-xs sm:hidden",children:"No file uploads to server."}),e.jsxs("a",{href:oa,target:"_blank",className:"flex items-center gap-1 text-sm text-link hover:underline",title:"Star on GitHub",children:[e.jsx(rs,{className:"h-4 w-4"}),e.jsx("span",{children:"Star us on GitHub"})]})]}),e.jsx("div",{className:"flex gap-1",children:e.jsx(tt,{})})]})}function la(){const{db:t,tables:s,isLoading:a,loadDatabase:r,expandPage:o}=R(),[l,i]=n.useState(null),[c,u]=n.useState(!1),[m,x]=n.useState(null),[f,w]=n.useState(!1),p=n.useRef(!1),h=n.useCallback(async(b,S=!1)=>{if(!/^(https?:\/\/(?:www\.)?[a-zA-Z0-9-]{1,256}\.[a-zA-Z]{2,6}(?:\/[^\s]*)?)$/i.test(b)){i("Invalid URL");return}try{w(!0);const E=S?`https://corsproxy.io/?${encodeURIComponent(b)}`:b,g=await fetch(E);if(!g.ok)throw new Error("URL not found or invalid");const D=await g.blob(),k=new File([D],"database.sqlite");await r(k),i(null)}catch(E){S?i(`Error whilefetching, ${E instanceof Error?E.message:String(E)}`):(x(b),u(!0))}finally{w(!1)}},[r]);n.useEffect(()=>{if(p.current)return;const S=new URLSearchParams(window.location.search).get("url");S&&(h(decodeURIComponent(S)),p.current=!0)},[h]);const j=n.useCallback(()=>{m&&(h(m,!0),u(!1))},[m,h]),P=()=>a||f?e.jsxs(He,{children:[f?"Fetching":"Loading"," SQLite file"]}):l&&!t?e.jsx(V,{children:l}):t?s.length>0?e.jsx(qs,{}):e.jsx(V,{children:"Your database is empty, no tables found"}):null;return e.jsxs("main",{className:`mx-auto flex h-screen flex-col gap-3 p-4 ${o?"w-full":"container"}`,children:[!t&&e.jsx(ta,{}),e.jsx(Zs,{}),P(),e.jsx(ra,{showDialog:c,setShowDialog:u,fn:j}),!t&&e.jsx(na,{})]})}const ia=({...t})=>e.jsx(ls,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-primary group-[.toaster]:text-background group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});ft.createRoot(document.getElementById("root")).render(e.jsxs(F.StrictMode,{children:[e.jsx(la,{}),e.jsx(ia,{})]})); diff --git a/assets/index-BIG7Mclk.js.gz b/assets/index-BIG7Mclk.js.gz deleted file mode 100644 index f69032a..0000000 Binary files a/assets/index-BIG7Mclk.js.gz and /dev/null differ diff --git a/assets/index-C6RQFSoa.js b/assets/index-C6RQFSoa.js new file mode 100644 index 0000000..1cd3264 --- /dev/null +++ b/assets/index-C6RQFSoa.js @@ -0,0 +1,5 @@ +import{r as n,j as e,R as O}from"./react-DmpIMwDM.js";import{c as pt}from"./react-dom-tIxIBQuZ.js";import{c as xt}from"./zustand-B1IM3DrU.js";import{i as ht}from"./sql.js-lzln2bbd.js";import{F as re}from"./file-saver-DhbZvGod.js";import{c as gt}from"./clsx-B-dksMZM.js";import{t as bt}from"./tailwind-merge-BkWO730n.js";import{S as yt,c as oe,I as jt,d as ne,e as le,f as wt,g as ie,V as Nt,L as ce,h as de,i as vt,j as Ct,k as ue,l as Rt,G as St,m as Et,n as me,o as Tt,p as Dt,q as Lt,r as fe,s as Pt,t as Ft,u as pe,v as kt,w as Ot,x as xe,y as At,z as he,A as ge,B as be,E as ye,F as It,H as je,J as we,K as Ne,M as ve,N as Ce,Q as Re,U as Mt,W as $t}from"./@radix-ui-Dtk-Z1Mr.js";import{c as K}from"./class-variance-authority-Bb4qSo10.js";import{C as Qt,a as Ht,b as Se,c as qt,d as Bt,T as zt,K as Ut,e as Vt,f as _t,g as Kt,L as Gt,D as Wt,P as Jt,h as Yt,i as Zt,M as Xt,j as es,k as ts,S as ss,l as as,m as rs,G as os}from"./lucide-react-UOeYhQAl.js";import{f as ns,a as Q}from"./date-fns-fqmN70Xj.js";import{u as ls}from"./react-dropzone-D-IBOhIS.js";import{J as z,T as is}from"./sonner-BJG0sXho.js";import{D as C}from"./vaul-Bkmv171v.js";import"./attr-accept-BWI1aNlo.js";import"./scheduler-CzFDRTuY.js";import"./use-sync-external-store-ByYeed7R.js";import"./aria-hidden-DQ5UC2Eg.js";import"./react-remove-scroll-BOyN_WUU.js";import"./tslib-CuZy2iRz.js";import"./react-remove-scroll-bar-DZjhPxUV.js";import"./react-style-singleton-CpxBwIWS.js";import"./get-nonce-C-Z93AgS.js";import"./use-sidecar-D8_hMcUG.js";import"./use-callback-ref-DRzK4jWO.js";import"./@floating-ui-DGkE6due.js";import"./prop-types-psm7UO16.js";import"./file-selector-CBHVlu32.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const i of l.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function a(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=a(o);fetch(o.href,l)}})();const cs="/sql.wasm",ds=async t=>{try{const[s,a]=await Promise.all([t.arrayBuffer(),ht({locateFile:()=>cs})]);return new a.Database(new Uint8Array(s))}catch(s){throw console.error("Failed to load database:",s),s}},G=t=>{var s;try{return((s=t.exec("SELECT name FROM sqlite_master WHERE type='table';")[0])==null?void 0:s.values.flat())||[]}catch(a){return console.error("Failed to get table names:",a),[]}},us=async(t,s)=>{try{const[a,r]=t.exec(` + PRAGMA table_info("${s}"); + PRAGMA foreign_key_list("${s}"); + `),o=a.values.reduce((l,i)=>(l[i[1]]={type:i[2],isPrimaryKey:i[5]===1,isForeignKey:!1},l),{});return r==null||r.values.forEach(l=>{const i=l[3];o[i]&&(o[i].isForeignKey=!0)}),o}catch(a){throw console.error(`Failed to get schema for table "${s}":`,a),a}},U=t=>{if(t.length===0)return{data:[],columns:[]};const{columns:s,values:a}=t[0];return{data:a.map(o=>Object.fromEntries(s.map((l,i)=>[l,o[i]]))),columns:s}},ms=t=>{try{const s=t.export(),a=new Blob([s],{type:"application/x-sqlite3"});re.saveAs(a,"database.sqlite")}catch(s){throw console.error("Failed to export database:",s),s}},fs=(t,s)=>{const a=t.map(o=>`"${o}"`).join(","),r=s.map(o=>t.map(l=>`"${o[l]??""}"`).join(","));return[a,...r].join(` +`)},W=(t,s,a)=>{try{const r=s.exec(t);if(r.length===0)throw new Error(`Query "${t}" returned no results.`);const{data:o,columns:l}=U(r),i=fs(l,o),c=new Blob([i],{type:"text/csv;charset=utf-8;"});re.saveAs(c,`${a}.csv`)}catch(r){throw console.error(`Failed to get CSV for query "${t}":`,r),r}},ps=(t,s)=>{const r=G(t)[s],o=`SELECT * FROM "${r}"`;W(o,t,r)},xs=t=>{G(t).forEach(s=>{const a=`SELECT * FROM "${s}"`;W(a,t,s)})},hs=(t,s)=>{W(s,t,"custom_query")},R=xt((t,s)=>({db:null,isLoading:!1,queryError:null,tables:[],selectedTable:"0",tableSchemas:{},rowPerPageOrAuto:"auto",isCustomQuery:!1,loadDatabase:async a=>{t({isLoading:!0,queryError:null});try{const r=await ds(a),o=G(r),l=await Promise.all(o.map(async u=>{const m=r.exec(`SELECT COUNT(*) FROM "${u}"`),x=parseInt(m[0].values[0][0],10),p=await us(r,u);return{name:u,count:x,schema:p}})),i=l.map(({name:u,count:m})=>({name:u,count:m})),c=l.reduce((u,{name:m,schema:x})=>(u[m]=x,u),{});t({db:r,tables:i,tableSchemas:c,isLoading:!1})}catch(r){console.error("Failed to load database:",r),t({isLoading:!1,queryError:"Failed to load database"})}},query:a=>{const{db:r}=s();return r?r.exec(a):(console.warn("Database is not loaded."),[])},setQueryError:a=>t({queryError:a}),setTables:a=>t({tables:a}),setSelectedTable:a=>t({selectedTable:a}),setRowPerPageOrAuto:a=>t({rowPerPageOrAuto:a}),customQuery:"",setIsCustomQuery:a=>t({isCustomQuery:a}),setCustomQuery:a=>t({customQuery:a}),queryHestory:[],unShiftToQueryHestory:a=>t(r=>({queryHestory:[a,...r.queryHestory]})),expandPage:!1,setExpandPage:a=>t({expandPage:a}),dateFormatValue:"formatDateFormatted",setDateFormatValue:a=>t({dateFormatValue:a}),filters:{},setFilters:a=>t({filters:a}),appendToFilters:(a,r)=>t(o=>({filters:{...o.filters,[a]:r}})),totalRows:0,setTotalRows:a=>t({totalRows:a})}));function gs(t,s,a,r){const{db:o,setQueryError:l,setIsCustomQuery:i,query:c,unShiftToQueryHestory:u,customQuery:m,setCustomQuery:x,filters:p,totalRows:N,setTotalRows:f}=R(),[h,j]=n.useState([]),[P,b]=n.useState([]),[S,v]=n.useState(!0);n.useEffect(()=>{o&&t&&!r&&(v(!0),(async()=>{try{const g=`PRAGMA table_info("${t}");`,D=c(g)[0].values.map(w=>({name:w[1],type:w[2]})).map(w=>w.type.toUpperCase()==="BLOB"?`hex(${w.name}) as ${w.name}`:w.name).join(", "),L=Object.fromEntries(Object.entries(p).filter(([,w])=>w!==""));let I=`SELECT COUNT(*) as count FROM "${t}"`;if(Object.keys(L).length>0){const w=Object.entries(L).map(([q,B])=>`LOWER(${q}) LIKE LOWER('%${B}%')`).join(" AND ");I=`SELECT COUNT(*) as count FROM "${t}" WHERE ${w}`}const k=c(I)[0].values[0][0];f(k);let M=`SELECT ${D} FROM "${t}" LIMIT ${s} OFFSET ${a};`;if(Object.keys(L).length>0){const w=Object.entries(L).map(([q,B])=>`LOWER(${q}) LIKE LOWER('%${B}%')`).join(" AND ");M=`SELECT ${D} FROM "${t}" WHERE ${w} LIMIT ${s} OFFSET ${a};`}const ut=c(M),{data:mt,columns:ft}=U(ut);b(ft),j(mt),l(null),x(M),u(M)}catch(g){g instanceof Error&&l(g.message)}finally{v(!1)}})())},[o,t,a,s,r,l,c,x,u,p,f]);const E=n.useCallback(()=>{if(m.trim()===""){l(null);return}v(!0),(async()=>{try{const g=c(m),{data:T,columns:F}=U(g);b(F),j(T),i(!0),l(null)}catch(g){g instanceof Error&&l(g.message)}finally{v(!1)}})()},[m,c,l,i]);return{data:h,columns:P,customQuery:m,setCustomQuery:x,isQueryLoading:S,handleCustomQuery:E,totalRows:N}}function bs(t){const{setIsCustomQuery:s}=R(),[a,r]=n.useState(0);n.useEffect(()=>{r(0),s(!1)},[s]);let o=30;if(t==="auto"){const l=window.innerHeight,i=[{height:1700,rowHeight:65},{height:1300,rowHeight:70},{height:1200,rowHeight:75},{height:1100,rowHeight:75},{height:1e3,rowHeight:80},{height:950,rowHeight:85},{height:900,rowHeight:90},{height:850,rowHeight:95},{height:800,rowHeight:100},{height:750,rowHeight:105},{height:700,rowHeight:110},{height:600,rowHeight:120},{height:550,rowHeight:150},{height:500,rowHeight:190},{height:0,rowHeight:280}];let u=120;for(const m of i)if(l>m.height){u=m.rowHeight;break}o=Math.max(1,Math.floor(l/u))}else o=t;return{page:a,setPage:r,rowsPerPage:o}}function d(...t){return bt(gt(t))}const H=n.forwardRef(({className:t,type:s,...a},r)=>e.jsx("input",{type:s,className:d("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...a}));H.displayName="Input";const J=K("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),y=n.forwardRef(({className:t,variant:s,size:a,asChild:r=!1,...o},l)=>{const i=r?yt:"button";return e.jsx(i,{className:d(J({variant:s,size:a,className:t})),ref:l,...o})});y.displayName="Button";function ys({page:t,setPage:s,rowsPerPage:a}){const{totalRows:r}=R(),o=Math.ceil(r/a),l=Math.floor(t/a)+1,i=()=>{l{l>1&&s(t-a)};return e.jsx("section",{className:"fixed bottom-[8px] left-0 right-0 z-10 mx-auto w-[270px]",children:e.jsxs("div",{className:"flex justify-between gap-2 rounded border bg-secondary p-[6px]",children:[e.jsx(y,{onClick:c,title:"Previous page",disabled:l===1,children:e.jsx(Qt,{className:"h-4 w-4"})}),e.jsxs("span",{className:"flex items-center justify-center text-sm",children:["Page ",l," of ",o]}),e.jsx(y,{onClick:i,title:"Next page",disabled:l>=o,children:e.jsx(Ht,{className:"h-4 w-4"})})]})})}const js=Rt,ws=St,Ns=Et,Ee=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(oe,{ref:r,className:d("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[s,e.jsx(jt,{asChild:!0,children:e.jsx(Se,{className:"h-4 w-4 opacity-50"})})]}));Ee.displayName=oe.displayName;const Te=n.forwardRef(({className:t,...s},a)=>e.jsx(ne,{ref:a,className:d("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(qt,{className:"h-4 w-4"})}));Te.displayName=ne.displayName;const De=n.forwardRef(({className:t,...s},a)=>e.jsx(le,{ref:a,className:d("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(Se,{className:"h-4 w-4"})}));De.displayName=le.displayName;const Le=n.forwardRef(({className:t,children:s,position:a="popper",...r},o)=>e.jsx(wt,{children:e.jsxs(ie,{ref:o,className:d("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...r,children:[e.jsx(Te,{}),e.jsx(Nt,{className:d("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),e.jsx(De,{})]})}));Le.displayName=ie.displayName;const Pe=n.forwardRef(({className:t,...s},a)=>e.jsx(ce,{ref:a,className:d("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...s}));Pe.displayName=ce.displayName;const Fe=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(de,{ref:r,className:d("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(vt,{children:e.jsx(Bt,{className:"h-4 w-4"})})}),e.jsx(Ct,{children:s})]}));Fe.displayName=de.displayName;const vs=n.forwardRef(({className:t,...s},a)=>e.jsx(ue,{ref:a,className:d("-mx-1 my-1 h-px bg-muted",t),...s}));vs.displayName=ue.displayName;const Cs=K("inline-flex items-center rounded border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ke({className:t,variant:s,...a}){return e.jsx("div",{className:d(Cs({variant:s}),t),...a})}function Rs(){const{tables:t,selectedTable:s,setSelectedTable:a,setIsCustomQuery:r}=R(),o=n.useMemo(()=>{var u;const c=parseInt(s);return isNaN(c)?0:((u=t[c])==null?void 0:u.count)||0},[t,s]),l=n.useMemo(()=>t.map((c,u)=>e.jsx(Fe,{value:`${u}`,children:c.name},c.name)),[t]);function i(c){r(!1),a(c)}return e.jsxs("section",{className:"flex grow items-center justify-center gap-1",children:[e.jsxs(js,{value:s,onValueChange:i,children:[e.jsx(Ee,{className:"grow",children:e.jsx(Ns,{placeholder:"Select a table"})}),e.jsx(Le,{children:e.jsxs(ws,{children:[e.jsx(Pe,{children:"Tables"}),l]})})]}),e.jsx(ke,{title:"Rows",className:"min-w-[100px] grow py-2 text-sm md:min-w-[200px]",variant:"outline",children:e.jsx("span",{className:"w-full text-center",children:o})})]})}const A=t=>t instanceof Date&&!isNaN(t.getTime()),Ss=t=>{const s=new Date(t);return A(s)?ns(s,{addSuffix:!0}):t},Es=t=>{const s=new Date(t);return A(s)?Q(s,"MMMM do, yyyy"):t},Ts=t=>{const s=new Date(t);return A(s)?Q(s,"hh:mm a"):t},Ds=t=>{const s=new Date(t);return A(s)?Q(s,"MM/dd/yyyy"):t},Ls=t=>{const s=new Date(t);return A(s)?Q(s,"EEEE, MMMM do, yyyy"):t},$={formatDateRelative:{label:"over 56 years ago",func:Ss},formatDateFormatted:{label:"January 9th, 1968",func:Es},formatTime:{label:"12:00 am",func:Ts},formatDateShort:{label:"01/09/1968",func:Ds},formatDateLong:{label:"Monday, January 9th, 1968",func:Ls}},Oe=Tt,Ae=Dt,Y=n.forwardRef(({className:t,align:s="start",side:a="bottom",sideOffset:r=4,...o},l)=>e.jsx(me,{ref:l,align:s,side:a,sideOffset:r,className:d("z-50 w-64 text-balance break-words rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...o}));Y.displayName=me.displayName;const Ie=n.forwardRef(({className:t,...s},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:d("w-full caption-bottom text-sm",t),...s})}));Ie.displayName="Table";const Me=n.forwardRef(({className:t,...s},a)=>e.jsx("thead",{ref:a,className:d("[&_tr]:border-b",t),...s}));Me.displayName="TableHeader";const $e=n.forwardRef(({className:t,...s},a)=>e.jsx("tbody",{ref:a,className:d("[&_tr:last-child]:border-0",t),...s}));$e.displayName="TableBody";const Ps=n.forwardRef(({className:t,...s},a)=>e.jsx("tfoot",{ref:a,className:d("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...s}));Ps.displayName="TableFooter";const V=n.forwardRef(({className:t,...s},a)=>e.jsx("tr",{ref:a,className:d("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...s}));V.displayName="TableRow";const Qe=n.forwardRef(({className:t,...s},a)=>e.jsx("th",{ref:a,className:d("h-12 min-w-[150px] px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...s}));Qe.displayName="TableHead";const Fs=t=>{const s=new Uint8Array(t.match(/.{1,2}/g).map(r=>parseInt(r,16))),a=new Blob([s],{type:"image/jpeg"});return URL.createObjectURL(a)},He=n.forwardRef(({className:t,children:s,dataType:a,...r},o)=>{const l=(a==null?void 0:a.toUpperCase())==="BLOB",i=n.useMemo(()=>typeof s=="string"&&s.length>40?s.slice(0,40)+"...":s,[s]);return e.jsx("td",{ref:o,className:d("max-w-[200px] overflow-hidden truncate text-ellipsis whitespace-nowrap p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...r,children:e.jsxs(Oe,{children:[e.jsx(Ae,{asChild:!0,children:e.jsx("span",{className:"cursor-pointer hover:underline",children:l?e.jsx("span",{className:"italic opacity-40",children:"BLOB"}):i})}),e.jsx(Y,{side:"bottom",align:"start",children:e.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[l&&typeof s=="string"?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:Fs(s),alt:"BLOB content",className:"flex max-h-40 flex-col items-center justify-center gap-2 rounded object-contain",onError:c=>{c.currentTarget.style.display="none"}}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["Blob length: ",s.length]})]}):e.jsx("span",{className:"max-w-full break-words",children:s}),a&&e.jsx(ke,{className:"w-full self-start text-xs font-semibold",children:a})]})})]})})});He.displayName="TableCell";const ks=n.forwardRef(({className:t,...s},a)=>e.jsx("caption",{ref:a,className:d("mt-4 text-sm text-muted-foreground",t),...s}));ks.displayName="TableCaption";function _({children:t}){return e.jsxs("div",{className:"flex items-center justify-center gap-4 rounded border p-4",children:[e.jsx(zt,{className:"h-6 w-6"}),e.jsx("span",{className:"font-semibold",children:t})]})}const Os=O.memo(({columnSchema:t})=>{var s;return t!=null&&t.isPrimaryKey?e.jsx(Ut,{className:"h-4 w-4"}):t!=null&&t.isForeignKey?e.jsx(Vt,{className:"h-4 w-4"}):(t==null?void 0:t.type)==="BLOB"?e.jsx(_t,{className:"h-4 w-4"}):(s=t==null?void 0:t.type)!=null&&s.includes("DATE")?e.jsx(Kt,{className:"h-4 w-4"}):null}),As=O.memo(({col:t,columnSchema:s,children:a})=>e.jsx(Qe,{className:"py-2",children:e.jsxs(Oe,{children:[e.jsx(Ae,{asChild:!0,children:e.jsxs("span",{className:"cursor-pointer hover:underline",children:[e.jsxs("div",{className:"flex gap-1",children:[t,e.jsx(Os,{columnSchema:s})]}),a]})}),e.jsx(Y,{side:"bottom",align:"start",children:(s==null?void 0:s.type)||"Unknown"})]})})),Is=O.memo(({value:t,dataType:s})=>{const{dateFormatValue:a}=R(),r=s==="DATE"||s==="DATETIME",o=()=>t?r&&$[a]?$[a].func(t):t:e.jsx("span",{className:"italic opacity-40",children:"NULL"});return e.jsx(He,{dataType:s,children:o()})});function Ms({col:t}){const{appendToFilters:s,selectedTable:a}=R(),[r,o]=n.useState(""),l=i=>{o(i.target.value),s(t,i.target.value)};return n.useEffect(()=>{o("")},[a]),e.jsx(H,{value:r,onChange:l,className:"w-full",placeholder:"Filter"})}function $s({data:t,columns:s,tableName:a,tableSchemas:r}){const o=n.useMemo(()=>e.jsx(Me,{children:e.jsx(V,{children:s.map((i,c)=>e.jsx(As,{col:i,columnSchema:r[a][i],children:e.jsx(Ms,{col:i})},c))})}),[s,r,a]),l=n.useMemo(()=>e.jsx($e,{children:t.map((i,c)=>e.jsx(V,{children:s.map((u,m)=>{var x;return e.jsx(Is,{value:i[u],dataType:(x=r[a][u])==null?void 0:x.type},m)})},c))}),[t,s,r,a]);return e.jsxs(e.Fragment,{children:[e.jsxs(Ie,{children:[o,t.length>0&&l]}),t.length===0&&e.jsxs(_,{children:[a," return no data"]})]})}function qe({children:t}){return e.jsxs("div",{className:"flex items-center justify-center gap-4 rounded border p-4",children:[e.jsx(Gt,{className:"h-6 w-6 animate-spin"}),e.jsx("span",{className:"font-semibold",children:t})]})}const Qs=Pt,Hs=Ft,Be=n.forwardRef(({className:t,align:s="center",sideOffset:a=4,...r},o)=>e.jsx(Lt,{children:e.jsx(fe,{ref:o,align:s,sideOffset:a,className:d("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r})}));Be.displayName=fe.displayName;function qs(){const{selectedTable:t,tables:s,customQuery:a,db:r}=R(),o=n.useCallback((i,c,u,m)=>e.jsx(y,{className:m,onClick:i,title:u,children:e.jsx("span",{className:"ml-2",children:c})}),[]),l=n.useMemo(()=>{var i;return r&&e.jsxs("div",{className:"flex flex-col gap-1",children:[o(()=>ms(r),"Export as SQLite","Download database as SQLite"),o(()=>ps(r,parseInt(t)),`Export ${((i=s[parseInt(t)])==null?void 0:i.name)||"selected"} table as CSV`,"Export selected table as CSV"),o(()=>xs(r),"Export all tables as CSV","Export all tables as CSV"),o(()=>hs(r,a),"Export custom query as CSV","Export the result of the custom query as CSV")]})},[r,o,t,s,a]);return e.jsxs(Qs,{children:[e.jsx(Hs,{asChild:!0,children:e.jsx(y,{title:"Open export options",children:e.jsx(Wt,{className:"h-5 w-5"})})}),e.jsx(Be,{align:"end",className:"w-80",children:l})]})}function Bs(){const{tables:t,selectedTable:s,tableSchemas:a,queryError:r,setQueryError:o,rowPerPageOrAuto:l,isCustomQuery:i,setIsCustomQuery:c,customQuery:u,setCustomQuery:m,expandPage:x,setExpandPage:p,filters:N,setFilters:f}=R(),{page:h,setPage:j,rowsPerPage:P}=bs(l),b=n.useMemo(()=>{var k;return(k=t[parseInt(s)])==null?void 0:k.name},[t,s]),{data:S,columns:v,isQueryLoading:E,handleCustomQuery:g}=gs(b,P,h,i),[T,F]=n.useState([]);n.useEffect(()=>{v.length>0&&F(v)},[b,v]);const D=n.useCallback(()=>{o(null),m(""),c(!1)},[c,o,m]),L=n.useCallback(()=>{j(0),D()},[D,j]);n.useEffect(()=>{j(0),f({})},[s]),n.useEffect(()=>{j(0)},[N]);const I=n.useMemo(()=>e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[e.jsx(H,{type:"text",value:u,onChange:k=>m(k.target.value),placeholder:"Enter your custom query",className:"w-full"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(y,{className:"w-full",onClick:g,title:"Run custom query",children:e.jsx(Jt,{className:"h-5 w-5"})}),e.jsx(y,{className:"w-full",onClick:D,title:"Reset query",children:e.jsx(Yt,{className:"h-5 w-5"})}),e.jsx(y,{className:"w-full",onClick:L,title:"Reset to first page",disabled:h===0,children:e.jsx(Zt,{className:"h-5 w-5"})})]})]}),[u,g,D,L,h]),Z=n.useMemo(()=>E?e.jsxs(qe,{children:["Loading ",b]}):e.jsx("div",{className:"rounded border",children:e.jsx($s,{data:S,columns:T.length>0?T:v,tableName:b,tableSchemas:a})}),[E,S,v,b,a,N,T]);return e.jsxs("div",{className:"flex flex-col gap-3 pb-8",children:[e.jsxs("section",{className:"flex flex-col gap-2 rounded border p-3 pb-2",children:[e.jsxs("div",{className:"flex h-full gap-1",children:[e.jsx(Rs,{}),e.jsxs("div",{className:"ml-1 flex gap-1",children:[e.jsx(qs,{}),e.jsx(y,{className:"hidden expand:block",onClick:()=>p(!x),title:"Toggle page size",children:x?e.jsx(Xt,{className:"h-5 w-5"}):e.jsx(es,{className:"h-5 w-5"})})]})]}),I,r&&e.jsx("p",{className:"text-center text-xs capitalize text-red-500",children:r})]}),Z,!i&&e.jsx(ys,{page:h,setPage:j,rowsPerPage:P})]})}const ze=({shouldScaleBackground:t=!0,...s})=>e.jsx(C.Root,{shouldScaleBackground:t,...s});ze.displayName="Drawer";const zs=C.Trigger,Us=C.Portal,Vs=C.Close,Ue=n.forwardRef(({className:t,...s},a)=>e.jsx(C.Overlay,{ref:a,className:d("fixed inset-0 z-50 bg-black/80",t),...s}));Ue.displayName=C.Overlay.displayName;const Ve=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(Us,{children:[e.jsx(Ue,{}),e.jsxs(C.Content,{ref:r,className:d("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...a,children:[e.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),s]})]}));Ve.displayName="DrawerContent";const _e=({className:t,...s})=>e.jsx("div",{className:d("grid gap-1.5 p-4 text-center sm:text-left",t),...s});_e.displayName="DrawerHeader";const Ke=({className:t,...s})=>e.jsx("div",{className:d("mt-auto flex flex-col gap-2 p-4",t),...s});Ke.displayName="DrawerFooter";const Ge=n.forwardRef(({className:t,...s},a)=>e.jsx(C.Title,{ref:a,className:d("text-lg font-semibold leading-none tracking-tight",t),...s}));Ge.displayName=C.Title.displayName;const We=n.forwardRef(({className:t,...s},a)=>e.jsx(C.Description,{ref:a,className:d("text-sm text-muted-foreground",t),...s}));We.displayName=C.Description.displayName;const Je=n.forwardRef(({className:t,children:s,...a},r)=>e.jsxs(pe,{ref:r,className:d("relative overflow-hidden",t),...a,children:[e.jsx(kt,{className:"h-full w-full rounded-[inherit]",children:s}),e.jsx(Ye,{}),e.jsx(Ot,{})]}));Je.displayName=pe.displayName;const Ye=n.forwardRef(({className:t,orientation:s="vertical",...a},r)=>e.jsx(xe,{ref:r,orientation:s,className:d("flex touch-none select-none transition-colors",s==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...a,children:e.jsx(At,{className:"relative flex-1 rounded-full bg-border"})}));Ye.displayName=xe.displayName;const Ze=n.forwardRef(({className:t,orientation:s="horizontal",decorative:a=!0,...r},o)=>e.jsx(he,{ref:o,decorative:a,orientation:s,className:d("shrink-0 bg-border",s==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));Ze.displayName=he.displayName;const _s=K("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Xe=n.forwardRef(({className:t,...s},a)=>e.jsx(ge,{ref:a,className:d(_s(),t),...s}));Xe.displayName=ge.displayName;const et=n.forwardRef(({className:t,...s},a)=>e.jsx(be,{className:d("grid gap-2",t),...s,ref:a}));et.displayName=be.displayName;const tt=n.forwardRef(({className:t,...s},a)=>e.jsx(ye,{ref:a,className:d("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(It,{className:"flex items-center justify-center",children:e.jsx(ts,{className:"h-2.5 w-2.5 fill-current text-current"})})}));tt.displayName=ye.displayName;const X="rowsPerPage",ee="dateFormat";function Ks(){const{setRowPerPageOrAuto:t,setIsCustomQuery:s,queryHestory:a,dateFormatValue:r,setDateFormatValue:o}=R(),[l,i]=n.useState(null),[c,u]=n.useState(!1);n.useEffect(()=>{const f=localStorage.getItem(X),h=localStorage.getItem(ee);if(f)if(f==="auto")u(!0);else{const j=Number(f);i(j),t(j)}h&&o(h)},[t,o]);const m=n.useCallback(f=>{const h=Number(f.target.value);isNaN(h)||(i(h),u(!1))},[]),x=n.useCallback(()=>{u(f=>!f)},[]),p=n.useCallback(()=>{if(s(!1),l===null){z.error("Please provide a number of rows per page or set it to auto.");return}if(l<1){z.error("Please provide a positive number of rows per page.");return}const f=c?"auto":l.toString();localStorage.setItem(X,f),t(c?"auto":l)},[l,c,s,t]),N=f=>{o(f),localStorage.setItem(ee,f)};return e.jsxs(ze,{children:[e.jsx(zs,{asChild:!0,children:e.jsx(y,{className:"grow",title:"Open settings drawer",children:e.jsx(ss,{className:"h-5 w-5"})})}),e.jsx(Ve,{children:e.jsxs("div",{className:"mx-auto w-full max-w-md",children:[e.jsxs(_e,{children:[e.jsx(Ge,{children:"Settings"}),e.jsx(We,{children:"Personalize your site experience here."})]}),e.jsxs("div",{className:"flex flex-col gap-4 p-4 pb-0",children:[e.jsx(Gs,{selectedRowsPerPage:l,isAutoRowsPerPage:c,handleInputChange:m,toggleAutoRowsPerPage:x,handleRowsPerPageSave:p}),e.jsx(Ws,{dateFormatValue:r,handleDateFormatChange:N}),e.jsx(Js,{queryHestory:a})]}),e.jsx(Ke,{children:e.jsx(Vs,{asChild:!0,children:e.jsx(y,{title:"Close settings drawer",variant:"outline",children:"Close"})})})]})})]})}function Gs({selectedRowsPerPage:t,isAutoRowsPerPage:s,handleInputChange:a,toggleAutoRowsPerPage:r,handleRowsPerPageSave:o}){return e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm text-muted-foreground",children:"Rows Per Page"}),e.jsxs("div",{className:"flex items-center justify-center gap-1 rounded border p-2",children:[e.jsx(H,{value:t||"",onChange:a,disabled:s,placeholder:"Number of rows",type:"number",name:"rowsPerPage"}),e.jsx("span",{className:"h-full text-center text-sm text-muted-foreground",children:"OR"}),e.jsx(y,{className:s?"border border-primary":"",onClick:r,title:"Toggle auto rows per page",variant:"outline",children:"Auto Calculate"})]}),e.jsx(y,{className:"mt-2 w-full",onClick:o,title:"Save rows per page settings",variant:"outline",children:e.jsx("span",{children:"Save"})})]})}function Ws({dateFormatValue:t,handleDateFormatChange:s}){return e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm text-muted-foreground",children:"Date type format"}),e.jsxs(et,{className:"flex flex-col gap-2",name:"dateType",value:t,onValueChange:s,children:[e.jsx(te,{value:"default",label:"Default"}),Object.keys($).map(a=>e.jsx(te,{value:a,label:$[a].label},a))]})]})}function te({value:t,label:s}){return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{value:t,id:`r-${t}`}),e.jsx(Xe,{htmlFor:`r-${t}`,children:s})]})}function Js({queryHestory:t}){return e.jsxs("div",{children:[e.jsxs("p",{className:"mb-1 text-sm text-muted-foreground",children:["Query History (",t.length,")"]}),e.jsx(Je,{className:"h-48 rounded-md border",children:e.jsx("div",{className:"p-4",children:t.map((s,a)=>e.jsxs("div",{children:[e.jsx("div",{className:"text-xs",children:s}),e.jsx(Ze,{className:"my-2"})]},a))})})]})}const se="darkMode",ae="animate-circular-reveal";function st(){const[t,s]=n.useState(!1),a=n.useCallback(o=>{s(o),document.body.classList.toggle("dark",o),localStorage.setItem(se,o.toString()),document.body.classList.add(ae),setTimeout(()=>{document.body.classList.remove(ae)},500)},[]);n.useEffect(()=>{const o=localStorage.getItem(se),l=o!==null?o==="true":window.matchMedia("(prefers-color-scheme: dark)").matches;a(l);const i=u=>{a(u.matches)},c=window.matchMedia("(prefers-color-scheme: dark)");return c.addEventListener("change",i),()=>{c.removeEventListener("change",i)}},[a]);const r=n.useCallback(()=>{a(!t)},[t,a]);return e.jsx(y,{className:"relative grow",onClick:r,title:t?"Enable light mode":"Enable dark mode",children:t?e.jsx(as,{className:"h-5 w-5"}):e.jsx(rs,{className:"h-5 w-5"})})}const Ys={"application/vnd.sqlite3":[".sqlite",".sqlite3"],"application/x-sqlite3":[".sqlite",".sqlite3"],"application/octet-stream":[".db"],"application/sql":[".sql"]},Zs={CHINOOK:"https://github.com/vwh/sqlite-viewer/raw/main/db_examples/chinook.db"};function Xs(){const{loadDatabase:t,setTables:s,setSelectedTable:a,db:r}=R(),[o,l]=n.useState([]),i=n.useCallback(async(p,N)=>{if(l([]),s([]),a("0"),p.length>0&&await t(p[0]),N.length>0){const f=N.flatMap(h=>h.errors);l(f)}},[t,s,a]),{getRootProps:c,getInputProps:u}=ls({onDrop:i,multiple:!1,accept:Ys}),m=n.useCallback(p=>e.jsxs("div",{className:`flex h-full items-center justify-center gap-2 ${p?"px-[10px]":"px-0"}`,children:[e.jsxs("div",{...c(),className:`flex h-full grow cursor-pointer flex-col items-center justify-center rounded border p-6 text-center ${p?"py-0":"py-32"}`,children:[e.jsx("input",{id:"file-upload",...u()}),e.jsx("label",{htmlFor:"file-upload",className:"sr-only",children:"Upload SQLite File"}),e.jsx("p",{className:"hidden sm:block",children:"Drag and drop a SQLite file here, or click to select one"}),e.jsx("p",{className:"block sm:hidden",children:p?"Click to select a file":"Click to select a SQLite file"}),!p&&e.jsx("a",{href:Zs.CHINOOK,className:"text-sm text-link hover:underline",title:"Download sample file",children:"Or download & try this sample file"})]}),p&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(st,{}),e.jsx(Ks,{})]})]}),[c,u]),x=n.useMemo(()=>m(!!r),[m,r]);return e.jsxs("section",{children:[x,e.jsx(ea,{errors:o})]})}const ea=O.memo(({errors:t})=>(O.useEffect(()=>{t==null||t.forEach(s=>z(s.message,{position:"bottom-right"}))},[t]),null));function ta(){const[t,s]=n.useState(()=>document.body.classList.contains("dark"));return n.useEffect(()=>{const a=new MutationObserver(()=>{s(document.body.classList.contains("dark"))});return a.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>a.disconnect()},[]),t}function sa(){const s=ta()?"/sqlite-dark.webp":"/sqlite-light.webp";return e.jsx("section",{className:"flex justify-center rounded border py-3",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("img",{id:"logo",title:"SQLite Logo",src:s,alt:"SQLite Logo",width:"170",height:"80",draggable:"false"}),e.jsx("p",{className:"text-sm",children:"View SQLite files in the browser"})]})})}const aa=$t,ra=Mt,at=n.forwardRef(({className:t,...s},a)=>e.jsx(je,{className:d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...s,ref:a}));at.displayName=je.displayName;const rt=n.forwardRef(({className:t,...s},a)=>e.jsxs(ra,{children:[e.jsx(at,{}),e.jsx(we,{ref:a,className:d("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...s})]}));rt.displayName=we.displayName;const ot=({className:t,...s})=>e.jsx("div",{className:d("flex flex-col space-y-2 text-left",t),...s});ot.displayName="AlertDialogHeader";const nt=({className:t,...s})=>e.jsx("div",{className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s});nt.displayName="AlertDialogFooter";const lt=n.forwardRef(({className:t,...s},a)=>e.jsx(Ne,{ref:a,className:d("text-lg font-semibold",t),...s}));lt.displayName=Ne.displayName;const it=n.forwardRef(({className:t,...s},a)=>e.jsx(ve,{ref:a,className:d("text-sm",t),...s}));it.displayName=ve.displayName;const ct=n.forwardRef(({className:t,...s},a)=>e.jsx(Ce,{ref:a,className:d(J(),t),...s}));ct.displayName=Ce.displayName;const dt=n.forwardRef(({className:t,...s},a)=>e.jsx(Re,{ref:a,className:d(J({variant:"outline"}),"mt-2 sm:mt-0",t),...s}));dt.displayName=Re.displayName;function oa({showDialog:t,setShowDialog:s,fn:a}){return e.jsx(aa,{open:t,onOpenChange:s,children:e.jsxs(rt,{children:[e.jsxs(ot,{children:[e.jsx(lt,{children:"Retry using a proxy?"}),e.jsx(it,{children:"Failed to load the database from the provided URL due to possible CORS restrictions."})]}),e.jsx("div",{className:"text-sm font-semibold",children:"Using the proxy may expose your database to corsproxy.io services."}),e.jsxs(nt,{children:[e.jsx(dt,{onClick:()=>s(!1),children:"Cancel"}),e.jsx(ct,{onClick:a,children:"Confirm"})]})]})})}const na="https://github.com/vwh/sqlite-viewer";function la(){return e.jsxs("footer",{className:"flex items-center justify-between rounded border p-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"hidden text-xs sm:block",children:"No file will be uploaded to server. using JavaScript, sql.js"}),e.jsx("p",{className:"block text-xs sm:hidden",children:"No file uploads to server."}),e.jsxs("a",{href:na,target:"_blank",className:"flex items-center gap-1 text-sm text-link hover:underline",title:"Star on GitHub",children:[e.jsx(os,{className:"h-4 w-4"}),e.jsx("span",{children:"Star us on GitHub"})]})]}),e.jsx("div",{className:"flex gap-1",children:e.jsx(st,{})})]})}function ia(){const{db:t,tables:s,isLoading:a,loadDatabase:r,expandPage:o}=R(),[l,i]=n.useState(null),[c,u]=n.useState(!1),[m,x]=n.useState(null),[p,N]=n.useState(!1),f=n.useRef(!1),h=n.useCallback(async(b,S=!1)=>{if(!/^(https?:\/\/(?:www\.)?[a-zA-Z0-9-]{1,256}\.[a-zA-Z]{2,6}(?:\/[^\s]*)?)$/i.test(b)){i("Invalid URL");return}try{N(!0);const E=S?`https://corsproxy.io/?${encodeURIComponent(b)}`:b,g=await fetch(E);if(!g.ok)throw new Error("URL not found or invalid");const T=await g.blob(),F=new File([T],"database.sqlite");await r(F),i(null)}catch(E){S?i(`Error whilefetching, ${E instanceof Error?E.message:String(E)}`):(x(b),u(!0))}finally{N(!1)}},[r]);n.useEffect(()=>{if(f.current)return;const S=new URLSearchParams(window.location.search).get("url");S&&(h(decodeURIComponent(S)),f.current=!0)},[h]);const j=n.useCallback(()=>{m&&(h(m,!0),u(!1))},[m,h]),P=()=>a||p?e.jsxs(qe,{children:[p?"Fetching":"Loading"," SQLite file"]}):l&&!t?e.jsx(_,{children:l}):t?s.length>0?e.jsx(Bs,{}):e.jsx(_,{children:"Your database is empty, no tables found"}):null;return e.jsxs("main",{className:`mx-auto flex h-screen flex-col gap-3 p-4 ${o?"w-full":"container"}`,children:[!t&&e.jsx(sa,{}),e.jsx(Xs,{}),P(),e.jsx(oa,{showDialog:c,setShowDialog:u,fn:j}),!t&&e.jsx(la,{})]})}const ca=({...t})=>e.jsx(is,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-primary group-[.toaster]:text-background group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});pt.createRoot(document.getElementById("root")).render(e.jsxs(O.StrictMode,{children:[e.jsx(ia,{}),e.jsx(ca,{})]})); diff --git a/assets/index-C6RQFSoa.js.gz b/assets/index-C6RQFSoa.js.gz new file mode 100644 index 0000000..c49ac51 Binary files /dev/null and b/assets/index-C6RQFSoa.js.gz differ diff --git a/assets/index-CSFft99D.css b/assets/index-CR9ThQaM.css similarity index 62% rename from assets/index-CSFft99D.css rename to assets/index-CR9ThQaM.css index 7bb89b1..2f1dd60 100644 --- a/assets/index-CSFft99D.css +++ b/assets/index-CR9ThQaM.css @@ -1 +1 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 87%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 80%;--input: 240 5.9% 80%;--link: 198, 100%, 16%;--ring: 240 5.9% 10%;--radius: .5rem}.dark{--background: 0 0% 5.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--link: 198, 100%, 60%;--ring: 0 0% 83.1%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.bottom-\[8px\]{bottom:8px}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-40{max-height:10rem}.max-h-96{max-height:24rem}.w-10{width:2.5rem}.w-2\.5{width:.625rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-80{width:20rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[270px\]{width:270px}.w-full{width:100%}.min-w-\[100px\]{min-width:100px}.min-w-\[150px\]{min-width:150px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-\[200px\]{max-width:200px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes circular-reveal{0%{clip-path:circle(0% at 50% 50%)}to{clip-path:circle(150% at 50% 50%)}}.animate-circular-reveal{animation:circular-reveal .3s ease-in-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.p-\[6px\]{padding:6px}.px-0{padding-left:0;padding-right:0}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[10px\]{padding-left:10px;padding-right:10px}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-32{padding-top:8rem;padding-bottom:8rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-8{padding-bottom:2rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-current{color:currentColor}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-link{color:hsl(var(--link))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline-offset-4{text-underline-offset:4px}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary,.group.toaster .group-\[\.toaster\]\:bg-primary{background-color:hsl(var(--primary))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-background{color:hsl(var(--background))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:hidden{display:none}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:min-w-\[200px\]{min-width:200px}.md\:flex-row{flex-direction:row}}@media (min-width: 1430px){.expand\:block{display:block}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 87%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 80%;--input: 240 5.9% 80%;--link: 198, 100%, 16%;--ring: 240 5.9% 10%;--radius: .5rem}.dark{--background: 0 0% 5.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--link: 198, 100%, 60%;--ring: 0 0% 83.1%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.bottom-\[8px\]{bottom:8px}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-40{max-height:10rem}.max-h-96{max-height:24rem}.w-10{width:2.5rem}.w-2\.5{width:.625rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-80{width:20rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[270px\]{width:270px}.w-full{width:100%}.min-w-\[100px\]{min-width:100px}.min-w-\[150px\]{min-width:150px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-\[200px\]{max-width:200px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes circular-reveal{0%{clip-path:circle(0% at 50% 50%)}to{clip-path:circle(150% at 50% 50%)}}.animate-circular-reveal{animation:circular-reveal .3s ease-in-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.p-\[6px\]{padding:6px}.px-0{padding-left:0;padding-right:0}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[10px\]{padding-left:10px;padding-right:10px}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-32{padding-top:8rem;padding-bottom:8rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-8{padding-bottom:2rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-current{color:currentColor}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-link{color:hsl(var(--link))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline-offset-4{text-underline-offset:4px}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary,.group.toaster .group-\[\.toaster\]\:bg-primary{background-color:hsl(var(--primary))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-background{color:hsl(var(--background))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:hidden{display:none}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:min-w-\[200px\]{min-width:200px}.md\:flex-row{flex-direction:row}}@media (min-width: 1430px){.expand\:block{display:block}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/assets/index-CSFft99D.css.gz b/assets/index-CR9ThQaM.css.gz similarity index 72% rename from assets/index-CSFft99D.css.gz rename to assets/index-CR9ThQaM.css.gz index 6a8a5fd..f496f36 100644 Binary files a/assets/index-CSFft99D.css.gz and b/assets/index-CR9ThQaM.css.gz differ diff --git a/index.html b/index.html index fbcf22b..eaadd74 100644 --- a/index.html +++ b/index.html @@ -90,7 +90,7 @@ as="image" type="image/webp" /> - + @@ -119,7 +119,7 @@ - +
diff --git a/index.html.gz b/index.html.gz index 74b0230..97c34ad 100644 Binary files a/index.html.gz and b/index.html.gz differ diff --git a/sw.js b/sw.js index 265c027..1148273 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let u={};const t=s=>l(s,n),o={module:{uri:n},exports:u,require:t};e[n]=Promise.all(r.map((s=>o[s]||t(s)))).then((s=>(i(...s),u)))}}define(["./workbox-7cfec069"],(function(s){"use strict";self.addEventListener("message",(s=>{s.data&&"SKIP_WAITING"===s.data.type&&self.skipWaiting()})),s.precacheAndRoute([{url:"assets/@floating-ui-DGkE6due.js",revision:null},{url:"assets/@radix-ui-Dtk-Z1Mr.js",revision:null},{url:"assets/aria-hidden-DQ5UC2Eg.js",revision:null},{url:"assets/attr-accept-BWI1aNlo.js",revision:null},{url:"assets/class-variance-authority-Bb4qSo10.js",revision:null},{url:"assets/clsx-B-dksMZM.js",revision:null},{url:"assets/date-fns-fqmN70Xj.js",revision:null},{url:"assets/detect-node-es-l0sNRNKZ.js",revision:null},{url:"assets/file-saver-DhbZvGod.js",revision:null},{url:"assets/file-selector-CBHVlu32.js",revision:null},{url:"assets/get-nonce-C-Z93AgS.js",revision:null},{url:"assets/index-BIG7Mclk.js",revision:null},{url:"assets/index-CSFft99D.css",revision:null},{url:"assets/lucide-react-UOeYhQAl.js",revision:null},{url:"assets/prop-types-psm7UO16.js",revision:null},{url:"assets/react-DmpIMwDM.js",revision:null},{url:"assets/react-dom-tIxIBQuZ.js",revision:null},{url:"assets/react-dropzone-D-IBOhIS.js",revision:null},{url:"assets/react-remove-scroll-bar-DZjhPxUV.js",revision:null},{url:"assets/react-remove-scroll-BOyN_WUU.js",revision:null},{url:"assets/react-style-singleton-CpxBwIWS.js",revision:null},{url:"assets/scheduler-CzFDRTuY.js",revision:null},{url:"assets/sonner-BJG0sXho.js",revision:null},{url:"assets/sql.js-lzln2bbd.js",revision:null},{url:"assets/tailwind-merge-BkWO730n.js",revision:null},{url:"assets/tslib-CuZy2iRz.js",revision:null},{url:"assets/use-callback-ref-DRzK4jWO.js",revision:null},{url:"assets/use-sidecar-D8_hMcUG.js",revision:null},{url:"assets/use-sync-external-store-ByYeed7R.js",revision:null},{url:"assets/vaul-Bkmv171v.js",revision:null},{url:"assets/zustand-B1IM3DrU.js",revision:null},{url:"index.html",revision:"83d360fc2773664aa8f44a25474e282b"},{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"sql.wasm",revision:"8f5029a1d3545424d4f25647673e5e32"},{url:"manifest.webmanifest",revision:"662c9ac5fe5300a257a596b0ad6130ea"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))})); +if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let u={};const t=s=>l(s,n),o={module:{uri:n},exports:u,require:t};e[n]=Promise.all(r.map((s=>o[s]||t(s)))).then((s=>(i(...s),u)))}}define(["./workbox-7cfec069"],(function(s){"use strict";self.addEventListener("message",(s=>{s.data&&"SKIP_WAITING"===s.data.type&&self.skipWaiting()})),s.precacheAndRoute([{url:"assets/@floating-ui-DGkE6due.js",revision:null},{url:"assets/@radix-ui-Dtk-Z1Mr.js",revision:null},{url:"assets/aria-hidden-DQ5UC2Eg.js",revision:null},{url:"assets/attr-accept-BWI1aNlo.js",revision:null},{url:"assets/class-variance-authority-Bb4qSo10.js",revision:null},{url:"assets/clsx-B-dksMZM.js",revision:null},{url:"assets/date-fns-fqmN70Xj.js",revision:null},{url:"assets/detect-node-es-l0sNRNKZ.js",revision:null},{url:"assets/file-saver-DhbZvGod.js",revision:null},{url:"assets/file-selector-CBHVlu32.js",revision:null},{url:"assets/get-nonce-C-Z93AgS.js",revision:null},{url:"assets/index-C6RQFSoa.js",revision:null},{url:"assets/index-CR9ThQaM.css",revision:null},{url:"assets/lucide-react-UOeYhQAl.js",revision:null},{url:"assets/prop-types-psm7UO16.js",revision:null},{url:"assets/react-DmpIMwDM.js",revision:null},{url:"assets/react-dom-tIxIBQuZ.js",revision:null},{url:"assets/react-dropzone-D-IBOhIS.js",revision:null},{url:"assets/react-remove-scroll-bar-DZjhPxUV.js",revision:null},{url:"assets/react-remove-scroll-BOyN_WUU.js",revision:null},{url:"assets/react-style-singleton-CpxBwIWS.js",revision:null},{url:"assets/scheduler-CzFDRTuY.js",revision:null},{url:"assets/sonner-BJG0sXho.js",revision:null},{url:"assets/sql.js-lzln2bbd.js",revision:null},{url:"assets/tailwind-merge-BkWO730n.js",revision:null},{url:"assets/tslib-CuZy2iRz.js",revision:null},{url:"assets/use-callback-ref-DRzK4jWO.js",revision:null},{url:"assets/use-sidecar-D8_hMcUG.js",revision:null},{url:"assets/use-sync-external-store-ByYeed7R.js",revision:null},{url:"assets/vaul-Bkmv171v.js",revision:null},{url:"assets/zustand-B1IM3DrU.js",revision:null},{url:"index.html",revision:"00271fab0d1c3a1139310a7499c53f7f"},{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"sql.wasm",revision:"8f5029a1d3545424d4f25647673e5e32"},{url:"manifest.webmanifest",revision:"662c9ac5fe5300a257a596b0ad6130ea"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));