PageSourceSearch

https://sticklight.com/assets/app/index-BR6K2de-.js

js sticklight.com collected 2026-09-25 20:54:35 UTC 7,972 bytes, 1 lines download raw bytes

1import{ai as E,aj as L,c as ie,j as s,N as J,cU as ne,T as b,h as le,r as me,bf as fe,W as ae,by as se}from"./CommandPaletteGate-gsCMafFE.js";import{a as ue,u as I}from"./auth-middleware-C_PoOk_R.js";import{f as oe,x as he,m as de}from"./Alert-CIzYJKrm.js";import{U as V,K as xe,M as ge}from"./index-BBq9Xabe.js";import{a as be}from"./Input-Cu0jrEv6.js";import{d as pe}from"./checkbox-C01enc7F.js";import{F as ye}from"./file-text-BJJ5DnDJ.js";import{T as je}from"./trash-2-BeYIG_jZ.js";import{C as ve}from"./check-DiMT35fy.js";import"./index-BZvgLf6H.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0725db9b-403c-4e6d-8425-acbadaf875d0",e._sentryDebugIdIdentifier="sentry-dbid-0725db9b-403c-4e6d-8425-acbadaf875d0")}catch{}const Ne=E({method:"GET"}).handler(L("9c5fbf27f37529e86b6e82b400adb032e11f0f6f5b80efc9caabcbeb89fa64ec"));E({method:"GET"}).handler(L("6155e7001c83a7dac3b922056f03405ea1a8343cc420585844310861e9001d2f"));const Te=E({method:"POST"}).handler(L("d714f38d11e6da47b7f7e5fcfc13b0a3a378b4587bdfeb871841aed41297c2c0")),we=E({method:"POST"}).handler(L("d97bd9f50abd6b93ca5a81c912ed2299577d9ef6b489e56a063e18615970f93d")),_e=E({method:"POST"}).handler(L("64e08f1c203b0012625a3516708456db86ee302029051d909df317dec5425182")),Se=E({method:"GET"}).middleware([ue]).handler(L("02eebaafa4a11fed2406efd61d3bd3f7706e9f63a430c4b8755ea7a928da19df"));function Pe(e){const t=ie.c(19),{todos:h,isLoading:o,error:x,onToggle:r,onDelete:c,isUpdating:m,isDeleting:f}=e;if(o){let a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex flex-col gap-3",role:"status","aria-label":"loading",children:[...Array(3)].map(Fe)}),t[0]=a):a=t[0],a}if(x){let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ne,{className:"h-4 w-4"}),t[1]=a):a=t[1];let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(de,{children:s.jsx(b,{variant:"body1",i18nKey:"todos.errorLoading"})}),t[2]=n):n=t[2];let g;return t[3]!==x.message?(g=s.jsxs(oe,{variant:"destructive",children:[a,n,s.jsx(he,{children:x.message})]}),t[3]=x.message,t[4]=g):g=t[4],g}if(!h||h.length===0){let a;return t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(V,{className:"p-8",children:s.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[s.jsx(ye,{className:"h-12 w-12 text-muted-foreground mb-4","aria-hidden":"true"}),s.jsx(b,{variant:"h6",i18nKey:"todos.noTodos",className:"mb-2 text-foreground"}),s.jsx(b,{variant:"body2",i18nKey:"todos.noTodosDescription",className:"text-muted-foreground"})]})}),t[5]=a):a=t[5],a}let d;if(t[6]!==f||t[7]!==m||t[8]!==c||t[9]!==r||t[10]!==h){let a;t[12]!==f||t[13]!==m||t[14]!==c||t[15]!==r?(a=n=>s.jsx(V,{className:"p-4 transition-all hover:shadow-md",role:"listitem",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(pe,{checked:n.completed,onCheckedChange:()=>r(n),disabled:m,className:"h-5 w-5"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:`text-base ${n.completed?"text-muted-foreground line-through":"text-foreground"}`,children:n.title}),s.jsx(b,{variant:"caption",i18nKey:"todos.created",values:{date:new Date(n.createdAt).toLocaleDateString()},className:"text-xs text-muted-foreground"})]}),s.jsx(le,{variant:"ghost",size:"icon",onClick:()=>c(n.id),disabled:f,children:s.jsx(je,{className:"h-4 w-4"})})]})},n.id),t[12]=f,t[13]=m,t[14]=c,t[15]=r,t[16]=a):a=t[16],d=h.map(a),t[6]=f,t[7]=m,t[8]=c,t[9]=r,t[10]=h,t[11]=d}else d=t[11];let u;return t[17]!==d?(u=s.jsx("div",{className:"flex flex-col gap-3 mt-3",role:"list",children:d}),t[17]=d,t[18]=u):u=t[18],u}function Fe(e,t){return s.jsx(V,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(J,{className:"h-5 w-5 rounded"}),s.jsxs("div",{className:"flex-1 space-y-3",children:[s.jsx(J,{className:"h-4 w-3/4"}),s.jsx(J,{className:"h-3 w-1/4"})]}),s.jsx(J,{className:"h-8 w-8 rounded"})]})},t)}function Qe(){const e=ie.c(70),[t,h]=me.useState(""),o=fe(),x=I(Ne),r=I(Te),c=I(we),m=I(_e),f=I(Se);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=["todos"],e[0]=d):d=e[0];let u;e[1]!==x?(u={queryKey:d,queryFn:()=>x()},e[1]=x,e[2]=u):u=e[2];const{data:a,isLoading:n,error:g}=ae(u);let M;e[3]===Symbol.for("react.memo_cache_sentinel")?(M=["auth"],e[3]=M):M=e[3];let Q;e[4]!==f?(Q={queryKey:M,queryFn:()=>f()},e[4]=f,e[5]=Q):Q=e[5];const{data:p,isLoading:X}=ae(Q);let y;e[6]!==r?(y=l=>r({data:{title:l}}),e[6]=r,e[7]=y):y=e[7];let j;e[8]!==o?(j=()=>{o.invalidateQueries({queryKey:["todos"]}),h("")},e[8]=o,e[9]=j):j=e[9];let $;e[10]!==y||e[11]!==j?($={mutationFn:y,onSuccess:j},e[10]=y,e[11]=j,e[12]=$):$=e[12];const i=se($);let v;e[13]!==c?(v=l=>{const{id:re,completed:ce}=l;return c({data:{id:re,data:{completed:ce}}})},e[13]=c,e[14]=v):v=e[14];let N;e[15]!==o?(N=()=>{o.invalidateQueries({queryKey:["todos"]})},e[15]=o,e[16]=N):N=e[16];let U;e[17]!==v||e[18]!==N?(U={mutationFn:v,onSuccess:N},e[17]=v,e[18]=N,e[19]=U):U=e[19];const T=se(U);let w;e[20]!==m?(w=l=>m({data:l}),e[20]=m,e[21]=w):w=e[21];let _;e[22]!==o?(_=()=>{o.invalidateQueries({queryKey:["todos"]})},e[22]=o,e[23]=_):_=e[23];let G;e[24]!==w||e[25]!==_?(G={mutationFn:w,onSuccess:_},e[24]=w,e[25]=_,e[26]=G):G=e[26];const S=se(G);let O;e[27]!==i||e[28]!==t?(O=l=>{l.preventDefault(),t.trim()&&(console.log({newTodoTitle:t}),i.mutate(t))},e[27]=i,e[28]=t,e[29]=O):O=e[29];const Y=O;let R;e[30]!==T?(R=l=>{T.mutate({id:l.id,completed:!l.completed})},e[30]=T,e[31]=R):R=e[31];const Z=R;let z;e[32]!==S?(z=l=>{S.mutate(l)},e[32]=S,e[33]=z):z=e[33];const ee=z;let B;e[34]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(xe,{children:s.jsx(b,{variant:"h1",i18nKey:"todos.title",className:"text-foreground"})}),e[34]=B):B=e[34];let P;e[35]!==p||e[36]!==X?(P=!X&&p&&s.jsxs("div",{className:"mb-4 flex items-center gap-2 rounded-lg bg-blue-50 p-4",children:[s.jsx(ve,{className:"h-5 w-5 text-blue-700"}),s.jsx(b,{variant:"body1",i18nKey:"todos.auth.authenticated",values:{user:p.name||p.email||p.userId},className:"text-blue-700"})]}),e[35]=p,e[36]=X,e[37]=P):P=e[37];let W;e[38]===Symbol.for("react.memo_cache_sentinel")?(W=l=>h(l.target.value),e[38]=W):W=e[38];let F;e[39]!==i.isPending||e[40]!==t?(F=s.jsx(be,{type:"text",value:t,onChange:W,placeholder:"Add a new todo...",className:"flex-1",disabled:i.isPending}),e[39]=i.isPending,e[40]=t,e[41]=F):F=e[41];let K;e[42]!==i.isPending||e[43]!==t?(K=i.isPending||!t.trim(),e[42]=i.isPending,e[43]=t,e[44]=K):K=e[44];const te=i.isPending?"todos.adding":"todos.addButton";let D;e[45]!==te?(D=s.jsx(b,{i18nKey:te,variant:"caption"}),e[45]=te,e[46]=D):D=e[46];let C;e[47]!==i.isPending||e[48]!==K||e[49]!==D?(C=s.jsx(le,{type:"submit",disabled:K,loading:i.isPending,children:D}),e[47]=i.isPending,e[48]=K,e[49]=D,e[50]=C):C=e[50];let k;e[51]!==Y||e[52]!==F||e[53]!==C?(k=s.jsxs("form",{onSubmit:Y,className:"mb-6 flex gap-2",children:[F,C]}),e[51]=Y,e[52]=F,e[53]=C,e[54]=k):k=e[54];let q;e[55]!==i.error?(q=i.error&&s.jsxs(oe,{variant:"destructive",className:"mb-4",children:[s.jsx(ne,{className:"h-4 w-4"}),s.jsx(de,{children:s.jsx(b,{variant:"body2",i18nKey:"todos.errorCreating",values:{message:i.error.message}})})]}),e[55]=i.error,e[56]=q):q=e[56];let A;e[57]!==S.isPending||e[58]!==g||e[59]!==ee||e[60]!==Z||e[61]!==n||e[62]!==a||e[63]!==T.isPending?(A=s.jsx(Pe,{todos:a,isLoading:n,error:g,onToggle:Z,onDelete:ee,isU
1pdating:T.isPending,isDeleting:S.isPending}),e[57]=S.isPending,e[58]=g,e[59]=ee,e[60]=Z,e[61]=n,e[62]=a,e[63]=T.isPending,e[64]=A):A=e[64];let H;return e[65]!==P||e[66]!==k||e[67]!==q||e[68]!==A?(H=s.jsx("div",{className:"min-h-screen bg-background py-8",children:s.jsx("div",{className:"mx-auto max-w-3xl px-4",children:s.jsxs(V,{children:[B,s.jsxs(ge,{children:[P,k,q,A]})]})})}),e[65]=P,e[66]=k,e[67]=q,e[68]=A,e[69]=H):H=e[69],H}export{Qe as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.