PageSourceSearch

https://thingbits.in/_next/static/chunks/0qx_hqfuumx4e.js

js thingbits.in collected 2026-10-07 15:27:35 UTC 4,960 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47408,e=>{"use strict";let a=(0,e.i(524638).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["AlertTriangle",0,a],47408)},470497,e=>{"use strict";var a=e.i(522071),s=e.i(47408),r=e.i(353263),t=e.i(483165),l=e.i(188073),i=e.i(411752),c=e.i(451343),n=e.i(279578),o=e.i(766020),d=e.i(19811),x=e.i(391220),u=e.i(633459),h=e.i(727552),m=e.i(557951),g=e.i(841642),f=e.i(954203),p=e.i(109599);let b=[{href:"/account/overview",label:"Overview",icon:l.Home},{href:"/account/orders",label:"Orders",icon:n.ShoppingBag},{href:"/account/wishlists",label:"Wishlists",icon:t.Heart},{href:"/account/addresses",label:"Addresses",icon:c.MapPin},{href:"/account/gift-cards",label:"Gift Cards",icon:r.Gift},{href:"/account/profile",label:"Profile",icon:o.User}];function y(){return(0,a.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,a.jsx)("div",{className:"h-8 bg-gray-200 rounded w-1/3"}),(0,a.jsx)("div",{className:"h-4 bg-gray-200 rounded w-2/3"}),(0,a.jsx)("div",{className:"h-32 bg-gray-200 rounded"}),(0,a.jsx)("div",{className:"h-32 bg-gray-200 rounded"})]})}function j({children:e,basePath:r,pathname:t,user:l,onLogout:c,isLoading:n}){let o=b.find(e=>t.startsWith(`${r}${e.href}`)),x=(0,f.getCustomerPrimaryContact)(l??{}),u=!!l&&(0,f.needsContactCompletion)(l),m=[{label:"Account",href:`${r}/account/overview`},...o&&"/account/overview"!==o.href?[{label:o.label}]:[]];return(0,a.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 w-full flex-grow",children:[(0,a.jsx)(h.Breadcrumbs,{basePath:r,items:m,className:"mb-6 flex text-sm text-gray-500"}),(0,a.jsxs)("div",{className:"flex flex-col lg:flex-row gap-4 lg:gap-6",children:[(0,a.jsxs)("aside",{className:"w-full lg:w-72 shrink-0 bg-white border border-gray-200 rounded-2xl shadow-sm overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-6 border-b border-gray-100",children:n?(0,a.jsxs)("div",{className:"animate-pulse space-y-2",children:[(0,a.jsx)("div",{className:"h-4 bg-gray-200 rounded w-24"}),(0,a.jsx)("div",{className:"h-3 bg-gray-200 rounded w-32"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"font-bold text-gray-900 text-[15px] mb-0.5",children:l?.first_name?`${l.first_name} ${l.last_name||""}`.trim():"My Account"}),x?(0,a.jsx)("span",{className:"text-[13px] font-medium text-gray-500",children:x}):null]})}),(0,a.jsx)("nav",{className:"flex-1 flex flex-col py-3",children:b.map(e=>{let l=`${r}${e.href}`,i=t.startsWith(l),c="/account/profile"===e.href&&u;return(0,a.jsxs)(d.default,{href:l,className:`flex items-center gap-4 px-6 py-3 text-sm transition-colors border-l-[3px] ${i?"bg-gray-50/80 text-gray-900 font-bold border-blue-600":"text-gray-600 font-medium border-transparent hover:bg-gray-50 hover:text-blue-600 hover:border-blue-300"}`,children:[(0,a.jsx)(e.icon,{className:`w-4 h-4 ${i?"text-gray-700":"text-gray-400"}`}),(0,a.jsx)("span",{children:e.label}),c&&(0,a.jsx)(s.AlertTriangle,{className:"w-3.5 h-3.5 text-amber-500 ml-auto shrink-0","aria-label":"Profile needs attention"})]},e.href)})}),(0,a.jsx)("div",{className:"border-t border-gray-100 p-2",children:(0,a.jsxs)("button",{type:"button",onClick:c,disabled:n,className:"flex items-center gap-3 px-4 py-3.5 font-bold text-gray-800 hover:bg-gray-50 transition-colors rounded-xl w-full cursor-pointer disabled:opacity-50",children:[(0,a.jsx)(i.LogOut,{className:"w-4 h-4"}),(0,a.jsx)("span",{className:"text-sm",children:"Sign Out"})]})})]}),(0,a.jsx)("div",{className:"flex-1 w-full pt-1",children:e})]})]})}e.s(["default",0,function({children:e}){let s=(0,x.usePathname)(),r=(0,x.useRouter)(),t=(0,x.useSearchParams)(),l=(0,p.extractBasePath)(s),{user:i,logout:c,isAuthenticated:n,loading:o,refreshUser:d}=(0,m.useAuth)(),h=(0,g.getSafePostLoginRedirect)(t.get("redirect"),`${l}/account/overview`),f=s===`${l}/account/register`||s===`${l}/account/forgot-password`||s===`${l}/account/reset-password`,b=s===`${l}/account`;(0,u.useEffect)(()=>{!s||o||!n||f||b||d()},[s,o,n,f,b,d]),(0,u.useEffect)(()=>{!o&&(n&&b?r.replace(h):n||f||b||r.replace((0,g.buildLoginRedirectPath)(s,t,`${l}/account`)))},[o,n,f,b,l,s,t,h,r]);let v=!n&&!f&&!b||n&&b;return o||v?f||b?(0,a.jsx)("div",{className:"max-w-md mx-auto px-4 sm:px-6 lg:px-8 py-16",children:(0,a.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,a.jsx)("div",{className:"h-8 bg-gray-200 rounded w-1/2 mx-auto"}),(0,a.jsx)("div",{className:"h-4 bg-gray-200 rounded w-3/4 mx-auto"}),(0,a.jsx)("div",{className:"h-48 bg-gray-200 rounded"})]})}):(0,a.jsx)(j,{basePath:l,pathname:s,isLoading:!0,children:(0,a.jsx)(y,{})}):f||!n?(0,a.jsx)(a.Fragment,{children:e}):(0,a.jsx)(j,{basePath:l,pathname:s,user:i,onLogout:c,children:e})}])}]);

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.