PageSourceSearch

https://www.transurban.com/etc.clientlibs/digitalcms/clientlibs/di…/js/GeneralPageBanner.7cb2a381.chunk.js

js transurban.com collected 2026-09-24 19:40:28 UTC 27,695 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkui_frontend=self.webpackChunkui_frontend||[]).push([[473],{9074:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(73063),r=(n(47313),n(90210)),i=n(46417);function a(e){const t=e.color||"inherit";return(0,i.jsx)(r.Z,(0,o.Z)((0,o.Z)({},e),{},{color:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",titleAccess:"Close",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM16.7071 7.29289C17.0976 7.68342 17.0976 8.31658 16.7071 8.70711L13.4142 12L16.7071 15.2929C17.0976 15.6834 17.0976 16.3166 16.7071 16.7071C16.3166 17.0976 15.6834 17.0976 15.2929 16.7071L12 13.4142L8.70711 16.7071C8.31658 17.0976 7.68342 17.0976 7.29289 16.7071C6.90237 16.3166 6.90237 15.6834 7.29289 15.2929L10.5858 12L7.29289 8.70711C6.90237 8.31658 6.90237 7.68342 7.29289 7.29289C7.68342 6.90237 8.31658 6.90237 8.70711 7.29289L12 10.5858L15.2929 7.29289C15.6834 6.90237 16.3166 6.90237 16.7071 7.29289Z",fill:"currentColor"})}))}},95390:(e,t,n)=>{n.d(t,{Z:()=>l});var o=n(73063),r=n(45987),i=(n(47313),n(90210)),a=n(46417);const s=["color","titleAccess"];function l(e){let{color:t="inherit",titleAccess:n}=e,l=(0,r.Z)(e,s);return(0,a.jsx)(i.Z,(0,o.Z)((0,o.Z)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",titleAccess:n,color:t},l),{},{children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.75 10C2.75 5.99594 5.99594 2.75 10 2.75C14.0041 2.75 17.25 5.99594 17.25 10C17.25 14.0041 14.0041 17.25 10 17.25C5.99594 17.25 2.75 14.0041 2.75 10ZM10 1.25C5.16751 1.25 1.25 5.16751 1.25 10C1.25 14.8325 5.16751 18.75 10 18.75C12.1462 18.75 14.112 17.9773 15.6342 16.6949L21.4697 22.5303C21.7626 22.8232 22.2374 22.8232 22.5303 22.5303C22.8232 22.2374 22.8232 21.7626 22.5303 21.4697L16.6949 15.6342C17.9773 14.112 18.75 12.1462 18.75 10C18.75 5.16751 14.8325 1.25 10 1.25Z",fill:"currentColor"})}))}},19284:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(73063),r=(n(47313),n(90210)),i=n(46417);function a(e){return(0,i.jsxs)(r.Z,(0,o.Z)((0,o.Z)({},e),{},{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:[(0,i.jsx)("title",{children:"Sparkle"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 2.75C6.491 5.106 7.64 6.45 10.25 6.5C7.827 6.491 6.623 7.791 6.5 10.25C6.479 7.93 5.44 6.5 2.75 6.5C5.157 6.467 6.491 5.305 6.5 2.75Z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 13.75C5.491 16.106 6.64 17.45 9.25 17.5C6.827 17.491 5.623 18.791 5.5 21.25C5.479 18.93 4.44 17.5 1.75 17.5C4.157 17.467 5.491 16.305 5.5 13.75Z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.2831 6C16.2676 9.94611 18.186 12.1844 22.565 12.2831C18.5035 12.2676 16.4888 14.4452 16.2831 18.565C16.2438 14.6784 14.5063 12.2771 10 12.2831C14.0317 12.226 16.2676 10.2803 16.2831 6Z",fill:"none",stroke:"currentColor",strokeWidth:"1.78396",strokeLinecap:"round",strokeLinejoin:"round"})]}))}},65942:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ee});var o=n(47313),r=n(19860);const i=e=>e.replace(/\s+/g," ").trim(),a=(e,t)=>"preserve-quoted-phrases"!==t||(e=>e.includes('"'))(e)?t:"simple",s=e=>{const t=[];let n=e.replace(/"([^"]*)"/g,((e,n)=>(t.push(n),"__QUOTED_".concat(t.length-1,"__"))));return n=n.replace(/\s+/g," ").trim(),n.replace(/__QUOTED_(\d+)__/g,((e,n)=>'"'.concat(t[parseInt(n,10)],'"')))},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"simple";const n=a(e,t);return"preserve-quoted-phrases"===n?s(e):i(e)},c=["melbourne","sydney","brisbane"],u=()=>{const e=document.querySelector('input[name="region"]');if(e&&e.value){const t=e.value.toLowerCase();if(c.includes(t))return t}return null};var d=n(58212);const p=(e,t,n)=>({handleSubmit:(0,o.useCallback)((async(o,r)=>{o.preventDefault();const i=l(r,"preserve-quoted-phrases");if(!i)return;let a=i,s=!1;!1!==o.shouldRedact&&(a=await(async e=>{const t=new URLSearchParams({term:e,q:e}),n=new AbortController,o=window.setTimeout((()=>{n.abort()}),2e3);try{const a=await fetch("/bin/kendra/piidata",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:t.toString(),signal:n.signal});if(!a.ok)return e;const s=await a.text();try{var r;return null!==(r=(e=>{if("string"===typeof e)return e.trim()||null;if(e&&"object"===typeof e){var t,n;const o=e,r=null!==(t=null!==(n=o.redactedTerm)&&void 0!==n?n:o.q)&&void 0!==t?t:o.term;if("string"===typeof r)return r.trim()||null}return null})(JSON.parse(s)))&&void 0!==r?r:e}catch(i){return s.trim()||e}}catch(a){return e}finally{window.clearTimeout(o)}})(i),s=a!==i),s||null===n||void 0===n||n(a);const c=((e,t,n)=>{let o=e||"";return o+="?q=".concat(encodeURIComponent(t)),n&&(o+="&collection=".concat(encodeURIComponent(n))),o})(e,a,t),p=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"undefined"!==typeof window?window.location.origin:"http://localhost";if(!t||!e)return e;try{const o=new URL(e,n),r=o.pathname;let i=r;if(r.endsWith("/content.html")?i=r.replace(/\/content\.html$/,"/".concat(t,".html")):r.endsWith(".content.html")?i=r.replace(/\.content\.html$/,".".concat(t,".html")):r.endsWith(".html")&&(i=r.replace(/\.html$/,".".concat(t,".html"))),i===r)return e;o.pathname=i;const a=o.toString();return e.startsWith("http")?a:a.replace(n,"")}catch(o){return e}}(c,u());if(p){const e=(0,d.l)(p);if(!e)return;try{const t=new URL(e,window.location.origin);t.origin===window.location.origin&&(window.location.href=t.href)}catch(g){return}}}),[e,t,n])}),g=e=>
1{let{suggestionSize:t,region:n,collection:r,debounceMs:i=500,manualSuggestions:a=[]}=e;const[s,c]=(0,o.useState)(a.length>0?a.map((e=>({text:e}))):[]),[d,p]=(0,o.useState)(""),[g,h]=(0,o.useState)(!1),m=(0,o.useRef)(null),f=(0,o.useRef)(null),v=(0,o.useCallback)((async e=>{if(!e||!r)return a.length>0?c(a.map((e=>({text:e})))):c([]),void h(!1);try{const o=new AbortController;m.current=o;const i=l(e,"preserve-quoted-phrases"),a=n||(()=>{if("undefined"===typeof window)return"melbourne";const e=u();if(e)return e;const t=window.location.href.toLowerCase();return t.includes("sydney")?"sydney":t.includes("brisbane")?"brisbane":"melbourne"})(),s=((e,t)=>{if("undefined"===typeof window)return"".concat(e,"?").concat(t.toString());const{hostname:n,port:o}=window.location;return"localhost"===n&&"4502"!==o?"https://dev.linkt.com.au".concat(e,"?").concat(t.toString()):"".concat(e,"?").concat(t.toString())})("/bin/kendra/searchsuggestions",new URLSearchParams({q:i,size:t.toString(),region:a,collection:r,linkcount:"0"})),d=await fetch(s,{signal:o.signal});if(!d.ok)return c([{text:e}]),void h(!1);const p=await d.json();p&&0!==p.length?c(p):c([{text:e}]),h(!1)}catch(o){if(o instanceof Error&&"AbortError"===o.name)return;c([{text:e}]),h(!1)}}),[r,n,t,a]),x=(0,o.useCallback)((e=>{if(p(e),f.current&&clearTimeout(f.current),m.current&&m.current.abort(),!e)return a.length>0?c(a.map((e=>({text:e})))):c([]),void h(!1);h(!0),f.current=setTimeout((()=>{v(e).catch((e=>{console.error("Unexpected error fetching search suggestions",e),h(!1)}))}),i)}),[v,i,a]),C=(0,o.useCallback)((e=>{p(e),c([])}),[]);return{suggestion:d,suggestions:s,setSuggestion:p,handleChange:x,handleSuggestionClick:C,isLoading:g}},h="linkt:searchHistory:v1",m=e=>e.trim(),f=e=>{if(!e||"object"!==typeof e)return!1;const t=e;return"string"===typeof t.query&&t.query.trim().length>0&&"number"===typeof t.timestamp&&Number.isFinite(t.timestamp)},v=()=>{try{return"undefined"!==typeof window&&window.localStorage?window.localStorage:null}catch(e){return null}},x=e=>[...e].sort(((e,t)=>t.timestamp-e.timestamp)).slice(0,5),C=()=>{const e=v();if(!e)return[];try{return x((e=>{if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)&&t.every(f)?t.map((e=>({query:m(e.query),timestamp:e.timestamp}))):[]})(e.getItem(h)))}catch(t){return[]}},y=()=>C(),w={getItems:y,addItem:e=>{const t=m(e);if(!t)return y();const n=t.toLowerCase(),o=Date.now(),r=C(),i=r.findIndex((e=>e.query.toLowerCase()===n));i>=0?r[i]={query:t,timestamp:o}:(r.length<5||r.pop(),r.push({query:t,timestamp:o}));const a=x(r);return(e=>{const t=v();if(t)try{t.setItem(h,JSON.stringify(e))}catch(n){}})(a),a},clearItems:()=>{const e=v();if(e)try{e.removeItem(h)}catch(t){}}};var b=n(14987),Z=n(9019),S=n(73063),k=n(57829),L=n(61113),j=n(84488),T=n(9074);const P="search",M="generic",I="linkt",A=10,R="Clear your search history",E="Suggestions",F=6,O={3:{xs:12,sm:6,md:3},6:{xs:12,sm:9,md:6},9:{xs:12,sm:12,md:9},12:{xs:12,sm:12,md:12}},H=e=>{const t=document.createElement("div");return t.textContent=e,t.innerHTML},W=(e,t)=>{if(!t)return null;const n=t.toLowerCase().trimEnd(),o=e.toLowerCase().indexOf(n);if(-1===o)return null;const r=t.trimEnd().length;let i=o+r;if(t.length>r)for(;i<e.length&&/\s/.test(e[i]);)i++;return{matchStart:o,matchEnd:i}};var D=n(17592),z=n(76510),_=n(82295),q=n(16783),N=n(95390);const U="var(--spacing-2xl)",B="24px",V="calc(".concat(U," - var(--spacing-xs))"),G={paddingTop:"var(--spacing-m)",paddingRight:U,paddingBottom:"var(--spacing-2xs)",paddingLeft:U},K={right:"var(--spacing-xs)",top:"50%",transform:"translateY(-50%)",width:B,height:B,display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"visible"},J=(0,S.Z)((0,S.Z)({},G),{},{backgroundColor:"var(--grey-200)","&:hover":{backgroundColor:"var(--grey-300)"}}),$=(0,D.ZP)(z.Z)((()=>({"& .MuiFilledInput-root .MuiAutocomplete-endAdornment":(0,S.Z)({},K),"&&.MuiAutocomplete-hasPopupIcon .MuiFilledInput-root .MuiAutocomplete-endAdornment, &&.MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon .MuiFilledInput-root .MuiAutocomplete-endAdornment":(0,S.Z)({},K),"&& .MuiAutocomplete-inputRoot.MuiFilledInput-root":(0,S.Z)({},J),"&& .MuiAutocomplete-inputRoot.MuiFilledInput-root.Mui-focused":{backgroundColor:"var(--grey-300)"},"&&.MuiAutocomplete-hasPopupIcon .MuiAutocomplete-inputRoot.MuiFilledInput-root, &&.MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon .MuiAutocomplete-inputRoot.MuiFilledInput-root":(0,S.Z)({},G),"& .MuiAutocomplete-clearIndicator":{color:"var(--grey-500)",visibility:"visible",width:B,height:B,padding:0,display:"inline-flex",alignItems:"center",justifyContent:"center","&:hover":{color:"var(--grey-500)"},"& svg":{fontSize:B}}}))),Q=(0,D.ZP)(_.Z)((()=>({borderRadius:"0 0 var(--radius-s) var(--radius-s) !important",marginTop:0,"& .MuiAutocomplete-listbox":{paddingTop:0,"& .MuiAutocomplete-option":{padding:"var(--spacing-2xs) var(--spacing-s)",minHeight:"auto",scrollMargin:"8px","&:hover":{backgroundColor:"var(--grey-200)"},'&[aria-selected="true"]':{backgroundColor:"var(--grey-200)"}}}}))),Y=(0,D.ZP)(k.Z)({padding:"var(--spacing-s) var(--spacing-s) var(--spacing-s)",position:"sticky",top:0,backgroundColor:"transparent",zIndex:1}),X=(0,D.ZP)(k.Z)({display:"flex",alignItems:"center",flexWrap:"wrap",gap:"var(--spacing-3xs)"}),ee=(0,D.ZP)("button")((e=>{var t,n,o,r,i;let{theme:a}=e;return{display:"inline-flex",border:0,background:"transparent",padding:0,margin:0,color:a.palette.primary.main,textDecoration:"underline",cursor:"pointer",fontFamily:(null===(t=a.typography.caption)||void 0===t?void 0:t.fontFamily)||a.typography.fontFamily,fontSize:(null===(n=a.typography.caption)||void 0===n?void 0:n.fontSize)||"0.75rem",fontWeight:(null===(o=a.typography.caption)||void 0===o?void 0:o.fontWeight)||a.typography.fontWeightRegular,lineHeight:(null===(r=a.typography.caption)||void 0===r?void 0:r.lineHeight)||1.66,letterSpacing:(null===(i=a.typography.caption)||void 0===i?void 0:i.letterSpacing)||0,"&:hover, &:focus-visible":{opacity:.85}}})),te=(0,D.ZP)("ul")({padding:"var(--spacing-3xs) 0",margin:0,listStyle:"none"}),ne=(0,D.ZP)("li")({padding:"var(--spacing-2xs) var(--spacing-s)"}),oe=(0,D.ZP)(k.Z)({display:"flex",alignItems:"center",width:"100%",gap:"var(--spacing-2xs)"}),re=(0,D.ZP)("div")((e=>{let{isDefault:t}=e;return(0,S.Z)({fontWeight:"var(--font-weight-regular)",whiteSpace:"pre-wrap","& strong":{fontWeight:"var(--font-weight-semi-bold)"}},t&&{fontWeight:"var(--font-weight-semi-bold)"})})),ie=(0,D.ZP)("div")((e=>{let{theme:t}=e;return{position:"relative",width:"100%",[t.breakpoints.down("xs")]:{minWidth:"160px"},[t.breakpoints.up("sm")]:{minWidth:"220px"}}})),ae=(0,D.ZP)(N.Z,{shouldForwardProp:e=>"isFocused"!==e&&"isHovered"!==e&&"hasValue"!==e})((e=>{let{isFocused:t,isHovered:n,hasValue:o}=e;return(0,S.Z)((0,S.Z)({position:"absolute",left:"var(--spacing-xs)",to
1p:0,bottom:0,margin:"auto 0",width:B,height:B,fontSize:B,color:"var(--grey-600)",pointerEvents:"none",zIndex:1,transition:"color 0.2s ease"},n&&!o&&{color:"var(--grey-700)"}),t&&{color:"var(--primary-main)"})})),se=(0,D.ZP)(q.Z,{shouldForwardProp:e=>"hasValue"!==e})((e=>{let{theme:t,hasValue:n}=e;return{"& .MuiFilledInput-root":{position:"relative",cursor:"text",borderBottom:"none !important",boxShadow:"inset 0 -1px 0 0 var(--grey-600)","&::before, &::after":{display:"none !important"},"&:hover":{boxShadow:n?"inset 0 -1px 0 0 var(--grey-600)":"inset 0 -1px 0 0 var(--grey-700)","&::before, &::after":{display:"none !important"}},"&.Mui-focused":{boxShadow:"inset 0 -2px 0 0 ".concat(t.palette.primary.main),"&::before, &::after":{display:"none !important"}},"&.Mui-focused input":{color:"var(--grey-700)"},"& input":{padding:"0 !important",color:n?"var(--grey-700)":"var(--grey-600)","&::placeholder":{color:"var(--grey-600)",opacity:1}}},"& .MuiInputLabel-root":{left:"".concat(V," !important"),color:"var(--grey-600)","&.Mui-focused, &.MuiInputLabel-shrink":{color:"var(--grey-700)"},"&.MuiInputLabel-shrink":{transformOrigin:"top left"}}}})),le=(0,D.ZP)(N.Z)((()=>({fontSize:B,color:"var(--grey-600)",flexShrink:0}))),ce={flexShrink:0},ue={flex:1};var de=n(46417);const pe=e=>{let{suggestion:t,searchFieldLabel:n,dropdownHeading:r,suggestions:i,onChange:a,onSuggestionClick:s,open:l,isLoading:c=!1,suggestionSize:u=10,onDropdownOpen:d,showClearAction:p=!1,clearActionLabel:g=R,onClearAction:h}=e;const[m,f]=o.useState(!1),[v,x]=o.useState(!1),[C,y]=o.useState(l||!1),w=o.useRef(!1),Z=t.trim().length>0,P=0===t.trim().length,M=o.useRef("pointer"),I=o.useRef(void 0),A=o.useRef(void 0),E=o.useRef(null),F=o.useRef(null),O=o.useCallback((e=>{0===e.button&&(w.current=!0)}),[]),D=o.useCallback((()=>{var e;null===(e=F.current)||void 0===e||e.focus(),void 0===l&&w.current&&(y(!0),null===d||void 0===d||d(),w.current=!1)}),[d,l]);o.useEffect((()=>{void 0!==l&&y(l)}),[l]);const z=o.useCallback((e=>{var t;f(!0),null===(t=I.current)||void 0===t||t.call(I,e)}),[]),_=o.useCallback((e=>{var t;f(!1),null===(t=A.current)||void 0===t||t.call(A,e)}),[]),q=o.useCallback((e=>{e.preventDefault(),e.stopPropagation()}),[]),N=o.useCallback((()=>{const e=()=>{if(!E.current)return;const e=E.current.querySelector('li.MuiAutocomplete-option.Mui-focused, li.MuiAutocomplete-option[data-focus="true"]');if(!e)return;const t=E.current.querySelector('[data-search-suggestions-heading="true"]'),n=(()=>{let t=e.parentElement;for(;t&&t!==E.current;){if(t.scrollHeight>t.clientHeight+1)return t;t=t.parentElement}return E.current})(),o=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=r.top-o.top+n.scrollTop,a=r.bottom-o.top+n.scrollTop;let s=n.scrollTop;if(n===E.current&&t){const e=E.current.getBoundingClientRect();s=t.getBoundingClientRect().bottom-e.top+E.current.scrollTop}const l=n.scrollTop+n.clientHeight;i<s+4?n.scrollTop=Math.max(0,i-4):a>l-4&&(n.scrollTop=a-n.clientHeight+4)};window.requestAnimationFrame((()=>{window.requestAnimationFrame(e)}))}),[]),U=o.useMemo((()=>o.forwardRef(((e,t)=>{const n=o.useCallback((e=>{E.current=e,"function"===typeof t?t(e):t&&(t.current=e)}),[t]);return(0,de.jsx)(Q,(0,S.Z)((0,S.Z)({},e),{},{ref:n,"data-search-suggestions-paper":"true",children:(0,de.jsxs)(k.Z,{children:[i.length>0&&r&&!c&&(0,de.jsx)(Y,{"data-search-suggestions-heading":"true",onMouseDown:e=>{e.preventDefault()},children:(0,de.jsxs)(X,{children:[(0,de.jsx)(L.Z,{variant:"caption",color:"text.secondary",children:r}),p&&h&&(0,de.jsx)(ee,{type:"button",onMouseDown:q,onClick:h,"aria-label":g,children:"Clear"})]})}),c&&(0,de.jsxs)(k.Z,{children:[(0,de.jsx)(Y,{children:(0,de.jsx)(j.Z,{variant:"text",width:"120px",height:16})}),(0,de.jsx)(te,{children:Array.from({length:u}).map(((e,t)=>(0,de.jsx)(ne,{children:(0,de.jsxs)(oe,{children:[(0,de.jsx)(j.Z,{variant:"circular",width:20,height:20,sx:ce}),(0,de.jsx)(j.Z,{variant:"text",width:"".concat(80-t%5*5,"%"),height:20,sx:ue})]})},t)))})]}),!c&&e.children]})}))}))),[g,r,c,h,q,p,u,i.length]);return(0,de.jsx)($,{freeSolo:!0,ListboxProps:{style:{scrollBehavior:"smooth"}},open:void 0!==l?l:C,onOpen:()=>{void 0===l?C||(y(!0),null===d||void 0===d||d()):null===d||void 0===d||d()},onClose:(e,t)=>{void 0===l&&"toggleInput"===t||(void 0===l&&y(!1),w.current=!1)}
1,onHighlightChange:(e,t,n)=>{"keyboard"!==n&&"auto"!==n||N()},options:i.map((e=>e.text)),filterOptions:e=>e,inputValue:t,onInputChange:(e,t,n)=>{"input"!==n&&"clear"!==n||a(t)},onChange:(e,t,n)=>{if(!t)return;if("createOption"===n)return a(t),void(M.current="pointer");void 0===l&&y(!1);const o="selectOption"===n?M.current:"pointer";s(t,o),M.current="pointer"},blurOnSelect:!1,disableCloseOnSelect:!1,clearIcon:(0,de.jsx)(T.Z,{}),PaperComponent:U,renderOption:(e,n)=>{const o=((e,t)=>{if(!t)return H(e);const n=W(e,t);if(!n)return"<strong>".concat(H(e),"</strong>");const o=H(e.substring(0,n.matchStart)),r=H(e.substring(n.matchStart,n.matchEnd)),i=H(e.substring(n.matchEnd));return"".concat(o?"<strong>".concat(o,"</strong>"):"").concat(r).concat(i?"<strong>".concat(i,"</strong>"):"")})(n,t),r=(i=o,b.Z.sanitize(i,{ALLOWED_TAGS:["strong"],ALLOWED_ATTR:[]}));var i;const a=(0,S.Z)((0,S.Z)({},e),{},{onMouseDown:t=>{var n;M.current="pointer",null===(n=e.onMouseDown)||void 0===n||n.call(e,t)}});return(0,de.jsx)("li",(0,S.Z)((0,S.Z)({},a),{},{children:(0,de.jsxs)(oe,{children:[(0,de.jsx)(le,{}),(0,de.jsx)(re,{isDefault:P,dangerouslySetInnerHTML:{__html:r}})]})}))},renderInput:e=>(I.current=e.inputProps.onFocus,A.current=e.inputProps.onBlur,(0,de.jsxs)(ie,{onMouseDown:O,onClick:D,children:[(0,de.jsx)(ae,{isFocused:m,isHovered:v,hasValue:Z}),(0,de.jsx)(se,(0,S.Z)((0,S.Z)({},e),{},{name:"q",id:"searchInput",label:n,variant:"filled",hasValue:Z,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),inputProps:(0,S.Z)((0,S.Z)({},e.inputProps),{},{ref:t=>{F.current=t;const n=e.inputProps.ref;"function"===typeof n?n(t):n&&"object"===typeof n&&"current"in n&&(n.current=t)},onFocus:z,onBlur:_,onKeyDown:t=>{var n,o;"Enter"===t.key&&(M.current="keyboard"),null===(n=(o=e.inputProps).onKeyDown)||void 0===n||n.call(o,t)}}),fullWidth:!0}))]}))})};var ge=n(35898),he=n(19284);const me={"& a":{color:"inherit",textDecoration:"underline",textDecorationColor:"currentColor","&:hover":{opacity:.8,textDecoration:"underline"},"&:visited":{color:"inherit"}}},fe=(0,D.ZP)(Z.ZP)({position:"relative",zIndex:1,width:"100%"}),ve=(0,D.ZP)(ge.Z)({gap:"var(--spacing-s, 16px)",width:"100%"}),xe=(0,D.ZP)(k.Z)({display:"flex",alignItems:"baseline",gap:"var(--spacing-2xs, 8px)"}),Ce=(0,D.ZP)(k.Z)({display:"flex",alignItems:"center",height:"1em"}),ye=(0,D.ZP)(he.Z,{shouldForwardProp:e=>"contrastTextColor"!==e})((e=>{let{contrastTextColor:t}=e;return{color:t,fontSize:"inherit",flexShrink:0}})),we=(0,D.ZP)(L.Z,{shouldForwardProp:e=>"contrastTextColor"!==e})((e=>{let{contrastTextColor:t}=e;return{color:t}})),be=(0,D.ZP)(L.Z,{shouldForwardProp:e=>"contrastTextColor"!==e})((e=>{let{contrastTextColor:t}=e;return(0,S.Z)({color:t},me)})),Ze=(0,D.ZP)(k.Z)({position:"relative",width:"100%"}),Se=(0,D.ZP)(k.Z)({position:"relative",width:"100%"}),ke=(0,D.ZP)(Z.ZP)({position:"relative",zIndex:1,width:"100%",rowGap:"var(--spacing-s, 16px)"}),Le=(0,D.ZP)(k.Z)({display:"flex",alignItems:"baseline",gap:"var(--spacing-2xs, 8px)"}),je=e=>{return"number"===typeof(t=e)&&t in O?O[e]:O[F];var t},Te=e=>{let{HeadingTag:t,headingVariant:n,heading:o,description:r,contrastTextColor:i,suggestion:a,suggestions:s,handleChange:l,handleSuggestionClick:c,handleSubmit:u,showSparkleIcon:d,searchWidth:p,suggestionSize:g=10,dropdownOpen:h,isLoading:m=!1,dropdownHeading:f=E,showClearAction:v=!1,onClearAction:x,onDropdownOpen:C,placeholder:y}=e;const w=r?b.Z.sanitize(r):"",{xs:S,sm:k,md:L}=je(p);return(0,de.jsx)(fe,{container:!0,justifyContent:"center",children:(0,de.jsx)(Z.ZP,{item:!0,xs:S,sm:k,md:L,"data-testid":"search-variant-grid-item",children:(0,de.jsxs)(ve,{children:["string"===typeof o&&!!o.trim()&&(0,de.jsx)(we,{component:t,variant:n,contrastTextColor:i,children:o}),r&&(0,de.jsxs)(xe,{children:[d&&(0,de.jsx)(Ce,{children:(0,de.jsx)(ye,{contrastTextColor:i})}),(0,de.jsx)(be,{component:"div",contrastTextColor:i,dangerouslySetInnerHTML:{__html:w}})]}),(0,de.jsx)(Ze,{component:"form",onSubmit:e=>u(e,a),children:(0,de.jsx)(Se,{children:(0,de.jsx)(pe,{suggestion:a,searchFieldLabel:"string"===typeof y&&y.trim()||"Search",dropdownHeading:f,suggestions:s,onChange:l,onSuggestionClick:c,open:h,isLoading:m,suggestionSize:g,showClearAction:v,onClearAction:x,onDropdownOpen:C})})})]})})})},Pe=e=>{let{HeadingTag:t,headingVariant:n,heading:o,description:r,contrastTextColor:i}=e;const a=r?b.Z.sanitize(r):"";return(0,de.jsxs)(ke,{container:!0,children:["string"===typeof o&&!!o.trim()&&(0,de.jsx)(Z.ZP,{item:!0,xs:12,md:8,children:(0,de.jsx)(we,{component:t,variant:n,contrastTextColor:i,children:o})}),(0,de.jsx)(Z.ZP,{item:!0,xs:12,md:6,children:r&&(0,de.jsx)(Le,{children:(0,de.jsx)(be,{component:"div",contrastTextColor:i,dangerouslySetInnerHTML:{__html:a}})})})]})},Me=(0,D.ZP)(k.Z,{shouldForwardProp:e=>"backgroundColor"!==e})((e=>{let{backgroundColor:t}=e;return{backgroundColor:t}})),Ie=(0,D.ZP)(k.Z,{shouldForwardProp:e=>"contrastTextColor"!==e})((e=>{let{contrastTextColor:t}=e;return{position:"relative",color:t,minHeight:"180px",display:"flex",alignItems:"center",paddingTop:"40px",paddingBottom:"40px",overflow:"hidden"}})),Ae=(0,D.ZP)("img")((e=>{let{theme:t}=e;return{position:"absolute",right:0,bottom:0,width:"auto",height:"auto",maxWidth:"none",maxHeight:"none",transform:"translateX(75%)",pointerEvents:"none",[t.breakpoints.up("md")]:{transform:"none"}}})),Re=e=>{const{searchResultsPage:t,heading:n,description:i,fileReference:a,requestValue:s,suggestionSize:c=A,region:u,collection:d=I,variant:h=P,headingLevel:m=M,showSparkleIcon:f=!0,suggestionsFile:v,useApiSuggestions:x=!0,manualSuggestions:C=[],searchWidth:y=F,placeholder:b,dropdownOpen:Z}=e,S="search"===h,k="generic"===m?"div":m.toLowerCase(),L=o.useMemo((()=>{const e=document.querySelector('input[name="search-debounce-ms"]'),t=null!==e&&void 0!==e&&e.value?parseInt(e.value,10):500;return isNaN(t)?500:t}),[]),j=o.useMemo((()=>{const e=document.querySelector('input[name="collection"]');return(null===e||void 0===e?void 0:e.value)||d}),[d]),T=v&&!x,R=(e=>{let{suggestionsFile:t,suggestionSize:n,debounceMs:r=500,manualSuggestions:i=[],initialLoad:a=!1}=e;const[s,c]=(0,o.useState)(i.length>0?i.map((e=>({text:e}))):[]),[u,d]=(0,o.useState)(""),[p,g]=(0,o.useState)([]),[h,m]=(0,o.useState)(!a),[f,v]=(0,o.useState)(null),x=(0,o.useRef)(null);(0,o.useEffect)((()=>
1{if(!t)return g([]),v(null),void m(!1);(async()=>{m(!0),v(null);try{let e=t;!t||t.startsWith("/")||t.startsWith("http")||(e="/".concat(t));const n=await fetch(e);if(!n.ok)return v("Failed to load suggestions file: ".concat(n.status," ").concat(n.statusText)),g([]),void m(!1);const o=await n.json();if(!Array.isArray(o))return v("Suggestions file must contain a JSON array"),g([]),void m(!1);g(o),m(!1)}catch(e){const t=e instanceof Error?e.message:"Unknown error loading suggestions";v(t),g([]),m(!1)}})().catch((e=>{console.error("Unexpected error loading suggestions file",e),m(!1)}))}),[t]);const C=(0,o.useCallback)((e=>{if(!e)return i.length>0?i.map((e=>({text:e}))):[];if(0===p.length)return[{text:e}];const t=l(e,"preserve-quoted-phrases").toLowerCase(),o=p.filter((e=>e.text&&e.text.toLowerCase().includes(t))).slice(0,n);return 0===o.length?[{text:e}]:o}),[p,n,i]),y=(0,o.useCallback)((e=>{if(d(e),x.current&&clearTimeout(x.current),!e)return i.length>0?c(i.map((e=>({text:e})))):c([]),void m(!1);m(!0),x.current=setTimeout((()=>{const t=C(e);c(t),m(!1)}),r)}),[C,r,i]),w=(0,o.useCallback)((e=>{d(e),c([])}),[]);return{suggestion:u,suggestions:s,setSuggestion:d,handleChange:y,handleSuggestionClick:w,isLoading:h,error:f}})({suggestionsFile:T?v:void 0,suggestionSize:c,debounceMs:L,manualSuggestions:C,initialLoad:!!Z}),O=g({suggestionSize:c,region:u,collection:j,debounceMs:L,manualSuggestions:C}),{suggestion:H,suggestions:W,setSuggestion:D,handleChange:z}=T?R:O,{history:_,hasHistory:q,ensureLoaded:N,addHistoryItem:U,clearHistory:B}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const[n,r]=(0,o.useState)((()=>t?e.getItems():[])),[i,a]=(0,o.useState)(t),s=(0,o.useCallback)((()=>{i||(r(e.getItems()),a(!0))}),[e,i]),l=(0,o.useCallback)((t=>{const n=e.addItem(t);r(n),a(!0)}),[e]),c=(0,o.useCallback)((()=>{e.clearItems(),r([]),a(!0)}),[e]);return{history:n,hasHistory:n.length>0,hasLoaded:i,ensureLoaded:s,addHistoryItem:l,clearHistory:c}}(void 0,!!Z),V=T?R.isLoading:O.isLoading,{handleSubmit:G}=p(t,j,U),K=0===H.trim().length&&q,J=o.useMemo((()=>_.slice(0,c).map((e=>({text:e.query})))),[_,c]),$=K?J:W,Q=K?"Your search history":E,Y=o.useCallback((()=>{N()}),[N]),X=o.useCallback((()=>{B(),z("")}),[B,z]);(0,o.useEffect)((()=>{Z&&N()}),[Z,N]);const ee=o.useCallback((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pointer";"keyboard"!==t?G({preventDefault:()=>{}},e):D(e)}),[G,D]);(0,o.useEffect)((()=>{s&&(D(s),z(s))}),[s,D,z]);const te=(0,r.Z)(),ne=te.palette.primary.main,oe=te.palette.getContrastText(ne);return(0,de.jsx)(Me,{"data-testid":"banner-root",backgroundColor:ne,children:(0,de.jsxs)(Ie,{"data-testid":"custom-search-banner","data-disable-mock":T?"true":"false",className:"l-padding",contrastTextColor:oe,children:[a&&(0,de.jsx)(Ae,{src:a,alt:"","aria-hidden":!0}),S?(0,de.jsx)(Te,{HeadingTag:k,headingVariant:"h1",heading:n,description:i,contrastTextColor:oe,suggestion:H,suggestions:$,handleChange:z,handleSuggestionClick:ee,handleSubmit:G,showSparkleIcon:f,searchWidth:y,suggestionSize:c,dropdownOpen:Z,isLoading:V,dropdownHeading:Q,showClearAction:K,onClearAction:X,onDropdownOpen:Y,placeholder:b}):(0,de.jsx)(Pe,{HeadingTag:k,headingVariant:"h1",heading:n,description:i,contrastTextColor:oe})]})})};Re.displayName="GeneralPageBanner";const Ee=Re}
1,58212:(e,t,n)=>{n.d(t,{j:()=>r,l:()=>i});var o=n(14987);const r=e=>e?o.Z.sanitize(e):"",i=e=>{if(!e)return"";const t=["javascript:","data:","vbscript:","file:","about:"],n=e.toLowerCase().trim();for(const o of t)if(n.startsWith(o))return"";if(e.startsWith("/"))try{const t=new URL(e,"http://dummy.base"),n=new URLSearchParams;t.searchParams.forEach(((e,t)=>{const r=o.Z.sanitize(t,{ALLOWED_TAGS:[],KEEP_CONTENT:!0}),i=o.Z.sanitize(e,{ALLOWED_TAGS:[],KEEP_CONTENT:!0});r&&i&&n.set(r,i)}));const r=n.toString();let i=t.pathname;return r&&(i+="?".concat(r)),i+=t.hash,i}catch(r){return""}try{const t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return"";const n=new URLSearchParams;t.searchParams.forEach(((e,t)=>{const r=o.Z.sanitize(t,{ALLOWED_TAGS:[],KEEP_CONTENT:!0}),i=o.Z.sanitize(e,{ALLOWED_TAGS:[],KEEP_CONTENT:!0});r&&i&&n.set(r,i)}));const r="".concat(t.protocol,"//").concat(t.host).concat(t.pathname),i=n.toString(),a=t.hash?t.hash:"";return i?"".concat(r,"?").concat(i).concat(a):"".concat(r).concat(a)}catch(i){return""}}}}]);

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.