PageSourceSearch

https://mindtrip.ai/_next/static/chunks/2993-3dc9d7fc1d01ce94.js

js mindtrip.ai collected 2026-09-24 17:10:23 UTC 10,478 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2993],{7035:(e,t,r)=>{r.d(t,{J:()=>a});var i=r(45254);class a extends i.S{async addCreatorWaitlister(){return await this.post("api/creator/add")}async getCreatorWaitlisterStatus(){return await this.get("api/creator/status")}async joinCreatorProgram(e){return await this.post("/api/creator/join",{user_profile:e})}async attributeToPartner(e,t){let r={referrer:e};return t&&(r.entityRef=t),await this.post("api/creator/attribute",r)}}},25024:(e,t,r)=>{r.d(t,{O3:()=>o,SH:()=>l,r:()=>n,y1:()=>a});let i=/^co-[a-zA-Z0-9]{8}$/;function a(e){return e&&"user"in e}function n(e){return e&&"invited_email"in e}function o(e){return i.test(e)}function l(e){let t=e?.ref;return!!t&&o(t)}},27408:(e,t,r)=>{r.d(t,{E:()=>f});var i=r(27964),a=r(25024),n=r(12159),o=r(32516),l=r(40336),c=r(26360),s=r(68948),d=r(63904),u=r(5834);function f(){let e,t,r=(0,i.c)(9),f=(0,o.jL)(),{isChatView:p}=(0,u.l)(),m=(0,o.GV)(l.Fj),h=(0,o.GV)(c.Ev),{addCollection:g}=(0,d.S4)(),{addGuide:y}=(0,d.mD)();r[0]!==g||r[1]!==y||r[2]!==f||r[3]!==h||r[4]!==p||r[5]!==m?(e=e=>{if(!h&&!m){let t="ref"in e&&(0,a.SH)(e),r=s.E.register({onCreate:async r=>{t?await g({trip:r,collection:e}):await y({trip:r,inspiration:e})}});f(l.Ay.actions.openCreateTripDialog({prefillTripData:p?"current":void 0,showSheet:p,callbackId:r}));return}f((0,n.X8)(e))},r[0]=g,r[1]=y,r[2]=f,r[3]=h,r[4]=p,r[5]=m,r[6]=e):e=r[6];let w=e;return r[7]!==w?(t={openAddToMedia:w},r[7]=w,r[8]=t):t=r[8],t}},63904:(e,t,r)=>{r.d(t,{E:()=>j,S4:()=>L,dx:()=>V,mD:()=>G,pF:()=>N});var i=r(37876),a=r(27964),n=r(14232),o=r(7010),l=r(34712),c=r(25024),s=r(45199),d=r(74302),u=r(55922),f=r(26579),p=r(31965),m=r(43286),h=r(66811),g=r(42937),y=r(6890),w=r(53784),v=r(12159),b=r(53157),R=r(32516),$=r(40336),S=r(18695),k=r(36575),_=r(25834),C=r(24387),x=r(28104),E=r(5528);function T(e,t,r){console.log(`Unable to ${r} ${t}`,e);let i=e instanceof l.C1,a=(0,g.Wl)(e,"ClientValidationException");if(i||a){let n=i||a?e.message:void 0;_.J.add({type:"error",description:n||`Unable to ${r} ${t}.`})}else _.J.add({type:"error",description:`Unable to ${r} ${t}.  Please try again later.`});throw e}function j(e,t){let r,a,n,{media:l,entity:u,trip:f,operation:h,router:g,currentTripRef:y,hideCreateTrip:w,isEmbeddedChatView:b,onRemove:R}=t,$=f.ref,k="added"===h,T=async()=>{_.J.close();let t=g&&(b||(0,C.wp)(g));t||e((0,S.BK)({tripRef:$,tab:s.DS})),y!==$&&t&&!w&&(await g?.push(`/trip/${$}`),e((0,S.BK)({tab:s.DS})))},j="Item";u&&"ref"in u&&(0,c.SH)(u)?(r=u.images[0],a=u.name,n=u,j="Collection"):(0,p.u9)(u)?(r=u.photos[0]?.url,a=u.title,n=u,j="Guide"):l&&((0,m.jZ)(l)?(r=l.inspiration.photos[0]?.url,a=l.inspiration.title,n=l.inspiration,j="Guide"):(0,m.nU)(l)?(r=l.collection.images[0],a=l.collection.name,n=l.collection,j="Collection"):(r=l.attachment.metadata?.thumbnail_url,a=l.attachment.metadata?.title||l.attachment.url,(0,m.ei)(l)?(j="Photo",r=l.attachment.url):j=(0,m.KF)(l)?"Video":"Article"));let B=k?(0,i.jsxs)(i.Fragment,{children:[j," ",a," added to"," ",(0,i.jsx)(x.N,{href:`/trip/${f.ref}`,className:"font-semibold hover:underline",onClick:()=>_.J.close(),children:f.name})]}):`${j} ${a??""} removed from ${f.name}`.trim(),V=async()=>{_.J.close(),k&&R&&await R(),n&&e((0,v.X8)(n))},G=n?{children:"Change",onClick:()=>{V()}}:k?{children:"View trip",onClick:()=>{T()}}:void 0;_.J.add({description:B,timeout:o.LJ,...r?{data:{leading:(0,i.jsx)("span",{className:(0,d.cn)("relative mr-1 flex size-10 shrink-0 overflow-hidden rounded-lg bg-gray-3",!k&&"opacity-30"),children:(0,i.jsx)(E.$,{src:r,width:"sm",className:"absolute inset-0 size-full",alt:""})})}}:{},actionProps:G})}function B(){let e,t=(0,a.c)(5),r=(0,R.jL)(),i=(0,h.r)(),n=(0,R.GV)(k.iL),o=(0,R.GV)(b.MP);return t[0]!==r||t[1]!==n||t[2]!==o||t[3]!==i?(e={dispatch:r,router:i,hideCreateTrip:n,isEmbeddedChatView:o},t[0]=r,t[1]=n,t[2]=o,t[3]=i,t[4]=e):e=t[4],e}function V(e){let{dispatch:t,router:r,hideCreateTrip:i,isEmbeddedChatView:a}=B(),o=(0,R.GV)($.uZ),[l,{isLoading:c}]=(0,y.V9)();return{remove:(0,n.useCallback)(async n=>{let{tripRef:c,media:s}=n;try{await l({tripRef:c,mediaRef:s.ref}).unwrap()&&(await t((0,w.up)()),j(t,{media:s,trip:o||{ref:c},operation:"removed",router:r,currentTripRef:c,hideCreateTrip:i,isEmbeddedChatView:a}),(0,f.$)({name:"MediaRemove",properties:{kind:e,...(0,m.jZ)(s)?{inspiration:(0,u.qR)(s.inspiration)}:(0,m.nU)(s)?{collection:(0,u.mi)(s.collection)}:{attachment:(0,u.xQ)(s.attachment)}}}))}catch(t){T(t,e,"remove")}},[l,t,i,a,o,r,e]),isLoading:c}}function G(){let e,t,r=(0,a.c)(10),{dispatch:i,router:n,hideCreateTrip:o,isEmbeddedChatView:l}=B(),[c,s]=(0,y.yA)(),{isLoading:d}=s,[p]=(0,y.F7)();r[0]!==c||r[1]!==i||r[2]!==o||r[3]!==l||r[4]!==p||r[5]!==n?(e=async e=>{let{trip:t,inspiration:r}=e;try{let e=await c({tripRef:t.ref,inspirationRef:r.entity_ref}).unwrap();e&&(i((0,w.up)()),j(i,{media:e.media,trip:t,operation:"added",router:n,currentTripRef:t.ref,hideCreateTrip:o,isEmbeddedChatView:l,onRemove:async()=>{await p({tripRef:t.ref,inspirationRef:r.entity_ref}).unwrap(),await i((0,w.up)())}}),(0,f.$)({name:"MediaAdd",properties:{kind:"guide",tripRef:t.ref,inspiration:(0,u.qR)(r)}}))}catch(e){T(e,"guide","add")}},r[0]=c,r[1]=i,r[2]=o,r[3]=l,r[4]=p,r[5]=n,r[6]=e):e=r[6];let m=e;return r[7]!==m||r[8]!==d?(t={addGuide:m,isLoading:d},r[7]=m,r[8]=d,r[9]=t):t=r[9],t}function L(){let e,t,r=(0,a.c)(10),{dispatch:i,router:n,hideCreateTrip:o,isEmbeddedChatView:l}=B(),[c,s]=(0,y.M4)(),{isLoading:d}=s,[p]=(0,y.T)();r[0]!==c||r[1]!==i||r[2]!==o||r[3]!==l||r[4]!==p||r[5]!==n?(e=async e=>{let{trip:t,collection:r}=e;try{let e=await c({tripRef:t.ref,collectionRef:r.ref}).unwrap();e&&(await i((0,w.up)()),j(i,{media:e.media,trip:t,operation:"added",router:n,currentTripRef:t.ref,hideCreateTrip:o,isEmbeddedChatView:l,onRemove:async()=>{await p({tripRef:t.ref,collectionRef:r.ref}).unwrap(),await i((0,w.up)())}}),(0,f.$)({name:"MediaAdd",properties:{kind:"collection",tripRef:t.ref,collection:(0,u.mi)(r)}}))}catch(e){T(e,"collection","add")}},r[0]=c,r[1]=i,r[2]=o,r[3]=l,r[4]=p,r[5]=n,r[6]=e):e=r[6];let m=e;return r[7]!==m||r[8]!==d?(t={addCollection:m,isLoading:d},r[7]=m,r[8]=d,r[9]=t):t=r[9],t}function N(e){let{dispatch:t,router:r,hideCreateTrip:i,isEmbeddedChatView:a}=B(),[o,{isLoading:l}]=(0,y.F7)(),[c,{isLoading:s}]=(0,y.T)();return{remove:(0,n.useCallback)(async n=>{let{trip:l,entity:s}=n;try{("guide"===e?await o({tripRef:l.ref,inspirationRef:s.entity_ref}).unwrap():await c({tripRef:l.ref,collectionRef:s.ref}).unwrap())&&(await t((0,w.up)()),j(t,{entity:s,trip:l,operation:"removed",router:r,currentTripRef:l.ref,hideCreateTrip:i,isEmbeddedChatView:a}),(0,f.$)({name:"MediaRemove",properties:{kind:e,tripRef:l.ref,..."guide"===e?{inspiration:(0,u.qR)(s)}:{collection:(0,u.mi)(s)}}}))}catch(t){T(t,e,"remove")}},[e,o,c,t,i,a,r]),isLoading:"guide"===e?l:s}}},77725:(e,t,r)=>{r.d(t,{r:()=>R});
1var i=r(37876),a=r(27408),n=r(63904),o=r(27964),l=r(40625),c=r(6890),s=r(32516),d=r(26360),u=r(25024),f=r(56118),p=r(74302),m=r(18564),h=r(44946),g=r(40336),y=r(13161),w=r(58604),v=r(20658),b=r(2692);function R(e){let{dest:t,tooltipSide:r="bottom",tooltipOffset:R=0,overlay:$=!0,className:S,variant:k="icon",trackingContext:_,...C}=e,x=(0,m.Bd)(),E=(0,s.GV)(d.zW),{openAddToMedia:T}=(0,a.E)(),{addCollection:j,isLoading:B}=(0,n.S4)(),{addGuide:V,isLoading:G}=(0,n.mD)(),{ref:L,tripCount:N,isLoading:W}=function(e){let t,r,i,a,n=(0,o.c)(9),u=(0,s.GV)(d.y3),f=(0,s.GV)(d.zW);n[0]===Symbol.for("react.memo_cache_sentinel")?(t={triggerOnce:!0,threshold:.1},n[0]=t):t=n[0];let{ref:p,inView:m}=(0,l.Wx)(t);n[1]!==e?(r={sourceRef:e},n[1]=e,n[2]=r):r=n[2];let h=!m||u||f;n[3]!==h?(i={skip:h},n[3]=h,n[4]=i):i=n[4];let{data:g,isLoading:y}=(0,c.WG)(r,i),w=g?.length||0;return n[5]!==y||n[6]!==p||n[7]!==w?(a={ref:p,isLoading:y,tripCount:w},n[5]=y,n[6]=p,n[7]=w,n[8]=a):a=n[8],a}(t&&"ref"in t?t.ref:t?.entity_ref),q=(0,s.GV)(g.gd),{data:z}=(0,h.x2)(!E&&q?q:f.hT),J=!E&&N>0,P=B||G||W,D=async()=>{try{if(N>0||!z)return void T(t);z&&("ref"in t&&(0,u.SH)(t)?await j({trip:z,collection:t}):await V({trip:z,inspiration:t}))}catch(e){(0,y.y)()}},M=()=>J?1===N?x("added"):x("addedToTrips",{count:N}):x("addToTrip"),A=(0,i.jsx)(b.K,{ref:L,variant:"none",icon:{name:J?"circleCheck":"circlePlus",className:(0,p.cn)($?"size-[1.625em] fill-black-a-7 stroke-[1.375]":"size-[1.25em] stroke-[1.125]",J&&"fill-accent stroke-white",J&&!$&&"**:data-[slot=circle]:stroke-accent")},label:M(),tooltip:{side:r,sideOffset:R},onPerform:D,className:(0,p.cn)("transition-transform will-change-transform hover:scale-110",$&&"text-white-a-12",S),loading:P,...C}),F=(0,i.jsx)(v.$,{ref:L,variant:$?"outline-clear":"outline",iconBefore:{name:J?"circleCheck":"plus",className:J?(0,p.cn)("fill-accent stroke-white",!$&&"**:data-[slot=circle]:stroke-accent"):void 0},onPerform:D,className:(0,p.cn)($&&"bg-black-a-7 text-white backdrop-blur-2xs hover:bg-black-a-8"),loading:P,...C,children:M()}),H="icon"===k?A:F;return E?(0,i.jsx)(w.v,{type:"add-to-media",children:H}):H}},85109:(e,t,r)=>{r.d(t,{mp:()=>d,st:()=>u}),r(8796),r(7035);var i=r(29656),a=r(7377);r(56765);var n=r(96854),o=r(31965),l=r(52810),c=r(69165),s=r(45329);let d=e=>{let{user:t,entity:r,organization:d,canPublishVanityLink:f,router:p,hotelSearchParams:m}=e,h=r.canonical_url;if((0,a.Eb)(h)&&u({user:t,entity:r,canPublishVanityLink:f})&&(h=(0,n.$B)(h,"refId",t.user_ref)),(0,a.Eb)(h)&&(0,o.ZW)(r)&&(0,o.xH)(r)){let e=p?.query.at?.toString()||(0,s._H)(r)?.at?.toString();(0,a.Eb)(e)&&(h=(0,n.$B)(h,"at",e))}if((0,a.Eb)(h)&&(0,o.ZW)(r)&&(0,o.dM)(r)){let e=p?.query.start?.toString()||(m?.start?`${m.start.year}-${String(m.start.month).padStart(2,"0")}-${String(m.start.day).padStart(2,"0")}`:void 0),t=p?.query.end?.toString()||(m?.end?`${m.end.year}-${String(m.end.month).padStart(2,"0")}-${String(m.end.day).padStart(2,"0")}`:void 0),r=p?.query.adults?.toString()||(m?.travelers?.adult_count?String(m.travelers.adult_count):void 0),i=p?.query.children?.toString()||(m?.travelers?.child_count?String(m.travelers.child_count):void 0);(0,a.Eb)(e)&&(h=(0,n.$B)(h,"start",e)),(0,a.Eb)(t)&&(h=(0,n.$B)(h,"end",t)),(0,a.Eb)(r)&&(h=(0,n.$B)(h,"adults",r)),(0,a.Eb)(i)&&(h=(0,n.$B)(h,"children",i))}return d&&(h=(0,o.BU)(h,d)),(0,i.yz)()&&(0,l.B)()&&!d?(0,n.B3)(c.T.href,h):h},u=e=>{let{user:t,entity:r,canPublishVanityLink:i}=e;if(i){if(!(0,o.u9)(r))return!0;else if(r.owner.user_ref===t.user_ref)return!0}return!1}}}]);
2//# sourceMappingURL=2993-3dc9d7fc1d01ce94.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.