PageSourceSearch

https://visitjeju.net/_nuxt/CT972WJO.js

js visitjeju.net collected 2026-09-24 10:03:14 UTC 12,676 bytes, 1 lines download raw bytes

1import{_ as T,a as K}from"./DiJLFDDe.js";import N from"./BkdGuecj.js";import F from"./BZmDYlp_.js";import{_ as A,a4 as C,c,o as d,x as g,e as i,j as h,y as m,t as u,F as _,f as k,n as P,l as L,k as B,v as D,w as p,i as E,an as V,z as U,u as I,p as O,O as j,q as R}from"./2fJvMp9r.js";import{u as q}from"./DG2Q-0xs.js";import z from"./_0sYFjOx.js";import{t as J}from"./CtVU4XJQ.js";import G from"./DqhG14hA.js";import H from"./Cbroc-Ng.js";import"./DijW1qqG.js";import"./DEw16_lV.js";import"./32sRaJxn.js";import"./DLEpPkuL.js";const W={async setup(){var l;const{$fetcher:t,$retrieve:e,$i18n:a}=U(),n=I(),r=O();await j(()=>t([{api:"servicemenumng/getNavigation",retrieveKey:"navigationData",query:{menuid:"{$.query.menuId}"}}]),"$d5ETwkLtl4");let s={};return e("serviceMenuData").loaded&&(s=e("serviceMenuData").data.item),R({titleTemplate:"Visit Jeju : "+(((l=s==null?void 0:s.uppermenuid)==null?void 0:l.label)??"")+" > NOWDA"+((s==null?void 0:s.titleseo)??"")}),{siteStore:n,sessionServiceStore:r}},components:{location:z,microTop:H,BenefitView:G},name:"TouristList",data:function(){return{menuData:this.retrieve("serviceMenuData").data.item,touristSpots:J,nowdaStore:null,selectedLevel:1,searchKeyword:"",selectedCategory:"전체",categories:["전체","관광지","체험/레포츠","식음료","쇼핑/소품샵"],currentPage:1,pageSize:12,firstPageNo:1,_center:null,showModal:!1,modalCode:null,isMapActive:!1,_originalTouristSpots:null,lastFocusedElement:null}},computed:{userLevel(){var t,e;return((e=(t=this.nowdaStore)==null?void 0:t.user)==null?void 0:e.lvl)||1},filteredSpots(){let t=this.selectedCategory==="전체"?this.touristSpots:this.touristSpots.filter(e=>e.category===this.selectedCategory);if(this.searchKeyword.trim()!==""){const e=this.searchKeyword.trim().toLowerCase();t=t.filter(a=>a.name.toLowerCase().includes(e))}return t},pagedSpots(){const t=(this.currentPage-1)*this.pageSize,e=t+this.pageSize;return this.filteredSpots.slice(t,e)},totalPages(){return Math.ceil(this.filteredSpots.length/this.pageSize)},lastPageNo(){return this.totalPages}},methods:{openSpotModal(t,e){this.lastFocusedElement=(e==null?void 0:e.currentTarget)||document.activeElement,this.modalCode=t.code,this.showModal=!0,this.$nextTick(()=>{this.$refs.benefitView&&this.$refs.benefitView.focusFirst()})},closeModal(){this.showModal=!1,this.modalCode=null,this.$nextTick(()=>{this.lastFocusedElement&&(this.lastFocusedElement.focus(),this.lastFocusedElement=null)})},handlePopState(t){this.showModal&&this.closeModal()},currentBenefit(t){return this.selectedLevel?t.levels.find(e=>e.level===Number(this.selectedLevel)):null},syncSelectedLevelFromSession(){const t=q(this.$pinia);this.nowdaStore=t,this.selectedLevel=Number(this.userLevel)||1},searchSpots(){this.currentPage=1},categoryTabIndex(t,e){return this.selectedCategory===t||!this.categories.includes(this.selectedCategory)&&e===0?0:-1},onCategoryKeydown(t,e){const a=this.categories.length-1;let n=-1;if(t.key==="ArrowRight"?n=e===a?0:e+1:t.key==="ArrowLeft"?n=e===0?a:e-1:t.key==="Home"?n=0:t.key==="End"&&(n=a),n<0)return;t.preventDefault();const r=t.currentTarget.parentElement,s=this.categories[n];this.selectCategory(s),this.$nextTick(()=>{const l=r?r.querySelectorAll('[role="tab"]'):null;l&&l[n]&&l[n].focus&&l[n].focus()})},selectCategory(t){if(this.selectedCategory===t)return;this.selectedCategory=t,this.currentPage=1;const e=new URLSearchParams(window.location.search);this.selectedCategory==="전체"||this.selectedCategory===""?e.delete("category"):e.set("category",this.selectedCategory),e.delete("page");const a=window.location.pathname+(e.toString()?"?"+e.toString():"");window.history.pushState({},"",a)},changePage(t){this.currentPage=t;const e=new URLSearchParams(window.location.search);t===1?e.delete("page"):e.set("page",t),this.selectedCategory==="전체"?e.delete("category"):e.set("category",this.selectedCategory);const a=window.location.pathname+(e.toString()?"?"+e.toString():"");window.history.pushState({},"",a),this.$nextTick(()=>{const n=document.querySelector("h4");n&&n.scrollIntoView({behavior:"smooth",block:"start"})})},updateStateFromUrl(){const t=new URLSearchParams(window.location.search),e=t.get("category");e&&this.categories.includes(e)?this.selectedCategory=e:this.selectedCategory="전체";const a=t.get("page");a?this.currentPage=parseInt(a,10):this.currentPage=1},_resetToInitialState(){this._initialState&&(this.selectedLevel=Number(this.userLevel)||1,this.searchKeyword=this._initialState.searchKeyword,this.selectedCategory=this._initialState.selectedCategory,this.currentPage=this._initialState.currentPage)},_getCurrentPosition(){return new Promise((t,e)=>{if(typeof window>"u"||!("geolocation"in navigator))return e(new Error("이 브라우저에서는 위치 정보를 가져올 수 없어요."));const a={enableHighAccuracy:!0,timeout:1e4,maximumAge:0};navigator.geolocation.getCurrentPosition(n=>{t({lat:n.coords.latitude,lng:n.coords.longitude})},n=>{console.error("Geolocation Error Detail:",n),e(n)},a)})},formatKm(t){const e=Number(t);return isFinite(e)?(Math.round(e*10)/10).toFixed(1):""},_distanceKm(t,e,a,n){const s=b=>
1b*Math.PI/180,l=s(a-t),y=s(n-e),w=Math.sin(l/2)*Math.sin(l/2)+Math.cos(s(t))*Math.cos(s(a))*Math.sin(y/2)*Math.sin(y/2);return 6371*(2*Math.atan2(Math.sqrt(w),Math.sqrt(1-w)))},_sortSpotsByDistanceFrom(t,e){const a=this.touristSpots;if(!Array.isArray(a))return;const n=a.map(r=>{const l=typeof r.lat=="number"&&typeof r.lng=="number"?this._distanceKm(t,e,r.lat,r.lng):1/0;return{...r,_distanceKm:l}}).sort((r,s)=>r._distanceKm-s._distanceKm);this.touristSpots=n},async handleSortByLocation(){if(this.isMapActive){this._resetLocationSort(),this.isMapActive=!1;return}this.isMapActive=!0;try{const{lat:t,lng:e}=await this._getCurrentPosition(),r=this._distanceKm(33.388299,126.560507,t,e);isFinite(r)&&r>50?(this.showToast("제주도 외 지역에 계시므로 제주공항 기준으로 정렬합니다."),this._sortSpotsByDistanceFrom(33.507465,126.493416)):(this._sortSpotsByDistanceFrom(t,e),this.showToast("현재 위치와 가까운 순으로 정렬되었습니다."))}catch(t){let e="위치 정보를 가져올 수 없습니다.";t.code===1?e="브라우저의 위치 권한이 거부되었습니다. 주소창 왼쪽 아이콘을 눌러 권한을 허용해 주세요.":t.code===2?e="현재 위치를 확인할 수 없습니다. GPS 신호를 확인해 주세요.":t.code===3&&(e="위치 정보 응답 시간이 초과되었습니다."),this.showToast(e+" 제주공항 기준으로 정렬합니다."),this._sortSpotsByDistanceFrom(33.507465,126.493416),this.isMapActive=!1}},_resetLocationSort(){this._originalTouristSpots&&(this.touristSpots=JSON.parse(JSON.stringify(this._originalTouristSpots))),this.isMapActive=!1,this.currentPage=1},showToast(t){alert(t)}},mounted:function(){const t=new URLSearchParams(window.location.search),e=t.get("category");e&&this.categories.includes(e)&&(this.selectedCategory=e);const a=t.get("page");a&&(this.currentPage=parseInt(a,10)),this.updateStateFromUrl(),this.syncSelectedLevelFromSession(),window.addEventListener("popstate",this.updateStateFromUrl)},beforeDestroy(){window.removeEventListener("popstate",this.updateStateFromUrl)},created(){this.filteredSpots=this.touristSpots,this._originalTouristSpots=JSON.parse(JSON.stringify(this.touristSpots)),this.syncSelectedLevelFromSession()},head:function(){return this.$store.state.site.lang,{titleTemplate:"Visit Jeju : 멤버십 혜택 - 제주 NFT 디지털 관광증 나우다(NOWDA)",title:"멤버십 혜택 - 제주 NFT 디지털 관광증 나우다(NOWDA)",meta:[{hid:"og:title",property:"og:title",content:"멤버십 혜택 - 제주 NFT 디지털 관광증 나우다(NOWDA)"},{hid:"og:url",property:"og:url",content:"https://www.visitjeju.net/kr/nowda/benefit"},{hid:"og:description",property:"og:description",content:"맴버십 혜택으로 다양한 제휴 관광사업체에서 할인 및 다양한 서비스를 받을 수 있습니다"},{hid:"description",name:"description",content:"맴버십 혜택으로 다양한 제휴 관광사업체에서 할인 및 다양한 서비스를 받을 수 있습니다"},{hid:"og:image",property:"og:image",content:"https://www.visitjeju.net/image/nowda/og_nowda.png"},{hid:"og:image:secure_url",property:"og:image:secure_url",content:"https://www.visitjeju.net/image/nowda/og_nowda.png"},{hid:"og:image:width",property:"og:image:width",content:"1200"},{hid:"og:image:height",property:"og:image:height",content:"600"}]}}},$={id:"content",tabindex:"-1"},x={key:0},Q={class:"tag-box"},X={class:"container",role:"tablist","aria-label":"카테고리 필터"},Y=["aria-selected","tabindex","title","onClick","onKeydown"],Z={class:"filter_nowda"},ee={class:"container"},te=["aria-pressed"],se={class:"nowda_benefit"},oe={class:"container"},ie={class:"box"},ae={key:0,class:"item"},ne=["href","onClick"],re={class:"image"},le=["src","alt"],ce={key:0,class:"distance"},de={key:1,class:"flex-list"},ue={class:"benefit-txt"},ge={class:"pagination"},he=["disabled"],me=["disabled"],pe={class:"modal-content",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title"};function fe(t,e,a,n,r,s){const l=T,y=N,w=C("microTop"),v=F,b=K,M=C("BenefitView");return d(),c(_,null,[g(l,{subClass:"on"}),g(y,{class:"nowda"}),i("div",$,[g(w,{onmenu:"benefit"}),g(v,{class:"nowda"}),t.touristSpots?(d(),c("h4",x,[e[10]||(e[10]=m(" 총 ",-1)),i("strong",null,u(t.touristSpots.length)+"개",1),e[11]||(e[11]=m("의 ",-1)),e[12]||(e[12]=i("strong",null,"관광사업체",-1)),e[13]||(e[13]=m("에서 혜택을 제공하고 있습니다 ",-1))])):h("",!0),i("section",Q,[i("div",X,[(d(!0),c(_,null,k(t.categories,(o,f)=>(d(),c("button",{key:o,role:"tab",class:P({on:t.selectedCategory===o}),"aria-selected":t.selectedCategory===o,tabindex:s.categoryTabIndex(o,f),title:t.selectedCategory===o?o+" 카테고리 선택됨":o+" 카테고리 선택",onClick:S=>s.selectCategory(o),onKeydown:S=>s.onCategoryKeydown(S,f)}," #"+u(o),43,Y))),128))])]),i("section",Z,[i("div",ee,[i("button",{class:P(["location",{active:t.isMapActive}]),"aria-pressed":t.isMapActive?"true":"false",onClick:e[0]||(e[0]=(...o)=>s.handleSortByLocation&&s.handleSortByLocation(...o))},"위치기준정렬",10,te),i("div",{class:"list-search",onKeyup:e[3]||(e[3]=L((...o)=>s.searchSpots&&s.searchSpots(...o),["enter"]))},[e[14]||(e[14]=i("label",{for:"searchKeyword",class:"sr-only"},"관광지 검색",-1)),B(i("input",{id:"searchKeyword",type:"text","onUpdate:modelValue":e[1]||(e[1]=o=>t.searchKeyword=o)},null,512),[[D,t.searchKeyword]]),i("button",{onClick:e[2]||(e[2]=(...o)=>t.search&&t.search(...o))},"검색")],32)])]),i("section",se,[i("div",oe,[i("div",ie,[(d(!0),c(_,null,k(s.pagedSpots,(o,f)=>(d(),c(_,{key:f},[f<12?(d(),c("div",ae,[i("a",{href:"/kr/nowda/benefit-view?code="+o.code,onClick:p(S=>s.openSpotModal(o,S),["prevent"]),target:"_blank",title:"새창열림"},[i("p",re,[i("img",{src:o.thumbnail,alt:o.name+" 썸네일 이미지"},null,8,le)]),isFinite(o._distanceKm)?(d(),c("i",ce,u(s.formatKm(o._distanceKm))+" km",1)):h("",!0),i("strong",null,u(o.name),1),i("span",null,u(o.description),1),s.currentBenefit(o)?(d(),c("div",de,[i("div",ue,u(s.currentBenefit(o).membershipBenefit),1)])):h("",!0)],8,ne)])):h("",!0)],64))),128))]),i("div",ge,[t.currentPage>1?(d(),c("button",{key:0,class:"first",onClick:e[4]||(e[4]=p(o=>s.changePage(1),["prevent"]))},u(t.$i("common.paging.first")),1)):h("",!0),i("button",{class:"prev",onClick:e[5]||(e[5]=p(o=>s.changePage(t.currentPage-1),["prevent"])),disabled:t.currentPage<=1},u(t.$i("common.paging.prev")),9,he),i("span",null,[e[15]||(e[15]=m(" 현재 ",-1)),i("strong",null,u(t.currentPage),1),e[16]||(e[16]=m(" 페이지를 보고 있으며, 전체 ",-1)),e[17]||(e[17]=i("i",null,"/",-1)),i("u",null,u(s.lastPageNo),1),e[18]||(e[18]=m(" 페이지가 있습니다 ",-1))]),i("button",{class:"next",onClick:e[6]||(e[6]=p(o=>s.changePage(t.currentPage+1),["prevent"])),disabled:t.currentPage>=s.lastPageNo},u(t.$i("common.paging.next")),9,me),t.currentPage<s.lastPageNo?(d(),c("button",{key:1,class:"last",onClick:e[7]||(e[7]=p(o=>s.changePage(s.lastPageNo),["prevent"]))},u(t.$i("common.paging.last")),1)):h("",!0)])])])]),g(b),g(V,{name:"fade"},{default:E(()=>[t.showModal?(d(),c("div",{key:0,class:"modal-backdrop",onClick:e[8]||(e[8]=p((...o)=>s.closeModal&&s.closeModal(...o),["self"])),onKeydown:e[9]||(e[9]=L((...o)=>s.closeModal&&s.closeModal(...o),["esc"]))},[i("div",pe,[g(M,{ref:"benefitView",code:t.modalCode,onClose:s.closeModal},null,8,["code","onClose"])])],32)):h("",!0)]),_:1})],64)}const Ne=A(W,[["render",fe],["__scopeId","data-v-b1095547"]]);export{Ne 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.