1"use strict";(globalThis.webpackChunkmcs=globalThis.webpackChunkmcs||[]).push([[2695],{20425(e,t,n){n.d(t,{Hh:()=>s,i:()=>i});var a=n(96540),l=n(21396),c=n.n(l),r=n(34714);const o=()=>c().enc.Hex.parse("F57E76482EE3DC3336495DEDEEF3962671B054FE353E815145E29C5689F72FEC"),i=e=>{const t=new URLSearchParams(e).get("ref");if(!t)return{};const n=(e=>e.split("-").join(""))(t);if("01"!==n.slice(0,2)||n.length<34)return{};const a=n.slice(2,34),l=n.slice(34);try{const e=c().AES.decrypt({ciphertext:c().enc.Hex.parse(l)},o(),{iv:c().enc.Hex.parse(a),mode:c().mode.CBC,padding:c().pad.Pkcs7}).toString(c().enc.Utf8),t=e?JSON.parse(e):{};return t&&"object"==typeof t&&!Array.isArray(t)?t:{}}catch{return{}}},s=e=>{(0,r.z)();const t=(0,r.Z)(),n=JSON.stringify(e);(0,a.useEffect)(()=>{const n=Object.fromEntries(Object.entries(e).filter(e=>{let[,t]=e;return null!=t&&""!==t})),a=Object.keys(n).length>0;a||t("/",{replace:!0})},[n])}},62695(e,t,n){n.r(t),n.d(t,{default:()=>p});var a=n(96540),l=n(69478),c=n(57867),r=n(4681),o=n(34714),i=n(20425),s=n(71468),d=n(22766),m=n(93689),u=n(22022);const E=(0,a.lazy)(()=>n.e(9896).then(n.bind(n,39896))),C=(0,a.lazy)(()=>n.e(3475).then(n.bind(n,53475))),h=(0,a.lazy)(()=>
1n.e(8397).then(n.bind(n,78397))),g=(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,15724))),v={fetchCalendarData:d.pg},p=(0,s.Ng)(e=>{let{calenderData:t,themeSlice:n}=e;const{themeSettingsData:a}=n,{loading:l,calenderCollectionData:c}=t;return{loading:l,calenderCollectionData:c,themeSettingsData:a}},v)(e=>{const{t,i18n:n}=(0,u.Bd)(),{loading:s,calenderCollectionData:d,fetchCalendarData:v,themeSettingsData:p}=e,b=(0,o.Z)(),f=(0,o.z)(),{state:y}=f,_=(0,i.i)(f.search),x=y||(_.uprn?{value:_.uprn,label:_.label}:void 0);(0,i.Hh)({uprn:null==y?void 0:y.value,label:null==y?void 0:y.label});const[D,N]=(0,a.useState)(!1),[S,L]=(0,a.useState)([]),k=null==S?void 0:S.join("<br/>");console.log("ð ~ file: WasteCalender.jsx:20 ~ WasteCalender ~ footerDescription:",k);const A=(0,a.useRef)(null),O=(0,m.Gq)("accessKeys");(0,a.useEffect)(()=>{if(x){const e={P_UPRN:x.value,P_CLIENT_ID:null==O?void 0:O.P_CLIENT_ID,P_ACCESS_KEY:null==O?void 0:O.P_ACCESS_KEY,P_COUNCIL_ID:null==O?void 0:O.P_COUNCIL_ID,P_TIME_ZONE:"GMT",LANG_CODE:n.language.toUpperCase()},t=(0,m.yv)(e);v(t)}else b("/collection-day")},[]);return a.createElement("div",null,s?a.createElement("div",{className:"d-flex justify-content-center align-items-center",style:{height:"100vh"}},a.createElement(g,null)):a.createElement(a.Fragment,null,a.createElement("section",{"aria-label":`Collection for ${null==x?void 0:x.label}`},a.createElement("div",{ref:A,id:"myCanvas"},a.createElement(E,{header:null==d?void 0:d.P_CAL_TITLE,subTitle:`Collection for ${null==x?void 0:x.label}`,isFormHeader:!0}),a.createElement("h3",{style:{fontSize:"20px"},className:"container-xxl text-secondary"},null==d?void 0:d.P_CAL_HEADER_TEXT),null===(null==d?void 0:d.COLLECTION)?a.createElement("div",{className:"container-xxl"},a.createElement("div",{className:"govuk-warning-text mt-5"},a.createElement("span",{className:"govuk-warning-text__icon","aria-hidden":"true"},"!"),a.createElement("strong",{className:"govuk-warning-text__text"},a.createElement("span",{className:"govuk-visually-hidden"},t("warning")),t("thereAreNoUpcomingCollectionsScheduledForTheAboveAddress")))):a.createElement(C,{calenderCollectionData:d,setFooterDesc:L}),a.createElement("h4",{style:{fontSize:"20px"},className:"container-xxl text-secondary"},null==d?void 0:d.P_CAL_FOOTER_TEXT)),a.createElement("div",{className:"container-xxl tableButton"},null===(null==d?void 0:d.COLLECTION)?"":a.createElement("button",{className:"govuk-button mt-4","data-module":"govuk-button",onClick:async()=>{N(!0);try{const e=await(0,c.vr)(A.current,{paperSize:"auto",margin:{left:"4cm",top:"3cm",right:"4cm",bottom:"3cm"},padding:{left:"4cm",top:"3cm",right:"4cm",bottom:"3cm"}}),t=await(0,r.F3)(e,{});/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e=>{const t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],a=new ArrayBuffer(t.length),l=new Uint8Array(a);for(let e=0;e<t.length;e++)l[e]=t.charCodeAt(e);const c=new Blob([a],{type:n}),r=URL.createObjectURL(c),o=document.createElement("a");o.href=r,o.download="CollectionDay.pdf",document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r)})(t):(0,l.U)(t,"CollectionDay.pdf")}catch(e){console.error("Error exporting PDF",e)}N(!1)},disabled:D},t("downloadCalendar"))),a.createElement("div",{className:"container-xxl"},a.createElement(h,{themeSettingsData:p,onClick:()=>{b("/collection-day")},disable:!1,ariaLabel:"back"},t("back"))))))})}}]);
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.