1import{j as V,D as X,l as r,p as c,E as B,v as e,q as w,T as Z,z as J,x,G as R,u as P,C as k,F as T,y as O,A as F,r as L,L as tt,w as et,n as ot,k as Q,M as nt,s as lt,N as st,O as at,P as rt,Q as it,f as C}from"./vendor-vue-DgKPkTzM.js";import{u as G,_ as ct}from"./links-lgUQVf6P.js";import{_ as pt}from"./MapboxStaticImage-DKECx9la.js";import{_ as dt}from"./app-BXTTJdGA.js";import{h as ut}from"./Button-Df9jM5Z5.js";import"./vendor-icons-C07lCRXW.js";import"./vendor-Dtr_Mrnh.js";import"./vendor-swiper-CmTBkzXo.js";import"./PostCard-DBKIbMCa.js";import"./RegionSidebarSkeleton.vue_vue_type_script_setup_true_lang-Cx0WbN6u.js";import"./useBookmarks-DfGwopMX.js";const ft={class:"flex items-center"},xt={key:0,class:"relative z-10 flex-1 overflow-y-auto bg-white"},gt={key:0,id:"places-transportation"},vt={class:"flex flex-row items-start gap-[10px] bg-white p-[10px]"},mt={class:"relative flex size-[50px] items-center justify-center rounded border border-[#e9e9e9] bg-white"},_t={class:"flex flex-col items-start gap-[10px] p-0"},bt={class:"flex items-center text-[16px] font-semibold leading-[23px] text-[#333]"},ht=["href"],yt={class:"flex flex-row items-start gap-[10px] bg-white p-[10px]"},wt={class:"relative flex size-[50px] items-center justify-center rounded border border-[#e9e9e9] bg-white"},kt={class:"flex flex-col items-start gap-[10px] p-0"},Ct={class:"flex items-center text-[16px] font-semibold leading-[23px] text-[#333]"},$t=["href"],It={id:"places-list"},St=["onClick"],Tt=["src","alt"],Mt={class:"flex flex-1 flex-col gap-[10px]"},Et={class:"flex items-center justify-between"},zt={key:0,class:"text-[14px] uppercase leading-[1em] text-gray-500"},Nt=["href"],Pt={class:"text-[16px] font-semibold leading-[1em] text-[#333]"},Ot={key:0,class:"text-[14px] leading-[1em] text-[#757575]"},Lt=V({__name:"MapSidebar",props:{spots:{},transportation:{}},emits:["selectPlace"],setup(i,{emit:d}){const b=i,h=d,{t:$}=G(),p=L(!0),m=()=>{p.value=!p.value},_=()=>{const g={};for(const s of b.spots){const v=s.category||"Other";g[v]||(g[v]=[]),g[v].push(s)}return g},y=(g,s)=>`https://www.google.com/maps/search/?api=1&query=${g},${s}`;return(g,s)=>{const v=X("FontAwesomeIcon");return r(),c("div",{class:B(["pointer-events-auto flex flex-col bg-white",{"h-full":p.value}])},[e("div",{class:"relative z-10 flex cursor-pointer items-center justify-between border-b border-[#dee2e6] bg-white p-[15px]",onClick:m},[e("div",ft,[w(v,{icon:["fas","location-dot"],class:"mr-[10px]"}),s[5]||(s[5]=e("span",{class:"font-medium"},"All Places",-1))]),w(v,{icon:["fas","chevron-down"],class:B(["transition-transform duration-300",{"rotate-180":!p.value}])},null,8,["class"])]),w(Z,{name:"sidebar-collapse"},{default:J(()=>[p.value?(r(),c("div",xt,[i.transportation.station||i.transportation.airport?(r(),c("div",gt,[i.transportation.station?(r(),c("div",{key:0,class:"cursor-pointer border-b border-[#e9e9e9] p-[10px]",onClick:s[1]||(s[1]=I=>h("selectPlace","station"))},[e("div",vt,[e("div",mt,[w(v,{icon:["fas","train"]})]),e("div",_t,[e("div",bt,x(i.transportation.station.title),1),e("a",{href:y(i.transportation.station.lat,i.transportation.station.lng),target:"_blank",class:"flex flex-row items-center gap-[5px] rounded-full p-0 text-center text-[14px] font-normal leading-[14px] text-[#c1282f]",onClick:s[0]||(s[0]=R(()=>{},["stop"]))},[e("span",null,x(P($)("SEE_DIRECTIONS")),1),s[6]||(s[6]=e("i",{class:"far fa-directions"},null,-1))],8,ht)])])])):k("",!0),i.transportation.airport?(r(),c("div",{key:1,class:"cursor-pointer border-b border-[#e9e9e9] p-[10px]",onClick:s[3]||(s[3]=I=>h("selectPlace","airport"))},[e("div",yt,[e("div",wt,[w(v,{icon:["fas","plane"]})]),e("div",kt,[e("div",Ct,x(i.transportation.airport.title),1),e("a",{href:y(i.transportation.airport.lat,i.transportation.airport.lng),target:"_blank",class:"flex flex-row items-center gap-[5px] rounded-full p-0 text-center text-[14px] font-normal leading-[14px] text-[#c1282f]",onClick:s[2]||(s[2]=R(()=>{},["stop"]))},[e("span",null,x(P($)("SEE_DIRECTIONS")),1),w(v,{icon:["fas","diamond-turn-right"]})],8,$t)])])])):k("",!0)])):k("",!0),e("div",It,[(r(!0),c(T,null,O(_(),(I,M)=>(r(),c(T,{key:M},[(r(!0),c(T,null,O(I,f=>(r(),c("div",{key:f.id,class:"flex cursor-pointer items-start gap-3 border-b border-[#e9e9e9] p-[10px]",onClick:E=>h("selectPlace",f.id)},[e("img",{src:f.photo,alt:f.title,class:"h-[77px] w-[115px] rounded object-cover",loading:"lazy"},null,8,Tt),e("div",Mt,[e("div",Et,[f.category?(r(),c("span",zt,x(f.category),1)):k("",!0),e("a",{href:f.url,target:"_blank",class:"flex items-center gap-1 text-[13px] text-[#c1282f]",onClick:s[4]||(s[4]=R(()=>{},["stop"]))},[s[7]||(s[7]=F(" More ",-1)),w(v,{icon:["fas","arrow-up-right-from-square"],class:"text-[10px]"}
1)],8,Nt)]),e("div",Pt,x(f.title),1),f.area?(r(),c("div",Ot,x(f.area),1)):k("",!0)])],8,St))),128))],64))),128))])])):k("",!0)]),_:1})],2)}}}),At=ct(Lt,[["__scopeId","data-v-dd7e547c"]]),jt={class:"fixed inset-0 z-[1250] flex items-center justify-center"},Dt={key:0,class:"relative mx-0 my-0 h-full w-full md:mx-5 md:my-8 md:h-[90vh] md:w-[90vw]"},Rt={class:"pointer-events-none absolute left-0 top-0 z-10 h-full w-[87vw] max-w-[400px]"},S="https://assets.japantravel.com/static/pins/",Ft=V({__name:"MapNewCityModal",props:it({markers:{},spots:{},center:{},zoom:{default:12},transportation:{},initialFocusId:{default:null}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:["update:open"],setup(i){const d=i,{t:b}=G(),h=tt(i,"open"),$=L(null);let p=null,m=null;const _={};let y=null,g=!1;const s=async()=>{const n="AIzaSyDUnbMW2_DkC6KWaoN8W1uUZtLJWqTvfyU";try{const{Loader:a}=await dt(async()=>{const{Loader:o}=await import("./index-D-8nYH0_.js");return{Loader:o}},[]);return await new a({apiKey:n,version:"weekly",libraries:["places"]}).load(),g=!0,!0}catch{return!1}},v=()=>{!$.value||!g||(p=new google.maps.Map($.value,{center:d.center,zoom:d.zoom,zoomControl:!0,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_CENTER},mapTypeControl:!0,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_LEFT,style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR,mapTypeIds:["roadmap","satellite"]},scaleControl:!0,streetViewControl:!0,streetViewControlOptions:{position:google.maps.ControlPosition.RIGHT_BOTTOM},fullscreenControl:!1,rotateControl:!1,motionTrackingControl:!1}),m=new google.maps.InfoWindow,I(),M(),d.initialFocusId&&google.maps.event.addListenerOnce(p,"idle",()=>{A(d.initialFocusId)}))},I=()=>{if(p)for(const n of d.markers){const a=new google.maps.Marker({position:{lat:n.location[0],lng:n.location[1]},map:p,icon:{url:n.pin_img,scaledSize:new google.maps.Size(30,42)},title:n.title});a.addListener("click",()=>f(n.id,n,a)),_[n.id]=a}},M=()=>{if(!p)return;const{station:n,airport:a}=d.transportation;if(n){const t=new google.maps.Marker({position:{lat:n.lat,lng:n.lng},map:p,icon:{url:S+"transport.png",scaledSize:new google.maps.Size(30,42)},title:n.title});t.addListener("click",()=>f("station",{title:n.title,url:`https://www.google.com/maps/search/?api=1&query=${n.lat},${n.lng}`,url_text:b("SEE_DIRECTIONS"),active_pin:S+"station.png",location:[n.lat,n.lng]},t)),_.station=t}if(a){const t=new google.maps.Marker({position:{lat:a.lat,lng:a.lng},map:p,icon:{url:S+"airport-inactive.png",scaledSize:new google.maps.Size(30,42)},title:a.title});t.addListener("click",()=>f("airport",{title:a.title,url:`https://www.google.com/maps/search/?api=1&query=${a.lat},${a.lng}`,url_text:b("SEE_DIRECTIONS"),active_pin:S+"airport.png",location:[a.lat,a.lng]},t)),_.airport=t}},f=(n,a,t)=>{if(!p||!m)return;if(y!==null&&_[y]){const u=E(y);u&&_[y].setIcon({url:u.pin_img,scaledSize:new google.maps.Size(30,42)})}t.setIcon({url:a.active_pin,scaledSize:new google.maps.Size(38,52)}),y=n;const o=a.url_text||"Know More";m.setContent(` 2 <div class="map-info-window"> 3 <div class="map-info-title">${a.title}</div> 4 <a href="${a.url}" target="_blank" rel="noopener noreferrer" class="map-info-link"> 5 ${o} 6 </a> 7 </div> 8 `),m.open(p,t),p.panTo(t.getPosition()),p.setZoom(17)},E=n=>n==="station"&&d.transportation.station?{id:"station",title:d.transportation.station.title,url:"",url_text:"",pin_img:S+"transport.png",active_pin:S+"station.png",category:"",location:[d.transportation.station.lat,d.transportation.station.lng]}:n==="airport"&&d.transportation.airport?{id:"airport",title:d.transportation.airport.title,url:"",url_text:"",pin_img:S+"airport-inactive.png",active_pin:S+"airport.png",category:"",location:[d.transportation.airport.lat,d.transportation.airport.lng]}:d.markers.find(a=>a.id===n)||null,A=n=>{const a=_[n];if(!a||!p)return;const t=E(n);t&&f(n,t,a)},q=n=>{A(n)},j=()=>{h.value=!1},D=()=>{m&&(m.close(),m=null);for(const n of Object.keys(_))_[n].setMap(null),delete _[n];p=null,y=null};return et(h,n=>{typeof document>"u"||(document.body.style.overflow=n?"hidden":"",n?ot(async()=>{g||await s(),v()}):D())}),Q(async()=>{await s()}),nt(()=>{D(),typeof document<"u"&&(document.body.style.overflow="")}),(n,a)=>(r(),lt(rt,{to:"body"},[st(e("div",jt,[e("div",{class:"absolute inset-0 bg-black/50",onClick:j}),w(Z,{name:"fade-slide"},{default:J(()=>[h.value?(r(),c("div",Dt,[e("button",{type:"button",class:"absolute right-0 top-0 z-20 cursor-pointer border-0 bg-white px-4 py-3 text-center text-[24px] leading-[24px] text-black","aria-label":"Close",onClick:j}," Ã "),e("div",Rt,[w(At,{spots:i.spots,transportation:i.transportation,onSelectPlace:q},null,8,["spots","transportation"])]),e("div",{ref_key:"mapContainer",ref:$,class:"h-full w-full rounded"},null,512)])):k("",!0)]),_:1})],512),[[at,h.value]])]))}}),Bt={key:0,class:"px-4 md:px-0"},qt={class:"mx-auto mt-[40px] h-full w-full max-w-full md:mt-[60px] md:w-[750px] px-0 lg:w-[970px] xl:w-container"},Vt={class:"mb-6 flex w-full flex-row items-center justify-between p-0"},Gt={class:"m-0 flex items-center text-[30px] font-semibold leading-[1] text-[#404040]"},Ut={class:"flex flex-col gap-3 md:flex-row"},Wt={class:"relative mb-4 overflow-hidden rounded md:w-1/2 md:mb-0"},Kt={class:"flex flex-col md:w-1/2 md:flex-row gap-3"},Yt={id:"col-access",class:"flex flex-col justify-between md:w-1/2"},Ht={key:0,class:"overflow-hidden rounded"},Zt={class:"box-border flex flex-col items-start gap-[10px] rounded border border-[#e9e9e9] p-[15px]"},Jt={class:"w-full border-b border-[#e9e9e9] pb-[10px] text-[18px] font-bold leading-[125%] text-[#222]"},Qt={class:"flex flex-col gap-[10px] min-h-[54px]"},Xt=["onClick"],te={key:1,class:"overflow-hidden rounded"},ee={class:"box-border flex flex-col items-start gap-[10px] rounded border border-[#e9e9e9] p-[15px] mt-2"},oe={class:"w-full border-b border-[#e9e9e9] pb-[10px] text-[18px] font-bold leading-[125%] text-[#222]"},ne={class:"flex flex-col gap-[10px]"},le=["href"],se={key:0,id:"col-references",class:"md:w-1/2 h-full"},ae={class:"overflow-hidden rounded h-full"},re={class:"overflow-hidden rounded h-full"},ie={class:"box-border flex flex-col items-start gap-[10px] rounded border border-[#e9e9e9] p-[15px] h-full"},ce={class:"w-full border-b border-[#e9e9e9] pb-[10px] text-[18px] font-bold leading-[125%] text-[#222]"},pe={class:"flex flex-col gap-[20px] py-10px"},de=["href"],ue=["src","alt"],fe={class:"text-[16px] font-normal leading-[20px] text-[#757575]"},H="https://assets.japantravel.com/static/pins/",Ie=V({__name:"PlanYourTrip",props:{block:{},city:{}}
8,setup(i){const d={activities:{default:"Activities.png",active:"activities-active.svg"},culture:{default:"Culture.png",active:"culture-active.svg"},food:{default:"food.png",active:"food-active.svg"},accommodation:{default:"accommodation.png",active:"accommodation-active.svg"},"beauty & spa":{default:"beauty-spa.png",active:"beauty-spa-active.svg"},nightlife:{default:"nightlife.png",active:"nightlife.png"}},b=i,{t:h}=G(),$=C(()=>{var t;return((t=b.block.config)==null?void 0:t.title)||""}),p=C(()=>{var t;return((t=b.block.config)==null?void 0:t.ctaLabel)||""}),m=C(()=>{var t,o;return((o=(t=b.city)==null?void 0:t.plan_your_trip)==null?void 0:o.access)||[]}),_=C(()=>{var t,o;return((o=(t=b.city)==null?void 0:t.plan_your_trip)==null?void 0:o.social_media)||[]}),y=C(()=>{var t,o;return((o=(t=b.city)==null?void 0:t.plan_your_trip)==null?void 0:o.references)||[]}),g=L([]),s=L(!1),v=L(null),I=t=>typeof t=="string"?t:(t==null?void 0:t.name)||"",M=t=>typeof t=="string"?t.toLowerCase():(t==null?void 0:t.code)||"",f=C(()=>g.value.map(t=>{var o,u;return{id:t.id,title:t.title,category:I(t.category),area:((o=b.city)==null?void 0:o.name)||"",photo:t.thumbnail||"",url:t.url||`/${(u=t.prefecture)==null?void 0:u.code}/${t.slug}`}})),E=C(()=>g.value.map(t=>{var z;const o=M(t.category),u=d[o]||d.activities;return{id:t.id,title:t.title,category:I(t.category),url:t.url||`/${(z=t.prefecture)==null?void 0:z.code}/${t.slug}`,url_text:"Know More",location:[t.position.lat,t.position.lng],pin_img:H+u.default,active_pin:H+u.active}})),A=C(()=>{const t={station:null,airport:null};for(const o of m.value)o.type==="station"&&!t.station&&(t.station={type:"station",title:o.label,lat:o.lat,lng:o.lng}),o.type==="airport"&&!t.airport&&(t.airport={type:"airport",title:o.label,lat:o.lat,lng:o.lng});return t}),q=C(()=>{var t;return((t=b.city)==null?void 0:t.location)||{lat:35.6762,lng:139.6503}}),j=C(()=>{const t=[];for(const o of m.value)if(o.lat&&o.lng){const u=o.type==="airport"?"airport":"station";t.push({url:`https://assets.japantravel.com/static/pins/${u}.png`,lat:o.lat,lng:o.lng})}return t}),D=async()=>{var t;try{const o=(t=b.city)==null?void 0:t.location;if(o!=null&&o.lat&&(o!=null&&o.lng)){const u=await ut.get(`/api/map/nearby-articles?longitude=${o.lng}&latitude=${o.lat}&zoom=10`);g.value=(u==null?void 0:u.data)||u||[]}}catch(o){console.error("Error fetching map data:",o)}},n=(t=null)=>{v.value=t,s.value=!0},a=t=>{const o=t.type==="airport"?"airport":"station";n(o)};return Q(()=>{D()}),(t,o)=>{var u,z,U,W,K,Y;return(u=i.city)!=null&&u.location?(r(),c("section",Bt,[e("div",qt,[e("div",Vt,[e("h2",Gt,x($.value),1)]),e("div",Ut,[e("div",Wt,[w(pt,{lng:(U=(z=i.city)==null?void 0:z.location)==null?void 0:U.lng,lat:(K=(W=i.city)==null?void 0:W.location)==null?void 0:K.lat,overlays:j.value,"object-fit":"fill",clickable:!1},null,8,["lng","lat","overlays"]),e("button",{class:"absolute bottom-0 left-1/2 box-border translate-x-[-50%] translate-y-[-50%] rounded-full border-[0.5px] border-[#e9e9e9] bg-white px-[20px] py-2 text-[16px] font-normal leading-[125%] text-black",onClick:o[0]||(o[0]=l=>n(null))},x(p.value),1),w(Ft,{open:s.value,"onUpdate:open":o[1]||(o[1]=l=>s.value=l),center:q.value,zoom:12,markers:E.value,spots:f.value,transportation:A.value,"initial-focus-id":v.value},null,8,["open","center","markers","spots","transportation","initial-focus-id"])]),e("div",Kt,[e("div",Yt,[m.value.length>0?(r(),c("div",Ht,[e("div",Zt,[e("div",Jt,x(P(h)("CITY_SECTION_PLANNING_ACCESS")),1),e("ul",Qt,[(r(!0),c(T,null,O(m.value,(l,N)=>(r(),c("li",{key:N},[e("a",{href:"#",class:"flex flex-row items-center gap-[15px] p-0 text-[18px] font-normal leading-[22px] text-[#222] no-underline",onClick:R(xe=>a(l),["prevent"])},[e("i",{class:B(l==null?void 0:l.icon)},null,2),F(" "+x(l==null?void 0:l.label),1)],8,Xt)]))),128))])])])):k("",!0),_.value.length>0?(r(),c("div",te,[e("div",ee,[e("div",oe,x(P(h)("CITY_SECTION_SNS",{s:(Y=i.city)==null?void 0:Y.name})),1),e("ul",ne,[(r(!0),c(T,null,O(_.value,(l,N)=>(r(),c("li",{key:N},[e("a",{href:l==null?void 0:l.url,target:"_blank",rel:"noopener noreferrer",class:"flex flex-row items-center gap-[15px] p-0 text-[18px] font-normal leading-[22px] text-[#222] no-underline"},[e("i",{class:B([l==null?void 0:l.icon,"color-[#757575]"])}
8,null,2),F(" "+x(l==null?void 0:l.label),1)],8,le)]))),128))])])])):k("",!0)]),y.value.length>0?(r(),c("div",se,[e("div",ae,[e("div",re,[e("div",ie,[e("div",ce,x(P(h)("CITY_SECTION_PLANNING_REFERENCES")),1),e("ul",pe,[(r(!0),c(T,null,O(y.value,(l,N)=>(r(),c("li",{key:N},[e("a",{href:l==null?void 0:l.url,target:"_blank",rel:"noopener noreferrer",class:"flex flex-row items-center gap-[15px] p-0 text-[18px] font-normal leading-[22px] text-[#222] no-underline"},[e("img",{src:l==null?void 0:l.img,class:"h-[30px] w-[30px] object-contain",alt:(l==null?void 0:l.title)||"Reference"},null,8,ue),e("div",null,[e("div",null,[F(x(l==null?void 0:l.title)+" ",1),o[2]||(o[2]=e("i",{class:"fal fa-fw fa-external-link text-[12px]"},null,-1))]),e("div",fe,x(l==null?void 0:l.subtitle),1)])],8,de)]))),128))])])])])])):k("",!0)])])])])):k("",!0)}}});export{Ie as default};
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.