1import{j as e}from"./hooks-DXJ6HdY6.js";import"../vendor-MOSTV3TL.js";import"./analytics-BwjY9p6C.js";import{e as D,f as R,E as A}from"./svg-B_4imyr2.js";import{T as l,P as _,c as b,G,B as h,C as N,R as M,t as C}from"./ui-_pAMz3ge.js";import{a as I,u as B}from"./config-Cvu3DwEk.js";import{u as V,C as w}from"./auth-CnB4t7S5.js";var W=Object.defineProperty,$=Object.defineProperties,q=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,T=(i,a,t)=>a in i?W(i,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[a]=t,X=(i,a)=>{for(var t in a||(a={}))H.call(a,t)&&T(i,t,a[t]);if(P)for(var t of P(a))U.call(a,t)&&T(i,t,a[t]);return i},J=(i,a)=>$(i,q(a)),K=({ticket:i,className:a=""})=>e.jsxs("div",{className:"relative","data-testid":`ticket-type-badge-${i._id}`,children:[e.jsx(D,{className:a,style:{color:i.ticket_color}}),e.jsx("span",{className:"text-body-contrast absolute inset-0 flex items-center justify-center text-xs",style:{color:i.text_color},children:(i==null?void 0:i.shortcode)||i.title.slice(0,2).toUpperCase()})]}),O=K,Q=({zone:i,ticket:a,typographyProps:t,showIcon:p=!1,className:v})=>{var c,d,n;const{t:m}=I("ticketing_booking"),r=!!i&&!(a!=null&&a.requires_entry_ticket);return e.jsxs("div",{className:C("text-text-secondary data-[zone=true]:text-notice flex items-center gap-2 text-sm",v),"data-zone":r,children:[!!((c=a==null?void 0:a.subscription_ticket_type)!=null&&c.icon)&&p&&e.jsx("img",{src:a.subscription_ticket_type.icon,alt:"",className:"h-5 w-5"}),e.jsxs(l,J(X({},t),{children:[e.jsx("span",{style:{color:r?"":(d=a==null?void 0:a.subscription_ticket_type)==null?void 0:d.background_color},children:(n=a==null?void 0:a.subscription_ticket_type)==null?void 0:n.title}),r&&` ${m("ticketing_booking:zone_entry.plus_zone_entry")}`]}))]})},z=Q,Y=({slug:i,className:a,type:t="event"})=>{var p,v,c,d;const{t:n}=I(["ticketing_event","ticketing_booking"]),{locale:m}=B(),{data:r,isLoading:k,isFetchingNextPage:g,hasNextPage:S,fetchNextPage:E}=V({lang:m,slug:i,ticketType:t}),x=r==null?void 0:r.event.preview_image,F=Number((p=r==null?void 0:r.event.fees)==null?void 0:p.amount)||0,L=Number((v=r==null?void 0:r.event.fees)==null?void 0:v.vat)||0,u=F+L;return k||!r||!(r!=null&&r.tickets.length)?null:e.jsxs("div",{className:C("space-y-4",a),children:[e.jsx(l,{as:"h2",variant:"heading-S",children:n("ticketing_event:tickets")}),!!x&&e.jsxs(e.Fragment,{children:[e.jsxs(_,{className:"relative p-4",children:[e.jsx(b,{className:"aspect-1 mx-auto max-h-72 max-w-md object-cover",src:x,alt:"preview tickets image"}),e.jsx(G,{render:({open:s})=>e.jsx(h,{theme:"action",shape:"outlined",className:"absolute bottom-0 m-3 p-2 ltr:right-0 rtl:left-0",onClick:s,children:e.jsx(R,{className:"h-5 w-5"})}),slides:[{src:x}]})]}),((c=r==null?void 0:r.event)==null?void 0:c.is_seated)&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{variant:"label-M",children:n("ticketing_event:ticket_details.warning_title")}),e.jsx(l,{variant:"body-S",children:n("ticketing_event:ticket_details.warning_desc")})]})]}),e.jsxs(N,{rootClassName:"space-y-4",className:"py-0.5",options:{active:(r==null?void 0:r.tickets.length)>1},arrows:"top",arrowsClassName:"!pb-2 [&>div]:grow [&>div:last-child]:max-w-fit [&>div:last-child]:hidden [&>div:last-child]:md:flex",title:e.jsx(l,{variant:"heading-S",children:n("ticketing_event:ticket_details.types_total",{count:(d=r==null?void 0:r.meta)==null?void 0:d.total})}),children:[r.tickets.map(s=>{var j;return e.jsxs(_,{className:"me-4 shrink-0 grow-0 basis-72 space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx(O,{ticket:s}),e.jsx(M,{size:"2xl",cancel:!1,action:{label:n("common:ok"),onClick:({close:o})=>o()},render:({open:o})=>e.jsx(h,{theme:"transparent",shape:"text",className:"p-0",onClick:o,children:e.jsx(A,{className:"h-6 w-6"})}),body:()=>{var o,y;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(O,{ticket:s}),e.jsx(l,{variant:"heading-L",children:s.title})]}),s.subscription_ticket_type&&e.jsx(z,{zone:(o=r==null?void 0:r.event)==null?void 0:o.zone,ticket:s,showIcon:!0}),!!s.description&&e.jsx("div",{dangerouslySetInnerHTML:{__html:s.description}}),!!((y=s==null?void 0:s.gallery_images)!=null&&y.length)&&e.jsx(N,{className:"py-0.5",options:{active:s.gallery_images.length>1},children:s.gallery_images.map(f=>e.jsx("div",{className:"aspect-1 me-4 shrink-0 basis-28",children:e.jsx(b,{src:f})},f))}
1),e.jsx(w,{originalPrice:+s.original_price+ +s.original_price_vat+u,discountPrice:+s.price+ +s.vat+u,currency:s==null?void 0:s.currency,zeroAsFree:!0})]})}})]}),e.jsx(l,{variant:"label-L",children:s.title}),s.subscription_ticket_type&&e.jsx(z,{zone:(j=r==null?void 0:r.event)==null?void 0:j.zone,ticket:s,typographyProps:{variant:"body-XS"}}),e.jsx(w,{originalPrice:+s.original_price+ +s.original_price_vat+u,discountPrice:+s.price+ +s.vat+u,currency:s==null?void 0:s.currency,zeroAsFree:!0})]},s._id)}),g?[1,2].map(s=>e.jsx(_,{className:"bg-paper-level-2 me-4 shrink-0 grow-0 basis-72 animate-pulse",children:e.jsx("div",{})},s)):e.jsx("div",{}),S&&!g?e.jsx(_,{className:"shrink-0 basis-24 overflow-hidden !p-0",children:e.jsx(h,{theme:"action",shape:"text",className:"flex h-full w-full items-center justify-center p-2",onClick:()=>E(),children:e.jsx(l,{variant:"body-S",className:"text-center",children:n("ticketing_event:load_more")})})}):e.jsx("div",{})]})]})},ne=Y;export{ne as T}; 2//# sourceMappingURL=ticketing-CdkCeFLo.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.