PageSourceSearch

https://travelpal.ai/_next/static/chunks/183c7fdb.7zfk.js?dpl=dpl_3qvkVdEiQutFuo1eWzMBJ2HYy68p

js travelpal.ai collected 2026-09-25 01:00:10 UTC 37,595 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="a769f6cf-de6f-60ee-5afb-4c02181eb705")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,343794,(t,e,a)=>{!function(){"use strict";var a={}.hasOwnProperty;function i(){for(var t="",e=0;e<arguments.length;e++){var r=arguments[e];r&&(t=n(t,function(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return i.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var r in t)a.call(t,r)&&t[r]&&(e=n(e,r));return e}(r)))}return t}function n(t,e){return e?t?t+" "+e:t+e:t}if(e.exports)i.default=i,e.exports=i;else if("function"==typeof define&&"object"==typeof define.amd&&define.amd)void 0!==i&&t.v(i);else window.classNames=i}()},178815,t=>{"use strict";var e,a,i,n,r,s,o,l=((e={}).BAR="bar",e.FOOD="food",e.CAFE="cafe",e.RESTAURANT="restaurant",e.FORK_AND_KNIFE="forkAndKnife",e.KNIFE_AND_FORK="knife-and-fork",e.GLASS="glass",e),p=((a={}).BED="bed",a.HOUSE="house",a.CITY="city",a.SPARKLE="sparkle",a.BABY="baby",a.BASKETBALL="basketball",a.BATHTUB="bathtub",a.BUILDINGS="buildings",a.CABLE_CAR="cable-car",a.CALL_BELL="call-bell",a.CARROT="carrot",a.CASTLE_TURRET="castle-turret",a.CAT="cat",a.CERTIFICATE="certificate",a.CHURCH="church",a.CONFETTI="confetti",a.CROWN_CROSS="crown-cross",a.FOOTBALL="football",a.FORK_KNIFE="fork-knife",a.GIFT="gift",a.GRAINS="grains",a.HAMBURGER="hamburger",a.IMAGE="image",a.ISLAND="island",a.MASK_HAPPY="mask-happy",a.MICROPHONE_STAGE="microphone-stage",a.MOUNTAINS="mountains",a.PERSON_SIMPLE_WALK="person-simple-walk",a.PERSON_SIMPLE_THROW="person-simple-throw",a.PLANT="plant",a.SCREWDRIVER="screwdriver",a.SHOPPING_BAG="shopping-bag",a.STUDENT="student",a.SUNGLASSES="sunglasses",a.WINE="wine",a.YIN_YANG="yin-yang",a.FLAG="flag",a.CITYSCAPE="cityscape",a.PIN="pin",a.LOCATION="location",a),c=((i={}).BUS="bus",i.VAN="van",i.TAXI="taxi",i.SHIP="ship",i.BOAT="boat",i.CAR="car",i.CAR_PROFILE="car-profile",i.BICYCLE="bicycle",i.MOTORCYCLE="motorcycle",i.PEDESTRIAN="pedestrian",i.PERSON_SIMPLE_WALK="person-simple-walk",i.SUBWAY="subway",i.AIRPLANE_TILT="airplane-tilt",i),d=((n={}).CHECK="check",n.CHECK_OUTLINE="check-outline",n.CHECKMARK="checkmark",n.CROSS="cross",n.PLUS="plus",n.PLUS_CIRCLE="plus-circle",n.MINUS="minus",n.SEARCH="search",n.MAGNIFYING_GLASS="magnifying-glass",n.FILTER="filter",n.INFO="info",n.EDIT="edit",n.COMPOSE="compose",n.IMAGE="image",n.SHARE="share",n.SHARE_BOX="shareBox",n.SHARE_BOX_TOP="share-box-top",n.CALENDAR="calendar",n.CALENDAR_OUTLINED="calendar-outlined",n.FOLDER="folder",n.LOCATION="location",n.STAR="star",n.STAR_OUTLINED="star-outlined",n.STARS="stars",n.FUNNEL="funnel",n.SORT="sort",n.LINK="link",n.PIN="pin",n.BULLET_POINT="bulletPoint",n.USER="user",n.USER_PLUS="user-plus",n.PROFILE="profile",n.DONE="done",n.PENDING="pending",n.COPY="copy",n.TIMER="timer",n.LOCK="lock",n.UNLOCK="unlock",n.SAVE="save",n.VIEW="view",n.STOP="stop",n.MICROPHONE="microphone",n.CHAT="chat",n.CHATS_CIRCLE="chats-circle",n.CLOCK="clock",n.MONEY="money",n.THREE_DOTS_OUTLINE="dots-three-outline",n.DOTS_HORIZONTAL="dots-horizontal",n.THUMBS_UP="thumbs-up",n.THUMBS_DOWN="thumbs-down",n.CURRENT_LOCATION="current-location",n.MAP="map",n.MAP_BUTTON="mapbutton",n.CANCEL_OUTLINE="cancel-outline",n.BASKET="basket",n.LIST="list",n.SUITCASE="suitcase",n.MAGIC_WAND="magic-wand",n.TRASH="trash",n),h=((r={}).ARROW_TOP="arrowTop",r.ARROW_TOP_BOLD="arrow-top-bold",r.ARROW_LEFT="arrowLeft",r.ARROW_LEFT_LARGE="arrowLeftLarge",r.ARROW_RIGHT="arrowRight",r.ARROW_BOTTOM="arrowBottom",r.ARROW_UP="arrow-up",r.ARROW_DIAGONAL="arrow_diagonal",r.TRIANGLE_DOWN="triangleDown",r.TRIANGLE_UP="triangleUp",r.CARET_DOUBLE_UP="caret-double-up",r.CARET_UP_DOWN="caret-up-down",r.CHEVRON="chevron",r.ARROWS_IN_SIMPLE="arrows-in-simple",r.ARROWS_OUT_SIMPLE="arrows-out-simple",r.CHEVRON_DOWN="chevronDown",r.CHEVRON_UP="chevronUp",r.CHEVRON_RIGHT="chevronRight",r.CHEVRON_LEFT="chevron_left",r),u=((s={}).FACEBOOK="facebook",s.GOOGLE="google",s.GOOGLE_COLORFUL="google-icon",s.YOUTUBE="youtube",s.INSTAGRAM="instagram",s.LINKEDIN="linkedin",s.TIKTOK="tiktok",s.X="x",s),g=((o={}).ADULT="adult",o.INFANT="infant",o.YOUTH="youth",o.PEOPLE="people",o.HISTORY="history",o.LOGO="logo",o.LOGO_MOBILE="logoMobile",o.LOGO_WHITE="logoWhite",o.TP_ARROW="tp-arrow",o.CAMERA="camera",o.PEN="pen",o.BRUSH="brush",o.HEARTH="hearth",o.TICKET="ticket",o.FAQ="faq",o.PHONE="phone",o.STACKED_EMAIL_OUTLINE="stacked-email-outline",o.CHAT_LOGO="chat-logo",o.CHAT_LOGO_COLORFUL="chat-logo-colorful",o.COOKIE="cookie",o);t.s(["ActivitiesTypeIcons",()=>p,"FoodIcons",()=>l,"MiscIcons",()=>g,"NavigationIcons",()=>h,"SocialIcons",()=>u,"TransportIcons",()=>c,"UIIcons",()=>d])},6705,446553,t=>{"use strict";var e,a,i,n,r,s,o,l,p,c,d,h,u,g,_,m,y,C,E,A,S,T,f,R,I,w,O,N=t.i(247167);(a=(e=A||(A={})).travel_mode||(e.travel_mode={})).CAR="car",a.TRUCK="truck",a.TAXI="taxi",a.BUS="bus",a.VAN="van",a.MOTORCYCLE="motorcycle",a.BICYCLE="bicycle",a.PEDESTRIAN="pedestrian",(n=(i=S||(S={})).origin_type||(i.origin_type={})).EXPERIENCE="experience",n.ACCOMMODATION="accommodation",(r=i.destination_type||(i.destination_type={})).EXPERIENCE="experience",r.ACCOMMODATION="accommodation",(s=i.travel_mode||(i.travel_mode={})).CAR="car",s.TRUCK="truck",s.TAXI="taxi",s.BUS="bus",s.VAN="van",s.MOTORCYCLE="motorcycle",s.BICYCLE="bicycle",s.PEDESTRIAN="pedestrian",(l=(o=T||(T={})).travel_mode||(o.travel_mode={})).CAR="car",l.TRUCK="truck",l.TAXI="taxi",l.BUS="bus",l.VAN="van",l.MOTORCYCLE="motorcycle",l.BICYCLE="bicycle",l.PEDESTRIAN="pedestrian",(c=(p=f||(f={})).item_type||(p.item_type={}))[c._10=10]="_10",c[c._20=20]="_20",c[c._30=30]="_30",c[c._40=40]="_40",(h=(d=R||(R={})).type||(d.type={})).COUNTRY="COUNTRY",h.REGION="REGION",h.CITY="CITY",(g=(u=I||(I={})).type||(u.type={})).NON_DINING="non-dining",g.DINING="dining",(m=(_=w||(w={})).currency||(_.currency={})).USD="USD",m.EUR="EUR",m.JPY="JPY",m.GBP="GBP",m.AUD="AUD",m.CAD="CAD",m.CHF="CHF",m.CNY="CNY",m.SEK="SEK",m.NZD="NZD",m.MXN="MXN",m.SGD="SGD",m.HKD="HKD",m.NOK="NOK",m.KRW="KRW",m.TRY="TRY",m.RUB="RUB",m.INR="INR",m.BRL="BRL",m.ZAR="ZAR",m.SAR="SAR",m.AED="AED",m.PLN="PLN",m.TWD="TWD",m.THB="THB",m.IDR="IDR",m.HUF="HUF",m.CZK="CZK",m.ILS="ILS",m.CLP="CLP",m.PHP="PHP",m.PKR="PKR",m.MYR="MYR",m.RON="RON",m.COP="COP",m.ARS="ARS",m.DKK="DKK",m.IQD="IQD",(C=(y=O||(O={})).companions||(y.companions={})).NO_ONE="NO ONE",C.PARTNERS="PARTNERS",C.FRIENDS="FRIENDS",C.FAMILY="FAMILY",C.SENIORS="SENIORS";var b=t.i(178815);let L={ItineraryMenu:"itinerary-menu",DayItem:t=>`day-item-${t}`,TripInfoContainer:"trip-info-container",TailorTripButton:"tailor-trip-button",ExperienceCallToAction:"experience-call-to-action",ExperienceOptions:t=>`experience-options-${t}`,DayOptions:t=>`day-options-${t}`,ReplanAddActivity:"replan-add-activity",ReplanAddActivityLarge:"replan-add-activity-large",ReplanAddActivityLargeThreeDotsButton:"replan-add-activity-large-three-dots-button",MapButton:"map-button",EditTripButton:"edit-trip-button",AddAccommodationButton:t=>`add-accommodation-button-${t}`,CloneButton:"clone-button",InviteButton:"invite-button",DayButton:t=>t?`day-button-${t}`:"",CommuteButton:t=>t?`commute-button-${t}`:"",AiChatButton:"ai-chat-button",AiChatButtonLarge:"ai-chat-large-button"};t.s(["IDs",0,L,"parseLinkToButtonName",0,function(t){return t?.startsWith("https://www.viator.com")?"Reserve":t?.startsWith("https://shop.live.rc.viator.com")?"Details":"Site"},"parseRouteTravelMode",0,function(t){switch(t){case"walking":return{icon:b.TransportIcons.PERSON_
2SIMPLE_WALK,text:"on foot"};case"bicycling":return{icon:b.TransportIcons.BICYCLE,text:"by bike"};case"transit":return{icon:b.TransportIcons.SUBWAY,text:"by transit"};default:return{icon:b.TransportIcons.CAR_PROFILE,text:"by car"}}}],446553);let P={id:4,count:1,description:"",link:"https://stg-wordpress.travelpal.ai/category/latest-updates-innovations/",name:"Latest Updates &amp; Innovations",slug:"latest-updates-innovations",taxonomy:"category",parent:0,meta:[],_links:{self:[{href:"https://stg-wordpress.travelpal.ai/wp-json/wp/v2/categories/4",targetHints:{allow:["GET"]}}],collection:[{href:"https://stg-wordpress.travelpal.ai/wp-json/wp/v2/categories"}],about:[{href:"https://stg-wordpress.travelpal.ai/wp-json/wp/v2/taxonomies/category"}],"wp:post_type":[{href:"https://stg-wordpress.travelpal.ai/wp-json/wp/v2/posts?categories=4"}],curies:[{name:"wp",href:"https://api.w.org/{rel}",templated:!0}]}},v={id:3,count:1,description:"",link:"https://stg-wordpress.travelpal.ai/tag/general/",name:"General",slug:"general",taxonomy:"post_tag",meta:[],_links:{self:[{href:"https://stg-wordpress.travelpal.ai/wp-json/wp/v2/tags/3",targetHints:{allow:["GET"]}}],collection:[{href:"https://stg-wordpress.travelpal.ai/wp-json/wp/v2/tags"}],about:[{href:"https://stg-wordpress.travelpal.ai/wp-json/wp/v2/taxonomies/post_tag"}],"wp:post_type":[{href:"https://stg-wordpress.travelpal.ai/wp-json/wp/v2/posts?tags=3"}],curies:[{name:"wp",href:"https://api.w.org/{rel}",templated:!0}]}};A.travel_mode.PEDESTRIAN,A.travel_mode.CAR,A.travel_mode.TAXI,A.travel_mode.BUS,A.travel_mode.BICYCLE,A.travel_mode.MOTORCYCLE,new Date().getFullYear(),{...v,id:-1,name:"All Categories",count:0x5f5e0ff,slug:"all-categories"};let D={...P,name:"Our Blog",slug:"home"},U="true"===N.default.env.NEXT_PUBLIC_USE_PROXY?"":"https://fastapi.travelpal.ai",M=Number(N.default.env.NEXT_PUBLIC_CHAT_LIST_PAGE_SIZE)||30;var k=((E={}).PRODUCTION="production",E.STAGING="staging",E.DEV="development",E.LOCAL="local",E);let B="true"===N.default.env.NEXT_PUBLIC_TRIPS_PUBLIC_ENABLED;L.AiChatButtonLarge,L.AiChatButton,L.TailorTripButton,L.ReplanAddActivityLarge,L.ReplanAddActivity,L.MapButton,L.TripInfoContainer,L.CloneButton,L.InviteButton,Array.from({length:96},(t,e)=>{let a=Math.floor(e/4).toString().padStart(2,"0"),i=e%4*15,n=`${a}:${i.toString().padStart(2,"0")}`,r=parseInt(a)%12||12,s=12>parseInt(a)?"AM":"PM";return{time:n,toDisplay:`${r}:${i.toString().padStart(2,"0")} ${s}`}}),t.s(["ANON_KEY",0,"tp_anon_key","BACKEND_URL",0,"https://api.travelpal.ai","CHAT_LIST_PAGE_SIZE",0,M,"DATE_DAY_FORMAT",0,"DD","DATE_MONTH_FORMAT",0,"MMM","DATE_WEEK_DAY_SHORT_FORMAT",0,"ddd","DEFAULT_BLOG_CATEGORY",0,D,"ENVIRONMENT",0,"production","ENVS",()=>k,"FASTAPI_BASE_URL",0,U,"FRONTEND_URL",0,"https://travelpal.ai","GENERAL_ERROR_MESSAGE",0,"That didn’t work. Please retry.","IS_MOCK_CHAT",0,!1,"LG_BREAKPOINT",0,1024,"MD_BREAKPOINT",0,768,"MESSAGE_CONTEXT_KEY",0,"chat-v1-home-message-context","MESSAGE_TO_SEND_KEY",0,"chat-v1-home-message","REFERRAL_CODE_KEY",0,"tp-ref","TIME_HOUR_MINUTE_MERIDIAN_FORMAT",0,"hh:mm a","TIME_HOUR_MINUTE_MERIDIAN_WITHOUT_SPACE_FORMAT",0,"hh:mmA","TIME_HOUR_MINUTE_SECONDS_FORMAT",0,"HH:mm:ss","TIME_HOUR_MINUTE_WITHOUT_SECONDS_FORMAT",0,"HH:mm","TOKEN_BILLING_ENABLED",0,!0,"TRIPS_PUBLIC_FEATURE_ENABLED",0,B,"UNSPLASH_UTM_MEDIUM",0,"referral","UNSPLASH_UTM_SOURCE",0,"TravelPal"],6705)},833845,t=>{"use strict";t.s(["routes",0,{home:"/",hiddenHome:"/hidden-home",profile:"/profile",changeEmail:"/profile/change-email",changePassword:"/profile/change-password",myTrips:"/my-trips",myChats:"/",chat:(t,e)=>{let a=`/chat/${t}`;if(!e?.panel)return a;let i=new URLSearchParams({panel:e.panel});return`${a}?${i.toString()}`},concierge:{reservationRequest:({chatId:t,placeId:e,placeName:a,sourceMessageId:i})=>{let n=new URLSearchParams({chat_id:String(t),place_id:String(e)});return a&&n.set("place_name",a),i&&n.set("source_message_id",String(i)),`/concierge/reservation-request?${n.toString()}`}},itinerary:{index:"/itinerary/:itinerarySlug/?",indexUpd:(t,e,a="")=>e?`/itinerary/${t}/${e}/${a}`:`/itinerary/${t}/${a}`,invitation:t=>`/itinerary/invitation/${t}`},auth:{register:t=>t?`/auth/registration?next=${encodeURIComponent(t)}`:"/auth/registration",login:t=>t?`/auth/login?next=${encodeURIComponent(t)}`:"/auth/login",registerSuccess:"/auth/registration/success",registerVerificationSuccess:"/auth/registration/verify-email/:token",resetPassword:"/auth/reset-password",resetPasswordRetry:"/auth/reset-password/retry",resetPasswordInfo:"/auth/reset-password/info",resetPasswordConfirmPassword:"/auth/password/reset/confirm/:uid/:token",magicLink:"/auth/magic-link"}
2,destinations:{root:"/destinations",detail:t=>`/destinations/${t}`},trips:{index:"/trips",detail:t=>`/trips/${t}`},blog:{index:"/blog",page:t=>`/blog?page=${t}`,topic:(t,e)=>`/blog/${t}/${e}`,article:t=>t?`/blog/article/${t}`:"/blog/article/:slug"},footer:{terms:"/terms",privacy:"/privacy"}}])},303071,t=>{"use strict";var e,a,i=t.i(247167);class n{config;constructor(t){this.config=t}}var r=t.i(6705);class s{static normalize(t){if(null==t)return t;if(Array.isArray(t))return t.map(t=>s.normalize(t));if("object"==typeof t){let e={};for(let a in t)t.hasOwnProperty(a)&&(e[a.replace(/_([a-z])/g,(t,e)=>e.toUpperCase())]=s.normalize(t[a]));return e}return t}}class o extends n{config;isLocalEnv=r.ENVIRONMENT===r.ENVS.LOCAL;constructor(t){super(t),this.config=t}request(t){let e=null,a=new Promise(async(a,i)=>{try{e=new AbortController;let i=t.url.startsWith("http")?t.url:`${this.config.BASE}${t.url}`,n={method:t.method||"GET",headers:{"Content-Type":"application/json",...this.config.HEADERS,...t.headers},signal:e.signal},r=t.cachePolicy;r?.cache&&(n.cache=r.cache),r?.next&&(n.next=r.next),this.config.WITH_CREDENTIALS&&(n.credentials=this.config.CREDENTIALS),t.body&&("POST"===t.method||"PUT"===t.method||"PATCH"===t.method)&&(n.body=JSON.stringify(t.body));let s=await fetch(i,n);if(!s.ok){let t=null;try{let e=s.headers.get("content-type");t=e&&e.includes("application/json")?await s.json():await s.text()}catch{}if(401===s.status&&t?.code==="token_not_valid")return window.location.href="/auth/login?error=session_expired",new Promise(()=>{});let e=Error(`HTTP ${s.status}: ${s.statusText}`);throw Object.defineProperty(e,"status",{value:s.status,writable:!1,enumerable:!0,configurable:!0}),Object.defineProperty(e,"statusText",{value:s.statusText,writable:!1,enumerable:!0,configurable:!0}),Object.defineProperty(e,"details",{value:t,writable:!1,enumerable:!0,configurable:!0}),Object.defineProperty(e,"url",{value:i,writable:!1,enumerable:!0,configurable:!0}),e}let o=null;if(204!==s.status&&"0"!==s.headers.get("content-length")){let t=s.headers.get("content-type");t&&t.includes("application/json")&&(o=await s.json())}let l=o??{};Object.defineProperty(l,Symbol.for("status"),{value:s.status,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(l,Symbol.for("ok"),{value:s.ok,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(l,Symbol.for("headers"),{value:s.headers,writable:!1,enumerable:!1,configurable:!1}),a(l)}catch(t){i(t)}});return a.cancel=()=>{e&&e.abort()},a[Symbol.for("isResolved")]=!1,a[Symbol.for("isRejected")]=!1,a[Symbol.for("isCancelled")]=!1,a}async requestWithNormalization(t,e){let a=this.isLocalEnv?{cache:"no-store",next:{revalidate:0}}:e;"true"===i.default.env.DEBUG_FETCH_CACHE&&a&&!this.isLocalEnv&&console.debug("Cache policy applied:",a);let n=await this.request({...t,cachePolicy:a}),r=s.normalize(n);if(null!=r&&"object"==typeof r&&null!=n&&"object"==typeof n)for(let t of[Symbol.for("status"),Symbol.for("ok"),Symbol.for("headers")]){let e=n[t];void 0!==e&&Object.defineProperty(r,t,{value:e,writable:!1,enumerable:!1,configurable:!0})}return r}get(t,e){return this.requestWithNormalization({method:"GET",url:t},e)}post(t,e,a){return this.requestWithNormalization({method:"POST",url:t,body:e},a)}put(t,e,a){return this.requestWithNormalization({method:"PUT",url:t,body:e},a)}patch(t,e,a){return this.requestWithNormalization({method:"PATCH",url:t,body:e},a)}delete(t,e){return this.requestWithNormalization({method:"DELETE",url:t},e)}}(e={}).TEXT="text",e.CHAT_MESSAGE="chat_message",e.PROCESS_TOOLS_CALL_RESULT_WITH_AI="process_tools_call_result_with_ai",e.CUSTOM="custom",e.ITINERARY_CREATED="itinerary_created",e.ITINERARY="itinerary",e.ITINERARY_REMOVED="itinerary_removed",e.WEB_SEARCH_RESULTS="web_search_results",e.ITINERARY_DAY_ADDED="itinerary_day_added",e.ITINERARY_DAY_REMOVED="itinerary_day_removed",e.DAY_ITEM_SUGGESTION="day_item_suggestion",e.DAY_ITEM_FOR_ACTIVITY_REPLACEMENT="day_item_for_activity_replacement",e.SUGGESTED_ITEM="suggested_item",e.CONFIRM_SUGGESTED_ITEM="confirm_suggested_item",e.DAY_ITEM="day_item",e.DAY_ITEM_CREATED="day_item_created",e.DAY_ITEM_REMOVED="day_item_removed",e.DAY_ITEMS_UPDATED="day_items_updated",e.ITINERARY_DAY="itinerary_day",e.ACCOMMODATION="accommodation",e.ACCOMMODATION_APPROVED="accommodation_booked",e.ACCOMMODATION_CANCELED="accommodation_booking_c
2ancelation",e.ADD_DESTINATION="add_destination",e.ADD_PEOPLE="add_people",e.ADD_DATES="add_dates",e.PLACE_LINK="place_link",e.PLACE_SUGGESTION="place_suggestion",e.DESTINATION_SUGGESTION="destination_suggestion",(a={}).Welcome="welcome",a.Confirm="confirm",a.Commutes="commutes",a.Itinerary="itinerary",a.SuggestedItem="suggested_item",a.ConfirmSuggestedItem="confirm_suggested_item",a.ReservationConfirmation="reservation_confirmation",a.Custom="custom",a.Error="error";class l{httpClient;constructor(t){this.httpClient=t}hasContentChunks(t){return Array.isArray(t?.contentChunks)&&t.contentChunks.length>0||Array.isArray(t?.content_chunks)&&t.content_chunks.length>0}async getChatList(t){let e=new URLSearchParams;t?.page&&e.append("page",t.page.toString()),t?.page_size&&e.append("page_size",t.page_size.toString()),t?.search&&e.append("search",t.search),t?.require_user_msg!==void 0&&e.append("require_user_msg",t.require_user_msg.toString()),t?.empty_grace_seconds!==void 0&&e.append("empty_grace_seconds",t.empty_grace_seconds.toString()),t?.include_chat_id!==void 0&&e.append("include_chat_id",t.include_chat_id.toString()),t?.fields&&e.append("fields",t.fields),t?.omit&&e.append("omit",t.omit);let a=e.toString()?`/chats/?${e.toString()}`:"/chats/";return await this.httpClient.get(a)}async getChat(t){let e=await this.httpClient.get(`/chats/${t}/`);console.log("get-chat response:",e);let a=Array.isArray(e?.messages)?e.messages:[];try{let i=await this.getMessages(t,{page:1,page_size:30}),n=new Map(a.filter(t=>t&&null!=t.id).map(t=>[t.id,t]));e.messages=i.map(t=>{if(this.hasContentChunks(t))return t;let e=n.get(t?.id);return this.hasContentChunks(e)?{...t,contentChunks:t.contentChunks??t.content_chunks??e.contentChunks??e.content_chunks,content_chunks:t.content_chunks??e.content_chunks}:t}),console.log("[ChatService.getChat] messages hydrated",{chatId:t,total:e.messages.length,withChunks:e.messages.filter(t=>this.hasContentChunks(t)).length})}catch(t){console.warn("[ChatService.getChat] Failed to fetch messages separately:",t)}return e}async getMessages(t,e){let a=new URLSearchParams,i=e?.page??1,n=e?.page_size??30;a.append("page",i.toString()),a.append("page_size",n.toString());let r=`/chats/${t}/messages/?${a.toString()}`,s=await this.httpClient.get(r);return Array.isArray(s?.results)?s.results:s}async createAssistantPlaceholder(t,e){return await this.httpClient.post(`/chats/${t}/send-message/`,{content:e,message_type:"message",role:"assistant"})}async createChat(t){return await this.httpClient.post("/chats/",t)}async sendMessage(t,e,a="message",i){return await this.httpClient.post(`/chats/${t}/send-message/`,{content:e,message_type:a,page_context:i??void 0})}async updateChat(t,e){return await this.httpClient.put(`/chats/${t}/`,e)}async deleteChat(t){await this.httpClient.delete(`/chats/${t}/`)}async postMessageFeedback(t,e){return await this.httpClient.post(`/messages/${t}/feedback/`,e)}async getMessageFeedback(t){return await this.httpClient.get(`/messages/${t}/feedback/`)}}class p{httpClient;constructor(t){this.httpClient=t}async createBookingRequest(t){return await this.httpClient.post("/concierge/booking-requests/",t)}async syncBookingRequest(t){await this.httpClient.post(`/concierge/booking-requests/${t}/sync/`,{})}}class c{httpClient;constructor(t){this.httpClient=t}async getGroupData(t){return this.httpClient.get("/group-planner/",t)}}class d{httpClient;constructor(t){this.httpClient=t}async createMetrics(t,e){return this.httpClient.post("/metrics/",t,e)}}Symbol.for("status"),Symbol.for("ok");let h=Symbol.for("headers"),u=t=>{let e=t?.[h]?.get("retry-after");if(!e)return null;let a=Number(e);return Number.isFinite(a)&&a>=0?a:null};class g{httpClient;constructor(t){this.httpClient=t}async getPlace(t,e){let a=new URLSearchParams;e?.fields&&a.append("fields",e.fields),e?.intent&&a.append("intent",e.intent),e?.photos_limit!==void 0&&a.append("photos_limit",e.photos_limit.toString());let i=a.toString(),n=await this.httpClient.get(`/places/${t}/${i?`?${i}`:""}`,e?.cachePolicy);return e?.debugLabel&&console.log(`[${e.debugLabel}] raw place response`,{url:`/places/${t}/${i?`?${i}`:""}`,responseKeys:n&&"object"==typeof n?Object.keys(n):[],photoCount:Array.isArray(n?.ph
2otos)?n.photos?.length??0:null,response:n}),n}async getPlacesByIds(t,e){let{places:a}=await this.getPlacesHydrated(t,void 0,e);return a}async getPlacesHydrated(t,e,a){let i=Array.from(new Set(t.map(t=>Number(t)).filter(t=>Number.isFinite(t)&&t>0)));if(0===i.length)return{places:new Map,pending:new Map,retryAfter:null};if(1===i.length){let t=i[0],n=await this.getPlace(t,{fields:e?.fields,intent:e?.intent,photos_limit:e?.photos_limit,debugLabel:e?.debugLabel,cachePolicy:a}),r=new Map,s=new Map;return n&&null!=n.id&&(r.set(Number(n.id),n),n.pendingFields&&Object.keys(n.pendingFields).length>0&&s.set(Number(n.id),n.pendingFields)),{places:r,pending:s,retryAfter:u(n)}}let n=new URLSearchParams;n.append("ids",i.join(",")),n.append("page_size",String(Math.min(i.length,500))),e?.fields&&n.append("fields",e.fields),e?.intent&&n.append("intent",e.intent),e?.photos_limit!==void 0&&n.append("photos_limit",e.photos_limit.toString());let r=await this.httpClient.get(`/places/?${n.toString()}`,a);e?.debugLabel&&console.log(`[${e.debugLabel}] raw places batch response`,{url:`/places/?${n.toString()}`,responseKeys:r&&"object"==typeof r?Object.keys(r):[],resultsLength:Array.isArray(r?.results)?r.results.length:null,placesLength:Array.isArray(r?.places)?r.places.length:null,response:r});let s=Array.isArray(r?.results)?r.results:[],o=new Map,l=new Map;for(let t of s){if(!t||null==t.id)continue;let e=Number(t.id);o.set(e,t);let a=t.pendingFields;a&&Object.keys(a).length>0&&l.set(e,a)}if(r?.pendingFields)for(let[t,e]of Object.entries(r.pendingFields)){let a=Number(t);Number.isFinite(a)&&e&&Object.keys(e).length>0&&l.set(a,e)}return{places:o,pending:l,retryAfter:u(r)}}async getPlacePricing(t,e,a,i="USD"){let n=new URLSearchParams({check_in:e,check_out:a,currency:i});return this.httpClient.get(`/places/${t}/pricing/?${n}`)}async getPlacesPricingBatch(t,e="USD"){if(0===t.length)return new Map;let a={items:t.map(t=>({place_id:Number(t.placeId),check_in:t.checkIn,check_out:t.checkOut})),currency:e},i=await this.httpClient.post("/places/pricing/batch/",a),n=new Map;for(let t of i?.results??[])t?.placeId!=null&&n.set(`${Number(t.placeId)}|${t.checkIn}|${t.checkOut}`,Array.isArray(t.offers)?t.offers:[]);return n}async getPlaceActivities(t,e){return await this.httpClient.get(`/places/${t}/activities/`,e)}async savePreference(t){let{place_id:e,...a}=t;await this.httpClient.post(`/places/${e}/preferences/`,a)}async getDestinations(t,e){let a=new URLSearchParams;t?.type&&a.append("type",t.type),t?.types&&a.append("types",t.types),t?.name&&a.append("name",t.name),t?.fields&&a.append("fields",t.fields),t?.page_size&&a.append("page_size",t.page_size.toString()),t?.page&&a.append("page",t.page.toString()),t?.skip_enrichment&&a.append("skip_enrichment",t.skip_enrichment.toString()),t?.include_coverage!==void 0&&a.append("include_coverage",t.include_coverage.toString()),t?.photos_limit!==void 0&&a.append("photos_limit",t.photos_limit.toString()),t?.canonical_path&&a.append("canonical_path",t.canonical_path),t?.canonical_paths&&a.append("canonical_paths",t.canonical_paths),t?.ids&&a.append("ids",t.ids),t?.ordering&&a.append("ordering",t.ordering),t?.parent&&a.append("parent",t.parent),t?.parent_path_only&&a.append("parent_path_only","true"),t?.tags&&a.append("tags",t.tags),t?.country_code&&a.append("country_code",t.country_code),t?.region&&a.append("region",t.region),t?.city&&a.append("city",t.city),t?.lat&&a.append("lat",t.lat.toString()),t?.lng&&a.append("lng",t.lng.toString()),t?.radius&&a.append("radius",t.radius.toString()),t?.exclude_type&&a.append("exclude_type",t.exclude_type),t?.exclude&&a.append("exclude",t.exclude.toString()),t?.min_rating!==void 0&&a.append("min_rating",t.min_rating.toString()),t?.min_reviews!==void 0&&a.append("min_reviews",t.min_reviews.toString()),t?.has_photos!==void 0&&a.append("has_photos",t.has_photos.toString()),t?.has_reviews!==void 0&&a.append("has_reviews",t.has_reviews.toString()),t?.min_images!==void 0&&a.append("min_images",t.min_images.toString());let i=a.toString()?`/places/?${a.toString()}`:"/places/";return await this.httpClient.get(i,e)}async getInspirationSections(t,e,a){let i=new URLSearchParams;a?.fields&&i.append("fields",a.fields),a?.photos_limit!==void 0&&i.append("photos_limit",a.photos_limit.toString());let n=i.toString()?`/places/inspiration/?${i.toString()}`:"/places/inspiration/";return await this.httpClient.post(n,t,e)}async getDestinationByPath(t,e,a){let i=t.replace(/^\/+/,""),n=i.startsWith("destinations/")?i.slice(13):i,r=new URLSearchParams;e?.page&&r.append("page",e.page.toString()),e?.page_size&&r.append("page_size",e.page_size.toString()),e?.fields&&r.append("fields",e.fields),e?.photos_limit!==void 0&&r.append("photos_limit",e.photos_limit.toString()),e?.include_coverage!==void 0&&r.append("include_coverage",e.include_coverage?"true":"false");let s=r.toString(),o=`/destinations/${n.replace(/\/+$/,"")}/${s?`?${s}`:""}`;return await this.httpClient.get(o,a)}async getCountries(){return this.getDestinations({type:"country",page_size:300,page:1,skip_enrichment:!0,include_coverage:!1,fields:"id,name,slug,canonical_path,country_code"},{cache:"force-cache"})}async getDestinationFilters(){return await this.httpClient.get("/destination/all/filters/")}async getFeaturedCategories(){try{return(await this.getDestinationFilters()).categories.filter(t=>!!t.name)}catch{return[]}}async getFeaturedItineraries(t){let e=new URLSearchParams;
2if(e.append("featured","true"),e.append("fields","id,name,city,slug,path,image"),e.append("page_size","15"),t.page&&e.append("page",t.page.toString()),t.categories&&e.append("category",t.categories),t.duration){let[a,i]=t.duration.split("-"),n=i??a;e.append("days_min",a),e.append("days_max",n)}t.adults&&e.append("adults",t.adults.toString()),t.children&&e.append("children",t.children.toString());let a=`/itineraries/?${e.toString()}`;return await this.httpClient.get(a)}async getPopularCities(t,e){return this.getDestinations({...t,ordering:"-popularity_rank,-score",type:"city",skip_enrichment:!0},e)}async getPopularCountries(t,e){return this.getDestinations({...t,ordering:"-popularity_rank,-score",type:"country",skip_enrichment:!0},e)}}class _{httpClient;constructor(t){this.httpClient=t}async sendEvent(t){return await this.httpClient.post("/telemetry/events/",t)}}class m{httpClient;constructor(t){this.httpClient=t}async getTrip(t){return await this.httpClient.get(`/trips/${t}/`)}async getTrips(t,e){let a=new URLSearchParams;t?.page&&a.append("page",t.page.toString()),t?.pageSize&&a.append("page_size",t.pageSize.toString()),t?.tripType&&a.append("trip_type",t.tripType),t?.destination&&a.append("destination",t.destination),t?.ordering&&a.append("ordering",t.ordering),t?.search&&a.append("search",t.search);let i=a.toString()?`/trips/?${a.toString()}`:"/trips/";return await this.httpClient.get(i,e)}async getMyTrips(t,e,a,i){let n=new URLSearchParams;t&&"all"!==t&&n.append("status",t),e&&n.append("page_size",e.toString()),a&&n.append("page",a.toString());let r=n.toString()?`/trips/?${n.toString()}`:"/trips/";return await this.httpClient.get(r,i)}async createTrip(t){let e={title:t.title};return null!=t.destination&&(e.destination=t.destination),null!=t.primaryPlaceId&&(e.primary_place=t.primaryPlaceId),null!=t.tripType&&(e.trip_type=t.tripType),null!=t.chatId&&(e.chat_id=t.chatId),await this.httpClient.post("/trips/",e)}async updateTrip(t,e){return await this.httpClient.patch(`/trips/${t}/`,e)}async deleteTrip(t){await this.httpClient.delete(`/trips/${t}/`)}async createTripDay(t){return await this.httpClient.post("/trip-days/",t)}async updateTripDay(t,e){return await this.httpClient.patch(`/trip-days/${t}/`,e)}async deleteTripDay(t){await this.httpClient.delete(`/trip-days/${t}/`)}async createTripItem(t){let e={type:t.type,title:t.title};return null!=t.tripDayId&&(e.trip_day=t.tripDayId),null!=t.tripId&&(e.trip=t.tripId),null!=t.placeId&&(e.place=t.placeId),t.viatorProductCode&&(e.viator_product_code=t.viatorProductCode),t.startTime&&(e.start_time=t.startTime),t.endTime&&(e.end_time=t.endTime),t.notes&&(e.description=t.notes),null!=t.isUserAdded&&(e.is_user_added=t.isUserAdded),await this.httpClient.post("/items/",e)}async addIdea(t,e,a){return this.createTripItem({tripId:t,placeId:"place"===e.type?e.placeId:void 0,viatorProductCode:"viator"===e.type?e.productCode:void 0,type:a?.type??"activity",title:a?.title??"",isUserAdded:!0})}async updateTripItem(t,e){return await this.httpClient.patch(`/items/${t}/`,e)}async deleteTripItem(t){await this.httpClient.delete(`/items/${t}/`)}async duplicateTrip(t,e){return await this.httpClient.post(`/trips/${t}/duplicate/`,{title:e})}async getTripStatistics(){return await this.httpClient.get("/trips/statistics/")}
2async renameDay(t,e){return await this.httpClient.post(`/days/${t}/rename/`,{title:e})}async removeDay(t){return await this.httpClient.post(`/days/${t}/remove/`,{})}async removeItem(t){return await this.httpClient.post(`/items/${t}/remove/`,{})}async setItemBooked(t,e){return await this.httpClient.post(`/items/${t}/set_booked/`,{is_booked:e})}async getDayRoute(t,e,a,i){let n=new URLSearchParams;return n.append("mode",a?.mode??"auto"),a?.provider&&n.append("provider",a.provider),await this.httpClient.get(`/trips/${t}/days/${e}/route/?${n.toString()}`,i)}async getRouteSegment(t,e,a,i){let n=new URLSearchParams;return n.append("origin_place_id",t.toString()),n.append("destination_place_id",e.toString()),a&&n.append("mode",a),await this.httpClient.get(`/routes/segment/?${n.toString()}`,i)}async ensureCommuteEstimates(t,e,a){let i={origin_place_id:t,destination_place_id:e};return a&&a.length>0&&(i.modes=a),await this.httpClient.post("/commute_estimates/ensure/",i)}async getCommute(t,e){return await this.httpClient.post("/commute/",{origin_place:t,destination_place:e})}async getLatestTripPdf(t){return await this.httpClient.get(`/trip-pdfs/by-trip/${t}/latest/`)}async enqueueTripPdf(t){return await this.httpClient.post(`/trip-pdfs/by-trip/${t}/enqueue/`,{})}async publishTrip(t){return await this.httpClient.post(`/trips/${t}/publish/`)}async unpublishTrip(t){return await this.httpClient.post(`/trips/${t}/unpublish/`)}async getListedBySlug(t,e){return await this.httpClient.get(`/trips/public/${t}/`,e)}async getListedByDestination(t,e){return await this.httpClient.get(`/trips/listed/by-destination/${t}/`,e)}async getListedByDestinationSections(t,e){return await this.httpClient.get(`/trips/listed/by-destination/${t}/sections/`,e)}async getListedIndex(t,e){let a=new URLSearchParams;t?.page&&a.append("page",t.page.toString()),t?.destinationPlaceId&&a.append("destination_place_id",t.destinationPlaceId.toString()),t?.length&&a.append("length",t.length);let i=a.toString()?`/trips/listed/?${a.toString()}`:"/trips/listed/";return await this.httpClient.get(i,e)}}class y{httpClient;constructor(t){this.httpClient=t}async register(t){let e={email:t.email,password:t.password,first_name:t.firstName,last_name:t.lastName};return await this.httpClient.post("/auth/register/",e)}async login(t){let e=await this.httpClient.post("/auth/login/",t);return this.normalizeAuthResponse(e)}async refreshToken(t){return await this.httpClient.post("/auth/jwt/refresh/",t)}async logout(){return await this.httpClient.post("/auth/logout/",{})}normalizeAuthResponse(t){return{user:this.normalizeUser(t.user),refresh:t.refresh,access:t.access}}async requestPasswordReset(t){return await this.httpClient.post("/auth/password/reset/",t)}async confirmPasswordReset(t){return await this.httpClient.post("/auth/password/reset/confirm/",t)}async resendConfirmation(t){return await this.httpClient.post("/auth/resend-confirmation/",t)}async confirmEmail(t){let e=await this.httpClient.post("/auth/email/confirm/",t);return this.normalizeAuthResponse(e)}async googleLogin(t){let e=await this.httpClient.post("/auth/google/login/",t);return this.normalizeAuthResponse(e)}async googleConnect(t){let e=await this.httpClient.post("/auth/google/connect/",t);return{user:this.normalizeUser(e.user),message:e.message}}async requestMagicLink(t,e){return await this.httpClient.post("/auth/magic-link/request/",{email:t,next:e})}async verifyMagicLink(t){let e=await this.httpClient.post("/auth/magic-link/verify/",{token:t});return this.normalizeAuthResponse(e)}async checkEmail(t){return await this.httpClient.post("/auth/check-email/",{email:t})}async getReportingAccess(){return await this.httpClient.get("/auth/reporting-access/")}normalizeUser(t){return{id:t.id,email:t.email,firstName:t.firstName??t.first_name,lastName:t.lastName??t.last_name,profilePhoto:t.profilePhoto??t.profile_photo,language:t.language,currency:t.currency,aiProfile:t.aiProfile??t.ai_profile,onboardingCompleted:t.onboardingCompleted??t.onboarding_completed,country:t.country??null,homeCity:t.homeCity??t.home_city??null,preferences:t.preferences,embedding:t.embedding,createdAt:t.createdAt??t.created_at,...this.getAdditionalFields(t)}}getAdditionalFields(t){let e={},a=["id","email","first_name","last_name","profile_photo","language","currency","ai_profile","onboarding_completed","firstName","lastName","profilePhoto","aiProfile","onboardingCompleted","country","home_city","homeCity","preferences","embedding","created_at","createdAt"];for(let[i,n]of Object.entries(t))a.includes(i)||(e[i]=n);return e}}class C{httpClient;constructor(t){this.httpClient=t}async getPackages(t){return await this.httpClient.get("/billing/packages/",t)}async getBalance(){return await this.httpClient.get("/billing/balance/")}async getTransactions(){return await this.httpClient.get("/billing/transactions/")}async getPurchases(){return await this.httpClient.get("/billing/purchases/")}async createCheckout(t,e){return await this.httpClient.post("/billing/checkout/",{package_key:t,...e&&{
2chat_id:e}})}async getReferral(){return await this.httpClient.get("/billing/referral/")}async claimReferral(t){await this.httpClient.post("/billing/referral/claim/",{referral_code:t})}async sendReferralInvite(t){await this.httpClient.post("/billing/referral/invite/",{email:t})}}class E{httpClient;constructor(t){this.httpClient=t}async list(t,e={}){var a;let i=new URLSearchParams({chat_id:String(t)});return e.status&&i.set("status",e.status),Array.isArray(a=await this.httpClient.get(`/notes/?${i.toString()}`))?a:a?.results??[]}async create(t){return await this.httpClient.post("/notes/",t)}async update(t,e){return await this.httpClient.patch(`/notes/${t}/`,e)}async delete(t){await this.httpClient.delete(`/notes/${t}/`)}}class A{httpClient;constructor(t){this.httpClient=t}async getCurrentUser(){let t=await this.httpClient.get("/users/me/");return this.normalizeUser(t)}async updateProfile(t){let e=await this.httpClient.patch("/users/update_profile/",t);return this.normalizeUser(e)}async updateProfileAlternative(t){let e=await this.httpClient.patch("/auth/profile/update/",t);return this.normalizeUser(e)}async subscribe(t){return await this.httpClient.post("/users/subscribe/",{email:t})}normalizeUser(t){return{id:t.id,email:t.email,firstName:t.firstName??t.first_name,lastName:t.lastName??t.last_name,profilePhoto:t.profilePhoto??t.profile_photo,language:t.language,currency:t.currency,aiProfile:t.aiProfile??t.ai_profile,onboardingCompleted:t.onboardingCompleted??t.onboarding_completed,country:t.country??null,homeCity:t.homeCity??t.home_city??null,preferences:t.preferences,embedding:t.embedding,createdAt:t.createdAt??t.created_at,isGoogleUser:t.isGoogleUser??t.is_google_user??!1,...this.getAdditionalFields(t)}}getAdditionalFields(t){let e={},a=["id","email","first_name","last_name","profile_photo","language","currency","ai_profile","onboarding_completed","firstName","lastName","profilePhoto","aiProfile","onboardingCompleted","country","home_city","homeCity","preferences","embedding","created_at","createdAt","is_google_user","isGoogleUser"];for(let[i,n]of Object.entries(t))a.includes(i)||(e[i]=n);return e}}function S(t){let e=new o({BASE:"true"===i.default.env.NEXT_PUBLIC_USE_PROXY?"/api":"https://api.travelpal.ai/api",VERSION:"1",WITH_CREDENTIALS:!0,CREDENTIALS:"include",HEADERS:t?{cookie:t.toString()}:void 0});return{metrics:new d(e),group:new c(e),chat:new l(e),auth:new y(e),billing:new C(e),users:new A(e),telemetry:new _(e),places:new g(e),trips:new m(e),concierge:new p(e),notes:new E(e),request:e}}t.s(["default",0,S,"useApi",0,()=>S()],303071)}]);
3
4//# debugId=a769f6cf-de6f-60ee-5afb-4c02181eb705

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.