1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4115],{4115:(e,t,r)=>{r.r(t),r.d(t,{default:()=>R});var o=r(54568),i=r(99596),n=r(7620),l=r(67207),a=r(74255),s=r(25278),d=r(22522),c=r(74402),u=r(48667),h=r(44425),p=r(49931),g=r(9155),m=r(75462),f=r(7183),b=r(72545),v=r(6706),w=r(66362);let x=e=>{let{title:t,description:r,imageUrl:x,conductor:_,subtitle:y,slug:$}=e,[S]=(0,n.useState)(new l.A.Value(1)),[j,k]=(0,n.useState)(!1),[C,W]=(0,n.useState)(!1),{push:A,back:L}=(0,v.r)(),{width:E,height:H}=(0,a.A)();(0,n.useEffect)(()=>{S.setValue(0),l.A.timing(S,{toValue:1,duration:300,useNativeDriver:!0}).start()},[t,x]),(0,n.useEffect)(()=>{var e,t;(null==(t=window)||null==(e=t.history)?void 0:e.length)>2&&k(!0)},[]);let z=d.HZ?window.location.href:"https://uraniamedia.it/format/".concat($||(null!=t?t:"").toString().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")),I=async()=>{if(d.HZ)W(!0);else try{await s.A.share({message:'Scopri "'.concat(t,'" su Urania News: ').concat(z),url:z})}catch(e){console.error("Errore durante la condivisione:",e)}};return(0,o.jsxs)(i.Se,{pos:"relative",h:d.HZ?H:H-250,...d.HZ&&{style:{minHeight:"100vh"}},w:"100%",overflow:"hidden",backgroundColor:"$secondary",children:[(0,o.jsxs)(l.A.View,{style:{opacity:S,flex:1},children:[(0,o.jsx)(c._,{source:{uri:(0,b.Q)(x,1920,1080)},width:"100%",height:"100%",objectFit:"cover"}),(0,o.jsx)(g.W,{pos:"absolute",top:0,left:0,right:0,bottom:0,colors:["rgba(0,0,0,0.7)","rgba(0,0,0,0.3)","rgba(0,0,0,0.7)"],locations:[0,.5,1]}),(0,o.jsx)(g.W,{pos:"absolute",bottom:0,w:"100%",h:"50%",colors:["$secondary","$secondary","transparent"],locations:[0,.1,1],start:[0,1],end:[0,0]}),(0,o.jsx)(i.Se,{pos:"absolute",bottom:0,w:"100%",px:d.HZ?"$10":"$3",pb:d.HZ?"$10":"$3",children:(0,o.jsxs)(i.Se,{w:d.HZ?"50%":"100%",$md:{w:"100%"},children:[j&&(0,o.jsxs)(i.lW,{ai:"center",gap:"$2",mb:"$8",opacity:.8,pressStyle:{opacity:1},cursor:"pointer",onPress:()=>{L()},children:[(0,o.jsx)(m.n,{color:"white",size:24}),(0,o.jsx)(u.E,{col:"white",fow:"500",children:"INDIETRO"})]}),(0,o.jsx)(h.pk,{col:"white",children:t}),y&&(0,o.jsx)(p.f,{col:"white",fos:18,mt:"$2",o:.8,children:y}),(0,o.jsx)(p.f,{col:"white",fos:16,fontWeight:"400",lh:24,ta:"left",mt:"$3",mb:"$6",maxWidth:d.HZ?"70%":"100%",o:.8,children:r}),_&&(0,o.jsxs)(p.f,{col:"white",fos:16,mb:d.HZ?"$8":"$4",o:.8,children:[_.includes("-")?"Conducono: ":"Conduce: ",_]}),(0,o.jsx)(h.Ql,{variant:"outlined",iconAfter:(0,o.jsx)(f.S,{size:20}),onPress:I,mb:d.HZ?"$8":"$4",children:"Condividi"})]})})]}),(0,o.jsx)(w.Z,{open:C,onOpenChange:W,url:z})]})},_={width:800,height:600,scale:1,fontScale:1};var y=r(24338);let $=_,S=null;function j(){if(!d.oc)return _;let e={fontScale:1,height:(S||=window.document.documentElement).clientHeight,scale:window.devicePixelRatio||1,width:S.clientWidth};return e.height!==$.height||e.width!==$.width||e.scale!==$.scale?($=e,e):$}let k=new Set;if(d.oc){let e=function(){t=Date.now(),k.forEach(e=>e(j()))},t=Date.now(),r,o=y.env.TAMAGUI_USE_WINDOW_DIMENSIONS_MAX_UPDATE_MS,i=o?+o:100;window.addEventListener("resize",()=>{clearTimeout(r);let o=Date.now()-t;o<i?setTimeout(()=>{e()},i-o):e()})}function C(e){return k.add(e),()=>k.delete(e)}var W=r(46184),A=r(9495),L=r(46608);let E=e=>{var t,r,l,a,s,g;let{episode:m,seasonNumber:v}=e,[x,y]=(0,n.useState)(!1),$=(0,L.Kn)(m.translations||[]),{width:S}=function({serverValue:e=_}={}){return n.useSyncExternalStore(C,j,()=>d.HZ?e:j())}(),k=S<768?8:30,E=(null==$||null==(t=$.descrizione)?void 0:t.split(" ").slice(0,k).join(" "))+((null==$?void 0:$.descrizione)&&(null==$||null==(r=$.descrizione)?void 0:r.split(" ").length)>k?"...":"");return(0,o.jsxs)(i.lW,{bg:"$darkBlue2",borderRadius:"$4",borderWidth:1,borderColor:"$violet",overflow:"hidden",p:"$3",$md:{flexDirection:"column"},children:[(0,o.jsx)(i.lW,{pressStyle:{opacity:.8},cursor:"pointer",flexShrink:0,w:d.HZ?"40%":"100%",position:"relative",children:(0,o.jsx)(A.N,{href:"/watch/".concat(m.slug),style:{width:"100%"},children:(0,o.jsx)(c._,{source:{uri:(0,b.Q)((null==(l=m.thumbnail_id)?void 0:l.id)||"",700,400)},width:"100%",aspectRatio:16/9,objectFit:"cover",borderRadius:"$4",$md:{width:"100%"},$sm:{width:"100%"}})})}),(0,o.jsx)(i.lW,{position:"absolute",top:"$5",right:"$6",zIndex:99,cursor:"pointer",pressStyle:{opacity:.8},onPress:()=>y(!0),children:(0,o.jsx)(f.S,{size:24,color:"$gray"})}),(0,o.jsx)(w.Z,{open:x,onOpenChange:y,url:"https://uraniamedia.it/program/episode/".concat(m.slug)}),(0,o.jsxs)(i.Se,{p:d.HZ?"$4":"$2",pt:d.HZ?"$2":"$4",f:1,gap:"$2",justifyContent:"space-between",children:[(0,o.jsxs)(i.Se,{gap:"$2",children:[(0,o.jsxs)(h.ot,{backgroundColor:"rgba(255,255,255,0.1)",children:["Stagione ",v," \xb7 Episodio ",m.episodio_numero]}),(0,o.jsxs)(i.lW,{gap:"$3",mt:"$4",mb:"$3",alignItems:"flex-start",flexWrap:"wrap",children:[(0,o.jsx)(i.Se,{width:"100%",mb:"$2",children:(0,o.jsx)(A.N,{href:"/watch/".concat(m.slug),children:(0,o.jsx)(u.E,{fontSize:"$5",fontWeight:"$500",color:"white",numberOfLines:2,ellipsizeMode:"tail",children:(null==$?void 0:$.t
1itolo)||""})})}),(0,o.jsxs)(i.lW,{ai:"center",gap:"$2",children:[(0,o.jsx)(W.z,{size:16,color:"white"}),(0,o.jsxs)(u.E,{fontSize:"$3",color:"$gray",children:[m.durata," min"]})]})]}),(null==$?void 0:$.descrizione)&&(0,o.jsx)(p.f,{color:"$gray",fontSize:"$3",width:d.HZ?"80%":"100%",children:E})]}),(0,o.jsx)(i.Se,{gap:"$3",children:(0,o.jsxs)(i.lW,{gap:"$1",mt:"$4",mb:"$3",$sm:{flexDirection:"column",flexWrap:"wrap"},children:[(0,o.jsx)(u.E,{color:"$gray",fontSize:"$3",children:"Con: "}),(0,o.jsx)(u.E,{color:"$gray",fontWeight:"$500",fontSize:"$3",children:m.conduttore?"".concat(m.conduttore.nome," ").concat(m.conduttore.cognome).trim():(null==m||null==(g=m.stagioni_id)||null==(s=g.format_id)||null==(a=s.persone_ids)?void 0:a.map(e=>{var t,r;let o=(null==e||null==(t=e.persone_id)?void 0:t.nome)||"",i=(null==e||null==(r=e.persone_id)?void 0:r.cognome)||"";return"".concat(o," ").concat(i).trim()}).filter(Boolean).join(" - "))||""})]})})]})]},m.id)},H=e=>{var t;let{videos:r,onEpisodeSelect:l}=e,a=Array.from(new Set(r.map(e=>{var t;return null==(t=e.stagioni_id)?void 0:t.numero}).filter(Boolean))).map(e=>({number:e,episodes:r.filter(t=>{var r;return(null==(r=t.stagioni_id)?void 0:r.numero)===e}).sort((e,t)=>{var r,o;return(null!=(r=t.episodio_numero)?r:-1/0)-(null!=(o=e.episodio_numero)?o:-1/0)})})).sort((e,t)=>(t.number||0)-(e.number||0)),[s,c]=(0,n.useState)(null);return((0,n.useEffect)(()=>{a.length>0&&null===s&&c(a[0].number)},[a,s]),a.length)?(0,o.jsxs)(i.Se,{w:"100%",gap:"$4",children:[d.HZ?(0,o.jsx)(i.lW,{mb:"$5",children:(0,o.jsx)(g.W,{start:[0,0],end:[1,0],colors:["rgba(54, 88, 221, 0.2)","transparent"],borderRadius:"$4",children:a.map(e=>(0,o.jsx)(h.Ql,{onPress:()=>c(e.number),borderRadius:"$0",px:"$7",py:"$6",position:"relative",borderWidth:0,hoverStyle:{backgroundColor:"transparent"},pressStyle:{backgroundColor:"transparent"},style:{backgroundColor:s===e.number?"#3658DD":"transparent",borderLeftWidth:2*(s===e.number),borderLeftColor:s===e.number?"#FF0000":"transparent",borderLeftStyle:"solid"},children:(0,o.jsxs)(u.E,{fontSize:"$4",color:s===e.number?"white":"$gray",children:["Stagione ",e.number]})},e.number))})}):(0,o.jsx)(i.Se,{mb:"$5",gap:"$2",children:a.map(e=>(0,o.jsx)(h.Ql,{onPress:()=>c(e.number),w:"100%",borderRadius:"$4",px:"$4",py:"$3",backgroundColor:s===e.number?"#3658DD":"transparent",borderWidth:1,borderColor:s===e.number?"#3658DD":"$gray",children:(0,o.jsxs)(u.E,{fontSize:"$3",color:s===e.number?"white":"$gray",children:["Stagione ",e.number]})},e.number))}),(0,o.jsx)(i.Se,{gap:"$3",children:s&&(null==(t=a.find(e=>e.number===s))?void 0:t.episodes.map(e=>(0,o.jsx)(E,{episode:e,seasonNumber:s},e.id)))})]}):(0,o.jsx)(u.E,{color:"$gray",textAlign:"center",padding:"$10",children:"Nessuna stagione disponibile"})};var z=r(95645);function I(e){var t,r,l,a;let{selectedFormatId:s}
1=e,[c,u]=(0,n.useState)(null),[h,p]=(0,n.useState)([]);(0,n.useEffect)(()=>{let e=!0;return(async()=>{try{let r=await (0,z.sW)(s);if(e&&r&&r.length>0){var t;u(r[0]||null);let e=await (0,z.XZ)((null==(t=r[0])?void 0:t.id)||"");p(e||[])}}catch(e){console.error("Failed to load homepage:",e)}})(),()=>{e=!1}},[]);let g=(0,L.Kn)((null==c?void 0:c.translations)||[]);return(0,o.jsxs)(i.Se,{f:1,bg:"$secondary",children:[(0,o.jsx)(x,{title:(null==g?void 0:g.titolo)||"",description:(null==g?void 0:g.descrizione)||"",conductor:(null==c||null==(t=c.persone_ids)?void 0:t.map(e=>{var t,r;let o=(null==e||null==(t=e.persone_id)?void 0:t.nome)||"",i=(null==e||null==(r=e.persone_id)?void 0:r.cognome)||"";return"".concat(o," ").concat(i).trim()}).filter(Boolean).join(" - "))||"",imageUrl:d.HZ?(null==c||null==(r=c.copertina_id)?void 0:r.id)?c.copertina_id.id:"":(null==c||null==(l=c.copertina_mobile)?void 0:l.id)?c.copertina_mobile.id:(null==c||null==(a=c.copertina_id)?void 0:a.id)?c.copertina_id.id:"",slug:s}),(0,o.jsx)(i.Se,{px:d.HZ?"$10":"$3",marginBottom:"$10",children:(0,o.jsx)(H,{videos:h})})]})}function R(e){let{params:t}=e;return(0,o.jsx)(I,{selectedFormatId:t.slug})}},4359:(e,t,r)=>{r.d(t,{Sk:()=>g,Ai:()=>m});var o=r(50988),i=r(22522),n=r(91326),l=r(35313),a=r(19686),s=r(94976);let d=(0,n.v)()((0,l.Zr)((e,t)=>({accessToken:null,refreshToken:null,expires:null,expiresAt:null,setTokens:(t,r,o,i)=>{e({accessToken:t,refreshToken:r,expires:o,expiresAt:i})},setRefresh:t=>{e({refreshToken:t})},clearTokens:()=>{e({accessToken:null,refreshToken:null,expires:null,expiresAt:null})}}),{name:"auth-storage",storage:(0,l.KU)(()=>s.H?localStorage:a.n)}));var c=r(24338);let u={directusUrl:i.HZ?"https://bo.uraniamedia.it/":c.env.EXPO_PUBLIC_DIRECTUS_URL,staticToken:i.HZ?"SWyauloUTQewdKGiW6KggDfEwyxI2EPI":c.env.EXPO_PUBLIC_DIRECTUS_STATIC_TOKEN};if(!u.directusUrl)throw Error("URL Directus non configurato. Controlla le variabili d'ambiente.");if(!u.staticToken)throw Error("Token statico Directus non configurato. Controlla le variabili d'ambiente.");let h=()=>({get:async()=>{let{accessToken:e,refreshToken:t,expires:r}=d.getState();return{access_token:e,refresh_token:t,expires:r,expires_at:r}},set:async e=>{var t,r,o,i;d.getState().setTokens(null!=(t=null==e?void 0:e.access_token)?t:null,null!=(r=null==e?void 0:e.refresh_token)?r:null,null!=(o=null==e?void 0:e.expires)?o:null,null!=(i=null==e?void 0:e.expires_at)?i:null)}}),p=(0,o.ieq)(u.directusUrl).with((0,o.zs8)()),g=p.with((0,o.jhO)("json",{storage:h(),credentials:"include",autoRefresh:!0}));p.with((0,o.jhO)("json",{storage:h(),credentials:"include",autoRefresh:!0}));let m=p.with((0,o.iyv)(u.staticToken))},5243:(e,t,r)=>{r.d(t,{Q:()=>a});var o=r(7620),i=r(31489),n=r(55726),l=r(54568);let a=(0,n.S)((0,o.memo)(function(e){let{color:t="black",size:r=24,...o}=e;return(0,l.jsxs)(i.BS,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...o,children:[(0,l.jsx)(i.rw,{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",stroke:t}),(0,l.jsx)(i.wA,{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",stroke:t})]})}))},7183:(e,t,r)=>{r.d(t,{S:()=>a});var o=r(7620),i=r(31489),n=r(55726),l=r(54568);let a=(0,n.S)((0,o.memo)(function(e){let{color:t="black",size:r=24,...o}=e;return(0,l.jsxs)(i.BS,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...o,children:[(0,l.jsx)(i.wA,{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",stroke:t}),(0,l.jsx)(i.Ro,{points:"16 6 12 2 8 6",stroke:t}),(0,l.jsx)(i.N1,{x1:"12",x2:"12",y1:"2",y2:"15",stroke:t})]})}))},9155:(e,t,r)=>{r.d(t,{W:()=>p});var o=r(6877),i=r(2738),n=r(62532),l=r(99596),a=r(59976),s=r(7620),d=r(64848),c=r(54568);function u({colors:e,locations:t,start:r,end:o,...i}){let[{height:n,width:l},u]=s.useState({height:1,width:1}),h=s.useMemo(()=>(function(e,t,r,o,i=1,n=1){var l,s;let d=(l=e,s=t,l.map((e,t)=>{let r=(0,a.$2)(e);if(s&&s[t]){let e=100*Math.max(0,Math.min(1,s[t]));return`${r} ${e}%`}return r}));return`linear-gradient(${function(e,t,r,o){let i,n,[l,a]=(i=[0,0],Array.isArray(r)&&(i=[null!=r[0]?r[0]:0,null!=r[1]?r[1]:0]),n=[0,1],Array.isArray(o)&&(n=[null!=o[0]?o[0]:0,null!=o[1]?o[1]:1]),[i,n]);return l[0]*=e,a[0]*=e,l[1]*=t,a[1]*=t,90+180*Math.atan2(a[1]-l[1],a[0]-l[0])/Math.PI}(i,n,r,o)}deg, ${d.join(", ")})`})(e,t,r?Array.isArray(r)?r:[r.x,r.y]:void 0,o?Array.isArray(o)?o:[o.x,o.y]:void 0,l,n),[e,t,r,o,l,n]);return(0,c.jsx)(d.A,{...i,style:[i.style,{backgroundImage:h}],onLayout:e=>{let{width:t,height:r}=e.nativeEvent.layout;u(e=>t!==e.width||r!==e.height?{height:r,width:t}:e),i.onLayout&&i.onLayout(e)}})}let h=(0,o.I)(l.Se,{name:"LinearGradient",overflow:"hidden",position:"relative"}),p=h.styleable((e,t)=>{let r=(0,i.YY)(e),{start:o,end:l,colors:a,locations:s,children:d,...p}=r,m=(0,n.D)(),f=r.colors?.map(e=>m[e]?.get("web")??e)||[];return(0,c.jsxs)(h,{ref:t,...p,children:[(0,c.jsx)(u,{start:o,end:l,colors:f,locations:s,style:g}),d]})}),g={position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:0}},19686:(e,t,r)=>{r.d(t,{n:()=>n});var o=r(75054);let i=r(22522).HZ?{set:(e,t)=>localStorage.setItem(e,t),getString:e=>localStorage.getItem(e),delete:e=>localStorage.removeItem(e)}:new o.eH,n={setItem:(e,t)=>
1i.set(e,t),getItem:e=>{let t=i.getString(e);return null!=t?t:null},removeItem:e=>i.delete(e)}},25278:(e,t,r)=>{r.d(t,{A:()=>l});var o=r(95142),i=r.n(o);class n{static share(e,t){return(void 0===t&&(t={}),i()("object"==typeof e&&null!==e,"Content to share must be a valid object"),i()("string"==typeof e.url||"string"==typeof e.message,"At least one of URL and message is required"),i()("object"==typeof t&&null!==t,"Options must be a valid object"),i()(!e.title||"string"==typeof e.title,"Invalid title: title should be a string."),void 0!==window.navigator.share)?window.navigator.share({title:e.title,text:e.message,url:e.url}):Promise.reject(Error("Share is not supported in this browser"))}static get sharedAction(){return"sharedAction"}static get dismissedAction(){return"dismissedAction"}}let l=n},30887:(e,t,r)=>{r.d(t,{o:()=>a});var o=r(7620),i=r(31489),n=r(55726),l=r(54568);let a=(0,n.S)((0,o.memo)(function(e){let{color:t="black",size:r=24,...o}=e;return(0,l.jsx)(i.BS,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...o,children:(0,l.jsx)(i.wA,{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",stroke:t})})}))},44425:(e,t,r)=>{r.d(t,{Ql:()=>m,U9:()=>g,_x:()=>h,hE:()=>c,ot:()=>p,pk:()=>u});var o=r(6877),i=r(76244),n=r(48667),l=r(49931),a=r(22140),s=r(87446),d=r(45736);let c=(0,o.I)(i.H1,{fontSize:30,fontWeight:800,color:"white",lineHeight:38,$gtLg:{fontSize:60,lineHeight:68}}),u=(0,o.I)(n.E,{fontSize:30,fontWeight:800,color:"white",lineHeight:38,$gtLg:{fontSize:60,lineHeight:68}}),h=(0,o.I)(i.H2,{fontSize:25,fontWeight:800,color:"white",marginBottom:"$4",$gtLg:{fontSize:48}});(0,o.I)(l.f,{fontSize:16,fontWeight:500,color:"white"});let p=(0,o.I)(a.JU,{fontSize:14,lineHeight:20,fontWeight:500,color:"white",backgroundColor:"$lightBlue",borderWidth:1,borderColor:"$lightBlue2",borderRadius:100,paddingHorizontal:20,paddingVertical:8,alignSelf:"flex-start",overflow:"hidden",borderStyle:"solid"}),g=(0,o.I)(s.pd,{size:"$4",borderWidth:1,fontWeight:500,backgroundColor:"$darkBlue3",borderColor:"$primary",color:"$gray",placeholderTextColor:"$gray",borderRadius:"$3",height:50,outlineWidth:0,hoverStyle:{borderColor:"$primary"},focusStyle:{borderColor:"$primary"}}),m=(0,o.I)(d.$n,{backgroundColor:"$primary",height:48,paddingHorizontal:32,borderRadius:100,color:"$textPrimary",fontSize:16,fontWeight:"$500",borderWidth:0,alignSelf:"flex-start",hoverStyle:{backgroundColor:"$primaryDark",transition:"all 150ms ease-out"},variants:{variant:{outlined:{backgroundColor:"rgba(255, 255, 255, 0.2)",borderWidth:1,borderColor:"$textPrimary",color:"$textPrimary",hoverStyle:{backgroundColor:"rgba(255, 255, 255, 0.1)",borderWidth:1,borderColor:"white"}},red:{backgroundColor:"$red",color:"white",hoverStyle:{backgroundColor:"$red"}},unstyled:{backgroundColor:"transparent",color:"transparent",borderWidth:0,padding:0,borderColor:"transparent",hoverStyle:{backgroundColor:"transparent"}}}}})},46184:(e,t,r)=>{r.d(t,{z:()=>a});var o=r(7620),i=r(31489),n=r(55726),l=r(54568);let a=(0,n.S)((0,o.memo)(function(e){let{color:t="black",size:r=24,...o}=e;return(0,l.jsxs)(i.BS,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...o,children:[(0,l.jsx)(i.jl,{cx:"12",cy:"12",r:"10",stroke:t}),(0,l.jsx)(i.Ro,{points:"12 6 12 12 16 14",stroke:t})]})}))},46608:(e,t,r)=>{r.d(t,{Kn:()=>o,Rm:()=>i,tm:()=>n,y6:()=>l});let o=(e,t)=>(null==e?void 0:e.find(e=>{var r;return(null==(r=e.lingue_codice)?void 0:r.substring(0,2))===t}))||(null==e?void 0:e.find(e=>{var t;return null==(t=e.lingue_codice)?void 0:t.startsWith("it")})),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,r=new Date(e.eventi_id.data+"Z"),o=new Date(r.getTime()+60*e.eventi_id.durata*1e3);return t>=r&&t<o},n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;return[...e].sort((e,t)=>new Date(e.eventi_id.data+"Z").getTime()-new Date(t.eventi_id.data+"Z").getTime()).find(e=>i(e,t))},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;return e.filter(e=>new Date(e.eventi_id.data+"Z")>t).sort((e,t)=>
1new Date(e.eventi_id.data+"Z").getTime()-new Date(t.eventi_id.data+"Z").getTime())}},50172:(e,t,r)=>{r.d(t,{f:()=>a});var o=r(7620),i=r(31489),n=r(55726),l=r(54568);let a=(0,n.S)((0,o.memo)(function(e){let{color:t="black",size:r=24,...o}=e;return(0,l.jsx)(i.BS,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...o,children:(0,l.jsx)(i.wA,{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",stroke:t})})}))},57417:(e,t,r)=>{r.d(t,{A:()=>d});var o=r(95142),i=r.n(o),n=r(31160),l=n.A?window.location.href:"";class a{_dispatchEvent(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var i=this._eventCallbacks[e];null!=i&&Array.isArray(i)&&i.map(e=>{e(...r)})}addEventListener(e,t){var r=this;return r._eventCallbacks[e]||(r._eventCallbacks[e]=[t]),r._eventCallbacks[e].push(t),{remove(){var o=r._eventCallbacks[e].filter(e=>e.toString()!==t.toString());r._eventCallbacks[e]=o}}}removeEventListener(e,t){console.error("Linking.removeEventListener('"+e+"', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `Linking.addEventListener`.");var r=this._eventCallbacks[e].filter(e=>e.toString()!==t.toString());this._eventCallbacks[e]=r}canOpenURL(){return Promise.resolve(!0)}getInitialURL(){return Promise.resolve(l)}openURL(e,t){1==arguments.length&&(t="_blank");try{return s(e,t),this._dispatchEvent("onOpen",e),Promise.resolve()}catch(e){return Promise.reject(e)}}_validateURL(e){i()("string"==typeof e,"Invalid URL: should be a string. Was: "+e),i()(e,"Invalid URL: cannot be empty")}constructor(){this._eventCallbacks={}}}var s=(e,t)=>{if(n.A){var r=new URL(e,window.location).toString();0===r.indexOf("tel:")?window.location=r:window.open(r,t,"noopener")}};let d=new a},66362:(e,t,r)=>{r.d(t,{Z:()=>v});var o=r(54568),i=r(28425),n=r(99596),l=r(44425),a=r(48667),s=r(50172),d=r(99626),c=r(5243),u=r(30887),h=r(1458),p=r(7620),g=r(31489),m=r(57417),f=r(22522);let b=e=>{let{size:t=24,color:r="white"}=e;return(0,o.jsx)(g.Ay,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(g.wA,{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z",fill:r})})},v=e=>{let{open:t,onOpenChange:r,url:g}=e,[v,w]=(0,p.useState)(!1),x=async e=>{e.preventDefault(),e.stopPropagation(),f.HZ&&await navigator.clipboard.writeText(g),w(!0),setTimeout(()=>w(!1),2e3)},_=e=>{let t=encodeURIComponent(g),r="";switch(e){case"facebook":r="https://www.facebook.com/sharer/sharer.php?u=".concat(t);break;case"linkedin":r="https://www.linkedin.com/sharing/share-offsite/?url=".concat(t);break;case"x":r="https://twitter.com/intent/tweet?url=".concat(t);break;case"whatsapp":r="https://wa.me/?text=".concat(t);break;default:return}f.HZ?window.open(r,"_blank","noopener,noreferrer"):m.A.openURL(r)},y=[{icon:s.f,color:"#1877F2",platform:"facebook"},{icon:d.v,color:"#0A66C2",platform:"linkedin"},{icon:b,color:"#000000",platform:"x"},{icon:u.o,color:"#25D366",platform:"whatsapp"}];return(0,o.jsx)(i.lG,{modal:!0,open:t,onOpenChange:r,children:(0,o.jsxs)(i.lG.Portal,{px:"$4",children:[(0,o.jsx)(i.lG.Overlay,{animation:"slow",opacity:.5,bg:"black",enterStyle:{opacity:0},exitStyle:{opacity:0}},"overlay"),(0,o.jsx)(i.lG.Content,{bg:"transparent",p:"$0",borderWidth:0,elevate:!0,animation:["quick",{opacity:{overshootClamping:!0}}],enterStyle:{scale:.9,opacity:0},exitStyle:{scale:.9,opacity:0},children:(0,o.jsxs)(n.Se,{bg:"$darkBlue4",p:"$4",width:"100%",minWidth:"100%",maxWidth:500,borderRadius:"$2",borderColor:"white",borderWidth:1,children:[(0,o.jsxs)(n.lW,{justifyContent:"space-between",alignItems:"center",mb:"$4",children:[(0,o.jsx)(i.lG.Title,{color:"white",fontSize:"$4",children:"Condividi"}),(0,o.jsx)(i.lG.Close,{asChild:!0,children:(0,o.jsx)(l.Ql,{size:"$3",circular:!0,icon:h.X,color:"white",bg:"transparent",pressStyle:{opacity:.7}})})]}),(0,o.jsx)(n.lW,{justifyContent:"flex-start",...f.HZ?{mb:"$6",width:"75%"}:{mb:"$3",width:"100%"},gap:"$3",children:y.map(e=>{let{icon:t,color:r,platform:i}=e;return(0,o.jsx)(n.Se,{p:"$3",borderRadius:"$12",bg:"rgba(255,255,255,0.1)",pressStyle:{opacity:.8},cursor:"pointer",onPress:e=>{e.stopPropagation(),_(i)},children:(0,o.jsx)(t,{size:24,color:"white"})},r)})}),f.HZ&&(0,o.jsxs)(n.Se,{gap:"$2",children:[(0,o.jsx)(a.E,{color:"$gray",mb:"$3",children:"URL"}),(0,o.jsxs)(n.lW,{bg:"rgba(255,255,255,0.1)",borderRadius:"$12",borderWidth:1,borderColor:"rgba(255,255,255,0.3)",p:"$2",alignItems:"center",justifyContent:"space-between",children:[(0,o.jsx)(l.U9,{value:g,color:"$gray",borderWidth:0,bg:"transparent",outlineWidth:0,readOnly:!0,flex:1,mr:"$2",pl:"$4",borderColor:"transparent",shadowColor:"transparent",unstyled:!0}),(0,o.jsx)(l.Ql,{icon:c.Q,bg:"transparent",pressStyle:{opacity:.8,backgroundColor:"transparent"},onPress:x,position:"relative",borderWidth:0,hoverStyle:{backgroundColor:"transparent"},children:v&&(0,o.jsx)(a.E,{position:"absolute",top:-30,right:0,color:"white",bg:"$darkBlue2",p:"$2",borderRadius:"$2",children:"Copiato!"})})]})]})]})},"content")]})})}},72545:(e,t,r)=>{r.d(t,{Q:()=>n});var o=r(22522),i=r(24338);function n(e,t,r){let n=new URL("/assets/"+e,o.HZ?"https://bo.uraniamedia.it/":i.env.EXPO_PUBLIC_DIRECTUS_URL);return void 0!==t&&n.searchParams.append("width",t.toString()),void 0!==r&&n.searchParams.append("height",r.toString()),(void 0!==t||void 0!==r)&&(n.searchParams.append("fit","cover"),n.searchParams.append("quality","80"),n.searchParams.append("position","center"),n.searchParams.append("format","webp")),n.toString()}},74255:(e,t,r)=>{r.d(t,{A:()=>n});var o=r(84772),i=r(7620);function n(){var e=(0,i.useState)(()=>o.A.get("window")),t=e[0],r=e[1];return(0,i.useEffect)(()=>{function e(e){var t=e.window;null!=t&&r(t)}return o.A.addEventListener("change",e),r(o.A.get("window")),()=>{o.A.removeEventListener("change",e)}},[]),t}},75462:(e,t,r)=>{r.d(t,{n:()=>a});var o=r(7620),i=r(31489),n=r(55726),l=r(54568);
1let a=(0,n.S)((0,o.memo)(function(e){let{color:t="black",size:r=24,...o}=e;return(0,l.jsxs)(i.BS,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...o,children:[(0,l.jsx)(i.wA,{d:"m12 19-7-7 7-7",stroke:t}),(0,l.jsx)(i.wA,{d:"M19 12H5",stroke:t})]})}))},94976:(e,t,r)=>{r.d(t,{H:()=>o});let o=!0},95645:(e,t,r)=>{r.d(t,{AK:()=>h,K9:()=>u,Oc:()=>l,RO:()=>a,XZ:()=>s,ag:()=>d,eO:()=>c,sW:()=>n});var o=r(50988),i=r(4359);let n=async e=>await i.Ai.request((0,o.F1f)("format",{filter:{slug:{_eq:e}},fields:["*","translations.*","copertina_id.*","copertina_mobile.id","persone_ids.persone_id.*","persone_ids.persone_id.translations.*"],limit:-1})),l=async e=>await i.Ai.request((0,o.F1f)("video",{filter:{slug:{_eq:e}},fields:["*","translations.*","copertina_id.*","thumbnail_id.*","copertina_mobile.id","conduttore.nome","conduttore.cognome","conduttore.slug","conduttore.thumbnail_id.id","stagioni_id.*","stagioni_id.format_id.*","stagioni_id.format_id.translations.*","stagioni_id.format_id.persone_ids.persone_id.*","stagioni_id.format_id.persone_ids.persone_id.thumbnail_id.*","tags_ids.tags_id.translations.*"],limit:1})),a=async()=>await i.Ai.request((0,o.F1f)("format",{fields:["*","translations.*","persone_ids.persone_id.*","persone_ids.persone_id.translations.*"],limit:-1})),s=async(e,t,r,n)=>await i.Ai.request((0,o.F1f)("video",{filter:{stagioni_id:{format_id:{id:{_eq:e}}}},fields:["*","translations.*","thumbnail_id.id","conduttore.nome","conduttore.cognome","conduttore.slug","conduttore.thumbnail_id.id","stagioni_id.*","stagioni_id.format_id.*","stagioni_id.format_id.persone_ids.persone_id.*","stagioni_id.format_id.persone_ids.persone_id.thumbnail_id.*","stagioni_id.format_id.copertina_id.*","tags_ids.tags_id.translations.*"],limit:r||-1,sort:n||["-episodio_numero"]})),d=async()=>await i.Ai.request((0,o.F1f)("video",{filter:{tipologia:{_eq:"altro"}},fields:["*","translations.*","copertina_id.*","thumbnail_id.*","copertina_mobile.id","conduttore.nome","conduttore.cognome","conduttore.slug","conduttore.thumbnail_id.id","tags_ids.tags_id.translations.*"],limit:-1})),c=async(e,t)=>i.Sk.request((0,o.F1f)("watchlist",{filter:{_and:[{video_id:{_eq:e}},{directus_users_id:{_eq:t}}]},fields:["id"]})),u=async e=>i.Sk.request((0,o.wEy)("watchlist",e)),h=async e=>{i.Sk.request((0,o.LDr)("watchlist",e))}}}]);
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.