1import{_ as O}from"./Title.f09bbed1.js";import{u as X,_ as Y}from"./useHeadI18n.5d4af5c6.js";import{a as Z,d as ee,u as te,a9 as ae,a6 as oe,r as k,b as p,w as V,c as se,aa as le,o as ne,ab as ie,f as re,h as l,i as n,j as y,k as e,l as f,V as Q,J as b,K as q,n as L,m as $,p as R,t as ue,a4 as G,A as j,W as ce,C as t,U as S,F as T,ac as _e}from"./entry.f3ebf3ef.js";import{_ as de}from"./Loader.5f498a68.js";import{_ as pe}from"./WhiteBook.5ad89444.js";import{_ as ge}from"./NewsletterCallToActionAlt.b285527f.js";import{_ as me}from"./Pagination.415c56d3.js";import"./WhiteBookCover.99070dff.js";import"./ImagePixelator.2f2b7272.js";import"./useCardHover.5a0be0b9.js";const ke={class:"page books-page"},ye={class:"page__tags",pos:"row"},fe={key:0},ve={class:"filters__options"},he={class:"grid books-page__list"},be={key:0,class:"books-page__call-to-action"},Se={__name:"[page]",async setup($e){var D;let o,v;const{locale:i}=Z(),I=ee(),s=te();ae();const x=oe(),C=k(!1),r=k(12),B=p(()=>s.query.industry),z=([o,v]=V(()=>R(`books-index-industries-${i.value}-${s.params.page||1}`,{query:` 2 query ArticlesIndexIndustriesQuery($locale: SiteLocale!) { 3 industries: allIndustries(orderBy: title_ASC, locale: $locale, fallbackLocales: en) { 4 id 5 slug 6 name 7 8 books: _allReferencingWhiteBooksMeta(through: {fields: {anyIn: whiteBook_industries}}) { 9 count 10 } 11 } 12 } 13 `,variables:{locale:i.value}})),o=await o,v(),o),F=p(()=>(z.value.industries||[]).filter(_=>_.books.count>0)),g=p(()=>{const _=F.value.find(M=>M.slug===B.value);return _||null}),A=p(()=>g.value?[g.value.id]:[]),u=([o,v]=V(()=>R(`books-index-${i.value}`,{query:` 14 query BooksIndexPostQuery($locale: SiteLocale!, $paginationCount: IntType!, $skip: IntType!, $industryIds: [ItemId]) { 15 page: whiteBooksIndex(locale: $locale, fallbackLocales: en) { 16 seo: _seoMetaTags { 17 ...seoMetaTagsFields 18 } 19 20 title 21 introduction 22 23 image { 24 responsiveImage(imgixParams: { auto: format, w: 2560 }) { 25 ...imageFields 26 } 27 focalPoint { 28 x 29 y 30 } 31 } 32 33 ctaTitle 34 ctaSubtitle 35 } 36 37 books: allWhiteBooks(locale: $locale, fallbackLocales: en, orderBy: _firstPublishedAt_DESC, first: $paginationCount, skip: $skip, filter: { industries: { anyIn: $industryIds } }) { 38 ...whiteBookCardFields 39 } 40 41 booksMetadata: _allWhiteBooksMeta(locale: $locale, filter: { industries: { anyIn: $industryIds } }) { 42 count 43 } 44 } 45 ${ue} 46 ${G} 47 ${j} 48 `,variables:{locale:i.value,paginationCount:r.value,skip:((s.params.page||1)-1)*r.value,industryIds:A.value}})),o=await o,v(),o);if(!((D=u.value)!=null&&D.page)||u.value.books&&u.value.books.length===0&&s.params.page)throw se({statusCode:404,statusMessage:`Page Not Found - Books index - Locale: ${i.value} - Page: ${s.params.page}`,fatal:!0});const c=p(()=>u.value.page),h=k(u.value.books),W=k(u.value.booksMetadata.count);X(c.value.seo),le([g],async(_,M,P)=>{let m=!1;P(()=>m=!0),C.value=!0;try{const d=await _e({query:` 49 query BooksPostQuery($locale: SiteLocale!, $paginationCount: IntType!, $industryIds: [ItemId]) { 50 books: allWhiteBooks(locale: $locale, fallbackLocales: en, orderBy: _firstPublishedAt_DESC, first: $paginationCount, filter: { industries: { anyIn: $industryIds } }) { 51 ...whiteBookCardFields 52 } 53 54 booksMetadata: _allWhiteBooksMeta(locale: $locale, filter: { industries: { anyIn: $industryIds } }) { 55 count 56 } 57 } 58 ${j} 59 ${G} 60 `,variables:{locale:i.value,paginationCount:r.value,industryIds:A.value}});if(m)return;h.value=d.value.books||[],W.value=d.value.booksMetadata.count}catch(d){console.log(d)}finally{C.value=!1}});const H=p(()=>g.value?`?industry=${g.value.slug}`:""),w=k(null);return ne(()=>{w.value&&ie(w.value,"filters--active")}),(_,M)=>{const P=re("router-link"),m=O,d=Y,E=ce,J=de,N=pe,K=ge,U=me;return t(),l("main",ke,[n(d,{image:e(c).image},{default:y(()=>[n(m,{title:e(c).title,introduction:e(c).introduction,dark:"",tag:"h1"},{tags:y(()=>[f("div",ye,[n(P,{to:e(I)("/insights"),class:"tag tag--hero"},{default:y(()=>[S(T(e(x).breadcrumbInsights),1)]),_:1},8,["to"])])]),_:1},8,["title","introduction"])]),_:1},8,["image"]),e(F).length>0?(t(),l("section",fe,[n(m,{title:e(x).breadcrumbWhitepapers},null,8,["title"]),f("div",{class:"filters",ref_key:"filters",ref:w}
60,[f("nav",ve,[n(E,{to:e(I)("/insights/books/page/1"),class:Q(["filters__option",{"filters__option--active":!e(B)}]),colors:["#000E31","#0858CF","#00C2FF"]},{default:y(()=>[S(T(e(x).insightsFilterAllIndustries),1)]),_:1},8,["to","class"]),(t(!0),l(b,null,q(e(F),a=>(t(),$(E,{key:a.id,to:`${e(I)("/insights/books/page/1")}?industry=${a.slug}`,class:Q(["filters__option",{"filters__option--active":a.slug===e(B)}]),colors:["#000E31","#0858CF","#00C2FF"]},{default:y(()=>[S(T(a.name),1)]),_:2},1032,["to","class"]))),128))])],512)])):L("",!0),f("section",null,[e(C)?(t(),$(J,{key:0})):e(h).length>0?(t(),l(b,{key:1},[f("ul",he,[(t(!0),l(b,null,q(e(h).slice(0,e(r)/2),a=>(t(),$(N,{key:a.id,book:a},null,8,["book"]))),128)),e(s).params.page==="1"?(t(),l("li",be,[n(K,{title:e(c).ctaTitle,subtitle:e(c).ctaSubtitle},null,8,["title","subtitle"])])):L("",!0),(t(!0),l(b,null,q(e(h).slice(e(r)/2),a=>(t(),$(N,{key:a.id,book:a},null,8,["book"]))),128))]),n(U,{max:Math.ceil(e(W)/e(r)),current:Number(e(s).params.page)||1,route:"/insights/books/page/:page",query:e(H)},null,8,["max","current","query"])],64)):L("",!0)])])}}};export{Se 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.