1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6612],{66612:(e,t,n)=>{n.r(t),n.d(t,{default:()=>g});var s=n(80263),l=n(4958),o=n.n(l),a=n(98808),c=n(56505),r=n(55006),u=n(53239),i=n(78532),d=n(98845),h=n(81889);let g=e=>{let{data:{cards:t,cbProductsData:n,collectionData:l,widgetIdentifier:g,customCss:p,countryCodes:y,showCountrySelector:f}}=e,{isDataReady:C,userManageData:v}=(0,c.A)(),[w,D]=(0,u.useState)(!1),[b,k]=(0,u.useState)(""),[x,m]=(0,u.useState)(!0);(0,u.useEffect)(()=>{let e=!0;return(0,h.rh)(null!=y?y:[]).then(t=>{let{country:n,showUnavailableMessage:s}=t;e&&(k(n),D(s))}).finally(()=>{e&&m(!1)}),()=>{e=!1}},[]);let j=async(e,t,n)=>await r.u.getCheckoutUrl(v,e,t,n,(0,h.SL)()),I=(0,u.useId)();if(x)return(0,s.jsx)("div",{className:"text-gray-500",children:"Loading..."});let N={countries:(0,h.Ar)(null!=y?y:[]),onCountryChange:e=>{k(e),(0,h.u4)(e),D(!1)},value:b,showMessage:w,showDeliveryOptions:!1},O=p?"uid-".concat(I.replace(/[^a-zA-Z0-9_-]/g,"")):null,_=[],S=[],A=0;for(let e=0;e<t.length&&e<n.length;e++){var E;let s=t[e],l=n[e];s.className&&(null==(E=_[A])?void 0:E.length)>0&&A++,_[A]||(_[A]=[],S[A]=[]),S[A].push(l),_[A].push(s),s.className&&A++}let M=[];p&&M.push((0,s.jsx)(o(),{children:(0,s.jsx)("style",{children:"#".concat(O," ").concat(p)})}));for(let e=0;e<_.length&&e<S.length;e++)if(_[e][0].component){let t=i.X[_[e][0].component]||d.X[_[e][0].component];if(!t){console.error("Widget not found: ".concat(_[e][0].component));continue}M.push(t.render({configurationId:_[e][0].configurationId||"",data:{..._[e][0].data,collectionData:l}}))}else{for(let t=S[e].length-1;t>=0;t--)S[e][t].filter(e=>e.isDeactivated).length>0&&(S[e].splice(t,1),_[e].splice(t,1));M.push((0,s.jsx)(a.cx,{cards:_[e],cbProductsData:S[e],collectionData:l,isDataReady:C,getCheckoutUrl:j,widgetIdentifier:g,uniqueId:O,selectedCountry:b},"cb-products-".concat(e)))}0===M.length&&M.push((0,s.jsx)(a.cx,{cards:[],cbProductsData:[],collectionData:l,isDataReady:C,getCheckoutUrl:j,widgetIdentifier:g,uniqueId:O,selectedCountry:b},"cb-products"));let P=f&&(0,s.jsx)(a.wP,{countries:N.countries,value:N.value,showMessage:N.showMessage,showDeliveryOptions:N.showDeliveryOptions,deliveryOptions:N.deliveryOptions,onCountryChange:N.onCountryChange,onDeliveryChange:N.onDeliveryChange});return l.backgroundColour?(0,s.jsxs)("div",{className:"cb-products-background",style:{background:l.backgroundColour},children:[P,M]}):(0,s.jsxs)(s.Fragment,{children:[P,M]})}}}]);
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.