PageSourceSearch

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

js cruise.co.uk collected 2026-10-02 10:29:04 UTC 5,765 bytes, 4 lines download raw bytes

1import{_ as N}from"./rXtRG7_t.js";import{e as R,E as z,V as H,p as A,H as E,bo as U,q as I,a as o,f as y,i as t,d as a,I as O,t as _,F,r as M,b as d,W as K,k as c,C as W,bp as G,o as l,n as J}from"./DPSUJBQt.js";import{u as Q}from"./C7KdFmIc.js";import{A as P}from"./Wb_EUx55.js";import{u as $}from"./T6l2-Rya.js";import{d as X}from"./LCLLHp-O.js";/* empty css        */import"./lupnmuFY.js";import"./BtpXjmIm.js";import"./BsdszRkl.js";import"./BeiBntBH.js";import"./DvnFwPgt.js";const j=()=>{window.scrollTo(0,0)},Y={class:"bg-theme-grey-5 pt-16 pb-16"},Z={class:"wrapper wrapper--flush"},ee={class:"flex justify-end"},te={key:0,class:"wrapper wrapper--flush my-16"},se={class:"flex items-center justify-between pb-14"},re={class:"font-theme-bold text-t-primary-dark text-2xl mb-4"},ae={key:0},oe=["value"],le={class:"wrapper wrapper--flush my-16"},ie={key:1,class:"wrapper wrapper--flush my-16"},ne={key:2,class:"w-full bg-theme-grey-5 py-16"},ue={class:"wrapper wrapper--flush"},ce={class:"flex justify-center"},de={class:"flex justify-center"},pe={class:"flex bg-white rounded-full p-2"},ge=["onClick"],me={class:"w-6 h-6 text-center text-large font-theme-bold bold"},Me=R({__name:"index",async setup(ve){let p,g;const n=Q(),x=K(""),v=z(),f=H(),k=c(()=>v.query.page?parseInt(v.query.page):1),h=c(()=>v.params.category),V=c(()=>`articles-${h.value}-${k.value}`);[p,g]=A(async()=>$("article-categories",async()=>await n.fetchCategories(),{default:()=>[]})),await p,g(),[p,g]=A(async()=>$(V.value,async()=>{const r=n.getCategoryBySlug(h.value);if(!r)throw console.error("404 Category not found"),H().push("/404"),G({statusCode:404,statusMessage:"Page Not Found"});return await n.fetchArticlesByCategoryId(r.id,k.value),n.articles},{watch:[h,k]})),await p,g(),[p,g]=A(async()=>$("promotional-banners",async()=>(await n.fetchPromotionalBanners(),n.promotionalBanners))),await p,g();const i=c(()=>n.getCategoryBySlug(h.value)),C=c(()=>n.getSortedArticlesByDate),m=c(()=>n.currentPage||1),b=c(()=>n.totalPages||1),q=c(()=>n.categoriesLoaded);E(()=>i.value,r=>{q.value&&!r&&(console.error("404 Category not found"),f.push("/404"))},{immediate:!0}),U(async(r,e,S)=>{r.params.category!==e.params.category&&j(),S()});const u=c(()=>({title:i.value?.seoMetaFields?.title||"",description:i.value?.seoMetaFields?.description||"",keywords:i.value?.seoMetaFields?.keywords||"",robots:i.value?.seoMetaFields?.robots||"",img:i.value?.seoMetaFields?.img||void 0}));I({ogTitle:()=>u.value.title,ogUrl:()=>`https://www.cruise.co.uk${v.path}`,ogDescription:()=>u.value.description,title:()=>u.value.title,description:()=>u.value.description,keywords:()=>u.value.keywords,robots:()=>u.value.robots,ogType:"article"}),u.value?.img?I({ogImage:u.value?.img,twitterImage:u.value?.img}):X("Cruise.takumi",{title:u.value?.title||i.value?.singularHeading+" articles"||"",description:u.value.description});const w=c(()=>{const r=[];for(let e=0;e<C.value.length;e+=3)r.push(C.value.slice(e,e+3));return r}),B=r=>{j(),f.push({path:v.path,query:{page:r}})},T=r=>{j(),f.push({path:`/articles/${r}/`})},L=r=>{r&&r.length>2&&f.push({path:"/articles/search",query:{query:r}})};return(r,e)=>{const S=N,D=W;return l(),o("div",null,[y(S,{slides:t(C),"wrap-around":!0,modifiers:["article"],"has-h1":!1},null,8,["slides"]),a("div",Y,[a("div",Z,[a("div",ee,[y(D,{modelValue:t(x),"onUpdate:modelValue":e[0]||(e[0]=s=>O(x)?x.value=s:null),class:"w-full md:w-1/3",placeholder:"Search Articles",type:"search",alias:"search",onChange:e[1]||(e[1]=s=>L(s.target.value))},null,8,["modelValue"])])])]),t(i)?(l(),o("div",te,[a("div",se,[a("div",null,[a("h1",re,_(t(i).singularHeading)+" articles ",1),t(i).description?(l(),o("div",ae,[(l(!0),o(F,null,M(t(i).description,s=>(l(),o("p",{key:s,class:"text-lg"},_(s),1))),128))])):d("",!0)]),a("div",null,[t(i).childCategories.length?(l(),o("select",{key:0,class:"border border-theme-grey-3 rounded-md px-4 py-2",onChange:e[2]||(e[2]=s=>T(s.target.value))},[e[5]||(e[5]=a("option",{value:""}," All categories ",-1)),(l(!0),o(F,null,M(t(i).childCategories,s=>(l(),o("option",{key:s.slug,value:s.slug},_(s.heading),9,oe))),128))],32)):d("",!0)])]),y(P,{articles:t(w)[0]},null,8,["articles"])])):d("",!0),a("div",le,[y(P,{articles:t(w)[1]},null,8,["articles"])]),t(w)[2]?(l(),o("div",ie,[y(P,{articles:t(w)[2]},null,8,["articles"])])):d("",!0),t(b)>1?(l(),o("div",ne,[a("div",ue,[a("div",ce,[a("div",de,[a("div",pe,[t(m)>1?(l(),o("div",{key:0,class:"cursor-pointer flex items-center justify-center",onClick:e[3]||(e[3]=s=>B(t(m)-1))},[...e[6]||(e[6]=[a("span",{class:"sr-only"},null,-1),a("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[a("path",{"fill-rule":"evenodd",d:`M10.707 3.293a1 1 0 010 1.414L6.414 9H13a1 1 0 010 2H6.414l4.293 4.293a1 1 0 11-1.414 1.414l-6-6a1
2                    1 0 010-1.414l6-6a1 1 0 011.414 0z`,"clip-rule":"evenodd"})],-1)])])):d("",!0),(l(!0),o(F,null,M(t(b),s=>(l(),o("div",{key:s,class:J([{"bg-theme-primary text-white":s===t(m),"cursor-pointer text-gray-500":s!==t(m)},"cursor-pointer flex items-center justify-center p-2 mx-1 rounded-full"]),onClick:ye=>B(s)},[a("span",me,_(s),1)],10,ge))),128)),t(m)<t(b)?(l(),o("div",{key:1,class:"cursor-pointer flex items-center justify-center",onClick:e[4]||(e[4]=s=>B(t(m)+1))},[...e[7]||(e[7]=[a("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[a("path",{"fill-rule":"evenodd",d:`M9.293 16.707a1 1 0 010-1.414L13.586 11H7a1 1 0 010-2h6.586l-4.293-4.293a1 1 0
3                    011.414-1.414l6 6a1 1 0 010 1.414l-6 6a1 1 0
4                    01-1.414 0z`,"clip-rule":"evenodd"})],-1)])])):d("",!0)])])])])])):d("",!0)])}}});
4export{Me 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.