"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9003],{39003:function(e,t,r){r.r(t),r.d(t,{SocialEmbed:function(){return z}});var i,s,n=r(2784),a=r(8529),o=r(41857),l=r(72326),c=r(97766),p=r(19453),d=r(28885),u=r(87330),h=r(60299),m=r(92526),f=r(52322),w=p.default.div.withConfig({componentId:"sc-1lci2gm-0"})([""," background-color:",";color:",";display:flex;justify-content:center;align-items:center;min-height:100px;border-radius:10px;",""],(0,u.xv)("large1","alternate"),function(e){return e.theme.colors.palette.greys.lighter},function(e){return e.theme.colors.palette.greys.darker},(0,h.e)({top:3,bottom:3,left:2,right:2})),x=p.default.p.withConfig({componentId:"sc-1lci2gm-1"})(["width:fit-content;",""],(0,m.o)({top:1,bottom:1,left:2,right:2})),g=function(){return(0,f.jsx)(w,{"data-testid":"cookie-message-fallback",children:(0,f.jsx)(x,{children:(0,d.ag)("socialembed.cookie.fallback.message")})})},b=r(7328),j=r(48840),y=j.zo.div(i||(i=(0,b.Z)(["\n display: flex;\n justify-content: center;\n padding: "," 0;\n\n iframe,\n & > div {\n display: block;\n }\n"])),(0,j.W0)(1));j.zo.div(s||(s=(0,b.Z)(["\n max-width: 326px;\n max-height: 620px;\n margin: 0 auto;\n"])));var k=function(){var e=(0,o.ND)(),t=e.youtubeConsentRequired,r=e.showOptanonFooterLink;if(!t||!r)return!0;var i=(0,c._)(l.r9);return!!i&&(0,l.pM)(i)},v=function(e){var t=e.match(/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\/”"'\&\?]*).*/);return t&&11===t[2].length?t[2]:""},A=function(e){var t=n.useState(null),r=(0,a.Z)(t,2),i=r[0],s=r[1];if(n.useEffect(function(){s(k);var e=window.OptanonWrapper;window.OptanonWrapper=function(){null==e||e(),window.Optanon.OnConsentChanged(function(){s(k)})}},[]),null===i)return null;if(!i)return(0,f.jsx)(g,{});var o=v(e.url);return(0,f.jsx)(y,{children:(0,f.jsx)("iframe",{title:e.title||"YouTube Video",src:"//youtube.com/embed/".concat(o,"?autoplay=0"),frameBorder:"0",width:e.width||"640px",height:e.height||"390px",allow:"accelerometer; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,tabIndex:0})})},F=function(e){var t=e.url.includes("video"),r=(null==e?void 0:e.width)||"500",i=null!=e&&e.height||t?"280":"759",s=new URL(t?"https://www.facebook.com/plugins/video.php":"https://www.facebook.com/plugins/post.php");return s.searchParams.set("href",e.url),s.searchParams.set("width",r.replace(/\D/g,"")),s.searchParams.set("height",i.replace(/\D/g,"")),s.searchParams.set("show_text","true"),s.searchParams.set("appId",""),(0,f.jsx)(y,{children:(0,f.jsx)("iframe",{title:e.title||"Facebook Post",src:s.toString(),frameBorder:"0",width:r,height:i,allow:"clipboard-write; encrypted-media; picture-in-picture",allowFullScreen:!0,scrolling:"no"})})},W=r(97729),C=r.n(W),S=function(e){return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(C(),{children:(0,f.jsx)("script",{id:"twitter-embed",async:!0,src:"https://platform.twitter.com/widgets.js"},"twitter-embed")}),(0,f.jsx)(y,{children:(0,f.jsx)("blockquote",{className:"twitter-tweet",style:{overflow:"hidden",maxWidth:"100%"},children:(0,f.jsx)("a",{href:e.url,children:e.url})})})]})},P=function(e){return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(C(),{children:(0,f.jsx)("script",{src:"//www.instagram.com/embed.js",id:"instagram-embed",async:!0},"instagram-embed")}),(0,f.jsx)(y,{children:(0,f.jsx)("blockquote",{className:"instagram-media","data-instgrm-permalink":e.url,"data-instgrm-version":"13",style:{backgroundColor:"#FFF",border:0,borderRadius:"3px",boxShadow:"0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15)",margin:"1px",padding:0,maxWidth:"540px",minWidth:"326px",width:"100%"}})})]})},_=function(e){var t=e.url.match(/(?:https?:\/\/www\.)?tiktok\.com\S*?\/video\/(\w{19})\/?/),r=t&&t[1];return!e.isAmp&&r?(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(C(),{children:(0,f.jsx)("script",{id:"tiktok-embed",async:!0,src:"https://www.tiktok.com/embed.js"},"tiktok-embed")}),(0,f.jsx)(y,{children:(0,f.jsx)("blockquote",{className:"tiktok-embed",cite:e.url,"data-video-id":r,style:{maxWidth:"605px",minWidth:"325px",overflow:"hidden"},children:(0,f.jsx)("section",{children:(0,f.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:e.url,children:e.url})})})})]}):null},N=function(e){return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(C(),{children:(0,f.jsx)("script",{src:"//assets.pinterest.com/js/pinit.js",id:"pinterest-embed",async:!0,defer:!0},"interest-embed")}),(0,f.jsx)(y,{children:(0,f.jsx)("a",{href:e.url,"data-pin-do":"embedPin",style:{overflow:"hidden",maxWidth:"100%"},children:e.url})})]})},Z=function(e){if(e.isAmp)return null;var t="",r=e.url.match(/^https?:\/\/(?:open|play)\.spotify\.com\/(?:track|album|artist|show|episode|playlist)\/[a-zA-Z0-9]{22}\/?$/)?"spotify:".concat(e.url.replace(/^https?:\/\/(?:open|play)\.spotify\.com\//,"").split("/").join(":")):!!e.url.match(/^https?:\/\/(?:open|play)\.spotify\.com\/user\/[^:]+\/playlist\/[a-zA-Z0-9]{22}\/?$/)&&"spotify:".concat(e.url.replace(/^https?:\/\/(?:open|play)\.spotify\.com\//,"").split("/").join(":"))||"";if(!r)return null;var i=r.match(/^spotify:(track|album|user|artist|show|episode|playlist):[^:]+(?::(playlist):[A-Za-z0-9]+)?/),s=i&&!i[2]&&"playlist"===i[1];if(i){if(s)t="playlist";else if(!i[2])switch(i[1]){case"track":case"album":case"user":case"show":case"episode":t=i[1]}}var n="episode"===t||"show"===t,a="".concat(n?"https://open.spotify.com/embed-podcast":"https://open.spotify.com/embed","/").concat(r.replace("spotify:","").split(":").join("/"));return(0,f.jsx)(y,{children:(0,f.jsx)("iframe",{title:e.title||"Spotify Embed",src:a,width:e.width||n?"100%":300,height:e.height||n?232:380,frameBorder:"0",allow:"encrypted-media"})})},z=function(e){switch(e.provider){case"youtube":return(0,f.jsx)(A,{url:e.url,width:e.width,height:e.height,isAmp:e.isAmp});case"facebook":return(0,f.jsx)(F,{url:e.url,width:e.width,height:e.height,isAmp:e.isAmp});case"twitter":return(0,f.jsx)(S,{url:e.url,isAmp:e.isAmp});case"instagram":return(0,f.jsx)(P,{url:e.url,isAmp:e.isAmp});case"tiktok":return(0,f.jsx)(_,{url:e.url,isAmp:e.isAmp});case"pinterest":return(0,f.jsx)(N,{url:e.url,isAmp:e.isAmp});case"spotify":return(0,f.jsx)(Z,{url:e.url,isAmp:e.isAmp})}}}}]); //# sourceMappingURL=9003.06c09c3f887dd572.js.map