1"use strict";(self.webpackChunkhost=self.webpackChunkhost||[]).push([[3031],{3928:function(e,t,s){s.d(t,{B:function(){return n}});var r=s(59065);function n(e){let{onIntersect:t,options:s,shouldObserve:n}=e,l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!l.current||!n)return;let e=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&t()})},s);return e.observe(l.current),()=>{e.disconnect()}},[t,s,n]),{observerRef:l}}},13372:function(e,t,s){s.d(t,{L:function(){return c}});var r=s(23078),n=s(95416),l=s(71781),a=s(45835);function c(e){let{startDate:t,endDate:s,color:c="",hideEndDate:i=!1}=e,o=(0,a.useFormatter)(),d=e=>{let t=new Date(e);return Number.isNaN(t.getTime())?(console.error("Invalid date provided: ".concat(e)),null):t},u=(e,t)=>o.dateTime(e,t).replace(/ de |\.|\. â /g," ").trim(),x=d(t),h=d(s);if(!x||!h)return null;let m=x.toDateString()===h.toDateString(),f=h.getTime()-x.getTime()<864e5,p=u(x,{day:"2-digit",month:"short"}),v=u(x,{day:"2-digit",month:"short",year:"numeric"}),j=u(h,{day:"2-digit",month:"short",year:"numeric"});return(0,r.jsx)("time",{className:(0,l.cn)(["uppercase","flex","flex-row","whitespace-nowrap"]),style:{color:c||"#FFFFFF"},children:i||m||f?v:(0,r.jsxs)(r.Fragment,{children:[p,(0,r.jsx)("div",{className:"flex content-center items-center justify-center px-1",children:(0,r.jsx)(n.GreaterThan,{width:5,height:10,color:c||"#FFFFFF"})}),j]})})}},41014:function(e,t,s){s.d(t,{N:function(){return c}});var r=s(95416),n=s(22823),l=s(56171),a=s(59065);function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=(0,r.useAuth)(),s=(0,l.useRouter)(),c=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{if(!t.isAuthChecked)return;if(t.isAuthenticated){c.current=!0;return}let l=c.current,a=s.asPath,i=l?void 0:(0,r.sanitizeInternalPath)(a);if(!l)try{(0,n.setCookie)(r.userCookiesKeys.lastParams,JSON.stringify({lastUserPath:a}),{maxAge:500,path:"/",sameSite:"lax"})}catch(e){}let o="/"===e&&i?"/?next_to=".concat(encodeURIComponent(i)):e;s.push(o)},[t.isAuthenticated,t.isAuthChecked,s,e]),t}},50816:function(e,t,s){s.d(t,{Z:function(){return c}});var r=s(23078),n=s(55491),l=s.n(n),a=s(59065);let c=(0,a.memo)(function(e){let{src:t,fallback:s="",className:n,...c}=e,i="/imgs/empty-state.png",[o,d]=(0,a.useState)((e=>{if(!e)return!1;if("string"==typeof e){if(e.startsWith("/"))return!0;try{let t=new URL(e);return"https:"===t.protocol||"http:"===t.protocol}catch(e){return!1}}})(t)?t:i);return(0,a.useEffect)(()=>{d(t||s||i)},[t,s]),(0,r.jsx)(l(),{src:o,placeholder:"blur",blurDataURL:i,onError:()=>{d(i)},className:n,...c})})},93031:function(e,t,s){s.d(t,{r:function(){return b}});var r=s(23078),n=s(95416),l=s(71781),a=s(29080),c=s(3085),i=s.n(c),o=s(45835),d=s(59065),u=s(3928),x=s(41014),h=s(13372),m=s(50816),f=s(46404),p=s(9244),v=s(58666),j=s(69326),g=s(80586);function w(e){let{copyStatus:t,slug:s}=e;return(0,r.jsxs)("div",{className:"relative flex justify-center items-center transition-all duration-1000 opacity-100 scale-100",children:["success"===t[s]&&(0,r.jsx)(v.A,{color:"#00C67F"}),"error"===t[s]&&(0,r.jsx)(j.A,{color:"red"}),("default"===t[s]||!t[s])&&(0,r.jsx)(g.A,{})]})}function y(e){var t;let{open:s,event:n,copyStatus:a,setOpen:c,copyLink:d}=e,u=(0,o.useTranslations)("MyEvents");return(0,r.jsx)(l.Drawer,{open:s,onOpenChange:c,children:(0,r.jsxs)(l.DrawerContent,{className:"bg-white",children:[(0,r.jsx)(l.DrawerHeader,{className:"text-left",children:(0,r.jsx)(l.DrawerTitle,{children:null==n?void 0:n.name})}),(0,r.jsxs)("div",{className:"grid grid-flow-col grid-rows-2 gap-1.5 p-4 sm:text-left text-left",children:[(0,r.jsxs)("div",{className:"flex flex-row self-start gap-2",style:{color:"var(--color-primary-pure)"},children:[(0,r.jsx)(f.A,{}),u("soldTickets"),": ",null==n?void 0:n.ticket_amount]}),(0,r.jsxs)("div",{className:"flex flex-row self-start gap-2",style:{color:"var(--color-primary-pure)"},children:[(0,r.jsx)(p.A,{}),u("code"),": ",null==n?void 0:null===(t=n.steward)||void 0===t?void 0:t.code]}),(0,r.jsx)("div",{className:"row-span-2 flex items-center justify-end",children:(0,r.jsx)(l.Button,{variant:"ghost",className:"rounded-full hover:rounded-full !p-[7px]",onClick:e=>d(e,n.slug,n.steward),children:(0,r.jsx)(w,{copyStatus:a,slug:n.slug})})})]}),(0,r.jsxs)(l.DrawerFooter,{className:"pt-2",children:[(0,r.jsx)(i(),{href:"/eventos/".concat(null==n?void 0:n.slug),className:"w-full",children:(0,r.jsx)(l.Button,{className:"w-full",children:u("goToEvent")})}),(0,r.jsx)(l.DrawerClose,{asChild:!0,children:(0,r.jsx)(l.Button,{variant:"secondary",children:u("close")})})]})]})})}function N(e){let{ticketAmount:t,code:s}=e,l=(0,o.useTranslations)("MyEvents");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-row self-start gap-2",style:{color:"var(--color-primary-pure)"},children:[(0,r.jsx)(n.Ticket,{}
1),l("soldTickets"),": ",t]}),(0,r.jsxs)("div",{className:"flex flex-row self-start gap-2",style:{color:"var(--color-primary-pure)"},children:[(0,r.jsx)(p.A,{}),l("code"),": ",s]})]})}function k(){return Array.from({length:5}).map((e,t)=>(0,r.jsxs)("div",{className:"grid grid-cols-6 gap-4x w-full h-[125px] md:h-[110px] rounded-sm relative container shadow-sm",children:[(0,r.jsxs)("div",{className:"flex w-full gap-2 col-span-4 items-center",children:[(0,r.jsx)(l.Skeleton,{className:"flex min-w-[90px] w-[90px] h-[90px] rounded-sm overflow-hidden ml-4"}),(0,r.jsxs)("div",{className:"label-sm flex flex-col gap-2x text-left justify-center p-4 w-full",children:[(0,r.jsx)(l.Skeleton,{className:"h-5 w-3/4 rounded"}),(0,r.jsx)(l.Skeleton,{className:"h-4 w-1/2 rounded"}),(0,r.jsx)(l.Skeleton,{className:"h-4 w-full rounded"})]})]}),(0,r.jsxs)("div",{className:"flex flex-row col-span-2 p-4 justify-between items-center",children:[(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center paragraph-sm text-grey-700 gap-4 w-full",children:[(0,r.jsx)(l.Skeleton,{className:"h-4 w-1/3 rounded"}
1),(0,r.jsx)(l.Skeleton,{className:"h-4 w-1/2 rounded"})]}),(0,r.jsx)(l.Skeleton,{className:"w-10 h-10 rounded-full self-center"})]})]},t))}function b(e){let{host:t}=e;(0,x.N)();let s=(0,o.useTranslations)("MyEvents"),[c,f]=(0,d.useState)(!1),{data:p,isLoading:v,fetchNextPage:j,hasNextPage:g}=(0,n.useMyEvents)({params:{per_page:15}}),[b,F]=(0,d.useState)(),[S,D]=(0,d.useState)({}),{observerRef:A}=(0,u.B)({onIntersect:j,shouldObserve:g}),C=async(e,s,r)=>{e.preventDefault();try{await navigator.clipboard.writeText("".concat(t,"/eventos/").concat(s,"?code=").concat(r.code)),D(e=>({...e,[s]:"success"}))}catch(e){D(e=>({...e,[s]:"error"}))}setTimeout(()=>{D(e=>({...e,[s]:"default"}))},2e3)};return(0,r.jsxs)("div",{className:"flex flex-col gap-10x w-full max-w-[1136px] min-h-[640px] py-4x px-5x lg:py-10x lg:gap-14x xl:mx-auto xl:px-0",children:[v?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Skeleton,{className:"w-[30%] h-6 rounded"}),(0,r.jsx)(k,{})]}):p&&p.length>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex justify-between items-center",children:(0,r.jsx)("h2",{className:"heading-sm font-brand text-grey-900",children:s("myEvents")})}),(0,r.jsx)("div",{className:"flex flex-col gap-3",children:p.map(e=>{let{id:t,slug:s,name:n,thumb:c,banner:o,steward:d,end_date:u,start_date:x,hide_event_end_date:p,ticket_amount:v,event_location:j,vertical_banner:g}=e,y=(null==j?void 0:j.name)?"".concat(null==j?void 0:j.city,", ").concat(null==j?void 0:j.name):null==j?void 0:j.formatted_address;return(0,r.jsx)(i(),{href:"/eventos/".concat(s),className:"w-full shadow-sm rounded-sm",children:(0,r.jsxs)("div",{className:"grid grid-cols-6 gap-4x w-full h-[125px] md:h-[110px] rounded-sm relative container hover:shadow-level1 transition-shadow duration-500",children:[(0,r.jsxs)("div",{className:"flex w-full gap-2 col-span-5 md:col-span-4 items-center",children:[(0,r.jsx)("div",{className:"flex min-w-[90px] w-[90px] h-[90px] rounded-sm overflow-hidden ml-4",children:(0,r.jsx)(m.Z,{src:g||c,fallback:o,alt:n,width:208,he
1ight:208,className:"w-full object-cover zoom-img rounded-sm"})}),(0,r.jsxs)("div",{className:"label-sm flex flex-col gap-2x text-left justify-center p-4",children:[(0,r.jsx)("strong",{className:"heading-xs-heavy font-brand font-semibold text-grey-900 leading-none line-clamp-2",children:n}),(0,r.jsx)(h.L,{startDate:x,endDate:u,hideEndDate:p,color:"var(--color-primary-pure)"}),(0,r.jsx)("p",{className:"paragraph-sm text-grey-700 line-clamp-1 h-5x",children:y})]})]}),(0,r.jsxs)("div",{className:"hidden md:flex flex-row col-span-2 p-4 justify-between",children:[(0,r.jsx)("div",{className:"flex flex-col justify-center items-center paragraph-sm text-grey-700 gap-4",children:(0,r.jsx)(N,{ticketAmount:v,code:d.code})}),(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)(l.Button,{variant:"ghost",className:"rounded-full hover:rounded-full !p-[9px]",onClick:e=>C(e,s,d),children:(0,r.jsx)(w,{copyStatus:S,slug:s})})})]}),(0,r.jsx)("div",{className:"flex md:hidden flex-rol col-span-1",children:(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)(l.Button,{variant:"ghost",className:"rounded-full hover:rounded-full !p-[9px]",onClick:e=>{e.preventDefault(),f(!0),F({id:t,slug:s,name:n,banner:o,steward:d,ticket_amount:v})},children:(0,r.jsx)("div",{className:"relative flex justify-center items-center",children:(0,r.jsx)(a.A,{})})})})})]})},t)})})]}):(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"heading-sm font-brand text-center",children:s("noEventsFound")}),(0,r.jsx)("p",{className:"paragraph-md text text-grey-grey-600 text-center",children:s("noEventsFoundDescription")})]}),b&&(0,r.jsx)(y,{open:c,setOpen:f,copyLink:C,copyStatus:S,event:b}),(0,r.jsx)("div",{ref:A})]})}}}]);
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.