1import{d as ee,r as j,ad as te,I as oe,l as ie,x as u,Q as se,R as ae,U as re,v as ne,u as ce,c as le,W as ue,z as v,A as pe,Y as ve,G as de,f as d,g as y,j as n,t as m,$ as ye,B as f,C as me,D as fe,a0 as ge,a1 as he,a3 as _e}from"#entry";import{u as we}from"./CW3d3qSB.js";import{u as De}from"./C_hXBSOc.js";import{u as Ce}from"./ChWrsqPF.js";const Pe=()=>{const{get:x}=we();return{getPolicy:async(p,i)=>{const $=i?`/api/v1/contents/policies/${p}/${i}`:`/api/v1/contents/policies/${p}`;return(await x($)).data.data},getPolicyHistory:async p=>(await x(`/api/v1/contents/policies/${p}/history`)).data.data}},Te={class:"pageHead st01"},$e={class:"localInfo"},Se={class:"em01 optima"},be={id:"contents"},xe={class:"contArea ct02 nopt"},Ee={key:0,class:"history"},Le=["name","id"],He=["value"],Oe={key:1,class:"loading"},ke={key:2,class:"error"},Ae=["innerHTML"],Me={key:4,class:"no-content"},We=ee({__name:"[type]",async setup(x){let c,w,p;p=([c,w]=j(()=>te(()=>import("./BSxvvW6s.js"),[],import.meta.url)),c=await c,w(),c).default;const{t:i}=De(),{getPolicy:$,getPolicyHistory:A}=Pe(),N=oe(),h=ne(),_=ie(),r=u(()=>_.params.type),q=u(()=>_.params.lang),E=u(()=>{switch(r.value){case"terms-of-service":return"terms";case"privacy-policy":return"privacy";case"cctv-operation-policy":return"cctv";default:return"terms"}}),M=o=>{const e=q.value==="kor";switch(o){case"terms-of-service":return e?"ì´ì©ì½ê´":"Terms of Service";case"privacy-policy":return e?"ê°ì¸ì ë³´ì²ë¦¬ë°©ì¹¨":"Privacy policy";case"cctv-operation-policy":return i("support.text.policy_cctv_text");default:return e?"ì´ì©ì½ê´":"Terms of Service"}},D=o=>o.replace(/-/g,".");se.registerPlugin(ae);const F=o=>{const e=" | "+(h.public.siteTitle||"The Westin Seoul Parnas");return{"terms-of-service":{title:i("support.seo.termsOfService_title")+e,description:i("support.seo.termsOfService_description")},"privacy-policy":{title:i("support.seo.privacyPolicy_title")+e,description:i("support.seo.privacyPolicy_description")},"cctv-operation-policy":{title:i("support.seo.cctvOperationPolicy_title")+e,description:i("support.seo.cctvOperationPolicy_description")}}[o]||{title:"",description:""}},C=u(()=>F(r.value));if(re({title:C.value.title,description:C.value.description,ogImage:u(()=>`${h.public.publicUrl}/images/og-image.png`),ogSiteName:"The Westin Seoul Parnas",ogTitle:C.value.title,ogDescription:C.value.description,ogUrl:u(()=>`${h.public.publicUrl}${_.path}`),twitterCard:"summary",twitterSite:u(()=>`${h.public.publicUrl}${_.path}`),twitterTitle:C.value.title,twitterImage:u(()=>`${h.public.publicUrl}/images/og-image.png`)}),ce({link:[{rel:"canonical",href:u(()=>`${h.public.publicUrl}${_.path}`)}]}),!["terms-of-service","privacy-policy","cctv-operation-policy"].includes(r.value))throw le({statusCode:404,statusMessage:"Policy type not found"});const{data:U,pending:z,error:L}=([c,w]=j(async()=>ue(`policy-${r.value}`,async()=>{try{const[o,e]=await Promise.all([$(r.value),A(r.value)]);return{policy:o,versions:e}}catch(o){throw console.error("Error loading policy data:",o),o}})),c=await c,w(),c),H=v(!1),P=v(null),T=v(U.value?.policy?.content||""),S=v(U.value?.versions||[]),b=v(S.value.length>0&&S.value[0].uid||""),V=v(0),G=v(0),K=v(!1);function O(){V.value=window.innerWidth,G.value=window.innerHeight,K.value=V.value<1024}const Q=async o=>{try{H.value=!0,P.value=null;const e=await $(r.value,o);T.value=e.content||""}catch(e){P.value=e.message||"Failed to load policy data",console.error("Error loading policy:",e)}finally{H.value=!1}},Y=()=>{b.value&&Q(b.value)};let g;const I=()=>{if(p){const o=document.querySelector(`.${E.value} .history select.option01`);if(o&&!o.classList.contains("choices-initialized")){g=new p(o,{shouldSort:!1,itemSelectText:"",searchEnabled:!1,classNames:{containerOuter:["choices","option01"]}});const e=o.closest(".choices");e&&e.classList.add("option01"),o.classList.add("choices-initialized")}}},J=()=>{try{const o=document.querySelector(`.${E.value} .history select.option01`);g.destroy(),o.classList.remove("choices-initialized")}catch(o){console.error(o)}};return pe(async()=>
1{if(O(),window.addEventListener("resize",O),!T.value&&!z.value&&!L.value&&!P.value){const a=`/${_.params.lang}`;N.push(a)}await ve(),I();const e=await Ce().getPreview("policy");if(!e?.value)return;T.value=e?.value?.policyLang.content||"";const s=document.getElementById(`${r.value}History`);if(s&&e.value.uid){const t=Array.from(s.options).find(a=>a.value===e.value.uid);if(t&&e.value.effectiveDate){const a=D(e.value.effectiveDate);t.textContent=a}}if(!s)return;const k=[...Array.from(s.options).map((t,a)=>{const l=t.textContent||"";return a===0?l.replace(i("support.label.current_ver"),"").replace("(","").replace(")","").trim():l})];if(e.value.effectiveDate){const t=D(e.value.effectiveDate);k.includes(t)||k.push(t)}const R=k.filter(t=>t.match(/\d{4}\.\d{2}\.\d{2}/)).map(t=>({dateString:t,dateObject:new Date(t.replace(/\./g,"-"))})).sort((t,a)=>a.dateObject.getTime()-t.dateObject.getTime()).map(t=>t.dateString);if(R.length===0)return;const X=Array.from(s.options).map(t=>({value:t.value,text:t.textContent}));s.innerHTML="",R.forEach((t,a)=>{const l=document.createElement("option"),W=X.find(Z=>Z.text.replace("íì¬","").replace("(","").replace(")","").trim()===t);l.value=W?W.value:a===0?"current":t,a===0?l.textContent=i("support.label.current_ver")+`(${t})`:l.textContent=t,s.appendChild(l)}),J(),I(),setTimeout(()=>{if(e.value.effectiveDate){const t=D(e.value.effectiveDate),a=Array.from(s.options).find(l=>l.textContent.includes(t));a&&(s.value=a.value,g&&g.setChoiceByValue(a.value))}},200)}),de(()=>{if(window.removeEventListener("resize",O),g)try{g.destroy(),g=null}catch(o){console.error("Error destroying Choices instance:",o)}}),(o,e)=>(y(),d("main",{id:"container",class:_e(["policy views",E.value])},[n("div",Te,[n("ul",$e,[e[1]||(e[1]=n("li",null,[n("span",null,"HOME")],-1)),n("li",null,m(M(r.value)),1)]),n("h2",Se,m(M(r.value)),1)]),n("div",be,[n("div",xe,[S.value.length>0?(y(),d("dl",Ee,[n("dt",null,m(f(i)("support.label.history")),1),n("dd",null,[me(n("select",{name:`${r.value}History`,id:`${r.value}History`,class:"option01","onUpdate:modelValue":e[0]||(e[0]=s=>b.value=s),onChange:Y},[(y(!0),d(ge,null,he(S.value,(s,B)=>(y(),d("option",{key:s.uid,value:s.uid},m(B===0?f(i)("support.label.current_ver")+`(${D(s.effectiveDate)})`:D(s.effectiveDate)),9,He))),128))],40,Le),[[fe,b.value]])])])):ye("",!0),f(z)||H.value?(y(),d("div",Oe,m(f(i)("common.loading")),1)):f(L)||P.value?(y(),d("div",ke,m(f(i)("common.error"))+": "+m(f(L)||P.value),1)):T.value?(y(),d("section",{key:3,class:"ruleCont fr-view",innerHTML:T.value},null,8,Ae)):(y(),d("div",Me,m(f(i)(`pages.policies.${r.value}.noContent`)),1))])])],2))}});export{We 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.