PageSourceSearch

https://www.bouncelife.com/_next/static/chunks/pages/events/[slug]/dashboard-d12bdea219b8a4dd.js

js bouncelife.com collected 2026-09-24 09:53:35 UTC 24,658 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1044],{60319:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/events/[slug]/dashboard",function(){return t(78314)}])},78314:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return dashboard}});var l=t(85893),a=t(67294),n=t(9008),i=t.n(n),r=t(41191),d=t(33703),o=t(210),c=t(52636),u=t(67421),v=t(86767),x=t(58535),m=t(61536),g=t(80438),h=t(65124),p=t(75090),f=t(43498),j=t(73265),b=t(88816),y=t(93967),w=t.n(y),components_ProgressBar=e=>{let{value:s,max:t}=e;return(0,l.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2.5",children:(0,l.jsx)("div",{className:w()("h-2.5 rounded-full",{"bg-primary-400":0!==t}),style:{width:"".concat(s/t*100,"%")}})})};let StatCardWithProgress=e=>{let{label:s,value:t,progress:a}=e;return(0,l.jsx)(SharedCardStructure,{label:s,value:t,children:a&&(0,l.jsx)(components_ProgressBar,{value:a.value,max:a.max})})},SharedCardStructure=e=>{let{label:s,value:t,children:a}=e;return(0,l.jsxs)("div",{className:"flex flex-row rounded-lg border border-neutral-90 p-4 min-w-[250px] items-center gap-8",children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("span",{className:"text-sm font-bold text-gray-500 whitespace-nowrap",children:s}),(0,l.jsx)("div",{className:"flex flex-row",children:"string"==typeof t?(0,l.jsx)("span",{className:"text-lg font-bold text-gray-600",children:t}):t})]}),a]})},MultiStatCard=e=>{let{title:s,stats:t,className:a,iconUrl:n,onClick:i}=e;return(0,l.jsxs)("div",{className:w()("flex flex-col rounded-lg border border-neutral-90 p-4 min-w-[250px]",a,{"cursor-pointer":i}),onClick:i,children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)("img",{src:n,alt:"campaign",className:"mr-2"}),(0,l.jsx)("span",{className:"text-sm font-bold text-gray-500",children:s})]}),(0,l.jsx)("div",{className:"flex flex-row justify-between",children:t.map(e=>(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("span",{className:"text-sm text-gray-500",children:e.label}),(0,l.jsx)("span",{className:"text-lg font-bold text-gray-600",children:e.value})]},"multi-stat-card-".concat(e.label)))})]})};var N=t(11163),k=t(65251),C=t(73996),S=t(5434),D=t(93162),_=t(9840),E=t(96671),R=t(48905),Z=t(90379),q=t(52396);let L=(0,a.forwardRef)((e,s)=>{var t,a,n,i;let{eventId:r,request:d,onClick:c}=e,u=(0,o.ue)(),onClickReject=e=>{var s,t;(0,q.CF)({icon:"\uD83D\uDC4E",message:"".concat(null===(s=e.user)||void 0===s?void 0:s.firstName," ").concat(null===(t=e.user)||void 0===t?void 0:t.lastName," was denied approval")}),u.mutate({approvalId:e.id,eventId:r,status:"rejected",readStatus:"read"},{onError:e=>{(0,q.x2)({title:"Error",message:e.message})}})},onClickApprove=e=>{var s,t;(0,q.CF)({icon:"\uD83D\uDC4D",message:"".concat(null===(s=e.user)||void 0===s?void 0:s.firstName," ").concat(null===(t=e.user)||void 0===t?void 0:t.lastName," was approved")}),u.mutate({approvalId:e.id,eventId:r,status:"approved",readStatus:"read"},{onError:e=>{(0,q.x2)({title:"Error",message:e.message})}})};return(0,l.jsxs)("div",{ref:s,className:"flex justify-between mb-6",children:[(0,l.jsxs)("div",{className:"flex items-start cursor-pointer",onClick:c,children:[(0,l.jsxs)("div",{className:"shrink-0 mr-2 relative",children:[(0,l.jsx)("div",{className:"border-2 border-primary-50 rounded-full flex items-center justify-center",children:(0,l.jsx)("img",{src:(null==d?void 0:null===(t=d.user)||void 0===t?void 0:t.photoUrl)||"/img/search/user.svg",className:"w-10 h-10 rounded-full object-center"})}),(null==d?void 0:d.readStatus)==="unread"&&(0,l.jsx)("div",{className:"w-3 h-3 bg-primary-500 rounded-full absolute top-0 right-0 border-2 border-white"})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:w()("text-sm",{"font-bold":(null==d?void 0:d.readStatus)==="unread"}),children:[null==d?void 0:null===(a=d.user)||void 0===a?void 0:a.firstName," ",null==d?void 0:null===(n=d.user)||void 0===n?void 0:n.lastName]}),(0,l.jsx)("p",{className:"text-sm font-normal text-gray-500 pr-16",children:null==d?void 0:null===(i=d.tier)||void 0===i?void 0:i.name})]})]}),(0,l.jsxs)("div",{className:"flex items-center shrink-0 gap-2",children:[(0,l.jsx)("button",{type:"button",className:w()("w-8 h-8 rounded-full p-1 border-1 border-primary-50 text-sm text-center",{"bg-gray-500":"rejected"===d.status}),onClick:()=>onClickReject(d),children:"\uD83D\uDC4E"}),(0,l.jsx)("button",{type:"button",className:w()("w-8 h-8 rounded-full p-1 border-1 border-primary-50 text-sm text-center",{"bg-gray-500":"approved"===d.status}),onClick:()=>onClickApprove(d),children:"\uD83D\uDC4D"})]})]})});var A=t(63750),RequestDetailModal=e=>{var s,t,a,n,i;let{eventId:r,request:d,onClose:c,onSkip:u}=e,v=(0,o.ue)(),skip=()=>{v.mutate({approvalId:d.id,eventId:r,status:d.status,readStatus:"read"}),u()},onClickReject=e=>{var s,t;(0,q.CF)({icon:"\uD83D\uDC4E",message:"".concat(null===(s=e.user)||void 0===s?void 0:s.firstName," ").concat(null===(t=e.user)||void 0===t?void 0:t.lastName," was de
1nied approval")}),v.mutate({approvalId:e.id,eventId:r,status:"rejected",readStatus:"read"},{onError:e=>{(0,q.x2)({title:"Error",message:e.message})}}),setTimeout(()=>{u()},150)},onClickApprove=e=>{var s,t;(0,q.CF)({icon:"\uD83D\uDC4D",message:"".concat(null===(s=e.user)||void 0===s?void 0:s.firstName," ").concat(null===(t=e.user)||void 0===t?void 0:t.lastName," was approved")}),v.mutate({approvalId:e.id,eventId:r,status:"approved",readStatus:"read"},{onError:e=>{(0,q.x2)({title:"Error",message:e.message})}}),setTimeout(()=>{u()},150)};return(0,l.jsx)(E.Z,{type:E.w.SMALL,visible:!0,renderFooter:()=>(0,l.jsxs)("div",{className:"flex items-center justify-center gap-4",children:[(0,l.jsx)("button",{type:"button",className:w()("w-12 h-12 rounded-full p-1 border-1 border-primary-50 text-base text-center",{"bg-gray-500":(null==d?void 0:d.status)==="rejected"}),onClick:()=>onClickReject(d),children:"\uD83D\uDC4E"}),(0,l.jsx)("button",{type:"button",className:w()("w-12 h-12 rounded-full p-1 border-1 border-primary-50 text-base text-center"),onClick:skip,children:"⏭️"}),(0,l.jsx)("button",{type:"button",className:w()("w-12 h-12 rounded-full p-1 border-1 border-primary-50 text-base text-center",{"bg-gray-500":(null==d?void 0:d.status)==="approved"}),onClick:()=>onClickApprove(d),children:"\uD83D\uDC4D"})]}),children:(0,l.jsxs)("div",{className:"relative overflow-auto",children:[(0,l.jsx)("div",{className:"absolute top-4 left-2 h-7 w-7 bg-gray-100 z-30 rounded-full flex items-center justify-center cursor-pointer",onClick:c,children:(0,l.jsx)(A.And,{})}),(0,l.jsxs)(x.Z,{children:[(0,l.jsx)("div",{className:"absolute top-0 left-0 h-24 w-full bg-linear-to-r from-[#D0CEFF] to-[#C4DDFF] z-10"}),(0,l.jsxs)("div",{className:"relative pt-11 mx-auto flex flex-col items-center justify-center z-20",children:[(0,l.jsx)("div",{className:"w-24 h-24 object-cover rounded-full border-2 border-primary-300 overflow-hidden align-center justify-center flex",children:(0,l.jsx)("img",{src:(null==d?void 0:null===(s=d.user)||void 0===s?void 0:s.photoUrl)||"/img/search/user.svg",className:"w-full h-full"})}),(0,l.jsxs)("div",{className:"text-2xl mt-4 font-semibold",children:[null==d?void 0:null===(t=d.user)||void 0===t?void 0:t.firstName," ",null==d?void 0:null===(a=d.user)||void 0===a?void 0:a.lastName]})]}),(0,l.jsxs)("div",{className:"p-8",children:[(0,l.jsx)("div",{className:"border-b-1 border-gray-100"}),(0,l.jsx)("p",{className:"text-lg pt-4 pb-2 text-center",children:"\uD83C\uDF9F️"}),(0,l.jsx)("p",{className:"text-lg font-bold pb-4 text-center",children:null==d?void 0:null===(n=d.tier)||void 0===n?void 0:n.name}),(0,l.jsx)("div",{className:"border-b-1 border-gray-100"})]}),(0,l.jsx)("div",{className:"pt- px-8",children:null==d?void 0:null===(i=d.answers)||void 0===i?void 0:i.map(e=>(0,l.jsxs)("div",{className:"pb-8",children:[(0,l.jsx)("p",{className:"text-base font-semibold",children:null==e?void 0:e.question}),(0,l.jsx)("p",{className:"text-base font-normal",children:null==e?void 0:e.answer})]},e.questionId))})]})]},d.id)})},components_RequestListModal=e=>{var s;let{total:t,eventId:n,onClose:i}=e,[r,d]=(0,a.useState)(0),[c,u]=(0,a.useState)(null),{data:v,isLoading:x,isFetching:m,fetchNextPage:g}=(0,o.E3)({eventId:n}),h=(0,a.useRef)(null),p=(0,a.useCallback)(e=>{!m&&(h.current&&h.current.disconnect(),h.current=new IntersectionObserver(e=>{var s,t;e[0].isIntersecting&&(null==v?void 0:null===(t=v.pages)||void 0===t?void 0:null===(s=t[v.pages.length-1])||void 0===s?void 0:s.items.length)===_.cY&&(g({pageParam:r+1}),d(e=>e+1))}),e&&h.current.observe(e))},[m,r]),{refetch:f,isFetching:j}=(0,o.lN)(n,{isEnabled:!1}),onClickDownloadCSV=async()=>{let{data:e}=await f(),s=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"});(0,D.saveAs)(s,"Bounce-Guests.xlsx")},onRequestClick=e=>{u(e)},b=(null==v?void 0:null===(s=v.pages)||void 0===s?void 0:s.flatMap(e=>e.items))||[];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(E.Z,{type:E.w.SMALL,onClose:i,visible:!0,icon:(0,l.jsx)(S.N5x,{size:20}),title:"Request list (".concat(t,")"),renderFooter:()=>
1(0,l.jsx)(R.ZP,{type:R.L$.Inverted,onClick:onClickDownloadCSV,icon:(0,l.jsx)("img",{src:"/img/events/csv.svg"}),loading:j,children:"Download CSV"}),isBehind:null!==c,children:(0,l.jsxs)("div",{className:"px-4 py-6",children:[(0,l.jsx)(Z.Z,{isLoading:x}),!x&&(null==b?void 0:b.length)===0&&(0,l.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center py-20",children:[(0,l.jsx)("img",{src:"/img/events/empty-request-list.png",className:"w-28"}),(0,l.jsx)("p",{className:"text-sm text-gray-500 text-center",children:"Ticket requests will appear here"}),(0,l.jsx)("p",{className:"text-sm text-gray-500 px-10 text-center mt-4",children:"You can view all your approved/rejected requests by downloading the CSV"})]}),null==b?void 0:b.map((e,s)=>(0,l.jsx)(L,{eventId:n,request:e,ref:p,onClick:()=>onRequestClick(s)},e.id))]})}),null!==c&&(0,l.jsx)(RequestDetailModal,{eventId:n,request:null==b?void 0:b[c],onClose:()=>{u(null)},onSkip:()=>{u(e=>(null==b?void 0:b.length)===e+1?null:e+1)}})]})},components_EventRequestList=e=>{var s,t;let{eventId:n,requestListSummary:i}=e,{t:r}=(0,u.$G)(["events"]),[d,o]=(0,a.useState)(!1),toggleRequestListModal=()=>{o(e=>!e)},c=(0,a.useMemo)(()=>{var e;return null===(e=i.tierApprovals)||void 0===e?void 0:e.map(e=>e.user)},[i.tierApprovals])||[];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(C.Z,{data:c,onClick:toggleRequestListModal,badgeType:C.g.Large,title:r("events:dashboard.ticketing.ticketRequests"),secondaryDefaultText:(0,l.jsxs)("div",{className:"flex gap-1",children:[(0,l.jsxs)("span",{className:"font-bold",children:[i.newCount||0,"\xa0",r("events:dashboard.ticketing.unread")]}),(0,l.jsx)("span",{children:"•"}),(0,l.jsxs)("span",{children:[i.totalApprovalsCount||0,"\xa0",r("events:dashboard.ticketing.total")]})]}),additionalGuests:(null==i?void 0:null===(s=i.tierApprovals)||void 0===s?void 0:s.length)>0?Math.max((null==i?void 0:null===(t=i.tierApprovals)||void 0===t?void 0:t.length)-5,0):0}),d&&(0,l.jsx)(components_RequestListModal,{total:null==i?void 0:i.pendingCount,eventId:n,onClose:toggleRequestListModal})]})},new_TicketingSection=e=>{var s,t,n,i,r,d,c,v,x,m,g,h,p,f,j,b,y;let{event:C,onClickExportAnalytics:S,isFetchingExportAnalytics:D}=e,{t:_}=(0,u.$G)(["events"]),E=(0,N.useRouter)(),R=E.query.slug,{data:Z}=(0,o.ZZ)(R,C.isOrganizer),q=(0,a.useMemo)(()=>{var e,s;return(null==C?void 0:C.isOrganizer)&&(null==C?void 0:null===(s=C.pricing)||void 0===s?void 0:null===(e=s.tiers)||void 0===e?void 0:e.find(e=>e.requiresApproval))},[null==C?void 0:C.isOrganizer,null==C?void 0:null===(s=C.pricing)||void 0===s?void 0:s.tiers]);return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between  mb-4 items-center",children:[(0,l.jsxs)("h2",{className:"text-xl font-bold flex flex-row",children:[(0,l.jsx)("img",{src:"/img/events/ticket.svg",alt:"ticket"})," \xa0"," ",_("events:dashboard.ticketing.title")]}),(0,l.jsx)("div",{className:"flex text-right",children:(0,l.jsx)(k.Z,{onClick:S,loading:D})})]}),(0,l.jsxs)("div",{className:"flex flex-row gap-4",children:[q&&(0,l.jsx)("div",{className:"w-1/3",children:(0,l.jsx)(components_EventRequestList,{eventId:R,requestListSummary:C.requestListSummary})}),(0,l.jsxs)("div",{className:w()("flex gap-4",q?"w-2/3":"flex-1"),children:[(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(StatCardWithProgress,{label:_("events:dashboard.ticketing.admissionScanned"),value:"".concat(null==Z?void 0:null===(n=Z.tickets)||void 0===n?void 0:null===(t=n.admission)||void 0===t?void 0:t.scans,"/").concat(null==Z?void 0:null===(r=Z.tickets)||void 0===r?void 0:null===(i=r.admission)||void 0===i?void 0:i.sales),progress:{value:null==Z?void 0:null===(c=Z.tickets)||void 0===c?void 0:null===(d=c.admission)||void 0===d?void 0:d.scans,max:null==Z?void 0:null===(x=Z.tickets)||void 0===x?void 0:null===(v=x.admission)||void 0===v?void 0:v.sales}})}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(StatCardWithProgress,{label:_("events:dashboard.ticketing.addOnsScanned"),value:"".concat(null==Z?void 0:null===(g=Z.tickets)||void 0===g?void 0:null===(m=g.addon)||void 0===m?void 0:m.scans,"/").concat(null==Z?void 0:null===(p=Z.tickets)||void 0===p?void 0:null===(h=p.addon)||void 0===h?void 0:h.sales),progress:{value:null==Z?void 0:null===(j=Z.tickets)||void 0===j?void 0:null===(f=j.addon)||void 0===f?void 0:f.scans,max:null==Z?void 0:null===(y=Z.tickets)||void 0===y?void 0:null===(b=y.addon)||void 0===b?void 0:b.sales}})})]})]})]})},B=t(75810),new_CampaignSection=e=>{var s,t,a,n,i,r,d,c,v,x,m,g,h,p;let{isOrganizer:f,onClickExportAnalytics:j,isFetchingExportAnalytics:b}=e,{t:y}=(0,u.$G)(["events"]),w=(0,N.useRouter)(),C=w.query.slug,{data:S}=(0,o.ZZ)(C,f);return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between  mb-4 items-center",children:[(0,l.jsxs)("h2",{className:"text-xl font-bold flex flex-row",children:[(0,l.jsx)("img",{src:"/img/events/campaign.svg",alt:"campaign"})," \xa0"," ",y("events:dashboard.campaigns.title")]}),(0,l.jsx)("div",{className:"flex text-right",children:(0,l.jsx)(k.Z,{onClick:j,loading:b})})]}),(0,l.jsxs)("div",{className:"flex justify-between space-x-4",children:[(0,l.jsx)(MultiStatCard,{title:"".concat(y("events:dashboard.campaigns.trackingLinks")," (").concat(null==S?void 0:null===(s=S.trackingLinks)||void 0===s?void 0:s.count,")"),className:"w-1/2",iconUrl:"/img/events/hiperlink.svg",stats:[{label:y("events:dashboard.campaigns.views"),value:(null==S?void 0:null===(t=S.trackingLinks)||void 0===t?void 0:t.views)===0?"-":null==S?void 0:null===(a=S.trackingLinks)||void 0===a?void 0:a.views},{label:y("events:dashboard.campaigns.sales"),value:(null==S?void 0:null===(n=S.trackingLinks)||void 0===n?void 0:n.sales)===0?"-":null==S?void 0:null===(i=S.trackingLinks)||void 0===i?void 0:i.sales},{label:y("events:dashboard.campaigns.revenue"),value:(null==S?void 0:null===(r=S.trackingLinks)||void 0===r?void 0:r.revenue)===0?"-":(0,B.O)(null==S?void 0:null===(d=S.trackingLinks)||void 0===d?void 0:d.revenue)}],onClick:()=>{w.push("/events/".concat(C,"?view=analytics"))}}),(0,l.jsx)(MultiStatCard,{title:"".concat(y("events:dashboard.campaigns.discountCodes")," (").concat(null==S?void 0:null===(c=S.discountCodes)||void 0===c?void 0:c.activeCount,")"),className:"w-1/2",iconUrl:"/img/events/discount.svg",stats:[{label:y("events:dashboard.campaigns.active"),value:(null==S?void 0:null===(v=S.discountCodes)||void 0===v?void 0:v.activeCount)===0?"-":null==S?void 0:null===(x=S.discountCodes)||void 0===x?void 0:x.activeCount},{label:y("events:dashboard.campaigns.paused"),value:(null==S?void 0:null===(m=S.discountCodes)||void 0===m?void 0:m.pausedCount)===0?"-":null==S?void 0:null===(g=S.discountCodes)||void 0===g?void 0:g.pausedCount},{label:y("events:dashboard.campaigns.sales"),value:(null==S?void 0:null===(h=S.discountCodes)||void 0===h?void 0:h.revenue)===0?"-":(0,B.O)(null==S?void 0:null===(p=S.discountCodes)||void 0===p?void 0:p.revenue)}],onClick:()=>{w.push("/events/".concat(C,"?view=discountCodes"))}})]})]})},T=t(57905),M=t(71065),F=t(88767),O=t(26790),new_KeyMetricsSection=()=>{var e;let{t:s}=(0,u.$G)(["events"]),t=(0,N.useRouter)(),n=t.query.slug,{data:i}=function(e){let{eventId:s}=e;return(0,F.useQuery)(["data",{eventId:s}],()=>(0,_.Oz)({eventId:s}))}({eventId:n}),r=(0,a.useMemo)(()=>{var e;return i&&i.data&&0!==i.data.length?null==i?void 0:null===(e=i.data)||void 0===e?void 0:e.map(e=>{let s=new Date(e.date),t=s.toLocaleDateString(O.Z.language,{month:"short",day:"numeric"});return{name:t,value:e.revenue,total:null==i?void 0:i.totalRevenue}}):[]},[i]);return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between  mb-4 items-center",children:[(0,l.jsxs)("h2",{className:"text-xl font-bold flex flex-row",children:[(0,l.jsx)("img",{src:"/img/events/key-metrics.svg",alt:"key-metrics"})," \xa0"," ",s("events:dashboard.keyMetrics")]}),(0,l.jsx)("div",{className:"flex text-right"})]}),(0,l.jsxs)("div",{className:"flex justify-between space-x-4",children:[(0,l.jsx)(M.Z,{}),(0,l.jsx)(T.ZP,{data:r,className:"w-1/2",title:s("events:dashboard.revenueLastDays",{count:(null==i?void 0:null===(e=i.data)||void 0===e?void 0:e.length)||5}),subtitle:"".concat((0,B.O)(null==i?void 0:i.totalRevenue)),type:"currency"})]})]})},z=t(70737),EventDashboardContent=()=>{var e;let{t:s}=(0,u.$G)(["events"]),{data:{event:t,eventAnalytics:a},goBack:n,toggleManageEventModal:r}=(0,f.W)(),{refetch:d,isLoading:y}=(0,o.gb)(null==t?void 0:t._id,{isEnabled:!1});if(!t||!a)return(0,l.jsx)(c.Z,{});let onClickExportAnalytics=async()=>{let{data:e}=await d(),t=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"});(0,D.saveAs)(t,s("events:dashboard.content.fileName"))};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i(),{children:(0,l.jsx)("title",{children:s("events:dashboard.content.title",{title:t.title})})}),(0,l.jsx)(v.Z,{title:s("events:dashboard.content.eventDashboard"),onMenuClick:r,onBack:n,wideContent:!0,children:t.isDraft&&(0,l.jsx)("div",{className:"flex-1 justify-end flex pr-2",children:(0,l.jsx)("div",{className:"border-1 rounded-full px-3 items-center flex",children:s("events:dashboard.content.draft")})})}
1),(0,l.jsx)("div",{className:"md:pt-[46px] -mt-[41px] md:mt-0 pb-20",children:(0,l.jsx)("div",{className:"relative z-1",children:(0,l.jsxs)(x.Z,{children:[(0,l.jsx)(m.Z,{imageUrl:null===(e=t.photo)||void 0===e?void 0:e.url,children:(0,l.jsx)(g.Z,{wideContent:!0,children:(0,l.jsxs)("div",{className:"pt-5 md:pt-11",children:[(0,l.jsx)(h.Z,{}),(0,l.jsx)(j.Z,{isOrganizer:t.isOrganizer})]})})}),(0,l.jsx)(g.Z,{wideContent:!0,children:(0,l.jsxs)("div",{className:"pt-11 gap-11 flex flex-col",children:[(0,l.jsx)(b.Z,{}),(0,l.jsx)(new_TicketingSection,{event:t,onClickExportAnalytics:onClickExportAnalytics,isFetchingExportAnalytics:y}),(0,l.jsx)(new_CampaignSection,{isOrganizer:t.isOrganizer,onClickExportAnalytics:onClickExportAnalytics,isFetchingExportAnalytics:y}),(0,l.jsx)(new_KeyMetricsSection,{}),(0,l.jsx)(z.Z,{isOrganizer:t.isOrganizer})]})})]})})}),(0,l.jsx)(p.Z,{})]})},new_NewEventDashboard=()=>{let e=(0,r.Z)(),s=e.slug,{data:t}=(0,o.Q3)(s,{shareToken:e.invite});return t?t._id&&!t.isOrganizer?(0,l.jsx)(d.Z,{to:"/events/".concat(t._id)}):(0,l.jsx)(f.Z,{event:t,children:(0,l.jsx)(EventDashboardContent,{})}):(0,l.jsx)(c.Z,{})},dashboard=()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i(),{children:(0,l.jsx)("title",{children:"Event Dashboard | Bounce"})}),(0,l.jsx)(new_NewEventDashboard,{})]})},73996:function(e,s,t){"use strict";t.d(s,{g:function(){return a},Z:function(){return wysiwyg_form_EventUsersBadge}});var l,a,n=t(85893),i=t(67294),wysiwyg_form_SquareBadges=e=>{let{data:s,additionalUsers:t}=e;return(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[s.map((e,s)=>(0,n.jsx)(i.Fragment,{children:(0,n.jsx)("div",{className:"w-12 h-12 object-cover rounded-lg border-2 border-primary-300 overflow-hidden align-center justify-center flex",children:(0,n.jsx)("img",{alt:e.name,src:(null==e?void 0:e.badgeImageUrl)||"/img/search/user.svg"})})},"".concat(e.id,"-").concat(s)||s)),t>0&&(0,n.jsxs)("div",{className:"w-12 h-12 object-cover rounded-lg border-2 border-primary-300 overflow-hidden align-center justify-center flex",children:["+",t]})]})},r=t(93967),d=t.n(r),wysiwyg_form_CircleBadges=e=>{let{data:s,additionalUsers:t,fluid:l}=e;return(0,n.jsxs)("div",{className:"flex items-center",children:[s.map((e,a)=>{var i;return(0,n.jsx)("div",{className:d()("w-12 object-cover rounded-full border-2 border-primary-300 overflow-hidden align-center justify-center flex",(a<s.length-1||t>0)&&"-mr-3",!l&&"h-12"),children:(0,n.jsx)("img",{alt:"".concat(e.name,"'s badge"),src:e.photoUrl||(null===(i=e.photo)||void 0===i?void 0:i.url)||"/img/search/user.svg"})},"".concat(e._id,"-").concat(a)||a)}),t>0&&(0,n.jsx)("div",{className:d()("w-12 object-cover rounded-full border-2 border-primary-300 overflow-hidden bg-white align-center justify-center flex",l?"self-stretch justify-self-stretch":"h-12"),children:(0,n.jsxs)("span",{children:["+",t]})})]})};(l=a||(a={})).Regular="regular",l.Large="large";var wysiwyg_form_EventUsersBadge=e=>{let{onClick:s,data:t,squareBadges:l,additionalGuests:a,title:i,secondaryDefaultText:r,badgeType:o="regular"}=e;return(0,n.jsxs)("div",{className:d()("p-4 flex items-center justify-between border-1 rounded-md cursor-pointer","large"===o&&"min-w-[250px] gap-4"),onClick:()=>{s()},children:[(0,n.jsxs)("div",{className:"flex flex-col justify-center",children:[(0,n.jsx)("div",{className:d()("text-neutral-500","large"===o?"text-sm font-bold":"text-base font-semibold"),children:i}),(0,n.jsx)("div",{className:d()("font-normal","large"===o?"text-lg text-gray-600":"text-sm"),children:r})]}),(0,n.jsx)("div",{className:d()("large"===o&&"overflow-hidden"),children:l?(0,n.jsx)(wysiwyg_form_SquareBadges,{data:t,additionalUsers:a}):(0,n.jsx)(wysiwyg_form_CircleBadges,{data:t,additionalUsers:a,fluid:!0})})]})}},46191:function(e,s,t){"use strict";t.d(s,{_:function(){return useGetEventAnalyticsTicketScanByTier}});var l=t(88767),a=t(9840);function useGetEventAnalyticsTicketScanByTier(e){let{eventId:s}=e;return(0,l.useQuery)(["data/ticketScansByTier",{eventId:s}],()=>(0,a.PY)({eventId:s}),{retry:0,enabled:!!s})}},88816:function(e,s,t){"use strict";t.d(s,{Z:function(){return new_EventDashboardTotals}});
1var l=t(85893),a=t(88767),n=t(9840),i=t(29420),r=t(11163),d=t(67421),o=t(75810),new_EventDashboardTotals=()=>{let{t:e}=(0,d.$G)(["events"]),s=(0,r.useRouter)(),t=s.query.slug,{data:c}=function(e){let{eventId:s}=e;return(0,a.useQuery)(["totals",{eventId:s}],()=>(0,n.HB)({eventId:s}))}({eventId:t}),u=[{label:e("events:dashboard.totals.totalRevenue"),value:null==c?void 0:c.totalRevenue,format:e=>"".concat((0,o.O)(e))},{label:e("events:dashboard.totals.totalRSVPs"),value:null==c?void 0:c.totalRSVP},{label:e("events:dashboard.totals.totalTicketsSold"),value:null==c?void 0:c.totalTicketsSold},{label:e("events:dashboard.totals.totalScanned"),value:null==c?void 0:c.totalTicketsScanned},{label:e("events:dashboard.totals.scannedRate"),value:null==c?void 0:c.scannedRate,format:e=>"".concat(e,"%")},{label:e("events:dashboard.totals.avgSafetyRating"),value:null==c?void 0:c.avgSafetyRating,format:e=>e?"".concat(null==c?void 0:c.avgSafetyRating," / 3"):"-"}];return(0,l.jsx)(i.Z,{data:u})}},71065:function(e,s,t){"use strict";
1var l=t(85893),a=t(57905),n=t(11163),i=t(46191),r=t(90379);s.Z=()=>{var e,s;let t=(0,n.useRouter)(),d=t.query.slug,{data:o,isLoading:c}=(0,i._)({eventId:d});if(c)return(0,l.jsx)(r.Z,{isLoading:!0});let u=(null==o?void 0:null===(e=o.data)||void 0===e?void 0:e.length)>0?(e=>{var s;let t=Object.entries((s="tierName",null==e?void 0:e.reduce((e,t)=>(e[t[s]]=e[t[s]]||[],e[t[s]].push(t),e),{}))).map(e=>{let[s,t]=e;return{name:s.replace(" - "," "),value:t.reduce((e,s)=>e+s.ticketsScanned,0),total:t.reduce((e,s)=>e+(null==s?void 0:s.ticketsSold),0)}});return t})(o.data):[];return 0===u.length&&(u=[(0,a.UB)("-",0,0),(0,a.UB)("-",0,0),(0,a.UB)("-",0,0),(0,a.UB)("-",0,0),(0,a.UB)("-",0,0)]),(0,l.jsx)(a.ZP,{data:u,className:"w-1/2",title:"Top ".concat((null==o?void 0:null===(s=o.data)||void 0===s?void 0:s.length)&&o.data.length>=5?o.data.length:""," Ticket Tiers Scanned"),type:"number"})}}},function(e){e.O(0,[3874,7738,2152,4762,5170,6498,8381,8943,4181,9774,2888,179],function(){return e(e.s=60319)}),_N_E=e.O()}]);
2//# sourceMappingURL=dashboard-d12bdea219b8a4dd.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.