PageSourceSearch

https://www.cruise.co.uk/theon/_nuxt/BaOnx2wM.js

js cruise.co.uk collected 2026-10-02 10:28:42 UTC 2,322 bytes, 1 lines download raw bytes

1import{e as C,a as d,d as s,f as u,M as h,i as n,F as v,r as x,y,t as w,b as p,a0 as $,o as c,W as f,ad as g}from"./DPSUJBQt.js";const S={class:"bg-theme-grey-5 py-8"},B={class:"wrapper wrapper--flush"},F={class:"grid mb-2 bg-white p-8"},A={class:"w-full mb-4 mt-8"},E={class:"w-full grid grid-cols-2 gap-4"},L={key:0,class:"w-full mt-8 items-center justify-center flex"},M={key:2,class:"text-lg text-center text-theme-primary"},V=C({__name:"clear-cache",setup(N){const _=[{key:"consultants",label:"Consultants"},{key:"cruiseLines",label:"Cruise Lines"},{key:"destinations",label:"Destinations"},{key:"ports",label:"Ports"},{key:"ships",label:"Ships"}],i=f(""),l=f(null);function r(t){i.value=t}async function b(){l.value="all",r("Clearing all cache entries...");try{await $fetch("/api/cache/clear",{method:"POST",body:{all:!0}}),r("All cache entries cleared.")}catch(t){const e=t instanceof Error?t.message:"Unknown error";r(`Failed to clear cache: ${e}`)}finally{l.value=null}}async function k(t,e){const o=`catalog__${t}`;l.value=t,r(`Clearing ${e} cache...`);try{await $fetch("/api/cache/clear",{method:"POST",body:{key:o}}),r(`${e} cache cleared.`)}catch(a){const m=a instanceof Error?a.message:"Unknown error";r(`Failed to clear ${e} cache: ${m}`)}finally{l.value=null}}return(t,e)=>{const o=$;return c(),d("div",S,[s("div",B,[s("div",F,[s("section",null,[e[0]||(e[0]=s("h1",{class:"font-theme-bold text-theme-primary-dark text-2xl leading-6"}," Clear Cache ",-1)),e[1]||(e[1]=s("p",{class:"text-lg"}," Select a cache to clear or clear everything. ",-1)),s("div",A,[u(o,{class:"w-full",label:n(l)==="all"?"Clearing...":"Clear All Caches",disabled:n(l)!==null,onClick:h(b,["prevent"])},null,8,["label","disabled"])]),e[2]||(e[2]=s("hr",{class:"border-theme-grey-4 my-8"},null,-1)),s("div",E,[(c(),d(v,null,x(_,a=>u(o,{key:a.key,label:n(l)===a.key?`Clearing ${a.label}...`:`Clear ${a.label}`,disabled:n(l)!==null,onClick:h(m=>k(a.key,a.label),["prevent"])},null,8,["label","disabled","onClick"])),64))]),n(i)?(c(),d("div",L,[n(i).includes("failed")?(c(),y(g,{key:0,alias:"state-error",class:"mr-2 text-theme-primary",modifiers:["large"]})):(c(),y(g,{key:1,alias:"state-success",class:"mr-2 text-theme-primary",modifiers:["large"]})),n(i)?(c(),d("p",M,w(n(i)),1)):p("",!0)])):p("",!0)])])])])}}});export{V 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.