1import{c as A}from"./chunk-CYOMB54L.js";import{b as q}from"./chunk-4YVEXBZY.js";import{a as R}from"./chunk-VFHYWK2Q.js";import{b as C}from"./chunk-KYU7VZRO.js";import{a as c}from"./chunk-RHUJMWSY.js";import{L as P,M as S,N as w,O as N}from"./chunk-FLKPQEL7.js";import{a as m,b as v}from"./chunk-KUN5WTS7.js";import"./chunk-7SY5SJP4.js";import{O as G,Z as p}from"./chunk-YNKQPWSP.js";import"./chunk-4EY2W66C.js";import"./chunk-ZR73OBID.js";import"./chunk-6R4CBI6E.js";import"./chunk-ZEH2WMTB.js";import"./chunk-3H2GI3MM.js";import{L as M,aa as l,na as t,t as u,y as h}from"./chunk-N4XFLIUN.js";import{a as g,b as f}from"./chunk-DIH54OSL.js";var x=r=>t(P).fetch({variables:{site:r.data.site}}).pipe(v(),m(),l(e=>u(e.data??null)),M(e=>(console.error("Could not resolve the section navigation",e),u(null)))),L=(r,e)=>{let a=t(p);return t(S).fetch({variables:{site:r.data.site}}).pipe(v(),m(),l(o=>o.data?.entry?u(o.data):c(a,e.url)))},Q=(r,e)=>{let a=t(p),o=t(R),n=null;try{if(n=r.queryParamMap.has("year")?C.fromFormat(r.queryParamMap.get("year"),"yyyy"):null,!n?.isValid)throw o.addError({name:"Not a valid year",message:"The parameter year is not a valid year"}),new Error("Not a valid year")}catch(d){console.error(d);let y=a.parseUrl(e.url);return y.queryParams=f(g({},y.queryParams),{errorCode:422}),a.navigateByUrl(y.toString(),{skipLocationChange:!0})}let i=n.startOf("year").toFormat("yyyy-MM-dd"),s=n.endOf("year").toFormat("yyyy-MM-dd");return console.log(`${i} => ${s}`),t(w).fetch({variables:{site:r.data.site,isDuringDate:`${i} => ${s}`}}).pipe(v(),m(),l(d=>d.data?.entry?u(d.data):c(a,e.url)))},O=async(r,e)=>{let a=r.queryParamMap.has("year"),o=t(p);if(a)return!0;{let i=((await h(t(N).fetch({variables:{site:r.data.site}}))).data?.entry).dateTimeRange?.end;if(i){let s=o.parseUrl(e.url);return s.queryParams=f(g({},s.queryParams),{year:i}),new G(s)}else return c(o,e.url)}};var I=[{path:"",resolve:{nav:x},children:[{path:"",loadComponent:()=>import("./chunk-SWCFNJOQ.js"),resolve:{page:L}},{path:"past",loadComponent:()=>import("./chunk-FROJLGAF.js"),canActivate:[O],resolve:{page:Q},runGuardsAndResolvers:"pathParamsOrQueryParamsChange"},{matcher:q,loadChildren:()=>import("./chunk-Y2UXJWWF.js")},{matcher:A,loadComponent:()=>import("./chunk-KNFPGK7Q.js")}]}];export{I as default}; 2//# sourceMappingURL=chunk-5RGGT3ME.js.map
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.