1import{u as K,r as t,j as e,s as o}from"./index-BXap9RHO.js";import{C as q}from"./CTA-CYwndJTY.js";import{C as G}from"./CTAArrowLeft-CMp8S4Ro.js";import{C as J}from"./CTAArrowRight-Di_jAGZi.js";import{H as Q}from"./Headline-VDjbu2ME.js";import"./ScalamentoSignet-BqVOTx-M.js";const te=()=>{const{t:n,i18n:h}=K(),c=t.useRef(null),x=o.CTA.library.circleColor,v=o.CTA.library.arrowColor,[R,T]=t.useState(!1),[F,B]=t.useState(!1),[w,z]=t.useState({}),j=r=>z(s=>({...s,[r]:!0})),[d,W]=t.useState([]),[g,N]=t.useState(Array(d.length).fill(!1)),[D,b]=t.useState(!0),[P,m]=t.useState(!1),[y,O]=t.useState(d),[u,C]=t.useState([]),[p,V]=t.useState([]);t.useEffect(()=>{M()},[h.language]),t.useEffect(()=>{A()},[d]),t.useEffect(()=>{N(Array(d.length).fill(!1))},[d]),t.useEffect(()=>{const r=c.current;if(r)return r.addEventListener("scroll",L),()=>{r.removeEventListener("scroll",L)}},[]),t.useEffect(()=>{A()},[u,p]),t.useEffect(()=>{k()},[y]),t.useEffect(()=>{const r=()=>{k()};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),t.useEffect(()=>{const r=()=>{window.Cookiebot&&window.Cookiebot.consent&&(T(window.Cookiebot.consent.marketing),B(window.Cookiebot.consent.statistics))};return window.addEventListener("CookiebotOnAccept",r),window.addEventListener("CookiebotOnDecline",r),r(),()=>{window.removeEventListener("CookiebotOnAccept",r),window.removeEventListener("CookiebotOnDecline",r)}},[]);const k=()=>{if(c.current){const{scrollWidth:r,clientWidth:s}=c.current;b(!0),m(r<=s)}},L=()=>
1{if(c.current){const{scrollLeft:r,scrollWidth:s,clientWidth:l}=c.current;b(r<=0),m(r>=s-l-10)}},S=r=>{if(c.current){const{scrollLeft:s,scrollWidth:l,clientWidth:i}=c.current,a=s+r;b(a<=0),m(a>=l-i),c.current.scrollBy({left:r,behavior:"smooth"})}},U=r=>{const s=[...g];s[r]=!s[r],N(s)},M=()=>{const r=n("Library.Items",{returnObjects:!0})||[];W(r)},$=({resource:r})=>e.jsxs("div",{className:"library-resource-banner",children:[e.jsxs("div",{className:"library-resource-banner-description",children:[e.jsx("span",{className:"inter-m-l",children:n("Library.Filters.Categories.".concat(r.Type))}),e.jsx("div",{className:"spacer-4xs"}),e.jsx("span",{className:"inter-xl-b",children:r.Title}),e.jsx("div",{className:"spacer-4xs"}),e.jsx("span",{className:"inter-m-l",children:r.Author})]}),e.jsx("div",{className:"library-resource-banner-arrow",children:e.jsxs("picture",{children:[e.jsx("source",{srcSet:"\r\n library/[email protected] 1x,\r\n library/[email protected] 1.5x,\r\n library/[email protected] 2x,\r\n library/[email protected] 3x\r\n ",type:"image/webp"}),e.jsx("img",{width:"64",height:"39",src:"library/[email protected]",alt:"Arrow Icon"})]})})]}),E=r=>{const{Cover:s,Title:l,ItemId:i}=r;return e.jsx("div",{className:"library-resource-image",role:"button",tabIndex:0,"aria-label":"".concat(l," â ").concat(n("Library.Play")),onClick:()=>j(i),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),j(i))},style:{backgroundImage:"url(resources/".concat(s,".webp)"),backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",position:"relative"},children:e.jsx("span",{"aria-hidden":"true",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"64px",height:"64px",borderRadius:"50%",background:"rgba(0,0,0,0.55)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("span",{style:{width:0,height:0,borderStyle:"solid",borderWidth:"11px 0 11px 18px",borderColor:"transparent transparent transparent #ffffff",marginLeft:"4px"}})})})};function _(r,s){const{Source:l,ItemId:i,Title:a,Cover:f}=r;switch(l){case"YouTube":return R?w[i]?e.jsx("iframe",{className:"library-resource-video",title:a,src:"".concat(o.libraryResourceSlider.YouTubeBaseUrl).concat(i,"?controls=1&hl=").concat(h.language),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):E(r):e.jsx("button",{onClick:()=>Cookiebot.renew(),className:"library-resource-consent-button",children:"".concat(s("Library.ConsentButton.Start")," ").concat(s("Library.ConsentButton.Marketing")).concat(s("Library.ConsentButton.End"))});case"Whitepaper":return e.jsx("div",{className:"library-resource-image",alt:a,style:{backgroundImage:"url(resources/".concat(f,".webp)"),backgroundSize:"cover",backgroundPosition:"center"},children:e.jsx("a",{href:"".concat(o.libraryResourceSlider.WhitepaperBaseUrl).concat(i,".pdf"),download:!0,target:"_blank",rel:"noreferrer","aria-label":"".concat(a," â ").concat(s("Library.Download")),children:e.jsx("div",{className:"library-resource-action-overlay inter-m-bold",children:s("Library.Download")})})});case"Amazon":return e.jsx("div",{className:"library-resource-image",alt:a,style:{backgroundImage:"url(resources/".concat(f,".webp)"),backgroundSize:"cover",backgroundPosition:"center"},children:e.jsx("a",{href:"".concat(o.libraryResourceSlider.AmazonBaseUrl).concat(i,"?tag=").concat(o.libraryResourceSlider.AmazonTrackingId),target:"_blank",rel:"noreferrer","aria-label":"".concat(a," â ").concat(s("Library.Buy")),children:e.jsx("div",{className:"library-resource-action-overlay inter-m-bold",children:s("Library.Buy")})})});case"Deezer":return F?w[i]?e.jsx("iframe",{className:"library-resource-video",title:a,src:"".concat(o.libraryResourceSlider.DeezerBaseUrl).concat(i),allowtransparency:"true",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"}):E(r):e.jsx("button",{onClick:()=>Cookiebot.renew(),className:"library-resource-consent-button",children:"".concat(s("Library.ConsentButton.Start")," ").concat(s("Library.ConsentButton.Statistics")).concat(s("Library.ConsentButton.End"))});case"LinkOut":return e.jsx("div",{className:"library-resource-image",alt:a,style:{backgroundImage:"url(resources/".concat(f,".webp)"),backgroundSize:"cover",backgroundPosition:"center"},children:e.jsx("a",{href:i,target:"_blank",rel:"noreferrer","aria-label":"".concat(a," â ").concat(s("Library.Download")),children:e.jsx("div",{className:"library-resource-action-overlay inter-m-bold",children:s("Library.Download")})})});default:return e.jsx("div",{children:s("Library.Unsupported")})}}const H=(r,s)=>{const l=i=>{i.stopPropagation(),U(s)};return e.jsx("div",{className:"library-resource-flip-card",id:r.Cover,children:e.jsxs("div",{className:"library-resource-flip-card-inner ".concat(g[s]?"flipped":""),onClick:l,children:[e.jsxs("div",{className:"library-resource-flip-card-front",children:[e.jsx("div",{className:"library-resource-flip-card-front-upper",children:_(r,n)}),e.jsx("div",{className:"library-resource-flip-card-front-lower",children:e.jsx($,{resource:r})})]}),e.jsxs("div",{className:"library-resource-flip-card-back",children:[e.jsxs("div",{className:"library-resource-flip-card-back-upper",children:[e.jsx("div",{className:"library-resource-info-counter back byrd-l-xb",children:s+1}),e.jsx("div",{className:"inter-s-l library-resource-summary",children:r.Summary})]}),e.jsx("div",{className:"library-resource-flip-card-back-lower",children:e.jsx($,{resource:r})})]})]})},"".concat(r.Title,"-").concat(s))},I=(r,s)=>{C(s==="all"?[]:[s])},Y=(r,s)=>{const l=i=>i==="all"?u.length===0:u.length===1&&u.includes(i);return e.jsxs("div",{className:s,children:[e.jsx("button",{className:"inter-xl-l library-resource-filter-button ".concat(l("all")?"active":""),onClick:()=>I(r,"all"),children:n("Library.Filters.Categories.All")}),o.libraryResourceSlider.filterOptions[r].map(({key:i,i18nKey:a})=>e.jsx("button",{className:"inter-xl-l library-resource-filter-button ".concat(l(i)?"active":""),onClick:()=>I(r,i),children:n(a)},i))]})},A=()=>{let r=d;u.length>0&&(r=r.filter(s=>u.includes(s.Level))),p.length>0&&(r=r.filter(s=>!p.includes(s.Type))),O(r)};return e.jsxs("section",{className:"module library",id:"library",children:[e.jsx(Q,{hlType:"library",signet
1:"",items:2,line:!0,width:"s"}),e.jsxs("div",{className:"container library-container",children:[e.jsx("div",{className:"library-intro-column-left",children:e.jsx("span",{className:"inter-2xl-l",children:n("Library.Intro.1")})}),e.jsx("div",{className:"library-intro-column-right",children:e.jsx("span",{className:"inter-2xl-l",children:n("Library.Intro.2")})})]}),e.jsxs("div",{className:"library-resource-container",children:[e.jsx("div",{className:"library-scroll-arrow left ".concat(D?"library-scroll-arrow-hidden":""),onClick:()=>S(-window.innerWidth*o.libraryResourceSlider.scrollFactor),children:e.jsx(G,{circleColor:x,arrowColor:v})}),e.jsx("div",{className:"library-resource-slider",ref:c,children:y.length>0?y.map((r,s)=>H(r,s)):e.jsx("div",{className:"library-no-items-container",children:e.jsxs("div",{className:"library-no-items-message inter-m-bold",children:[n("Library.NoItems.1"),e.jsx("br",{}),n("Library.NoItems.2")]})})}),e.jsx("div",{className:"library-scroll-arrow right ".concat(P?"library-scroll-arrow-hidden":""),onClick:()=>S(window.innerWidth*o.libraryResourceSlider.scrollFactor),children:e.jsx(J,{circleColor:x,arrowColor:v})})]}),e.jsx("div",{className:"library-resource-filters",children:Y("levels","filter-group")}),e.jsx("div",{className:"spacer-xl"}),e.jsx(q,{ctaType:"library"})]})};export{te as default}; 2//# sourceMappingURL=Library-CCnciGKt.js.map
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.