PageSourceSearch

https://mindtrip.ai/_next/static/chunks/1857-fc9a14e4c14ac91b.js

js mindtrip.ai collected 2026-10-02 02:34:15 UTC 93,450 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1857],{2015:(e,t,a)=>{a.d(t,{Z:()=>b});var s=a(37876),r=a(27964),n=a(14232),i=a(7010),l=a(4294),o=a(45254);class c extends o.S{async submit(e){await this.post("/api/feedback",e)}}var d=a(93125),m=a(69165),h=a(32516),x=a(58025),u=a(20658),p=a(54160),f=a(80416),j=a(49320),g=a(76270);let v=[{value:"bug",label:"Something isn't working",emoji:"\uD83D\uDC1B"},{value:"feature_request",label:"I have an idea",emoji:"\uD83D\uDCA1"},{value:"general_feedback",label:"General feedback",emoji:"\uD83D\uDCAC"},{value:"translation",label:"Translation issue",emoji:"\uD83C\uDF10",placeholder:"Tell us what's mistranslated, awkward, or still in English, and where you saw it…"}];function b(e){let t,a,o,b,N,w,C=(0,r.c)(18),{open:S,onOpenChange:k,initialCategory:z}=e,G=void 0===z?"bug":z,[V,L]=(0,n.useState)(G),[A,T]=(0,n.useState)(""),[R,F]=(0,n.useState)(!1),[P,M]=(0,n.useState)(null),$="en"===(0,h.GV)(x.zi)?v.filter(_):v;C[0]!==V?(t=v.find(e=>e.value===V),C[0]=V,C[1]=t):t=C[1];let E=t,[O,B]=(0,n.useState)(!1);C[2]!==G?(a=()=>{L(G),T(""),F(!1),M(null),B(!1)},C[2]=G,C[3]=a):a=C[3];let I=a;C[4]!==V||C[5]!==A?(o=async e=>{if(e.preventDefault(),!A.trim())return void M("Please describe your feedback.");B(!0),M(null);try{let e=new c((0,l.Q)());await e.submit({category:V,comment:A.trim(),page_url:m.T.origin+m.T.pathname+m.T.search}),F(!0)}catch{M("Something went wrong. Please try again."),B(!1)}},C[4]=V,C[5]=A,C[6]=o):o=C[6];let K=o,U=p.lG;C[7]!==k||C[8]!==I?(b=e=>{e||(k(!1),setTimeout(I,i.Xx))},C[7]=k,C[8]=I,C[9]=b):b=C[9];let W=p.Cf,J=R?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.c7,{separator:!1,children:(0,s.jsx)(p.L3,{children:d.Ay})}),(0,s.jsx)(p.R4,{children:(0,s.jsx)("div",{className:"text-center text-5xl",children:"\uD83D\uDE4F"})}),(0,s.jsx)(p.Es,{children:(0,s.jsx)(p.HM,{render:(0,s.jsx)(u.$,{variant:"primary",className:"mx-auto",children:"Close"})})})]}):(0,s.jsxs)("form",{onSubmit:K,className:"contents",children:[(0,s.jsx)(p.c7,{separator:!1,children:(0,s.jsx)(p.L3,{children:"Share your feedback"})}),(0,s.jsxs)(p.R4,{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{id:"feedback-category-label",className:"mb-1.5 block text-sm font-semibold",children:"What’s on your mind?"}),(0,s.jsxs)(j.l6,{value:V,onValueChange:e=>{null!=e&&L(e),P&&M(null)},children:[(0,s.jsx)(j.bq,{"aria-labelledby":"feedback-category-label",children:(0,s.jsxs)("span",{className:"flex flex-1 text-left",children:[E?.emoji," ",E?.label]})}),(0,s.jsx)(j.gC,{children:$.map(y)})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"feedback-comment",className:"mb-1.5 block text-sm font-semibold",children:"Tell us more"}),(0,s.jsx)(g.T,{id:"feedback-comment",rows:5,maxLength:2e3,placeholder:E?.placeholder??"Describe what happened, or what you'd love to see…",value:A,onChange:e=>{T(e.target.value),P&&M(null)},required:!0})]}),P&&(0,s.jsx)(f.K,{className:"text-xs",children:P})]}),(0,s.jsx)(p.Es,{children:(0,s.jsx)(u.$,{type:"submit",variant:"primary",className:"mx-auto",disabled:O,children:O?(0,s.jsx)("span",{children:"Sending…"}):(0,s.jsx)("span",{children:"Send Feedback"})})})]});return C[10]!==W||C[11]!==J?(N=(0,s.jsx)(W,{children:J}),C[10]=W,C[11]=J,C[12]=N):N=C[12],C[13]!==U||C[14]!==S||C[15]!==b||C[16]!==N?(w=(0,s.jsx)(U,{open:S,onOpenChange:b,children:N}),C[13]=U,C[14]=S,C[15]=b,C[16]=N,C[17]=w):w=C[17],w}function y(e){return(0,s.jsxs)(j.eb,{value:e.value,children:[e.emoji," ",e.label]},e.value)}function _(e){return"translation"!==e.value}},17023:(e,t,a)=>{a.d(t,{X:()=>l});var s=a(27964),r=a(14232),n=a(34265),i=a(17921);function l(e,t,a){let l,o,c=(0,s.c)(8),{durationMs:d,pauseMs:m,enabled:h}=a,x=void 0===h||h,u=(0,r.useRef)(0),p=n.h.useIsEnglish();c[0]!==d||c[1]!==x||c[2]!==p||c[3]!==m||c[4]!==e||c[5]!==t?(l=()=>{let a,s,r=e&&"current"in e?e.current:e;if(!r||!x||!t?.length)return;let n=()=>{if(u.current=u.current%t.length,!p){if(r.placeholder=t[u.current],1===t.length)return;s=window.setTimeout(()=>{u.current=u.current+1,n()},d+m);return}r.placeholder="",a=(0,i.p)(t[u.current],d,e=>{r.placeholder=e},()=>{1!==t.length&&(s=window.setTimeout(()=>{u.current=u.current+1,n()},m))})};return n(),()=>{a?.(),void 0!==s&&window.clearTimeout(s)}},o=[e,t,d,m,x,p],c[0]=d,c[1]=x,c[2]=p,c[3]=m,c[4]=e,c[5]=t,c[6]=l,c[7]=o):(l=c[6],o=c[7]),(0,r.useLayoutEffect)(l,o)}},17921:(e,t,a)=>{a.d(t,{p:()=>s});function s(e,t,a,s){let r,n=t/e.length,i=0,l=()=>{var t;let o;(i+=1,a(e.slice(0,i)),i>=e.length)?s?.():r=window.setTimeout(l,(t=e[i-1],o=.7+.6*Math.random()," "===t&&(o*=1.3),","===t&&(o*=2.8),/[.!?;:—]/.test(t)&&(o*=3.5),"\n"===t&&(o*=4),n*o))};
1return r=window.setTimeout(l,n),()=>window.clearTimeout(r)}},19364:(e,t,a)=>{a.d(t,{I:()=>d});var s=a(37876),r=a(27964),n=a(18847),i=a.n(n),l=a(42512),o=a(32516);let c=i()(()=>a.e(7593).then(a.bind(a,7593)).then(e=>e.DialogContainer),{loadableGenerated:{webpack:()=>[7593]},ssr:!1});function d(){let e,t=(0,r.c)(2),a=(0,o.GV)(l.t4);if(void 0===a)return null;let n="xs"===a;return t[0]!==n?(e=(0,s.jsx)(c,{isMobile:n}),t[0]=n,t[1]=e):e=t[1],e}},20607:(e,t,a)=>{a.d(t,{Ue:()=>s,Yp:()=>r,cD:()=>l,g5:()=>n,kT:()=>i});let s=50,r=2e3,n=6,i=["5-day Tokyo trip this October","Somewhere warm with 3 kids","A week in Portugal under $2,000"],l="Start a new chat for this trip"},26807:(e,t,a)=>{a.d(t,{A:()=>j});var s=a(37876),r=a(27964),n=a(14232),i=a(71767),l=a(34265),o=a(49329),c=a(44724),d=a(98347),m=a(95826),h=a(98312),x=a(54160),u=a(50436),p=a(5528),f=a(11857);function j(e){let t,a,l,c,m,p,j,v,b,y,_,N,w,C,S,k=(0,r.c)(42),{open:z,onOpenChange:G,chatId:V,chatName:L,currentTripRef:A,onMoveSuccess:T}=e;k[0]!==V||k[1]!==A||k[2]!==T||k[3]!==G||k[4]!==z?(t={chatId:V,currentTripRef:A,open:z,onOpenChange:G,onMoveSuccess:T},k[0]=V,k[1]=A,k[2]=T,k[3]=G,k[4]=z,k[5]=t):t=k[5];let{trips:R,isLoading:F,isFetching:P,hasMoreTrips:M,handleLoadMoreTrips:$,handleTripSelect:E,handleCreateNewTrip:O}=(0,i.p)(t);k[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)("li",{"aria-hidden":!0,className:"mx-1",children:(0,s.jsx)(f.w,{className:"bg-gray-3"})}),k[6]=a):a=k[6];let B=a;return k[7]===Symbol.for("react.memo_cache_sentinel")?(l=(0,s.jsx)(x.L3,{children:"Move chat to trip"}),k[7]=l):l=k[7],k[8]!==L?(c=L&&(0,s.jsx)(x.rr,{className:"no-translate text-foreground",children:L}),k[8]=L,k[9]=c):c=k[9],k[10]!==c?(m=(0,s.jsxs)(x.c7,{children:[l,c]}),k[10]=c,k[11]=m):m=k[11],k[12]===Symbol.for("react.memo_cache_sentinel")?(p=(0,s.jsx)("span",{className:"flex size-16 items-center justify-center rounded-xl bg-black text-white",children:(0,s.jsx)(o.A,{size:32})}),j=(0,s.jsx)("span",{className:"text-md font-semibold",children:"New trip"}),k[12]=p,k[13]=j):(p=k[12],j=k[13]),k[14]!==O?(v=(0,s.jsx)("li",{children:(0,s.jsxs)(h.S,{as:"div",className:"group relative z-1 -mx-2 -my-px flex items-center gap-4 roun
1ded-2xl p-2 hover:bg-subtle",onClick:O,children:[p,j]})}),k[14]=O,k[15]=v):v=k[15],k[16]!==F?(b=F&&(0,s.jsxs)(s.Fragment,{children:[B,(0,s.jsx)("li",{children:(0,s.jsx)("div",{className:"flex h-20 items-center justify-center",children:(0,s.jsx)(u.R,{})})})]}),k[16]=F,k[17]=b):b=k[17],k[18]!==E||k[19]!==F||k[20]!==R?(y=!F&&R.map(e=>(0,s.jsxs)(n.Fragment,{children:[B,(0,s.jsx)("li",{children:(0,s.jsx)(g,{trip:e,onSelect:E})})]},e.ref)),k[18]=E,k[19]=F,k[20]=R,k[21]=y):y=k[21],k[22]!==$||k[23]!==M||k[24]!==P?(_=M&&!P&&(0,s.jsxs)(s.Fragment,{children:[B,(0,s.jsx)("li",{children:(0,s.jsxs)(h.S,{as:"div",className:"group relative z-1 -mx-2 -my-px flex items-center gap-4 rounded-2xl p-2 hover:bg-subtle",onClick:$,children:[(0,s.jsx)("span",{className:"flex size-16 items-center justify-center rounded-xl bg-gray-8 text-white",children:(0,s.jsx)(d.A,{size:32})}),(0,s.jsx)("span",{className:"text-md font-semibold",children:"See more"})]})})]}),k[22]=$,k[23]=M,k[24]=P,k[25]=_):_=k[25],k[26]!==P||k[27]!==F?(N=P&&!F&&(0,s.jsxs)(s.Fragment,{children:[B,(0,s.jsx)("li",{children:(0,s.jsx)("div",{className:"flex h-20 items-center justify-center",children:(0,s.jsx)(u.R,{})})})]}),k[26]=P,k[27]=F,k[28]=N):N=k[28],k[29]!==y||k[30]!==_||k[31]!==N||k[32]!==v||k[33]!==b?(w=(0,s.jsx)(x.R4,{children:(0,s.jsxs)("ul",{className:"-my-2",children:[v,b,y,_,N]})}),k[29]=y,k[30]=_,k[31]=N,k[32]=v,k[33]=b,k[34]=w):w=k[34],k[35]!==w||k[36]!==m?(C=(0,s.jsxs)(x.Cf,{size:"md",children:[m,w]}),k[35]=w,k[36]=m,k[37]=C):C=k[37],k[38]!==G||k[39]!==z||k[40]!==C?(S=(0,s.jsx)(x.lG,{open:z,onOpenChange:G,children:C}),k[38]=G,k[39]=z,k[40]=C,k[41]=S):S=k[41],S}function g(e){let t,a,n,i,o,d,x,u,f,j,g,v=(0,r.c)(30),{trip:b,onSelect:y}=e,_=l.h.useFormatTimeFrame(),N=l.h.useFormatDayCount();v[0]!==_||v[1]!==b.time_frame?(t=_(b.time_frame),v[0]=_,v[1]=b.time_frame,v[2]=t):t=v[2];let w=t;v[3]!==N||v[4]!==b.draft_duration?(a=b.draft_duration?N(b.draft_duration):void 0,v[3]=N,v[4]=b.draft_duration,v[5]=a):a=v[5];let C=a;v[6]!==y||v[7]!==b?(n=()=>y(b),v[6]=y,v[7]=b,v[8]=n):n=v[8],v[9]!==b.cover_photo?(i=(0,s.jsx)("span",{className:"relative flex size-16 shrink-0 items-center justify-center overflow-hidden rounded-xl bg-gray-8",children:b.cover_photo?(0,s.jsx)(p.$,{src:b.cover_photo,width:"sm",className:"absolute inset-0 size-full",alt:""}):(0,s.jsx)(c.A,{size:16,className:"text-white"})}),v[9]=b.cover_photo,v[10]=i):i=v[10],v[11]!==b.name?(o=(0,s.jsx)("div",{className:"no-translate block truncate text-md font-semibold",children:b.name}),v[11]=b.name,v[12]=o):o=v[12],v[13]!==b.stops_area_name?(d=b.stops_area_name&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"no-translate",children:b.stops_area_name}),(0,s.jsx)("span",{className:"mx-1",children:"\xb7"})]}),v[13]=b.stops_area_name,v[14]=d):d=v[14];let S=w||C;return v[15]!==S?(x=(0,s.jsx)("span",{className:"no-translate",children:S}),v[15]=S,v[16]=x):x=v[16],v[17]!==b.user_refs?(u=b.user_refs.length>1&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"mx-1",children:"\xb7"}),(0,s.jsx)(m.u,{size:"3xs",userRefs:b.user_refs})]}),v[17]=b.user_refs,v[18]=u):u=v[18],v[19]!==d||v[20]!==x||v[21]!==u?(f=(0,s.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-0.5 text-xs",children:[d,x,u]}),v[19]=d,v[20]=x,v[21]=u,v[22]=f):f=v[22],v[23]!==f||v[24]!==o?(j=(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[o,f]}),v[23]=f,v[24]=o,v[25]=j):j=v[25],v[26]!==j||v[27]!==n||v[28]!==i?(g=(0,s.jsxs)(h.S,{as:"div",className:"group relative z-1 -mx-2 -my-px flex items-center gap-4 roun
1ded-2xl p-2 hover:bg-subtle",onClick:n,children:[i,j]}),v[26]=j,v[27]=n,v[28]=i,v[29]=g):g=v[29],g}},27249:(e,t,a)=>{a.d(t,{s:()=>m});var s=a(27964),r=a(14232),n=a(42925),i=a(66811),l=a(42409),o=a(32516),c=a(23120),d=a(24387);function m(e){let t,a,m,h,x,u=(0,s.c)(11);u[0]!==e?(t=void 0===e?{}:e,u[0]=e,u[1]=t):t=u[1];let{listenToScroll:p}=t,f=void 0!==p&&p,j=(0,o.jL)(),g=(0,i.r)(),v=(0,n.T)(),b=(0,o.GV)(c.wO),y=(0,o.GV)(l.qi),_=(0,o.GV)(l.jw),N=(0,o.GV)(l.L$),w=(0,r.useRef)(0);u[2]!==g?(a=(0,d.bN)(g),u[2]=g,u[3]=a):a=u[3];let C=a;u[4]!==j?(m=()=>{let{scrollTop:e,scrollHeight:t,clientHeight:a}=document.documentElement;if(e<=40){j((0,c.e0)(!0)),w.current=e;return}if(Math.abs(e-w.current)>=100){let s=e<w.current;s&&e<t-a-100?j((0,c.e0)(!0)):!s&&e>100&&j((0,c.e0)(!1)),w.current=e}},u[4]=j,u[5]=m):m=u[5];let S=m;return u[6]!==S||u[7]!==C||u[8]!==f?(h=()=>{if(f&&!C)return window.addEventListener("scroll",S,{passive:!0}),()=>window.removeEventListener("scroll",S)},x=[S,C,f],u[6]=S,u[7]=C,u[8]=f,u[9]=h,u[10]=x):(h=u[9],x=u[10]),(0,r.useEffect)(h,x),C&&!N&&(y||!_)||(!C||v)&&b}}
1,31845:(e,t,a)=>{a.d(t,{M0:()=>O,Hw:()=>E,iT:()=>$});var s=a(37876),r=a(9419),n=a.n(r),i=a(27964),l=a(14232),o=a(27249),c=a(74302),d=a(66811),m=a(42409),h=a(32516),x=a(24387),u=a(14e3),p=a(99385),f=a(42925),j=a(78498),g=a(18564),v=a(27414),b=a(53934),y=a(53784),_=a(23120),N=a(61955),w=a(40336),C=a(26360),S=a(44724),k=a(59859),z=a(50511),G=a(14149),V=a(18766),L=a(30469),A=a(28104),T=a(94516);function R(e){let t,a,r,n=(0,i.c)(12),{href:l,icon:o,label:c,isActive:d,onClick:m,children:h}=e,x=d?"page":void 0;return n[0]!==o||n[1]!==h||n[2]!==d?(t=h||(0,s.jsx)(o,{size:28,fill:d?"currentColor":void 0}),n[0]=o,n[1]=h,n[2]=d,n[3]=t):t=n[3],n[4]!==c?(a=(0,s.jsx)("span",{children:c}),n[4]=c,n[5]=a):a=n[5],n[6]!==l||n[7]!==m||n[8]!==x||n[9]!==t||n[10]!==a?(r=(0,s.jsxs)(A.N,{href:l,onClick:m,"aria-current":x,children:[t,a]}),n[6]=l,n[7]=m,n[8]=x,n[9]=t,n[10]=a,n[11]=r):r=n[11],r}function F(e){let t,a,r,n=(0,i.c)(40),{visible:l}=e,o=(0,g.Bd)(),c=(0,d.r)(),m=(0,h.jL)(),A=(0,h.GV)(C.zW),F=(0,f.T)(),{data:P}=(0,v.HX)(),M=P?.count??0,$=(0,h.GV)(C.zG),E=(0,p.M)(),O=(0,h.GV)(_.IO),B=(0,u.usePathname)();n[0]!==B?(t=(0,x._m)(B),n[0]=B,n[1]=t):t=n[1];let I=t;n[2]!==I?(a=e=>(0,w.Pe)(e,I),n[2]=I,n[3]=a):a=n[3];let K=(0,h.GV)(a);if(n[4]!==O||n[5]!==m||n[6]!==A||n[7]!==F||n[8]!==E||n[9]!==B||n[10]!==c||n[11]!==o||n[12]!==K||n[13]!==M||n[14]!==$||n[15]!==l){let e,t,a,i,d,h,u,p,f,g=B;("/updates"===g||"/create"===g||"/admin"===g||"/settings"===g||g===`/profile/${$}`||g.startsWith("/dashboard")||g.startsWith("/saved")||E)&&(g="/you"),(g.startsWith("/trip/")||g.startsWith("/receipts"))&&(g="/trips"),g.startsWith("/agents")&&(g="/agents"),n[17]!==c?(e=(0,x.bN)(c),n[17]=c,n[18]=e):e=n[18];let v=e;(0,x.RO)(g,K)&&(g="/trips");let w=e=>g===e||g.includes(e);n[19]!==O||n[20]!==m||n[21]!==c?(t=e=>{e.preventDefault(),(0,x.bN)(c)?m((0,_.Tj)(!0)):null===O?m((0,N.jv)({router:c})):m((0,y.ug)({router:c,chatId:O}))},n[19]=O,n[20]=m,n[21]=c,n[22]=t):t=n[22];let C=t;n[23]!==o?(a=o("navHome"),n[23]=o,n[24]=a):a=n[24],n[25]!==F||n[26]!==a?(i=(0,s.jsx)(R,{href:j.rL,icon:z.A,label:a,isActive:F}),n[25]=F,n[26]=a,n[27]=i):i=n[27],n[28]!==o?(d=o("navChat"),n[28]=o,n[29]=d):d=n[29];let P=v&&!K;n[30]!==C||n[31]!==d||n[32]!==P?(h=(0,s.jsx)(R,{href:"/chat",icon:k.A,label:d,isActive:P,onClick:C}),n[30]=C,n[31]=d,n[32]=P,n[33]=h):h=n[33],n[34]!==o?(u=o("navTrips"),n[34]=o,n[35]=u):u=n[35],n[36]!==o?(p=o("navAgents"),n[36]=o,n[37]=p):p=n[37],n[38]!==o?(f=o("navExplore"),n[38]=o,n[39]=f):f=n[39],r=(0,s.jsxs)("nav",{"aria-hidden":!l,className:"relative z-1 flex h-(--bottom-nav-height) items-start border-t bg-background pt-2.5 text-4xs text-gray-9 contain-[paint] *:flex *:flex-1 *:flex-col *:items-center *:justify-center *:gap-0.5 peer-not-empty/page:border-t-0 **:aria-[current]:font-medium **:aria-[current]:text-foreground",children:[i,h,(0,s.jsx)(R,{href:"/trips",icon:S.A,label:u,isActive:w("/trips")}),(0,s.jsx)(R,{href:"/agents",icon:L.A,label:p,isActive:w("/agents")}),(0,s.jsx)(R,{href:"/explore",icon:V.A,label:f,isActive:w("/explore")}),A?(0,s.jsxs)("button",{type:"button",onClick:()=>void m((0,b.xb)({})),children:[(0,s.jsx)(G.A,{size:28}),(0,s.jsx)("span",{children:o("navLogIn")})]}):(0,s.jsx)(R,{href:"/you",icon:G.A,label:o("navYou"),isActive:w("/you"),children:(0,s.jsxs)("span",{className:"relative",children:[(0,s.jsx)(T.H,{size:"xs",className:w("/you")?"border-2 border-foreground":void 0}),M>0&&(0,s.jsx)("span",{className:"absolute top-0 -right-0.5 size-2.5 rounded-full border-2 border-background bg-red-10"})]})})]}),n[4]=O,n[5]=m,n[6]=A,n[7]=F,n[8]=E,n[9]=B,n[10]=c,n[11]=o,n[12]=K,n[13]=M,n[14]=$,n[15]=l,n[16]=r}else r=n[16];return r}let P=(0,l.createContext)({pageSlot:null}),M=(0,l.createContext)(null);function $(){return(0,l.useContext)(P)}function E(e){let t,a,r,n=(0,i.c)(6),{children:o}=e,[c,d]=(0,l.useState)(null);return n[0]===Symbol.for("react.memo_cache_sentinel")?(t={setPageSlot:d},n[0]=t):t=n[0],n[1]!==c?(a={pageSlot:c},n[1]=c,n[2]=a):a=n[2],n[3]!==o||n[4]!==a?(r=(0,s.jsx)(M.Provider,{value:t,children:(0,s.jsx)(P.Provider,{value:a,children:o})}),n[3]=o,n[4]=a,n[5]=r):r=n[5],r}function O(){let e=(0,d.r)(),t=(0,o.s)({listenToScroll:!0}),a=(0,h.GV)(m.wA),r=(0,h.GV)(m.L$),i=(0,x.bN)(e)&&(a||r),u=(0,l.useContext)(M);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n(),{id:"ca4133ce94c63e74",dynamic:[t?"var(--bottom-nav-height,0px)":"env(safe-area-inset-bottom,0px)"],children:`:root{--bottom-nav-height:calc(4rem + env(safe-area-inset-bottom));--bottom-nav-offset:${t?"var(--bottom-nav-height,0px)":"env(safe-area-inset-bottom,0px)"}}`}),(0,s.jsxs)("div",{"data-bottom-edge":"",className:n().dynamic([["ca4133ce94c63e74",[t?"var(--bottom-nav-height,0px)":"env(safe-area-inset-bottom,0px)"]]])+" "+((0,c.cn)("peer/stack fixed inset-x-0 bottom-0 z-1 flex flex-col transition-transform duration-drawer",i&&"pointer-events-none translate-y-full",!t&&!i&&"translate-y-(--bottom-nav-height) has-[[data-bottom-stack-slot]:not(:empty)]:translate-y-16")||""),children:[(0,s.jsx)("div",{ref:u?.setPageSlot,"data-bottom-stack-slot":!0,className:n().dynamic([["ca4133ce94c63e74",[t?"var(--bottom-nav-height,0px)":"env(safe-area-inset-bottom,0px)"]]])+" peer/page relative z-0"}),(0,s.jsx)(F,{visible:t})]}
1),(0,s.jsx)("div",{"aria-hidden":!0,className:n().dynamic([["ca4133ce94c63e74",[t?"var(--bottom-nav-height,0px)":"env(safe-area-inset-bottom,0px)"]]])+" "+((0,c.cn)("pointer-events-none invisible fixed inset-x-0 bottom-0 z-1 h-[env(safe-area-inset-bottom)] bg-background transition-[visibility] duration-drawer",!i&&"peer-has-[[data-bottom-stack-slot]:not(:empty)]/stack:visible")||"")})]})}},35531:(e,t,a)=>{a.d(t,{D:()=>N});var s=a(37876),r=a(27300),n=a(26579),i=a(16221);function l(e){return{id:e.id,name:e.name,last_message_at:e.last_message_at,trip:{id:e.trip.id,ref:e.trip.ref,name:e.trip.name,owner_ref:e.trip.owner_ref,user_refs:e.trip.user_refs,cover_photo:e.trip.cover_photo,destination_name:e.trip.destination?.name,destination_entity_ref:e.trip.destination?.entity_ref,time_zone:e.trip.time_zone,user_created:e.trip.user_created,time_frame:e.trip.time_frame,travelers:e.trip.travelers,rooms:e.trip.rooms,draft_start_date:e.trip.draft_start_date,draft_duration:e.trip.draft_duration,roadtrip:e.trip.roadtrip,collaboration:e.trip.collaboration,destination:e.trip.destination,major_stops:e.trip.major_stops,stops_area:e.trip.stops_area,stops_area_name:e.trip.stops_area_name,stops_area_entity_ref:e.trip.stops_area_entity_ref,budget:e.trip.budget,vibes:e.trip.vibes},group:e.group}}var o=a(4294),c=a(66811),d=a(36025),m=a(96890),h=a(44946),x=a(53784),u=a(53157),p=a(32516),f=a(61955),j=a(40336),g=a(36575),v=a(26360),b=a(25834),y=a(24387),_=a(68900);function N(e){let{chatId:t,chatName:a,tripRef:N,onDeleteSuccess:w,onChatUpdate:C}=e,S=(0,p.jL)(),k=(0,c.r)(),z=new i.r((0,o.Q)()),G=(0,p.GV)(v.g_),V=(0,p.GV)(u.MP),L=(0,p.GV)(j.Fj),A=(0,p.GV)(g.iL),T=(0,y.wp)(k)||V,R=async()=>{try{let e=await z.convertToGroupChat(t);t===G&&(S(v.Ay.actions.setChat(e.chat)),e.chat.trip.collaboration&&S(h.cz.endpoints.getCollaborators.initiate(e.chat.trip.ref))),S(d.Ko.util.invalidateTags(["Chats"]));let a=l(e.chat);C?.(a),(0,n.$)({name:"ChatConvertedToGroup",properties:{chat:{id:t}}})}catch(e){throw console.log("Failed to convert chat to group chat",e),e}},F=()=>{b.J.promise(S((0,x.qO)({chatId:t})),{loading:"Removing chat from trip…",success:"Chat removed from trip",error:"Failed to remove chat from trip"})},P=()=>{(async()=>{try{await z.deactivateChat(t),S(d.Ko.util.invalidateTags(["Chats"])),S(m.E.util.invalidateTags(["RecentItems"])),T&&t===G&&L&&!A&&N?k.push(`/trip/${N}`):T&&S((0,f.jv)({router:k})),b.J.add({type:"success",description:a?`“${a}” deleted.`:"Chat deleted."}),(0,n.$)({name:"ChatRemove",properties:{chat:{id:t}}}),w?.()}catch(e){if(e instanceof _.N&&e.response?.status===404)w?.();else{let t="Failed to delete chat";console.log(t,e),b.J.add({type:"error",description:t})}}})()};return{handleRenameSubmit:async e=>{try{let a=await z.updateChat(t,{name:e});t===G&&S(v.Ay.actions.setChat(a.chat)),S(d.Ko.util.invalidateTags(["Chats"]));let r=l(a.chat);C?.(r),(0,n.$)({name:"ChatRename",properties:{chat:{id:t}}}),b.J.add({type:"success",description:(0,s.jsxs)(s.Fragment,{children:["Chat name has been updated to “",(0,s.jsx)("span",{className:"no-translate",children:e}),"”."]})})}catch(e){throw b.J.add({type:"error",description:"Failed to rename chat."}),e}},handleConvertToGroupChat:()=>{b.J.promise(R(),{loading:"Converting to group chat…",success:"Chat converted to group chat",error:"Failed to convert chat to group chat"})},handleMoveToTrip:e=>{b.J.promise(S((0,x._M)({chatId:t,tripRef:e})),{loading:"Moving chat to trip…",success:"Chat moved to trip",error:"Failed to move chat to trip"})},handleDeleteChat:P,showDeleteConfirmation:()=>{(0,r.G)({title:"Delete chat?",message:"This action cannot be undone.",cancelLabel:"Cancel",okLabel:"Yes, delete",okAction:P})},showRemoveFromTripConfirmation:()=>{(0,r.G)({title:"Remove chat from this trip?",message:"This action cannot be undone.",cancelLabel:"Cancel",okLabel:"Yes, remove",okAction:F})},chatName:a}}},37206:(e,t,a)=>{a.d(t,{h:()=>x});var s=a(37876),r=a(27964),n=a(71767),i=a(49329),l=a(44724),o=a(98347),c=a(73273),d=a(95826),m=a(50436),h=a(5528);function x(e){let t,a,x,u,p,f,j,g,v=(0,r.c)(28),{chatId:b,currentTripRef:y,open:_,onOpenChange:N,onMoveSuccess:w}=e;v[0]!==b||v[1]!==y||v[2]!==w||v[3]!==N||v[4]!==_?(t={chatId:b,currentTripRef:y,open:_,onOpenChange:N,onMoveSuccess:w},v[0]=b,v[1]=y,v[2]=w,v[3]=N,v[4]=_,v[5]=t):t=v[5];let{trips:C,isLoading:S,isFetching:k,hasMoreTrips:z,handleLoadMoreTrips:G,handleTripSelect:V,handleCreateNewTrip:L}=(0,n.p)(t);return v[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)("span",{className:"flex size-6 items-center justify-center",children:(0,s.jsx)(i.A,{size:18})}),v[6]=a):a=v[6],v[7]!==L?(x=(0,s.jsxs)(c._2,{onClick:L,className:"py-1",children:[a,"New trip"]}),v[7]=L,v[8]=x):x=v[8],v[9]!==S?(u=S&&(0,s.jsx)(c._2,{className:"justify-center",children:(0,s.jsx)(m.R,{})}),v[9]=S,v[10]=u):u=v[10],v[11]!==V||v[12]!==S||v[13]!==C?(p=!S&&C.map(e=>(0,s.jsxs)(c._2,{onClick:()=>V(e),className:"py-1",children:[(0,s.jsx)("span",{className:"relative flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-md bg-gray-8",children:e.cover_photo?(0,s.jsx)(h.$,{src:e.cover_photo,width:"sm",className:"absolute inset-0 size-full",alt:""}):(0,s.jsx)(l.A,{size:16,className:"text-white"})}),(0,s.jsx)("span",{className:"flex-1",children:e.name||"Untitled trip"}),e.user_refs.length>1&&(0,s.jsx)(d.u,{userRefs:e.user_refs,size:"2xs",tooltip:!0})]},e.ref)),v[11]=V,v[12]=S,v[13]=C,v[14]=p):p=v[14],v[15]!==G||v[16]!==z||v[17]!==k?(f=z&&!k&&(0,s.jsxs)(c._2,{closeOnClick:!1,onClick:G,className:"py-1",children:[(0,s.jsx)("span",{className:"flex size-6 items-center justify-center",children:(0,s.jsx)(o.A,{size:16})}),"See more"]}),v[15]=G,v[16]=z,v[17]=k,v[18]=f):f=v[18],v[19]!==k||v[20]!==S?(j=k&&!S&&(0,s.jsx)(c._2,{className:"justify-center",children:(0,s.jsx)(m.R,{})}),v[19]=k,v[20]=S,v[21]=j):j=v[21],v[22]!==x||v[23]!==u||v[24]!==p||v[25]!==f||v[26]!==j?(g=(0,s.jsxs)(c.M5,{children:[x,u,p,f,j]}),v[22]=x,v[23]=u,v[24]=p,v[25]=f,v[26]=j,v[27]=g):g=v[27],g}},40202:(e,t,a)=>{a.d(t,{R:()=>c});var s=a(27964),r=a(14232),n=a(21379),i=a(42512),l=a(32516),o=a(26360);function c(){let e,t,a=(0,s.c)(7),c=(0,l.GV)(i.tB),d=(0,l.GV)(o.tB),m=(0,l.GV)(o.OB),{theme:h,setTheme:x}=(0,n.D)();return a[0]!==c||a[1]!==x||a[2]!==h||a[3]!==d.theme||a[4]!==m?(e=()=>{if(c||!m)return;let e=d.theme;e&&e!==h&&x(e)},t=[c,m,d.theme,h,x],a[0]=c,a[1]=x,a[2]=h,a[3]=d.theme,a[4]=m,a[5]=e,a[6]=t):(e=a[5],t=a[6]),(0,r.useEffect)(e,t),null}},58170:(e,t,a)=>{a.d(t,{x:()=>c});var s=a(37876),r=a(27964),n=a(74302),i=a(32516),l=a(26360),o=a(32025);function c(e){let t,a,c=(0,r.c)(12),{user:d,inline:m,className:h}=e,x=(0,i.GV)(l.mB),u=d||x,p=!d||d===x,f="anonymous"===x.provider,j=!!d&&"anonymous"in d&&!0===d.anonymous;c[0]!==f||c[1]!==j||c[2]!==p||c[3]!==u||c[4]!==d?(t=j?u.first_name||"A Mindtr
1ip user":((0,o.li)(d)||p)&&u.first_name?`${u.first_name} ${u.last_name||""}`:f?"Traveler":"",c[0]=f,c[1]=j,c[2]=p,c[3]=u,c[4]=d,c[5]=t):t=c[5];let g=t;return c[6]!==h||c[7]!==x.provider||c[8]!==m||c[9]!==d||c[10]!==g?(a=d||""!==x.provider?(0,s.jsx)("span",{className:(0,n.cn)("items-center gap-[.0625em]",m?"inline-flex":"flex",h),children:(0,s.jsx)("span",{className:"no-translate truncate",children:g})}):(0,s.jsx)("span",{className:(0,n.cn)(m?"inline-flex":"flex",h),children:"\xa0"}),c[6]=h,c[7]=x.provider,c[8]=m,c[9]=d,c[10]=g,c[11]=a):a=c[11],a}},61814:(e,t,a)=>{a.d(t,{g:()=>V,y:()=>G});var s=a(37876),r=a(27964),n=a(14232),i=a(14e3),l=a(99385),o=a(13283),c=a(90075),d=a(12364),m=a(1177),h=a(74302),x=a(75784),u=a(97778),p=a(27414),f=a(42512),j=a(53157),g=a(32516),v=a(23120),b=a(40336),y=a(26360),_=a(24387),N=a(32506),w=a(20658),C=a(83890),S=a(14579),k=a(74528);let z=(0,n.createContext)(null);function G(){return(0,n.useContext)(z)}let V=e=>{let t,a,G,V,L,A,T,R,F,P,M,$,E,O,B,I,K,U,W,J,H,D=(0,r.c)(62);D[0]!==e?({title:R,href:V,children:a,isMinimized:A,activeValue:t,value:F,count:G,iconName:L,...T}=e,D[0]=e,D[1]=t,D[2]=a,D[3]=G,D[4]=V,D[5]=L,D[6]=A,D[7]=T,D[8]=R,D[9]=F):(t=D[1],a=D[2],G=D[3],V=D[4],L=D[5],A=D[6],T=D[7],R=D[8],F=D[9]);let[Q,q]=(0,n.useState)(null),Y=(0,g.jL)(),{data:X}=(0,p.HX)(),Z=X?.count??0,ee=(0,g.GV)(y.zG),et=(0,l.M)(),ea=(0,g.GV)(f.tB),es=(0,g.GV)(j.mN),er=(0,i.usePathname)();D[10]!==er?(P=(0,_._m)(er),D[10]=er,D[11]=P):P=D[11];let en=P;D[12]!==en?(M=e=>(0,b.Pe)(e,en),D[12]=en,D[13]=M):M=D[13];let ei=(0,g.GV)(M),el=er,eo=F||V,[ec,ed]=(0,n.useState)(!1);ea&&(el=function(e){switch(e.type){case"chat":return"/chat";case"trips":case"trip":return"/trips";case"saved":return"/saved";case"inspiration":return"/inspiration";case"explore":return"/explore";default:return null}}(es)??el),"/settings"===el&&(el=`/profile/${ee}`),et&&(el="/saved"),(el.startsWith("/trip/")||el.startsWith("/receipts")||el.startsWith("/calendar"))&&(el="/trips"),(0,_.RO)(el,ei,es.type)&&(el="/trips");let em=!!el&&(el===eo||el.includes(eo)),eh=w.$,ex=V?void 0:"button",eu=!A,ep=em&&!t||F===t?"currentColor":void 0;D[14]!==L||D[15]!==ep?($={name:L,fill:ep,className:"text-[26px] ml-0 group-hover/button:scale-105 transition-transform will-change-transform"},D[14]=L,D[15]=ep,D[16]=$):$=D[16];let ef=x.N,ej=!A&&(0,s.jsx)(u.PY1.span,{className:(0,h.cn)("flex items-center justify-between whitespace-nowrap sm:hidden xl:flex",em&&"font-semibold"),children:(0,s.jsx)("span",{className:N.Fv,children:R})});D[17]!==ef||D[18]!==ej?(E=(0,s.jsx)(ef,{initial:!1,children:ej}),D[17]=ef,D[18]=ej,D[19]=E):E=D[19],D[20]!==G||D[21]!==A?(O=G&&!A?(0,s.jsx)("span",{className:"ml-auto sm:hidden xl:block",children:(0,s.jsx)(k.x,{children:G})}):null,D[20]=G,D[21]=A,D[22]=O):O=D[22],D[23]!==Z||D[24]!==F?(B="/updates"===F&&Z>0&&(0,s.jsx)("div",{className:"absolute top-2 right-[calc(100%-var(--offset))] flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-red-10 px-0.5 text-4xs leading-none tracking-tight text-red-1",style:{"--offset":Z<100?"2.125rem":"2.5rem"},children:Z<100?Z:"99+"}),D[23]=Z,D[24]=F,D[25]=B):B=D[25],D[26]!==eh||D[27]!==V||D[28]!==A||D[29]!==T||D[30]!==E||D[31]!==O||D[32]!==B||D[33]!==ex||D[34]!==eu||D[35]!==$||D[36]!==R?(I=(0,s.jsxs)(eh,{href:V,as:ex,variant:"ghost",size:"md","aria-label":R,block:eu,circle:A,className:"relative z-2 cursor-pointer justify-start gap-3 border-none px-[calc((var(--button-md-size)-26px)/2)]",iconBefore:$,...T,children:[E,O,B]}),D[26]=eh,D[27]=V,D[28]=A,D[29]=T,D[30]=E,D[31]=O,D[32]=B,D[33]=ex,D[34]=eu,D[35]=$,D[36]=R,D[37]=I):I=D[37];let eg=I,ev=A&&F!==t&&ec,eb=`${F||V}`;return D[38]!==eg||D[39]!==a||D[40]!==Y||D[41]!==V||D[42]!==em||D[43]!==Q||D[44]!==F?(K=V?(0,s.jsx)(S.k$,{render:(0,s.jsx)(o.W,{active:em,render:eg,onClick:()=>Y((0,v.tc)(""))})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(S.k$,{render:(0,s.jsx)(c.w,{render:eg})}),(0,s.jsx)(d.h,{render:(0,s.jsx)(C.F,{ref:q,className:"h-full",contentClassName:"/updates"===F?void 0:"px-(--menu-px) pb-7",verticalScrollBarClassName:"my-3",children:(0,s.jsx)(z.Provider,{value:Q,children:a})})})]}),D[38]=eg,D[39]=a,D[40]=Y,D[41]=V,D[42]=em,D[43]=Q,D[44]=F,D[45]=K):K=D[45],D[46]!==t||D[47]!==em||D[48]!==A||D[49]!==F?(U=(em&&A&&!t||F===t)&&(0,s.jsx)(u.PY1.div,{initial:{x:"100%",opacity:0}
1,animate:{x:"-100%",opacity:1,transition:{delay:.25}},exit:{x:"100%",opacity:0,transition:{delay:0}},className:"absolute inset-y-0 left-[calc(var(--nav-width-collapsed)-1px)] flex items-center",children:(0,s.jsx)("div",{className:"relative h-6 w-1 rounded-l-lg bg-current"})}),D[46]=t,D[47]=em,D[48]=A,D[49]=F,D[50]=U):U=D[50],D[51]!==eb||D[52]!==K||D[53]!==U?(W=(0,s.jsxs)(m.J,{className:"relative px-2",value:eb,children:[K,U]}),D[51]=eb,D[52]=K,D[53]=U,D[54]=W):W=D[54],D[55]!==R?(J=(0,s.jsx)(S.ZI,{side:"right",sideOffset:1,children:(0,s.jsx)("span",{className:N.Fv,children:R})}),D[55]=R,D[56]=J):J=D[56],D[57]!==ed||D[58]!==ev||D[59]!==W||D[60]!==J?(H=(0,s.jsxs)(S.m_,{open:ev,onOpenChange:ed,children:[W,J]}),D[57]=ed,D[58]=ev,D[59]=W,D[60]=J,D[61]=H):H=D[61],H};V.displayName="SiteNavItem"},63468:(e,t,a)=>{a.d(t,{q:()=>n});var s=a(27964),r=a(18087);function n(e){let t,a,n,i,l=(0,s.c)(13),{data:o,isLoading:c,error:d}=(0,r.bf)(e??r.hT);l[0]!==o?(t=void 0===o?[]:o,l[0]=o,l[1]=t):t=l[1];let m=t;l[2]!==m?(a=m.includes("can_edit_organization"),l[2]=m,l[3]=a):a=l[3];let h=a;l[4]!==h||l[5]!==m?(n=m.includes("can_view_organization")||h,l[4]=h,l[5]=m,l[6]=n):n=l[6];let x=n,u=d?"Failed to fetch permissions":null;return l[7]!==h||l[8]!==x||l[9]!==c||l[10]!==m||l[11]!==u?(i={permissions:m,loading:c,error:u,canEdit:h,canView:x},l[7]=h,l[8]=x,l[9]=c,l[10]=m,l[11]=u,l[12]=i):i=l[12],i}},63833:(e,t,a)=>{a.d(t,{Sz:()=>ev});var s=a(37876),r=a(27964),n=a(14232),i=a(14e3),l=a(20607),o=a(35531),c=a(27300),d=a(98269),m=a(46157),h=a(74302),x=a(4917),u=a.n(x),p=a(40625),f=a(55922),j=a(26579),g=a(66811),v=a(36025),b=a(44946),y=a(42512),_=a(53784),N=a(32516),w=a(23120),C=a(61955),S=a(40336),k=a(36575),z=a(26360),G=a(25834),V=a(49329),L=a(3670),A=a(44724),T=a(63223),R=a(98347),F=a(17204),P=a(25023),M=a(18766),$=a(61814),E=a(54587),O=a.n(E),B=a(7010),I=a(59714),K=a(77014),U=a(59727),W=a.n(U),J=a(31965),H=a(26506),D=a(34265),Q=a(2429),q=a(96890),Y=a(95826),X=a(72067),Z=a(92197),ee=a(2692),et=a(28104),ea=a(5528),es=a(21533);function er(){let e,t,a,i,l,o,c,d,m=(0,r.c)(25),x=(0,N.GV)(S.Hq),u=(0,N.GV)(z.g_);m[0]===Symbol.for("react.memo_cache_sentinel")?(e={limit:6},m[0]=e):e=m[0];let{data:p,isLoading:f}=(0,q.z)(e);m[1]!==u||m[2]!==x?(t=e=>"trip"===e.type?x!==e.trip.ref:"chat"!==e.type||u!==e.chat.id,m[1]=u,m[2]=x,m[3]=t):t=m[3];let j=(p?.items??[]).filter(t),g=(0,K.M)(),v=j.map(ec).join("\0"),{scrollRef:b,pages:y,activePageIndex:_,prev:w,next:C,refresh:k}=(0,I.O)({trackPages:g,contentKey:v}),G=j.map(ei);return(m[4]!==k||m[5]!==g?(a=()=>{g&&k()},m[4]=k,m[5]=g,m[6]=a):a=m[6],m[7]!==v||m[8]!==k||m[9]!==g?(i=[v,g,k],m[7]=v,m[8]=k,m[9]=g,m[10]=i):i=m[10],(0,n.useLayoutEffect)(a,i),f||0!==j.length)?(m[11]!==G||m[12]!==f?(l=f?Array.from({length:3}
1).map(en):G,m[11]=G,m[12]=f,m[13]=l):l=m[13],m[14]!==b||m[15]!==l?(o=(0,s.jsx)("div",{ref:b,className:"scrollbar-hidden flex snap-x snap-mandatory scroll-px-(--dialog-pad) gap-2 overflow-x-auto scroll-smooth px-(--dialog-pad) *:h-35 *:shrink-0 *:basis-35 *:snap-start",children:l}),m[14]=b,m[15]=l,m[16]=o):o=m[16],m[17]!==_||m[18]!==C||m[19]!==y.length||m[20]!==w?(c=y.length>1&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:(0,h.cn)("absolute top-1/2 left-2 -translate-y-1/2 opacity-0 transition-opacity group-hover/carousel:opacity-100",0===_&&"pointer-events-none opacity-0!"),children:(0,s.jsx)(ee.K,{size:"md",icon:{name:"chevronLeft"},variant:"outline",label:"Previous",onClick:w,className:"bg-background"})}),(0,s.jsx)("div",{className:(0,h.cn)("absolute top-1/2 right-2 -translate-y-1/2 opacity-0 transition-opacity group-hover/carousel:opacity-100",_===y.length-1&&"pointer-events-none opacity-0!"),children:(0,s.jsx)(ee.K,{size:"md",icon:{name:"chevronRight"},variant:"outline",label:"Next",onClick:C,className:"bg-background"})})]}),m[17]=_,m[18]=C,m[19]=y.length,m[20]=w,m[21]=c):c=m[21],m[22]!==o||m[23]!==c?(d=(0,s.jsxs)("div",{className:"group/carousel relative -mx-(--dialog-pad) flex flex-col",children:[o,c]}),m[22]=o,m[23]=c,m[24]=d):d=m[24],d):null}function en(e,t){return(0,s.jsx)(es.E,{className:"rounded-2xl"},t)}function ei(e){return(0,s.jsx)(ed,{item:e},ec(e))}function el(e){let t,a,n=(0,r.c)(12),{href:i,onClick:l,className:o,children:c}=e;if(i){let e,t;return n[0]!==o?(e=(0,h.cn)("relative flex animate-in flex-col overflow-hidden rounded-2xl fade-in",o),n[0]=o,n[1]=e):e=n[1],n[2]!==c||n[3]!==i||n[4]!==e?(t=(0,s.jsx)(et.N,{href:i,className:e,children:c}),n[2]=c,n[3]=i,n[4]=e,n[5]=t):t=n[5],t}return n[6]!==o?(t=(0,h.cn)("relative flex animate-in flex-col overflow-hidden rounded-2xl fade-in",o),n[6]=o,n[7]=t):t=n[7],n[8]!==c||n[9]!==l||n[10]!==t?(a=(0,s.jsx)("button",{type:"button",onClick:l,className:t,children:c}),n[8]=c,n[9]=l,n[10]=t,n[11]=a):a=n[11],a}function eo(e){let t,a,n,i,l,o,c,d,m=(0,r.c)(21),{href:h,typeLabel:x,title:u,description:p,image:f,images:j,userRefs:g}=e;return m[0]!==f||m[1]!==j?(t=j?(0,s.jsx)(X.J,{images:j,className:"absolute inset-0"}):f?(0,s.jsx)(ea.$,{src:f,width:"md",className:"absolute inset-0 size-full",alt:""}):(0,s.jsx)(O(),{src:"/img/marketing-blue.jpg",width:B.BZ.sm,height:B.BZ.sm,className:"absolute inset-0 size-full object-cover",alt:""}),m[0]=f,m[1]=j,m[2]=t):t=m[2],m[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)("div",{className:"absolute inset-0 bg-linear-to-b from-black/0 to-black-a-10"}),m[3]=a):a=m[3],m[4]!==x?(n=(0,s.jsx)(Z.E,{color:"overlay-light",size:1,className:"mb-1.5 text-shadow-none",children:x}),m[4]=x,m[5]=n):n=m[5],m[6]!==u?(i=(0,s.jsx)("h3",{className:"no-translate line-clamp-2 text-sm leading-tight font-semibold text-balance wrap-anywhere",children:u}),m[6]=u,m[7]=i):i=m[7],m[8]!==p?(l=p&&(0,s.jsx)("div",{className:"mt-0.5 line-clamp-2 text-2xs leading-tight text-pretty opacity-85",children:p}),m[8]=p,m[9]=l):l=m[9],m[10]!==n||m[11]!==i||m[12]!==l?(o=(0,s.jsxs)("div",{className:"relative mt-auto px-3 pt-10 pb-3 text-white [text-shadow:0_0_6px_rgb(0_0_0/30%)] sm:px-4 sm:pb-4",children:[n,i,l]}),m[10]=n,m[11]=i,m[12]=l,m[13]=o):o=m[13],m[14]!==g?(c=g&&g.length>1&&(0,s.jsx)("div",{className:"absolute top-4 left-4",children:(0,s.jsx)(Y.u,{userRefs:g,size:"2xs",className:"*:shadow-md"})}),m[14]=g,m[15]=c):c=m[15],m[16]!==h||m[17]!==t||m[18]!==o||m[19]!==c?(d=(0,s.jsxs)(el,{href:h,children:[t,a,o,c]}),m[16]=h,m[17]=t,m[18]=o,m[19]=c,m[20]=d):d=m[20],d}function ec(e){switch(e.type){case"trip":return e.trip.ref;case"chat":return e.chat.id;case"saved_collection":return e.saved_collection.ref;case"guide":return e.guide.entity_ref}}function ed(e){let t=(0,r.c)(57),{item:a}=e,n=D.h.useFormatTimeFrame(),i=D.h.useFormatDayCount();switch(a.type){case"trip":{let e,r,l,o,c,d,{trip:m}=a;t[0]!==n||t[1]!==m.time_frame?(e=n(m.time_frame),t[0]=n,t[1]=m.time_frame,t[2]=e):e=t[2];let h=e;t[3]!==i||t[4]!==m.draft_duration?(r=m.draft_duration?i(m.draft_duration):void 0,t[3]=i,t[4]=m.draft_duration,t[5]=r):r=t[5];let x=r,u=h||x,p=`/trip/${m.ref}`;return t[6]!==u||t[7]!==m.stops_area_name?(l=m.stops_area_name&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"no-translate",children:m.stops_area_name}),u&&(0,s.jsx)("span",{className:"mx-1",children:"\xb7"})]}),t[6]=u,t[7]=m.stops_area_name,t[8]=l):l=t[8],t[9]!==h||t[10]!==x?(o=h?(0,s.jsx)("span",{className:"no-translate",children:h}):(0,s.jsx)("span",{className:"no-translate",children:x}),t[9]=h,t[10]=x,t[11]=o):o=t[11],t[12]!==l||t[13]!==o?(c=(0,s.jsxs)(s.Fragment,{children:[l,o]}),t[12]=l,t[13]=o,t[14]=c):c=t[14],t[15]!==p||t[16]!==c||t[17]!==m.cover_photo||t[18]!==m.name||t[19]!==m.user_refs?(d=(0,s.jsx)(eo,{href:p,typeLabel:"Trip",title:m.name,description:c,image:m.cover_photo,userRefs:m.user_refs}
1),t[15]=p,t[16]=c,t[17]=m.cover_photo,t[18]=m.name,t[19]=m.user_refs,t[20]=d):d=t[20],d}case"chat":{let e,{chat:r}=a,n=`/chat/${r.id}`,i=r.name||r.trip.name||"Chat",l=r.cover_photo??r.trip.cover_photo,o=r.group?r.trip.user_refs:void 0;return t[21]!==n||t[22]!==i||t[23]!==l||t[24]!==o?(e=(0,s.jsx)(eo,{href:n,typeLabel:"Chat",title:i,image:l,userRefs:o}),t[21]=n,t[22]=i,t[23]=l,t[24]=o,t[25]=e):e=t[25],e}case"saved_collection":{let e,r,n,i=a.saved_collection,l=i.images.length>1;t[26]!==i.canonical_url?(e=(0,J._n)(i.canonical_url),t[26]=i.canonical_url,t[27]=e):e=t[27];let o=i.name,c=i.favorites_count;t[28]!==i.favorites_count?(r=W()("place",i.favorites_count),t[28]=i.favorites_count,t[29]=r):r=t[29];let d=`${c} ${r}`,m=l?i.images:void 0,h=l?void 0:i.images[0];return t[30]!==i.accepted_collaborator_refs||t[31]!==i.name||t[32]!==e||t[33]!==d||t[34]!==m||t[35]!==h?(n=(0,s.jsx)(eo,{href:e,typeLabel:"Collection",title:o,description:d,images:m,image:h,userRefs:i.accepted_collaborator_refs}),t[30]=i.accepted_collaborator_refs,t[31]=i.name,t[32]=e,t[33]=d,t[34]=m,t[35]=h,t[36]=n):n=t[36],n}case"guide":{let e,r,n,l,o,c,d,{guide:m}=a;t[37]!==m.location?(e=m.location?(0,Q.im)(m.location):void 0,t[37]=m.location,t[38]=e):e=t[38];let h=e;t[39]!==i||t[40]!==m.total_days||t[41]!==m.total_places?(r=m.total_days?i(m.total_days):W()("place",m.total_places,!0),t[39]=i,t[40]=m.total_days,t[41]=m.total_places,t[42]=r):r=t[42];let x=r;return t[43]!==m?(n=(0,H.wo)(m),t[43]=m,t[44]=n):n=t[44],t[45]!==h?(l=h&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"no-translate",children:h}),(0,s.jsx)("span",{className:"mx-1",children:"\xb7"})]}),t[45]=h,t[46]=l):l=t[46],t[47]!==x?(o=(0,s.jsx)("span",{className:"no-translate",children:x}),t[47]=x,t[48]=o):o=t[48],t[49]!==l||t[50]!==o?(c=(0,s.jsxs)(s.Fragment,{children:[l,o]}),t[49]=l,t[50]=o,t[51]=c):c=t[51],t[52]!==m.photos[0]||t[53]!==m.title||t[54]!==n||t[55]!==c?(d=(0,s.jsx)(eo,{href:n,typeLabel:"Guide",title:m.title,description:c,image:m.photos[0]}),t[52]=m.photos[0],t[53]=m.title,t[54]=n,t[55]=c,t[56]=d):d=t[56],d}}}var em=a(26807),eh=a(37206),ex=a(58604),eu=a(73458),ep=a(20658),ef=a(73273),ej=a(19958),eg=a(50436);function ev(e){let t,a,n,i,l,o,c,d,m,h,x,u,p,f,j,v=(0,r.c)(37),{scrollRef:y,showRecent:_}=e,z=void 0!==_&&_,G=(0,N.jL)(),L=(0,g.r)(),A=(0,N.GV)(w.Q1);v[0]!==A?(t={search:A,perPage:3},v[0]=A,v[1]=t):t=v[1];let{data:T}=b.cz.useGetNavTripsQuery(t);v[2]!==T?.trips?(a=T?.trips||[],v[2]=T?.trips,v[3]=a):a=v[3];let F=a,M=T?.meta&&T.meta.current_page<T.meta.total_pages,$=(0,N.GV)(k.iL);v[4]!==G?(n=()=>{G((0,w.tc)("")),G((0,w.Tj)(!1)),G(S.Ay.actions.openCreateTripDialog({startChat:!0}))},v[4]=G,v[5]=n):n=v[5];let E=n;return v[6]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)(ew,{}),v[6]=i):i=v[6],v[7]!==A||v[8]!==z?(l=z&&!A&&(0,s.jsx)(er,{}),v[7]=A,v[8]=z,v[9]=l):l=v[9],v[10]!==G||v[11]!==L?(o=async()=>{G((0,w.tc)("")),await G((0,C.HZ)(L))},v[10]=G,v[11]=L,v[12]=o):o=v[12],v[13]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)(P.A,{size:24}),v[13]=c):c=v[13],v[14]!==o?(d=(0,s.jsx)("li",{children:(0,s.jsxs)(ey,{onPerform:o,children:[c,"New chat"]})}),v[14]=o,v[15]=d):d=v[15],v[16]!==E||v[17]!==$?(m=!$&&(0,s.jsx)("li",{children:(0,s.jsxs)(ey,{onClick:E,children:[(0,s.jsx)(V.A,{size:24}),"New trip"]})}),v[16]=E,v[17]=$,v[18]=m):m=v[18],v[19]===Symbol.for("react.memo_cache_sentinel")?(h=(0,s.jsx)(e_,{}),x=(0,s.jsx)(eN,{}),v[19]=h,v[20]=x):(h=v[19],x=v[20]),v[21]!==m||v[22]!==d?(u=(0,s.jsxs)("ul",{className:"relative -mx-2",children:[d,m,h,x]}),v[21]=m,v[22]=d,v[23]=u):u=v[23],v[24]!==G||v[25]!==A||v[26]!==F||v[27]!==T?.meta?.current_page||v[28]!==M?(p=F.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"mb-2 text-xs text-gray-9",children:"Trips"}),(0,s.jsxs)("ul",{className:"-mx-2",children:[F.map(eb),M&&(0,s.jsx)("li",{children:(0,s.jsxs)(ey,{onPerform:async()=>{let e=T?.meta?.current_page||1;await G(b.cz.endpoints.getNavTrips.initiate({search:A,page:e+1,perPage:3}))},children:[(0,s.jsx)(R.A,{size:24}),"See more"]})})]})]}),v[24]=G,v[25]=A,v[26]=F,v[27]=T?.meta?.current_page,v[28]=M,v[29]=p):p=v[29],v[30]!==y?(f=(0,s.jsx)(eS,{scrollRef:y}),v[30]=y,v[31]=f):f=v[31],v[32]!==u||v[33]!==p||v[34]!==f||v[35]!==l?(j=(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"flex flex-col gap-6 [--option-pad:calc(var(--button-xs-size)+var(--spacing)*2)] sm:pt-3",children:[i,l,u,p,f]})}),v[32]=u,v[33]=p,v[34]=f,v[35]=l,v[36]=j):j=v[36],j}function eb(e){return(0,s.jsx)(eC,{trip:e},e.ref)}let ey=(0,n.forwardRef)(function(e,t){let a,n,i,l,o,c=(0,r.c)(11);c[0]!==e?({isActive:n,className:a,...i}=e,c[0]=e,c[1]=a,c[2]=n,c[3]=i):(a=c[1],n=c[2],i=c[3]);let d=n&&"cursor-default font-semibold";return c[4]!==a||c[5]!==d?(l=(0,h.cn)("h-10 w-full min-w-0 justify-start gap-2 rounded-lg px-2 text-left text-sm font-normal group-hover:bg-foreground
1/5 group-has-focus:pr-(--option-pad) group-has-data-popup-open:pr-(--option-pad) hover:bg-foreground/5 sm:text-base can-hover:group-hover:pr-(--option-pad)",d,a),c[4]=a,c[5]=d,c[6]=l):l=c[6],c[7]!==i||c[8]!==t||c[9]!==l?(o=(0,s.jsx)(ep.$,{ref:t,variant:"none",className:l,...i}),c[7]=i,c[8]=t,c[9]=l,c[10]=o):o=c[10],o});function e_(){let e,t,a,n,i=(0,r.c)(11),l=(0,N.jL)(),o=(0,N.GV)(y.tB);i[0]===Symbol.for("react.memo_cache_sentinel")?(e={source:"site_nav",createNewChat:!0},i[0]=e):e=i[0];let{disabled:c,label:m,start:h,visible:x}=(0,d.q)(e);return o||!x?null:(i[1]!==l||i[2]!==h?(t=()=>{l((0,w.tc)("")),l((0,w.Tj)(!1)),h()},i[1]=l,i[2]=h,i[3]=t):t=i[3],i[4]!==m?(a="Update my assistant"!==m&&(0,s.jsx)(L.A,{size:24}),i[4]=m,i[5]=a):a=i[5],i[6]!==c||i[7]!==m||i[8]!==t||i[9]!==a?(n=(0,s.jsx)("li",{children:(0,s.jsxs)(ey,{disabled:c,onClick:t,children:[a,m]})}),i[6]=c,i[7]=m,i[8]=t,i[9]=a,i[10]=n):n=i[10],n)}function eN(){let e,t,a,n=(0,r.c)(5),i=(0,N.jL)();return(0,N.GV)(y.l1)?(n[0]!==i?(e=()=>{i((0,w.tc)("")),i((0,w.Tj)(!1))},n[0]=i,n[1]=e):e=n[1],n[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.jsx)(T.A,{size:24}),n[2]=t):t=n[2],n[3]!==e?(a=(0,s.jsx)("li",{children:(0,s.jsx)(ex.v,{type:"settings",children:(0,s.jsxs)(ey,{href:`/settings?section=${m.A9}`,onClick:e,children:[t,"Personalization"]})})}),n[3]=e,n[4]=a):a=n[4],a):null}function ew(){let e,t,a,i,l,o,c,d,m,h,x,p,f,j,g,y=(0,r.c)(26),_=(0,N.jL)(),C=(0,N.GV)(v.m$),S=(0,N.GV)(w.Q1);y[0]!==S?(e={search:S,perPage:3},y[0]=S,y[1]=e):e=y[1];let{data:k}=b.cz.useGetNavTripsQuery(e),z=k?.trips.length||0,[G,V]=(0,n.useState)(""),[L,A]=(0,n.use
1State)(!1);y[2]!==_?(t=u()(e=>{_((0,w.MG)(e))},300),y[2]=_,y[3]=t):t=y[3];let T=t,R=(0,n.useRef)(T);y[4]!==T?(a=()=>(R.current=T,()=>R.current.cancel()),i=[T],y[4]=T,y[5]=a,y[6]=i):(a=y[5],i=y[6]),(0,n.useEffect)(a,i),y[7]!==G?(l=()=>{R.current(G)},y[7]=G,y[8]=l):l=y[8],y[9]!==_||y[10]!==G?(o=[G,_],y[9]=_,y[10]=G,y[11]=o):o=y[11],(0,n.useEffect)(l,o),y[12]===Symbol.for("react.memo_cache_sentinel")?(c=e=>{V(e)},y[12]=c):c=y[12];let F=c,P=0===C&&0===z&&!G&&!L;return y[13]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsx)(ej.Sq,{align:"inline-start",children:(0,s.jsx)(M.A,{})}),y[13]=d):d=y[13],y[14]===Symbol.for("react.memo_cache_sentinel")?(h=e=>F(e.target.value),x=()=>A(!0),m=()=>A(!1),y[14]=m,y[15]=h,y[16]=x):(m=y[14],h=y[15],x=y[16]),y[17]!==P||y[18]!==G?(p=(0,s.jsx)(ej.iV,{placeholder:"Search…",value:G,onChange:h,onFocus:x,onBlur:m,disabled:P}),y[17]=P,y[18]=G,y[19]=p):p=y[19],y[20]===Symbol.for("react.memo_cache_sentinel")?(f=()=>F(""),y[20]=f):f=y[20],y[21]!==G?(j=(0,s.jsx)(ej.pJ,{value:G,onClear:f}),y[21]=G,y[22]=j):j=y[22],y[23]!==p||y[24]!==j?(g=(0,s.jsxs)(ej.MG,{muted:!0,children:[d,p,j]}),y[23]=p,y[24]=j,y[25]=g):g=y[25],g}function eC(e){let t,a,o,d,m,x,u,p,y,C,S,k,z,V,L,T,R,F=(0,r.c)(48),{trip:P}=e,M=(0,g.r)(),$=(0,N.jL)(),E=(0,i.usePathname)(),O=(0,n.useRef)(null),[B]=(0,b.nw)(),[I]=(0,b.Lr)(),[K,U]=(0,n.useState)(!1);F[0]!==P.ref||F[1]!==I?(t=async e=>{try{let t=await I({tripRef:P.ref,tripUpdate:{name:e}}).unwrap();t.trip&&(0,j.$)({name:"TripUpdate",properties:(0,f.d_)(t.trip)}),G.J.add({type:"success",description:"Trip name has been updated."})}catch(e){throw G.J.add({type:"error",description:"Failed to rename trip."}),e}},F[0]=P.ref,F[1]=I,F[2]=t):t=F[2];let W=t;F[3]!==$||F[4]!==M||F[5]!==P.ref?(a=async()=>{$((0,w.tc)("")),await M.push(`/trip/${P.ref}`)},F[3]=$,F[4]=M,F[5]=P.ref,F[6]=a):a=F[6],F[7]!==P.cover_photo?(o=(0,s.jsx)("span",{className:"relative flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-md bg-gray-8",children:P.cover_photo?(0,s.jsx)(ea.$,{src:P.cover_photo,width:"sm",className:"absolute inset-0 size-full",alt:""}):(0,s.jsx)(A.A,{size:16,className:"text-white"})}),F[7]=P.cover_photo,F[8]=o):o=F[8],F[9]!==P.name?(d=(0,s.jsx)("span",{className:"no-translate flex-1 truncate",children:P.name}),F[9]=P.name,F[10]=d):d=F[10],F[11]!==P.user_refs?(m=P.user_refs.length>1&&(0,s.jsx)("div",{className:(0,h.cn)("group-has-data-popup-open:hidden can-hover:group-hover:hidden"),children:(0,s.jsx)(Y.u,{userRefs:P.user_refs,size:"2xs",tooltip:!0})}),F[11]=P.user_refs,F[12]=m):m=F[12],F[13]!==a||F[14]!==o||F[15]!==d||F[16]!==m?(x=(0,s.jsxs)(ey,{onPerform:a,children:[o,d,m]}),F[13]=a,F[14]=o,F[15]=d,F[16]=m,F[17]=x):x=F[17],F[18]===Symbol.for("react.memo_cache_sentinel")?(u=e=>{e||O.current?.blur()},F[18]=u):u=F[18],F[19]===Symbol.for("react.memo_cache_sentinel")?(p={name:"ellipsis"},F[19]=p):p=F[19],F[20]===Symbol.for("react.memo_cache_sentinel")?(y=(0,s.jsx)(ef.ty,{render:(0,s.jsx)(ee.K,{ref:O,variant:"ghost",icon:p,label:"Trip options",className:(0,h.cn)("pointer-events-none absolute top-1/2 right-1 z-1 -translate-y-1/2 opacity-0 can-hover:group-hover:pointer-events-auto can-hover:group-hover:opacity-100")})}),F[20]=y):y=F[20],F[21]===Symbol.for("react.memo_cache_sentinel")?(C=(0,s.jsx)(ef._2,{iconName:"pencil",onClick:()=>U(!0),children:"Rename trip"}),F[21]=C):C=F[21],F[22]!==$||F[23]!==M||F[24]!==P.ref?(S=(0,s.jsx)(ef._2,{iconName:"newChat",onClick:async()=>{await $((0,_.hN)({tripRef:P.ref,router:M}))},children:"New chat"}),F[22]=$,F[23]=M,F[24]=P.ref,F[25]=S):S=F[25],F[26]===Symbol.for("react.memo_cache_sentinel")?(k=(0,s.jsx)(ef.mB,{}),F[26]=k):k=F[26],F[27]!==$||F[28]!==B||F[29]!==E||F[30]!==M||F[31]!==P.name||F[32]!==P.ref?(z=(0,s.jsx)(ef._2,{iconName:"trash",variant:"destructive",onClick:()=>{(0,c.G)({title:"Remove trip?",message:(0,s.jsxs)(s.Fragment,{children:["Are you sure you want to remove"," ",P.name?(0,s.jsx)("span",{className:"no-translate font-semibold",children:P.name},"name"):(0,s.jsx)("span",{className:"font-semibold",children:"this trip"},"fallback"),(0,s.jsx)("span",{children:"?"})]}),cancelLabel:"Cancel",okLabel:"Yes, remove",okAction:()=>{(async()=>{await B(P.ref).unwrap(),$(v.Ko.util.invalidateTags(["Chats"])),G.J.add({type:"success",description:P.name?(0,s.jsxs)(s.Fragment,{children:["“",(0,s.jsx)("span",{className:"no-translate",children:P.name}),"” has been removed."]}):"Trip has been removed."}),E.startsWith(`/trip/${P.ref}`)&&await M.push("/trips")})()}})},children:"Remove trip"}),F[27]=$,F[28]=B,F[29]=E,F[30]=M,F[31]=P.name,F[32]=P.ref,F[33]=z):z=F[33],F[34]!==S||F[35]!==z?(V=(0,s.jsxs)(ef.rI,{onOpenChange:u,children:[y,(0,s.jsxs)(ef.SQ,{children:[C,S,k,z]})]}),F[34]=S,F[35]=z,F[36]=V):V=F[36],F[37]!==V||F[38]!==x?(L=(0,s.jsxs)("div",{className:"group relative",children:[x,V]}),F[37]=V,F[38]=x,F[39]=L):L=F[39];let J=P.name||"";return F[40]!==W||F[41]!==K||F[42]!==J?(T=(0,s.jsx)(eu.L,{open:K,onOpenChange:U,initialValue:J,title:"Edit trip name",maxLength:l.Ue,onSubmit:W}),F[40]=W,F[41]=K,F[42]=J,F[43]=T):T=F[43],F[44]!==L||F[45]!==T||F[46]!==P.ref?(R=(0,s.jsxs)("li",{children:[L,T]},P.ref),F[44]=L,F[45]=T,F[46]=P.ref,F[47]=R):R=F[47],R}function eS(e){let t,a,i,l,o,c,d,m=(0,r.c)(17),{scrollRef:h}=e,x=(0,N.GV)(w.Q1)||void 0;m[0]!==x?(t={search:x},m[0]=x,m[1]=t):t=m[1];let{data:u,isLoading:f,hasNextPage:j,isFetchingNextPage:g,fetchNextPage:b}=v.Ko.useGetChatsInfiniteQuery(t),y=(0,v.wF)(u),_=(0,$.y)(),C=(h?.current??_)||void 0;m[2]!==C?(a={rootMargin:"200px 0px 0px 0px",root:C},m[2]=C,m[3]=a):a=m[3];let{ref:S,inView:k}=(0,p.Wx)(a);m[4]!==b||m[5]!==j||m[6]!==k||m[7]!==g?(i=()=>{k&&j&&!g&&b()},l=[k,j,g,b],m[4]=b,m[5]=j,m[6]=k,m[7]=g,m[8]=i,m[9]=l):(i=m[8],l=m[9]),(0,n.useEffect)(i,l),m[10]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)("h3",{className:"mb-2 text-xs text-gray-9",children:"Chats"}),m[10]=o):o=m[10];let z=!f&&y&&(0,s.jsx)(s.Fragment,{children:0===y.length?(0,s.jsx)("p",{className:"flex h-10 items-center",children:"No chats yet."}):(0,s.jsxs)("ul",{className:"-mx-2",children:[y.map(ek),j&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("li",{ref:S}),g&&(0,s.jsx)("li",{children:(0,s.jsx)("div",{className:"flex h-10 items-center justify-center",children:(0,s.jsx)(eg.R,{})})})]})]})});return m[11]!==f?(c=f&&(0,s.jsx)("div",{className:"flex h-10 items-center justify-center",children:(0,s.jsx)(eg.R,{})}),m[11]=f,m[12]=c):c=m[12],m[13]!==c||m[14]!==o||m[15]!==z?(d=(0,s.jsxs)("div",{className:"flex flex-1 flex-col",children:[o,z,c]}),m[13]=c,m[14]=o,m[15]=z,m[16]=d):d=m[16],d}function ek(e){return(0,s.jsx)(ez,{chat:e},e.id)}function ez(e){let t,a,c,d,m,x,u,p,f,j,_,S,k,G,V,L,A,T,R,P,M,$,E,O,B,I=(0,r.c)(83),{chat:K}=e,U=(0,N.jL)(),W=(0,g.r)(),J=(0,i.usePathname)(),H=(0,N.GV)(z.g_),D=(0,N.GV)(w.Q1);I[0]!==D?(t={search:D,perPage:3},I[0]=D,I[1]=t):t=I[1];let{data:Q}=b.cz.useGetNavTripsQuery(t),q=(Q?.trips.length||0)>
11,Y=(0,N.GV)(y.YN),X=(0,N.GV)(y.l1),[Z,et]=(0,n.useState)(!1),[ea,es]=(0,n.useState)(!1),[er,en]=(0,n.useState)(!1);I[2]!==U?(a=()=>{U(v.Ko.util.invalidateTags(["Chats"]))},I[2]=U,I[3]=a):a=I[3],I[4]!==K.id||I[5]!==K.name||I[6]!==K.trip.ref||I[7]!==a?(c={chatId:K.id,chatName:K.name,tripRef:K.trip.ref,onChatUpdate:a},I[4]=K.id,I[5]=K.name,I[6]=K.trip.ref,I[7]=a,I[8]=c):c=I[8];let{handleRenameSubmit:ei,handleConvertToGroupChat:el,showDeleteConfirmation:eo,showRemoveFromTripConfirmation:ec}=(0,o.D)(c),ed=`/chat/${K.id}`;I[9]!==J||I[10]!==ed?(d=!!J&&J.split("/")[1]===ed.split("/")[1],I[9]=J,I[10]=ed,I[11]=d):d=I[11];let ex=d&&(H===K.id||J===ed);I[12]!==K.id||I[13]!==U||I[14]!==W?(m=async e=>{await U((0,C.Ds)({e,chatId:K.id,router:W}))},I[12]=K.id,I[13]=U,I[14]=W,I[15]=m):m=I[15];let ep=K.trip.user_created&&"h-auto min-h-10 py-1.5";I[16]!==ep?(x=(0,h.cn)(ep),I[16]=ep,I[17]=x):x=I[17],I[18]!==K.name?(u=K.name?(0,s.jsx)("span",{className:"no-translate min-w-0 flex-1 truncate",children:K.name}):(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:"Untitled"}),I[18]=K.name,I[19]=u):u=I[19],I[20]!==K.memory_enabled||I[21]!==X?(p=X&&!1===K.memory_enabled&&(0,s.jsx)(F.A,{size:14,className:"shrink-0 text-gray-9","aria-label":"Memory disabled"}),I[20]=K.memory_enabled,I[21]=X,I[22]=p):p=I[22],I[23]!==u||I[24]!==p?(f=(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[u,p]}),I[23]=u,I[24]=p,I[25]=f):f=I[25],I[26]!==K.trip.name||I[27]!==K.trip.user_created?(j=K.trip.user_created&&K.trip.name&&(0,s.jsx)("span",{className:"no-translate mt-px truncate text-2xs font-normal text-gray-9 group-hover:text-gray-10",children:K.trip.name}),I[26]=K.trip.name,I[27]=K.trip.user_created,I[28]=j):j=I[28],I[29]!==f||I[30]!==j?(_=(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[f,j]}),I[29]=f,I[30]=j,I[31]=_):_=I[31],I[32]!==ed||I[33]!==ex||I[34]!==_||I[35]!==m||I[36]!==x?(S=(0,s.jsx)(ey,{href:ed,isActive:ex,onPerform:m,className:x,children:_}),I[32]=ed,I[33]=ex,I[34]=_,I[35]=m,I[36]=x,I[37]=S):S=I[37],I[38]===Symbol.for("react.memo_cache_sentinel")?(k=(0,s.jsx)(ef.ty,{render:(0,s.jsx)(ee.K,{variant:"ghost",icon:{name:"ellipsis"},label:"Chat options",className:"absolute top-1/2 right-1 -translate-y-1/2 opacity-0 group-hover:opacity-100"})}),I[38]=k):k=I[38],I[39]===Symbol.for("react.memo_cache_sentinel")?(G=(0,s.jsx)(ef._2,{iconName:"pencil",onClick:()=>et(!0),children:"Rename chat"}
1),I[39]=G):G=I[39],I[40]!==K.is_group||I[41]!==K.trip.collaborative||I[42]!==el?(V=!K.is_group&&K.trip.collaborative&&(0,s.jsx)(ef._2,{iconName:"twoPeople",onClick:el,children:"Make it a group chat"}),I[40]=K.is_group,I[41]=K.trip.collaborative,I[42]=el,I[43]=V):V=I[43],I[44]!==K.id||I[45]!==K.is_group||I[46]!==K.trip.ref||I[47]!==U||I[48]!==q||I[49]!==Y||I[50]!==ea?(L=!K.is_group&&q&&(Y?(0,s.jsx)(ef._2,{onClick:()=>en(!0),iconName:"addTrip",children:"Move to trip"}):(0,s.jsxs)(ef.lv,{open:ea,onOpenChange:es,children:[(0,s.jsx)(ef.nV,{iconName:"addTrip",children:"Move to trip"}),(0,s.jsx)(eh.h,{chatId:K.id,currentTripRef:K.trip.ref,open:ea,onOpenChange:es,onMoveSuccess:e=>{U(v.Ko.util.invalidateTags(["Chats"]))}})]})),I[44]=K.id,I[45]=K.is_group,I[46]=K.trip.ref,I[47]=U,I[48]=q,I[49]=Y,I[50]=ea,I[51]=L):L=I[51],I[52]!==K.is_group||I[53]!==K.trip.user_created||I[54]!==ec?(A=!K.is_group&&K.trip.user_created&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ef.mB,{}),(0,s.jsx)(ef._2,{iconName:"removeTrip",onClick:ec,children:"Remove from trip"})]}),I[52]=K.is_group,I[53]=K.trip.user_created,I[54]=ec,I[55]=A):A=I[55],I[56]===Symbol.for("react.memo_cache_sentinel")?(T=(0,s.jsx)(ef.mB,{}),I[56]=T):T=I[56],I[57]!==eo?(R=(0,s.jsx)(ef._2,{iconName:"trash",variant:"destructive",onClick:eo,children:"Delete chat"}),I[57]=eo,I[58]=R):R=I[58],I[59]!==V||I[60]!==L||I[61]!==A||I[62]!==R?(P=(0,s.jsxs)(ef.rI,{children:[k,(0,s.jsxs)(ef.SQ,{children:[G,V,L,A,T,R]})]}),I[59]=V,I[60]=L,I[61]=A,I[62]=R,I[63]=P):P=I[63],I[64]!==S||I[65]!==P?(M=(0,s.jsxs)("li",{className:"group relative",children:[S,P]}),I[64]=S,I[65]=P,I[66]=M):M=I[66];let ej=K.name||"";return I[67]!==ei||I[68]!==Z||I[69]!==ej?($=(0,s.jsx)(eu.L,{open:Z,onOpenChange:et,initialValue:ej,title:"Edit chat name",maxLength:l.Ue,onSubmit:ei}),I[67]=ei,I[68]=Z,I[69]=ej,I[70]=$):$=I[70],I[71]!==U?(E=e=>{U(v.Ko.util.invalidateTags(["Chats"]))},I[71]=U,I[72]=E):E=I[72],I[73]!==K.id||I[74]!==K.name||I[75]!==K.trip.ref||I[76]!==er||I[77]!==E?(O=(0,s.jsx)(em.A,{open:er,onOpenChange:en,chatId:K.id,chatName:K.name,currentTripRef:K.trip.ref,onMoveSuccess:E}),I[73]=K.id,I[74]=K.name,I[75]=K.trip.ref,I[76]=er,I[77]=E,I[78]=O):O=I[78],I[79]!==M||I[80]!==$||I[81]!==O?(B=(0,s.jsxs)(s.Fragment,{children:[M,$,O]}),I[79]=M,I[80]=$,I[81]=O,I[82]=B):B=I[82],B}},71767:(e,t,a)=>{a.d(t,{p:()=>d});var s=a(27964),r=a(44946),n=a(53784),i=a(32516),l=a(40336),o=a(25834),c=a(68948);function d(e){let t,a,d,m,h,x,u,p,f=(0,s.c)(29),{chatId:j,currentTripRef:g,open:v,onOpenChange:b,onMoveSuccess:y}=e,_=(0,i.jL)();f[0]===Symbol.for("react.memo_cache_sentinel")?(t={page:1,perPage:5},f[0]=t):t=f[0];let N=!v;f[1]!==N?(a={skip:N},f[1]=N,f[2]=a):a=f[2];let{data:w,isLoading:C,isFetching:S}=(0,r.WU)(t,a);if(f[3]!==w?.trips?(d=w?.trips??[],f[3]=w?.trips,f[4]=d):d=f[4],f[5]!==g||f[6]!==d){let e;f[8]!==g?(e=e=>e.ref!==g,f[8]=g,f[9]=e):e=f[9],m=d.filter(e),f[5]=g,f[6]=d,f[7]=m}else m=f[7];let k=m,z=w?.meta.next_page!=null;f[10]!==w?.meta||f[11]!==_?(h=()=>{let e=w?.meta.current_page??1;_(r.cz.endpoints.getTrips.initiate({page:e+1,perPage:5}))},f[10]=w?.meta,f[11]=_,f[12]=h):h=f[12];let G=h;f[13]!==j||f[14]!==_||f[15]!==y||f[16]!==b?(x=e=>{let t=_((0,n._M)({chatId:j,tripRef:e.ref}));o.J.promise(t,{loading:"Moving chat to trip…",success:`Chat moved to ${e.name}`,error:"Failed to move chat to trip"}),t.then(()=>{b(!1),y?.(e.ref)})},f[13]=j,f[14]=_,f[15]=y,f[16]=b,f[17]=x):x=f[17];let V=x;f[18]!==_||f[19]!==V?(u=()=>{let e=c.E.register({onCreate:e=>V(e)});_(l.Ay.actions.openCreateTripDialog({callbackId:e}))},f[18]=_,f[19]=V,f[20]=u):u=f[20];let L=u;return f[21]!==L||f[22]!==G||f[23]!==V||f[24]!==z||f[25]!==S||f[26]!==C||f[27]!==k?(p={trips:k,isLoading:C,isFetching:S,hasMoreTrips:z,handleLoadMoreTrips:G,handleTripSelect:V,handleCreateNewTrip:L},f[21]=L,f[22]=G,f[23]=V,f[24]=z,f[25]=S,f[26]=C,f[27]=k,f[28]=p):p=f[28],p}},71857:(e,t,a)=>{a.d(t,{O:()=>eY,A:()=>eX});var s=a(37876),r=a(27964),n=a(14232),i=a(18847),l=a.n(i),o=a(77328),c=a.n(o),d=a(74302),m=a(44995),h=a(66811),x=a(92960),u=a(36025),p=a(64403),f=a(92474),j=a(42512),g=a(32516),v=a(43547),b=a(26360),y=a(17023),_=a(4294),N=a(25834),w=a(91122),C=a(20658),S=a(54160),k=a(76270);let z=["I prefer quiet hotels near public transit.","Look for direct flights when possible.","I'm always looking for vegetarian options.","Actually, I don't love pyramids all that much, thanks."];function G(){let e=(0,g.jL)(),t=(0,g.GV)(b.UA),a=(0,g.GV)(b.sw)?.trim(),r
1=(0,n.useMemo)(()=>new w.H((0,_.Q)()),[]),[i,l]=(0,n.useState)(""),[o,c]=(0,n.useState)(null),[d,m]=(0,n.useState)(!1),[h,x]=(0,n.useState)(!1);(0,y.X)(o,z,{durationMs:1800,pauseMs:2e3,enabled:t&&!i});let u=async t=>{t.preventDefault();let a=i.trim();if(a&&!d){m(!0),x(!1);try{await r.updateSimple(a),e(b.Ay.actions.setAssistantUpdateDialogOpen(!1)),l(""),N.J.add({type:"success",description:"Got it! I’ll remember that."})}catch{x(!0)}finally{m(!1)}}};return(0,s.jsx)(S.lG,{open:t,onOpenChange:t=>!t&&void(!d&&(e(b.Ay.actions.setAssistantUpdateDialogOpen(!1)),l(""),x(!1))),summonKeyboard:!0,children:(0,s.jsx)(S.Cf,{size:"md",children:(0,s.jsxs)("form",{onSubmit:e=>void u(e),children:[(0,s.jsx)(S.c7,{separator:!1,children:(0,s.jsx)(S.L3,{children:a?(0,s.jsxs)("span",{children:["Hey, ",(0,s.jsx)("span",{className:"no-translate",children:a}),". What would you like me to know?"]},"named"):(0,s.jsx)("span",{children:"Hey, what would you like me to know?"},"unnamed")})}),(0,s.jsxs)(S.R4,{children:[(0,s.jsx)("label",{htmlFor:"assistant-update-note",className:"sr-only",children:"What should Mindtrip remember?"}),(0,s.jsx)(k.T,{id:"assistant-update-note",ref:c,autoFocus:!0,rows:4,maxLength:500,value:i,onChange:e=>l(e.target.value)}),h&&(0,s.jsx)("p",{role:"alert",className:"mt-3 text-sm text-destructive",children:"Couldn’t send your update. Please try again."})]}),(0,s.jsx)(S.Es,{children:(0,s.jsx)(C.$,{type:"submit",variant:"primary",size:"md",loading:d,disabled:!i.trim()||d,children:"Update"})})]})})})}var V=a(31845),L=a(47115),A=a(4827),T=a(10881),R=a(76022),F=a(31712),P=a(19364),M=a(84210),$=a(9419),E=a.n($),O=a(54587),B=a.n(O),I=a(7010),K=a(77945),U=a(65798),W=a(63468),J=a(76262),H=a(98269),D=a(46157),Q=a(3819),q=a(19555),Y=a(90927),X=a(90906),Z=a(75503),ee=a(16799),et=a(75784),ea=a(97778),es=a(78498),er=a(21867),en=a(18564),ei=a(19547),el=a(42202),eo=a(91183),ec=a(53934),ed=a(53157),em=a(58025),eh=a(23120),ex=a(61955),eu=a(36575),ep=a(24387),ef=a(44546),ej=a(16962),eg=a(61814),ev=a(28104),eb=a(82804),ey=a(72602),e_=a(27414),eN=a(87362),ew=a(94113),eC=a(14776),eS=a(76052),ek=a(74528);function ez(e){let t,a,n,i,l,o,c,d,m,h,x,u,p,f,j,b,y,_,N=(0,r.c)(38),{isMinimized:w,activeValue:C}=e,S=(0,g.jL)(),k=(0,en.Bd)(),z=(0,g.GV)(v.cN),G=(0,g.GV)(v.It),{data:V}=(0,e_.HX)(),L=V?.count??0;N[0]!==S?(t=e=>{S((0,v.sI)(e))},N[0]=S,N[1]=t):t=N[1];let A=t;N[2]!==S||N[3]!==G?(a=()=>{S((0,v.A_)(!G))},N[2]=S,N[3]=G,N[4]=a):a=N[4];let T=a;N[5]!==k?(n=k("navUpdates"),N[5]=k,N[6]=n):n=N[6],N[7]!==A?(i=e=>A(e),N[7]=A,N[8]=i):i=N[8],N[9]===Symbol.for("react.memo_cache_sentinel")?(l=(0,s.jsx)("h2",{className:"font-semibold",children:"Updates"}),N[9]=l):l=N[9];let R=L>0?"border-red-11 bg-red-11 text-red-1":"",F=L<1e3?L:"999+";return N[10]!==R||N[11]!==F?(o=(0,s.jsx)(ek.x,{className:R,children:F}),N[10]=R,N[11]=F,N[12]=o):o=N[12],N[13]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"Unreads"}),N[13]=c):c=N[13],N[14]!==T||N[15]!==G?(d=(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-2xs font-medium",children:[c,(0,s.jsx)(eC.d,{size:"xs",checked:G,onClick:T})]}),N[14]=T,N[15]=G,N[16]=d):d=N[16],N[17]===Symbol.for("react.memo_cache_sentinel")?(m=(0,s.jsx)(eN.v,{}),N[17]=m):m=N[17],N[18]!==d?(h=(0,s.jsxs)("div",{className:"ml-auto flex items-center justify-end gap-2",children:[d,m]}),N[18]=d,N[19]=h):h=N[19],N[20]!==h||N[21]!==o?(x=(0,s.jsxs)("div",{className:"flex h-(--header-height) items-center gap-2 rounded-tr-2xl px-(--menu-px)",children:[l,o,h]}),N[20]=h,N[21]=o,N[22]=x):x=N[22],N[23]===Symbol.for("react.memo_cache_sentinel")?(u=(0,s.jsx)("div",{className:"px-(--menu-px)",children:(0,s.jsxs)(eS.j7,{children:[(0,s.jsx)(eS.Xi,{value:"all",children:"All"}),(0,s.jsx)(eS.Xi,{value:"mentions",children:"@mentions"}),(0,s.jsx)(eS.Xi,{value:"actions",children:"Actions"})]})}),N[23]=u):u=N[23],N[24]!==x?(p=(0,s.jsxs)("div",{className:"sticky top-0 z-1 flex flex-col gap-4 roun
1ded-tr-2xl bg-surface-2",children:[x,u]}),N[24]=x,N[25]=p):p=N[25],N[26]===Symbol.for("react.memo_cache_sentinel")?(f=(0,s.jsx)(eS.av,{value:"all",className:"flex flex-1 flex-col",children:(0,s.jsx)(ew.A,{})}),N[26]=f):f=N[26],N[27]===Symbol.for("react.memo_cache_sentinel")?(j=(0,s.jsx)(eS.av,{value:"mentions",className:"flex flex-1 flex-col",children:(0,s.jsx)(ew.A,{})}),N[27]=j):j=N[27],N[28]===Symbol.for("react.memo_cache_sentinel")?(b=(0,s.jsx)(eS.av,{value:"actions",className:"flex flex-1 flex-col",children:(0,s.jsx)(ew.A,{})}),N[28]=b):b=N[28],N[29]!==z||N[30]!==p||N[31]!==i?(y=(0,s.jsxs)(eS.tU,{value:z,onValueChange:i,className:"flex h-full flex-col",children:[p,f,j,b]}),N[29]=z,N[30]=p,N[31]=i,N[32]=y):y=N[32],N[33]!==C||N[34]!==w||N[35]!==y||N[36]!==n?(_=(0,s.jsx)(eg.g,{title:n,iconName:"bell",value:"/updates",isMinimized:w,activeValue:C,children:y}),N[33]=C,N[34]=w,N[35]=y,N[36]=n,N[37]=_):_=N[37],_}var eG=a(2015),eV=a(58604),eL=a(63833),eA=a(73273),eT=a(2692),eR=a(79085),eF=a(94516),eP=a(89309),eM=a(58170);let e$=(0,n.memo)(function(){let e=(0,g.GV)(eu.yy);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(E(),{id:"6912d4e6cfb6a578",dynamic:[e?"var(--nav-width-collapsed)":"var(--nav-width-expanded)"],children:`:root{--nav-width:${e?"var(--nav-width-collapsed)":"var(--nav-width-expanded)"}}`}),(0,s.jsx)(L.i,{children:(0,s.jsx)(eO,{})})]})});function eE(){let e=(0,g.GV)(j.tB);return(0,g.GV)(j.YN)&&!e}function eO(){let e,t,a,i=(0,r.c)(6),l=eE(),o=(0,g.jL)();return i[0]!==o||i[1]!==l?(e=()=>{o((0,eh.e0)(l))},t=[l,o],i[0]=o,i[1]=l,i[2]=e,i[3]=t):(e=i[2],t=i[3]),(0,n.useEffect)(e,t),i[4]!==l?(a=l?null:(0,s.jsx)(eU,{}),i[4]=l,i[5]=a):a=i[5],a}function eB(){let e,t,a=(0,r.c)(4),n=eE();return a[0]!==n?(e=n?(0,s.jsx)(V.M0,{}):null,a[0]=n,a[1]=e):e=a[1],a[2]!==e?(t=(0,s.jsx)(L.i,{children:e}),a[2]=e,a[3]=t):t=a[3],t}function eI(){let e,t=(0,r.c)(2),a=(0,g.GV)(j.tB);return t[0]!==a?(e=a?null:(0,s.jsx)(eK,{}),t[0]=a,t[1]=e):e=t[1],e}function eK(){let e,t,a=(0,r.c)(5);a[0]===Symbol.for("react.memo_cache_sentinel")?(e={source:"site_nav",createNewChat:!0},a[0]=e):e=a[0];let{disabled:n,label:i,start:l,visible:o}=(0,H.q)(e);return o?(a[1]!==n||a[2]!==i||a[3]!==l?(t=(0,s.jsx)(eA._2,{disabled:n,onClick:l,children:i}),a[1]=n,a[2]=i,a[3]=l,a[4]=t):t=a[4],t):null}function eU(){let e=(0,h.r)(),t=(0,g.jL)(),a=(0,g.GV)(j.YN),r=(0,g.GV)(eu.yy),i=(0,U.U)(I.qs.xl),l=(0,g.GV)(b.sw),o=(0,g.GV)(u.m$),c=(0,g.GV)(f.xZ),m=(0,g.GV)(b.zW),x=(0,g.GV)(j.tB),p=(0,g.GV)(eu.iL),v=(0,g.GV)(eh._B),y=(0,g.GV)(b.tU),_=(0,g.GV)(eh.pi),N=(0,g.GV)(eh.C_),w=(0,g.GV)(eh.T6),S=(0,g.GV)(eh.lE),k=(0,g.GV)(b.zG),z=(0,g.GV)(b.mB),G=(0,eo.u)("playground_access"),V=(0,eo.u)("proactive_agents"),L=z&&(0,es.o2)(z)||G,A=(0,g.GV)(j.l1),T=z&&(0,es.o2)(z)||V,R=(0,g.GV)(ed.mN),F=(0,g.GV)(eh.Mu),P=(0,g.GV)(j.Ee),M=P?.properties.brand_logo,$=x?P?.orgid:void 0,{canView:E}=(0,W.q)($),O=x&&!!P?.orgid&&!m&&(E||z&&(0,es.o2)(z)),H=P?.orgid?`https://mindtrip.ai/dashboard/${P.orgid}?tab=content`:void 0,[e_,eN]=(0,n.useState)(!1),[ew,eC]=(0,n.useState)(),[eS,ek]=(0,n.useState)(!1),[eR,e$]=(0,J.F)("site-nav-promo-dismissed",!1),eE=(0,g.GV)(em.zj),eO=(0,g.GV)(em.zi),eB=(0,n.useRef)(!1);(0,n.useEffect)(()=>{(r||i)&&!F||t((0,eu.Op)(!0))},[t,i,r,F]),(0,n.useEffect)(()=>{eB.current||(eB.current=!0,t((0,eh.VS)()))});let eK=!!(r&&!N||w),eU={isMinimized:eK,activeValue:w},eJ=(0,en.Bd)(),eH=(0,ep.wp)(e)||"chat"===R.type,eD=(0,el.zL)()?"/":m?(0,es.CV)(x):es.rL,eQ=(0,n.useRef)(null),eq=(0,n.useRef)(null),eY=(0,n.useRef)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(et.N,{children:N&&(0,s.jsx)(ea.PY1.div,{"aria-hidden":"true",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"pointer-events-auto fixed inset-0 z-overlay bg-black-a-8 sm:hidden",onClick:()=>t((0,eh.WJ)(!1))})}),(0,s.jsxs)(Q.e,{ref:eQ,orientation:"vertical",value:w||null,onValueChange:(e,a)=>{if("trigger-hover"===a.reason||("trigger-press"===a.reason&&e&&(eY.current=!0,setTimeout(()=>{eY.current=!1},400)),"outside-press"===a.reason&&eY.current))return;let s=e??"";t((0,eh.tc)(s)),s||t((0,ex.nP)())},onTransitionEnd:e=>{e.target===e.currentTarget&&"width"===e.propertyName&&ek(!1)},className:(0,d.cn)("group/nav-root fixed inset-y-0 left-0 z-overlay flex w-(--root-width) max-w-(--root-max-width) -translate-x-full flex-col overflow-hidden rounded-r-2xl bg-background pb-2 leading-tight transition-transform duration-drawer ease-drawer [--drawer-max-width:theme(width.96)] [--menu-px:theme(space.5)] [--root-max-width:calc(var(--drawer-max-width)+var(--nav-width-collapsed))] [--root-width:calc(100vw-var(--container-pad))] sm:w-(--nav-width) sm:translate-none sm:rounded-none sm:bg-transparent sm:transition-[width] sm:[--menu-px:theme(space.7)]",N&&"pointer-events-auto translate-x-0"),children:[(0,s.jsx)("div",{ref:eq,"aria-hidden":"true",className:"pointer-events-none absolute top-0 left-(--nav-width-collapsed) -ml-px h-full"}),(0,s.jsxs)("div",{className:(0,d.cn)("absolute inset-0 flex flex-col bg-background sm:border-r",r&&"sm:z-2"),children:[(0,s.jsx)("div",{className:"mx-[calc((var(--nav-width-collapsed)-var(--button-xs-size))/2)] mt-16 mb-4 flex h-(--header-height) shrink-0 items-center sm:mt-0",children:(0,s.jsxs)("div",{className:"group relative flex w-full items-center",onPointerLeave:()=>ek(!1),children:[(0,s.jsx)("div",{className:(0,d.cn)("overflow-hidden sm:w-(--button-xs-size) xl:w-auto",eK&&"max-sm:w-(--button-xs-size) xl:w-(--button-xs-size) xl:transition-transform",eK&&!eS&&"xl:group-hover:scale-0 xl:group-hover:rotate-90"),children:M&&!eK?(0,s.jsx)("img",{src:M,alt:"",className:"mt-2 h-[calc(var(--header-height)-.5rem)] max-w-34 object-contain"}):(0,el.zL)()?(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(ey.A,{className:"ml-[2.5px]"}),(0,s.jsx)("span",{children:"\uD83C\uDDEA\uD83C\uDDFA"})]}):(0,s.jsx)(ey.A,{className:"ml-[2.5px]"})}),(0,s.jsx)(ev.N,{href:eD,className:"absolute inset-0",children:(0,s.jsx)("span",{className:"sr-only",children:"Back to home"})}),eK&&(0,s.jsx)("div",{className:"hidden xl:contents",children:(0,s.jsx)(eT.K,{variant:"subtle",icon:{name:"chevronRight"},label:eJ("expand"),onClick:()=>{ek(!0),t((0,eu.Op)(!r))},className:(0,d.cn)("absolute inset-0 opacity-0",!eS&&"group-hover:opacity-100"),tooltip:{side:"right"}})}),!_&&!eK&&(0,s.jsx)("div",{className:"absolute right-0 hidden opacity-0 transition-opacity group-hover/nav-root:opacity-100 xl:block",children:(0,s.jsx)(eT.K,{variant:"subtle",icon:{name:"chevronLeft"},label:eJ("collapse"),size:"xs",tooltip:!eS,onClick:()=>{ek(!0),t((0,eu.Op)(!r))}})})]})}),!(0,el.zL)()&&(0,s.jsx)("div",{className:"absolute top-0 right-4 flex h-(--header-height) items-center sm:hidden",children:(0,s.jsx)(C.$,{variant:"primary",size:"sm",onPerform:async()=>await t((0,ex.HZ)(e)),children:(0,s.jsx)(en.HT,{translationKey:"navNewChat"})})}),(0,el.zL)()?(0,s.jsxs)(q.S,{className:"flex flex-col gap-2.5",children:[(0,s.jsx)(ez,{...eU}),!x&&y&&(0,s.jsx)(eg.g,{...eU,title:eJ("navOrganization"),href:"/dashboard",iconName:"layoutSquare"})]}):(0,s.jsxs)(q.S,{className:"flex flex-col gap-2.5",children:[!F&&(0,s.jsxs)(s.Fragment,{children:[!x&&(0,s.jsx)(eg.g,{...eU,title:eJ("navHome"),iconName:"home",href:"/home"}
1),(0,s.jsx)(eg.g,{...eU,title:eJ("navChats"),iconName:"chatBubble",value:"/chat",count:o,children:(0,s.jsx)(eL.Sz,{})}),!p&&(0,s.jsx)(eg.g,{...eU,title:eJ("navTrips"),href:"/trips",iconName:"baggage"}),!x&&(0,s.jsx)(eg.g,{...eU,title:eJ("navAgents"),href:"/agents",iconName:"task"}),!x&&(0,s.jsx)(eg.g,{...eU,title:eJ("navExplore"),href:"/explore",iconName:"search"}),(0,s.jsx)(eg.g,{...eU,title:eJ("navSaved"),href:"/saved",iconName:"heart",count:c}),(0,s.jsx)(ez,{...eU})]}),S&&(0,s.jsx)(eg.g,{...eU,title:eJ("navInspiration"),href:"/inspiration",iconName:"compass"}),!F&&(0,s.jsxs)(s.Fragment,{children:[!x&&(0,s.jsx)(eg.g,{...eU,title:eJ("navCreate"),href:"/create",iconName:"create"}),!x&&y&&(0,s.jsx)(eg.g,{...eU,title:eJ("navOrganization"),href:"/dashboard",iconName:"layoutSquare"}),O&&H&&(0,s.jsx)(eg.g,{...eU,title:eJ("navAdmin"),href:H,target:"_blank",rel:"noopener noreferrer",iconName:"layoutSquare"})]})]}),(0,s.jsx)(et.N,{initial:!1,children:!eK&&!(0,el.zL)()&&(0,s.jsx)(ea.PY1.div,{initial:{opacity:0},animate:{opacity:1,transition:{delay:.2}},exit:{opacity:0,transition:{delay:0,duration:.1}},className:"mt-8 hidden px-2 xl:block",children:(0,s.jsx)(C.$,{variant:"subtle",block:!0,size:"md",onPerform:async()=>await t((0,ex.HZ)(e)),children:(0,s.jsx)(en.HT,{translationKey:"navNewChat"})})})}),(0,s.jsxs)("div",{className:"mt-auto px-3 pt-7 pb-3.5 sm:w-(--nav-width-expanded) sm:pb-7",children:[(0,s.jsxs)(et.N,{mode:"wait",initial:!1,children:[r&&(0,s.jsx)(ea.PY1.div,{initial:{x:"-100%",opacity:0}
1,animate:{x:0,opacity:1,transition:{type:"tween"}},exit:{x:"-100%",opacity:0},className:(0,d.cn)(M?"-mx-3 [@media(max-height:620px)]:hidden":y?"[@media(max-height:860px)]:hidden":"[@media(max-height:800px)]:hidden"),children:(0,s.jsx)(ev.N,{"aria-label":"Home",href:eD,className:"block max-sm:hidden",children:M?(0,s.jsx)("img",{src:M,alt:"",className:"ml-2 h-[calc(var(--nav-width-collapsed)-1rem)] max-w-34 origin-top-left -rotate-90 object-contain"}):(0,s.jsx)(ey.A,{size:24,className:"ml-1 origin-top-left -rotate-90"})})},"logo"),!r&&!eR&&!eK&&!x&&"US"===eE&&!(0,el.zL)()&&(0,s.jsxs)(ea.PY1.div,{initial:{scale:.85,opacity:0},animate:{scale:1,opacity:1,transition:{delay:.5}},exit:{scale:.85,opacity:0,transition:{delay:0}},className:(0,d.cn)("relative mb-7 text-foreground",y?"[@media(max-height:917px)]:hidden":"[@media(max-height:867px)]:hidden"),children:[(0,s.jsxs)(ev.N,{href:K.q,target:"_blank",className:"group relative flex items-end gap-3 overflow-hidden rounded-2xl bg-linear-to-r from-[#0A3789] to-[#01246A] p-3 text-white 2xl:items-center 2xl:py-5 2xl:pr-5 2xl:pl-4",children:[(0,s.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"text-xs leading-[1.1] font-semibold 2xl:mb-px 2xl:text-sm",children:"Mindtrip for iOS"}),(0,s.jsx)("span",{className:"text-3xs leading-tight",children:"Your personal travel assistant, wherever you go."})]}),(0,s.jsx)(B(),{src:`${er.CF_S3_URL}/web/ios/QRCode.jpg`,alt:"",width:56,height:56,className:"shrink-0 overflow-hidden rounded-lg max-2xl:size-12"})]}),(0,s.jsx)("button",{type:"button","aria-label":"Close",className:"absolute top-2 right-2 text-white",onClick:()=>e$(!0),children:(0,s.jsx)("span",{className:"-m-2.5 block p-2.5 transition-transform hover:scale-125",children:(0,s.jsx)(ej.A,{className:"size-2.5",strokeWidth:2.75})})})]},"site-nav-promo")]}),(0,s.jsxs)(eA.rI,{open:_,onOpenChange:e=>t((0,eh.Jp)(e)),children:[(0,s.jsxs)(eA.ty,{className:"group flex w-full items-center gap-2 outline-hidden",children:[(0,s.jsx)(eF.H,{size:"sm",className:r?"outline-offset-2 group-focus:outline-2":void 0}),(0,s.jsxs)("span",{className:(0,d.cn)("flex min-w-0 flex-1 items-center whitespace-nowrap transition-opacity duration-300",eK&&"pointer-events-none opacity-0"),children:[(0,s.jsx)("span",{className:"min-w-0 flex-1",children:l||m?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eM.x,{className:"text-xs font-medium"}),(0,s.jsx)(eP.m,{className:"text-2xs text-muted"})]}):(0,s.jsx)(eP.m,{showAt:!1,className:"text-xs font-medium"})}),(0,s.jsx)(eT.K,{variant:"ghost",size:"sm",as:"span",icon:{name:"ellipsis"},label:eJ("menu"),"data-state":_?"open":"closed",className:r?void 0:"group-focus:outline-solid"})]})]}),(0,s.jsxs)(eA.SQ,{side:"top",align:"start",className:"w-[calc(var(--root-width)-(theme(width.3)*2))] max-w-[calc(var(--root-max-width)-(theme(width.3)*2))] sm:w-auto sm:min-w-[calc(var(--nav-width-expanded)-(theme(width.3)*2))]",container:a?eQ.current:void 0,children:[!(0,el.zL)()&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eV.v,{type:"profile",children:(0,s.jsx)(eA._2,{render:(0,s.jsxs)(ev.N,{href:`/profile/${k}`,className:"flex items-center gap-2",children:[(0,s.jsx)(eF.H,{size:"md"}),(0,s.jsxs)("span",{className:"min-w-0 flex-1 text-sm",children:[l||m?(0,s.jsx)(eM.x,{className:"font-semibold"}):(0,s.jsx)(eP.m,{showAt:!1,className:"font-semibold"}),(0,s.jsx)("span",{className:"text-xs text-muted",children:"View profile"})]}),(0,s.jsx)(ef.A,{className:"-mr-0.5 ml-auto",size:16,strokeWidth:2})]})})}),(0,s.jsx)(eA.mB,{}),(0,s.jsx)(eI,{}),(0,s.jsx)(eV.v,{type:"settings",children:(0,s.jsx)(eA._2,{render:(0,s.jsx)(ev.N,{href:"/settings",children:"Account settings"})})}),A&&(0,s.jsx)(eV.v,{type:"settings",children:(0,s.jsx)(eA._2,{render:(0,s.jsx)(ev.N,{href:`/settings?section=${D.A9}`,children:"Personalization"})})}),L&&(0,s.jsx)(eV.v,{type:"settings",children:(0,s.jsx)(eA._2,{render:(0,s.jsx)(ev.N,{href:"/agents",children:"Agents"})})}),T&&(0,s.jsx)(eV.v,{type:"settings",children:(0,s.jsx)(eA._2,{render:(0,s.jsx)(ev.N,{href:`/settings?section=${D.j7}`,children:"Price alerts"})})}),!x&&(0,s.jsx)(eV.v,{children:(0,s.jsx)(eA._2,{render:(0,s.jsx)(ev.N,{href:"/receipts",children:"Receipts"})})}),(0,s.jsx)(eA.mB,{}),(0,s.jsx)(eV.v,{children:(0,s.jsx)(eA._2,{onClick:()=>{eC(void 0),eN(!0)},children:"Give feedback"})}),"en"!==eO&&(0,s.jsx)(eV.v,{children:(0,s.jsx)(eA._2,{onClick:()=>{eC("translation"),eN(!0)},children:"Report translation issue"})}),(0,s.jsx)(eA._2,{render:(0,s.jsx)(ev.N,{href:"/privacy-policy",target:"_blank",children:"Privacy policy"})}),(0,s.jsx)(eA._2,{render:(0,s.jsx)(ev.N,{href:"/terms-of-service",target:"_blank",children:"Terms of service"})}),(0,s.jsx)(eA.mB,{}),v&&(0,s.jsx)(eA._2,{render:(0,s.jsx)(ev.N,{href:"/admin",children:"Admin"})}),!x&&L&&(0,s.jsx)(eV.v,{type:"settings",children:(0,s.jsx)(eA._2,{render:(0,s.jsx)(ev.N,{href:"/playground",children:eJ("navPlayground")})})}),(0,s.jsx)(eA.mB,{})]}),m?(0,s.jsx)(eA._2,{onClick:()=>void t((0,ec.xb)({})),children:"Log in"}):(0,s.jsx)(eA._2,{onClick:()=>t((0,ex.X)()),children:"Log out"})]})]}),!M||eK||(0,ei.MG)()?(0,s.jsx)("div",{className:"mt-7 flex h-11.5 flex-col justify-end",children:(0,s.jsx)(et.N,{initial:!1,children:eK?(0,s.jsx)(eW,{}):(0,s.jsx)(ea.PY1.div,{initial:{opacity:0,y:4}
1,animate:{opacity:1,y:0,transition:{delay:.2}},exit:{opacity:0},className:"sm:hidden xl:block",children:(0,s.jsx)(eb.z,{multiLine:!0})})})}):(0,s.jsxs)("div",{className:"mt-7 flex h-11.5 items-end justify-between",children:[(0,s.jsxs)(ev.N,{href:"https://mindtrip.ai",target:"_blank",className:"mb-1 flex flex-col gap-2",children:[(0,s.jsx)("span",{className:"text-3xs text-muted",children:"Powered by"}),(0,s.jsx)(ey.A,{size:20})]}),(0,s.jsx)(eW,{})]})]})]}),(0,s.jsx)(Y.a,{container:eQ.current,children:(0,s.jsx)(X.W,{positionMethod:"fixed",side:"right",align:"start",sideOffset:0,alignOffset:0,anchor:eq,collisionPadding:0,collisionAvoidance:{side:"none",align:"none",fallbackAxisSide:"none"},children:(0,s.jsx)(Z.Q,{className:"h-screen w-[calc(var(--root-width)-var(--nav-width-collapsed))] max-w-(--drawer-max-width) rounded-r-2xl border-l bg-surface-2 shadow-xl duration-350 ease-drawer [clip-path:inset(0px_-20px_0px_0px)] data-closed:animate-out data-closed:fade-out data-closed:slide-out-to-left-14 data-open:animate-in data-open:fade-in data-open:slide-in-from-left-14",children:(0,s.jsx)(ee.Q,{className:"size-full"})})})})]}),(0,s.jsx)("div",{className:(0,d.cn)("fixed top-(--banner-height,0px) left-0 z-overlay flex h-(--header-height) w-(--nav-width-collapsed) items-center justify-center transition-[left] sm:hidden",N&&"pointer-events-auto",w&&"pointer-events-none"),children:(0,s.jsx)(eT.K,{variant:eH||"trips"===R.type?"ghost":"overlay",size:"sm",icon:{name:N?"cross":"menu",size:24},label:N?"Close":"Menu",onClick:()=>t((0,eh.WJ)(!N))})}),(0,s.jsx)(eG.Z,{open:e_,onOpenChange:eN,initialCategory:ew},ew??"default")]})}function eW(){let e,t,a,n,i,l=(0,r.c)(5);return l[0]===Symbol.for("react.memo_cache_sentinel")?(e={opacity:0,y:4},l[0]=e):e=l[0],l[1]===Symbol.for("react.memo_cache_sentinel")?(t={opacity:1,y:0,transition:{delay:.2}},a={opacity:0},l[1]=t,l[2]=a):(t=l[1],a=l[2]),l[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,s.jsx)(ea.PY1.div,{initial:e,animate:t,exit:a,children:(0,s.jsx)(eR.Wv,{render:(0,s.jsx)(eT.K,{label:"Company info",variant:"ghost",size:"sm",icon:{name:"info"},className:"text-muted hover:text-foreground"})})}),l[3]=n):n=l[3],l[4]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsxs)(eR.AM,{children:[n,(0,s.jsx)(eR.hl,{size:"auto",align:"center",side:"right",className:"px-4 py-3",children:(0,s.jsx)(eb.z,{})})]}),l[4]=i):i=l[4],i}let eJ="skip-nav";function eH(){let e,t=(0,r.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("a",{href:`#${eJ}`,className:"sr-only",children:"Skip to content"}),t[0]=e):e=t[0],e}function eD(){let e,t=(0,r.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("div",{id:eJ,className:"contents"}),t[0]=e):e=t[0],e}var eQ=a(89416),eq=a(40202);let eY=l()(()=>Promise.all([a.e(9180),a.e(8894),a.e(8913),a.e(7979),a.e(3200),a.e(9786),a.e(3797),a.e(4279),a.e(1879),a.e(41),a.e(4975),a.e(1628),a.e(2208),a.e(3923),a.e(5066),a.e(5047),a.e(2400),a.e(3165),a.e(4733),a.e(2114),a.e(4473),a.e(1596),a.e(3243),a.e(1629),a.e(9416)]).then(a.bind(a,51012)).then(e=>e.SheetContainer),{loadableGenerated:{webpack:()=>[51012]},ssr:!1});function eX(e){let t,a,i,l,o,x,y,_,N,w,C,S,k,z,$,E,O,B,I,K,U,W,J,H,D=(0,r.c)(47),{children:Q,title:q,hideNav:Y}=e,X=(0,g.jL)(),Z=(0,h.r)(),ee=(0,g.GV)(j.t4),et=(0,g.GV)(j.tB),ea=(0,g.GV)(b.WH),es=(0,g.GV)(b.uP);D[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],D[0]=t):t=D[0],(0,n.useEffect)(e0,t),D[1]!==X||D[2]!==Z?(a=()=>{let e=e=>{X((0,v.Pm)({data:e,router:Z}))};return m.h.instance.addSubscriber(e),()=>{m.h.instance.removeSubscriber(e)}},i=[X,Z],D[1]=X,D[2]=Z,D[3]=a,D[4]=i):(a=D[3],i=D[4]),(0,n.useEffect)(a,i);let er=(0,g.GV)(j.eI);D[5]!==X||D[6]!==ea||D[7]!==es?(l=()=>{let e=[X(p.RH.endpoints.getSavedGuidesList.initiate(void 0))];return es&&e.push(X(f.Gg.endpoints.getSavedPlacesList.initiate(void 0))),ea&&e.push(X(u.Ko.endpoints.getChatCount.initiate())),()=>{e.forEach(eZ)}},o=[X,ea,es],D[5]=X,D[6]=ea,D[7]=es,D[8]=l,D[9]=o):(l=D[8],o=D[9]),(0,n.useEffect)(l,o);let en=et?"light":"system",ei=!et,el=et?"light":void 0;D[10]===Symbol.for("react.memo_cache_sentinel")?(x=(0,s.jsx)(eq.R,{}),D[10]=x):x=D[10],D[11]!==q?(y=q&&(0,s.jsx)("title",{children:q}),D[11]=q,D[12]=y):y=D[12],D[13]===Symbol.for("react.memo_cache_sentinel")?(_=(0,s.jsx)("meta",{name:"referrer",content:"strict-origin-when-cross-origin"}),D[13]=_):_=D[13],D[14]!==y?(N=(0,s.jsxs)(c(),{children:[y,_]}),D[14]=y,D[15]=N):N=D[15],D[16]===Symbol.for("react.memo_cache_sentinel")?(w=(0,s.jsx)(eH,{}),D[16]=w):w=D[16],D[17]!==er?(C=(0,s.jsx)(L.i,{children:(0,s.jsx)(F.p,{enabled:er})}),D[17]=er,D[18]=C):C=D[18],D[19]!==Y?(S=!Y&&(0,s.jsx)(e$,{}),D[19]=Y,D[20]=S):S=D[20],D[21]===Symbol.for("react.memo_cache_sentinel")?(k=(0,s.jsx)(eD,{}),D[21]=k):k=D[21];let eo=!Y&&"transition-[margin] duration-drawer ease-drawer sm:ml-(--nav-width)";D[22]!==eo?(z=(0,d.cn)("relative isolate flex min-h-svh flex-col",eo),D[22]=eo,D[23]=z):z=D[23];let ec=void 0!==ee&&Q;return D[24]===Symbol.for("react.memo_cache_sentinel")?($=(0,s.jsx)(L.i,{children:(0,s.jsx)(A.Q,{})}),D[24]=$):$=D[24],D[25]!==Y?(E=!Y&&(0,s.jsx)(eB,{}),D[25]=Y,D[26]=E):E=D[26],D[27]!==z||D[28]!==ec||D[29]!==E?(O=(0,s.jsxs)("main",{className:z,children:[ec,$,E]}),D[27]=z,D[28]=ec,D[29]=E,D[30]=O):O=D[30],D[31]===Symbol.for("react.memo_cache_sentinel")?(B=(0,s.jsx)(eY,{}),I=(0,s.jsx)(P.I,{}),K=(0,s.jsx)(G,{}),D[31]=B,D[32]=I,D[33]=K):(B=D[31],I=D[32],K=D[33]),D[34]!==O?(U=(0,s.jsx)(M.iO,{children:(0,s.jsxs)(V.Hw,{children:[k,O,B,I,K]})}),D[34]=O,D[35]=U):U=D[35],D[36]===Symbol.for("react.memo_cache_sentinel")?(W=(0,s.jsx)(T.j,{}),D[36]=W):W=D[36],D[37]!==U?(J=(0,s.jsxs)(R.C,{children:[U,W]}),D[37]=U,D[38]=J):J=D[38],D[39]!==N||D[40]!==C||D[41]!==S||D[42]!==J||D[43]!==en||D[44]!==ei||D[45]!==el?(H=(0,s.jsxs)(eQ.N,{attribute:"class",defaultTheme:en,enableSystem:ei,forcedTheme:el,children:[x,N,w,C,S,J]}),D[39]=N,D[40]=C,D[41]=S,D[42]=J,D[43]=en,D[44]=ei,D[45]=el,D[46]=H
1):H=D[46],H}function eZ(e){return e.unsubscribe()}function e0(){x.d.start()}},72067:(e,t,a)=>{a.d(t,{J:()=>l});var s=a(37876),r=a(27964),n=a(74302),i=a(5528);function l(e){let t,a,i,l,c,d,m=(0,r.c)(16),{images:h,className:x}=e;return m[0]!==x?(t=(0,n.cn)("grid size-full grid-cols-2 grid-rows-2 gap-1.5",x),m[0]=x,m[1]=t):t=m[1],m[2]!==h?(a=h.map(o),m[2]=h,m[3]=a):a=m[3],m[4]!==h.length?(i=0===h.length&&(0,s.jsx)("div",{className:"row-span-2 bg-gray-3"}),m[4]=h.length,m[5]=i):i=m[5],m[6]!==h.length?(l=h.length<2&&(0,s.jsx)("div",{className:"bg-gray-3"}),m[6]=h.length,m[7]=l):l=m[7],m[8]!==h.length?(c=h.length<3&&(0,s.jsx)("div",{className:"bg-gray-3"}),m[8]=h.length,m[9]=c):c=m[9],m[10]!==t||m[11]!==a||m[12]!==i||m[13]!==l||m[14]!==c?(d=(0,s.jsxs)("div",{className:t,children:[a,i,l,c]}),m[10]=t,m[11]=a,m[12]=i,m[13]=l,m[14]=c,m[15]=d):d=m[15],d}function o(e,t){return(0,s.jsx)(i.$,{src:e,width:0===t?"md":"sm",className:(0,n.cn)("size-full",0===t&&"row-span-2"),alt:""},t)}},73458:(e,t,a)=>{a.d(t,{L:()=>c});var s=a(37876),r=a(14232),n=a(20658),i=a(54160),l=a(85758),o=a(83310);function c(e){let{open:t,onOpenChange:a,initialValue:c,title:d,fieldName:m="name",maxLength:h,onSubmit:x,onSuccess:u}=e,[p,f]=(0,r.useState)(c),[j,g]=(0,r.useState)(!1);(0,r.useEffect)(()=>{f(c)},[c,t]);let v=async e=>{if(e.preventDefault(),p.trim()){g(!0);try{await x(p.trim()),a(!1),u?.()}catch(e){}finally{g(!1)}}};return(0,s.jsx)(i.lG,{open:t,onOpenChange:a,summonKeyboard:!0,children:(0,s.jsxs)(i.Cf,{children:[(0,s.jsx)(i.rr,{className:"sr-only",children:d}),(0,s.jsxs)(l.lV,{className:"contents",onSubmit:v,children:[(0,s.jsx)(i.c7,{separator:!1,children:(0,s.jsx)(i.L3,{children:d})}),(0,s.jsx)(i.R4,{children:(0,s.jsx)(l.zB,{name:m,children:(0,s.jsx)(l.MJ,{render:(0,s.jsx)(o.ks,{maxLength:h,value:p,onChange:e=>f(e.target.value),required:!0,disabled:j,autoFocus:!0})})})}),(0,s.jsx)(i.Es,{children:(0,s.jsx)(n.$,{type:"submit",variant:"primary",size:"md",wide:!0,loading:j,children:"Save"})})]})]})})}},74528:(e,t,a)=>{a.d(t,{x:()=>i});var s=a(37876),r=a(27964),n=a(92197);let i=e=>{let t,a,i=(0,r.c)(4);return i[0]!==e?({...t}=e,i[0]=e,i[1]=t):t=i[1],i[2]!==t?(a=(0,s.jsx)(n.E,{size:1,color:"muted",...t}),i[2]=t,i[3]=a):a=i[3],a};i.displayName="CountBadge"},76022:(e,t,a)=>{a.d(t,{C:()=>u});var s=a(37876),r=a(27964),n=a(14232),i=a(52810),l=a(98156),o=a(23081),c=a(32516),d=a(58025),m=a(57447),h=a(32617),x=a(78977);let u=e=>{let t,a,u=(0,r.c)(5),{children:p}=e,f=(0,h._K)("NEXT_PUBLIC_GOOGLE_PLACES_API_KEY"),j=(a=(0,c.GV)(d.v5),(0,n.useMemo)(()=>{let e,t=(0,o.Je)();try{e=t?new Intl.Locale(t):void 0}catch{e=void 0}let s=(0,i.B)()?(0,l.hF)():{browserLanguage:void 0,browserRegion:void 0},r=(0,l.Lp)({userLanguage:e?.language,userRegion:e?.region,embeddedLanguage:a?.language,embeddedRegion:a?.region,browserLanguage:s?.browserLanguage,browserRegion:s?.browserRegion});return new Intl.Locale(r)},[a]));return(0,x.vA)(f,"Missing Google Maps API key"),u[0]!==f||u[1]!==p||u[2]!==j.language||u[3]!==j.region?(t=(0,s.jsx)(m.c4,{apiKey:f,language:j.language,region:j.region,children:p}),u[0]=f,u[1]=p,u[2]=j.language,u[3]=j.region,u[4]=t):t=u[4],t}},76052:(e,t,a)=>{a.d(t,{Xi:()=>p,av:()=>f,dO:()=>u,j7:()=>h,tU:()=>m});var s=a(37876),r=a(27964),n=a(63036),i=a(40824),l=a(37918),o=a(38675),c=a(74302),d=a(28104);let m=n.p;function h(e){let t,a,n,l,o,d=(0,r.c)(10);return d[0]!==e?({ref:n,className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=n):(t=d[1],a=d[2],n=d[3]),d[4]!==t?(l=(0,c.cn)("flex gap-2 border-b text-base font-medium sm:gap-2.5",t),d[4]=t,d[5]=l):l=d[5],d[6]!==a||d[7]!==n||d[8]!==l?(o=(0,s.jsx)(i.j,{ref:n,className:l,...a}),d[6]=a,d[7]=n,d[8]=l,d[9]=o):o=d[9],o}h.displayName=i.j.displayName;let x="-mb-px border-b-2 border-transparent px-2 py-1.5 text-muted not-disabled:hover:text-foreground";function u(e){let t,a,n,i,l,o,m,h=(0,r.c)(14);h[0]!==e?({ref:a,className:t,rel:n,target:l,...i}=e,h[0]=e,h[1]=t,h[2]=a,h[3]=n,h[4]=i,h[5]=l):(t=h[1],a=h[2],n=h[3],i=h[4],l=h[5]);let u=n??("_blank"===l?"noopener noreferrer":void 0);return h[6]!==t?(o=(0,c.cn)(x,"aria-[current=page]:border-current aria-[current=page]:text-foreground",t),h[6]=t,h[7]=o):o=h[7],h[8]!==a||h[9]!==i||h[10]!==u||h[11]!==o||h[12]!==l?
1(m=(0,s.jsx)(d.N,{ref:a,target:l,...i,rel:u,className:o}),h[8]=a,h[9]=i,h[10]=u,h[11]=o,h[12]=l,h[13]=m):m=h[13],m}function p(e){let t,a,n,i,o,d,m=(0,r.c)(13);m[0]!==e?({ref:i,className:t,disabled:a,...n}=e,m[0]=e,m[1]=t,m[2]=a,m[3]=n,m[4]=i):(t=m[1],a=m[2],n=m[3],i=m[4]);let h=a&&"cursor-not-allowed opacity-50";return m[5]!==t||m[6]!==h?(o=(0,c.cn)(x,"data-active:border-current data-active:text-foreground",h,t),m[5]=t,m[6]=h,m[7]=o):o=m[7],m[8]!==a||m[9]!==n||m[10]!==i||m[11]!==o?(d=(0,s.jsx)(l.M,{ref:i,disabled:a,className:o,...n}),m[8]=a,m[9]=n,m[10]=i,m[11]=o,m[12]=d):d=m[12],d}u.displayName="TabsLink",p.displayName=l.M.displayName;let f=o.R},76262:(e,t,a)=>{a.d(t,{F:()=>i,M:()=>n});var s=a(14232),r=a(64136);function n(e,t){let[a,n]=(0,s.useState)(()=>{try{return r.y.tryGetJSON(e,{type:"local",defaultValue:t})}catch(e){return console.log(e),t}}),i=(0,s.useCallback)(t=>{try{let s=t instanceof Function?t(a):t;n(s),r.y.setJSON(e,s,{type:"local"})}catch(e){console.log(e)}},[e,a]);return[a,i]}function i(e,t){let[a,n]=(0,s.useState)(()=>{try{return r.y.tryGetJSON(e,{type:"session",defaultValue:t})}catch(e){return console.log(e),t}}),i=(0,s.useCallback)(t=>{try{let s=t instanceof Function?t(a):t;n(s),r.y.setJSON(e,s,{type:"session"})}catch(e){console.log(e)}},[e,a]);return[a,i]}},76270:(e,t,a)=>{a.d(t,{T:()=>c});var s=a(37876),r=a(27964),n=a(47137),i=a(74302),l=a(18437);let o=(0,n.F)("peer flex w-full border border-input bg-background text-foreground transition-colors placeholder:text-muted hover:border-gray-8 focus:border-current focus:outline-hidden focus:placeholder:text-gray-8 data-invalid:border-destructive",{variants:{size:{sm:"rounded-xl px-3 py-2 text-sm",md:"rounded-2xl px-3 py-2 text-base",lg:"rounded-3xl px-4 py-3 text-md"},resizeable:{false:"resize-none"},disabled:{true:"cursor-not-allowed opacity-50"}},defaultVariants:{size:"md",resizeable:!1}});function c(e){let t,a,n,c,d,m,h,x,u,p,f,j=(0,r.c)(22);j[0]!==e?({ref:m,className:a,size:x,resizeable:h,disabled:n,maxLength:c,value:u,autoFocus:t,...d}=e,j[0]=e,j[1]=t,j[2]=a,j[3]=n,j[4]=c,j[5]=d,j[6]=m,j[7]=h,j[8]=x,j[9]=u):(t=j[1],a=j[2],n=j[3],c=j[4],d=j[5],m=j[6],h=j[7],x=j[8],u=j[9]);let g=(0,l.BE)(t,m);j[10]!==a||j[11]!==n||j[12]!==h||j[13]!==x?(p=(0,i.cn)(o({size:x,resizeable:h,disabled:n}),a),j[10]=a,j[11]=n,j[12]=h,j[13]=x,j[14]=p):p=j[14];let v=c||500;return j[15]!==g||j[16]!==n||j[17]!==d||j[18]!==p||j[19]!==v||j[20]!==u?(f=(0,s.jsx)("textarea",{disabled:n,...g,className:p,value:u,maxLength:v,...d}),j[15]=g,j[16]=n,j[17]=d,j[18]=p,j[19]=v,j[20]=u,j[21]=f):f=j[21],f}c.displayName="Textarea"},77014:(e,t,a)=>{a.d(t,{M:()=>n});var s=a(27964),r=a(14232);function n(){let e,t,a=(0,s.c)(2),[n,i]=(0,r.useState)(!0);return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{let e=window.matchMedia("(hover: hover)");i(e.matches);let t=e=>{i(e.matches)};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},t=[],a[0]=e,a[1]=t):(e=a[0],t=a[1]),(0,r.useEffect)(e,t),n}},80416:(e,t,a)=>{a.d(t,{K:()=>i,g:()=>l});var s=a(37876),r=a(27964),n=a(74302);function i(e){let t,a,i,l,o=(0,r.c)(8);return o[0]!==e?({className:t,...a}=e,o[0]=e,o[1]=t,o[2]=a):(t=o[1],a=o[2]),o[3]!==t?(i=(0,n.cn)("text-destructive [&_a]:font-medium [&_a]:underline",t),o[3]=t,o[4]=i):i=o[4],o[5]!==a||o[6]!==i?(l=(0,s.jsx)("p",{role:"alert",className:i,...a}),o[5]=a,o[6]=i,o[7]=l):l=o[7],l}function l(e){let t,a,i,l,o=(0,r.c)(8);return o[0]!==e?({className:t,...a}=e,o[0]=e,o[1]=t,o[2]=a):(t=o[1],a=o[2]),o[3]!==t?(i=(0,n.cn)("font-medium underline",t),o[3]=t,o[4]=i):i=o[4],o[5]!==a||o[6]!==i?(l=(0,s.jsx)("button",{type:"button",className:i,...a}),o[5]=a,o[6]=i,o[7]=l):l=o[7],l}},82804:(e,t,a)=>{a.d(t,{z:()=>d});var s=a(37876),r=a(27964),n=a(77934),i=a(42202),l=a(42512),o=a(32516),c=a(28104);function d(e){let t,a,d,m,h,x,u,p,f,j,g,v,b=(0,r.c)(25),{multiLine:y}=e,_=(0,o.GV)(l.tB)||(0,i.fW)()?"https://mindtrip.ai":"",N=`${_}/welcome`;b[0]!==N?(t=(0,s.jsx)("li",{children:(0,s.jsx)(c.N,{href:N,target:"_blank",className:"-m-0.5 p-0.5 transition-colors hover:text-foreground",children:"Company"})}),b[0]=N,b[1]=t):t=b[1],b[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)("li",{"aria-hidden":!0,
1className:"scale-75 opacity-40",children:"•"}),b[2]=a):a=b[2];let w=`${_}/contact`;b[3]!==w?(d=(0,s.jsx)("li",{children:(0,s.jsx)(c.N,{href:w,target:"_blank",className:"-m-0.5 p-0.5 transition-colors hover:text-foreground",children:"Contact"})}),b[3]=w,b[4]=d):d=b[4],b[5]===Symbol.for("react.memo_cache_sentinel")?(m=(0,s.jsx)("li",{"aria-hidden":!0,className:"scale-75 opacity-40",children:"•"}),b[5]=m):m=b[5];let C=`${_}/help`;b[6]!==C?(h=(0,s.jsx)("li",{children:(0,s.jsx)(c.N,{href:C,target:"_blank",className:"-m-0.5 p-0.5 transition-colors hover:text-foreground",children:"Help"})}),b[6]=C,b[7]=h):h=b[7],b[8]!==y?(x=y?(0,s.jsx)("li",{"aria-hidden":!0,className:"scale-75 opacity-40 sm:mt-0.5 sm:basis-full",children:(0,s.jsx)("span",{className:"sm:hidden",children:"•"})}):(0,s.jsx)("li",{"aria-hidden":!0,className:"scale-75 opacity-40",children:"•"}),b[8]=y,b[9]=x):x=b[9];let S=`${_}/terms-of-service`;b[10]!==S?(u=(0,s.jsx)("li",{children:(0,s.jsx)(c.N,{href:S,target:"_blank",className:"-m-0.5 p-0.5 transition-colors hover:text-foreground",children:"Terms"})}),b[10]=S,b[11]=u):u=b[11],b[12]===Symbol.for("react.memo_cache_sentinel")?(p=(0,s.jsx)("li",{"aria-hidden":!0,className:"scale-75 opacity-40",children:"•"}),b[12]=p):p=b[12];let k=`${_}/privacy-policy`;return b[13]!==k?(f=(0,s.jsx)("li",{children:(0,s.jsx)(c.N,{href:k,target:"_blank",className:"-m-0.5 p-0.5 transition-colors hover:text-foreground",children:"Privacy"})}),b[13]=k,b[14]=f):f=b[14],b[15]!==u||b[16]!==f||b[17]!==t||b[18]!==d||b[19]!==h||b[20]!==x?(j=(0,s.jsxs)("ul",{className:"flex flex-wrap gap-x-1",children:[t,a,d,m,h,x,u,p,f]}),b[15]=u,b[16]=f,b[17]=t,b[18]=d,b[19]=h,b[20]=x,b[21]=j):j=b[21],b[22]===Symbol.for("react.memo_cache_sentinel")?(g=(0,s.jsxs)("p",{className:"mt-2",children:["\xa9 ",(0,n.O4)().year," Mindtrip, Inc."]}),b[22]=g):g=b[22],b[23]!==j?(v=(0,s.jsxs)("div",{className:"text-2xs leading-tight text-muted",children:[j,g]}),b[23]=j,b[24]=v):v=b[24],v}},87362:(e,t,a)=>{a.d(t,{v:()=>c});var s=a(37876),r=a(27964),n=a(27414),i=a(32516),l=a(73273),o=a(2692);function c(){let e,t,a,c=(0,r.c)(6),d=(0,i.GV)(n.kX),[m]=(0,n.dJ)();c[0]!==d||c[1]!==m?(e=()=>{null!=d&&m(d)},c[0]=d,c[1]=m,c[2]=e):e=c[2];let h=e;return c[3]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.jsx)(l.ty,{render:(0,s.jsx)(o.K,{icon:{name:"ellipsis"},variant:"ghost",size:"xs",label:"More options",tooltip:!0})}),c[3]=t):t=c[3],c[4]!==h?(a=(0,s.jsxs)(l.rI,{children:[t,(0,s.jsx)(l.SQ,{side:"bottom",align:"end",children:(0,s.jsx)(l._2,{onClick:h,children:"Mark all as read"})})]}),c[4]=h,c[5]=a):a=c[5],a}},89416:(e,t,a)=>{a.d(t,{N:()=>l});var s=a(37876),r=a(27964),n=a(14232),i=a(21379);function l(e){let t,a,l,c,d=(0,r.c)(7);return d[0]!==e?({children:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]===Symbol.for("react.memo_cache_sentinel")?(l=[],d[3]=l):l=d[3],(0,n.useEffect)(o,l),d[4]!==t||d[5]!==a?(c=(0,s.jsx)(i.N,{...a,children:t}),d[4]=t,d[5]=a,d[6]=c):c=d[6],c}function o(){return c}function c(){document.documentElement.classList.remove("dark"),document.documentElement.style.colorScheme="light"}},91122:(e,t,a)=>{a.d(t,{H:()=>r});var s=a(45254);class r extends s.S{async updateSimple(e){await this.post("/api/user_memories/simple",{note:e})}async getUserMemories(){return await this.get("/api/user_memories")}async rescanMemories(){return await this.post("/api/user_memories/rescan")}async setMemoryEnabled(e){return await this.put("/api/user_memories/settings",{memory_enabled:e})}async deleteUserMemory(e){return await this.delete(`/api/user_memories/${e}`)}async updateUserMemory(e,t){return await this.post(`/api/user_memories/${e}/update`,{instruction:t})}}},94113:(e,t,a)=>{a.d(t,{A:()=>h});var s=a(37876),r=a(27964),n=a(18847),i=a.n(n),l=a(27414),o=a(32516),c=a(43547),d=a(50436);let m=i()(()=>Promise.all([a.e(8798),a.e(4108),a.e(6526)]).then(a.bind(a,36526)).then(e=>e.NotificationList),{loadableGenerated:{webpack:()=>[36526]},ssr:!1,loading:()=>(0,s.jsx)(d.R,{className:"m-auto"})});function h(e){let t,a,n=(0,r.c)(5),{useWindowScroll:i}=e,d=(0,o.GV)(c.cN),h=(0,o.GV)(c.It),x="all"!==d?d:void 0;return n[0]!==x||n[1]!==h?(t={group:x,unreadOnly:h,page:1},n[0]=x,n[1]=h,n[2]=t):t=n[2],(0,l.I9)(t),n[3]!==i?(a=(0,s.jsx)(m,{useWindowScroll:i}),n[3]=i,n[4]=a):a=n[4],a}
1},99385:(e,t,a)=>{a.d(t,{M:()=>c,d:()=>d});var s=a(27964),r=a(56118),n=a(67747),i=a(64267),l=a(32516),o=a(26360);function c(){let e,t,a=(0,s.c)(7),c=(0,l.GV)(i.NF),d=(0,l.GV)(o.W5),m=(0,l.GV)(i.Vs);a[0]!==c||a[1]!==m?(e=c?{ref:c,page:m}:r.hT,a[0]=c,a[1]=m,a[2]=e):e=a[2];let{data:h}=(0,n.uo)(e),x=h?.data,u=x?.owner.user_ref,p=x?.accepted_collaborator_refs;return a[3]!==p||a[4]!==d||a[5]!==u?(t=p?.includes(d)||u===d,a[3]=p,a[4]=d,a[5]=u,a[6]=t):t=a[6],t}function d(e){let t,a,o=(0,s.c)(8),c=(0,l.GV)(i.NF),d=(0,l.GV)(i.Vs);o[0]!==c||o[1]!==d?(t=c?{ref:c,page:d}:r.hT,o[0]=c,o[1]=d,o[2]=t):t=o[2];let{data:m}=(0,n.uo)(t),h=m?.data?.favorites;if(!h||!e)return;if(o[3]!==e||o[4]!==h){let t;o[6]!==e?(t=t=>t.entity.entity_ref===e,o[6]=e,o[7]=t):t=o[7],a=h.find(t),o[3]=e,o[4]=h,o[5]=a}else a=o[5];let x=a;return x?.created_by_user_ref}}}]);
2//# sourceMappingURL=1857-fc9a14e4c14ac91b.js.map

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.