PageSourceSearch

https://www.lyco.co.uk/build/assets/downloads-BXUS20G6.js

js lyco.co.uk collected 2026-09-25 01:08:09 UTC 7,221 bytes, 1 lines download raw bytes

1import{r as j,K as k,j as o,a as F}from"./@react-core-DAiQxeIm.js";import{i as $,M as I}from"./MainLayout-BG0Ff-G8.js";import{M as R}from"./MetaHeader-Dyrie7Xm.js";import{r as L}from"./renderComponents-PVdm_eq0.js";import{M as B}from"./MyAccountWrapper-mik40Pjf.js";import{B as O}from"./Box-CxPHcaXv.js";import{B as T,u as A}from"./useModal-DijYsnd1.js";import{I as U,M as P}from"./WrapperLayout-DW7P2zvO.js";import{q as E,l as b,c as v}from"./app-Cyh6yV_e.js";import{s as N}from"./fetch-DIMp6ACm.js";import{C as H}from"./CheckboxField-BK9N_Z0R.js";import{D as q}from"./DownloadFileLarge-BGW9S6Sn.js";import"./MetricsEvents-ePHyF7G_.js";import"./useThemeVisuals-B1RdzApi.js";import"./useIsOnlineLightingShop-CZ-toRlz.js";import"./FormatPrice-DHQ3sYHY.js";import"./FormControlLabel-Bcb4cr0Z.js";import"./useFormControl-DSJeYsX0.js";import"./setPrototypeOf-B4fUID9J.js";import"./formControlState-Dq1zat_P.js";import"./Checkbox-CB79MFde.js";import"./assertThisInitialized-B9jnkVVz.js";import"./downloadFiles-C1i6x24B.js";const z={ImgBanner:$},G=e=>j.useMemo(()=>L({data:e,componentType:z}),[e]),W=({title:e,description:t,textLink:r,action:s,reference:n})=>{var m,w,p;const{t:c}=(m=k())==null?void 0:m.props,[u,h]=j.useState(!0);return o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"font-medium pb-4 mb-4 sm:pb-6 sm:mb-6 border-b border-colorBorder text-center",children:e}),o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx("p",{className:"max-sm:text-sm whitespace-pre-line",children:t}),o.jsx(H,{label:(p=(w=c==null?void 0:c.downloads)==null?void 0:w.privacy)==null?void 0:p.checkbox,onChange:x=>{h(x.target.checked)},isChecked:u}),o.jsx("div",{className:"flex",children:o.jsx(T,{typeStyles:"filled",size:"M",isDisabled:!u,action:s,reference:n,children:r})})]})]})},S=({data:e,action:t})=>o.jsxs("div",{className:"bg-white p-5 sm:p-6 rounded grid grid-cols-[50px_auto_20px] items-center gap-3 relative cursor-pointer border-2 border-transparent hover:border-colorPrimary duration-300",onClick:t,children:[o.jsx("img",{src:e==null?void 0:e.image,alt:"Download image"}),o.jsxs("div",{children:[(e==null?void 0:e.link)&&!t&&o.jsx("a",{href:e==null?void 0:e.link,className:"o-link-block cy-img-pdf-banner",target:"_blank"}),o.jsx("p",{className:"max-sm:text-sm text-xl max-sm:font-medium",children:e==null?void 0:e.title}),(e==null?void 0:e.subtitle)&&o.jsx("p",{className:"text-sm mt-2",children:e==null?void 0:e.subtitle})]}),o.jsx(U,{name:`${(e==null?void 0:e.icon)||"arrow-down-tray"}`,classIcon:`text-xl text-colorPrimary ${(e==null?void 0:e.classIcon)||""}`})]}),K=({data:e,action:t})=>{const r=E("#portal-root"),[s,n,c]=A();return o.jsxs(o.Fragment,{children:[o.jsx(S,{data:{...e,icon:"plus",classIcon:"!text-colorDefaultText"},action:n}),r&&F.createPortal(o.jsx(P,{isOpen:s,closeModal:c,classModal:"max-w-2xl pt-10",children:"Contenido checkbox"}),r)]})},V=({data:e,action:t})=>{var c,u,h,m,w,p,x;const{shared:r,t:s}=(c=k())==null?void 0:c.props,n=((u=r==null?void 0:r.lang)==null?void 0:u.iso)==="es"?"es":"en";return o.jsx(o.Fragment,{children:o.jsxs("div",{className:"relative flex flex-col gap-3 bg-white p-5 sm:p-6 rounded",children:[o.jsx("div",{className:"relative",children:o.jsxs("picture",{children:[o.jsx("source",{srcSet:`${(h=r==null?void 0:r.url)==null?void 0:h.img_url_account}banner_video_catalog_mobile_${n}.png`,media:"(max-width: 768px)"}),o.jsx("source",{srcSet:`${(m=r==null?void 0:r.url)==null?void 0:m.img_url_account}banner_video_catalog_mobile_2x_${n}.png`,media:"(max-width: 768px) and (-webkit-min-device-pixel-ratio: 2), (max-width: 768px) and (min-resolution: 192dpi)"}),o.jsx("img",{src:`${(w=r==null?void 0:r.url)==null?void 0:w.img_url_account}banner_video_catalog_desktop_${n}.png`,alt:e==null?void 0:e.title,className:"sm:max-h-[140px] object-cover w-full"})]})}),o.jsx("p",{className:"font-medium max-sm:text-sm",children:e==null?void 0:e.title}),(e==null?void 0:e.description)&&o.jsx("p",{className:"text-sm",children:e==null?void 0:e.description}),o.jsx(T,{typeStyles:"outline",size:"M",classButton:"w-full",iconName:"arrow-right",action:t,children:(x=(p=s==null?void 0:s.downloads)==null?void 0:p.video)==null?void 0:x.button})]})})},J="/ajax/customer/download/check-privacy",Q="/ajax/customer/download/accept-privacy",X=({data:e})=>{var D,M,C;const[t,r]=j.useState(!1),{configuration:s}=(D=k())==null?void 0:D.props,n=j.useRef("Component"+(e==null?void 0:e.idDownloadFile)),c=j.useRef(null),[u,h,m]=A(!1),p={DownloadFileLarge:q,DownloadFileSmall:S,DownloadFileMultiple:K,DownloadVideo:V}[e==null?void 0:e.component],x=()=>{window.open(e==null?void 0:e.link,"_blank")},i=f=>{t||(e==null?void 0:e.privacyPolicy)==!1?f&&typeof f=="function"?f():x():h()},y=async()=>{var f,_;b(c.current,!0);try{const g={shop_code:s==null?void 0:s.shopCode,id_download_file:e==null?void 0:e.idDownloadFile},l=await N(Q,g);(f=l==null?void 0:l.data)!=null&&f.error?v(new Error(((_=l==null?void 0:l.data)==null?void 0:_.error)||"Download privacy policy update API error"),{tags:{component:"download_skeleton"},level:"warning"}):(x(),r(!0),m())}catch(g){v(g,{tags:{component:"download_skeleton"}})}finally{b(c.current,!1)}},a=async()=>{var f,_;if(e!=null&&e.privacyPolicy){b(n.current,!0);try{const g={shop_code:s==null?void 0:s.shopCode,id_download_file:e==null?void 0:e.idDownloadFile},l=await N(J,g);(f=l==null?void 0:l.data)!=null&&f.error?v(new Error(((_=l==null?void 0:l.data)==null?void 0:_.error)||"Download privacy policy check API error"),{tags:{component:"download_skeleton_check"},level:"warning"}):r((l==null?void 0:l.status)||!1)}catch(g){v(g,{tags:{component:"download_skeleton_check"}})}finally{b(n.current,!1)}}};j.useEffect(()=>{a()},[]);const d=E("#portal-root");return o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:n,className:"relative",children:p&&o.jsx(p,{data:e,action:i})}),d&&F.createPortal(o.jsx(P,{isOpen:u,closeModal:m,classModal:"max-w-4xl",children:o.jsx(W,{action:y,title:(M=e==null?void 0:e.privacyPolicyData)==null?void 0:M.title,de
1scription:(C=e==null?void 0:e.privacyPolicyData)==null?void 0:C.content,textLink:e==null?void 0:e.textLink,reference:c})}),d)]})};function ae(e){var h,m,w,p,x;const{metas:t,userMenuCustomerArea:r,t:s,downloads:n}=k().props,c=G(e==null?void 0:e.downloadsCC),u=n==null?void 0:n.map(i=>{var y,a;return(y=i==null?void 0:i.downloads)!=null&&y.length?o.jsxs("li",{className:"mb-10",children:[o.jsx("p",{className:"sm:text-lg mb-6 font-medium",children:i==null?void 0:i.title}),o.jsx("ul",{className:"grid lg:grid-cols-2 gap-3",children:(a=i==null?void 0:i.downloads)==null?void 0:a.map(d=>o.jsx(X,{data:d},`DownloadSkeleton ${d==null?void 0:d.idDownloadFile}`))})]},`Downloads ${i==null?void 0:i.idDownloadGroup}`):null});return o.jsx(o.Fragment,{children:o.jsxs(I,{children:[o.jsx(R,{metas:t}),o.jsx(B,{titlePage:(h=s==null?void 0:s.downloads)==null?void 0:h.title_page,dataMenu:r,children:n!=null&&n.length?o.jsxs(o.Fragment,{children:[o.jsx("ul",{children:u}),o.jsx(o.Fragment,{children:c})]}):o.jsx(O,{title:(w=(m=s==null?void 0:s.downloads)==null?void 0:m.empty)==null?void 0:w.title,description:(x=(p=s==null?void 0:s.downloads)==null?void 0:p.empty)==null?void 0:x.description,hasClose:!1})})]})})}export{ae as default};

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.