PageSourceSearch

https://getmost.co.uk/assets/_authenticated-DkVgU1kY.js

js getmost.co.uk collected 2026-09-25 03:19:09 UTC 12,872 bytes, 1 lines download raw bytes

1import{G as f,av as L,at as S,as as M,A as E,s as A,aj as k,af as I,a9 as P,au as O,a2 as e,L as o,E as m,R as w,aq as _,ab as g,O as R,ar as z,M as T,S as F}from"./index-CQi9qSYE.js";import{q as W}from"./tax-mot-workflow-CE0HjyrQ.js";import{S as U,e as q,a as D,d as B}from"./sheet-dFJjrhy1.js";import{u as H}from"./use-auth-Txai6NFD.js";import{l as $,a as Q,u as V,S as G}from"./list-chats-DDm03t-I.js";import{S as j}from"./skeleton-BHnXwMtV.js";import{a as K}from"./update-profile-DEWpxVDu.js";import"./index-B1a6bamn.js";import{M as X}from"./menu-kb8t8wGQ.js";import{U as Y}from"./user-DWPNOorK.js";import"./index-R0e9mo9X.js";import"./index-DqI2sGPX.js";import"./users-ByeFumsK.js";import"./referral-surface-BCzmnIP0.js";import"./piggy-bank-C0vZL6nq.js";import"./plus-sm2q_W1U.js";import"./loader-circle-DTQEfrnB.js";import"./chevron-left-BbsZkNWl.js";import"./launch-money-fundamentals-report-chat-Ce2nkhkd.js";import"./trending-up-47huRBa5.js";import"./use-tax-mot-list-CYaBIkns.js";import"./index-LopwljBB.js";const Z=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],J=f("circle-plus",Z);const ee=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],te=f("list-checks",ee);const se=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],re=f("log-out",se);const ne=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],ae=f("message-circle",ne),oe=()=>{const t=L(),r=S(),{mutateAsync:s,...l}=M({mutationFn:async()=>(await A("/auth/logout",{method:"POST"}).catch(n=>{console.error("Error signing out",n)}),k("auth_logout",{}),I(),t.removeQueries(),P(),r({to:"/"}),{}),onError:n=>{E(n)}});return{logout:s,...l}},le=()=>{const{data:t,isLoading:r,error:s}=O({queryKey:["chats"],queryFn:$});return{chats:t,isLoading:r,error:s}},ie=()=>e.jsxs("div",{className:"overflow-y-auto pt-5",children:[e.jsx(j,{className:"h-3 w-14 mx-6 mb-3"}),["a","b","c","d","e","f"].map((t,r)=>e.jsxs("div",{className:"flex items-center gap-2 px-8 py-2 m-[2px]",children:[e.jsx(j,{className:"size-4 rounded-full shrink-0"}),e.jsx(j,{className:"h-4 flex-1",style:{width:`${60+r*17%30}%`}})]},t))]}),ce=({onClose:t,selectedChatId:r})=>{const{chats:s,isLoading:l,error:n}=le();return l?e.jsx(ie,{}):n?(console.error(n),e.jsx("div",{className:"text-red-900",children:"Something went wrong, please try again later."})):s?.length?e.jsxs("div",{className:"overflow-y-auto pt-5",children:[e.jsx("div",{className:"font-semibold text-xs px-6 text-neutral-400",children:"Recents"}),e.jsx("div",{children:s.map(a=>e.jsxs(o,{to:w.CHAT_WITH_ID(a.id),className:m("px-8 py-2 m-[2px] rounded-lg hover:bg-neutral-100/80 flex items-center gap-2 text-neutral-500 transition-colors",{"bg-neutral-100/80":r===a.id}),onClick:()=>{k("chat_opened",{chat_id:a.id}),t()},children:[e.jsx(ae,{className:"size-4"}),e.jsx("p",{className:"flex-1 truncate",children:a.title||"Untitled conversation"})]},a.id))})]}):e.jsx("div",{})},de=({children:t,className:r,neutral:s,...l})=>e.jsx("a",{className:m("hover:underline",s?"text-neutral-500 hover:text-neutral-400":"text-yellow-600 hover:text-yellow-500",r),target:"_blank",rel:"noopener",...l,children:t}),xe=({className:t})=>e.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:m("shrink-0 text-neutral-400",t),children:[e.jsx("path",{d:"M4.5 1.75h6.25a1 1 0 0 1 1 1v10.5a1 1 0 0 1-1 1H4.5a1 1 0 0 1-1-1V2.75a1 1 0 0 1 1-1Z",stroke:"currentColor",strokeWidth:"1.25"}),e.jsx("path",{d:"M4.5 12.25 3.25 13.5V2.75",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M5.5 5.25h5M5.5 7.5h5M5.5 9.75h3.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})]}),b=["firstName","lastName","dateOfBirth"],he=t=>{if(!t)return 0;const r=b.filter(s=>t[s]!=null).length;return Math.round(r/b.length*100)},v=40,N=2*Math.PI*v,ue=({percentage:t,size:r=100})=>{const s=N-t/100*N;return e.jsxs("svg",{width:r,height:r,viewBox:"0 0 100 100",className:"-rotate-90",role:"img","aria-label":`Profile completion: ${t}%`,children:[e.jsx("circle",{cx:"50",cy:"50",r:v,fill:"none",stroke:"currentColor",strokeWidth:"8",className:"text-muted"}),e.jsx("circle",{cx:"50",cy:"50",r:v,fill:"none",stroke:"currentColor",strokeWidth:"8",strokeDasharray:N,strokeDashoffset:s,strokeLinecap:"round",className:"text-orange-300 transition-all duration-500"}),e.jsxs("text",{x:"50",y:"50",textAnchor:"middle",dominantBaseline:"central",className:"fill-foreground rotate-90 origin-center text-lg font-semibold",children:[t,"%"]})]})},me=({onClose:t})=>{const{data:r}=K(),s=he(r);return s===100?null:e.jsx("div",{className:"m-3 bg-gradient-to-br from-orange-300 to-yellow-300 rounded-[21px] p-px",children:e.jsxs("div",{className:"p-4 rounded-[20px] bg-white",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h2",{className:"font-semibold text-base text-orange-300",children:[e.jsx("img",{src:"/chat-assets/stars.svg",alt:"Stars",className:"size-8 inline-block mr-2"})," Personalisation"]}),e.jsx(ue,{percentage:s,size:64})]}
1),e.jsx("p",{className:"text-sm text-neutral-400 font-medium mt-3 mb-5",children:"Complete your profile to get more relevant and better responses"}),e.jsx(o,{to:"/profile",onClick:t,className:"inline-flex items-center justify-center px-6 py-3 text-base font-medium rounded-md text-white bg-orange-300 hover:bg-orange-200 transition-colors",children:"Get started"})]})})};function pe(){const t=z();for(const r of t){const s=r.params;if(s.chatId)return s.chatId}return null}function ge({email:t,isAdmin:r,onClose:s,onLogout:l,onLogoutEverywhere:n,isLoggingOut:a,isLoggingOutEverywhere:h}){const[i,d]=g.useState(!1),x=g.useRef(null);g.useEffect(()=>{if(!i)return;const u=p=>{x.current&&!x.current.contains(p.target)&&d(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[i]);const c=()=>{d(!1),s()};return e.jsxs("div",{ref:x,className:"relative mx-3 mb-3",children:[i&&e.jsxs("div",{className:"absolute bottom-full left-0 right-0 mb-1 bg-white rounded-lg shadow-lg border border-neutral-100 overflow-hidden",children:[e.jsxs(o,{to:"/profile",onClick:c,className:"flex items-center gap-3 px-4 py-3 text-sm text-neutral-500 hover:bg-neutral-100/50 transition-colors",children:[e.jsx(Y,{className:"size-4 text-neutral-300"}),"Profile"]}),e.jsxs(o,{to:"/settings/sessions",onClick:c,className:"flex items-center gap-3 px-4 py-3 text-sm text-neutral-500 hover:bg-neutral-100/50 transition-colors",children:[e.jsx(T,{className:"size-4 text-neutral-300"}),"Sessions"]}),r&&e.jsxs(e.Fragment,{children:[e.jsx("hr",{className:"border-neutral-100"}),e.jsxs(o,{to:"/admin",onClick:c,className:"flex items-center gap-3 px-4 py-3 text-sm text-neutral-500 hover:bg-neutral-100/50 transition-colors",children:[e.jsx(G,{className:"size-4 text-neutral-300"}),"Admin"]})]}),e.jsx("hr",{className:"border-neutral-100"}),e.jsxs("button",{type:"button",onClick:()=>{n(),c()},disabled:h,className:"flex items-center gap-3 w-full px-4 py-3 text-sm text-red-600 hover:bg-red-50 transition-colors cursor-pointer disabled:opacity-50",children:[e.jsx(F,{className:"size-4 text-red-400"}),"Sign out everywhere"]}),e.jsx("hr",{className:"border-neutral-100"}),e.jsxs("button",{type:"button",onClick:()=>{l(),c()},disabled:a,className:"flex items-center gap-3 w-full px-4 py-3 text-sm text-neutral-500 hover:bg-neutral-100/50 transition-colors cursor-pointer disabled:opacity-50",children:[e.jsx(re,{className:"size-4 text-neutral-300"}),"Log out"]})]}),e.jsx("button",{type:"button",onClick:()=>d(!i),className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg hover:bg-white/80 transition-colors cursor-pointer",children:e.jsx("span",{className:"text-white text-sm font-medium size-8 bg-green-500 rounded-full flex items-center justify-center shrink-0",children:t.charAt(0).toUpperCase()})})]})}function y({onClose:t,email:r,isAdmin:s,onLogout:l,onLogoutEverywhere:n,isLoggingOut:a,isLoggingOutEverywhere:h}){const i=pe();return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsx("div",{className:"px-6 pt-6 pb-4",children:e.jsx(o,{to:"/",onClick:t,children:e.jsxs("picture",{children:[e.jsx("source",{srcSet:"/chat-assets/logo.webp",type:"image/webp"}),e.jsx("source",{srcSet:"/chat-assets/logo.png",type:"image/png"}),e.jsx("img",{src:"/chat-assets/logo.png",alt:"Most logo",className:"w-32 h-8 object-cover"})]})})}),e.jsx("hr",{className:"border-neutral-100 mx-6"}),e.jsxs("div",{className:"mx-3 my-2 space-y-0.5",children:[e.jsxs(o,{to:"/chat/g",onClick:t,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium text-neutral-400 transition-colors hover:bg-neutral-100/60",children:[e.jsx(J,{className:"size-4 shrink-0 text-neutral-400",strokeWidth:2,"aria-hidden":!0}),"New chat"]}),e.jsxs(o,{to:"/fundamentals",onClick:t,className:"flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm font-medium text-neutral-400 transition-colors hover:bg-neutral-100/60",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(te,{className:"size-4 shrink-0 text-neutral-400",strokeWidth:2,"aria-hidden":!0}),"Your Fundamentals"]}),e.jsx("span",{className:"shrink-0 rounded-full bg-green-200 px-2 py-0.5 text-xs font-semibold text-green-500",children:"New"})]}),e.jsxs(o,{to:"/tax-mot",onClick:t,className:"flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm font-medium text-neutral-400 transition-colors hover:bg-neutral-100/60",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(xe,{className:"size-4 text-neutral-400"}),"Tax MOT"]}),e.jsx("span",{className:"shrink-0 rounded-full bg-green-200 px-2 py-0.5 text-xs font-semibold text-green-500",children:"New"})]})]}),e.jsx("hr",{className:"border-neutral-100 mx-6"}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx(ce,{onClose:t,selectedChatId:i})}),e.jsx(me,{onClose:t}),e.jsx("hr",{className:"border-neutral-100 mx-3"}),e.jsx(ge,{email:r,isAdmin:s,onClose:t,onLogout:l,onLogoutEverywhere:n,isLoggingOut:a,isLoggingOutEverywhere:h})]})}function Ue(){return e.jsx(Q,{children:e.jsx(fe,{})})}function fe(){const{user:t}=H(),{logout:r,isPending:s}=oe(),{logoutEverywhere:l,isPending:n}=_(),{abortAll:a}=V(),[h,i]=g.useState(!1),d=t?.email??"",x=t?.roles?.includes("ADMIN")??!1,c=W({select:C=>C.location.pathname.startsWith("/chat/g")}),u=()=>{a(),r()},p=()=>{a(),l()};return e.jsxs("div",{className:"lg:flex",children:[e.jsx("aside",{className:"hidden lg:flex lg:flex-col lg:w-80 h-dvh border-r border-neutral-100 bg-white",children:e.jsx(y,{onClose:()=>{},email:d,isAdmin:x,onLogout:u,onLogoutEverywhere:p,isLoggingOut:s,isLoggingOutEverywhere:n})}),e.jsxs("div",{className:"flex-1 flex flex-col h-dvh bg-[#F9FAFB]",children:[e.jsx("header",{className:"px-4 lg:hidden",children:e.jsx("nav",{className:"flex justify-between items-center h-16",children:e.jsxs("div",{className:"flex items-center",children:[e.jsxs(U,{open:h,onOpenChange:i,children:[e.jsx(q,{asChild:!0,children:e.jsx("button",{type:"button",className:"mr-2 p-2 rounded-md text-neutral-400 hover:text-neutral-500 hover:bg-neutral-100/50 transition-colors","aria-label":"Open sidebar",children:e.jsx(X,{className:"size-5"})})}),e.jsxs(D,{side:"left",className:"w-full sm:w-80 p-0",children:[e.jsx(B,{className:"sr-only",children:"Navigation"}),e.jsx(y,{onClose:()=>i(!1),email:d,isAdmin:x,onLogout:u,onLogoutEverywhere:p,isLoggingOut:s,isLoggingOutEverywhere:n})]})]}),e.jsx(o,{to:"/",children:e.jsx("img",{src:"/chat-assets/logo-small.png",alt:"Most logo",className:"h-8"})})]})})}),e.jsxs("div",{className:m("flex min-h-0 flex-1 flex-col",c?"overflow-hidden":"overflow-y-auto"),children:[e.jsx("main",{className:m(c?"flex min-h-0 flex-1 flex-col overflow-hidden":"grow shrink-0"),children:e.jsx(R,{})}),e.jsx("footer",{className:"shrink-0 py-4 px-6 text-center text-xs text-neutral-300",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 text-sm text-gray-500",children:[e.jsx(o,{to:"/home",className:"text-neutral-500 hover:text-neutral-400 hover:underline",children:"About"}),e.jsx("span",{children:"•"}),e.jsx(o,{to:"/financial-guidance",className:"text-neutral-500 hover:text-neutral-400 hover:underline",children:"Adv
1isers"}),e.jsx("span",{children:"•"}),e.jsx(de,{neutral:!0,href:w.EXTERNAL.SUPPORT_EMAIL,children:"[email protected]"})]})})]})]})]})}export{Ue 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.