PageSourceSearch

https://geltoynation.com/assets/account-rb_BJp2s.js

js geltoynation.com collected 2026-10-04 02:39:48 UTC 6,948 bytes, 1 lines download raw bytes

1import{ag as o,Y as x,ah as m,c as u,a9 as f,ai as h,aa as p,k as b,Z as g,aj as j,j as e,l as N,F as y,s as v,P as w,L as k,T as S,ak as d}from"./index-BCW6nnV8.js";import{M as C}from"./mail-BtjO9jke.js";import{L as T}from"./log-out-Djy8vhZ5.js";function L(r,t){return o({...r,enabled:!0,suspense:!0,throwOnError:m,placeholderData:void 0},x)}const O=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],q=u("refresh-cw",O),D=f({method:"GET"}).middleware([h]).handler(p("1b59486dfcf6a141a7e13bad5ca07b039bfa8ef600257872ff7525866b9bb9a5"));function Q(){const r=b(D),t=g(),a=j(),{data:s}=L({queryKey:["my-orders"],queryFn:()=>r(),staleTime:3e4}),n=async()=>{await t.cancelQueries(),t.clear(),await v.auth.signOut(),a.navigate({to:"/",replace:!0})};return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(N,{}),e.jsx("main",{className:"flex-1 bg-background",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 md:px-6 py-10",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4 mb-8",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"font-display text-3xl md:text-4xl font-extrabold uppercase tracking-wider",children:["My ",e.jsx("span",{className:"text-brand",children:"Orders"})]}),e.jsxs("p",{className:"mt-2 text-sm text-muted-foreground flex items-center gap-2",children:[e.jsx(C,{className:"h-4 w-4"})," Signed in as ",e.jsx("span",{className:"text-foreground font-medium",children:s.email})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>t.invalidateQueries({queryKey:["my-orders"]}),className:"inline-flex items-center gap-2 h-10 px-4 rounded-lg border border-border bg-surface/40 text-sm font-semibold hover:bg-surface transition",children:[e.jsx(q,{className:"h-4 w-4"})," Refresh"]}),e.jsxs("button",{onClick:n,className:"inline-flex items-center gap-2 h-10 px-4 rounded-lg border border-border bg-surface/40 text-sm font-semibold hover:bg-surface transition",children:[e.jsx(T,{className:"h-4 w-4"})," Sign out"]})]})]}),s.error?e.jsx(i,{title:"Couldn't load your orders",message:s.error}):s.orders.length===0?e.jsx(i,{title:"No orders yet",message:`We didn't find any orders placed with ${s.email}. If you checked out with a different email, sign in with that one.`}):e.jsx("ul",{className:"space-y-5",children:s.orders.map(l=>e.jsx(M,{order:l},l.id))})]})}),e.jsx(y,{})]})}function i({title:r,message:t}){return e.jsxs("div",{className:"rounded-2xl border border-border bg-surface/30 p-10 text-center",children:[e.jsx(w,{className:"h-10 w-10 text-muted-foreground mx-auto mb-3"}),e.jsx("h2",{className:"font-display text-lg font-bold uppercase tracking-wider",children:r}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground max-w-md mx-auto",children:t}),e.jsx(k,{to:"/shop",className:"mt-5 inline-flex h-10 px-5 items-center justify-center rounded-lg bg-brand text-brand-foreground text-sm font-bold uppercase tracking-wider hover:brightness-110",children:"Shop the store"})]})}function M({order:r}){const t=new Date(r.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),a=r.fulfillments.filter(s=>s.trackingNumber);return e.jsxs("li",{className:"rounded-2xl border border-border bg-surface/30 overflow-hidden",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 px-5 py-4 border-b border-border bg-surface/40",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1",children:[e.jsxs("span",{className:"font-display text-lg font-bold tracking-wider",children:["Order ",r.name]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Placed ",t]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(c,{label:r.fulfillmentStatus??"Unfulfilled",variant:"fulfillment"}),e.jsx(c,{label:r.financialStatus??"—",variant:"financial"})]})]}),e.jsxs("div",{className:"px-5 py-4 space-y-4",children:[e.jsx("ul",{className:"space-y-3",children:r.lineItems.map((s,n)=>e.jsxs("li",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-12 w-12 rounded-md bg-background border border-border overflow-hidden flex-shrink-0",children:s.image&&e.jsx("img",{src:s.image,alt:"",className:"h-full w-full object-cover"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),s.variantTitle&&s.variantTitle!=="Default Title"&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.variantTitle})]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["× ",s.quantity]})]},n))}),a.length>0&&e.jsxs("div",{className:"rounded-lg border border-border bg-background p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs uppercase tracking-wider font-semibold text-brand",children:[e.jsx(S,{className:"h-4 w-4"})," Tracking"]}),a.map((s,n)=>e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"font-medium",children:[s.trackingCompany??"Carrier"," · ",s.trackingNumber]}),s.estimatedDelivery&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Est. delivery ",new Date(s.estimatedDelivery).toLocaleDateString()]})]}),s.trackingUrl&&e.jsxs("a",{href:s.trackingUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-semibold text-brand hover:underline",children:["Track package ",e.jsx(d,{className:"h-3.5 w-3.5"})]})]},n))]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 pt-2 border-t border-border",children:[e.jsxs("span",{className:"text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Total: "}),e.jsxs("span",{className:"font-bold",children:[r.currency," ",parseFloat(r.totalPrice).toFixed(2)]})]}),r.orderStatusUrl&&e.jsxs("a",{href:r.orderStatusUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-semibold text-foreground hover:text-brand",children:["View order status page ",e.jsx(d,{className:"h-3.5 w-3.5"})]})]})]})]})}function c({label:r,variant:t}){const a=r.toLowerCase(),s=a.includes("fulfilled")||a.includes("paid")?"bg-emerald-500/15 text-emerald-400 border-emerald-500/30":a.includes("partial")||a.includes("pending")?"bg-amber-500/15 text-amber-400 border-amber-500/30":a.includes("refund")||a.includes("void")||a.includes("cancel")?"bg-red-500/15 text-red-400 border-red-500/30":"bg-muted/40 text-muted-foreground border-border";return e.jsxs("span",{className:`px-2.5 py-1 rounded-full text-[10px] uppercase tracking-wider font-bold border ${s}`,children:[t==="fulfillment"?"Shipping: ":"Payment: ",r]})}export{Q 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.