1"use strict";(self.webpackChunk_nrf=self.webpackChunk_nrf||[]).push([[489],{12489(l,e,t){t.r(e),t.d(e,{default:()=>v});t(96656),t(92221),t(5858),t(65136),t(25601),t(45993);var n=t(48445),i=t(57583),o=t(14343),a=t(96551),s=t(14041),r=t(49667),u=t(3382),c=t(17106),d=t(74510),g=t(56175),h=t(31085);const v=function({service:l,showTrustPilotWidget:e=!1}){const[{context:t},v]=(0,i.Bs)(l),{initValues:m,prefillData:y,categoryChildren:f}=t,p={type:n.P.BEGIN,initData:Object.assign({},m,{headlessProps:void 0}),questionsToPrefill:null==y?void 0:y.questionsToPrefill,questionsToSkip:null==y?void 0:y.questionsToSkip,matchedSellerHashes:(null==m?void 0:m.matchedSellerHashes)||[],isCBO:(null==m?void 0:m.isCBO)||!1},{t:b}=(0,a.B)("nrf"),[P,k]=(0,s.useState)(null),[w,x]=(0,s.useState)(null),T=null==f?void 0:f.children,{theme:B}=(0,r.tx)(),C=B?{back:"custom",continue:"custom"}:{};if(!f||!T||!T.length)return p&&v({type:n.P.BEGIN,initData:p}),(0,h.jsx)(h.Fragment,{});const V=(0,u.K8)(T);let j;0===V.length&&(j=(0,u.Ox)(T));const I=()=>{var l;const e=null!=(l=document.getElementById("nrf-modal"))?l:document.getElementById("_nrfcontainer");null==e||e.scrollIntoView({behavior:"smooth",block:"start"})};return(0,h.jsx)("div",{className:"tw-relative",children:(0,h.jsxs)(o.v,{backText:b("button.back"),continueText:b("button.continue"),title:null==f?void 0:f.name,subtitle:b("modal.category-selection.subheader"),error:w,onContinue:async()=>{var l,e,i,o,a,s,r,u;if(!P)return I(),void x(b("modal.category-selection.select-category-error"));const g=Number(P),h=null==(l=t.initValues)?void 0:l.country_id,m=null!=(e=null!=(i=null==(o=t.projectData)?void 0:o.location)?i:null==(a=t.initValues)?void 0:a.locationData)?e:null,y=T.find(l=>l.id===g),f=null!=(s=null==y?void 0:y.polaris_target_category_id)?s:g;if(null!=(r=null==(u=t.initValues)?void 0:u.allowPolarisRedirect)&&r){var k,w,B,C,V;if(await(0,d.Tm)({countryId:h,selectedCategoryId:f,locationData:m,lang:null!=(k=null==(w=t.initValues)?void 0:w.lang)?k:c.Fh.lang,locale:null!=(B=null==(C=t.initValues)?void 0:C.locale)?B:c.Fh.locale,originalSearchParams:(null==(V=t.initValues)?void 0:V.originalSearchParams)||""}))return}I(),p.initData.category_id=g,v(Object.assign({type:n.P.BEGIN},p))},loading:!1,isFirst:!0,showTrustPilotWidget:e,buttonTypes:C,children:[V.length>0&&(0,h.jsx)(r.Fz,{type:"radio",name:"category-selection",className:"tw-grid-cols-2 p-0",options:V,onChange:l=>{k(l),x(null)}}),0===V.length&&j&&(0,h.jsx)(g.V,{question:j,answers:[],providerNounPlural:"",onChange:(l,e)=>{k(e),x(null)}})]})})}}}]);
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.