PageSourceSearch

https://www.dnb.com/etc.clientlibs/dnb-marketing-website/clientlib…/resources/static/js/9249.539f496e.chunk.js

js dnb.com collected 2026-09-24 09:07:17 UTC 29,628 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdnb_marketing_website=self.webpackChunkdnb_marketing_website||[]).push([[9249],{4682:function(e,n,a){a.r(n),a.d(n,{default:function(){return ye}});var t=a(46804),r=a(65043),o=a(67357),l=a(19424),i=a(58387),s="duns-lookup_title__c-wno",d="duns-lookup_description__pELtk",u="duns-lookup_formContainer__JLEKg",c="duns-lookup_containerFullWidth__h2XCe",m="duns-lookup_formRow__Jncyy",p="duns-lookup_twoColumnContainer__QKJ6u",h="duns-lookup_searchResultsContainer__c2kQ2",v="duns-lookup_dark__bqb+b",y="duns-lookup_light__gf5Og",x="duns-lookup_companyName__hfEC1",g="duns-lookup_autocompleteWrapper__Q7d3T",b="duns-lookup_notListedDisclaimer__i9pmm",N="duns-lookup_companyInfo__RCSqk",f="duns-lookup_inputError__5C-HH",C="duns-lookup_fadeOut__16Op1",j="duns-lookup_searchResultsRight__wYfgI",k="duns-lookup_panelOverrides__jemOA",S="duns-lookup_tabTitle__-x50B",T="duns-lookup_ukCompanyName__8Zk2r",_="duns-lookup_ukCompanyInfo__GjHgi",w="duns-lookup_searchResultsDescription__xfsNZ",R="duns-lookup_tabPanel__9wUnc",L="duns-lookup_panelContent__9XeFh",B="duns-lookup_tab__Uv5yz",A="duns-lookup_ukFormDescriptionWrapper__XG-6j",P="duns-lookup_tabContainer__L8try",$="duns-lookup_tabList__D85vu",F="duns-lookup_caTitle__OzYZu",I="duns-lookup_caDescription__Z
1HaJU",E=a(8227),D=a(73221),O=a(94767),U=a(40150),H=a(10714),q=a(79330),z=a(28311),M=a(70579);const J=(0,z.e)("/_jcr_content.sendemailservlet.json"),V={firstName:"",lastName:"",email:""},Y=e=>{let{error:n}=e;return(0,M.jsx)("div",{className:f,children:n})},Z=e=>{let{formTheme:n,formHeadingText:a,formSubHeadingText:t,companyName:o,streetAddress:l,city:p,state:h,postalCode:g,formSubmitCta:b,thankYouPageUrl:f,emailIntroText:C,emailEndText:j,emailSubject:k,duns:S,requiredFieldErrorText:T}=e;const _=(0,r.useRef)(null),[w,R]=(0,r.useState)(!1);(0,r.useEffect)((()=>{_.current&&_.current.scrollIntoView({behavior:"smooth"})}),[]);const L={firstName:e=>""===e.toString().trim()?T:void 0,lastName:e=>""===e.toString().trim()?T:void 0,email:e=>""===e.toString().trim()?T:void 0},{values:B,errors:A,handleChange:P,handleFocus:$,handleBlur:F,handleSubmit:I}=(0,U.mN)({initialValues:V,validators:L,formContainerCssName:u});return(0,M.jsx)("div",{className:(0,i.A)(c),ref:_,children:(0,M.jsxs)("div",{children:[a&&(0,M.jsx)("h1",{className:(0,i.A)(s,{[v]:"dark"===n,[y]:"light"===n}),children:a}),t&&(0,M.jsx)("div",{className:(0,i.A)(d,{[v]:"dark"===n,[y]:"light"===n}),children:(0,M.jsx)("p",{children:t})}),(0,M.jsxs)("form",{className:u,onSubmit:async e=>{e.preventDefault();if(!I(e))return;R(!0);const n={emailBody:`<br><div>Dear ${B.firstName},\n      <br>${null!==C&&void 0!==C?C:""}\n      ${o?`<div><span style="font-weight: bold">Company:</span> ${o}</div>`:""}\n      ${l?`<div><span style="font-weight: bold">Street:</span> ${l}</div>`:""}\n      ${p?`<div><span style='font-weight: bold'>City:</span> ${p}</div>`:""}\n      ${h?`<div><span style='font-weight: bold'>State:</span> ${h}</div>`:""}\n      ${g?`<div><span style="font-weight: bold">Postal Code:</span> ${g}</div>`:""}\n      <div><span style="font-weight: bold">D-U-N-S\xa9 Number:</span> ${S}</div>\n      <br>${null!==j&&void 0!==j?j:""}</div><br><br>`,emailRecipient:B.email,emailSubject:null!==k&&void 0!==k?k:"D-U-N-S Number Request",emailContentType:"text/html"};await(async(e,n,a)=>{try{200===(await H.A.post(a,{body:JSON.stringify(e)})).status&&(window.location.href=null!==n&&void 0!==n?n:"")}catch(t){console.log("Error submitting form",t)}})(n,f,J)},"data-cy":"duns-lookup-ca-form",children:[(0,M.jsxs)("div",{className:N,children:[(0,M.jsx)("span",{className:x,children:o}),(0,M.jsx)("span",{children:l}),(0,M.jsxs)("span",{children:[h," ",g]}),(0,M.jsx)("span",{children:p})]}),(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("input",{placeholder:"First Name","aria-label":"First Name",name:"firstName",value:B.firstName,onChange:P,onFocus:$,"data-cy":"duns-lookup-form-first-name",onBlur:F}),A.firstName&&(0,M.jsx)(Y,{error:A.firstName})]}),(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("input",{placeholder:"Last Name","aria-label":"Last Name",name:"lastName",value:B.lastName,onChange:P,onFocus:$,"data-cy":"duns-lookup-form-last-name",onBlur:F}),A.lastName&&(0,M.jsx)(Y,{error:A.lastName})]}),(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("input",{placeholder:"Email","aria-label":"Email",name:"email",type:"email",pattern:q.Uo.source,value:B.email,onChange:P,onFocus:$,onBlur:F,"data-cy":"duns-lookup-form-email"}),A.email&&(0,M.jsx)(Y,{error:A.email})]}),(0,M.jsx)("div",{className:m,children:(0,M.jsx)(O.$,{disabled:w,variant:"primary",size:"medium",theme:"light",icon:"arrowRight",type:"submit","data-cy":"duns-lookup-form-submit",children:null!==b&&void 0!==b?b:"Submit"})})]})]})})},G=["Alberta","British Columbia","Manitoba","New Brunswick","Newfoundland and Labrador","Nova Scotia","Ontario","Prince Edward Island","Quebec","Saskatchewan","Northwest Territories","Nunavut","Yukon Territory"],K=["organization.primaryName","organization.primaryAddress.streetAddress.line1","organization.primaryAddress.addressLocality.name","organization.primaryAddress.addressRegion.name","organization.primaryAddress.postalCode"],Q=e=>{const{theme:n,title:a,description:t,countryCode:o,companySearchPlaceholder:l,notListedCta:s,notListedCtaUrl:d,caProvinceText:u,companyNameLabelText:c}=e,[h,x]=(0,r.useState)(u),b=(0,r.useRef)(null),[N,f]=(0,r.useState)(null);(0,r.useEffect)((()=>{const e=e=>{var n;"form"!==(null===(n=e.state)||void 0===n?void 0:n.step)&&f(null)};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)}),[]);return N?(0,M.jsx)(Z,{...e,...N}):(0,M.jsxs)("div",{className:p,children:[(0,M.jsxs)("div",{className:(0,i.A)({[v]:"dark"===n,[y]:"light"===n}),children:[(0,M.jsx)("h3",{className:(0,i.A)(F),children:a}),(0,M.jsx)("p",{className:I,children:t})]}),(0,M.jsxs)("div",{children:[(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("label",{htmlFor:"province",children:u}),(0,M.jsx)("select",{onChange:e=>x(e.target.value),id:"province",name:"province","data-cy":"duns-lookup-province-select",children:[u,...G].map(((e,n)=>(0,M.jsx)("option",{value:e,children:e},n)))})]}),(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("label",{htmlFor:"duns-lookup-company-search-input",children:c}),(0,M.jsx)("div",{className:g,children:(0,M.jsx)(he,{id:"duns-lookup-company-search-input",notListedCta:s,notListedCtaUrl:d,countryCode:o,companySearchPlaceholder:l,ref:b,onCompanySelection:e=>{window.history.pushState({step:"form"},"",window.location.pathname),f(e)},isDisabled:h===u||""===h,extraSearchParams:{addressRegion:h},pathToDetails:K})})]})]})]})};var W=a(62340),X=a(44881);const ee=e=>{let{tabIndex:n,uniqueTabListId:a,hidden:t,fadeOut:r,title:o,children:l}=e;return(0,M.jsx)("div",{className:(0,i.A)(R,{[C]:r}),id:`panel-${a}-${n}`,role:"tabpanel",tabIndex:-1,"aria-labelledby":`tab-${a}-${n}`,hidden:t,children:(0,M.jsxs)("div",{className:(0,i.A)(L,k),children:[(0,M.jsx)("h2",{className:S,children:o}),l]})},n)},ne=e=>{let{tabIndex:n,uniqueTabListId:a,activeTabIndex:t,clickHandler:r,label:o,testId:l}=e;return(0,M.jsx)("button",{className:B,role:"tab","aria-selected":n===t?"true":"false","aria-controls":`panel-${a}-${n}`,id:`tab-${a}-${n}`,tabIndex:0,onClick:()=>r(n),"data-cy":l,children:o},n)},ae=(e,n)=>n?`\n    <tr>\n      <td style="padding-bottom: 5px;">\n        <strong style="font-weight: bold;">${e}:</strong> ${n}\n      </td>\n    </tr>\n  `:"",te=e=>{const{firstName:n,emailIntroText:a,companyName:t,streetAddress:r,city:o,state:l,postalCode:i,duns:s,emailEndText:d,emailDisclaimerText:u}=e;return`\n    <body style="margin: 0; padding: 0; width: 100%; background-color:#d4d4d4;">\n      <table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-color:#d4d4d4; height: 100%;">\n        <tr>\n          <td align="center" valign="middle" style="padding: 20px 10px;">\n            <table width="600" align="center" border="0" cellpadding="0" cellspacing="0" style="width:600px; max-width: 100%; margin:0 auto; background-color:#ffffff;">\n              <tbody>\n                <tr>\n                  <td style="padding: 30px; font-size:14px; line-height:22px; color:#000000; font-family:Arial, Helvetica, sans-serif;">\n                    <p style="margin: 0 0 1em 0;">Dear ${n},</p>\n                    <p style="margin: 0 0 1em 0;">${null!==a&&void 0!==a?a:""}</p>\n                    <table border="0" cellpadding="0" cellspacing="0" style="margin: 20px 0;">\n                      <tbody>\n                        ${ae("Company",t)}\n                        ${ae("Street",r)}\n                        ${ae("City",o)}\n                        ${ae("State",l)}\n                        ${ae("Postal Code",i)}\n                        ${ae("D-U-N-S\xa9 Number",s)}\n                      </tbody>\n                    </table>\n                    <p style="margin: 0;">${null!==d&&void 0!==d?d:""}</p>\n                  </td>\n                </tr>\n              </tbody>\n            </table>\n            <table width="600" align="center" border="0" cellpadding="0" cellspacing="0" style="width:600px; max-width: 100%; margin:0 auto;">\n              <tbody>\n                <tr>\n                  <td style="padding: 20px 30px; font-size:11px; line-height:16px; color:#4c4b4c; font-family:Arial, Helvetica, sans-serif; text-align: center;">\n                    ${null!==u&&void 0!==u?u:""}\n                  </td>\n                </tr>\n              </tbody>\n            </table>\n          </td>\n        </tr>\n      </table>\n    </body>\n    </html>\n  `},re=(0,z.e)("/_jcr_content.sendemailservlet.json"),oe=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,le={firstName:"",lastName:"",email:""},ie=e=>{let{error:n}=e;return(0,M.jsx)("div",{className:f,children:n})},se=e=>{let{formTheme:n,formHeadingText:a,formSubHeadingText:t,companyName:o,streetAddress:l,city:d,state:u,postalCode:h,formSubmitCta:x,thankYouPageUrl:g,emailIntroText:b,emailEndText:N,emailDisclaimerText:f,emailSubject:C,duns:j,firstNameLabel:k,firstNamePlaceholder:S,lastNameLabel:T,lastNamePlaceholder:_,emailLabel:R,emailPlaceholder:L,requiredFieldErrorText:B}=e;const P=(0,r.useRef)(null),[$,F]=(0,r.useState)(!1),[I,E]=(0,r.useState)(null);(0,r.useEffect)((()=>{P.current&&P.current.scrollIntoView({behavior:"smooth",block:"center"})}),[]);const D={firstName:e=>""===e.toString().trim()?B:void 0,lastName:e=>""===e.toString().trim()?B:void 0,email:e=>""===e.toString().trim()?B:void 0},{values:q,errors:z,handleChange:J,handleFocus:V,handleBlur:Y,handleSubmit:Z}=(0,U.mN)({initialValues:le,validators:D,formContainerCssName:p});return(0,M.jsx)("div",{className:(0,i.A)(c),ref:P,children:(0,M.jsxs)("div",{className:p,children:[(0,M.jsxs)("div",{className:A,children:[a&&(0,M.jsx)("h1",{className:(0,i.A)(s,{[v]:"dark"===n,[y]:"light"===n}),children:a}),t&&(0,M.jsx)("div",{className:(0,i.A)(w,{[v]:"dark"===n,[y]:"light"===n}),children:(0,M.jsx)("p",{children:t})})]}),(0,M.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),E(null);if(!Z(e))return;F(!0);const n={emailBody:te({firstName:q.firstName,emailIntroText:b,companyName:o,streetAddress:l,city:d,state:u,postalCode:h,duns:j,emailEndText:N,emailDisclaimerText:f}),emailRecipient:q.email,emailSubject:null!==C&&void 0!==C?C:"D-U-N-S Number Request",emailContentType:"text/html"},a=await(async(e,n)=>{try{return{success:200===(await H.A.post(n,{body:JSON.stringify(e)})).status}}catch(a){return console.error("Error submitting form",a),{success:!1}}})(n,re);a.success?window.location.href=null!==g&&void 0!==g?g:"":(E("Sorry, there was a problem submitting your request. Please try again."),F(!1))},"data-cy":"duns-lookup-uk-form",children:[(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("label",{htmlFor:"firstName",children:k}),(0,M.jsx)("input",{id:"firstName",placeholder:S,name:"firstName",value:q.firstName,onChange:J,onFocus:V,onBlur:Y,"data-cy":"duns-lookup-form-first-name"}),z.firstName&&(0,M.jsx)(ie,{error:z.firstName})]}),(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("label",{htmlFor:"lastName",children:T}),(0,M.jsx)("input",{id:"lastName",placeholder:_,name:"lastName",value:q.lastName,onChange:J,onFocus:V,onBlur:Y,"data-cy":"duns-lookup-form-last-name"}),z.lastName&&(0,M.jsx)(ie,{error:z.lastName})]}),(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("label",{htmlFor:"email",children:R}),(0,M.jsx)("input",{id:"email",placeholder:L,name:"email",type:"email",pattern:oe.source,value:q.email,onChange:J,onFocus:V,onBlur:Y,"data-cy":"duns-lookup-form-email"}),z.email&&(0,M.jsx)(ie,{error:z.email}),I&&(0,M.jsx)(ie,{error:I})]}),(0,M.jsx)("div",{className:m,children:(0,M.jsx)(O.$,{disabled:$,variant:"primary",size:"medium",theme:"light",icon:"arrowRight",type:"submit","data-cy":"duns-lookup-form-submit",children:null!==x&&void 0!==x?x:"Submit"})})]})]})})},de=e=>{let{error:n}=e;return(0,M.jsx)("div",{className:f,children:n})},ue=r.forwardRef(((e,n)=>{let{title:a,descriptionHTML:t,company:r,onclick:o,selectButtonText:l}=e;const d=r?[r.streetAddress?r.streetAddress.replace(/,\s*$/,""):null,r.city,r.postalCode].filter(
1Boolean).join(", "):"";return(0,M.jsx)("div",{ref:n,className:(0,i.A)(h,{[C]:!r}),"data-cy":"duns-lookup-uk-selection-card",children:r&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{children:[(0,M.jsx)("div",{className:s,children:a}),t&&(0,M.jsx)("div",{className:w,dangerouslySetInnerHTML:t})]}),(0,M.jsx)("div",{className:j,children:(0,M.jsxs)("div",{children:[(0,M.jsx)("div",{className:T,children:r.companyName}),(0,M.jsx)("div",{className:_,children:d}),(0,M.jsx)("div",{children:(0,M.jsx)(O.$,{variant:"primary",size:"medium",icon:"arrowRight",type:"button",onClick:o,"data-cy":"duns-lookup-uk-selection-continue",children:l})})]})})]})})})),ce=["organization.primaryName","organization.primaryAddress.streetAddress.line1","organization.primaryAddress.addressLocality.name","organization.primaryAddress.postalCode"],me={searchByCompanyNameCountry:"",searchByRegNumCountry:"",postTown:"",postCode:"",companyRegistrationNumber:"",companyName:""},pe=e=>{const{title:n,companySearchPlaceholder:a,ukCompanySearchTitle:t,ukRegistrationSearchTitle:o,ukRegistrationSearchTabText:i,ukCompanySearchTabText:d,ukSearchButtonText:u,companyNameLabelText:c,ukCountryText:p="",ukPostTownText:h,ukPostCodeText:v,ukCompanyRegistrationNumberText:y,ukSearchResultsTitle:x,ukSearchResultsDescriptionHTML:b,ukCompanySelectButtonText:N,notListedCtaUrl:f,notListedCta:C,theme:j}=e,k={[p]:"",Ireland:"IE","United Kingdom":"GB"},S=(0,r.useRef)(null),T=(0,r.useRef)(null),[_,w]=(0,r.useState)(me),[R,L]=(0,r.useState)(""),[B,A]=(0,r.useState)(""),[F,I]=(0,r.useState)(null),[E,D]=(0,r.useState)(!1),[U,H]=(0,r.useState)(!1),[q,J]=(0,r.useState)(null),[V,Y]=(0,r.useState)(0),[Z,G]=(0,r.useState)(0),K=(0,l.zE)(2),Q=""===_.searchByRegNumCountry||""===_.companyRegistrationNumber||E,ae=e=>{q&&clearTimeout(q),G(e),J(setTimeout((()=>Y(e)),500))};(0,r.useEffect)((()=>{const e=e=>{var n;"form"!==(null===(n=e.state)||void 0===n?void 0:n.step)&&(I(null),H(!1))};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)}),[]),(0,r.useEffect)((()=>{S.current&&F&&S.current.scrollIntoView({behavior:"smooth",block:"end"})}),[F]);const te=e=>{const{name:n,value:a}=e.currentTarget;w((e=>({...e,[n]:a}))),!B||"companyName"!==n&&"postTown"!==n&&"postCode"!==n&&"searchByCompanyNameCountry"!==n||A(""),!R||"companyRegistrationNumber"!==n&&"searchByRegNumCountry"!==n||L("")};return F&&U?(0,M.jsx)(se,{...e,...F}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("div",{className:s,children:n}),(0,M.jsxs)("div",{className:P,children:[(0,M.jsxs)("div",{role:"tablist",className:$,children:[(0,M.jsx)(ne,{uniqueTabListId:K,tabIndex:0,activeTabIndex:Z,clickHandler:ae,label:null!==d&&void 0!==d?d:"Search By Company Name"}),(0,M.jsx)(ne,{uniqueTabListId:K,tabIndex:1,activeTabIndex:Z,clickHandler:ae,label:null!==i&&void 0!==i?i:"Search By Registration Number",testId:"duns-lookup-uk-registration-tab"})]}),(0,M.jsxs)(ee,{uniqueTabListId:K,tabIndex:0,hidden:0!==V,fadeOut:0!==Z,title:null!==t&&void 0!==t?t:"Search By Company Name",children:[(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("label",{htmlFor:"searchByCompanyNameCountry",children:p}),(0,M.jsx)("select",{id:"searchByCompanyNameCountry",name:"searchByCompanyNameCountry",onChange:te,"data-cy":"search-by-company-name-country",children:Object.entries(k).map(((e,n)=>{let[a,t]=e;return(0,M.jsx)("option",{value:t,children:a},n)}))})]}),(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("label",{htmlFor:"postTown",children:h}),(0,M.jsx)("input",{id:"postTown",placeholder:h,name:"postTown",onChange:te,"data-cy":"post-town"})]}),(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("label",{htmlFor:"postCode",children:v}),(0,M.jsx)("input",{id:"postCode",placeholder:v,name:"postCode",onChange:te,"data-cy":"post-code"})]}),(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("label",{htmlFor:"duns-lookup-uk-company-search-input",children:c}),(0,M.jsx)("div",{className:g,children:(0,M.jsx)(he,{id:"duns-lookup-uk-company-search-input",countryCode:_.searchByCompanyNameCountry,companySearchPlaceholder:a,ref:T,onCompanySelection:e=>{I(e),A("")},isDisabled:""===_.searchByCompanyNameCountry,extraSearchParams:{addressLocality:_.postTown||void 0,postalCode:_.postCode||void 0},pathToDetails:ce,notListedCtaUrl:f,notListedCta:C})}),B&&(0,M.jsx)(de,{error:B})]})]}),(0,M.jsxs)(ee,{uniqueTabListId:K,tabIndex:1,hidden:1!==V,fadeOut:1!==Z,title:null!==o&&void 0!==o?o:"Search By Registration Number",children:[(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("label",{htmlFor:"companyRegistrationNumber",children:y}),(0,M.jsx)("input",{id:"companyRegistrationNumber",disabled:""===_.searchByRegNumCountry,placeholder:y,name:"companyRegistrationNumber",onChange:te,"data-cy":"company-registration-number"}),R&&(0,M.jsx)(de,{error:R})]}),(0,M.jsxs)("div",{className:m,children:[(0,M.jsx)("label",{htmlFor:"searchByRegNumCountry",children:p}),(0,M.jsx)("select",{id:"searchByRegNumCountry",onChange:te,name:"searchByRegNumCountry","data-cy":"search-by-reg-num-country",children:Object.entries(k).map(((e,n)=>{let[a,t]=e;return(0,M.jsx)("option",{value:t,children:a},n)}))})]}),(0,M.jsx)("div",{className:m,children:(0,M.jsx)(O.$,{disabled:Q,variant:"primary",size:"medium",theme:j,icon:"arrowRight",type:"button",onClick:async()=>
1{if(D(!0),I(null),""!==_.companyRegistrationNumber){const e=await(async e=>{let{countryISOAlpha2Code:n,registrationNumbers:a,companyName:t,postalCode:r,city:o,signal:l}=e;const i={unencryptedDUNS:!0};return n&&(i.countryISOAlpha2Code=n),a&&(i.registrationNumbers=a),t&&(i.searchTerm=t),r&&(i.postalCode=r),o&&(i.addressLocality=o),await(0,W.V)(`${(0,z.e)("/_jcr_content.criteriasearchservlet.json?")}`+new URLSearchParams(i).toString(),{validator:e=>X.w.safeParse(e),options:{signal:l}}).then((e=>{var n;return e.isSuccess()?null!==(n=e.value)&&void 0!==n?n:null:(console.error(JSON.parse(e.error.message)),null)})).catch((e=>(console.log(e),null)))})({countryISOAlpha2Code:_.searchByRegNumCountry,registrationNumbers:[_.companyRegistrationNumber]}),n=null===e||void 0===e?void 0:e.searchCandidates;if(n&&n.length>0)if(1===n.length){const e=(e=>{var n,a,t,r,o,l,i,s,d,u,c,m,p;const h=e.organization;return{companyName:null!==(n=h.primaryName)&&void 0!==n?n:null,streetAddress:null!==(a=null===(t=h.primaryAddress)||void 0===t||null===(r=t.streetAddress)||void 0===r?void 0:r.line1)&&void 0!==a?a:null,city:null!==(o=null===(l=h.primaryAddress)||void 0===l||null===(i=l.addressLocality)||void 0===i?void 0:i.name)&&void 0!==o?o:null,state:null!==(s=null===(d=h.primaryAddress)||void 0===d||null===(u=d.addressRegion)||void 0===u?void 0:u.name)&&void 0!==s?s:null,postalCode:null!==(c=null===(m=h.primaryAddress)||void 0===m?void 0:m.postalCode)&&void 0!==c?c:null,duns:null!==(p=h.duns)&&void 0!==p?p:null}})(n[0]);e.duns||L("No D-U-N-S\xa9 number found for the provided company registration number. Please check the number and try again."),I(e)}else L("Multiple companies found for company registration number. Please enter the exact company registration number.");else L("Please enter a valid company registration number.");D(!1)}},"data-cy":"duns-lookup-uk-registration-search",children:null!==u&&void 0!==u?u:"Search Now"})})]})]}),(0,M.jsx)(ue,{ref:S,title:null!==x&&void 0!==x?x:"Your search results",onclick:()=>{window.history.pushState({step:"form"},"",window.location.pathname),A(""),L(""),w(me),H(!0)},selectButtonText:null!==N&&void 0!==N?N:"Select",company:F,descriptionHTML:b})]})},he=(0,r.forwardRef)(((e,n)=>{let{id:a,countryCode:t,companySearchPlaceholder:o,onCompanySelection:l,extraSearchParams:i,isDisabled:s,notListedCtaUrl:d,notListedCta:u,pathToDetails:c}=e;const m=(0,r.useRef)(null),p=(0,r.useRef)(!1),h=(0,r.useRef)(i);h.current=i;return(0,r.useEffect)((()=>{const e=document.createElement("a");e.className=b,e.innerText=null!==u&&void 0!==u?u:"Not listed? Request a D-U-N-S Number.",e.href=null!==d&&void 0!==d?d:"#",e.target="_blank",e.rel="noopener",e.id="duns-lookup-not-listed-disclaimer",m.current=e}),[]),(0,r.useEffect)((()=>{var e,a;if(!n||"function"===typeof n)return;const r=n.current;if(!r)return;const o=(0,E.n)(r,c,((e,n)=>(async(e,n,a,t)=>{const r=JSON.parse(JSON.stringify({searchTerm:e,countryISOAlpha2Code:n||void 0,unencryptedDUNS:!0,isDelisted:!1,...t}));return await(0,W.V)(`${(0,z.e)("/_jcr_content.typeaheadsearch.json?")}`+new URLSearchParams(r).toString(),{validator:e=>D.ys.safeParse(e),options:{signal:a}}).then((e=>{var n;return e.isSuccess()?null!==(n=e.value)&&void 0!==n?n:null:(console.error(JSON.parse(e.error.message)),null)})).catch((e=>(console.log(e),null)))})(e,t,n,h.current)),(e=>{var n,a,t,r,o,i,s,d,u,c,h,v,y;let{organization:x}=e;return(e=>{p.current=!0,m.current&&(m.current.style.display="none"),l(e)})({companyName:null!==(n=x.primaryName)&&void 0!==n?n:null,streetAddress:null!==(a=null===(t=x.primaryAddress)||void 0===t||null===(r=t.streetAddress)||void 0===r?void 0:r.line1)&&void 0!==a?a:null,city:null!==(o=null===(i=x.primaryAddress)||void 0===i||null===(s=i.addressLocality)||void 0===s?void 0:s.name)&&void 0!==o?o:null,state:null!==(d=null===(u=x.primaryAddress)||void 0===u||null===(c=u.addressRegion)||void 0===c?void 0:c.name)&&void 0!==d?d:null,postalCode:null!==(h=null===(v=x.primaryAddress)||void 0===v?void 0:v.postalCode)&&void 0!==h?h:null,duns:null!==(y=x.duns)&&void 0!==y?y:null})})),i=r.nextSibling;"loader"===i.className&&(i.style.display="none");const s=null===(e=r.parentNode)||void 0===e?void 0:e.querySelector("ul");if(!s)return;const d=m.current;if(!d)return;var u;!s||!s.parentNode||null!==s&&void 0!==s&&null!==(a=s.parentNode)&&void 0!==a&&a.querySelector("#duns-lookup-not-listed-disclaimer")||(null===s||void 0===s||null===(u=s.parentNode)||void 0===u||u.insertBefore(d,null===s||void 0===s?void 0:s.nextSibling));const v=()=>{p.current=!1;const{height:e}=r.getBoundingClientRect();d.style.top=`${s.clientHeight+e}px`,r.value.length>1&&0===s.children.length?d.style.display="block":r.value.length<=1?d.style.display="none":d.style.display=s.style.display};r.addEventListener("input",v);const y=new MutationObserver((()=>{p.current||v()}));return y.observe(s,{attributes:!0,attributeFilter:["style"]}),()=>{y.disconnect(),r.removeEventListener("input",v),null===o||void 0===o||o()}}),[n,t]),(0,M.jsx)("input",{id:a,disabled:s,placeholder:null!==o&&void 0!==o?o:"Company Name",ref:n,"data-cy":"duns-lookup-company-search"})})),ve=e=>{let{data:n}=e;const{backgroundColor:a,reduceTopSpacing:t,reduceBottomSpacing:r,id:o,countryCode:s}=n,d=(0,l.ws)(t,r),u=(0,l.af)(a);return s?(0,M.jsx)("section",{id:null!==o&&void 0!==o?o:void 0,style:{...d,...u},className:(0,i.A)("defaultContainer"),"data-cy":"duns-lookup",children:(0,M.jsx)("div",{className:"defaultLayoutOuter",children:(0,M.jsx)("div",{className:"defaultLayoutInner defaultGrid",children:"CA"===s?(0,M.jsx)(Q,{...n}):"UK"===s?(0,M.jsx)(pe,{...n}):(0,M.jsx)("div",{children:"Unexpected error occured"})})})}):(0,M.jsx)("p",{children:"Region is not correctly set. Please configure it in the author"})};var ye=e=>{const{data:n}=e,a={id:null===n||void 0===n?void 0:n.id,backgroundColor:null===n||void 0===n?void 0:n.backgroundColor,theme:null===n||void 0===n?void 0:n.theme,reduceTopSpacing:null===n||void 0===n?void 0:n.reduceTopSpacing,reduceBottomSpacing:null===n||void 0===n?void 0:n.reduceBottomSpacing,countryCode:null===n||void 0===n?void 0:n.region,title:null===n||void 0===n?void 0:n.title,de
1scription:null===n||void 0===n?void 0:n.description,companySearchPlaceholder:null===n||void 0===n?void 0:n.companySearchPlaceholder,notListedCta:null===n||void 0===n?void 0:n.notListedCta,notListedCtaUrl:null===n||void 0===n?void 0:n.notListedCtaUrl,formTheme:null===n||void 0===n?void 0:n.formTheme,formBackgroundColor:null===n||void 0===n?void 0:n.formBackgroundColor,formSubmitCta:null===n||void 0===n?void 0:n.formSubmitCta,thankYouPageUrl:null===n||void 0===n?void 0:n.thankYouPageUrl,formHeadingText:null===n||void 0===n?void 0:n.formHeadingText,formSubHeadingText:null===n||void 0===n?void 0:n.formSubHeadingText,emailIntroText:null===n||void 0===n?void 0:n.emailIntroText,emailEndText:null===n||void 0===n?void 0:n.emailEndText,emailDisclaimerText:null===n||void 0===n?void 0:n.emailDisclaimerText,emailSubject:null===n||void 0===n?void 0:n.emailSubject,ukCompanySearchTitle:null===n||void 0===n?void 0:n.ukCompanySearchTitle,ukCompanySearchTabText:null===n||void 0===n?void 0:n.ukCompanySearchTabText,ukRegistrationSearchTitle:null===n||void 0===n?void 0:n.ukRegistrationSearchTitle,ukRegistrationSearchTabText:null===n||void 0===n?void 0:n.ukRegistrationSearchTabText,ukSearchButtonText:null===n||void 0===n?void 0:n.ukSearchButtonText,caProvinceText:null===n||void 0===n?void 0:n.caProvinceText,companyNameLabelText:null===n||void 0===n?void 0:n.companyNameLabelText,ukPostCodeText:null===n||void 0===n?void 0:n.ukPostCodeText,ukCountryText:null===n||void 0===n?void 0:n.ukCountryText,ukPostTownText:null===n||void 0===n?void 0:n.ukPostTownText,ukCompanyRegistrationNumberText:null===n||void 0===n?void 0:n.ukCompanyRegistrationNumberText,ukSearchResultsTitle:null===n||void 0===n?void 0:n.ukSearchResultsTitle,ukSearchResultsDescriptionHTML:{__html:null===n||void 0===n?void 0:n.ukSearchResultsDescriptionHTML},ukCompanySelectButtonText:null===n||void 0===n?void 0:n.ukCompanySelectButtonText,firstNameLabel:null===n||void 0===n?void 0:n.firstNameLabel,lastNameLabel:null===n||void 0===n?void 0:n.lastNameLabel,emailLabel:null===n||void 0===n?void 0:n.emailLabel,firstNamePlaceholder:null===n||void 0===n?void 0:n.firstNamePlaceholder,lastNamePlaceholder:null===n||void 0===n?void 0:n.lastNamePlaceholder,emailPlaceholder:null===n||void 0===n?void 0:n.emailPlaceholder,requiredFieldErrorText:(null===n||void 0===n?void 0:n.requiredFieldErrorText)||"This field is required.",noCompanyFoundErrorText:null===n||void 0===n?void 0:n.noCompanyFoundErrorText};return(0,M.jsx)("div",{id:(0,o.A)(e.cqPath),children:(0,M.jsx)(t.A,{children:(0,M.jsx)(ve,{data:a})})})}},40150:function(e,n,a){a.d(n,{TM:function(){return u},ZM:function(){return s},l6:function(){return c},mN:function(){return i},pd:function(){return d}});var t=a(65043),r=a(58387),o=a(1917),l=a(70579);const i=e=>{let{initialValues:n,validators:a={},formContainerCssName:r}=e;const[l,i]=(0,t.useState)(n),[s,d]=(0,t.useState)({}),[u,c]=(0,t.useState)({}),[m,p]=(0,t.useState)(!1),h=Object.keys(n).reduce(((e,n)=>(e[n]=n,e)),{}),v=e=>{if((0,o.cy)(e))return void e.forEach(v);const{name:n,value:a}="target"in e?{name:e.target.name,value:(0,o.SO)(e.target)?e.target.checked:e.target.value}:{name:e.name,value:e.value};i((e=>({...e,[n]:a}))),c((e=>({...e,[n]:!0}))),s[n]&&d((e=>({...e,[n]:void 0})))},y=(e,n)=>{var t,r;return null!==(t=null===(r=a[e])||void 0===r?void 0:r.call(a,n,l))&&void 0!==t?t:void 0},x=(e,n)=>{const a=y(e,n);d((n=>({...n,[e]:a})))};return{values:l,names:h,errors:s,isSubmitting:m,handleChange:v,handleFocus:e=>{const{name:n,value:a}=e.target,t=(0,o.SO)(e.target)?e.target.checked:a;u[n]?x(n,t):c((e=>({...e,[n]:!0})))},handleBlur:e=>{const{name:n}=e.target;d((e=>({...e,[n]:void 0})))},handleSubmit:e=>{e.preventDefault(),p(!0);let n=null;for(const a in l){const e=y(a,l[a]);if(void 0!==e){n=a,d((n=>({...n,[a]:e})));break}}if(n){const e=document.querySelector(`.${CSS.escape(r)} [name="${String(n)}"]`);return e&&(e.scrollIntoView({behavior:"smooth"}),e.focus()),!1}return!0}}},s=e=>{const n="customError"in e?e.customError:e.errors[e.name];return(0,l.jsx)(l.Fragment,{children:!!n&&(0,l.jsx)("div",{className:"error",children:n})})},d=e=>{let{name:n,values:a,names:t,errors:r,handleChange:o,handleFocus:i,handleBlur:d,children:u,...c}=e;return(0,l.jsxs)("div",{children:[(0,l.jsx)("input",{name:t[n],id:t[n],..."checkbox"===c.type?{checked:!!a[n]}:{value:a[n].toString()},onChange:o,onFocus:i,onBlur:d,...c}),u,(0,l.jsx)(s,{errors:r,name:n})]})},u=e=>{let{name:n,values:a,names:t,errors:o,handleChange:i,handleFocus:d,handleBlur:u,...c}=e;return(0,l.jsxs)("div",{children:[(0,l.jsx)("textarea",{name:t[n],id:t[n],value:a[n].toString(),onChange:i,onFocus:d,onBlur:u,className:o[n]?(0,r.A)("errorOutline",c.className):c.className,...c}),(0,l.jsx)(s,{errors:o,name:n})]})},c=e=>{let{name:n,values:a,names:t,errors:r,handleChange:o,handleFocus:i,handleBlur:d,children:u,...c}=e;return(0,l.jsxs)("div",{children:[(0,l.jsx)("select",{name:t[n],id:t[n],value:a[n].toString(),onChange:o,onFocus:i,onBlur:d,...c,children:u}),(0,l.jsx)(s,{errors:r,name:n})]})}}}]);

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.