1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3019],{37968:function(e,t,r){"use strict";r.d(t,{n:function(){return l}});var a=r(67294);let l=e=>{let{announcement:t}=e;return(0,a.useEffect)(()=>{let e=document.getElementById("__next-route-announcer__");(null==e?void 0:e.hasAttribute("aria-atomic"))||null==e||e.setAttribute("aria-atomic","true"),e&&(e.textContent="",window.requestAnimationFrame(r=>{e.textContent=t}))},[t]),null}},98805:function(e,t,r){"use strict";r.d(t,{N:function(){return G}});var a=r(20567),l=r(85893),s=r(11163),n=r(2962),i=r(23450),o=r.n(i),c=r(67294),d=r(54177),u=r(13701),p=r(69630),m=r(58354),h=r(37990),g=r(37968),f=r(79892),x=r(12903),y=r(24586),j=r(38161);let v=e=>{let t=[],r=e.querySelector("thead");if(r){let e=["Link"];r.querySelectorAll("th").forEach(t=>{var r;e.push((null===(r=t.textContent)||void 0===r?void 0:r.trim())||"")}),t.push(e.join(" "))}return e.querySelectorAll("tbody tr").forEach(e=>{let r=[],a=e.querySelector("a");r.push(a?a.href:"n/a"),e.querySelectorAll("td").forEach(e=>{var t;r.push((null===(t=e.textContent)||void 0===t?void 0:t.trim())||"")}),t.push(r.join(" "))}),t.join("\r\n")},b=e=>{let{children:t,targetId:r}=e,a=(0,j.w)(),[s,n]=(0,c.useState)(!1),[i,o]=(0,c.useState)(void 0),[d,u]=(0,c.useState)(null);(0,c.useEffect)(()=>{n(!0)},[]);let p=(0,c.useCallback)(async e=>{u(e.currentTarget),o(void 0);let t=document.getElementById(r);if(t){let e=new f.xf({"text/html":t.outerHTML,"text/plain":v(t)});try{await f.cW([e]),o(!0)}catch(e){a.error(e,"Error copying to clipboard"),o(!1)}}else a.error("Couldn't copy to clipboard: couldn't find target element with id ".concat(r)),o(!1)},[r,a]),m=(0,c.useCallback)(()=>{o(void 0),d&&d.focus()},[d]);return s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.Button,{className:"mv--0 mh--0",onClick:p,children:t}),!0===i?(0,l.jsxs)(x.b,{type:"success",children:[(0,l.jsx)("p",{children:"Results copied to the clipboard, paste into excel to see the results."}),(0,l.jsx)(y.Button,{variant:"secondary",onClick:m,children:"Dismiss message"})]}):!1===i?(0,l.jsxs)(x.b,{type:"error",children:[(0,l.jsx)("p",{children:"Sorry, there was an error copying to the clipboard"}),(0,l.jsx)(y.Button,{variant:"inverse",onClick:m,children:"Dismiss message"})]}):null]}):null};var _=r(7197),C=r(14930),N=r(71e3),P=r(94428),k=r(85141),S=r(14932),Y=r(24233),w=r(80869);let L=e=>{let t,{results:{firstResult:r,lastResult:n,resultCount:i},activeModifiers:o,currentSortOrder:c,defaultSort:d,secondarySort:u}=e,{push:p,query:m,events:h}=(0,s.useRouter)(),g=(0,w.t)("filter-summary");return u&&0!==i&&(t=[{active:c===d.order||!c,label:d.label,onSelected:()=>{p({query:(0,S._)((0,a._)({},m),{s:d.order})},void 0,{scroll:!1}),h.on("routeChangeComplete",g)},value:d.order},{active:c===u.order,label:u.label,onSelected:()=>{p({query:(0,S._)((0,a._)({},m),{s:u.order})},void 0,{scroll:!1}),h.on("routeChangeComplete",g)},value:u.order}]),(0,l.jsx)(Y.Zo,{id:"filter-summary",activeFilters:o.map(e=>{let{displayName:t,toggleUrl:r}=e;return{label:t,destination:r,method:"href",elementType:C.T3}}),sorting:t,children:i>0&&(0,l.jsxs)(l.Fragment,{children:["Showing ",r," to ",n," of ",i]})})};var D=r(27484),I=r.n(D),M=r(10285),T=r.n(M);I().extend(T()),r(55406),r(83846),r(34155);var F=r(31614),E=r.n(F);let A=[{count:10,label:"10"},{count:25,label:"25"},{count:50,label:"50"},{count:9999,label:"All"}],G=e=>{let{metaDescription:t,listNavType:r,breadcrumbTrail:i,currentBreadcrumb:f,preheading:x,heading:y,intro:j,description:v,title:S,defaultSort:Y,secondarySort:w,showDateFilter:D,dateFilterLabel:I,textFilterHeading:M,useFutureDates:T,navigatorsOrder:F=["nai","tt","tsd","ndt","ngt","nat","rty","sub"],navigatorsToCollapse:G=["ngt","nat"],tableBodyRender:q,searchInputPlaceholder:B,variant:O=!1,filterSummaryDescription:W}=e;return e=>{let{results:H,searchUrl:{q:R,s:V,from:U,to:Q,ps:z=10},activeModifiers:K}=e,{asPath:Z,pathname:J}=(0,s.useRouter)(),[X,$]=(0,c.useState)(""),ee=(0,c.useMemo)(()=>(0,l.jsx)(d.Oo,{children:[(0,l.jsx)(d.aG,{to:"/",children:"Home"},"home"),...i,(0,l.jsx)(d.aG,{children:f},"current page")]}),[]),{failed:et}=H,{documents:er,navigators:ea,pageSize:el,firstResult:es,lastResult:en,resultCount:ei}=H;if((0,c.useEffect)(()=>
1{if(0===ei)$("No results found for ".concat(K.map(e=>e.displayName).join(", ")));else{let e="Title"===V?"title":V?"date":Y.label;$("Showing ".concat(es," to ").concat(en," of ").concat(ei,", sorted by ").concat(e.toLowerCase()))}},[es,en,ei,R,V,U,Q,K]),et)return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.PB,{title:S,noindex:!0,description:t}),(0,l.jsx)(_.M,{breadcrumbs:ee})]});let eo=O?{variant:"fullWidthLight",verticalPadding:"loose",breadcrumbs:ee}:{className:"page-header ".concat(E().pageHeader)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.PB,{title:S,noindex:0===er.length,description:t}),(0,l.jsx)(g.n,{announcement:X}),!O&&ee,(0,l.jsx)(p.m,(0,a._)({preheading:x,heading:y,id:"content-start","data-testid":"content-start",lead:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k.G,{targetId:"filters",children:"Skip to filters"}),(0,l.jsx)(k.G,{targetId:"results",children:"Skip to results"}),j]}),description:v},eo)),r&&(0,l.jsx)(r,{}),(0,l.jsxs)(u.Grid,{gutter:"loose",className:E().sectionWrapper,children:[(0,l.jsx)(u.GridItem,{cols:12,md:4,lg:3,className:E().panelWrapper,elementType:"section","aria-label":"Filter results",children:(0,l.jsx)(N.G,{numActiveModifiers:K.length,navigators:ea,pageSize:10===el?"":el,sortOrder:V===Y.order?"":V,queryText:R,from:U,to:Q,showDateFilter:D,showTextFilter:!0,dateFilterLabel:I,textFilterHeading:M,useFutureDates:T,navigatorsOrder:F,navigatorsToCollapse:G,searchInputPlaceholder:B})}),(0,l.jsxs)(u.GridItem,{cols:12,md:8,lg:9,elementType:"section","aria-labelledby":"filter-summary",children:[(0,l.jsx)(L,{results:H,activeModifiers:K,currentSortOrder:V,defaultSort:Y,secondarySort:w}),W?(0,l.jsx)("p",{children:W}):null,0===er.length?(0,l.jsxs)("div",{id:"results",children:[(0,l.jsx)("h2",{children:"No results found"}),(0,l.jsx)("p",{children:"Sorry, we havenât found any results for you. You could try:"}),(0,l.jsxs)("ul",{children:[(0,l.jsx)("li",{children:"Using the full site search."}),(0,l.jsxs)("li",{children:[(0,l.jsx)("a",{href:"/guidance/conditions-and-diseases",children:"Browsing by topic"}),". Our topic pages show all our guidance in a particular area, such as specific conditions or healthcare settings."]}),(0,l.jsxs)("li",{children:[(0,l.jsx)(C.rU,{to:J+(z&&10!=Number(z)?"?ps=".concat(z):""),children:"Clearing your filters"})," ","and starting again."]})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:E().tableWrapper,children:(0,l.jsx)(m.i,{"aria-describedby":"filter-summary",id:"results",className:E().table,children:q(er)})}),(0,l.jsx)(P.w,{results:H,scrollTargetId:"filter-summary"}),(0,l.jsxs)(u.Grid,{verticalAlignment:"middle",className:"mt--d",children:[(0,l.jsx)(u.GridItem,{cols:12,sm:6,className:"mb--e mb--0-sm",children:(0,l.jsxs)(b,{targetId:"results",children:["Copy ",o()("result",er.length,!0)," to clipboard"]})}),(0,l.jsxs)(u.GridItem,{cols:12,sm:6,className:"text-right",children:[(0,l.jsx)("h3",{className:E().resultsPerPageHeading,children:"Results per page"}),(0,l.jsx)("ol",{className:"list list--piped ".concat(E().resultsPerPageList),children:A.map(e=>{let{count:t,label:r}=e;return(0,l.jsx)("li",{children:Number(z)===t?r:(0,l.jsx)(C.Aw,{"aria-label":"Show ".concat(r," results per page"),href:(0,h.iO)(10===t?(0,h.iO)(Z,"ps"):(0,h.rW)(Z,"ps",String(t)),"pa"),scrollTargetId:"filter-summary",children:r})},r)})})]})]})]})]})]})]})}}},71e3:function(e,t,r){"use strict";r.d(t,{G:function(){return _}});var a=r(85893),l=r(7422),s=r.n(l),n=r(11163),i=r(67294),o=r(24233),c=r(24586),d=r(68522),u=r(85390),p=r.n(u);let m=e=>{let{name:t,placeholder:r,defaultValue:l,heading:s="Keyword or reference number"}=e;return(0,a.jsx)(o.e_,{heading:s,headingLevel:3,children:(0,a.jsx)(h,{name:t,placeholder:r,defaultValue:l})})},h=e=>{let{name:t,placeholder:r,defaultValue:l}=e,[s,n]=(0,i.useState)(l||""),o=(0,i.useCallback)(e=>{n(e.currentTarget.value)},[]);return(0,i.useEffect)(()=>{n(l||"")},[l]),(0,a.jsxs)("div",{className:"ph--c pt--c",children:[(0,a.jsx)(d.Input,{name:t,label:"",placeholder:r,className:p().input,autoComplete:"off",onChange:o,value:s,spellCheck:!1}),(0,a.jsx)(c.Button,{className:"ml--0",variant:"secondary",type:"submit",children:"Apply filter"})]})};var g=r(85141),f=r(27484),x=r.n(f);let y="2000-01-01",j="[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])",v=e=>{let{useFutureDates:t,heading:r="Date",to:l,from:s}=e;return(0,a.jsx)(o.e_,{heading:r,headingLevel:3,children:(0,a.jsx)(b,{from:s,to:l,useFutureDates:t})})},b=e=>{let{to:t="",from:r="",useFutureDates:l}=e,[s,n]=(0,i.useState)(t),[o,u]=(0,i.useState)(!0),[p,m]=(0,i.useState)(r),[h,g]=(0,i.useState)(!0);(0,i.useEffect)(()=>{m(r),n(t)},[r,t]);let f=(0,i.useCallback)(e=>{m(e.target.value),l||s||n(x()().format("YYYY-MM-DD"))},[l,s]),v=(0,i.useCallback)(e=>{n(e.target.value),l&&!p&&m(x()().format("YYYY-MM-DD"))},[l,p]),b=(0,i.useCallback)(e=>{let t=!s||!!e.currentTarget.value;g(t),e.currentTarget.setCustomValidity(t?"":"Please enter a from date")},[s]),_=(0,i.useCallback)(e=>{let t=!p||!!e.currentTarget.value;u(t),e.currentTarget.setCustomValidity(t?"":"Please enter a to date")},[p]),C=l?x()().format("YYYY-MM-DD"):y,N=l?s||x()().add(10,"y").format("YYYY-MM-DD"):x()(s||void 0).format("YYYY-MM-DD"),P=l?p||x()().format("YYYY-MM-DD"):p||y,k=l?x()().add(10,"y").format("YYYY-MM-DD"):x()().format("YYYY-MM-DD");return(0,a.jsxs)("div",{className:"ph--c pt--c",children:[(0,a.jsx)(d.Input,{label:"From date",name:"from",type:"date",pattern:j,placeholder:"yyyy-mm-dd",min:C,max:N,value:p,onChange:f,required:!p&&!!s,error:!h,errorMessage:"Please enter a from date",onInvalid:b,onInput:e=>{e.target.setCustomValidity(""),g(!0)}}),(0,a.jsx)(d.Input,{label:"To date",name:"to",type:"date",pattern:j,placeholder:"yyyy-mm-dd",min:P,max:k,value:s,onChange:v,required:!s&&!!p,error:!o,errorMessage:"Please enter a to date",onInvalid:_,onInput:e=>{e.target.setCustomValidity(""),u(!0)}}),(0,a.jsx)(c.Button,{type:"submit",variant:"secondary",className:"ml--0",children:"Apply date filters"})]})},_=e=>{let{numActiveModifiers:t,navigators:r,pageSize:l,sortOrder:c,queryText:d,from:u,to:p,showDateFilter:h,showTextFilter:f,dateFilterLabel:x,textFilterHeading:y,useFutureDates:j,navigatorsOrder:b,navigatorsToCollapse:_,searchInputPlaceholder:C="E.g. 'diabetes' or 'NG28'"}=e,N=(0,n.useRouter)(),P=(0,i.createRef)(),[k,S]=(0,i.useState)({}),Y=(0,i.useCallback)(e=>{if(Array.prototype.forEach.call(P.current,t=>{e&&"drm"===t.name&&t.value!==e&&(t.checked=!1)}),e&&P.current&&S(e),P.current){let e=s()(P.current);N.push(e?"?"+e:"",void 0,{scroll:!1})}},[P,N]),w=(0,i.useCallback)(e=>{P.current&&(e.preventDefault(),Y())},[P,Y]),L=["Last 3 months","Last 6 months","Last year","Last 3 years"],D=(e,t)=>
1k?(t.forEach(e=>{e.displayName!==k&&(e.active=!1)}),e.displayName===k):e.active;return(0,a.jsxs)(o.hR,{id:"filters","aria-label":"Filter results",heading:"Filter".concat(0===t?"":" (".concat(t," applied)")),innerRef:P,onSubmit:w,children:[(0,a.jsx)(g.G,{targetId:"results",children:"Skip to results"}),(0,a.jsx)("input",{type:"hidden",name:"ps",value:l}),(0,a.jsx)("input",{type:"hidden",name:"s",value:c}),f?(0,a.jsx)(m,{heading:y,name:"q",defaultValue:d,placeholder:C}):(0,a.jsx)("input",{type:"hidden",name:"q",value:d}),h?(0,a.jsx)(v,{heading:x,from:u,to:p,useFutureDates:!!j}):(0,a.jsx)(a.Fragment,{}),r.filter(e=>b.find(t=>e.shortName===t)).sort((e,t)=>b.indexOf(e.shortName)-b.indexOf(t.shortName)).map(e=>{let{shortName:t,displayName:r,modifiers:l}=e;return(0,a.jsx)(o.e_,{heading:r,id:t,collapseByDefault:_.includes(t),selectedCount:l.filter(e=>e.active).length,children:l.sort((e,t)=>e.displayName.localeCompare(t.displayName)).sort((e,t)=>L.indexOf(e.displayName)-L.indexOf(t.displayName)).map(e=>(0,a.jsx)(o.f2,{isSelected:"drm"==t?D(e,l)&&e.active:e.active,onChanged:()=>{window.dataLayer&&window.dataLayer.push({event:"search.filter-select",filter:e.displayName,action:e.active?"deselected":"selected"}),Y("drm"==t?e.displayName:null)},groupId:t,value:e.displayName,children:"".concat(e.displayName," (").concat(e.resultCount,")")},e.displayName))},t)})]})}},94428:function(e,t,r){"use strict";r.d(t,{w:function(){return u}});var a=r(20567),l=r(14932),s=r(85893),n=r(11163),i=r(67294),o=r(85666),c=r(37990),d=r(14930);let u=e=>{let{results:{firstResult:t,resultCount:r,pageSize:u},scrollTargetId:p}=e,{asPath:m}=(0,n.useRouter)(),h=(0,i.useCallback)(e=>1===e?(0,c.iO)(m,"pa"):(0,c.rW)(m,"pa",String(e)),[m]);return(0,s.jsx)(o.C,{elementType:e=>(0,s.jsx)(d.Aw,(0,l._)((0,a._)({},e),{scrollTargetId:p})),currentPage:Math.ceil(t/u),totalPages:Math.ceil(r/u),mapPageNumberToHref:h})}},85141:function(e,t,r){"use strict";r.d(t,{G:function(){return o},H:function(){return i}});var a=r(85893),l=r(67294),s=r(18911),n=r.n(s);let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{preventScroll:r=!1,scroll:a=!0}=t,l=document.getElementById(e);l&&(l.setAttribute("tabIndex","-1"),l.focus({preventScroll:r}),a&&"function"==typeof l.scrollIntoView&&l.scrollIntoView())},o=e=>{let{children:t,targetId:r}=e,s=(0,l.useCallback)(e=>{document.getElementById(r)&&(e.preventDefault(),i(r))},[r]);return(0,a.jsx)("a",{href:"#".concat(r),className:n().skipLink,onClick:s,children:t})}},85390:function(e){e.exports={input:"InlineTextFilter_input__bPVn_"}},31614:function(e){e.exports={tableWrapper:"ProductListPage_tableWrapper__oCkQq",table:"ProductListPage_table__6QiDc",pageHeader:"ProductListPage_pageHeader__uDym2",sectionWrapper:"ProductListPage_sectionWrapper__M4hc9",panelWrapper:"ProductListPage_panelWrapper__EL_nO",resultsPerPageHeading:"ProductListPage_resultsPerPageHeading__epr_j",resultsPerPageList:"ProductListPage_resultsPerPageList__lh0dL"}},18911:function(e){e.exports={skipLink:"SkipLink_skipLink__25piR"}},24654:function(){}}]);
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.