PageSourceSearch

https://npcc-website-staging-w7rp7.ondigitalocean.app/_nuxt/-gc7b-SK.js

js npcc-website-staging-w7rp7.ondigitalocean.app collected 2026-10-03 14:54:54 UTC 4,418 bytes, 1 lines download raw bytes

1import{g as D,h as L,j as U,k as H,l as O,c as o,m as w,a as r,F as h,y as k,z as m,p as a,I as z,r as i,n as C,C as I,K as j,o as n,q as K,t as T,s as P,A as Q,B as G,P as J}from"./B-7z_8_9.js";import{_ as W}from"./ClKQev22.js";import"./GEL_E7FA.js";const X={class:"bg-neutral-20 py-5"},Y={class:"font-dm-sans container"},Z={class:"mb-16 flex w-full flex-col gap-1 rounded-xl bg-white p-1 lg:w-fit lg:flex-row"},ee=["onClick"],te={class:"text-primary-blue"},ae={class:"mb-16 flex w-fit flex-row gap-1 rounded-xl p-1"},se=["onClick"],oe={key:0},ne={key:0,class:"font-dm-sans pb-20"},le={class:"grid grid-cols-1 gap-4 lg:grid-cols-3"},re={class:""},ie=["innerHTML"],ce=["href"],ue=["href"],pe={key:1},ye=D({__name:"index",setup(de){const $=J(),l=L(),y=[{name:"All resources",type:"all"},{name:"Newsroom",type:"newsroom"},{name:"Documents and forms",type:"documents-and-forms"},{name:"Factors and regulations",type:"factors-and-regulations"},{name:"Videos and podcasts",type:"videos-and-podcasts"}],u=i([{name:"2015",toggled:!1},{name:"2006",toggled:!1},{name:"1987",toggled:!1}]),F=async()=>{u.value.forEach(e=>{e.toggled=!0}),await C({path:l.path,query:{type:c.value?.type,scheme:p.value}})},p=I(()=>u.value.filter(e=>e.toggled).map(e=>e.name)),A=i(""),c=i(y[0]),f=i(!1),v=i(!1),d=i(!1),_=i(1),b=i(0),x=i(12),g=i([]);if(l.query.type){const e=y.filter(s=>s.type===l.query.type);e[0]&&(c.value=e[0])}if(l.query.scheme)if(typeof l.query.scheme=="string"){const e=u.value.filter(s=>s.name===l.query.scheme);e[0]&&(e[0].toggled=!0)}else Array.isArray(l.query.scheme)&&u.value.filter(s=>l.query.scheme?.includes(s.name)).forEach(s=>{s.toggled=!0});const E=async e=>{c.value=e,await C({path:l.path,query:{type:c.value?.type,scheme:p.value}})},S=async e=>{e.toggled=!e.toggled,await C({path:l.path,query:{type:c.value?.type,scheme:p.value}})},R=async()=>{g.value=[];try{f.value=!0,v.value=!1,d.value=!1;const{data:e,count:s}=await $fetch("/api/resources/",{method:"POST",body:{type:c.value?.type,search:A.value,page:_.value,limit:x.value,tags:p.value}});g.value=e,b.value=Math.ceil(s/x.value),d.value=!0}catch(e){console.log("ERROR!!",e),d.value=!1}finally{v.value=!0,f.value=!1}},q=e=>{_.value=e,R(),window&&window.scrollTo({top:0,behavior:"smooth"})};return U([c,p],async()=>{q(1)}),H(async()=>{await R()}),O({title:"Resources",description:"Explore news, factor tables, forms and other media."}),(e,s)=>{const V=K,M=W,N=j;return n(),o("div",null,[w(V,{title:"Resources",slug:"resources",category:"about-the-pps","summary-title":"stuff",summary:"stuff","header-only":!0,subtitle:"Useful information about the police pension scheme"}),r("div",X,[r("div",Y,[r("div",Z,[(n(),o(h,null,k(y,t=>r("button",{key:t.type,class:T(["hover:bg-neutral-30 text-primary-blue h-11 cursor-pointer rounded-xl px-4 opacity-80 hover:opacity-100",{"bg-primary-blue hover:bg-primary-blue text-white opacity-100 hover:text-white":t.type===a(c)?.type}]),onClick:B=>E(t)},m(t.name),11,ee)),64))]),r("h2",te,m(a(c)?.name),1),r("div",ae,[r("button",{class:"hover:bg-neutral-30 hover:text-primary-blue h-11 cursor-pointer rounded-xl bg-white px-4 opacity-50 hover:opacity-100",onClick:s[0]||(s[0]=t=>F())}," All "),(n(!0),o(h,null,k(a(u),t=>(n(),o("button",{key:t.name,class:T(["hover:bg-neutral-30 hover:text-primary-blue h-11 cursor-pointer rounded-xl px-4 hover:opacity-100",t.toggled?"bg-primary-blue hover:bg-primary-blue text-white opacity-100 hover:text-white":"bg-white opacity-50"]),onClick:B=>S(t)},m(t.name),11,se))),128))]),w(N,null,{default:z(()=>[a(f)?(n(),o("div",oe,"Fetching..")):P("",!0),a(v)&&a(d)?(n(),o(h,{key:1},[a(g).length>0?(n(),o("div",ne,[r("div",le,[(n(!0),o(h,null,k(a(g),t=>(n(),o("div",{key:t.id,class:"tile"},[r("h5",re,m(t.title),1),r("div",{class:"rich-text",innerHTML:t.blurb},null,8,ie),t.media_type==="file"?(n(),o("a",{key:0,target:"_blank",href:`${a($).public.DIRECTUS_URL}/assets/${t.file.id}/${t.file.filename_download}`,class:"bg-primary-blue mt-auto rounded-2xl px-4 py-3 font-bold text-white"}," View ",8,ce)):(n(),o("a",{key:1,href:`/about-the-pps/resources/${t.slug}`,class:"bg-primary-blue mt-auto rounded-2xl px-4 py-3 font-bold text-white"},"View",8,ue))]))),128))]),Q(w(M,{"current-page":a(_),"total-pages":a(b),"per-page":a(x),onPageChanged:q},null,8,["current-page","total-pages","per-page"]),[[G,a(b)>1]])])):(n(),o("div",pe,"Nothing to show"))],64)):P("",!0)]),_:1})])])])}}});
1export{ye 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.