@seatlayer/js 0.68.1 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/index.cjs +871 -298
- package/dist/index.d.cts +245 -91
- package/dist/index.d.ts +245 -91
- package/dist/index.js +870 -297
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Jn=Object.create;var $t=Object.defineProperty;var eo=Object.getOwnPropertyDescriptor;var to=Object.getOwnPropertyNames;var io=Object.getPrototypeOf,ro=Object.prototype.hasOwnProperty;var pr=r=>{throw TypeError(r)};var so=(r,e,t)=>()=>{if(t)throw t[0];try{return r&&(e=r(r=0)),e}catch(i){throw t=[i],i}};var hr=(r,e)=>{for(var t in e)$t(r,t,{get:e[t],enumerable:!0})},ur=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of to(e))!ro.call(r,s)&&s!==t&&$t(r,s,{get:()=>e[s],enumerable:!(i=eo(e,s))||i.enumerable});return r};var mr=(r,e,t)=>(t=r!=null?Jn(io(r)):{},ur(e||!r||!r.__esModule?$t(t,"default",{value:r,enumerable:!0}):t,r)),no=r=>ur($t({},"__esModule",{value:!0}),r);var ki=(r,e,t)=>e.has(r)||pr("Cannot "+t);var w=(r,e,t)=>(ki(r,e,"read from private field"),t?t.call(r):e.get(r)),B=(r,e,t)=>e.has(r)?pr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),L=(r,e,t,i)=>(ki(r,e,"write to private field"),i?i.call(r,t):e.set(r,t),t),H=(r,e,t)=>(ki(r,e,"access private method"),t);var Fr={};hr(Fr,{errorCopy:()=>Oi,mountCheckout:()=>No,unavailableCopy:()=>Vr});function Do(r,e){try{window.sessionStorage.setItem(_o,JSON.stringify({orderId:r,...e?{eventKey:e}:{},storedAt:Date.now()}))}catch{}}function Bo(){if(typeof document>"u"||document.getElementById(Nr))return;let r=document.createElement("style");r.id=Nr,r.textContent=$o,document.head.appendChild(r)}function Vr(r,e){let t=`${e} ${e===1?"seat is":"seats are"} held for a limited time.`;return r==="payments_off_for_event"?{title:"This event isn\u2019t sold online",body:`${t} The organiser isn\u2019t taking payment for this event here.`,detail:"Nothing has been charged. Check where you found this event for how to get tickets."}:r==="unavailable_for_event"?{title:"This event isn\u2019t taking payment yet",body:`${t} Online payment is not switched on for this event.`,detail:"Nothing has been charged. If you were sent here to pay, let the organiser know \u2014 only they can turn payment on for this event."}:{title:"Finish in the ticketing checkout",body:`${t} Payment for this event is taken elsewhere.`,detail:"Nothing has been charged. Continue in the checkout on this page to pay for your seats."}}function Oi(r){switch(r){case"gateway_not_connected":case"payments_not_enabled_for_event":return"This event is not taking online payments. Contact the organiser to buy these seats.";case"provider_mismatch":return"This event\u2019s payment setup changed while you were choosing. Nothing was charged \u2014 please try again.";case"hold_not_active":case"hold_not_found":return"Your seats were released before checkout started. Nothing was charged \u2014 please pick again.";case"checkout_already_started":return"A payment for these seats is already in progress. Finish that one, or wait for it to time out before starting again.";case"event_closed":return"Sales for this event have closed.";case"insufficient_hosted_credits":return"Ticket sales are temporarily paused while the organiser updates their SeatLayer balance. Nothing was charged \u2014 please try again later or contact the organiser.";case"gateway_currency_mismatch":case"unsupported_currency":case"mixed_currency_hold":case"price_unusable":return"These seats cannot be checked out right now because of a pricing configuration problem. Nothing was charged \u2014 please contact the organiser.";case"rate_limited":return"Too many attempts. Wait a moment and try again.";default:return"We could not start the payment. Nothing was charged \u2014 please try again."}}function zo(){let r=window.Razorpay;return r?Promise.resolve(r):new Promise((e,t)=>{let i=document.querySelector(`script[src="${zr}"]`),s=i??document.createElement("script"),n=()=>{let o=window.Razorpay;o?e(o):t(new Error("razorpay_unavailable"))};s.addEventListener("load",n,{once:!0}),s.addEventListener("error",()=>t(new Error("razorpay_script_failed")),{once:!0}),!i&&(s.src=zr,s.async=!0,document.head.appendChild(s))})}function _(r,e,t){let i=document.createElement(r);return e&&(i.className=e),t!==void 0&&(i.textContent=t),i}function No(r){Bo();let e=!0,t=!1,i=_("div","sl-hco");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let s=_("div","sl-hco-card");i.appendChild(s);let n=()=>{e=!1,i.remove(),document.removeEventListener("keydown",a,!0)},o=()=>{n(),r.onCancel()};function a(E){E.key!=="Escape"||!i.isConnected||(E.stopPropagation(),E.preventDefault(),o())}document.addEventListener("keydown",a,!0);let l=_("h2","sl-hco-title","Checkout"),c=`sl-hco-t-${Math.random().toString(36).slice(2,8)}`;l.id=c,i.setAttribute("aria-labelledby",c);let h=(...E)=>{s.replaceChildren(l,...E)},p=E=>{if(!e)return;let $=_("p","sl-hco-status sl-hco-error",E);$.setAttribute("role","alert");let N=_("button","sl-hco-back","Back to seats");N.type="button",N.addEventListener("click",o),h($,N)},d=E=>{if(!e)return;let $=_("p","sl-hco-status",E);$.setAttribute("role","status"),h($)},u=async E=>{d("Payment received \u2014 confirming your seats\u2026");let $=Date.now()+9e4;for(;e&&Date.now()<$;){try{let N=await r.orderStatus(E);if(!e)return;if(N.status==="confirmed"){t=!0,l.textContent="Your tickets are confirmed";let ht=_("p","sl-hco-status",`${N.seatCount} ${N.seatCount===1?"seat":"seats"} confirmed. Your tickets \u2014 with their door QR codes \u2014 are in your email.`),_t=_("dl","sl-hco-receipt"),dr=(N.tickets??[]).map(Ge=>Ge.label);dr.length&&_t.append(_("dt",void 0,"Seats"),_("dd",void 0,dr.join(", "))),_t.append(_("dt",void 0,"Paid"),_("dd",void 0,`${N.amountFormatted} ${N.currency}`),_("dt",void 0,"Order"),_("dd","sl-hco-ref",N.orderId));let Dt=_("button","sl-hco-back","Close");if(Dt.type="button",Dt.addEventListener("click",o),N.ticketUrl){let Ge=_("a","sl-hco-tickets","View tickets & QR codes");Ge.href=N.ticketUrl,Ge.target="_blank",Ge.rel="noreferrer",h(ht,_t,Ge,Dt)}else h(ht,_t,Dt);r.onConfirmed(N);return}if(N.status==="failed"||N.status==="expired"){p(N.status==="expired"?"Your seats were released before payment completed. Nothing was charged \u2014 please pick again.":"The payment did not complete. If you were charged, it has been refunded automatically.");return}}catch{}await new Promise(N=>setTimeout(N,2e3))}!e||t||p("Still confirming with the payment provider. If your payment went through, your tickets will arrive by email shortly \u2014 you do not need to pay again.")};if(r.state.kind==="unavailable"){let E=Vr(r.state.reason,r.state.seatCount);l.textContent=E.title;let $=_("p","sl-hco-label","Seats held"),N=_("button","sl-hco-back","Back to seat map");return N.type="button",N.addEventListener("click",o),s.replaceChildren($,l,_("p","sl-hco-status",E.body),_("p","sl-hco-note",E.detail),N),r.root.appendChild(i),N.focus(),{destroy:n}}if(r.state.kind==="resume")return r.root.appendChild(i),u(r.state.orderId),{destroy:n};let{order:g,provider:b}=r.state,x=_("div","sl-hco-summary"),k=_("div","sl-hco-seats");for(let E of g.labels)k.appendChild(_("span","sl-hco-seat",E));let S=r.formatMoney(g.total,g.currency),C=_("div","sl-hco-total");C.append(_("span",void 0,"Total"),_("strong",void 0,S)),x.append(k,C);let A=_("form","sl-hco-form"),M=_("label","sl-hco-label","Email \u2014 your tickets go here"),P=_("input","sl-hco-input");P.type="email",P.required=!0,P.autocomplete="email",P.placeholder="you@example.com",P.id=`${c}-email`,M.htmlFor=P.id;let R=_("label","sl-hco-label","Name (optional)"),m=_("input","sl-hco-input");m.type="text",m.autocomplete="name",m.placeholder="Your name",m.id=`${c}-name`,R.htmlFor=m.id;let v=_("button","sl-hco-pay",`Pay ${S}`);v.type="submit",v.disabled=!0;let D=_("button","sl-hco-back","Back to seats");D.type="button",D.addEventListener("click",o);let K=new Date(g.expiresAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),j=_("p","sl-hco-note",`Your seats are held until ${K}. Payment is handled by ${b==="razorpay"?"Razorpay":"Stripe"} \u2014 we never see your card details.`),G=_("p","sl-hco-note");G.append("The event organizer and SeatLayer use your email to issue and manage your tickets. ");let U=_("a",void 0,"Privacy Policy");U.href="https://seatlayer.io/privacy/",U.target="_blank",U.rel="noreferrer",G.appendChild(U);let ae=()=>/.+@.+\..+/.test(P.value.trim());P.addEventListener("input",()=>{v.disabled=!ae()});let le=async()=>{d("Opening secure payment\u2026");try{let E=await r.startSession({holdId:g.holdId,buyerEmail:P.value.trim(),...m.value.trim()?{buyerName:m.value.trim()}:{}});if(!e)return;if(E.redirectUrl){Do(E.orderId,r.eventKey),d("Taking you to secure payment\u2026"),window.location.assign(E.redirectUrl);return}if(E.clientPayload){let $=E.clientPayload,N=await zo();if(!e)return;d("Waiting for payment\u2026"),new N({key:$.key,order_id:$.orderId,amount:$.amount,currency:$.currency,name:$.name,prefill:$.prefill,handler:()=>{u(E.orderId)},modal:{ondismiss:()=>{e&&ce()}}}).open();return}p(Oi("gateway_unavailable"))}catch(E){r.onError?.(E),p(Oi(E?.code))}};A.addEventListener("submit",E=>{E.preventDefault(),ae()&&le()}),A.append(M,P,R,m,G,v,D,j);let ce=()=>{l.textContent="Checkout",h(x,A),v.disabled=!ae()};return ce(),r.root.appendChild(i),P.focus(),{destroy:n}}var zr,Nr,_o,$o,jr=so(()=>{"use strict";zr="https://checkout.razorpay.com/v1/checkout.js",Nr="seatlayer-checkout-style",_o="@seatlayer/pending-checkout/v1";$o=`
|
|
2
2
|
/* The card is centred, but max-height:100% lets a long form reach the bottom
|
|
3
3
|
edge \u2014 and on the hosted buyer page that edge is the phone's edge, with the
|
|
4
4
|
Pay button last in the scroll. Reserve the home-indicator gutter here too.
|
|
@@ -38,7 +38,74 @@
|
|
|
38
38
|
.sl-hco-tickets{display:block;width:100%;margin-top:14px;padding:12px;font:inherit;font-size:15px;
|
|
39
39
|
font-weight:650;text-align:center;text-decoration:none;color:var(--sl-accent-ink);
|
|
40
40
|
background:var(--sl-accent);border-radius:calc(var(--sl-radius) * .55)}
|
|
41
|
-
`});var So={};Ii(So,{ApiError:()=>V,BuyerAccessContext:()=>se,BuyerAccessUnavailableError:()=>ie,BuyerRealtimeClient:()=>oe,EmbeddedDesigner:()=>Ft,PerformanceGroupDestroyedError:()=>K,PerformanceGroupPicker:()=>Xt,SEATING_CHART_CALLBACK_PROPS:()=>ui,SEATING_CHART_HANDLE_METHODS:()=>di,SEATING_CHART_IDENTITY_PROPS:()=>pi,SEATING_CHART_VALUE_PROPS:()=>hi,SeasonApiError:()=>ne,SeasonPicker:()=>ei,SeasonRecoveryTimeoutError:()=>ft,SeatPicker:()=>Qe,SeatingChart:()=>Vt,attachPickerFrame:()=>Ir,bindSeatingChartHandle:()=>us,buildSeatingChartOptions:()=>ms,createBuyerAccessContext:()=>Fe,createControllerSink:()=>Be,parseTicketOfferAvailability:()=>Nt,shortOperationReference:()=>Ze,ticketOfferPrices:()=>Gt});module.exports=Fr(So);var $=require("@seatlayer/core");var Me="seatlayer.v1";function jr(r){let e=typeof r.default=="string"?r.default:"free",t={};if(r.seats&&typeof r.seats=="object")for(let[i,s]of Object.entries(r.seats))typeof s=="string"&&s!==e&&(t[i]=s);return{default:e,exceptions:t}}function Nr(r,e){if(!r||r.default!==e.default)return null;let t=[];for(let[i,s]of Object.entries(e.exceptions))r.exceptions[i]!==s&&t.push({label:i,status:s});for(let i of Object.keys(r.exceptions))i in e.exceptions||t.push({label:i,status:e.default});return t}function Gr(r,e){for(let t of e)t.status===r.default?delete r.exceptions[t.label]:r.exceptions[t.label]=t.status}function $i(r){if(/(?:^|[?&#])(?:token|access_token|bearer|authorization|ticket|tkt|bse)=/i.test(r))throw new Error("seatlayer: refusing to open a socket with a credential in the URL");if(/\bbse_[A-Za-z0-9._-]+/.test(r))throw new Error("seatlayer: refusing to open a socket with a credential in the URL")}var oe=class{constructor(e){this.ws=null;this.stopped=!0;this.attempt=0;this.reconnectTimer=null;this.pingTimer=null;this.pongTimer=null;this.resumeTimer=null;this.projection=null;this.version=null;this.v1=!1;this.useQueryMarker=!1;this.hidden=null;this.closedSections=null;this.opts=e,$i(e.url)}get protocol(){return this.ws?this.v1?"v1":"legacy":null}get snapshotVersion(){return this.version}start(){this.stopped&&(this.stopped=!1,this.connect())}stop(){this.stopped=!0,this.clearTimers();let e=this.ws;if(this.ws=null,e){e.onopen=null,e.onmessage=null,e.onclose=null,e.onerror=null;try{e.close()}catch{}}}restart(){this.stop(),this.projection=null,this.version=null,this.attempt=0,this.start()}async connect(){if(this.stopped)return;let e=[Me];if(this.opts.mintTicket){let n;try{n=await this.opts.mintTicket()}catch(o){this.reportIfAccessError(o),this.scheduleReconnect();return}if(this.stopped)return;n?.protocols?.length?(e=[...n.protocols],e.includes(Me)||e.unshift(Me)):n?.ticket&&(e=[Me,`tkt.${n.ticket}`])}let t=this.version!==null;t&&e.push(`sv.${this.version}`);let i=this.useQueryMarker?`${this.opts.url}${this.opts.url.includes("?")?"&":"?"}pv=1`:this.opts.url;$i(i);let s;try{s=(this.opts.socketFactory??((o,a)=>new WebSocket(o,a)))(i,e)}catch{this.scheduleReconnect();return}this.ws=s,s.onopen=()=>{this.ws===s&&(this.attempt=0,this.v1=s.protocol===Me,this.v1||(this.useQueryMarker=!0),this.startKeepalive(s),t?this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync()},5e3):this.opts.sink.resync())},s.onmessage=n=>{if(this.ws!==s)return;let o;try{o=JSON.parse(typeof n.data=="string"?n.data:"")}catch{return}!o||typeof o!="object"||this.handleFrame(o)},s.onclose=n=>{if(this.ws===s){if(this.ws=null,this.clearTimers(),n?.code===4401){this.stopped=!0,this.opts.onAccessUnavailable?.({reason:"revoked",code:"access_revoked",retryable:!1});return}this.scheduleReconnect()}},s.onerror=()=>{try{s.close()}catch{}}}handleFrame(e){let t=typeof e.type=="string"?e.type:"";if(e.protocol===1&&(this.v1=!0),typeof e.snapshotVersion=="number"&&(this.version=e.snapshotVersion),t==="pong"){this.clearPongTimer();return}if(Array.isArray(e.hidden)||Array.isArray(e.closed)){let i=Array.isArray(e.hidden)?e.hidden:[],s=Array.isArray(e.closed)?e.closed:[],n=i.join("\0"),o=s.join("\0");(n!==this.hidden||o!==this.closedSections)&&(this.hidden=n,this.closedSections=o,this.opts.sink.onSections?.(i,s))}if(t!=="hidden"){if(t==="presence"){this.opts.sink.onPresence?.({shoppingSessions:Number(e.shoppingSessions)||0,activeHolds:Number(e.activeHolds)||0});return}if(t!=="allocation"){if(t==="snapshot"||!t&&e.seats){this.answered();let i=jr(e),s=Nr(this.projection,i);this.projection=i,s===null?this.opts.sink.applyProjection?this.opts.sink.applyProjection(i):this.opts.sink.resync():s.length&&this.opts.sink.applyStatuses(s);return}if(t==="delta"&&Array.isArray(e.changes)){this.answered();let i=e.changes.filter(s=>typeof s?.label=="string"&&typeof s?.status=="string").map(s=>({label:s.label,status:s.status}));if(!i.length)return;this.projection&&Gr(this.projection,i),this.opts.sink.applyStatuses(i)}}}}answered(){this.resumeTimer&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}reportIfAccessError(e){let t=e?.reason;e?.name==="BuyerAccessUnavailableError"&&(this.stopped=!0,this.opts.onAccessUnavailable?.({reason:t??"invalid",code:e.code,status:e.status,retryable:t==="paused"}))}startKeepalive(e){this.pingTimer=setInterval(()=>{if(this.ws===e){try{e.send(JSON.stringify({type:"ping"}))}catch{return}this.clearPongTimer(),this.pongTimer=setTimeout(()=>{this.pongTimer=null;try{e.close()}catch{}},1e4)}},25e3)}scheduleReconnect(){if(this.stopped||this.reconnectTimer)return;let e=Math.min(this.attempt++,5),t=Math.min(1e3*2**e,15e3),i=Math.random()*t;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},i)}clearPongTimer(){this.pongTimer&&(clearTimeout(this.pongTimer),this.pongTimer=null)}clearTimers(){this.pingTimer&&clearInterval(this.pingTimer),this.pingTimer=null,this.clearPongTimer(),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.resumeTimer&&clearTimeout(this.resumeTimer),this.resumeTimer=null}};function Ur(r){return r==="blocked"?"not_for_sale":r==="held"||r==="booked"||r==="free"||r==="not_for_sale"?r:"free"}function Be(r,e={}){let t=i=>{let s=r.tableSelection(i);if(s)return s.physicalSeatIds;let n=r.idForLabel(i);return n?[n]:[]};return{applyStatuses(i){let s=r.currentHold()?.labels??[],n={free:[],held:[],booked:[],not_for_sale:[]},o=[],a=[],l=new Map(r.getSelection().map(c=>[c.label,c.id]));for(let c of i){let h=t(c.label);if(!h.length)continue;let p=Ur(c.status);if(n[p].push(...h),e.flashOnLiveChange&&p!=="free"&&!s.includes(c.label)&&h.some(d=>r.getStatus(d)==="free")){let d=p==="held"?"#f4b740":"#f43f5e";for(let u of h)o.push({id:u,color:d})}p!=="free"&&!s.includes(c.label)&&l.has(c.label)&&a.push(c.label)}for(let c of["free","held","booked","not_for_sale"])n[c].length&&r.setStatus(n[c],c);for(let c of o)r.flashSeat(c.id,c.color);if(a.length){let c=a.flatMap(p=>t(p));c.length&&r.deselect(c);let h=i.some(p=>p.status==="blocked"&&a.includes(p.label));e.onSelectedObjectUnavailable?.(a,h?"ineligible":"taken")}e.onStatusChange?.()},async resync(){await r.refresh()},onSections(i,s){r.refresh(),e.onSections?.(i,s)}}}var V=class extends Error{constructor(e,t,i,s,n,o){super(t),this.name="ApiError",this.status=e,this.code=i,this.conflicts=s,this.reason=n,this.retryAfterS=o}},Di=10,zi=1;function Et(r,e){let t=(r??"").trim();if(t){let i=Number(t);if(Number.isFinite(i)&&i>=0)return Math.ceil(i);let s=Date.parse(t);if(Number.isFinite(s))return Math.max(0,Math.ceil((s-Date.now())/1e3))}if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return Math.ceil(e)}var qr={seat_conflict:"taken",conflict:"taken",channel_assignment_conflict:"ineligible",allocation_exhausted:"exhausted"},be=class{constructor(e,t={}){this.base=e;this.viewerId=typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`viewer_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`;this.access=t.access,this.onObjectUnavailable=t.onObjectUnavailable;let i=t.referral?.trim();this.referral=i?i.slice(0,120):void 0}get accessScoped(){return!!this.access?.configured}async request(e,t={},i={}){let s=t.method??"GET",n={},o;t.body!==void 0&&(n["Content-Type"]="application/json",o=JSON.stringify(t.body));let a=await this.access?.authorization(i.auth?"unauthorized":"initial");a&&(n.Authorization=a);let l=await fetch(`${this.base}${e}`,{method:s,headers:n,body:o,credentials:"omit"}),h=(l.headers.get("content-type")??"").includes("application/json")?await l.json().catch(()=>null):null;if(!l.ok){let p=h,d=p?.code??p?.error;if(this.access?.configured&&(l.status===401||l.status===403||l.status===422)&&await this.access.handleFailure(l.status,d)&&!i.auth)return this.request(e,t,{...i,auth:!0});if(l.status===409){let g=d?qr[d]:void 0,v=p?.conflicts?.map(w=>w.label)??t.labels??[];g&&this.onObjectUnavailable?.({labels:v,reason:g,code:d})}let u;if(l.status===429&&(u=Et(l.headers.get("Retry-After"),p?.retryAfterSeconds)??zi,s==="GET"&&!i.rateLimit&&u<=Di))return await new Promise(g=>setTimeout(g,u*1e3)),this.request(e,t,{...i,rateLimit:!0});throw new V(l.status,p?.error??`request_failed_${l.status}`,d,p?.conflicts,p?.reason,u)}return h}async requestBlob(e,t={}){let i={},s=await this.access?.authorization(t.auth?"unauthorized":"initial");s&&(i.Authorization=s);let n=await fetch(`${this.base}${e}`,{method:"GET",headers:i,credentials:"omit"});if(n.ok)return n.blob();let a=(n.headers.get("content-type")??"").includes("application/json")?await n.json().catch(()=>null):null,l=a?.code??a?.error;if(this.access?.configured&&(n.status===401||n.status===403||n.status===422)&&await this.access.handleFailure(n.status,l)&&!t.auth)return this.requestBlob(e,{...t,auth:!0});let c;if(n.status===429&&(c=Et(n.headers.get("Retry-After"),a?.retryAfterSeconds)??zi,!t.rateLimit&&c<=Di))return await new Promise(h=>setTimeout(h,c*1e3)),this.requestBlob(e,{...t,rateLimit:!0});throw new V(n.status,a?.error??`request_failed_${n.status}`,l,void 0,void 0,c)}chart(e){return this.request(`/pub/events/${encodeURIComponent(e)}/chart`)}eventConfiguration(e){return this.request(`/pub/events/${encodeURIComponent(e)}/event-configuration`)}reportViewEvidence(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/view-evidence-reports`,{method:"POST",body:{seatId:t.seatId,...t.evidenceId?{evidenceId:t.evidenceId}:{},...t.message?{message:t.message}:{}}})}asset(e,t){return/^[a-zA-Z0-9._-]+$/.test(t)?this.requestBlob(`/pub/events/${encodeURIComponent(e)}/assets/${encodeURIComponent(t)}`):Promise.reject(new V(404,"not_found","not_found"))}objects(e){return this.request(`/pub/events/${encodeURIComponent(e)}/objects?compact=1`)}hold(e,t,i,s){return this.request(`/pub/events/${encodeURIComponent(e)}/hold`,{method:"POST",body:{selections:t,...i?{ttlMs:i}:{},...s?{replaceHoldId:s}:{},...this.referral?{referral:this.referral}:{}},labels:t.map(n=>n.label)})}bestAvailable(e,t,i,s,n){return this.request(`/pub/events/${encodeURIComponent(e)}/best-available`,{method:"POST",body:{qty:t,...i?{categoryKey:i}:{},...s?{zoneId:s}:{},...n?{ttlMs:n}:{},...this.referral?{referral:this.referral}:{}}})}resume(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/hold/resume`,{method:"POST",body:{holdId:t}})}release(e,t,i){return this.request(`/pub/events/${encodeURIComponent(e)}/release`,{method:"POST",body:{labels:t,holdId:i}})}extend(e,t,i){return this.request(`/pub/events/${encodeURIComponent(e)}/extend`,{method:"POST",body:{holdId:t,...i?{ttlMs:i}:{}}})}paymentOptions(e){return this.request(`/pub/events/${encodeURIComponent(e)}/payment-options`)}availability(e,t=!1){return this.request(`/pub/events/${encodeURIComponent(e)}/availability${t?"?live=1":""}`)}startCheckout(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/checkout`,{method:"POST",body:t})}orderStatus(e){return this.request(`/pub/orders/${encodeURIComponent(e)}/status`)}subscribeTicket(e){return this.request(`/pub/events/${encodeURIComponent(e)}/subscribe-tickets`,{method:"POST",body:{}})}subscribeUrl(e){let t=this.base.replace(/^http/,"ws"),i=new URLSearchParams({surface:"picker",viewerId:this.viewerId});return`${t}/pub/events/${encodeURIComponent(e)}/subscribe?${i}`}socketUrl(e){return this.accessScoped?"":this.subscribeUrl(e)}socketProtocols(e){return this.accessScoped?[]:[Me]}createRealtime(e,t){return this.accessScoped?null:new oe({url:this.subscribeUrl(e),sink:t})}};var ie=class extends Error{constructor(e){super(`buyer_access_unavailable:${e.reason}`),this.name="BuyerAccessUnavailableError",this.reason=e.reason,this.code=e.code,this.status=e.status}},Kr=new Set(["buyer_access_expired"]),Wr=new Set(["paused","provider_failed","channel_denied"]);function Yr(r,e){switch(e){case"buyer_access_invalid":return"invalid";case"buyer_access_revoked":return"revoked";case"buyer_access_origin_mismatch":return"origin_mismatch";case"buyer_access_event_mismatch":return"event_mismatch";case"buyer_access_group_mismatch":return"group_mismatch";case"buyer_access_mode_mismatch":return"mode_mismatch";case"buyer_access_environment_mismatch":return"environment_mismatch";case"channel_access_denied":return"channel_denied";case"channel_paused":return"paused";case"invalid_channel_scope":return"invalid_scope";default:break}return r===401?"invalid":null}function Qr(r,e){return r===401&&!!e&&Kr.has(e)}var Xr=3e4,Q,X,De,ze,st,ve,ce,Ve,rt,nt,ot,Le,Z,ii,Tt,$e,se=class{constructor(e){B(this,Z);B(this,Q,null);B(this,X,0);B(this,De,null);B(this,ze);B(this,st);B(this,ve,null);B(this,ce,null);B(this,Ve,null);B(this,rt);B(this,nt);B(this,ot,!1);B(this,Le);if(A(this,ze,e.provider),A(this,st,e.skewMs??Xr),A(this,rt,e.onExpired),A(this,nt,e.onUnavailable),e.token){let t=typeof e.token=="string"?{token:e.token}:e.token;M(this,Z,ii).call(this,t)}A(this,ot,!!x(this,ze)||!!x(this,Q))}get configured(){return x(this,ot)}onRenewed(e){A(this,Le,e)}get unavailable(){return x(this,ce)}get hasToken(){return!!x(this,Q)&&(x(this,X)===0||x(this,X)>Date.now())}get expiresAt(){return x(this,X)}async authorization(e="initial"){if(!this.configured)return null;if(x(this,ce))throw new ie(x(this,ce));let t=Date.now();if(!x(this,Q)||x(this,X)>0&&x(this,X)-x(this,st)<=t){let s=!!x(this,Q)&&x(this,X)>0&&x(this,X)<=t,n=x(this,Q)?s?"expired":"expiring":e,o=await M(this,Z,Tt).call(this,n);if(!o)throw new ie(x(this,ce)??x(this,Ve)??M(this,Z,$e).call(this,"provider_failed"));return`Bearer ${o}`}return`Bearer ${x(this,Q)}`}async handleFailure(e,t){var s;if(!this.configured)return!1;if(Qr(e,t)){A(this,Q,null),A(this,X,0);let n=await M(this,Z,Tt).call(this,"unauthorized",t);return(s=x(this,rt))==null||s.call(this,{reason:"unauthorized",code:t,refreshed:!!n}),!!n}let i=Yr(e,t);return i&&M(this,Z,$e).call(this,i,t,e),!1}async refresh(e="manual"){return A(this,ce,null),A(this,Ve,null),A(this,Q,null),A(this,X,0),!!await M(this,Z,Tt).call(this,e)}clear(){A(this,Q,null),A(this,De,null),A(this,X,0),A(this,ve,null),A(this,Le,void 0)}toJSON(){return{configured:this.configured,hasToken:this.hasToken}}toString(){return"[BuyerAccessContext redacted]"}};Q=new WeakMap,X=new WeakMap,De=new WeakMap,ze=new WeakMap,st=new WeakMap,ve=new WeakMap,ce=new WeakMap,Ve=new WeakMap,rt=new WeakMap,nt=new WeakMap,ot=new WeakMap,Le=new WeakMap,Z=new WeakSet,ii=function(e){return!e||typeof e.token!="string"||!e.token?null:(A(this,De,e.token),A(this,Q,e.token),A(this,X,typeof e.expiresAt=="number"?e.expiresAt:0),x(this,Q))},Tt=function(e,t){if(x(this,ve))return x(this,ve);let i=x(this,ze);if(!i)return M(this,Z,$e).call(this,"no_token",t),Promise.resolve(null);let s=x(this,De),n=(async()=>{try{let o=await i({reason:e}),a=M(this,Z,ii).call(this,o);if(!a)return M(this,Z,$e).call(this,"provider_failed",t),null;if(s&&s!==a&&x(this,Le))try{await x(this,Le).call(this,{previousToken:s,token:a,reason:e})}catch{}return a}catch{return M(this,Z,$e).call(this,"provider_failed",t),null}finally{A(this,ve,null)}})();return A(this,ve,n),n},$e=function(e,t,i){var n;let s={reason:e,code:t,status:i,retryable:e==="paused"||e==="channel_denied"};return A(this,Ve,s),Wr.has(e)||(A(this,ce,s),A(this,Q,null),A(this,X,0)),(n=x(this,nt))==null||n.call(this,s),s};function Fe(r,e={}){return!r.buyerAccessTokenProvider&&!r.buyerAccessToken?null:new se({provider:r.buyerAccessTokenProvider,token:r.buyerAccessToken,...e})}var Zr=3e4;function Jr(r){if(!r||typeof r!="object"||Array.isArray(r))return!1;let e=r;return typeof e.token=="string"&&e.token.startsWith("bse_")&&typeof e.expiresAt=="number"&&Number.isFinite(e.expiresAt)&&e.expiresAt>Date.now()&&!!e.event&&typeof e.event=="object"&&!!e.doc&&typeof e.doc=="object"&&!!e.objects&&typeof e.objects=="object"&&!Array.isArray(e.objects)&&!!e.objects.seats&&typeof e.objects.seats=="object"}var si=class{constructor(e,t,i){this.base=e;this.event=t;this.publicKey=i;this.value=null;this.inflight=null}async load(e=!1){if(e&&(this.value=null),this.value&&this.value.expiresAt-Zr>Date.now())return this.value;if(this.inflight)return this.inflight;let t=(async()=>{let i=await fetch(`${this.base}/pub/events/${encodeURIComponent(this.event)}/bootstrap`,{method:"POST",body:JSON.stringify({publicKey:this.publicKey}),credentials:"omit"}),s=await i.json().catch(()=>null);if(!i.ok){let n=i.status===429?Et(i.headers.get("Retry-After"),s?.retryAfterSeconds):void 0;throw new V(i.status,s?.error??`request_failed_${i.status}`,s?.code??s?.error,void 0,void 0,n)}if(!Jr(s))throw new V(502,"invalid_bootstrap_response","invalid_bootstrap_response");return this.value=s,s})();this.inflight=t;try{return await t}finally{this.inflight===t&&(this.inflight=null)}}async token(e){let t=e==="expiring"||e==="expired"||e==="unauthorized"||e==="manual",i=await this.load(t);return{token:i.token,expiresAt:i.expiresAt}}},ri=class extends be{constructor(t,i,s,n,o){super(t,{...o,access:n});this.event=i;this.loader=s;this.bootstrapAccess=n;this.initialChartDelivered=!1;this.initialObjectsDelivered=!1}assertEvent(t){if(t!==this.event)throw new V(404,"not_found","not_found")}async bundle(t){return this.assertEvent(t),await this.bootstrapAccess.authorization("initial"),this.loader.load()}async chart(t){if(this.assertEvent(t),this.initialChartDelivered)return super.chart(t);let i=await this.bundle(t);return this.initialChartDelivered=!0,{event:i.event,doc:i.doc}}async objects(t){if(this.assertEvent(t),this.initialObjectsDelivered)return super.objects(t);let i=await this.bundle(t);return this.initialObjectsDelivered=!0,i.objects}};function Pt(r){let e=new si(r.base,r.event,r.publicKey),t=new se({provider:({reason:i})=>e.token(i),...r.accessHooks});return{access:t,api:new ri(r.base,r.event,e,t,r.apiOptions??{})}}var W=require("@seatlayer/core"),N=r=>String(r??"").replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e]);function je(r,e){let t=0;for(let i of r.get(e)?.values()??[])t+=i;return t}function Vi(r){let e=[];for(let[t,i]of r)for(let[s,n]of i)n>0&&e.push({areaId:t,tierId:s,qty:n});return e}function Fi(r){let e=new Map;for(let t of r.keys())e.set(t,je(r,t));return e}function at(r,e,t,i){let s=r.get(e)??new Map;i>0?s.set(t,i):s.delete(t),s.size?r.set(e,s):r.delete(e)}function ji(r){let e=new Map;for(let t of r)t.objectType!=="ga"||!t.objectId||e.set(t.objectId,(e.get(t.objectId)??0)+(t.quantity??1));return e}function Ne(r,e){let t=ji(e),i=0;for(let s of r.keys())i+=Math.max(0,je(r,s)-(t.get(s)??0));return i}function Ni(r,e,t){let i=ji(t),s=0;for(let n of e){let o=r.gaQty.get(n.id);if(!o)continue;let a=i.get(n.id)??0;for(let[l,c]of o){let h=Math.max(0,c-a);a=Math.max(0,a-c),s+=h*r.paidPrice(n.categoryKey,l,en(n,l),n.id)}}return s}function en(r,e){return e?r.tiers?.find(t=>t.id===e)?.price??r.price:r.price}function Gi(r){let e=[],t=new Map;for(let i of r){if(i.objectType!=="ga"||!i.objectId){e.push({...i,labels:[i.label]});continue}let s=`${i.objectId}\0${i.tierId??""}`,n=t.get(s);if(n){n.quantity=(n.quantity??0)+(i.quantity??1),n.labels.push(i.label);continue}let o={...i,quantity:i.quantity??1,labels:[i.label]};t.set(s,o),e.push(o)}return e}function Ui(r,e,t){let i=new Set(t);for(let s of e)s.objectType==="ga"&&s.objectId&&i.has(s.label)&&at(r,s.objectId,s.tierId??null,0)}function qi(r,e){if(r.objectType!=="ga")return r.label;let t=e.find(i=>i.id===r.objectId);return t?.displayLabel??t?.label??r.label}function tn(r){let e=new Map;for(let t of r){if(t.objectType!=="ga"||!t.objectId)continue;let i=`${t.objectId}\0${t.tierId??""}`;e.set(i,(e.get(i)??0)+(t.quantity??1))}return e}function At(r){let e=r.tiers??[];return e.length>1?e.map(t=>({id:t.id,label:t.name||t.id,price:t.price})):[{id:null,label:r.displayType??(0,W.t)("picker.generalAdmission"),price:r.price}]}function Ki(r,e){let t=r.totalTicketCount()-je(r.gaQty,e.id);return Math.max(0,Math.min(e.available,r.maxTickets-t))}function oi(r,e,t,i){if(de(r,!1),r.salesClosed){r.toast(r.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let s=At(e),n=r.gaQty.get(e.id),o=je(r.gaQty,e.id)>0,a=Ki(r,e);if(a<=0&&!o){r.toast(e.available>0?(0,W.t)("picker.maxTicketsForOrder",{count:r.maxTickets}):r.tf("picker.soldOutTitle","Sold out"),"warning");return}if(r.onGAPromptHook){let d={};for(let[g,v]of n??[])d[g??""]=v;if(r.onGAPromptHook({area:e,selected:d,min:0,max:a,tiers:s,confirm:g=>{on(r,e,s,g,a)},cancel:()=>de(r)})===!0)return}let l=new Map;for(let d of s)l.set(d.id,n?.get(d.id)??0);!o&&a>0&&l.set(s[0].id,1);let c={area:e,tiers:s,draft:l,max:a,reopened:o},h=r.root?.dataset.layout==="narrow",p=document.createElement("div");p.className=h?"sl-ga-scrim":"sl-ga-pop-layer",p.innerHTML=sn(r,c,h),r.root?.appendChild(p),r.gaPromptEl=p,r.gaPromptReturnFocus=i??document.activeElement,h||an(r,p,t),r.reducedMotion()&&(p.dataset.motion="reduced"),Yi(r,c),rn(r,p,c),requestAnimationFrame(()=>p.querySelector('[data-ga-step="1"]')?.focus())}function sn(r,e,t){let{area:i,tiers:s}=e,n=s.length>1,o=i.displayLabel??i.label,a=s.map(l=>`<div class="sl-ga-prompt-row" data-ga-tier="${N(l.id??"")}"><div class="sl-ga-prompt-label"><span>${N(n?l.label:r.tf("picker.gaChooseTickets","How many tickets?"))}</span>`+(n?`<small>${N(r.money(r.paidPrice(i.categoryKey,l.id,l.price,i.id)))}</small>`:"")+`</div><div class="sl-ga-stepper" role="group" aria-label="${N(n?l.label:o)}"><button type="button" data-ga-step="-1" aria-label="${N(r.tf("picker.fewer","Fewer"))}">\u2212</button><output data-ga-qty aria-live="polite">0</output><button type="button" data-ga-step="1" aria-label="${N(r.tf("picker.more","More"))}">+</button></div></div>`).join("");return`<section class="${t?"sl-ga-sheet":"sl-ga-pop"}" role="dialog" aria-modal="true" aria-label="${N((0,W.t)("picker.gaChooseForArea",{area:o}))}"><div class="sl-ga-prompt-head"><div class="sl-ga-prompt-eyebrow">${N(i.displayType??r.tf("picker.generalAdmission","General admission"))}</div><h2 class="sl-ga-prompt-title">${N(o)}</h2><p class="sl-ga-prompt-sub" data-ga-sub></p><button type="button" class="sl-ga-prompt-close" data-ga-cancel aria-label="${N((0,W.t)("common.close"))}">\xD7</button></div><div class="sl-ga-prompt-body">${a}`+(s.length>1?`<div class="sl-ga-prompt-total"><span>${N(r.tf("picker.total","Total"))}</span><b data-ga-total></b></div>`:"")+'<p class="sl-ga-prompt-hint" data-ga-hint></p></div><div class="sl-ga-prompt-actions">'+(e.reopened?`<button type="button" class="sl-ga-prompt-remove" data-ga-remove>${N(r.tf("picker.gaRemove","Remove"))}</button>`:`<button type="button" class="sl-ga-prompt-remove" data-ga-cancel>${N((0,W.t)("common.cancel"))}</button>`)+'<button type="button" class="sl-ga-prompt-confirm" data-ga-confirm></button></div></section>'}function ai(r){let e=0;for(let t of r.draft.values())e+=t;return e}function Wi(r,e){let t=0;for(let i of e.tiers)t+=(e.draft.get(i.id)??0)*r.paidPrice(e.area.categoryKey,i.id,i.price,e.area.id);return t}function Yi(r,e){let t=r.gaPromptEl;if(!t)return;let i=ai(e),s=Wi(r,e);t.querySelectorAll("[data-ga-tier]").forEach(c=>{let h=c.dataset.gaTier?c.dataset.gaTier:null,p=e.draft.get(h)??0,d=c.querySelector("[data-ga-qty]");d&&(d.value=String(p)),c.querySelectorAll("[data-ga-step]").forEach(u=>{u.disabled=Number(u.dataset.gaStep)<0?p<=0:i>=e.max})});let n=t.querySelector("[data-ga-sub]");n&&(n.textContent=`${r.money(r.paidPrice(e.area.categoryKey,e.tiers[0].id,e.tiers[0].price,e.area.id))} \xB7 ${(0,W.tCount)("picker.leftCount",e.area.available)}`);let o=t.querySelector("[data-ga-total]");o&&(o.textContent=r.money(s));let a=t.querySelector("[data-ga-hint]");a&&(a.textContent=i>=e.max&&e.max>0?e.area.available<=e.max?(0,W.tCount)("picker.leftCount",e.area.available):(0,W.t)("picker.maxTicketsForOrder",{count:r.maxTickets}):"");let l=t.querySelector("[data-ga-confirm]");l&&(l.textContent=e.reopened?(0,W.tCount)("picker.gaUpdate",i,{count:i}):(0,W.tCount)("picker.gaAdd",i,{count:i,price:r.money(s)}),l.disabled=i<=0&&!e.reopened)}function rn(r,e,t){e.querySelectorAll("[data-ga-step]").forEach(i=>{i.addEventListener("click",()=>{let s=i.closest("[data-ga-tier]");if(!s)return;let n=s.dataset.gaTier?s.dataset.gaTier:null,o=Number(i.dataset.gaStep),a=t.draft.get(n)??0,l=t.max-ai(t);t.draft.set(n,Math.max(0,a+(o>0?Math.min(1,l):-1))),Yi(r,t)})}),e.querySelectorAll("[data-ga-cancel]").forEach(i=>i.addEventListener("click",()=>de(r))),e.querySelector("[data-ga-remove]")?.addEventListener("click",()=>{r.gaQty.delete(t.area.id),de(r),r.syncTray(),ni(r,(0,W.t)("picker.gaRemoved",{area:t.area.displayLabel??t.area.label}))}),e.querySelector("[data-ga-confirm]")?.addEventListener("click",()=>{nn(r,t)}),e.addEventListener("mousedown",i=>{i.target===e&&de(r)}),e.addEventListener("keydown",i=>{if(i.key==="Escape"){i.stopPropagation(),de(r);return}if(i.key!=="Tab")return;let s=[...e.querySelectorAll('button:not(:disabled),[tabindex]:not([tabindex="-1"])')];if(!s.length)return;let n=s[0],o=s[s.length-1];i.shiftKey&&document.activeElement===n?(i.preventDefault(),o.focus()):!i.shiftKey&&document.activeElement===o&&(i.preventDefault(),n.focus())})}function nn(r,e){let t=ai(e),i=Wi(r,e);for(let n of e.tiers)at(r.gaQty,e.area.id,n.id,e.draft.get(n.id)??0);de(r),r.syncTray();let s=e.area.displayLabel??e.area.label;t>0?ni(r,(0,W.tCount)("picker.gaAdded",t,{count:t,area:s,price:r.money(i)})):ni(r,(0,W.t)("picker.gaRemoved",{area:s}))}function on(r,e,t,i,s){if(typeof i=="number")at(r.gaQty,e.id,t[0].id,Math.max(0,Math.min(s,Math.floor(i))));else{r.gaQty.delete(e.id);let n=s;for(let o of t){let a=Math.max(0,Math.floor(i[o.id??""]??0)),l=Math.min(a,n);n-=l,at(r.gaQty,e.id,o.id,l)}}r.syncTray()}function de(r,e=!0){let t=r.gaPromptReturnFocus;r.gaPromptEl?.remove(),r.gaPromptEl=null,r.gaPromptReturnFocus=null,e&&t&&requestAnimationFrame(()=>(t.isConnected?t:r.root)?.focus())}function an(r,e,t){let i=r.root,s=e.querySelector(".sl-ga-pop");if(!i||!s||!t)return;let n=i.getBoundingClientRect(),o=t.x-n.left,a=t.y-n.top;e.style.setProperty("--sl-ga-anchor-x",`${o}px`),e.style.setProperty("--sl-ga-anchor-y",`${a}px`),requestAnimationFrame(()=>{let l=s.offsetWidth||260,c=s.offsetHeight||220,h=Math.max(8,Math.min(n.width-l-8,o-l/2)),p=a-c-14,d=p>=8?p:Math.min(n.height-c-8,a+14);s.style.left=`${h}px`,s.style.top=`${Math.max(8,d)}px`,s.dataset.side=p>=8?"above":"below",s.style.setProperty("--sl-ga-arrow-x",`${Math.max(12,Math.min(l-12,o-h))}px`)})}function ni(r,e){r.srEl&&(r.srEl.textContent=e)}function Qi(r,e,t=[]){let i=[],s=tn(t);for(let o of e){let a=r.gaQty.get(o.id);if(!a)continue;let l=At(o);for(let c of l){let h=(a.get(c.id)??0)-(s.get(`${o.id}\0${c.id??""}`)??0);if(h<=0)continue;let p=r.paidPrice(o.categoryKey,c.id,c.price,o.id);i.push(`<div class="sl-ga" data-ga="${N(o.id)}" data-ga-row-tier="${N(c.id??"")}"><div class="sl-ga-info"><div class="sl-ga-name">${N(o.displayLabel??o.label)}</div><div class="sl-ga-sub">${N(l.length>1?c.label:o.displayType??r.tf("picker.generalAdmission","General admission"))} \xB7 ${N(r.money(p))} \xB7 ${N((0,W.tCount)("picker.leftCount",o.available))}</div></div><div class="sl-ga-qty"><button type="button" data-d="-1" aria-label="${N(r.tf("picker.fewer","Fewer"))}">\u2212</button><span>${h}</span><button type="button" data-d="1" aria-label="${N(r.tf("picker.more","More"))}">+</button></div></div>`)}}let n=e.filter(o=>je(r.gaQty,o.id)<=0&&!t.some(a=>a.objectId===o.id));return n.length&&i.push(`<div class="sl-ga-areas" data-ga-areas><button type="button" class="sl-ga-areas-toggle" data-ga-areas-toggle aria-expanded="${r.gaAreasExpanded}"><span>${N(r.tf("picker.gaAreasHeading","Areas"))}</span><small>${n.length}</small></button>`+(r.gaAreasExpanded?`<div class="sl-ga-areas-list">${n.map(o=>`<button type="button" class="sl-ga-area-open" data-ga-open="${N(o.id)}"${o.available<=0?" disabled":""}><span class="name">${N(o.displayLabel??o.label)}<small>${N(o.displayType??r.tf("picker.generalAdmission","General admission"))}</small></span><span class="meta">${N(r.money(r.paidPrice(o.categoryKey,null,o.price,o.id)))} \xB7 ${N(o.available>0?(0,W.tCount)("picker.leftCount",o.available):r.tf("picker.soldOutTitle","Sold out"))}</span></button>`).join("")}</div>`:"")+"</div>"),i.join("")}function Xi(r,e,t){e.querySelectorAll(".sl-ga .sl-ga-qty button").forEach(i=>{i.addEventListener("click",()=>{let s=i.closest(".sl-ga");if(!s?.dataset.ga)return;let n=t.find(c=>c.id===s.dataset.ga);if(!n)return;let o=s.dataset.gaRowTier?s.dataset.gaRowTier:null,a=Number(i.dataset.d),l=r.gaQty.get(n.id)?.get(o)??0;if(a>0&&Ki(r,n)-je(r.gaQty,n.id)<=0){r.toast((0,W.t)("picker.maxTicketsForOrder",{count:r.maxTickets}),"warning");return}at(r.gaQty,n.id,o,Math.max(0,l+a)),r.syncTray()})}),e.querySelector("[data-ga-areas-toggle]")?.addEventListener("click",()=>{r.gaAreasExpanded=!r.gaAreasExpanded,r.syncTray()}),e.querySelectorAll("[data-ga-open]").forEach(i=>{i.addEventListener("click",()=>{let s=t.find(n=>n.id===i.dataset.gaOpen);s&&oi(r,s,null,i)})})}var Mt='<svg viewBox="0 0 64 56" width="12" height="11" fill="none" aria-hidden="true" focusable="false" style="display:block"><path d="M4 13 Q16 6 29 7 L28.5 17 Q17 16.5 7 22 Z" fill="#f4b740"/><path d="M4 13 Q16 6 29 7 L28.5 17 Q17 16.5 7 22 Z" fill="#f4b740" transform="translate(64 0) scale(-1 1)"/><path d="M8 28 Q18 22 28.6 23 L28.2 32 Q18 28.5 10 36 Z" fill="#fcf7ee"/><path d="M8 28 Q18 22 28.6 23 L28.2 32 Q18 28.5 10 36 Z" fill="#fcf7ee" transform="translate(64 0) scale(-1 1)"/><path d="M11 41 Q19 35 28.2 36 L27.8 45 Q19.5 42 13.5 49 Z" fill="#fcf7ee"/><path d="M11 41 Q19 35 28.2 36 L27.8 45 Q19.5 42 13.5 49 Z" fill="#fcf7ee" transform="translate(64 0) scale(-1 1)"/></svg>';var ln=/^data:image\/(?:png|jpe?g|webp|gif|avif);base64,[a-z0-9+/]+={0,2}$/i,cn=/[\s"'<>`\\]/;function Lt(r){if(typeof r!="string"||!r||r.length>2e6||r!==r.trim())return!1;if(r.startsWith("data:"))return ln.test(r);if(cn.test(r))return!1;try{let e=new URL(r);return e.protocol==="https:"&&!e.username&&!e.password}catch{return!1}}var dn=/^[a-zA-Z0-9._-]+$/;function pn(r){let e;try{e=new URL(r,"https://seatlayer.invalid")}catch{return null}if(e.search||e.hash)return null;let t=/^\/pub\/events\/([^/]+)\/assets\/([^/]+)$/.exec(e.pathname);if(!t)return null;try{let i=decodeURIComponent(t[1]),s=decodeURIComponent(t[2]);return!i||!dn.test(s)?null:{eventKey:i,asset:s}}catch{return null}}function hn(r){try{return/^\/pub\/events\/[^/]+\/assets(?:\/|$)/.test(new URL(r,"https://seatlayer.invalid").pathname)}catch{return!1}}var Ge=class{constructor(e,t){this.eventKey=e;this.load=t;this.pending=new Map;this.created=new Set;this.disposed=!1}resolve(e){let t=pn(e);if(!t)return Promise.resolve(hn(e)||!Lt(e)?null:e);if(t.eventKey!==this.eventKey||!this.load||this.disposed)return Promise.resolve(null);let i=this.pending.get(e);if(i)return i;let s=this.load(this.eventKey,t.asset).then(n=>{let o=URL.createObjectURL(n);return this.disposed?(URL.revokeObjectURL(o),null):(this.created.add(o),o)}).catch(n=>{throw this.pending.delete(e),n});return this.pending.set(e,s),s}dispose(){if(!this.disposed){this.disposed=!0;for(let e of this.created)URL.revokeObjectURL(e);this.created.clear(),this.pending.clear()}}};var lt=require("@seatlayer/core"),zt=require("@seatlayer/core/view3d/crossfade/panorama");var Zi=`
|
|
41
|
+
`});var cl={};hr(cl,{ApiError:()=>V,BuyerAccessContext:()=>de,BuyerAccessUnavailableError:()=>oe,BuyerRealtimeClient:()=>ue,EmbeddedDesigner:()=>ii,PerformanceGroupDestroyedError:()=>q,PerformanceGroupPicker:()=>vi,SEATING_CHART_CALLBACK_PROPS:()=>Bi,SEATING_CHART_HANDLE_METHODS:()=>_i,SEATING_CHART_IDENTITY_PROPS:()=>Di,SEATING_CHART_VALUE_PROPS:()=>$i,SeasonApiError:()=>he,SeasonPicker:()=>wi,SeasonRecoveryTimeoutError:()=>Pt,SeatPicker:()=>at,SeatingChart:()=>ti,attachPickerFrame:()=>Zn,bindSeatingChartHandle:()=>Jr,buildSeatingChartOptions:()=>es,createBuyerAccessContext:()=>Qe,createControllerSink:()=>Ue,parseTicketOfferAvailability:()=>ri,shortOperationReference:()=>ct,ticketOfferPrices:()=>si});module.exports=no(cl);var z=require("@seatlayer/core");var Be="seatlayer.v1";function oo(r){let e=typeof r.default=="string"?r.default:"free",t={};if(r.seats&&typeof r.seats=="object")for(let[i,s]of Object.entries(r.seats))typeof s=="string"&&s!==e&&(t[i]=s);return{default:e,exceptions:t}}function ao(r,e){if(!r||r.default!==e.default)return null;let t=[];for(let[i,s]of Object.entries(e.exceptions))r.exceptions[i]!==s&&t.push({label:i,status:s});for(let i of Object.keys(r.exceptions))i in e.exceptions||t.push({label:i,status:e.default});return t}function lo(r,e){for(let t of e)t.status===r.default?delete r.exceptions[t.label]:r.exceptions[t.label]=t.status}function fr(r){if(/(?:^|[?&#])(?:token|access_token|bearer|authorization|ticket|tkt|bse)=/i.test(r))throw new Error("seatlayer: refusing to open a socket with a credential in the URL");if(/\bbse_[A-Za-z0-9._-]+/.test(r))throw new Error("seatlayer: refusing to open a socket with a credential in the URL")}var ue=class{constructor(e){this.ws=null;this.stopped=!0;this.attempt=0;this.reconnectTimer=null;this.pingTimer=null;this.pongTimer=null;this.resumeTimer=null;this.projection=null;this.version=null;this.v1=!1;this.useQueryMarker=!1;this.hidden=null;this.closedSections=null;this.opts=e,fr(e.url)}get protocol(){return this.ws?this.v1?"v1":"legacy":null}get snapshotVersion(){return this.version}start(){this.stopped&&(this.stopped=!1,this.connect())}stop(){this.stopped=!0,this.clearTimers();let e=this.ws;if(this.ws=null,e){e.onopen=null,e.onmessage=null,e.onclose=null,e.onerror=null;try{e.close()}catch{}}}restart(){this.stop(),this.projection=null,this.version=null,this.attempt=0,this.start()}async connect(){if(this.stopped)return;let e=[Be];if(this.opts.mintTicket){let n;try{n=await this.opts.mintTicket()}catch(o){this.reportIfAccessError(o),this.scheduleReconnect();return}if(this.stopped)return;n?.protocols?.length?(e=[...n.protocols],e.includes(Be)||e.unshift(Be)):n?.ticket&&(e=[Be,`tkt.${n.ticket}`])}let t=this.version!==null;t&&e.push(`sv.${this.version}`);let i=this.useQueryMarker?`${this.opts.url}${this.opts.url.includes("?")?"&":"?"}pv=1`:this.opts.url;fr(i);let s;try{s=(this.opts.socketFactory??((o,a)=>new WebSocket(o,a)))(i,e)}catch{this.scheduleReconnect();return}this.ws=s,s.onopen=()=>{this.ws===s&&(this.attempt=0,this.v1=s.protocol===Be,this.v1||(this.useQueryMarker=!0),this.startKeepalive(s),t?this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync()},5e3):this.opts.sink.resync())},s.onmessage=n=>{if(this.ws!==s)return;let o;try{o=JSON.parse(typeof n.data=="string"?n.data:"")}catch{return}!o||typeof o!="object"||this.handleFrame(o)},s.onclose=n=>{if(this.ws===s){if(this.ws=null,this.clearTimers(),n?.code===4401){this.stopped=!0,this.opts.onAccessUnavailable?.({reason:"revoked",code:"access_revoked",retryable:!1});return}this.scheduleReconnect()}},s.onerror=()=>{try{s.close()}catch{}}}handleFrame(e){let t=typeof e.type=="string"?e.type:"";if(e.protocol===1&&(this.v1=!0),typeof e.snapshotVersion=="number"&&(this.version=e.snapshotVersion),t==="pong"){this.clearPongTimer();return}if(Array.isArray(e.hidden)||Array.isArray(e.closed)){let i=Array.isArray(e.hidden)?e.hidden:[],s=Array.isArray(e.closed)?e.closed:[],n=i.join("\0"),o=s.join("\0");(n!==this.hidden||o!==this.closedSections)&&(this.hidden=n,this.closedSections=o,this.opts.sink.onSections?.(i,s))}if(t!=="hidden"){if(t==="presence"){this.opts.sink.onPresence?.({shoppingSessions:Number(e.shoppingSessions)||0,activeHolds:Number(e.activeHolds)||0});return}if(t!=="allocation"){if(t==="snapshot"||!t&&e.seats){this.answered();let i=oo(e),s=ao(this.projection,i);this.projection=i,s===null?this.opts.sink.applyProjection?this.opts.sink.applyProjection(i):this.opts.sink.resync():s.length&&this.opts.sink.applyStatuses(s);return}if(t==="delta"&&Array.isArray(e.changes)){this.answered();let i=e.changes.filter(s=>typeof s?.label=="string"&&typeof s?.status=="string").map(s=>({label:s.label,status:s.status}));if(!i.length)return;this.projection&&lo(this.projection,i),this.opts.sink.applyStatuses(i)}}}}answered(){this.resumeTimer&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}reportIfAccessError(e){let t=e?.reason;e?.name==="BuyerAccessUnavailableError"&&(this.stopped=!0,this.opts.onAccessUnavailable?.({reason:t??"invalid",code:e.code,status:e.status,retryable:t==="paused"}))}startKeepalive(e){this.pingTimer=setInterval(()=>{if(this.ws===e){try{e.send(JSON.stringify({type:"ping"}))}catch{return}this.clearPongTimer(),this.pongTimer=setTimeout(()=>{this.pongTimer=null;try{e.close()}catch{}},1e4)}},25e3)}scheduleReconnect(){if(this.stopped||this.reconnectTimer)return;let e=Math.min(this.attempt++,5),t=Math.min(1e3*2**e,15e3),i=Math.random()*t;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},i)}clearPongTimer(){this.pongTimer&&(clearTimeout(this.pongTimer),this.pongTimer=null)}clearTimers(){this.pingTimer&&clearInterval(this.pingTimer),this.pingTimer=null,this.clearPongTimer(),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.resumeTimer&&clearTimeout(this.resumeTimer),this.resumeTimer=null}};function co(r){return r==="blocked"?"not_for_sale":r==="held"||r==="booked"||r==="free"||r==="not_for_sale"?r:"free"}function Ue(r,e={}){let t=i=>{let s=r.tableSelection(i);if(s)return s.physicalSeatIds;let n=r.idForLabel(i);return n?[n]:[]};return{applyStatuses(i){let s=r.currentHold()?.labels??[],n={free:[],held:[],booked:[],not_for_sale:[]},o=[],a=[],l=new Map(r.getSelection().map(c=>[c.label,c.id]));for(let c of i){let h=t(c.label);if(!h.length)continue;let p=co(c.status);if(n[p].push(...h),e.flashOnLiveChange&&p!=="free"&&!s.includes(c.label)&&h.some(d=>r.getStatus(d)==="free")){let d=p==="held"?"#f4b740":"#f43f5e";for(let u of h)o.push({id:u,color:d})}p!=="free"&&!s.includes(c.label)&&l.has(c.label)&&a.push(c.label)}for(let c of["free","held","booked","not_for_sale"])n[c].length&&r.setStatus(n[c],c);for(let c of o)r.flashSeat(c.id,c.color);if(a.length){let c=a.flatMap(p=>t(p));c.length&&r.deselect(c);let h=i.some(p=>p.status==="blocked"&&a.includes(p.label));e.onSelectedObjectUnavailable?.(a,h?"ineligible":"taken")}e.onStatusChange?.()},async resync(){await r.refresh()},onSections(i,s){r.refresh(),e.onSections?.(i,s)}}}var V=class extends Error{constructor(e,t,i,s,n,o){super(t),this.name="ApiError",this.status=e,this.code=i,this.conflicts=s,this.reason=n,this.retryAfterS=o}},gr=10,br=1;function Bt(r,e){let t=(r??"").trim();if(t){let i=Number(t);if(Number.isFinite(i)&&i>=0)return Math.ceil(i);let s=Date.parse(t);if(Number.isFinite(s))return Math.max(0,Math.ceil((s-Date.now())/1e3))}if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return Math.ceil(e)}var po={seat_conflict:"taken",conflict:"taken",channel_assignment_conflict:"ineligible",allocation_exhausted:"exhausted"},Te=class{constructor(e,t={}){this.base=e;this.viewerId=typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`viewer_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`;this.access=t.access,this.onObjectUnavailable=t.onObjectUnavailable;let i=t.referral?.trim();this.referral=i?i.slice(0,120):void 0}get accessScoped(){return!!this.access?.configured}async request(e,t={},i={}){let s=t.method??"GET",n={},o;t.body!==void 0&&(n["Content-Type"]="application/json",o=JSON.stringify(t.body));let a=await this.access?.authorization(i.auth?"unauthorized":"initial");a&&(n.Authorization=a);let l=await fetch(`${this.base}${e}`,{method:s,headers:n,body:o,credentials:"omit"}),h=(l.headers.get("content-type")??"").includes("application/json")?await l.json().catch(()=>null):null;if(!l.ok){let p=h,d=p?.code??p?.error;if(this.access?.configured&&(l.status===401||l.status===403||l.status===422)&&await this.access.handleFailure(l.status,d)&&!i.auth)return this.request(e,t,{...i,auth:!0});if(l.status===409){let g=d?po[d]:void 0,b=p?.conflicts?.map(x=>x.label)??t.labels??[];g&&this.onObjectUnavailable?.({labels:b,reason:g,code:d})}let u;if(l.status===429&&(u=Bt(l.headers.get("Retry-After"),p?.retryAfterSeconds)??br,s==="GET"&&!i.rateLimit&&u<=gr))return await new Promise(g=>setTimeout(g,u*1e3)),this.request(e,t,{...i,rateLimit:!0});throw new V(l.status,p?.error??`request_failed_${l.status}`,d,p?.conflicts,p?.reason,u)}return h}async requestBlob(e,t={}){let i={},s=await this.access?.authorization(t.auth?"unauthorized":"initial");s&&(i.Authorization=s);let n=await fetch(`${this.base}${e}`,{method:"GET",headers:i,credentials:"omit"});if(n.ok)return n.blob();let a=(n.headers.get("content-type")??"").includes("application/json")?await n.json().catch(()=>null):null,l=a?.code??a?.error;if(this.access?.configured&&(n.status===401||n.status===403||n.status===422)&&await this.access.handleFailure(n.status,l)&&!t.auth)return this.requestBlob(e,{...t,auth:!0});let c;if(n.status===429&&(c=Bt(n.headers.get("Retry-After"),a?.retryAfterSeconds)??br,!t.rateLimit&&c<=gr))return await new Promise(h=>setTimeout(h,c*1e3)),this.requestBlob(e,{...t,rateLimit:!0});throw new V(n.status,a?.error??`request_failed_${n.status}`,l,void 0,void 0,c)}chart(e){return this.request(`/pub/events/${encodeURIComponent(e)}/chart`)}eventConfiguration(e){return this.request(`/pub/events/${encodeURIComponent(e)}/event-configuration`)}reportViewEvidence(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/view-evidence-reports`,{method:"POST",body:{seatId:t.seatId,...t.evidenceId?{evidenceId:t.evidenceId}:{},...t.message?{message:t.message}:{}}})}asset(e,t){return/^[a-zA-Z0-9._-]+$/.test(t)?this.requestBlob(`/pub/events/${encodeURIComponent(e)}/assets/${encodeURIComponent(t)}`):Promise.reject(new V(404,"not_found","not_found"))}objects(e){return this.request(`/pub/events/${encodeURIComponent(e)}/objects?compact=1`)}hold(e,t,i,s){return this.request(`/pub/events/${encodeURIComponent(e)}/hold`,{method:"POST",body:{selections:t,...i?{ttlMs:i}:{},...s?{replaceHoldId:s}:{},...this.referral?{referral:this.referral}:{}},labels:t.map(n=>n.label)})}bestAvailable(e,t,i,s,n){return this.request(`/pub/events/${encodeURIComponent(e)}/best-available`,{method:"POST",body:{qty:t,...i?{categoryKey:i}:{},...s?{zoneId:s}:{},...n?{ttlMs:n}:{},...this.referral?{referral:this.referral}:{}}})}resume(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/hold/resume`,{method:"POST",body:{holdId:t}})}release(e,t,i){return this.request(`/pub/events/${encodeURIComponent(e)}/release`,{method:"POST",body:{labels:t,holdId:i}})}extend(e,t,i){return this.request(`/pub/events/${encodeURIComponent(e)}/extend`,{method:"POST",body:{holdId:t,...i?{ttlMs:i}:{}}})}paymentOptions(e){return this.request(`/pub/events/${encodeURIComponent(e)}/payment-options`)}availability(e,t=!1){return this.request(`/pub/events/${encodeURIComponent(e)}/availability${t?"?live=1":""}`)}startCheckout(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/checkout`,{method:"POST",body:t})}orderStatus(e){return this.request(`/pub/orders/${encodeURIComponent(e)}/status`)}subscribeTicket(e){return this.request(`/pub/events/${encodeURIComponent(e)}/subscribe-tickets`,{method:"POST",body:{}})}subscribeUrl(e){let t=this.base.replace(/^http/,"ws"),i=new URLSearchParams({surface:"picker",viewerId:this.viewerId});return`${t}/pub/events/${encodeURIComponent(e)}/subscribe?${i}`}socketUrl(e){return this.accessScoped?"":this.subscribeUrl(e)}socketProtocols(e){return this.accessScoped?[]:[Be]}createRealtime(e,t){return this.accessScoped?null:new ue({url:this.subscribeUrl(e),sink:t})}};var oe=class extends Error{constructor(e){super(`buyer_access_unavailable:${e.reason}`),this.name="BuyerAccessUnavailableError",this.reason=e.reason,this.code=e.code,this.status=e.status}},ho=new Set(["buyer_access_expired"]),uo=new Set(["paused","provider_failed","channel_denied"]);function mo(r,e){switch(e){case"buyer_access_invalid":return"invalid";case"buyer_access_revoked":return"revoked";case"buyer_access_origin_mismatch":return"origin_mismatch";case"buyer_access_event_mismatch":return"event_mismatch";case"buyer_access_group_mismatch":return"group_mismatch";case"buyer_access_mode_mismatch":return"mode_mismatch";case"buyer_access_environment_mismatch":return"environment_mismatch";case"channel_access_denied":return"channel_denied";case"channel_paused":return"paused";case"invalid_channel_scope":return"invalid_scope";default:break}return r===401?"invalid":null}function fo(r,e){return r===401&&!!e&&ho.has(e)}var go=3e4,Z,J,qe,We,ut,Ce,be,Ye,mt,ft,gt,ze,ee,Si,zt,Ke,de=class{constructor(e){B(this,ee);B(this,Z,null);B(this,J,0);B(this,qe,null);B(this,We);B(this,ut);B(this,Ce,null);B(this,be,null);B(this,Ye,null);B(this,mt);B(this,ft);B(this,gt,!1);B(this,ze);if(L(this,We,e.provider),L(this,ut,e.skewMs??go),L(this,mt,e.onExpired),L(this,ft,e.onUnavailable),e.token){let t=typeof e.token=="string"?{token:e.token}:e.token;H(this,ee,Si).call(this,t)}L(this,gt,!!w(this,We)||!!w(this,Z))}get configured(){return w(this,gt)}onRenewed(e){L(this,ze,e)}get unavailable(){return w(this,be)}get hasToken(){return!!w(this,Z)&&(w(this,J)===0||w(this,J)>Date.now())}get expiresAt(){return w(this,J)}async authorization(e="initial"){if(!this.configured)return null;if(w(this,be))throw new oe(w(this,be));let t=Date.now();if(!w(this,Z)||w(this,J)>0&&w(this,J)-w(this,ut)<=t){let s=!!w(this,Z)&&w(this,J)>0&&w(this,J)<=t,n=w(this,Z)?s?"expired":"expiring":e,o=await H(this,ee,zt).call(this,n);if(!o)throw new oe(w(this,be)??w(this,Ye)??H(this,ee,Ke).call(this,"provider_failed"));return`Bearer ${o}`}return`Bearer ${w(this,Z)}`}async handleFailure(e,t){var s;if(!this.configured)return!1;if(fo(e,t)){L(this,Z,null),L(this,J,0);let n=await H(this,ee,zt).call(this,"unauthorized",t);return(s=w(this,mt))==null||s.call(this,{reason:"unauthorized",code:t,refreshed:!!n}),!!n}let i=mo(e,t);return i&&H(this,ee,Ke).call(this,i,t,e),!1}async refresh(e="manual"){return L(this,be,null),L(this,Ye,null),L(this,Z,null),L(this,J,0),!!await H(this,ee,zt).call(this,e)}clear(){L(this,Z,null),L(this,qe,null),L(this,J,0),L(this,Ce,null),L(this,ze,void 0)}toJSON(){return{configured:this.configured,hasToken:this.hasToken}}toString(){return"[BuyerAccessContext redacted]"}};Z=new WeakMap,J=new WeakMap,qe=new WeakMap,We=new WeakMap,ut=new WeakMap,Ce=new WeakMap,be=new WeakMap,Ye=new WeakMap,mt=new WeakMap,ft=new WeakMap,gt=new WeakMap,ze=new WeakMap,ee=new WeakSet,Si=function(e){return!e||typeof e.token!="string"||!e.token?null:(L(this,qe,e.token),L(this,Z,e.token),L(this,J,typeof e.expiresAt=="number"?e.expiresAt:0),w(this,Z))},zt=function(e,t){if(w(this,Ce))return w(this,Ce);let i=w(this,We);if(!i)return H(this,ee,Ke).call(this,"no_token",t),Promise.resolve(null);let s=w(this,qe),n=(async()=>{try{let o=await i({reason:e}),a=H(this,ee,Si).call(this,o);if(!a)return H(this,ee,Ke).call(this,"provider_failed",t),null;if(s&&s!==a&&w(this,ze))try{await w(this,ze).call(this,{previousToken:s,token:a,reason:e})}catch{}return a}catch{return H(this,ee,Ke).call(this,"provider_failed",t),null}finally{L(this,Ce,null)}})();return L(this,Ce,n),n},Ke=function(e,t,i){var n;let s={reason:e,code:t,status:i,retryable:e==="paused"||e==="channel_denied"};return L(this,Ye,s),uo.has(e)||(L(this,be,s),L(this,Z,null),L(this,J,0)),(n=w(this,ft))==null||n.call(this,s),s};function Qe(r,e={}){return!r.buyerAccessTokenProvider&&!r.buyerAccessToken?null:new de({provider:r.buyerAccessTokenProvider,token:r.buyerAccessToken,...e})}var bo=3e4;function vo(r){if(!r||typeof r!="object"||Array.isArray(r))return!1;let e=r;return typeof e.token=="string"&&e.token.startsWith("bse_")&&typeof e.expiresAt=="number"&&Number.isFinite(e.expiresAt)&&e.expiresAt>Date.now()&&!!e.event&&typeof e.event=="object"&&!!e.doc&&typeof e.doc=="object"&&!!e.objects&&typeof e.objects=="object"&&!Array.isArray(e.objects)&&!!e.objects.seats&&typeof e.objects.seats=="object"}var Ti=class{constructor(e,t,i){this.base=e;this.event=t;this.publicKey=i;this.value=null;this.inflight=null}async load(e=!1){if(e&&(this.value=null),this.value&&this.value.expiresAt-bo>Date.now())return this.value;if(this.inflight)return this.inflight;let t=(async()=>{let i=await fetch(`${this.base}/pub/events/${encodeURIComponent(this.event)}/bootstrap`,{method:"POST",body:JSON.stringify({publicKey:this.publicKey}),credentials:"omit"}),s=await i.json().catch(()=>null);if(!i.ok){let n=i.status===429?Bt(i.headers.get("Retry-After"),s?.retryAfterSeconds):void 0;throw new V(i.status,s?.error??`request_failed_${i.status}`,s?.code??s?.error,void 0,void 0,n)}if(!vo(s))throw new V(502,"invalid_bootstrap_response","invalid_bootstrap_response");return this.value=s,s})();this.inflight=t;try{return await t}finally{this.inflight===t&&(this.inflight=null)}}async token(e){let t=e==="expiring"||e==="expired"||e==="unauthorized"||e==="manual",i=await this.load(t);return{token:i.token,expiresAt:i.expiresAt}}},Ci=class extends Te{constructor(t,i,s,n,o){super(t,{...o,access:n});this.event=i;this.loader=s;this.bootstrapAccess=n;this.initialChartDelivered=!1;this.initialObjectsDelivered=!1}assertEvent(t){if(t!==this.event)throw new V(404,"not_found","not_found")}async bundle(t){return this.assertEvent(t),await this.bootstrapAccess.authorization("initial"),this.loader.load()}async chart(t){if(this.assertEvent(t),this.initialChartDelivered)return super.chart(t);let i=await this.bundle(t);return this.initialChartDelivered=!0,{event:i.event,doc:i.doc}}async objects(t){if(this.assertEvent(t),this.initialObjectsDelivered)return super.objects(t);let i=await this.bundle(t);return this.initialObjectsDelivered=!0,i.objects}};function Nt(r){let e=new Ti(r.base,r.event,r.publicKey),t=new de({provider:({reason:i})=>e.token(i),...r.accessHooks});return{access:t,api:new Ci(r.base,r.event,e,t,r.apiOptions??{})}}var W=require("@seatlayer/core");var Y={enter:260,exit:180,spring:320,stagger:30,crossfade:120,collapse:150,rung:200,reducedFade:120,easeEnter:"cubic-bezier(.2,.8,.2,1)",easeExit:"cubic-bezier(.4,0,1,1)",easeSpring:"cubic-bezier(.34,1.56,.64,1)"};var yo=`.sl-picker,.sl-modal-scrim,.sl-mo-host{--sl-dur-enter:${Y.enter}ms;--sl-dur-exit:${Y.exit}ms;--sl-dur-spring:${Y.spring}ms;--sl-dur-stagger:${Y.stagger}ms;--sl-dur-xfade:${Y.crossfade}ms;--sl-dur-collapse:${Y.collapse}ms;--sl-dur-rung:${Y.rung}ms;--sl-ease-enter:${Y.easeEnter};--sl-ease-exit:${Y.easeExit};--sl-ease-spring:${Y.easeSpring};--sl-mo-ox:50%;--sl-mo-oy:50%}`,xo=`@media (prefers-reduced-motion:reduce){.sl-picker,.sl-modal-scrim,.sl-mo-host{--sl-dur-enter:0ms;--sl-dur-exit:0ms;--sl-dur-spring:0ms;--sl-dur-stagger:0ms;--sl-dur-collapse:0ms;--sl-dur-rung:0ms;--sl-dur-xfade:${Y.reducedFade}ms}.sl-mo-in,.sl-mo-out,.sl-mo-slide-up,.sl-mo-slide-down,.sl-mo-spring,.sl-mo-rise,.sl-mo-zoom,.sl-mo-scrim,.sl-mo-stagger > *{animation-name:slMoFade;animation-duration:${Y.reducedFade}ms;animation-delay:0ms}.sl-mo-hint,.sl-mo-rotate-in,.sl-mo-fly,.sl-mo-collapse{animation:none}.sl-mo-indicator{transition:none}}`,vr=yo+`
|
|
42
|
+
/* Anchored open/close. The translate is 8px TOWARD the anchor, which is what
|
|
43
|
+
makes the card look attached to the seat rather than dropped on the map. */
|
|
44
|
+
.sl-mo-in{transform-origin:var(--sl-mo-ox) var(--sl-mo-oy);
|
|
45
|
+
animation:slMoIn var(--sl-dur-enter) var(--sl-ease-enter) both}
|
|
46
|
+
.sl-mo-out{transform-origin:var(--sl-mo-ox) var(--sl-mo-oy);
|
|
47
|
+
animation:slMoOut var(--sl-dur-exit) var(--sl-ease-exit) both;pointer-events:none}
|
|
48
|
+
/* These animate the scale and translate PROPERTIES, not the transform
|
|
49
|
+
property, and that is load-bearing. The confirm card places itself with
|
|
50
|
+
transform:translate(-50%,calc(-100% - 16px)); a keyframe animating transform
|
|
51
|
+
to none would throw that placement away mid-flight and fling the card to the
|
|
52
|
+
seat's top-left corner. The individual transform properties compose with
|
|
53
|
+
transform instead of replacing it, so one pair of keyframes serves both a
|
|
54
|
+
surface that positions itself and one that does not. */
|
|
55
|
+
@keyframes slMoIn{from{opacity:0;scale:.96;translate:0 8px}to{opacity:1;scale:1;translate:none}}
|
|
56
|
+
@keyframes slMoOut{from{opacity:1;scale:1;translate:none}to{opacity:0;scale:.97;translate:0 6px}}
|
|
57
|
+
|
|
58
|
+
/* Rows of a set arrive in sequence. --sl-mo-i is the row's index. */
|
|
59
|
+
.sl-mo-stagger > *{animation:slMoIn var(--sl-dur-enter) var(--sl-ease-enter) both;
|
|
60
|
+
animation-delay:calc(var(--sl-mo-i,0) * var(--sl-dur-stagger))}
|
|
61
|
+
|
|
62
|
+
/* The dock bar rides in from under the map and leaves the same way. */
|
|
63
|
+
.sl-mo-slide-up{animation:slMoUp var(--sl-dur-enter) var(--sl-ease-enter) both}
|
|
64
|
+
.sl-mo-slide-down{animation:slMoDown var(--sl-dur-exit) var(--sl-ease-exit) both;pointer-events:none}
|
|
65
|
+
@keyframes slMoUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
|
|
66
|
+
@keyframes slMoDown{from{opacity:1;transform:none}to{opacity:0;transform:translateY(12px)}}
|
|
67
|
+
|
|
68
|
+
/* Text that changes in place, rather than being swapped under the eye. */
|
|
69
|
+
.sl-mo-xfade{animation:slMoFade var(--sl-dur-xfade) var(--sl-ease-enter) both}
|
|
70
|
+
@keyframes slMoFade{from{opacity:0}to{opacity:1}}
|
|
71
|
+
|
|
72
|
+
/* The rung pill's indicator slides between rungs instead of teleporting. */
|
|
73
|
+
/* 200ms, expressed as the base enter minus a beat: an indicator that
|
|
74
|
+
travels for as long as a card takes to arrive feels sluggish. */
|
|
75
|
+
.sl-mo-indicator{transition:transform var(--sl-dur-rung) var(--sl-ease-enter),
|
|
76
|
+
width var(--sl-dur-rung) var(--sl-ease-enter)}
|
|
77
|
+
|
|
78
|
+
/* A sheet or peek opening is the buyer's own action landing: the one overshoot. */
|
|
79
|
+
.sl-mo-spring{animation:slMoSpring var(--sl-dur-spring) var(--sl-ease-spring) both}
|
|
80
|
+
@keyframes slMoSpring{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:none}}
|
|
81
|
+
.sl-mo-scrim{animation:slMoFade var(--sl-dur-enter) var(--sl-ease-enter) both}
|
|
82
|
+
|
|
83
|
+
/* "You can swipe this." Once per session, on first entry to the map. */
|
|
84
|
+
.sl-mo-hint{animation:slMoHint calc(var(--sl-dur-spring) * 2) var(--sl-ease-spring) 1 both}
|
|
85
|
+
@keyframes slMoHint{0%{transform:none}40%{transform:translateY(6px)}100%{transform:none}}
|
|
86
|
+
|
|
87
|
+
/* The selection flying to the tray, and the chip collapsing when it is undone. */
|
|
88
|
+
.sl-mo-fly{position:fixed;z-index:2147483001;pointer-events:none;display:flex;align-items:center;
|
|
89
|
+
justify-content:center;min-width:24px;height:24px;padding:0 7px;border-radius:999px;
|
|
90
|
+
font:700 11px/1 var(--sl-font,inherit);white-space:nowrap;
|
|
91
|
+
animation:slMoFly var(--sl-dur-spring) var(--sl-ease-spring) both}
|
|
92
|
+
@keyframes slMoFly{
|
|
93
|
+
from{opacity:0;transform:translate(-50%,-50%) scale(.6)}
|
|
94
|
+
22%{opacity:1;transform:translate(-50%,-50%) scale(1)}
|
|
95
|
+
to{opacity:.15;transform:translate(calc(-50% + var(--sl-fly-dx,0px)),calc(-50% + var(--sl-fly-dy,0px))) scale(.55)}}
|
|
96
|
+
.sl-mo-collapse{animation:slMoCollapse var(--sl-dur-collapse) var(--sl-ease-exit) both;pointer-events:none}
|
|
97
|
+
@keyframes slMoCollapse{from{opacity:1;transform:none}to{opacity:0;transform:scale(.7)}}
|
|
98
|
+
|
|
99
|
+
/* Toasts rise; they never drop in. */
|
|
100
|
+
.sl-mo-rise{animation:slMoRise var(--sl-dur-enter) var(--sl-ease-enter) both}
|
|
101
|
+
@keyframes slMoRise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
|
|
102
|
+
|
|
103
|
+
/* An immersive overlay takes the screen by settling onto it, not by cutting. */
|
|
104
|
+
.sl-mo-zoom{animation:slMoZoom var(--sl-dur-enter) var(--sl-ease-enter) both}
|
|
105
|
+
@keyframes slMoZoom{from{opacity:0;transform:scale(1.02)}to{opacity:1;transform:none}}
|
|
106
|
+
.sl-mo-rotate-in{animation:slMoSpin var(--sl-dur-spring) var(--sl-ease-spring) 1 both}
|
|
107
|
+
@keyframes slMoSpin{from{opacity:0;transform:rotate(-140deg) scale(.8)}to{opacity:1;transform:none}}
|
|
108
|
+
`+xo;function yr(){try{return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0}catch{return!1}}function Ei(r,e){if(!e){r.style.removeProperty("--sl-mo-ox"),r.style.removeProperty("--sl-mo-oy");return}Vt(r,e,r.getBoundingClientRect())}function Vt(r,e,t){let i=t.width||1,s=t.height||1,n=o=>Math.max(0,Math.min(100,o));r.style.setProperty("--sl-mo-ox",`${n((e.x-t.left)/i*100).toFixed(1)}%`),r.style.setProperty("--sl-mo-oy",`${n((e.y-t.top)/s*100).toFixed(1)}%`)}function xr(r,e,t){let i=r.getBoundingClientRect(),s=t.getBoundingClientRect();Vt(r,e,{left:i.left-s.left,top:i.top-s.top,width:i.width,height:i.height})}function Ft(r,e){r.classList.remove("sl-mo-out"),e!==void 0&&Ei(r,e),r.classList.remove("sl-mo-in"),r.offsetWidth,r.classList.add("sl-mo-in")}function wr(r){r.classList.add("sl-mo-stagger");let e=0;for(let t of Array.from(r.children))t.style.setProperty("--sl-mo-i",String(e)),e+=1}function Ee(r,e,t={className:"sl-mo-out",duration:Y.exit}){let i=()=>{s||(s=!0,window.clearTimeout(n),r.removeEventListener("animationend",i),e?e():r.remove())},s=!1;r.classList.remove("sl-mo-in","sl-mo-slide-up","sl-mo-spring","sl-mo-zoom","sl-mo-rise"),r.classList.add(t.className),r.addEventListener("animationend",i);let n=window.setTimeout(i,yr()?0:t.duration+60)}var kr={className:"sl-mo-slide-down",duration:Y.exit};function Ai(r,e){r.textContent!==e&&(r.textContent=e,r.classList.remove("sl-mo-xfade"),r.offsetWidth,r.classList.add("sl-mo-xfade"))}function Sr(r){if(yr())return r.onArrive?.(),null;let e=document.createElement("div");e.className="sl-mo-fly sl-mo-host",e.setAttribute("aria-hidden","true"),e.textContent=r.label??"",e.style.left=`${r.from.x}px`,e.style.top=`${r.from.y}px`,e.style.background=r.color??"var(--sl-accent,#6e7bff)",e.style.color=r.ink??"#fff",e.style.setProperty("--sl-fly-dx",`${Math.round(r.to.x-r.from.x)}px`),e.style.setProperty("--sl-fly-dy",`${Math.round(r.to.y-r.from.y)}px`),document.body.appendChild(e);let t=!1,i=()=>{t||(t=!0,window.clearTimeout(s),e.remove(),r.onArrive?.())};e.addEventListener("animationend",i);let s=window.setTimeout(i,Y.spring+80);return e}var F=r=>String(r??"").replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e]);function Xe(r,e){let t=0;for(let i of r.get(e)?.values()??[])t+=i;return t}function Tr(r){let e=[];for(let[t,i]of r)for(let[s,n]of i)n>0&&e.push({areaId:t,tierId:s,qty:n});return e}function Cr(r){let e=new Map;for(let t of r.keys())e.set(t,Xe(r,t));return e}function bt(r,e,t,i){let s=r.get(e)??new Map;i>0?s.set(t,i):s.delete(t),s.size?r.set(e,s):r.delete(e)}function Er(r){let e=new Map;for(let t of r)t.objectType!=="ga"||!t.objectId||e.set(t.objectId,(e.get(t.objectId)??0)+(t.quantity??1));return e}function Ze(r,e){let t=Er(e),i=0;for(let s of r.keys())i+=Math.max(0,Xe(r,s)-(t.get(s)??0));return i}function Ar(r,e,t){let i=Er(t),s=0;for(let n of e){let o=r.gaQty.get(n.id);if(!o)continue;let a=i.get(n.id)??0;for(let[l,c]of o){let h=Math.max(0,c-a);a=Math.max(0,a-c),s+=h*r.paidPrice(n.categoryKey,l,wo(n,l),n.id)}}return s}function wo(r,e){return e?r.tiers?.find(t=>t.id===e)?.price??r.price:r.price}function Pr(r){let e=[],t=new Map;for(let i of r){if(i.objectType!=="ga"||!i.objectId){e.push({...i,labels:[i.label]});continue}let s=`${i.objectId}\0${i.tierId??""}`,n=t.get(s);if(n){n.quantity=(n.quantity??0)+(i.quantity??1),n.labels.push(i.label);continue}let o={...i,quantity:i.quantity??1,labels:[i.label]};t.set(s,o),e.push(o)}return e}function Mr(r,e,t){let i=new Set(t);for(let s of e)s.objectType==="ga"&&s.objectId&&i.has(s.label)&&bt(r,s.objectId,s.tierId??null,0)}function Mi(r,e){if(r.objectType!=="ga")return r.label;let t=e.find(i=>i.id===r.objectId);return t?.displayLabel??t?.label??r.label}function ko(r){let e=new Map;for(let t of r){if(t.objectType!=="ga"||!t.objectId)continue;let i=`${t.objectId}\0${t.tierId??""}`;e.set(i,(e.get(i)??0)+(t.quantity??1))}return e}function jt(r){let e=r.tiers??[];return e.length>1?e.map(t=>({id:t.id,label:t.name||t.id,price:t.price})):[{id:null,label:r.displayType??(0,W.t)("picker.generalAdmission"),price:r.price}]}function Lr(r,e){let t=r.totalTicketCount()-Xe(r.gaQty,e.id);return Math.max(0,Math.min(e.available,r.maxTickets-t))}function Li(r,e,t,i){if(ve(r,!1),r.salesClosed){r.toast(r.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let s=jt(e),n=r.gaQty.get(e.id),o=Xe(r.gaQty,e.id)>0,a=Lr(r,e);if(a<=0&&!o){r.toast(e.available>0?(0,W.t)("picker.maxTicketsForOrder",{count:r.maxTickets}):r.tf("picker.soldOutTitle","Sold out"),"warning");return}if(r.onGAPromptHook){let d={};for(let[g,b]of n??[])d[g??""]=b;if(r.onGAPromptHook({area:e,selected:d,min:0,max:a,tiers:s,confirm:g=>{Eo(r,e,s,g,a)},cancel:()=>ve(r)})===!0)return}let l=new Map;for(let d of s)l.set(d.id,n?.get(d.id)??0);!o&&a>0&&l.set(s[0].id,1);let c={area:e,tiers:s,draft:l,max:a,reopened:o},h=r.root?.dataset.layout==="narrow",p=document.createElement("div");p.className=h?"sl-ga-scrim sl-mo-scrim":"sl-ga-pop-layer",p.innerHTML=So(r,c,h),r.root?.appendChild(p),r.gaPromptEl=p,r.gaPromptReturnFocus=i??document.activeElement,h||Ao(r,p,t),r.reducedMotion()&&(p.dataset.motion="reduced"),Rr(r,c),To(r,p,c),requestAnimationFrame(()=>p.querySelector('[data-ga-step="1"]')?.focus())}function So(r,e,t){let{area:i,tiers:s}=e,n=s.length>1,o=i.displayLabel??i.label,a=s.map(l=>`<div class="sl-ga-prompt-row" data-ga-tier="${F(l.id??"")}"><div class="sl-ga-prompt-label"><span>${F(n?l.label:r.tf("picker.gaChooseTickets","How many tickets?"))}</span>`+(n?`<small>${F(r.money(r.paidPrice(i.categoryKey,l.id,l.price,i.id)))}</small>`:"")+`</div><div class="sl-ga-stepper" role="group" aria-label="${F(n?l.label:o)}"><button type="button" data-ga-step="-1" aria-label="${F(r.tf("picker.fewer","Fewer"))}">\u2212</button><output data-ga-qty aria-live="polite">0</output><button type="button" data-ga-step="1" aria-label="${F(r.tf("picker.more","More"))}">+</button></div></div>`).join("");return`<section class="${t?"sl-ga-sheet":"sl-ga-pop"}" role="dialog" aria-modal="true" aria-label="${F((0,W.t)("picker.gaChooseForArea",{area:o}))}"><div class="sl-ga-prompt-head"><div class="sl-ga-prompt-eyebrow">${F(i.displayType??r.tf("picker.generalAdmission","General admission"))}</div><h2 class="sl-ga-prompt-title">${F(o)}</h2><p class="sl-ga-prompt-sub" data-ga-sub></p><button type="button" class="sl-ga-prompt-close" data-ga-cancel aria-label="${F((0,W.t)("common.close"))}">\xD7</button></div><div class="sl-ga-prompt-body">${a}`+(s.length>1?`<div class="sl-ga-prompt-total"><span>${F(r.tf("picker.total","Total"))}</span><b data-ga-total></b></div>`:"")+'<p class="sl-ga-prompt-hint" data-ga-hint></p></div><div class="sl-ga-prompt-actions">'+(e.reopened?`<button type="button" class="sl-ga-prompt-remove" data-ga-remove>${F(r.tf("picker.gaRemove","Remove"))}</button>`:`<button type="button" class="sl-ga-prompt-remove" data-ga-cancel>${F((0,W.t)("common.cancel"))}</button>`)+'<button type="button" class="sl-ga-prompt-confirm" data-ga-confirm></button></div></section>'}function Hi(r){let e=0;for(let t of r.draft.values())e+=t;return e}function Hr(r,e){let t=0;for(let i of e.tiers)t+=(e.draft.get(i.id)??0)*r.paidPrice(e.area.categoryKey,i.id,i.price,e.area.id);return t}function Rr(r,e){let t=r.gaPromptEl;if(!t)return;let i=Hi(e),s=Hr(r,e);t.querySelectorAll("[data-ga-tier]").forEach(c=>{let h=c.dataset.gaTier?c.dataset.gaTier:null,p=e.draft.get(h)??0,d=c.querySelector("[data-ga-qty]");d&&(d.value=String(p)),c.querySelectorAll("[data-ga-step]").forEach(u=>{u.disabled=Number(u.dataset.gaStep)<0?p<=0:i>=e.max})});let n=t.querySelector("[data-ga-sub]");n&&(n.textContent=`${r.money(r.paidPrice(e.area.categoryKey,e.tiers[0].id,e.tiers[0].price,e.area.id))} \xB7 ${(0,W.tCount)("picker.leftCount",e.area.available)}`);let o=t.querySelector("[data-ga-total]");o&&(o.textContent=r.money(s));let a=t.querySelector("[data-ga-hint]");a&&(a.textContent=i>=e.max&&e.max>0?e.area.available<=e.max?(0,W.tCount)("picker.leftCount",e.area.available):(0,W.t)("picker.maxTicketsForOrder",{count:r.maxTickets}):"");let l=t.querySelector("[data-ga-confirm]");l&&(l.textContent=e.reopened?(0,W.tCount)("picker.gaUpdate",i,{count:i}):(0,W.tCount)("picker.gaAdd",i,{count:i,price:r.money(s)}),l.disabled=i<=0&&!e.reopened)}function To(r,e,t){e.querySelectorAll("[data-ga-step]").forEach(i=>{i.addEventListener("click",()=>{let s=i.closest("[data-ga-tier]");if(!s)return;let n=s.dataset.gaTier?s.dataset.gaTier:null,o=Number(i.dataset.gaStep),a=t.draft.get(n)??0,l=t.max-Hi(t);t.draft.set(n,Math.max(0,a+(o>0?Math.min(1,l):-1))),Rr(r,t)})}),e.querySelectorAll("[data-ga-cancel]").forEach(i=>i.addEventListener("click",()=>ve(r))),e.querySelector("[data-ga-remove]")?.addEventListener("click",()=>{r.gaQty.delete(t.area.id),ve(r),r.syncTray(),Pi(r,(0,W.t)("picker.gaRemoved",{area:t.area.displayLabel??t.area.label}))}),e.querySelector("[data-ga-confirm]")?.addEventListener("click",()=>{Co(r,t)}),e.addEventListener("mousedown",i=>{i.target===e&&ve(r)}),e.addEventListener("keydown",i=>{if(i.key==="Escape"){i.stopPropagation(),ve(r);return}if(i.key!=="Tab")return;let s=[...e.querySelectorAll('button:not(:disabled),[tabindex]:not([tabindex="-1"])')];if(!s.length)return;let n=s[0],o=s[s.length-1];i.shiftKey&&document.activeElement===n?(i.preventDefault(),o.focus()):!i.shiftKey&&document.activeElement===o&&(i.preventDefault(),n.focus())})}function Co(r,e){let t=Hi(e),i=Hr(r,e);for(let n of e.tiers)bt(r.gaQty,e.area.id,n.id,e.draft.get(n.id)??0);ve(r),r.syncTray();let s=e.area.displayLabel??e.area.label;t>0?Pi(r,(0,W.tCount)("picker.gaAdded",t,{count:t,area:s,price:r.money(i)})):Pi(r,(0,W.t)("picker.gaRemoved",{area:s}))}function Eo(r,e,t,i,s){if(typeof i=="number")bt(r.gaQty,e.id,t[0].id,Math.max(0,Math.min(s,Math.floor(i))));else{r.gaQty.delete(e.id);let n=s;for(let o of t){let a=Math.max(0,Math.floor(i[o.id??""]??0)),l=Math.min(a,n);n-=l,bt(r.gaQty,e.id,o.id,l)}}r.syncTray()}function ve(r,e=!0){let t=r.gaPromptReturnFocus;r.gaPromptEl&&Ee(r.gaPromptEl),r.gaPromptEl=null,r.gaPromptReturnFocus=null,e&&t&&requestAnimationFrame(()=>(t.isConnected?t:r.root)?.focus())}function Ao(r,e,t){let i=r.root,s=e.querySelector(".sl-ga-pop");if(!i||!s||!t)return;let n=i.getBoundingClientRect(),o=t.x-n.left,a=t.y-n.top;e.style.setProperty("--sl-ga-anchor-x",`${o}px`),e.style.setProperty("--sl-ga-anchor-y",`${a}px`),requestAnimationFrame(()=>{let l=s.offsetWidth||260,c=s.offsetHeight||220,h=Math.max(8,Math.min(n.width-l-8,o-l/2)),p=a-c-14,d=p>=8?p:Math.min(n.height-c-8,a+14);s.style.left=`${h}px`,s.style.top=`${Math.max(8,d)}px`,s.dataset.side=p>=8?"above":"below",s.style.setProperty("--sl-ga-arrow-x",`${Math.max(12,Math.min(l-12,o-h))}px`)})}function Pi(r,e){r.srEl&&(r.srEl.textContent=e)}function Or(r,e,t=[]){let i=[],s=ko(t);for(let o of e){let a=r.gaQty.get(o.id);if(!a)continue;let l=jt(o);for(let c of l){let h=(a.get(c.id)??0)-(s.get(`${o.id}\0${c.id??""}`)??0);if(h<=0)continue;let p=r.paidPrice(o.categoryKey,c.id,c.price,o.id);i.push(`<div class="sl-ga" data-ga="${F(o.id)}" data-ga-row-tier="${F(c.id??"")}"><div class="sl-ga-info"><div class="sl-ga-name">${F(o.displayLabel??o.label)}</div><div class="sl-ga-sub">${F(l.length>1?c.label:o.displayType??r.tf("picker.generalAdmission","General admission"))} \xB7 ${F(r.money(p))} \xB7 ${F((0,W.tCount)("picker.leftCount",o.available))}</div></div><div class="sl-ga-qty"><button type="button" data-d="-1" aria-label="${F(r.tf("picker.fewer","Fewer"))}">\u2212</button><span>${h}</span><button type="button" data-d="1" aria-label="${F(r.tf("picker.more","More"))}">+</button></div></div>`)}}let n=e.filter(o=>Xe(r.gaQty,o.id)<=0&&!t.some(a=>a.objectId===o.id));return n.length&&i.push(`<div class="sl-ga-areas" data-ga-areas><button type="button" class="sl-ga-areas-toggle" data-ga-areas-toggle aria-expanded="${r.gaAreasExpanded}"><span>${F(r.tf("picker.gaAreasHeading","Areas"))}</span><small>${n.length}</small></button>`+(r.gaAreasExpanded?`<div class="sl-ga-areas-list">${n.map(o=>`<button type="button" class="sl-ga-area-open" data-ga-open="${F(o.id)}"${o.available<=0?" disabled":""}><span class="name">${F(o.displayLabel??o.label)}<small>${F(o.displayType??r.tf("picker.generalAdmission","General admission"))}</small></span><span class="meta">${F(r.money(r.paidPrice(o.categoryKey,null,o.price,o.id)))} \xB7 ${F(o.available>0?(0,W.tCount)("picker.leftCount",o.available):r.tf("picker.soldOutTitle","Sold out"))}</span></button>`).join("")}</div>`:"")+"</div>"),i.join("")}function Ir(r,e,t){e.querySelectorAll(".sl-ga .sl-ga-qty button").forEach(i=>{i.addEventListener("click",()=>{let s=i.closest(".sl-ga");if(!s?.dataset.ga)return;let n=t.find(c=>c.id===s.dataset.ga);if(!n)return;let o=s.dataset.gaRowTier?s.dataset.gaRowTier:null,a=Number(i.dataset.d),l=r.gaQty.get(n.id)?.get(o)??0;if(a>0&&Lr(r,n)-Xe(r.gaQty,n.id)<=0){r.toast((0,W.t)("picker.maxTicketsForOrder",{count:r.maxTickets}),"warning");return}bt(r.gaQty,n.id,o,Math.max(0,l+a)),r.syncTray()})}),e.querySelector("[data-ga-areas-toggle]")?.addEventListener("click",()=>{r.gaAreasExpanded=!r.gaAreasExpanded,r.syncTray()}),e.querySelectorAll("[data-ga-open]").forEach(i=>{i.addEventListener("click",()=>{let s=t.find(n=>n.id===i.dataset.gaOpen);s&&Li(r,s,null,i)})})}var Gt='<svg viewBox="0 0 64 56" width="12" height="11" fill="none" aria-hidden="true" focusable="false" style="display:block"><path d="M4 13 Q16 6 29 7 L28.5 17 Q17 16.5 7 22 Z" fill="#f4b740"/><path d="M4 13 Q16 6 29 7 L28.5 17 Q17 16.5 7 22 Z" fill="#f4b740" transform="translate(64 0) scale(-1 1)"/><path d="M8 28 Q18 22 28.6 23 L28.2 32 Q18 28.5 10 36 Z" fill="#fcf7ee"/><path d="M8 28 Q18 22 28.6 23 L28.2 32 Q18 28.5 10 36 Z" fill="#fcf7ee" transform="translate(64 0) scale(-1 1)"/><path d="M11 41 Q19 35 28.2 36 L27.8 45 Q19.5 42 13.5 49 Z" fill="#fcf7ee"/><path d="M11 41 Q19 35 28.2 36 L27.8 45 Q19.5 42 13.5 49 Z" fill="#fcf7ee" transform="translate(64 0) scale(-1 1)"/></svg>';var Po=/^data:image\/(?:png|jpe?g|webp|gif|avif);base64,[a-z0-9+/]+={0,2}$/i,Mo=/[\s"'<>`\\]/;function Lo(r){return r.startsWith("//")?!1:r.startsWith("/")||r.startsWith("./")||r.startsWith("../")}function Ho(){try{let r=typeof location>"u"?"":location.origin;return r&&r!=="null"?r:null}catch{return null}}function Je(r){if(typeof r!="string"||!r||r.length>2e6||r!==r.trim())return!1;if(r.startsWith("data:"))return Po.test(r);if(Mo.test(r))return!1;let e=Ho();if(Lo(r)){if(!e)return!1;try{let t=new URL(r,e);return t.origin===e&&!t.username&&!t.password}catch{return!1}}try{let t=new URL(r);return t.username||t.password?!1:t.protocol==="https:"||e!=null&&t.origin===e}catch{return!1}}var Ro=/^[a-zA-Z0-9._-]+$/;function Ri(r){let e;try{e=new URL(r,"https://seatlayer.invalid")}catch{return null}if(e.search||e.hash)return null;let t=/^\/pub\/events\/([^/]+)\/assets\/([^/]+)$/.exec(e.pathname);if(!t)return null;try{let i=decodeURIComponent(t[1]),s=decodeURIComponent(t[2]);return!i||!Ro.test(s)?null:{eventKey:i,asset:s}}catch{return null}}function Oo(r){try{return/^\/pub\/events\/[^/]+\/assets(?:\/|$)/.test(new URL(r,"https://seatlayer.invalid").pathname)}catch{return!1}}var et=class{constructor(e,t){this.eventKey=e;this.load=t;this.pending=new Map;this.created=new Set;this.disposed=!1}resolve(e){let t=Ri(e);if(!t)return Promise.resolve(Oo(e)||!Je(e)?null:e);if(t.eventKey!==this.eventKey||!this.load||this.disposed)return Promise.resolve(null);let i=this.pending.get(e);if(i)return i;let s=this.load(this.eventKey,t.asset).then(n=>{let o=URL.createObjectURL(n);return this.disposed?(URL.revokeObjectURL(o),null):(this.created.add(o),o)}).catch(n=>{throw this.pending.delete(e),n});return this.pending.set(e,s),s}dispose(){if(!this.disposed){this.disposed=!0;for(let e of this.created)URL.revokeObjectURL(e);this.created.clear(),this.pending.clear()}}};var vt=require("@seatlayer/core"),Jt=require("@seatlayer/core/view3d/crossfade/panorama");var _r=`
|
|
42
109
|
/* TEST MODE is environment context, not an action. A small squared chip that
|
|
43
110
|
flows FIRST in the top-left anchor region: the old rotated corner ribbon sat
|
|
44
111
|
at a negative offset and was clipped by the widget root's rounded
|
|
@@ -149,6 +216,11 @@
|
|
|
149
216
|
.sl-tip-note{display:block;margin-top:-6px;padding:0 12px 9px 30px;
|
|
150
217
|
font-size:10.5px;font-weight:700;color:var(--sl-muted)}
|
|
151
218
|
|
|
219
|
+
/* Why a tapped seat cannot be taken. Muted, wrapping, and separated from the
|
|
220
|
+
card above it by a hairline \u2014 it is a sentence, not another status chip. */
|
|
221
|
+
.sl-tip-reason{padding:8px 12px 10px 15px;margin-top:1px;font-size:11.5px;line-height:1.35;
|
|
222
|
+
font-weight:650;color:var(--sl-muted);
|
|
223
|
+
border-top:1px solid color-mix(in srgb,var(--sl-line) 60%,transparent)}
|
|
152
224
|
.sl-tip-cx{display:flex;align-items:center;gap:6px;padding:5px 10px 7px;font-size:10.5px;font-weight:700;color:#e8b24a}
|
|
153
225
|
.sl-tip-cx .g{font-size:12px}
|
|
154
226
|
|
|
@@ -158,9 +230,14 @@
|
|
|
158
230
|
because touch has no hover to end it. */
|
|
159
231
|
/* A card the buyer TAPPED becomes interactive (pointer-events back on), gains
|
|
160
232
|
a close control and a soft category ring \u2014 touch has no hover to end it. */
|
|
161
|
-
.sl-tip.sl-tip-pinned{pointer-events:auto;width:
|
|
233
|
+
.sl-tip.sl-tip-pinned{pointer-events:auto;width:300px;max-height:calc(100% - 16px);overflow-y:auto;
|
|
162
234
|
box-shadow:0 24px 48px -24px rgba(0,0,0,.65),0 1px 0 rgba(255,255,255,.06) inset,
|
|
163
235
|
0 0 0 1px color-mix(in srgb,var(--sl-cat,var(--sl-accent)) 35%,transparent)}
|
|
236
|
+
.sl-tip-pinned .sl-tip-head{display:grid;grid-template-columns:minmax(88px,.8fr) minmax(0,1.2fr);
|
|
237
|
+
align-items:start;column-gap:16px;padding:14px 44px 10px 16px}
|
|
238
|
+
.sl-tip-pinned .sl-tip-id,.sl-tip-pinned .sl-tip-sec{min-width:0}
|
|
239
|
+
.sl-tip-pinned .sl-tip-sec{max-width:none;padding-inline-end:0;text-align:end}
|
|
240
|
+
.sl-tip-pinned .sl-tip-secname{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
|
|
164
241
|
.sl-tip-nights{margin-top:2px;padding:8px 12px 10px 15px;
|
|
165
242
|
border-top:1px solid color-mix(in srgb,var(--sl-line) 60%,transparent)}
|
|
166
243
|
.sl-tip-nights-title{font-size:10px;letter-spacing:.1em;text-transform:uppercase;font-weight:800;color:var(--sl-muted)}
|
|
@@ -173,6 +250,8 @@
|
|
|
173
250
|
/* The SAME two tones the map paints, so the key and the chart are one language. */
|
|
174
251
|
.sl-night-dot{flex:none;width:14px;height:14px;border-radius:50%;background:var(--sl-cat,var(--sl-accent))}
|
|
175
252
|
.sl-night.no .sl-night-dot{background:color-mix(in srgb,var(--sl-muted) 40%,transparent)}
|
|
253
|
+
.sl-night-choice{flex:none;width:15px;height:15px;margin:0;accent-color:var(--sl-accent);cursor:pointer}
|
|
254
|
+
.sl-night.selectable{cursor:pointer}
|
|
176
255
|
.sl-night .d{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
177
256
|
.sl-night .st{flex:none;font-size:10.5px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
|
|
178
257
|
.sl-night.ok .st{color:var(--sl-text)}
|
|
@@ -185,14 +264,31 @@
|
|
|
185
264
|
border-radius:8px;background:transparent;color:inherit;font:inherit;font-size:12px;font-weight:750;
|
|
186
265
|
cursor:pointer;transition:border-color 120ms ease}
|
|
187
266
|
.sl-tip-switch:hover{border-color:var(--sl-accent)}
|
|
267
|
+
.sl-tip-switch:disabled{cursor:not-allowed;opacity:.5;border-color:var(--sl-line)}
|
|
188
268
|
.sl-tip-switch:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
|
|
269
|
+
.sl-confirm-group-dates{width:340px;max-height:calc(100% - 32px);overflow-y:auto}
|
|
270
|
+
.sl-confirm-dates{margin:0 0 9px;padding:0;border:0}
|
|
271
|
+
.sl-confirm-dates legend{margin:0;padding:0;color:var(--sl-text);font-size:12.5px;font-weight:800}
|
|
272
|
+
.sl-confirm-dates-copy{margin:4px 0 9px;color:var(--sl-muted);font-size:11px;line-height:1.35}
|
|
273
|
+
.sl-confirm-date-all{display:flex;align-items:center;gap:8px;min-height:34px;padding:6px 0;
|
|
274
|
+
border-block:1px solid var(--sl-line);font-size:11.5px;font-weight:750;cursor:pointer}
|
|
275
|
+
.sl-confirm-dates input{flex:none;width:16px;height:16px;margin:0;accent-color:var(--sl-accent);cursor:pointer}
|
|
276
|
+
.sl-confirm-dates ul{margin:0;padding:0;list-style:none}
|
|
277
|
+
.sl-confirm-date{border-bottom:1px solid color-mix(in srgb,var(--sl-line) 70%,transparent);font-size:11px}
|
|
278
|
+
.sl-confirm-date>label{display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:8px;
|
|
279
|
+
min-height:34px;cursor:pointer}
|
|
280
|
+
.sl-confirm-date-label{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
281
|
+
.sl-confirm-date-state{color:var(--sl-muted);font-size:10px;font-weight:750}
|
|
282
|
+
.sl-confirm-date.blocked{color:var(--sl-muted)}
|
|
283
|
+
.sl-confirm-date.blocked label,.sl-confirm-date.blocked input{cursor:not-allowed}
|
|
284
|
+
.sl-confirm-dates-summary{margin:8px 0 0;color:var(--sl-text);font-size:11px;font-weight:750}
|
|
285
|
+
.sl-confirm-group-dates .sl-confirm-add:disabled{cursor:not-allowed;opacity:.5}
|
|
189
286
|
.sl-tip-close{position:absolute;top:8px;inset-inline-end:8px;display:grid;place-items:center;
|
|
190
287
|
width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:var(--sl-muted);
|
|
191
288
|
font-size:10px;line-height:1;cursor:pointer}
|
|
192
289
|
.sl-tip-close:hover{color:var(--sl-text)}
|
|
193
290
|
.sl-tip-close:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
|
|
194
|
-
/*
|
|
195
|
-
.sl-tip-pinned .sl-tip-sec{padding-inline-end:22px}
|
|
291
|
+
/* The pinned header reserves a dedicated close-button gutter above. */
|
|
196
292
|
.sl-pg-nights{margin:2px 0 8px;padding:10px;border-radius:10px;background:var(--sl-panel,#151b2c);color:var(--sl-text);border:1px solid var(--sl-line,rgba(255,255,255,.08))}
|
|
197
293
|
.sl-pg-nights-title{font-size:10px;letter-spacing:.08em;text-transform:uppercase;font-weight:800;color:var(--sl-muted)}
|
|
198
294
|
.sl-pg-nights-list{display:grid;gap:4px;margin:6px 0 0;padding:0;list-style:none}
|
|
@@ -215,15 +311,400 @@
|
|
|
215
311
|
background:transparent;color:var(--sl-muted);font:inherit;font-size:12.5px;font-weight:700;cursor:pointer}
|
|
216
312
|
.sl-pg-switch:hover{border-style:solid;color:var(--sl-text);border-color:var(--sl-accent)}
|
|
217
313
|
@media(prefers-reduced-motion:reduce){.sl-tip{animation:none!important}.sl-tip,.sl-tip-switch,.sl-pg-switch{transition:none!important}}
|
|
218
|
-
|
|
314
|
+
@media(max-width:639px){.sl-confirm-group-dates{width:min(340px,calc(100% - 20px))}.sl-confirm-date{min-height:32px}}
|
|
315
|
+
`;var Dr=`
|
|
316
|
+
/* 3D venue overlay \u2014 mounts over the (paused) Konva stage inside the map host.
|
|
317
|
+
Carries its own gradient so it paints instantly before the scene builds, and
|
|
318
|
+
cross-fades on enter/exit via a compositor-only opacity transition. Sits below
|
|
319
|
+
the anchored chrome (z-index:5) and the confirm card (z-index:10) so the
|
|
320
|
+
Map|3D toggle and the seat confirm both stay usable over it. */
|
|
321
|
+
.sl-view3d{position:absolute;inset:0;z-index:4;opacity:0;touch-action:none;
|
|
322
|
+
transition:opacity .3s ease;background:radial-gradient(120% 120% at 50% 0%,#191f28 0%,#0d1014 70%)}
|
|
323
|
+
.sl-view3d.has-comparison,.sl-view3d.has-passport{z-index:20}
|
|
324
|
+
/* Confirm mode normally disables the entire GL sibling. Modal surfaces live
|
|
325
|
+
inside that sibling, so explicitly restore pointer input only while one is
|
|
326
|
+
open; their own inert contract keeps the venue underneath unavailable. */
|
|
327
|
+
.sl-picker[data-confirming="true"] .sl-view3d.has-comparison,
|
|
328
|
+
.sl-picker[data-confirming="true"] .sl-view3d.has-passport{pointer-events:auto}
|
|
329
|
+
.sl-view3d canvas{display:block;width:100%;height:100%}
|
|
330
|
+
.sl-view3d canvas:focus-visible{outline:2px solid var(--sl-accent);outline-offset:-3px}
|
|
331
|
+
.sl-view3d-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:10px;
|
|
332
|
+
z-index:1;color:#d9e2f2;font-size:13px;font-weight:700;letter-spacing:.02em;pointer-events:none}
|
|
333
|
+
.sl-view3d-loading::before{content:"";width:18px;height:18px;border-radius:50%;
|
|
334
|
+
border:2px solid rgba(217,226,242,.28);border-top-color:#d9e2f2;animation:slSpin .8s linear infinite}
|
|
335
|
+
[data-view3d=on] .sl-chips,[data-view3d=on] .sl-rungs{display:none}
|
|
336
|
+
.sl-view3d-back{position:absolute;top:12px;left:12px;z-index:2;display:inline-flex;align-items:center;gap:6px;
|
|
337
|
+
min-height:44px;padding:7px 13px 7px 9px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.03em;
|
|
338
|
+
color:#e6edf3;background:rgba(10,14,20,.62);border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(6px)}
|
|
339
|
+
.sl-view3d-back:hover,.sl-view3d-back:focus-visible{background:rgba(16,22,30,.82);border-color:rgba(255,255,255,.4)}
|
|
340
|
+
.sl-view3d-back svg{width:15px;height:15px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round;stroke-linejoin:round}
|
|
341
|
+
/* Map|3D already exits an overview to the 2D map. Reserve Back for the one
|
|
342
|
+
state where it adds meaning: returning from an exact seat to the venue. */
|
|
343
|
+
.sl-view3d:not(.is-seat-focused) .sl-view3d-back{display:none}
|
|
344
|
+
/* Only rendered when the host has suppressed the picker's own zoom stack, and
|
|
345
|
+
then it belongs with the floating map controls at the bottom-right - the
|
|
346
|
+
top-right is the panel chevron's corner. */
|
|
347
|
+
.sl-view3d-fs{position:absolute;bottom:12px;right:12px;z-index:2;min-width:44px;min-height:44px;padding:8px 12px;
|
|
348
|
+
border-radius:999px;font-size:16px;color:#e6edf3;background:rgba(10,14,20,.62);
|
|
349
|
+
border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(6px)}
|
|
350
|
+
.sl-view3d-fs:hover,.sl-view3d-fs:focus-visible{background:rgba(16,22,30,.82);border-color:rgba(255,255,255,.4)}
|
|
351
|
+
/* Venue navigation inside 3D: levels (isolate a floor) and areas (fly to a zone).
|
|
352
|
+
Bottom-LEFT, clear of the module's own chips (Overview bottom-right, 360
|
|
353
|
+
bottom-centre) and of the bottom-sheeted confirm card. Horizontally scrollable
|
|
354
|
+
so a venue with many zones never pushes the rail off a phone screen.
|
|
355
|
+
|
|
356
|
+
EVERY WIDTH HERE IS RELATIVE TO THE RAIL, NEVER TO THE WINDOW. These three
|
|
357
|
+
rules used to size off 100vw, which contradicts the one contract this widget
|
|
358
|
+
states about itself: it adapts to a full-screen takeover, an inline div in a
|
|
359
|
+
content page, or a popup, and its breakpoints key off the CONTAINER, never the
|
|
360
|
+
viewport. A 390 px picker embedded in a 1400 px page asked for
|
|
361
|
+
calc(100vw - 180px) = 1220 inside a 390 px rail.
|
|
362
|
+
|
|
363
|
+
MEASURED, IT DID NOT OVERFLOW: the scroll parent is a flex container, so the
|
|
364
|
+
over-large declaration was shrunk back to the rail and both the old and new
|
|
365
|
+
rules resolve to 364 px in situ. So this is a latent correctness fix, not a
|
|
366
|
+
visible bug -- the numbers were wrong and were being covered for by a
|
|
367
|
+
flex-shrink one level up. Left as 100% because the next person to change that
|
|
368
|
+
parent's display should not inherit a rule that only works by accident. */
|
|
369
|
+
.sl-view3d-nav{position:absolute;left:12px;bottom:16px;z-index:3;display:flex;flex-direction:column;gap:6px;
|
|
370
|
+
max-width:calc(100% - 150px);pointer-events:none}
|
|
371
|
+
.sl-view3d-nav > div{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;pointer-events:auto;
|
|
372
|
+
padding:1px;-webkit-overflow-scrolling:touch}
|
|
373
|
+
.sl-view3d-nav > div::-webkit-scrollbar{display:none}
|
|
374
|
+
.sl-view3d-nav button{flex:0 0 auto;min-height:32px;padding:7px 12px;border-radius:999px;white-space:nowrap;
|
|
375
|
+
font-size:11.5px;font-weight:700;color:#c9d4ea;background:rgba(12,18,32,.72);
|
|
376
|
+
border:1px solid rgba(150,165,205,.35);backdrop-filter:blur(6px);cursor:pointer}
|
|
377
|
+
.sl-view3d-nav button:hover,.sl-view3d-nav button:focus-visible{color:#eef1f8;border-color:rgba(190,205,240,.6)}
|
|
378
|
+
.sl-view3d-nav button[aria-pressed="true"]{background:var(--sl-accent);color:var(--sl-accent-ink);border-color:transparent}
|
|
379
|
+
.sl-view3d-nav button:disabled{opacity:.6;cursor:not-allowed}
|
|
380
|
+
.sl-view3d-nav-toggle{display:none!important}
|
|
381
|
+
.sl-view3d-nav select{min-height:38px;max-width:100%;padding:7px 34px 7px 12px;
|
|
382
|
+
border-radius:999px;font:700 11.5px/1 inherit;color:#eef1f8;background:rgba(12,18,32,.86);
|
|
383
|
+
border:1px solid rgba(150,165,205,.45);backdrop-filter:blur(6px);cursor:pointer}
|
|
384
|
+
.sl-view3d-nav select:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
|
|
385
|
+
/* On phones the library owns the bottom edge for seat/panorama/overview actions.
|
|
386
|
+
Keep venue navigation in a separate top rail so those control families never
|
|
387
|
+
stack over one another. */
|
|
388
|
+
.sl-picker[data-layout="narrow"] .sl-view3d-nav{left:12px;top:12px;bottom:auto;max-width:calc(100% - 132px)}
|
|
389
|
+
/* The closed toggle is one more 36px pill in the phone's control rhythm, at
|
|
390
|
+
the top-left corner nothing else owns in 3D (the Back pill takes that spot
|
|
391
|
+
only at seat-eye, when this rail is hidden). Icon + word, not the word alone. */
|
|
392
|
+
.sl-picker[data-layout="narrow"] .sl-view3d-nav-toggle{display:inline-flex!important;align-items:center;gap:6px;pointer-events:auto;
|
|
393
|
+
min-height:36px;padding:0 12px 0 9px;font-size:11.5px}
|
|
394
|
+
.sl-view3d-nav-toggle svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linejoin:round;flex:none}
|
|
395
|
+
.sl-picker[data-layout="narrow"] .sl-view3d-nav button:not(.sl-view3d-nav-toggle){min-height:36px}
|
|
396
|
+
.sl-picker[data-layout="narrow"] .sl-view3d-nav:not(.is-open)>div{display:none!important}
|
|
397
|
+
.sl-picker[data-layout="narrow"] .sl-view3d-nav.is-open{left:12px;top:12px;max-width:calc(100% - 24px);padding:8px;
|
|
398
|
+
border:1px solid rgba(150,165,205,.35);border-radius:14px;background:rgba(8,12,22,.9);backdrop-filter:blur(10px)}
|
|
399
|
+
.sl-picker[data-layout="narrow"] .sl-view3d-nav.is-open>div{display:flex}
|
|
400
|
+
/* Seat-eye is a decision state, not another venue-navigation state. Once the
|
|
401
|
+
buyer arrives, clear the floor/area/locator rails and the module's duplicate
|
|
402
|
+
Overview action. The picker-owned Back button becomes the one predictable
|
|
403
|
+
escape: seat -> venue -> 2D map. */
|
|
404
|
+
.sl-view3d.is-seat-focused .sl-view3d-nav,
|
|
405
|
+
.sl-view3d.is-seat-focused .sl-3d-overview-control,
|
|
406
|
+
.sl-view3d.is-seat-focused .sl-view3d-compare-saved{display:none!important}
|
|
407
|
+
/* While immersed, the 2D-only chrome is meaningless \u2014 hide it, keep Map|3D. */
|
|
408
|
+
.sl-picker[data-view3d="on"] .sl-rungs,
|
|
409
|
+
.sl-picker[data-view3d="on"] .sl-floors,
|
|
410
|
+
.sl-picker[data-view3d="on"] .sl-zoom,
|
|
411
|
+
.sl-picker[data-view3d="on"] .sl-seccard,
|
|
412
|
+
.sl-picker[data-view3d="on"] .sl-minimap{display:none!important}
|
|
413
|
+
/* The confirm card bottom-sheets over 3D (no 2D screen anchor to track). */
|
|
414
|
+
.sl-picker[data-view3d="on"] .sl-confirm{left:50%!important;top:auto!important;bottom:16px;
|
|
415
|
+
transform:translateX(-50%);width:min(342px,calc(100% - 24px))}
|
|
416
|
+
.sl-picker[data-view3d="on"] .sl-confirm[data-placement]{transform:translateX(-50%)}
|
|
417
|
+
.sl-confirm-inspect-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}
|
|
418
|
+
.sl-confirm-inspect-row .sl-confirm-3d{margin-top:0;min-height:44px}
|
|
419
|
+
.sl-confirm-compare{min-height:44px;padding:8px;border-radius:8px;border:1px solid var(--sl-line);
|
|
420
|
+
display:flex;align-items:center;justify-content:center;gap:7px;font-size:12px;font-weight:800;
|
|
421
|
+
color:var(--sl-text);background:transparent}
|
|
422
|
+
.sl-confirm-compare:hover,.sl-confirm-compare:focus-visible{border-color:var(--sl-accent);
|
|
423
|
+
background:color-mix(in srgb,var(--sl-accent) 10%,transparent)}
|
|
424
|
+
.sl-confirm-compare:disabled{opacity:.62;cursor:default}
|
|
425
|
+
.sl-confirm-confidence{width:100%;min-height:44px;margin-top:8px;padding:8px 10px;border-radius:9px;
|
|
426
|
+
border:1px solid color-mix(in srgb,var(--sl-accent) 35%,var(--sl-line));display:flex;align-items:center;
|
|
427
|
+
justify-content:space-between;gap:10px;text-align:left;color:var(--sl-text);
|
|
428
|
+
background:color-mix(in srgb,var(--sl-accent) 7%,var(--sl-surface))}
|
|
429
|
+
.sl-confirm-confidence>span{min-width:0}
|
|
430
|
+
.sl-confirm-confidence strong,.sl-confirm-confidence small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
431
|
+
.sl-confirm-confidence strong{font-size:11px}.sl-confirm-confidence small{margin-top:2px;color:var(--sl-muted);font-size:9.5px}
|
|
432
|
+
.sl-confirm-confidence em{display:none;font-style:normal}
|
|
433
|
+
.sl-confirm-confidence>b{flex:none;font-size:11px;color:var(--sl-accent-text)}
|
|
434
|
+
.sl-confirm-confidence:hover,.sl-confirm-confidence:focus-visible{border-color:var(--sl-accent)}
|
|
435
|
+
/* The production 3D decision dock is deliberately denser than the 2D popup:
|
|
436
|
+
the venue remains the main content and the two inspection actions share one
|
|
437
|
+
row. Truth-bearing accessibility/restriction copy is never hidden. */
|
|
438
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm{bottom:10px}
|
|
439
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-field{padding:8px 9px 7px}
|
|
440
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-value{font-size:14px;margin-top:2px}
|
|
441
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-field:first-child .sl-confirm-value{font-size:12px}
|
|
442
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-cat{padding:7px 10px}
|
|
443
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-price{font-size:15px}
|
|
444
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-body{padding:8px 10px 9px}
|
|
445
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-row{margin-top:7px}
|
|
446
|
+
/* A short embedded/mobile picker cannot afford a full decision sheet over a
|
|
447
|
+
285px map. Keep three 44px action rows and move all disclosure into the
|
|
448
|
+
passport instead of hiding it without a route back. */
|
|
449
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm{bottom:6px}
|
|
450
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-grid,
|
|
451
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-cat,
|
|
452
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-body>.sl-cx{display:none}
|
|
453
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-body{padding:6px 8px 7px}
|
|
454
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-confidence{margin-top:0}
|
|
455
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-confidence em{display:block;margin-bottom:2px;
|
|
456
|
+
color:var(--sl-text);font-size:12px;font-weight:850;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
457
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-confidence strong{font-size:9.5px}
|
|
458
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-confidence small{display:none}
|
|
459
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-inspect-row{margin-top:5px}
|
|
460
|
+
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-row{margin-top:5px}
|
|
461
|
+
|
|
462
|
+
/* Saved comparison lives in the top journey row, away from checkout, arrival
|
|
463
|
+
controls and the bottom-right privacy position. */
|
|
464
|
+
.sl-view3d-compare-saved{position:absolute;top:12px;left:136px;z-index:5;display:flex;align-items:stretch;
|
|
465
|
+
max-width:180px;min-height:38px;border-radius:999px;overflow:hidden;color:#e6edf3;
|
|
466
|
+
background:rgba(10,14,20,.72);border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(6px)}
|
|
467
|
+
.sl-view3d-compare-saved button{min-width:0;padding:7px 10px;color:inherit;font-size:11px;font-weight:800;white-space:nowrap}
|
|
468
|
+
.sl-view3d-compare-saved .main{overflow:hidden;text-overflow:ellipsis}
|
|
469
|
+
.sl-view3d-compare-saved .clear{width:34px;padding:7px;border-left:1px solid rgba(255,255,255,.18)}
|
|
470
|
+
.sl-view3d-compare-saved button:hover,.sl-view3d-compare-saved button:focus-visible{background:rgba(255,255,255,.1)}
|
|
471
|
+
.sl-picker[data-layout="narrow"] .sl-view3d-compare-saved{left:126px;max-width:calc(100% - 194px);min-height:44px}
|
|
472
|
+
|
|
473
|
+
/* An unavailable seat is still inspectable. This compact, non-modal status
|
|
474
|
+
card explains the exact chair the buyer touched without selecting it or
|
|
475
|
+
obscuring the venue with the full purchase confirmation sheet. */
|
|
476
|
+
.sl-view3d-unavailable{position:absolute;left:50%;bottom:18px;z-index:9;display:grid;
|
|
477
|
+
grid-template-columns:minmax(0,1fr) auto;gap:4px 14px;width:min(330px,calc(100% - 24px));
|
|
478
|
+
padding:13px 14px;border:1px solid rgba(255,255,255,.22);border-radius:14px;
|
|
479
|
+
color:#eef3fb;background:rgba(10,14,22,.94);box-shadow:0 18px 48px rgba(0,0,0,.48);
|
|
480
|
+
backdrop-filter:blur(10px);transform:translateX(-50%)}
|
|
481
|
+
.sl-view3d-unavailable[data-state="held"]{border-color:rgba(242,168,56,.7)}
|
|
482
|
+
.sl-view3d-unavailable[data-state="sold"],.sl-view3d-unavailable[data-state="dimmed"]{border-color:rgba(160,170,188,.48)}
|
|
483
|
+
.sl-view3d-unavailable-copy{min-width:0}
|
|
484
|
+
.sl-view3d-unavailable-eyebrow{display:block;font-size:9px;line-height:1.2;letter-spacing:.13em;
|
|
485
|
+
text-transform:uppercase;color:#aab7cc;font-weight:850}
|
|
486
|
+
.sl-view3d-unavailable strong{display:block;margin-top:3px;font-size:17px;line-height:1.2}
|
|
487
|
+
.sl-view3d-unavailable p{grid-column:1/-1;margin:4px 0 0;color:#b9c4d7;font-size:11px;line-height:1.4}
|
|
488
|
+
.sl-view3d-unavailable button{align-self:start;min-width:44px;min-height:44px;margin:-5px -6px 0 0;
|
|
489
|
+
border-radius:999px;color:#eef3fb;font-size:18px;border:1px solid rgba(255,255,255,.18)}
|
|
490
|
+
.sl-view3d-unavailable button:hover,.sl-view3d-unavailable button:focus-visible{background:rgba(255,255,255,.1)}
|
|
491
|
+
.sl-picker[data-layout="narrow"] .sl-view3d-unavailable{bottom:10px;padding-bottom:max(13px,env(safe-area-inset-bottom))}
|
|
492
|
+
|
|
493
|
+
/* Sitting in the seat: the way back to the stage, and the momentary name of
|
|
494
|
+
the stop a pull-back just landed on.
|
|
495
|
+
|
|
496
|
+
Both wear the overlay's dark glass rather than picker theme tokens \u2014 this
|
|
497
|
+
chrome floats over a rendered venue, so it must read the same whether the
|
|
498
|
+
host page is light or dark. The chip sits above the full-screen control's
|
|
499
|
+
corner and only exists while there IS a seat view to recentre. */
|
|
500
|
+
.sl-view3d-recentre{position:absolute;right:12px;z-index:4;display:none;
|
|
501
|
+
bottom:calc(env(safe-area-inset-bottom,0px) + 64px);
|
|
502
|
+
min-width:44px;min-height:44px;padding:8px 12px;border-radius:999px;font-size:17px;
|
|
503
|
+
color:#e6edf3;background:rgba(10,14,20,.62);border:1px solid rgba(255,255,255,.22);
|
|
504
|
+
backdrop-filter:blur(6px);cursor:pointer}
|
|
505
|
+
.sl-view3d.is-seat-view .sl-view3d-recentre{display:inline-flex;align-items:center;justify-content:center}
|
|
506
|
+
.sl-view3d-recentre:hover,.sl-view3d-recentre:focus-visible{background:rgba(16,22,30,.82);border-color:rgba(255,255,255,.4)}
|
|
507
|
+
.sl-view3d-stop{position:absolute;left:50%;top:14px;z-index:4;pointer-events:none;
|
|
508
|
+
padding:6px 12px;border-radius:999px;white-space:nowrap;
|
|
509
|
+
font-size:11.5px;font-weight:800;letter-spacing:.03em;color:#eef3fb;
|
|
510
|
+
background:rgba(10,14,22,.82);border:1px solid rgba(255,255,255,.2);backdrop-filter:blur(8px);
|
|
511
|
+
opacity:0;transform:translate(-50%,-6px);transition:opacity .16s ease,transform .16s ease}
|
|
512
|
+
.sl-view3d-stop.is-shown{opacity:1;transform:translate(-50%,0)}
|
|
513
|
+
/* The Back pill owns the top-left; on a phone the stop caption keeps clear of
|
|
514
|
+
it by staying centred, and drops below the navigation rail's row. */
|
|
515
|
+
.sl-picker[data-layout="narrow"] .sl-view3d-stop{top:64px}
|
|
516
|
+
@media (prefers-reduced-motion:reduce){
|
|
517
|
+
.sl-view3d-stop{transition:none;transform:translate(-50%,0)}
|
|
518
|
+
}
|
|
519
|
+
.sl-view3d-compare-shell{position:absolute;inset:0;z-index:30;display:grid;place-items:center;padding:16px}
|
|
520
|
+
.sl-view3d-compare-scrim{position:absolute;inset:0;background:rgba(3,6,12,.74);backdrop-filter:blur(5px)}
|
|
521
|
+
.sl-view3d-compare{position:relative;width:min(720px,100%);max-height:min(680px,calc(100% - 20px));overflow:auto;
|
|
522
|
+
border:1px solid rgba(160,177,214,.34);border-radius:18px;background:var(--sl-bg);color:var(--sl-text);
|
|
523
|
+
box-shadow:0 28px 90px rgba(0,0,0,.55);padding:18px}
|
|
524
|
+
.sl-view3d-compare>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
|
|
525
|
+
.sl-view3d-compare>header span{display:block;font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--sl-muted);font-weight:850}
|
|
526
|
+
.sl-view3d-compare>header strong{display:block;margin-top:4px;font-size:20px}
|
|
527
|
+
.sl-view3d-compare>header button{min-width:44px;min-height:44px;border-radius:999px;border:1px solid var(--sl-line);color:var(--sl-text)}
|
|
528
|
+
.sl-view3d-compare-note{margin:12px 0;color:var(--sl-muted);font-size:12px;line-height:1.45}
|
|
529
|
+
.sl-view3d-compare-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
|
|
530
|
+
.sl-view3d-compare article{min-width:0;padding:14px;border:1px solid var(--sl-line);border-radius:13px;background:var(--sl-surface)}
|
|
531
|
+
.sl-view3d-compare article>span{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--sl-muted);font-weight:850}
|
|
532
|
+
.sl-view3d-compare article>strong{display:block;margin-top:3px;font-size:20px}
|
|
533
|
+
.sl-view3d-compare article>small{display:block;margin-top:3px;color:var(--sl-muted)}
|
|
534
|
+
.sl-view3d-compare dl{margin:12px 0 0}
|
|
535
|
+
.sl-view3d-compare dl div{display:grid;grid-template-columns:minmax(90px,.8fr) minmax(0,1.2fr);gap:10px;padding:8px 0;border-top:1px solid var(--sl-line)}
|
|
536
|
+
.sl-view3d-compare dt{font-size:10.5px;color:var(--sl-muted)}
|
|
537
|
+
.sl-view3d-compare dd{margin:0;text-align:right;font-size:11px;font-weight:750;overflow-wrap:anywhere}
|
|
538
|
+
.sl-view3d-compare-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:12px}
|
|
539
|
+
.sl-view3d-compare-actions button{min-height:44px;border-radius:9px;border:1px solid var(--sl-line);font-size:12px;font-weight:800}
|
|
540
|
+
.sl-view3d-compare-actions .select{background:var(--sl-accent);color:var(--sl-accent-ink);border-color:transparent}
|
|
541
|
+
.sl-view3d-compare-actions button:disabled{opacity:.62;cursor:not-allowed}
|
|
542
|
+
.sl-view3d-passport-shell{position:absolute;inset:0;z-index:40;display:grid;place-items:center;padding:16px}
|
|
543
|
+
.sl-view3d-passport-scrim{position:absolute;inset:0;background:rgba(3,6,12,.8);backdrop-filter:blur(6px)}
|
|
544
|
+
.sl-view3d-passport{position:relative;width:min(540px,100%);max-height:min(700px,calc(100% - 20px));overflow:auto;
|
|
545
|
+
padding:18px;border:1px solid rgba(160,177,214,.38);border-radius:18px;background:var(--sl-bg);color:var(--sl-text);
|
|
546
|
+
box-shadow:0 28px 90px rgba(0,0,0,.6)}
|
|
547
|
+
.sl-view3d-passport>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
|
|
548
|
+
.sl-view3d-passport>header span{display:block;font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--sl-muted);font-weight:850}
|
|
549
|
+
.sl-view3d-passport>header strong{display:block;margin-top:4px;font-size:20px}
|
|
550
|
+
.sl-view3d-passport>header button{min-width:44px;min-height:44px;border:1px solid var(--sl-line);border-radius:999px;color:var(--sl-text)}
|
|
551
|
+
.sl-view3d-passport-summary{margin:14px 0;padding:12px;border-radius:12px;background:color-mix(in srgb,var(--sl-accent) 9%,var(--sl-surface));
|
|
552
|
+
border:1px solid color-mix(in srgb,var(--sl-accent) 30%,var(--sl-line))}
|
|
553
|
+
.sl-view3d-passport-summary strong{display:block;font-size:15px}.sl-view3d-passport-summary span{display:block;margin-top:4px;font-size:11px;color:var(--sl-muted)}
|
|
554
|
+
.sl-view3d-passport dl{margin:0}.sl-view3d-passport dl div{display:grid;grid-template-columns:minmax(105px,.75fr) minmax(0,1.25fr);
|
|
555
|
+
gap:12px;padding:9px 0;border-top:1px solid var(--sl-line)}
|
|
556
|
+
.sl-view3d-passport dt{font-size:10.5px;color:var(--sl-muted)}.sl-view3d-passport dd{margin:0;text-align:right;font-size:11px;font-weight:750;overflow-wrap:anywhere}
|
|
557
|
+
.sl-view3d-passport h4{margin:14px 0 6px;font-size:11px}.sl-view3d-passport ul{margin:0;padding-left:18px;color:var(--sl-muted);font-size:10.5px;line-height:1.5}
|
|
558
|
+
.sl-view3d-passport-note{margin:14px 0 0;color:var(--sl-muted);font-size:10.5px;line-height:1.45}
|
|
559
|
+
@media(max-width:640px){
|
|
560
|
+
.sl-view3d-compare-shell{padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom))}
|
|
561
|
+
.sl-view3d-compare{width:100%;max-height:100%;padding:14px 14px max(86px,calc(14px + env(safe-area-inset-bottom)));border-radius:15px}
|
|
562
|
+
.sl-view3d-compare-grid{grid-template-columns:1fr}
|
|
563
|
+
.sl-view3d-compare article{padding:12px}
|
|
564
|
+
.sl-view3d-passport-shell{padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom))}
|
|
565
|
+
.sl-view3d-passport{width:100%;max-height:100%;padding:14px 14px max(24px,calc(14px + env(safe-area-inset-bottom)));border-radius:15px}
|
|
566
|
+
}
|
|
567
|
+
`;var $r=`
|
|
568
|
+
/* THE PHONE TICKET LIST (owner 2026-08-27: "on mobile the cards take lots of
|
|
569
|
+
space, lots of white space on each card"). The desktop card spends ~72px per
|
|
570
|
+
ticket on SECTION/ROW/SEAT eyebrows, a category line and a 34px icon rail \u2014
|
|
571
|
+
all of it repeated per seat. On phone the eyebrows are lifted into ONE header
|
|
572
|
+
row, each ticket is a 40px line divided by a hairline rather than a card with
|
|
573
|
+
its own border, and the category name goes: the map already paints the colour
|
|
574
|
+
and the price is on the line. What is left is what a ticket stub prints. */
|
|
575
|
+
.sl-picker[data-layout="narrow"] .sl-tray{padding:8px 10px 10px;gap:6px}
|
|
576
|
+
/* The map IS the instruction on a phone, so the sentence goes \u2014 but only
|
|
577
|
+
visually. A blind buyer has no map to read it off. */
|
|
578
|
+
.sl-picker[data-layout="narrow"] .sl-tray-hint{position:absolute!important;width:1px!important;height:1px!important;
|
|
579
|
+
padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;
|
|
580
|
+
white-space:nowrap!important;border:0!important}
|
|
581
|
+
/* THE TRAY'S FLOOR IS ONE WHOLE TICKET, not one whole card. 96px was sized for
|
|
582
|
+
the two-line card; against a 40px line it forced 32px of empty tray under a
|
|
583
|
+
one-ticket cart \u2014 the exact whitespace this pass exists to remove. 64px is
|
|
584
|
+
the list header plus one line, which is what "never crushed" has to mean
|
|
585
|
+
here: the buyer can always see a complete ticket. */
|
|
586
|
+
.sl-picker[data-layout="narrow"] .sl-tray{min-height:64px}
|
|
587
|
+
.sl-tlist{display:flex;flex-direction:column;overflow:hidden;background:var(--sl-surface);
|
|
588
|
+
border:1px solid var(--sl-line);border-radius:var(--sl-r-sm)}
|
|
589
|
+
.sl-picker[data-layout="narrow"] .sl-tline{display:flex;align-items:center;gap:7px;min-height:40px;
|
|
590
|
+
padding:0 4px 0 9px;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:13px}
|
|
591
|
+
.sl-picker[data-layout="narrow"] .sl-tline+.sl-tline{border-top:1px solid color-mix(in srgb,var(--sl-line) 70%,transparent)}
|
|
592
|
+
.sl-picker[data-layout="narrow"] .sl-tline.sl-held{background:color-mix(in srgb,var(--sl-accent) 7%,transparent);
|
|
593
|
+
box-shadow:inset 3px 0 0 color-mix(in srgb,var(--sl-accent) 72%,transparent)}
|
|
594
|
+
/* Section ellipsizes; row, seat and price are what the buyer checks against the
|
|
595
|
+
map and against their money, so they never wrap and never shrink. */
|
|
596
|
+
.sl-tline-id{flex:1;min-width:0;display:flex;align-items:center;gap:5px;white-space:nowrap;font-variant-numeric:tabular-nums}
|
|
597
|
+
.sl-tline-id b{min-width:0;overflow:hidden;text-overflow:ellipsis;font-weight:700}
|
|
598
|
+
.sl-tline-id i{flex:none;font-style:normal;color:var(--sl-muted)}
|
|
599
|
+
.sl-tline-id span{flex:none;font-weight:600}
|
|
600
|
+
.sl-tline-mult{flex:none;color:var(--sl-muted);font-size:11px;font-variant-numeric:tabular-nums}
|
|
601
|
+
.sl-picker[data-layout="narrow"] .sl-tline .amt{flex:none;font-weight:700;font-variant-numeric:tabular-nums}
|
|
602
|
+
/* 32px of ink, 44px of target \u2014 the same grow-the-target-not-the-ink pattern
|
|
603
|
+
the price rail uses. */
|
|
604
|
+
.sl-picker[data-layout="narrow"] .sl-tline .rm{position:relative;flex:none;width:32px;height:32px;min-height:32px;
|
|
605
|
+
border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--sl-muted)}
|
|
606
|
+
.sl-picker[data-layout="narrow"] .sl-tline .rm::before{content:'';position:absolute;inset:-6px}
|
|
607
|
+
.sl-picker[data-layout="narrow"] .sl-tline .rm svg{width:12px;height:12px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round}
|
|
608
|
+
/* The selected tick shrinks to the category-coloured dot the legend already
|
|
609
|
+
taught; the held lock keeps its glyph, because a lock is not a colour. */
|
|
610
|
+
.sl-tline-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--sl-accent)}
|
|
611
|
+
.sl-picker[data-layout="narrow"] .sl-tline .sl-ticket-state{width:8px;height:8px;flex:none;background:var(--sl-accent)}
|
|
612
|
+
.sl-picker[data-layout="narrow"] .sl-tline .sl-ticket-state svg{display:none}
|
|
613
|
+
.sl-picker[data-layout="narrow"] .sl-tline.sl-held .sl-ticket-state{width:14px;height:14px}
|
|
614
|
+
.sl-picker[data-layout="narrow"] .sl-tline.sl-held .sl-ticket-state svg{display:block;width:9px;height:9px}
|
|
615
|
+
.sl-picker[data-layout="narrow"] .sl-tline .tier{max-width:104px;min-height:28px;padding:0 22px 0 7px;font-size:11px}
|
|
616
|
+
.sl-picker[data-layout="narrow"] .sl-tline .sl-table-edit{margin:0}
|
|
617
|
+
/* A folded run trades the dot for the chevron that opens it \u2014 one control per
|
|
618
|
+
line, never two competing affordances in 8px. */
|
|
619
|
+
.sl-trun-toggle{flex:none;width:18px;height:32px;margin-left:-4px;display:flex;align-items:center;justify-content:center;color:var(--sl-muted)}
|
|
620
|
+
.sl-trun-toggle svg{width:13px;height:13px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
|
|
621
|
+
.sl-trun-toggle[aria-expanded="true"] svg{transform:rotate(90deg)}
|
|
622
|
+
/* These carry the SAME narrow prefix as the line rule above on purpose: a bare
|
|
623
|
+
.sl-tline.sl-tsub loses to the [data-layout="narrow"] .sl-tline rule on
|
|
624
|
+
specificity no matter which comes last, and a folded run would then render
|
|
625
|
+
with every one of its members already showing. */
|
|
626
|
+
.sl-picker[data-layout="narrow"] .sl-tline.sl-tsub{display:none}
|
|
627
|
+
.sl-picker[data-layout="narrow"] .sl-tline.sl-tsub[data-open="true"]{display:flex;padding-left:26px;background:color-mix(in srgb,var(--sl-line) 16%,transparent)}
|
|
628
|
+
/* Last, deliberately: a collapsed tail stays hidden even when its run is open. */
|
|
629
|
+
.sl-picker[data-layout="narrow"] .sl-tlist[data-collapsed="true"] .sl-tline[data-overflow="true"]{display:none}
|
|
630
|
+
.sl-tmore{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:40px;
|
|
631
|
+
padding:0 10px;font-size:12.5px;font-weight:650;color:var(--sl-muted);border-top:1px solid var(--sl-line)}
|
|
632
|
+
.sl-tmore svg{width:13px;height:13px;flex:none;stroke:currentColor;stroke-width:2.2;fill:none;
|
|
633
|
+
stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
|
|
634
|
+
.sl-tmore[aria-expanded="true"] svg{transform:rotate(180deg)}
|
|
635
|
+
|
|
636
|
+
/* THE SHEET HEAD IS A ROW, NOT A BAND (owner pass 2026-08-27). Open, it held
|
|
637
|
+
"1 ticket \xB7 $180" and a chevron inside 48px of chrome with air on both
|
|
638
|
+
sides \u2014 a title bar's worth of screen for six words and one control. 36px,
|
|
639
|
+
the handle overlapping into it exactly as it does at peek. */
|
|
640
|
+
.sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-head{min-height:36px;padding:0 6px 0 12px}
|
|
641
|
+
.sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-grab{top:4px}
|
|
642
|
+
.sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-bar{min-height:36px}
|
|
643
|
+
.sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-peek{font-size:14px;font-weight:700}
|
|
644
|
+
.sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-toggle{width:28px;height:28px}
|
|
645
|
+
/* THE FOOT SAYS IT ONCE. "Secure 6 more & checkout" already counts the
|
|
646
|
+
pending seats, so the caption under it never repeats them (see
|
|
647
|
+
holdPanelText's narrow branch), and the by-line is one 18px row rather than
|
|
648
|
+
a padded block. The bottom inset stays on .sl-side, which is the one place
|
|
649
|
+
it can cover the collapsed sheet too (see SeatPickerSafeArea). */
|
|
650
|
+
.sl-picker[data-layout="narrow"] .sl-foot{padding:8px 14px 6px}
|
|
651
|
+
/* ONE door to best-available on the phone, and with a cart it is the \u2726 on the
|
|
652
|
+
sheet head. The tray's "Find seats together instead" row was the same door
|
|
653
|
+
drawn a second time, one scroll below. */
|
|
654
|
+
.sl-picker[data-layout="narrow"] .sl-ba-reopen{display:none}
|
|
655
|
+
/* The head's aside: an icon, not a labelled pill competing with Continue. */
|
|
656
|
+
.sl-picker[data-layout="narrow"] .sl-sheet-best{width:32px;min-height:32px;padding:0;justify-content:center;
|
|
657
|
+
font-size:14px;line-height:1}
|
|
658
|
+
.sl-peek-total{margin-inline-start:6px;font-variant-numeric:tabular-nums}
|
|
659
|
+
.sl-picker[data-layout="narrow"] .sl-powered{min-height:18px;margin-top:6px;margin-bottom:0;padding:0;font-size:11px}
|
|
660
|
+
.sl-picker[data-layout="narrow"] .sl-powered svg{width:14px;height:14px}
|
|
661
|
+
/* THE SECURED STRIP IS GONE FROM THE PHONE (owner call 2026-08-27). It was a
|
|
662
|
+
boxed row above the pay button \u2014 a tick, "N secured", a sentence about a
|
|
663
|
+
clock, and a Change button \u2014 and it wrapped to two lines at 390px. Every
|
|
664
|
+
part of it is said better somewhere else: the count is in the sheet head,
|
|
665
|
+
the clock is the header pill, and Change released the WHOLE hold when the \u2715
|
|
666
|
+
on each held line already releases one seat. Below the button there is now
|
|
667
|
+
only the by-line, and nothing at all when white-label hides that too. */
|
|
668
|
+
.sl-picker[data-layout="narrow"] .sl-foot{display:flex;flex-direction:column;gap:0}
|
|
669
|
+
.sl-picker[data-layout="narrow"] .sl-hold-note{display:none}
|
|
670
|
+
|
|
671
|
+
/* THE DEFAULT PHONE TRAY (same owner pass: "even default this much space and
|
|
672
|
+
text"). With an empty cart the tray showed a sentence, a card title, a
|
|
673
|
+
sub-line under the title, two full-width selects and a button \u2014 240px to say
|
|
674
|
+
"pick some seats". The button already says what the card is for, so the title
|
|
675
|
+
and its echo go, the selects share a row, and the spark moves onto the CTA. */
|
|
676
|
+
.sl-picker[data-layout="narrow"] .sl-ba{grid-template-columns:1fr 1fr;gap:6px;padding:8px;border-radius:11px}
|
|
677
|
+
.sl-picker[data-layout="narrow"] .sl-ba::after{display:none}
|
|
678
|
+
/* The card's own button already says what the card does, so the title and the
|
|
679
|
+
sentence under it go \u2014 but NOT on the confirm face, which is a question the
|
|
680
|
+
buyer has to read before answering. That face marks itself role="alert". */
|
|
681
|
+
.sl-picker[data-layout="narrow"] .sl-ba:not([role="alert"]) .sl-ba-title,
|
|
682
|
+
.sl-picker[data-layout="narrow"] .sl-ba-copy{display:none}
|
|
683
|
+
.sl-picker[data-layout="narrow"] .sl-ba select{min-height:34px;padding:0 24px 0 9px;font-size:12.5px}
|
|
684
|
+
/* Ticket type and zone share the row; a chart with no zones gives the whole
|
|
685
|
+
row to ticket type rather than leaving a hole beside it. */
|
|
686
|
+
.sl-picker[data-layout="narrow"] .sl-ba [data-ba-cat]{grid-column:1}
|
|
687
|
+
.sl-picker[data-layout="narrow"] .sl-ba [data-ba-zone]{grid-column:2}
|
|
688
|
+
.sl-picker[data-layout="narrow"] .sl-ba:not(:has([data-ba-zone])) [data-ba-cat]{grid-column:1/-1}
|
|
689
|
+
.sl-picker[data-layout="narrow"] .sl-ba>span[aria-hidden="true"]:empty{display:none}
|
|
690
|
+
/* 28px of ink, 44px of target \u2014 the stepper is the smallest thing on the card. */
|
|
691
|
+
.sl-picker[data-layout="narrow"] .sl-ba-qty{grid-column:1;justify-self:start;width:110px;justify-content:space-between;padding:2px;gap:0}
|
|
692
|
+
.sl-picker[data-layout="narrow"] .sl-ba-qty button{position:relative;width:30px;height:30px}
|
|
693
|
+
.sl-picker[data-layout="narrow"] .sl-ba-qty button::after{content:'';position:absolute;inset:-7px}
|
|
694
|
+
.sl-picker[data-layout="narrow"] .sl-ba-go{grid-column:2;width:auto;min-height:36px;padding:0 10px;font-size:12.5px;box-shadow:none}
|
|
695
|
+
.sl-picker[data-layout="narrow"] .sl-ba-go:not(.sl-busy)::before{content:'\u2726';font-size:13px;line-height:1}
|
|
696
|
+
`;var Br="seatlayer-picker-style",Io=`
|
|
219
697
|
.sl-picker{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-height:420px;overflow:hidden;
|
|
220
698
|
background:var(--sl-bg);color:var(--sl-text);font-family:var(--sl-font);border-radius:var(--sl-radius);
|
|
221
699
|
--sl-r-sm:calc(var(--sl-radius) * .55);
|
|
222
700
|
/* Motion tokens, defined ON the widget root so an embed is self-contained and
|
|
223
701
|
never inherits (or fights) the host page's own timing. Values mirror
|
|
224
|
-
docs/motion-system-2026-08-01.md \xA72.
|
|
225
|
-
|
|
226
|
-
|
|
702
|
+
docs/motion-system-2026-08-01.md \xA72.
|
|
703
|
+
The two easings are now ALIASES of the shared vocabulary in pickerMotion.ts
|
|
704
|
+
\u2014 the widget has one motion system, and a surface animating on its own
|
|
705
|
+
curve is exactly what made it read as assembled rather than designed. */
|
|
706
|
+
--slm-mo-instant:80ms;--slm-mo-quick:140ms;--slm-mo-base:200ms;--slm-mo-slow:var(--sl-dur-spring);
|
|
707
|
+
--slm-mo-out:var(--sl-ease-enter);--slm-mo-exit:var(--sl-ease-exit);
|
|
227
708
|
/* Semantic palette tokens, defined here (not resolveTokens) because they are
|
|
228
709
|
the WIDGET's meanings, not an org's brand: premium gold, environment
|
|
229
710
|
warning, danger, success. Hosts can still override them with CSS. */
|
|
@@ -281,7 +762,15 @@
|
|
|
281
762
|
|
|
282
763
|
/* body */
|
|
283
764
|
.sl-body{display:flex;flex:1;min-height:0}
|
|
284
|
-
.sl-map{position:relative;flex:1;min-width:0}
|
|
765
|
+
.sl-map{position:relative;flex:1;min-width:0;color:var(--sl-text)}
|
|
766
|
+
/* THE MAP SUBTREE OWNS ITS OWN INK. Custom properties are re-tokened on this
|
|
767
|
+
element (applyMapChromeTokens) whenever the map ground and the picker ground
|
|
768
|
+
disagree - a light host theme over a dark chart, or the reverse. But colour
|
|
769
|
+
is inherited, so any docked control that never set one kept the PICKER's ink
|
|
770
|
+
while sitting on the MAP's surface: on a white map theme the locator bar's
|
|
771
|
+
section name came out at 1.13:1, i.e. invisible (owner pass 2026-08-27).
|
|
772
|
+
Setting it here fixes the whole class at once; anything with its own colour
|
|
773
|
+
still wins. */
|
|
285
774
|
.sl-map-host{position:absolute;inset:0}
|
|
286
775
|
.sl-side{width:300px;flex:none;border-left:1px solid var(--sl-line);display:flex;flex-direction:column;min-height:0;overflow:hidden}
|
|
287
776
|
/* Wide-layout panel collapse: THE CHART IS THE PRODUCT, and a fixed 300px
|
|
@@ -318,36 +807,41 @@
|
|
|
318
807
|
most buyers are) still under the home indicator. Padding the container covers
|
|
319
808
|
both states with one rule, and each height below grows by the same amount so
|
|
320
809
|
no content box shrinks. */
|
|
810
|
+
/* THE SHEET IS AS TALL AS ITS TICKETS, NO TALLER (owner call 2026-08-27). It
|
|
811
|
+
used to be a FIXED height, so a buyer holding ONE ticket lost 50-60% of the
|
|
812
|
+
phone to a mostly-empty panel. The height is now the content's own
|
|
813
|
+
(height:auto on a flex:none item), and every rule below caps it with
|
|
814
|
+
max-height instead \u2014 so the sheet grows ticket by ticket up to exactly the
|
|
815
|
+
same ceiling it used to start at, and only then does the tray scroll.
|
|
816
|
+
max-height also keeps the .3s open/close feel: the sheet is clamped by the
|
|
817
|
+
animating ceiling on the way up and released by it on the way down, which
|
|
818
|
+
height:auto alone could never transition. */
|
|
321
819
|
.sl-picker[data-layout="narrow"] .sl-side{width:100%;border-left:0;border-top:1px solid var(--sl-line);
|
|
322
|
-
flex:none;height:calc(min(72%,480px) + var(--sl-safe-b));padding-bottom:var(--sl-safe-b);
|
|
323
|
-
overflow:hidden;transition:height .3s cubic-bezier(.2,.8,.2,1);overscroll-behavior:contain}
|
|
324
|
-
.sl-picker[data-layout="narrow"][data-sheet="open"][data-has-selection="false"] .sl-side{height:calc(min(380px,64%) + var(--sl-safe-b))}
|
|
820
|
+
flex:none;height:auto;max-height:calc(min(72%,480px) + var(--sl-safe-b));padding-bottom:var(--sl-safe-b);
|
|
821
|
+
overflow:hidden;transition:max-height .3s cubic-bezier(.2,.8,.2,1);overscroll-behavior:contain}
|
|
822
|
+
.sl-picker[data-layout="narrow"][data-sheet="open"][data-has-selection="false"] .sl-side{max-height:calc(min(380px,64%) + var(--sl-safe-b))}
|
|
325
823
|
/* With the price list expanded the sheet takes the with-selection height so
|
|
326
824
|
the tray (cart + best-seats) is never crushed under the fixed-size list. */
|
|
327
|
-
.sl-picker[data-layout="narrow"][data-sheet="open"][data-prices-open="true"] .sl-side{height:calc(min(480px,74%) + var(--sl-safe-b))}
|
|
825
|
+
.sl-picker[data-layout="narrow"][data-sheet="open"][data-prices-open="true"] .sl-side{max-height:calc(min(480px,74%) + var(--sl-safe-b))}
|
|
328
826
|
/* SLIM CHROME (owner call 2026-08-19): the peek is ONE 50px row. The grab
|
|
329
827
|
handle no longer owns a row of its own \u2014 it is a 3px bar painted at the
|
|
330
828
|
top of the same head, and the pills inside are 34px, so the whole thing
|
|
331
829
|
still clears the 44px touch floor while giving the map 26px back. */
|
|
332
|
-
.sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-side{height:calc(50px + var(--sl-safe-b));overflow:hidden}
|
|
830
|
+
.sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-side{max-height:calc(50px + var(--sl-safe-b));overflow:hidden}
|
|
333
831
|
.sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-side > :not(.sl-sheet-head){display:none}
|
|
334
|
-
|
|
832
|
+
/* flex:1 is 1 1 0%, and a ZERO basis makes the tray contribute nothing to the
|
|
833
|
+
sheet's content height \u2014 the sheet would collapse to its chrome no matter
|
|
834
|
+
how many tickets were in the cart. An auto basis is what lets the cart push
|
|
835
|
+
the sheet taller; grow/shrink stay 1 so the tray is still the one child that
|
|
836
|
+
gives way when the cap is reached, down to its 96px floor. */
|
|
837
|
+
.sl-picker[data-layout="narrow"] .sl-tray{flex:1 1 auto;min-height:96px;overflow-y:auto;overscroll-behavior:contain}
|
|
335
838
|
.sl-picker[data-layout="narrow"][data-prices-open="true"] .sl-tray{min-height:48px}
|
|
336
839
|
.sl-picker[data-layout="narrow"] .sl-prices{max-height:150px;overflow-y:auto;overscroll-behavior:contain}
|
|
337
840
|
.sl-picker[data-layout="narrow"] .sl-foot{position:static;background:var(--sl-bg)}
|
|
338
|
-
/* NARROW FOOT SAYS EVERYTHING ONCE
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
total row hides, the secured note collapses to one compact line, and the
|
|
342
|
-
badge tucks in. The tray gets the pixels; a thin scrollbar shows there is
|
|
343
|
-
more to scroll. */
|
|
841
|
+
/* NARROW FOOT SAYS EVERYTHING ONCE: the sheet head carries the count and total
|
|
842
|
+
and the header pill ticks the clock, so the total row goes. The rest of the
|
|
843
|
+
phone foot \u2014 padding, the secured caption, the by-line \u2014 is in TRAY_CSS. */
|
|
344
844
|
.sl-picker[data-layout="narrow"] .sl-total{display:none}
|
|
345
|
-
.sl-picker[data-layout="narrow"] .sl-foot{padding:8px 12px 8px}
|
|
346
|
-
.sl-picker[data-layout="narrow"] .sl-hold-note{margin-bottom:6px;padding:5px 9px}
|
|
347
|
-
.sl-picker[data-layout="narrow"] .sl-hold-note svg{display:none}
|
|
348
|
-
.sl-picker[data-layout="narrow"] .sl-hold-note b{display:inline;margin-right:6px;font-size:11px}
|
|
349
|
-
.sl-picker[data-layout="narrow"] .sl-hold-copy{display:inline;white-space:normal;font-size:10.5px}
|
|
350
|
-
.sl-picker[data-layout="narrow"] .sl-powered{margin-top:4px;padding:2px 8px;font-size:11px}
|
|
351
845
|
.sl-picker[data-layout="narrow"] .sl-tray{scrollbar-width:thin}
|
|
352
846
|
.sl-picker[data-layout="narrow"] .sl-foot.empty{display:none}
|
|
353
847
|
.sl-picker[data-layout="narrow"] .sl-sheet-head{order:0}
|
|
@@ -430,7 +924,7 @@
|
|
|
430
924
|
scroll-snap-align:start;transition:border-color .15s,background .15s}
|
|
431
925
|
.sl-rc::before{content:'';position:absolute;top:50%;left:0;right:0;height:44px;transform:translateY(-50%)}
|
|
432
926
|
.sl-rc:hover,.sl-rc:focus-visible{border-color:var(--sl-muted)}
|
|
433
|
-
.sl-rc-dot{width:7px;height:7px;border-radius:50%;flex:none}
|
|
927
|
+
.sl-rc-dot{width:7px;height:7px;border-radius:50%;flex:none;background:var(--sl-cat-dot,var(--sl-accent))}
|
|
434
928
|
/* On the filled (pinned) chip the dot would vanish into an accent of the
|
|
435
929
|
same hue \u2014 ring it in ink so the colour key survives the highlight. */
|
|
436
930
|
.sl-rc[aria-pressed="true"] .sl-rc-dot{box-shadow:0 0 0 1.5px var(--sl-accent-ink)}
|
|
@@ -523,8 +1017,47 @@
|
|
|
523
1017
|
border-right:2px solid var(--sl-muted);border-bottom:2px solid var(--sl-muted);
|
|
524
1018
|
transform:rotate(45deg);transition:transform .2s cubic-bezier(.2,.8,.2,1)}
|
|
525
1019
|
.sl-picker[data-layout="narrow"][data-prices-open="true"] .sl-prices-sec::after{transform:rotate(-135deg)}
|
|
1020
|
+
/* THE \u267F CONTROL AND ITS MENU.
|
|
1021
|
+
Bottom-left, above the dock bar with the other corner controls, and opening
|
|
1022
|
+
UPWARD because below it there is only the dock. */
|
|
1023
|
+
.sl-a11y{position:relative}
|
|
1024
|
+
.sl-a11ybtn{width:36px;height:36px;border-radius:999px;display:grid;place-items:center;
|
|
1025
|
+
background:var(--sl-surface);border:1px solid var(--sl-line);color:var(--sl-text);
|
|
1026
|
+
font-size:17px;line-height:1;cursor:pointer;box-shadow:0 8px 20px -12px rgba(0,0,0,.5)}
|
|
1027
|
+
.sl-a11ybtn:hover{border-color:var(--sl-muted)}
|
|
1028
|
+
.sl-a11ybtn:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
|
|
1029
|
+
.sl-picker[data-layout="narrow"] .sl-a11ybtn{width:44px;height:44px;font-size:19px}
|
|
1030
|
+
.sl-a11ymenu{position:absolute;bottom:calc(100% + 8px);left:0;z-index:8;
|
|
1031
|
+
min-width:236px;max-width:min(300px,calc(100vw - 32px));padding:4px;
|
|
1032
|
+
border:1px solid var(--sl-line);border-radius:12px;background:var(--sl-surface);
|
|
1033
|
+
color:var(--sl-text);box-shadow:0 24px 48px -24px rgba(0,0,0,.65)}
|
|
1034
|
+
.sl-a11ymenu[hidden]{display:none}
|
|
1035
|
+
.sl-a11yrow{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;
|
|
1036
|
+
padding:6px 8px;border:0;border-radius:9px;background:transparent;color:inherit;
|
|
1037
|
+
font:inherit;font-size:12.5px;text-align:start;cursor:pointer}
|
|
1038
|
+
.sl-a11yrow:hover{background:color-mix(in srgb,var(--sl-muted) 12%,transparent)}
|
|
1039
|
+
.sl-a11yrow:focus-visible{outline:2px solid var(--sl-accent);outline-offset:-2px}
|
|
1040
|
+
.sl-a11yrow-i{flex:none;width:20px;text-align:center;font-size:14px}
|
|
1041
|
+
.sl-a11yrow-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
|
|
1042
|
+
.sl-a11yrow-l{font-weight:700;line-height:1.25}
|
|
1043
|
+
.sl-a11yrow-n{font-size:10.5px;font-weight:600;color:var(--sl-muted);line-height:1.3}
|
|
1044
|
+
/* The switch: a track that fills with the accent and a knob that slides. It is
|
|
1045
|
+
drawn rather than a checkbox so it reads identically on both themes. */
|
|
1046
|
+
.sl-a11yrow-s{flex:none;position:relative;width:34px;height:20px;border-radius:999px;
|
|
1047
|
+
background:color-mix(in srgb,var(--sl-muted) 32%,transparent);transition:background 140ms ease}
|
|
1048
|
+
.sl-a11yrow-s::after{content:"";position:absolute;top:2px;inset-inline-start:2px;
|
|
1049
|
+
width:16px;height:16px;border-radius:50%;background:var(--sl-surface);
|
|
1050
|
+
box-shadow:0 1px 3px rgba(0,0,0,.35);transition:transform 140ms ease}
|
|
1051
|
+
.sl-a11yrow.on .sl-a11yrow-s{background:var(--sl-accent)}
|
|
1052
|
+
.sl-a11yrow.on .sl-a11yrow-s::after{transform:translateX(14px)}
|
|
1053
|
+
@media (prefers-reduced-motion:reduce){
|
|
1054
|
+
.sl-a11yrow-s,.sl-a11yrow-s::after{transition:none}
|
|
1055
|
+
}
|
|
526
1056
|
.sl-cbbtn{width:32px;height:32px;border-radius:999px;background:var(--sl-surface);border:1px solid var(--sl-line);
|
|
527
1057
|
color:var(--sl-text);display:flex;align-items:center;justify-content:center;transition:border-color .15s}
|
|
1058
|
+
/* The class moved onto a menu row; the old 32px pill geometry must not follow
|
|
1059
|
+
it there. Any host still styling .sl-cbbtn keeps working on the row. */
|
|
1060
|
+
.sl-a11yrow.sl-cbbtn{width:100%;height:auto;border-radius:9px;border:0;background:transparent}
|
|
528
1061
|
.sl-cbbtn:hover{border-color:var(--sl-muted)}
|
|
529
1062
|
.sl-cbbtn svg{width:14px;height:14px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
|
|
530
1063
|
|
|
@@ -569,7 +1102,7 @@
|
|
|
569
1102
|
.sl-price-row.sl-active{background:color-mix(in srgb,var(--sl-accent) 9%,transparent)}
|
|
570
1103
|
.sl-price-was{margin-left:auto;color:var(--sl-muted);font-size:10px;text-decoration:line-through}.sl-price-offer{display:block;color:var(--sl-accent-text);font-size:10px;font-weight:750}
|
|
571
1104
|
.sl-price-row.sl-active .sl-price-label{color:var(--sl-accent-text)}
|
|
572
|
-
.sl-dot{width:9px;height:9px;border-radius:50%;flex:none}
|
|
1105
|
+
.sl-dot{width:9px;height:9px;border-radius:50%;flex:none;background:var(--sl-cat-dot,var(--sl-accent))}
|
|
573
1106
|
.sl-price-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
|
|
574
1107
|
.sl-price-left{font-size:11px;color:var(--sl-muted);font-variant-numeric:tabular-nums}
|
|
575
1108
|
.sl-price-amt{font-weight:800;font-variant-numeric:tabular-nums}
|
|
@@ -584,8 +1117,15 @@
|
|
|
584
1117
|
.sl-status-icon{width:13px;height:13px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;
|
|
585
1118
|
color:#fff;background:#6b7280;line-height:1}
|
|
586
1119
|
.sl-status-icon svg{width:8px;height:8px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
|
|
587
|
-
|
|
588
|
-
.
|
|
1120
|
+
/* These two swatches must be the SAME MARKS the map paints, or the key teaches
|
|
1121
|
+
a language the canvas does not speak. Held wears the dashed ring at full
|
|
1122
|
+
size; sold is plain and smaller (0.85x, matching SOLD_SEAT_SCALE). An
|
|
1123
|
+
an outline rather than a border, so the dash sits outside the disc and the
|
|
1124
|
+
swatch keeps its size - and the text token, so the ring flips with the theme
|
|
1125
|
+
exactly as the map's ring ink does. */
|
|
1126
|
+
.sl-status-icon.held{outline:1px dashed var(--sl-text);outline-offset:1px}
|
|
1127
|
+
.sl-status-icon.sold{width:11px;height:11px;background:#8b93a0;outline:none}
|
|
1128
|
+
.sl-status-icon.sold svg{width:8px;height:8px;stroke-width:2.4}
|
|
589
1129
|
|
|
590
1130
|
/* tray */
|
|
591
1131
|
.sl-seats-sec{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:13px}
|
|
@@ -598,7 +1138,10 @@
|
|
|
598
1138
|
background:var(--sl-surface);font-size:13px;transform-origin:center;transition:border-color .15s,background .15s}
|
|
599
1139
|
.sl-chip:hover{border-color:color-mix(in srgb,var(--sl-accent) 38%,var(--sl-line))}
|
|
600
1140
|
.sl-chip.sl-enter{animation:slChipIn .38s cubic-bezier(.2,.8,.2,1) both}
|
|
601
|
-
.sl-
|
|
1141
|
+
/* The collapse is the shared moment (.sl-mo-collapse); this rule only owns
|
|
1142
|
+
the "it can no longer be tapped" half. One class per idea, and the timing
|
|
1143
|
+
comes from the vocabulary rather than from a literal .16s ease-in. */
|
|
1144
|
+
.sl-chip.sl-leave{pointer-events:none}
|
|
602
1145
|
.sl-chip.sl-held{border-color:var(--sl-line);background:color-mix(in srgb,var(--sl-accent) 7%,var(--sl-surface));
|
|
603
1146
|
box-shadow:inset 3px 0 0 color-mix(in srgb,var(--sl-accent) 72%,transparent)}
|
|
604
1147
|
.sl-ticket-state{width:17px;height:17px;border-radius:999px;flex:none;display:flex;align-items:center;justify-content:center;
|
|
@@ -616,6 +1159,11 @@
|
|
|
616
1159
|
.sl-chip-when{font-size:10.5px;font-weight:750;color:var(--sl-accent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
617
1160
|
.sl-chip-id .val{display:block;font-weight:600;font-size:13px;line-height:1.25;white-space:nowrap}
|
|
618
1161
|
.sl-chip-id .fld.sec .val{overflow:hidden;text-overflow:ellipsis}
|
|
1162
|
+
.sl-chip-dates{margin-top:2px;padding-top:6px;border-top:1px solid var(--sl-line);display:grid;gap:5px}
|
|
1163
|
+
.sl-chip-dates-summary{font-size:10.5px;line-height:1.35;color:var(--sl-muted)}
|
|
1164
|
+
.sl-chip-date-list{display:flex;flex-wrap:wrap;gap:4px}
|
|
1165
|
+
.sl-chip-date{padding:3px 6px;border-radius:999px;background:color-mix(in srgb,var(--sl-accent) 13%,var(--sl-surface));
|
|
1166
|
+
color:var(--sl-accent-text);font-size:10.5px;font-weight:700;line-height:1.25;white-space:nowrap}
|
|
619
1167
|
.sl-chip-sub{display:flex;align-items:center;gap:6px;min-width:0}
|
|
620
1168
|
.sl-chip .cat{color:var(--sl-muted);font-size:10.5px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
621
1169
|
.sl-chip .amt{font-weight:700;font-variant-numeric:tabular-nums;flex:none;white-space:nowrap}
|
|
@@ -657,16 +1205,19 @@
|
|
|
657
1205
|
.sl-ga-pop,.sl-ga-sheet{background:var(--sl-surface);color:var(--sl-text);border:1px solid var(--sl-line);
|
|
658
1206
|
box-shadow:0 28px 70px rgba(0,0,0,.42)}
|
|
659
1207
|
.sl-ga-pop{position:absolute;width:272px;border-radius:calc(var(--sl-radius) * 1.05);pointer-events:auto;
|
|
660
|
-
transform-origin:var(--sl-ga-arrow-x,50%) 100%;
|
|
1208
|
+
transform-origin:var(--sl-ga-arrow-x,50%) 100%;
|
|
1209
|
+
/* The shared anchored entrance, spent through the shared tokens. This used
|
|
1210
|
+
to be its own .16s spring \u2014 a fourth curve on a widget that only needs
|
|
1211
|
+
three, and one the buyer met right next to the confirm card's. */
|
|
1212
|
+
animation:slMoIn var(--sl-dur-enter) var(--sl-ease-enter) both}
|
|
661
1213
|
.sl-ga-pop[data-side="below"]{transform-origin:var(--sl-ga-arrow-x,50%) 0}
|
|
662
1214
|
.sl-ga-pop::after{content:"";position:absolute;left:var(--sl-ga-arrow-x,50%);width:11px;height:11px;margin-left:-6px;
|
|
663
1215
|
background:var(--sl-surface);border:1px solid var(--sl-line);transform:rotate(45deg)}
|
|
664
1216
|
.sl-ga-pop[data-side="above"]::after{bottom:-6px;border-width:0 1px 1px 0}
|
|
665
1217
|
.sl-ga-pop[data-side="below"]::after{top:-6px;border-width:1px 0 0 1px}
|
|
666
1218
|
.sl-ga-sheet{width:100%;max-height:min(80%,640px);overflow:auto;border-radius:18px 18px 0 0;border-width:1px 0 0;
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
@keyframes sl-ga-rise{from{transform:translateY(14px)}to{transform:translateY(0)}}
|
|
1219
|
+
/* A sheet opening is the buyer's own action landing: the spring token. */
|
|
1220
|
+
animation:slMoSpring var(--sl-dur-spring) var(--sl-ease-spring) both}
|
|
670
1221
|
.sl-ga-pop-layer[data-motion="reduced"] .sl-ga-pop,.sl-ga-scrim[data-motion="reduced"] .sl-ga-sheet{animation:none}
|
|
671
1222
|
@media (prefers-reduced-motion:reduce){.sl-ga-pop,.sl-ga-sheet{animation:none}}
|
|
672
1223
|
/* The close button is inset-inline-end, so the head reserves that side in the
|
|
@@ -762,6 +1313,9 @@
|
|
|
762
1313
|
two controls free-float on top of each other. Regions never overlap: the top
|
|
763
1314
|
strip splits into left/center/right; rails + corners own their edge. */
|
|
764
1315
|
.sl-anchor{position:absolute;z-index:5;display:flex;align-items:center;gap:8px;pointer-events:none}
|
|
1316
|
+
/* The top-right region ends where the side panel's chevron begins: without a
|
|
1317
|
+
gap the Map/3D pill sits flush against it and reads as one control. */
|
|
1318
|
+
.sl-anchor[data-region="top-right"]{padding-right:8px}
|
|
765
1319
|
.sl-anchor > *{pointer-events:auto}
|
|
766
1320
|
.sl-anchor[data-region="top-left"]{top:12px;left:12px;flex-wrap:wrap;max-width:38%}
|
|
767
1321
|
.sl-anchor[data-region="top-center"]{top:12px;left:50%;transform:translateX(-50%);flex-direction:column;
|
|
@@ -826,12 +1380,19 @@
|
|
|
826
1380
|
.sl-picker[data-layout="narrow"] .sl-close{width:26px;height:26px}
|
|
827
1381
|
.sl-picker[data-layout="narrow"] .sl-close svg{width:12px;height:12px}
|
|
828
1382
|
/* ON-MAP CONTROLS SHARE ONE SIZE ON A PHONE: 36px round (zoom column, minimap
|
|
829
|
-
toggle
|
|
830
|
-
|
|
831
|
-
|
|
1383
|
+
toggle), 28px pills for level/mode groups. Every one of them sits over seats,
|
|
1384
|
+
so the smaller they read the more map survives; the 44px coarse-pointer floor
|
|
1385
|
+
still applies through the ::after targets below.
|
|
1386
|
+
|
|
1387
|
+
THE COLOUR-BLIND CONTROL IS NO LONGER ONE OF THEM. It is a row inside the
|
|
1388
|
+
accessibility menu, and this phone rule outranked the row geometry
|
|
1389
|
+
(.sl-a11yrow.sl-cbbtn) because the layout attribute adds specificity: the
|
|
1390
|
+
row computed to 36px inside a 236px menu, putting the glyph outside the
|
|
1391
|
+
popover and collapsing its label to nothing. Nothing on the map wears
|
|
1392
|
+
.sl-cbbtn any more, so the rule is gone rather than re-scoped to a stack it
|
|
1393
|
+
has left. */
|
|
832
1394
|
.sl-picker[data-layout="narrow"] .sl-minimap-toggle{width:36px;height:36px;border-radius:999px}
|
|
833
1395
|
.sl-picker[data-layout="narrow"] .sl-minimap-toggle svg{width:16px;height:16px}
|
|
834
|
-
.sl-picker[data-layout="narrow"] .sl-cbbtn{width:36px;height:36px}
|
|
835
1396
|
/* One control size on phones \u2014 match the 36px round rhythm the rest of the
|
|
836
1397
|
zoom column uses, but keep width for the language name to be readable. */
|
|
837
1398
|
.sl-picker[data-layout="narrow"] .sl-langsel{height:36px;max-width:112px;font-size:11.5px}
|
|
@@ -852,11 +1413,62 @@
|
|
|
852
1413
|
.sl-toast[data-tone="warning"]{border-color:var(--sl-accent)}
|
|
853
1414
|
.sl-toast[data-tone="success"]{border-color:var(--sl-success)}
|
|
854
1415
|
.sl-toast.on[data-tone="error"]{animation:slToastNudge .32s ease-out}
|
|
855
|
-
.
|
|
856
|
-
|
|
1416
|
+
/* THE LOADING STATE IS A VENUE, NOT A WORD.
|
|
1417
|
+
|
|
1418
|
+
A spinner over "Loading seat map..." said only that the buyer was waiting.
|
|
1419
|
+
A faint silhouette of concentric shells around a stage says what is coming
|
|
1420
|
+
and roughly where its parts will be, so the real chart reads as an arrival
|
|
1421
|
+
rather than a replacement. The sentence stays for screen readers, which get
|
|
1422
|
+
nothing from scenery. */
|
|
1423
|
+
.sl-boot{position:absolute;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;
|
|
1424
|
+
background:var(--sl-bg);transition:opacity 180ms ease}
|
|
1425
|
+
.sl-boot.is-going{opacity:0}
|
|
1426
|
+
.sl-boot-venue{width:min(78%,420px);max-height:72%;overflow:visible;
|
|
1427
|
+
-webkit-mask-image:linear-gradient(105deg,#000 32%,rgba(0,0,0,.45) 50%,#000 68%);
|
|
1428
|
+
mask-image:linear-gradient(105deg,#000 32%,rgba(0,0,0,.45) 50%,#000 68%);
|
|
1429
|
+
-webkit-mask-size:260% 100%;mask-size:260% 100%;
|
|
1430
|
+
animation:slBootSweep 1.6s ease-in-out infinite}
|
|
1431
|
+
.sl-boot-shells path,.sl-boot-stage{fill:color-mix(in srgb,var(--sl-accent) 12%,transparent)}
|
|
1432
|
+
.sl-boot-stage{fill:color-mix(in srgb,var(--sl-accent) 20%,transparent)}
|
|
1433
|
+
@keyframes slBootSweep{from{-webkit-mask-position:160% 0;mask-position:160% 0}
|
|
1434
|
+
to{-webkit-mask-position:-60% 0;mask-position:-60% 0}}
|
|
1435
|
+
/* The 2px line under the header: indeterminate on purpose. Nothing here knows
|
|
1436
|
+
what fraction of a chart has arrived, and a fake percentage is a lie the
|
|
1437
|
+
buyer can time. */
|
|
1438
|
+
.sl-boot-bar{position:absolute;top:0;left:0;right:0;height:2px;overflow:hidden;
|
|
1439
|
+
background:color-mix(in srgb,var(--sl-accent) 12%,transparent)}
|
|
1440
|
+
.sl-boot-bar::after{content:"";position:absolute;top:0;bottom:0;width:38%;
|
|
1441
|
+
background:var(--sl-accent);animation:slBootBar 1.6s ease-in-out infinite}
|
|
1442
|
+
@keyframes slBootBar{from{inset-inline-start:-40%}to{inset-inline-start:100%}}
|
|
1443
|
+
/* The sentence the silhouette replaced: still said, just not shown. */
|
|
1444
|
+
.sl-boot-say{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
|
|
1445
|
+
clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
|
|
1446
|
+
/* One sweep across the REAL shells as they land, then it removes itself. */
|
|
1447
|
+
.sl-shells-in{position:absolute;inset:0;z-index:5;pointer-events:none;
|
|
1448
|
+
background:linear-gradient(105deg,transparent 34%,color-mix(in srgb,var(--sl-accent) 14%,transparent) 50%,transparent 66%);
|
|
1449
|
+
background-size:260% 100%;animation:slShellSweep 600ms ease-out 1}
|
|
1450
|
+
@keyframes slShellSweep{from{background-position:160% 0}to{background-position:-60% 0}}
|
|
1451
|
+
/* Price chips arrive in order, then the sheet's peek bar comes up last. */
|
|
1452
|
+
.sl-rail.is-in .sl-rc{animation:slRailIn 200ms ease-out both}
|
|
1453
|
+
.sl-rail.is-in .sl-rc:nth-child(2){animation-delay:40ms}
|
|
1454
|
+
.sl-rail.is-in .sl-rc:nth-child(3){animation-delay:80ms}
|
|
1455
|
+
.sl-rail.is-in .sl-rc:nth-child(4){animation-delay:120ms}
|
|
1456
|
+
.sl-rail.is-in .sl-rc:nth-child(n+5){animation-delay:160ms}
|
|
1457
|
+
@keyframes slRailIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
|
|
1458
|
+
.sl-picker.is-arriving .sl-sheet-head{animation:slPeekIn 240ms ease-out both;animation-delay:200ms}
|
|
1459
|
+
@keyframes slPeekIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
|
|
1460
|
+
@media(prefers-reduced-motion:reduce){
|
|
1461
|
+
.sl-boot,.sl-boot-venue,.sl-boot-bar::after,.sl-shells-in,
|
|
1462
|
+
.sl-rail.is-in .sl-rc,.sl-picker.is-arriving .sl-sheet-head{animation:none;transition:none}
|
|
1463
|
+
.sl-boot-venue{-webkit-mask-image:none;mask-image:none}
|
|
1464
|
+
}
|
|
857
1465
|
.sl-boot-spin{width:24px;height:24px;border-radius:50%;border:3px solid var(--sl-line);border-top-color:var(--sl-accent);
|
|
858
1466
|
animation:slspin .8s linear infinite}
|
|
859
1467
|
@keyframes slspin{to{transform:rotate(360deg)}}
|
|
1468
|
+
/* The failure state replaces the silhouette with words, so it takes the
|
|
1469
|
+
column layout the boot element no longer has by default. */
|
|
1470
|
+
.sl-boot:has(.sl-boot-title){flex-direction:column;gap:10px;
|
|
1471
|
+
font-size:13px;font-weight:600;color:var(--sl-muted)}
|
|
860
1472
|
.sl-boot-title{font-weight:800;font-size:15px;color:var(--sl-text)}
|
|
861
1473
|
.sl-boot-retry{margin-top:4px;padding:9px 20px;border-radius:var(--sl-r-sm);background:var(--sl-accent);
|
|
862
1474
|
color:var(--sl-accent-ink);font-weight:700;font-size:13px}
|
|
@@ -897,9 +1509,13 @@
|
|
|
897
1509
|
.sl-picker[data-confirming="true"] .sl-side{pointer-events:none;opacity:.58;transition:opacity .16s}
|
|
898
1510
|
.sl-confirm{position:absolute;z-index:10;width:276px;max-width:calc(100% - 24px);overflow:hidden;pointer-events:auto;
|
|
899
1511
|
background:var(--sl-surface);border:1px solid color-mix(in srgb,var(--sl-line) 70%,var(--sl-text));
|
|
900
|
-
border-radius:15px;box-shadow:0 24px 64px -18px rgba(0,0,0,.72);transform:translate(-50%,calc(-100% - 16px))
|
|
901
|
-
|
|
902
|
-
|
|
1512
|
+
border-radius:15px;box-shadow:0 24px 64px -18px rgba(0,0,0,.72);transform:translate(-50%,calc(-100% - 16px))}
|
|
1513
|
+
/* Entrance and exit are the shared anchored moments (.sl-mo-in/.sl-mo-out),
|
|
1514
|
+
which animate scale+translate and therefore leave this placement transform
|
|
1515
|
+
alone. The card had two private keyframes here; they differed from the
|
|
1516
|
+
vocabulary only in being 240ms instead of 260, and one of them was silently
|
|
1517
|
+
beating the exit the widget had asked for. */
|
|
1518
|
+
.sl-confirm[data-placement="below"]{transform:translate(-50%,16px)}
|
|
903
1519
|
.sl-confirm-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(52px,auto) minmax(52px,auto);border-bottom:1px solid var(--sl-line)}
|
|
904
1520
|
.sl-confirm-field{min-width:0;padding:12px 11px 10px;border-right:1px solid var(--sl-line)}
|
|
905
1521
|
.sl-confirm-field:last-child{border-right:0;text-align:center}
|
|
@@ -916,6 +1532,14 @@
|
|
|
916
1532
|
.sl-confirm-cat .sl-dot{border:2px solid color-mix(in srgb,var(--sl-cat-ink) 78%,transparent);width:11px;height:11px}
|
|
917
1533
|
.sl-confirm-cat-name{font-size:13.5px;font-weight:800;color:var(--sl-cat-ink);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
918
1534
|
.sl-confirm-price{font-size:17px;font-weight:850;color:var(--sl-cat-ink);font-variant-numeric:tabular-nums}
|
|
1535
|
+
/* The PHONE's identity line and the strip wrapper are in every card's DOM and
|
|
1536
|
+
invisible at desktop width. Desktop keeps the eyebrow grid and the colour
|
|
1537
|
+
band it has the room for (owner call 2026-08-27); display:contents leaves
|
|
1538
|
+
the thumb block laid out in the body exactly where it has always been, so
|
|
1539
|
+
the desktop card is byte-for-byte the card it was. */
|
|
1540
|
+
.sl-confirm-id{display:none}
|
|
1541
|
+
.sl-confirm-strip{display:contents}
|
|
1542
|
+
.sl-confirm-pills{display:none}
|
|
919
1543
|
.sl-confirm-body{padding:11px 12px 12px}
|
|
920
1544
|
.sl-confirm-tiers{display:grid;gap:6px;margin:0 0 9px;padding:0;border:0}
|
|
921
1545
|
.sl-confirm-tiers legend{margin:0 0 6px;padding:0;color:var(--sl-muted);font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
|
|
@@ -937,20 +1561,100 @@
|
|
|
937
1561
|
.sl-confirm-cancel:hover{color:var(--sl-text)}
|
|
938
1562
|
.sl-picker[data-layout="narrow"] .sl-confirm{left:50%!important;top:auto!important;bottom:14px;width:min(310px,calc(100% - 24px));
|
|
939
1563
|
transform:translateX(-50%);animation:slConfirmMobileIn .24s cubic-bezier(.2,.8,.2,1) both}
|
|
940
|
-
/*
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
.
|
|
946
|
-
|
|
947
|
-
.
|
|
948
|
-
|
|
1564
|
+
/* THE PHONE CARD. 310\xD7263 spent on five short facts: a SECTION | ROW | SEAT
|
|
1565
|
+
eyebrow grid whose keys explained what a seat number looks like, a colour
|
|
1566
|
+
band that said the section again in different words, then a bordered
|
|
1567
|
+
thumbnail, a "View from here" button under it and a cream "See it in 3D"
|
|
1568
|
+
button under that \u2014 three stacked blocks for one image and two actions \u2014
|
|
1569
|
+
before the two buttons that commit. On a phone that is most of the map.
|
|
1570
|
+
|
|
1571
|
+
Same DOM, different half of it. The eyebrow grid and the colour band go; the
|
|
1572
|
+
one-line identity appears; the photo goes full-bleed with the ways of LOOKING
|
|
1573
|
+
at the seat overlaid as pills, which is where a photo has always carried its
|
|
1574
|
+
own controls. 263px \u2192 164px with a photo, 247px \u2192 144px without. Desktop is
|
|
1575
|
+
untouched \u2014 it has the room and the grid reads well there. */
|
|
1576
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-grid,
|
|
1577
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-cat{display:none}
|
|
1578
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-id{display:flex;align-items:center;gap:7px;padding:10px 10px 0;min-height:28px}
|
|
1579
|
+
.sl-confirm-dot{flex:none;width:10px;height:10px;border-radius:50%;
|
|
1580
|
+
box-shadow:0 0 0 2px color-mix(in srgb,var(--sl-surface) 70%,transparent),0 0 0 3px color-mix(in srgb,var(--sl-line) 80%,transparent)}
|
|
1581
|
+
.sl-confirm-who{flex:1;min-width:0;overflow:hidden;display:flex;align-items:baseline;font-size:14px;font-weight:600;
|
|
1582
|
+
line-height:1.25;color:var(--sl-text);white-space:nowrap}
|
|
1583
|
+
/* WHAT GIVES GROUND, and it is not the venue's name. "Upper Grand Circle
|
|
1584
|
+
Balcony Left Wing \xB7 Row A \xB7 Seat 1" does not fit beside a price at 310px, and
|
|
1585
|
+
letting the only shrinkable item absorb all of it ellipsized the section name
|
|
1586
|
+
to NOTHING \u2014 the card opened with a bare "\xB7 Row A \xB7 Seat 1". So the order is
|
|
1587
|
+
explicit: row, seat and the price never move, because those are what the
|
|
1588
|
+
buyer matches against the seat under their finger and against their wallet;
|
|
1589
|
+
the section name is the one thing that ellipsizes, and only after it has kept
|
|
1590
|
+
a floor wide enough to still read as a name. */
|
|
1591
|
+
.sl-confirm-place{flex:0 1 auto;min-width:5.5em;overflow:hidden;text-overflow:ellipsis}
|
|
1592
|
+
.sl-confirm-pos{flex:none;white-space:pre}
|
|
1593
|
+
.sl-confirm-idprice{flex:none;font-size:15px;font-weight:800;color:var(--sl-text);font-variant-numeric:tabular-nums}
|
|
1594
|
+
.sl-confirm-id .sl-cx-mark{flex:none}
|
|
1595
|
+
/* The strip: full-bleed inside the card radius. A bordered, inset thumbnail
|
|
1596
|
+
read as a widget pasted into the card; the same picture edge to edge reads as
|
|
1597
|
+
the card being about that seat. */
|
|
1598
|
+
/* THE SCRIM IS THE TOKEN HERE, and deliberately not a theme colour.
|
|
1599
|
+
What sits behind these pills is the ORGANIZER'S PHOTOGRAPH, not the widget's
|
|
1600
|
+
surface, so --sl-surface/--sl-text say nothing about whether the label will
|
|
1601
|
+
be readable: a light theme over a night-time auditorium shot would put dark
|
|
1602
|
+
ink on a dark picture. The plate is therefore its own scrim, named once
|
|
1603
|
+
here and spent by every pill below, and it is dark in both themes because a
|
|
1604
|
+
photo can be anything. Measured against the worst case \u2014 a pure white
|
|
1605
|
+
photograph \u2014 the composite is rgb(78,81,87) and white ink on it is 7.5:1.
|
|
1606
|
+
Everything that is NOT over a photo (the identity line, the price, the
|
|
1607
|
+
no-photo rail) uses the theme tokens, which is where they belong. */
|
|
1608
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-strip{position:relative;display:block;margin:0;
|
|
1609
|
+
--sl-pill-plate:rgba(10,14,22,.72);--sl-pill-ink:#fff}
|
|
1610
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-thumbwrap{height:64px;margin:0;border:0;border-radius:0}
|
|
1611
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-pills{position:absolute;right:6px;bottom:6px;display:flex;align-items:center;gap:6px}
|
|
1612
|
+
/* The badge IS the phone's view pill \u2014 the desktop element restyled rather
|
|
1613
|
+
than a second control saying the same thing. With no photo the whole rail is
|
|
1614
|
+
muted and the pills move left, because a right-aligned pair floating on
|
|
1615
|
+
nothing has no anchor. */
|
|
1616
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-thumb-badge,
|
|
1617
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-viewbtn{position:absolute;left:6px;bottom:6px;top:auto;right:auto;
|
|
1618
|
+
width:auto;margin:0;display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:5px 10px;
|
|
1619
|
+
border:1px solid transparent;border-radius:999px;font-size:11px;font-weight:800;
|
|
1620
|
+
color:var(--sl-pill-ink);background:var(--sl-pill-plate);backdrop-filter:blur(3px);white-space:nowrap}
|
|
1621
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-viewbtn{position:relative;left:auto;bottom:auto}
|
|
1622
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)){
|
|
1623
|
+
display:flex;align-items:center;gap:6px;height:44px;padding:0 6px;
|
|
1624
|
+
background:color-mix(in srgb,var(--sl-line) 26%,transparent)}
|
|
1625
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)) .sl-confirm-pills{
|
|
1626
|
+
position:relative;right:auto;bottom:auto}
|
|
1627
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)) .sl-confirm-viewbtn,
|
|
1628
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)) .sl-confirm-pill{
|
|
1629
|
+
color:var(--sl-text)!important;background:var(--sl-surface)!important;border-color:var(--sl-line)!important;backdrop-filter:none}
|
|
1630
|
+
/* One pill shape for the 3D action, carrying its own dark plate so it stays
|
|
1631
|
+
legible over any photograph. */
|
|
1632
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-pills{display:flex}
|
|
1633
|
+
.sl-confirm-pill{display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:5px 10px!important;
|
|
1634
|
+
border:1px solid transparent!important;border-radius:999px!important;font-size:11px;font-weight:800;
|
|
1635
|
+
color:var(--sl-pill-ink,#fff)!important;background:var(--sl-pill-plate,rgba(10,14,22,.72))!important;
|
|
1636
|
+
backdrop-filter:blur(3px);white-space:nowrap}
|
|
1637
|
+
.sl-confirm-pill svg{width:13px;height:13px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
|
|
1638
|
+
/* Distance stays \u2014 it is geometric and defensible \u2014 as a caption beside the
|
|
1639
|
+
pills rather than a line of its own under them. */
|
|
1640
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-sight{position:absolute;right:6px;top:6px;margin:0;
|
|
1641
|
+
font-size:10px;font-weight:700;color:var(--sl-pill-ink);background:var(--sl-pill-plate);border-radius:999px;padding:3px 8px}
|
|
1642
|
+
/* The full-width 3D button is the pill's desktop half; only one of them is
|
|
1643
|
+
ever visible. */
|
|
1644
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-3d{display:none}
|
|
1645
|
+
/* CLEAR AIR ABOVE THE BUTTONS. Hiding the full-width 3D button took its 9px
|
|
1646
|
+
top margin with it, and the photo is now full-bleed \u2014 so the picture ran
|
|
1647
|
+
straight into Cancel/Select with only the body padding between them, and the
|
|
1648
|
+
two committing buttons read as part of the photo block. 12px of body padding
|
|
1649
|
+
restores the separation, and a row that follows tier choices or a caution
|
|
1650
|
+
note keeps its own 10px so the gap never depends on what is above it. The
|
|
1651
|
+
strip carries no margin of its own \u2014 the body's padding IS the gap under the
|
|
1652
|
+
identity line, and having both stacked 20px of air above the photo. */
|
|
1653
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-body{padding:8px 10px 10px}
|
|
949
1654
|
.sl-picker[data-layout="narrow"] .sl-confirm-tier{min-height:38px;padding:7px 9px}
|
|
950
|
-
.sl-picker[data-layout="narrow"] .sl-confirm-
|
|
951
|
-
.sl-picker[data-layout="narrow"] .sl-confirm-
|
|
952
|
-
.sl-picker[data-layout="narrow"] .sl-confirm-row{
|
|
953
|
-
.sl-picker[data-layout="narrow"] .sl-confirm-row button{min-height:42px}
|
|
1655
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-row{margin-top:0}
|
|
1656
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-row:not(:first-child){margin-top:10px}
|
|
1657
|
+
.sl-picker[data-layout="narrow"] .sl-confirm-row button{min-height:44px}
|
|
954
1658
|
|
|
955
1659
|
/* Atomic whole/variable-table chooser. Lives inside the widget so the same
|
|
956
1660
|
accessible dialog works in inline, modal, desktop and 390px mobile hosts. */
|
|
@@ -1121,229 +1825,6 @@
|
|
|
1121
1825
|
/* 28px on a phone \u2014 the same pill height as the level rail (slim chrome). */
|
|
1122
1826
|
.sl-picker[data-layout="narrow"] .sl-projection button{min-width:38px;min-height:28px;padding:4px 8px;font-size:9.5px}
|
|
1123
1827
|
|
|
1124
|
-
/* 3D venue overlay \u2014 mounts over the (paused) Konva stage inside the map host.
|
|
1125
|
-
Carries its own gradient so it paints instantly before the scene builds, and
|
|
1126
|
-
cross-fades on enter/exit via a compositor-only opacity transition. Sits below
|
|
1127
|
-
the anchored chrome (z-index:5) and the confirm card (z-index:10) so the
|
|
1128
|
-
Map|3D toggle and the seat confirm both stay usable over it. */
|
|
1129
|
-
.sl-view3d{position:absolute;inset:0;z-index:4;opacity:0;touch-action:none;
|
|
1130
|
-
transition:opacity .3s ease;background:radial-gradient(120% 120% at 50% 0%,#191f28 0%,#0d1014 70%)}
|
|
1131
|
-
.sl-view3d.has-comparison,.sl-view3d.has-passport{z-index:20}
|
|
1132
|
-
/* Confirm mode normally disables the entire GL sibling. Modal surfaces live
|
|
1133
|
-
inside that sibling, so explicitly restore pointer input only while one is
|
|
1134
|
-
open; their own inert contract keeps the venue underneath unavailable. */
|
|
1135
|
-
.sl-picker[data-confirming="true"] .sl-view3d.has-comparison,
|
|
1136
|
-
.sl-picker[data-confirming="true"] .sl-view3d.has-passport{pointer-events:auto}
|
|
1137
|
-
.sl-view3d canvas{display:block;width:100%;height:100%}
|
|
1138
|
-
.sl-view3d canvas:focus-visible{outline:2px solid var(--sl-accent);outline-offset:-3px}
|
|
1139
|
-
.sl-view3d-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:10px;
|
|
1140
|
-
z-index:1;color:#d9e2f2;font-size:13px;font-weight:700;letter-spacing:.02em;pointer-events:none}
|
|
1141
|
-
.sl-view3d-loading::before{content:"";width:18px;height:18px;border-radius:50%;
|
|
1142
|
-
border:2px solid rgba(217,226,242,.28);border-top-color:#d9e2f2;animation:slSpin .8s linear infinite}
|
|
1143
|
-
[data-view3d=on] .sl-chips,[data-view3d=on] .sl-rungs{display:none}
|
|
1144
|
-
.sl-view3d-back{position:absolute;top:12px;left:12px;z-index:2;display:inline-flex;align-items:center;gap:6px;
|
|
1145
|
-
min-height:44px;padding:7px 13px 7px 9px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.03em;
|
|
1146
|
-
color:#e6edf3;background:rgba(10,14,20,.62);border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(6px)}
|
|
1147
|
-
.sl-view3d-back:hover,.sl-view3d-back:focus-visible{background:rgba(16,22,30,.82);border-color:rgba(255,255,255,.4)}
|
|
1148
|
-
.sl-view3d-back svg{width:15px;height:15px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round;stroke-linejoin:round}
|
|
1149
|
-
/* Map|3D already exits an overview to the 2D map. Reserve Back for the one
|
|
1150
|
-
state where it adds meaning: returning from an exact seat to the venue. */
|
|
1151
|
-
.sl-view3d:not(.is-seat-focused) .sl-view3d-back{display:none}
|
|
1152
|
-
.sl-view3d-fs{position:absolute;top:12px;right:12px;z-index:2;min-width:44px;min-height:44px;padding:8px 12px;
|
|
1153
|
-
border-radius:999px;font-size:16px;color:#e6edf3;background:rgba(10,14,20,.62);
|
|
1154
|
-
border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(6px)}
|
|
1155
|
-
.sl-view3d-fs:hover,.sl-view3d-fs:focus-visible{background:rgba(16,22,30,.82);border-color:rgba(255,255,255,.4)}
|
|
1156
|
-
/* Venue navigation inside 3D: levels (isolate a floor) and areas (fly to a zone).
|
|
1157
|
-
Bottom-LEFT, clear of the module's own chips (Overview bottom-right, 360
|
|
1158
|
-
bottom-centre) and of the bottom-sheeted confirm card. Horizontally scrollable
|
|
1159
|
-
so a venue with many zones never pushes the rail off a phone screen.
|
|
1160
|
-
|
|
1161
|
-
EVERY WIDTH HERE IS RELATIVE TO THE RAIL, NEVER TO THE WINDOW. These three
|
|
1162
|
-
rules used to size off 100vw, which contradicts the one contract this widget
|
|
1163
|
-
states about itself: it adapts to a full-screen takeover, an inline div in a
|
|
1164
|
-
content page, or a popup, and its breakpoints key off the CONTAINER, never the
|
|
1165
|
-
viewport. A 390 px picker embedded in a 1400 px page asked for
|
|
1166
|
-
calc(100vw - 180px) = 1220 inside a 390 px rail.
|
|
1167
|
-
|
|
1168
|
-
MEASURED, IT DID NOT OVERFLOW: the scroll parent is a flex container, so the
|
|
1169
|
-
over-large declaration was shrunk back to the rail and both the old and new
|
|
1170
|
-
rules resolve to 364 px in situ. So this is a latent correctness fix, not a
|
|
1171
|
-
visible bug -- the numbers were wrong and were being covered for by a
|
|
1172
|
-
flex-shrink one level up. Left as 100% because the next person to change that
|
|
1173
|
-
parent's display should not inherit a rule that only works by accident. */
|
|
1174
|
-
.sl-view3d-nav{position:absolute;left:12px;bottom:16px;z-index:3;display:flex;flex-direction:column;gap:6px;
|
|
1175
|
-
max-width:calc(100% - 150px);pointer-events:none}
|
|
1176
|
-
.sl-view3d-nav > div{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;pointer-events:auto;
|
|
1177
|
-
padding:1px;-webkit-overflow-scrolling:touch}
|
|
1178
|
-
.sl-view3d-nav > div::-webkit-scrollbar{display:none}
|
|
1179
|
-
.sl-view3d-nav button{flex:0 0 auto;min-height:32px;padding:7px 12px;border-radius:999px;white-space:nowrap;
|
|
1180
|
-
font-size:11.5px;font-weight:700;color:#c9d4ea;background:rgba(12,18,32,.72);
|
|
1181
|
-
border:1px solid rgba(150,165,205,.35);backdrop-filter:blur(6px);cursor:pointer}
|
|
1182
|
-
.sl-view3d-nav button:hover,.sl-view3d-nav button:focus-visible{color:#eef1f8;border-color:rgba(190,205,240,.6)}
|
|
1183
|
-
.sl-view3d-nav button[aria-pressed="true"]{background:var(--sl-accent);color:var(--sl-accent-ink);border-color:transparent}
|
|
1184
|
-
.sl-view3d-nav button:disabled{opacity:.6;cursor:not-allowed}
|
|
1185
|
-
.sl-view3d-nav-toggle{display:none!important}
|
|
1186
|
-
.sl-view3d-nav select{min-height:38px;max-width:100%;padding:7px 34px 7px 12px;
|
|
1187
|
-
border-radius:999px;font:700 11.5px/1 inherit;color:#eef1f8;background:rgba(12,18,32,.86);
|
|
1188
|
-
border:1px solid rgba(150,165,205,.45);backdrop-filter:blur(6px);cursor:pointer}
|
|
1189
|
-
.sl-view3d-nav select:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
|
|
1190
|
-
/* On phones the library owns the bottom edge for seat/panorama/overview actions.
|
|
1191
|
-
Keep venue navigation in a separate top rail so those control families never
|
|
1192
|
-
stack over one another. */
|
|
1193
|
-
.sl-picker[data-layout="narrow"] .sl-view3d-nav{left:12px;top:12px;bottom:auto;max-width:calc(100% - 132px)}
|
|
1194
|
-
/* The closed toggle is one more 36px pill in the phone's control rhythm, at
|
|
1195
|
-
the top-left corner nothing else owns in 3D (the Back pill takes that spot
|
|
1196
|
-
only at seat-eye, when this rail is hidden). Icon + word, not the word alone. */
|
|
1197
|
-
.sl-picker[data-layout="narrow"] .sl-view3d-nav-toggle{display:inline-flex!important;align-items:center;gap:6px;pointer-events:auto;
|
|
1198
|
-
min-height:36px;padding:0 12px 0 9px;font-size:11.5px}
|
|
1199
|
-
.sl-view3d-nav-toggle svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linejoin:round;flex:none}
|
|
1200
|
-
.sl-picker[data-layout="narrow"] .sl-view3d-nav button:not(.sl-view3d-nav-toggle){min-height:36px}
|
|
1201
|
-
.sl-picker[data-layout="narrow"] .sl-view3d-nav:not(.is-open)>div{display:none!important}
|
|
1202
|
-
.sl-picker[data-layout="narrow"] .sl-view3d-nav.is-open{left:12px;top:12px;max-width:calc(100% - 24px);padding:8px;
|
|
1203
|
-
border:1px solid rgba(150,165,205,.35);border-radius:14px;background:rgba(8,12,22,.9);backdrop-filter:blur(10px)}
|
|
1204
|
-
.sl-picker[data-layout="narrow"] .sl-view3d-nav.is-open>div{display:flex}
|
|
1205
|
-
/* Seat-eye is a decision state, not another venue-navigation state. Once the
|
|
1206
|
-
buyer arrives, clear the floor/area/locator rails and the module's duplicate
|
|
1207
|
-
Overview action. The picker-owned Back button becomes the one predictable
|
|
1208
|
-
escape: seat -> venue -> 2D map. */
|
|
1209
|
-
.sl-view3d.is-seat-focused .sl-view3d-nav,
|
|
1210
|
-
.sl-view3d.is-seat-focused .sl-3d-overview-control,
|
|
1211
|
-
.sl-view3d.is-seat-focused .sl-view3d-compare-saved{display:none!important}
|
|
1212
|
-
/* While immersed, the 2D-only chrome is meaningless \u2014 hide it, keep Map|3D. */
|
|
1213
|
-
.sl-picker[data-view3d="on"] .sl-rungs,
|
|
1214
|
-
.sl-picker[data-view3d="on"] .sl-floors,
|
|
1215
|
-
.sl-picker[data-view3d="on"] .sl-zoom,
|
|
1216
|
-
.sl-picker[data-view3d="on"] .sl-seccard,
|
|
1217
|
-
.sl-picker[data-view3d="on"] .sl-minimap{display:none!important}
|
|
1218
|
-
/* The confirm card bottom-sheets over 3D (no 2D screen anchor to track). */
|
|
1219
|
-
.sl-picker[data-view3d="on"] .sl-confirm{left:50%!important;top:auto!important;bottom:16px;
|
|
1220
|
-
transform:translateX(-50%);width:min(342px,calc(100% - 24px))}
|
|
1221
|
-
.sl-picker[data-view3d="on"] .sl-confirm[data-placement]{transform:translateX(-50%)}
|
|
1222
|
-
.sl-confirm-inspect-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}
|
|
1223
|
-
.sl-confirm-inspect-row .sl-confirm-3d{margin-top:0;min-height:44px}
|
|
1224
|
-
.sl-confirm-compare{min-height:44px;padding:8px;border-radius:8px;border:1px solid var(--sl-line);
|
|
1225
|
-
display:flex;align-items:center;justify-content:center;gap:7px;font-size:12px;font-weight:800;
|
|
1226
|
-
color:var(--sl-text);background:transparent}
|
|
1227
|
-
.sl-confirm-compare:hover,.sl-confirm-compare:focus-visible{border-color:var(--sl-accent);
|
|
1228
|
-
background:color-mix(in srgb,var(--sl-accent) 10%,transparent)}
|
|
1229
|
-
.sl-confirm-compare:disabled{opacity:.62;cursor:default}
|
|
1230
|
-
.sl-confirm-confidence{width:100%;min-height:44px;margin-top:8px;padding:8px 10px;border-radius:9px;
|
|
1231
|
-
border:1px solid color-mix(in srgb,var(--sl-accent) 35%,var(--sl-line));display:flex;align-items:center;
|
|
1232
|
-
justify-content:space-between;gap:10px;text-align:left;color:var(--sl-text);
|
|
1233
|
-
background:color-mix(in srgb,var(--sl-accent) 7%,var(--sl-surface))}
|
|
1234
|
-
.sl-confirm-confidence>span{min-width:0}
|
|
1235
|
-
.sl-confirm-confidence strong,.sl-confirm-confidence small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
1236
|
-
.sl-confirm-confidence strong{font-size:11px}.sl-confirm-confidence small{margin-top:2px;color:var(--sl-muted);font-size:9.5px}
|
|
1237
|
-
.sl-confirm-confidence em{display:none;font-style:normal}
|
|
1238
|
-
.sl-confirm-confidence>b{flex:none;font-size:11px;color:var(--sl-accent-text)}
|
|
1239
|
-
.sl-confirm-confidence:hover,.sl-confirm-confidence:focus-visible{border-color:var(--sl-accent)}
|
|
1240
|
-
/* The production 3D decision dock is deliberately denser than the 2D popup:
|
|
1241
|
-
the venue remains the main content and the two inspection actions share one
|
|
1242
|
-
row. Truth-bearing accessibility/restriction copy is never hidden. */
|
|
1243
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm{bottom:10px}
|
|
1244
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-field{padding:8px 9px 7px}
|
|
1245
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-value{font-size:14px;margin-top:2px}
|
|
1246
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-field:first-child .sl-confirm-value{font-size:12px}
|
|
1247
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-cat{padding:7px 10px}
|
|
1248
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-price{font-size:15px}
|
|
1249
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-body{padding:8px 10px 9px}
|
|
1250
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"] .sl-confirm-row{margin-top:7px}
|
|
1251
|
-
/* A short embedded/mobile picker cannot afford a full decision sheet over a
|
|
1252
|
-
285px map. Keep three 44px action rows and move all disclosure into the
|
|
1253
|
-
passport instead of hiding it without a route back. */
|
|
1254
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm{bottom:6px}
|
|
1255
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-grid,
|
|
1256
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-cat,
|
|
1257
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-body>.sl-cx{display:none}
|
|
1258
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-body{padding:6px 8px 7px}
|
|
1259
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-confidence{margin-top:0}
|
|
1260
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-confidence em{display:block;margin-bottom:2px;
|
|
1261
|
-
color:var(--sl-text);font-size:12px;font-weight:850;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
1262
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-confidence strong{font-size:9.5px}
|
|
1263
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-confidence small{display:none}
|
|
1264
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-inspect-row{margin-top:5px}
|
|
1265
|
-
.sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-row{margin-top:5px}
|
|
1266
|
-
|
|
1267
|
-
/* Saved comparison lives in the top journey row, away from checkout, arrival
|
|
1268
|
-
controls and the bottom-right privacy position. */
|
|
1269
|
-
.sl-view3d-compare-saved{position:absolute;top:12px;left:136px;z-index:5;display:flex;align-items:stretch;
|
|
1270
|
-
max-width:180px;min-height:38px;border-radius:999px;overflow:hidden;color:#e6edf3;
|
|
1271
|
-
background:rgba(10,14,20,.72);border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(6px)}
|
|
1272
|
-
.sl-view3d-compare-saved button{min-width:0;padding:7px 10px;color:inherit;font-size:11px;font-weight:800;white-space:nowrap}
|
|
1273
|
-
.sl-view3d-compare-saved .main{overflow:hidden;text-overflow:ellipsis}
|
|
1274
|
-
.sl-view3d-compare-saved .clear{width:34px;padding:7px;border-left:1px solid rgba(255,255,255,.18)}
|
|
1275
|
-
.sl-view3d-compare-saved button:hover,.sl-view3d-compare-saved button:focus-visible{background:rgba(255,255,255,.1)}
|
|
1276
|
-
.sl-picker[data-layout="narrow"] .sl-view3d-compare-saved{left:126px;max-width:calc(100% - 194px);min-height:44px}
|
|
1277
|
-
|
|
1278
|
-
/* An unavailable seat is still inspectable. This compact, non-modal status
|
|
1279
|
-
card explains the exact chair the buyer touched without selecting it or
|
|
1280
|
-
obscuring the venue with the full purchase confirmation sheet. */
|
|
1281
|
-
.sl-view3d-unavailable{position:absolute;left:50%;bottom:18px;z-index:9;display:grid;
|
|
1282
|
-
grid-template-columns:minmax(0,1fr) auto;gap:4px 14px;width:min(330px,calc(100% - 24px));
|
|
1283
|
-
padding:13px 14px;border:1px solid rgba(255,255,255,.22);border-radius:14px;
|
|
1284
|
-
color:#eef3fb;background:rgba(10,14,22,.94);box-shadow:0 18px 48px rgba(0,0,0,.48);
|
|
1285
|
-
backdrop-filter:blur(10px);transform:translateX(-50%)}
|
|
1286
|
-
.sl-view3d-unavailable[data-state="held"]{border-color:rgba(242,168,56,.7)}
|
|
1287
|
-
.sl-view3d-unavailable[data-state="sold"],.sl-view3d-unavailable[data-state="dimmed"]{border-color:rgba(160,170,188,.48)}
|
|
1288
|
-
.sl-view3d-unavailable-copy{min-width:0}
|
|
1289
|
-
.sl-view3d-unavailable-eyebrow{display:block;font-size:9px;line-height:1.2;letter-spacing:.13em;
|
|
1290
|
-
text-transform:uppercase;color:#aab7cc;font-weight:850}
|
|
1291
|
-
.sl-view3d-unavailable strong{display:block;margin-top:3px;font-size:17px;line-height:1.2}
|
|
1292
|
-
.sl-view3d-unavailable p{grid-column:1/-1;margin:4px 0 0;color:#b9c4d7;font-size:11px;line-height:1.4}
|
|
1293
|
-
.sl-view3d-unavailable button{align-self:start;min-width:44px;min-height:44px;margin:-5px -6px 0 0;
|
|
1294
|
-
border-radius:999px;color:#eef3fb;font-size:18px;border:1px solid rgba(255,255,255,.18)}
|
|
1295
|
-
.sl-view3d-unavailable button:hover,.sl-view3d-unavailable button:focus-visible{background:rgba(255,255,255,.1)}
|
|
1296
|
-
.sl-picker[data-layout="narrow"] .sl-view3d-unavailable{bottom:10px;padding-bottom:max(13px,env(safe-area-inset-bottom))}
|
|
1297
|
-
|
|
1298
|
-
.sl-view3d-compare-shell{position:absolute;inset:0;z-index:30;display:grid;place-items:center;padding:16px}
|
|
1299
|
-
.sl-view3d-compare-scrim{position:absolute;inset:0;background:rgba(3,6,12,.74);backdrop-filter:blur(5px)}
|
|
1300
|
-
.sl-view3d-compare{position:relative;width:min(720px,100%);max-height:min(680px,calc(100% - 20px));overflow:auto;
|
|
1301
|
-
border:1px solid rgba(160,177,214,.34);border-radius:18px;background:var(--sl-bg);color:var(--sl-text);
|
|
1302
|
-
box-shadow:0 28px 90px rgba(0,0,0,.55);padding:18px}
|
|
1303
|
-
.sl-view3d-compare>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
|
|
1304
|
-
.sl-view3d-compare>header span{display:block;font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--sl-muted);font-weight:850}
|
|
1305
|
-
.sl-view3d-compare>header strong{display:block;margin-top:4px;font-size:20px}
|
|
1306
|
-
.sl-view3d-compare>header button{min-width:44px;min-height:44px;border-radius:999px;border:1px solid var(--sl-line);color:var(--sl-text)}
|
|
1307
|
-
.sl-view3d-compare-note{margin:12px 0;color:var(--sl-muted);font-size:12px;line-height:1.45}
|
|
1308
|
-
.sl-view3d-compare-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
|
|
1309
|
-
.sl-view3d-compare article{min-width:0;padding:14px;border:1px solid var(--sl-line);border-radius:13px;background:var(--sl-surface)}
|
|
1310
|
-
.sl-view3d-compare article>span{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--sl-muted);font-weight:850}
|
|
1311
|
-
.sl-view3d-compare article>strong{display:block;margin-top:3px;font-size:20px}
|
|
1312
|
-
.sl-view3d-compare article>small{display:block;margin-top:3px;color:var(--sl-muted)}
|
|
1313
|
-
.sl-view3d-compare dl{margin:12px 0 0}
|
|
1314
|
-
.sl-view3d-compare dl div{display:grid;grid-template-columns:minmax(90px,.8fr) minmax(0,1.2fr);gap:10px;padding:8px 0;border-top:1px solid var(--sl-line)}
|
|
1315
|
-
.sl-view3d-compare dt{font-size:10.5px;color:var(--sl-muted)}
|
|
1316
|
-
.sl-view3d-compare dd{margin:0;text-align:right;font-size:11px;font-weight:750;overflow-wrap:anywhere}
|
|
1317
|
-
.sl-view3d-compare-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:12px}
|
|
1318
|
-
.sl-view3d-compare-actions button{min-height:44px;border-radius:9px;border:1px solid var(--sl-line);font-size:12px;font-weight:800}
|
|
1319
|
-
.sl-view3d-compare-actions .select{background:var(--sl-accent);color:var(--sl-accent-ink);border-color:transparent}
|
|
1320
|
-
.sl-view3d-compare-actions button:disabled{opacity:.62;cursor:not-allowed}
|
|
1321
|
-
.sl-view3d-passport-shell{position:absolute;inset:0;z-index:40;display:grid;place-items:center;padding:16px}
|
|
1322
|
-
.sl-view3d-passport-scrim{position:absolute;inset:0;background:rgba(3,6,12,.8);backdrop-filter:blur(6px)}
|
|
1323
|
-
.sl-view3d-passport{position:relative;width:min(540px,100%);max-height:min(700px,calc(100% - 20px));overflow:auto;
|
|
1324
|
-
padding:18px;border:1px solid rgba(160,177,214,.38);border-radius:18px;background:var(--sl-bg);color:var(--sl-text);
|
|
1325
|
-
box-shadow:0 28px 90px rgba(0,0,0,.6)}
|
|
1326
|
-
.sl-view3d-passport>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
|
|
1327
|
-
.sl-view3d-passport>header span{display:block;font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--sl-muted);font-weight:850}
|
|
1328
|
-
.sl-view3d-passport>header strong{display:block;margin-top:4px;font-size:20px}
|
|
1329
|
-
.sl-view3d-passport>header button{min-width:44px;min-height:44px;border:1px solid var(--sl-line);border-radius:999px;color:var(--sl-text)}
|
|
1330
|
-
.sl-view3d-passport-summary{margin:14px 0;padding:12px;border-radius:12px;background:color-mix(in srgb,var(--sl-accent) 9%,var(--sl-surface));
|
|
1331
|
-
border:1px solid color-mix(in srgb,var(--sl-accent) 30%,var(--sl-line))}
|
|
1332
|
-
.sl-view3d-passport-summary strong{display:block;font-size:15px}.sl-view3d-passport-summary span{display:block;margin-top:4px;font-size:11px;color:var(--sl-muted)}
|
|
1333
|
-
.sl-view3d-passport dl{margin:0}.sl-view3d-passport dl div{display:grid;grid-template-columns:minmax(105px,.75fr) minmax(0,1.25fr);
|
|
1334
|
-
gap:12px;padding:9px 0;border-top:1px solid var(--sl-line)}
|
|
1335
|
-
.sl-view3d-passport dt{font-size:10.5px;color:var(--sl-muted)}.sl-view3d-passport dd{margin:0;text-align:right;font-size:11px;font-weight:750;overflow-wrap:anywhere}
|
|
1336
|
-
.sl-view3d-passport h4{margin:14px 0 6px;font-size:11px}.sl-view3d-passport ul{margin:0;padding-left:18px;color:var(--sl-muted);font-size:10.5px;line-height:1.5}
|
|
1337
|
-
.sl-view3d-passport-note{margin:14px 0 0;color:var(--sl-muted);font-size:10.5px;line-height:1.45}
|
|
1338
|
-
@media(max-width:640px){
|
|
1339
|
-
.sl-view3d-compare-shell{padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom))}
|
|
1340
|
-
.sl-view3d-compare{width:100%;max-height:100%;padding:14px 14px max(86px,calc(14px + env(safe-area-inset-bottom)));border-radius:15px}
|
|
1341
|
-
.sl-view3d-compare-grid{grid-template-columns:1fr}
|
|
1342
|
-
.sl-view3d-compare article{padding:12px}
|
|
1343
|
-
.sl-view3d-passport-shell{padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom))}
|
|
1344
|
-
.sl-view3d-passport{width:100%;max-height:100%;padding:14px 14px max(24px,calc(14px + env(safe-area-inset-bottom)));border-radius:15px}
|
|
1345
|
-
}
|
|
1346
|
-
|
|
1347
1828
|
/* Plain "View from here" action shown when no real photo exists (the synthetic
|
|
1348
1829
|
thumb is suppressed at card size \u2014 full-screen is where it earns its keep). */
|
|
1349
1830
|
.sl-confirm-viewbtn{width:100%;margin-top:9px;padding:8px;border-radius:8px;border:1px solid var(--sl-line);
|
|
@@ -1398,10 +1879,20 @@
|
|
|
1398
1879
|
competes with nothing and never has to be suppressed. */
|
|
1399
1880
|
.sl-seccard.strip{position:absolute;left:50%;transform:translateX(-50%);bottom:12px;z-index:6;
|
|
1400
1881
|
width:auto;max-width:calc(100% - 24px);padding:6px 8px 6px 12px;border-radius:999px;
|
|
1401
|
-
border:1px solid var(--sl-line);background:var(--sl-surface);
|
|
1882
|
+
border:1px solid var(--sl-line);background:var(--sl-surface);color:var(--sl-text);
|
|
1402
1883
|
box-shadow:0 12px 30px -12px rgba(0,0,0,.55);cursor:default}
|
|
1403
1884
|
.sl-seccard.strip.on{display:flex;align-items:center;gap:7px;font-size:12.5px}
|
|
1404
|
-
.sl-seccard.strip .sl-seccard-name{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
1885
|
+
.sl-seccard.strip .sl-seccard-name{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;min-width:0}
|
|
1886
|
+
/* The name is the answer ("where am I"); the count is the detail. A plain
|
|
1887
|
+
"flex:0 1" on the count was not enough - the two shrank in PROPORTION, so at 360px the
|
|
1888
|
+
name sat on its floor while the count still held 55px of a row that had none
|
|
1889
|
+
to spare. A dominant shrink factor makes the count collapse first, and the
|
|
1890
|
+
measured fit pass below then swaps or drops it before it can clip. */
|
|
1891
|
+
.sl-seccard.strip .sl-seccard-left{flex:0 200 auto;min-width:0;white-space:nowrap;overflow:hidden}
|
|
1892
|
+
/* The count is measured after it mounts and swapped for a short form, or
|
|
1893
|
+
dropped, before it is allowed to clip \u2014 so it never needs an ellipsis, and
|
|
1894
|
+
must never be laid out (or announced) while hidden. */
|
|
1895
|
+
.sl-seccard.strip .sl-seccard-left[hidden]{display:none}
|
|
1405
1896
|
/* The confirm card is bottom-anchored on narrow and owns this edge while it is
|
|
1406
1897
|
open; 3D has no 2D section context to report. */
|
|
1407
1898
|
.sl-picker[data-layout="narrow"][data-confirming="true"] .sl-seccard.strip,
|
|
@@ -1428,13 +1919,56 @@
|
|
|
1428
1919
|
background:color-mix(in srgb,var(--sl-surface) 88%,var(--sl-bg));font-size:14px;font-weight:850;line-height:1}
|
|
1429
1920
|
.sl-seccard-nav button:hover,.sl-seccard-nav button:focus-visible{border-color:var(--sl-accent);color:var(--sl-accent-text)}
|
|
1430
1921
|
.sl-seccard.mini .sl-seccard-nav,.sl-seccard.strip .sl-seccard-nav{margin-left:2px}
|
|
1431
|
-
.sl-seccard.mini .sl-seccard-nav button
|
|
1922
|
+
.sl-seccard.mini .sl-seccard-nav button{width:24px;height:24px;font-size:12px}
|
|
1923
|
+
/* Phone strip: every control is a finger target (\u226540px box, 44px row) and the
|
|
1924
|
+
exit is a labelled "\u2039 Overview" chip \u2014 one tap in, one tap out. */
|
|
1925
|
+
.sl-seccard.strip{padding:4px 4px 4px 12px;min-height:44px}
|
|
1926
|
+
/* ...and on a phone it is a DOCK BAR, not a floating pill. The pill's rounded
|
|
1927
|
+
ends and centred max-width spent ~40px of a 390px row on nothing, so the
|
|
1928
|
+
name truncated to "Grand C\u2026" while the pill itself sat on top of the map's
|
|
1929
|
+
own corner controls \u2014 a second rounded edge showing through behind it. A bar
|
|
1930
|
+
that owns the bottom edge outright spends every pixel on the answer, and the
|
|
1931
|
+
corner controls lift above it rather than fighting it. */
|
|
1932
|
+
.sl-picker[data-layout="narrow"] .sl-seccard.strip{
|
|
1933
|
+
left:0;right:0;bottom:0;transform:none;width:auto;max-width:none;
|
|
1934
|
+
border-radius:0;border-width:1px 0 0 0;min-height:52px;
|
|
1935
|
+
padding:0 8px 0 14px;padding-bottom:var(--sl-safe-b);
|
|
1936
|
+
/* Opaque: seats scrolling under a translucent dock read as a rendering bug. */
|
|
1937
|
+
background:var(--sl-surface);box-shadow:0 -10px 26px -20px rgba(0,0,0,.7)}
|
|
1938
|
+
/* Total height of the dock, including the home-indicator inset it absorbs. */
|
|
1939
|
+
.sl-picker[data-layout="narrow"]{--sl-locator-h:calc(52px + var(--sl-safe-b))}
|
|
1940
|
+
/* Every absolutely-positioned bottom control on the map moves as one \u2014 the
|
|
1941
|
+
regions are the only lever that reaches all of them, which is what they are
|
|
1942
|
+
for. Skipped while the confirm card or 3D has taken the strip away. */
|
|
1943
|
+
.sl-picker[data-layout="narrow"][data-locator="true"]:not([data-confirming="true"]):not([data-view3d="on"])
|
|
1944
|
+
.sl-anchor[data-region="bottom-left"],
|
|
1945
|
+
.sl-picker[data-layout="narrow"][data-locator="true"]:not([data-confirming="true"]):not([data-view3d="on"])
|
|
1946
|
+
.sl-anchor[data-region="bottom-right"]{bottom:calc(12px + var(--sl-locator-h))}
|
|
1947
|
+
.sl-picker[data-layout="narrow"][data-locator="true"]:not([data-confirming="true"]):not([data-view3d="on"])
|
|
1948
|
+
.sl-anchor[data-region="bottom-center"]{bottom:calc(14px + var(--sl-locator-h))}
|
|
1949
|
+
.sl-seccard.strip .sl-seccard-nav{gap:2px}
|
|
1950
|
+
.sl-seccard.strip .sl-seccard-nav button{width:34px;height:36px;font-size:15px}
|
|
1951
|
+
/* The accent ink is computed to clear 4.5:1 against the SURFACE (see
|
|
1952
|
+
readableAccentText). Tinting the chip's ground 12% toward the accent moved it
|
|
1953
|
+
off that guarantee and measured 4.2:1 on a light map theme. The ground is the
|
|
1954
|
+
plain surface again and the accent identity lives in the ink and the border,
|
|
1955
|
+
which is where a chip's identity belongs anyway. */
|
|
1956
|
+
.sl-seccard-back{width:auto;height:36px;padding:0 10px 0 6px;flex:none;margin-left:2px;border-radius:999px;
|
|
1957
|
+
display:inline-flex;align-items:center;gap:2px;font-size:12.5px;font-weight:800;color:var(--sl-accent-text);
|
|
1958
|
+
background:var(--sl-surface);border:1px solid color-mix(in srgb,var(--sl-accent) 55%,var(--sl-line))}
|
|
1959
|
+
.sl-seccard-back:active{transform:scale(.96)}
|
|
1960
|
+
.sl-seccard-back-chev{font-size:18px;line-height:1;margin-top:-2px}
|
|
1432
1961
|
|
|
1433
1962
|
/* view-from-seat button on the confirm popover */
|
|
1434
1963
|
/* Eager sightline preview inside the confirm card */
|
|
1435
1964
|
.sl-confirm-thumbwrap{position:relative;display:block;width:100%;height:74px;margin:0 0 8px;padding:0!important;
|
|
1436
1965
|
border-radius:9px;overflow:hidden;border:1px solid var(--sl-line);cursor:pointer}
|
|
1437
1966
|
.sl-confirm-thumb{display:block;width:100%;height:100%;object-fit:cover}
|
|
1967
|
+
/* The thumbnail leaving the card when its image never arrives: height and
|
|
1968
|
+
opacity only, so the card resizes rather than jumping. Reduced motion skips
|
|
1969
|
+
the transition entirely \u2014 the block is simply removed. */
|
|
1970
|
+
.sl-confirm-thumb-out{overflow:hidden;transition:height 160ms ease,opacity 160ms ease}
|
|
1971
|
+
@media (prefers-reduced-motion:reduce){.sl-confirm-thumb-out{transition:none}}
|
|
1438
1972
|
.sl-confirm-thumb-badge{position:absolute;right:7px;top:7px;display:inline-flex;align-items:center;gap:5px;
|
|
1439
1973
|
font-size:10px;font-weight:700;color:#fff;background:rgba(10,14,22,0.72);border-radius:12px;padding:4px 9px;backdrop-filter:blur(3px)}
|
|
1440
1974
|
.sl-confirm-sight{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--sl-muted);margin-bottom:2px}
|
|
@@ -1462,9 +1996,8 @@
|
|
|
1462
1996
|
|
|
1463
1997
|
/* 360\xB0 seat-view modal (fills the widget; drag-to-look-around equirectangular) */
|
|
1464
1998
|
.sl-view{position:absolute;inset:0;z-index:12;display:flex;flex-direction:column;background:var(--sl-bg);
|
|
1465
|
-
|
|
1999
|
+
transition:opacity .18s ease,transform .18s ease}
|
|
1466
2000
|
.sl-view.is-leaving{opacity:0;transform:translateY(10px) scale(.992);pointer-events:none}
|
|
1467
|
-
@keyframes slViewEnter{from{opacity:0;transform:translateY(12px) scale(.992)}to{opacity:1;transform:none}}
|
|
1468
2001
|
.sl-view-head{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--sl-line);flex:none}
|
|
1469
2002
|
.sl-view-title{font-weight:800;font-size:15px}
|
|
1470
2003
|
.sl-view-cap{font-size:11px;color:var(--sl-muted)}
|
|
@@ -1532,7 +2065,6 @@
|
|
|
1532
2065
|
@keyframes slPillIn{from{opacity:0;transform:translateX(7px) scale(.9)}to{opacity:1;transform:translateX(0) scale(1)}}
|
|
1533
2066
|
@keyframes slHoldPulse{0%{box-shadow:0 0 0 0 currentColor;opacity:.9}75%,100%{box-shadow:0 0 0 7px transparent;opacity:.55}}
|
|
1534
2067
|
@keyframes slChipIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
|
|
1535
|
-
@keyframes slChipOut{to{opacity:0;transform:translateX(10px) scale(.98)}}
|
|
1536
2068
|
@keyframes slNoticeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
|
|
1537
2069
|
@keyframes slValuePop{0%{opacity:.6;transform:translateY(3px)}55%{transform:translateY(-1px) scale(1.05)}100%{opacity:1;transform:none}}
|
|
1538
2070
|
@keyframes slCtaReady{0%{transform:scale(.98);box-shadow:0 0 0 0 transparent}55%{transform:scale(1.01);box-shadow:0 0 0 5px color-mix(in srgb,var(--sl-accent) 18%,transparent)}100%{transform:none;box-shadow:none}}
|
|
@@ -1540,8 +2072,6 @@
|
|
|
1540
2072
|
@keyframes slSuccessPop{0%{opacity:0;transform:scale(.72)}65%{opacity:1;transform:scale(1.08)}100%{opacity:1;transform:scale(1)}}
|
|
1541
2073
|
@keyframes slCheckDraw{to{stroke-dashoffset:0}}
|
|
1542
2074
|
@keyframes slCopyRise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
|
|
1543
|
-
@keyframes slConfirmIn{from{opacity:0;transform:translate(-50%,calc(-100% - 8px)) scale(.96)}to{opacity:1;transform:translate(-50%,calc(-100% - 14px)) scale(1)}}
|
|
1544
|
-
@keyframes slConfirmBelowIn{from{opacity:0;transform:translate(-50%,8px) scale(.96)}to{opacity:1;transform:translate(-50%,16px) scale(1)}}
|
|
1545
2075
|
@keyframes slConfirmMobileIn{from{opacity:0;transform:translate(-50%,10px) scale(.97)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
|
|
1546
2076
|
|
|
1547
2077
|
/* Access state (channels): the panel fades AND rises at --slm-mo-base. It never
|
|
@@ -1557,6 +2087,11 @@
|
|
|
1557
2087
|
.sl-access-act{margin-top:8px;padding:6px 12px;border-radius:999px;font-size:12px;font-weight:700;
|
|
1558
2088
|
background:var(--sl-accent);color:var(--sl-accent-ink)}
|
|
1559
2089
|
@keyframes slAccessIn{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}
|
|
2090
|
+
/* The collapsed sheet's one-liner reacting to a seat landing in the cart. The
|
|
2091
|
+
global reduced-motion block above already neutralises it. */
|
|
2092
|
+
@keyframes slPeekBump{0%{transform:scale(1)}45%{transform:scale(1.15)}100%{transform:scale(1)}}
|
|
2093
|
+
.sl-peek-sum{display:inline-block;transform-origin:left center}
|
|
2094
|
+
.sl-peek-bump{animation:slPeekBump .24s cubic-bezier(.2,.8,.2,1)}
|
|
1560
2095
|
|
|
1561
2096
|
@media(prefers-reduced-motion:reduce){
|
|
1562
2097
|
.sl-picker *,.sl-modal-scrim *{animation-duration:.001ms!important;animation-iteration-count:1!important;
|
|
@@ -1566,6 +2101,40 @@
|
|
|
1566
2101
|
}
|
|
1567
2102
|
.sl-ba [data-ba-zone]{grid-column:1/-1;width:100%}
|
|
1568
2103
|
|
|
2104
|
+
/* ------------------------------------------------------------------ */
|
|
2105
|
+
/* LIGHT MODE: the legend has to speak the map's language */
|
|
2106
|
+
/* ------------------------------------------------------------------ */
|
|
2107
|
+
|
|
2108
|
+
/* A price swatch is a promise about what the map paints. On a dark canvas the
|
|
2109
|
+
two agree closely enough \u2014 the block tint carries most of the category's
|
|
2110
|
+
saturation. On a LIGHT canvas the shell is only 32% of the way from the
|
|
2111
|
+
near-white neutral toward the category (SECTION_TINT_ON_LIGHT), so the map
|
|
2112
|
+
goes pastel while the legend stays fully saturated, and the buyer is asked to
|
|
2113
|
+
match a bold dot to a wash.
|
|
2114
|
+
|
|
2115
|
+
So the dot becomes the wash \u2014 the same mix, against the surface the swatch
|
|
2116
|
+
actually sits on \u2014 and the saturation moves to a 1.5px ring around it. The
|
|
2117
|
+
identity survives at 7px, and what is inside the ring is now the colour the
|
|
2118
|
+
buyer is looking for on the map. Dark is untouched: nothing here applies
|
|
2119
|
+
without a light mode resolved onto the root. */
|
|
2120
|
+
.sl-picker[data-theme="light"] .sl-rc-dot,
|
|
2121
|
+
.sl-picker[data-theme="light"] .sl-price-row .sl-dot{
|
|
2122
|
+
background:color-mix(in srgb,var(--sl-cat-dot,var(--sl-accent)) 32%,var(--sl-surface));
|
|
2123
|
+
box-shadow:0 0 0 1.5px var(--sl-cat-dot,var(--sl-accent))}
|
|
2124
|
+
/* A selected chip fills with the accent, and its dot's ring flips to the ink
|
|
2125
|
+
that reads on it \u2014 the pressed rule stays the owner of that state. */
|
|
2126
|
+
.sl-picker[data-theme="light"] .sl-rc[aria-pressed="true"] .sl-rc-dot{
|
|
2127
|
+
box-shadow:0 0 0 1.5px var(--sl-accent-ink)}
|
|
2128
|
+
|
|
2129
|
+
/* The phone's dock bar sits ON the map. Against a dark canvas its own surface
|
|
2130
|
+
is the contrast, and a downward shadow is all it needs. Against a WHITE map
|
|
2131
|
+
a white bar with a hairline top border has nothing separating it from the
|
|
2132
|
+
venue behind it \u2014 the strip stops reading as a plate and starts reading as
|
|
2133
|
+
the bottom of the page. It gets a real shadow and a visible line. */
|
|
2134
|
+
.sl-picker[data-theme="light"][data-layout="narrow"] .sl-seccard.strip{
|
|
2135
|
+
box-shadow:0 6px 20px -12px rgba(0,0,0,.35),0 -6px 20px -12px rgba(0,0,0,.35);
|
|
2136
|
+
border-top-color:color-mix(in srgb,var(--sl-text) 12%,transparent)}
|
|
2137
|
+
|
|
1569
2138
|
/* modal host */
|
|
1570
2139
|
.sl-modal-scrim{position:fixed;inset:0;z-index:2147483000;background:rgba(5,7,12,.66);display:flex;align-items:center;justify-content:center;padding:18px}
|
|
1571
2140
|
.sl-modal-frame{width:min(1200px,100%);height:min(820px,100%);border-radius:16px;overflow:hidden;box-shadow:0 40px 120px -30px rgba(0,0,0,.8)}
|
|
@@ -1575,7 +2144,7 @@
|
|
|
1575
2144
|
corners, and it is the frame. */
|
|
1576
2145
|
.sl-modal-frame > .sl-picker{border-radius:0}
|
|
1577
2146
|
@media(max-width:640px){.sl-modal-scrim{padding:0}.sl-modal-frame{width:100%;height:100%;border-radius:0}}
|
|
1578
|
-
`;function Ue(){if(document.getElementById(Ji))return;let r=document.createElement("style");r.id=Ji,r.textContent=un+Zi,document.head.appendChild(r)}var ns=require("@seatlayer/core"),os=require("@seatlayer/core/core/cdnAsset");var xn=require("@seatlayer/core/core/cdnAsset");function f(r,e){let t=(0,ns.t)(r);return t===r?e:t}function as(r){if(typeof r=="string"){let e=document.querySelector(r);if(!e)throw new Error(`seatmap: container "${r}" not found`);return e}if(!(r instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return r}function F(r){return String(r??"").replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function ls(r,e,t){let i=e.find(n=>Lt(n))??null;if(r.replaceChildren(),!i)return r.textContent=t.slice(0,1).toUpperCase(),null;let s=document.createElement("img");return s.alt="",s.referrerPolicy="no-referrer",s.src=i,r.appendChild(s),i}var qe=null;function Ht(){if(qe!==null)return qe;try{if(typeof document>"u")return qe=!1;qe=!!document.createElement("canvas").getContext("webgl2")}catch{qe=!1}return qe}function ci(r){return(0,os.cdnAssetUrl)(r)}async function Rt(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(ci("seatlayer-view3d.mjs")):import("@seatlayer/core/view3d")}async function Ot(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(ci("seatlayer-panorama.mjs")):import("@seatlayer/core")}async function cs(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(ci("seatlayer-checkout.mjs")):Promise.resolve().then(()=>(rs(),ss))}function ds(r){return r==="unavailable_for_event"||r==="payments_off_for_event"?r:"not_configured"}function It(r,e,t){let i={month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},s=new Date(r);if(e)try{return s.toLocaleString(t,{...i,timeZone:e})}catch{}return s.toLocaleString(t,i)}async function _t(r,e){let t=r.overlay.productionElements;if(!t?.some(s=>s.contentImageUrl))return r;let i=await Promise.all(t.map(async s=>{if(!s.contentImageUrl)return s;try{let n=await e(s.contentImageUrl);if(!n){let{contentImageUrl:o,...a}=s;return a}return{...s,runtimeContentImageUrl:n}}catch{let{contentImageUrl:n,...o}=s;return o}}));return{...r,overlay:{...r.overlay,productionElements:i}}}async function Bt(r,e){if(r)try{let t=await e(r);return t?await(await fetch(t)).arrayBuffer():void 0}catch{return}}var ye=require("@seatlayer/core/view/panoramaDelivery");function $t(r){let{root:e,source:t,caption:i,real:s,closeLabel:n,dragHint:o,viewFromSeatLabel:a,real360Label:l,previewLabel:c,resolveAsset:h,onClose:p}=r,d=document.createElement("div");d.className="sl-view",d.setAttribute("role","dialog"),d.setAttribute("aria-label",a),d.innerHTML='<div class="sl-view-head"><span class="sl-view-title"></span><span class="sl-view-cap"></span><button type="button" class="sl-view-x"><svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button></div><div class="sl-view-pano"><span class="sl-view-badge"></span><span class="sl-view-hint"></span></div>',d.querySelector(".sl-view-title").textContent=a,d.querySelector(".sl-view-cap").textContent=i,d.querySelector(".sl-view-x").setAttribute("aria-label",n),d.querySelector(".sl-view-badge").textContent=s?l:c,d.querySelector(".sl-view-hint").textContent=o,e.appendChild(d);let u=d.querySelector(".sl-view-pano"),g=(0,ye.planPanoramaDelivery)(t,(0,ye.browserPanoramaConstraints)()),v=new AbortController;u.style.backgroundImage=`url(${JSON.stringify(g.initialUrl)})`;let w=()=>{};g.upgradeUrl&&(w=(0,ye.schedulePanoramaUpgrade)(()=>{h(g.upgradeUrl).then(T=>!T||v.signal.aborted?null:(0,ye.loadPanoramaImage)(T,v.signal).then(()=>T)).then(T=>{!T||!d.isConnected||v.signal.aborted||(u.style.backgroundImage=`url(${JSON.stringify(T)})`)}).catch(()=>{})}));let y=70,R=35,S=1,P=u.clientHeight||1,_=u.clientWidth||1,k=-(P*(180/y)*2/2-_/2),L=0,m=()=>{let T=u.clientHeight||1,q=T*(180/y)*S,z=Math.max(0,q-T),it=Math.min(z/2,R/180*q);L=Math.min(it,Math.max(-it,L)),u.style.backgroundSize=`auto ${q}px`,u.style.backgroundPosition=`${k}px ${L-z/2}px`};m();let C=!1,H=0,D=0,j=T=>{C=!0,H=T.clientX,D=T.clientY,u.classList.add("drag"),u.setPointerCapture?.(T.pointerId)},G=T=>{C&&(k+=T.clientX-H,L+=T.clientY-D,H=T.clientX,D=T.clientY,m())},U=T=>{C=!1,u.classList.remove("drag"),u.releasePointerCapture?.(T.pointerId)},ge=T=>{T.preventDefault(),S=Math.min(2.4,Math.max(1,S+(T.deltaY<0?.12:-.12))),m()};u.addEventListener("pointerdown",j),u.addEventListener("pointermove",G),u.addEventListener("pointerup",U),u.addEventListener("pointercancel",U),u.addEventListener("wheel",ge,{passive:!1});let le=d.querySelector(".sl-view-x");le.addEventListener("click",p);let tt=T=>{T.key==="Escape"&&(T.stopPropagation(),p())};return d.addEventListener("keydown",tt),le.focus(),{element:d,dispose(){w(),v.abort(),u.removeEventListener("pointerdown",j),u.removeEventListener("pointermove",G),u.removeEventListener("pointerup",U),u.removeEventListener("pointercancel",U),u.removeEventListener("wheel",ge),d.removeEventListener("keydown",tt),le.removeEventListener("click",p)}}}var ps=6e4,Dt=class{constructor(e){this.buyerView_="map";this.targetSeatId_=null;this.navigationMode_="orbit";this.overlay=null;this.handle=null;this.generation=0;this.seatViewGeneration=0;this.seatViewElement=null;this.seatViewDispose=null;this.options=e}get buyerView(){return this.buyerView_}get targetSeatId(){return this.targetSeatId_}get navigationMode(){return this.navigationMode_}canOffer3D(){return this.options.enable3D?this.handle&&this.overlay?!0:!this.options.doc()||!Ht()?!1:this.options.seats().length<=this.max3DSeats():!1}canOfferSeatView(){return this.options.enableSeatView?this.options.seats().some(e=>!!e.viewUrl)?!0:this.hasStage():!1}async setBuyerView(e,t={}){if(e==="map"){this.exit3D();return}if(!this.canOffer3D())throw new Error("venue_3d_unavailable");if(this.buyerView_==="venue3d"&&this.handle){t.flyToSeatId?(this.targetSeatId_=t.flyToSeatId,this.options.onViewChange(this.buyerView_,this.targetSeatId_),await this.handle.flyToSeat(t.flyToSeatId)):t.resetView&&this.handle.focusOverview();return}if(this.handle&&this.overlay){await this.restore3D(t);return}await this.enter3D(t.flyToSeatId)}async openSeatView(e){if(!this.canOfferSeatView())throw new Error("seat_view_unavailable");let t=this.findSeat(e),i=this.options.host(),s=this.options.doc();if(!t||!i||!s)throw new Error("seat_view_unavailable");let n=++this.seatViewGeneration,o,a,l=!1;if(t.viewUrl){let h=t.viewMeta?.previewUrl,p=!!h&&h!==t.viewUrl,d=p?await this.options.resolveAsset(h):null,u=p?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(n!==this.seatViewGeneration||!u||p&&!d)return;o={url:u,...d?{previewUrl:d}:{},...p?{resolveUrl:this.options.resolveAsset}:{},...t.viewMeta?.sourceWidth!==void 0?{sourceWidth:t.viewMeta.sourceWidth}:{},...t.viewMeta?.sourceHeight!==void 0?{sourceHeight:t.viewMeta.sourceHeight}:{},...t.viewMeta?.previewWidth!==void 0?{previewWidth:t.viewMeta.previewWidth}:{},...t.viewMeta?.previewHeight!==void 0?{previewHeight:t.viewMeta.previewHeight}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}},a=(0,zt.seatViewDisclosure)(o),l=(0,zt.isAuthoredSeatView)(o)}else{if(!this.hasStage())throw new Error("seat_view_unavailable");let{generateSeatPanorama:h}=await Ot();if(n!==this.seatViewGeneration)return;let p=s.floors?.find(g=>g.objects.some(v=>v.type==="row"&&v.id===t.rowId)),d=t.focalPoint??p?.focalPoint??s.focalPoint,u=h(t,d,[...this.options.seats()]);o={url:u.url,generated:!0},a=(0,lt.t)("picker.illustrationCaption",{m:u.distanceM})}if(n!==this.seatViewGeneration)return;this.closeSeatView(!1),this.prepareHostTheme(i,s),Ue();let c=$t({root:i,source:o,caption:a,real:l,closeLabel:f("picker.close","Close"),dragHint:f("picker.dragToLookAround","Drag to look around \xB7 pinch or scroll to zoom"),viewFromSeatLabel:(0,lt.t)("picker.viewFromSeat",{label:t.displayLabel||t.label}),real360Label:(0,lt.t)("picker.real360"),previewLabel:(0,lt.t)("picker.preview"),resolveAsset:this.options.resolveAsset,onClose:()=>this.closeSeatView(!0,!0)});this.seatViewElement=c.element,this.seatViewDispose=c.dispose}pushLiveState(){this.handle&&(this.handle.setAvailability(this.options.seats().map(e=>({seatId:e.id,state:this.seatState(e)}))),this.handle.setSelection(this.options.selection().map(e=>e.id)))}focusOverview(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.focusOverview(),!0)}focusSection(e){return this.buyerView_==="venue3d"?this.handle?.focusSection(e)??!1:!1}focusFloor(e){let t=this.options.doc();if(this.buyerView_!=="venue3d"||!this.handle||!t?.floors?.length)return!1;let i=t.floors.findIndex(s=>s.id===e);return i>=0&&this.handle.focusFloor(i)}zoomIn(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.zoomIn(),!0)}zoomOut(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.zoomOut(),!0)}setNavigationMode(e){return this.navigationMode_=e,this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.setNavigationMode(e),this.options.onViewChange(this.buyerView_,this.targetSeatId_),!0)}destroy(){this.generation+=1,this.closeSeatView(!0,!1);try{this.handle?.dispose()}catch{}this.handle=null,this.overlay?.remove(),this.overlay=null,this.buyerView_="map",this.targetSeatId_=null}max3DSeats(){let e=this.options.max3DSeats;if(typeof e=="number"&&e>0)return e;let t=globalThis.navigator;return(t?.hardwareConcurrency??8)<=4||(t?.deviceMemory??8)<=4||(globalThis.matchMedia?.("(pointer: coarse)").matches??!1)?ps/2:ps}async enter3D(e){let t=this.options.host(),i=this.options.doc();if(!t||!i||this.overlay)throw new Error("venue_3d_unavailable");Ue(),this.prepareHostTheme(t,i);let s=document.createElement("div");s.className="sl-view3d",s.setAttribute("role","group"),s.setAttribute("aria-label",f("picker.interactive3dVenueView","Interactive 3D venue view")),Object.assign(s.style,{position:"absolute",inset:"0",zIndex:"4",opacity:"0",touchAction:"none",transition:this.reducedMotion()?"none":"opacity 260ms cubic-bezier(.2,.8,.2,1)",background:"radial-gradient(120% 120% at 50% 0%,#191f28 0%,#0d1014 70%)"});let n=document.createElement("div");n.className="sl-view3d-loading",n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.textContent=f("picker.loading3d","Building the 3D venue\u2026"),s.appendChild(n),t.appendChild(s),this.overlay=s;let o=++this.generation;if(this.reducedMotion()?s.style.opacity="1":requestAnimationFrame(()=>{s.style.opacity="1"}),await this.nextPaint(),!(o!==this.generation||this.overlay!==s))try{let[a,l]=await Promise.all([Rt(),this.options.loadEventConfiguration()]),c=l?await _t(l,this.options.resolveAsset):null,h=await Bt(i.theme?.venue3d?.shellAssetUrl,this.options.resolveAsset);if(o!==this.generation||this.overlay!==s)return;let p={doc:i,seats:[...this.options.seats()],...c?{eventConfigurationId:c.id,eventConfiguration:c}:{},...h?{registeredShellGlb:h}:{}},d=await a.prepareVenue3D(p);if(o!==this.generation||this.overlay!==s)return;let u=a.mountVenue3D(s,{...p,prepared:d},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,seatViewActionLabel:g=>this.findSeat(g)?.viewUrl?f("picker.openAuthored360","Open venue 360\xB0"):f("picker.lookAroundLive3d","Look around in live 3D"),onSeatPick:g=>this.toggleSeat(g),onSeatInspect:g=>this.toggleSeat(g),onViewTargetChange:g=>{this.targetSeatId_=g,this.options.onViewChange("venue3d",g)},...this.options.enableSeatView?{getSeatView:g=>this.seatViewFor3D(g)}:{}});if(o!==this.generation||this.overlay!==s){u.dispose();return}this.handle=u,this.buyerView_="venue3d",this.targetSeatId_=e??null,u.setNavigationMode(this.navigationMode_),n.remove(),this.pushLiveState(),this.options.onViewChange("venue3d",this.targetSeatId_),e&&await u.flyToSeat(e)}catch(a){if(o!==this.generation)return;throw this.options.onError?.(a),this.remove3DOverlay(!1),a}}exit3D(){this.buyerView_==="map"&&!this.overlay||(this.generation+=1,this.buyerView_="map",this.targetSeatId_=null,this.remove3DOverlay(!0,!!this.handle),this.options.onViewChange("map",null))}remove3DOverlay(e,t=!1){let i=this.handle,s=this.overlay;if(this.options.restoreMap(),t&&i&&s){s.style.pointerEvents="none";let n=()=>{this.buyerView_!=="map"||this.overlay!==s||(s.style.visibility="hidden",this.options.restoreMap())};!e||this.reducedMotion()?(s.style.opacity="0",n()):(requestAnimationFrame(()=>{s.style.opacity="0"}),setTimeout(n,280));return}if(this.handle=null,this.overlay=null,!s){try{i?.dispose()}catch{}this.options.restoreMap();return}if(!e||this.reducedMotion()){try{i?.dispose()}catch{}s.remove(),this.options.restoreMap();return}s.style.pointerEvents="none",requestAnimationFrame(()=>{s.style.opacity="0"}),setTimeout(()=>{try{i?.dispose()}catch{}s.remove(),this.options.restoreMap()},280)}async restore3D(e){let t=this.overlay,i=this.handle;if(!t||!i)throw new Error("venue_3d_unavailable");this.buyerView_="venue3d",this.targetSeatId_=e.flyToSeatId??null,t.style.visibility="visible",t.style.pointerEvents="auto",this.reducedMotion()?t.style.opacity="1":requestAnimationFrame(()=>{t.style.opacity="1"}),i.resize(),i.setNavigationMode(this.navigationMode_),this.pushLiveState(),this.options.onViewChange("venue3d",this.targetSeatId_),e.flyToSeatId?await i.flyToSeat(e.flyToSeatId):e.resetView&&i.focusOverview()}nextPaint(){return this.reducedMotion()||typeof requestAnimationFrame!="function"?Promise.resolve():new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}toggleSeat(e){if(!this.findSeat(e))return;this.options.selection().some(s=>s.id===e)?this.options.deselect(e):this.options.status(e)==="free"&&this.options.select(e),this.pushLiveState()}seatState(e){switch(this.options.status(e.id)){case"held":return"held";case"booked":return"sold";case"not_for_sale":return"dimmed";default:return"available"}}async seatViewFor3D(e){let t=this.findSeat(e);if(!t)throw new Error("seat_view_unavailable");if(t.viewUrl){let i=t.viewMeta?.previewUrl,s=!!i&&i!==t.viewUrl,n=s?await this.options.resolveAsset(i):null,o=s?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(!o||s&&!n)throw new Error("seat_view_unavailable");return{url:o,...n?{previewUrl:n}:{},...s?{resolveUrl:this.options.resolveAsset}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.initialBearingDeg!==void 0?{initialBearingDeg:t.viewMeta.initialBearingDeg}:{},...t.viewMeta?.initialPitchDeg!==void 0?{initialPitchDeg:t.viewMeta.initialPitchDeg}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}}return{url:"",generated:!0,mediaKind:"model",coverage:"exact-seat",sourceLabel:f("picker.chartDerivedModel","Chart-derived model")}}closeSeatView(e=!0,t=!1){e&&(this.seatViewGeneration+=1);let i=this.seatViewElement;if(this.seatViewDispose?.(),this.seatViewDispose=null,this.seatViewElement=null,!!i){if(!t||this.reducedMotion()){i.remove();return}i.classList.add("is-leaving"),setTimeout(()=>i.remove(),190)}}findSeat(e){return this.options.seats().find(t=>t.id===e||t.label===e)}hasStage(){let e=this.options.doc();return e?(e.floors?.flatMap(i=>i.objects)??e.objects).some(i=>i.type==="shape"&&(i.role==="stage"||!!i.stageKind)):!1}prepareHostTheme(e,t){getComputedStyle(e).position==="static"&&(e.style.position="relative");let i=t.theme;e.style.setProperty("--sl-bg",i?.background??"#f6f7fb"),e.style.setProperty("--sl-surface","#ffffff"),e.style.setProperty("--sl-text",i?.textColor??"#10162a"),e.style.setProperty("--sl-muted","#697386"),e.style.setProperty("--sl-line","#d9deea"),e.style.setProperty("--sl-accent",i?.accent??"#ef4056"),e.style.setProperty("--sl-accent-ink",i?.accentInk??"#ffffff")}reducedMotion(){return globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}};var wn="https://api.seatlayer.io",hs=10;function kn(r){if(typeof r=="string"){let e=document.querySelector(r);if(!e)throw new Error(`seatmap: container "${r}" not found`);return e}if(!(r instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return r}var Vt=class{constructor(e){this.mount=null;this.hostEl=null;this.interactionEnabled_=!0;this.eventLocale=null;this.rendered=!1;this.mode_=null;this.eventInfo=null;this.categoryFilter_=null;this.accessibilityFilter_=null;this.hideLimitedView_=!1;this.focusedSection_=null;this.lastReportedViewRung_=null;this.tipEl=null;this.tipPos={x:0,y:0};this.onTipMove=null;this.realtime=null;if(!e||typeof e!="object")throw new Error("seatmap: options object is required");if(!e.container)throw new Error("seatmap: `container` is required");if(!e.event||typeof e.event!="string")throw new Error("seatmap: `event` key is required");this.opts=e,this.maxSelection_=e.maxSelection??hs,this.colorblindSafe_=e.colorblindSafe??!1;let t=!!(e.buyerAccessTokenProvider||e.buyerAccessToken||e.publicKey);this.accessState_={configured:t,status:t?"ready":"public"},this.publicKey=e.publicKey;let i={onExpired:a=>{this.accessState_={configured:!0,status:a.refreshed?"ready":"expired"},this.opts.onAccessExpired?.(a),this.notifyMapStateChange()},onUnavailable:a=>{this.accessState_={configured:!0,status:"unavailable",reason:a.reason},this.opts.onAccessUnavailable?.(a),this.notifyMapStateChange()}},s=(e.apiBase??wn).replace(/\/+$/,""),n=e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?Pt({base:s,event:e.event,publicKey:e.publicKey,accessHooks:i,apiOptions:{onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}}):null;this.access=n?.access??Fe(e,i);let o=n?.api??new be(s,{access:this.access??void 0,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)});this.api=o,this.controller=new $.PickerController({transport:o,eventKey:e.event,maxSelection:this.maxSelection_,selectedObjects:e.selectedObjects,selectableObjects:e.selectableObjects,numberOfPlacesToSelect:e.numberOfPlacesToSelect,selectionValidators:e.selectionValidators,currency:e.currency,onSelectionChange:a=>{this.immersive?.pushLiveState(),this.opts.onSelectionChange?.(a)},onSelectionValidityChange:a=>this.opts.onSelectionValidityChange?.(a),onSelectionValid:a=>this.opts.onSelectionValid?.(a),onSelectionInvalid:a=>this.opts.onSelectionInvalid?.(a),onSelectionLimit:a=>this.opts.onSelectionLimit?.(a),onHold:a=>this.opts.onHold?.({holdId:a.holdId,expiresAt:a.expiresAt,seats:a.seats,items:a.items}),onHoldRestored:a=>this.opts.onHoldRestored?.({holdId:a.holdId,expiresAt:a.expiresAt,seats:a.seats,items:a.items}),onHoldExpired:()=>this.opts.onHoldExpired?.(),onGAClick:a=>{let l=this.controller.getGAAreas().find(c=>c.id===a);l&&(this.opts.onGAClick?.(l),this.opts.onGAPrompt?.({area:l,selected:{},min:0,max:Math.max(0,Math.min(l.available,(this.opts.maxSelection??hs)-this.controller.getSelection().length)),tiers:At(l),confirm:c=>{let h=typeof c=="number"?c:Object.values(c).reduce((p,d)=>p+d,0);this.holdGA(l.id,h)},cancel:()=>{}}))},onError:a=>this.opts.onError?.(a),onDeckTap:a=>{this.opts.onDeckTap?.(a),this.notifyMapStateChange()},onHint:a=>this.opts.onHint?.(a),onSectionFocus:a=>{this.focusedSection_=a,this.opts.onSectionFocus?.(a),this.notifyMapStateChange()},onViewChange:()=>this.handleViewChange(),onStatusChange:()=>{this.immersive?.pushLiveState(),this.opts.onStatusChange?.()},onSalesClosed:()=>{this.eventInfo&&(this.eventInfo.salesClosed=!0),this.opts.onSalesClosed?.()},flashOnLiveChange:!0,onSeatHover:a=>{this.opts.onSeatHover?.(a),this.opts.seatTooltip!==!1&&this.updateTooltip(a)},colorblindSafe:e.colorblindSafe,mapTheme:e.mapTheme??null}),this.buyerAssetUrls=new Ge(e.event,(a,l)=>o.asset(a,l)),this.immersive=new Dt({host:()=>this.hostEl,doc:()=>this.controller.doc,seats:()=>this.controller.getExpandedSeats(),selection:()=>this.controller.getSelection(),status:a=>this.controller.getStatus(a),select:a=>this.controller.select([a]),deselect:a=>this.controller.deselect([a]),loadEventConfiguration:()=>this.controller.loadEventConfiguration(),resolveAsset:a=>this.buyerAssetUrls.resolve(a),enable3D:e.enable3D!==!1,enableSeatView:e.enableSeatView!==!1,max3DSeats:e.max3DSeats,restoreMap:()=>this.controller.refitCurrentView(),onViewChange:(a,l)=>{this.opts.onBuyerViewChange?.({view:a,...l?{seatId:l}:{}}),this.notifyMapStateChange()},onError:a=>this.opts.onError?.(a)}),this.lastReportedViewRung_=this.controller.getRung()}handleViewChange(){this.opts.onViewChange?.();let e=this.controller.getRung();e!==this.lastReportedViewRung_&&(this.lastReportedViewRung_=e,this.opts.onMapStateChange?.())}notifyMapStateChange(){this.lastReportedViewRung_=this.controller.getRung(),this.opts.onMapStateChange?.()}async render(){if(this.rendered)return this;this.rendered=!0,await(0,$.loadLocale)(this.opts.locale),this.opts.messages&&(0,$.setStringOverrides)(this.opts.messages),this.mount=kn(this.opts.container);let e=document.createElement("div");e.lang=(0,$.getLocale)(),e.dir=(0,$.localeDirection)(),e.style.width="100%",e.style.height="100%",e.style.position="relative",this.mount.appendChild(e),this.hostEl=e,this.applyInteractionState();let t=await this.controller.render(e);if(!t)return this.rendered=!1,this.opts.errorDisplay!=="none"&&this.showLoadFailure(e),this;if(this.eventLocale=t.locale??null,!this.opts.locale&&this.eventLocale&&await this.setLocale(this.eventLocale),this.buildLanguageSwitcher(e),this.controller.setViewMode(this.opts.initialView??"flat"),this.startRealtime(),this.mode_=t.mode==="test"?"test":"live",this.eventInfo={name:t.eventName,venue:t.venue??null,startsAt:t.startsAt??null,timezone:t.timezone??null,currency:t.currency??this.opts.currency??"USD",posterUrl:t.posterUrl??null,salesClosed:t.salesClosed},this.opts.seatTooltip!==!1){let i=document.createElement("div");i.setAttribute("role","tooltip"),i.style.cssText='position:absolute;z-index:7;pointer-events:none;display:none;max-width:240px;background:#10162a;color:#fff;border-radius:10px;padding:9px 12px;font:500 12px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 10px 30px -10px rgba(0,0,0,.5);',e.appendChild(i),this.tipEl=i,this.onTipMove=s=>{let n=e.getBoundingClientRect();this.tipPos={x:s.clientX-n.left,y:s.clientY-n.top},this.tipEl&&this.tipEl.style.display!=="none"&&this.placeTooltip()},e.addEventListener("mousemove",this.onTipMove)}if(t.mode==="test"&&this.opts.showTestModeIndicator!==!1){e.style.overflow="hidden";let i=document.createElement("div");i.dataset.slI18n="testMode",i.textContent=(0,$.t)("picker.testMode"),i.setAttribute("aria-label",(0,$.t)("picker.testMode")),i.style.cssText="position:absolute;top:18px;right:-34px;z-index:6;transform:rotate(45deg);width:140px;text-align:center;padding:4px 0;background:#f4b740;color:#1a1200;font:800 10.5px/1.4 -apple-system,BlinkMacSystemFont,sans-serif;letter-spacing:.12em;box-shadow:0 2px 8px rgba(0,0,0,.25);pointer-events:none;",e.appendChild(i)}return this.opts.showAttribution!==!1&&this.buildBadge(e),this}buildBadge(e){if(this.controller.doc?.theme?.hideBadge)return;let t=document.createElement("a");t.dataset.slI18n="badge",t.href="https://seatlayer.io",t.target="_blank",t.rel="noopener noreferrer",t.setAttribute("aria-label",(0,$.t)("picker.poweredBy")),t.style.cssText='position:absolute;bottom:10px;right:12px;z-index:5;display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.92);color:#4a5163;text-decoration:none;font:600 11px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.02em;box-shadow:0 2px 8px rgba(0,0,0,.12);';let i=document.createElement("span");i.setAttribute("aria-hidden","true"),i.style.cssText="width:16px;height:16px;border-radius:4px;flex:none;display:flex;align-items:center;justify-content:center;background:#0c1220;color:#fcf7ee",i.innerHTML=Mt;let s=document.createElement("span");s.textContent=(0,$.t)("picker.poweredBy"),t.append(i,s),e.appendChild(t)}placeTooltip(){if(!this.tipEl||!this.hostEl)return;let e=this.hostEl.clientWidth,t=this.tipEl.offsetWidth,i=this.tipEl.offsetHeight,s=this.tipPos.x+14,n=this.tipPos.y-i-12;s+t>e-8&&(s=this.tipPos.x-t-14),n<8&&(n=this.tipPos.y+18),this.tipEl.style.left=`${Math.max(8,s)}px`,this.tipEl.style.top=`${Math.max(8,n)}px`}updateTooltip(e){if(!this.tipEl)return;if(!e){this.tipEl.style.display="none";return}let t=(0,$.formatMoney)(e.price,e.currency,{...Number.isInteger(e.price)?{minimumFractionDigits:0,maximumFractionDigits:0}:{},locale:this.opts.locale,fallback:(l,c)=>`${l} ${c}`}),i=document.createElement("div");i.style.cssText="font-weight:700;font-size:13px",i.textContent=e.label;let s=document.createElement("div");s.style.cssText="display:flex;align-items:center;gap:6px;margin-top:4px;color:#c7cddc";let n=document.createElement("span");n.style.cssText="width:9px;height:9px;border-radius:50%;flex:none",n.style.background=e.categoryColor;let o=document.createElement("span");o.textContent=e.categoryLabel;let a=document.createElement("span");if(a.style.cssText="margin-left:auto;font-weight:700;color:#fff",a.textContent=t,s.append(n,o,a),this.tipEl.replaceChildren(i,s),e.status!=="free"){let l=document.createElement("div");l.style.cssText="margin-top:5px;font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:#fca5a5;font-weight:700",l.textContent=e.status==="held"?(0,$.t)("map.statusHeld"):(0,$.t)("map.statusTaken"),this.tipEl.appendChild(l)}this.tipEl.style.display="block",this.placeTooltip()}buildLanguageSwitcher(e){let t=(this.opts.languages??[]).map(s=>(0,$.resolveLocale)(s)).filter((s,n,o)=>o.indexOf(s)===n);if(t.length<2)return;let i=document.createElement("select");i.setAttribute("aria-label",(0,$.t)("picker.preferredTicketType")),i.style.cssText='position:absolute;bottom:10px;left:12px;z-index:5;appearance:none;padding:5px 9px;border-radius:999px;border:0;cursor:pointer;background:rgba(255,255,255,.92);color:#4a5163;font:600 11px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 2px 8px rgba(0,0,0,.12);';for(let s of t){let n=document.createElement("option");n.value=s,n.textContent=$.LOCALE_NAMES[s]??s,n.selected=s===(0,$.getLocale)(),i.appendChild(n)}i.addEventListener("change",()=>{this.setLocale(i.value)}),e.appendChild(i)}async setLocale(e){let t=(0,$.getLocale)(),i=await(0,$.loadLocale)(e);if(this.opts.messages&&(0,$.setStringOverrides)(this.opts.messages),i===t)return i;if(this.hostEl){this.hostEl.lang=i,this.hostEl.dir=(0,$.localeDirection)();for(let s of this.hostEl.querySelectorAll("[data-sl-i18n]"))if(s.dataset.slI18n==="testMode")s.textContent=(0,$.t)("picker.testMode"),s.setAttribute("aria-label",(0,$.t)("picker.testMode"));else if(s.dataset.slI18n==="badge"){s.setAttribute("aria-label",(0,$.t)("picker.poweredBy"));let n=s.querySelector("span:last-child");n&&(n.textContent=(0,$.t)("picker.poweredBy"))}}return this.controller.refreshMapCopy(),i}getMode(){return this.mode_}getPickerState(){let e=this.controller.doc,t=e?.theme??{},i=this.controller.categoryAvailability(),s=this.controller.getGAAreas(),n=this.controller.getFloors(),o=e?.floors?.flatMap(l=>l.objects)??e?.objects??[],a=new Map;for(let l of o)l.type==="section"&&a.set(l.id,{id:l.id,label:l.label,...l.displayLabel?{displayLabel:l.displayLabel}:{},...l.zone?{zoneId:l.zone}:{}});return{event:{key:this.opts.event,name:this.eventInfo?.name??e?.name??this.opts.event,venue:this.eventInfo?.venue??null,startsAt:this.eventInfo?.startsAt??null,timezone:this.eventInfo?.timezone??null,currency:this.eventInfo?.currency??this.opts.currency??"USD",locale:(0,$.getLocale)()||this.eventLocale,posterUrl:this.eventInfo?.posterUrl??null,mode:this.mode_??"live",salesClosed:this.eventInfo?.salesClosed??!1},branding:{...t.accent?{accent:t.accent}:{},...t.accentInk?{accentInk:t.accentInk}:{},...t.background?{background:t.background}:{},...t.textColor?{textColor:t.textColor}:{},...t.brandName?{brandName:t.brandName}:{},...t.logoUrl?{logoUrl:t.logoUrl}:{},attributionRequired:!t.hideBadge},features:{ga:s.length>0,tiers:!!e?.categories.some(l=>l.tiers?.length),floors:n.length>1,zones:!!e?.zones?.length,sections:a.size>0,bestAvailable:!0,accessibilityFilter:!0,limitedViewFilter:!0,venue3d:this.immersive.canOffer3D(),seatView:this.immersive.canOfferSeatView()},catalog:{categories:(e?.categories??[]).filter(l=>!l.notForSale).map(l=>({key:l.key,label:l.label,color:l.color,price:l.price??l.tiers?.[0]?.price??0,available:i[l.key]??0,tiers:(l.tiers??[]).map(c=>({id:c.id,name:c.name,price:c.price,...c.currency?{currency:c.currency}:{}}))})),zones:(e?.zones??[]).map(l=>({id:l.id,label:l.label,...l.color?{color:l.color}:{}})),sections:[...a.values()],gaAreas:s,bestAvailableZones:this.controller.getBestAvailableZones()},map:{floors:n,activeFloorId:this.controller.getActiveFloorId()||n[0]?.id||null,rung:this.controller.getRung(),focusedSectionId:this.controller.getFocusedSection(),focusedSection:this.focusedSection_,viewMode:this.controller.getViewMode(),buyerView:this.immersive.buyerView,view3dTargetSeatId:this.immersive.targetSeatId,view3dNavigationMode:this.immersive.navigationMode,colorblindSafe:this.colorblindSafe_,categoryFilter:this.categoryFilter_?[...this.categoryFilter_]:null,accessibilityFilter:this.accessibilityFilter_?[...this.accessibilityFilter_]:null,hideLimitedView:this.hideLimitedView_},selection:{seats:this.controller.getSelection(),validity:this.controller.getSelectionValidity(),maxSelection:this.maxSelection_},access:{...this.accessState_}}}getCategoryAvailability(){return this.controller.categoryAvailability()}getBestAvailableZones(){return this.controller.getBestAvailableZones()}getActiveFloorId(){return this.controller.getActiveFloorId()||null}getRung(){return this.controller.getRung()}getFocusedSection(){return this.controller.getFocusedSection()}focusSection(e){if(this.immersive.buyerView==="venue3d"&&this.immersive.focusSection(e)){this.notifyMapStateChange();return}this.controller.focusSection(e),this.notifyMapStateChange()}overview(){if(this.immersive.focusOverview()){this.notifyMapStateChange();return}this.controller.overview(),this.notifyMapStateChange()}setRung(e){this.controller.setRung(e),this.notifyMapStateChange()}setCategoryFilter(e,t=!1){this.categoryFilter_=e?[...e]:null,this.controller.setCategoryFilter(e),t&&this.controller.focusCategoryFilter(e),this.notifyMapStateChange()}setAccessibilityFilter(e){this.accessibilityFilter_=e?[...e]:null,this.controller.setAccessibilityFilter(e),this.notifyMapStateChange()}setCommercialLimitedFilter(e){this.hideLimitedView_=e,this.controller.setCommercialLimitedFilter(e),this.notifyMapStateChange()}getSelection(){return this.controller.getSelection()}selectObjects(e){let t=this.controller.select(e);return this.immersive.pushLiveState(),t}deselectObjects(e){this.controller.deselect(e),this.immersive.pushLiveState()}clearSelection(){this.controller.clearSelection(),this.immersive.pushLiveState()}selectCategories(e){return this.controller.selectCategories(e)}deselectCategories(e){this.controller.deselectCategories(e)}setSelectableObjects(e){this.controller.setSelectableObjects(e)}setMaxSelection(e){this.maxSelection_=e,this.controller.setMaxSelection(e),this.notifyMapStateChange()}getSelectionValidity(){return this.controller.getSelectionValidity()}async hold(e={}){try{return await this.holdOrThrow(e)}catch(t){return this.opts.onError?.(t),null}}async holdOrThrow(e={}){let t=this.controller.getSelectionValidity();if(t&&!t.isValid){let s=t.violations.includes("numberOfPlacesToSelect");throw Object.assign(new Error(s?`seatmap: select exactly ${t.required} places before holding`:"seatmap: adjust the ticket selection before holding"),{code:s?"selection_count_mismatch":"selection_invalid",selection:t})}let i=await this.controller.hold(void 0,e.ttlMs);return i?{holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items}:null}async resumeHold(e){try{return await this.resumeHoldOrThrow(e)}catch(t){return this.opts.onError?.(t),null}}async resumeHoldOrThrow(e){let t=await this.controller.resumeHold(e);return t?{holdId:t.holdId,expiresAt:t.expiresAt,seats:t.seats,items:t.items}:null}async extendHold(e){try{let t=await this.controller.extendHold(e);return t?{holdId:t.holdId,expiresAt:t.expiresAt,seats:t.seats,items:t.items}:null}catch(t){return this.opts.onError?.(t),null}}getCurrentHold(){let e=this.controller.currentHold();return e?{holdId:e.holdId,expiresAt:e.expiresAt,seats:e.seats,items:e.items}:null}getGAAreas(){return this.controller.getGAAreas()}async holdGA(e,t,i={}){try{return await this.holdGAOrThrow(e,t,i)}catch(s){return this.opts.onError?.(s),null}}async holdGAOrThrow(e,t,i={}){let s=await this.controller.holdGA(e,t,i);return s?{holdId:s.holdId,expiresAt:s.expiresAt,seats:s.seats,items:s.items}:null}async bestAvailable(e,t,i={}){try{return await this.bestAvailableOrThrow(e,t,i)}catch(s){return this.opts.onError?.(s),null}}async bestAvailableOrThrow(e,t,i={}){let s=await this.controller.bestAvailable(e,t,i);return s?{holdId:s.holdId,expiresAt:s.expiresAt,labels:s.labels,seats:s.seats,items:s.items,...i.zoneId?{zoneId:i.zoneId}:{}}:null}setSeatTier(e,t){this.controller.setSeatTier(e,t)}setTableQuantity(e,t){return this.controller.setTableQuantity(e,t)}async replaceTableQuantity(e,t,i){try{return await this.replaceTableQuantityOrThrow(e,t,i)}catch(s){return this.opts.onError?.(s),null}}async replaceTableQuantityOrThrow(e,t,i){let s=await this.controller.replaceTableQuantity(e,t,i);return s?{holdId:s.holdId,expiresAt:s.expiresAt,seats:s.seats,items:s.items}:null}getFloors(){return this.controller.getFloors()}setFloor(e){if(this.immersive.buyerView==="venue3d"&&this.immersive.focusFloor(e)){this.notifyMapStateChange();return}if(this.controller.getFloors().length<=1){console.warn("seatmap: setFloor() ignored \u2014 this chart has a single floor");return}this.controller.setFloor(e),this.notifyMapStateChange()}setColorblindSafe(e){this.colorblindSafe_=e,this.controller.setColorblindSafe(e),this.notifyMapStateChange()}setViewMode(e){this.controller.setViewMode(e),this.notifyMapStateChange()}getViewMode(){return this.controller.getViewMode()}zoomIn(){this.immersive.zoomIn()||(this.controller.zoomIn(),this.notifyMapStateChange())}zoomOut(){this.immersive.zoomOut()||(this.controller.zoomOut(),this.notifyMapStateChange())}zoomToFit(){this.immersive.focusOverview()||(this.controller.zoomToFit(),this.notifyMapStateChange())}setBuyerView(e,t){return this.immersive.setBuyerView(e,t)}getBuyerView(){return this.immersive.buyerView}openSeatView(e){return this.immersive.openSeatView(e)}setVenue3DNavigationMode(e){if(!this.immersive.setNavigationMode(e))throw new Error("venue_3d_not_active")}setInteractionEnabled(e){this.interactionEnabled_=e,this.applyInteractionState()}applyInteractionState(){let e=this.hostEl;e&&(e.style.pointerEvents=this.interactionEnabled_?"":"none",e.toggleAttribute("inert",!this.interactionEnabled_),this.interactionEnabled_?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden","true"))}async release(){await this.controller.release()}async releaseLabels(e){return this.controller.releaseLabels(e)}startRealtime(){!this.access?.configured||this.realtime||(this.realtime=new oe({url:this.api.subscribeUrl(this.opts.event),mintTicket:()=>this.api.subscribeTicket(this.opts.event),onAccessUnavailable:e=>this.opts.onAccessUnavailable?.(e),sink:Be(this.controller,{flashOnLiveChange:!0,onStatusChange:()=>{this.immersive.pushLiveState(),this.opts.onStatusChange?.()},onSelectedObjectUnavailable:(e,t)=>this.opts.onSelectedObjectUnavailable?.({labels:e,reason:t})})}),this.realtime.start())}async refreshAvailability(){await this.controller.refresh(),this.immersive.pushLiveState(),this.opts.onStatusChange?.()}async refreshAccess(){if(!this.access?.configured)return!1;let e=await this.access.refresh("manual");return e&&(this.accessState_={configured:!0,status:"ready"},await this.controller.refresh(),this.realtime?.restart(),this.realtime||this.startRealtime()),this.notifyMapStateChange(),e}showLoadFailure(e){let t=document.createElement("div");t.setAttribute("role","status"),t.style.cssText='display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;min-height:180px;box-sizing:border-box;padding:24px;text-align:center;font:500 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#3b4256;';let i=document.createElement("div");i.textContent="The seat map didn\u2019t load.",t.appendChild(i);let s=document.createElement("button");s.type="button",s.textContent="Try again",s.style.cssText="appearance:none;border:1px solid #c9cede;background:#fff;color:#10162a;border-radius:8px;padding:8px 16px;font:600 13px/1 inherit;cursor:pointer;",s.addEventListener("click",()=>{this.destroy(),this.render().catch(n=>this.opts.onError?.(n))}),t.appendChild(s),e.appendChild(t)}destroy(){this.immersive.destroy(),this.buyerAssetUrls.dispose(),this.realtime?.stop(),this.realtime=null,this.access?.clear(),this.hostEl&&this.onTipMove&&this.hostEl.removeEventListener("mousemove",this.onTipMove),this.tipEl=null,this.onTipMove=null,this.controller.destroy(),this.hostEl&&this.hostEl.parentNode&&this.hostEl.parentNode.removeChild(this.hostEl),this.hostEl=null,this.mount=null,this.rendered=!1,this.mode_=null,this.eventInfo=null,this.focusedSection_=null}};var di=["hold","resumeHold","getCurrentHold","getGAAreas","holdGA","bestAvailable","release","releaseLabels","getSelection","selectObjects","deselectObjects","clearSelection","selectCategories","deselectCategories","setSelectableObjects","setMaxSelection","getSelectionValidity","setSeatTier","getFloors","setFloor","setColorblindSafe","zoomIn","zoomOut","zoomToFit","refreshAccess"],Sn={hold:()=>Promise.resolve(null),resumeHold:()=>Promise.resolve(null),getCurrentHold:()=>null,getGAAreas:()=>[],holdGA:()=>Promise.resolve(null),bestAvailable:()=>Promise.resolve(null),release:()=>Promise.resolve(),releaseLabels:()=>Promise.resolve(!1),getSelection:()=>[],selectObjects:()=>[],deselectObjects:()=>{},clearSelection:()=>{},selectCategories:()=>[],deselectCategories:()=>{},setSelectableObjects:()=>{},setMaxSelection:()=>{},getSelectionValidity:()=>null,setSeatTier:()=>{},getFloors:()=>[],setFloor:()=>{},setColorblindSafe:()=>{},zoomIn:()=>{},zoomOut:()=>{},zoomToFit:()=>{},refreshAccess:()=>Promise.resolve(!1)};function us(r){let e={};for(let t of di)e[t]=(...i)=>{let s=r();return s?s[t](...i):Sn[t]()};return e}var pi=["event","apiBase","maxSelection","numberOfPlacesToSelect","selectionValidators","publicKey","locale","currency","colorblindSafe","initialView","errorDisplay"],hi=[...pi,"selectedObjects","selectableObjects","messages","seatTooltip","buyerAccessTokenProvider","buyerAccessToken"],ui=["onSelectionChange","onSelectionValidityChange","onSelectionValid","onSelectionInvalid","onSelectionLimit","onHold","onHoldRestored","onHoldExpired","onGAClick","onGAPrompt","onError","onDeckTap","onHint","onSeatHover","onAccessExpired","onAccessUnavailable","onSelectedObjectUnavailable"];function ms(r,e,t){let i={container:r};for(let s of hi)i[s]=e[s];for(let s of ui)i[s]=t[s];return i}var Cn=new Set(["seatlayer.designer.ready","seatlayer.designer.saved","seatlayer.designer.published","seatlayer.designer.close","seatlayer.designer.error"]),En=2e4,Tn=480,Pn=180*1e3,An=900*1e3,Mn=.8,Ln=30*1e3,Hn=1e5,Rn=4,On=50;function mi(r){if(typeof r!="string")return r;let e=document.querySelector(r);if(!e)throw new Error(`EmbeddedDesigner container not found: ${r}`);return e}function In(r){let e=(r??"").toLowerCase();return e.includes("expire")||e.includes("revoke")||e==="401"?"expired":e.includes("mismatch")?"mismatch":e.includes("timeout")?"timeout":"load"}var _n={expired:{title:"This design session expired",body:"For your security, editing sessions are short-lived. Start a fresh one to keep designing."},mismatch:{title:"This editor doesn't match this chart",body:"The session that loaded belongs to a different chart or workspace. Reopen the designer to continue."},timeout:{title:"The designer is taking too long",body:"It did not finish loading in time. This is usually a slow connection \u2014 try again."},load:{title:"We couldn't load the designer",body:"Something went wrong while opening the editor. Please try again."}},Ft=class{constructor(e){this.frame=null;this.designerOrigin="";this.overlay=null;this.timeoutTimer=null;this.renewTimer=null;this.autoRecoverUsed=!1;this.phase="loading";this.identityEstablished=!1;this.restoreContainerPosition=null;this.pinned=!1;this.frameStyleBeforeFs=null;this.docOverflowBeforeFs=null;this.bodyOverflowBeforeFs=null;this.fsKeyHandler=null;this.lastAutoHeight="";this.fillRaf=null;this.reprobeRaf=null;this.fillListening=!1;this.containerEl=null;this.fillMode=null;this.resizeObs=null;this.scheduleFill=()=>{this.fillRaf===null&&(this.fillRaf=requestAnimationFrame(()=>{this.fillRaf=null,this.applyFill()}))};this.scheduleReprobe=()=>{this.reprobeRaf===null&&(this.reprobeRaf=requestAnimationFrame(()=>{this.reprobeRaf=null,!this.pinned&&(this.fillMode=this.detectFillMode(),this.syncContainerObserver(),this.applyFill())}))};this.handleMessage=e=>{if(!this.frame||e.origin!==this.designerOrigin||e.source!==this.frame.contentWindow||!e.data||typeof e.data!="object")return;let t=e.data;if(t.type==="seatlayer.designer.handshake"&&typeof t.nonce=="string"&&t.nonce.length<=128){this.frame.contentWindow?.postMessage({type:"seatlayer.designer.parent",nonce:t.nonce},this.designerOrigin);return}if(t.type==="seatlayer.designer.resize"){!this.fillEnabled()&&this.autoResizeEnabled()&&typeof t.px=="number"&&Number.isFinite(t.px)&&t.px>0&&(this.lastAutoHeight=`${Math.round(t.px)}px`,this.pinned||this.setFrameHeight(this.lastAutoHeight));return}if(t.type==="seatlayer.designer.fullscreen"){t.on===!0?this.pinFullscreen():t.on===!1&&this.unpinFullscreen();return}if(typeof t.type!="string"||!Cn.has(t.type))return;let i={type:t.type,chartId:typeof t.chartId=="string"?t.chartId:void 0,workspaceId:typeof t.workspaceId=="string"?t.workspaceId:void 0,expiresAt:typeof t.expiresAt=="number"?t.expiresAt:void 0,code:typeof t.code=="string"?t.code:void 0,message:typeof t.message=="string"?t.message:void 0,meta:t.meta,fatal:typeof t.fatal=="boolean"?t.fatal:void 0,action:typeof t.action=="string"?t.action:void 0},s=this.identityEstablished||i.type==="seatlayer.designer.ready"||i.type==="seatlayer.designer.saved"||i.type==="seatlayer.designer.published"||i.type==="seatlayer.designer.close",n=this.options.expectedChartId!==void 0&&i.chartId!==this.options.expectedChartId&&(s||i.chartId!==void 0),o=this.options.expectedWorkspaceId!==void 0&&i.workspaceId!==this.options.expectedWorkspaceId&&(s||i.workspaceId!==void 0);if(n||o){this.showError("mismatch");return}switch(i.type){case"seatlayer.designer.ready":this.identityEstablished=!0,this.sessionExpiresAt=i.expiresAt,this.phase="ready",this.clearTimeoutTimer(),this.removeOverlay(),this.autoRecoverUsed=!1,this.scheduleRenewal(i.expiresAt),this.options.onReady?.(i);break;case"seatlayer.designer.saved":this.options.onSaved?.(i);break;case"seatlayer.designer.published":this.options.onPublished?.(i);break;case"seatlayer.designer.close":this.options.onClose?.(i);break;case"seatlayer.designer.error":{let a=In(i.code);if(a==="expired"&&this.autoRenewEnabled()&&!this.autoRecoverUsed){this.autoRecoverUsed=!0,this.clearRenewTimer(),this.options.onRequestRelaunch();return}(typeof i.fatal=="boolean"?i.fatal:a!=="load"||this.phase!=="ready")&&this.showError(a),this.options.onError?.(i);break}}};this.options=e}mount(){this.destroy();let e=new URL(this.options.designerUrl,window.location.href);if(e.protocol!=="https:"&&e.hostname!=="localhost"&&e.hostname!=="127.0.0.1")throw new Error("EmbeddedDesigner requires an HTTPS designerUrl outside local development.");this.designerOrigin=e.origin;let t=document.createElement("iframe");t.title=this.options.title??"Venue chart Designer",t.allow=this.options.allow??"fullscreen; clipboard-write",t.referrerPolicy=this.options.referrerPolicy??"origin",t.src=e.toString(),t.style.setProperty("width","100%","important"),t.style.setProperty("height",typeof this.options.height=="number"?`${this.options.height}px`:"100%","important"),t.style.border="0",Object.assign(t.style,this.options.style),this.options.className&&(t.className=this.options.className);let i=mi(this.options.container);if(this.containerEl=i,window.addEventListener("message",this.handleMessage),i.append(t),this.frame=t,this.fillEnabled()&&this.startFill(),this.phase="loading",this.loadingStateEnabled()){this.ensureContainerPositioned(i),this.renderOverlay(i,"loading");let s=this.options.loadingTimeoutMs??En;s>0&&Number.isFinite(s)&&(this.timeoutTimer=setTimeout(()=>{this.phase==="loading"&&this.showError("timeout")},s))}return t}setDesignerUrl(e){return this.options={...this.options,designerUrl:e},this.mount()}getIframe(){return this.frame}setSizing(e,t){this.options={...this.options,height:e,minHeight:t},this.frame&&(this.stopFill(),this.lastAutoHeight="",this.fillEnabled()?(this.pinned||this.setFrameHeight("100%"),this.startFill()):this.pinned||this.setFrameHeight(`${e}px`))}setRelaunchPolicy(e,t){this.options={...this.options,onRequestRelaunch:e,autoRenewSession:t},this.clearRenewTimer(),this.phase==="ready"&&this.scheduleRenewal(this.sessionExpiresAt)}destroy(){window.removeEventListener("message",this.handleMessage),this.stopFill(),this.unpinFullscreen(),this.clearTimeoutTimer(),this.clearRenewTimer(),this.removeOverlay(),this.restoreContainerStyle(),this.frame?.remove(),this.frame=null,this.containerEl=null,this.fillMode=null,this.designerOrigin="",this.phase="loading",this.identityEstablished=!1,this.sessionExpiresAt=void 0,this.lastAutoHeight=""}loadingStateEnabled(){return this.options.showLoadingState!==!1}autoResizeEnabled(){return this.options.autoResize!==!1}fillEnabled(){return typeof this.options.height!="number"}setFrameHeight(e){this.frame?.style.setProperty("height",e,"important")}detectFillMode(){let e=this.containerEl,t=this.frame;if(this.pinned||!e||!t)return this.fillMode??"viewport";let i=()=>e.getBoundingClientRect().height,s=t.style.getPropertyValue("height"),n=t.style.getPropertyPriority("height");t.style.setProperty("height","0px","important");let o=i();t.style.setProperty("height",`${Hn}px`,"important");let a=i();return s?t.style.setProperty("height",s,n):t.style.removeProperty("height"),!(a-o>Rn)&&o>=On?"container":"viewport"}applyFill(){if(!this.frame||this.pinned)return;let e=this.options.minHeight??Tn;if(this.fillMode==="container"&&this.containerEl){let s=Math.max(e,Math.round(this.containerEl.getBoundingClientRect().height));this.setFrameHeight(`${s}px`);return}let t=this.frame.getBoundingClientRect().top,i=Math.max(e,Math.round(window.innerHeight-t));this.setFrameHeight(`${i}px`)}syncContainerObserver(){let e=this.fillMode==="container"&&!!this.containerEl&&typeof ResizeObserver<"u";e&&!this.resizeObs?(this.resizeObs=new ResizeObserver(()=>this.scheduleFill()),this.resizeObs.observe(this.containerEl)):!e&&this.resizeObs&&(this.resizeObs.disconnect(),this.resizeObs=null)}startFill(){this.fillMode=this.detectFillMode(),this.syncContainerObserver(),this.applyFill(),!this.fillListening&&(this.fillListening=!0,window.addEventListener("resize",this.scheduleReprobe),window.addEventListener("orientationchange",this.scheduleReprobe),window.addEventListener("scroll",this.scheduleFill,{passive:!0}))}stopFill(){this.fillRaf!==null&&(cancelAnimationFrame(this.fillRaf),this.fillRaf=null),this.reprobeRaf!==null&&(cancelAnimationFrame(this.reprobeRaf),this.reprobeRaf=null),this.resizeObs&&(this.resizeObs.disconnect(),this.resizeObs=null),this.fillListening&&(this.fillListening=!1,window.removeEventListener("resize",this.scheduleReprobe),window.removeEventListener("orientationchange",this.scheduleReprobe),window.removeEventListener("scroll",this.scheduleFill))}pinFullscreen(){if(this.pinned||!this.frame)return;this.pinned=!0,this.frameStyleBeforeFs=this.frame.getAttribute("style");let e={position:"fixed",top:"0",right:"0",bottom:"0",left:"0",width:"100vw",height:"100vh",margin:"0",border:"0","z-index":"2147483000",background:"#101625"};for(let[i,s]of Object.entries(e))this.frame.style.setProperty(i,s,"important");let t=document.documentElement;this.docOverflowBeforeFs=t.style.overflow,t.style.overflow="hidden",document.body&&(this.bodyOverflowBeforeFs=document.body.style.overflow,document.body.style.overflow="hidden"),this.fsKeyHandler=i=>{i.key==="Escape"&&this.unpinFullscreen()},window.addEventListener("keydown",this.fsKeyHandler)}unpinFullscreen(){this.pinned&&(this.pinned=!1,this.frame&&(this.frameStyleBeforeFs===null?this.frame.removeAttribute("style"):this.frame.setAttribute("style",this.frameStyleBeforeFs),this.fillEnabled()?this.applyFill():this.autoResizeEnabled()&&this.lastAutoHeight?this.setFrameHeight(this.lastAutoHeight):typeof this.options.height=="number"&&this.setFrameHeight(`${this.options.height}px`)),this.frameStyleBeforeFs=null,this.docOverflowBeforeFs!==null&&(document.documentElement.style.overflow=this.docOverflowBeforeFs,this.docOverflowBeforeFs=null),this.bodyOverflowBeforeFs!==null&&document.body&&(document.body.style.overflow=this.bodyOverflowBeforeFs,this.bodyOverflowBeforeFs=null),this.fsKeyHandler&&(window.removeEventListener("keydown",this.fsKeyHandler),this.fsKeyHandler=null))}clearTimeoutTimer(){this.timeoutTimer!==null&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)}autoRenewEnabled(){return!!this.options.onRequestRelaunch&&this.options.autoRenewSession!==!1}clearRenewTimer(){this.renewTimer!==null&&(clearTimeout(this.renewTimer),this.renewTimer=null)}scheduleRenewal(e){if(this.clearRenewTimer(),!this.autoRenewEnabled()||typeof e!="number"||!Number.isFinite(e))return;let t=e-Date.now();if(t<=0)return;let i=t<An?t*Mn:t-Pn,s=Math.max(Ln,i);this.renewTimer=setTimeout(()=>{this.renewTimer=null,this.autoRenewEnabled()&&this.options.onRequestRelaunch()},s)}ensureContainerPositioned(e){getComputedStyle(e).position==="static"&&(this.restoreContainerPosition=e.style.position,e.style.position="relative")}restoreContainerStyle(){if(this.restoreContainerPosition!==null){try{mi(this.options.container).style.position=this.restoreContainerPosition}catch{}this.restoreContainerPosition=null}}removeOverlay(){this.overlay?.remove(),this.overlay=null}showError(e){if(this.phase="error",this.clearTimeoutTimer(),!this.loadingStateEnabled())return;let t;try{t=mi(this.options.container)}catch{return}this.renderOverlay(t,"error",e)}handleTryAgain(){if(this.options.onRequestRelaunch){this.options.onRequestRelaunch();return}this.mount()}renderOverlay(e,t,i){this.removeOverlay();let s=document.createElement("div");s.setAttribute("data-seatlayer-designer-overlay",t),s.setAttribute("role",t==="error"?"alert":"status"),s.setAttribute("aria-live","polite"),Object.assign(s.style,{position:"absolute",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",background:"#101625",color:"#e6ebf5",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',zIndex:"2",overflow:"hidden"}),t==="loading"?this.buildSkeleton(s):this.buildErrorCard(s,i??"load"),e.append(s),this.overlay=s}buildSkeleton(e){let t=document.createElement("style");t.textContent=`
|
|
2147
|
+
`;function tt(){if(document.getElementById(Br))return;let r=document.createElement("style");r.id=Br,r.textContent=Io+$r+Dr+_r+vr,document.head.appendChild(r)}var Gr=require("@seatlayer/core"),Ur=require("@seatlayer/core/core/cdnAsset");var Vo=require("@seatlayer/core/core/cdnAsset");function f(r,e){let t=(0,Gr.t)(r);return t===r?e:t}function Kr(r){if(typeof r=="string"){let e=document.querySelector(r);if(!e)throw new Error(`seatmap: container "${r}" not found`);return e}if(!(r instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return r}function O(r){return String(r??"").replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function qr(r,e,t){let i=e.find(n=>Je(n))??null;if(r.replaceChildren(),!i)return r.textContent=t.slice(0,1).toUpperCase(),null;let s=document.createElement("img");return s.alt="",s.referrerPolicy="no-referrer",s.src=i,r.appendChild(s),i}var it=null;function Ut(){if(it!==null)return it;try{if(typeof document>"u")return it=!1;it=!!document.createElement("canvas").getContext("webgl2")}catch{it=!1}return it}function Ii(r){return(0,Ur.cdnAssetUrl)(r)}async function Kt(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(Ii("seatlayer-view3d.mjs")):import("@seatlayer/core/view3d")}async function qt(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(Ii("seatlayer-panorama.mjs")):import("@seatlayer/core")}async function Wr(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(Ii("seatlayer-checkout.mjs")):Promise.resolve().then(()=>(jr(),Fr))}function Yr(r){return r==="unavailable_for_event"||r==="payments_off_for_event"?r:"not_configured"}function Wt(r,e,t){let i={month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},s=new Date(r);if(e)try{return s.toLocaleString(t,{...i,timeZone:e})}catch{}return s.toLocaleString(t,i)}async function Yt(r,e){let t=r.overlay.productionElements;if(!t?.some(s=>s.contentImageUrl))return r;let i=await Promise.all(t.map(async s=>{if(!s.contentImageUrl)return s;try{let n=await e(s.contentImageUrl);if(!n){let{contentImageUrl:o,...a}=s;return a}return{...s,runtimeContentImageUrl:n}}catch{let{contentImageUrl:n,...o}=s;return o}}));return{...r,overlay:{...r.overlay,productionElements:i}}}async function Qt(r,e){if(r)try{let t=await e(r);return t?await(await fetch(t)).arrayBuffer():void 0}catch{return}}var Ae=require("@seatlayer/core/view/panoramaDelivery");function Xt(r){let{root:e,source:t,caption:i,real:s,closeLabel:n,dragHint:o,viewFromSeatLabel:a,real360Label:l,previewLabel:c,resolveAsset:h,onClose:p}=r,d=document.createElement("div");d.className="sl-view sl-mo-zoom",d.setAttribute("role","dialog"),d.setAttribute("aria-label",a),d.innerHTML='<div class="sl-view-head"><span class="sl-view-title"></span><span class="sl-view-cap"></span><button type="button" class="sl-view-x"><svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button></div><div class="sl-view-pano"><span class="sl-view-badge"></span><span class="sl-view-hint"></span></div>',d.querySelector(".sl-view-title").textContent=a,d.querySelector(".sl-view-cap").textContent=i,d.querySelector(".sl-view-x").setAttribute("aria-label",n),d.querySelector(".sl-view-badge").textContent=s?l:c,d.querySelector(".sl-view-hint").textContent=o,e.appendChild(d);let u=d.querySelector(".sl-view-pano"),g=(0,Ae.planPanoramaDelivery)(t,(0,Ae.browserPanoramaConstraints)()),b=new AbortController;u.style.backgroundImage=`url(${JSON.stringify(g.initialUrl)})`;let x=()=>{};g.upgradeUrl&&(x=(0,Ae.schedulePanoramaUpgrade)(()=>{h(g.upgradeUrl).then(E=>!E||b.signal.aborted?null:(0,Ae.loadPanoramaImage)(E,b.signal).then(()=>E)).then(E=>{!E||!d.isConnected||b.signal.aborted||(u.style.backgroundImage=`url(${JSON.stringify(E)})`)}).catch(()=>{})}));let k=70,S=35,C=1,A=u.clientHeight||1,M=u.clientWidth||1,P=-(A*(180/k)*2/2-M/2),R=0,m=()=>{let E=u.clientHeight||1,$=E*(180/k)*C,N=Math.max(0,$-E),ht=Math.min(N/2,S/180*$);R=Math.min(ht,Math.max(-ht,R)),u.style.backgroundSize=`auto ${$}px`,u.style.backgroundPosition=`${P}px ${R-N/2}px`};m();let v=!1,D=0,K=0,j=E=>{v=!0,D=E.clientX,K=E.clientY,u.classList.add("drag"),u.setPointerCapture?.(E.pointerId)},G=E=>{v&&(P+=E.clientX-D,R+=E.clientY-K,D=E.clientX,K=E.clientY,m())},U=E=>{v=!1,u.classList.remove("drag"),u.releasePointerCapture?.(E.pointerId)},ae=E=>{E.preventDefault(),C=Math.min(2.4,Math.max(1,C+(E.deltaY<0?.12:-.12))),m()};u.addEventListener("pointerdown",j),u.addEventListener("pointermove",G),u.addEventListener("pointerup",U),u.addEventListener("pointercancel",U),u.addEventListener("wheel",ae,{passive:!1});let le=d.querySelector(".sl-view-x");le.addEventListener("click",p);let ce=E=>{E.key==="Escape"&&(E.stopPropagation(),p())};return d.addEventListener("keydown",ce),le.focus(),{element:d,dispose(){x(),b.abort(),u.removeEventListener("pointerdown",j),u.removeEventListener("pointermove",G),u.removeEventListener("pointerup",U),u.removeEventListener("pointercancel",U),u.removeEventListener("wheel",ae),d.removeEventListener("keydown",ce),le.removeEventListener("click",p)}}}var Qr=6e4,Zt=class{constructor(e){this.buyerView_="map";this.targetSeatId_=null;this.navigationMode_="orbit";this.overlay=null;this.handle=null;this.generation=0;this.seatViewGeneration=0;this.seatViewElement=null;this.seatViewDispose=null;this.options=e}get buyerView(){return this.buyerView_}get targetSeatId(){return this.targetSeatId_}get navigationMode(){return this.navigationMode_}canOffer3D(){return this.options.enable3D?this.handle&&this.overlay?!0:!this.options.doc()||!Ut()?!1:this.options.seats().length<=this.max3DSeats():!1}canOfferSeatView(){return this.options.enableSeatView?this.options.seats().some(e=>!!e.viewUrl)?!0:this.hasStage():!1}async setBuyerView(e,t={}){if(e==="map"){this.exit3D();return}if(!this.canOffer3D())throw new Error("venue_3d_unavailable");if(this.buyerView_==="venue3d"&&this.handle){t.flyToSeatId?(this.targetSeatId_=t.flyToSeatId,this.options.onViewChange(this.buyerView_,this.targetSeatId_),await this.handle.flyToSeat(t.flyToSeatId)):t.resetView&&this.handle.focusOverview();return}if(this.handle&&this.overlay){await this.restore3D(t);return}await this.enter3D(t.flyToSeatId)}async openSeatView(e){if(!this.canOfferSeatView())throw new Error("seat_view_unavailable");let t=this.findSeat(e),i=this.options.host(),s=this.options.doc();if(!t||!i||!s)throw new Error("seat_view_unavailable");let n=++this.seatViewGeneration,o,a,l=!1;if(t.viewUrl){let h=t.viewMeta?.previewUrl,p=!!h&&h!==t.viewUrl,d=p?await this.options.resolveAsset(h):null,u=p?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(n!==this.seatViewGeneration||!u||p&&!d)return;o={url:u,...d?{previewUrl:d}:{},...p?{resolveUrl:this.options.resolveAsset}:{},...t.viewMeta?.sourceWidth!==void 0?{sourceWidth:t.viewMeta.sourceWidth}:{},...t.viewMeta?.sourceHeight!==void 0?{sourceHeight:t.viewMeta.sourceHeight}:{},...t.viewMeta?.previewWidth!==void 0?{previewWidth:t.viewMeta.previewWidth}:{},...t.viewMeta?.previewHeight!==void 0?{previewHeight:t.viewMeta.previewHeight}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}},a=(0,Jt.seatViewDisclosure)(o),l=(0,Jt.isAuthoredSeatView)(o)}else{if(!this.hasStage())throw new Error("seat_view_unavailable");let{generateSeatPanorama:h}=await qt();if(n!==this.seatViewGeneration)return;let p=s.floors?.find(g=>g.objects.some(b=>b.type==="row"&&b.id===t.rowId)),d=t.focalPoint??p?.focalPoint??s.focalPoint,u=h(t,d,[...this.options.seats()]);o={url:u.url,generated:!0},a=(0,vt.t)("picker.illustrationCaption",{m:u.distanceM})}if(n!==this.seatViewGeneration)return;this.closeSeatView(!1),this.prepareHostTheme(i,s),tt();let c=Xt({root:i,source:o,caption:a,real:l,closeLabel:f("picker.close","Close"),dragHint:f("picker.dragToLookAround","Drag to look around \xB7 pinch or scroll to zoom"),viewFromSeatLabel:(0,vt.t)("picker.viewFromSeat",{label:t.displayLabel||t.label}),real360Label:(0,vt.t)("picker.real360"),previewLabel:(0,vt.t)("picker.preview"),resolveAsset:this.options.resolveAsset,onClose:()=>this.closeSeatView(!0,!0)});this.seatViewElement=c.element,this.seatViewDispose=c.dispose}pushLiveState(){this.handle&&(this.handle.setAvailability(this.options.seats().map(e=>({seatId:e.id,state:this.seatState(e)}))),this.handle.setSelection(this.options.selection().map(e=>e.id)))}focusOverview(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.focusOverview(),!0)}focusSection(e){return this.buyerView_==="venue3d"?this.handle?.focusSection(e)??!1:!1}focusFloor(e){let t=this.options.doc();if(this.buyerView_!=="venue3d"||!this.handle||!t?.floors?.length)return!1;let i=t.floors.findIndex(s=>s.id===e);return i>=0&&this.handle.focusFloor(i)}zoomIn(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.zoomIn(),!0)}zoomOut(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.zoomOut(),!0)}setNavigationMode(e){return this.navigationMode_=e,this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.setNavigationMode(e),this.options.onViewChange(this.buyerView_,this.targetSeatId_),!0)}destroy(){this.generation+=1,this.closeSeatView(!0,!1);try{this.handle?.dispose()}catch{}this.handle=null,this.overlay?.remove(),this.overlay=null,this.buyerView_="map",this.targetSeatId_=null}max3DSeats(){let e=this.options.max3DSeats;if(typeof e=="number"&&e>0)return e;let t=globalThis.navigator;return(t?.hardwareConcurrency??8)<=4||(t?.deviceMemory??8)<=4||(globalThis.matchMedia?.("(pointer: coarse)").matches??!1)?Qr/2:Qr}async enter3D(e){let t=this.options.host(),i=this.options.doc();if(!t||!i||this.overlay)throw new Error("venue_3d_unavailable");tt(),this.prepareHostTheme(t,i);let s=document.createElement("div");s.className="sl-view3d",s.setAttribute("role","group"),s.setAttribute("aria-label",f("picker.interactive3dVenueView","Interactive 3D venue view")),Object.assign(s.style,{position:"absolute",inset:"0",zIndex:"4",opacity:"0",touchAction:"none",transition:this.reducedMotion()?"none":"opacity 260ms cubic-bezier(.2,.8,.2,1)",background:"radial-gradient(120% 120% at 50% 0%,#191f28 0%,#0d1014 70%)"});let n=document.createElement("div");n.className="sl-view3d-loading",n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.textContent=f("picker.loading3d","Building the 3D venue\u2026"),s.appendChild(n),t.appendChild(s),this.overlay=s;let o=++this.generation;if(this.reducedMotion()?s.style.opacity="1":requestAnimationFrame(()=>{s.style.opacity="1"}),await this.nextPaint(),!(o!==this.generation||this.overlay!==s))try{let[a,l]=await Promise.all([Kt(),this.options.loadEventConfiguration()]),c=l?await Yt(l,this.options.resolveAsset):null,h=await Qt(i.theme?.venue3d?.shellAssetUrl,this.options.resolveAsset);if(o!==this.generation||this.overlay!==s)return;let p={doc:i,seats:[...this.options.seats()],...c?{eventConfigurationId:c.id,eventConfiguration:c}:{},...h?{registeredShellGlb:h}:{}},d=await a.prepareVenue3D(p);if(o!==this.generation||this.overlay!==s)return;let u=a.mountVenue3D(s,{...p,prepared:d},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,seatViewActionLabel:g=>this.findSeat(g)?.viewUrl?f("picker.openAuthored360","Open venue 360\xB0"):f("picker.lookAroundLive3d","Look around in live 3D"),onSeatPick:g=>this.toggleSeat(g),onSeatInspect:g=>this.toggleSeat(g),onViewTargetChange:g=>{this.targetSeatId_=g,this.options.onViewChange("venue3d",g)},...this.options.enableSeatView?{getSeatView:g=>this.seatViewFor3D(g)}:{}});if(o!==this.generation||this.overlay!==s){u.dispose();return}this.handle=u,this.buyerView_="venue3d",this.targetSeatId_=e??null,u.setNavigationMode(this.navigationMode_),n.remove(),this.pushLiveState(),this.options.onViewChange("venue3d",this.targetSeatId_),e&&await u.flyToSeat(e)}catch(a){if(o!==this.generation)return;throw this.options.onError?.(a),this.remove3DOverlay(!1),a}}exit3D(){this.buyerView_==="map"&&!this.overlay||(this.generation+=1,this.buyerView_="map",this.targetSeatId_=null,this.remove3DOverlay(!0,!!this.handle),this.options.onViewChange("map",null))}remove3DOverlay(e,t=!1){let i=this.handle,s=this.overlay;if(this.options.restoreMap(),t&&i&&s){s.style.pointerEvents="none";let n=()=>{this.buyerView_!=="map"||this.overlay!==s||(s.style.visibility="hidden",this.options.restoreMap())};!e||this.reducedMotion()?(s.style.opacity="0",n()):(requestAnimationFrame(()=>{s.style.opacity="0"}),setTimeout(n,280));return}if(this.handle=null,this.overlay=null,!s){try{i?.dispose()}catch{}this.options.restoreMap();return}if(!e||this.reducedMotion()){try{i?.dispose()}catch{}s.remove(),this.options.restoreMap();return}s.style.pointerEvents="none",requestAnimationFrame(()=>{s.style.opacity="0"}),setTimeout(()=>{try{i?.dispose()}catch{}s.remove(),this.options.restoreMap()},280)}async restore3D(e){let t=this.overlay,i=this.handle;if(!t||!i)throw new Error("venue_3d_unavailable");this.buyerView_="venue3d",this.targetSeatId_=e.flyToSeatId??null,t.style.visibility="visible",t.style.pointerEvents="auto",this.reducedMotion()?t.style.opacity="1":requestAnimationFrame(()=>{t.style.opacity="1"}),i.resize(),i.setNavigationMode(this.navigationMode_),this.pushLiveState(),this.options.onViewChange("venue3d",this.targetSeatId_),e.flyToSeatId?await i.flyToSeat(e.flyToSeatId):e.resetView&&i.focusOverview()}nextPaint(){return this.reducedMotion()||typeof requestAnimationFrame!="function"?Promise.resolve():new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}toggleSeat(e){if(!this.findSeat(e))return;this.options.selection().some(s=>s.id===e)?this.options.deselect(e):this.options.status(e)==="free"&&this.options.select(e),this.pushLiveState()}seatState(e){switch(this.options.status(e.id)){case"held":return"held";case"booked":return"sold";case"not_for_sale":return"dimmed";default:return"available"}}async seatViewFor3D(e){let t=this.findSeat(e);if(!t)throw new Error("seat_view_unavailable");if(t.viewUrl){let i=t.viewMeta?.previewUrl,s=!!i&&i!==t.viewUrl,n=s?await this.options.resolveAsset(i):null,o=s?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(!o||s&&!n)throw new Error("seat_view_unavailable");return{url:o,...n?{previewUrl:n}:{},...s?{resolveUrl:this.options.resolveAsset}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.initialBearingDeg!==void 0?{initialBearingDeg:t.viewMeta.initialBearingDeg}:{},...t.viewMeta?.initialPitchDeg!==void 0?{initialPitchDeg:t.viewMeta.initialPitchDeg}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}}return{url:"",generated:!0,mediaKind:"model",coverage:"exact-seat",sourceLabel:f("picker.chartDerivedModel","Chart-derived model")}}closeSeatView(e=!0,t=!1){e&&(this.seatViewGeneration+=1);let i=this.seatViewElement;if(this.seatViewDispose?.(),this.seatViewDispose=null,this.seatViewElement=null,!!i){if(!t||this.reducedMotion()){i.remove();return}i.classList.add("is-leaving"),setTimeout(()=>i.remove(),190)}}findSeat(e){return this.options.seats().find(t=>t.id===e||t.label===e)}hasStage(){let e=this.options.doc();return e?(e.floors?.flatMap(i=>i.objects)??e.objects).some(i=>i.type==="shape"&&(i.role==="stage"||!!i.stageKind)):!1}prepareHostTheme(e,t){getComputedStyle(e).position==="static"&&(e.style.position="relative");let i=t.theme;e.style.setProperty("--sl-bg",i?.background??"#f6f7fb"),e.style.setProperty("--sl-surface","#ffffff"),e.style.setProperty("--sl-text",i?.textColor??"#10162a"),e.style.setProperty("--sl-muted","#697386"),e.style.setProperty("--sl-line","#d9deea"),e.style.setProperty("--sl-accent",i?.accent??"#ef4056"),e.style.setProperty("--sl-accent-ink",i?.accentInk??"#ffffff")}reducedMotion(){return globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}};var Xr=new Set;function Pe(r){return Xr.has(r)?"repeat":"cold"}function ei(r){let e=Pe(r);return Xr.add(r),e}function me(r){return typeof r=="number"&&Number.isFinite(r)&&r>=0?Math.round(r):0}function Fo(){return typeof location>"u"?!1:/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(location.hostname)}function jo(r){if(!/^[A-Za-z0-9_-]{1,80}$/.test(r.event))return null;let e=r.performanceProfile??{};return{event:r.event,scope:r.scope,surface:r.surface,outcome:r.outcome,stage:r.stage?.slice(0,32)??"",ms:me(r.ms),api:me(e.loadChartAndStatuses)||me(e.loadChart),scene:me(e.buildScene),panel:me(e.buildBuyerControls),paint:me(e.firstPaint),normalize:me(e.normalizeBuyerModel),renderer:me(e.createRenderer),seats:me(r.seats),floors:me(r.floors),view:r.view??"map",load:r.load??Pe(r.event),transport:r.transport??"pubapi"}}function ye(r){if(typeof fetch>"u"||Fo())return;let e=jo(r);e&&fetch(`${r.apiBase.replace(/\/+$/,"")}/pub/telemetry/chart-load`,{method:"POST",headers:{"Content-Type":"application/json","X-SeatLayer-Client":"1"},body:JSON.stringify(e),credentials:"omit",keepalive:!0}).catch(()=>{})}var Go="https://api.seatlayer.io",Zr=10;function Uo(r){if(typeof r=="string"){let e=document.querySelector(r);if(!e)throw new Error(`seatmap: container "${r}" not found`);return e}if(!(r instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return r}var ti=class{constructor(e){this.mount=null;this.hostEl=null;this.interactionEnabled_=!0;this.eventLocale=null;this.rendered=!1;this.mode_=null;this.eventInfo=null;this.categoryFilter_=null;this.accessibilityFilter_=null;this.hideLimitedView_=!1;this.focusedSection_=null;this.lastReportedViewRung_=null;this.tipEl=null;this.tipPos={x:0,y:0};this.onTipMove=null;this.realtime=null;if(!e||typeof e!="object")throw new Error("seatmap: options object is required");if(!e.container)throw new Error("seatmap: `container` is required");if(!e.event||typeof e.event!="string")throw new Error("seatmap: `event` key is required");this.opts=e,this.maxSelection_=e.maxSelection??Zr,this.colorblindSafe_=e.colorblindSafe??!1;let t=!!(e.buyerAccessTokenProvider||e.buyerAccessToken||e.publicKey);this.accessState_={configured:t,status:t?"ready":"public"},this.publicKey=e.publicKey;let i={onExpired:a=>{this.accessState_={configured:!0,status:a.refreshed?"ready":"expired"},this.opts.onAccessExpired?.(a),this.notifyMapStateChange()},onUnavailable:a=>{this.accessState_={configured:!0,status:"unavailable",reason:a.reason},this.opts.onAccessUnavailable?.(a),this.notifyMapStateChange()}},s=(e.apiBase??Go).replace(/\/+$/,"");this.apiBase=s;let n=e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?Nt({base:s,event:e.event,publicKey:e.publicKey,accessHooks:i,apiOptions:{onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}}):null;this.access=n?.access??Qe(e,i);let o=n?.api??new Te(s,{access:this.access??void 0,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)});this.api=o,this.controller=new z.PickerController({transport:o,eventKey:e.event,maxSelection:this.maxSelection_,selectedObjects:e.selectedObjects,selectableObjects:e.selectableObjects,numberOfPlacesToSelect:e.numberOfPlacesToSelect,selectionValidators:e.selectionValidators,currency:e.currency,onSelectionChange:a=>{this.immersive?.pushLiveState(),this.opts.onSelectionChange?.(a)},onSelectionValidityChange:a=>this.opts.onSelectionValidityChange?.(a),onSelectionValid:a=>this.opts.onSelectionValid?.(a),onSelectionInvalid:a=>this.opts.onSelectionInvalid?.(a),onSelectionLimit:a=>this.opts.onSelectionLimit?.(a),onHold:a=>this.opts.onHold?.({holdId:a.holdId,expiresAt:a.expiresAt,seats:a.seats,items:a.items}),onHoldRestored:a=>this.opts.onHoldRestored?.({holdId:a.holdId,expiresAt:a.expiresAt,seats:a.seats,items:a.items}),onHoldExpired:()=>this.opts.onHoldExpired?.(),onGAClick:a=>{let l=this.controller.getGAAreas().find(c=>c.id===a);l&&(this.opts.onGAClick?.(l),this.opts.onGAPrompt?.({area:l,selected:{},min:0,max:Math.max(0,Math.min(l.available,(this.opts.maxSelection??Zr)-this.controller.getSelection().length)),tiers:jt(l),confirm:c=>{let h=typeof c=="number"?c:Object.values(c).reduce((p,d)=>p+d,0);this.holdGA(l.id,h)},cancel:()=>{}}))},onError:a=>this.opts.onError?.(a),onDeckTap:a=>{this.opts.onDeckTap?.(a),this.notifyMapStateChange()},onHint:a=>this.opts.onHint?.(a),onSectionFocus:a=>{this.focusedSection_=a,this.opts.onSectionFocus?.(a),this.notifyMapStateChange()},onViewChange:()=>this.handleViewChange(),onStatusChange:()=>{this.immersive?.pushLiveState(),this.opts.onStatusChange?.()},onSalesClosed:()=>{this.eventInfo&&(this.eventInfo.salesClosed=!0),this.opts.onSalesClosed?.()},flashOnLiveChange:!0,onSeatHover:a=>{this.opts.onSeatHover?.(a),this.opts.seatTooltip!==!1&&this.updateTooltip(a)},colorblindSafe:e.colorblindSafe,mapTheme:e.mapTheme??null}),this.buyerAssetUrls=new et(e.event,(a,l)=>o.asset(a,l)),this.immersive=new Zt({host:()=>this.hostEl,doc:()=>this.controller.doc,seats:()=>this.controller.getExpandedSeats(),selection:()=>this.controller.getSelection(),status:a=>this.controller.getStatus(a),select:a=>this.controller.select([a]),deselect:a=>this.controller.deselect([a]),loadEventConfiguration:()=>this.controller.loadEventConfiguration(),resolveAsset:a=>this.buyerAssetUrls.resolve(a),enable3D:e.enable3D!==!1,enableSeatView:e.enableSeatView!==!1,max3DSeats:e.max3DSeats,restoreMap:()=>this.controller.refitCurrentView(),onViewChange:(a,l)=>{this.opts.onBuyerViewChange?.({view:a,...l?{seatId:l}:{}}),this.notifyMapStateChange()},onError:a=>this.opts.onError?.(a)}),this.lastReportedViewRung_=this.controller.getRung()}handleViewChange(){this.opts.onViewChange?.();let e=this.controller.getRung();e!==this.lastReportedViewRung_&&(this.lastReportedViewRung_=e,this.opts.onMapStateChange?.())}notifyMapStateChange(){this.lastReportedViewRung_=this.controller.getRung(),this.opts.onMapStateChange?.()}async render(){if(this.rendered)return this;let e=performance.now();this.rendered=!0,await(0,z.loadLocale)(this.opts.locale),this.opts.messages&&(0,z.setStringOverrides)(this.opts.messages),this.mount=Uo(this.opts.container);let t=document.createElement("div");t.lang=(0,z.getLocale)(),t.dir=(0,z.localeDirection)(),t.style.width="100%",t.style.height="100%",t.style.position="relative",this.mount.appendChild(t),this.hostEl=t,this.applyInteractionState();let i=await this.controller.render(t);if(!i)return ye({apiBase:this.apiBase,event:this.opts.event,scope:"event",surface:"seating_chart",outcome:"failure",stage:"load_chart",ms:performance.now()-e,load:Pe(this.opts.event),transport:"pubapi"}),this.rendered=!1,this.opts.errorDisplay!=="none"&&this.showLoadFailure(t),this;if(this.eventLocale=i.locale??null,!this.opts.locale&&this.eventLocale&&await this.setLocale(this.eventLocale),this.buildLanguageSwitcher(t),this.controller.setViewMode(this.opts.initialView??"flat"),this.startRealtime(),this.mode_=i.mode==="test"?"test":"live",this.eventInfo={name:i.eventName,venue:i.venue??null,startsAt:i.startsAt??null,timezone:i.timezone??null,currency:i.currency??this.opts.currency??"USD",posterUrl:i.posterUrl??null,salesClosed:i.salesClosed},this.opts.seatTooltip!==!1){let s=document.createElement("div");s.setAttribute("role","tooltip"),s.style.cssText='position:absolute;z-index:7;pointer-events:none;display:none;max-width:240px;background:#10162a;color:#fff;border-radius:10px;padding:9px 12px;font:500 12px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 10px 30px -10px rgba(0,0,0,.5);',t.appendChild(s),this.tipEl=s,this.onTipMove=n=>{let o=t.getBoundingClientRect();this.tipPos={x:n.clientX-o.left,y:n.clientY-o.top},this.tipEl&&this.tipEl.style.display!=="none"&&this.placeTooltip()},t.addEventListener("mousemove",this.onTipMove)}if(i.mode==="test"&&this.opts.showTestModeIndicator!==!1){t.style.overflow="hidden";let s=document.createElement("div");s.dataset.slI18n="testMode",s.textContent=(0,z.t)("picker.testMode"),s.setAttribute("aria-label",(0,z.t)("picker.testMode")),s.style.cssText="position:absolute;top:18px;right:-34px;z-index:6;transform:rotate(45deg);width:140px;text-align:center;padding:4px 0;background:#f4b740;color:#1a1200;font:800 10.5px/1.4 -apple-system,BlinkMacSystemFont,sans-serif;letter-spacing:.12em;box-shadow:0 2px 8px rgba(0,0,0,.25);pointer-events:none;",t.appendChild(s)}return this.opts.showAttribution!==!1&&this.buildBadge(t),ye({apiBase:this.apiBase,event:this.opts.event,scope:"event",surface:"seating_chart",outcome:"success",ms:performance.now()-e,performanceProfile:i.performanceProfile,seats:this.controller.getExpandedSeats().length,floors:this.controller.getFloors().length,view:"map",load:ei(this.opts.event),transport:"pubapi"}),this}buildBadge(e){if(this.controller.doc?.theme?.hideBadge)return;let t=document.createElement("a");t.dataset.slI18n="badge",t.href="https://seatlayer.io",t.target="_blank",t.rel="noopener noreferrer",t.setAttribute("aria-label",(0,z.t)("picker.poweredBy")),t.style.cssText='position:absolute;bottom:10px;right:12px;z-index:5;display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.92);color:#4a5163;text-decoration:none;font:600 11px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.02em;box-shadow:0 2px 8px rgba(0,0,0,.12);';let i=document.createElement("span");i.setAttribute("aria-hidden","true"),i.style.cssText="width:16px;height:16px;border-radius:4px;flex:none;display:flex;align-items:center;justify-content:center;background:#0c1220;color:#fcf7ee",i.innerHTML=Gt;let s=document.createElement("span");s.textContent=(0,z.t)("picker.poweredBy"),t.append(i,s),e.appendChild(t)}placeTooltip(){if(!this.tipEl||!this.hostEl)return;let e=this.hostEl.clientWidth,t=this.tipEl.offsetWidth,i=this.tipEl.offsetHeight,s=this.tipPos.x+14,n=this.tipPos.y-i-12;s+t>e-8&&(s=this.tipPos.x-t-14),n<8&&(n=this.tipPos.y+18),this.tipEl.style.left=`${Math.max(8,s)}px`,this.tipEl.style.top=`${Math.max(8,n)}px`}updateTooltip(e){if(!this.tipEl)return;if(!e){this.tipEl.style.display="none";return}let t=(0,z.formatMoney)(e.price,e.currency,{...Number.isInteger(e.price)?{minimumFractionDigits:0,maximumFractionDigits:0}:{},locale:this.opts.locale,fallback:(l,c)=>`${l} ${c}`}),i=document.createElement("div");i.style.cssText="font-weight:700;font-size:13px",i.textContent=e.label;let s=document.createElement("div");s.style.cssText="display:flex;align-items:center;gap:6px;margin-top:4px;color:#c7cddc";let n=document.createElement("span");n.style.cssText="width:9px;height:9px;border-radius:50%;flex:none",n.style.background=e.categoryColor;let o=document.createElement("span");o.textContent=e.categoryLabel;let a=document.createElement("span");if(a.style.cssText="margin-left:auto;font-weight:700;color:#fff",a.textContent=t,s.append(n,o,a),this.tipEl.replaceChildren(i,s),e.status!=="free"){let l=document.createElement("div");l.style.cssText="margin-top:5px;font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:#fca5a5;font-weight:700",l.textContent=e.status==="held"?(0,z.t)("map.statusHeld"):(0,z.t)("map.statusTaken"),this.tipEl.appendChild(l)}this.tipEl.style.display="block",this.placeTooltip()}buildLanguageSwitcher(e){let t=(this.opts.languages??[]).map(s=>(0,z.resolveLocale)(s)).filter((s,n,o)=>o.indexOf(s)===n);if(t.length<2)return;let i=document.createElement("select");i.setAttribute("aria-label",(0,z.t)("picker.preferredTicketType")),i.style.cssText='position:absolute;bottom:10px;left:12px;z-index:5;appearance:none;padding:5px 9px;border-radius:999px;border:0;cursor:pointer;background:rgba(255,255,255,.92);color:#4a5163;font:600 11px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 2px 8px rgba(0,0,0,.12);';for(let s of t){let n=document.createElement("option");n.value=s,n.textContent=z.LOCALE_NAMES[s]??s,n.selected=s===(0,z.getLocale)(),i.appendChild(n)}i.addEventListener("change",()=>{this.setLocale(i.value)}),e.appendChild(i)}async setLocale(e){let t=(0,z.getLocale)(),i=await(0,z.loadLocale)(e);if(this.opts.messages&&(0,z.setStringOverrides)(this.opts.messages),i===t)return i;if(this.hostEl){this.hostEl.lang=i,this.hostEl.dir=(0,z.localeDirection)();for(let s of this.hostEl.querySelectorAll("[data-sl-i18n]"))if(s.dataset.slI18n==="testMode")s.textContent=(0,z.t)("picker.testMode"),s.setAttribute("aria-label",(0,z.t)("picker.testMode"));else if(s.dataset.slI18n==="badge"){s.setAttribute("aria-label",(0,z.t)("picker.poweredBy"));let n=s.querySelector("span:last-child");n&&(n.textContent=(0,z.t)("picker.poweredBy"))}}return this.controller.refreshMapCopy(),i}getMode(){return this.mode_}getPickerState(){let e=this.controller.doc,t=e?.theme??{},i=this.controller.categoryAvailability(),s=this.controller.getGAAreas(),n=this.controller.getFloors(),o=e?.floors?.flatMap(l=>l.objects)??e?.objects??[],a=new Map;for(let l of o)l.type==="section"&&a.set(l.id,{id:l.id,label:l.label,...l.displayLabel?{displayLabel:l.displayLabel}:{},...l.zone?{zoneId:l.zone}:{}});return{event:{key:this.opts.event,name:this.eventInfo?.name??e?.name??this.opts.event,venue:this.eventInfo?.venue??null,startsAt:this.eventInfo?.startsAt??null,timezone:this.eventInfo?.timezone??null,currency:this.eventInfo?.currency??this.opts.currency??"USD",locale:(0,z.getLocale)()||this.eventLocale,posterUrl:this.eventInfo?.posterUrl??null,mode:this.mode_??"live",salesClosed:this.eventInfo?.salesClosed??!1},branding:{...t.accent?{accent:t.accent}:{},...t.accentInk?{accentInk:t.accentInk}:{},...t.background?{background:t.background}:{},...t.textColor?{textColor:t.textColor}:{},...t.brandName?{brandName:t.brandName}:{},...t.logoUrl?{logoUrl:t.logoUrl}:{},attributionRequired:!t.hideBadge},features:{ga:s.length>0,tiers:!!e?.categories.some(l=>l.tiers?.length),floors:n.length>1,zones:!!e?.zones?.length,sections:a.size>0,bestAvailable:!0,accessibilityFilter:!0,limitedViewFilter:!0,venue3d:this.immersive.canOffer3D(),seatView:this.immersive.canOfferSeatView()},catalog:{categories:(e?.categories??[]).filter(l=>!l.notForSale).map(l=>({key:l.key,label:l.label,color:l.color,price:l.price??l.tiers?.[0]?.price??0,available:i[l.key]??0,tiers:(l.tiers??[]).map(c=>({id:c.id,name:c.name,price:c.price,...c.currency?{currency:c.currency}:{}}))})),zones:(e?.zones??[]).map(l=>({id:l.id,label:l.label,...l.color?{color:l.color}:{}})),sections:[...a.values()],gaAreas:s,bestAvailableZones:this.controller.getBestAvailableZones()},map:{floors:n,activeFloorId:this.controller.getActiveFloorId()||n[0]?.id||null,rung:this.controller.getRung(),focusedSectionId:this.controller.getFocusedSection(),focusedSection:this.focusedSection_,viewMode:this.controller.getViewMode(),buyerView:this.immersive.buyerView,view3dTargetSeatId:this.immersive.targetSeatId,view3dNavigationMode:this.immersive.navigationMode,colorblindSafe:this.colorblindSafe_,categoryFilter:this.categoryFilter_?[...this.categoryFilter_]:null,accessibilityFilter:this.accessibilityFilter_?[...this.accessibilityFilter_]:null,hideLimitedView:this.hideLimitedView_},selection:{seats:this.controller.getSelection(),validity:this.controller.getSelectionValidity(),maxSelection:this.maxSelection_},access:{...this.accessState_}}}getCategoryAvailability(){return this.controller.categoryAvailability()}getBestAvailableZones(){return this.controller.getBestAvailableZones()}getActiveFloorId(){return this.controller.getActiveFloorId()||null}getRung(){return this.controller.getRung()}getFocusedSection(){return this.controller.getFocusedSection()}focusSection(e){if(this.immersive.buyerView==="venue3d"&&this.immersive.focusSection(e)){this.notifyMapStateChange();return}this.controller.focusSection(e),this.notifyMapStateChange()}overview(){if(this.immersive.focusOverview()){this.notifyMapStateChange();return}this.controller.overview(),this.notifyMapStateChange()}setRung(e){this.controller.setRung(e),this.notifyMapStateChange()}setCategoryFilter(e,t=!1){this.categoryFilter_=e?[...e]:null,this.controller.setCategoryFilter(e),t&&this.controller.focusCategoryFilter(e),this.notifyMapStateChange()}setAccessibilityFilter(e){this.accessibilityFilter_=e?[...e]:null,this.controller.setAccessibilityFilter(e),this.notifyMapStateChange()}setCommercialLimitedFilter(e){this.hideLimitedView_=e,this.controller.setCommercialLimitedFilter(e),this.notifyMapStateChange()}getSelection(){return this.controller.getSelection()}selectObjects(e){let t=this.controller.select(e);return this.immersive.pushLiveState(),t}deselectObjects(e){this.controller.deselect(e),this.immersive.pushLiveState()}clearSelection(){this.controller.clearSelection(),this.immersive.pushLiveState()}selectCategories(e){return this.controller.selectCategories(e)}deselectCategories(e){this.controller.deselectCategories(e)}setSelectableObjects(e){this.controller.setSelectableObjects(e)}setMaxSelection(e){this.maxSelection_=e,this.controller.setMaxSelection(e),this.notifyMapStateChange()}getSelectionValidity(){return this.controller.getSelectionValidity()}async hold(e={}){try{return await this.holdOrThrow(e)}catch(t){return this.opts.onError?.(t),null}}async holdOrThrow(e={}){let t=this.controller.getSelectionValidity();if(t&&!t.isValid){let s=t.violations.includes("numberOfPlacesToSelect");throw Object.assign(new Error(s?`seatmap: select exactly ${t.required} places before holding`:"seatmap: adjust the ticket selection before holding"),{code:s?"selection_count_mismatch":"selection_invalid",selection:t})}let i=await this.controller.hold(void 0,e.ttlMs);return i?{holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items}:null}async resumeHold(e){try{return await this.resumeHoldOrThrow(e)}catch(t){return this.opts.onError?.(t),null}}async resumeHoldOrThrow(e){let t=await this.controller.resumeHold(e);return t?{holdId:t.holdId,expiresAt:t.expiresAt,seats:t.seats,items:t.items}:null}async extendHold(e){try{let t=await this.controller.extendHold(e);return t?{holdId:t.holdId,expiresAt:t.expiresAt,seats:t.seats,items:t.items}:null}catch(t){return this.opts.onError?.(t),null}}getCurrentHold(){let e=this.controller.currentHold();return e?{holdId:e.holdId,expiresAt:e.expiresAt,seats:e.seats,items:e.items}:null}getGAAreas(){return this.controller.getGAAreas()}async holdGA(e,t,i={}){try{return await this.holdGAOrThrow(e,t,i)}catch(s){return this.opts.onError?.(s),null}}async holdGAOrThrow(e,t,i={}){let s=await this.controller.holdGA(e,t,i);return s?{holdId:s.holdId,expiresAt:s.expiresAt,seats:s.seats,items:s.items}:null}async bestAvailable(e,t,i={}){try{return await this.bestAvailableOrThrow(e,t,i)}catch(s){return this.opts.onError?.(s),null}}async bestAvailableOrThrow(e,t,i={}){let s=await this.controller.bestAvailable(e,t,i);return s?{holdId:s.holdId,expiresAt:s.expiresAt,labels:s.labels,seats:s.seats,items:s.items,...i.zoneId?{zoneId:i.zoneId}:{}}:null}setSeatTier(e,t){this.controller.setSeatTier(e,t)}setTableQuantity(e,t){return this.controller.setTableQuantity(e,t)}async replaceTableQuantity(e,t,i){try{return await this.replaceTableQuantityOrThrow(e,t,i)}catch(s){return this.opts.onError?.(s),null}}async replaceTableQuantityOrThrow(e,t,i){let s=await this.controller.replaceTableQuantity(e,t,i);return s?{holdId:s.holdId,expiresAt:s.expiresAt,seats:s.seats,items:s.items}:null}getFloors(){return this.controller.getFloors()}setFloor(e){if(this.immersive.buyerView==="venue3d"&&this.immersive.focusFloor(e)){this.notifyMapStateChange();return}if(this.controller.getFloors().length<=1){console.warn("seatmap: setFloor() ignored \u2014 this chart has a single floor");return}this.controller.setFloor(e),this.notifyMapStateChange()}setColorblindSafe(e){this.colorblindSafe_=e,this.controller.setColorblindSafe(e),this.notifyMapStateChange()}setViewMode(e){this.controller.setViewMode(e),this.notifyMapStateChange()}getViewMode(){return this.controller.getViewMode()}zoomIn(){this.immersive.zoomIn()||(this.controller.zoomIn(),this.notifyMapStateChange())}zoomOut(){this.immersive.zoomOut()||(this.controller.zoomOut(),this.notifyMapStateChange())}zoomToFit(){this.immersive.focusOverview()||(this.controller.zoomToFit(),this.notifyMapStateChange())}setBuyerView(e,t){return this.immersive.setBuyerView(e,t)}getBuyerView(){return this.immersive.buyerView}openSeatView(e){return this.immersive.openSeatView(e)}setVenue3DNavigationMode(e){if(!this.immersive.setNavigationMode(e))throw new Error("venue_3d_not_active")}setInteractionEnabled(e){this.interactionEnabled_=e,this.applyInteractionState()}applyInteractionState(){let e=this.hostEl;e&&(e.style.pointerEvents=this.interactionEnabled_?"":"none",e.toggleAttribute("inert",!this.interactionEnabled_),this.interactionEnabled_?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden","true"))}async release(){await this.controller.release()}async releaseLabels(e){return this.controller.releaseLabels(e)}startRealtime(){!this.access?.configured||this.realtime||(this.realtime=new ue({url:this.api.subscribeUrl(this.opts.event),mintTicket:()=>this.api.subscribeTicket(this.opts.event),onAccessUnavailable:e=>this.opts.onAccessUnavailable?.(e),sink:Ue(this.controller,{flashOnLiveChange:!0,onStatusChange:()=>{this.immersive.pushLiveState(),this.opts.onStatusChange?.()},onSelectedObjectUnavailable:(e,t)=>this.opts.onSelectedObjectUnavailable?.({labels:e,reason:t})})}),this.realtime.start())}async refreshAvailability(){await this.controller.refresh(),this.immersive.pushLiveState(),this.opts.onStatusChange?.()}async refreshAccess(){if(!this.access?.configured)return!1;let e=await this.access.refresh("manual");return e&&(this.accessState_={configured:!0,status:"ready"},await this.controller.refresh(),this.realtime?.restart(),this.realtime||this.startRealtime()),this.notifyMapStateChange(),e}showLoadFailure(e){let t=document.createElement("div");t.setAttribute("role","status"),t.style.cssText='display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;min-height:180px;box-sizing:border-box;padding:24px;text-align:center;font:500 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#3b4256;';let i=document.createElement("div");i.textContent="The seat map didn\u2019t load.",t.appendChild(i);let s=document.createElement("button");s.type="button",s.textContent="Try again",s.style.cssText="appearance:none;border:1px solid #c9cede;background:#fff;color:#10162a;border-radius:8px;padding:8px 16px;font:600 13px/1 inherit;cursor:pointer;",s.addEventListener("click",()=>{this.destroy(),this.render().catch(n=>this.opts.onError?.(n))}),t.appendChild(s),e.appendChild(t)}destroy(){this.immersive.destroy(),this.buyerAssetUrls.dispose(),this.realtime?.stop(),this.realtime=null,this.access?.clear(),this.hostEl&&this.onTipMove&&this.hostEl.removeEventListener("mousemove",this.onTipMove),this.tipEl=null,this.onTipMove=null,this.controller.destroy(),this.hostEl&&this.hostEl.parentNode&&this.hostEl.parentNode.removeChild(this.hostEl),this.hostEl=null,this.mount=null,this.rendered=!1,this.mode_=null,this.eventInfo=null,this.focusedSection_=null}};var _i=["hold","resumeHold","getCurrentHold","getGAAreas","holdGA","bestAvailable","release","releaseLabels","getSelection","selectObjects","deselectObjects","clearSelection","selectCategories","deselectCategories","setSelectableObjects","setMaxSelection","getSelectionValidity","setSeatTier","getFloors","setFloor","setColorblindSafe","zoomIn","zoomOut","zoomToFit","refreshAccess"],Ko={hold:()=>Promise.resolve(null),resumeHold:()=>Promise.resolve(null),getCurrentHold:()=>null,getGAAreas:()=>[],holdGA:()=>Promise.resolve(null),bestAvailable:()=>Promise.resolve(null),release:()=>Promise.resolve(),releaseLabels:()=>Promise.resolve(!1),getSelection:()=>[],selectObjects:()=>[],deselectObjects:()=>{},clearSelection:()=>{},selectCategories:()=>[],deselectCategories:()=>{},setSelectableObjects:()=>{},setMaxSelection:()=>{},getSelectionValidity:()=>null,setSeatTier:()=>{},getFloors:()=>[],setFloor:()=>{},setColorblindSafe:()=>{},zoomIn:()=>{},zoomOut:()=>{},zoomToFit:()=>{},refreshAccess:()=>Promise.resolve(!1)};function Jr(r){let e={};for(let t of _i)e[t]=(...i)=>{let s=r();return s?s[t](...i):Ko[t]()};return e}var Di=["event","apiBase","maxSelection","numberOfPlacesToSelect","selectionValidators","publicKey","locale","currency","colorblindSafe","initialView","errorDisplay"],$i=[...Di,"selectedObjects","selectableObjects","messages","seatTooltip","buyerAccessTokenProvider","buyerAccessToken"],Bi=["onSelectionChange","onSelectionValidityChange","onSelectionValid","onSelectionInvalid","onSelectionLimit","onHold","onHoldRestored","onHoldExpired","onGAClick","onGAPrompt","onError","onDeckTap","onHint","onSeatHover","onAccessExpired","onAccessUnavailable","onSelectedObjectUnavailable"];function es(r,e,t){let i={container:r};for(let s of $i)i[s]=e[s];for(let s of Bi)i[s]=t[s];return i}var qo=new Set(["seatlayer.designer.ready","seatlayer.designer.saved","seatlayer.designer.published","seatlayer.designer.close","seatlayer.designer.error"]),Wo=2e4,Yo=480,Qo=180*1e3,Xo=900*1e3,Zo=.8,Jo=30*1e3,ea=1e5,ta=4,ia=50;function zi(r){if(typeof r!="string")return r;let e=document.querySelector(r);if(!e)throw new Error(`EmbeddedDesigner container not found: ${r}`);return e}function ra(r){let e=(r??"").toLowerCase();return e.includes("expire")||e.includes("revoke")||e==="401"?"expired":e.includes("mismatch")?"mismatch":e.includes("timeout")?"timeout":"load"}var sa={expired:{title:"This design session expired",body:"For your security, editing sessions are short-lived. Start a fresh one to keep designing."},mismatch:{title:"This editor doesn't match this chart",body:"The session that loaded belongs to a different chart or workspace. Reopen the designer to continue."},timeout:{title:"The designer is taking too long",body:"It did not finish loading in time. This is usually a slow connection \u2014 try again."},load:{title:"We couldn't load the designer",body:"Something went wrong while opening the editor. Please try again."}},ii=class{constructor(e){this.frame=null;this.designerOrigin="";this.overlay=null;this.timeoutTimer=null;this.renewTimer=null;this.autoRecoverUsed=!1;this.phase="loading";this.identityEstablished=!1;this.restoreContainerPosition=null;this.pinned=!1;this.frameStyleBeforeFs=null;this.docOverflowBeforeFs=null;this.bodyOverflowBeforeFs=null;this.fsKeyHandler=null;this.lastAutoHeight="";this.fillRaf=null;this.reprobeRaf=null;this.fillListening=!1;this.containerEl=null;this.fillMode=null;this.resizeObs=null;this.scheduleFill=()=>{this.fillRaf===null&&(this.fillRaf=requestAnimationFrame(()=>{this.fillRaf=null,this.applyFill()}))};this.scheduleReprobe=()=>{this.reprobeRaf===null&&(this.reprobeRaf=requestAnimationFrame(()=>{this.reprobeRaf=null,!this.pinned&&(this.fillMode=this.detectFillMode(),this.syncContainerObserver(),this.applyFill())}))};this.handleMessage=e=>{if(!this.frame||e.origin!==this.designerOrigin||e.source!==this.frame.contentWindow||!e.data||typeof e.data!="object")return;let t=e.data;if(t.type==="seatlayer.designer.handshake"&&typeof t.nonce=="string"&&t.nonce.length<=128){this.frame.contentWindow?.postMessage({type:"seatlayer.designer.parent",nonce:t.nonce},this.designerOrigin);return}if(t.type==="seatlayer.designer.resize"){!this.fillEnabled()&&this.autoResizeEnabled()&&typeof t.px=="number"&&Number.isFinite(t.px)&&t.px>0&&(this.lastAutoHeight=`${Math.round(t.px)}px`,this.pinned||this.setFrameHeight(this.lastAutoHeight));return}if(t.type==="seatlayer.designer.fullscreen"){t.on===!0?this.pinFullscreen():t.on===!1&&this.unpinFullscreen();return}if(typeof t.type!="string"||!qo.has(t.type))return;let i={type:t.type,chartId:typeof t.chartId=="string"?t.chartId:void 0,workspaceId:typeof t.workspaceId=="string"?t.workspaceId:void 0,expiresAt:typeof t.expiresAt=="number"?t.expiresAt:void 0,code:typeof t.code=="string"?t.code:void 0,message:typeof t.message=="string"?t.message:void 0,meta:t.meta,fatal:typeof t.fatal=="boolean"?t.fatal:void 0,action:typeof t.action=="string"?t.action:void 0},s=this.identityEstablished||i.type==="seatlayer.designer.ready"||i.type==="seatlayer.designer.saved"||i.type==="seatlayer.designer.published"||i.type==="seatlayer.designer.close",n=this.options.expectedChartId!==void 0&&i.chartId!==this.options.expectedChartId&&(s||i.chartId!==void 0),o=this.options.expectedWorkspaceId!==void 0&&i.workspaceId!==this.options.expectedWorkspaceId&&(s||i.workspaceId!==void 0);if(n||o){this.showError("mismatch");return}switch(i.type){case"seatlayer.designer.ready":this.identityEstablished=!0,this.sessionExpiresAt=i.expiresAt,this.phase="ready",this.clearTimeoutTimer(),this.removeOverlay(),this.autoRecoverUsed=!1,this.scheduleRenewal(i.expiresAt),this.options.onReady?.(i);break;case"seatlayer.designer.saved":this.options.onSaved?.(i);break;case"seatlayer.designer.published":this.options.onPublished?.(i);break;case"seatlayer.designer.close":this.options.onClose?.(i);break;case"seatlayer.designer.error":{let a=ra(i.code);if(a==="expired"&&this.autoRenewEnabled()&&!this.autoRecoverUsed){this.autoRecoverUsed=!0,this.clearRenewTimer(),this.options.onRequestRelaunch();return}(typeof i.fatal=="boolean"?i.fatal:a!=="load"||this.phase!=="ready")&&this.showError(a),this.options.onError?.(i);break}}};this.options=e}mount(){this.destroy();let e=new URL(this.options.designerUrl,window.location.href);if(e.protocol!=="https:"&&e.hostname!=="localhost"&&e.hostname!=="127.0.0.1")throw new Error("EmbeddedDesigner requires an HTTPS designerUrl outside local development.");this.designerOrigin=e.origin;let t=document.createElement("iframe");t.title=this.options.title??"Venue chart Designer",t.allow=this.options.allow??"fullscreen; clipboard-write",t.referrerPolicy=this.options.referrerPolicy??"origin",t.src=e.toString(),t.style.setProperty("width","100%","important"),t.style.setProperty("height",typeof this.options.height=="number"?`${this.options.height}px`:"100%","important"),t.style.border="0",Object.assign(t.style,this.options.style),this.options.className&&(t.className=this.options.className);let i=zi(this.options.container);if(this.containerEl=i,window.addEventListener("message",this.handleMessage),i.append(t),this.frame=t,this.fillEnabled()&&this.startFill(),this.phase="loading",this.loadingStateEnabled()){this.ensureContainerPositioned(i),this.renderOverlay(i,"loading");let s=this.options.loadingTimeoutMs??Wo;s>0&&Number.isFinite(s)&&(this.timeoutTimer=setTimeout(()=>{this.phase==="loading"&&this.showError("timeout")},s))}return t}setDesignerUrl(e){return this.options={...this.options,designerUrl:e},this.mount()}getIframe(){return this.frame}setSizing(e,t){this.options={...this.options,height:e,minHeight:t},this.frame&&(this.stopFill(),this.lastAutoHeight="",this.fillEnabled()?(this.pinned||this.setFrameHeight("100%"),this.startFill()):this.pinned||this.setFrameHeight(`${e}px`))}setRelaunchPolicy(e,t){this.options={...this.options,onRequestRelaunch:e,autoRenewSession:t},this.clearRenewTimer(),this.phase==="ready"&&this.scheduleRenewal(this.sessionExpiresAt)}destroy(){window.removeEventListener("message",this.handleMessage),this.stopFill(),this.unpinFullscreen(),this.clearTimeoutTimer(),this.clearRenewTimer(),this.removeOverlay(),this.restoreContainerStyle(),this.frame?.remove(),this.frame=null,this.containerEl=null,this.fillMode=null,this.designerOrigin="",this.phase="loading",this.identityEstablished=!1,this.sessionExpiresAt=void 0,this.lastAutoHeight=""}loadingStateEnabled(){return this.options.showLoadingState!==!1}autoResizeEnabled(){return this.options.autoResize!==!1}fillEnabled(){return typeof this.options.height!="number"}setFrameHeight(e){this.frame?.style.setProperty("height",e,"important")}detectFillMode(){let e=this.containerEl,t=this.frame;if(this.pinned||!e||!t)return this.fillMode??"viewport";let i=()=>e.getBoundingClientRect().height,s=t.style.getPropertyValue("height"),n=t.style.getPropertyPriority("height");t.style.setProperty("height","0px","important");let o=i();t.style.setProperty("height",`${ea}px`,"important");let a=i();return s?t.style.setProperty("height",s,n):t.style.removeProperty("height"),!(a-o>ta)&&o>=ia?"container":"viewport"}applyFill(){if(!this.frame||this.pinned)return;let e=this.options.minHeight??Yo;if(this.fillMode==="container"&&this.containerEl){let s=Math.max(e,Math.round(this.containerEl.getBoundingClientRect().height));this.setFrameHeight(`${s}px`);return}let t=this.frame.getBoundingClientRect().top,i=Math.max(e,Math.round(window.innerHeight-t));this.setFrameHeight(`${i}px`)}syncContainerObserver(){let e=this.fillMode==="container"&&!!this.containerEl&&typeof ResizeObserver<"u";e&&!this.resizeObs?(this.resizeObs=new ResizeObserver(()=>this.scheduleFill()),this.resizeObs.observe(this.containerEl)):!e&&this.resizeObs&&(this.resizeObs.disconnect(),this.resizeObs=null)}startFill(){this.fillMode=this.detectFillMode(),this.syncContainerObserver(),this.applyFill(),!this.fillListening&&(this.fillListening=!0,window.addEventListener("resize",this.scheduleReprobe),window.addEventListener("orientationchange",this.scheduleReprobe),window.addEventListener("scroll",this.scheduleFill,{passive:!0}))}stopFill(){this.fillRaf!==null&&(cancelAnimationFrame(this.fillRaf),this.fillRaf=null),this.reprobeRaf!==null&&(cancelAnimationFrame(this.reprobeRaf),this.reprobeRaf=null),this.resizeObs&&(this.resizeObs.disconnect(),this.resizeObs=null),this.fillListening&&(this.fillListening=!1,window.removeEventListener("resize",this.scheduleReprobe),window.removeEventListener("orientationchange",this.scheduleReprobe),window.removeEventListener("scroll",this.scheduleFill))}pinFullscreen(){if(this.pinned||!this.frame)return;this.pinned=!0,this.frameStyleBeforeFs=this.frame.getAttribute("style");let e={position:"fixed",top:"0",right:"0",bottom:"0",left:"0",width:"100vw",height:"100vh",margin:"0",border:"0","z-index":"2147483000",background:"#101625"};for(let[i,s]of Object.entries(e))this.frame.style.setProperty(i,s,"important");let t=document.documentElement;this.docOverflowBeforeFs=t.style.overflow,t.style.overflow="hidden",document.body&&(this.bodyOverflowBeforeFs=document.body.style.overflow,document.body.style.overflow="hidden"),this.fsKeyHandler=i=>{i.key==="Escape"&&this.unpinFullscreen()},window.addEventListener("keydown",this.fsKeyHandler)}unpinFullscreen(){this.pinned&&(this.pinned=!1,this.frame&&(this.frameStyleBeforeFs===null?this.frame.removeAttribute("style"):this.frame.setAttribute("style",this.frameStyleBeforeFs),this.fillEnabled()?this.applyFill():this.autoResizeEnabled()&&this.lastAutoHeight?this.setFrameHeight(this.lastAutoHeight):typeof this.options.height=="number"&&this.setFrameHeight(`${this.options.height}px`)),this.frameStyleBeforeFs=null,this.docOverflowBeforeFs!==null&&(document.documentElement.style.overflow=this.docOverflowBeforeFs,this.docOverflowBeforeFs=null),this.bodyOverflowBeforeFs!==null&&document.body&&(document.body.style.overflow=this.bodyOverflowBeforeFs,this.bodyOverflowBeforeFs=null),this.fsKeyHandler&&(window.removeEventListener("keydown",this.fsKeyHandler),this.fsKeyHandler=null))}clearTimeoutTimer(){this.timeoutTimer!==null&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)}autoRenewEnabled(){return!!this.options.onRequestRelaunch&&this.options.autoRenewSession!==!1}clearRenewTimer(){this.renewTimer!==null&&(clearTimeout(this.renewTimer),this.renewTimer=null)}scheduleRenewal(e){if(this.clearRenewTimer(),!this.autoRenewEnabled()||typeof e!="number"||!Number.isFinite(e))return;let t=e-Date.now();if(t<=0)return;let i=t<Xo?t*Zo:t-Qo,s=Math.max(Jo,i);this.renewTimer=setTimeout(()=>{this.renewTimer=null,this.autoRenewEnabled()&&this.options.onRequestRelaunch()},s)}ensureContainerPositioned(e){getComputedStyle(e).position==="static"&&(this.restoreContainerPosition=e.style.position,e.style.position="relative")}restoreContainerStyle(){if(this.restoreContainerPosition!==null){try{zi(this.options.container).style.position=this.restoreContainerPosition}catch{}this.restoreContainerPosition=null}}removeOverlay(){this.overlay?.remove(),this.overlay=null}showError(e){if(this.phase="error",this.clearTimeoutTimer(),!this.loadingStateEnabled())return;let t;try{t=zi(this.options.container)}catch{return}this.renderOverlay(t,"error",e)}handleTryAgain(){if(this.options.onRequestRelaunch){this.options.onRequestRelaunch();return}this.mount()}renderOverlay(e,t,i){this.removeOverlay();let s=document.createElement("div");s.setAttribute("data-seatlayer-designer-overlay",t),s.setAttribute("role",t==="error"?"alert":"status"),s.setAttribute("aria-live","polite"),Object.assign(s.style,{position:"absolute",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",background:"#101625",color:"#e6ebf5",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',zIndex:"2",overflow:"hidden"}),t==="loading"?this.buildSkeleton(s):this.buildErrorCard(s,i??"load"),e.append(s),this.overlay=s}buildSkeleton(e){let t=document.createElement("style");t.textContent=`
|
|
1579
2148
|
@media (prefers-reduced-motion: no-preference) {
|
|
1580
2149
|
@keyframes seatlayer-designer-shimmer {
|
|
1581
2150
|
0% { background-position: -320px 0; }
|
|
@@ -1585,7 +2154,7 @@
|
|
|
1585
2154
|
animation: seatlayer-designer-shimmer 1.25s ease-in-out infinite;
|
|
1586
2155
|
background-size: 640px 100%;
|
|
1587
2156
|
}
|
|
1588
|
-
}`,e.append(t);let i="linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.10) 37%, rgba(255,255,255,0.04) 63%)",s=document.createElement("div");Object.assign(s.style,{position:"absolute",inset:"0",display:"flex",flexDirection:"column",padding:"16px",gap:"14px",opacity:"0.9"});let n=c=>{let h=document.createElement("div");return h.className="sl-shimmer",Object.assign(h.style,{background:i,borderRadius:"8px"}),Object.assign(h.style,c),h};s.append(n({height:"40px",width:"100%",flex:"0 0 auto"}));let o=document.createElement("div");Object.assign(o.style,{display:"flex",gap:"14px",flex:"1 1 auto",minHeight:"0"}),o.append(n({width:"220px",height:"100%",flex:"0 0 auto"})),o.append(n({flex:"1 1 auto",height:"100%"})),s.append(o),e.append(s);let a=document.createElement("div");Object.assign(a.style,{position:"relative",zIndex:"1",display:"flex",alignItems:"center",gap:"10px",padding:"10px 16px",borderRadius:"999px",background:"rgba(16, 22, 37, 0.72)",fontSize:"13px",fontWeight:"500",letterSpacing:"0.01em"});let l=document.createElement("span");l.className="sl-shimmer",Object.assign(l.style,{width:"9px",height:"9px",borderRadius:"50%",background:i,flex:"0 0 auto"}),a.append(l),a.append(document.createTextNode("Loading designer\u2026")),e.append(a)}buildErrorCard(e,t){let i=_n[t],s=document.createElement("div");Object.assign(s.style,{maxWidth:"420px",margin:"0 24px",padding:"28px",textAlign:"center",background:"rgba(255, 255, 255, 0.03)",border:"1px solid rgba(255, 255, 255, 0.08)",borderRadius:"16px",boxShadow:"0 12px 40px rgba(0, 0, 0, 0.35)"});let n=document.createElement("h2");n.textContent=i.title,Object.assign(n.style,{margin:"0 0 8px",fontSize:"17px",fontWeight:"600",color:"#f4f7ff"});let o=document.createElement("p");o.textContent=i.body,Object.assign(o.style,{margin:"0 0 20px",fontSize:"13.5px",lineHeight:"1.5",color:"#aab4c8"});let a=document.createElement("button");a.type="button",a.textContent="Try again",Object.assign(a.style,{appearance:"none",cursor:"pointer",border:"0",borderRadius:"10px",padding:"10px 22px",fontSize:"14px",fontWeight:"600",color:"#101625",background:"#7aa2ff"}),a.addEventListener("click",()=>this.handleTryAgain()),s.append(n,o,a),e.append(s)}};var b=require("@seatlayer/core"),mt=require("@seatlayer/core/view3d/crossfade/panorama"),Cr=require("@seatlayer/core/core/seatConfidence");var Ls=require("@seatlayer/core/core/seatConfidence");var xe=require("@seatlayer/core"),gs=require("@seatlayer/core/core/seatConfidence");function bs(r){return String(r??"\u2014").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function E(r){return String(r??"").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function we(r){return r?.restrictedView?f("picker.restrictedView","Restricted view"):r?.obstructedView?f("picker.obstructedView","Obstructed view"):""}function vs(r){if(!r)return"";let e=[];r.premium&&e.push(`<div class="sl-cx-premium"><span class="sl-cx-star" aria-hidden="true">\u2605</span>${f("picker.premiumSeat","Premium seat")}</div>`);let t=we(r);return t?e.push(`<div class="sl-cx-warn"><span class="sl-cx-glyph" aria-hidden="true">\u25D0</span><span class="sl-cx-txt"><b>${t}</b>${r.note?`<span class="sl-cx-note">${E(r.note)}</span>`:""}</span></div>`):r.note&&e.push(`<div class="sl-cx-warn"><span class="sl-cx-glyph" aria-hidden="true">\u2139</span><span class="sl-cx-txt"><span class="sl-cx-note">${E(r.note)}</span></span></div>`),e.length?`<div class="sl-cx">${e.join("")}</div>`:""}function fi(r){let e=we(r);if(!e)return"";let t=E(r?.note?r.note:e);return`<span class="sl-cx-mark" role="img" aria-label="${t}" title="${t}">\u25D0</span>`}function Ke(r){return r==="no-seat"?f("picker.emptyWheelchairSpace","Empty wheelchair space"):r==="seat-present"?f("picker.accessiblePhysicalSeat","Accessible physical seat"):""}function ys(r){let e=Ke(r);return e?`<div class="sl-cx"><div class="sl-cx-warn"><span class="sl-cx-glyph" aria-hidden="true">\u267F</span><span class="sl-cx-txt"><b>${e}</b></span></div></div>`:""}function gi(r){let e=Ke(r);return e?`<span class="sl-cx-mark" role="img" aria-label="${e}" title="${e}">\u267F</span>`:""}function bi(r,e){if(!r)return"";let t=e?f("picker.viewFromThisSeat","View from this seat"):f("picker.seeItIn3d","See it in 3D");return`<button type="button" class="sl-confirm-3d" aria-label="${t}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2l9 5v10l-9 5-9-5V7z"/><path d="M12 12l9-5M12 12v10M12 12L3 7"/></svg><span>${t}</span></button>`}function xs(r){if(!r)return"";let e=r.previous.label||r.previous.id,t=r.next.label||r.next.id;return`<span class="sl-seccard-nav" aria-label="${f("picker.browseSections","Browse sections")}"><button type="button" data-section-nav="${F(r.previous.id)}" aria-label="${f("picker.previousSection","Previous section")}: ${F(e)}" title="${F(e)}">\u2190</button><button type="button" data-section-nav="${F(r.next.id)}" aria-label="${f("picker.nextSection","Next section")}: ${F(t)}" title="${F(t)}">\u2192</button></span>`}function ws(r,e){if(!e)return"";let t=e,i=t.includes(r.id),s=i?t.length>1?f("picker.openComparison","Open comparison"):f("picker.savedForComparison","Saved for comparison"):t.length?f("picker.compareWithSaved","Compare with saved"):f("picker.saveToCompare","Save to compare");return`<button type="button" class="sl-confirm-compare"${i&&t.length===1?" disabled":""}><span aria-hidden="true">\u21C4</span><span>${E(s)}</span></button>`}function ks(r,e,t){if(!t)return"";let i=(0,gs.seatConfidenceDisclosure)(r.confidenceEvidence),s=i.modeledTarget??i.reality;return`<button type="button" class="sl-confirm-confidence" aria-label="Open seat confidence passport for ${E(r.displayLabel??r.label)}"><span><em>${E(e)}</em><strong>${E(i.headline)}</strong><small>${E(s)}</small></span><b>Passport</b></button>`}function ke(r){let e=r?.rowLabel,t=r?.sectionLabel;if(!e||!t)return e;for(let i of["-"," ","\xB7","/","_"]){let s=`${t}${i}`;if(e.startsWith(s)&&e.length>s.length)return e.slice(s.length)}return e}function Bn(r){switch(r){case"paused":return{title:f("picker.accessPausedTitle","These seats are on hold right now"),body:f("picker.accessPausedBody","The organizer has paused this selection. Try again in a few minutes."),action:f("picker.accessRetry","Try again")};case"revoked":return{title:f("picker.accessRevokedTitle","This access link is no longer active"),body:f("picker.accessRevokedBody","Ask whoever sent you here for a new link to keep booking these seats.")};case"no_token":case"provider_failed":return{title:f("picker.accessExpiredTitle","Your access session has ended"),body:f("picker.accessExpiredBody","Sign in again, or reload the page, to keep browsing these seats. Anything you are already holding stays yours."),action:f("picker.accessRetry","Try again")};default:return{title:f("picker.accessInvalidTitle","We couldn\u2019t verify your access"),body:f("picker.accessInvalidBody","You can still book anything shown as available. Contact whoever sent you here for access to the rest.")}}}function Ss(r,e,t){let i=bs;return[r?.sectionLabel?`<div class="sl-confirm-field"><span class="sl-confirm-key">${f("picker.section","Section")}</span><span class="sl-confirm-value">${i(r.sectionLabel)}</span></div>`:"",r?.rowLabel||r?.objectType==="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${i(t)}</span><span class="sl-confirm-value">${i(ke(r)??r?.displayLabel??e)}</span></div>`:"",r?.objectType!=="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${f("picker.seat","Seat")}</span><span class="sl-confirm-value">${i(r?.seatNumber??r?.displayLabel??e)}</span></div>`:""].filter(Boolean).join("")}function fs(r){return r.buyerMessage?.trim()||(r.restriction==="companion"?f("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):void 0)}function Cs(r,e,t){let i=bs;if(r.length>1)return`<fieldset class="sl-confirm-tiers"><legend>${f("picker.ticketType","Ticket type")}</legend>`+r.map(o=>{let a=fs(o);return`<button type="button" class="sl-confirm-tier" data-confirm-tier="${i(o.id)}" aria-pressed="${o.id===e}"><span class="sl-confirm-tier-copy"><span class="sl-confirm-tier-name">${i(o.name)}</span>`+(a?`<small class="sl-confirm-tier-note">${i(a)}</small>`:"")+`</span><span class="sl-confirm-tier-price">${i(t(o))}</span></button>`}).join("")+"</fieldset>";let s=r[0],n=s?fs(s):void 0;return n?`<p class="sl-confirm-tier-note">${i(n)}</p>`:""}function vi(r){return`<span class="sl-seccard-dot" style="background:${E(r.color)}"></span><span class="sl-seccard-name">${E(r.label)}</span><span class="sl-seccard-left">${E(r.leftLabel)}</span>`+r.nav+r.close}function Es(r){return`<div class="sl-seccard-head"><span class="sl-seccard-dot" style="background:${E(r.color)}"></span><span class="sl-seccard-name">${E(r.label)}</span>`+(r.showPrice?`<span class="sl-seccard-price">${E(r.priceLabel)}</span>`:"")+r.close+`</div><div class="sl-seccard-zone">${r.zoneLabel?`${E(r.zoneLabel)} \xB7 `:""}<span class="sl-seccard-left">${E(r.leftLabel)}</span></div>`+(r.entrance?`<div class="sl-seccard-entrance">${E(r.entrance)}</div>`:"")+(r.mix?`<div class="sl-seccard-mix">${r.mix}</div>`:"")+`<div class="sl-seccard-foot"><button type="button" class="sl-seccard-overview">\u2190 ${E(r.overviewLabel)}</button>`+r.nav+`<span class="sl-seccard-hint">${E(r.hint)}</span></div>`}function Ts(r){return`<span class="sl-seccard-mix-item${r.dim?" sl-dim":""}"><span class="sl-seccard-mix-dot" style="background:${E(r.color)}"></span>${E(r.label)} <span class="sl-seccard-mix-price">${E(r.rangeLabel)}</span></span>`}function Ps(r){return'<div class="sl-confirm-grid">'+r.identityFields+`</div><div class="sl-confirm-cat"><span class="sl-dot" style="background:${E(r.categoryColor)}"></span><span class="sl-confirm-cat-name">${E(r.categoryLabel)}</span>`+(r.priceLabel?`<span class="sl-confirm-price">${E(r.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-body">'+r.tierChoices+r.wheelchair+r.commercial+r.thumb+r.inspect+`<div class="sl-confirm-row"><button type="button" class="sl-confirm-cancel">${E(r.cancelLabel)}</button><button type="button" class="sl-confirm-add"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12.5l4 4L19 7"/></svg>${E(r.selectLabel)}</button></div></div>`}function As(r,e){let t=F,{variable:i}=e;return`<section class="sl-table-dialog" role="dialog" aria-modal="true" aria-labelledby="sl-table-title" aria-describedby="sl-table-copy"><div class="sl-table-head"><div class="sl-table-eyebrow">${t(i?(0,xe.t)("picker.flexiblePartyTypeWord",{typeWord:e.typeWord}):(0,xe.t)("picker.wholeTypeWord",{typeWord:e.typeWord}))}</div><h2 class="sl-table-title" id="sl-table-title">${t(r.displayLabel??r.label)}</h2><p class="sl-table-copy" id="sl-table-copy">${t(i?f("picker.chooseGuestsCopy","Choose how many guests will sit together. This table is held exclusively for your party."):(0,xe.t)("picker.allPlacesBookedTogether",{count:r.capacity}))}</p></div><div class="sl-table-body"><div class="sl-table-summary"><span>${t(e.categoryLabel)}</span><b data-table-unit>${t((0,xe.t)("picker.perGuestPrice",{price:e.unitPrice}))}</b><span class="muted">${t(f("picker.tableCapacity","Table capacity"))}</span><span>${t((0,xe.t)("picker.guestsCount",{count:r.capacity}))}</span><span class="muted">${t(f("picker.total","Total"))}</span><b data-table-total></b></div>`+(i?`<label class="sl-table-qtylabel" id="sl-table-qty-label">${t(f("picker.numberOfGuests","Number of guests"))}</label><div class="sl-table-stepper" role="group" aria-labelledby="sl-table-qty-label"><button type="button" data-table-step="-1" aria-label="${t(f("picker.fewerGuests","Fewer guests"))}">\u2212</button><output aria-live="polite" data-table-qty>${r.quantity}</output><button type="button" data-table-step="1" aria-label="${t(f("picker.moreGuests","More guests"))}">+</button></div><div class="sl-table-range">${t((0,xe.t)("picker.chooseMinMaxGuests",{min:r.minOccupancy,max:r.maxOccupancy}))}</div>`:`<input type="hidden" data-table-qty value="${r.capacity}">`)+`<div class="sl-table-actions"><button type="button" class="sl-table-cancel">${t((0,xe.t)("common.cancel"))}</button><button type="button" class="sl-table-confirm">${t(e.held?f("picker.updateTable","Update table"):i?f("picker.selectTable","Select table"):f("picker.selectWholeTable","Select whole table"))}</button></div></div></section>`}function Ms(r,e){let t=Bn(r),i=document.createElement("div");i.className="sl-access",i.setAttribute("role","status"),i.setAttribute("aria-live","polite");let s=document.createElement("div"),n=document.createElement("div");n.className="sl-access-title",n.textContent=t.title;let o=document.createElement("div");if(o.className="sl-access-body",o.textContent=t.body,s.append(n,o),t.action){let a=document.createElement("button");a.type="button",a.className="sl-access-act",a.textContent=t.action,a.addEventListener("click",e),s.appendChild(a)}return i.appendChild(s),i}function Y(r){return String(r??"").replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function Hs(r){let e=(0,Ls.seatConfidenceDisclosure)(r.seat.confidenceEvidence),t=r.seat.confidenceEvidence,i=e.limitations.length?`<h4>Known limits</h4><ul>${e.limitations.map(c=>`<li>${Y(c)}</li>`).join("")}</ul>`:"",s=e.modeledTarget?`<div><dt>Modeled target</dt><dd>${Y(e.modeledTarget)}</dd></div>`:"",n=t?`<div><dt>Evidence ID</dt><dd>${Y(t.evidenceId)}</dd></div><div><dt>Model version</dt><dd>${Y(t.modelVersion)}</dd></div><div><dt>Event configuration</dt><dd>${Y(t.eventConfigurationId??"Not configuration-specific")}</dd></div><div><dt>Approval</dt><dd>${Y(t.approvedByRole??"No external approval supplied")}</dd></div>`+(t.validUntil?`<div><dt>Valid until</dt><dd>${Y(t.validUntil.slice(0,10))}</dd></div>`:""):"<div><dt>Evidence ID</dt><dd>None supplied</dd></div>",o=we(r.seat.commercial)||r.restrictionFallback,a=`<div><dt>View restriction</dt><dd>${Y(o)}</dd></div>`+(r.seat.commercial?.note?`<div><dt>Organizer note</dt><dd>${Y(r.seat.commercial.note)}</dd></div>`:""),l=r.canReport?'<button type="button" data-report>Report this view</button><p data-report-status role="status" aria-live="polite"></p>':"";return`<div class="sl-view3d-passport-scrim" aria-hidden="true"></div><section class="sl-view3d-passport" role="dialog" aria-modal="true" aria-labelledby="sl-view3d-passport-title"><header><div><span>Seat confidence passport</span><strong id="sl-view3d-passport-title">${Y(r.title)}</strong></div><button type="button" data-close aria-label="Close seat confidence passport">\xD7</button></header><div class="sl-view3d-passport-summary"><strong>${Y(e.headline)}</strong><span>${Y(e.coverage)} \xB7 ${Y(e.freshness)}</span></div><dl><div><dt>Model status</dt><dd>${Y(e.model)}</dd></div><div><dt>Reality evidence</dt><dd>${Y(e.reality)}</dd></div><div><dt>Source</dt><dd>${Y(e.provenance)}</dd></div>`+a+s+n+`</dl>${i}<p class="sl-view3d-passport-note">This passport describes supplied evidence and known limits. It does not guarantee that every temporary obstruction or real-world condition is knowable before the event build.</p>`+l+"</section>"}function Rs(r){return r?r.closest("[data-report]")?"report":r.closest("[data-close]")||r.classList.contains("sl-view3d-passport-scrim")?"close":null:null}function jt(r,e,t){let i=r?.querySelector("[data-report]"),s=r?.querySelector("[data-report-status]");i&&(i.disabled=e!=="failed",i.textContent=e==="received"?"Report received":"Report this view"),s&&(s.setAttribute("role",e==="failed"?"alert":"status"),s.textContent=e==="sending"?"Sending report\u2026":e==="received"?`Report received. Reference ${t??""}.`:"The report could not be sent. Please try again.")}function Os(r){return r?.previousPrice!=null&&r.previousPrice>r.price?r.previousPrice:null}function Is(r){return $n(r)+(r.moreLabel?`<button type="button" class="sl-price-more" aria-expanded="${!r.collapsed}">${r.esc(r.moreLabel)}</button>`:"")+Dn(r.status)}function $n(r){let{esc:e,money:t}=r;return r.categories.map(i=>{let s=r.priceOf(i),n=r.rangeOf(i),o=r.offerOf(i.key),a=Os(o),l=r.activeKey===i.key;return`<div class="sl-price-row${r.bandKeys!=null&&!r.bandKeys.has(i.key)?" sl-dim":""}${l?" sl-active":""}" data-cat="${e(i.key)}" role="button" tabindex="0" aria-pressed="${l}" title="${e(r.titleFor(i,l))}"><span class="sl-dot" style="background:${e(r.colorOf(i))}"></span><span class="sl-price-label">${e(i.label)}`+(o?.offerName?`<small class="sl-price-offer">${e(o.offerName)}</small>`:"")+`</span><span class="sl-price-left">${e(r.leftCount(r.left[i.key]??0))}</span>`+(a!=null?`<span class="sl-price-was">${e(t(a))}</span>`:"")+(n!=null?`<span class="sl-price-amt">${n.min===n.max?e(t(n.min)):`${e(t(n.min))}\u2013${e(t(n.max))}`}</span>`:s!=null?`<span class="sl-price-amt">${e(t(s))}</span>`:"")+"</div>"}).join("")}function Dn(r){let e=t=>t.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i]);return`<div class="sl-status-key" aria-label="${e(r.legend)}"><span class="sl-status-item"><i class="sl-status-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><rect x="5" y="10" width="14" height="10" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg></i>${e(r.held)}</span><span class="sl-status-item"><i class="sl-status-icon sold" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M7 17L17 7"/></svg></i>${e(r.sold)}</span></div>`}function yi(r){let e=Math.abs(r.scrollLeft),t=e>2,i=e+r.clientWidth<r.scrollWidth-2;return r.dataset.fadeStart=String(t),r.dataset.fadeEnd=String(i),{start:t,end:i}}function _s(r){let{esc:e,money:t}=r;return r.categories.map(i=>{let s=r.rangeOf(i),n=r.priceOf(i),o=s?s.min===s.max?t(s.min):`${t(s.min)}+`:n!=null?t(n):null,a=Object.prototype.hasOwnProperty.call(r.left,i.key)&&r.left[i.key]<=0,l=Os(r.offerOf(i.key)),c=o?`${i.label} \u2014 ${o}${a?` (${r.soldOutWord})`:""}`:i.label;return`<button type="button" class="sl-rc" data-cat="${e(i.key)}" aria-pressed="${r.activeKey===i.key}" aria-label="${e(c)}" title="${e(c)}"${a?" disabled":""}><i class="sl-rc-dot" style="background:${e(r.colorOf(i))}"></i>`+(l!=null?`<span class="sl-rc-was">${e(t(l))}</span>`:"")+`<span class="sl-rc-t">${e(o??i.label)}</span></button>`}).join("")}function Bs(r,e){let t=r.map(a=>({key:a.key,range:e.rangeOf(a)})).filter(a=>a.range!=null);if(!t.length)return[];let i=[...new Map(t.map(a=>[`${a.range.min}:${a.range.max}`,a.range])).values()].sort((a,l)=>a.min-l.min||a.max-l.max);if(i.length<=5)return i.map(a=>({id:`p${a.min}-${a.max}`,label:a.min===a.max?e.money(a.min):`${e.money(a.min)}\u2013${e.money(a.max)}`,keys:t.filter(l=>l.range.min===a.min&&l.range.max===a.max).map(l=>l.key),min:a.min,max:a.max}));let s=[...t].sort((a,l)=>a.range.min-l.range.min||a.range.max-l.range.max),n=Math.ceil(s.length/4),o=[];for(let a=0;a<s.length;a+=n){let l=s.slice(a,a+n),c=Math.min(...l.map(p=>p.range.min)),h=Math.max(...l.map(p=>p.range.max));o.push({id:`b${a}`,label:c===h?e.money(c):`${e.money(c)}\u2013${e.money(h)}`,keys:l.map(p=>p.key),min:c,max:h})}return o}var zn=["on-sale","low","sold-out","presale","closed"];function ct(r){return r==null?null:typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0}function Ds(r){return r==null?null:typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0}function $s(r){if(r==null)return null;if(typeof r!="object"||Array.isArray(r))return;let e=r,t=e.count,i=e.index;if(typeof i!="number"||!Number.isInteger(i)||i<1||typeof t!="number"||!Number.isInteger(t)||t<i)return;let s=e.remaining;if(s!=null&&(typeof s!="number"||!Number.isInteger(s)||s<0))return;let n={index:i,count:t,remaining:s??null};if(e.id!==void 0){if(typeof e.id!="string"||!e.id.trim())return;n.id=e.id.trim()}if(e.name!==void 0){if(typeof e.name!="string"||!e.name.trim())return;n.name=e.name.trim()}if(e.categoryKey!==void 0){if(e.categoryKey!==null&&(typeof e.categoryKey!="string"||!e.categoryKey.trim()))return;n.categoryKey=e.categoryKey==null?null:e.categoryKey.trim()}for(let o of["startsAt","endsAt"]){if(e[o]===void 0)continue;let a=Ds(e[o]);if(a===void 0)return;n[o]=a}return n}function Vn(r){if(r==null)return null;if(typeof r!="object"||Array.isArray(r))return;let e=r;if(!Number.isInteger(e.assignmentVersion)||e.assignmentVersion<0||!Array.isArray(e.channels)||!Array.isArray(e.objects))return;let t=[],i=new Set;for(let o of e.channels){if(!o||typeof o!="object"||Array.isArray(o))return;let a=o,l=typeof a.channelId=="string"?a.channelId.trim():"";if(!l||i.has(l)||!Number.isInteger(a.pricingVersion)||a.pricingVersion<0||!Array.isArray(a.priceOverrides))return;let c=[],h=new Set;for(let p of a.priceOverrides){if(!p||typeof p!="object"||Array.isArray(p))return;let d=p,u=typeof d.categoryKey=="string"?d.categoryKey.trim():"",g=d.tierId===null?null:typeof d.tierId=="string"&&d.tierId.trim()?d.tierId.trim():void 0,v=ct(d.price);if(!u||g===void 0||v===void 0||v===null)return;let w=`${u}\0${g??""}`;if(h.has(w))return;h.add(w),c.push({categoryKey:u,tierId:g,price:v})}i.add(l),t.push({channelId:l,pricingVersion:a.pricingVersion,priceOverrides:c})}let s=[],n=new Set;for(let o of e.objects){if(!o||typeof o!="object"||Array.isArray(o))return;let a=o,l=typeof a.label=="string"?a.label.trim():"",c=typeof a.channelId=="string"?a.channelId.trim():"";if(!l||n.has(l)||!i.has(c))return;n.add(l),s.push({label:l,channelId:c})}return{assignmentVersion:e.assignmentVersion,channels:t,objects:s}}function Nt(r){if(!r||typeof r!="object"||Array.isArray(r))return null;let e=r,t=zn.find(h=>h===e.state);if(!t)return null;let i=ct(e.fromPrice),s=ct(e.previousPrice);if(i===void 0||s===void 0)return null;let n=e.currency==null?null:typeof e.currency=="string"&&e.currency.trim()?e.currency.trim():void 0;if(n===void 0)return null;let o=$s(e.release);if(o===void 0)return null;let a=e.upcoming===void 0?null:$s(e.upcoming);if(a===void 0)return null;let l=[];if(e.prices!=null){if(!Array.isArray(e.prices))return null;let h=[];for(let p of e.prices){if(!p||typeof p!="object"||Array.isArray(p))return null;let d=p,u=typeof d.categoryKey=="string"?d.categoryKey.trim():"";if(!u)return null;let g=ct(d.price),v=ct(d.previousPrice);if(g==null||v===void 0)return null;let w={categoryKey:u,price:g,previousPrice:v};if(d.offerId!==void 0){if(typeof d.offerId!="string"||!d.offerId.trim())return null;w.offerId=d.offerId.trim()}if(d.offerName!==void 0){if(typeof d.offerName!="string"||!d.offerName.trim())return null;w.offerName=d.offerName.trim()}if(d.remaining!==void 0){if(d.remaining!==null&&(typeof d.remaining!="number"||!Number.isInteger(d.remaining)||d.remaining<0))return null;w.remaining=d.remaining==null?null:d.remaining}for(let y of["startsAt","endsAt"]){if(d[y]===void 0)continue;let R=Ds(d[y]);if(R===void 0)return null;w[y]=R}h.push(w)}l=h}let c=Vn(e.channelPricing);return c===void 0?null:{state:t,fromPrice:i,previousPrice:s,currency:n,release:o,upcoming:a,prices:l,channelPricing:c}}function zs(r,e){if(!r)return null;let t=null,i=s=>{s!=null&&s>e&&(t===null||s<t)&&(t=s)};for(let s of[r.release,r.upcoming])i(s?.startsAt),i(s?.endsAt);for(let s of r.prices)i(s.startsAt),i(s.endsAt);return t}function Gt(r){let e={};for(let t of r?.prices??[])e[t.categoryKey]=t.price;return e}var We=require("@seatlayer/core");var qt=require("@seatlayer/core/core/color");function he(r){if(!r)return null;let e=r.trim().toLowerCase();if(e==="white")return{r:255,g:255,b:255};if(e==="black")return{r:0,g:0,b:0};let t=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(e)?.[1];if(t){let s=t.length<=4?[...t].map(n=>`${n}${n}`).join(""):t;return{r:Number.parseInt(s.slice(0,2),16),g:Number.parseInt(s.slice(2,4),16),b:Number.parseInt(s.slice(4,6),16)}}let i=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*[\d.]+%?)?\s*\)$/i.exec(e);return i?{r:Math.max(0,Math.min(255,Number(i[1]))),g:Math.max(0,Math.min(255,Number(i[2]))),b:Math.max(0,Math.min(255,Number(i[3])))}:null}function Ut(r){return(0,qt.relativeLuminance255)([r.r,r.g,r.b])}function pe(r,e){let t=he(r),i=he(e);if(!t||!i)return null;let s=Math.max(Ut(t),Ut(i)),n=Math.min(Ut(t),Ut(i));return(s+.05)/(n+.05)}function Se(r,e="#172033",t="#eef1f8"){return(pe(e,r)??0)>=(pe(t,r)??0)?e:t}function Fn(r){return(0,qt.rgb255ToHex)(r.r,r.g,r.b)}function xi(r,e,t){let i=he(r),s=he(e);if(!i||!s)return null;let n=Math.max(0,Math.min(1,t));return Fn({r:i.r*n+s.r*(1-n),g:i.g*n+s.g*(1-n),b:i.b*n+s.b*(1-n)})}function Vs(r,e,t,i){if((pe(r,t)??4.5)>=4.5&&(pe(r,i)??4.5)>=4.5)return r;if(!he(r)||!he(e))return e;for(let s=.15;s<=1;s+=.05){let n=xi(r,e,1-s);if(n&&(pe(n,t)??0)>=4.5&&(pe(n,i)??0)>=4.5)return n}return e}function Fs(r,e){let t=e??r["--sl-bg"],i=he(t)?Se(t)==="#172033":!1,s=he(r["--sl-bg"])?Se(r["--sl-bg"])==="#172033":!1;if(i===s)return null;let n=i?"#ffffff":"#1a2234",o=Se(t),a=r["--sl-accent"];return{"--sl-bg":t,"--sl-surface":n,"--sl-text":o,"--sl-muted":i?"#667085":"#a5aec2","--sl-line":i?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)","--sl-accent-text":Vs(a,o,t,n)}}function dt(r,e){let t=e?.background??r?.background??"#0f1522",i=he(t)?Se(t)==="#172033":!1,s=e?.surface??(i?"#ffffff":"#1a2234"),n=e?.accent??r?.accent??"#f4b740",o=r?.accentInk,a=e?.accentInk??(o&&(pe(o,n)??4.5)>=4.5?o:Se(n,"#1a1200","#ffffff")),l=r?.textColor,c=e?.text??(l&&(pe(l,t)??4.5)>=4.5&&(pe(l,s)??4.5)>=4.5?l:Se(t));return{"--sl-accent":n,"--sl-accent-ink":a,"--sl-accent-text":Vs(n,c,t,s),"--sl-bg":t,"--sl-surface":s,"--sl-text":c,"--sl-muted":e?.muted??(i?"#667085":"#a5aec2"),"--sl-line":e?.line??(i?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)"),"--sl-font":e?.fontFamily??r?.fontFamily??"-apple-system,BlinkMacSystemFont,'Segoe UI',Inter,sans-serif","--sl-radius":`${e?.radius??14}px`}}function js(r,e,t){let i=document.createElement("div");i.className="sl-picker",i.tabIndex=-1,i.lang=(0,We.getLocale)(),i.dir=(0,We.localeDirection)(),r.appendChild(i),Object.entries(dt(void 0,t)).forEach(([n,o])=>i.style.setProperty(n,o)),i.innerHTML=`
|
|
2157
|
+
}`,e.append(t);let i="linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.10) 37%, rgba(255,255,255,0.04) 63%)",s=document.createElement("div");Object.assign(s.style,{position:"absolute",inset:"0",display:"flex",flexDirection:"column",padding:"16px",gap:"14px",opacity:"0.9"});let n=c=>{let h=document.createElement("div");return h.className="sl-shimmer",Object.assign(h.style,{background:i,borderRadius:"8px"}),Object.assign(h.style,c),h};s.append(n({height:"40px",width:"100%",flex:"0 0 auto"}));let o=document.createElement("div");Object.assign(o.style,{display:"flex",gap:"14px",flex:"1 1 auto",minHeight:"0"}),o.append(n({width:"220px",height:"100%",flex:"0 0 auto"})),o.append(n({flex:"1 1 auto",height:"100%"})),s.append(o),e.append(s);let a=document.createElement("div");Object.assign(a.style,{position:"relative",zIndex:"1",display:"flex",alignItems:"center",gap:"10px",padding:"10px 16px",borderRadius:"999px",background:"rgba(16, 22, 37, 0.72)",fontSize:"13px",fontWeight:"500",letterSpacing:"0.01em"});let l=document.createElement("span");l.className="sl-shimmer",Object.assign(l.style,{width:"9px",height:"9px",borderRadius:"50%",background:i,flex:"0 0 auto"}),a.append(l),a.append(document.createTextNode("Loading designer\u2026")),e.append(a)}buildErrorCard(e,t){let i=sa[t],s=document.createElement("div");Object.assign(s.style,{maxWidth:"420px",margin:"0 24px",padding:"28px",textAlign:"center",background:"rgba(255, 255, 255, 0.03)",border:"1px solid rgba(255, 255, 255, 0.08)",borderRadius:"16px",boxShadow:"0 12px 40px rgba(0, 0, 0, 0.35)"});let n=document.createElement("h2");n.textContent=i.title,Object.assign(n.style,{margin:"0 0 8px",fontSize:"17px",fontWeight:"600",color:"#f4f7ff"});let o=document.createElement("p");o.textContent=i.body,Object.assign(o.style,{margin:"0 0 20px",fontSize:"13.5px",lineHeight:"1.5",color:"#aab4c8"});let a=document.createElement("button");a.type="button",a.textContent="Try again",Object.assign(a.style,{appearance:"none",cursor:"pointer",border:"0",borderRadius:"10px",padding:"10px 22px",fontSize:"14px",fontWeight:"600",color:"#101625",background:"#7aa2ff"}),a.addEventListener("click",()=>this.handleTryAgain()),s.append(n,o,a),e.append(s)}};var T=require("@seatlayer/core"),At=require("@seatlayer/core/view3d/crossfade/panorama"),jn=require("@seatlayer/core/core/seatConfidence");function ts(r){return r?.previousPrice!=null&&r.previousPrice>r.price?r.previousPrice:null}function is(r){return na(r)+(r.moreLabel?`<button type="button" class="sl-price-more" aria-expanded="${!r.collapsed}">${r.esc(r.moreLabel)}</button>`:"")+oa(r.status)}function na(r){let{esc:e,money:t}=r;return r.categories.map(i=>{let s=r.priceOf(i),n=r.rangeOf(i),o=r.offerOf(i.key),a=ts(o),l=r.activeKey===i.key;return`<div class="sl-price-row${r.bandKeys!=null&&!r.bandKeys.has(i.key)?" sl-dim":""}${l?" sl-active":""}" data-cat="${e(i.key)}" role="button" tabindex="0" aria-pressed="${l}" title="${e(r.titleFor(i,l))}"><span class="sl-dot" style="--sl-cat-dot:${e(r.colorOf(i))}"></span><span class="sl-price-label">${e(i.label)}`+(o?.offerName?`<small class="sl-price-offer">${e(o.offerName)}</small>`:"")+`</span><span class="sl-price-left">${e(r.leftCount(r.left[i.key]??0))}</span>`+(a!=null?`<span class="sl-price-was">${e(t(a))}</span>`:"")+(n!=null?`<span class="sl-price-amt">${n.min===n.max?e(t(n.min)):`${e(t(n.min))}\u2013${e(t(n.max))}`}</span>`:s!=null?`<span class="sl-price-amt">${e(t(s))}</span>`:"")+"</div>"}).join("")}function oa(r){let e=t=>t.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i]);return`<div class="sl-status-key" aria-label="${e(r.legend)}"><span class="sl-status-item"><i class="sl-status-icon held" aria-hidden="true"><svg viewBox="0 0 24 24"><rect x="5" y="10" width="14" height="10" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg></i>${e(r.held)}</span><span class="sl-status-item"><i class="sl-status-icon sold" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M7 17L17 7"/></svg></i>${e(r.sold)}</span></div>`}function Ni(r){let e=Math.abs(r.scrollLeft),t=e>2,i=e+r.clientWidth<r.scrollWidth-2;return r.dataset.fadeStart=String(t),r.dataset.fadeEnd=String(i),{start:t,end:i}}function rs(r){let{esc:e,money:t}=r;return r.categories.map(i=>{let s=r.rangeOf(i),n=r.priceOf(i),o=s?s.min===s.max?t(s.min):`${t(s.min)}+`:n!=null?t(n):null,a=Object.prototype.hasOwnProperty.call(r.left,i.key)&&r.left[i.key]<=0,l=ts(r.offerOf(i.key)),c=o?`${i.label} \u2014 ${o}${a?` (${r.soldOutWord})`:""}`:i.label;return`<button type="button" class="sl-rc" data-cat="${e(i.key)}" aria-pressed="${r.activeKey===i.key}" aria-label="${e(c)}" title="${e(c)}"${a?" disabled":""}><i class="sl-rc-dot" style="--sl-cat-dot:${e(r.colorOf(i))}"></i>`+(l!=null?`<span class="sl-rc-was">${e(t(l))}</span>`:"")+`<span class="sl-rc-t">${e(o??i.label)}</span></button>`}).join("")}function ss(r,e){let t=r.map(a=>({key:a.key,range:e.rangeOf(a)})).filter(a=>a.range!=null);if(!t.length)return[];let i=[...new Map(t.map(a=>[`${a.range.min}:${a.range.max}`,a.range])).values()].sort((a,l)=>a.min-l.min||a.max-l.max);if(i.length<=5)return i.map(a=>({id:`p${a.min}-${a.max}`,label:a.min===a.max?e.money(a.min):`${e.money(a.min)}\u2013${e.money(a.max)}`,keys:t.filter(l=>l.range.min===a.min&&l.range.max===a.max).map(l=>l.key),min:a.min,max:a.max}));let s=[...t].sort((a,l)=>a.range.min-l.range.min||a.range.max-l.range.max),n=Math.ceil(s.length/4),o=[];for(let a=0;a<s.length;a+=n){let l=s.slice(a,a+n),c=Math.min(...l.map(p=>p.range.min)),h=Math.max(...l.map(p=>p.range.max));o.push({id:`b${a}`,label:c===h?e.money(c):`${e.money(c)}\u2013${e.money(h)}`,keys:l.map(p=>p.key),min:c,max:h})}return o}var aa=["on-sale","low","sold-out","presale","closed"];function yt(r){return r==null?null:typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0}function os(r){return r==null?null:typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0}function ns(r){if(r==null)return null;if(typeof r!="object"||Array.isArray(r))return;let e=r,t=e.count,i=e.index;if(typeof i!="number"||!Number.isInteger(i)||i<1||typeof t!="number"||!Number.isInteger(t)||t<i)return;let s=e.remaining;if(s!=null&&(typeof s!="number"||!Number.isInteger(s)||s<0))return;let n={index:i,count:t,remaining:s??null};if(e.id!==void 0){if(typeof e.id!="string"||!e.id.trim())return;n.id=e.id.trim()}if(e.name!==void 0){if(typeof e.name!="string"||!e.name.trim())return;n.name=e.name.trim()}if(e.categoryKey!==void 0){if(e.categoryKey!==null&&(typeof e.categoryKey!="string"||!e.categoryKey.trim()))return;n.categoryKey=e.categoryKey==null?null:e.categoryKey.trim()}for(let o of["startsAt","endsAt"]){if(e[o]===void 0)continue;let a=os(e[o]);if(a===void 0)return;n[o]=a}return n}function la(r){if(r==null)return null;if(typeof r!="object"||Array.isArray(r))return;let e=r;if(!Number.isInteger(e.assignmentVersion)||e.assignmentVersion<0||!Array.isArray(e.channels)||!Array.isArray(e.objects))return;let t=[],i=new Set;for(let o of e.channels){if(!o||typeof o!="object"||Array.isArray(o))return;let a=o,l=typeof a.channelId=="string"?a.channelId.trim():"";if(!l||i.has(l)||!Number.isInteger(a.pricingVersion)||a.pricingVersion<0||!Array.isArray(a.priceOverrides))return;let c=[],h=new Set;for(let p of a.priceOverrides){if(!p||typeof p!="object"||Array.isArray(p))return;let d=p,u=typeof d.categoryKey=="string"?d.categoryKey.trim():"",g=d.tierId===null?null:typeof d.tierId=="string"&&d.tierId.trim()?d.tierId.trim():void 0,b=yt(d.price);if(!u||g===void 0||b===void 0||b===null)return;let x=`${u}\0${g??""}`;if(h.has(x))return;h.add(x),c.push({categoryKey:u,tierId:g,price:b})}i.add(l),t.push({channelId:l,pricingVersion:a.pricingVersion,priceOverrides:c})}let s=[],n=new Set;for(let o of e.objects){if(!o||typeof o!="object"||Array.isArray(o))return;let a=o,l=typeof a.label=="string"?a.label.trim():"",c=typeof a.channelId=="string"?a.channelId.trim():"";if(!l||n.has(l)||!i.has(c))return;n.add(l),s.push({label:l,channelId:c})}return{assignmentVersion:e.assignmentVersion,channels:t,objects:s}}function ri(r){if(!r||typeof r!="object"||Array.isArray(r))return null;let e=r,t=aa.find(h=>h===e.state);if(!t)return null;let i=yt(e.fromPrice),s=yt(e.previousPrice);if(i===void 0||s===void 0)return null;let n=e.currency==null?null:typeof e.currency=="string"&&e.currency.trim()?e.currency.trim():void 0;if(n===void 0)return null;let o=ns(e.release);if(o===void 0)return null;let a=e.upcoming===void 0?null:ns(e.upcoming);if(a===void 0)return null;let l=[];if(e.prices!=null){if(!Array.isArray(e.prices))return null;let h=[];for(let p of e.prices){if(!p||typeof p!="object"||Array.isArray(p))return null;let d=p,u=typeof d.categoryKey=="string"?d.categoryKey.trim():"";if(!u)return null;let g=yt(d.price),b=yt(d.previousPrice);if(g==null||b===void 0)return null;let x={categoryKey:u,price:g,previousPrice:b};if(d.offerId!==void 0){if(typeof d.offerId!="string"||!d.offerId.trim())return null;x.offerId=d.offerId.trim()}if(d.offerName!==void 0){if(typeof d.offerName!="string"||!d.offerName.trim())return null;x.offerName=d.offerName.trim()}if(d.remaining!==void 0){if(d.remaining!==null&&(typeof d.remaining!="number"||!Number.isInteger(d.remaining)||d.remaining<0))return null;x.remaining=d.remaining==null?null:d.remaining}for(let k of["startsAt","endsAt"]){if(d[k]===void 0)continue;let S=os(d[k]);if(S===void 0)return null;x[k]=S}h.push(x)}l=h}let c=la(e.channelPricing);return c===void 0?null:{state:t,fromPrice:i,previousPrice:s,currency:n,release:o,upcoming:a,prices:l,channelPricing:c}}function as(r,e){if(!r)return null;let t=null,i=s=>{s!=null&&s>e&&(t===null||s<t)&&(t=s)};for(let s of[r.release,r.upcoming])i(s?.startsAt),i(s?.endsAt);for(let s of r.prices)i(s.startsAt),i(s.endsAt);return t}function si(r){let e={};for(let t of r?.prices??[])e[t.categoryKey]=t.price;return e}var rt=require("@seatlayer/core");var oi=require("@seatlayer/core/core/color");function we(r){if(!r)return null;let e=r.trim().toLowerCase();if(e==="white")return{r:255,g:255,b:255};if(e==="black")return{r:0,g:0,b:0};let t=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(e)?.[1];if(t){let s=t.length<=4?[...t].map(n=>`${n}${n}`).join(""):t;return{r:Number.parseInt(s.slice(0,2),16),g:Number.parseInt(s.slice(2,4),16),b:Number.parseInt(s.slice(4,6),16)}}let i=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*[\d.]+%?)?\s*\)$/i.exec(e);return i?{r:Math.max(0,Math.min(255,Number(i[1]))),g:Math.max(0,Math.min(255,Number(i[2]))),b:Math.max(0,Math.min(255,Number(i[3])))}:null}function ni(r){return(0,oi.relativeLuminance255)([r.r,r.g,r.b])}function xe(r,e){let t=we(r),i=we(e);if(!t||!i)return null;let s=Math.max(ni(t),ni(i)),n=Math.min(ni(t),ni(i));return(s+.05)/(n+.05)}function Me(r,e="#172033",t="#eef1f8"){return(xe(e,r)??0)>=(xe(t,r)??0)?e:t}function ca(r){return(0,oi.rgb255ToHex)(r.r,r.g,r.b)}function Vi(r,e,t){let i=we(r),s=we(e);if(!i||!s)return null;let n=Math.max(0,Math.min(1,t));return ca({r:i.r*n+s.r*(1-n),g:i.g*n+s.g*(1-n),b:i.b*n+s.b*(1-n)})}function ls(r,e,t,i){if((xe(r,t)??4.5)>=4.5&&(xe(r,i)??4.5)>=4.5)return r;if(!we(r)||!we(e))return e;for(let s=.15;s<=1;s+=.05){let n=Vi(r,e,1-s);if(n&&(xe(n,t)??0)>=4.5&&(xe(n,i)??0)>=4.5)return n}return e}function cs(r,e){let t=e??r["--sl-bg"],i=we(t)?Me(t)==="#172033":!1,s=we(r["--sl-bg"])?Me(r["--sl-bg"])==="#172033":!1;if(i===s)return null;let n=i?"#ffffff":"#1a2234",o=Me(t),a=r["--sl-accent"];return{"--sl-bg":t,"--sl-surface":n,"--sl-text":o,"--sl-muted":i?"#667085":"#a5aec2","--sl-line":i?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)","--sl-accent-text":ls(a,o,t,n)}}var ds={light:{background:"#ffffff",surface:"#f6f7fb",text:"#172033",muted:"#667085",line:"rgba(23,32,51,.16)",map:"#e9edf4"},dark:{background:"#0f1522",surface:"#1a2234",text:"#eef1f8",muted:"#a5aec2",line:"rgba(165,174,194,.24)",map:"#0f1522"}};function da(){try{return window.matchMedia?.("(prefers-color-scheme: dark)").matches===!0}catch{return!1}}function xt(r){if(r)return r==="auto"?da()?"dark":"light":r}function ai(r,e=r?.mode){if(r?.map)return r.map;let t=xt(e);return t?{background:ds[t].map}:null}function ps(r){let e;try{e=window.matchMedia?.("(prefers-color-scheme: dark)")}catch{return()=>{}}if(!e)return()=>{};let t=i=>r(i.matches);return typeof e.addEventListener=="function"?e.addEventListener("change",t):e.addListener?.(t),()=>{typeof e.removeEventListener=="function"?e.removeEventListener("change",t):e.removeListener?.(t)}}function wt(r,e,t){let i=t?ds[t]:null,s=e?.background??i?.background??r?.background??"#0f1522",n=we(s)?Me(s)==="#172033":!1,o=e?.surface??i?.surface??(n?"#ffffff":"#1a2234"),a=e?.accent??r?.accent??"#f4b740",l=r?.accentInk,c=e?.accentInk??(l&&(xe(l,a)??4.5)>=4.5?l:Me(a,"#1a1200","#ffffff")),h=i?void 0:r?.textColor,p=e?.text??i?.text??(h&&(xe(h,s)??4.5)>=4.5&&(xe(h,o)??4.5)>=4.5?h:Me(s));return{"--sl-accent":a,"--sl-accent-ink":c,"--sl-accent-text":ls(a,p,s,o),"--sl-bg":s,"--sl-surface":o,"--sl-text":p,"--sl-muted":e?.muted??i?.muted??(n?"#667085":"#a5aec2"),"--sl-line":e?.line??i?.line??(n?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)"),"--sl-font":e?.fontFamily??r?.fontFamily??"-apple-system,BlinkMacSystemFont,'Segoe UI',Inter,sans-serif","--sl-radius":`${e?.radius??14}px`}}function pa(){return`<svg class="sl-boot-venue" viewBox="0 0 200 140" preserveAspectRatio="xMidYMid meet" aria-hidden="true" focusable="false"><g class="sl-boot-shells">${["M20 92a80 52 0 0 1 160 0v14a94 62 0 0 0-160 0z","M32 74a68 42 0 0 1 136 0v12a80 50 0 0 0-136 0z","M46 58a54 32 0 0 1 108 0v10a64 38 0 0 0-108 0z"].map(e=>`<path d="${e}" />`).join("")}</g><rect class="sl-boot-stage" x="62" y="16" width="76" height="16" rx="4" /></svg>`}function hs(r,e,t){let i=document.createElement("div");i.className="sl-picker",i.tabIndex=-1,i.lang=(0,rt.getLocale)(),i.dir=(0,rt.localeDirection)(),r.appendChild(i),Object.entries(wt(void 0,t)).forEach(([n,o])=>i.style.setProperty(n,o)),i.innerHTML=`
|
|
1589
2158
|
<div class="sl-head">
|
|
1590
2159
|
<div class="sl-logo" data-ref="logo"></div>
|
|
1591
2160
|
<div class="sl-head-info" data-ref="headInfo">
|
|
@@ -1618,7 +2187,11 @@
|
|
|
1618
2187
|
<span class="sl-zfs-lbl" data-sl-t="picker.fullScreen" aria-hidden="true">${e("picker.fullScreen","Full screen")}</span>
|
|
1619
2188
|
</button>
|
|
1620
2189
|
</div>
|
|
1621
|
-
<div class="sl-boot" data-ref="boot"
|
|
2190
|
+
<div class="sl-boot" data-ref="boot">
|
|
2191
|
+
<div class="sl-boot-bar" aria-hidden="true"></div>
|
|
2192
|
+
${pa()}
|
|
2193
|
+
<span class="sl-boot-say" role="status" aria-live="polite" data-sl-t="picker.loadingSeatMap">${e("picker.loadingSeatMap","Loading seat map\u2026")}</span>
|
|
2194
|
+
</div>
|
|
1622
2195
|
<div class="sl-toast" data-ref="toast" role="status" aria-live="polite"></div>
|
|
1623
2196
|
</div>
|
|
1624
2197
|
<div class="sl-side" data-ref="side">
|
|
@@ -1659,9 +2232,9 @@
|
|
|
1659
2232
|
<button type="button" class="sl-cta" data-ref="cta" disabled></button>
|
|
1660
2233
|
</div>
|
|
1661
2234
|
</div>
|
|
1662
|
-
</div>`;let s={};return i.querySelectorAll("[data-ref]").forEach(n=>{s[n.dataset.ref]=n}),{root:i,mapHost:s.map,els:s}}function Ns(r){let e=(t,i)=>{for(let s of r.querySelectorAll(`[${t}]`)){let n=s.getAttribute(t);if(!n)continue;let o=(0,We.t)(n);o!==n&&i(s,o)}};e("data-sl-t",(t,i)=>{t.textContent=i}),e("data-sl-a",(t,i)=>{t.setAttribute("aria-label",i)}),e("data-sl-ti",(t,i)=>{t.setAttribute("title",i)})}function Gs(r){let e=document.createElement("div");e.className="sl-floors on",e.setAttribute("role","group"),e.setAttribute("aria-label",r.tf("picker.chooseLevel","Choose level"));let t=[{id:"",name:r.tf("picker.allFloors","All floors")},...r.floors.map(n=>({id:n.id,name:n.name}))];for(let n of t){let o=document.createElement("button");o.type="button",o.dataset.floor=n.id,o.textContent=n.name,o.setAttribute("aria-pressed","false"),o.addEventListener("click",()=>r.onChoose(n.id)),e.appendChild(o)}let i=document.createElement("button");i.type="button",i.className="sl-floor-info",i.textContent="i";let s=r.tf("picker.floorHelp","All floors shows the complete venue. Choose one level to inspect and select its seats.");return i.setAttribute("aria-label",s),i.title=s,e.appendChild(i),e}function Us(r,e,t){if(!r)return;let i=t?"":e;r.querySelectorAll("button[data-floor]").forEach(s=>{s.setAttribute("aria-pressed",String(s.dataset.floor===i))})}var qs=require("@seatlayer/core"),Ye=require("@seatlayer/core/picker/minimapGeometry");function Ks(r,e){let t=new wi(r);return t.build(e),t}var wi=class{constructor(e){this.host=e;this.miniCanvas=null;this.miniBase=null;this.miniWrap=null;this.miniToggle=null;this.miniLabel=null;this.miniTf=null;this.miniDrag=null;this.miniSuppressClick=!1;this.userClosed=!1}build(e){if(!this.host.controller.getViewport())return;let i=document.createElement("button");i.type="button",i.className="sl-minimap-toggle",i.setAttribute("aria-label",f("picker.openVenueMap","Open venue overview map")),i.setAttribute("aria-expanded","false"),i.innerHTML='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 6l5-2 8 3 5-2v13l-5 2-8-3-5 2zM8 4v13M16 7v13"/></svg>',e.appendChild(i),this.miniToggle=i;let s=document.createElement("div");s.className="sl-minimap",s.setAttribute("role","group");let n=document.createElement("div");n.className="sl-minimap-bar";let o=document.createElement("span");o.className="sl-minimap-label";let a=document.createElement("span");a.className="sl-minimap-key",a.setAttribute("aria-label",f("picker.minimapStateKey","Focused, selected, available, and inactive sections")),a.innerHTML='<i class="focused" title="Focused"></i><i class="selected" title="Selected"></i><i title="Available"></i><i class="inactive" title="Inactive"></i>';let l=document.createElement("button");l.type="button",l.className="sl-minimap-close",l.setAttribute("aria-label",f("picker.closeVenueMap","Close venue overview map")),l.textContent="\xD7",n.append(o,a,l);let c=document.createElement("canvas");c.tabIndex=0,c.setAttribute("role","application"),c.setAttribute("aria-label",f("picker.venueMapInstructions","Venue overview map. Drag the viewport, click a section, or use arrow keys to pan.")),s.append(n,c),e.appendChild(s),this.miniWrap=s,this.miniLabel=o,this.miniCanvas=c;let h=document.createElement("canvas");this.miniBase=h,i.addEventListener("click",()=>{let p=this.host.root()?.dataset.minimapOpen==="true";this.userClosed=p,this.setMinimapOpen(!p)}),l.addEventListener("click",()=>{this.userClosed=!0,this.setMinimapOpen(!1)}),c.addEventListener("click",p=>{if(this.miniSuppressClick){this.miniSuppressClick=!1;return}this.minimapJump(p)}),c.addEventListener("pointerdown",p=>this.minimapPointerDown(p)),c.addEventListener("pointermove",p=>this.minimapPointerMove(p)),c.addEventListener("pointerup",p=>this.minimapPointerUp(p)),c.addEventListener("pointercancel",p=>this.minimapPointerUp(p)),c.addEventListener("keydown",p=>this.minimapKeydown(p)),this.layoutMinimap(),this.syncMinimapLabel(),this.drawMinimapStatic(),this.drawMinimapRect()}setAutoOpen(e){if(this.miniWrap){if(!e){this.userClosed=!1,this.host.root()?.dataset.minimapOpen==="true"&&this.setMinimapOpen(!1,!1);return}this.userClosed||this.host.root()?.dataset.minimapOpen==="true"||this.setMinimapOpen(!0,!1)}}setMinimapOpen(e,t=!0){this.host.root()?.setAttribute("data-minimap-open",String(e)),this.miniToggle?.setAttribute("aria-expanded",String(e)),t&&(e?this.miniCanvas?.focus():this.miniToggle?.focus())}layoutMinimap(){let e=this.miniCanvas,t=this.miniBase,i=this.host.controller.getViewport()?.bounds;if(!e||!t||!i||!(i.width>0&&i.height>0))return;let s=196,n=146,o=6,a=i.width/Math.max(1,i.height),l=s,c=Math.round(s/a);c>n&&(c=n,l=Math.round(n*a)),l=Math.max(64,l),c=Math.max(48,c);let h=Math.min(2,window.devicePixelRatio||1);e.width=Math.round(l*h),e.height=Math.round(c*h),e.style.width=`${l}px`,e.style.height=`${c}px`,t.width=e.width,t.height=e.height,this.miniTf=(0,Ye.createMinimapTransform)(i,e.width,e.height,h,o)}syncMinimapLabel(){if(!this.miniLabel||!this.miniWrap)return;let e=this.host.controller.getFloors(),t=this.host.controller.isFloorOverview()?f("picker.allFloors","All floors"):e.find(h=>h.id===this.host.controller.getActiveFloorId())?.name??f("picker.venueOverview","Venue overview"),i=this.host.controller.getMinimapSnapshot().sections,n=i.find(h=>h.active)?.label??this.host.focusedSectionLabel(),o=n?`${t} \xB7 ${n}`:t;this.miniLabel.textContent=o;let a=i.filter(h=>h.state==="selected").length,l=i.filter(h=>h.state==="available").length,c=i.filter(h=>h.state==="inactive").length;this.miniWrap.setAttribute("aria-label",i.length?`${o}. ${a} selected, ${l} available, ${c} inactive sections.`:o),this.miniCanvas?.setAttribute("aria-label",i.length?`${o}. ${a} selected, ${l} available, ${c} inactive sections. ${f("picker.venueMapInstructions","The outlined region is the visible map area. Drag it, click a section, or use arrow keys to pan.")}`:`${o}. ${f("picker.venueMapInstructions","The outlined region is the visible map area. Drag it, click elsewhere, or use arrow keys to pan.")}`)}refreshMinimap(){this.miniBase&&(this.layoutMinimap(),this.syncMinimapLabel(),this.drawMinimapStatic(),this.drawMinimapRect())}drawMinimapStatic(){let e=this.miniBase,t=this.miniTf;if(!e||!t)return;let i=e.getContext("2d");if(!i)return;i.clearRect(0,0,e.width,e.height);let s=p=>p*t.scale+t.offX,n=p=>p*t.scale+t.offY,o=this.host.cssVar("--sl-line")||"rgba(139,147,167,.5)",a=this.host.cssVar("--sl-muted")||"#8b93a7",l=this.host.cssVar("--sl-accent")||"#6e7bff",c=this.host.cssVar("--sl-success")||"#22a06b",h=this.host.controller.getMinimapSnapshot();for(let p of h.sections)p.outline.length<3||(i.beginPath(),p.outline.forEach((d,u)=>u===0?i.moveTo(s(d.x),n(d.y)):i.lineTo(s(d.x),n(d.y))),i.closePath(),i.globalAlpha=p.state==="inactive"?.18:p.state==="selected"?.72:.34,i.fillStyle=p.state==="inactive"?a:p.state==="selected"?l:c,i.fill(),i.globalAlpha=.82,i.lineWidth=Math.max(1,t.dpr),i.strokeStyle=o,i.stroke(),p.active&&(i.globalAlpha=1,i.lineJoin="round",i.lineWidth=Math.max(4,t.dpr*3.5),i.strokeStyle=this.host.cssVar("--sl-surface")||"#fff",i.stroke(),i.lineWidth=Math.max(2,t.dpr*1.75),i.strokeStyle=l,i.stroke()));if(i.globalAlpha=1,!h.sections.length){let p=Math.max(1,t.dpr);for(let d of h.seats)i.globalAlpha=d.state==="inactive"?.22:.78,i.fillStyle=d.state==="inactive"?a:d.state==="selected"?l:c,i.beginPath(),i.arc(s(d.x),n(d.y),p,0,Math.PI*2),i.fill();i.globalAlpha=1}}drawMinimapRect(){let e=this.miniCanvas,t=this.miniBase,i=this.miniTf;if(!e||!t||!i)return;let s=e.getContext("2d");if(!s)return;s.clearRect(0,0,e.width,e.height),s.drawImage(t,0,0);let n=this.host.controller.getViewport();if(!n)return;let o=(0,Ye.minimapViewportPlan)(n.visible,i,e.width,e.height,Math.max(2,i.dpr*2)),a=this.host.cssVar("--sl-text")||"#12151c",l=this.host.cssVar("--sl-surface")||"#fff";s.save(),s.globalAlpha=.1,s.fillStyle=a,s.fillRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),s.globalAlpha=.9,s.lineJoin="round",s.lineWidth=Math.max(4,i.dpr*3.25),s.strokeStyle=l,s.strokeRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),s.globalAlpha=1,s.lineWidth=Math.max(2,i.dpr*1.75),s.strokeStyle=a,s.strokeRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),o.clipped&&Object.values(o.clippedEdges).some(Boolean)&&(s.setLineDash([Math.max(3,i.dpr*3),Math.max(2,i.dpr*2)]),s.strokeRect(o.clipped.x,o.clipped.y,o.clipped.width,o.clipped.height)),s.restore()}minimapWorldPoint(e){let t=this.miniCanvas,i=this.miniTf;if(!t||!i)return null;let s=t.getBoundingClientRect(),n=(e.clientX-s.left)*(t.width/Math.max(1,s.width)),o=(e.clientY-s.top)*(t.height/Math.max(1,s.height));return{...(0,Ye.minimapPointToWorld)({x:n,y:o},i),px:n,py:o}}minimapPointerDown(e){let t=this.minimapWorldPoint(e),i=this.host.controller.getViewport()?.visible;!t||!i||!(t.x>=i.x&&t.x<=i.x+i.width&&t.y>=i.y&&t.y<=i.y+i.height)||(this.miniDrag={pointerId:e.pointerId,offsetX:t.x-(i.x+i.width/2),offsetY:t.y-(i.y+i.height/2),startX:e.clientX,startY:e.clientY,moved:!1},this.miniCanvas?.setPointerCapture(e.pointerId),this.miniCanvas?.classList.add("sl-dragging"),e.preventDefault())}minimapPointerMove(e){let t=this.miniDrag;if(!t||t.pointerId!==e.pointerId)return;let i=this.minimapWorldPoint(e);i&&(!t.moved&&Math.hypot(e.clientX-t.startX,e.clientY-t.startY)>2&&(t.moved=!0,this.host.controller.clearSectionFocus()),this.host.controller.panToWorld({x:i.x-t.offsetX,y:i.y-t.offsetY}),e.preventDefault())}minimapPointerUp(e){let t=this.miniDrag;!t||t.pointerId!==e.pointerId||(this.miniSuppressClick=t.moved,this.miniDrag=null,this.miniCanvas?.classList.remove("sl-dragging"),this.miniCanvas?.hasPointerCapture(e.pointerId)&&this.miniCanvas.releasePointerCapture(e.pointerId))}minimapKeydown(e){let t=this.host.controller.getViewport()?.visible;if(!t)return;if(e.key==="Home"){this.host.controller.overview(),e.preventDefault();return}let i=e.key==="ArrowLeft"?-t.width*.2:e.key==="ArrowRight"?t.width*.2:0,s=e.key==="ArrowUp"?-t.height*.2:e.key==="ArrowDown"?t.height*.2:0;!i&&!s||(this.host.controller.clearSectionFocus(),this.host.controller.panToWorld({x:t.x+t.width/2+i,y:t.y+t.height/2+s}),e.preventDefault())}minimapJump(e){let t=this.minimapWorldPoint(e);if(t){for(let i of this.host.controller.getMinimapSnapshot().sections)if(!(i.state==="inactive"||i.outline.length<3)&&(0,qs.pointInPolygon)(t,i.outline)){this.host.controller.focusSection(i.id);return}this.host.controller.clearSectionFocus(),this.host.controller.panToWorld(t)}}};var Kt=require("@seatlayer/core");var jn=12;function Ws(r,e){let t=e.floors(),i=new Set(t.map(y=>y.label.trim().toLocaleLowerCase())),s=e.zones().filter(y=>y.seatCount>0&&!i.has(y.label.trim().toLocaleLowerCase())),n=e.sections().filter(y=>y.seatCount>0&&!i.has(y.label.trim().toLocaleLowerCase())),o=s.length>1?[]:n,a=t.length>1,l=s.length>1,c=o.length>1;if(!a&&!l&&!c)return;let h=document.createElement("div");h.className="sl-view3d-nav";let p=document.createElement("button");p.type="button",p.className="sl-view3d-nav-toggle",p.setAttribute("aria-expanded","false");let d='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M15.5 8.5l-2 5-5 2 2-5z"/></svg>',u=document.createElement("span");p.innerHTML=d,p.appendChild(u);let g=y=>{h.classList.toggle("is-open",y),p.setAttribute("aria-expanded",String(y)),u.textContent=y?f("picker.closeVenueNav","Close"):a&&(l||c)?f("picker.levelsAndAreas","Levels & areas"):a?f("picker.levels","Levels"):f("picker.areas","Areas")};p.addEventListener("click",()=>g(!h.classList.contains("is-open"))),h.addEventListener("keydown",y=>{y.key!=="Escape"||!h.classList.contains("is-open")||(y.preventDefault(),y.stopPropagation(),g(!1),p.focus())}),g(!1),h.appendChild(p);let v=y=>{},w=y=>{};if(a){let y=document.createElement("div");y.setAttribute("role","group"),y.setAttribute("aria-label",f("picker.levels","Levels"));let R=[];w=_=>{R.forEach(k=>{k.setAttribute("aria-pressed",String((k.dataset.floor===""?null:Number(k.dataset.floor))===_))})};let S=_=>{e.focusFloor(_)&&(w(_),v(_))},P=(_,k)=>{let L=document.createElement("button");L.type="button",L.textContent=_,L.dataset.floor=k===null?"":String(k),L.setAttribute("aria-pressed",String(k===null)),L.addEventListener("click",()=>{S(k),g(!1)}),R.push(L),y.appendChild(L)};P(f("picker.allLevels","All levels"),null);for(let _ of t)P(_.label||(0,Kt.t)("picker.levelNumber",{number:_.index+1}),_.index);h.appendChild(y)}if(l||c){let y=document.createElement("div");y.setAttribute("role","group"),y.setAttribute("aria-label",f("picker.areas","Areas"));let R=l?s.map(P=>({id:P.id,label:P.label||P.id,go:()=>{e.focusZone(P.id)}})):o.map(P=>({id:P.id,label:P.label||P.id,floorIndex:P.floorIndex,go:()=>{e.focusSection(P.id),Number.isFinite(P.floorIndex)&&w(P.floorIndex)}})),S=P=>{let _=l||P===null?R:R.filter(k=>k.floorIndex===void 0||k.floorIndex===P);if(y.replaceChildren(),!_.length){y.remove();return}if(y.isConnected||h.appendChild(y),!l&&_.length>jn){let k=document.createElement("select");k.setAttribute("aria-label",f("picker.jumpToSection","Jump to section"));let L=document.createElement("option");L.value="",L.textContent=f("picker.jumpToSection","Jump to section"),k.appendChild(L);for(let m of _){let C=document.createElement("option");C.value=m.id,C.textContent=m.label,k.appendChild(C)}k.addEventListener("change",()=>{_.find(m=>m.id===k.value)?.go()}),y.appendChild(k);return}for(let k of _){let L=document.createElement("button");L.type="button",L.textContent=k.label,L.addEventListener("click",()=>{k.go(),g(!1)}),y.appendChild(L)}};v=S,S(null)}r.appendChild(h)}var Wt=class{constructor(e){this.host=e;this.chip=null}sync(){let e=this.host.overlay();if(!e||this.host.savedSeatIds().length===0){this.chip?.remove(),this.chip=null;return}let t=this.chip;if(!t){t=document.createElement("div"),t.className="sl-view3d-compare-saved",t.setAttribute("role","group"),t.setAttribute("aria-label",f("picker.savedSeatComparison","Saved seat comparison"));let n=document.createElement("button");n.type="button",n.className="main",n.addEventListener("click",()=>{this.host.savedSeatIds().length>1?this.host.openComparison():this.host.toast(f("picker.chooseAnotherToCompare","Choose another seat to compare."),"neutral")});let o=document.createElement("button");o.type="button",o.className="clear",o.textContent="\xD7",o.setAttribute("aria-label",f("picker.clearSavedSeatComparison","Clear saved seat comparison")),o.addEventListener("click",()=>this.host.clearComparison()),t.append(n,o),e.appendChild(t),this.chip=t}let i=this.host.savedSeatIds().length,s=t.querySelector(".main");s&&(s.textContent=i>1?(0,Kt.t)("picker.compareCount",{count:i}):f("picker.oneSeatSaved","1 seat saved"),s.setAttribute("aria-label",i>1?(0,Kt.t)("picker.openComparisonOfSeats",{count:i}):f("picker.oneSeatSavedChooseAnother","One seat saved; choose another to compare")))}remove(){this.chip?.remove(),this.chip=null}mainButton(){return this.chip?.querySelector(".main")??null}};var pt=require("@seatlayer/core");function Ys(r){return Array.isArray(r)?r.reduce((e,t)=>t.type==="minimumSelectedPlaces"?Math.max(e,t.minimum):e,0):0}function ki(r,e,t=!1){let i=r.violations[0];return i==="numberOfPlacesToSelect"?r.remaining>0?(0,pt.t)("picker.selectExactMore",{count:r.remaining}):(0,pt.t)("picker.selectExactCount",{count:r.required}):i==="minimumSelectedPlaces"?(0,pt.t)("picker.selectMinimumMore",{count:r.remaining}):t?e("picker.adjustSeatSelection","Adjust seat selection"):i==="consecutiveSeats"?e("picker.selectSeatsTogether","Choose seats together in the same row and ticket category."):(0,pt.t)("picker.orphanHint")}var re=require("@seatlayer/core");function ht(r){let e=Math.max(0,r),t=Math.floor(e/6e4),i=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return`${t}:${i}`}function Qs(r){return(r.performanceLabel?`<div class="sl-chip-when">${F(r.performanceLabel)}</div>`:"")+Nn(r)}function Nn({d:r,area:e,label:t,objectType:i,quantity:s=1,identity:n}){let o=h=>String(h??"\u2014").replace(/[&<>"]/g,p=>({"&":"&","<":"<",">":">",'"':"""})[p]),a=i==="ga"?"ga":r?.objectType??i,l=n?.displayType?.trim()||r?.displayType?.trim()||e?.displayType?.trim()||(a==="table"?f("picker.table","Table"):a==="booth"?f("picker.booth","Booth"):a==="ga"?f("picker.generalAdmission","General admission"):f("picker.row","Row")),c=n?.rowLabel??n?.displayLabel??r?.rowLabel??r?.displayLabel??e?.displayLabel??e?.label??t;return a==="table"&&n?.bookingMode?`<div class="sl-chip-id"><span class="fld sec"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(c)}</span></span><span class="fld mid"><span class="sl-chip-eb">${f("picker.guests","Guests")}</span><span class="val">${s}</span></span></div>`:a==="ga"?`<div class="sl-chip-id"><span class="fld sec"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(c)}</span></span>`+(s>1?`<span class="fld mid"><span class="sl-chip-eb">${f("picker.tickets","Tickets")}</span><span class="val">${s}</span></span>`:"")+"</div>":a==="booth"?'<div class="sl-chip-id">'+(r?.sectionLabel?`<span class="fld sec"><span class="sl-chip-eb">${f("picker.section","Section")}</span><span class="val">${o(r.sectionLabel)}</span></span>`:"")+`<span class="fld mid"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(c)}</span></span></div>`:!r?.sectionLabel&&!r?.rowLabel&&!r?.seatNumber?`<div class="sl-chip-id"><span class="fld sec"><span class="sl-chip-eb">${f("picker.seat","Seat")}</span><span class="val">${o(c)}</span></span></div>`:'<div class="sl-chip-id">'+(r.sectionLabel?`<span class="fld sec"><span class="sl-chip-eb">${f("picker.section","Section")}</span><span class="val">${o(r.sectionLabel)}</span></span>`:"")+(r.rowLabel?`<span class="fld mid"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(ke(r))}</span></span>`:"")+(r.seatNumber?`<span class="fld mid"><span class="sl-chip-eb">${f("picker.seat","Seat")}</span><span class="val">${o(r.seatNumber)}</span></span>`:"")+"</div>"}function Xs(r,e){let t=F(r),i=e?F(e):"";return`<div class="sl-chip-rail"><button type="button" class="rm" aria-label="${t}"><svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button>`+(e?`<button type="button" class="view" data-view-label="${i}" aria-label="${F((0,re.t)("picker.viewFromSeat",{label:e}))}"><svg viewBox="0 0 24 24"><path d="M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z"/><circle cx="12" cy="12" r="3"/></svg></button>`:"")+"</div>"}function Zs(r){return r.salesClosed||r.hasHold||r.ctaPhase!=="idle"||r.formOpen||r.room<=0?null:Math.max(1,Math.min(r.wanted,r.room))}function Js({count:r,total:e,pendingCount:t,ctaPhase:i,hasHold:s,salesClosed:n,fromPrice:o,addMore:a,holdTime:l,money:c}){if(r&&i==="holding")return`<span>${f("picker.securingSeats","Securing your seats\u2026")}</span>`;if(r&&i==="checkout")return`<span>${(0,re.t)("picker.peekSecured",{count:r,total:c(e)})}</span>`;if(r){let h=!!s;return`<span>${(0,re.tCount)("picker.peekTicketsTotal",r,{total:c(e)})}</span>`+(a?`<button type="button" class="go ghost sl-sheet-go" data-act="best" aria-label="${f("picker.findTogetherInstead","Find seats together instead")}">\u2726 +${a}</button>`:"")+`<button type="button" class="go sl-sheet-go" data-act="${h?"checkout":"open"}">${s?t?f("picker.secureMore","Secure more"):f("picker.continue","Continue"):f("picker.review","Review")}`+(s&&l?`<span class="sl-peek-time" aria-hidden="true">${l}</span>`:"")+"</button>"}else return n?`<span>${f("picker.salesClosedPill","Sales are closed")}</span>`:(o!=null?`<span>${(0,re.t)("picker.peekFromPrice",{price:c(o)})}</span>`:`<span>${f("picker.pickYourSeats","Pick your seats")}</span>`)+`<button type="button" class="go sl-sheet-go" data-act="open">${f("picker.bestSeatsStar","\u2726 Best seats")}</button>`}function Si(r,e=Date.now()){return(0,re.t)("picker.holdReassurance",{time:ht(r-e)})}function er(r){return r.confirming?`<div class="sl-ba" role="alert"><div class="sl-ba-title"><span class="spark" aria-hidden="true">\u2726</span>${f("picker.replaceCurrentChoices","Replace your current choices?")}</div><div class="sl-ba-replace"><b>${(0,re.t)("picker.willFindSeatsTogether",{count:r.quantity})}</b><span>${f("picker.manualTicketsRemovedNote","Your manually selected tickets will be removed only after a new group is secured.")}</span></div><div class="sl-ba-actions"><button type="button" data-ba-cancel>${f("picker.keepMine","Keep mine")}</button><button type="button" class="replace" data-ba-replace>${f("picker.findNewSeats","Find new seats")}</button></div></div>`:`<div class="sl-ba"><div class="sl-ba-title"><span class="spark" aria-hidden="true">\u2726</span>${f("picker.findBestSeatsTogether","Find the best seats together")}</div><div class="sl-ba-copy"><span class="wide">${f("picker.willChooseClosestGroup","We\u2019ll choose the closest available group for you.")}</span><span class="narrow">${f("picker.closestGroupChosenInstantly","Closest available group, chosen instantly.")}</span></div>`+(r.offerPremium?`<button type="button" class="sl-ba-premium${r.premium?" on":""}" data-ba-premium aria-pressed="${r.premium?"true":"false"}"><span class="star" aria-hidden="true">\u2605</span>${f("picker.bestSeatsPremium","Best seats")}</button>`:"")+(r.categories.length>1?`<select aria-label="${F(f("picker.preferredTicketType","Preferred ticket type"))}" data-ba-cat><option value="">${F(f("picker.anyTicketType","Any ticket type"))}</option>`+r.categories.map(e=>`<option value="${F(e.key)}"${r.selectedCategory===e.key?" selected":""}>${F(e.label)}</option>`).join("")+"</select>":'<span aria-hidden="true"></span>')+(r.zones.length?`<select aria-label="${f("picker.preferredVenueZone","Preferred venue zone")}" data-ba-zone><option value="">${f("picker.anyVenueZone","Any venue zone")}</option>`+r.zones.map(e=>`<option value="${F(e.id)}"${r.selectedZone===e.id?" selected":""}>${F(e.label)}</option>`).join("")+"</select>":"")+`<div class="sl-ba-qty"><button type="button" data-ba="-1" aria-label="${f("picker.fewerSeats","Fewer seats")}">\u2212</button><span>${r.quantity}</span><button type="button" data-ba="1" aria-label="${f("picker.moreSeats","More seats")}">+</button></div><button type="button" class="sl-ba-go${r.busy?" sl-busy":""}"${r.busy?" disabled":""}>`+(r.busy?`<span class="sl-ba-spin" aria-hidden="true"></span>${f("picker.findingBestSeats","Finding the best seats\u2026")}`:(0,re.tCount)("picker.findBestSeatsCount",r.quantity))+"</button>"+(r.reopened?`<button type="button" class="sl-ba-back" data-ba-close>${f("picker.keepMyPicks","Keep my picks")}</button>`:"")+"</div>"}function tr(r){if(r.salesClosed&&!r.hasPicks){let e=r.whenText?`<span class="when">${F(r.whenText)}</span>`:"";return`<div class="sl-closed-note" role="status"><b>${f("picker.salesClosedPill","Sales are closed")}</b><span>${f("picker.salesClosedCopy","Ticket sales for this event have ended.")}${e}</span></div>`}return r.hasPicks?"":r.hasGaAreas?`<div class="sl-tray-hint">${r.seated?f("picker.trayHintTapOrStanding","Tap a seat on the map \u2014 or grab standing tickets below."):f("picker.gaTrayHintTapArea","Tap an area on the map to choose tickets.")}</div>`:`<div class="sl-tray-hint">${r.groupMode==="per_performance"?f("picker.groupPerPerformanceTrayHint","Choose seats for this performance, then complete every date above."):r.groupMode?f("picker.groupTrayHint","Choose seats once \u2014 the same seats will be held for every performance."):f("picker.trayHintTapOrBest","Tap a seat on the map, or let us pick the best available for you.")}</div>`}function ir(r){return{title:(0,re.t)("picker.securedCount",{count:r.secured}),copy:r.pendingCount?(0,re.t)("picker.moreSelectedCount",{count:r.pendingCount}):Si(r.expiresAt),change:r.releasing?f("picker.releasingEllipsis","Releasing\u2026"):f("picker.change","Change")}}var sr=Symbol("seatlayer.performance-group-picker");function rr(r,e){return Object.defineProperty(r,sr,{configurable:!1,enumerable:!1,value:Object.freeze({...e})}),r}function nr(r){return r[sr]??null}var He=require("@seatlayer/core");function Gn(r,e){let t=new Set(e);return r.map(i=>({...i,free:!t.has(i.eventKey)}))}function or(r,e){let t=[...r];if(t.length<=1)return t[0]??"";try{return new Intl.ListFormat(e,{style:"long",type:"conjunction"}).format(t)}catch{return t.join(", ")}}function Un(r,e,t=""){if(!r.length)return"";let i=r.map(s=>{let n=s.free?e.free:e.blocked;return`<li class="sl-night${s.free?" ok":" no"}" aria-label="${E(`${s.shortDate}: ${n}`)}"><i class="sl-night-dot" aria-hidden="true"></i><span class="d">${E(s.shortDate)}</span><span class="st">${E(n)}</span></li>`}).join("");return`<div class="sl-tip-nights"><div class="sl-tip-nights-title">${E(e.title)}</div><ul class="sl-nightstrip">${i}</ul><p class="sl-tip-nights-note">${E(e.notAvailableOn)}</p>`+t+"</div>"}function qn(r){return r.selectPartialLabel&&r.pinned?`<button type="button" class="sl-tip-switch" data-pg-select-partial>${E(r.selectPartialLabel)}</button>`:r.switchLabel&&r.pinned?`<button type="button" class="sl-tip-switch" data-pg-switch-mode>${E(r.switchLabel)}</button>`:r.switchLabel||r.selectPartialLabel?"":`<p class="sl-tip-advice">${E(r.advice)}</p>`}function Kn(r){return Number(r.available)+Number(r.selected)+Number(r.partial)+Number(r.unavailable)}function ar(r,e,t){if(Kn(r)<2)return"";let i=(n,o,a="")=>`<li class="sl-pg-legend-item"><i class="sl-pg-sw ${n}"${a}></i>${E(o)}</li>`,s=[];return r.available&&s.push(i("sl-pg-sw-free",e.available,` style="background:${E(t)}"`)),r.selected&&s.push(i("sl-pg-sw-sel",e.selected)),r.partial&&s.push(i("sl-pg-sw-split",e.partial,` style="--sl-pg-sw-cat:${E(t)}"`)),r.unavailable&&s.push(i("sl-pg-sw-off",e.unavailable)),`<ul class="sl-pg-legend-list" aria-label="${E(e.title)}">${s.join("")}</ul>`}function lr(r,e){if(!r.length)return"";let t=r.map(i=>{let s=i.labels.length?i.labels.join(", "):e.empty;return`<li class="sl-pg-night-row${i.labels.length?"":" empty"}${i.active?" active":""}" role="button" tabindex="0"${i.active?' aria-current="true"':""} data-event-key="${E(i.eventKey)}"><span class="n">${E(i.name)}</span><span class="s">${E(s)}</span></li>`}).join("");return`<div class="sl-pg-nights" role="group" aria-label="${E(e.title)}"><div class="sl-pg-nights-title">${E(e.title)}</div><ul class="sl-pg-nights-list">${t}</ul></div>`}function Yt(r,e){if(r?.kind!=="partial"||!e?.length)return null;let t=r.data?.blockedEventKeys??[],i=Gn(e,t);return{states:i,missing:i.filter(s=>!s.free).map(s=>s.shortDate)}}function cr(r,e){return r?Un(r.states,{title:f("picker.group.partlyAvailableTitle","Free on some nights only"),free:f("picker.group.nightFree","Free"),blocked:f("picker.group.nightBlocked","Not available"),notAvailableOn:(0,He.t)("picker.group.notAvailableOn",{dates:or(r.missing,e.locale)})},qn({switchLabel:e.switchLabel??null,selectPartialLabel:e.selectPartialLabel??null,pinned:e.pinned,advice:f("picker.group.pickSeatFreeEveryNight","Pick a seat that is free every night.")})):""}function dr(r,e,t){return r?(0,He.t)("picker.group.seatPartlyAvailable",{label:e,free:r.states.length-r.missing.length,total:r.states.length,dates:or(r.missing,t)}):""}function pr(r,e){let t=r.map((i,s)=>{let n=i.state==="done"?e.done:i.state==="current"?e.current:e.upcoming;return`<li class="sl-pg-step-item" data-step="${E(i.id)}" data-state="${E(i.state)}"${i.state==="current"?' aria-current="step"':""}><span class="i" aria-hidden="true">${i.state==="done"?"\u2713":String(s+1)}</span><span class="l">${E(i.label)}</span><span class="sl-pg-sr">${E(n)}</span></li>`}).join("");return`<ol class="sl-pg-steps" aria-label="${E(e.label)}">${t}</ol>`}function Ci(r,e){return`<ul class="sl-pg-cards">${r.map(i=>`<li class="sl-pg-card" data-event-key="${E(i.eventKey)}"><span class="n">${E(i.name)}</span><time datetime="${E(i.iso)}"><span class="d">${E(i.date)}</span><span class="t">${E(i.time)}</span></time></li>`).join("")}</ul><p class="sl-pg-included">${E(e)}</p>`}function hr(r){let e=r.rows.map(t=>`<li class="sl-pg-pane-row${t.labels.length?"":" empty"}" data-event-key="${E(t.eventKey)}"><span class="n">${E(t.name)}</span><span class="s">${E(t.labels.length?t.labels.join(", "):r.empty)}</span></li>`).join("");return`<div class="sl-pg-pane-title">${E(r.title)}</div><ul class="sl-pg-pane-list">${e}</ul>`+(r.note?`<p class="sl-pg-pane-note">${E(r.note)}</p>`:"")+(r.total?`<div class="sl-pg-pane-total"><span>${E(r.total.label)}</span><b>${E(r.total.amount)}</b></div>`:"")+(r.holdStatus?`<p class="sl-pg-hold-status" role="status">${E(r.holdStatus)}</p>`:"")}function ur(r){let e=Math.max(0,r);return`${Math.floor(e/6e4)}:${String(Math.floor(e/1e3)%60).padStart(2,"0")}`}function mr(r,e){if(!r||r.seats<=0)return"";if(e==="same_seat"){let t=r.perPerformance??r.seats;return(0,He.tCount)("picker.group.seatsEveryPerformance",t)}return r.perPerformance!=null&&r.performancesChosen===r.performances?(0,He.tCount)("picker.group.seatsPerPerformance",r.seats,{per:r.perPerformance}):(0,He.tCount)("picker.group.performancesChosenOf",r.seats,{chosen:r.performancesChosen,total:r.performances})}function fr(r,e){r.querySelectorAll(".sl-pg-night-row[data-event-key]").forEach(t=>{let i=()=>e(t.dataset.eventKey);t.addEventListener("click",i),t.addEventListener("keydown",s=>{s.key!=="Enter"&&s.key!==" "||(s.preventDefault(),i())})})}var Ei=require("@seatlayer/core");function ue(r){return String(r??"\u2014").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function Wn(r,e){let t=r.objectType==="table"&&!!r.bookingMode,i=r.objectType==="booth",s=t||i||!r.seatNumber,n=s?r.rowLabel??r.displayLabel??r.label:r.seatNumber,o=t?`${f("picker.guests","Guests")} ${r.bookingMode==="variable"?`${r.minOccupancy}\u2013${r.maxOccupancy}`:r.capacity}`:!i&&r.rowLabel?`${e} ${ke(r)??""}`.trim():"";return`<div class="sl-tip-head"><div class="sl-tip-id"><span class="sl-tip-seat${s?" name":""}">${ue(n)}</span>`+(o?`<span class="sl-tip-row">${ue(o)}</span>`:"")+"</div>"+(r.sectionLabel?`<div class="sl-tip-sec"><span class="sl-tip-eyebrow">${f("picker.section","Section")}</span><span class="sl-tip-secname">${ue(r.sectionLabel)}</span></div>`:"")+"</div>"}function gr(r,e){let t=r.status==="not_for_sale",i=r.mark?.kind==="partial",s=r.status==="free"||i?"":`<span class="sl-tip-tag">${t?f("picker.notAvailable","Not available"):r.status==="held"?(0,Ei.t)("map.statusHeld"):(0,Ei.t)("map.statusTaken")}</span>`,n=t?"":e.price,o=n?`<span class="sl-tip-amt">${ue(n)}</span>`:"",a=!n&&e.priceNote?`<div class="sl-tip-note">${ue(e.priceNote)}</div>`:"",l=we(r.commercial),c=l?`<div class="sl-tip-cx"><span class="g" aria-hidden="true">\u25D0</span>${ue(l)}</div>`:"",h=Ke(r.wheelchairSpaceType),p=h?`<div class="sl-tip-cx"><span class="g" aria-hidden="true">\u267F</span>${ue(h)}</div>`:"";return'<i class="sl-tip-rail" aria-hidden="true"></i>'+Wn(r,e.rowTypeWord)+`<div class="sl-tip-cat"><span class="sl-tip-dot" style="background:${ue(r.categoryColor)}"></span><span class="sl-tip-name">${ue(r.categoryLabel)}</span>`+s+o+"</div>"+a+p+c+(e.extra??"")}function br(r,e,t){let i=r.x+14,s=r.y-t.height-12;return i+t.width>e-8&&(i=r.x-t.width-14),s<8&&(s=r.y+18),{left:Math.max(8,i),top:Math.max(8,s)}}function ut(r){let e=r?.displayType?.trim()||r?.rowType?.trim();return e||(r?.objectType==="table"?f("picker.table","Table"):r?.objectType==="booth"?f("picker.booth","Booth"):f("picker.row","Row"))}var vr="@seatlayer/pending-checkout/v1";function Yn(r){return typeof r=="string"&&r.length<=160&&/^ord_[A-Za-z0-9_-]+$/.test(r)}function yr(r){if(typeof location>"u")return null;let e=new URLSearchParams(location.search),t=e.get("seatlayer_checkout");if(t!=="success"&&t!=="cancelled")return null;let i=null;try{let s=window.sessionStorage.getItem(vr);if(s){let n=null;try{n=JSON.parse(s)}catch{}if(n&&Yn(n.orderId)){let o=Date.now()-Number(n.storedAt);if(o>=0&&o<=144e5){if(n.eventKey&&n.eventKey!==r)return null;i=n.orderId}}}window.sessionStorage.removeItem(vr)}catch{}e.delete("seatlayer_checkout");try{let s=e.toString();history.replaceState(history.state,"",`${location.pathname}${s?`?${s}`:""}${location.hash}`)}catch{}return{outcome:t,orderId:i}}function xr(r){if(!r.framed)return null;let e=r.ancestorOrigins?.length?r.ancestorOrigins[0]:null;for(let t of[e,r.referrer])if(t)try{return new URL(t).origin}catch{}return null}var Qn="https://api.seatlayer.io",Xn=10,wr=6e4,kr=6e4,Sr=new Set;function Zn(r){let e=Sr.has(r);return Sr.add(r),e}var Er="seatmap.a11y.cb";function Jn(){try{if(typeof window>"u")return null;let r=window.localStorage.getItem(Er);return r==null?null:r==="1"}catch{return null}}function eo(r){try{window.localStorage.setItem(Er,r?"1":"0")}catch{}}var Qe=class r{constructor(e){this.realtime=null;this.accessEl=null;this.lastSelectionValidity=null;this.root=null;this.mapHost=null;this.rendered=!1;this.destroyed=!1;this.els={};this.regions={};this.ro=null;this.holdTimer=null;this.toastTimer=null;this.offerRefreshTimer=null;this.offerBoundaryTimer=null;this.offerVisibilityHandler=null;this.motionTimers=new Set;this.currency="USD";this.eventTimezone=null;this.eventWhenText=null;this.offerAvailability=null;this.channelByObject=new Map;this.pricesByChannel=new Map;this.hold=null;this.holdExpiresAt=0;this.handedOff=!1;this.bookedShown=!1;this.paymentOptions=null;this.checkoutPanel=null;this.extendEl=null;this.bookedEl=null;this.gaQty=new Map;this.gaPromptEl=null;this.gaPromptReturnFocus=null;this.gaAreasExpanded=!1;this.lastMapPoint=null;this.tipEl=null;this.tipPos={x:0,y:0};this.tipPinned=!1;this.tipMarkedHoverLabel=null;this.lastPointerType="mouse";this.confirmEl=null;this.confirmSeat=null;this.tableDialogEl=null;this.tableDialog=null;this.tableDialogHeld=!1;this.tableDialogReturnFocus=null;this.srEl=null;this.baQty=2;this.baCat="";this.baZone="";this.baPremium=!1;this.baReopen=!1;this.bestAvailableConfirm=!1;this.releasingHold=!1;this.salesClosed=!1;this.soldOut=!1;this.soldoutEl=null;this.cbSafe=!1;this.rungsEl=null;this.projectionEl=null;this.buyerView="map";this.view3dEl=null;this.view3dHandle=null;this.view3dGen=0;this.view3dReturnSeat=null;this.view3dTargetSeatId=null;this.view3dCompareSeatIds=[];this.view3dCompareChip=new Wt({overlay:()=>this.view3dEl,savedSeatIds:()=>this.view3dCompareSeatIds,openComparison:()=>this.openView3dComparison(),clearComparison:()=>this.clearView3dComparison(),toast:(e,t)=>this.toast(e,t)});this.view3dCompareEl=null;this.view3dCompareCleanup=null;this.view3dPassportEl=null;this.view3dPassportCleanup=null;this.floorsEl=null;this.secCardEl=null;this.viewEl=null;this.viewCleanup=null;this.seatViewGen=0;this.allSeatsCache=null;this.minimap=null;this.pickerLayoutSize={width:0,height:0};this.priceBandKeys=null;this.focusedCatKey=null;this.limitedViewFilter=!1;this.pricesExpanded=!1;this.lastSection=null;this.secCardCollapsed=!1;this.secCardShownAt=0;this.lastTrayCount=0;this.langSel=null;this.lastTrayTotal=0;this.lastTrayKeys=new Set;this.bestAvailableBusy=!1;this.releasingLabels=new Set;this.holdingLabels=new Set;this.ctaPhase="idle";this.a11yChipsEl=null;this.railEdgesBound=!1;this.fsFallback=!1;this.fsChangeHandler=null;this.fsEscHandler=null;this.eventDetailsHidden=!1;this.holdCopyPending=!1;this.sideCollapsed=!1;this.sideToggleEl=null;this.framedFs=!1;this.lastPostedHeight=0;this.cbEl=null;this.modalScrim=null;this.prevFocus=null;this.escHandler=null;this.closeModal=null;this.lastCatAvail=null;this.lastAvailFloorId="";this.availQuietUntil=0;this.liveTimer=null;this.perspectiveWarned=!1;if(!e||typeof e!="object")throw new Error("seatmap: options object is required");if(!e.event||typeof e.event!="string")throw new Error("seatmap: `event` key is required");if(!e.container)throw new Error("seatmap: `container` is required (or use SeatPicker.open())");this.performanceGroup=nr(e),this.suppressPricing=!!this.performanceGroup?.suppressPricing,this.opts={...e,confirmSelection:e.confirmSelection??!0},this.eventDetailsHidden=!!e.hideEventDetails,this.hostPricing=e.pricing,this.apiBase=(e.apiBase??Qn).replace(/\/+$/,"");let t={onExpired:a=>{this.opts.onAccessExpired?.(a),a.refreshed||this.showAccessPanel({reason:"no_token",retryable:!1})},onUnavailable:a=>{this.opts.onAccessUnavailable?.(a),this.showAccessPanel(a)}},i=!e.transport&&e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?Pt({base:this.apiBase,event:e.event,publicKey:e.publicKey,accessHooks:t,apiOptions:{referral:e.referral,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}}):null;this.access=e.transport?null:i?.access??Fe(e,t),this.pubApi=e.transport?null:i?.api??new be(this.apiBase,{access:this.access??void 0,referral:e.referral,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}),this.api=e.transport??this.pubApi,this.buyerAssetUrls=new Ge(e.event,this.api.asset?(a,l)=>this.api.asset(a,l):void 0),e.checkout==="hosted"&&!this.pubApi&&console.warn('seatlayer: checkout: "hosted" needs the widget\'s own transport \u2014 a custom `transport` owns its backend, so the picker is staying on onCheckout for this mount.'),this.checkoutMode=e.checkout==="hosted"&&this.pubApi?"hosted":"handoff";let s=e.numberOfPlacesToSelect;if(s!=null&&(!Number.isInteger(s)||s<1))throw new Error("seatmap: `numberOfPlacesToSelect` must be a positive integer");this.exactTickets=s??null;let n=Ys(e.selectionValidators);if(this.exactTickets!=null&&n>this.exactTickets)throw new Error("seatmap: `minimumSelectedPlaces.minimum` cannot exceed `numberOfPlacesToSelect`");let o=Math.max(1,Math.floor(e.maxSelection??this.exactTickets??Math.max(Xn,n)));if(this.exactTickets!=null&&o<this.exactTickets)throw new Error("seatmap: `maxSelection` cannot be lower than `numberOfPlacesToSelect`");if(e.maxSelection!=null&&o<n)throw new Error("seatmap: `maxSelection` cannot be lower than `minimumSelectedPlaces.minimum`");this.maxTickets=this.exactTickets??o,this.cbSafe=Jn()??!!e.colorblindSafe,this.controller=this.wireController(e)}chartHasStage(){let e=this.controller.doc;if(!e)return!1;let t=e.floors?.length?e.floors.map(i=>i.objects??[]):[e.objects??[]];for(let i of t)for(let s of i)if(s.type==="shape"&&(s.role==="stage"||s.stageKind))return!0;return!1}confirmThumbHtml(e){let t=this.controller.doc;if(!t)return"";let i=e.viewUrl??"",s=this.chartHasStage();if(!i&&!s)return"";let n=null;if(!i)try{n=(0,b.generateSeatThumb)(e,e.focalPoint??t.focalPoint).distanceM??null}catch{return""}let o=s&&n!=null?`<div class="sl-confirm-sight">${F((0,b.t)("picker.sightline",{m:n}))}</div>`:"",a=F((0,b.t)("picker.viewFromSeat",{label:e.label})),l=F(this.tf("picker.viewFromHere","View from here"));return(i?`<button type="button" class="sl-confirm-view sl-confirm-thumbwrap" aria-label="${a}"><img class="sl-confirm-thumb" alt="" /><span class="sl-confirm-thumb-badge">\u{1F52D} ${l}</span></button>`:`<button type="button" class="sl-confirm-view sl-confirm-viewbtn" aria-label="${a}"><span aria-hidden="true">\u{1F52D}</span><span>${l}</span></button>`)+o}isFramed(){return typeof window<"u"&&window.parent!==window}postToHost(e){if(!this.isFramed())return;let t=xr({framed:!0,ancestorOrigins:window.location.ancestorOrigins,referrer:document.referrer});if(t)try{window.parent.postMessage(e,t)}catch{}}measureFramedHeight(){let e=this.root;if(!e)return 0;let t=e.clientWidth||(typeof window<"u"?window.innerWidth:0)||0;if(t<=0)return 0;let i=t<640?1.2:.62;return Math.max(420,Math.round(t*i))}reportFramedHeight(){if(!this.isFramed())return;let e=this.measureFramedHeight();e<=0||e===this.lastPostedHeight||(this.lastPostedHeight=e,this.postToHost({type:"seatlayer:height",px:e}))}toggleFullscreen(){let e=this.root;if(!e)return;!!document.fullscreenElement||this.fsFallback||this.framedFs?document.fullscreenElement?document.exitFullscreen().catch(()=>{}):this.framedFs?this.setFramedFs(!1):this.setFsFallback(!1):e.requestFullscreen?e.requestFullscreen().catch(()=>this.enterFsFallback()):this.enterFsFallback()}syncFullscreenButtons(){let e=!!document.fullscreenElement||this.fsFallback||this.framedFs,t=this.eventDetailsHidden&&!e;this.root?.setAttribute("data-event-details-hidden",String(t)),this.els.zfs?.setAttribute("aria-pressed",String(e)),this.els.zfs?.setAttribute("title",e?this.tf("picker.exitFullScreen","Exit full screen"):this.tf("picker.fullScreen","Full screen"));let i=this.els.zfs?.querySelector(".sl-zfs-lbl");i&&(i.textContent=e?this.tf("picker.exitFullScreen","Exit full screen"):this.tf("picker.fullScreen","Full screen")),this.view3dEl?.querySelector(".sl-view3d-fs")?.setAttribute("aria-pressed",String(e))}enterFsFallback(){this.isFramed()?this.setFramedFs(!0):this.setFsFallback(!0)}setFramedFs(e){this.framedFs!==e&&(this.framedFs=e,this.syncFullscreenButtons(),this.postToHost({type:"seatlayer:fullscreen",on:e}),e&&!this.fsEscHandler?(this.fsEscHandler=t=>{t.key==="Escape"&&!document.fullscreenElement&&this.setFramedFs(!1)},window.addEventListener("keydown",this.fsEscHandler)):!e&&this.fsEscHandler&&(window.removeEventListener("keydown",this.fsEscHandler),this.fsEscHandler=null),requestAnimationFrame(()=>this.controller.refitCurrentView()))}setFsFallback(e){this.fsFallback!==e&&(this.fsFallback=e,this.root?.classList.toggle("sl-fs",e),this.syncFullscreenButtons(),e&&!this.fsEscHandler?(this.fsEscHandler=t=>{t.key==="Escape"&&!document.fullscreenElement&&this.setFsFallback(!1)},window.addEventListener("keydown",this.fsEscHandler)):!e&&this.fsEscHandler&&(window.removeEventListener("keydown",this.fsEscHandler),this.fsEscHandler=null),requestAnimationFrame(()=>this.controller.refitCurrentView()))}close(){this.closeModal?this.closeModal():this.destroy()}static async open(e){Ue();let t=document.activeElement instanceof HTMLElement?document.activeElement:null,i=document.createElement("div");i.className="sl-modal-scrim";let s=document.createElement("div");s.className="sl-modal-frame",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",f("picker.seatSelection","Seat selection")),s.tabIndex=-1,i.appendChild(s),document.body.appendChild(i);let n=document.body.style.overflow;document.body.style.overflow="hidden";let o=new r({...e,container:s});o.modalScrim=i,o.prevFocus=t;let a=["a[href]","area[href]","button","input","select","textarea","iframe","object","embed","summary","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"[tabindex]"].join(","),l=()=>{let g=[...s.querySelectorAll('[role="dialog"][aria-modal="true"]')].filter(v=>v.isConnected&&!v.closest('[hidden], [aria-hidden="true"], [inert]'));return g[g.length-1]??s},c=(g,v)=>{let w=g;for(;w;){let y=window.getComputedStyle(w);if(w.hidden||w.getAttribute("aria-hidden")==="true"||w.hasAttribute("inert")||y.display==="none"||y.visibility==="hidden"||y.visibility==="collapse")return!0;if(w===v)return!1;w=w.parentElement}return!0},h=g=>[...g.querySelectorAll(a)].filter(v=>v.tabIndex>=0&&!v.matches(":disabled")&&!c(v,g)),p=(g,v)=>{let w=h(g),y=v?w[w.length-1]:w[0];y?y.focus({preventScroll:!0}):(g.hasAttribute("tabindex")||(g.tabIndex=-1),g.focus({preventScroll:!0}))},d=!1,u=()=>{if(d)return;d=!0,document.body.style.overflow=n,o.escHandler&&document.removeEventListener("keydown",o.escHandler),i.remove(),o.modalScrim=null;let g=o.prevFocus;o.prevFocus=null,g?.isConnected&&g.focus({preventScroll:!0});let v=()=>{o.destroy(),e.onClose?.()};o.hold&&!o.handedOff?o.release().finally(v):v()};return o.closeModal=u,i.addEventListener("mousedown",g=>{g.target===i&&u()}),o.escHandler=g=>{if(g.key==="Tab"){if(g.defaultPrevented)return;let v=l(),w=h(v),y=w[0],R=w[w.length-1],S=document.activeElement;!y||!R?(g.preventDefault(),p(v,g.shiftKey)):S===v||!S||!v.contains(S)?(g.preventDefault(),(g.shiftKey?R:y).focus({preventScroll:!0})):g.shiftKey&&S===y?(g.preventDefault(),R.focus({preventScroll:!0})):!g.shiftKey&&S===R&&(g.preventDefault(),y.focus({preventScroll:!0}));return}g.key==="Escape"&&(o.tableDialog?(g.preventDefault(),o.cancelTableDialog()):o.confirmSeat?(g.preventDefault(),o.cancelConfirm()):o.bestAvailableConfirm?(g.preventDefault(),o.bestAvailableConfirm=!1,o.syncTray()):(g.preventDefault(),u()))},document.addEventListener("keydown",o.escHandler),await o.render(),o.els.close?.classList.add("on"),o.els.close?.addEventListener("click",u),p(l(),!1),o}wireController(e){return new b.PickerController({transport:this.api,eventKey:e.event,maxSelection:this.maxTickets,selectedObjects:e.selectedObjects,selectableObjects:e.selectableObjects,numberOfPlacesToSelect:e.numberOfPlacesToSelect,selectionValidators:e.selectionValidators,currency:e.currency,flashOnLiveChange:!0,colorblindSafe:this.cbSafe,mapTheme:e.theme?.map??null,onGAClick:t=>{let i=this.controller.getGAAreas().find(s=>s.id===t);i&&oi(this,i,this.lastMapPoint)},onSelectionChange:()=>{this.syncTray(),this.minimap?.refreshMinimap(),this.committedSelection().length&&this.collapseSectionCard(),this.syncSelectionTo3d()},onStatusChange:()=>{this.syncSeatMarks(),this.syncPrices(),this.scheduleOfferRefresh(!0),this.evictTakenSelections(),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()},onHoldExpired:()=>{this.hold=null,this.forgetHold(),this.handedOff=!1,this.bookedShown=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.gaQty.clear(),this.toast((0,b.t)("picker.holdExpired",void 0)||"Your hold expired \u2014 seats released. Pick again.","warning"),this.syncTray(),this.emitHoldChange(),this.opts.onHoldExpired?.()},confirmSelection:this.opts.confirmSelection,onSelect:t=>{if(this.salesClosed){this.controller.deselect([t.id]),this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}this.controller.tableSelection(t.id)||(this.flashPickedSeat(t.id),this.opts.confirmSelection&&this.showConfirm(t))},onTableSelectionRequest:t=>{if(this.salesClosed){this.controller.deselect(t.physicalSeatIds),this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}this.showTableDialog(t,!1)},onDeselect:t=>{this.confirmSeat?.id===t.id&&this.dismissConfirm(),this.tableDialog?.physicalSeatIds.includes(t.id)&&this.dismissTableDialog()},onSelectionLimit:()=>{this.toast((0,b.t)("picker.maxTicketsForOrder",{count:this.maxTickets}),"warning"),this.opts.onSelectionLimit?.(this.maxTickets)},onViewChange:()=>{this.reanchorConfirm(),this.syncRung(),this.syncProjection(),this.minimap?.drawMinimapRect(),this.sectionCardOnView()},onSectionFocus:t=>this.showSectionCard(t),onDeckTap:()=>{this.showSectionCard(null),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap()},onFocusSeat:t=>this.announceSeat(t),onSeatHover:t=>this.updateTooltip(t),onHint:t=>{t&&this.toast(t)},onSalesClosed:()=>this.setSalesClosed(!0),onError:t=>this.opts.onError?.(t)})}async render(){if(this.rendered)return this;let e=performance.now(),t={},i=k=>Math.round((performance.now()-k)*100)/100;this.rendered=!0,Ue();let s=performance.now();await(0,b.loadLocale)(this.opts.locale),t.loadLocale=i(s),this.opts.messages&&(0,b.setStringOverrides)(this.opts.messages),this.checkoutMode==="hosted"&&(this.paymentOptions=this.pubApi.paymentOptions(this.opts.event));let n=performance.now(),o=as(this.opts.container),{root:a,els:l,mapHost:c}=js(o,(k,L)=>this.tf(k,L),this.opts.theme);this.root=a,this.els=l,this.mapHost=c,a.addEventListener("keydown",k=>{k.key==="Escape"&&(this.tipPinned?(k.preventDefault(),k.stopPropagation(),this.unpinTooltip()):this.tableDialog?(k.preventDefault(),k.stopPropagation(),this.cancelTableDialog()):this.confirmSeat?(k.preventDefault(),k.stopPropagation(),this.cancelConfirm()):this.bestAvailableConfirm&&(k.preventDefault(),k.stopPropagation(),this.bestAvailableConfirm=!1,this.syncTray()))}),this.syncFullscreenButtons(),this.wireBuyerShell(a);let h=document.createElement("div");h.style.cssText="position:absolute;inset:0",this.mapHost.appendChild(h),t.mountBuyerShell=i(n);let p=await this.loadChart(h,t,i);if(!p)return this;this.els.boot.remove();let d=performance.now();if(this.startRealtime(),this.salesClosed=!!p.salesClosed||!!this.opts.readOnly,a.dataset.eventMode=p.mode==="test"?"test":"live",!this.opts.locale&&p.locale&&await this.setLocale(p.locale),this.controller.setViewMode(this.normalizeInitialView(this.opts.initialView)),this.buildRegions(),this.regions["bottom-right"].appendChild(this.els.zoom),this.regions["bottom-center"].appendChild(this.els.toast),p.mode==="test"){let k=document.createElement("div");k.className="sl-testbadge",k.textContent=(0,b.t)("picker.testMode"),k.setAttribute("aria-label",(0,b.t)("picker.testMode")),this.regions["top-left"].appendChild(k)}let u=this.controller.doc?.theme,g=dt(u,this.opts.theme);Object.entries(g).forEach(([k,L])=>a.style.setProperty(k,L)),this.applyMapChromeTokens(),this.currency=p.currency??this.opts.currency??"USD",this.eventTimezone=p.timezone??null,ls(this.els.logo,[this.opts.theme?.logoUrl,u?.logoUrl,p.posterUrl],this.opts.theme?.brandName??u?.brandName??p.eventName??"?"),this.els.name.textContent=p.eventName??"";let v=p.startsAt?It(p.startsAt,p.timezone??null,this.opts.locale):"";this.eventWhenText=v||null,this.els.meta.textContent=[p.venue,v].filter(Boolean).join(" \xB7 "),this.els.pricesHint&&(this.els.pricesHint.textContent=this.tf("picker.priceHint","Colours on the map are ticket types \u2014 tap one below to show just those seats.")),this.buildBadge(u);let w=new Set,y=!1;if(this.controller.doc)for(let k of this.controller.getExpandedSeats()){for(let L of k.accessibility??[])w.add(L);k.accessible&&!k.accessibility?.length&&w.add("wheelchair"),(k.commercial?.restrictedView||k.commercial?.obstructedView)&&(y=!0)}let R=()=>{this.rungsEl&&this.controller.getRung()!=="seats"&&(this.controller.setRung("seats"),this.collapseSectionCard(),this.syncRung())};if(w.size||y){let k=document.createElement("div");if(k.className="sl-chips",this.regions["top-left"].appendChild(k),this.a11yChipsEl=k,w.size){let L=(H,D)=>`<button type="button" class="sl-chip-f${H==="all"?" on":""}" data-a11y="1" data-f="${H}">${D}</button>`;k.insertAdjacentHTML("beforeend",L("all",this.tf("picker.allSeats","All seats"))+b.ACCESSIBILITY_TYPES.filter(({key:H})=>w.has(H)).map(({key:H,short:D,icon:j})=>L(H,`${j} ${D}`)).join(""));let m=new Set,C=()=>{k.querySelectorAll("button[data-a11y]").forEach(D=>{let j=D.dataset.f,G=j==="all"?m.size===0:m.has(j);D.classList.toggle("on",G),D.setAttribute("aria-pressed",String(G))});let H=m.size?[...m]:null;this.controller.setAccessibilityFilter(H),H&&R()};k.querySelectorAll("button[data-a11y]").forEach(H=>{H.addEventListener("click",()=>{let D=H.dataset.f;D==="all"?m.clear():m.has(D)?m.delete(D):m.add(D),C()})})}if(y){let L=document.createElement("button");L.type="button",L.className="sl-chip-f",L.setAttribute("aria-pressed","false"),L.innerHTML=`\u25D0 ${this.tf("picker.hideLimitedView","Hide limited-view seats")}`,k.appendChild(L),L.addEventListener("click",()=>{let m=!this.limitedViewFilter;this.limitedViewFilter=m,L.classList.toggle("on",m),L.setAttribute("aria-pressed",String(m)),this.controller.setCommercialLimitedFilter(m),this.pushAvailabilityTo3d(),m&&R()})}}let S=document.createElement("button");S.type="button",S.className="sl-cbbtn",this.cbEl=S,S.setAttribute("aria-label",this.tf("picker.toggleColorblindColors","Toggle colorblind-friendly colors")),S.setAttribute("aria-pressed",String(this.cbSafe)),S.innerHTML='<svg viewBox="0 0 24 24"><path d="M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z"/><circle cx="12" cy="12" r="3"/></svg>',this.els.zfit.parentElement.appendChild(S),S.addEventListener("click",()=>{this.setColorblindSafe(!this.cbSafe)}),this.buildLanguageSwitcher(S.parentElement),this.srEl=document.createElement("div"),this.srEl.className="sl-sr",this.srEl.setAttribute("aria-live","polite"),a.appendChild(this.srEl),this.buildArenaChrome(),this.buildMinimap(),this.buildPriceFilter(),this.buildExtendPrompt(),this.buildBookedOverlay(),this.buildSoldoutOverlay(),this.buildPanelToggle(),this.opts.panelCollapsed&&this.setPanelCollapsed(!0),this.dockLayoutChrome(),t.buildBuyerControls=i(d);let P=performance.now();if(await this.restoreRememberedHold(),t.restoreHold=i(P),this.destroyed)return this;this.salesClosed&&this.applySalesClosed(),this.syncPrices(),this.syncTray(),this.resumeHostedOrder();let _=this.controller.doc;return this.emitAnalytics("chart_rendered",{renderingTimeMillis:i(e),performanceProfile:t,seatCount:this.allSeats().length,objectCount:_?.objects.length??0,sectionCount:_?.objects.filter(k=>k.type==="section").length??0,view:this.buyerView,eventKey:this.opts.event,chartName:_?.name,floorCount:this.controller.getFloors().length,transport:this.opts.transport?"custom":"pubapi",load:Zn(this.opts.event)?"repeat":"cold"}),this}wireBuyerShell(e){this.refreshOfferAvailability(!1),this.api.availability&&(this.offerVisibilityHandler=()=>{!document.hidden&&!this.destroyed&&this.refreshOfferAvailability(!1)},document.addEventListener("visibilitychange",this.offerVisibilityHandler)),this.observeLayout(e),this.els.zin.addEventListener("click",()=>this.controller.zoomIn()),this.els.zout.addEventListener("click",()=>this.controller.zoomOut()),this.els.zfit.addEventListener("click",()=>this.controller.zoomToFit()),this.els.zfs.addEventListener("click",()=>this.toggleFullscreen()),this.fsChangeHandler=()=>{document.fullscreenElement||this.setFsFallback(!1),this.syncFullscreenButtons(),requestAnimationFrame(()=>this.controller.refitCurrentView())},document.addEventListener("fullscreenchange",this.fsChangeHandler);let t=this.els.sheetHead;if(t){let s=this.els.sheetToggle,n=c=>{e.dataset.sheet=c?"open":"peek",s?.setAttribute("aria-expanded",String(c)),s?.setAttribute("aria-label",c?this.tf("picker.collapseTicketPanel","Collapse ticket panel"):this.tf("picker.openTicketPanel","Open ticket panel"))};n(e.dataset.sheet==="open"),s?.addEventListener("click",c=>{c.stopPropagation(),n(e.dataset.sheet!=="open")}),this.els.peek?.addEventListener("click",c=>{let h=c.target.closest(".sl-sheet-go");h&&(c.stopPropagation(),h.dataset.act==="checkout"?this.handleCta():h.dataset.act==="best"?(this.baReopen=!0,this.baQty=Math.max(1,Math.min(this.baQty,this.maxTickets-this.totalTicketCount())),this.syncTray(),n(!0),this.els.tray?.querySelector(".sl-ba-go")?.focus()):n(!0))});let o=0,a=!1,l=!1;t.addEventListener("pointerdown",c=>{if(c.target.closest?.(".sl-seccard,.sl-sheet-toggle,.sl-sheet-go")){l=!1;return}l=!0,a=!1,o=c.clientY,t.setPointerCapture?.(c.pointerId)}),t.addEventListener("pointermove",c=>{if(!l||a)return;let h=c.clientY-o;h<-18?(n(!0),a=!0):h>18&&(n(!1),a=!0)}),t.addEventListener("pointerup",c=>{l&&!a&&Math.abs(c.clientY-o)<6&&n(e.dataset.sheet!=="open"),l=!1,t.releasePointerCapture?.(c.pointerId)})}let i=()=>{if(this.root?.dataset.layout!=="narrow")return;let s=this.root.getAttribute("data-prices-open")==="true";if(this.root.setAttribute("data-prices-open",String(!s)),this.els.pricesSec?.setAttribute("aria-expanded",String(!s)),!s&&this.root.dataset.sheet!=="open"){this.root.dataset.sheet="open";let n=this.els.sheetToggle;n?.setAttribute("aria-expanded","true"),n?.setAttribute("aria-label","Collapse ticket panel")}};this.els.pricesSec?.addEventListener("click",s=>{s.target.closest("select,button")||i()}),this.els.pricesSec?.addEventListener("keydown",s=>{s.key!=="Enter"&&s.key!==" "||s.target.closest("select,button")||(s.preventDefault(),i())}),this.tipEl=document.createElement("div"),this.tipEl.setAttribute("role","tooltip"),this.tipEl.className="sl-tip",this.els.map.appendChild(this.tipEl),this.els.map.addEventListener("pointerdown",s=>{this.handleMapPointerDown(s)},!0),this.els.map.addEventListener("mousemove",s=>{let n=this.els.map.getBoundingClientRect();this.tipPos={x:s.clientX-n.left,y:s.clientY-n.top},this.tipEl&&this.tipEl.style.display!=="none"&&this.placeTooltip()}),this.els.cta.addEventListener("click",()=>{this.handleCta()}),this.els.holdChange?.addEventListener("click",()=>{this.handleChangeSeats()})}observeLayout(e){let t=()=>{let i=e.clientWidth;if(i<=0)return;let s=e.clientHeight,n=i!==this.pickerLayoutSize.width||s!==this.pickerLayoutSize.height;this.pickerLayoutSize={width:i,height:s},this.reportFramedHeight();let o=i<640?"narrow":"wide",a=s<560?"compact":"comfortable";(e.dataset.layout!==o||e.dataset.density!==a)&&(e.dataset.layout=o,e.dataset.density=a,o==="narrow"&&!e.dataset.sheet&&(e.dataset.sheet="peek"),this.dockLayoutChrome()),n&&this.minimap?.refreshMinimap()};this.ro=new ResizeObserver(t),this.ro.observe(e),t(),requestAnimationFrame(t)}async loadChart(e,t,i){let s=performance.now(),n=await this.controller.render(e);return t.loadChartAndStatuses=i(s),this.destroyed?null:n?(Object.assign(t,n.performanceProfile),n):(this.els.boot.innerHTML=`<div class="sl-boot-title">${this.tf("picker.mapDidNotLoad","The seat map didn\u2019t load")}</div><div>${this.tf("picker.checkConnection","Check your connection and try again.")}</div><button type="button" class="sl-boot-retry">${this.tf("picker.accessRetry","Try again")}</button>`,this.els.boot.querySelector("button").addEventListener("click",()=>{let o=this.opts.container,a=this.opts;this.destroy(),new r({...a,container:o}).render()}),null)}resumeHostedOrder(){if(this.checkoutMode!=="hosted")return;let e=yr(this.opts.event);e?.outcome!=="success"||!e.orderId||this.openCheckoutPanel({kind:"resume",orderId:e.orderId})}buildPanelToggle(){if(!this.regions["top-right"])return;let e=document.createElement("button");e.type="button",e.className="sl-side-toggle",e.addEventListener("click",()=>this.setPanelCollapsed(!this.sideCollapsed)),this.sideToggleEl=e,this.regions["top-right"].appendChild(e),this.syncPanelToggle()}syncPanelToggle(){let e=this.sideToggleEl;if(!e)return;let t=this.sideCollapsed;e.setAttribute("aria-expanded",String(!t)),e.setAttribute("aria-label",t?this.tf("picker.showTicketPanel","Show the ticket panel"):this.tf("picker.hideTicketPanel","Hide the ticket panel")),e.title=t?this.tf("picker.showTicketPanel","Show the ticket panel"):this.tf("picker.hideTicketPanel","Hide the ticket panel"),e.innerHTML=t?`<svg viewBox="0 0 24 24"><path d="M15 6l-6 6 6 6"/></svg><span>${this.tf("picker.tickets","Tickets")}</span>`:'<svg viewBox="0 0 24 24"><path d="M9 6l6 6-6 6"/></svg>'}setPanelCollapsed(e){this.destroyed||(this.sideCollapsed=e,this.applyPanelCollapsed(),this.scheduleMotion(()=>this.controller.refitCurrentView(),340))}applyPanelCollapsed(){let e=this.root?.dataset.layout!=="narrow";this.root?.setAttribute("data-side-collapsed",String(this.sideCollapsed)),this.els.side?.toggleAttribute("inert",this.sideCollapsed&&e),this.syncPanelToggle()}dockLayoutChrome(){let e=this.root?.dataset.layout==="narrow";this.applyPanelCollapsed();let t=this.els.zfs,i=this.els.headInfo?.parentElement;t&&i&&t.parentElement!==i&&(t.classList.add("sl-fs-pill"),i.insertBefore(t,this.els.hold??null));let s=this.els.pricesSec;s&&(e?(s.setAttribute("role","button"),s.tabIndex=0,s.setAttribute("aria-expanded",String(this.root?.getAttribute("data-prices-open")==="true"))):(s.removeAttribute("role"),s.removeAttribute("aria-expanded"),s.tabIndex=-1)),this.cbEl&&this.els.zoom?.appendChild(this.cbEl),this.a11yChipsEl&&(e?this.els.rail?.insertBefore(this.a11yChipsEl,this.els.railScroll??null):this.regions["top-left"]?.appendChild(this.a11yChipsEl)),this.lastSection&&this.renderSectionCard(this.lastSection)}buildExtendPrompt(){let e=document.createElement("div");e.className="sl-extend",e.setAttribute("role","status"),e.innerHTML='<span class="sl-extend-txt" data-ref="extendTxt"></span><button type="button" class="sl-extend-btn" data-ref="extendBtn"></button>',(this.regions["bottom-center"]??this.els.map).appendChild(e),this.extendEl=e,this.els.extendTxt=e.querySelector('[data-ref="extendTxt"]'),this.els.extendBtn=e.querySelector('[data-ref="extendBtn"]'),this.els.extendBtn.textContent=this.tf("picker.addTime","Add time"),this.els.extendBtn.addEventListener("click",()=>{this.handleExtend()})}buildBookedOverlay(){let e=document.createElement("div");e.className="sl-booked",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.innerHTML=`<div class="sl-booked-badge"><svg viewBox="0 0 24 24"><path d="M20 6L9 17l-5-5"/></svg></div><div class="sl-booked-title">${this.tf("picker.allSetTitle","You're all set")}</div><div class="sl-booked-sub" data-ref="bookedSub"></div>`,this.root.appendChild(e),this.bookedEl=e,this.els.bookedSub=e.querySelector('[data-ref="bookedSub"]')}get onGAPromptHook(){return this.opts.onGAPrompt}tf(e,t){return f(e,t)}buildSoldoutOverlay(){if(!this.els.map)return;let e=document.createElement("div");e.className="sl-soldout",e.setAttribute("role","status");let t=(this.controller.doc?.theme?.brandName??this.opts.theme?.brandName??this.els.name?.textContent??this.tf("picker.soldOutEyebrow","This event")).toUpperCase(),i=document.createElement("div");i.className="sl-soldout-eyebrow",i.textContent=t;let s=document.createElement("div");s.className="sl-soldout-title",s.textContent=this.tf("picker.soldOutTitle","Sold out");let n=document.createElement("p");n.className="sl-soldout-copy",n.textContent=this.tf("picker.soldOutCopy","No reserved seats are currently available for this event."),e.append(i,s,n),this.els.map.appendChild(e),this.soldoutEl=e}syncSoldout(e,t){let i=this.controller.getGAAreas().length>0,s=this.isSoldOut(e,t,i);s!==this.soldOut&&(this.soldOut=s,this.soldoutEl?.classList.toggle("on",s))}isSoldOut(e,t,i){return!i&&e.length>0&&e.every(s=>(t[s.key]??0)===0)}setSalesClosed(e){let t=e||!!this.opts.readOnly;this.salesClosed!==t&&(this.salesClosed=t,this.applySalesClosed())}applySalesClosed(){this.salesClosed&&this.tableDialog&&!this.tableDialogHeld&&this.cancelTableDialog();let e=this.els.closedPill;if(e){e.classList.toggle("on",this.salesClosed);let t=this.els.closedPillText??e;t.textContent=this.tf("picker.salesClosedPill","Sales are closed")}this.root?.setAttribute("data-sales-closed",String(this.salesClosed)),this.salesClosed&&this.srEl&&(this.srEl.textContent=this.tf("picker.salesClosedToast","Sales are closed for this event.")),this.syncCta(),this.syncTray()}badgeHidden(e){return!!(this.opts.hideBadge||e?.hideBadge)}buildBadge(e){if(this.badgeHidden(e))return;let t=this.els.foot;if(!t)return;let i=document.createElement("a");i.className="sl-powered",i.href="https://seatlayer.io/?ref=picker",i.target="_blank",i.rel="noopener noreferrer",i.setAttribute("aria-label",this.tf("picker.poweredBy","Powered by SeatLayer"));let s=document.createElement("span");s.className="sl-powered-mark",s.setAttribute("aria-hidden","true"),s.innerHTML=Mt;let n=document.createElement("span");n.textContent=this.tf("picker.poweredBy","Powered by SeatLayer"),i.append(s,n),t.appendChild(i)}buildRegions(){if(!this.els.map)return;let e=["top-left","top-center","top-right","left-rail","bottom-left","bottom-center","bottom-right"];for(let t of e){let i=document.createElement("div");i.className="sl-anchor",i.dataset.region=t,this.els.map.appendChild(i),this.regions[t]=i}}cssVar(e){return this.root?getComputedStyle(this.root).getPropertyValue(e).trim():""}reducedMotion(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}scheduleMotion(e,t){let i=setTimeout(()=>{this.motionTimers.delete(i),this.destroyed||e()},t);this.motionTimers.add(i)}animateOnce(e,t,i=600){!e||this.reducedMotion()||(e.classList.remove(t),e.offsetWidth,e.classList.add(t),this.scheduleMotion(()=>e.classList.remove(t),i))}flashPickedSeat(e){this.reducedMotion()||this.controller.flashSeat(e,this.cssVar("--sl-accent")||"#f4b740")}flashHeldSeats(e){if(this.reducedMotion())return;(e.items??[]).filter(i=>i.objectType!=="ga").map(i=>i.label).slice(0,10).forEach((i,s)=>{let n=this.controller.seatByLabel(i);n&&this.scheduleMotion(()=>this.controller.flashSeat(n.id,this.cssVar("--sl-accent")||"#f4b740"),s*55)})}committedSelection(){let e=this.confirmSeat?.id,t=this.tableDialog&&!this.tableDialogHeld?this.tableDialog.id:null;return this.controller.getSelection().filter(i=>i.id!==e&&i.id!==t)}pendingSelectionCount(){let e=this.hold?.items??[],t=new Set(e.map(s=>s.label));return this.committedSelection().filter(s=>!t.has(s.label)).reduce((s,n)=>s+(n.quantity??1),0)+Ne(this.gaQty,this.hold?.items??[])}heldTicketCount(){return(this.hold?.items??[]).reduce((e,t)=>e+(t.quantity??1),0)}totalTicketCount(){let e=new Set((this.hold?.items??[]).map(i=>i.label)),t=this.committedSelection().filter(i=>!e.has(i.label)).reduce((i,s)=>i+(s.quantity??1),0);return this.heldTicketCount()+t+Ne(this.gaQty,this.hold?.items??[])}updateSelectionCapacity(){let e=new Set((this.hold?.items??[]).map(s=>s.label)),t=this.committedSelection().filter(s=>e.has(s.label)).reduce((s,n)=>s+(n.quantity??1),0),i=Math.max(0,this.maxTickets-this.heldTicketCount()-Ne(this.gaQty,this.hold?.items??[]));this.controller.setMaxSelection(t+i)}syncCta(e=this.lastTrayCount,t=this.pendingSelectionCount()){let i=this.els.cta;if(!i)return;if(this.salesClosed){i.disabled=!0,i.textContent=this.tf("picker.salesClosedCta","Sales closed");return}if(this.confirmSeat||this.tableDialog&&!this.tableDialogHeld){i.disabled=!0,i.textContent=this.tableDialog?this.tf("picker.confirmYourTable","Confirm your table"):this.tf("picker.confirmOrCancelSeat","Confirm or cancel this seat");return}if(this.ctaPhase==="holding"){i.disabled=!0,i.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${this.tf("picker.securingSeats","Securing your seats\u2026")}`;return}if(this.ctaPhase==="checkout"){i.disabled=!0,i.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${this.tf("picker.openingCheckout","Opening secure checkout\u2026")}`;return}let s=!this.hold&&this.performanceGroup?.selectionMode==="per_performance"?this.performanceGroup.submissionState?.():null;if(s&&!s.ready){i.disabled=!0,i.textContent=this.tf("picker.completeAllPerformances","Complete all performances ({complete}/{total})").replace("{complete}",String(s.complete)).replace("{total}",String(s.total));return}let n=this.controller.getSelectionValidity(e);if(n&&!n.isValid){i.disabled=!0,i.textContent=ki(n,(o,a)=>this.tf(o,a),!0);return}i.disabled=e===0,i.textContent=this.hold?t?(0,b.t)("picker.secureMoreAndCheckout",{count:t}):this.tf("picker.continueToCheckout","Continue to checkout"):e?this.performanceGroup?this.tf("picker.holdSeatsForAllPerformances","Hold seats for all {count} performances").replace("{count}",String(this.performanceGroup.performanceCount)):this.tf("picker.holdSeatsAndCheckout","Hold seats & checkout"):this.tf("picker.selectSeats","Select seats")}setCtaPhase(e){this.ctaPhase=e,this.syncCta(),this.renderPeek(this.lastTrayCount,this.lastTrayTotal,this.pendingSelectionCount()),e==="checkout"&&this.scheduleMotion(()=>{this.ctaPhase==="checkout"&&(this.ctaPhase="idle",this.syncCta(),this.renderPeek(this.lastTrayCount,this.lastTrayTotal,this.pendingSelectionCount()))},1100)}holdStorageKey(){return`@seatlayer/hold/v1/${encodeURIComponent(this.apiBase)}/${encodeURIComponent(this.opts.event)}`}rememberedHoldId(){if(this.opts.initialHoldId)return this.opts.initialHoldId;if(this.opts.restoreHold===!1||typeof window>"u")return null;try{return window.sessionStorage.getItem(this.holdStorageKey())}catch{return null}}rememberHold(e){if(!(this.opts.restoreHold===!1||typeof window>"u"))try{window.sessionStorage.setItem(this.holdStorageKey(),e.holdId)}catch{}}forgetHold(){if(!(typeof window>"u"))try{window.sessionStorage.removeItem(this.holdStorageKey())}catch{}}async resumeHoldFromServer(e,t){try{let i=await this.controller.resumeHold(e);if(!i)return null;let s={holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items};return this.hold=s,this.handedOff=!0,this.bookedShown=!1,this.ctaPhase="idle",this.startHoldTimer(s.expiresAt),this.rememberHold(s),this.syncTray(),this.emitHoldChange(),this.opts.onHoldRestored?.(s,s.seats??[],this.buildHandoff(s)),t&&this.toast(this.tf("picker.heldTicketsRestored","Your held tickets have been restored."),"success"),s}catch(i){let s=i?.status;return s===404||s===409?this.forgetHold():this.opts.onError?.(i),null}}async restoreRememberedHold(){let e=this.rememberedHoldId();e&&await this.resumeHoldFromServer(e,!0)}activeFloorObjects(){let e=this.controller.doc;if(!e)return[];let t=e.floors;if(t?.length){let i=this.controller.getActiveFloorId();return(t.find(s=>s.id===i)??t[0]).objects??[]}return e.objects??[]}buildMinimap(){this.els.map&&(this.minimap=Ks({controller:this.controller,root:()=>this.root,cssVar:e=>this.cssVar(e),focusedSectionLabel:()=>this.lastSection?.label},this.regions["bottom-left"]??this.els.map))}catPrice(e){let t=e.tiers?.length?e.tiers[0].price:e.price;return t===void 0||!e.key?t:this.paidPrice(e.key,e.tiers?.[0]?.id??null,t)}catPriceRange(e){let t=e.tiers?.length?e.tiers.map(i=>this.paidPrice(e.key,i.id??null,i.price)):e.price==null?[]:[this.paidPrice(e.key,null,e.price)];if(e.key)for(let i of this.pricesByChannel.values())for(let s of i)s.categoryKey===e.key&&t.push(s.price);return t.length?{min:Math.min(...t),max:Math.max(...t)}:void 0}buildPriceFilter(){if(!this.els.prices||!this.els.pricesSec)return;let e=Bs(this.controller.doc?.categories??[],this.legendDeps());if(e.length<2)return;let t=document.createElement("select");t.className="sl-price-select",t.setAttribute("aria-label",this.tf("picker.filterAndFocusByPrice","Filter and focus seats by price"));let i=document.createElement("option");i.value="all",i.textContent=this.tf("picker.allPrices","All prices"),t.appendChild(i);for(let s of e){let n=document.createElement("option");n.value=s.id,n.textContent=s.label,t.appendChild(n)}this.els.pricesSec.appendChild(t),t.addEventListener("change",()=>{let n=e.find(o=>o.id===t.value)?.keys??null;this.focusedCatKey=null,this.priceBandKeys=n?new Set(n):null,this.controller.setCategoryFilter(n),this.controller.focusCategoryFilter(n),this.pushAvailabilityTo3d(),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap(),this.syncPrices(),this.lastSection&&this.showSectionCard(this.lastSection)})}buildArenaChrome(){let e=this.controller.doc;if(!e||!this.els.map)return;let t=e.objects.some(i=>i.type==="section")||(e.floors??[]).some(i=>i.objects.some(s=>s.type==="section"));if(this.canOffer3d()){let i=document.createElement("div");i.className="sl-projection",i.setAttribute("role","group"),i.setAttribute("aria-label",this.tf("picker.venueView","Venue view")),i.innerHTML=`<button type="button" data-view="map" aria-pressed="true" title="${this.tf("picker.flat2dMap","Flat 2D map")}">${this.tf("picker.map","Map")}</button><button type="button" data-view="venue3d" aria-pressed="false" title="${this.tf("picker.interactive3dVenueView","Interactive 3D venue view")}">3D</button>`,i.querySelectorAll("button").forEach(s=>{s.addEventListener("click",()=>{this.setBuyerView(s.dataset.view)})}),this.regions["top-right"].appendChild(i),this.projectionEl=i,this.syncProjection()}if(t){let i=[...e.objects,...(e.floors??[]).flatMap(h=>h.objects)],s=new Set((e.zones??[]).map(h=>h.id)),o=i.some(h=>h.type==="section"&&typeof h.zone=="string"&&s.has(h.zone))?["zones","sections","seats"]:["sections","seats"],a=document.createElement("div");a.className="sl-rungs on",a.setAttribute("role","group"),a.setAttribute("aria-label",(0,b.t)("picker.zoomLevel"));let l={zones:(0,b.t)("picker.rungLabel.zones"),sections:(0,b.t)("picker.rungLabel.sections"),seats:(0,b.t)("picker.rungLabel.seats")},c={zones:(0,b.t)("picker.rungTip.zones"),sections:(0,b.t)("picker.rungTip.sections"),seats:(0,b.t)("picker.rungTip.seats")};a.innerHTML=o.map(h=>`<button type="button" data-rung="${h}" title="${c[h]}" aria-pressed="false">${l[h]}</button>`).join(""),a.querySelectorAll("button").forEach(h=>{h.addEventListener("click",()=>{let p=h.dataset.rung;this.controller.setRung(p),p==="seats"&&this.collapseSectionCard()})}),this.regions["top-center"].appendChild(a),this.rungsEl=a,this.syncRung()}if(this.controller.isMultiFloor()){let i=Gs({floors:this.controller.getFloors(),tf:(s,n)=>this.tf(s,n),onChoose:s=>{s===""?this.controller.setFloorOverview(!0):this.controller.setFloor(s),this.showSectionCard(null),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap()}});this.regions["left-rail"].appendChild(i),this.floorsEl=i,this.syncFloors()}}syncRung(){let e=this.controller.getRung(),t=e==="seats"||!!this.controller.getFocusedSection?.();this.root&&(this.root.dataset.zoomed=String(t)),this.minimap?.setAutoOpen(!1),this.rungsEl&&this.rungsEl.querySelectorAll("button").forEach(i=>{let s=i.dataset.rung===e;i.classList.toggle("on",s),i.setAttribute("aria-pressed",String(s))})}syncProjection(){this.projectionEl&&this.projectionEl.querySelectorAll("button").forEach(e=>{let t=e.dataset.view===this.buyerView;e.classList.toggle("on",t),e.setAttribute("aria-pressed",String(t))})}canOffer3d(){return this.opts.enable3D===!1||!this.controller.doc||!Ht()?!1:this.allSeats().length<=this.max3dSeats()}max3dSeats(){let e=this.opts.max3DSeats;if(typeof e=="number"&&e>0)return e;let t=globalThis.navigator;return(t?.hardwareConcurrency??8)<=4||(t?.deviceMemory??8)<=4||(globalThis.matchMedia?.("(pointer: coarse)").matches??!1)?kr/2:kr}syncFloors(){Us(this.floorsEl,this.controller.getActiveFloorId(),this.controller.isFloorOverview())}showSectionCard(e){if(this.lastSection=e,this.secCardEl?.remove(),this.secCardEl=null,!e){this.minimap?.refreshMinimap();return}this.secCardCollapsed=this.controller.getRung()==="seats",this.secCardShownAt=Date.now(),this.renderSectionCard(e),this.minimap?.refreshMinimap()}sectionNeighbours(e){let t=this.activeFloorObjects().filter(s=>s.type==="section"&&!this.controller.isSectionClosed(s.id)&&this.controller.getSectionSeatCount(s.id)>0);if(t.length<2)return null;let i=t.findIndex(s=>s.id===e);return i<0?null:{previous:t[(i-1+t.length)%t.length],next:t[(i+1)%t.length]}}wireSectionNavigation(e){e.querySelectorAll("[data-section-nav]").forEach(t=>{t.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation();let s=t.dataset.sectionNav;s&&this.controller.focusSection(s)})})}renderSectionCard(e){if(!this.els.map)return;this.secCardEl?.remove();let t=e.categories.length?e.categories.map(d=>{let u=this.controller.doc?.categories.find(g=>g.key===d.key);return u?this.catPriceRange(u):{min:d.priceMin,max:d.priceMax}}).filter(d=>d!=null):[{min:e.priceMin,max:e.priceMax}],i=Math.min(...t.map(d=>d.min)),s=Math.max(...t.map(d=>d.max)),n=i===s?this.money(i):`${this.money(i)}\u2013${this.money(s)}`,o=(0,b.tCount)("picker.seatsLeftInSection",e.seatsLeft),a=`<button type="button" class="sl-seccard-x" aria-label="${(0,b.t)("picker.closeSectionSummary")}">\u2715</button>`,l=xs(this.sectionNeighbours(e.id)),c=document.createElement("div"),h=this.root?.dataset.layout==="narrow",p={label:e.label,color:e.color,leftLabel:o,nav:l,close:a};if(h)c.className="sl-seccard strip on",c.setAttribute("role","status"),c.setAttribute("aria-label",(0,b.t)("picker.sectionSummaryAria",{label:e.label})),c.innerHTML=vi(p),this.wireSectionNavigation(c),c.querySelector(".sl-seccard-x").addEventListener("click",()=>this.controller.overview()),this.els.map.appendChild(c);else if(this.secCardCollapsed)c.className="sl-seccard mini on",c.setAttribute("role","button"),c.setAttribute("aria-label",(0,b.t)("picker.sectionSummaryAria",{label:e.label})),c.innerHTML=vi(p),this.wireSectionNavigation(c),c.addEventListener("click",d=>{d.target.closest(".sl-seccard-x")||(this.secCardCollapsed=!1,this.secCardShownAt=Date.now(),this.renderSectionCard(e))}),c.querySelector(".sl-seccard-x").addEventListener("click",()=>this.controller.overview()),(this.regions["top-center"]??this.els.map).appendChild(c);else{c.className="sl-seccard on",c.setAttribute("role","dialog"),c.setAttribute("aria-label",(0,b.t)("picker.sectionSummaryAria",{label:e.label}));let d=e.categories.map(u=>{let g=this.controller.doc?.categories.find(w=>w.key===u.key),v=g?this.catPriceRange(g):{min:u.priceMin,max:u.priceMax};return Ts({label:u.label,color:u.color,dim:this.priceBandKeys!=null&&!this.priceBandKeys.has(u.key),rangeLabel:v&&v.min!==v.max?`${this.money(v.min)}\u2013${this.money(v.max)}`:this.money(v?.min??u.price)})}).join("");c.innerHTML=Es({...p,priceLabel:n,showPrice:e.categories.length>0,zoneLabel:e.zoneLabel,entrance:e.entrance?`${(0,b.t)("picker.entrance")} ${e.entrance}`:void 0,mix:d,overviewLabel:(0,b.t)("picker.overview"),hint:(0,b.t)("picker.tapSeatHint")}),this.wireSectionNavigation(c),c.querySelector(".sl-seccard-x").addEventListener("click",()=>this.controller.overview()),c.querySelector(".sl-seccard-overview").addEventListener("click",()=>this.controller.overview()),(this.regions["top-center"]??this.els.map).appendChild(c)}this.secCardEl=c}collapseSectionCard(){!this.secCardEl||this.secCardCollapsed||!this.lastSection||this.root?.dataset.layout!=="narrow"&&(this.secCardCollapsed=!0,this.renderSectionCard(this.lastSection))}sectionCardOnView(){if(!(!this.secCardEl||this.secCardCollapsed||!this.lastSection)&&this.root?.dataset.layout!=="narrow"){if(this.controller.getRung()==="seats"){this.collapseSectionCard();return}if(Date.now()-this.secCardShownAt<1400){this.sectionCardCoverage()>.25&&this.collapseSectionCard();return}this.collapseSectionCard()}}sectionCardCoverage(){let e=this.secCardEl,t=this.lastSection;if(!e||!t||!this.els.map)return 0;let i=this.activeFloorObjects().find(y=>y.type==="section"&&y.id===t.id)?.outline;if(!i||i.length<3)return 0;let s=i.map(y=>this.controller.worldToScreen(y)),n=s.map(y=>y.x),o=s.map(y=>y.y),a=Math.min(...n),l=Math.min(...o),c=Math.max(...n)-a,h=Math.max(...o)-l;if(c<=0||h<=0)return 0;let p=this.els.map.getBoundingClientRect(),d=e.getBoundingClientRect(),u=d.left-p.left,g=d.top-p.top,v=Math.max(0,Math.min(u+d.width,a+c)-Math.max(u,a)),w=Math.max(0,Math.min(g+d.height,l+h)-Math.max(g,l));return v*w/(c*h)}markedSeatAnnouncement(e){let t=Yt(this.controller.getRenderer()?.getSeatMark?.(e.id),this.performanceGroup?.nights?.());return dr(t,e.displayLabel??e.label,this.opts.locale)}announceSeat(e){if(!this.srEl)return;if(!e){this.srEl.textContent="";return}let t=this.markedSeatAnnouncement(e);if(t){this.srEl.textContent=t;return}let i=this.controller.doc?.categories.find(u=>u.key===e.categoryKey),s=this.controller.getStatus(e.id)??"free",n=s==="free"?this.tf("picker.statusAvailable","available"):s==="held"?this.tf("picker.statusOnHold","on hold"):this.tf("picker.statusTaken2","taken"),o=i?this.catPriceRange(i):void 0,a=o?o.min===o.max?this.money(o.min):`${this.money(o.min)}\u2013${this.money(o.max)}`:void 0,l=this.controller.tableSelection(e.id),c=l??this.controller.seatDetails(e.id),h=ut(c),p=c?.rowLabel??c?.displayLabel??e.displayLabel??e.label,d=l?`${h} ${p}, ${l.bookingMode==="variable"?(0,b.t)("picker.minToMaxGuests",{min:l.minOccupancy,max:l.maxOccupancy}):(0,b.t)("picker.capacityGuests",{count:l.capacity})}`:c?.objectType==="booth"?`${h} ${p}`:c?.objectType==="table"?`${h} ${p}, ${(0,b.t)("picker.seatNumberLower",{label:c.seatNumber??e.label})}`:(0,b.t)("picker.seatLabel",{label:c?.displayLabel??e.displayLabel??e.label});this.srEl.textContent=`${d}, ${i?.label??e.categoryKey}${a?`, ${a}`:""}, ${n}`}showTableDialog(e,t,i){this.dismissTableDialog(!1),this.tableDialog={...e},this.tableDialogHeld=t,this.tableDialogReturnFocus=i??document.activeElement;let s=this.controller.doc?.categories.find(a=>a.key===e.categoryKey),n=e.bookingMode==="variable",o=document.createElement("div");o.className="sl-table-scrim",o.innerHTML=As(e,{variable:n,held:t,typeWord:ut(e),categoryLabel:s?.label??e.categoryKey,unitPrice:this.money(this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label))}),this.root.appendChild(o),this.tableDialogEl=o,this.renderTableDialogState(),o.querySelectorAll("[data-table-step]").forEach(a=>{a.addEventListener("click",()=>{if(!this.tableDialog)return;let l=Math.max(this.tableDialog.minOccupancy,Math.min(this.tableDialog.maxOccupancy,this.tableDialog.quantity+Number(a.dataset.tableStep)));this.tableDialog={...this.tableDialog,quantity:l},this.renderTableDialogState()})}),o.querySelector(".sl-table-cancel").addEventListener("click",()=>this.cancelTableDialog()),o.querySelector(".sl-table-confirm").addEventListener("click",()=>{this.confirmTableDialog()}),o.addEventListener("mousedown",a=>{a.target===o&&this.cancelTableDialog()}),o.addEventListener("keydown",a=>{if(a.key!=="Tab")return;let l=[...o.querySelectorAll('button:not(:disabled),[tabindex]:not([tabindex="-1"])')];if(!l.length)return;let c=l[0],h=l[l.length-1];a.shiftKey&&document.activeElement===c?(a.preventDefault(),h.focus()):!a.shiftKey&&document.activeElement===h&&(a.preventDefault(),c.focus())}),requestAnimationFrame(()=>o.querySelector(n?'[data-table-step="-1"]':".sl-table-confirm")?.focus())}renderTableDialogState(){let e=this.tableDialog,t=this.tableDialogEl;if(!e||!t)return;let i=t.querySelector("output[data-table-qty]");i&&(i.value=String(e.quantity));let s=t.querySelector("input[data-table-qty]");s&&(s.value=String(e.quantity)),t.querySelectorAll("[data-table-step]").forEach(a=>{let l=Number(a.dataset.tableStep);a.disabled=l<0?e.quantity<=e.minOccupancy:e.quantity>=e.maxOccupancy});let n=this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label),o=t.querySelector("[data-table-total]");o&&(o.textContent=this.money(n*e.quantity))}async confirmTableDialog(){let e=this.tableDialog,t=this.tableDialogHeld;if(!e)return;let i=this.tableDialogEl?.querySelector(".sl-table-confirm");if(i&&(i.disabled=!0,i.textContent=t?this.tf("picker.updatingEllipsis","Updating\u2026"):this.tf("picker.selectingEllipsis","Selecting\u2026")),t){try{let s=await this.controller.replaceTableQuantity(e.label,e.quantity,this.opts.holdTtlMs);if(!s){this.toast(this.tf("picker.guestCountCouldNotBeSecured","That guest count could not be secured. Your current table hold is unchanged."),"warning"),this.renderTableDialogState(),i&&(i.disabled=!1,i.textContent=this.tf("picker.updateTable","Update table"));return}this.hold={holdId:s.holdId,expiresAt:s.expiresAt,seats:s.seats,items:s.items},this.startHoldTimer(s.expiresAt),this.dismissTableDialog(),this.syncTray(),this.emitHoldChange(),this.toast((0,b.t)("picker.tableUpdatedForGuests",{label:e.label,count:e.quantity}),"success")}catch(s){this.opts.onError?.(s),this.toast(this.tf("picker.guestCountNoLongerAvailable","That guest count is no longer available. Your current hold is unchanged."),"error"),i&&(i.disabled=!1,i.textContent=this.tf("picker.updateTable","Update table"))}return}if(!this.controller.setTableQuantity(e.label,e.quantity)){i&&(i.disabled=!1,i.textContent=e.bookingMode==="variable"?this.tf("picker.selectTable","Select table"):this.tf("picker.selectWholeTable","Select whole table"));return}this.dismissTableDialog(),this.collapseSectionCard(),this.syncTray()}cancelTableDialog(){let e=this.tableDialog,t=this.tableDialogHeld;this.dismissTableDialog(),e&&!t&&this.controller.deselect(e.physicalSeatIds)}dismissTableDialog(e=!0){let t=this.tableDialogReturnFocus;this.tableDialogEl?.remove(),this.tableDialogEl=null,this.tableDialog=null,this.tableDialogHeld=!1,this.tableDialogReturnFocus=null,e&&requestAnimationFrame(()=>(t?.isConnected?t:this.root)?.focus())}showConfirm(e){let t=this.confirmSeat?.id;this.confirmEl?.remove(),this.confirmEl=null,this.confirmSeat=e,this.root?.setAttribute("data-confirming","true"),this.els.side?.toggleAttribute("inert",!0),Object.values(this.regions).forEach(w=>w.toggleAttribute("inert",!0)),this.controller.setSelectionFocus(e.id),t&&t!==e.id&&this.controller.deselect([t]),this.tipEl&&(this.tipEl.style.display="none");let i=this.controller.seatDetails(e.id),s=this.controller.doc?.categories.find(w=>w.key===e.categoryKey),n=i?.price??(s?.tiers?.length?s.tiers[0].price:s?.price),o=n!=null?this.paidPrice(e.categoryKey,i?.tierId??s?.tiers?.[0]?.id??null,n,e.label):void 0,a=Ss(i,e.displayLabel??e.label,ut(i)),l=i?.tiers??s?.tiers??[],c=i?.tierId??l[0]?.id,h=Cs(l,c,w=>this.money(this.paidPrice(e.categoryKey,w.id,w.price,e.label))),p=this.buyerView==="venue3d",d=document.createElement("div");d.className="sl-confirm",d.setAttribute("role","dialog"),d.setAttribute("aria-label",(0,b.t)("picker.confirmSeatLabel",{label:e.label}));let u=s?.color??"#6e7bff",g=xi(u,this.cssVar("--sl-surface")||"#1a2234",.76)??u;d.style.setProperty("--sl-cat",u),d.style.setProperty("--sl-cat-ink",Se(g,"#172033","#ffffff")),d.innerHTML=Ps({identityFields:a,categoryColor:s?.color??"#6e7bff",categoryLabel:String(i?.categoryLabel??s?.label??e.categoryKey),priceLabel:o!=null?this.money(o):"",tierChoices:h,wheelchair:ys(i?.wheelchairSpaceType),commercial:vs(e.commercial),thumb:this.seatViewEnabled()&&this.buyerView!=="venue3d"?this.confirmThumbHtml(e):"",inspect:p?`${ks(e,`${i?.displayLabel??e.displayLabel??e.label} \xB7 ${o==null?this.tf("picker.priceNotSupplied","Price not supplied"):this.money(o)}`,p)}<div class="sl-confirm-inspect-row">${ws(e,p?this.view3dCompareSeatIds:null)}${bi(this.canOffer3d(),p)}</div>`:bi(this.canOffer3d(),p),cancelLabel:(0,b.t)("common.cancel"),selectLabel:this.tf("picker.select","Select")}),this.els.map.appendChild(d),this.confirmEl=d;let v=d.querySelector(".sl-confirm-thumb");if(v&&e.viewUrl){let w=e.viewMeta?.previewUrl??e.viewUrl;this.buyerAssetUrls.resolve(w).then(y=>{y&&d.isConnected&&this.confirmEl===d&&(v.src=y)}).catch(y=>this.opts.onError?.(y))}this.reanchorConfirm(),d.querySelector(".sl-confirm-view")?.addEventListener("click",()=>{this.openSeatView(e)}),d.querySelector(".sl-confirm-confidence")?.addEventListener("click",w=>{this.openSeatConfidencePassport(e,w.currentTarget instanceof HTMLElement?w.currentTarget:null)}),d.querySelector(".sl-confirm-compare")?.addEventListener("click",()=>this.saveView3dComparisonSeat(e)),d.querySelectorAll("[data-confirm-tier]").forEach(w=>{w.addEventListener("click",()=>{let y=w.dataset.confirmTier,R=l.find(P=>P.id===y);if(!R)return;this.controller.setSeatTier(e.id,R.id),d.querySelectorAll("[data-confirm-tier]").forEach(P=>{P.setAttribute("aria-pressed",String(P===w))});let S=d.querySelector(".sl-confirm-price");S&&(S.textContent=this.money(this.paidPrice(e.categoryKey,R.id,R.price,e.label))),this.reanchorConfirm()})}),d.querySelector(".sl-confirm-3d")?.addEventListener("click",()=>{this.buyerView==="venue3d"?(this.dismissConfirm(),this.view3dHandle?.flyToSeat(e.id)):(this.view3dReturnSeat=e,this.dismissConfirm(),this.enter3d(e.id))}),d.querySelector(".sl-confirm-add").addEventListener("click",()=>this.commitConfirm()),d.querySelector(".sl-confirm-cancel").addEventListener("click",()=>this.cancelConfirm()),requestAnimationFrame(()=>d.querySelector(".sl-confirm-add")?.focus())}reanchorConfirm(){if(!this.confirmEl||!this.confirmSeat||this.root?.dataset.view3d==="on")return;let e=this.controller.worldToScreen({x:this.confirmSeat.x,y:this.confirmSeat.y});if(this.root?.dataset.layout==="narrow")return;let t=this.els.map.clientWidth,i=this.els.map.clientHeight,s=this.confirmEl.offsetWidth||276,n=this.confirmEl.offsetHeight||230,o=s/2+12,a=Math.max(o,Math.min(t-o,e.x)),l=e.y+n+24<=i,c=e.y<n+24&&l;this.confirmEl.dataset.placement=c?"below":"above",this.confirmEl.style.left=`${a}px`,this.confirmEl.style.top=`${Math.max(8,Math.min(i-8,e.y))}px`}dismissConfirm(){this.confirmEl?.remove(),this.confirmEl=null,this.confirmSeat=null,this.root?.removeAttribute("data-confirming"),Object.values(this.regions).forEach(e=>e.toggleAttribute("inert",!1)),this.applyPanelCollapsed(),this.controller.setSelectionFocus(null)}commitConfirm(){this.confirmSeat&&(this.dismissConfirm(),this.collapseSectionCard(),this.syncTray(),this.syncSelectionTo3d())}cancelConfirm(){let e=this.confirmSeat;e&&(this.controller.deselect([e.id]),this.confirmSeat&&this.dismissConfirm(),this.syncSelectionTo3d(),this.root?.focus({preventScroll:!0}))}closeConfirm(){this.dismissConfirm()}seatViewEnabled(){return this.opts.seatView!==!1}allSeats(){return this.allSeatsCache||(this.allSeatsCache=[...this.controller.getExpandedSeats()]),this.allSeatsCache}async openSeatView(e){if(!this.root||!this.seatViewEnabled())return;let t=++this.seatViewGen,i=this.controller.doc,s=this.controller.getActiveFloorId(),n=e.focalPoint??i?.floors?.find(p=>p.id===s)?.focalPoint??i?.focalPoint??{x:0,y:0},o,a,l=!1;if(e.viewUrl){let p,d=null;try{let g=e.viewMeta?.previewUrl;g&&g!==e.viewUrl?(d=await this.buyerAssetUrls.resolve(g),p=e.viewUrl):p=await this.buyerAssetUrls.resolve(e.viewUrl)}catch(g){t===this.seatViewGen&&this.opts.onError?.(g);return}if(t!==this.seatViewGen||!p||e.viewMeta?.previewUrl&&e.viewMeta.previewUrl!==e.viewUrl&&!d||!this.root||!this.seatViewEnabled())return;let u={url:p,...d?{previewUrl:d}:{},...e.viewMeta?.sourceWidth!==void 0?{sourceWidth:e.viewMeta.sourceWidth}:{},...e.viewMeta?.sourceHeight!==void 0?{sourceHeight:e.viewMeta.sourceHeight}:{},...e.viewMeta?.previewWidth!==void 0?{previewWidth:e.viewMeta.previewWidth}:{},...e.viewMeta?.previewHeight!==void 0?{previewHeight:e.viewMeta.previewHeight}:{},...e.viewMeta?.variants?.length?{variants:e.viewMeta.variants}:{},...e.viewMeta?.coverage?{coverage:e.viewMeta.coverage}:{},...e.viewMeta?.capturedAt?{capturedAt:e.viewMeta.capturedAt}:{},...e.viewMeta?.sourceLabel?{sourceLabel:e.viewMeta.sourceLabel}:{}};o=u,a=(0,mt.seatViewDisclosure)(u),l=(0,mt.isAuthoredSeatView)(u)}else{let p;try{let{generateSeatPanorama:d}=await Ot();p=d(e,n,this.allSeats())}catch(d){t===this.seatViewGen&&this.opts.onError?.(d);return}if(t!==this.seatViewGen||!this.root||!this.seatViewEnabled())return;o={url:p.url,generated:!0},a=(0,b.t)("picker.illustrationCaption",{m:p.distanceM})}this.closeSeatView(!1);let c=(0,b.t)("picker.viewFromSeat",{label:e.label}),h=$t({root:this.root,source:o,caption:a,real:l,closeLabel:this.tf("picker.close","Close"),dragHint:this.tf("picker.dragToLookAround","Drag to look around \xB7 scroll to zoom"),viewFromSeatLabel:c,real360Label:(0,b.t)("picker.real360"),previewLabel:(0,b.t)("picker.preview"),resolveAsset:p=>this.buyerAssetUrls.resolve(p),onClose:()=>this.closeSeatView()});this.viewEl=h.element,this.viewCleanup=()=>h.dispose()}closeSeatView(e=!0){e&&(this.seatViewGen+=1),this.viewCleanup?.(),this.viewCleanup=null,this.viewEl?.remove(),this.viewEl=null}money(e){let t=this.opts.pricing?.formatter;if(t)return t(e,this.currency);let i=Number.isInteger(e);return(0,b.formatMoney)(e,this.currency,{locale:this.opts.locale,fallback:(s,n)=>`${s} ${n}`,...i?{minimumFractionDigits:0,maximumFractionDigits:0}:{}})}scheduleOfferBoundary(e){if(this.offerBoundaryTimer&&clearTimeout(this.offerBoundaryTimer),this.offerBoundaryTimer=null,!this.api.availability||this.destroyed)return;let t=Date.now(),i=zs(e,t);if(i==null)return;let s=6*36e5,n=Math.min(Math.max(i-t+1e3,1e3),s);this.offerBoundaryTimer=setTimeout(()=>{this.offerBoundaryTimer=null,!document.hidden&&this.refreshOfferAvailability(!1)},n)}scheduleOfferRefresh(e){!this.api.availability||this.destroyed||(this.offerRefreshTimer&&clearTimeout(this.offerRefreshTimer),this.offerRefreshTimer=setTimeout(()=>{this.offerRefreshTimer=null,this.refreshOfferAvailability(e)},e?180:0))}async refreshOfferAvailability(e){if(!(!this.api.availability||this.destroyed))try{let t=await this.api.availability(this.opts.event,e);if(this.destroyed)return;let i=Nt(t);if(!i)return;this.offerAvailability=i,this.applyChannelPricing(i.channelPricing),this.scheduleOfferBoundary(i);let s=Gt(i),n={...this.hostPricing?.prices??{},...s},o=Object.keys(n).length>0||this.hostPricing?.formatter?{prices:n,...this.hostPricing?.formatter?{formatter:this.hostPricing.formatter}:{}}:void 0;this.setPricing(o),this.syncOffer(),this.opts.onOfferAvailabilityChange?.(i)}catch{!this.destroyed&&!this.offerBoundaryTimer&&!document.hidden&&(this.offerBoundaryTimer=setTimeout(()=>{this.offerBoundaryTimer=null,!document.hidden&&this.refreshOfferAvailability(!1)},3e4))}}offerPrice(e){return e?this.offerAvailability?.prices.find(t=>t.categoryKey===e)??null:null}applyChannelPricing(e){this.channelByObject.clear(),this.pricesByChannel.clear();for(let t of e?.channels??[])this.pricesByChannel.set(t.channelId,t.priceOverrides);for(let t of e?.objects??[])this.pricesByChannel.has(t.channelId)&&this.channelByObject.set(t.label,t.channelId)}syncOffer(){let e=this.els.offer;if(!e)return;let t=this.offerAvailability,i=t?.release??null,s=i?null:t?.upcoming??null;if(!t||t.state==="closed"||t.state==="sold-out"||!i&&!s){e.classList.remove("has"),e.replaceChildren();return}let n=i??s,o=document.createElement("div");o.className="sl-offer-main";let a=document.createElement("div");a.className="sl-offer-copy";let l=document.createElement("span");l.className="sl-offer-kicker",l.textContent=i?this.tf("picker.currentTicketOffer","Current ticket offer"):this.tf("picker.upcomingTicketOffer","Upcoming ticket offer");let c=document.createElement("strong");c.className="sl-offer-name",c.textContent=n.name||(i?this.tf("picker.currentOffer","Current offer"):this.tf("picker.scheduledOffer","Scheduled offer"));let h=document.createElement("span");h.className="sl-offer-line";let p=[];i&&t.fromPrice!=null&&p.push(this.money(t.fromPrice/100)),i&&n.remaining!=null&&p.push((0,b.t)("picker.offerRemainingAvailable",{count:n.remaining})),i&&n.endsAt!=null&&p.push((0,b.t)("picker.offerUntil",{time:It(n.endsAt,this.eventTimezone,this.opts.locale)})),s?.startsAt!=null&&p.push((0,b.t)("picker.offerStarts",{time:It(s.startsAt,this.eventTimezone,this.opts.locale)})),h.textContent=p.join(" \xB7 "),a.append(l,c,h);let d=document.createElement("details");d.className="sl-offer-info";let u=document.createElement("summary");u.setAttribute("aria-label",(0,b.t)("picker.howOfferWorks",{name:c.textContent??""})),u.textContent="i";let g=document.createElement("div");g.className="sl-offer-detail",g.textContent=i?this.tf("picker.offerDetailActive","This price applies automatically to eligible seats. Tickets in active carts temporarily reduce the available quantity; released or expired holds return it. When the offer ends, the next matching offer or normal ticket price takes over."):this.tf("picker.offerDetailUpcoming","Tickets are available at their normal price now. This scheduled offer will apply automatically to eligible seats when it starts."),d.append(u,g),o.append(a,d),e.replaceChildren(o),e.classList.add("has")}paidPrice(e,t,i,s){let n=s?this.channelByObject.get(s):void 0;if(n&&e){let a=this.pricesByChannel.get(n)?.find(l=>l.categoryKey===e&&l.tierId===(t??null));if(a)return a.price}let o=e?this.opts.pricing?.prices?.[e]:void 0;return o===void 0?i:typeof o=="number"?o:t&&o.tiers?.[t]!==void 0?o.tiers[t]:o.base??i}legendDeps(){return{colorOf:e=>this.controller.getRenderer()?.categoryDisplayColor?.(e.key)??e.color,rangeOf:e=>this.catPriceRange(e),priceOf:e=>this.catPrice(e),offerOf:e=>this.offerPrice(e),money:e=>this.money(e),esc:F}}syncPriceRail(e,t){let i=this.els.railScroll,s=e.length>1;this.els.rail?.classList.toggle("has",s||!!this.a11yChipsEl?.children.length),i&&(i.innerHTML=s?_s({...this.legendDeps(),categories:e,left:t,activeKey:this.focusedCatKey,soldOutWord:this.tf("picker.soldOut","Sold out")}):"",i.querySelectorAll(".sl-rc").forEach(n=>{n.addEventListener("click",()=>this.focusCategory(n.dataset.cat??""))}),this.railEdgesBound||(this.railEdgesBound=!0,i.addEventListener("scroll",()=>yi(i),{passive:!0})),requestAnimationFrame(()=>yi(i)))}syncPrices(){let e=this.controller.doc;if(!e||!this.els.prices)return;let t=this.controller.categoryAvailability(),i=e.categories.filter(l=>!l.notForSale);if(this.narrateAvailability(i,t),this.syncSoldout(i,t),this.suppressPricing){this.els.prices.replaceChildren(),this.els.pricesSec?.remove(),this.els.pricesHint?.remove();return}this.syncPriceRail(i,t);let s=5,n=i.length-s,o=n>1&&!this.pricesExpanded,a=o?i.slice(0,s):i;this.els.prices.classList.toggle("sl-expanded",n>1&&this.pricesExpanded),this.els.prices.innerHTML=Is({...this.legendDeps(),categories:a,left:t,collapsed:o,activeKey:this.focusedCatKey,bandKeys:this.priceBandKeys,leftCount:l=>(0,b.tCount)("picker.leftCount",l),titleFor:(l,c)=>c?this.tf("picker.showAllSeats","Show all seats"):(0,b.t)("picker.showLabelSeatsOnMap",{label:l.label}),moreLabel:n>1?o?(0,b.t)("picker.showAllTicketTypes",{count:i.length}):this.tf("picker.showFewer","Show fewer"):null,status:{legend:this.tf("picker.seatStatusLegend","Seat status legend"),held:this.tf("picker.temporarilyHeld","Temporarily held"),sold:this.tf("picker.sold","Sold")}}),this.els.prices.querySelectorAll(".sl-price-row").forEach(l=>{l.addEventListener("mouseenter",()=>this.controller.getRenderer()?.setCategoryHighlight?.(l.dataset.cat??null)),l.addEventListener("mouseleave",()=>this.controller.getRenderer()?.setCategoryHighlight?.(null));let c=()=>this.focusCategory(l.dataset.cat??"");l.addEventListener("click",c),l.addEventListener("keydown",h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),c())})}),this.els.prices.querySelector(".sl-price-more")?.addEventListener("click",()=>{this.pricesExpanded=!this.pricesExpanded,this.syncPrices()})}focusCategory(e){if(!e)return;let t=this.focusedCatKey===e?null:e;this.focusedCatKey=t,this.priceBandKeys=t?new Set([t]):null;let i=this.els.pricesSec?.querySelector(".sl-price-select");i&&(i.value="all"),this.controller.setCategoryFilter(t?[t]:null),this.controller.focusCategoryFilter(t?[t]:null),this.pushAvailabilityTo3d(),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap(),this.syncPrices(),this.lastSection&&this.showSectionCard(this.lastSection)}narrateAvailability(e,t){let i=this.els.liveText,s=this.lastCatAvail;this.lastCatAvail={...t};let n=this.controller.getActiveFloorId();if(n!==this.lastAvailFloorId&&(this.lastAvailFloorId=n,this.availQuietUntil=performance.now()+2e3),!(!i||!s||performance.now()<this.availQuietUntil))for(let o of e){let a=s[o.key],l=t[o.key]??0;if(a===void 0||l>=a)continue;let c=a-l;i.textContent=(0,b.tCount)("picker.seatsJustTakenInCategory",c,{label:o.label,left:l}),this.els.live?.classList.remove("on"),this.els.live?.offsetWidth,this.els.live?.classList.add("on"),this.liveTimer&&clearTimeout(this.liveTimer),this.liveTimer=setTimeout(()=>this.els.live?.classList.remove("on"),8e3);return}}evictTakenSelections(){let e=new Set([...this.controller.currentHold()?.labels??[],...this.holdingLabels]),t=this.controller.getSelection().filter(i=>!e.has(i.label)&&(this.controller.getStatus(i.id)??"free")!=="free");t.length&&(this.controller.deselect(t.map(i=>i.id)),this.toast((0,b.t)("picker.seatJustTakenByAnother",{label:t[0].label}),"error"))}syncTray(){if(!this.els.tray)return;this.updateSelectionCapacity();let e=this.committedSelection(),t=this.controller.getGAAreas(),i=this.hold?.items??[],s=[],n=new Set;if(!this.salesClosed){let m=this.performanceGroup?.nightSummary?.()??[];m.length&&s.push(lr(m,{title:this.tf("picker.group.yourSeatsByNight","Your seats by night"),empty:this.tf("picker.group.noSeatsChosenYet","No seats yet")}));let C=this.performanceGroup?.selectionModeSwitch;C&&s.push(`<button type="button" class="sl-pg-switch" data-pg-switch-mode>${F(C.label)}</button>`)}s.push(tr({salesClosed:this.salesClosed,hasPicks:e.length>0||i.length>0,hasGaAreas:t.length>0,groupMode:this.performanceGroup?this.performanceGroup.selectionMode??"same_seat":null,seated:!!this.controller.doc?.objects?.some(m=>m.type!=="gaArea"),whenText:this.eventWhenText?String(this.eventWhenText):void 0}));let o=!e.length&&!i.length&&!Ne(this.gaQty,this.hold?.items??[]);if(o&&(this.baReopen=!1),!this.performanceGroup&&!this.salesClosed&&!this.hold&&(o||this.baReopen||this.bestAvailableBusy||this.bestAvailableConfirm)){let m=(this.controller.doc?.categories??[]).filter(H=>!H.notForSale),C=this.controller.getBestAvailableZones();this.baZone&&!C.some(H=>H.id===this.baZone)&&(this.baZone=""),s.push(er({confirming:this.bestAvailableConfirm,busy:this.bestAvailableBusy,reopened:this.baReopen,quantity:this.baQty,premium:this.baPremium,offerPremium:this.controller.hasPremiumSeats(),categories:m,zones:C,selectedCategory:this.baCat,selectedZone:this.baZone}))}let a=(m,C,H,D=1,j,G)=>Qs({d:m?this.controller.seatDetails(m):null,area:H==="ga"?t.find(U=>U.id===j):void 0,label:C,objectType:H,quantity:D,identity:G,performanceLabel:this.performanceGroup?.activePerformanceLabel?.()}),l=Xs,c=F;for(let m of Gi(i)){let C=m.objectType==="ga"?`held:ga:${m.objectId}:${m.tierId??""}`:`held:${m.label}`;n.add(C);let H=this.controller.doc?.categories.find(le=>le.key===m.categoryKey),D=m.tierId?H?.tiers?.find(le=>le.id===m.tierId)?.name:void 0,j=m.objectType!=="ga"?this.controller.seatByLabel(m.label):null,G=m.objectType==="table"?this.controller.tableSelection(m.label):null,U=this.seatViewEnabled()&&!!j&&m.objectType!=="table",ge=`${H?.label??m.categoryKey}${D?` \xB7 ${D}`:""}`;s.push(`<div class="sl-chip sl-held${this.lastTrayKeys.has(C)?"":" sl-enter"}" data-key="${c(C)}" data-held="${c(encodeURIComponent(m.labels.join(`
|
|
1663
|
-
`)))}"${j?` data-locate="${c(j.id)}"`:""}><div class="sl-chip-main">`+a(j?.id??null,m.label,m.objectType,m.quantity??1,m.objectId,G??void 0)+`<div class="sl-chip-sub"><span class="sl-ticket-state held" aria-label="${c(this.tf("picker.heldForYou","Held for you"))}" title="${c(this.tf("picker.heldForYou","Held for you"))}"><svg viewBox="0 0 24 24"><rect x="5" y="10" width="14" height="10" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg></span><span class="cat">${c(ge)}</span>`+(G?.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${c(encodeURIComponent(m.label))}">${c((0,b.t)("picker.guestsCountEdit",{count:m.quantity??1}))}</button>`:"")+gi(j?.wheelchairSpaceType)+fi(j?.commercial)+(this.suppressPricing?"":`<span class="amt">${c(this.money(this.paidPrice(m.categoryKey,m.tierId,m.unitPrice,m.label)*(m.quantity??1)))}</span>`)+"</div></div>"+(this.performanceGroup?"":l((0,b.t)("picker.removeHeldTicketLabel",{label:qi(m,t)}),U?m.label:null))+"</div>")}let h=new Set(i.map(m=>m.label)),p=this.seatViewEnabled();for(let m of e.filter(C=>!h.has(C.label))){let C=`seat:${m.id}`;n.add(C);let H=this.controller.doc?.categories.find(U=>U.key===m.categoryKey),D=m.tiers&&m.tiers.length&&!this.suppressPricing?`<select class="tier" data-tier="${c(m.id)}" aria-label="${c((0,b.t)("picker.ticketTierFor",{label:m.label}))}">`+m.tiers.map(U=>`<option value="${c(U.id)}"${U.id===m.tierId?" selected":""}>${c(U.name)} \xB7 ${c(this.money(this.paidPrice(m.categoryKey,U.id,U.price,m.label)))}</option>`).join("")+"</select>":"",j=m.tiers?.find(U=>U.id===m.tierId)??m.tiers?.[0],G=j?.buyerMessage?.trim()||(j?.restriction==="companion"?this.tf("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):"");s.push(`<div class="sl-chip${this.lastTrayKeys.has(C)?"":" sl-enter"}" data-key="${c(C)}" data-seat="${c(m.id)}" data-locate="${c(m.id)}"><div class="sl-chip-main">`+a(m.id,m.label,m.objectType,m.quantity??1,m.objectId,m)+`<div class="sl-chip-sub"><span class="sl-ticket-state" aria-label="${c(this.tf("picker.selected","Selected"))}" title="${c(this.tf("picker.selected","Selected"))}"><svg viewBox="0 0 24 24"><path d="M5 12l4 4L19 6"/></svg></span><span class="cat">${c(H?.label??m.categoryKey)}</span>`+(m.objectType==="table"&&m.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${c(encodeURIComponent(m.label))}">${c((0,b.t)("picker.guestsCountEdit",{count:m.quantity??1}))}</button>`:"")+`${gi(m.wheelchairSpaceType)}${fi(m.commercial)}${D}`+(this.suppressPricing?"":`<span class="amt">${c(this.money(this.paidPrice(m.categoryKey,m.tierId??null,m.price,m.label)*(m.quantity??1)))}</span>`)+"</div>"+(G?`<small class="sl-tier-note">${F(G)}</small>`:"")+"</div>"+l((0,b.t)("picker.removeSeatLabel",{label:m.label}),p&&m.objectType!=="table"?m.label:null)+"</div>")}t.length&&s.push(Qi(this,t,i)),!this.performanceGroup&&!this.salesClosed&&!this.hold&&!o&&!this.baReopen&&!this.bestAvailableBusy&&!this.bestAvailableConfirm&&s.push(`<button type="button" class="sl-ba-reopen" data-ba-reopen><span aria-hidden="true">\u2726</span>${c(this.tf("picker.findTogetherInstead","Find seats together instead"))}</button>`),this.els.tray.innerHTML=s.join(""),this.lastTrayKeys=n,this.els.tray.querySelector("[data-pg-switch-mode]")?.addEventListener("click",()=>this.performanceGroup?.selectionModeSwitch?.activate());let d=this.performanceGroup?.selectNight;d&&fr(this.els.tray,m=>d(m)),this.els.tray.querySelectorAll("[data-ba]").forEach(m=>{m.addEventListener("click",()=>{this.baQty=Math.max(1,Math.min(this.maxTickets,this.baQty+Number(m.dataset.ba))),this.syncTray()})}),this.els.tray.querySelector("[data-ba-cat]")?.addEventListener("change",m=>{this.baCat=m.target.value}),this.els.tray.querySelector("[data-ba-zone]")?.addEventListener("change",m=>{this.baZone=m.target.value}),this.els.tray.querySelector("[data-ba-premium]")?.addEventListener("click",()=>{this.baPremium=!this.baPremium,this.syncTray()}),this.els.tray.querySelector(".sl-ba-go")?.addEventListener("click",()=>{if(this.pendingSelectionCount()>0){this.bestAvailableConfirm=!0,this.syncTray(),this.els.tray.querySelector("[data-ba-replace]")?.focus();return}this.bestAvailable(this.baQty,this.baCat||void 0,{preferPremium:this.baPremium,zoneId:this.baZone||void 0})}),this.els.tray.querySelector("[data-ba-cancel]")?.addEventListener("click",()=>{this.bestAvailableConfirm=!1,this.syncTray(),this.els.tray.querySelector(".sl-ba-go")?.focus()}),this.els.tray.querySelector("[data-ba-reopen]")?.addEventListener("click",()=>{this.baReopen=!0,this.syncTray(),this.els.tray.querySelector(".sl-ba-go")?.focus()}),this.els.tray.querySelector("[data-ba-close]")?.addEventListener("click",()=>{this.baReopen=!1,this.syncTray(),this.els.tray.querySelector("[data-ba-reopen]")?.focus()}),this.els.tray.querySelector("[data-ba-replace]")?.addEventListener("click",()=>{this.bestAvailableConfirm=!1,this.bestAvailable(this.baQty,this.baCat||void 0,{preferPremium:this.baPremium,zoneId:this.baZone||void 0})}),this.els.tray.querySelectorAll(".sl-chip .rm").forEach(m=>{m.addEventListener("click",()=>{let C=m.closest(".sl-chip");if(C.dataset.held){this.removeHeldLabels(decodeURIComponent(C.dataset.held).split(`
|
|
1664
|
-
`),C);return}let H=C.dataset.seat,D=this.controller.getSelection().find(G=>G.id===H)?.label??this.tf("picker.seat","Seat"),j=()=>{this.controller.deselect([H]),this.toast((0,b.t)("picker.labelRemoved",{label:D}),"neutral",{label:this.tf("picker.undo","Undo"),onClick:()=>{let G=this.controller.select([H]);this.toast(G.length?(0,b.t)("picker.labelRestored",{label:D}):(0,b.t)("picker.labelNoLongerAvailable",{label:D}),G.length?"success":"warning")}})};if(this.reducedMotion()){j();return}C.classList.add("sl-leave"),this.scheduleMotion(j,150)})}),this.els.tray.querySelectorAll("[data-table-edit]").forEach(m=>{m.addEventListener("click",C=>{C.stopPropagation();let H=decodeURIComponent(m.dataset.tableEdit??""),D=this.controller.tableSelection(H);if(!D)return;let j=i.find(G=>G.label===H&&G.objectType==="table");this.showTableDialog({...D,quantity:j?.quantity??D.quantity},!!j,m)})}),this.els.tray.querySelectorAll(".sl-chip .tier").forEach(m=>{m.addEventListener("change",()=>this.controller.setSeatTier(m.dataset.tier,m.value||null))}),this.els.tray.querySelectorAll(".sl-chip .view[data-view-label]").forEach(m=>{m.addEventListener("click",()=>{let C=this.controller.seatByLabel(m.dataset.viewLabel);C&&this.openSeatView(C)})}),this.els.tray.querySelectorAll(".sl-chip[data-locate]").forEach(m=>{let C=()=>this.controller.flashSeat(m.dataset.locate,this.cssVar("--sl-accent")||"#f4b740");m.addEventListener("mouseenter",C),m.addEventListener("focusin",C)}),Xi(this,this.els.tray,t),this.controller.setGASelection(Fi(this.gaQty)),this.salesClosed&&this.els.tray.querySelectorAll(".sl-ba-go,[data-ba],[data-ba-cat],[data-ba-zone],[data-ba-replace],.sl-ga button").forEach(m=>{m.disabled=!0});let u=Ni(this,t,this.hold?.items??[]),g=Ne(this.gaQty,this.hold?.items??[]),v=i.reduce((m,C)=>m+this.paidPrice(C.categoryKey,C.tierId,C.unitPrice,C.label)*(C.quantity??1),0),w=i.reduce((m,C)=>m+(C.quantity??1),0),y=e.filter(m=>!h.has(m.label)),R=y.reduce((m,C)=>m+this.paidPrice(C.categoryKey,C.tierId??null,C.price,C.label)*(C.quantity??1),0)+u+v,S=y.reduce((m,C)=>m+(C.quantity??1),0)+g+w,P=this.pendingSelectionCount(),_=this.lastTrayCount,k=this.lastTrayTotal,L=mr(this.performanceGroup?.groupSelectionSummary?.(),this.performanceGroup?.selectionMode??"same_seat");if(this.els.count.textContent=L||(S?(0,b.tCount)("picker.ticketsCount",S):this.tf("picker.noSeatsSelected","No seats selected")),this.els.total.textContent=S&&!this.suppressPricing?this.money(R):"",this.root?.setAttribute("data-has-selection",String(S>0)),this.root?.setAttribute("data-ba-active",String(this.bestAvailableConfirm||this.bestAvailableBusy||this.baReopen)),this.els.foot?.classList.toggle("empty",S===0),this.els.seatSummary&&(this.els.seatSummary.textContent=L||(S?(0,b.tCount)("picker.seatsSelectedCount",S):"")),this.syncCta(S,P),this.hold){this.holdCopyPending=P>0;let m=ir({secured:w||this.hold.seats?.length||0,pendingCount:P,expiresAt:this.holdExpiresAt,releasing:this.releasingHold});this.els.holdTitle&&(this.els.holdTitle.textContent=m.title),this.els.holdCopy&&(this.els.holdCopy.textContent=m.copy);let C=this.els.holdChange;C&&(C.disabled=this.releasingHold,C.textContent=m.change)}S!==_&&this.animateOnce(this.els.count,"sl-value-pop",380),R!==k&&this.animateOnce(this.els.total,"sl-value-pop",380),_===0&&S>0&&(this.animateOnce(this.els.cta,"sl-ready",520),this.sideCollapsed&&this.root?.dataset.layout!=="narrow"&&this.setPanelCollapsed(!1)),this.renderPeek(S,R,P),this.lastTrayCount=S,this.lastTrayTotal=R,this.opts.onSelectionChange?.(e),this.emitSelectionValidity(S,e)}emitSelectionValidity(e,t){let i=this.controller.getSelectionValidity(e);i&&(i.seats=t,this.opts.onSelectionValidityChange?.(i),i.isValid?this.lastSelectionValidity!==!0&&this.opts.onSelectionValid?.(t):this.lastSelectionValidity!==!1&&this.opts.onSelectionInvalid?.(i),this.lastSelectionValidity=i.isValid)}renderPeek(e,t,i){if(!this.els.peek)return;let s=(this.controller.doc?.categories??[]).map(n=>this.catPrice(n)).filter(n=>n!=null);this.els.peek.innerHTML=Js({count:e,total:t,pendingCount:i,ctaPhase:this.ctaPhase,hasHold:!!this.hold,salesClosed:this.salesClosed,fromPrice:s.length?Math.min(...s):null,addMore:Zs({salesClosed:this.salesClosed,hasHold:!!this.hold,ctaPhase:this.ctaPhase,formOpen:this.baReopen||this.bestAvailableBusy||this.bestAvailableConfirm,room:this.maxTickets-this.totalTicketCount(),wanted:this.baQty}),holdTime:this.hold&&this.holdTimer?ht(Math.max(0,this.holdExpiresAt-Date.now())):null,money:n=>this.money(n)}),this.root&&(this.root.dataset.peekClock=String(!!this.els.peek.querySelector(".sl-peek-time")))}async removeHeldLabels(e,t){let i=e.filter(o=>o&&!this.releasingLabels.has(o));if(!i.length)return!1;let s=i[0];i.forEach(o=>this.releasingLabels.add(o)),t?.setAttribute("aria-busy","true");let n=t?.querySelector(".rm");n&&(n.disabled=!0);try{let o=this.handedOff;if(!await this.controller.releaseLabels(i))return this.toast((0,b.t)("picker.couldNotRemoveLabel",{label:s}),"error"),!1;Ui(this.gaQty,this.hold?.items??[],i);let l=this.controller.currentHold();return this.hold=l?{holdId:l.holdId,expiresAt:l.expiresAt,seats:l.seats,items:l.items}:null,this.handedOff=!!this.hold&&o,this.bookedShown=!1,this.ctaPhase="idle",this.hold?this.startHoldTimer(this.hold.expiresAt):(this.stopHoldTimer(),this.forgetHold()),this.syncTray(),this.emitHoldChange(),this.toast((0,b.t)("picker.labelRemovedFromHold",{label:s}),"success"),!0}finally{i.forEach(o=>this.releasingLabels.delete(o)),t?.removeAttribute("aria-busy"),n?.isConnected&&(n.disabled=!1)}}async handleChangeSeats(){if(!this.hold||this.releasingHold)return;this.releasingHold=!0;let e=this.els.holdChange;e&&(e.disabled=!0,e.textContent=this.tf("picker.releasingEllipsis","Releasing\u2026"));try{await this.release(),this.hold||this.toast(this.tf("picker.heldTicketsReleased","Held tickets released. Choose your new seats."),"success")}finally{this.releasingHold=!1,e?.isConnected&&(e.disabled=!1,e.textContent=this.tf("picker.change","Change"))}}async handleCta(){if(this.salesClosed)return;let e=this.controller.getSelectionValidity(this.totalTicketCount());if(e&&!e.isValid){this.toast(ki(e,(i,s)=>this.tf(i,s)),"warning");return}if(this.totalTicketCount()>this.maxTickets){this.toast((0,b.t)("picker.removeTicketsUntilOrFewer",{count:this.maxTickets}),"warning");return}let t=this.committedSelection();if(this.hold&&!t.some(i=>!(this.hold.items??[]).some(s=>s.label===i.label))){let i=this.hold.seats??t;this.handedOff=!0,this.setCtaPhase("checkout"),this.checkoutHandoff(this.hold,i);return}this.holdingLabels=new Set(t.map(i=>i.label)),this.setCtaPhase("holding");try{let i=null,s=Vi(this.gaQty),n=this.committedSelection();if(n.length){let o=await this.controller.hold(void 0,this.opts.holdTtlMs);i=o?{holdId:o.holdId,expiresAt:o.expiresAt,seats:o.seats,items:o.items}:null}for(let{areaId:o,tierId:a,qty:l}of s){let c=await this.controller.holdGA(o,l,{tierId:a,ttlMs:this.opts.holdTtlMs});i=c?{holdId:c.holdId,expiresAt:c.expiresAt,seats:c.seats,items:c.items}:i}if(!i){this.toast(this.tf("picker.seatsJustTaken","One or more seats were just taken. Please pick again."),"error"),this.setCtaPhase("idle"),this.syncTray();return}this.hold=i,this.handedOff=!this.performanceGroup,this.startHoldTimer(i.expiresAt),this.flashHeldSeats(i),this.setCtaPhase(this.performanceGroup?"idle":"checkout"),this.emitHoldChange(),this.performanceGroup||this.checkoutHandoff(i,i.seats??n)}catch(i){this.opts.onError?.(i);let s=i,n=(s.conflicts??[]).map(a=>a.label).filter(Boolean).slice(0,3);s.reason==="event_closed"&&this.setSalesClosed(!0);let o=s.reason==="event_closed"?this.tf("picker.seatSalesClosedForEvent","Seat sales have closed for this event."):s.reason==="companion_pair_required"?this.tf("picker.companionPairRequired","Select the adjacent wheelchair place with each companion ticket."):s.reason==="ticket_option_not_applicable"?this.tf("picker.ticketOptionNotApplicable","That ticket choice is not available for the selected seat."):n.length?n.length===1?(0,b.t)("picker.labelsNoLongerAvailable.one",{labels:n.join(", ")}):(0,b.t)("picker.labelsNoLongerAvailable.other",{labels:n.join(", ")}):this.tf("picker.seatsJustTaken","One or more seats were just taken. Please pick again.");this.toast(o,"error"),this.setCtaPhase("idle")}finally{this.holdingLabels.clear(),this.ctaPhase==="holding"&&(this.ctaPhase="idle"),this.syncTray()}}startHoldTimer(e){this.stopHoldTimer(),this.holdExpiresAt=e,this.hold&&this.rememberHold(this.hold);let t=this.els.hold;t.innerHTML=`<span class="sl-hold-dot" aria-hidden="true"></span><span>${this.tf("picker.held","Held")}</span><span class="sl-hold-time" data-ref="holdTime"></span>`;let i=t.querySelector('[data-ref="holdTime"]');this.els.holdNote?.classList.add("on");let s=()=>{let n=Math.max(0,this.holdExpiresAt-Date.now());i&&(i.textContent=ht(n));let o=this.els.peek?.querySelector(".sl-peek-time");o&&(o.textContent=ht(n)),!this.holdCopyPending&&this.els.holdCopy&&(this.els.holdCopy.textContent=Si(this.holdExpiresAt)),t.classList.add("on"),t.classList.toggle("is-expiring",n>0&&n<=wr),this.setExtendPrompt(n>0&&n<=wr,n),n<=0&&this.stopHoldTimer()};s(),this.holdTimer=setInterval(s,500)}stopHoldTimer(){this.holdTimer&&clearInterval(this.holdTimer),this.holdTimer=null,this.els.hold?.classList.remove("on","is-expiring"),this.els.holdNote?.classList.remove("on"),this.root&&delete this.root.dataset.peekClock,this.setExtendPrompt(!1,0)}setExtendPrompt(e,t){if(this.extendEl)if(e&&this.controller.currentHold()&&!this.bookedShown){let i=Math.ceil(t/1e3),s=Math.floor(i/60),n=String(i%60).padStart(2,"0");this.els.extendTxt.innerHTML=(0,b.t)("picker.seatsHeldForNeedMoreTime",{time:`${s}:${n}`}),this.extendEl.classList.add("on")}else this.extendEl.classList.remove("on")}async handleExtend(){let e=this.els.extendBtn;e.disabled=!0;let t=e.textContent;e.textContent=this.tf("picker.addingEllipsis","Adding\u2026");try{let i=await this.controller.extendHold(this.opts.holdTtlMs);i?(this.hold={holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items},this.holdExpiresAt=i.expiresAt,this.extendEl?.classList.remove("on"),this.rememberHold(this.hold),this.emitHoldChange(),this.toast(this.tf("picker.moreTimeAdded","More time added \u2014 your seats are still held."),"success")):this.toast(this.tf("picker.couldNotAddMoreTime","Couldn't add more time \u2014 please head to checkout now."),"warning")}catch(i){this.opts.onError?.(i),this.toast(this.tf("picker.couldNotAddMoreTime","Couldn't add more time \u2014 please head to checkout now."),"warning")}finally{e.disabled=!1,e.textContent=t}}detectBooked(){this.bookedShown||!this.handedOff||!this.hold||this.controller.currentHold()===null&&this.showBooked()}showBooked(){if(this.bookedShown||!this.hold)return;this.bookedShown=!0;let e=this.buildHandoff(this.hold);this.stopHoldTimer(),this.forgetHold();let t=e.lineItems.reduce((s,n)=>s+n.quantity,0),i=this.performanceGroup?.groupSelectionSummary?.();this.els.bookedSub&&(this.els.bookedSub.innerHTML=i?.seats?`<span class="sl-booked-seats">${(0,b.tCount)("picker.group.ticketsConfirmedAcross",i.seats,{performances:i.performances})}</span>`:`<span class="sl-booked-seats">${(0,b.tCount)("picker.ticketsCount",t)}</span> ${this.tf("picker.confirmedAndOnWay","confirmed. A confirmation is on its way.")}`),this.bookedEl?.classList.add("on"),this.opts.onBooked?.(e)}notifyGroupSettled(e){e==="booked"?this.showBooked():this.dismissConfirm(),this.hold=null,this.handedOff=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.forgetHold(),this.syncTray(),this.syncCta()}checkoutHandoff(e,t){if(this.checkoutMode==="hosted"){this.startHostedCheckout(e,t);return}this.opts.onCheckout?.(e,t,this.buildHandoff(e))}async startHostedCheckout(e,t){let i=this.buildHandoff(e),s=null;try{s=await(this.paymentOptions??=this.pubApi.paymentOptions(this.opts.event))}catch(o){this.opts.onError?.(o)}if(this.destroyed)return;let n=s?.providers?.[0];if(!n){let o=ds(s?.reason),a=!!this.opts.onCheckoutUnavailable||!!this.opts.onCheckout;this.opts.onCheckoutUnavailable?.({reason:o,handoff:i}),this.opts.onCheckout?.(e,t,i),a||this.openCheckoutPanel({kind:"unavailable",reason:o,seatCount:i.lineItems.reduce((l,c)=>l+c.quantity,0)});return}await this.openCheckoutPanel({kind:"pay",provider:n,order:{holdId:i.holdId,expiresAt:i.expiresAt,currency:i.currency,total:i.total,labels:i.lineItems.map(o=>o.displayLabel??o.label)}})}async openCheckoutPanel(e){let t;try{({mountCheckout:t}=await cs())}catch(i){this.opts.onError?.(i),this.toast(this.tf("picker.checkoutCouldNotBeOpened","Checkout could not be opened. Your seats are still held \u2014 please try again."),"error"),this.setCtaPhase("idle");return}this.destroyed||!this.root||(this.closeCheckoutPanel(),this.checkoutPanel=t({root:this.root,state:e,eventKey:this.opts.event,formatMoney:i=>this.money(i),startSession:i=>this.pubApi.startCheckout(this.opts.event,{...i,...this.opts.returnUrl?{returnUrl:this.opts.returnUrl}:{}}),orderStatus:i=>this.pubApi.orderStatus(i),onCancel:()=>{this.checkoutPanel=null,this.hold||this.setCtaPhase("idle")},onConfirmed:i=>{this.opts.onOrderConfirmed?.(i),this.controller.refresh()},onError:i=>this.opts.onError?.(i)}))}closeCheckoutPanel(){this.checkoutPanel?.destroy(),this.checkoutPanel=null}buildHandoff(e){let i=(e.items??[]).map(o=>{let a=this.controller.lineItemDisplay(o);return{label:o.label,...a.displayLabel?{displayLabel:a.displayLabel}:{},...a.displayType?{displayType:a.displayType}:{},objectId:o.objectId,objectType:o.objectType,categoryKey:o.categoryKey,tierId:o.tierId,unitPrice:this.paidPrice(o.categoryKey,o.tierId,o.unitPrice,o.label),currency:o.currency??this.currency,quantity:o.quantity??1}}),s=i[0]?.currency??this.currency,n=i.reduce((o,a)=>o+a.unitPrice*a.quantity,0);return{holdId:e.holdId,expiresAt:e.expiresAt,currency:s,lineItems:i,total:n}}emitHoldChange(){let e=this.hold;this.scheduleOfferRefresh(!0),this.opts.onHoldChange?.(e,e?.seats??[],e?this.buildHandoff(e):null)}toast(e,t="neutral",i){let s=this.els.toast;if(!s)return;s.replaceChildren();let n=document.createElement("span");if(n.textContent=e,s.appendChild(n),s.classList.toggle("has-action",!!i),i){let o=document.createElement("button");o.type="button",o.className="sl-toast-action",o.textContent=i.label,o.addEventListener("click",i.onClick,{once:!0}),s.appendChild(o)}s.dataset.tone=t,s.classList.add("on"),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>{s.classList.remove("on"),s.classList.remove("has-action"),s.dataset.tone="neutral"},4200)}placeTooltip(){if(!this.tipEl)return;let e=br(this.tipPos,this.els.map.clientWidth,{width:this.tipEl.offsetWidth,height:this.tipEl.offsetHeight});this.tipEl.style.left=`${e.left}px`,this.tipEl.style.top=`${e.top}px`}nightStripFor(e,t){let i=this.performanceGroup,s=Yt(e.mark,i?.nights?.()),n=s?.states.filter(o=>o.free).length??0;return cr(s,{locale:this.opts.locale,switchLabel:i?.selectionModeSwitch?.label??null,selectPartialLabel:i?.partialSeatSelection?.label(n)??null,pinned:t})}unpinTooltip(){this.tipPinned&&(this.tipPinned=!1,this.tipEl?.classList.remove("sl-tip-pinned"),this.tipEl&&(this.tipEl.style.display="none"))}handleMapPointerDown(e){if(this.tipEl?.contains(e.target))return;this.lastMapPoint={x:e.clientX,y:e.clientY},this.lastPointerType=e.pointerType||"mouse";let t=this.els.map.getBoundingClientRect();this.tipPos={x:e.clientX-t.left,y:e.clientY-t.top},this.unpinTooltip()}updateTooltip(e){if(!this.tipEl)return;if(!e){this.tipPinned||(this.tipEl.style.display="none",this.tipMarkedHoverLabel=null);return}let t=e.mark?.kind==="partial"&&this.tipMarkedHoverLabel===e.label,i=e.mark?.kind==="partial"&&(this.lastPointerType!=="mouse"||t);this.tipMarkedHoverLabel=e.mark?.kind==="partial"?e.label:null;let s=this.nightStripFor(e,i);this.tipEl.style.setProperty("--sl-cat",e.categoryColor),this.tipEl.innerHTML=gr(e,{price:this.suppressPricing?"":this.money(this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label)),priceNote:this.suppressPricing?this.tf("picker.group.pricesPerPerformance","Prices shown per performance"):"",rowTypeWord:ut(e),extra:s+(i?`<button type="button" class="sl-tip-close" data-pg-tip-close aria-label="${F(this.tf("picker.group.closeSeatDetails","Close seat details"))}">\xD7</button>`:"")}),this.tipPinned=i,this.tipEl.classList.toggle("sl-tip-pinned",i),this.tipEl.querySelector("[data-pg-tip-close]")?.addEventListener("click",()=>this.unpinTooltip()),this.tipEl.querySelector("[data-pg-switch-mode]")?.addEventListener("click",()=>{this.unpinTooltip(),this.performanceGroup?.selectionModeSwitch?.activate()}),this.tipEl.querySelector("[data-pg-select-partial]")?.addEventListener("click",()=>{let o=Yt(e.mark,this.performanceGroup?.nights?.())?.states.filter(a=>a.free).map(a=>a.eventKey)??[];this.unpinTooltip(),this.performanceGroup?.partialSeatSelection?.activate(e.id,o)}),this.tipEl.style.display="block",this.placeTooltip()}syncSeatMarks(){let e=this.performanceGroup?.seatMarks,t=this.controller.getRenderer();if(!e||!t?.setSeatMarks)return;let i={};for(let[s,n]of Object.entries(e())){let o=this.controller.idForLabel(s);o&&(i[o]=n)}Object.keys(i).length&&t.setSeatMarks(i)}getSelection(){return this.committedSelection()}selectObjects(e){return this.controller.select(e)}deselectObjects(e){this.controller.deselect(e)}clearSelection(){this.dismissConfirm(),this.dismissTableDialog(),this.controller.clearSelection()}categoryLegendColor(){let e=(this.controller.doc?.categories??[]).find(t=>!t.notForSale);return(e?this.controller.getRenderer()?.categoryDisplayColor?.(e.key):null)||e?.color||"#2563eb"}async refreshAvailability(){await this.controller.refresh(),this.syncSeatMarks(),this.syncTray()}refreshPerformanceGroupComposition(){this.syncTray()}async adoptRestoredHold(e){!e||this.hold||await this.resumeHoldFromServer(e,!1)}selectCategories(e){return this.controller.selectCategories(e)}deselectCategories(e){this.controller.deselectCategories(e)}setSelectableObjects(e){this.controller.setSelectableObjects(e)}setMaxSelection(e){this.maxTickets=Math.max(this.exactTickets??1,Math.floor(e)),this.controller.setMaxSelection(this.maxTickets),this.updateSelectionCapacity(),this.syncTray()}getSelectionValidity(){let e=this.controller.getSelectionValidity(this.totalTicketCount());return e&&(e.seats=this.committedSelection()),e}setMapTheme(e){this.destroyed||(this.opts.theme={...this.opts.theme??{},map:e??void 0},this.controller.setMapTheme(e),this.applyMapChromeTokens())}applyMapChromeTokens(){let e=this.els.map?.parentElement;if(!e||!this.root)return;let t=dt(this.controller.doc?.theme,this.opts.theme),i=this.opts.theme?.map?.background??this.controller.doc?.theme?.background??void 0,s=Fs(t,i);for(let n of["--sl-bg","--sl-surface","--sl-text","--sl-muted","--sl-line","--sl-accent-text"])s?e.style.setProperty(n,s[n]):e.style.removeProperty(n)}setEventDetailsHidden(e){this.eventDetailsHidden=e,this.syncFullscreenButtons()}setPricing(e){let t=JSON.stringify(this.opts.pricing??null),i=JSON.stringify(e??null);t!==i&&(this.opts.pricing=e,!(this.destroyed||!this.els.prices)&&(this.els.pricesSec?.querySelector(".sl-price-select")?.remove(),this.buildPriceFilter(),this.syncPrices(),this.syncTray(),this.lastSection&&this.showSectionCard(this.lastSection)))}buildLanguageSwitcher(e){if(!e)return;let t=(this.opts.languages??[]).map(s=>(0,b.resolveLocale)(s)).filter((s,n,o)=>o.indexOf(s)===n);if(t.length<2)return;let i=document.createElement("select");i.className="sl-langsel",i.setAttribute("aria-label",this.tf("picker.preferredTicketType","Language"));for(let s of t){let n=document.createElement("option");n.value=s,n.textContent=b.LOCALE_NAMES[s]??s,n.selected=s===(0,b.getLocale)(),i.appendChild(n)}i.addEventListener("change",()=>{this.setLocale(i.value)}),this.langSel=i,e.appendChild(i)}async setLocale(e){let t=(0,b.getLocale)(),i=await(0,b.loadLocale)(e);if(this.opts.messages&&(0,b.setStringOverrides)(this.opts.messages),i===t)return i;let s=this.root;if(!s)return i;s.lang=i,s.dir=(0,b.localeDirection)(),Ns(s);try{this.syncTray()}catch{}try{this.syncPrices()}catch{}try{this.syncOffer()}catch{}try{this.syncRung()}catch{}try{this.syncFloors()}catch{}try{this.syncPanelToggle()}catch{}try{this.syncFullscreenButtons()}catch{}return this.controller.refreshMapCopy(),this.langSel&&this.langSel.value!==i&&(this.langSel.value=i),i}isColorblindSafe(){return this.cbSafe}setColorblindSafe(e){e!==this.cbSafe&&(this.cbSafe=e,this.cbEl?.setAttribute("aria-pressed",String(e)),this.controller.setColorblindSafe(e),this.syncPrices(),eo(e))}setViewMode(e){this.controller.setViewMode(this.normalizeInitialView(e)),this.syncProjection(),this.dismissConfirm()}getViewMode(){return this.controller.getViewMode()}normalizeInitialView(e){return e==="perspective"?(this.perspectiveWarned||(this.perspectiveWarned=!0,console.warn("[seatlayer] initialView:'perspective' (2.5D) is deprecated for the buyer picker and was coerced to 'flat'. Use the Map | 3D control for the immersive view.")),"flat"):e??"flat"}getBuyerView(){return this.buyerView}setBuyerView(e,t){if(e==="map"){this.exit3d();return}let i=t?.flyToSeatId;if(this.buyerView==="venue3d"){i?(this.opts.onBuyerViewChange?.({view:"venue3d",seatId:i}),this.view3dHandle?.flyToSeat(i)):t?.resetView&&this.view3dHandle?.focusOverview();return}this.enter3d(i)}seatState3dFor(e){switch(this.controller.getStatus(e.id)){case"held":return"held";case"booked":return"sold";case"not_for_sale":return"dimmed";default:break}return this.priceBandKeys!=null&&!this.priceBandKeys.has(e.categoryKey)||this.limitedViewFilter&&(e.commercial?.restrictedView||e.commercial?.obstructedView)?"dimmed":"available"}pushAvailabilityTo3d(){if(!this.view3dHandle)return;let e=this.allSeats().map(t=>({seatId:t.id,state:this.seatState3dFor(t)}));this.view3dHandle.setAvailability(e)}syncSelectionTo3d(){this.view3dHandle&&this.view3dHandle.setSelection(this.controller.getSelection().map(e=>e.id))}async seatViewFor3d(e){let t=this.allSeats().find(i=>i.id===e);if(!t)return null;if(t.viewUrl)try{let i=t.viewMeta?.previewUrl,s=!!i&&i!==t.viewUrl,n=s?await this.buyerAssetUrls.resolve(i):null,o=s?t.viewUrl:await this.buyerAssetUrls.resolve(t.viewUrl);return!o||s&&!n?null:{url:o,...n?{previewUrl:n}:{},...s?{resolveUrl:a=>this.buyerAssetUrls.resolve(a)}:{},...t.viewMeta?.sourceWidth!==void 0?{sourceWidth:t.viewMeta.sourceWidth}:{},...t.viewMeta?.sourceHeight!==void 0?{sourceHeight:t.viewMeta.sourceHeight}:{},...t.viewMeta?.previewWidth!==void 0?{previewWidth:t.viewMeta.previewWidth}:{},...t.viewMeta?.previewHeight!==void 0?{previewHeight:t.viewMeta.previewHeight}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.initialBearingDeg!==void 0?{initialBearingDeg:t.viewMeta.initialBearingDeg}:{},...t.viewMeta?.initialPitchDeg!==void 0?{initialPitchDeg:t.viewMeta.initialPitchDeg}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}}catch(i){return this.opts.onError?.(i),null}return{url:"",generated:!0,mediaKind:"model",coverage:"exact-seat",sourceLabel:this.tf("picker.chartDerivedModel","Chart-derived model")}}emitAnalytics(e,t){try{this.opts.onAnalytics?.(e,{...t,surface:"buyer"})}catch{}}emit3dAnalytics(e,t){this.emitAnalytics(e,t)}onView3dSeatPick(e){if(this.salesClosed){this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning"),this.syncSelectionTo3d();return}let t=this.allSeats().find(a=>a.id===e);if(!t)return;let i=this.controller.tableSelection(e);if(this.committedSelection().some(a=>i?a.label===i.label:a.id===e)){this.controller.deselect([e]),this.dismissConfirm(),this.syncSelectionTo3d();return}let n=this.controller.getStatus(t.id);if(n==="held"||n==="booked"||n==="not_for_sale"){this.showUnavailable3dSeat(t,this.seatState3dFor(t),n),this.syncSelectionTo3d();return}if(this.dismissUnavailable3dSeat(),!this.controller.select([e]).length){this.syncSelectionTo3d(),this.dismissConfirm();return}if(this.opts.onBuyerViewChange?.({view:"venue3d",seatId:e}),this.flashPickedSeat(e),i){this.showTableDialog(i,!1),this.syncSelectionTo3d();return}this.opts.confirmSelection!==!1?this.showConfirm(t):this.syncTray(),this.syncSelectionTo3d()}showUnavailable3dSeat(e,t,i){let s=this.view3dEl;if(!s)return;this.dismissUnavailable3dSeat();let n=this.controller.seatDetails(e.id),o=n?.displayLabel??e.displayLabel??e.label,a=n?.sectionLabel,l=ke(n),c=[a,l?(0,b.t)("picker.rowLabel",{label:l}):null,o].filter(Boolean).join(" \xB7 "),h=i==="held"?{title:this.tf("picker.temporarilyHeld","Temporarily held"),message:this.tf("picker.heldSeatExplanation","Another buyer is holding this seat. It may become available again.")}:i==="booked"?{title:this.tf("picker.sold","Sold"),message:this.tf("picker.soldSeatExplanation","This seat has already been booked.")}:{title:this.tf("picker.notForSale","Not for sale"),message:this.tf("picker.notForSaleExplanation","This seat is not included in the current sale.")},p=document.createElement("div");p.className="sl-view3d-unavailable",p.dataset.state=t,p.setAttribute("role","status"),p.setAttribute("aria-live","polite");let d=document.createElement("span");d.className="sl-view3d-unavailable-eyebrow",d.textContent=c||o;let u=document.createElement("strong");u.textContent=h.title;let g=document.createElement("div");g.className="sl-view3d-unavailable-copy",g.append(d,u);let v=document.createElement("button");v.type="button",v.setAttribute("aria-label",this.tf("picker.closeSeatStatus","Close seat status")),v.textContent="\xD7";let w=document.createElement("p");w.textContent=h.message,p.append(g,v,w),v.addEventListener("click",()=>p.remove()),s.appendChild(p),this.announceSeat(e)}dismissUnavailable3dSeat(){this.view3dEl?.querySelector(".sl-view3d-unavailable")?.remove()}saveView3dComparisonSeat(e){if(this.buyerView!=="venue3d")return;let t=this.view3dCompareSeatIds;t.includes(e.id)||(this.view3dCompareSeatIds=t.length===0?[e.id]:[t[0],e.id]),this.confirmSeat?.id===e.id&&(this.controller.deselect([e.id]),this.dismissConfirm(),this.syncSelectionTo3d(),this.syncTray()),this.view3dCompareChip.sync(),this.emit3dAnalytics("3d_comparison_saved",{seatId:e.id,count:this.view3dCompareSeatIds.length}),this.view3dCompareSeatIds.length>1?this.openView3dComparison():this.toast(this.tf("picker.chooseAnotherToCompare","Seat saved. Choose another seat to compare."),"success")}clearView3dComparison(){this.closeView3dComparison(!1),this.view3dCompareSeatIds=[],this.view3dCompareChip.remove(),this.emit3dAnalytics("3d_comparison_cleared")}view3dComparisonSnapshot(e){let t=this.allSeats().find(u=>u.id===e);if(!t)return null;let i=this.controller.seatDetails(t.id),s=this.controller.doc?.categories.find(u=>u.key===t.categoryKey),n=i?.price??(s?.tiers?.length?s.tiers[0].price:s?.price),o=n!=null?this.paidPrice(t.categoryKey,i?.tierId??s?.tiers?.[0]?.id??null,n,t.label):void 0,a=this.controller.getStatus(t.id),l=a==="held"?this.tf("picker.temporarilyHeld","Temporarily held"):a==="booked"?this.tf("picker.sold","Sold"):a==="not_for_sale"?this.tf("picker.notForSale","Not for sale"):this.tf("picker.available","Available"),c=t.viewUrl?(0,mt.seatViewDisclosure)({url:t.viewUrl,...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}):this.tf("picker.chartDerivedSeatEye","Live 3D \xB7 chart-derived seat-eye \xB7 not surveyed"),h=we(t.commercial)||this.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),p=i?.wheelchairSpaceType?`${Ke(i.wheelchairSpaceType)} \xB7 metadata, not access certification`:this.tf("picker.noAccessibilityMetadata","No accessibility metadata supplied"),d=(0,Cr.seatConfidenceDisclosure)(t.confidenceEvidence);return{seat:t,label:i?.displayLabel??t.displayLabel??t.label,section:i?.sectionLabel??t.sectionId??"\u2014",row:ke(i)??i?.rowLabel??"\u2014",category:i?.categoryLabel??s?.label??t.categoryKey,price:o==null?this.tf("picker.priceNotSupplied","Not supplied"):this.money(o),availability:l,selectable:a==null||a==="free",viewSource:c,limited:h,accessibility:p,confidence:d}}openSeatConfidencePassport(e,t=null){let i=this.view3dEl;if(!i)return;this.closeSeatConfidencePassport(!1);let s=e.confidenceEvidence,n=this.controller.seatDetails(e.id),o=document.createElement("div");o.className="sl-view3d-passport-shell",o.innerHTML=Hs({seat:e,title:n?.displayLabel??e.displayLabel??e.label,restrictionFallback:this.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),canReport:typeof this.api.reportViewEvidence=="function"});let a=[...new Set([...i.children,...[...this.els.map.children].filter(d=>d!==i)])].filter(d=>d instanceof HTMLElement),l=a.map(d=>({element:d,inert:d.inert,ariaHidden:d.getAttribute("aria-hidden")}));for(let d of a)d.inert=!0,d.setAttribute("aria-hidden","true");i.appendChild(o),i.classList.add("has-passport"),this.view3dPassportEl=o;let c=o.querySelector(".sl-view3d-passport"),h=()=>[...c.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],p=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),d.stopImmediatePropagation(),this.closeSeatConfidencePassport();return}if(d.key!=="Tab")return;let u=h();if(!u.length)return;let g=u[0],v=u[u.length-1];d.shiftKey&&document.activeElement===g?(d.preventDefault(),v.focus()):!d.shiftKey&&document.activeElement===v&&(d.preventDefault(),g.focus())};window.addEventListener("keydown",p,!0),this.view3dPassportCleanup=()=>{window.removeEventListener("keydown",p,!0);for(let v of l)v.element.inert=v.inert,v.ariaHidden===null?v.element.removeAttribute("aria-hidden"):v.element.setAttribute("aria-hidden",v.ariaHidden);let d=t?.isConnected?t:this.confirmEl?.querySelector(".sl-confirm-confidence")??this.view3dCompareEl?.querySelector("[data-passport-seat]")??null,u=d?.closest(".sl-confirm,.sl-view3d-compare");u?.isConnected&&(u.inert=!1,u.removeAttribute("aria-hidden")),o.remove(),i.classList.remove("has-passport"),this.view3dPassportEl===o&&(this.view3dPassportEl=null);let g=d??this.view3dCompareEl?.querySelector("[data-passport-seat]")??this.confirmEl?.querySelector(".sl-confirm-confidence")??this.view3dCompareChip.mainButton();(t?.isConnected?t:g)?.focus()},o.addEventListener("click",d=>{let u=Rs(d.target instanceof HTMLElement?d.target:null);u==="close"&&this.closeSeatConfidencePassport(),u==="report"&&this.reportSeatConfidenceView(e)}),requestAnimationFrame(()=>h()[0]?.focus()),this.emit3dAnalytics("3d_confidence_passport_opened",{seatId:e.id,evidenceId:s?.evidenceId??null,eventConfigurationId:s?.eventConfigurationId??null,modelLevel:s?.modelLevel??"unverified",realityLevel:s?.realityLevel??"none"})}async reportSeatConfidenceView(e){if(this.api.reportViewEvidence){jt(this.view3dPassportEl,"sending");try{let t=await this.api.reportViewEvidence(this.opts.event,{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId});this.emit3dAnalytics("3d_confidence_view_reported",{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId??null}),jt(this.view3dPassportEl,"received",t.report.id)}catch{jt(this.view3dPassportEl,"failed")}}}closeSeatConfidencePassport(e=!0){let t=this.view3dPassportCleanup;if(this.view3dPassportCleanup=null,!t){this.view3dPassportEl?.remove(),this.view3dPassportEl=null,this.view3dEl?.classList.remove("has-passport");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||this.root?.focus({preventScroll:!0})}openView3dComparison(){let e=this.view3dEl;if(!e||this.view3dCompareSeatIds.length<2)return;this.closeView3dComparison(!1);let t=this.view3dCompareSeatIds.map(d=>this.view3dComparisonSnapshot(d)).filter(d=>!!d);if(t.length<2){this.clearView3dComparison();return}let i=d=>E(d),s=document.createElement("div");s.className="sl-view3d-compare-shell";let n=t.map((d,u)=>`<article><span>Seat ${u===0?"A":"B"}</span><strong>${i(d.label)}</strong><small>Section ${i(d.section)} \xB7 Row ${i(d.row)}</small><dl><div><dt>Current price</dt><dd>${i(d.price)}</dd></div><div><dt>Ticket type</dt><dd>${i(d.category)}</dd></div><div><dt>Availability</dt><dd>${i(d.availability)}</dd></div><div><dt>View source</dt><dd>${i(d.viewSource)}</dd></div><div><dt>View restriction</dt><dd>${i(d.limited)}</dd></div><div><dt>Seat confidence</dt><dd>${i(d.confidence.headline)}</dd></div><div><dt>Reality check</dt><dd>${i(d.confidence.reality)}</dd></div><div><dt>Accessibility</dt><dd>${i(d.accessibility)}</dd></div></dl><div class="sl-view3d-compare-actions"><button type="button" data-passport-seat="${i(d.seat.id)}">Passport</button><button type="button" data-view-seat="${i(d.seat.id)}">View seat</button><button type="button" class="select" data-select-seat="${i(d.seat.id)}"${d.selectable?"":" disabled"}>Select seat</button></div></article>`).join("");s.innerHTML=`<div class="sl-view3d-compare-scrim" aria-hidden="true"></div><section class="sl-view3d-compare" role="dialog" aria-modal="true" aria-labelledby="sl-view3d-compare-title"><header><div><span>Seat inspection</span><strong id="sl-view3d-compare-title">Compare disclosed attributes</strong></div><button type="button" data-close aria-label="Close seat comparison">\xD7</button></header><p class="sl-view3d-compare-note">Current price and availability come from this picker. Modeled views are chart-derived unless organizer media is labeled; SeatLayer does not invent why a seat has its price.</p><div class="sl-view3d-compare-grid">${n}</div></section>`;let o=document.activeElement instanceof HTMLElement?document.activeElement:null,a=[...e.children].filter(d=>d instanceof HTMLElement),l=a.map(d=>({element:d,inert:d.inert,ariaHidden:d.getAttribute("aria-hidden")}));for(let d of a)d.inert=!0,d.setAttribute("aria-hidden","true");e.appendChild(s),e.classList.add("has-comparison"),this.view3dCompareEl=s;let c=s.querySelector(".sl-view3d-compare"),h=()=>[...c.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],p=d=>{if(d.key==="Escape"){d.preventDefault(),this.closeView3dComparison();return}if(d.key!=="Tab")return;let u=h();if(!u.length)return;let g=u[0],v=u[u.length-1];d.shiftKey&&document.activeElement===g?(d.preventDefault(),v.focus()):!d.shiftKey&&document.activeElement===v&&(d.preventDefault(),g.focus())};window.addEventListener("keydown",p),this.view3dCompareCleanup=()=>{window.removeEventListener("keydown",p);for(let d of l)d.element.inert=d.inert,d.ariaHidden===null?d.element.removeAttribute("aria-hidden"):d.element.setAttribute("aria-hidden",d.ariaHidden);s.remove(),e.classList.remove("has-comparison"),this.view3dCompareEl===s&&(this.view3dCompareEl=null),o?.isConnected?o.focus():this.view3dCompareChip.mainButton()?.focus()},s.querySelector("[data-close]")?.addEventListener("click",()=>this.closeView3dComparison()),s.querySelectorAll("[data-passport-seat]").forEach(d=>d.addEventListener("click",()=>{let u=d.dataset.passportSeat,g=u?this.allSeats().find(v=>v.id===u):void 0;g&&this.openSeatConfidencePassport(g,d)})),s.querySelectorAll("[data-view-seat]").forEach(d=>d.addEventListener("click",()=>{let u=d.dataset.viewSeat;this.closeView3dComparison(!1),u&&this.view3dHandle?.flyToSeat(u)})),s.querySelectorAll("[data-select-seat]").forEach(d=>d.addEventListener("click",()=>{let u=d.dataset.selectSeat;u&&this.selectComparedSeat(u)})),requestAnimationFrame(()=>h()[0]?.focus()),this.emit3dAnalytics("3d_comparison_opened",{seatIds:this.view3dCompareSeatIds.slice()})}closeView3dComparison(e=!0){let t=this.view3dCompareCleanup;if(this.view3dCompareCleanup=null,!t){this.view3dCompareEl?.remove(),this.view3dCompareEl=null,this.view3dEl?.classList.remove("has-comparison");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||this.root?.focus({preventScroll:!0})}selectComparedSeat(e){if(this.salesClosed){this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let t=this.allSeats().find(s=>s.id===e);if(!t)return;if(this.closeView3dComparison(!1),!this.controller.select([e]).length){this.syncSelectionTo3d(),this.toast(this.tf("picker.seatNoLongerAvailable","That seat is no longer available."),"warning");return}this.syncSelectionTo3d(),this.showConfirm(t),this.emit3dAnalytics("3d_comparison_selected",{seatId:e})}async enter3d(e){if(this.view3dEl||!this.canOffer3d()||!this.els.map)return;let t=this.controller.doc;if(!t)return;this.buyerView="venue3d",this.view3dTargetSeatId=null,this.opts.onBuyerViewChange?.({view:"venue3d",...e?{seatId:e}:{}}),this.root?.setAttribute("data-view3d","on"),this.dismissConfirm(),this.syncProjection();let i=document.createElement("div");i.className="sl-view3d",i.setAttribute("role","group"),i.setAttribute("aria-label",this.tf("picker.interactive3dVenueView","Interactive 3D venue view"));let s=document.createElement("button");s.type="button",s.className="sl-view3d-back",s.innerHTML=`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg><span>${this.tf("picker.backToMap","Back to map")}</span>`;let n=s.querySelector("span"),o=h=>{this.view3dTargetSeatId=h;let p=!!h;i.classList.toggle("is-seat-focused",p);let d=p?this.tf("picker.backToVenue","Back to venue"):this.tf("picker.backToMap","Back to map");n&&(n.textContent=d),s.setAttribute("aria-label",d)};s.addEventListener("click",()=>{if(this.view3dTargetSeatId&&this.view3dHandle){this.view3dHandle.focusOverview();return}this.exit3d()}),i.appendChild(s);let a=document.createElement("button");a.type="button",a.className="sl-view3d-fs",a.textContent="\u26F6",a.setAttribute("aria-label",this.tf("picker.fullScreen","Full screen")),a.setAttribute("aria-pressed",String(!!document.fullscreenElement||this.fsFallback||this.framedFs)),a.addEventListener("click",()=>this.toggleFullscreen()),i.appendChild(a);let l=document.createElement("div");l.className="sl-view3d-loading",l.setAttribute("role","status"),l.setAttribute("aria-live","polite"),l.textContent=this.tf("picker.loading3d","Building the 3D venue\u2026"),i.appendChild(l),this.els.map.appendChild(i),this.view3dEl=i,this.view3dCompareChip.sync(),requestAnimationFrame(()=>{i.style.opacity="1"});let c=++this.view3dGen;try{let h=(0,b.expandChart)(t),[p,d]=await Promise.all([Rt(),this.controller.loadEventConfiguration()]),u=d?await _t(d,S=>this.buyerAssetUrls.resolve(S)):null,g=t.theme?.venue3d?.shellAssetUrl,v=await Bt(g,S=>this.buyerAssetUrls.resolve(S));if(c!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;let w={doc:t,seats:h,...u?{eventConfigurationId:u.id,eventConfiguration:u}:{},...v?{registeredShellGlb:v}:{}},y=await p.prepareVenue3D(w);if(c!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;let R=p.mountVenue3D(i,{...w,prepared:y},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,seatViewActionLabel:S=>this.allSeats().find(P=>P.id===S)?.viewUrl?this.tf("picker.openAuthored360","Open venue 360\xB0"):this.tf("picker.lookAroundLive3d","Look around in live 3D"),onSeatPick:S=>this.onView3dSeatPick(S),onSeatInspect:S=>this.onView3dSeatPick(S),onSectionFocusChange:S=>{let P=i.querySelector('select[data-locator="section"]'),_=S??"";!P||P.value===_||(P.value=_,P.dispatchEvent(new Event("change")))},onViewTargetChange:S=>{i.querySelector(".sl-view3d-nav")?.classList.toggle("is-seat-focused",!!S),o(S),this.opts.onBuyerViewChange?.({view:"venue3d",...S?{seatId:S}:{}})},...this.seatViewEnabled()?{getSeatView:S=>new Promise((P,_)=>{let k=()=>{this.seatViewFor3d(S).then(m=>{m?P(m):_(new Error("seat_view_unavailable"))})},L=globalThis.requestIdleCallback;typeof L=="function"?L(k,{timeout:1500}):setTimeout(k,50)})}:{},onAnalytics:(S,P)=>this.emit3dAnalytics(S,P)});this.view3dHandle=R,l.remove(),this.pushAvailabilityTo3d(),this.syncSelectionTo3d(),Ws(i,R),e&&R.flyToSeat(e)}catch(h){if(c!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;this.opts.onError?.(h),this.toast(this.tf("picker.unavailable3d","3D could not start. The seat map is still available."),"warning"),this.exit3d()}}exit3d(){if(this.buyerView!=="venue3d"&&!this.view3dEl)return;this.view3dGen++,this.buyerView="map",this.view3dTargetSeatId=null,this.opts.onBuyerViewChange?.({view:"map"}),this.root?.removeAttribute("data-view3d"),this.closeSeatConfidencePassport(!1),this.closeView3dComparison(!1),this.view3dCompareChip.remove();try{this.view3dHandle?.dispose()}catch{}this.view3dHandle=null;let e=this.view3dEl;this.view3dEl=null,e&&(e.style.opacity="0",setTimeout(()=>e.remove(),320)),this.syncProjection();let t=this.view3dReturnSeat;this.view3dReturnSeat=null,t&&this.committedSelection().some(i=>i.id===t.id)&&this.opts.confirmSelection!==!1&&this.showConfirm(t)}getCurrentHold(){return this.hold}async resumeHold(e){return this.resumeHoldFromServer(e,!1)}async removeHeldTicket(e){return this.removeHeldLabels([e])}async bestAvailable(e,t,i={}){if(this.salesClosed||this.bestAvailableBusy)return null;e=Math.max(1,Math.min(this.maxTickets,Math.floor(e))),this.confirmSeat&&this.cancelConfirm(),this.bestAvailableConfirm=!1,this.bestAvailableBusy=!0;let s=this.els.tray?.querySelector(".sl-ba-go");s&&(s.disabled=!0,s.classList.add("sl-busy"),s.innerHTML=`<span class="sl-ba-spin" aria-hidden="true"></span>${this.tf("picker.findingEllipsis","Finding\u2026")}`);try{let n=await this.controller.bestAvailable(e,t,{...i,ttlMs:this.opts.holdTtlMs});return n?(this.hold={holdId:n.holdId,expiresAt:n.expiresAt,seats:n.seats,items:n.items},this.handedOff=!1,this.bookedShown=!1,this.gaQty.clear(),this.startHoldTimer(n.expiresAt),this.flashHeldSeats(this.hold),this.syncTray(),this.emitHoldChange(),i.preferPremium&&n.seats.length&&!n.seats.every(o=>o.commercial?.premium)&&this.toast((0,b.t)("picker.premiumFallbackNote",{count:e}),"neutral"),this.hold):null}catch(n){this.opts.onError?.(n);let o=n?.reason,a=o==="not_enough_together"?(0,b.t)("picker.couldNotFindSeatsTogether",{count:e}):o==="companion_pair_required"?this.tf("picker.companionPairRequired","Select the adjacent wheelchair place with each companion ticket."):o==="ticket_option_not_applicable"?this.tf("picker.ticketOptionNotApplicable","That ticket choice is not available for the selected seat."):o==="sold_out"?this.tf("picker.ticketTypeSoldOut","That ticket type is sold out. Try another ticket type."):o==="event_closed"?this.tf("picker.seatSalesClosedForEvent","Seat sales have closed for this event."):this.tf("picker.seatsNoLongerAvailableTryAnother","Those seats are no longer available. Try another quantity or ticket type.");return this.toast(a,"error"),null}finally{this.bestAvailableBusy=!1,this.syncTray()}}async release(){let e=this.hold,t=this.controller.currentHold(),i=!0;if(t)i=await this.controller.release();else if(e){let s=[...new Set([...(e.items??[]).map(n=>n.label),...(e.seats??[]).map(n=>n.label)])];if(s.length)try{await this.api.release(this.opts.event,s,e.holdId)}catch(n){this.opts.onError?.(n),i=!1}}if(!i){this.toast(this.tf("picker.couldNotReleaseTickets","Couldn't release your tickets. Your hold is unchanged."),"error");return}this.hold=null,this.forgetHold(),this.handedOff=!1,this.bookedShown=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.gaQty.clear(),this.syncTray(),this.emitHoldChange()}startRealtime(){if(!this.access?.configured||!this.pubApi||this.realtime)return;let e=this.opts.event;this.realtime=new oe({url:this.pubApi.subscribeUrl(e),mintTicket:()=>this.pubApi.subscribeTicket(e),onAccessUnavailable:t=>{this.opts.onAccessUnavailable?.(t),this.showAccessPanel(t)},sink:Be(this.controller,{flashOnLiveChange:!0,onStatusChange:()=>{this.syncPrices(),this.scheduleOfferRefresh(!0),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()},onSelectedObjectUnavailable:(t,i)=>{this.opts.onSelectedObjectUnavailable?.({labels:t,reason:i}),this.syncTray(),this.toast(i==="ineligible"?this.tf("picker.seatNoLongerYours","Some seats are no longer available to you. They have been removed from your order."):this.tf("picker.seatTaken","Someone else took a seat you had picked. It has been removed from your order."),"warning")}})}),this.realtime.start()}async refreshAccess(){return!this.access?.configured||!await this.access.refresh("manual")?!1:(this.dismissAccessPanel(),await this.controller.refresh(),this.realtime?this.realtime.restart():this.startRealtime(),!0)}showAccessPanel(e){if(this.destroyed||!this.root)return;this.dismissAccessPanel();let t=Ms(e.reason,()=>{this.refreshAccess()});(this.regions?.["bottom-center"]??this.root).appendChild(t),this.accessEl=t}dismissAccessPanel(){this.accessEl?.remove(),this.accessEl=null}destroy(){this.destroyed=!0,this.realtime?.stop(),this.realtime=null,this.dismissAccessPanel(),this.access?.clear(),this.hold&&!this.handedOff&&this.controller.release(),this.closeConfirm(),this.dismissTableDialog(!1),de(this,!1),this.closeSeatView(),this.closeCheckoutPanel(),this.exit3d(),this.buyerAssetUrls.dispose(),this.stopHoldTimer(),this.toastTimer&&clearTimeout(this.toastTimer),this.liveTimer&&clearTimeout(this.liveTimer),this.offerRefreshTimer&&clearTimeout(this.offerRefreshTimer),this.offerBoundaryTimer&&clearTimeout(this.offerBoundaryTimer),this.offerRefreshTimer=null,this.offerBoundaryTimer=null,this.offerVisibilityHandler&&(document.removeEventListener("visibilitychange",this.offerVisibilityHandler),this.offerVisibilityHandler=null);for(let e of this.motionTimers)clearTimeout(e);this.motionTimers.clear(),this.ro?.disconnect(),this.ro=null,this.framedFs&&this.setFramedFs(!1),this.escHandler&&document.removeEventListener("keydown",this.escHandler),this.fsChangeHandler&&document.removeEventListener("fullscreenchange",this.fsChangeHandler),this.fsEscHandler&&window.removeEventListener("keydown",this.fsEscHandler),this.controller.destroy(),this.projectionEl=null,this.root?.remove(),this.root=null,this.modalScrim&&(this.modalScrim.remove(),this.modalScrim=null,this.prevFocus?.isConnected&&this.prevFocus.focus({preventScroll:!0}),this.prevFocus=null)}};var Ce=require("@seatlayer/core");var to="https://api.seatlayer.io",io=6e4,so=2e3,ro=1e3,no=36e5,oo=5e3,ao=5e3,lo=15e3,co=12e4,po=new Set(["preparing","commit_pending","abort_pending","expire_pending"]),K=class extends Error{constructor(){super("performance_group_destroyed"),this.name="PerformanceGroupDestroyedError"}};function ho(r){return new Promise(e=>setTimeout(e,r))}function Ti(r){let e=Number(r.headers.get("Retry-After")??"1");return Number.isFinite(e)?Math.max(50,Math.min(oo,e*1e3)):1e3}function Xe(r,e){return`/pub/performance-groups/${encodeURIComponent(r)}/operations/${encodeURIComponent(e)}`}function Ze(r){return r.replace(/^pghop_/,"").replace(/-/g,"").slice(-8).toUpperCase()}var Pi=class{constructor(e,t,i){this.api=e;this.sink=t;this.intervalMs=i;this.stopped=!0;this.timer=null;this.prior=new Map}start(){this.stopped&&(this.stopped=!1,this.tick())}stop(){this.stopped=!0,this.timer&&clearTimeout(this.timer),this.timer=null}async tick(){try{let e=await this.api.objects(this.api.groupKey);if(this.stopped)return;let t=new Map(Object.entries(e.seats)),s=[...new Set([...this.prior.keys(),...t.keys()])].filter(n=>this.prior.get(n)!==t.get(n)).map(n=>({label:n,status:t.get(n)??"blocked"}));this.prior=t,s.length&&this.sink.applyStatuses(s),this.sink.onSections?.(e.hidden??[],e.closed??[])}catch(e){if(e instanceof K){this.stop();return}this.stopped||await this.sink.resync()}finally{this.stopped||(this.timer=setTimeout(()=>{this.tick()},this.intervalMs))}}},Qt=class{constructor(e,t){this.descriptorCache=null;this.chartRequest=null;this.objectsCache=null;this.activePerformanceKey=null;this.includedEventKeys=new Set;this.reuseObjectsCacheOnce=!1;this.selectionsByEvent=new Map;this.allocationsByHold=new Map;this.pendingOperationId=null;this.operationByHold=new Map;this.knownRevision=null;this.destroyed=!1;this.aborter=new AbortController;this.adoptFailure=null;this.settleTimer=null;this.settleOperationId=null;this.settleStartedAt=0;this.settleState=null;this.settleVisibility=null;this.lastRecovery={kind:"idle"};if(!e)throw new Error("seatlayer: `performanceGroup` key is required");this.groupKey=e,this.base=(t.apiBase??to).replace(/\/+$/,""),this.access=t.access,this.fetcher=t.fetch??globalThis.fetch.bind(globalThis),this.recoveryTimeoutMs=t.recoveryTimeoutMs??io,this.realtimePollMs=Math.max(500,t.realtimePollMs??so),this.selectionMode=t.selectionMode??"same_seat",this.partySize=t.partySize??null,this.onOperationState=t.onOperationState,this.onRecoveryState=t.onRecoveryState,this.onAvailability=t.onAvailability,this.access.onRenewed(s=>this.adoptSession(s));let i=this.readOperationRecord();i&&this.storedIsUndecided(i)&&(this.pendingOperationId=i.operationId)}get pendingOperation(){return this.pendingOperationId}get holdBlocked(){return!!this.adoptFailure||!!this.pendingOperationId&&this.lastRecovery.kind!=="idle"}async descriptor(){let e=await this.json(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/descriptor`);return this.descriptorCache=e.performanceGroup,this.includedEventKeys.size||(this.includedEventKeys=new Set(e.performanceGroup.performances.map(t=>t.eventKey))),e.performanceGroup.revision&&(this.knownRevision=e.performanceGroup.revision),this.activePerformanceKey??=e.performanceGroup.performances[0]?.eventKey??null,e.performanceGroup}async chart(e){this.chartRequest??=this.json(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/chart`).catch(s=>{throw this.chartRequest=null,s});let[t,i]=await Promise.all([this.descriptorCache?Promise.resolve(this.descriptorCache):this.descriptor(),this.chartRequest]);return{doc:i,event:{key:t.key,name:t.name,salesClosed:t.state!=="active",venue:t.venue,startsAt:t.performances[0]?.startsAt??null,timezone:t.timezone,currency:t.currency,mode:t.mode,inventoryModelVersion:2}}}asset(e,t){return/^[a-zA-Z0-9._-]+$/.test(t)?this.blob(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/assets/${encodeURIComponent(t)}`):Promise.reject(new V(404,"not_found","not_found"))}async objects(e){let t=this.descriptorCache?.inclusionMode==="flexible_dates",i=`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/objects`+(this.selectionMode==="per_performance"||t?"?view=per-performance":"");if(this.reuseObjectsCacheOnce&&this.objectsCache)this.reuseObjectsCacheOnce=!1;else{let o=await this.authorized(i,this.objectsCache?.revision?{headers:{"If-None-Match":`"${this.objectsCache.revision}"`}}:{});if(o.status!==304){if(!o.ok)return this.throwResponse(o);this.objectsCache=await this.responseJson(o)}}if(!this.objectsCache)throw new V(502,"group_projection_unavailable","group_projection_unavailable");if(this.selectionMode==="same_seat"&&!t){let o=this.objectsCache;return this.noteAvailability(o,o.salesClosed,o),o}let s=this.objectsCache;if(this.selectionMode==="same_seat"){let o=s.performances.filter(p=>this.includedEventKeys.has(p.eventKey));if(!o.length)throw new V(409,"group_selection_incomplete","group_selection_incomplete");let a=Object.keys(o[0]?.seats??{}),l=Object.fromEntries(a.map(p=>[p,o.every(d=>d.seats[p]==="free")?"free":"blocked"])),c=Object.fromEntries(a.flatMap(p=>{let d=o.filter(u=>u.seats[p]!=="free").map(u=>u.eventKey);return d.length>0&&d.length<o.length?[[p,d]]:[]})),h={seats:l,partial:c,hidden:[...new Set(o.flatMap(p=>p.hidden??[]))],closed:[...new Set(o.flatMap(p=>p.closed??[]))],revision:s.revision,state:s.state,salesClosed:o.some(p=>p.salesClosed)};return this.noteAvailability(s,h.salesClosed,h),h}let n=s.performances.find(o=>o.eventKey===this.activePerformanceKey);if(!n)throw new V(409,"group_performance_unavailable","group_performance_unavailable");return this.noteAvailability(s,s.salesClosed||s.performances.some(o=>o.salesClosed),n),n}setSelectionMode(e,t){if(this.pendingOperationId||this.holdBlocked)throw new V(409,"group_operation_pending","group_operation_pending");e!==this.selectionMode&&(this.selectionMode=e,t!=null&&(this.partySize=t),this.objectsCache=null,this.selectionsByEvent.clear(),this.activePerformanceKey=this.descriptorCache?.performances[0]?.eventKey??this.activePerformanceKey)}setActivePerformance(e){if(this.descriptorCache&&!this.descriptorCache.performances.some(t=>t.eventKey===e))throw new V(404,"group_performance_not_found","group_performance_not_found");this.activePerformanceKey=e}setIncludedEventKeys(e){let t=new Set(this.descriptorCache?.performances.map(i=>i.eventKey)??[]);if(!e.length||new Set(e).size!==e.length||e.some(i=>!t.has(i)))throw new V(422,"invalid_event_keys","invalid_event_keys");this.includedEventKeys=new Set(e),this.reuseObjectsCacheOnce=!!this.objectsCache}includedPerformanceKeys(){return(this.descriptorCache?.performances??[]).map(e=>e.eventKey).filter(e=>this.includedEventKeys.has(e))}setPerformanceSelections(e,t){this.selectionsByEvent.set(e,t.map(i=>({...i})))}allocationsForHold(e){return(this.allocationsByHold.get(e)??[]).map(t=>({eventKey:t.eventKey,items:t.items.map(i=>({...i}))}))}async hold(e,t,i,s){if(this.assertUsable(),s)throw new V(409,"group_hold_replace_unsupported","group_hold_replace_unsupported");let n=t.map(c=>c.label),o={labels:n};if(this.descriptorCache?.inclusionMode==="flexible_dates"&&(o.eventKeys=this.includedPerformanceKeys()),this.selectionMode==="per_performance"){if(!this.activePerformanceKey||!this.descriptorCache||!this.partySize)throw new V(409,"group_selection_incomplete","group_selection_incomplete");this.setPerformanceSelections(this.activePerformanceKey,t);let c=this.descriptorCache.performances.filter(h=>this.includedEventKeys.has(h.eventKey)).map(h=>({eventKey:h.eventKey,selections:this.selectionsByEvent.get(h.eventKey)??[]}));if(c.some(h=>h.selections.length!==this.partySize))throw new V(409,"group_selection_incomplete","group_selection_incomplete");o={selectionMode:"per_performance",allocations:c,...this.descriptorCache.inclusionMode==="flexible_dates"?{eventKeys:this.includedPerformanceKeys()}:{}}}let a=this.pendingOperationId??`pghop_${crypto.randomUUID()}`;this.beginOperation(a),this.onOperationState?.({operationId:a,state:"preparing",decision:null});let l;try{l=await this.authorized(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/hold`,{method:"POST",body:JSON.stringify({operationId:a,...o,...i?{ttlMs:i}:{}})})}catch(c){if(c instanceof K)throw c;if(c instanceof ie)throw this.failOperation(a),c;return this.recover(a,n,Date.now()+this.recoveryTimeoutMs)}if(l.status===201||l.status===202||l.status===504){let c=await this.responseJson(l);return this.emit(c.operation),l.status===201?this.complete(c.operation):this.recover(a,n,Date.now()+this.recoveryTimeoutMs,Ti(l))}if(l.status===503){let c=await l.clone().json().catch(()=>null);if((c?.code??c?.error)==="performance_group_abort_pending"){let h=c?.operation?.operationId??a;return this.beginOperation(h),c?.operation&&this.emit(c.operation),this.recover(h,n,Date.now()+this.recoveryTimeoutMs,Ti(l))}}try{return await this.throwResponse(l,n)}catch(c){throw this.failOperation(a),c}}async release(e,t,i){this.assertUsable();let s=this.operationForHold(i),n=await this.json(`${Xe(this.groupKey,s)}/release`,{method:"POST",body:"{}"});return this.operationByHold.delete(i),this.allocationsByHold.delete(i),this.clearOperationRecord(),n}async resume(e,t){this.assertUsable();let i=this.operationForHold(t),s=await this.json(Xe(this.groupKey,i));return this.complete(s.operation)}async extend(e,t,i=12e4){this.assertUsable();let s=this.operationForHold(t),n=Math.max(ro,Math.min(no,Math.round(i))),o=await this.json(`${Xe(this.groupKey,s)}/extend`,{method:"POST",body:JSON.stringify({ttlMs:n})}),a=this.complete(o.operation);return{holdId:a.holdId,expiresAt:a.expiresAt}}bestAvailable(){return Promise.reject(new V(400,"group_best_available_unsupported","group_best_available_unsupported"))}socketUrl(){return""}createRealtime(e,t){return new Pi(this,t,this.realtimePollMs)}operationIdForHold(e){return this.operationByHold.get(e)??this.readMapping(e)}rememberOperation(e,t){!e||!t||(this.operationByHold.set(e,t),this.writeMapping(e,t))}async restoreOperation(){let e=this.readOperationRecord();if(!e)return null;if(!this.storedIsUndecided(e)&&e.state!=="committed"&&e.state!=="booked")return this.clearOperationRecord(),null;this.pendingOperationId=e.operationId,this.emitRecovery({kind:"pending",operationId:e.operationId,phase:e.state==="undecided"?"unknown":e.state,longRunning:!1,reference:Ze(e.operationId)});let t;try{t=await this.authorized(Xe(this.groupKey,e.operationId))}catch(n){return n instanceof K||this.recoveryFailed(e.operationId,"request_failed"),null}if(t.status===404)return this.failOperation(e.operationId),null;if(!t.ok)return this.recoveryFailed(e.operationId,"request_failed"),null;let i=await this.responseJson(t);this.emit(i.operation);let s=i.operation.state;return s==="committed"||s==="booked"?(this.emitRecovery({kind:"idle"}),this.complete(i.operation)):s==="aborted"||s==="expired"?(this.failOperation(e.operationId),null):this.recover(e.operationId,[],Date.now()+this.recoveryTimeoutMs)}async retryRecovery(){this.assertUsable();let e=this.pendingOperationId??this.readOperationRecord()?.operationId??null;return e?(this.pendingOperationId=e,this.recover(e,[],Date.now()+this.recoveryTimeoutMs)):null}watchSettlement(e){if(this.destroyed)return;let t=this.operationIdForHold(e);!t||t===this.settleOperationId||(this.stopSettlementWatch(),this.settleOperationId=t,this.settleStartedAt=Date.now(),this.settleState="committed",typeof document<"u"&&(this.settleVisibility=()=>{document.hidden||!this.settleOperationId||this.pollSettlement()},document.addEventListener("visibilitychange",this.settleVisibility)),this.scheduleSettlementPoll())}stopSettlementWatch(){this.settleTimer&&clearTimeout(this.settleTimer),this.settleTimer=null,this.settleOperationId=null,this.settleState=null,this.settleVisibility&&typeof document<"u"&&document.removeEventListener("visibilitychange",this.settleVisibility),this.settleVisibility=null}scheduleSettlementPoll(){if(this.destroyed||!this.settleOperationId)return;if(this.settleTimer&&clearTimeout(this.settleTimer),typeof document<"u"&&document.hidden){this.settleTimer=null;return}let t=Date.now()-this.settleStartedAt>=co?lo:ao;this.settleTimer=setTimeout(()=>{this.pollSettlement()},t)}settled(e){return e==="booked"||e==="expired"||e==="aborted"}async pollSettlement(){let e=this.settleOperationId;if(this.destroyed||!e)return;if(typeof document<"u"&&document.hidden){this.settleTimer&&clearTimeout(this.settleTimer),this.settleTimer=null;return}let t;try{let s=await this.authorized(Xe(this.groupKey,e));if(!s.ok)return this.scheduleSettlementPoll();t=(await this.responseJson(s)).operation}catch(s){return s instanceof K?this.stopSettlementWatch():this.scheduleSettlementPoll()}if(this.destroyed||this.settleOperationId!==e)return;let i=t.state!==this.settleState;if(this.settleState=t.state,i&&this.noteOperationState(e,t.state),this.settled(t.state)){this.stopSettlementWatch(),t.state!=="booked"&&this.clearOperationRecord(),this.emit(t);return}i&&this.emit(t),this.scheduleSettlementPoll()}destroy(){if(!this.destroyed){this.destroyed=!0,this.stopSettlementWatch(),this.access.onRenewed(void 0);try{this.aborter.abort()}catch{}}}operationRecordKey(){return`@seatlayer/performance-group-operation/v1/${encodeURIComponent(this.base)}/${encodeURIComponent(this.groupKey)}`}readOperationRecord(){try{let e=window.sessionStorage.getItem(this.operationRecordKey());if(!e)return null;let t=JSON.parse(e);return!t?.operationId||t.groupKey!==this.groupKey?null:t}catch{return null}}storedIsUndecided(e){return e.state==="undecided"||po.has(e.state)}writeOperationRecord(e){try{window.sessionStorage.setItem(this.operationRecordKey(),JSON.stringify(e))}catch{}}clearOperationRecord(){try{window.sessionStorage.removeItem(this.operationRecordKey())}catch{}}beginOperation(e){this.pendingOperationId=e;let t=this.readOperationRecord();this.writeOperationRecord({operationId:e,groupKey:this.groupKey,state:"undecided",createdAt:t?.operationId===e?t.createdAt:Date.now()})}noteOperationState(e,t){let i=this.readOperationRecord();!i||i.operationId!==e||this.writeOperationRecord({...i,state:t})}failOperation(e){this.pendingOperationId=null,this.clearOperationRecord(),this.emitRecovery({kind:"idle"}),this.onOperationState?.({operationId:e,state:"aborted",decision:"abort"})}async adoptSession(e){if(this.destroyed)return;let t=`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/session/adopt`;for(let s=0;s<2;s++){if(this.destroyed)return;try{if((await this.fetcher(`${this.base}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.token}`},body:JSON.stringify({previousToken:e.previousToken}),credentials:"omit",signal:this.aborter.signal})).ok){this.adoptFailure=null;return}}catch{}}if(this.destroyed)return;this.adoptFailure=new V(409,"performance_group_session_adopt_failed","performance_group_session_adopt_failed");let i=this.pendingOperationId??"";throw this.emitRecovery({kind:"failed",operationId:i,reference:i?Ze(i):"",reason:"session_adopt_failed",retryable:!1}),this.adoptFailure}async recover(e,t,i,s=100){let n=s,o=Date.now()+Math.min(8e3,Math.max(500,this.recoveryTimeoutMs/2)),a="unknown";for(;Date.now()<=i;){if(this.destroyed)throw new K;if(this.emitRecovery({kind:"pending",operationId:e,phase:a,longRunning:Date.now()>=o,reference:Ze(e)}),await ho(n),this.destroyed)throw new K;let l;try{l=await this.authorized(Xe(this.groupKey,e))}catch(p){if(p instanceof K)throw p;if(p instanceof ie)throw this.recoveryFailed(e,"request_failed"),p;n=Math.min(2e3,Math.max(100,n*2));continue}if(l.status===404){n=Math.min(1e3,Math.max(100,n*2));continue}if(!l.ok){this.recoveryFailed(e,"request_failed");try{return await this.throwResponse(l,t)}finally{this.pendingOperationId=null,this.clearOperationRecord()}}let h=(await this.responseJson(l)).operation;if(a=h.state,this.noteOperationState(e,h.state),this.emit(h),h.state==="committed"||h.state==="booked")return this.emitRecovery({kind:"idle"}),this.complete(h);if(h.state==="aborted"||h.state==="expired")throw this.failOperation(e),new V(409,"conflict","conflict",t.map(p=>({label:p,status:"held"})));n=Ti(l)}throw this.recoveryFailed(e,"deadline"),new V(504,"performance_group_outcome_unknown","performance_group_outcome_unknown")}recoveryFailed(e,t){this.emitRecovery({kind:"failed",operationId:e,reference:Ze(e),reason:t,retryable:!0})}emitRecovery(e){if(this.destroyed)return;let t=this.lastRecovery.kind===e.kind&&JSON.stringify(this.lastRecovery)===JSON.stringify(e);this.lastRecovery=e,t||this.onRecoveryState?.(e)}noteAvailability(e,t,i){if(this.destroyed||!this.onAvailability)return;let s=e.state??this.descriptorCache?.state??"active",n=e.revision??null,o=!!n&&!!this.knownRevision&&n!==this.knownRevision;n&&!this.knownRevision&&(this.knownRevision=n);let a=i?.partial??{},l=Object.values(i?.seats??{});this.onAvailability({partial:a,freeCount:l.filter(c=>c==="free").length,blockedCount:Object.keys(i?.seats??{}).filter(c=>i.seats[c]!=="free"&&!(c in a)).length,state:s,salesClosed:!!t||s!=="active",revision:n,revisionChanged:o})}acceptRevision(e){this.knownRevision=e}complete(e){if(!e.hold||e.hold.expiresAt==null)throw new V(409,"group_hold_not_active","group_hold_not_active");this.pendingOperationId=null,this.noteOperationState(e.operationId,e.state),this.operationByHold.set(e.hold.id,e.operationId),this.writeMapping(e.hold.id,e.operationId);let t=e.hold.allocations??[];this.allocationsByHold.set(e.hold.id,t);let i=t.find(s=>s.eventKey===this.activePerformanceKey)?.items;return{holdId:e.hold.id,expiresAt:e.hold.expiresAt,items:i??e.hold.items??[]}}emit(e){this.destroyed||this.onOperationState?.({operationId:e.operationId,state:e.state,decision:e.decision})}operationForHold(e){let t=this.operationIdForHold(e);if(!t)throw new V(404,"group_hold_not_found","group_hold_not_found");return t}mappingKey(e){return`@seatlayer/performance-group-hold/v1/${encodeURIComponent(this.base)}/${encodeURIComponent(this.groupKey)}/${encodeURIComponent(e)}`}readMapping(e){try{return window.sessionStorage.getItem(this.mappingKey(e))}catch{return null}}writeMapping(e,t){try{window.sessionStorage.setItem(this.mappingKey(e),t)}catch{}}assertUsable(){if(this.destroyed)throw new K;if(this.adoptFailure)throw this.adoptFailure}async authorized(e,t={},i=!1){if(this.destroyed)throw new K;if(this.adoptFailure)throw this.adoptFailure;let s={...t.headers};t.body!==void 0&&(s["Content-Type"]="application/json");let n=await this.access.authorization(i?"unauthorized":"initial");if(this.destroyed)throw new K;if(this.adoptFailure)throw this.adoptFailure;if(!n)throw new Error("performance_group_buyer_access_required");s.Authorization=n;let o=await this.fetcher(`${this.base}${e}`,{method:t.method??"GET",headers:s,body:t.body,credentials:"omit",signal:this.aborter.signal});if(!i&&(o.status===401||o.status===403||o.status===422)){let a=await o.clone().json().catch(()=>null);if(await this.access.handleFailure(o.status,a?.code??a?.error))return this.authorized(e,t,!0)}return o}async json(e,t={}){let i=await this.authorized(e,t);return i.ok?this.responseJson(i):this.throwResponse(i)}async blob(e){let t=await this.authorized(e);return t.ok?t.blob():this.throwResponse(t)}async responseJson(e){return e.json()}async throwResponse(e,t=[]){let s=await e.json().catch(()=>null)??{},n=s.code??s.error??`request_failed_${e.status}`;throw e.status===409&&!s.conflicts?.length&&t.length&&(s.conflicts=t.map(o=>({label:o,status:"held"}))),new V(e.status,s.error??n,n,s.conflicts)}};var Tr="seatlayer-performance-group-picker-style";function uo(){if(document.getElementById(Tr))return;let r=document.createElement("style");r.id=Tr,r.textContent=`
|
|
2235
|
+
</div>`;let s={};return i.querySelectorAll("[data-ref]").forEach(n=>{s[n.dataset.ref]=n}),{root:i,mapHost:s.map,els:s}}function us(r){let e=(t,i)=>{for(let s of r.querySelectorAll(`[${t}]`)){let n=s.getAttribute(t);if(!n)continue;let o=(0,rt.t)(n);o!==n&&i(s,o)}};e("data-sl-t",(t,i)=>{t.textContent=i}),e("data-sl-a",(t,i)=>{t.setAttribute("aria-label",i)}),e("data-sl-ti",(t,i)=>{t.setAttribute("title",i)})}var Q=require("@seatlayer/core");function ms(r,e){let t=(0,Q.resolveLocale)(r),i=Q.TRANSLATED_LOCALES.includes(t)?t:"en";return e&&(0,Q.setStringOverrides)(e),{locale:i,direction:(0,Q.localeDirection)(i),ready:(0,Q.loadLocale)(r)}}function fs(r,e,t){r.lang=e.locale,r.dir=e.direction,e.ready.then(t)}function gs(r,e){if(!r)return null;let t=(e.languages??[]).map(s=>(0,Q.resolveLocale)(s)).filter((s,n,o)=>o.indexOf(s)===n);if(t.length<2)return null;let i=document.createElement("select");i.className="sl-langsel",i.setAttribute("aria-label",e.label);for(let s of t){let n=document.createElement("option");n.value=s,n.textContent=Q.LOCALE_NAMES[s]??s,n.selected=s===(0,Q.getLocale)(),i.appendChild(n)}return i.addEventListener("change",()=>e.onChange(i.value)),r.appendChild(i),i}function bs(r,e){e.root.lang=r,e.root.dir=(0,Q.localeDirection)(r),us(e.root);for(let i of e.painters)try{i()}catch{}e.refreshMapCopy();let t=e.languageSelect;t&&t.value!==r&&(t.value=r)}var Le=require("@seatlayer/core"),ys=require("@seatlayer/core/core/seatConfidence");function Fi(r){return String(r??"\u2014").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function y(r){return String(r??"").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function He(r){return r?.restrictedView?f("picker.restrictedView","Restricted view"):r?.obstructedView?f("picker.obstructedView","Obstructed view"):""}function xs(r){if(!r)return"";let e=[];r.premium&&e.push(`<div class="sl-cx-premium"><span class="sl-cx-star" aria-hidden="true">\u2605</span>${f("picker.premiumSeat","Premium seat")}</div>`);let t=He(r);return t?e.push(`<div class="sl-cx-warn"><span class="sl-cx-glyph" aria-hidden="true">\u25D0</span><span class="sl-cx-txt"><b>${t}</b>${r.note?`<span class="sl-cx-note">${y(r.note)}</span>`:""}</span></div>`):r.note&&e.push(`<div class="sl-cx-warn"><span class="sl-cx-glyph" aria-hidden="true">\u2139</span><span class="sl-cx-txt"><span class="sl-cx-note">${y(r.note)}</span></span></div>`),e.length?`<div class="sl-cx">${e.join("")}</div>`:""}function ji(r){let e=He(r);if(!e)return"";let t=y(r?.note?r.note:e);return`<span class="sl-cx-mark" role="img" aria-label="${t}" title="${t}">\u25D0</span>`}function st(r){return r==="no-seat"?f("picker.emptyWheelchairSpace","Empty wheelchair space"):r==="seat-present"?f("picker.accessiblePhysicalSeat","Accessible physical seat"):""}function ws(r){let e=st(r);return e?`<div class="sl-cx"><div class="sl-cx-warn"><span class="sl-cx-glyph" aria-hidden="true">\u267F</span><span class="sl-cx-txt"><b>${e}</b></span></div></div>`:""}function li(r){let e=st(r);return e?`<span class="sl-cx-mark" role="img" aria-label="${e}" title="${e}">\u267F</span>`:""}function Gi(r,e){if(!r)return"";let t=e?f("picker.viewFromThisSeat","View from this seat"):f("picker.seeItIn3d","See it in 3D");return`<button type="button" class="sl-confirm-3d" aria-label="${t}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2l9 5v10l-9 5-9-5V7z"/><path d="M12 12l9-5M12 12v10M12 12L3 7"/></svg><span>${t}</span></button>`}function ks(r){if(!r)return"";let e=r.previous.label||r.previous.id,t=r.next.label||r.next.id;return`<span class="sl-seccard-nav" aria-label="${f("picker.browseSections","Browse sections")}"><button type="button" data-section-nav="${O(r.previous.id)}" aria-label="${f("picker.previousSection","Previous section")}: ${O(e)}" title="${O(e)}">\u2190</button><button type="button" data-section-nav="${O(r.next.id)}" aria-label="${f("picker.nextSection","Next section")}: ${O(t)}" title="${O(t)}">\u2192</button></span>`}function Ss(r,e){if(!e)return"";let t=e,i=t.includes(r.id),s=i?t.length>1?f("picker.openComparison","Open comparison"):f("picker.savedForComparison","Saved for comparison"):t.length?f("picker.compareWithSaved","Compare with saved"):f("picker.saveToCompare","Save to compare");return`<button type="button" class="sl-confirm-compare"${i&&t.length===1?" disabled":""}><span aria-hidden="true">\u21C4</span><span>${y(s)}</span></button>`}function Ts(r,e,t){if(!t)return"";let i=(0,ys.seatConfidenceDisclosure)(r.confidenceEvidence),s=i.modeledTarget??i.reality;return`<button type="button" class="sl-confirm-confidence" aria-label="Open seat confidence passport for ${y(r.displayLabel??r.label)}"><span><em>${y(e)}</em><strong>${y(i.headline)}</strong><small>${y(s)}</small></span><b>Passport</b></button>`}function te(r){let e=r?.rowLabel,t=r?.sectionLabel;if(!e||!t)return e;for(let i of["-"," ","\xB7","/","_"]){let s=`${t}${i}`;if(e.startsWith(s)&&e.length>s.length)return e.slice(s.length)}return e}function ha(r){switch(r){case"paused":return{title:f("picker.accessPausedTitle","These seats are on hold right now"),body:f("picker.accessPausedBody","The organizer has paused this selection. Try again in a few minutes."),action:f("picker.accessRetry","Try again")};case"revoked":return{title:f("picker.accessRevokedTitle","This access link is no longer active"),body:f("picker.accessRevokedBody","Ask whoever sent you here for a new link to keep booking these seats.")};case"no_token":case"provider_failed":return{title:f("picker.accessExpiredTitle","Your access session has ended"),body:f("picker.accessExpiredBody","Sign in again, or reload the page, to keep browsing these seats. Anything you are already holding stays yours."),action:f("picker.accessRetry","Try again")};default:return{title:f("picker.accessInvalidTitle","We couldn\u2019t verify your access"),body:f("picker.accessInvalidBody","You can still book anything shown as available. Contact whoever sent you here for access to the rest.")}}}function Cs(r,e,t){let i=Fi;return[r?.sectionLabel?`<div class="sl-confirm-field"><span class="sl-confirm-key">${f("picker.section","Section")}</span><span class="sl-confirm-value">${i(r.sectionLabel)}</span></div>`:"",r?.rowLabel||r?.objectType==="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${i(t)}</span><span class="sl-confirm-value">${i(te(r)??r?.displayLabel??e)}</span></div>`:"",r?.objectType!=="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${f("picker.seat","Seat")}</span><span class="sl-confirm-value">${i(r?.seatNumber??r?.displayLabel??e)}</span></div>`:""].filter(Boolean).join("")}function Es(r,e,t){let i=Fi,s=r?.objectType==="booth",n=r?.objectType==="table"&&!!r?.bookingMode,o=s||n||!r?.seatNumber,a=r?.sectionLabel??(o?void 0:r?.displayLabel),l=n?`${f("picker.guests","Guests")} ${r?.bookingMode==="variable"?`${r?.minOccupancy}\u2013${r?.maxOccupancy}`:r?.capacity}`:void 0,h=(o?[l,a?r?.rowLabel??r?.displayLabel:void 0]:[r?.rowLabel?`${t} ${te(r)??""}`.trim():void 0,`${f("picker.seat","Seat")} ${r?.seatNumber??e}`]).filter(Boolean).join(" \xB7 ");return(a?`<span class="sl-confirm-place">${i(a)}</span>`:"")+(h?`<span class="sl-confirm-pos">${a?" \xB7 ":""}${i(h)}</span>`:"")+(a||h?"":`<span class="sl-confirm-pos">${i(e)}</span>`)}function As(r,e){if(!r)return"";let t=e?f("picker.viewFromThisSeat","View from this seat"):f("picker.seeItIn3d","See it in 3D");return`<button type="button" class="sl-confirm-pill sl-confirm-3dpill" aria-label="${t}" title="${t}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2l9 5v10l-9 5-9-5V7z"/><path d="M12 12l9-5M12 12v10M12 12L3 7"/></svg><span aria-hidden="true">3D</span></button>`}function vs(r){return r.buyerMessage?.trim()||(r.restriction==="companion"?f("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):void 0)}function Ps(r,e,t){let i=Fi;if(r.length>1)return`<fieldset class="sl-confirm-tiers"><legend>${f("picker.ticketType","Ticket type")}</legend>`+r.map(o=>{let a=vs(o);return`<button type="button" class="sl-confirm-tier" data-confirm-tier="${i(o.id)}" aria-pressed="${o.id===e}"><span class="sl-confirm-tier-copy"><span class="sl-confirm-tier-name">${i(o.name)}</span>`+(a?`<small class="sl-confirm-tier-note">${i(a)}</small>`:"")+`</span><span class="sl-confirm-tier-price">${i(t(o))}</span></button>`}).join("")+"</fieldset>";let s=r[0],n=s?vs(s):void 0;return n?`<p class="sl-confirm-tier-note">${i(n)}</p>`:""}function Ui(r){return`<span class="sl-seccard-dot" style="background:${y(r.color)}"></span><span class="sl-seccard-name">${y(r.label)}</span><span class="sl-seccard-left" data-full="${y(r.leftLabel)}" data-short="${y(r.leftShortLabel??r.leftLabel)}">${y(r.leftLabel)}</span>`+r.nav+r.close}function Ms(r){return`<div class="sl-seccard-head"><span class="sl-seccard-dot" style="background:${y(r.color)}"></span><span class="sl-seccard-name">${y(r.label)}</span>`+(r.showPrice?`<span class="sl-seccard-price">${y(r.priceLabel)}</span>`:"")+r.close+`</div><div class="sl-seccard-zone">${r.zoneLabel?`${y(r.zoneLabel)} \xB7 `:""}<span class="sl-seccard-left">${y(r.leftLabel)}</span></div>`+(r.entrance?`<div class="sl-seccard-entrance">${y(r.entrance)}</div>`:"")+(r.mix?`<div class="sl-seccard-mix">${r.mix}</div>`:"")+`<div class="sl-seccard-foot"><button type="button" class="sl-seccard-overview">\u2190 ${y(r.overviewLabel)}</button>`+r.nav+`<span class="sl-seccard-hint">${y(r.hint)}</span></div>`}function Ls(r){return`<span class="sl-seccard-mix-item${r.dim?" sl-dim":""}"><span class="sl-seccard-mix-dot" style="background:${y(r.color)}"></span>${y(r.label)} <span class="sl-seccard-mix-price">${y(r.rangeLabel)}</span></span>`}function Hs(r){return'<div class="sl-confirm-grid">'+r.identityFields+`</div><div class="sl-confirm-cat"><span class="sl-dot" style="background:${y(r.categoryColor)}"></span><span class="sl-confirm-cat-name">${y(r.categoryLabel)}</span>`+(r.priceLabel?`<span class="sl-confirm-price">${y(r.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-id">'+r.marker+`<span class="sl-confirm-dot" style="background:${y(r.categoryColor)}" aria-hidden="true"></span><span class="sl-sr">${y(r.categoryLabel)}</span><span class="sl-confirm-who">`+r.identity+"</span>"+(r.priceLabel?`<span class="sl-confirm-idprice">${y(r.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-body">'+r.tierChoices+r.groupDates+r.wheelchair+r.commercial+(r.thumb||r.see3dPill?`<div class="sl-confirm-strip">${r.thumb}<span class="sl-confirm-pills">${r.see3dPill}</span></div>`:"")+r.inspect+`<div class="sl-confirm-row"><button type="button" class="sl-confirm-cancel">${y(r.cancelLabel)}</button><button type="button" class="sl-confirm-add"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12.5l4 4L19 7"/></svg>${y(r.selectLabel)}</button></div></div>`}function Rs(r,e){let t=O,{variable:i}=e;return`<section class="sl-table-dialog" role="dialog" aria-modal="true" aria-labelledby="sl-table-title" aria-describedby="sl-table-copy"><div class="sl-table-head"><div class="sl-table-eyebrow">${t(i?(0,Le.t)("picker.flexiblePartyTypeWord",{typeWord:e.typeWord}):(0,Le.t)("picker.wholeTypeWord",{typeWord:e.typeWord}))}</div><h2 class="sl-table-title" id="sl-table-title">${t(r.displayLabel??r.label)}</h2><p class="sl-table-copy" id="sl-table-copy">${t(i?f("picker.chooseGuestsCopy","Choose how many guests will sit together. This table is held exclusively for your party."):(0,Le.t)("picker.allPlacesBookedTogether",{count:r.capacity}))}</p></div><div class="sl-table-body"><div class="sl-table-summary"><span>${t(e.categoryLabel)}</span><b data-table-unit>${t((0,Le.t)("picker.perGuestPrice",{price:e.unitPrice}))}</b><span class="muted">${t(f("picker.tableCapacity","Table capacity"))}</span><span>${t((0,Le.t)("picker.guestsCount",{count:r.capacity}))}</span><span class="muted">${t(f("picker.total","Total"))}</span><b data-table-total></b></div>`+(i?`<label class="sl-table-qtylabel" id="sl-table-qty-label">${t(f("picker.numberOfGuests","Number of guests"))}</label><div class="sl-table-stepper" role="group" aria-labelledby="sl-table-qty-label"><button type="button" data-table-step="-1" aria-label="${t(f("picker.fewerGuests","Fewer guests"))}">\u2212</button><output aria-live="polite" data-table-qty>${r.quantity}</output><button type="button" data-table-step="1" aria-label="${t(f("picker.moreGuests","More guests"))}">+</button></div><div class="sl-table-range">${t((0,Le.t)("picker.chooseMinMaxGuests",{min:r.minOccupancy,max:r.maxOccupancy}))}</div>`:`<input type="hidden" data-table-qty value="${r.capacity}">`)+`<div class="sl-table-actions"><button type="button" class="sl-table-cancel">${t((0,Le.t)("common.cancel"))}</button><button type="button" class="sl-table-confirm">${t(e.held?f("picker.updateTable","Update table"):i?f("picker.selectTable","Select table"):f("picker.selectWholeTable","Select whole table"))}</button></div></div></section>`}function Os(r,e){let t=ha(r),i=document.createElement("div");i.className="sl-access",i.setAttribute("role","status"),i.setAttribute("aria-live","polite");let s=document.createElement("div"),n=document.createElement("div");n.className="sl-access-title",n.textContent=t.title;let o=document.createElement("div");if(o.className="sl-access-body",o.textContent=t.body,s.append(n,o),t.action){let a=document.createElement("button");a.type="button",a.className="sl-access-act",a.textContent=t.action,a.addEventListener("click",e),s.appendChild(a)}return i.appendChild(s),i}function Is(r){return r.map(e=>`<button type="button" role="switch" class="sl-a11yrow${e.className?` ${e.className}`:""}${e.on?" on":""}" data-a11y-row="${y(e.key)}" aria-checked="${e.on}" aria-pressed="${e.on}"><span class="sl-a11yrow-i" aria-hidden="true">${y(e.icon)}</span><span class="sl-a11yrow-t"><span class="sl-a11yrow-l">${y(e.label)}</span>`+(e.note?`<span class="sl-a11yrow-n">${y(e.note)}</span>`:"")+'</span><span class="sl-a11yrow-s" aria-hidden="true"></span></button>').join("")}function _s(r){let e=document.createElement("div");e.className="sl-floors on",e.setAttribute("role","group"),e.setAttribute("aria-label",r.tf("picker.chooseLevel","Choose level"));let t=[{id:"",name:r.tf("picker.allFloors","All floors")},...r.floors.map(n=>({id:n.id,name:n.name}))];for(let n of t){let o=document.createElement("button");o.type="button",o.dataset.floor=n.id,o.textContent=n.name,o.setAttribute("aria-pressed","false"),o.addEventListener("click",()=>r.onChoose(n.id)),e.appendChild(o)}let i=document.createElement("button");i.type="button",i.className="sl-floor-info",i.textContent="i";let s=r.tf("picker.floorHelp","All floors shows the complete venue. Choose one level to inspect and select its seats.");return i.setAttribute("aria-label",s),i.title=s,e.appendChild(i),e}function Ds(r,e,t){if(!r)return;let i=t?"":e;r.querySelectorAll("button[data-floor]").forEach(s=>{s.setAttribute("aria-pressed",String(s.dataset.floor===i))})}var ie=require("@seatlayer/core");var ci=class{constructor(e){this.el=null;this.stripObserver=null;this.current=null;this.collapsed=!1;this.shownAt=0;this.host=e}get summary(){return this.current}adopt(e){this.current=e}get element(){return this.el}show(e){if(e&&e.id!==this.current?.id&&this.host.collapseSheet(),this.current=e,!e){this.el?.classList.contains("strip")?Ee(this.el,void 0,kr):this.el?.remove(),this.el=null,this.syncLocatorDock(),this.host.refreshMinimap();return}this.collapsed=this.host.controller.getRung()==="seats",this.shownAt=Date.now(),this.render(e),this.host.refreshMinimap()}updateDockInPlace(e,t){let i=this.el;if(!i)return;let s=i.querySelector(".sl-seccard-dot");s&&(s.style.background=e.color);let n=i.querySelector(".sl-seccard-name");n&&Ai(n,e.label);let o=i.querySelector(".sl-seccard-left");o&&(o.dataset.full=t.leftLabel,o.dataset.short=t.leftShortLabel,Ai(o,t.leftLabel));let a=i.querySelector(".sl-seccard-nav");t.nav?(a?a.outerHTML=t.nav:i.querySelector(".sl-seccard-x")?.insertAdjacentHTML("beforebegin",t.nav),this.wireNavigation(i)):a&&a.remove(),i.setAttribute("aria-label",`${(0,ie.t)("picker.sectionSummaryAria",{label:e.label})}, ${t.leftLabel}`),this.fitStripCount()}wireNavigation(e){e.querySelectorAll("[data-section-nav]").forEach(t=>{t.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation();let s=t.dataset.sectionNav;s&&this.host.controller.focusSection(s)})})}render(e){let t=this.host.map();if(!t)return;let i=this.el?.classList.contains("strip")===!0&&this.el.isConnected,s=e.categories.length?e.categories.map(x=>{let k=this.host.controller.doc?.categories.find(S=>S.key===x.key);return k?this.host.catPriceRange(k):{min:x.priceMin,max:x.priceMax}}).filter(x=>x!=null):[{min:e.priceMin,max:e.priceMax}],n=Math.min(...s.map(x=>x.min)),o=Math.max(...s.map(x=>x.max)),a=n===o?this.host.money(n):`${this.host.money(n)}\u2013${this.host.money(o)}`,l=(0,ie.tCount)("picker.seatsLeftInSection",e.seatsLeft),c=(0,ie.t)("picker.seatsLeftShort",{count:e.seatsLeft}),h=`<button type="button" class="sl-seccard-x" aria-label="${(0,ie.t)("picker.closeSectionSummary")}">\u2715</button>`,p=`<button type="button" class="sl-seccard-x sl-seccard-back" aria-label="${(0,ie.t)("picker.closeSectionSummary")}"><span class="sl-seccard-back-chev" aria-hidden="true">\u2039</span>${O((0,ie.t)("picker.overview"))}</button>`,d=ks(this.host.sectionNeighbours(e.id)),u=this.host.root()?.dataset.layout==="narrow",g={label:e.label,color:e.color,leftLabel:l,leftShortLabel:c,nav:d,close:h};if(u&&i&&this.el){this.updateDockInPlace(e,{leftLabel:l,leftShortLabel:c,nav:d});return}this.el?.remove();let b=document.createElement("div");if(u){if(b.className=i?"sl-seccard strip on":"sl-seccard strip on sl-mo-slide-up",b.setAttribute("role","group"),b.setAttribute("aria-label",`${(0,ie.t)("picker.sectionSummaryAria",{label:e.label})}, ${l}`),b.innerHTML=Ui({...g,close:p}),i)for(let x of b.querySelectorAll(".sl-seccard-name,.sl-seccard-left"))x.classList.add("sl-mo-xfade");this.wireNavigation(b),b.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),t.appendChild(b),this.fitStripCount()}else if(this.collapsed)b.className="sl-seccard mini on",b.setAttribute("role","button"),b.setAttribute("aria-label",(0,ie.t)("picker.sectionSummaryAria",{label:e.label})),b.innerHTML=Ui(g),this.wireNavigation(b),b.addEventListener("click",x=>{x.target.closest(".sl-seccard-x")||(this.collapsed=!1,this.shownAt=Date.now(),this.render(e))}),b.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),(this.host.region("top-center")??t).appendChild(b);else{b.className="sl-seccard on",b.setAttribute("role","dialog"),b.setAttribute("aria-label",(0,ie.t)("picker.sectionSummaryAria",{label:e.label}));let x=this.host.priceBandKeys(),k=e.categories.map(S=>{let C=this.host.controller.doc?.categories.find(M=>M.key===S.key),A=C?this.host.catPriceRange(C):{min:S.priceMin,max:S.priceMax};return Ls({label:S.label,color:S.color,dim:x!=null&&!x.has(S.key),rangeLabel:A&&A.min!==A.max?`${this.host.money(A.min)}\u2013${this.host.money(A.max)}`:this.host.money(A?.min??S.price)})}).join("");b.innerHTML=Ms({...g,priceLabel:a,showPrice:e.categories.length>0,zoneLabel:e.zoneLabel,entrance:e.entrance?`${(0,ie.t)("picker.entrance")} ${e.entrance}`:void 0,mix:k,overviewLabel:(0,ie.t)("picker.overview"),hint:(0,ie.t)("picker.tapSeatHint")}),this.wireNavigation(b),b.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),b.querySelector(".sl-seccard-overview").addEventListener("click",()=>this.host.controller.overview()),(this.host.region("top-center")??t).appendChild(b)}this.el=b,u&&this.watchStrip(b),this.syncLocatorDock()}syncLocatorDock(){let e=this.host.root();e&&(this.el?.classList.contains("strip")?e.dataset.locator="true":delete e.dataset.locator)}fitStripCount(){let e=this.el;if(!e||!e.classList.contains("strip"))return;let t=e.querySelector(".sl-seccard-left");if(!t)return;let i=e.querySelector(".sl-seccard-name"),s=c=>c!=null&&c.clientWidth>0&&c.scrollWidth>c.clientWidth+1,n=()=>{let c=e.clientWidth;if(c<=0)return!0;let h=typeof getComputedStyle=="function"?getComputedStyle(e):null,p=b=>{let x=Number.parseFloat(b??"");return Number.isFinite(x)?x:0},d=[...e.children].filter(b=>b instanceof HTMLElement&&!b.hidden),u=p(h?.columnGap)||p(h?.gap);return d.reduce((b,x)=>b+Math.max(x.scrollWidth,x.getBoundingClientRect().width),0)+u*Math.max(0,d.length-1)+p(h?.paddingLeft)+p(h?.paddingRight)<=c+1},o=()=>t.hidden||!s(t)&&n(),a=c=>{if(t.hidden=c==="hidden",c==="hidden")return;let h=t.dataset.full??"";t.textContent=c==="full"?h:t.dataset.short??h},l=["full","short","hidden"];for(let c of l)if(a(c),o()&&!s(i))return;for(let c of l)if(a(c),o())return;a("hidden")}watchStrip(e){this.stripObserver?.disconnect(),this.stripObserver=null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{this.el===e&&this.fitStripCount()}),typeof ResizeObserver=="function"&&(this.stripObserver=new ResizeObserver(()=>{this.el===e&&this.fitStripCount()}),this.stripObserver.observe(e))}collapse(){!this.el||this.collapsed||!this.current||this.host.root()?.dataset.layout!=="narrow"&&(this.collapsed=!0,this.render(this.current))}onView(){if(!(!this.el||this.collapsed||!this.current)&&this.host.root()?.dataset.layout!=="narrow"){if(this.host.controller.getRung()==="seats"){this.collapse();return}if(Date.now()-this.shownAt<1400){this.coverage()>.25&&this.collapse();return}this.collapse()}}coverage(){let e=this.el,t=this.current,i=this.host.map();if(!e||!t||!i)return 0;let s=this.host.activeFloorObjects().find(S=>S.type==="section"&&S.id===t.id)?.outline;if(!s||s.length<3)return 0;let n=s.map(S=>this.host.controller.worldToScreen(S)),o=n.map(S=>S.x),a=n.map(S=>S.y),l=Math.min(...o),c=Math.min(...a),h=Math.max(...o)-l,p=Math.max(...a)-c;if(h<=0||p<=0)return 0;let d=i.getBoundingClientRect(),u=e.getBoundingClientRect(),g=u.left-d.left,b=u.top-d.top,x=Math.max(0,Math.min(g+u.width,l+h)-Math.max(g,l)),k=Math.max(0,Math.min(b+u.height,c+p)-Math.max(b,c));return x*k/(h*p)}};var $s=require("@seatlayer/core"),nt=require("@seatlayer/core/picker/minimapGeometry");function Bs(r,e){let t=new Ki(r);return t.build(e),t}var Ki=class{constructor(e){this.host=e;this.miniCanvas=null;this.miniBase=null;this.miniWrap=null;this.miniToggle=null;this.miniLabel=null;this.miniTf=null;this.miniDrag=null;this.miniSuppressClick=!1;this.userClosed=!1}build(e){if(!this.host.controller.getViewport())return;let i=document.createElement("button");i.type="button",i.className="sl-minimap-toggle",i.setAttribute("aria-label",f("picker.openVenueMap","Open venue overview map")),i.setAttribute("aria-expanded","false"),i.innerHTML='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 6l5-2 8 3 5-2v13l-5 2-8-3-5 2zM8 4v13M16 7v13"/></svg>',e.appendChild(i),this.miniToggle=i;let s=document.createElement("div");s.className="sl-minimap",s.setAttribute("role","group");let n=document.createElement("div");n.className="sl-minimap-bar";let o=document.createElement("span");o.className="sl-minimap-label";let a=document.createElement("span");a.className="sl-minimap-key",a.setAttribute("aria-label",f("picker.minimapStateKey","Focused, selected, available, and inactive sections")),a.innerHTML='<i class="focused" title="Focused"></i><i class="selected" title="Selected"></i><i title="Available"></i><i class="inactive" title="Inactive"></i>';let l=document.createElement("button");l.type="button",l.className="sl-minimap-close",l.setAttribute("aria-label",f("picker.closeVenueMap","Close venue overview map")),l.textContent="\xD7",n.append(o,a,l);let c=document.createElement("canvas");c.tabIndex=0,c.setAttribute("role","application"),c.setAttribute("aria-label",f("picker.venueMapInstructions","Venue overview map. Drag the viewport, click a section, or use arrow keys to pan.")),s.append(n,c),e.appendChild(s),this.miniWrap=s,this.miniLabel=o,this.miniCanvas=c;let h=document.createElement("canvas");this.miniBase=h,i.addEventListener("click",()=>{let p=this.host.root()?.dataset.minimapOpen==="true";this.userClosed=p,this.setMinimapOpen(!p)}),l.addEventListener("click",()=>{this.userClosed=!0,this.setMinimapOpen(!1)}),c.addEventListener("click",p=>{if(this.miniSuppressClick){this.miniSuppressClick=!1;return}this.minimapJump(p)}),c.addEventListener("pointerdown",p=>this.minimapPointerDown(p)),c.addEventListener("pointermove",p=>this.minimapPointerMove(p)),c.addEventListener("pointerup",p=>this.minimapPointerUp(p)),c.addEventListener("pointercancel",p=>this.minimapPointerUp(p)),c.addEventListener("keydown",p=>this.minimapKeydown(p)),this.layoutMinimap(),this.syncMinimapLabel(),this.drawMinimapStatic(),this.drawMinimapRect()}setAutoOpen(e){if(this.miniWrap){if(!e){this.userClosed=!1,this.host.root()?.dataset.minimapOpen==="true"&&this.setMinimapOpen(!1,!1);return}this.userClosed||this.host.root()?.dataset.minimapOpen==="true"||this.setMinimapOpen(!0,!1)}}setMinimapOpen(e,t=!0){this.host.root()?.setAttribute("data-minimap-open",String(e)),this.miniToggle?.setAttribute("aria-expanded",String(e)),t&&(e?this.miniCanvas?.focus():this.miniToggle?.focus())}layoutMinimap(){let e=this.miniCanvas,t=this.miniBase,i=this.host.controller.getViewport()?.bounds;if(!e||!t||!i||!(i.width>0&&i.height>0))return;let s=196,n=146,o=6,a=i.width/Math.max(1,i.height),l=s,c=Math.round(s/a);c>n&&(c=n,l=Math.round(n*a)),l=Math.max(64,l),c=Math.max(48,c);let h=Math.min(2,window.devicePixelRatio||1);e.width=Math.round(l*h),e.height=Math.round(c*h),e.style.width=`${l}px`,e.style.height=`${c}px`,t.width=e.width,t.height=e.height,this.miniTf=(0,nt.createMinimapTransform)(i,e.width,e.height,h,o)}syncMinimapLabel(){if(!this.miniLabel||!this.miniWrap)return;let e=this.host.controller.getFloors(),t=this.host.controller.isFloorOverview()?f("picker.allFloors","All floors"):e.find(h=>h.id===this.host.controller.getActiveFloorId())?.name??f("picker.venueOverview","Venue overview"),i=this.host.controller.getMinimapSnapshot().sections,n=i.find(h=>h.active)?.label??this.host.focusedSectionLabel(),o=n?`${t} \xB7 ${n}`:t;this.miniLabel.textContent=o;let a=i.filter(h=>h.state==="selected").length,l=i.filter(h=>h.state==="available").length,c=i.filter(h=>h.state==="inactive").length;this.miniWrap.setAttribute("aria-label",i.length?`${o}. ${a} selected, ${l} available, ${c} inactive sections.`:o),this.miniCanvas?.setAttribute("aria-label",i.length?`${o}. ${a} selected, ${l} available, ${c} inactive sections. ${f("picker.venueMapInstructions","The outlined region is the visible map area. Drag it, click a section, or use arrow keys to pan.")}`:`${o}. ${f("picker.venueMapInstructions","The outlined region is the visible map area. Drag it, click elsewhere, or use arrow keys to pan.")}`)}refreshMinimap(){this.miniBase&&(this.layoutMinimap(),this.syncMinimapLabel(),this.drawMinimapStatic(),this.drawMinimapRect())}drawMinimapStatic(){let e=this.miniBase,t=this.miniTf;if(!e||!t)return;let i=e.getContext("2d");if(!i)return;i.clearRect(0,0,e.width,e.height);let s=p=>p*t.scale+t.offX,n=p=>p*t.scale+t.offY,o=this.host.cssVar("--sl-line")||"rgba(139,147,167,.5)",a=this.host.cssVar("--sl-muted")||"#8b93a7",l=this.host.cssVar("--sl-accent")||"#6e7bff",c=this.host.cssVar("--sl-success")||"#22a06b",h=this.host.controller.getMinimapSnapshot();for(let p of h.sections){if(p.outline.length<3)continue;i.beginPath(),p.outline.forEach((u,g)=>g===0?i.moveTo(s(u.x),n(u.y)):i.lineTo(s(u.x),n(u.y))),i.closePath();let d=p.paint;if(i.globalAlpha=p.state==="inactive"?.5:.92,d?i.fillStyle=d.fill:(i.globalAlpha=p.state==="inactive"?.18:p.state==="selected"?.72:.34,i.fillStyle=p.state==="inactive"?a:p.state==="selected"?l:c),i.fill(),i.globalAlpha=.82,i.lineWidth=Math.max(1,t.dpr),i.strokeStyle=d?.stroke||o,i.stroke(),p.owned){i.globalAlpha=1,i.lineWidth=Math.max(2,t.dpr*1.5),i.strokeStyle=l,i.stroke();let u=p.outline.reduce((g,b)=>({x:g.x+b.x,y:g.y+b.y}),{x:0,y:0});i.beginPath(),i.arc(s(u.x/p.outline.length),n(u.y/p.outline.length),Math.max(1.5,t.dpr*1.6),0,Math.PI*2),i.fillStyle=l,i.fill(),i.beginPath(),p.outline.forEach((g,b)=>b===0?i.moveTo(s(g.x),n(g.y)):i.lineTo(s(g.x),n(g.y))),i.closePath()}p.active&&(i.globalAlpha=1,i.lineJoin="round",i.lineWidth=Math.max(4,t.dpr*3.5),i.strokeStyle=this.host.cssVar("--sl-surface")||"#fff",i.stroke(),i.lineWidth=Math.max(2,t.dpr*1.75),i.strokeStyle=l,i.stroke())}if(i.globalAlpha=1,!h.sections.length){let p=Math.max(1,t.dpr);for(let d of h.seats)i.globalAlpha=d.state==="inactive"?.22:.78,i.fillStyle=d.state==="inactive"?a:d.state==="selected"?l:c,i.beginPath(),i.arc(s(d.x),n(d.y),p,0,Math.PI*2),i.fill();i.globalAlpha=1}}drawMinimapRect(){let e=this.miniCanvas,t=this.miniBase,i=this.miniTf;if(!e||!t||!i)return;let s=e.getContext("2d");if(!s)return;s.clearRect(0,0,e.width,e.height),s.drawImage(t,0,0);let n=this.host.controller.getViewport();if(!n)return;let o=(0,nt.minimapViewportPlan)(n.visible,i,e.width,e.height,Math.max(2,i.dpr*2)),a=this.host.cssVar("--sl-text")||"#12151c",l=this.host.cssVar("--sl-surface")||"#fff";s.save(),s.globalAlpha=.1,s.fillStyle=a,s.fillRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),s.globalAlpha=.9,s.lineJoin="round",s.lineWidth=Math.max(4,i.dpr*3.25),s.strokeStyle=l,s.strokeRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),s.globalAlpha=1,s.lineWidth=Math.max(2,i.dpr*1.75),s.strokeStyle=a,s.strokeRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),o.clipped&&Object.values(o.clippedEdges).some(Boolean)&&(s.setLineDash([Math.max(3,i.dpr*3),Math.max(2,i.dpr*2)]),s.strokeRect(o.clipped.x,o.clipped.y,o.clipped.width,o.clipped.height)),s.restore()}minimapWorldPoint(e){let t=this.miniCanvas,i=this.miniTf;if(!t||!i)return null;let s=t.getBoundingClientRect(),n=(e.clientX-s.left)*(t.width/Math.max(1,s.width)),o=(e.clientY-s.top)*(t.height/Math.max(1,s.height));return{...(0,nt.minimapPointToWorld)({x:n,y:o},i),px:n,py:o}}minimapPointerDown(e){let t=this.minimapWorldPoint(e),i=this.host.controller.getViewport()?.visible;!t||!i||!(t.x>=i.x&&t.x<=i.x+i.width&&t.y>=i.y&&t.y<=i.y+i.height)||(this.miniDrag={pointerId:e.pointerId,offsetX:t.x-(i.x+i.width/2),offsetY:t.y-(i.y+i.height/2),startX:e.clientX,startY:e.clientY,moved:!1},this.miniCanvas?.setPointerCapture(e.pointerId),this.miniCanvas?.classList.add("sl-dragging"),e.preventDefault())}minimapPointerMove(e){let t=this.miniDrag;if(!t||t.pointerId!==e.pointerId)return;let i=this.minimapWorldPoint(e);i&&(!t.moved&&Math.hypot(e.clientX-t.startX,e.clientY-t.startY)>2&&(t.moved=!0,this.host.controller.clearSectionFocus()),this.host.controller.panToWorld({x:i.x-t.offsetX,y:i.y-t.offsetY}),e.preventDefault())}minimapPointerUp(e){let t=this.miniDrag;!t||t.pointerId!==e.pointerId||(this.miniSuppressClick=t.moved,this.miniDrag=null,this.miniCanvas?.classList.remove("sl-dragging"),this.miniCanvas?.hasPointerCapture(e.pointerId)&&this.miniCanvas.releasePointerCapture(e.pointerId))}minimapKeydown(e){let t=this.host.controller.getViewport()?.visible;if(!t)return;if(e.key==="Home"){this.host.controller.overview(),e.preventDefault();return}let i=e.key==="ArrowLeft"?-t.width*.2:e.key==="ArrowRight"?t.width*.2:0,s=e.key==="ArrowUp"?-t.height*.2:e.key==="ArrowDown"?t.height*.2:0;!i&&!s||(this.host.controller.clearSectionFocus(),this.host.controller.panToWorld({x:t.x+t.width/2+i,y:t.y+t.height/2+s}),e.preventDefault())}minimapJump(e){let t=this.minimapWorldPoint(e);if(t){for(let i of this.host.controller.getMinimapSnapshot().sections)if(!(i.state==="inactive"||i.outline.length<3)&&(0,$s.pointInPolygon)(t,i.outline)){this.host.controller.focusSection(i.id);return}this.host.controller.clearSectionFocus(),this.host.controller.panToWorld(t)}}};var di=require("@seatlayer/core");var ua=12;function zs(r,e){let t=e.floors(),i=new Set(t.map(k=>k.label.trim().toLocaleLowerCase())),s=e.zones().filter(k=>k.seatCount>0&&!i.has(k.label.trim().toLocaleLowerCase())),n=e.sections().filter(k=>k.seatCount>0&&!i.has(k.label.trim().toLocaleLowerCase())),o=s.length>1?[]:n,a=t.length>1,l=s.length>1,c=o.length>1;if(!a&&!l&&!c)return;let h=document.createElement("div");h.className="sl-view3d-nav";let p=document.createElement("button");p.type="button",p.className="sl-view3d-nav-toggle",p.setAttribute("aria-expanded","false");let d='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M15.5 8.5l-2 5-5 2 2-5z"/></svg>',u=document.createElement("span");p.innerHTML=d,p.appendChild(u);let g=k=>{h.classList.toggle("is-open",k),p.setAttribute("aria-expanded",String(k)),u.textContent=k?f("picker.closeVenueNav","Close"):a&&(l||c)?f("picker.levelsAndAreas","Levels & areas"):a?f("picker.levels","Levels"):f("picker.areas","Areas")};p.addEventListener("click",()=>g(!h.classList.contains("is-open"))),h.addEventListener("keydown",k=>{k.key!=="Escape"||!h.classList.contains("is-open")||(k.preventDefault(),k.stopPropagation(),g(!1),p.focus())}),g(!1),h.appendChild(p);let b=k=>{},x=k=>{};if(a){let k=document.createElement("div");k.setAttribute("role","group"),k.setAttribute("aria-label",f("picker.levels","Levels"));let S=[];x=M=>{S.forEach(P=>{P.setAttribute("aria-pressed",String((P.dataset.floor===""?null:Number(P.dataset.floor))===M))})};let C=M=>{e.focusFloor(M)&&(x(M),b(M))},A=(M,P)=>{let R=document.createElement("button");R.type="button",R.textContent=M,R.dataset.floor=P===null?"":String(P),R.setAttribute("aria-pressed",String(P===null)),R.addEventListener("click",()=>{C(P),g(!1)}),S.push(R),k.appendChild(R)};A(f("picker.allLevels","All levels"),null);for(let M of t)A(M.label||(0,di.t)("picker.levelNumber",{number:M.index+1}),M.index);h.appendChild(k)}if(l||c){let k=document.createElement("div");k.setAttribute("role","group"),k.setAttribute("aria-label",f("picker.areas","Areas"));let S=l?s.map(A=>({id:A.id,label:A.label||A.id,go:()=>{e.focusZone(A.id)}})):o.map(A=>({id:A.id,label:A.label||A.id,floorIndex:A.floorIndex,go:()=>{e.focusSection(A.id),Number.isFinite(A.floorIndex)&&x(A.floorIndex)}})),C=A=>{let M=l||A===null?S:S.filter(P=>P.floorIndex===void 0||P.floorIndex===A);if(k.replaceChildren(),!M.length){k.remove();return}if(k.isConnected||h.appendChild(k),!l&&M.length>ua){let P=document.createElement("select");P.setAttribute("aria-label",f("picker.jumpToSection","Jump to section"));let R=document.createElement("option");R.value="",R.textContent=f("picker.jumpToSection","Jump to section"),P.appendChild(R);for(let m of M){let v=document.createElement("option");v.value=m.id,v.textContent=m.label,P.appendChild(v)}P.addEventListener("change",()=>{M.find(m=>m.id===P.value)?.go()}),k.appendChild(P);return}for(let P of M){let R=document.createElement("button");R.type="button",R.textContent=P.label,R.addEventListener("click",()=>{P.go(),g(!1)}),k.appendChild(R)}};b=C,C(null)}r.appendChild(h)}var pi=class{constructor(e){this.host=e;this.chip=null}sync(){let e=this.host.overlay();if(!e||this.host.savedSeatIds().length===0){this.chip?.remove(),this.chip=null;return}let t=this.chip;if(!t){t=document.createElement("div"),t.className="sl-view3d-compare-saved",t.setAttribute("role","group"),t.setAttribute("aria-label",f("picker.savedSeatComparison","Saved seat comparison"));let n=document.createElement("button");n.type="button",n.className="main",n.addEventListener("click",()=>{this.host.savedSeatIds().length>1?this.host.openComparison():this.host.toast(f("picker.chooseAnotherToCompare","Choose another seat to compare."),"neutral")});let o=document.createElement("button");o.type="button",o.className="clear",o.textContent="\xD7",o.setAttribute("aria-label",f("picker.clearSavedSeatComparison","Clear saved seat comparison")),o.addEventListener("click",()=>this.host.clearComparison()),t.append(n,o),e.appendChild(t),this.chip=t}let i=this.host.savedSeatIds().length,s=t.querySelector(".main");s&&(s.textContent=i>1?(0,di.t)("picker.compareCount",{count:i}):f("picker.oneSeatSaved","1 seat saved"),s.setAttribute("aria-label",i>1?(0,di.t)("picker.openComparisonOfSeats",{count:i}):f("picker.oneSeatSavedChooseAnother","One seat saved; choose another to compare")))}remove(){this.chip?.remove(),this.chip=null}mainButton(){return this.chip?.querySelector(".main")??null}};function Ns(r){return!r?.querySelector('[data-ref="zfs"]')}var qi=require("@seatlayer/core");var ma=900,fa=450;function ga(r){switch(r){case"seat":return f("picker.stopYourSeat","Your seat");case"row":return f("picker.stopYourRow","Your row");case"section":return f("picker.stopYourSection","Your section");default:return f("picker.stopWholeVenue","Whole venue")}}function Vs(r,e){let t=document.createElement("button");t.type="button",t.className="sl-view3d-recentre sl-mo-rotate-in",t.textContent="\u25CE";let i=f("picker.recentreOnStage","Recentre on the stage");t.setAttribute("aria-label",i),t.title=i,t.addEventListener("click",()=>{e.handle()?.recentreSeatView()});let s=document.createElement("div");s.className="sl-view3d-stop",s.setAttribute("role","status"),s.setAttribute("aria-live","polite"),r.append(t,s);let n=null,o=null;return{onStopChange(a){if(n&&(clearTimeout(n),n=null),o&&(clearTimeout(o),o=null),!a){s.classList.remove("is-shown"),s.textContent="",o=setTimeout(()=>{o=null,r.classList.remove("is-seat-view")},fa);return}r.classList.add("is-seat-view"),s.textContent=ga(a),s.classList.add("is-shown"),n=setTimeout(()=>{n=null,s.classList.remove("is-shown")},ma)},dispose(){n&&(clearTimeout(n),n=null),o&&(clearTimeout(o),o=null),t.remove(),s.remove(),r.classList.remove("is-seat-view")}}}var ba=44,va=92;function Fs(r,e,t,i={}){let s=r?.sectionLabel,n=te(r),o=ya(r,e),a=[s,n?(0,qi.t)("picker.rowLabel",{label:n}):null,o?(0,qi.t)("picker.seatLabel",{label:o}):null].filter(Boolean).join(" \xB7 "),l=i.maxChars??(i.narrow?ba:va);for(let c of[t,i.shortTail??t,null]){let h=[a,c].filter(Boolean).join(" \xB7 ");if(h.length<=l||c==null)return h}return a}function ya(r,e){if(r?.seatNumber)return r.seatNumber;let t=r?.displayLabel??e,i=s=>{!s||!t.startsWith(s)||t.length<=s.length||(t=t.slice(s.length).replace(/^[\s·\-\/_]+/,""))};return i(r?.sectionLabel),i(te(r)),t}var js="sl:sheet-hint";function Gs(r){let e=r.boot;if(!e?.isConnected)return;if(r.reducedMotion){e.remove();return}e.classList.add("is-going"),setTimeout(()=>e.remove(),200);let t=document.createElement("div");t.className="sl-shells-in",t.setAttribute("aria-hidden","true"),r.map?.appendChild(t),setTimeout(()=>t.remove(),650),r.rail?.classList.add("is-in"),r.root?.classList.add("is-arriving"),setTimeout(()=>{r.rail?.classList.remove("is-in"),r.root?.classList.remove("is-arriving"),xa(r.root)},900)}function xa(r){if(!r||r.dataset.layout!=="narrow")return;try{if(window.sessionStorage.getItem(js))return;window.sessionStorage.setItem(js,"1")}catch{}let e=r.querySelector(".sl-sheet-grab");e&&(e.classList.add("sl-mo-hint"),e.addEventListener("animationend",()=>e.classList.remove("sl-mo-hint"),{once:!0}))}function Us(r,e){r.addEventListener("keydown",t=>{if(t.key==="Escape"){for(let i of e())if(i.open()){t.preventDefault(),t.stopPropagation(),i.close();return}}})}function kt(r){if(!r)return null;let e=r.getBoundingClientRect();return e.width>0&&e.height>0?e:null}function wa(r){return kt(r.peek?.querySelector(".sl-peek-sum"))??kt(r.foot?.querySelector(".sl-total"))??kt(r.tray)??kt(r.sheetHead)}function Yi(r,e,t,i){let s=r,n=s.map;if(!n||!e)return;let o=n.getBoundingClientRect(),a={x:o.left+e.x,y:o.top+e.y},l=t.displayLabel??t.label,c=i?.find(p=>p.key===t.categoryKey)?.color,h=()=>{let p=wa(s);p&&Sr({from:a,to:{x:p.left+p.width/2,y:p.top+p.height/2},label:l,color:c})};kt(s.peek)?requestAnimationFrame(h):h()}var Wi=60,ka=650;function Ks(r,e){if(!e.length)return;e.forEach((n,o)=>{r.schedule(()=>r.pop(n.id),o*Wi)});let t=e.length*Wi,i=e.find(n=>n.sectionId)?.sectionId;if(i){let n=e.filter(a=>a.sectionId===i),o={x:n.reduce((a,l)=>a+l.x,0)/n.length,y:n.reduce((a,l)=>a+l.y,0)/n.length};r.schedule(()=>r.focus(i,o),t)}let s=t+(i?ka:0);e.forEach((n,o)=>{r.schedule(()=>Yi(r.regions,r.screenPoint(n),n,r.categories),s+o*Wi)})}function Qi(r){return{renderingTimeMillis:r.ms,performanceProfile:r.performanceProfile,seatCount:r.seatCount,objectCount:r.objectCount,sectionCount:r.sectionCount,view:r.view,eventKey:r.eventKey,chartName:r.chartName,floorCount:r.floorCount,transport:r.transport,load:r.load,metricScope:r.metricScope,operationalTelemetryReporter:"sdk"}}function qs(r,e){ye({apiBase:r.apiBase,event:r.eventKey,scope:r.metricScope,surface:r.performanceGroup?"performance_group_picker":"seat_picker",outcome:"success",ms:r.ms,performanceProfile:r.performanceProfile,seats:r.seatCount,floors:r.floorCount,view:r.view,load:r.load,transport:r.transport}),e("chart_rendered",Qi(r))}var Ws=require("@seatlayer/core/core/seatConfidence");function X(r){return String(r??"").replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function Ys(r){let e=(0,Ws.seatConfidenceDisclosure)(r.seat.confidenceEvidence),t=r.seat.confidenceEvidence,i=e.limitations.length?`<h4>Known limits</h4><ul>${e.limitations.map(c=>`<li>${X(c)}</li>`).join("")}</ul>`:"",s=e.modeledTarget?`<div><dt>Modeled target</dt><dd>${X(e.modeledTarget)}</dd></div>`:"",n=t?`<div><dt>Evidence ID</dt><dd>${X(t.evidenceId)}</dd></div><div><dt>Model version</dt><dd>${X(t.modelVersion)}</dd></div><div><dt>Event configuration</dt><dd>${X(t.eventConfigurationId??"Not configuration-specific")}</dd></div><div><dt>Approval</dt><dd>${X(t.approvedByRole??"No external approval supplied")}</dd></div>`+(t.validUntil?`<div><dt>Valid until</dt><dd>${X(t.validUntil.slice(0,10))}</dd></div>`:""):"<div><dt>Evidence ID</dt><dd>None supplied</dd></div>",o=He(r.seat.commercial)||r.restrictionFallback,a=`<div><dt>View restriction</dt><dd>${X(o)}</dd></div>`+(r.seat.commercial?.note?`<div><dt>Organizer note</dt><dd>${X(r.seat.commercial.note)}</dd></div>`:""),l=r.canReport?'<button type="button" data-report>Report this view</button><p data-report-status role="status" aria-live="polite"></p>':"";return`<div class="sl-view3d-passport-scrim" aria-hidden="true"></div><section class="sl-view3d-passport" role="dialog" aria-modal="true" aria-labelledby="sl-view3d-passport-title"><header><div><span>Seat confidence passport</span><strong id="sl-view3d-passport-title">${X(r.title)}</strong></div><button type="button" data-close aria-label="Close seat confidence passport">\xD7</button></header><div class="sl-view3d-passport-summary"><strong>${X(e.headline)}</strong><span>${X(e.coverage)} \xB7 ${X(e.freshness)}</span></div><dl><div><dt>Model status</dt><dd>${X(e.model)}</dd></div><div><dt>Reality evidence</dt><dd>${X(e.reality)}</dd></div><div><dt>Source</dt><dd>${X(e.provenance)}</dd></div>`+a+s+n+`</dl>${i}<p class="sl-view3d-passport-note">This passport describes supplied evidence and known limits. It does not guarantee that every temporary obstruction or real-world condition is knowable before the event build.</p>`+l+"</section>"}function Qs(r){return r?r.closest("[data-report]")?"report":r.closest("[data-close]")||r.classList.contains("sl-view3d-passport-scrim")?"close":null:null}function hi(r,e,t){let i=r?.querySelector("[data-report]"),s=r?.querySelector("[data-report-status]");i&&(i.disabled=e!=="failed",i.textContent=e==="received"?"Report received":"Report this view"),s&&(s.setAttribute("role",e==="failed"?"alert":"status"),s.textContent=e==="sending"?"Sending report\u2026":e==="received"?`Report received. Reference ${t??""}.`:"The report could not be sent. Please try again.")}function Xi(r,e,t=null){let i=r.view3dEl;if(!i)return;St(r,!1);let s=e.confidenceEvidence,n=r.controller.seatDetails(e.id),o=document.createElement("div");o.className="sl-view3d-passport-shell",o.innerHTML=Ys({seat:e,title:n?.displayLabel??e.displayLabel??e.label,restrictionFallback:r.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),canReport:typeof r.api.reportViewEvidence=="function"});let a=[...new Set([...i.children,...[...r.els.map.children].filter(d=>d!==i)])].filter(d=>d instanceof HTMLElement),l=a.map(d=>({element:d,inert:d.inert,ariaHidden:d.getAttribute("aria-hidden")}));for(let d of a)d.inert=!0,d.setAttribute("aria-hidden","true");i.appendChild(o),i.classList.add("has-passport"),r.view3dPassportEl=o;let c=o.querySelector(".sl-view3d-passport"),h=()=>[...c.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],p=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),d.stopImmediatePropagation(),St(r);return}if(d.key!=="Tab")return;let u=h();if(!u.length)return;let g=u[0],b=u[u.length-1];d.shiftKey&&document.activeElement===g?(d.preventDefault(),b.focus()):!d.shiftKey&&document.activeElement===b&&(d.preventDefault(),g.focus())};window.addEventListener("keydown",p,!0),r.view3dPassportCleanup=()=>{window.removeEventListener("keydown",p,!0);for(let b of l)b.element.inert=b.inert,b.ariaHidden===null?b.element.removeAttribute("aria-hidden"):b.element.setAttribute("aria-hidden",b.ariaHidden);let d=t?.isConnected?t:r.confirmEl?.querySelector(".sl-confirm-confidence")??r.view3dCompareEl?.querySelector("[data-passport-seat]")??null,u=d?.closest(".sl-confirm,.sl-view3d-compare");u?.isConnected&&(u.inert=!1,u.removeAttribute("aria-hidden")),o.remove(),i.classList.remove("has-passport"),r.view3dPassportEl===o&&(r.view3dPassportEl=null);let g=d??r.view3dCompareEl?.querySelector("[data-passport-seat]")??r.confirmEl?.querySelector(".sl-confirm-confidence")??r.view3dCompareChip.mainButton();(t?.isConnected?t:g)?.focus()},o.addEventListener("click",d=>{let u=Qs(d.target instanceof HTMLElement?d.target:null);u==="close"&&St(r),u==="report"&&Sa(r,e)}),requestAnimationFrame(()=>h()[0]?.focus()),r.emit3dAnalytics("3d_confidence_passport_opened",{seatId:e.id,evidenceId:s?.evidenceId??null,eventConfigurationId:s?.eventConfigurationId??null,modelLevel:s?.modelLevel??"unverified",realityLevel:s?.realityLevel??"none"})}async function Sa(r,e){if(r.api.reportViewEvidence){hi(r.view3dPassportEl,"sending");try{let t=await r.api.reportViewEvidence(r.opts.event,{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId});r.emit3dAnalytics("3d_confidence_view_reported",{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId??null}),hi(r.view3dPassportEl,"received",t.report.id)}catch{hi(r.view3dPassportEl,"failed")}}}function St(r,e=!0){let t=r.view3dPassportCleanup;if(r.view3dPassportCleanup=null,!t){r.view3dPassportEl?.remove(),r.view3dPassportEl=null,r.view3dEl?.classList.remove("has-passport");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||r.root?.focus({preventScroll:!0})}function Xs(r){let e=r.view3dEl;if(!e||r.view3dCompareSeatIds.length<2)return;Ne(r,!1);let t=r.view3dCompareSeatIds.map(d=>r.view3dComparisonSnapshot(d)).filter(d=>!!d);if(t.length<2){r.clearView3dComparison();return}let i=d=>y(d),s=document.createElement("div");s.className="sl-view3d-compare-shell";let n=t.map((d,u)=>`<article><span>Seat ${u===0?"A":"B"}</span><strong>${i(d.label)}</strong><small>Section ${i(d.section)} \xB7 Row ${i(d.row)}</small><dl><div><dt>Current price</dt><dd>${i(d.price)}</dd></div><div><dt>Ticket type</dt><dd>${i(d.category)}</dd></div><div><dt>Availability</dt><dd>${i(d.availability)}</dd></div><div><dt>View source</dt><dd>${i(d.viewSource)}</dd></div><div><dt>View restriction</dt><dd>${i(d.limited)}</dd></div><div><dt>Seat confidence</dt><dd>${i(d.confidence.headline)}</dd></div><div><dt>Reality check</dt><dd>${i(d.confidence.reality)}</dd></div><div><dt>Accessibility</dt><dd>${i(d.accessibility)}</dd></div></dl><div class="sl-view3d-compare-actions"><button type="button" data-passport-seat="${i(d.seat.id)}">Passport</button><button type="button" data-view-seat="${i(d.seat.id)}">View seat</button><button type="button" class="select" data-select-seat="${i(d.seat.id)}"${d.selectable?"":" disabled"}>Select seat</button></div></article>`).join("");s.innerHTML=`<div class="sl-view3d-compare-scrim" aria-hidden="true"></div><section class="sl-view3d-compare" role="dialog" aria-modal="true" aria-labelledby="sl-view3d-compare-title"><header><div><span>Seat inspection</span><strong id="sl-view3d-compare-title">Compare disclosed attributes</strong></div><button type="button" data-close aria-label="Close seat comparison">\xD7</button></header><p class="sl-view3d-compare-note">Current price and availability come from this picker. Modeled views are chart-derived unless organizer media is labeled; SeatLayer does not invent why a seat has its price.</p><div class="sl-view3d-compare-grid">${n}</div></section>`;let o=document.activeElement instanceof HTMLElement?document.activeElement:null,a=[...e.children].filter(d=>d instanceof HTMLElement),l=a.map(d=>({element:d,inert:d.inert,ariaHidden:d.getAttribute("aria-hidden")}));for(let d of a)d.inert=!0,d.setAttribute("aria-hidden","true");e.appendChild(s),e.classList.add("has-comparison"),r.view3dCompareEl=s;let c=s.querySelector(".sl-view3d-compare"),h=()=>[...c.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],p=d=>{if(d.key==="Escape"){d.preventDefault(),Ne(r);return}if(d.key!=="Tab")return;let u=h();if(!u.length)return;let g=u[0],b=u[u.length-1];d.shiftKey&&document.activeElement===g?(d.preventDefault(),b.focus()):!d.shiftKey&&document.activeElement===b&&(d.preventDefault(),g.focus())};window.addEventListener("keydown",p),r.view3dCompareCleanup=()=>{window.removeEventListener("keydown",p);for(let d of l)d.element.inert=d.inert,d.ariaHidden===null?d.element.removeAttribute("aria-hidden"):d.element.setAttribute("aria-hidden",d.ariaHidden);s.remove(),e.classList.remove("has-comparison"),r.view3dCompareEl===s&&(r.view3dCompareEl=null),o?.isConnected?o.focus():r.view3dCompareChip.mainButton()?.focus()},s.querySelector("[data-close]")?.addEventListener("click",()=>Ne(r)),s.querySelectorAll("[data-passport-seat]").forEach(d=>d.addEventListener("click",()=>{let u=d.dataset.passportSeat,g=u?r.allSeats().find(b=>b.id===u):void 0;g&&Xi(r,g,d)})),s.querySelectorAll("[data-view-seat]").forEach(d=>d.addEventListener("click",()=>{let u=d.dataset.viewSeat;Ne(r,!1),u&&r.view3dHandle?.flyToSeat(u)})),s.querySelectorAll("[data-select-seat]").forEach(d=>d.addEventListener("click",()=>{let u=d.dataset.selectSeat;u&&Ta(r,u)})),requestAnimationFrame(()=>h()[0]?.focus()),r.emit3dAnalytics("3d_comparison_opened",{seatIds:r.view3dCompareSeatIds.slice()})}function Ne(r,e=!0){let t=r.view3dCompareCleanup;if(r.view3dCompareCleanup=null,!t){r.view3dCompareEl?.remove(),r.view3dCompareEl=null,r.view3dEl?.classList.remove("has-comparison");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||r.root?.focus({preventScroll:!0})}function Ta(r,e){if(r.salesClosed){r.toast(r.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let t=r.allSeats().find(s=>s.id===e);if(!t)return;if(Ne(r,!1),!r.controller.select([e]).length){r.syncSelectionTo3d(),r.toast(r.tf("picker.seatNoLongerAvailable","That seat is no longer available."),"warning");return}r.syncSelectionTo3d(),r.showConfirm(t),r.emit3dAnalytics("3d_comparison_selected",{seatId:e})}function Zs(r,e){r.querySelector(".sl-view3d-unavailable")?.remove();let{tf:t}=e,i=e.status==="held"?{title:t("picker.temporarilyHeld","Temporarily held"),message:t("picker.heldSeatExplanation","Another buyer is holding this seat. It may become available again.")}:e.status==="booked"?{title:t("picker.sold","Sold"),message:t("picker.soldSeatExplanation","This seat has already been booked.")}:{title:t("picker.notForSale","Not for sale"),message:t("picker.notForSaleExplanation","This seat is not included in the current sale.")},s=document.createElement("div");s.className="sl-view3d-unavailable",s.dataset.state=e.visualState,s.setAttribute("role","status"),s.setAttribute("aria-live","polite");let n=document.createElement("span");n.className="sl-view3d-unavailable-eyebrow",n.textContent=e.location;let o=document.createElement("strong");o.textContent=i.title;let a=document.createElement("div");a.className="sl-view3d-unavailable-copy",a.append(n,o);let l=document.createElement("button");l.type="button",l.setAttribute("aria-label",t("picker.closeSeatStatus","Close seat status")),l.textContent="\xD7";let c=document.createElement("p");c.textContent=i.message,s.append(a,l,c),l.addEventListener("click",()=>Zi(r)),r.appendChild(s),Ft(s,e.anchor??null)}function Zi(r){let e=r?.querySelector(".sl-view3d-unavailable:not([data-leaving])");e&&(e.dataset.leaving="true",Ee(e))}var Tt=require("@seatlayer/core");function Js(r){return Array.isArray(r)?r.reduce((e,t)=>t.type==="minimumSelectedPlaces"?Math.max(e,t.minimum):e,0):0}function Ji(r,e,t=!1){let i=r.violations[0];return i==="numberOfPlacesToSelect"?r.remaining>0?(0,Tt.t)("picker.selectExactMore",{count:r.remaining}):(0,Tt.t)("picker.selectExactCount",{count:r.required}):i==="minimumSelectedPlaces"?(0,Tt.t)("picker.selectMinimumMore",{count:r.remaining}):t?e("picker.adjustSeatSelection","Adjust seat selection"):i==="consecutiveSeats"?e("picker.selectSeatsTogether","Choose seats together in the same row and ticket category."):(0,Tt.t)("picker.orphanHint")}var pe=require("@seatlayer/core");function Ct(r){let e=Math.max(0,r),t=Math.floor(e/6e4),i=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return`${t}:${i}`}function en(r){let e=r.performanceLabel?`<div class="sl-chip-when">${O(r.performanceLabel)}</div>`:"",t=r.performanceDates?.labels.length?`<div class="sl-chip-dates"><span class="sl-chip-dates-summary">${O(r.performanceDates.summary)}</span><span class="sl-chip-date-list">${r.performanceDates.labels.map(i=>`<span class="sl-chip-date">${O(i)}</span>`).join("")}</span></div>`:"";return e+Ca(r)+t}function Ca({d:r,area:e,label:t,objectType:i,quantity:s=1,identity:n}){let o=h=>String(h??"\u2014").replace(/[&<>"]/g,p=>({"&":"&","<":"<",">":">",'"':"""})[p]),a=i==="ga"?"ga":r?.objectType??i,l=n?.displayType?.trim()||r?.displayType?.trim()||e?.displayType?.trim()||(a==="table"?f("picker.table","Table"):a==="booth"?f("picker.booth","Booth"):a==="ga"?f("picker.generalAdmission","General admission"):f("picker.row","Row")),c=n?.rowLabel??n?.displayLabel??r?.rowLabel??r?.displayLabel??e?.displayLabel??e?.label??t;return a==="table"&&n?.bookingMode?`<div class="sl-chip-id"><span class="fld sec"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(c)}</span></span><span class="fld mid"><span class="sl-chip-eb">${f("picker.guests","Guests")}</span><span class="val">${s}</span></span></div>`:a==="ga"?`<div class="sl-chip-id"><span class="fld sec"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(c)}</span></span>`+(s>1?`<span class="fld mid"><span class="sl-chip-eb">${f("picker.tickets","Tickets")}</span><span class="val">${s}</span></span>`:"")+"</div>":a==="booth"?'<div class="sl-chip-id">'+(r?.sectionLabel?`<span class="fld sec"><span class="sl-chip-eb">${f("picker.section","Section")}</span><span class="val">${o(r.sectionLabel)}</span></span>`:"")+`<span class="fld mid"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(c)}</span></span></div>`:!r?.sectionLabel&&!r?.rowLabel&&!r?.seatNumber?`<div class="sl-chip-id"><span class="fld sec"><span class="sl-chip-eb">${f("picker.seat","Seat")}</span><span class="val">${o(c)}</span></span></div>`:'<div class="sl-chip-id">'+(r.sectionLabel?`<span class="fld sec"><span class="sl-chip-eb">${f("picker.section","Section")}</span><span class="val">${o(r.sectionLabel)}</span></span>`:"")+(r.rowLabel?`<span class="fld mid"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(te(r))}</span></span>`:"")+(r.seatNumber?`<span class="fld mid"><span class="sl-chip-eb">${f("picker.seat","Seat")}</span><span class="val">${o(r.seatNumber)}</span></span>`:"")+"</div>"}function er(r,e){let t=O(r),i=e?O(e):"";return`<div class="sl-chip-rail"><button type="button" class="rm" aria-label="${t}"><svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button>`+(e?`<button type="button" class="view" data-view-label="${i}" aria-label="${O((0,pe.t)("picker.viewFromSeat",{label:e}))}"><svg viewBox="0 0 24 24"><path d="M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z"/><circle cx="12" cy="12" r="3"/></svg></button>`:"")+"</div>"}function tn(r){return r.salesClosed||r.hasHold||r.ctaPhase!=="idle"||r.formOpen||r.room<=0?null:Math.max(1,Math.min(r.wanted,r.room))}function rn({count:r,total:e,pendingCount:t,ctaPhase:i,hasHold:s,salesClosed:n,fromPrice:o,addMore:a,holdTime:l,money:c}){return r&&i==="holding"?`<span>${f("picker.securingSeats","Securing your seats\u2026")}</span>`:r&&i==="checkout"?`<span>${(0,pe.t)("picker.peekSecured",{count:r,total:c(e)})}</span>`:r?`<span class="sl-peek-sum">${(0,pe.tCount)("picker.ticketsCount",r)}</span>`+(a?`<button type="button" class="go ghost sl-sheet-go sl-sheet-best" data-act="best" aria-label="${f("picker.findTogetherInstead","Find seats together instead")}">\u2726</button>`:"")+`<button type="button" class="go sl-sheet-go" data-act="checkout">${s&&t?f("picker.secureMore","Secure more"):f("picker.continue","Continue")}<span class="sl-peek-total">${c(e)}</span>`+(s&&l?`<span class="sl-peek-time" aria-hidden="true">${l}</span>`:"")+"</button>":n?`<span>${f("picker.salesClosedPill","Sales are closed")}</span>`:o!=null?`<span>${(0,pe.t)("picker.peekFromPrice",{price:c(o)})}</span>`:`<span>${f("picker.pickYourSeats","Pick your seats")}</span>`}function tr(r,e=Date.now()){return(0,pe.t)("picker.holdReassurance",{time:Ct(r-e)})}function sn(r){return r.confirming?`<div class="sl-ba" role="alert"><div class="sl-ba-title"><span class="spark" aria-hidden="true">\u2726</span>${f("picker.replaceCurrentChoices","Replace your current choices?")}</div><div class="sl-ba-replace"><b>${(0,pe.t)("picker.willFindSeatsTogether",{count:r.quantity})}</b><span>${f("picker.manualTicketsRemovedNote","Your manually selected tickets will be removed only after a new group is secured.")}</span></div><div class="sl-ba-actions"><button type="button" data-ba-cancel>${f("picker.keepMine","Keep mine")}</button><button type="button" class="replace" data-ba-replace>${f("picker.findNewSeats","Find new seats")}</button></div></div>`:`<div class="sl-ba"><div class="sl-ba-title"><span class="spark" aria-hidden="true">\u2726</span>${f("picker.findBestSeatsTogether","Find the best seats together")}</div><div class="sl-ba-copy"><span class="wide">${f("picker.willChooseClosestGroup","We\u2019ll choose the closest available group for you.")}</span><span class="narrow">${f("picker.closestGroupChosenInstantly","Closest available group, chosen instantly.")}</span></div>`+(r.offerPremium?`<button type="button" class="sl-ba-premium${r.premium?" on":""}" data-ba-premium aria-pressed="${r.premium?"true":"false"}"><span class="star" aria-hidden="true">\u2605</span>${f("picker.bestSeatsPremium","Best seats")}</button>`:"")+(r.categories.length>1?`<select aria-label="${O(f("picker.preferredTicketType","Preferred ticket type"))}" data-ba-cat><option value="">${O(f("picker.anyTicketType","Any ticket type"))}</option>`+r.categories.map(e=>`<option value="${O(e.key)}"${r.selectedCategory===e.key?" selected":""}>${O(e.label)}</option>`).join("")+"</select>":'<span aria-hidden="true"></span>')+(r.zones.length?`<select aria-label="${f("picker.preferredVenueZone","Preferred venue zone")}" data-ba-zone><option value="">${f("picker.anyVenueZone","Any venue zone")}</option>`+r.zones.map(e=>`<option value="${O(e.id)}"${r.selectedZone===e.id?" selected":""}>${O(e.label)}</option>`).join("")+"</select>":"")+`<div class="sl-ba-qty"><button type="button" data-ba="-1" aria-label="${f("picker.fewerSeats","Fewer seats")}">\u2212</button><span>${r.quantity}</span><button type="button" data-ba="1" aria-label="${f("picker.moreSeats","More seats")}">+</button></div><button type="button" class="sl-ba-go${r.busy?" sl-busy":""}"${r.busy?" disabled":""}>`+(r.busy?`<span class="sl-ba-spin" aria-hidden="true"></span>${f("picker.findingBestSeats","Finding the best seats\u2026")}`:(0,pe.tCount)("picker.findBestSeatsCount",r.quantity))+"</button>"+(r.reopened?`<button type="button" class="sl-ba-back" data-ba-close>${f("picker.keepMyPicks","Keep my picks")}</button>`:"")+"</div>"}function nn(r){if(r.salesClosed&&!r.hasPicks){let e=r.whenText?`<span class="when">${O(r.whenText)}</span>`:"";return`<div class="sl-closed-note" role="status"><b>${f("picker.salesClosedPill","Sales are closed")}</b><span>${f("picker.salesClosedCopy","Ticket sales for this event have ended.")}${e}</span></div>`}return r.hasPicks?"":r.hasGaAreas?`<div class="sl-tray-hint">${r.seated?f("picker.trayHintTapOrStanding","Tap a seat on the map \u2014 or grab standing tickets below."):f("picker.gaTrayHintTapArea","Tap an area on the map to choose tickets.")}</div>`:`<div class="sl-tray-hint">${r.groupMode==="per_performance"?f("picker.groupPerPerformanceTrayHint","Choose seats for this performance, then complete every date above."):r.groupMode?f("picker.groupTrayHint","Choose seats once \u2014 the same seats will be held for every performance."):f("picker.trayHintTapOrBest","Tap a seat on the map, or let us pick the best available for you.")}</div>`}function on(r){return{title:(0,pe.t)("picker.securedCount",{count:r.secured}),copy:r.pendingCount?(0,pe.t)("picker.moreSelectedCount",{count:r.pendingCount}):tr(r.expiresAt),change:r.releasing?f("picker.releasingEllipsis","Releasing\u2026"):f("picker.change","Change")}}var Et=require("@seatlayer/core");var ir=4,Ea=6;function Aa(r){let e=r.trim();return/^[0-9]{1,4}$/.test(e)?Number(e):null}function an(r){return[r.held?"h":"s",r.section,r.rowLabel,r.categoryLabel,r.amountText].join(" ")}function Pa(r){if(r.length===1)return r[0];let e=r.map(Aa);if(e.every(i=>i!==null)){let i=[...e].sort((o,a)=>o-a);if(i.every((o,a)=>a===0||o===i[a-1]+1))return`${i[0]}\u2013${i[i.length-1]}`;let n=i.slice(0,3).join(", ");return i.length>3?`${n} +${i.length-3}`:n}let t=r.slice(0,3).join(", ");return r.length>3?`${t} +${r.length-3}`:t}function Ma(r){let e=[];for(let t of r){let i=e[e.length-1];!!i&&t.groupable&&i.members[0].groupable&&an(i.members[0])===an(t)?i.members.push(t):e.push({members:[t],seatsLabel:""})}for(let t of e)t.seatsLabel=Pa(t.members.map(i=>i.seatLabel));return e}function cn(r,e,t,i){let s=O;return` data-key="${s(r)}"`+(t.length?` data-held="${s(encodeURIComponent(t.join(`
|
|
2236
|
+
`)))}"`:"")+(e.length?` data-seat="${s(e.join(" "))}"`:"")+(i?` data-locate="${s(i)}"`:"")}function dn(r){let e=O;return`<div class="sl-chip${r.held?" sl-held":""}${r.fresh?" sl-enter":""}"`+cn(r.key,r.seatIds,r.heldLabels,r.locateId)+`><div class="sl-chip-main">${r.identityHtml}<div class="sl-chip-sub">${r.stateHtml}<span class="cat">${e(r.categoryLabel)}</span>${r.extrasHtml}`+(r.amountText?`<span class="amt">${e(r.amountText)}</span>`:"")+`</div>${r.noteHtml}</div>${r.railHtml}</div>`}function ln(r,e,t,i,s){let n=O,o=e?.members.length??1,a=o>1,l=e?e.seatsLabel:r.seatLabel,c=e?e.members.reduce((d,u)=>d+u.amount,0):r.amount,h=e?e.members.flatMap(d=>d.seatIds):r.seatIds,p=e?e.members.flatMap(d=>d.heldLabels):r.heldLabels;return`<div class="sl-chip sl-tline${r.held?" sl-held":""}${r.fresh?" sl-enter":""}${e?"":" sl-tsub"}"${i?' data-overflow="true"':""}`+(e?` data-run="${t}"`:` data-run-of="${t}"`)+cn(r.key,h,p,r.locateId)+">"+(a?`<button type="button" class="sl-trun-toggle" aria-expanded="false" aria-label="${n((0,Et.tCount)("picker.seatsSelectedCount",o))}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9 6l6 6-6 6"/></svg></button>`:r.held?r.stateHtml:`<span class="sl-tline-dot" style="background:${y(r.categoryColor)}" aria-hidden="true"></span>`)+`<span class="sl-sr">${n(r.categoryLabel)}</span><span class="sl-tline-id"><b>${n(r.section||r.seatLabel)}</b>`+(r.rowLabel?`<i>\xB7</i><span>${n(r.rowLabel)}</span>`:"")+(r.section&&l?`<i>\xB7</i><span>${n(l)}</span>`:"")+"</span>"+r.extrasHtml+(s.suppressPricing||!r.amountText?"":(a?`<span class="sl-tline-mult">${o}\xD7</span>`:"")+`<span class="amt">${n(s.money(c))}</span>`)+(r.railHtml?`<button type="button" class="rm" aria-label="${n(r.removeAria)}"><svg viewBox="0 0 24 24" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button>`:"")+"</div>"}function pn(r,e){if(!r.length)return"";let t=Ma(r),i=[f("picker.section","Section"),f("picker.row","Row"),f("picker.seat","Seat")].join(" \xB7 "),s=t.length>=Ea,n=t.map((a,l)=>{let c=s&&l>=ir;return ln(a.members[0],a,l,c,e)+(a.members.length>1?a.members.map(h=>ln(h,null,l,c,e)).join(""):"")}).join(""),o=s?`<button type="button" class="sl-tmore" data-tmore aria-expanded="false" data-more="${O((0,Et.t)("picker.moreCount",{count:t.length-ir}))}" data-less="${O(f("picker.showLess","Show less"))}"><span>${O((0,Et.t)("picker.moreCount",{count:t.length-ir}))}</span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></button>`:"";return`<div class="sl-tlist"${s?' data-collapsed="true"':""}><div class="sl-tlist-head sl-sr">${O(i)}</div>${n}${o}</div>`}function hn(r){r.dataset.denseWired!=="true"&&(r.dataset.denseWired="true",r.addEventListener("click",e=>{let t=e.target,i=t.closest("[data-tmore]");if(i){let l=i.closest(".sl-tlist"),c=l?.getAttribute("data-collapsed")==="true";l?.setAttribute("data-collapsed",c?"false":"true"),i.setAttribute("aria-expanded",c?"true":"false");let h=i.querySelector("span");h&&(h.textContent=(c?i.dataset.less:i.dataset.more)??h.textContent);return}let s=t.closest(".sl-trun-toggle");if(!s)return;e.stopPropagation();let n=s.closest(".sl-tline"),o=n?.dataset.run;if(!n||o===void 0)return;let a=s.getAttribute("aria-expanded")!=="true";s.setAttribute("aria-expanded",a?"true":"false"),n.setAttribute("data-open",a?"true":"false"),n.parentElement?.querySelectorAll(`.sl-tsub[data-run-of="${o}"]`).forEach(l=>l.setAttribute("data-open",a?"true":"false"))}))}var un=require("@seatlayer/core");var ui=class{constructor(e,t){this.active=new Set;this.deps=t,this.root=document.createElement("div"),this.root.className="sl-a11y",this.button=document.createElement("button"),this.button.type="button",this.button.className="sl-a11ybtn",this.button.setAttribute("aria-haspopup","true"),this.button.setAttribute("aria-expanded","false"),this.button.setAttribute("aria-label",t.tf("picker.accessibilityOptions","Accessibility and colour options")),this.button.innerHTML='<span aria-hidden="true">\u267F</span>',this.menu=document.createElement("div"),this.menu.className="sl-a11ymenu",this.menu.hidden=!0;for(let i of this.stored())t.present.has(i)&&this.active.add(i);this.menu.innerHTML=Is(this.rows()),this.root.append(this.menu,this.button),e.appendChild(this.root),this.button.addEventListener("click",i=>{i.stopPropagation(),this.open(this.menu.hidden)}),this.menu.addEventListener("pointerdown",i=>i.stopPropagation()),this.menu.addEventListener("click",i=>i.stopPropagation()),this.dismiss=()=>this.open(!1),this.escape=i=>{i.key==="Escape"&&this.open(!1)},document.addEventListener("pointerdown",this.dismiss),document.addEventListener("keydown",this.escape),this.wire(),this.active.size&&this.applyFilter()}colorblindRow(){return this.menu.querySelector(".sl-cbbtn")}syncAccessibilityFilter(e){this.active.clear();for(let t of e??[])this.active.add(t);this.remember(e&&e.length?e:null);for(let t of this.menu.querySelectorAll("[data-a11y-row]")){let i=t.dataset.a11yRow??"";i.startsWith("a11y:")&&this.paint(t,this.active.has(i.slice(5)))}}destroy(){document.removeEventListener("pointerdown",this.dismiss),document.removeEventListener("keydown",this.escape),this.root.remove()}open(e){if(e===!this.menu.hidden)return;if(this.button.setAttribute("aria-expanded",String(e)),!e){this.menu.hidden=!0,this.menu.classList.remove("sl-mo-in","sl-mo-stagger");return}this.menu.hidden=!1;let t=this.button.getBoundingClientRect();Ei(this.menu,{x:t.left+t.width/2,y:t.top}),wr(this.menu),Ft(this.menu)}rows(){return[...this.filterRows(),...this.deps.hasLimitedView?[{key:"limited",icon:"\u25D0",label:this.deps.tf("picker.hideLimitedView","Hide limited-view seats"),on:this.deps.isLimitedViewHidden()}]:[],{key:"colorblind",icon:"\u25D0",className:"sl-cbbtn",label:this.deps.tf("picker.colorblindColors","Colourblind-friendly colours"),on:this.deps.isColorblindSafe()}]}filterRows(){return un.ACCESSIBILITY_TYPES.filter(({key:e})=>this.deps.present.has(e)).map(({key:e,label:t,icon:i})=>({key:`a11y:${e}`,icon:i,label:t,...e==="wheelchair"&&this.deps.present.has("companion")?{note:this.deps.tf("picker.companionSeatsNote","Companion places beside them stay selectable")}:{},on:this.active.has(e)}))}wire(){for(let e of this.menu.querySelectorAll("[data-a11y-row]"))e.addEventListener("click",()=>{let t=e.dataset.a11yRow??"";if(t==="colorblind"){let n=!this.deps.isColorblindSafe();this.deps.setColorblindSafe(n),this.paint(e,n);return}if(t==="limited"){let n=!this.deps.isLimitedViewHidden();this.deps.setLimitedViewHidden(n),n&&this.deps.focusSeatsForFilter(),this.paint(e,n);return}let i=t.slice(5),s=!this.active.has(i);s?this.active.add(i):this.active.delete(i),this.paint(e,s),this.applyFilter()})}paint(e,t){e.classList.toggle("on",t),e.setAttribute("aria-checked",String(t)),e.setAttribute("aria-pressed",String(t))}applyFilter(){let e=this.active.size?[...this.active]:null;this.deps.applyAccessibilityFilter(e),this.remember(e),e&&this.deps.focusSeatsForFilter()}key(){return`seatmap.a11y.filter.${this.deps.event}`}stored(){try{let e=window.sessionStorage.getItem(this.key()),t=e?JSON.parse(e):null;return Array.isArray(t)?t:[]}catch{return[]}}remember(e){try{e&&e.length?window.sessionStorage.setItem(this.key(),JSON.stringify(e)):window.sessionStorage.removeItem(this.key())}catch{}}};var mn=Symbol("seatlayer.performance-group-picker");function fn(r,e){return Object.defineProperty(r,mn,{configurable:!1,enumerable:!1,value:Object.freeze({...e})}),r}function gn(r){return r[mn]??null}var Re=require("@seatlayer/core");function rr(r,e,t){try{return new Intl.DateTimeFormat(e,{...t,...r.timezone?{timeZone:r.timezone}:{}}).format(new Date(r.startsAt))}catch{return new Date(r.startsAt).toLocaleString(e)}}var mi=(r,e)=>rr(r,e,{dateStyle:"medium"}),fi=(r,e)=>rr(r,e,{timeStyle:"short"}),gi=(r,e)=>rr(r,e,{weekday:"short",day:"numeric",month:"short"});function bn(r,e,t,i){return!r.length||r.length>=e?null:{summary:i,labels:r.map(s=>`${mi(s,t)} \xB7 ${fi(s,t)}`)}}function La(r,e){let t=new Set(e);return r.map(i=>({...i,free:!t.has(i.eventKey)}))}function vn(r,e){let t=[...r];if(t.length<=1)return t[0]??"";try{return new Intl.ListFormat(e,{style:"long",type:"conjunction"}).format(t)}catch{return t.join(", ")}}function Ha(r,e,t="",i=!1){if(!r.length)return"";let s=r.map(n=>{let o=n.free?e.free:e.blocked,a=i&&n.free?`<input class="sl-night-choice" type="checkbox" data-pg-event-key="${y(n.eventKey)}" aria-label="${y(`${n.shortDate}: ${o}`)}" checked>`:"";return`<li class="sl-night${n.free?" ok":" no"}" aria-label="${y(`${n.shortDate}: ${o}`)}">`+a+`<i class="sl-night-dot" aria-hidden="true"></i><span class="d">${y(n.shortDate)}</span><span class="st">${y(o)}</span></li>`}).join("");return`<div class="sl-tip-nights"><div class="sl-tip-nights-title">${y(e.title)}</div><ul class="sl-nightstrip">${s}</ul><p class="sl-tip-nights-note">${y(e.notAvailableOn)}</p>`+t+"</div>"}function Ra(r){return r.selectPartialLabel&&r.pinned?`<button type="button" class="sl-tip-switch" data-pg-select-partial>${y(r.selectPartialLabel)}</button>`:r.switchLabel&&r.pinned?`<button type="button" class="sl-tip-switch" data-pg-switch-mode>${y(r.switchLabel)}</button>`:r.switchLabel||r.selectPartialLabel?"":`<p class="sl-tip-advice">${y(r.advice)}</p>`}function Oa(r){return Number(r.available)+Number(r.selected)+Number(r.partial)+Number(r.unavailable)}function yn(r,e,t){if(Oa(r)<2)return"";let i=(n,o,a="")=>`<li class="sl-pg-legend-item"><i class="sl-pg-sw ${n}"${a}></i>${y(o)}</li>`,s=[];return r.available&&s.push(i("sl-pg-sw-free",e.available,` style="background:${y(t)}"`)),r.selected&&s.push(i("sl-pg-sw-sel",e.selected)),r.partial&&s.push(i("sl-pg-sw-split",e.partial,` style="--sl-pg-sw-cat:${y(t)}"`)),r.unavailable&&s.push(i("sl-pg-sw-off",e.unavailable)),`<ul class="sl-pg-legend-list" aria-label="${y(e.title)}">${s.join("")}</ul>`}function xn(r,e){if(!r.length)return"";let t=r.map(i=>{let s=i.labels.length?i.labels.join(", "):e.empty;return`<li class="sl-pg-night-row${i.labels.length?"":" empty"}${i.active?" active":""}" role="button" tabindex="0"${i.active?' aria-current="true"':""} data-event-key="${y(i.eventKey)}"><span class="n">${y(i.name)}</span><span class="s">${y(s)}</span></li>`}).join("");return`<div class="sl-pg-nights" role="group" aria-label="${y(e.title)}"><div class="sl-pg-nights-title">${y(e.title)}</div><ul class="sl-pg-nights-list">${t}</ul></div>`}function sr(r,e){if(r?.kind!=="partial"||!e?.length)return null;let t=r.data?.blockedEventKeys??[],i=La(e,t);return{states:i,missing:i.filter(s=>!s.free).map(s=>s.shortDate)}}function wn(r,e){return r?Ha(r.states,{title:f("picker.group.partlyAvailableTitle","Free on some nights only"),free:f("picker.group.nightFree","Free"),blocked:f("picker.group.nightBlocked","Not available"),notAvailableOn:(0,Re.t)("picker.group.notAvailableOn",{dates:vn(r.missing,e.locale)})},Ra({switchLabel:e.switchLabel??null,selectPartialLabel:e.selectPartialLabel??null,pinned:e.pinned,advice:f("picker.group.pickSeatFreeEveryNight","Pick a seat that is free every night.")}),!!e.selectPartialLabel&&!!e.pinned):""}function Ia(r,e,t,i){if(!r.length)return"";let s=new Set(e),n=new Set(t),o=r.map(a=>{let l=s.has(a.eventKey);return`<li class="sl-confirm-date${l?"":" blocked"}"><label><input type="checkbox" data-pg-confirm-event-key="${y(a.eventKey)}" aria-label="${y(`${a.shortDate}: ${l?i.available:i.unavailable}`)}"${l&&n.has(a.eventKey)?" checked":""}${l?"":" disabled"}><span class="sl-confirm-date-label">${y(a.shortDate)}</span><span class="sl-confirm-date-state">${y(l?i.available:i.unavailable)}</span></label></li>`}).join("");return`<fieldset class="sl-confirm-dates" data-pg-confirm-dates><legend>${y(i.title)}</legend><p class="sl-confirm-dates-copy">${y(i.copy)}</p><label class="sl-confirm-date-all"><input type="checkbox" data-pg-confirm-all><span>${y(i.selectAll)}</span></label><ul>${o}</ul><p class="sl-confirm-dates-summary" data-pg-confirm-summary aria-live="polite"></p></fieldset>`}function kn(r,e,t,i){let s=e.availableEventKeys(t);return Ia(r,s,e.includedEventKeys(),{title:i("picker.group.confirmDatesTitle","Choose performance dates"),copy:s.length===r.length?i("picker.group.confirmAllDatesCopy","This seat is available for all {count} dates. Keep all selected, or remove dates you do not want.").replace("{count}",String(r.length)):i("picker.group.confirmPartialDatesCopy","This seat is available for {available} of {total} dates. Choose one date or keep every available date.").replace("{available}",String(s.length)).replace("{total}",String(r.length)),selectAll:i("picker.group.confirmSelectAll","Select all available dates"),available:i("picker.group.nightFree","Available"),unavailable:i("picker.group.nightBlocked","Unavailable")})}function Sn(r){return[...r.querySelectorAll("[data-pg-confirm-event-key]")].filter(e=>e.checked&&!e.disabled).map(e=>e.dataset.pgConfirmEventKey).filter(Boolean)}function Tn(r,e,t,i){let s=[...r.querySelectorAll("[data-pg-confirm-event-key]")];if(!e||!s.length)return;let n=r.querySelector(".sl-confirm-add"),o=r.querySelector("[data-pg-confirm-all]"),a=()=>{let l=s.filter(p=>!p.disabled),c=Sn(r).length;o&&(o.checked=c===l.length,o.indeterminate=c>0&&c<l.length);let h=r.querySelector("[data-pg-confirm-summary]");h&&(h.textContent=c===l.length?t("picker.group.confirmAllSelected","All {count} available dates are selected.").replace("{count}",String(c)):t("picker.group.confirmSelectedOfAvailable","{selected} of {available} available dates selected.").replace("{selected}",String(c)).replace("{available}",String(l.length))),n.disabled=c===0,n.textContent=c?e.label(c):t("picker.group.confirmChooseOne","Choose at least 1 date"),i()};s.forEach(l=>l.addEventListener("change",a)),o?.addEventListener("change",()=>{s.filter(l=>!l.disabled).forEach(l=>{l.checked=o.checked}),a()}),a()}async function Cn(r,e,t){if(!r||!t||!r.querySelector("[data-pg-confirm-event-key]"))return!0;let i=Sn(r);if(!i.length)return!1;let s=r.querySelector(".sl-confirm-add");return s?.setAttribute("aria-busy","true"),s&&(s.disabled=!0),await t.apply(e,i)?!0:(s?.removeAttribute("aria-busy"),s?.isConnected&&(s.disabled=!1),!1)}function En(r,e,t){return r?(0,Re.t)("picker.group.seatPartlyAvailable",{label:e,free:r.states.length-r.missing.length,total:r.states.length,dates:vn(r.missing,t)}):""}function An(r,e){let t=r.map((i,s)=>{let n=i.state==="done"?e.done:i.state==="current"?e.current:e.upcoming;return`<li class="sl-pg-step-item" data-step="${y(i.id)}" data-state="${y(i.state)}"${i.state==="current"?' aria-current="step"':""}><span class="i" aria-hidden="true">${i.state==="done"?"\u2713":String(s+1)}</span><span class="l">${y(i.label)}</span><span class="sl-pg-sr">${y(n)}</span></li>`}).join("");return`<ol class="sl-pg-steps" aria-label="${y(e.label)}">${t}</ol>`}function nr(r,e){return`<ul class="sl-pg-cards">${r.map(i=>`<li class="sl-pg-card" data-event-key="${y(i.eventKey)}"><span class="n">${y(i.name)}</span><time datetime="${y(i.iso)}"><span class="d">${y(i.date)}</span><span class="t">${y(i.time)}</span></time></li>`).join("")}</ul><p class="sl-pg-included">${y(e)}</p>`}function Pn(r){let e=r.rows.map(t=>`<li class="sl-pg-pane-row${t.labels.length?"":" empty"}" data-event-key="${y(t.eventKey)}"><span class="n">${y(t.name)}</span><span class="s">${y(t.labels.length?t.labels.join(", "):r.empty)}</span></li>`).join("");return`<div class="sl-pg-pane-title">${y(r.title)}</div><ul class="sl-pg-pane-list">${e}</ul>`+(r.note?`<p class="sl-pg-pane-note">${y(r.note)}</p>`:"")+(r.total?`<div class="sl-pg-pane-total"><span>${y(r.total.label)}</span><b>${y(r.total.amount)}</b></div>`:"")+(r.holdStatus?`<p class="sl-pg-hold-status" role="status">${y(r.holdStatus)}</p>`:"")}function Mn(r){let e=Math.max(0,r);return`${Math.floor(e/6e4)}:${String(Math.floor(e/1e3)%60).padStart(2,"0")}`}function Ln(r,e){if(!r||r.seats<=0)return"";if(e==="same_seat"){let t=r.perPerformance??r.seats;return r.totalPerformances&&r.performances<r.totalPerformances?(0,Re.tCount)("picker.group.performancesChosenOf",t,{chosen:r.performances,total:r.totalPerformances}):(0,Re.tCount)("picker.group.seatsEveryPerformance",t)}return r.perPerformance!=null&&r.performancesChosen===r.performances?(0,Re.tCount)("picker.group.seatsPerPerformance",r.seats,{per:r.perPerformance}):(0,Re.tCount)("picker.group.performancesChosenOf",r.seats,{chosen:r.performancesChosen,total:r.performances})}function Hn(r,e){r.querySelectorAll(".sl-pg-night-row[data-event-key]").forEach(t=>{let i=()=>e(t.dataset.eventKey);t.addEventListener("click",i),t.addEventListener("keydown",s=>{s.key!=="Enter"&&s.key!==" "||(s.preventDefault(),i())})})}var Rn=require("@seatlayer/core");function fe(r){return String(r??"\u2014").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function _a(r,e){let t=r.objectType==="table"&&!!r.bookingMode,i=r.objectType==="booth",s=t||i||!r.seatNumber,n=s?r.rowLabel??r.displayLabel??r.label:r.seatNumber,o=t?`${f("picker.guests","Guests")} ${r.bookingMode==="variable"?`${r.minOccupancy}\u2013${r.maxOccupancy}`:r.capacity}`:!i&&r.rowLabel?`${e} ${te(r)??""}`.trim():"";return`<div class="sl-tip-head"><div class="sl-tip-id"><span class="sl-tip-seat${s?" name":""}">${fe(n)}</span>`+(o?`<span class="sl-tip-row">${fe(o)}</span>`:"")+"</div>"+(r.sectionLabel?`<div class="sl-tip-sec"><span class="sl-tip-eyebrow">${f("picker.section","Section")}</span><span class="sl-tip-secname">${fe(r.sectionLabel)}</span></div>`:"")+"</div>"}function On(r,e){let t=r.status==="not_for_sale",i=r.mark?.kind==="partial",s=r.status==="free"||i?"":`<span class="sl-tip-tag">${t?f("picker.notAvailable","Not available"):r.status==="held"?(0,Rn.t)("map.statusHeld"):f("picker.sold","Sold")}</span>`,n=t?"":e.price,o=n?`<span class="sl-tip-amt">${fe(n)}</span>`:"",a=!n&&e.priceNote?`<div class="sl-tip-note">${fe(e.priceNote)}</div>`:"",l=He(r.commercial),c=l?`<div class="sl-tip-cx"><span class="g" aria-hidden="true">\u25D0</span>${fe(l)}</div>`:"",h=st(r.wheelchairSpaceType),p=h?`<div class="sl-tip-cx"><span class="g" aria-hidden="true">\u267F</span>${fe(h)}</div>`:"",d=e.reason?`<div class="sl-tip-reason">${fe(e.reason)}</div>`:"";return'<i class="sl-tip-rail" aria-hidden="true"></i>'+_a(r,e.rowTypeWord)+`<div class="sl-tip-cat"><span class="sl-tip-dot" style="background:${fe(r.categoryColor)}"></span><span class="sl-tip-name">${fe(r.categoryLabel)}</span>`+s+o+"</div>"+a+d+p+c+(e.extra??"")}function In(r,e,t,i){let s=r.x+14,n=r.y-i.height-12,o=r.y+18,a=n;s+i.width>e-8&&(s=r.x-i.width-14),n<8&&o+i.height<=t-8&&(a=o);let l=Math.max(8,t-i.height-8);return{left:Math.max(8,Math.min(s,Math.max(8,e-i.width-8))),top:Math.max(8,Math.min(a,l))}}function _n(r,e,t,i=22){let s=Math.max(8,Math.min(r.x-t.width/2,Math.max(8,e.width-t.width-8))),n=r.y-i-t.height,o=r.y+i;return n>=8?{left:s,top:n,placement:"above"}:o+t.height<=e.height-8?{left:s,top:o,placement:"below"}:{left:s,top:Math.max(8,Math.min(n<8?o:n,Math.max(8,e.height-t.height-8))),placement:n<8?"below":"above"}}function Dn(r,e,t,i){let s=t.width/2+12,n=Math.max(s,Math.min(e.width-s,r.x)),o=r.y+t.height+24<=e.height,a=r.y<t.height+24&&o?"below":"above",l=i&&a==="above"?Math.max(t.height+24,r.y):r.y;return{left:n,top:Math.max(8,Math.min(e.height-8,l)),placement:a}}function $n(r,e,t){let i=r.querySelector("[data-pg-select-partial]"),s=[...r.querySelectorAll("[data-pg-event-key]")],n=()=>s.filter(a=>a.checked).map(a=>a.dataset.pgEventKey).filter(Boolean),o=()=>{if(!i)return;let a=n().length;i.disabled=a===0,i.textContent=e?.(a)??i.textContent};s.forEach(a=>{a.addEventListener("change",o);let l=a.closest(".sl-night");l?.classList.add("selectable"),l?.addEventListener("click",c=>{c.target!==a&&(a.checked=!a.checked,o())})}),i?.addEventListener("click",()=>{let a=n();a.length&&t?.(a)})}function ot(r){let e=r?.displayType?.trim()||r?.rowType?.trim();return e||(r?.objectType==="table"?f("picker.table","Table"):r?.objectType==="booth"?f("picker.booth","Booth"):f("picker.row","Row"))}var Bn="@seatlayer/pending-checkout/v1";function Da(r){return typeof r=="string"&&r.length<=160&&/^ord_[A-Za-z0-9_-]+$/.test(r)}function zn(r){if(typeof location>"u")return null;let e=new URLSearchParams(location.search),t=e.get("seatlayer_checkout");if(t!=="success"&&t!=="cancelled")return null;let i=null;try{let s=window.sessionStorage.getItem(Bn);if(s){let n=null;try{n=JSON.parse(s)}catch{}if(n&&Da(n.orderId)){let o=Date.now()-Number(n.storedAt);if(o>=0&&o<=144e5){if(n.eventKey&&n.eventKey!==r)return null;i=n.orderId}}}window.sessionStorage.removeItem(Bn)}catch{}e.delete("seatlayer_checkout");try{let s=e.toString();history.replaceState(history.state,"",`${location.pathname}${s?`?${s}`:""}${location.hash}`)}catch{}return{outcome:t,orderId:i}}function Nn(r){if(!r.framed)return null;let e=r.ancestorOrigins?.length?r.ancestorOrigins[0]:null;for(let t of[e,r.referrer])if(t)try{return new URL(t).origin}catch{}return null}var $a="https://api.seatlayer.io",Ba=10,Vn=6e4,Fn=6e4,za=160,Gn="seatmap.a11y.cb";function Na(){try{if(typeof window>"u")return null;let r=window.localStorage.getItem(Gn);return r==null?null:r==="1"}catch{return null}}function Va(r){try{window.localStorage.setItem(Gn,r?"1":"0")}catch{}}var at=class r{constructor(e){this.realtime=null;this.accessEl=null;this.lastSelectionValidity=null;this.root=null;this.mapHost=null;this.rendered=!1;this.destroyed=!1;this.localeGeneration=0;this.els={};this.regions={};this.ro=null;this.holdTimer=null;this.toastTimer=null;this.offerRefreshTimer=null;this.offerBoundaryTimer=null;this.offerVisibilityHandler=null;this.motionTimers=new Set;this.currency="USD";this.eventTimezone=null;this.eventWhenText=null;this.offerAvailability=null;this.channelByObject=new Map;this.pricesByChannel=new Map;this.hold=null;this.holdExpiresAt=0;this.handedOff=!1;this.bookedShown=!1;this.paymentOptions=null;this.checkoutPanel=null;this.extendEl=null;this.bookedEl=null;this.gaQty=new Map;this.gaPromptEl=null;this.gaPromptReturnFocus=null;this.gaAreasExpanded=!1;this.lastMapPoint=null;this.tipEl=null;this.tipPos={x:0,y:0};this.tipPinned=!1;this.tipMarkedHoverLabel=null;this.lastPointerType="mouse";this.confirmEl=null;this.themeMode=null;this.colorSchemeStop=null;this.seatsRevealed=!1;this.seatsRevealedReport=null;this.confirmSeat=null;this.suppressConfirmationSeatId=null;this.tableDialogEl=null;this.tableDialog=null;this.tableDialogHeld=!1;this.tableDialogReturnFocus=null;this.srEl=null;this.baQty=2;this.baCat="";this.baZone="";this.baPremium=!1;this.baReopen=!1;this.bestAvailableConfirm=!1;this.releasingHold=!1;this.salesClosed=!1;this.soldOut=!1;this.soldoutEl=null;this.cbSafe=!1;this.rungsEl=null;this.projectionEl=null;this.buyerView="map";this.view3dEl=null;this.view3dHandle=null;this.view3dGen=0;this.view3dReturnSeat=null;this.view3dTargetSeatId=null;this.view3dCompareSeatIds=[];this.view3dCompareChip=new pi({overlay:()=>this.view3dEl,savedSeatIds:()=>this.view3dCompareSeatIds,openComparison:()=>this.openView3dComparison(),clearComparison:()=>this.clearView3dComparison(),toast:(e,t)=>this.toast(e,t)});this.view3dCompareEl=null;this.view3dCompareCleanup=null;this.view3dSeatViewChrome=null;this.view3dPassportEl=null;this.view3dPassportCleanup=null;this.floorsEl=null;this.viewEl=null;this.viewCleanup=null;this.seatViewGen=0;this.allSeatsCache=null;this.minimap=null;this.pickerLayoutSize={width:0,height:0};this.priceBandKeys=null;this.focusedCatKey=null;this.limitedViewFilter=!1;this.pricesExpanded=!1;this.sectionCardCache=null;this.lastTrayCount=0;this.langSel=null;this.lastTrayTotal=0;this.lastTrayKeys=new Set;this.bestAvailableBusy=!1;this.releasingLabels=new Set;this.holdingLabels=new Set;this.ctaPhase="idle";this.a11yMenu=null;this.railEdgesBound=!1;this.fsFallback=!1;this.fsChangeHandler=null;this.fsEscHandler=null;this.eventDetailsHidden=!1;this.holdCopyPending=!1;this.sideCollapsed=!1;this.sideToggleEl=null;this.framedFs=!1;this.lastPostedHeight=0;this.cbEl=null;this.modalScrim=null;this.prevFocus=null;this.escHandler=null;this.closeModal=null;this.lastCatAvail=null;this.lastAvailFloorId="";this.availQuietUntil=0;this.liveTimer=null;this.perspectiveWarned=!1;if(!e||typeof e!="object")throw new Error("seatmap: options object is required");if(!e.event||typeof e.event!="string")throw new Error("seatmap: `event` key is required");if(!e.container)throw new Error("seatmap: `container` is required (or use SeatPicker.open())");this.performanceGroup=gn(e),this.suppressPricing=!!this.performanceGroup?.suppressPricing,this.opts={...e,confirmSelection:e.confirmSelection??!0},this.eventDetailsHidden=!!e.hideEventDetails,this.hostPricing=e.pricing,this.apiBase=(e.apiBase??$a).replace(/\/+$/,"");let t={onExpired:a=>{this.opts.onAccessExpired?.(a),a.refreshed||this.showAccessPanel({reason:"no_token",retryable:!1})},onUnavailable:a=>{this.opts.onAccessUnavailable?.(a),this.showAccessPanel(a)}},i=!e.transport&&e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?Nt({base:this.apiBase,event:e.event,publicKey:e.publicKey,accessHooks:t,apiOptions:{referral:e.referral,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}}):null;this.access=e.transport?null:i?.access??Qe(e,t),this.pubApi=e.transport?null:i?.api??new Te(this.apiBase,{access:this.access??void 0,referral:e.referral,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}),this.api=e.transport??this.pubApi,this.buyerAssetUrls=new et(e.event,this.api.asset?(a,l)=>this.api.asset(a,l):void 0),e.checkout==="hosted"&&!this.pubApi&&console.warn('seatlayer: checkout: "hosted" needs the widget\'s own transport \u2014 a custom `transport` owns its backend, so the picker is staying on onCheckout for this mount.'),this.checkoutMode=e.checkout==="hosted"&&this.pubApi?"hosted":"handoff";let s=e.numberOfPlacesToSelect;if(s!=null&&(!Number.isInteger(s)||s<1))throw new Error("seatmap: `numberOfPlacesToSelect` must be a positive integer");this.exactTickets=s??null;let n=Js(e.selectionValidators);if(this.exactTickets!=null&&n>this.exactTickets)throw new Error("seatmap: `minimumSelectedPlaces.minimum` cannot exceed `numberOfPlacesToSelect`");let o=Math.max(1,Math.floor(e.maxSelection??this.exactTickets??Math.max(Ba,n)));if(this.exactTickets!=null&&o<this.exactTickets)throw new Error("seatmap: `maxSelection` cannot be lower than `numberOfPlacesToSelect`");if(e.maxSelection!=null&&o<n)throw new Error("seatmap: `maxSelection` cannot be lower than `minimumSelectedPlaces.minimum`");this.maxTickets=this.exactTickets??o,this.cbSafe=Na()??!!e.colorblindSafe,this.controller=this.wireController(e)}get lastSection(){return this.sectionCard.summary}set lastSection(e){this.sectionCard.adopt(e)}chartHasStage(){let e=this.controller.doc;if(!e)return!1;let t=e.floors?.length?e.floors.map(i=>i.objects??[]):[e.objects??[]];for(let i of t)for(let s of i)if(s.type==="shape"&&(s.role==="stage"||s.stageKind))return!0;return!1}confirmThumbHtml(e){let t=this.controller.doc;if(!t)return"";let i=this.deliverableViewReference(e)?e.viewUrl??"":"",s=this.chartHasStage();if(!i&&!s)return"";let n=null;if(!i)try{n=(0,T.generateSeatThumb)(e,e.focalPoint??t.focalPoint).distanceM??null}catch{return""}let o=s&&n!=null?`<div class="sl-confirm-sight">${O((0,T.t)("picker.sightline",{m:n}))}</div>`:"",a=O((0,T.t)("picker.viewFromSeat",{label:e.label})),l=O(this.tf("picker.viewFromHere","View from here"));return(i?`<button type="button" class="sl-confirm-view sl-confirm-thumbwrap" aria-label="${a}"><img class="sl-confirm-thumb" alt="" /><span class="sl-confirm-thumb-badge">\u{1F52D} ${l}</span></button>`:`<button type="button" class="sl-confirm-view sl-confirm-viewbtn" aria-label="${a}"><span aria-hidden="true">\u{1F52D}</span><span>${l}</span></button>`)+o}deliverableViewReference(e){let t=e.viewMeta?.previewUrl??e.viewUrl;return t&&(Ri(t)||Je(t))?t:null}isFramed(){return typeof window<"u"&&window.parent!==window}postToHost(e){if(!this.isFramed())return;let t=Nn({framed:!0,ancestorOrigins:window.location.ancestorOrigins,referrer:document.referrer});if(t)try{window.parent.postMessage(e,t)}catch{}}measureFramedHeight(){let e=this.root;if(!e)return 0;let t=e.clientWidth||(typeof window<"u"?window.innerWidth:0)||0;if(t<=0)return 0;let i=t<640?1.2:.62;return Math.max(420,Math.round(t*i))}reportFramedHeight(){if(!this.isFramed())return;let e=this.measureFramedHeight();e<=0||e===this.lastPostedHeight||(this.lastPostedHeight=e,this.postToHost({type:"seatlayer:height",px:e}))}toggleFullscreen(){let e=this.root;if(!e)return;!!document.fullscreenElement||this.fsFallback||this.framedFs?document.fullscreenElement?document.exitFullscreen().catch(()=>{}):this.framedFs?this.setFramedFs(!1):this.setFsFallback(!1):e.requestFullscreen?e.requestFullscreen().catch(()=>this.enterFsFallback()):this.enterFsFallback()}syncFullscreenButtons(){let e=!!document.fullscreenElement||this.fsFallback||this.framedFs,t=this.eventDetailsHidden&&!e;this.root?.setAttribute("data-event-details-hidden",String(t)),this.els.zfs?.setAttribute("aria-pressed",String(e)),this.els.zfs?.setAttribute("title",e?this.tf("picker.exitFullScreen","Exit full screen"):this.tf("picker.fullScreen","Full screen"));let i=this.els.zfs?.querySelector(".sl-zfs-lbl");i&&(i.textContent=e?this.tf("picker.exitFullScreen","Exit full screen"):this.tf("picker.fullScreen","Full screen")),this.view3dEl?.querySelector(".sl-view3d-fs")?.setAttribute("aria-pressed",String(e))}enterFsFallback(){this.isFramed()?this.setFramedFs(!0):this.setFsFallback(!0)}setFramedFs(e){this.framedFs!==e&&(this.framedFs=e,this.syncFullscreenButtons(),this.postToHost({type:"seatlayer:fullscreen",on:e}),e&&!this.fsEscHandler?(this.fsEscHandler=t=>{t.key==="Escape"&&!document.fullscreenElement&&this.setFramedFs(!1)},window.addEventListener("keydown",this.fsEscHandler)):!e&&this.fsEscHandler&&(window.removeEventListener("keydown",this.fsEscHandler),this.fsEscHandler=null),requestAnimationFrame(()=>this.controller.refitCurrentView()))}setFsFallback(e){this.fsFallback!==e&&(this.fsFallback=e,this.root?.classList.toggle("sl-fs",e),this.syncFullscreenButtons(),e&&!this.fsEscHandler?(this.fsEscHandler=t=>{t.key==="Escape"&&!document.fullscreenElement&&this.setFsFallback(!1)},window.addEventListener("keydown",this.fsEscHandler)):!e&&this.fsEscHandler&&(window.removeEventListener("keydown",this.fsEscHandler),this.fsEscHandler=null),requestAnimationFrame(()=>this.controller.refitCurrentView()))}close(){this.closeModal?this.closeModal():this.destroy()}static async open(e){tt();let t=document.activeElement instanceof HTMLElement?document.activeElement:null,i=document.createElement("div");i.className="sl-modal-scrim";let s=document.createElement("div");s.className="sl-modal-frame",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",f("picker.seatSelection","Seat selection")),s.tabIndex=-1,i.appendChild(s),document.body.appendChild(i);let n=document.body.style.overflow;document.body.style.overflow="hidden";let o=new r({...e,container:s});o.modalScrim=i,o.prevFocus=t;let a=["a[href]","area[href]","button","input","select","textarea","iframe","object","embed","summary","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"[tabindex]"].join(","),l=()=>{let g=[...s.querySelectorAll('[role="dialog"][aria-modal="true"]')].filter(b=>b.isConnected&&!b.closest('[hidden], [aria-hidden="true"], [inert]'));return g[g.length-1]??s},c=(g,b)=>{let x=g;for(;x;){let k=window.getComputedStyle(x);if(x.hidden||x.getAttribute("aria-hidden")==="true"||x.hasAttribute("inert")||k.display==="none"||k.visibility==="hidden"||k.visibility==="collapse")return!0;if(x===b)return!1;x=x.parentElement}return!0},h=g=>[...g.querySelectorAll(a)].filter(b=>b.tabIndex>=0&&!b.matches(":disabled")&&!c(b,g)),p=(g,b)=>{let x=h(g),k=b?x[x.length-1]:x[0];k?k.focus({preventScroll:!0}):(g.hasAttribute("tabindex")||(g.tabIndex=-1),g.focus({preventScroll:!0}))},d=!1,u=()=>{if(d)return;d=!0,document.body.style.overflow=n,o.escHandler&&document.removeEventListener("keydown",o.escHandler),i.remove(),o.modalScrim=null;let g=o.prevFocus;o.prevFocus=null,g?.isConnected&&g.focus({preventScroll:!0});let b=()=>{o.destroy(),e.onClose?.()};o.hold&&!o.handedOff?o.release().finally(b):b()};return o.closeModal=u,i.addEventListener("mousedown",g=>{g.target===i&&u()}),o.escHandler=g=>{if(g.key==="Tab"){if(g.defaultPrevented)return;let b=l(),x=h(b),k=x[0],S=x[x.length-1],C=document.activeElement;!k||!S?(g.preventDefault(),p(b,g.shiftKey)):C===b||!C||!b.contains(C)?(g.preventDefault(),(g.shiftKey?S:k).focus({preventScroll:!0})):g.shiftKey&&C===k?(g.preventDefault(),S.focus({preventScroll:!0})):!g.shiftKey&&C===S&&(g.preventDefault(),k.focus({preventScroll:!0}));return}g.key==="Escape"&&(o.tableDialog?(g.preventDefault(),o.cancelTableDialog()):o.confirmSeat?(g.preventDefault(),o.cancelConfirm()):o.bestAvailableConfirm?(g.preventDefault(),o.bestAvailableConfirm=!1,o.syncTray()):(g.preventDefault(),u()))},document.addEventListener("keydown",o.escHandler),await o.render(),o.els.close?.classList.add("on"),o.els.close?.addEventListener("click",u),p(l(),!1),o}wireController(e){return new T.PickerController({transport:this.api,eventKey:e.event,maxSelection:this.maxTickets,selectedObjects:e.selectedObjects,selectableObjects:e.selectableObjects,numberOfPlacesToSelect:e.numberOfPlacesToSelect,selectionValidators:e.selectionValidators,currency:e.currency,flashOnLiveChange:!0,colorblindSafe:this.cbSafe,...e.loadingReveal?{loadingReveal:e.loadingReveal}:{},mapTheme:ai(e.theme),onSeatsRevealed:()=>{this.seatsRevealed=!0,e.onSeatsRevealed?.(),this.seatsRevealedReport?.()},onGAClick:t=>{let i=this.controller.getGAAreas().find(s=>s.id===t);i&&(this.collapseSheet(),Li(this,i,this.lastMapPoint))},onSelectionChange:()=>{this.syncTray(),this.minimap?.refreshMinimap(),this.committedSelection().length&&this.collapseSectionCard(),this.syncSelectionTo3d()},onStatusChange:()=>{this.syncSeatMarks(),this.syncPrices(),this.scheduleOfferRefresh(!0),this.evictTakenSelections(),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()},onHoldExpired:()=>{this.hold=null,this.forgetHold(),this.handedOff=!1,this.bookedShown=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.gaQty.clear(),this.toast((0,T.t)("picker.holdExpired",void 0)||"Your hold expired \u2014 seats released. Pick again.","warning"),this.syncTray(),this.emitHoldChange(),this.opts.onHoldExpired?.()},confirmSelection:this.opts.confirmSelection,onSelect:t=>{if(this.salesClosed){this.controller.deselect([t.id]),this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}this.controller.tableSelection(t.id)||(this.collapseSheet(),this.flashPickedSeat(t.id),this.opts.confirmSelection&&this.suppressConfirmationSeatId!==t.id&&this.showConfirm(t))},onTableSelectionRequest:t=>{if(this.salesClosed){this.controller.deselect(t.physicalSeatIds),this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}this.showTableDialog(t,!1)},onDeselect:t=>{this.confirmSeat?.id===t.id&&this.dismissConfirm(),this.tableDialog?.physicalSeatIds.includes(t.id)&&this.dismissTableDialog()},onSelectionLimit:()=>{this.toast((0,T.t)("picker.maxTicketsForOrder",{count:this.maxTickets}),"warning"),this.opts.onSelectionLimit?.(this.maxTickets)},onViewChange:()=>{this.reanchorConfirm(),this.syncRung(),this.syncProjection(),this.minimap?.drawMinimapRect(),this.sectionCardOnView()},onSectionFocus:t=>this.showSectionCard(t),onDeckTap:()=>{this.showSectionCard(null),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap()},onFocusSeat:t=>this.announceSeat(t),onSeatHover:t=>this.updateTooltip(t),onHint:t=>{t&&this.toast(t)},onSalesClosed:()=>this.setSalesClosed(!0),onError:t=>this.opts.onError?.(t)})}async render(){if(this.rendered)return this;let e=performance.now(),t={},i=v=>Math.round((performance.now()-v)*100)/100;this.rendered=!0,tt();let s=performance.now(),n=ms(this.opts.locale,this.opts.messages),o=this.localeGeneration+=1;this.checkoutMode==="hosted"&&(this.paymentOptions=this.pubApi.paymentOptions(this.opts.event));let a=performance.now(),l=Kr(this.opts.container),{root:c,els:h,mapHost:p}=hs(l,(v,D)=>this.tf(v,D),this.opts.theme);this.root=c,this.els=h,this.mapHost=p,fs(c,n,v=>{t.loadLocale=i(s),this.destroyed||this.applyActiveLocale(v,o)}),Us(c,()=>[{open:()=>this.tipPinned,close:()=>this.unpinTooltip()},{open:()=>!!this.tableDialog,close:()=>this.cancelTableDialog()},{open:()=>!!this.confirmSeat,close:()=>this.cancelConfirm()},{open:()=>this.bestAvailableConfirm,close:()=>{this.bestAvailableConfirm=!1,this.syncTray()}}]),this.syncFullscreenButtons(),this.wireBuyerShell(c);let d=document.createElement("div");d.style.cssText="position:absolute;inset:0",this.mapHost.appendChild(d),t.mountBuyerShell=i(a),t.skeletonPaint=i(e);let u=await this.loadChart(d,t,i);if(!u)return this;t.shellsPaint=i(e),this.dismissSkeleton();let g=performance.now();if(this.startRealtime(),this.salesClosed=!!u.salesClosed||!!this.opts.readOnly,c.dataset.eventMode=u.mode==="test"?"test":"live",!this.opts.locale&&u.locale&&this.setLocale(u.locale),this.controller.setViewMode(this.normalizeInitialView(this.opts.initialView)),this.buildRegions(),this.regions["bottom-right"].appendChild(this.els.zoom),this.regions["bottom-center"].appendChild(this.els.toast),u.mode==="test"){let v=document.createElement("div");v.className="sl-testbadge",v.textContent=(0,T.t)("picker.testMode"),v.setAttribute("aria-label",(0,T.t)("picker.testMode")),this.regions["top-left"].appendChild(v)}let b=this.controller.doc?.theme;this.themeMode=this.opts.theme?.mode??null,this.applyThemeTokens(c),this.watchThemeMode(),this.currency=u.currency??this.opts.currency??"USD",this.eventTimezone=u.timezone??null,qr(this.els.logo,[this.opts.theme?.logoUrl,b?.logoUrl,u.posterUrl],this.opts.theme?.brandName??b?.brandName??u.eventName??"?"),this.els.name.textContent=u.eventName??"";let x=u.startsAt?Wt(u.startsAt,u.timezone??null,this.opts.locale):"";this.eventWhenText=x||null,this.els.meta.textContent=[u.venue,x].filter(Boolean).join(" \xB7 "),this.els.pricesHint&&(this.els.pricesHint.textContent=this.tf("picker.priceHint","Colours on the map are ticket types \u2014 tap one below to show just those seats.")),this.buildBadge(b);let k=new Set,S=!1;if(this.controller.doc)for(let v of this.controller.getExpandedSeats()){for(let D of v.accessibility??[])k.add(D);v.accessible&&!v.accessibility?.length&&k.add("wheelchair"),(v.commercial?.restrictedView||v.commercial?.obstructedView)&&(S=!0)}this.buildAccessibilityMenu(k,S),this.buildLanguageSwitcher(this.els.zoom??this.regions["bottom-right"]),this.srEl=document.createElement("div"),this.srEl.className="sl-sr",this.srEl.setAttribute("aria-live","polite"),c.appendChild(this.srEl),this.buildArenaChrome(),this.buildMinimap(),this.buildPriceFilter(),this.buildExtendPrompt(),this.buildBookedOverlay(),this.buildSoldoutOverlay(),this.buildPanelToggle(),this.opts.panelCollapsed&&this.setPanelCollapsed(!0),this.dockLayoutChrome(),t.buildBuyerControls=i(g);let C=performance.now();this.restoreRememberedHold().then(()=>{t.restoreHold=i(C)}),this.salesClosed&&this.applySalesClosed(),this.syncPrices(),this.syncTray(),this.resumeHostedOrder();let A=this.controller.doc,M=ei(this.opts.event),P=this.performanceGroup?"performance_group":"event",R={apiBase:this.apiBase,eventKey:this.opts.event,metricScope:P,performanceGroup:!!this.performanceGroup,ms:i(e),performanceProfile:t,seatCount:this.allSeats().length,objectCount:A?.objects.length??0,sectionCount:A?.objects.filter(v=>v.type==="section").length??0,floorCount:this.controller.getFloors().length,chartName:A?.name,view:this.buyerView,load:M,transport:this.opts.transport?"custom":"pubapi"};qs(R,(v,D)=>this.emitAnalytics(v,D));let m=u.performanceProfile;return this.seatsRevealedReport=()=>this.emitAnalytics("chart_seats_revealed",Qi({...R,performanceProfile:{...R.performanceProfile,...m}})),this.seatsRevealed&&this.seatsRevealedReport(),this}wireBuyerShell(e){this.refreshOfferAvailability(!1),this.api.availability&&(this.offerVisibilityHandler=()=>{!document.hidden&&!this.destroyed&&this.refreshOfferAvailability(!1)},document.addEventListener("visibilitychange",this.offerVisibilityHandler)),this.observeLayout(e),this.els.zin.addEventListener("click",()=>this.controller.zoomIn()),this.els.zout.addEventListener("click",()=>this.controller.zoomOut()),this.els.zfit.addEventListener("click",()=>this.controller.zoomToFit()),this.els.zfs.addEventListener("click",()=>this.toggleFullscreen()),this.fsChangeHandler=()=>{document.fullscreenElement||this.setFsFallback(!1),this.syncFullscreenButtons(),requestAnimationFrame(()=>this.controller.refitCurrentView())},document.addEventListener("fullscreenchange",this.fsChangeHandler);let t=this.els.sheetHead;if(t){let s=this.els.sheetToggle,n=c=>{e.dataset.sheet=c?"open":"peek",s?.setAttribute("aria-expanded",String(c)),s?.setAttribute("aria-label",c?this.tf("picker.collapseTicketPanel","Collapse ticket panel"):this.tf("picker.openTicketPanel","Open ticket panel"))};n(e.dataset.sheet==="open"),s?.addEventListener("click",c=>{c.stopPropagation(),n(e.dataset.sheet!=="open")}),this.els.peek?.addEventListener("click",c=>{let h=c.target.closest(".sl-sheet-go");h&&(c.stopPropagation(),h.dataset.act==="checkout"?this.handleCta():h.dataset.act==="best"?(this.baReopen=!0,this.baQty=Math.max(1,Math.min(this.baQty,this.maxTickets-this.totalTicketCount())),this.syncTray(),n(!0),this.els.tray?.querySelector(".sl-ba-go")?.focus()):n(!0))});let o=0,a=!1,l=!1;t.addEventListener("pointerdown",c=>{if(c.target.closest?.(".sl-seccard,.sl-sheet-toggle,.sl-sheet-go")){l=!1;return}l=!0,a=!1,o=c.clientY,t.setPointerCapture?.(c.pointerId)}),t.addEventListener("pointermove",c=>{if(!l||a)return;let h=c.clientY-o;h<-18?(n(!0),a=!0):h>18&&(n(!1),a=!0)}),t.addEventListener("pointerup",c=>{l&&!a&&Math.abs(c.clientY-o)<6&&n(e.dataset.sheet!=="open"),l=!1,t.releasePointerCapture?.(c.pointerId)})}let i=()=>{if(this.root?.dataset.layout!=="narrow")return;let s=this.root.getAttribute("data-prices-open")==="true";if(this.root.setAttribute("data-prices-open",String(!s)),this.els.pricesSec?.setAttribute("aria-expanded",String(!s)),!s&&this.root.dataset.sheet!=="open"){this.root.dataset.sheet="open";let n=this.els.sheetToggle;n?.setAttribute("aria-expanded","true"),n?.setAttribute("aria-label","Collapse ticket panel")}};this.els.pricesSec?.addEventListener("click",s=>{s.target.closest("select,button")||i()}),this.els.pricesSec?.addEventListener("keydown",s=>{s.key!=="Enter"&&s.key!==" "||s.target.closest("select,button")||(s.preventDefault(),i())}),this.tipEl=document.createElement("div"),this.tipEl.setAttribute("role","tooltip"),this.tipEl.className="sl-tip",this.els.map.appendChild(this.tipEl),this.els.map.addEventListener("pointerdown",s=>{this.handleMapPointerDown(s)},!0),this.els.map.addEventListener("mousemove",s=>{if(this.tipPinned)return;let n=this.els.map.getBoundingClientRect();this.tipPos={x:s.clientX-n.left,y:s.clientY-n.top},this.tipEl&&this.tipEl.style.display!=="none"&&this.placeTooltip()}),this.els.cta.addEventListener("click",()=>{this.handleCta()}),this.els.holdChange?.addEventListener("click",()=>{this.handleChangeSeats()})}collapseSheet(){let e=this.root;!e||e.dataset.layout!=="narrow"||e.dataset.sheet!=="open"||(e.dataset.sheet="peek",this.els.sheetToggle?.setAttribute("aria-expanded","false"),this.els.sheetToggle?.setAttribute("aria-label",this.tf("picker.openTicketPanel","Open ticket panel")))}observeLayout(e){let t=()=>{let i=e.clientWidth;if(i<=0)return;let s=e.clientHeight,n=i!==this.pickerLayoutSize.width||s!==this.pickerLayoutSize.height;this.pickerLayoutSize={width:i,height:s},this.reportFramedHeight();let o=i<640?"narrow":"wide",a=s<560?"compact":"comfortable";(e.dataset.layout!==o||e.dataset.density!==a)&&(e.dataset.layout=o,e.dataset.density=a,o==="narrow"&&!e.dataset.sheet&&(e.dataset.sheet="peek"),this.dockLayoutChrome(),this.lastTrayKeys.size&&this.syncTray()),n&&(this.minimap?.refreshMinimap(),this.fitSectionStripCount())};this.ro=new ResizeObserver(t),this.ro.observe(e),t(),requestAnimationFrame(t)}async loadChart(e,t,i){let s=performance.now(),n=await this.controller.render(e);return t.loadChartAndStatuses=i(s),this.destroyed?null:n?(Object.assign(t,n.performanceProfile),n):(ye({apiBase:this.apiBase,event:this.opts.event,scope:this.performanceGroup?"performance_group":"event",surface:this.performanceGroup?"performance_group_picker":"seat_picker",outcome:"failure",stage:"load_chart",ms:t.loadChartAndStatuses,performanceProfile:t,view:"map",load:Pe(this.opts.event),transport:this.opts.transport?"custom":"pubapi"}),this.els.boot.innerHTML=`<div class="sl-boot-title">${this.tf("picker.mapDidNotLoad","The seat map didn\u2019t load")}</div><div>${this.tf("picker.checkConnection","Check your connection and try again.")}</div><button type="button" class="sl-boot-retry">${this.tf("picker.accessRetry","Try again")}</button>`,this.els.boot.querySelector("button").addEventListener("click",()=>{let o=this.opts.container,a=this.opts;this.destroy(),new r({...a,container:o}).render()}),null)}resumeHostedOrder(){if(this.checkoutMode!=="hosted")return;let e=zn(this.opts.event);e?.outcome!=="success"||!e.orderId||this.openCheckoutPanel({kind:"resume",orderId:e.orderId})}buildPanelToggle(){if(!this.regions["top-right"])return;let e=document.createElement("button");e.type="button",e.className="sl-side-toggle",e.addEventListener("click",()=>this.setPanelCollapsed(!this.sideCollapsed)),this.sideToggleEl=e,this.regions["top-right"].appendChild(e),this.syncPanelToggle()}syncPanelToggle(){let e=this.sideToggleEl;if(!e)return;let t=this.sideCollapsed;e.setAttribute("aria-expanded",String(!t)),e.setAttribute("aria-label",t?this.tf("picker.showTicketPanel","Show the ticket panel"):this.tf("picker.hideTicketPanel","Hide the ticket panel")),e.title=t?this.tf("picker.showTicketPanel","Show the ticket panel"):this.tf("picker.hideTicketPanel","Hide the ticket panel"),e.innerHTML=t?`<svg viewBox="0 0 24 24"><path d="M15 6l-6 6 6 6"/></svg><span>${this.tf("picker.tickets","Tickets")}</span>`:'<svg viewBox="0 0 24 24"><path d="M9 6l6 6-6 6"/></svg>'}setPanelCollapsed(e){this.destroyed||(this.sideCollapsed=e,this.applyPanelCollapsed(),this.scheduleMotion(()=>this.controller.refitCurrentView(),340))}applyPanelCollapsed(){let e=this.root?.dataset.layout!=="narrow";this.root?.setAttribute("data-side-collapsed",String(this.sideCollapsed)),this.els.side?.toggleAttribute("inert",this.sideCollapsed&&e),this.syncPanelToggle()}buildAccessibilityMenu(e,t){let i=this.regions["bottom-left"]??this.els.map;i&&(this.a11yMenu=new ui(i,{event:String(this.opts.event),present:e,hasLimitedView:t,tf:(s,n)=>this.tf(s,n),isColorblindSafe:()=>this.cbSafe,setColorblindSafe:s=>this.setColorblindSafe(s),isLimitedViewHidden:()=>this.limitedViewFilter,setLimitedViewHidden:s=>{this.limitedViewFilter=s,this.controller.setCommercialLimitedFilter(s),this.pushAvailabilityTo3d()},applyAccessibilityFilter:s=>{this.controller.setAccessibilityFilter(s),this.syncPrices(),this.minimap?.refreshMinimap()},focusSeatsForFilter:()=>this.focusSeatsForFilter()}),this.cbEl=this.a11yMenu.colorblindRow())}focusSeatsForFilter(){this.rungsEl&&this.controller.getRung()!=="seats"&&(this.controller.setRung("seats"),this.collapseSectionCard(),this.syncRung())}setAccessibilityFilter(e){this.controller.setAccessibilityFilter(e),this.a11yMenu?.syncAccessibilityFilter(e)}dockLayoutChrome(){let e=this.root?.dataset.layout==="narrow";this.applyPanelCollapsed();let t=this.els.zfs,i=this.els.headInfo?.parentElement;t&&i&&t.parentElement!==i&&(t.classList.add("sl-fs-pill"),i.insertBefore(t,this.els.hold??null));let s=this.els.pricesSec;s&&(e?(s.setAttribute("role","button"),s.tabIndex=0,s.setAttribute("aria-expanded",String(this.root?.getAttribute("data-prices-open")==="true"))):(s.removeAttribute("role"),s.removeAttribute("aria-expanded"),s.tabIndex=-1)),this.lastSection&&this.renderSectionCard(this.lastSection)}buildExtendPrompt(){let e=document.createElement("div");e.className="sl-extend",e.setAttribute("role","status"),e.innerHTML='<span class="sl-extend-txt" data-ref="extendTxt"></span><button type="button" class="sl-extend-btn" data-ref="extendBtn"></button>',(this.regions["bottom-center"]??this.els.map).appendChild(e),this.extendEl=e,this.els.extendTxt=e.querySelector('[data-ref="extendTxt"]'),this.els.extendBtn=e.querySelector('[data-ref="extendBtn"]'),this.els.extendBtn.textContent=this.tf("picker.addTime","Add time"),this.els.extendBtn.addEventListener("click",()=>{this.handleExtend()})}buildBookedOverlay(){let e=document.createElement("div");e.className="sl-booked",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.innerHTML=`<div class="sl-booked-badge"><svg viewBox="0 0 24 24"><path d="M20 6L9 17l-5-5"/></svg></div><div class="sl-booked-title">${this.tf("picker.allSetTitle","You're all set")}</div><div class="sl-booked-sub" data-ref="bookedSub"></div>`,this.root.appendChild(e),this.bookedEl=e,this.els.bookedSub=e.querySelector('[data-ref="bookedSub"]')}get onGAPromptHook(){return this.opts.onGAPrompt}tf(e,t){return f(e,t)}buildSoldoutOverlay(){if(!this.els.map)return;let e=document.createElement("div");e.className="sl-soldout",e.setAttribute("role","status");let t=(this.controller.doc?.theme?.brandName??this.opts.theme?.brandName??this.els.name?.textContent??this.tf("picker.soldOutEyebrow","This event")).toUpperCase(),i=document.createElement("div");i.className="sl-soldout-eyebrow",i.textContent=t;let s=document.createElement("div");s.className="sl-soldout-title",s.textContent=this.tf("picker.soldOutTitle","Sold out");let n=document.createElement("p");n.className="sl-soldout-copy",n.textContent=this.tf("picker.soldOutCopy","No reserved seats are currently available for this event."),e.append(i,s,n),this.els.map.appendChild(e),this.soldoutEl=e}syncSoldout(e,t){let i=this.controller.getGAAreas().length>0,s=this.isSoldOut(e,t,i);s!==this.soldOut&&(this.soldOut=s,this.soldoutEl?.classList.toggle("on",s))}isSoldOut(e,t,i){return!i&&e.length>0&&e.every(s=>(t[s.key]??0)===0)}setSalesClosed(e){let t=e||!!this.opts.readOnly;this.salesClosed!==t&&(this.salesClosed=t,this.applySalesClosed())}applySalesClosed(){this.salesClosed&&this.tableDialog&&!this.tableDialogHeld&&this.cancelTableDialog();let e=this.els.closedPill;if(e){e.classList.toggle("on",this.salesClosed);let t=this.els.closedPillText??e;t.textContent=this.tf("picker.salesClosedPill","Sales are closed")}this.root?.setAttribute("data-sales-closed",String(this.salesClosed)),this.salesClosed&&this.srEl&&(this.srEl.textContent=this.tf("picker.salesClosedToast","Sales are closed for this event.")),this.syncCta(),this.syncTray()}badgeHidden(e){return!!(this.opts.hideBadge||e?.hideBadge)}buildBadge(e){if(this.badgeHidden(e))return;let t=this.els.foot;if(!t)return;let i=document.createElement("a");i.className="sl-powered",i.href="https://seatlayer.io/?ref=picker",i.target="_blank",i.rel="noopener noreferrer",i.setAttribute("aria-label",this.tf("picker.poweredBy","Powered by SeatLayer"));let s=document.createElement("span");s.className="sl-powered-mark",s.setAttribute("aria-hidden","true"),s.innerHTML=Gt;let n=document.createElement("span");n.textContent=this.tf("picker.poweredBy","Powered by SeatLayer"),i.append(s,n),t.appendChild(i)}buildRegions(){if(!this.els.map)return;let e=["top-left","top-center","top-right","left-rail","bottom-left","bottom-center","bottom-right"];for(let t of e){let i=document.createElement("div");i.className="sl-anchor",i.dataset.region=t,this.els.map.appendChild(i),this.regions[t]=i}}cssVar(e){return this.root?getComputedStyle(this.root).getPropertyValue(e).trim():""}reducedMotion(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}scheduleMotion(e,t){let i=setTimeout(()=>{this.motionTimers.delete(i),this.destroyed||e()},t);this.motionTimers.add(i)}animateOnce(e,t,i=600){!e||this.reducedMotion()||(e.classList.remove(t),e.offsetWidth,e.classList.add(t),this.scheduleMotion(()=>e.classList.remove(t),i))}flashPickedSeat(e){this.reducedMotion()||this.controller.flashSeat(e,this.cssVar("--sl-accent")||"#f4b740")}flashHeldSeats(e){if(this.reducedMotion())return;let t=(e.items??[]).filter(i=>i.objectType!=="ga").slice(0,10).map(i=>this.controller.seatByLabel(i.label)).filter(i=>!!i);Ks({regions:this.els,categories:this.controller.doc?.categories,pop:i=>this.controller.flashSeat(i,this.cssVar("--sl-accent")||"#f4b740"),focus:(i,s)=>this.controller.focusSection(i,s),screenPoint:i=>this.controller.worldToScreen(i),schedule:(i,s)=>this.scheduleMotion(i,s)},t)}committedSelection(){let e=this.confirmSeat?.id,t=this.tableDialog&&!this.tableDialogHeld?this.tableDialog.id:null;return this.controller.getSelection().filter(i=>i.id!==e&&i.id!==t)}pendingSelectionCount(){let e=this.hold?.items??[],t=new Set(e.map(s=>s.label));return this.committedSelection().filter(s=>!t.has(s.label)).reduce((s,n)=>s+(n.quantity??1),0)+Ze(this.gaQty,this.hold?.items??[])}heldTicketCount(){return(this.hold?.items??[]).reduce((e,t)=>e+(t.quantity??1),0)}totalTicketCount(){let e=new Set((this.hold?.items??[]).map(i=>i.label)),t=this.committedSelection().filter(i=>!e.has(i.label)).reduce((i,s)=>i+(s.quantity??1),0);return this.heldTicketCount()+t+Ze(this.gaQty,this.hold?.items??[])}updateSelectionCapacity(){let e=new Set((this.hold?.items??[]).map(s=>s.label)),t=this.committedSelection().filter(s=>e.has(s.label)).reduce((s,n)=>s+(n.quantity??1),0),i=Math.max(0,this.maxTickets-this.heldTicketCount()-Ze(this.gaQty,this.hold?.items??[]));this.controller.setMaxSelection(t+i)}syncCta(e=this.lastTrayCount,t=this.pendingSelectionCount()){let i=this.els.cta;if(!i)return;if(this.salesClosed){i.disabled=!0,i.textContent=this.tf("picker.salesClosedCta","Sales closed");return}if(this.confirmSeat||this.tableDialog&&!this.tableDialogHeld){i.disabled=!0,i.textContent=this.tableDialog?this.tf("picker.confirmYourTable","Confirm your table"):this.tf("picker.confirmOrCancelSeat","Confirm or cancel this seat");return}if(this.ctaPhase==="holding"){i.disabled=!0,i.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${this.tf("picker.securingSeats","Securing your seats\u2026")}`;return}if(this.ctaPhase==="checkout"){i.disabled=!0,i.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${this.tf("picker.openingCheckout","Opening secure checkout\u2026")}`;return}let s=!this.hold&&this.performanceGroup?.selectionMode==="per_performance"?this.performanceGroup.submissionState?.():null;if(s&&!s.ready){i.disabled=!0,i.textContent=this.tf("picker.completeAllPerformances","Complete all performances ({complete}/{total})").replace("{complete}",String(s.complete)).replace("{total}",String(s.total));return}let n=this.controller.getSelectionValidity(e);if(n&&!n.isValid){i.disabled=!0,i.textContent=Ji(n,(o,a)=>this.tf(o,a),!0);return}i.disabled=e===0,i.textContent=this.hold?t?(0,T.t)("picker.secureMoreAndCheckout",{count:t}):this.tf("picker.continueToCheckout","Continue to checkout"):e?this.performanceGroup?this.tf("picker.holdSeatsForAllPerformances","Hold seats for all {count} performances").replace("{count}",String(this.performanceGroup.performanceCount)):this.tf("picker.holdSeatsAndCheckout","Hold seats & checkout"):this.tf("picker.selectSeats","Select seats")}setCtaPhase(e){this.ctaPhase=e,this.syncCta(),this.renderPeek(this.lastTrayCount,this.lastTrayTotal,this.pendingSelectionCount()),e==="checkout"&&this.scheduleMotion(()=>{this.ctaPhase==="checkout"&&(this.ctaPhase="idle",this.syncCta(),this.renderPeek(this.lastTrayCount,this.lastTrayTotal,this.pendingSelectionCount()))},1100)}holdStorageKey(){return`@seatlayer/hold/v1/${encodeURIComponent(this.apiBase)}/${encodeURIComponent(this.opts.event)}`}rememberedHoldId(){if(this.opts.initialHoldId)return this.opts.initialHoldId;if(this.opts.restoreHold===!1||typeof window>"u")return null;try{return window.sessionStorage.getItem(this.holdStorageKey())}catch{return null}}rememberHold(e){if(!(this.opts.restoreHold===!1||typeof window>"u"))try{window.sessionStorage.setItem(this.holdStorageKey(),e.holdId)}catch{}}forgetHold(){if(!(typeof window>"u"))try{window.sessionStorage.removeItem(this.holdStorageKey())}catch{}}async resumeHoldFromServer(e,t){try{let i=await this.controller.resumeHold(e);if(!i||this.destroyed)return null;let s={holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items};return this.hold=s,this.handedOff=!0,this.bookedShown=!1,this.ctaPhase="idle",this.startHoldTimer(s.expiresAt),this.rememberHold(s),this.syncTray(),this.emitHoldChange(),this.opts.onHoldRestored?.(s,s.seats??[],this.buildHandoff(s)),t&&this.toast(this.tf("picker.heldTicketsRestored","Your held tickets have been restored."),"success"),s}catch(i){let s=i?.status;return s===404||s===409?this.forgetHold():this.opts.onError?.(i),null}}async restoreRememberedHold(){let e=this.rememberedHoldId();e&&await this.resumeHoldFromServer(e,!0)}activeFloorObjects(){let e=this.controller.doc;if(!e)return[];let t=e.floors;if(t?.length){let i=this.controller.getActiveFloorId();return(t.find(s=>s.id===i)??t[0]).objects??[]}return e.objects??[]}buildMinimap(){this.els.map&&(this.minimap=Bs({controller:this.controller,root:()=>this.root,cssVar:e=>this.cssVar(e),focusedSectionLabel:()=>this.lastSection?.label},this.regions["bottom-left"]??this.els.map))}catPrice(e){let t=e.tiers?.length?e.tiers[0].price:e.price;return t===void 0||!e.key?t:this.paidPrice(e.key,e.tiers?.[0]?.id??null,t)}catPriceRange(e){let t=e.tiers?.length?e.tiers.map(i=>this.paidPrice(e.key,i.id??null,i.price)):e.price==null?[]:[this.paidPrice(e.key,null,e.price)];if(e.key)for(let i of this.pricesByChannel.values())for(let s of i)s.categoryKey===e.key&&t.push(s.price);return t.length?{min:Math.min(...t),max:Math.max(...t)}:void 0}buildPriceFilter(){if(this.suppressPricing||!this.els.prices||!this.els.pricesSec)return;let e=ss(this.controller.doc?.categories??[],this.legendDeps());if(e.length<2)return;let t=document.createElement("select");t.className="sl-price-select",t.setAttribute("aria-label",this.tf("picker.filterAndFocusByPrice","Filter and focus seats by price"));let i=document.createElement("option");i.value="all",i.textContent=this.tf("picker.allPrices","All prices"),t.appendChild(i);for(let s of e){let n=document.createElement("option");n.value=s.id,n.textContent=s.label,t.appendChild(n)}this.els.pricesSec.appendChild(t),t.addEventListener("change",()=>{let n=e.find(o=>o.id===t.value)?.keys??null;this.focusedCatKey=null,this.priceBandKeys=n?new Set(n):null,this.controller.setCategoryFilter(n),this.controller.focusCategoryFilter(n),this.pushAvailabilityTo3d(),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap(),this.syncPrices(),this.lastSection&&this.showSectionCard(this.lastSection)})}buildArenaChrome(){let e=this.controller.doc;if(!e||!this.els.map)return;let t=e.objects.some(i=>i.type==="section")||(e.floors??[]).some(i=>i.objects.some(s=>s.type==="section"));if(this.canOffer3d()){let i=document.createElement("div");i.className="sl-projection",i.setAttribute("role","group"),i.setAttribute("aria-label",this.tf("picker.venueView","Venue view")),i.innerHTML=`<button type="button" data-view="map" aria-pressed="true" title="${this.tf("picker.flat2dMap","Flat 2D map")}">${this.tf("picker.map","Map")}</button><button type="button" data-view="venue3d" aria-pressed="false" title="${this.tf("picker.interactive3dVenueView","Interactive 3D venue view")}">3D</button>`,i.querySelectorAll("button").forEach(s=>{s.addEventListener("click",()=>{this.setBuyerView(s.dataset.view)})}),this.regions["top-right"].appendChild(i),this.projectionEl=i,this.syncProjection()}if(t){let i=[...e.objects,...(e.floors??[]).flatMap(h=>h.objects)],s=new Set((e.zones??[]).map(h=>h.id)),o=i.some(h=>h.type==="section"&&typeof h.zone=="string"&&s.has(h.zone))?["zones","sections","seats"]:["sections","seats"],a=document.createElement("div");a.className="sl-rungs on sl-mo-indicator",a.setAttribute("role","group"),a.setAttribute("aria-label",(0,T.t)("picker.zoomLevel"));let l={zones:(0,T.t)("picker.rungLabel.zones"),sections:(0,T.t)("picker.rungLabel.sections"),seats:(0,T.t)("picker.rungLabel.seats")},c={zones:(0,T.t)("picker.rungTip.zones"),sections:(0,T.t)("picker.rungTip.sections"),seats:(0,T.t)("picker.rungTip.seats")};a.innerHTML=o.map(h=>`<button type="button" data-rung="${h}" title="${c[h]}" aria-pressed="false">${l[h]}</button>`).join(""),a.querySelectorAll("button").forEach(h=>{h.addEventListener("click",()=>{let p=h.dataset.rung;this.controller.setRung(p),p==="seats"&&this.collapseSectionCard()})}),this.regions["top-center"].appendChild(a),this.rungsEl=a,this.syncRung()}if(this.controller.isMultiFloor()){let i=_s({floors:this.controller.getFloors(),tf:(s,n)=>this.tf(s,n),onChoose:s=>{s===""?this.controller.setFloorOverview(!0):this.controller.setFloor(s),this.showSectionCard(null),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap()}});this.regions["left-rail"].appendChild(i),this.floorsEl=i,this.syncFloors()}}syncRung(){let e=this.controller.getRung(),t=this.controller.seatsRevealed?.()??(e==="seats"||!!this.controller.getFocusedSection?.());this.root&&(this.root.dataset.zoomed=String(t)),this.minimap?.setAutoOpen(!1),this.rungsEl&&this.rungsEl.querySelectorAll("button").forEach(i=>{let s=i.dataset.rung===e;i.classList.toggle("on",s),i.setAttribute("aria-pressed",String(s))})}syncProjection(){this.projectionEl&&this.projectionEl.querySelectorAll("button").forEach(e=>{let t=e.dataset.view===this.buyerView;e.classList.toggle("on",t),e.setAttribute("aria-pressed",String(t))})}canOffer3d(){return this.opts.enable3D===!1||!this.controller.doc||!Ut()?!1:this.allSeats().length<=this.max3dSeats()}max3dSeats(){let e=this.opts.max3DSeats;if(typeof e=="number"&&e>0)return e;let t=globalThis.navigator;return(t?.hardwareConcurrency??8)<=4||(t?.deviceMemory??8)<=4||(globalThis.matchMedia?.("(pointer: coarse)").matches??!1)?Fn/2:Fn}syncFloors(){Ds(this.floorsEl,this.controller.getActiveFloorId(),this.controller.isFloorOverview())}get sectionCard(){return this.sectionCardCache||(this.sectionCardCache=new ci({controller:this.controller,map:()=>this.els.map,root:()=>this.root,collapseSheet:()=>this.collapseSheet(),region:e=>this.regions[e],refreshMinimap:()=>this.minimap?.refreshMinimap(),activeFloorObjects:()=>this.activeFloorObjects(),sectionNeighbours:e=>this.sectionNeighbours(e),catPriceRange:e=>this.catPriceRange(e),money:e=>this.money(e),priceBandKeys:()=>this.priceBandKeys})),this.sectionCardCache}showSectionCard(e){this.sectionCard.show(e)}renderSectionCard(e){this.sectionCard.render(e)}collapseSectionCard(){this.sectionCard.collapse()}sectionCardOnView(){this.sectionCard.onView()}fitSectionStripCount(){this.sectionCard.fitStripCount()}sectionNeighbours(e){let t=this.activeFloorObjects().filter(s=>s.type==="section"&&!this.controller.isSectionClosed(s.id)&&this.controller.getSectionSeatCount(s.id)>0);if(t.length<2)return null;let i=t.findIndex(s=>s.id===e);return i<0?null:{previous:t[(i-1+t.length)%t.length],next:t[(i+1)%t.length]}}markedSeatAnnouncement(e){let t=sr(this.controller.getRenderer()?.getSeatMark?.(e.id),this.performanceGroup?.nights?.());return En(t,e.displayLabel??e.label,this.opts.locale)}announceSeat(e){if(!this.srEl)return;if(!e){this.srEl.textContent="";return}let t=this.markedSeatAnnouncement(e);if(t){this.srEl.textContent=t;return}let i=this.controller.doc?.categories.find(u=>u.key===e.categoryKey),s=this.controller.getStatus(e.id)??"free",n=s==="free"?this.tf("picker.statusAvailable","available"):s==="held"?this.tf("picker.statusOnHold","on hold"):this.tf("picker.statusTaken2","taken"),o=i?this.catPriceRange(i):void 0,a=o?o.min===o.max?this.money(o.min):`${this.money(o.min)}\u2013${this.money(o.max)}`:void 0,l=this.controller.tableSelection(e.id),c=l??this.controller.seatDetails(e.id),h=ot(c),p=c?.rowLabel??c?.displayLabel??e.displayLabel??e.label,d=l?`${h} ${p}, ${l.bookingMode==="variable"?(0,T.t)("picker.minToMaxGuests",{min:l.minOccupancy,max:l.maxOccupancy}):(0,T.t)("picker.capacityGuests",{count:l.capacity})}`:c?.objectType==="booth"?`${h} ${p}`:c?.objectType==="table"?`${h} ${p}, ${(0,T.t)("picker.seatNumberLower",{label:c.seatNumber??e.label})}`:(0,T.t)("picker.seatLabel",{label:c?.displayLabel??e.displayLabel??e.label});this.srEl.textContent=`${d}, ${i?.label??e.categoryKey}${a?`, ${a}`:""}, ${n}`}showTableDialog(e,t,i){this.dismissTableDialog(!1),this.tableDialog={...e},this.tableDialogHeld=t,this.tableDialogReturnFocus=i??document.activeElement;let s=this.controller.doc?.categories.find(a=>a.key===e.categoryKey),n=e.bookingMode==="variable",o=document.createElement("div");o.className="sl-table-scrim",o.innerHTML=Rs(e,{variable:n,held:t,typeWord:ot(e),categoryLabel:s?.label??e.categoryKey,unitPrice:this.money(this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label))}),this.root.appendChild(o),this.tableDialogEl=o,this.renderTableDialogState(),o.querySelectorAll("[data-table-step]").forEach(a=>{a.addEventListener("click",()=>{if(!this.tableDialog)return;let l=Math.max(this.tableDialog.minOccupancy,Math.min(this.tableDialog.maxOccupancy,this.tableDialog.quantity+Number(a.dataset.tableStep)));this.tableDialog={...this.tableDialog,quantity:l},this.renderTableDialogState()})}),o.querySelector(".sl-table-cancel").addEventListener("click",()=>this.cancelTableDialog()),o.querySelector(".sl-table-confirm").addEventListener("click",()=>{this.confirmTableDialog()}),o.addEventListener("mousedown",a=>{a.target===o&&this.cancelTableDialog()}),o.addEventListener("keydown",a=>{if(a.key!=="Tab")return;let l=[...o.querySelectorAll('button:not(:disabled),[tabindex]:not([tabindex="-1"])')];if(!l.length)return;let c=l[0],h=l[l.length-1];a.shiftKey&&document.activeElement===c?(a.preventDefault(),h.focus()):!a.shiftKey&&document.activeElement===h&&(a.preventDefault(),c.focus())}),requestAnimationFrame(()=>o.querySelector(n?'[data-table-step="-1"]':".sl-table-confirm")?.focus())}renderTableDialogState(){let e=this.tableDialog,t=this.tableDialogEl;if(!e||!t)return;let i=t.querySelector("output[data-table-qty]");i&&(i.value=String(e.quantity));let s=t.querySelector("input[data-table-qty]");s&&(s.value=String(e.quantity)),t.querySelectorAll("[data-table-step]").forEach(a=>{let l=Number(a.dataset.tableStep);a.disabled=l<0?e.quantity<=e.minOccupancy:e.quantity>=e.maxOccupancy});let n=this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label),o=t.querySelector("[data-table-total]");o&&(o.textContent=this.money(n*e.quantity))}async confirmTableDialog(){let e=this.tableDialog,t=this.tableDialogHeld;if(!e)return;let i=this.tableDialogEl?.querySelector(".sl-table-confirm");if(i&&(i.disabled=!0,i.textContent=t?this.tf("picker.updatingEllipsis","Updating\u2026"):this.tf("picker.selectingEllipsis","Selecting\u2026")),t){try{let s=await this.controller.replaceTableQuantity(e.label,e.quantity,this.opts.holdTtlMs);if(!s){this.toast(this.tf("picker.guestCountCouldNotBeSecured","That guest count could not be secured. Your current table hold is unchanged."),"warning"),this.renderTableDialogState(),i&&(i.disabled=!1,i.textContent=this.tf("picker.updateTable","Update table"));return}this.hold={holdId:s.holdId,expiresAt:s.expiresAt,seats:s.seats,items:s.items},this.startHoldTimer(s.expiresAt),this.dismissTableDialog(),this.syncTray(),this.emitHoldChange(),this.toast((0,T.t)("picker.tableUpdatedForGuests",{label:e.label,count:e.quantity}),"success")}catch(s){this.opts.onError?.(s),this.toast(this.tf("picker.guestCountNoLongerAvailable","That guest count is no longer available. Your current hold is unchanged."),"error"),i&&(i.disabled=!1,i.textContent=this.tf("picker.updateTable","Update table"))}return}if(!this.controller.setTableQuantity(e.label,e.quantity)){i&&(i.disabled=!1,i.textContent=e.bookingMode==="variable"?this.tf("picker.selectTable","Select table"):this.tf("picker.selectWholeTable","Select whole table"));return}this.dismissTableDialog(),this.collapseSectionCard(),this.syncTray()}cancelTableDialog(){let e=this.tableDialog,t=this.tableDialogHeld;this.dismissTableDialog(),e&&!t&&this.controller.deselect(e.physicalSeatIds)}dismissTableDialog(e=!0){let t=this.tableDialogReturnFocus;this.tableDialogEl?.remove(),this.tableDialogEl=null,this.tableDialog=null,this.tableDialogHeld=!1,this.tableDialogReturnFocus=null,e&&requestAnimationFrame(()=>(t?.isConnected?t:this.root)?.focus())}showConfirm(e){let t=this.confirmSeat?.id;this.confirmEl?.remove(),this.confirmEl=null,this.confirmSeat=e,this.root?.setAttribute("data-confirming","true"),this.els.side?.toggleAttribute("inert",!0),Object.values(this.regions).forEach(M=>M.toggleAttribute("inert",!0)),this.controller.setSelectionFocus(e.id),t&&t!==e.id&&this.controller.deselect([t]),this.tipEl&&(this.tipEl.style.display="none");let i=this.controller.seatDetails(e.id),s=this.controller.doc?.categories.find(M=>M.key===e.categoryKey),n=i?.price??(s?.tiers?.length?s.tiers[0].price:s?.price),o=n!=null?this.paidPrice(e.categoryKey,i?.tierId??s?.tiers?.[0]?.id??null,n,e.label):void 0,a=Cs(i,e.displayLabel??e.label,ot(i)),l=i?.tiers??s?.tiers??[],c=i?.tierId??l[0]?.id,h=Ps(l,c,M=>this.money(this.paidPrice(e.categoryKey,M.id,M.price,e.label))),p=this.buyerView==="venue3d",d=this.performanceGroup?.confirmDateSelection??void 0,u=d?this.performanceGroup?.nights?.()??[]:[],g=d?kn(u,d,e.id,(M,P)=>this.tf(M,P)):"",b=document.createElement("div");b.className="sl-confirm sl-mo-in",g&&b.classList.add("sl-confirm-group-dates"),b.setAttribute("role","dialog"),b.setAttribute("aria-label",(0,T.t)("picker.confirmSeatLabel",{label:e.label}));let x=s?.color??"#6e7bff",k=Vi(x,this.cssVar("--sl-surface")||"#1a2234",.76)??x;b.style.setProperty("--sl-cat",x),b.style.setProperty("--sl-cat-ink",Me(k,"#172033","#ffffff"));let S=String(i?.categoryLabel??s?.label??e.categoryKey);b.innerHTML=Hs({identityFields:a,identity:Es(i,e.displayLabel??e.label,ot(i)),marker:li(i?.wheelchairSpaceType),see3dPill:As(this.canOffer3d(),p),categoryColor:s?.color??"#6e7bff",categoryLabel:S,priceLabel:o!=null?this.money(o):"",tierChoices:h,groupDates:g,wheelchair:ws(i?.wheelchairSpaceType),commercial:xs(e.commercial),thumb:this.seatViewEnabled()&&this.buyerView!=="venue3d"?this.confirmThumbHtml(e):"",inspect:p?`${Ts(e,`${i?.displayLabel??e.displayLabel??e.label} \xB7 ${o==null?this.tf("picker.priceNotSupplied","Price not supplied"):this.money(o)}`,p)}<div class="sl-confirm-inspect-row">${Ss(e,p?this.view3dCompareSeatIds:null)}${Gi(this.canOffer3d(),p)}</div>`:Gi(this.canOffer3d(),p),cancelLabel:(0,T.t)("common.cancel"),selectLabel:this.tf("picker.select","Select")}),this.els.map.appendChild(b),this.confirmEl=b;let C=b.querySelector(".sl-confirm-thumb"),A=C?.closest(".sl-confirm-thumbwrap")??null;if(C&&A){let M=!1,P=()=>{if(M||!A.isConnected)return;M=!0;let m=()=>{A.remove(),this.confirmEl===b&&this.reanchorConfirm()};if(this.reducedMotion()||typeof requestAnimationFrame!="function"){m();return}A.style.height=`${A.offsetHeight}px`,A.classList.add("sl-confirm-thumb-out"),requestAnimationFrame(()=>{A.style.height="0px",A.style.opacity="0"}),setTimeout(m,za)};C.addEventListener("error",P),C.addEventListener("load",()=>{C.naturalWidth||P()});let R=e.viewMeta?.previewUrl??e.viewUrl;R?this.buyerAssetUrls.resolve(R).then(m=>{if(!(!b.isConnected||this.confirmEl!==b)){if(!m){P();return}C.src=m}}).catch(m=>{P(),this.opts.onError?.(m)}):P()}this.reanchorConfirm(),b.querySelector(".sl-confirm-view")?.addEventListener("click",()=>{this.openSeatView(e)}),b.querySelector(".sl-confirm-confidence")?.addEventListener("click",M=>{this.openSeatConfidencePassport(e,M.currentTarget instanceof HTMLElement?M.currentTarget:null)}),b.querySelector(".sl-confirm-compare")?.addEventListener("click",()=>this.saveView3dComparisonSeat(e)),b.querySelectorAll("[data-confirm-tier]").forEach(M=>{M.addEventListener("click",()=>{let P=M.dataset.confirmTier,R=l.find(v=>v.id===P);if(!R)return;this.controller.setSeatTier(e.id,R.id),b.querySelectorAll("[data-confirm-tier]").forEach(v=>{v.setAttribute("aria-pressed",String(v===M))});let m=b.querySelector(".sl-confirm-price");m&&(m.textContent=this.money(this.paidPrice(e.categoryKey,R.id,R.price,e.label))),this.reanchorConfirm()})}),b.querySelector(".sl-confirm-3d")?.addEventListener("click",()=>{this.buyerView==="venue3d"?(this.dismissConfirm(),this.view3dHandle?.flyToSeat(e.id)):(this.view3dReturnSeat=e,this.dismissConfirm(),this.enter3d(e.id))}),Tn(b,d,(M,P)=>this.tf(M,P),()=>this.reanchorConfirm()),b.querySelector(".sl-confirm-add").addEventListener("click",()=>{this.commitConfirm()}),b.querySelector(".sl-confirm-cancel").addEventListener("click",()=>this.cancelConfirm()),requestAnimationFrame(()=>b.querySelector(".sl-confirm-add")?.focus())}reanchorConfirm(){if(!this.confirmEl||!this.confirmSeat||this.root?.dataset.view3d==="on")return;let e=this.controller.worldToScreen({x:this.confirmSeat.x,y:this.confirmSeat.y});if(this.root?.dataset.layout==="narrow"){xr(this.confirmEl,e,this.els.map);return}let t=this.els.map.clientWidth,i=this.els.map.clientHeight,s=this.confirmEl.offsetWidth||276,n=this.confirmEl.offsetHeight||230,o=this.confirmEl.classList.contains("sl-confirm-group-dates"),a=Dn(e,{width:t,height:i},{width:s,height:n},o);this.confirmEl.dataset.placement=a.placement,this.confirmEl.style.left=`${a.left}px`,this.confirmEl.style.top=`${a.top}px`,Vt(this.confirmEl,e,{left:a.left,top:a.top,width:s,height:n})}dismissConfirm(){this.confirmEl&&Ee(this.confirmEl),this.confirmEl=null,this.confirmSeat=null,this.root?.removeAttribute("data-confirming"),Object.values(this.regions).forEach(e=>e.toggleAttribute("inert",!1)),this.applyPanelCollapsed(),this.controller.setSelectionFocus(null)}async commitConfirm(){let e=this.confirmSeat;e&&await Cn(this.confirmEl,e.id,this.performanceGroup?.confirmDateSelection??void 0)&&(this.confirmSeat&&this.dismissConfirm(),this.collapseSectionCard(),Yi(this.els,this.controller.worldToScreen(e),e,this.controller.doc?.categories),this.syncTray(),this.syncSelectionTo3d())}cancelConfirm(){let e=this.confirmSeat;e&&(this.controller.deselect([e.id]),this.confirmSeat&&this.dismissConfirm(),this.syncSelectionTo3d(),this.root?.focus({preventScroll:!0}))}closeConfirm(){this.dismissConfirm()}seatViewEnabled(){return this.opts.seatView!==!1}allSeats(){return this.allSeatsCache||(this.allSeatsCache=[...this.controller.getExpandedSeats()]),this.allSeatsCache}async openSeatView(e){if(!this.root||!this.seatViewEnabled())return;let t=++this.seatViewGen,i=this.controller.doc,s=this.controller.getActiveFloorId(),n=e.focalPoint??i?.floors?.find(p=>p.id===s)?.focalPoint??i?.focalPoint??{x:0,y:0},o,a,l=!1;if(e.viewUrl){let p,d=null;try{let g=e.viewMeta?.previewUrl;g&&g!==e.viewUrl?(d=await this.buyerAssetUrls.resolve(g),p=e.viewUrl):p=await this.buyerAssetUrls.resolve(e.viewUrl)}catch(g){t===this.seatViewGen&&this.opts.onError?.(g);return}if(t!==this.seatViewGen||!p||e.viewMeta?.previewUrl&&e.viewMeta.previewUrl!==e.viewUrl&&!d||!this.root||!this.seatViewEnabled())return;let u={url:p,...d?{previewUrl:d}:{},...e.viewMeta?.sourceWidth!==void 0?{sourceWidth:e.viewMeta.sourceWidth}:{},...e.viewMeta?.sourceHeight!==void 0?{sourceHeight:e.viewMeta.sourceHeight}:{},...e.viewMeta?.previewWidth!==void 0?{previewWidth:e.viewMeta.previewWidth}:{},...e.viewMeta?.previewHeight!==void 0?{previewHeight:e.viewMeta.previewHeight}:{},...e.viewMeta?.variants?.length?{variants:e.viewMeta.variants}:{},...e.viewMeta?.coverage?{coverage:e.viewMeta.coverage}:{},...e.viewMeta?.capturedAt?{capturedAt:e.viewMeta.capturedAt}:{},...e.viewMeta?.sourceLabel?{sourceLabel:e.viewMeta.sourceLabel}:{}};o=u,a=(0,At.seatViewDisclosure)(u),l=(0,At.isAuthoredSeatView)(u)}else{let p;try{let{generateSeatPanorama:d}=await qt();p=d(e,n,this.allSeats())}catch(d){t===this.seatViewGen&&this.opts.onError?.(d);return}if(t!==this.seatViewGen||!this.root||!this.seatViewEnabled())return;o={url:p.url,generated:!0},a=(0,T.t)("picker.illustrationCaption",{m:p.distanceM})}this.closeSeatView(!1);let c=(0,T.t)("picker.viewFromSeat",{label:e.label}),h=Xt({root:this.root,source:o,caption:a,real:l,closeLabel:this.tf("picker.close","Close"),dragHint:this.tf("picker.dragToLookAround","Drag to look around \xB7 scroll to zoom"),viewFromSeatLabel:c,real360Label:(0,T.t)("picker.real360"),previewLabel:(0,T.t)("picker.preview"),resolveAsset:p=>this.buyerAssetUrls.resolve(p),onClose:()=>this.closeSeatView()});this.viewEl=h.element,this.viewCleanup=()=>h.dispose()}closeSeatView(e=!0){e&&(this.seatViewGen+=1),this.viewCleanup?.(),this.viewCleanup=null,this.viewEl?.remove(),this.viewEl=null}money(e){let t=this.opts.pricing?.formatter;if(t)return t(e,this.currency);let i=Number.isInteger(e);return(0,T.formatMoney)(e,this.currency,{locale:this.opts.locale,fallback:(s,n)=>`${s} ${n}`,...i?{minimumFractionDigits:0,maximumFractionDigits:0}:{}})}scheduleOfferBoundary(e){if(this.offerBoundaryTimer&&clearTimeout(this.offerBoundaryTimer),this.offerBoundaryTimer=null,!this.api.availability||this.destroyed)return;let t=Date.now(),i=as(e,t);if(i==null)return;let s=6*36e5,n=Math.min(Math.max(i-t+1e3,1e3),s);this.offerBoundaryTimer=setTimeout(()=>{this.offerBoundaryTimer=null,!document.hidden&&this.refreshOfferAvailability(!1)},n)}scheduleOfferRefresh(e){!this.api.availability||this.destroyed||(this.offerRefreshTimer&&clearTimeout(this.offerRefreshTimer),this.offerRefreshTimer=setTimeout(()=>{this.offerRefreshTimer=null,this.refreshOfferAvailability(e)},e?180:0))}async refreshOfferAvailability(e){if(!(!this.api.availability||this.destroyed))try{let t=await this.api.availability(this.opts.event,e);if(this.destroyed)return;let i=ri(t);if(!i)return;this.offerAvailability=i,this.applyChannelPricing(i.channelPricing),this.scheduleOfferBoundary(i);let s=si(i),n={...this.hostPricing?.prices??{},...s},o=Object.keys(n).length>0||this.hostPricing?.formatter?{prices:n,...this.hostPricing?.formatter?{formatter:this.hostPricing.formatter}:{}}:void 0;this.setPricing(o),this.syncOffer(),this.opts.onOfferAvailabilityChange?.(i)}catch{!this.destroyed&&!this.offerBoundaryTimer&&!document.hidden&&(this.offerBoundaryTimer=setTimeout(()=>{this.offerBoundaryTimer=null,!document.hidden&&this.refreshOfferAvailability(!1)},3e4))}}offerPrice(e){return e?this.offerAvailability?.prices.find(t=>t.categoryKey===e)??null:null}applyChannelPricing(e){this.channelByObject.clear(),this.pricesByChannel.clear();for(let t of e?.channels??[])this.pricesByChannel.set(t.channelId,t.priceOverrides);for(let t of e?.objects??[])this.pricesByChannel.has(t.channelId)&&this.channelByObject.set(t.label,t.channelId)}syncOffer(){let e=this.els.offer;if(!e)return;let t=this.offerAvailability,i=t?.release??null,s=i?null:t?.upcoming??null;if(!t||t.state==="closed"||t.state==="sold-out"||!i&&!s){e.classList.remove("has"),e.replaceChildren();return}let n=i??s,o=document.createElement("div");o.className="sl-offer-main";let a=document.createElement("div");a.className="sl-offer-copy";let l=document.createElement("span");l.className="sl-offer-kicker",l.textContent=i?this.tf("picker.currentTicketOffer","Current ticket offer"):this.tf("picker.upcomingTicketOffer","Upcoming ticket offer");let c=document.createElement("strong");c.className="sl-offer-name",c.textContent=n.name||(i?this.tf("picker.currentOffer","Current offer"):this.tf("picker.scheduledOffer","Scheduled offer"));let h=document.createElement("span");h.className="sl-offer-line";let p=[];i&&t.fromPrice!=null&&p.push(this.money(t.fromPrice/100)),i&&n.remaining!=null&&p.push((0,T.t)("picker.offerRemainingAvailable",{count:n.remaining})),i&&n.endsAt!=null&&p.push((0,T.t)("picker.offerUntil",{time:Wt(n.endsAt,this.eventTimezone,this.opts.locale)})),s?.startsAt!=null&&p.push((0,T.t)("picker.offerStarts",{time:Wt(s.startsAt,this.eventTimezone,this.opts.locale)})),h.textContent=p.join(" \xB7 "),a.append(l,c,h);let d=document.createElement("details");d.className="sl-offer-info";let u=document.createElement("summary");u.setAttribute("aria-label",(0,T.t)("picker.howOfferWorks",{name:c.textContent??""})),u.textContent="i";let g=document.createElement("div");g.className="sl-offer-detail",g.textContent=i?this.tf("picker.offerDetailActive","This price applies automatically to eligible seats. Tickets in active carts temporarily reduce the available quantity; released or expired holds return it. When the offer ends, the next matching offer or normal ticket price takes over."):this.tf("picker.offerDetailUpcoming","Tickets are available at their normal price now. This scheduled offer will apply automatically to eligible seats when it starts."),d.append(u,g),o.append(a,d),e.replaceChildren(o),e.classList.add("has")}paidPrice(e,t,i,s){let n=s?this.channelByObject.get(s):void 0;if(n&&e){let a=this.pricesByChannel.get(n)?.find(l=>l.categoryKey===e&&l.tierId===(t??null));if(a)return a.price}let o=e?this.opts.pricing?.prices?.[e]:void 0;return o===void 0?i:typeof o=="number"?o:t&&o.tiers?.[t]!==void 0?o.tiers[t]:o.base??i}legendDeps(){return{colorOf:e=>this.controller.getRenderer()?.categoryDisplayColor?.(e.key)??e.color,rangeOf:e=>this.catPriceRange(e),priceOf:e=>this.catPrice(e),offerOf:e=>this.offerPrice(e),money:e=>this.money(e),esc:O}}syncPriceRail(e,t,i=this.legendDeps()){let s=this.els.railScroll,n=e.length>1;this.els.rail?.classList.toggle("has",n),s&&(s.innerHTML=n?rs({...i,categories:e,left:t,activeKey:this.focusedCatKey,soldOutWord:this.tf("picker.soldOut","Sold out")}):"",s.querySelectorAll(".sl-rc").forEach(o=>{o.addEventListener("click",()=>this.focusCategory(o.dataset.cat??""))}),this.railEdgesBound||(this.railEdgesBound=!0,s.addEventListener("scroll",()=>Ni(s),{passive:!0})),requestAnimationFrame(()=>Ni(s)))}syncPrices(){let e=this.controller.doc;if(!e||!this.els.prices)return;let t=this.controller.categoryAvailability(),i=e.categories.filter(p=>!p.notForSale);this.narrateAvailability(i,t),this.syncSoldout(i,t);let s=this.legendDeps(),n=this.suppressPricing,o=n?{...s,priceOf:()=>{},rangeOf:()=>{},offerOf:()=>null}:s;n&&(this.els.pricesSec?.querySelector("span")?.replaceChildren(this.tf("picker.seatCategories","Seat categories")),this.els.pricesHint?.remove()),this.syncPriceRail(i,t,o);let a=5,l=i.length-a,c=l>1&&!this.pricesExpanded,h=c?i.slice(0,a):i;this.els.prices.classList.toggle("sl-expanded",l>1&&this.pricesExpanded),this.els.prices.innerHTML=is({...o,categories:h,left:t,collapsed:c,activeKey:this.focusedCatKey,bandKeys:this.priceBandKeys,leftCount:p=>(0,T.tCount)("picker.leftCount",p),titleFor:(p,d)=>d?this.tf("picker.showAllSeats","Show all seats"):(0,T.t)("picker.showLabelSeatsOnMap",{label:p.label}),moreLabel:l>1?c?n?this.tf("picker.showAllCategories","Show all categories"):(0,T.t)("picker.showAllTicketTypes",{count:i.length}):this.tf("picker.showFewer","Show fewer"):null,status:{legend:this.tf("picker.seatStatusLegend","Seat status legend"),held:this.tf("picker.temporarilyHeld","Temporarily held"),sold:this.tf("picker.sold","Sold")}}),this.els.prices.querySelectorAll(".sl-price-row").forEach(p=>{p.addEventListener("mouseenter",()=>this.controller.getRenderer()?.setCategoryHighlight?.(p.dataset.cat??null)),p.addEventListener("mouseleave",()=>this.controller.getRenderer()?.setCategoryHighlight?.(null));let d=()=>this.focusCategory(p.dataset.cat??"");p.addEventListener("click",d),p.addEventListener("keydown",u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),d())})}),this.els.prices.querySelector(".sl-price-more")?.addEventListener("click",()=>{this.pricesExpanded=!this.pricesExpanded,this.syncPrices()})}focusCategory(e){if(!e)return;let t=this.focusedCatKey===e?null:e;this.focusedCatKey=t,this.priceBandKeys=t?new Set([t]):null;let i=this.els.pricesSec?.querySelector(".sl-price-select");i&&(i.value="all"),this.controller.setCategoryFilter(t?[t]:null),this.controller.focusCategoryFilter(t?[t]:null),this.pushAvailabilityTo3d(),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap(),this.syncPrices(),this.lastSection&&this.showSectionCard(this.lastSection)}narrateAvailability(e,t){let i=this.els.liveText,s=this.lastCatAvail;this.lastCatAvail={...t};let n=this.controller.getActiveFloorId();if(n!==this.lastAvailFloorId&&(this.lastAvailFloorId=n,this.availQuietUntil=performance.now()+2e3),!(!i||!s||performance.now()<this.availQuietUntil))for(let o of e){let a=s[o.key],l=t[o.key]??0;if(a===void 0||l>=a)continue;let c=a-l;i.textContent=(0,T.tCount)("picker.seatsJustTakenInCategory",c,{label:o.label,left:l}),this.els.live?.classList.remove("on"),this.els.live?.offsetWidth,this.els.live?.classList.add("on"),this.liveTimer&&clearTimeout(this.liveTimer),this.liveTimer=setTimeout(()=>this.els.live?.classList.remove("on"),8e3);return}}evictTakenSelections(){let e=new Set([...this.controller.currentHold()?.labels??[],...this.holdingLabels]),t=this.controller.getSelection().filter(i=>!e.has(i.label)&&(this.controller.getStatus(i.id)??"free")!=="free");t.length&&(this.controller.deselect(t.map(i=>i.id)),this.toast((0,T.t)("picker.seatJustTakenByAnother",{label:t[0].label}),"error"))}syncTray(){if(!this.els.tray)return;this.updateSelectionCapacity();let e=this.committedSelection(),t=this.controller.getGAAreas(),i=this.hold?.items??[],s=[],n=new Set;if(!this.salesClosed){let m=this.performanceGroup?.nightSummary?.()??[];m.length&&s.push(xn(m,{title:this.tf("picker.group.yourSeatsByNight","Your seats by night"),empty:this.tf("picker.group.noSeatsChosenYet","No seats yet")}));let v=this.performanceGroup?.selectionModeSwitch;v&&s.push(`<button type="button" class="sl-pg-switch" data-pg-switch-mode>${O(v.label)}</button>`)}s.push(nn({salesClosed:this.salesClosed,hasPicks:e.length>0||i.length>0,hasGaAreas:t.length>0,groupMode:this.performanceGroup?this.performanceGroup.selectionMode??"same_seat":null,seated:!!this.controller.doc?.objects?.some(m=>m.type!=="gaArea"),whenText:this.eventWhenText?String(this.eventWhenText):void 0}));let o=!e.length&&!i.length&&!Ze(this.gaQty,this.hold?.items??[]);if(o&&(this.baReopen=!1),!this.performanceGroup&&!this.salesClosed&&!this.hold&&(o||this.baReopen||this.bestAvailableBusy||this.bestAvailableConfirm)){let m=(this.controller.doc?.categories??[]).filter(D=>!D.notForSale),v=this.controller.getBestAvailableZones();this.baZone&&!v.some(D=>D.id===this.baZone)&&(this.baZone=""),s.push(sn({confirming:this.bestAvailableConfirm,busy:this.bestAvailableBusy,reopened:this.baReopen,quantity:this.baQty,premium:this.baPremium,offerPremium:this.controller.hasPremiumSeats(),categories:m,zones:v,selectedCategory:this.baCat,selectedZone:this.baZone}))}let a=(m,v,D,K=1,j,G)=>en({d:m?this.controller.seatDetails(m):null,area:D==="ga"?t.find(U=>U.id===j):void 0,label:v,objectType:D,quantity:K,identity:G,performanceLabel:this.performanceGroup?.activePerformanceLabel?.(),performanceDates:this.performanceGroup?.selectedPerformanceDates?.()}),l=O,c=[];for(let m of Pr(i)){let v=m.objectType==="ga"?`held:ga:${m.objectId}:${m.tierId??""}`:`held:${m.label}`;n.add(v);let D=this.controller.doc?.categories.find($=>$.key===m.categoryKey),K=m.tierId?D?.tiers?.find($=>$.id===m.tierId)?.name:void 0,j=m.objectType!=="ga"?this.controller.seatByLabel(m.label):null,G=m.objectType==="table"?this.controller.tableSelection(m.label):null,U=j?this.controller.seatDetails(j.id):null,ae=this.seatViewEnabled()&&!!j&&m.objectType!=="table",le=l(this.tf("picker.heldForYou","Held for you")),ce=(G?.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${l(encodeURIComponent(m.label))}">${l((0,T.t)("picker.guestsCountEdit",{count:m.quantity??1}))}</button>`:"")+li(j?.wheelchairSpaceType)+ji(j?.commercial),E=this.paidPrice(m.categoryKey,m.tierId,m.unitPrice,m.label)*(m.quantity??1);c.push({key:v,fresh:!this.lastTrayKeys.has(v),held:!0,seatIds:[],heldLabels:m.labels,removeAria:(0,T.t)("picker.removeHeldTicketLabel",{label:Mi(m,t)}),locateId:j?.id??null,section:U?.sectionLabel??"",rowLabel:U&&te(U)||"",seatLabel:U?.seatNumber??m.label,categoryLabel:`${D?.label??m.categoryKey}${K?` \xB7 ${K}`:""}`,categoryColor:this.controller.getRenderer?.()?.categoryDisplayColor?.(m.categoryKey)??D?.color??"",identityHtml:a(j?.id??null,m.label,m.objectType,m.quantity??1,m.objectId,G??void 0),stateHtml:`<span class="sl-ticket-state held" aria-label="${le}" title="${le}"><svg viewBox="0 0 24 24"><rect x="5" y="10" width="14" height="10" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg></span>`,extrasHtml:ce,amount:E,amountText:this.suppressPricing?"":this.money(E),noteHtml:"",railHtml:this.performanceGroup?"":er((0,T.t)("picker.removeHeldTicketLabel",{label:Mi(m,t)}),ae?m.label:null),groupable:!ce&&!!U?.sectionLabel&&!this.performanceGroup})}let h=new Set(i.map(m=>m.label)),p=this.seatViewEnabled();for(let m of e.filter(v=>!h.has(v.label))){let v=`seat:${m.id}`;n.add(v);let D=this.controller.doc?.categories.find($=>$.key===m.categoryKey),K=m.tiers&&m.tiers.length&&!this.suppressPricing?`<select class="tier" data-tier="${l(m.id)}" aria-label="${l((0,T.t)("picker.ticketTierFor",{label:m.label}))}">`+m.tiers.map($=>`<option value="${l($.id)}"${$.id===m.tierId?" selected":""}>${l($.name)} \xB7 ${l(this.money(this.paidPrice(m.categoryKey,$.id,$.price,m.label)))}</option>`).join("")+"</select>":"",j=m.tiers?.find($=>$.id===m.tierId)??m.tiers?.[0],G=j?.buyerMessage?.trim()||(j?.restriction==="companion"?this.tf("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):""),U=this.controller.seatDetails(m.id),ae=l(this.tf("picker.selected","Selected")),le=(0,T.t)("picker.removeSeatLabel",{label:m.label}),ce=(m.objectType==="table"&&m.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${l(encodeURIComponent(m.label))}">${l((0,T.t)("picker.guestsCountEdit",{count:m.quantity??1}))}</button>`:"")+li(m.wheelchairSpaceType)+ji(m.commercial)+K,E=this.paidPrice(m.categoryKey,m.tierId??null,m.price,m.label)*(m.quantity??1);c.push({key:v,fresh:!this.lastTrayKeys.has(v),held:!1,seatIds:[m.id],heldLabels:[],locateId:m.id,section:U?.sectionLabel??"",rowLabel:U&&te(U)||"",seatLabel:U?.seatNumber??m.label,categoryLabel:D?.label??m.categoryKey,identityHtml:a(m.id,m.label,m.objectType,m.quantity??1,m.objectId,m),categoryColor:this.controller.getRenderer?.()?.categoryDisplayColor?.(m.categoryKey)??D?.color??"",stateHtml:`<span class="sl-ticket-state" aria-label="${ae}" title="${ae}"><svg viewBox="0 0 24 24"><path d="M5 12l4 4L19 6"/></svg></span>`,extrasHtml:ce,amount:E,amountText:this.suppressPricing?"":this.money(E),removeAria:le,noteHtml:G?`<small class="sl-tier-note">${l(G)}</small>`:"",railHtml:er(le,p&&m.objectType!=="table"?m.label:null),groupable:!ce&&!G&&!!U?.sectionLabel&&!this.performanceGroup})}c.length&&s.push(this.root?.dataset.layout==="narrow"?pn(c,{money:m=>this.money(m),suppressPricing:this.suppressPricing}):c.map(dn).join("")),t.length&&s.push(Or(this,t,i)),!this.performanceGroup&&!this.salesClosed&&!this.hold&&!o&&!this.baReopen&&!this.bestAvailableBusy&&!this.bestAvailableConfirm&&s.push(`<button type="button" class="sl-ba-reopen" data-ba-reopen><span aria-hidden="true">\u2726</span>${l(this.tf("picker.findTogetherInstead","Find seats together instead"))}</button>`),this.els.tray.innerHTML=s.join(""),this.lastTrayKeys=n,hn(this.els.tray),this.els.tray.querySelector("[data-pg-switch-mode]")?.addEventListener("click",()=>this.performanceGroup?.selectionModeSwitch?.activate());let d=this.performanceGroup?.selectNight;d&&Hn(this.els.tray,m=>d(m)),this.els.tray.querySelectorAll("[data-ba]").forEach(m=>{m.addEventListener("click",()=>{this.baQty=Math.max(1,Math.min(this.maxTickets,this.baQty+Number(m.dataset.ba))),this.syncTray()})}),this.els.tray.querySelector("[data-ba-cat]")?.addEventListener("change",m=>{this.baCat=m.target.value}),this.els.tray.querySelector("[data-ba-zone]")?.addEventListener("change",m=>{this.baZone=m.target.value}),this.els.tray.querySelector("[data-ba-premium]")?.addEventListener("click",()=>{this.baPremium=!this.baPremium,this.syncTray()}),this.els.tray.querySelector(".sl-ba-go")?.addEventListener("click",()=>{if(this.pendingSelectionCount()>0){this.bestAvailableConfirm=!0,this.syncTray(),this.els.tray.querySelector("[data-ba-replace]")?.focus();return}this.bestAvailable(this.baQty,this.baCat||void 0,{preferPremium:this.baPremium,zoneId:this.baZone||void 0})}),this.els.tray.querySelector("[data-ba-cancel]")?.addEventListener("click",()=>{this.bestAvailableConfirm=!1,this.syncTray(),this.els.tray.querySelector(".sl-ba-go")?.focus()}),this.els.tray.querySelector("[data-ba-reopen]")?.addEventListener("click",()=>{this.baReopen=!0,this.syncTray(),this.els.tray.querySelector(".sl-ba-go")?.focus()}),this.els.tray.querySelector("[data-ba-close]")?.addEventListener("click",()=>{this.baReopen=!1,this.syncTray(),this.els.tray.querySelector("[data-ba-reopen]")?.focus()}),this.els.tray.querySelector("[data-ba-replace]")?.addEventListener("click",()=>{this.bestAvailableConfirm=!1,this.bestAvailable(this.baQty,this.baCat||void 0,{preferPremium:this.baPremium,zoneId:this.baZone||void 0})}),this.els.tray.querySelectorAll(".sl-chip .rm").forEach(m=>{m.addEventListener("click",()=>{let v=m.closest(".sl-chip");if(v.dataset.held){this.removeHeldLabels(decodeURIComponent(v.dataset.held).split(`
|
|
2237
|
+
`),v);return}let D=v.dataset.seat.split(" "),K=this.controller.getSelection().find(G=>G.id===D[0])?.label??this.tf("picker.seat","Seat"),j=()=>{this.controller.deselect(D),this.toast((0,T.t)("picker.labelRemoved",{label:K}),"neutral",{label:this.tf("picker.undo","Undo"),onClick:()=>{let G=this.controller.select(D);this.toast(G.length?(0,T.t)("picker.labelRestored",{label:K}):(0,T.t)("picker.labelNoLongerAvailable",{label:K}),G.length?"success":"warning")}})};if(this.reducedMotion()){j();return}v.classList.remove("sl-enter"),v.classList.add("sl-leave","sl-mo-collapse"),this.scheduleMotion(j,Y.collapse)})}),this.els.tray.querySelectorAll("[data-table-edit]").forEach(m=>{m.addEventListener("click",v=>{v.stopPropagation();let D=decodeURIComponent(m.dataset.tableEdit??""),K=this.controller.tableSelection(D);if(!K)return;let j=i.find(G=>G.label===D&&G.objectType==="table");this.showTableDialog({...K,quantity:j?.quantity??K.quantity},!!j,m)})}),this.els.tray.querySelectorAll(".sl-chip .tier").forEach(m=>{m.addEventListener("change",()=>this.controller.setSeatTier(m.dataset.tier,m.value||null))}),this.els.tray.querySelectorAll(".sl-chip .view[data-view-label]").forEach(m=>{m.addEventListener("click",()=>{let v=this.controller.seatByLabel(m.dataset.viewLabel);v&&this.openSeatView(v)})}),this.els.tray.querySelectorAll(".sl-chip[data-locate]").forEach(m=>{let v=()=>this.controller.flashSeat(m.dataset.locate,this.cssVar("--sl-accent")||"#f4b740");m.addEventListener("mouseenter",v),m.addEventListener("focusin",v)}),Ir(this,this.els.tray,t),this.controller.setGASelection(Cr(this.gaQty)),this.salesClosed&&this.els.tray.querySelectorAll(".sl-ba-go,[data-ba],[data-ba-cat],[data-ba-zone],[data-ba-replace],.sl-ga button").forEach(m=>{m.disabled=!0});let u=Ar(this,t,this.hold?.items??[]),g=Ze(this.gaQty,this.hold?.items??[]),b=i.reduce((m,v)=>m+this.paidPrice(v.categoryKey,v.tierId,v.unitPrice,v.label)*(v.quantity??1),0),x=i.reduce((m,v)=>m+(v.quantity??1),0),k=e.filter(m=>!h.has(m.label)),S=k.reduce((m,v)=>m+this.paidPrice(v.categoryKey,v.tierId??null,v.price,v.label)*(v.quantity??1),0)+u+b,C=k.reduce((m,v)=>m+(v.quantity??1),0)+g+x,A=this.pendingSelectionCount(),M=this.lastTrayCount,P=this.lastTrayTotal,R=Ln(this.performanceGroup?.groupSelectionSummary?.(),this.performanceGroup?.selectionMode??"same_seat");if(this.els.count.textContent=R||(C?(0,T.tCount)("picker.ticketsCount",C):this.tf("picker.noSeatsSelected","No seats selected")),this.els.total.textContent=C&&!this.suppressPricing?this.money(S):"",this.root?.setAttribute("data-has-selection",String(C>0)),this.root?.setAttribute("data-ba-active",String(this.bestAvailableConfirm||this.bestAvailableBusy||this.baReopen)),this.els.foot?.classList.toggle("empty",C===0),this.els.seatSummary&&(this.els.seatSummary.textContent=R||(C?(0,T.tCount)("picker.seatsSelectedCount",C):"")),this.syncCta(C,A),this.hold){this.holdCopyPending=A>0;let m=on({secured:x||this.hold.seats?.length||0,pendingCount:A,expiresAt:this.holdExpiresAt,releasing:this.releasingHold});this.els.holdTitle&&(this.els.holdTitle.textContent=m.title),this.els.holdCopy&&(this.els.holdCopy.textContent=m.copy);let v=this.els.holdChange;v&&(v.disabled=this.releasingHold,v.textContent=m.change)}C!==M&&this.animateOnce(this.els.count,"sl-value-pop",380),S!==P&&this.animateOnce(this.els.total,"sl-value-pop",380),M===0&&C>0&&(this.animateOnce(this.els.cta,"sl-ready",520),this.sideCollapsed&&this.root?.dataset.layout!=="narrow"&&this.setPanelCollapsed(!1)),this.renderPeek(C,S,A,C>M),this.lastTrayCount=C,this.lastTrayTotal=S,this.opts.onSelectionChange?.(e),this.emitSelectionValidity(C,e)}emitSelectionValidity(e,t){let i=this.controller.getSelectionValidity(e);i&&(i.seats=t,this.opts.onSelectionValidityChange?.(i),i.isValid?this.lastSelectionValidity!==!0&&this.opts.onSelectionValid?.(t):this.lastSelectionValidity!==!1&&this.opts.onSelectionInvalid?.(i),this.lastSelectionValidity=i.isValid)}renderPeek(e,t,i,s=!1){if(!this.els.peek)return;let n=(this.controller.doc?.categories??[]).map(o=>this.catPrice(o)).filter(o=>o!=null);this.els.peek.innerHTML=rn({count:e,total:t,pendingCount:i,ctaPhase:this.ctaPhase,hasHold:!!this.hold,salesClosed:this.salesClosed,fromPrice:n.length?Math.min(...n):null,addMore:tn({salesClosed:this.salesClosed,hasHold:!!this.hold,ctaPhase:this.ctaPhase,formOpen:this.baReopen||this.bestAvailableBusy||this.bestAvailableConfirm,room:this.maxTickets-this.totalTicketCount(),wanted:this.baQty}),holdTime:this.hold&&this.holdTimer?Ct(Math.max(0,this.holdExpiresAt-Date.now())):null,money:o=>this.money(o)}),this.root&&(this.root.dataset.peekClock=String(!!this.els.peek.querySelector(".sl-peek-time"))),s&&this.animateOnce(this.els.peek.querySelector(".sl-peek-sum")??void 0,"sl-peek-bump",240)}async removeHeldLabels(e,t){let i=e.filter(o=>o&&!this.releasingLabels.has(o));if(!i.length)return!1;let s=i[0];i.forEach(o=>this.releasingLabels.add(o)),t?.setAttribute("aria-busy","true");let n=t?.querySelector(".rm");n&&(n.disabled=!0);try{let o=this.handedOff;if(!await this.controller.releaseLabels(i))return this.toast((0,T.t)("picker.couldNotRemoveLabel",{label:s}),"error"),!1;Mr(this.gaQty,this.hold?.items??[],i);let l=this.controller.currentHold();return this.hold=l?{holdId:l.holdId,expiresAt:l.expiresAt,seats:l.seats,items:l.items}:null,this.handedOff=!!this.hold&&o,this.bookedShown=!1,this.ctaPhase="idle",this.hold?this.startHoldTimer(this.hold.expiresAt):(this.stopHoldTimer(),this.forgetHold()),this.syncTray(),this.emitHoldChange(),this.toast((0,T.t)("picker.labelRemovedFromHold",{label:s}),"success"),!0}finally{i.forEach(o=>this.releasingLabels.delete(o)),t?.removeAttribute("aria-busy"),n?.isConnected&&(n.disabled=!1)}}async handleChangeSeats(){if(!this.hold||this.releasingHold)return;this.releasingHold=!0;let e=this.els.holdChange;e&&(e.disabled=!0,e.textContent=this.tf("picker.releasingEllipsis","Releasing\u2026"));try{await this.release(),this.hold||this.toast(this.tf("picker.heldTicketsReleased","Held tickets released. Choose your new seats."),"success")}finally{this.releasingHold=!1,e?.isConnected&&(e.disabled=!1,e.textContent=this.tf("picker.change","Change"))}}async handleCta(){if(this.salesClosed)return;let e=this.controller.getSelectionValidity(this.totalTicketCount());if(e&&!e.isValid){this.toast(Ji(e,(i,s)=>this.tf(i,s)),"warning");return}if(this.totalTicketCount()>this.maxTickets){this.toast((0,T.t)("picker.removeTicketsUntilOrFewer",{count:this.maxTickets}),"warning");return}let t=this.committedSelection();if(this.hold&&!t.some(i=>!(this.hold.items??[]).some(s=>s.label===i.label))){let i=this.hold.seats??t;this.handedOff=!0,this.setCtaPhase("checkout"),this.checkoutHandoff(this.hold,i);return}this.holdingLabels=new Set(t.map(i=>i.label)),this.setCtaPhase("holding");try{let i=null,s=Tr(this.gaQty),n=this.committedSelection();if(n.length){let o=await this.controller.hold(void 0,this.opts.holdTtlMs);i=o?{holdId:o.holdId,expiresAt:o.expiresAt,seats:o.seats,items:o.items}:null}for(let{areaId:o,tierId:a,qty:l}of s){let c=await this.controller.holdGA(o,l,{tierId:a,ttlMs:this.opts.holdTtlMs});i=c?{holdId:c.holdId,expiresAt:c.expiresAt,seats:c.seats,items:c.items}:i}if(!i){this.toast(this.tf("picker.seatsJustTaken","One or more seats were just taken. Please pick again."),"error"),this.setCtaPhase("idle"),this.syncTray();return}this.hold=i,this.handedOff=!this.performanceGroup,this.startHoldTimer(i.expiresAt),this.flashHeldSeats(i),this.setCtaPhase(this.performanceGroup?"idle":"checkout"),this.emitHoldChange(),this.performanceGroup||this.checkoutHandoff(i,i.seats??n)}catch(i){this.opts.onError?.(i);let s=i,n=(s.conflicts??[]).map(a=>a.label).filter(Boolean).slice(0,3);s.reason==="event_closed"&&this.setSalesClosed(!0);let o=s.reason==="event_closed"?this.tf("picker.seatSalesClosedForEvent","Seat sales have closed for this event."):s.reason==="companion_pair_required"?this.tf("picker.companionPairRequired","Select the adjacent wheelchair place with each companion ticket."):s.reason==="ticket_option_not_applicable"?this.tf("picker.ticketOptionNotApplicable","That ticket choice is not available for the selected seat."):n.length?n.length===1?(0,T.t)("picker.labelsNoLongerAvailable.one",{labels:n.join(", ")}):(0,T.t)("picker.labelsNoLongerAvailable.other",{labels:n.join(", ")}):this.tf("picker.seatsJustTaken","One or more seats were just taken. Please pick again.");this.toast(o,"error"),this.setCtaPhase("idle")}finally{this.holdingLabels.clear(),this.ctaPhase==="holding"&&(this.ctaPhase="idle"),this.syncTray()}}startHoldTimer(e){this.stopHoldTimer(),this.holdExpiresAt=e,this.hold&&this.rememberHold(this.hold);let t=this.els.hold;t.innerHTML=`<span class="sl-hold-dot" aria-hidden="true"></span><span>${this.tf("picker.held","Held")}</span><span class="sl-hold-time" data-ref="holdTime"></span>`;let i=t.querySelector('[data-ref="holdTime"]');this.els.holdNote?.classList.add("on");let s=()=>{let n=Math.max(0,this.holdExpiresAt-Date.now());i&&(i.textContent=Ct(n));let o=this.els.peek?.querySelector(".sl-peek-time");o&&(o.textContent=Ct(n)),!this.holdCopyPending&&this.els.holdCopy&&this.root?.dataset.layout!=="narrow"&&(this.els.holdCopy.textContent=tr(this.holdExpiresAt)),t.classList.add("on"),t.classList.toggle("is-expiring",n>0&&n<=Vn),this.setExtendPrompt(n>0&&n<=Vn,n),n<=0&&this.stopHoldTimer()};s(),this.holdTimer=setInterval(s,500)}stopHoldTimer(){this.holdTimer&&clearInterval(this.holdTimer),this.holdTimer=null,this.els.hold?.classList.remove("on","is-expiring"),this.els.holdNote?.classList.remove("on"),this.root&&delete this.root.dataset.peekClock,this.setExtendPrompt(!1,0)}setExtendPrompt(e,t){if(this.extendEl)if(e&&this.controller.currentHold()&&!this.bookedShown){let i=Math.ceil(t/1e3),s=Math.floor(i/60),n=String(i%60).padStart(2,"0");this.els.extendTxt.innerHTML=(0,T.t)("picker.seatsHeldForNeedMoreTime",{time:`${s}:${n}`}),this.extendEl.classList.add("on")}else this.extendEl.classList.remove("on")}async handleExtend(){let e=this.els.extendBtn;e.disabled=!0;let t=e.textContent;e.textContent=this.tf("picker.addingEllipsis","Adding\u2026");try{let i=await this.controller.extendHold(this.opts.holdTtlMs);i?(this.hold={holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items},this.holdExpiresAt=i.expiresAt,this.extendEl?.classList.remove("on"),this.rememberHold(this.hold),this.emitHoldChange(),this.toast(this.tf("picker.moreTimeAdded","More time added \u2014 your seats are still held."),"success")):this.toast(this.tf("picker.couldNotAddMoreTime","Couldn't add more time \u2014 please head to checkout now."),"warning")}catch(i){this.opts.onError?.(i),this.toast(this.tf("picker.couldNotAddMoreTime","Couldn't add more time \u2014 please head to checkout now."),"warning")}finally{e.disabled=!1,e.textContent=t}}detectBooked(){this.bookedShown||!this.handedOff||!this.hold||this.controller.currentHold()===null&&this.showBooked()}showBooked(){if(this.bookedShown||!this.hold)return;this.bookedShown=!0;let e=this.buildHandoff(this.hold);this.stopHoldTimer(),this.forgetHold();let t=e.lineItems.reduce((s,n)=>s+n.quantity,0),i=this.performanceGroup?.groupSelectionSummary?.();this.els.bookedSub&&(this.els.bookedSub.innerHTML=i?.seats?`<span class="sl-booked-seats">${(0,T.tCount)("picker.group.ticketsConfirmedAcross",i.seats,{performances:i.performances})}</span>`:`<span class="sl-booked-seats">${(0,T.tCount)("picker.ticketsCount",t)}</span> ${this.tf("picker.confirmedAndOnWay","confirmed. A confirmation is on its way.")}`),this.bookedEl?.classList.add("on"),this.opts.onBooked?.(e)}notifyGroupSettled(e){e==="booked"?this.showBooked():this.dismissConfirm(),this.hold=null,this.handedOff=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.forgetHold(),this.syncTray(),this.syncCta()}checkoutHandoff(e,t){if(this.checkoutMode==="hosted"){this.startHostedCheckout(e,t);return}this.opts.onCheckout?.(e,t,this.buildHandoff(e))}async startHostedCheckout(e,t){let i=this.buildHandoff(e),s=null;try{s=await(this.paymentOptions??=this.pubApi.paymentOptions(this.opts.event))}catch(o){this.opts.onError?.(o)}if(this.destroyed)return;let n=s?.providers?.[0];if(!n){let o=Yr(s?.reason),a=!!this.opts.onCheckoutUnavailable||!!this.opts.onCheckout;this.opts.onCheckoutUnavailable?.({reason:o,handoff:i}),this.opts.onCheckout?.(e,t,i),a||this.openCheckoutPanel({kind:"unavailable",reason:o,seatCount:i.lineItems.reduce((l,c)=>l+c.quantity,0)});return}await this.openCheckoutPanel({kind:"pay",provider:n,order:{holdId:i.holdId,expiresAt:i.expiresAt,currency:i.currency,total:i.total,labels:i.lineItems.map(o=>o.displayLabel??o.label)}})}async openCheckoutPanel(e){let t;try{({mountCheckout:t}=await Wr())}catch(i){this.opts.onError?.(i),this.toast(this.tf("picker.checkoutCouldNotBeOpened","Checkout could not be opened. Your seats are still held \u2014 please try again."),"error"),this.setCtaPhase("idle");return}this.destroyed||!this.root||(this.closeCheckoutPanel(),this.checkoutPanel=t({root:this.root,state:e,eventKey:this.opts.event,formatMoney:i=>this.money(i),startSession:i=>this.pubApi.startCheckout(this.opts.event,{...i,...this.opts.returnUrl?{returnUrl:this.opts.returnUrl}:{}}),orderStatus:i=>this.pubApi.orderStatus(i),onCancel:()=>{this.checkoutPanel=null,this.hold||this.setCtaPhase("idle")},onConfirmed:i=>{this.opts.onOrderConfirmed?.(i),this.controller.refresh()},onError:i=>this.opts.onError?.(i)}))}closeCheckoutPanel(){this.checkoutPanel?.destroy(),this.checkoutPanel=null}buildHandoff(e){let i=(e.items??[]).map(o=>{let a=this.controller.lineItemDisplay(o);return{label:o.label,...a.displayLabel?{displayLabel:a.displayLabel}:{},...a.displayType?{displayType:a.displayType}:{},objectId:o.objectId,objectType:o.objectType,categoryKey:o.categoryKey,tierId:o.tierId,unitPrice:this.paidPrice(o.categoryKey,o.tierId,o.unitPrice,o.label),currency:o.currency??this.currency,quantity:o.quantity??1}}),s=i[0]?.currency??this.currency,n=i.reduce((o,a)=>o+a.unitPrice*a.quantity,0);return{holdId:e.holdId,expiresAt:e.expiresAt,currency:s,lineItems:i,total:n}}emitHoldChange(){let e=this.hold;this.scheduleOfferRefresh(!0),this.opts.onHoldChange?.(e,e?.seats??[],e?this.buildHandoff(e):null)}toast(e,t="neutral",i){let s=this.els.toast;if(!s)return;s.replaceChildren();let n=document.createElement("span");if(n.textContent=e,s.appendChild(n),s.classList.toggle("has-action",!!i),i){let o=document.createElement("button");o.type="button",o.className="sl-toast-action",o.textContent=i.label,o.addEventListener("click",i.onClick,{once:!0}),s.appendChild(o)}s.dataset.tone=t,s.classList.add("on","sl-mo-rise"),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>{s.classList.remove("on","sl-mo-rise"),s.classList.remove("has-action"),s.dataset.tone="neutral"},4200)}dismissSkeleton(){Gs({boot:this.els.boot,map:this.els.map,rail:this.els.rail,root:this.root,reducedMotion:this.reducedMotion()})}placeTooltip(){if(!this.tipEl)return;let e={width:this.els.map.clientWidth,height:this.els.map.clientHeight},t={width:this.tipEl.offsetWidth,height:this.tipEl.offsetHeight},i=this.tipPinned?_n(this.tipPos,e,t):null,s=i??In(this.tipPos,e.width,e.height,t);this.tipEl.style.left=`${s.left}px`,this.tipEl.style.top=`${s.top}px`,i?this.tipEl.dataset.placement=i.placement:delete this.tipEl.dataset.placement}nightStripFor(e,t){let i=this.performanceGroup,s=sr(e.mark,i?.nights?.()),n=s?.states.filter(o=>o.free).length??0;return wn(s,{locale:this.opts.locale,switchLabel:i?.selectionModeSwitch?.label??null,selectPartialLabel:i?.partialSeatSelection?.label(n)??null,pinned:t})}unavailableReason(e){return!e.unavailable||e.mark?.kind==="partial"?"":e.status==="held"?this.tf("picker.heldByOther","Held by another buyer \u2014 may become available"):e.status==="not_for_sale"?this.tf("picker.notForSaleExplanation","This seat is not included in the current sale."):e.status==="free"?"":this.tf("picker.soldSeatExplanation","This seat has already been booked.")}unpinTooltip(){this.tipPinned&&(this.tipPinned=!1,this.tipEl?.classList.remove("sl-tip-pinned"),this.tipEl&&(this.tipEl.style.display="none"))}handleMapPointerDown(e){if(this.tipEl?.contains(e.target))return;this.lastMapPoint={x:e.clientX,y:e.clientY},this.lastPointerType=e.pointerType||"mouse";let t=this.els.map.getBoundingClientRect();this.tipPos={x:e.clientX-t.left,y:e.clientY-t.top},this.unpinTooltip()}updateTooltip(e){if(!this.tipEl)return;if(this.confirmSeat){this.tipEl.style.display="none";return}if(this.tipPinned&&e?.interaction!=="press")return;if(!e){this.tipPinned||(this.tipEl.style.display="none",this.tipMarkedHoverLabel=null);return}let t=e.mark?.kind==="partial"&&this.tipMarkedHoverLabel===e.label;if(e.unavailable&&e.status==="free"&&e.interaction==="press"){this.toast(this.tf("picker.turnOffAccessibilityFilter","Turn off the wheelchair filter to pick this seat"),"neutral"),this.tipEl.style.display="none";return}let i=this.unavailableReason(e),s=e.mark?.kind==="partial"&&(e.interaction==="press"||this.lastPointerType!=="mouse"||t)||!!i&&e.interaction==="press";this.tipMarkedHoverLabel=e.mark?.kind==="partial"?e.label:null;let n=this.nightStripFor(e,s);this.tipEl.style.setProperty("--sl-cat",e.categoryColor),this.tipEl.innerHTML=On(e,{price:this.suppressPricing?"":this.money(this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label)),priceNote:this.suppressPricing?this.tf("picker.group.pricesPerPerformance","Prices shown per performance"):"",rowTypeWord:ot(e),reason:i,extra:n+(s?`<button type="button" class="sl-tip-close" data-pg-tip-close aria-label="${O(this.tf("picker.group.closeSeatDetails","Close seat details"))}">\xD7</button>`:"")}),this.tipPinned=s,this.tipEl.classList.toggle("sl-tip-pinned",s),this.tipEl.querySelector("[data-pg-tip-close]")?.addEventListener("click",()=>this.unpinTooltip()),this.tipEl.querySelector("[data-pg-switch-mode]")?.addEventListener("click",()=>{this.unpinTooltip(),this.performanceGroup?.selectionModeSwitch?.activate()}),$n(this.tipEl,this.performanceGroup?.partialSeatSelection?.label,o=>{this.unpinTooltip(),this.performanceGroup?.partialSeatSelection?.activate(e.id,o)}),this.tipEl.style.display="block",this.placeTooltip()}syncSeatMarks(){let e=this.performanceGroup?.seatMarks,t=this.controller.getRenderer();if(!e||!t?.setSeatMarks)return;let i={};for(let[s,n]of Object.entries(e())){let o=this.controller.idForLabel(s);o&&(i[o]=n)}Object.keys(i).length&&t.setSeatMarks(i)}getSelection(){return this.committedSelection()}selectObjects(e){return this.controller.select(e)}selectObjectsWithoutConfirmation(e){let t=new Set(e),i=this.controller.getSelection().filter(s=>t.has(s.id)||t.has(s.label));if(i.length===t.size)return i;this.suppressConfirmationSeatId=e[0]??null;try{return this.controller.select(e)}finally{this.suppressConfirmationSeatId=null}}deselectObjects(e){this.controller.deselect(e)}clearSelection(){this.dismissConfirm(),this.dismissTableDialog(),this.controller.clearSelection()}categoryLegendColor(){let e=(this.controller.doc?.categories??[]).find(t=>!t.notForSale);return(e?this.controller.getRenderer()?.categoryDisplayColor?.(e.key):null)||e?.color||"#2563eb"}async refreshAvailability(){await this.controller.refresh(),this.syncSeatMarks(),this.syncTray()}refreshPerformanceGroupComposition(){this.syncTray()}async adoptRestoredHold(e){!e||this.hold||await this.resumeHoldFromServer(e,!1)}selectCategories(e){return this.controller.selectCategories(e)}deselectCategories(e){this.controller.deselectCategories(e)}setSelectableObjects(e){this.controller.setSelectableObjects(e)}setMaxSelection(e){this.maxTickets=Math.max(this.exactTickets??1,Math.floor(e)),this.controller.setMaxSelection(this.maxTickets),this.updateSelectionCapacity(),this.syncTray()}getSelectionValidity(){let e=this.controller.getSelectionValidity(this.totalTicketCount());return e&&(e.seats=this.committedSelection()),e}setMapTheme(e){this.destroyed||(this.opts.theme={...this.opts.theme??{},map:e??void 0},this.controller.setMapTheme(e),this.applyMapChromeTokens(),this.minimap?.refreshMinimap())}applyThemeTokens(e){let t=xt(this.themeMode),i=wt(this.controller.doc?.theme,this.opts.theme,t);for(let[s,n]of Object.entries(i))e.style.setProperty(s,n);t?e.dataset.theme=t:delete e.dataset.theme,this.applyMapChromeTokens()}watchThemeMode(){this.colorSchemeStop?.(),this.colorSchemeStop=null,this.themeMode==="auto"&&(this.colorSchemeStop=ps(()=>{this.destroyed||this.repaintForThemeMode()}))}repaintForThemeMode(){this.root&&(this.applyThemeTokens(this.root),this.controller.setMapTheme(ai(this.opts.theme,this.themeMode)),this.applyMapChromeTokens(),this.minimap?.refreshMinimap(),this.syncPrices())}setThemeMode(e){this.destroyed||e===this.themeMode||(this.themeMode=e,this.opts.theme={...this.opts.theme??{},...e?{mode:e}:{mode:void 0}},this.watchThemeMode(),this.repaintForThemeMode(),this.emitAnalytics("theme_mode_changed",{mode:e,resolved:xt(e)??null}))}getThemeMode(){return this.themeMode}applyMapChromeTokens(){let e=this.els.map?.parentElement;if(!e||!this.root)return;let t=xt(this.themeMode),i=wt(this.controller.doc?.theme,this.opts.theme,t),s=ai(this.opts.theme,this.themeMode)?.background??this.controller.doc?.theme?.background??void 0,n=cs(i,s);for(let o of["--sl-bg","--sl-surface","--sl-text","--sl-muted","--sl-line","--sl-accent-text"])n?e.style.setProperty(o,n[o]):e.style.removeProperty(o)}setEventDetailsHidden(e){this.eventDetailsHidden=e,this.syncFullscreenButtons()}setPricing(e){let t=JSON.stringify(this.opts.pricing??null),i=JSON.stringify(e??null);t!==i&&(this.opts.pricing=e,!(this.destroyed||!this.els.prices)&&(this.els.pricesSec?.querySelector(".sl-price-select")?.remove(),this.buildPriceFilter(),this.syncPrices(),this.syncTray(),this.lastSection&&this.showSectionCard(this.lastSection)))}buildLanguageSwitcher(e){this.langSel=gs(e,{languages:this.opts.languages,label:this.tf("picker.preferredTicketType","Language"),onChange:t=>{this.setLocale(t)}})}async setLocale(e){let t=(0,T.getLocale)(),i=this.localeGeneration+=1,s=await(0,T.loadLocale)(e);return this.opts.messages&&(0,T.setStringOverrides)(this.opts.messages),s===t||this.applyActiveLocale(s,i),s}applyActiveLocale(e,t){t===this.localeGeneration&&this.root&&bs(e,{root:this.root,painters:[()=>this.syncTray(),()=>this.syncPrices(),()=>this.syncOffer(),()=>this.syncRung(),()=>this.syncFloors(),()=>this.syncPanelToggle(),()=>this.syncFullscreenButtons()],refreshMapCopy:()=>this.controller.refreshMapCopy(),languageSelect:this.langSel})}isColorblindSafe(){return this.cbSafe}setColorblindSafe(e){e!==this.cbSafe&&(this.cbSafe=e,this.cbEl?.setAttribute("aria-pressed",String(e)),this.controller.setColorblindSafe(e),this.syncPrices(),this.minimap?.refreshMinimap(),Va(e))}setViewMode(e){this.controller.setViewMode(this.normalizeInitialView(e)),this.syncProjection(),this.dismissConfirm()}getViewMode(){return this.controller.getViewMode()}normalizeInitialView(e){return e==="perspective"?(this.perspectiveWarned||(this.perspectiveWarned=!0,console.warn("[seatlayer] initialView:'perspective' (2.5D) is deprecated for the buyer picker and was coerced to 'flat'. Use the Map | 3D control for the immersive view.")),"flat"):e??"flat"}getBuyerView(){return this.buyerView}setBuyerView(e,t){if(e==="map"){this.exit3d();return}let i=t?.flyToSeatId;if(this.buyerView==="venue3d"){i?(this.opts.onBuyerViewChange?.({view:"venue3d",seatId:i}),this.view3dHandle?.flyToSeat(i)):t?.resetView&&this.view3dHandle?.focusOverview();return}this.enter3d(i)}seatState3dFor(e){switch(this.controller.getStatus(e.id)){case"held":return"held";case"booked":return"sold";case"not_for_sale":return"dimmed";default:break}return this.priceBandKeys!=null&&!this.priceBandKeys.has(e.categoryKey)||this.limitedViewFilter&&(e.commercial?.restrictedView||e.commercial?.obstructedView)?"dimmed":"available"}pushAvailabilityTo3d(){if(!this.view3dHandle)return;let e=this.allSeats().map(t=>({seatId:t.id,state:this.seatState3dFor(t)}));this.view3dHandle.setAvailability(e)}syncSelectionTo3d(){this.view3dHandle&&this.view3dHandle.setSelection(this.controller.getSelection().map(e=>e.id))}async seatViewFor3d(e){let t=this.allSeats().find(i=>i.id===e);if(!t)return null;if(t.viewUrl)try{let i=t.viewMeta?.previewUrl,s=!!i&&i!==t.viewUrl,n=s?await this.buyerAssetUrls.resolve(i):null,o=s?t.viewUrl:await this.buyerAssetUrls.resolve(t.viewUrl);return!o||s&&!n?null:{url:o,...n?{previewUrl:n}:{},...s?{resolveUrl:a=>this.buyerAssetUrls.resolve(a)}:{},...t.viewMeta?.sourceWidth!==void 0?{sourceWidth:t.viewMeta.sourceWidth}:{},...t.viewMeta?.sourceHeight!==void 0?{sourceHeight:t.viewMeta.sourceHeight}:{},...t.viewMeta?.previewWidth!==void 0?{previewWidth:t.viewMeta.previewWidth}:{},...t.viewMeta?.previewHeight!==void 0?{previewHeight:t.viewMeta.previewHeight}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.initialBearingDeg!==void 0?{initialBearingDeg:t.viewMeta.initialBearingDeg}:{},...t.viewMeta?.initialPitchDeg!==void 0?{initialPitchDeg:t.viewMeta.initialPitchDeg}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}}catch(i){return this.opts.onError?.(i),null}return{url:"",generated:!0,mediaKind:"model",coverage:"exact-seat",sourceLabel:this.tf("picker.chartDerivedModel","Chart-derived model")}}emitAnalytics(e,t){try{this.opts.onAnalytics?.(e,{...t,surface:"buyer"})}catch{}}emit3dAnalytics(e,t){this.emitAnalytics(e,t)}onView3dSeatPick(e){if(this.salesClosed){this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning"),this.syncSelectionTo3d();return}let t=this.allSeats().find(a=>a.id===e);if(!t)return;let i=this.controller.tableSelection(e);if(this.committedSelection().some(a=>i?a.label===i.label:a.id===e)){this.controller.deselect([e]),this.dismissConfirm(),this.syncSelectionTo3d();return}let n=this.controller.getStatus(t.id);if(n==="held"||n==="booked"||n==="not_for_sale"){this.showUnavailable3dSeat(t,this.seatState3dFor(t),n),this.syncSelectionTo3d();return}if(this.dismissUnavailable3dSeat(),!this.controller.select([e]).length){this.syncSelectionTo3d(),this.dismissConfirm();return}if(this.opts.onBuyerViewChange?.({view:"venue3d",seatId:e}),this.flashPickedSeat(e),i){this.showTableDialog(i,!1),this.syncSelectionTo3d();return}this.opts.confirmSelection!==!1?this.showConfirm(t):this.syncTray(),this.syncSelectionTo3d()}seatViewCaption(e){let t=this.allSeats().find(i=>i.id===e);return Fs(this.controller.seatDetails(e),t?.displayLabel??t?.label??e,this.tf("picker.viewFromYourSeat","view from your seat"),{narrow:this.root?.dataset.layout==="narrow",shortTail:this.tf("picker.fromYourSeat","from your seat")})}showUnavailable3dSeat(e,t,i){let s=this.view3dEl;if(!s)return;let n=this.controller.seatDetails(e.id),o=n?.displayLabel??e.displayLabel??e.label,a=te(n);Zs(s,{status:i,visualState:t,location:[n?.sectionLabel,a?(0,T.t)("picker.rowLabel",{label:a}):null,o].filter(Boolean).join(" \xB7 ")||o,tf:(l,c)=>this.tf(l,c)}),this.announceSeat(e)}dismissUnavailable3dSeat(){Zi(this.view3dEl)}saveView3dComparisonSeat(e){if(this.buyerView!=="venue3d")return;let t=this.view3dCompareSeatIds;t.includes(e.id)||(this.view3dCompareSeatIds=t.length===0?[e.id]:[t[0],e.id]),this.confirmSeat?.id===e.id&&(this.controller.deselect([e.id]),this.dismissConfirm(),this.syncSelectionTo3d(),this.syncTray()),this.view3dCompareChip.sync(),this.emit3dAnalytics("3d_comparison_saved",{seatId:e.id,count:this.view3dCompareSeatIds.length}),this.view3dCompareSeatIds.length>1?this.openView3dComparison():this.toast(this.tf("picker.chooseAnotherToCompare","Seat saved. Choose another seat to compare."),"success")}clearView3dComparison(){this.closeView3dComparison(!1),this.view3dCompareSeatIds=[],this.view3dCompareChip.remove(),this.emit3dAnalytics("3d_comparison_cleared")}view3dComparisonSnapshot(e){let t=this.allSeats().find(u=>u.id===e);if(!t)return null;let i=this.controller.seatDetails(t.id),s=this.controller.doc?.categories.find(u=>u.key===t.categoryKey),n=i?.price??(s?.tiers?.length?s.tiers[0].price:s?.price),o=n!=null?this.paidPrice(t.categoryKey,i?.tierId??s?.tiers?.[0]?.id??null,n,t.label):void 0,a=this.controller.getStatus(t.id),l=a==="held"?this.tf("picker.temporarilyHeld","Temporarily held"):a==="booked"?this.tf("picker.sold","Sold"):a==="not_for_sale"?this.tf("picker.notForSale","Not for sale"):this.tf("picker.available","Available"),c=t.viewUrl?(0,At.seatViewDisclosure)({url:t.viewUrl,...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}):this.tf("picker.chartDerivedSeatEye","Live 3D \xB7 chart-derived seat-eye \xB7 not surveyed"),h=He(t.commercial)||this.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),p=i?.wheelchairSpaceType?`${st(i.wheelchairSpaceType)} \xB7 metadata, not access certification`:this.tf("picker.noAccessibilityMetadata","No accessibility metadata supplied"),d=(0,jn.seatConfidenceDisclosure)(t.confidenceEvidence);return{seat:t,label:i?.displayLabel??t.displayLabel??t.label,section:i?.sectionLabel??t.sectionId??"\u2014",row:te(i)??i?.rowLabel??"\u2014",category:i?.categoryLabel??s?.label??t.categoryKey,price:o==null?this.tf("picker.priceNotSupplied","Not supplied"):this.money(o),availability:l,selectable:a==null||a==="free",viewSource:c,limited:h,accessibility:p,confidence:d}}openSeatConfidencePassport(e,t=null){Xi(this,e,t)}closeSeatConfidencePassport(e=!0){St(this,e)}openView3dComparison(){Xs(this)}closeView3dComparison(e=!0){Ne(this,e)}async enter3d(e){if(this.view3dEl||!this.canOffer3d()||!this.els.map)return;let t=this.controller.doc;if(!t)return;this.buyerView="venue3d",this.view3dTargetSeatId=null,this.opts.onBuyerViewChange?.({view:"venue3d",...e?{seatId:e}:{}}),this.root?.setAttribute("data-view3d","on"),this.dismissConfirm(),this.syncProjection();let i=document.createElement("div");i.className="sl-view3d sl-mo-zoom",i.setAttribute("role","group"),i.setAttribute("aria-label",this.tf("picker.interactive3dVenueView","Interactive 3D venue view"));let s=document.createElement("button");s.type="button",s.className="sl-view3d-back",s.innerHTML=`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg><span>${this.tf("picker.backToMap","Back to map")}</span>`;let n=s.querySelector("span"),o=c=>{this.view3dTargetSeatId=c;let h=!!c;i.classList.toggle("is-seat-focused",h);let p=h?this.tf("picker.backToVenue","Back to venue"):this.tf("picker.backToMap","Back to map");n&&(n.textContent=p),s.setAttribute("aria-label",p)};if(s.addEventListener("click",()=>{if(this.view3dTargetSeatId&&this.view3dHandle){this.view3dHandle.focusOverview();return}this.exit3d()}),i.appendChild(s),Ns(this.root)){let c=document.createElement("button");c.type="button",c.className="sl-view3d-fs",c.textContent="\u26F6",c.setAttribute("aria-label",this.tf("picker.fullScreen","Full screen")),c.setAttribute("aria-pressed",String(!!document.fullscreenElement||this.fsFallback||this.framedFs)),c.addEventListener("click",()=>this.toggleFullscreen()),i.appendChild(c)}let a=document.createElement("div");a.className="sl-view3d-loading",a.setAttribute("role","status"),a.setAttribute("aria-live","polite"),a.textContent=this.tf("picker.loading3d","Building the 3D venue\u2026"),i.appendChild(a),this.els.map.appendChild(i),this.view3dEl=i,this.view3dCompareChip.sync(),requestAnimationFrame(()=>{i.style.opacity="1"});let l=++this.view3dGen;try{let c=(0,T.expandChart)(t),[h,p]=await Promise.all([Kt(),this.controller.loadEventConfiguration()]),d=p?await Yt(p,S=>this.buyerAssetUrls.resolve(S)):null,u=t.theme?.venue3d?.shellAssetUrl,g=await Qt(u,S=>this.buyerAssetUrls.resolve(S));if(l!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;let b={doc:t,seats:c,...d?{eventConfigurationId:d.id,eventConfiguration:d}:{},...g?{registeredShellGlb:g}:{}},x=await h.prepareVenue3D(b);if(l!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;let k=h.mountVenue3D(i,{...b,prepared:x},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,seatViewActionLabel:S=>this.allSeats().find(C=>C.id===S)?.viewUrl?this.tf("picker.openAuthored360","Open venue 360\xB0"):this.tf("picker.lookAroundLive3d","Look around in live 3D"),seatViewCaption:S=>this.seatViewCaption(S),onSeatViewStopChange:S=>this.view3dSeatViewChrome?.onStopChange(S),onSeatPick:S=>this.onView3dSeatPick(S),onSeatInspect:S=>this.onView3dSeatPick(S),onSectionFocusChange:S=>{let C=i.querySelector('select[data-locator="section"]'),A=S??"";!C||C.value===A||(C.value=A,C.dispatchEvent(new Event("change")))},onViewTargetChange:S=>{i.querySelector(".sl-view3d-nav")?.classList.toggle("is-seat-focused",!!S),o(S),this.opts.onBuyerViewChange?.({view:"venue3d",...S?{seatId:S}:{}})},...this.seatViewEnabled()?{getSeatView:S=>new Promise((C,A)=>{let M=()=>{this.seatViewFor3d(S).then(R=>{R?C(R):A(new Error("seat_view_unavailable"))})},P=globalThis.requestIdleCallback;typeof P=="function"?P(M,{timeout:1500}):setTimeout(M,50)})}:{},onAnalytics:(S,C)=>this.emit3dAnalytics(S,C)});this.view3dHandle=k,this.view3dSeatViewChrome=Vs(i,{handle:()=>this.view3dHandle}),a.remove(),this.pushAvailabilityTo3d(),this.syncSelectionTo3d(),zs(i,k),e&&k.flyToSeat(e)}catch(c){if(l!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;this.opts.onError?.(c),this.toast(this.tf("picker.unavailable3d","3D could not start. The seat map is still available."),"warning"),this.exit3d()}}exit3d(){if(this.buyerView!=="venue3d"&&!this.view3dEl)return;this.view3dGen++,this.buyerView="map",this.view3dTargetSeatId=null,this.opts.onBuyerViewChange?.({view:"map"}),this.root?.removeAttribute("data-view3d"),this.closeSeatConfidencePassport(!1),this.closeView3dComparison(!1),this.view3dCompareChip.remove(),this.view3dSeatViewChrome?.dispose(),this.view3dSeatViewChrome=null;try{this.view3dHandle?.dispose()}catch{}this.view3dHandle=null;let e=this.view3dEl;this.view3dEl=null,e&&(e.style.opacity="0",setTimeout(()=>e.remove(),320)),this.syncProjection();let t=this.view3dReturnSeat;this.view3dReturnSeat=null,t&&this.committedSelection().some(i=>i.id===t.id)&&this.opts.confirmSelection!==!1&&this.showConfirm(t)}getCurrentHold(){return this.hold}async resumeHold(e){return this.resumeHoldFromServer(e,!1)}async removeHeldTicket(e){return this.removeHeldLabels([e])}async bestAvailable(e,t,i={}){if(this.salesClosed||this.bestAvailableBusy)return null;e=Math.max(1,Math.min(this.maxTickets,Math.floor(e))),this.confirmSeat&&this.cancelConfirm(),this.bestAvailableConfirm=!1,this.bestAvailableBusy=!0;let s=this.els.tray?.querySelector(".sl-ba-go");s&&(s.disabled=!0,s.classList.add("sl-busy"),s.innerHTML=`<span class="sl-ba-spin" aria-hidden="true"></span>${this.tf("picker.findingEllipsis","Finding\u2026")}`);try{let n=await this.controller.bestAvailable(e,t,{...i,ttlMs:this.opts.holdTtlMs});return n?(this.hold={holdId:n.holdId,expiresAt:n.expiresAt,seats:n.seats,items:n.items},this.handedOff=!1,this.bookedShown=!1,this.gaQty.clear(),this.startHoldTimer(n.expiresAt),this.flashHeldSeats(this.hold),this.syncTray(),this.emitHoldChange(),i.preferPremium&&n.seats.length&&!n.seats.every(o=>o.commercial?.premium)&&this.toast((0,T.t)("picker.premiumFallbackNote",{count:e}),"neutral"),this.hold):null}catch(n){this.opts.onError?.(n);let o=n?.reason,a=o==="not_enough_together"?(0,T.t)("picker.couldNotFindSeatsTogether",{count:e}):o==="companion_pair_required"?this.tf("picker.companionPairRequired","Select the adjacent wheelchair place with each companion ticket."):o==="ticket_option_not_applicable"?this.tf("picker.ticketOptionNotApplicable","That ticket choice is not available for the selected seat."):o==="sold_out"?this.tf("picker.ticketTypeSoldOut","That ticket type is sold out. Try another ticket type."):o==="event_closed"?this.tf("picker.seatSalesClosedForEvent","Seat sales have closed for this event."):this.tf("picker.seatsNoLongerAvailableTryAnother","Those seats are no longer available. Try another quantity or ticket type.");return this.toast(a,"error"),null}finally{this.bestAvailableBusy=!1,this.syncTray()}}async release(){let e=this.hold,t=this.controller.currentHold(),i=!0;if(t)i=await this.controller.release();else if(e){let s=[...new Set([...(e.items??[]).map(n=>n.label),...(e.seats??[]).map(n=>n.label)])];if(s.length)try{await this.api.release(this.opts.event,s,e.holdId)}catch(n){this.opts.onError?.(n),i=!1}}if(!i){this.toast(this.tf("picker.couldNotReleaseTickets","Couldn't release your tickets. Your hold is unchanged."),"error");return}this.hold=null,this.forgetHold(),this.handedOff=!1,this.bookedShown=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.gaQty.clear(),this.syncTray(),this.emitHoldChange()}startRealtime(){if(!this.access?.configured||!this.pubApi||this.realtime)return;let e=this.opts.event;this.realtime=new ue({url:this.pubApi.subscribeUrl(e),mintTicket:()=>this.pubApi.subscribeTicket(e),onAccessUnavailable:t=>{this.opts.onAccessUnavailable?.(t),this.showAccessPanel(t)},sink:Ue(this.controller,{flashOnLiveChange:!0,onStatusChange:()=>{this.syncPrices(),this.scheduleOfferRefresh(!0),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()},onSelectedObjectUnavailable:(t,i)=>{this.opts.onSelectedObjectUnavailable?.({labels:t,reason:i}),this.syncTray(),this.toast(i==="ineligible"?this.tf("picker.seatNoLongerYours","Some seats are no longer available to you. They have been removed from your order."):this.tf("picker.seatTaken","Someone else took a seat you had picked. It has been removed from your order."),"warning")}})}),this.realtime.start()}async refreshAccess(){return!this.access?.configured||!await this.access.refresh("manual")?!1:(this.dismissAccessPanel(),await this.controller.refresh(),this.realtime?this.realtime.restart():this.startRealtime(),!0)}showAccessPanel(e){if(this.destroyed||!this.root)return;this.dismissAccessPanel();let t=Os(e.reason,()=>{this.refreshAccess()});(this.regions?.["bottom-center"]??this.root).appendChild(t),this.accessEl=t}dismissAccessPanel(){this.accessEl?.remove(),this.accessEl=null}destroy(){this.destroyed=!0,this.colorSchemeStop?.(),this.colorSchemeStop=null,this.realtime?.stop(),this.realtime=null,this.dismissAccessPanel(),this.access?.clear(),this.hold&&!this.handedOff&&this.controller.release(),this.closeConfirm(),this.dismissTableDialog(!1),ve(this,!1),this.closeSeatView(),this.closeCheckoutPanel(),this.exit3d(),this.buyerAssetUrls.dispose(),this.stopHoldTimer(),this.toastTimer&&clearTimeout(this.toastTimer),this.liveTimer&&clearTimeout(this.liveTimer),this.offerRefreshTimer&&clearTimeout(this.offerRefreshTimer),this.offerBoundaryTimer&&clearTimeout(this.offerBoundaryTimer),this.offerRefreshTimer=null,this.offerBoundaryTimer=null,this.offerVisibilityHandler&&(document.removeEventListener("visibilitychange",this.offerVisibilityHandler),this.offerVisibilityHandler=null);for(let e of this.motionTimers)clearTimeout(e);this.motionTimers.clear(),this.ro?.disconnect(),this.ro=null,this.framedFs&&this.setFramedFs(!1),this.escHandler&&document.removeEventListener("keydown",this.escHandler),this.fsChangeHandler&&document.removeEventListener("fullscreenchange",this.fsChangeHandler),this.fsEscHandler&&window.removeEventListener("keydown",this.fsEscHandler),this.controller.destroy(),this.projectionEl=null,this.root?.remove(),this.root=null,this.modalScrim&&(this.modalScrim.remove(),this.modalScrim=null,this.prevFocus?.isConnected&&this.prevFocus.focus({preventScroll:!0}),this.prevFocus=null)}};var Oe=require("@seatlayer/core");var Un="seatlayer-performance-group-picker-style";function Kn(){if(document.getElementById(Un))return;let r=document.createElement("style");r.id=Un,r.textContent=`
|
|
1665
2238
|
.sl-pg-root{display:grid;gap:12px;min-width:0;color:var(--sl-text,#18202b);font-family:var(--sl-font,Inter,system-ui,sans-serif)}
|
|
1666
2239
|
.sl-pg-head{display:grid;gap:8px;padding:16px 18px;border:1px solid var(--sl-line,#dde3ea);border-radius:14px;background:var(--sl-surface,#fff)}
|
|
1667
2240
|
.sl-pg-head h2{font:700 20px/1.25 inherit;margin:0}.sl-pg-summary{margin:0;color:var(--sl-muted,#627081);font-size:14px}
|
|
@@ -1721,7 +2294,7 @@
|
|
|
1721
2294
|
@media(min-width:900px){.sl-pg-legend-list{justify-content:flex-start}}
|
|
1722
2295
|
.sl-pg-live{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
|
|
1723
2296
|
@media(max-width:640px){.sl-pg-head{padding:13px 14px}.sl-pg-head h2{font-size:18px}.sl-pg-inner{min-height:590px}}
|
|
1724
|
-
`,document.head.appendChild(r)}function Pr(r){let e=typeof r=="string"?document.querySelector(r):r;if(!e)throw new Error("seatlayer: Performance Group picker container was not found");return e}function Mi(r,e,t){try{return new Intl.DateTimeFormat(e,{...t,...r.timezone?{timeZone:r.timezone}:{}}).format(new Date(r.startsAt))}catch{return new Date(r.startsAt).toLocaleString(e)}}function Ar(r,e){return Mi(r,e,{dateStyle:"medium"})}function Mr(r,e){return Mi(r,e,{timeStyle:"short"})}function Ai(r,e){return Mi(r,e,{weekday:"short",day:"numeric",month:"short"})}var Xt=class{constructor(e){this.descriptorValue=null;this.picker=null;this.root=null;this.innerHost=null;this.tabsHost=null;this.prevButton=null;this.nextButton=null;this.heldSummary=null;this.live=null;this.statusHost=null;this.statusCopy=null;this.statusAction=null;this.rendered=!1;this.destroyed=!1;this.continued=!1;this.switchingPerformance=!1;this.operationPending=!1;this.recovery={kind:"idle"};this.availability=null;this.activePerformanceKey=null;this.selectionsByEvent=new Map;this.validByEvent=new Map;this.refreshingComposition=!1;this.activeHandoff=null;this.selectionModeValue="same_seat";this.progressHost=null;this.legendHost=null;this.paneHost=null;this.datesSummaryHost=null;this.datesCardsHost=null;this.resettingFlexibleSelection=!1;this.markedLabels=new Set;this.holdTicker=null;this.switchingMode=!1;this.booked=!1;if(!e||typeof e!="object")throw new Error("seatlayer: options object is required");if(!e.performanceGroup)throw new Error("seatlayer: `performanceGroup` key is required");if(!e.container)throw new Error("seatlayer: `container` is required");if(!e.buyerAccessToken&&!e.buyerAccessTokenProvider)throw new Error("seatlayer: Performance Group buyer access is required");if(!!e.initialHoldId!=!!e.initialOperationId)throw new Error("seatlayer: `initialHoldId` and `initialOperationId` must be supplied together");if((e.selectionMode==="per_performance"||e.allowSelectionModeSwitch)&&(!Number.isSafeInteger(e.numberOfPlacesToSelect)||(e.numberOfPlacesToSelect??0)<1))throw new Error("seatlayer: `numberOfPlacesToSelect` is required for per-performance selection");this.selectionModeValue=e.selectionMode??"same_seat",this.options=e,this.panelId=`sl-pg-panel-${e.performanceGroup}`,this.access=new se({provider:e.buyerAccessTokenProvider,token:e.buyerAccessToken,onExpired:e.onAccessExpired,onUnavailable:e.onAccessUnavailable}),this.api=new Qt(e.performanceGroup,{apiBase:e.apiBase,access:this.access,selectionMode:e.selectionMode,partySize:e.selectionMode==="per_performance"?e.numberOfPlacesToSelect:void 0,onOperationState:t=>this.operationChanged(t),onRecoveryState:t=>this.recoveryChanged(t),onAvailability:t=>this.availabilityChanged(t)}),e.initialHoldId&&e.initialOperationId&&this.api.rememberOperation(e.initialHoldId,e.initialOperationId)}get mode(){return this.selectionModeValue}get selectionMode(){return this.selectionModeValue}get descriptor(){return this.descriptorValue}get currentHold(){return this.activeHandoff}async render(){if(this.rendered)return this;if(this.rendered=!0,uo(),await(0,Ce.loadLocale)(this.options.locale),this.options.messages&&(0,Ce.setStringOverrides)(this.options.messages),this.destroyed)return this;let e=await this.api.descriptor();return this.destroyed?this:(this.descriptorValue=e,this.activePerformanceKey=e.performances[0]?.eventKey??null,this.buildChrome(Pr(this.options.container),e),this.announce(this.copy("picker.group.checkingAvailability")),await this.mountPicker(e),this.destroyed?this:(await this.restoreOperation(),this))}buildChrome(e,t){e.replaceChildren();let i=document.createElement("div");i.className="sl-pg-root",i.dataset.performanceGroup=t.key,i.dataset.selectionMode=this.mode;let s=document.createElement("div");s.className="sl-pg-progress";let n=document.createElement("section");n.className="sl-pg-head",n.setAttribute("aria-labelledby",`sl-pg-title-${t.key}`);let o=document.createElement("h2");o.id=`sl-pg-title-${t.key}`,o.textContent=t.name;let a=document.createElement("p");a.className="sl-pg-summary",a.textContent=this.copy(this.mode==="per_performance"?"picker.group.perPerformanceSummary":"picker.group.sameSeatSummary",{count:t.performanceCount});let l=document.createElement("p");l.className="sl-pg-help",l.textContent=this.copy(this.mode==="per_performance"?"picker.group.perPerformanceMapHelp":"picker.group.sameSeatMapHelp");let c=document.createElement("details");c.className="sl-pg-dates",c.open=t.performanceCount<=3;let h=document.createElement("summary");h.textContent=this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:t.performanceCount});let p=document.createElement("div");p.innerHTML=Ci(this.performanceCards(t),this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesNote":"picker.group.includedNote",{count:t.performanceCount})),c.append(h,p);let d=document.createElement("div");d.className="sl-pg-held-summary",d.hidden=!0,n.append(o,a,l,c,d);let u=document.createElement("div");u.className="sl-pg-legend";let g=document.createElement("div");g.className="sl-pg-pane",g.setAttribute("role","group"),g.setAttribute("aria-label",this.copy("picker.group.yourSelection")),g.hidden=!0;let v=this.mode==="per_performance"?this.performanceTabs(t):null,w=document.createElement("div");w.className="sl-pg-inner",w.id=this.panelId,w.setAttribute("aria-busy","false"),w.dataset.locked="false",this.mode==="per_performance"&&(w.setAttribute("role","tabpanel"),w.tabIndex=-1);let y=document.createElement("div");y.className="sl-pg-status",y.setAttribute("role","status"),y.setAttribute("aria-live","polite"),y.hidden=!0;let R=document.createElement("p"),S=document.createElement("button");S.type="button",S.hidden=!0,S.textContent=this.copy("picker.group.retry"),S.addEventListener("click",()=>{this.retryRecovery()}),y.append(R,S),w.appendChild(y);let P=document.createElement("div");P.className="sl-pg-live",P.setAttribute("role","status"),P.setAttribute("aria-live","polite"),i.append(s,n),v&&i.append(v),i.append(u,w,g,P),e.appendChild(i),this.root=i,this.progressHost=s,this.legendHost=u,this.paneHost=g,this.datesSummaryHost=h,this.datesCardsHost=p,this.innerHost=w,this.heldSummary=d,this.live=P,this.statusHost=y,this.statusCopy=R,this.statusAction=S,this.syncProgress(),this.syncLegend(),this.syncPane()}async mountPicker(e){let t=new Qe(rr({container:this.innerHost,event:e.key,apiBase:this.options.apiBase,transport:this.api,hideEventDetails:!0,maxSelection:this.options.maxSelection,selectedObjects:this.options.selectedObjects,selectableObjects:this.options.selectableObjects,numberOfPlacesToSelect:this.options.numberOfPlacesToSelect,selectionValidators:this.options.selectionValidators,locale:this.options.locale,messages:this.options.messages,languages:this.options.languages,colorblindSafe:this.options.colorblindSafe,initialView:this.options.initialView,enable3D:this.options.enable3D,max3DSeats:this.options.max3DSeats,onBuyerViewChange:this.options.onBuyerViewChange,hideBadge:this.options.hideBadge,theme:this.options.theme,holdTtlMs:this.options.holdTtlMs,initialHoldId:this.options.initialHoldId,restoreHold:this.options.restoreHold,confirmSelection:this.options.confirmSelection,seatView:this.options.seatView,onSelectionChange:i=>this.selectionChanged(i),onSelectionValidityChange:i=>this.selectionValidityChanged(i),onSelectionValid:this.options.onSelectionValid,onSelectionInvalid:this.options.onSelectionInvalid,onSelectionLimit:this.options.onSelectionLimit,onHoldChange:(i,s)=>this.holdChanged(i,s),onCheckout:(i,s)=>this.checkout(i,s),onHoldExpired:()=>{this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.options.onHoldChange?.(null),this.options.onHoldExpired?.()},onError:this.options.onError},{performanceCount:e.performanceCount,selectionMode:this.mode,submissionState:()=>this.submissionState(),suppressPricing:!0,nights:()=>this.nights(),seatMarks:()=>this.seatMarks(),nightSummary:()=>this.nightSummary(),groupSelectionSummary:()=>this.groupSelectionSummary(),activePerformanceLabel:()=>this.activePerformanceLabel(),selectNight:i=>{this.switchPerformance(i)},selectionModeSwitch:this.options.allowSelectionModeSwitch&&this.mode==="same_seat"?{label:this.copy("picker.group.chooseNightByNight"),activate:()=>{this.switchSelectionMode("per_performance")}}:null,partialSeatSelection:e.inclusionMode==="flexible_dates"&&this.mode==="same_seat"?{label:i=>this.copy("picker.group.selectAvailableDates",{count:i}),activate:(i,s)=>{this.selectPartialSeat(i,s)}}:null}));this.picker=t,await t.render(),!this.destroyed&&this.updateTabs()}performanceCards(e){return e.performances.map(t=>({eventKey:t.eventKey,name:t.name,iso:new Date(t.startsAt).toISOString(),date:Ar(t,this.options.locale),time:Mr(t,this.options.locale)}))}nights(){return(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:e.name,shortDate:Ai(e,this.options.locale)}))}seatMarks(){let e=this.descriptorValue?.performanceCount??0,t=this.availability,i=!!t?.salesClosed||!!t&&t.state!=="active",s=this.mode==="same_seat"&&!i?t?.partial??{}:{},n={};for(let o of this.markedLabels)n[o]=null;if(this.markedLabels.clear(),e>0)for(let[o,a]of Object.entries(s))!a.length||a.length>=e||(n[o]={kind:"partial",fraction:(e-a.length)/e,data:{blockedEventKeys:[...a]}},this.markedLabels.add(o));return n}activePerformanceLabel(){if(this.mode!=="per_performance")return null;let e=this.descriptorValue?.performances.find(s=>s.eventKey===this.activePerformanceKey);if(!e)return null;let t=Ai(e,this.options.locale),i=e.name?.trim();return i&&i!==t?`${i} \xB7 ${t}`:t}nightSummary(){return this.mode!=="per_performance"?[]:(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:Ai(e,this.options.locale),labels:(this.selectionsByEvent.get(e.eventKey)??[]).map(t=>t.label),active:e.eventKey===this.activePerformanceKey}))}groupSelectionSummary(){let e=this.includedPerformances();if(!e.length)return null;if(this.mode==="same_seat"){let n=this.activeHandoff?.seatLabels.length??this.picker?.getSelection().length??0;return{seats:n*e.length,performances:e.length,performancesChosen:n?e.length:0,perPerformance:n}}let t=e.map(n=>this.selectionsByEvent.get(n.eventKey)?.length??0),i=t.filter(n=>n>0),s=i.length===t.length&&i.every(n=>n===i[0]);return{seats:t.reduce((n,o)=>n+o,0),performances:e.length,performancesChosen:i.length,perPerformance:s&&i.length?i[0]:null}}syncProgress(){if(!this.progressHost)return;let e=!!this.activeHandoff,t=[{id:"performances",label:this.copy("picker.group.stepPerformances"),state:"done"},{id:"seats",label:this.copy("picker.group.stepSeats"),state:e?"done":"current"},{id:"review",label:this.copy("picker.group.stepReview"),state:this.booked?"done":e?"current":"upcoming"}];this.progressHost.innerHTML=pr(t,{label:this.copy("picker.group.progressLabel"),done:this.copy("picker.group.stepDone"),current:this.copy("picker.group.stepCurrent"),upcoming:this.copy("picker.group.notStarted")})}syncLegend(){if(!this.legendHost)return;let e=this.availability,t=!!e?.salesClosed||e&&e.state!=="active";if(!e||t){this.legendHost.replaceChildren();return}this.legendHost.innerHTML=ar({available:e.freeCount>0,selected:(this.picker?.getSelection().length??0)>0,partial:Object.keys(e.partial).length>0,unavailable:e.blockedCount>0},{title:this.copy("picker.group.legendTitle"),available:this.copy("picker.group.legendAvailable"),selected:this.copy("picker.group.legendSelected"),partial:this.copy("picker.group.legendNotEveryDate"),unavailable:this.copy("picker.group.legendUnavailable")},this.categoryColor())}categoryColor(){return this.picker?.categoryLegendColor()??"#2563eb"}syncPane(){let e=this.paneHost;if(!e)return;let t=this.includedPerformances();if(this.mode!=="same_seat"||!t.length){e.hidden=!0,e.replaceChildren();return}let i=this.activeHandoff?.seatLabels??this.picker?.getSelection().map(n=>n.label)??[],s=this.heldTotal();e.hidden=!1,e.innerHTML=hr({title:this.copy("picker.group.yourSelection"),rows:t.map(n=>({eventKey:n.eventKey,name:`${Ar(n,this.options.locale)} ${Mr(n,this.options.locale)}`,labels:i})),empty:this.copy("picker.group.noSeatsChosenYet"),note:s?null:this.copy("picker.group.pricesPerPerformance"),total:s?{label:this.copy("picker.group.total"),amount:s}:null,holdStatus:this.booked?this.copy("picker.group.bookedAll",{count:t.length}):this.activeHandoff?this.copy("picker.group.heldTogether",{count:t.length,time:ur(this.activeHandoff.expiresAt-Date.now())}):null})}heldTotal(){let e=this.activeHandoff,t=this.descriptorValue;if(!e||!t)return null;let s=this.api.allocationsForHold(e.holdId).flatMap(a=>a.items);if(!s.length)return null;let n=s.reduce((a,l)=>a+l.unitPrice*(l.quantity??1),0),o=s[0]?.currency??t.currency;try{return(0,Ce.formatMoney)(n,o,void 0,this.options.locale)}catch{return`${o} ${n.toFixed(2)}`}}includedPerformances(){let e=this.descriptorValue?.performances??[];if(this.descriptorValue?.inclusionMode!=="flexible_dates")return e;let t=new Set(this.api.includedPerformanceKeys());return e.filter(i=>t.has(i.eventKey))}syncIncludedDates(){let e=this.descriptorValue;if(!e||!this.datesSummaryHost||!this.datesCardsHost)return;let t=this.includedPerformances(),i=e.inclusionMode==="flexible_dates";this.datesSummaryHost.textContent=i&&t.length<e.performanceCount?this.copy("picker.group.flexibleDatesSelected",{selected:t.length,total:e.performanceCount}):this.copy(i?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:e.performanceCount}),this.datesCardsHost.innerHTML=Ci(this.performanceCards({...e,performances:t}),this.copy(i&&t.length<e.performanceCount?"picker.group.flexibleSelectedNote":i?"picker.group.flexibleDatesNote":"picker.group.includedNote",{count:t.length}))}async selectPartialSeat(e,t){if(!(this.destroyed||this.holdBlocked()||this.activeHandoff||!t.length)){if((this.picker?.getSelection().length??0)>0){this.announce(this.copy("picker.group.clearBeforePartial"));return}try{if(this.api.setIncludedEventKeys(t),this.syncIncludedDates(),await this.picker?.refreshAvailability(),!(this.picker?.selectObjects([e])??[]).length)throw new Error("performance_group_partial_seat_unavailable");this.announce(this.copy("picker.group.selectedAvailableDates",{count:t.length})),this.syncPane(),this.syncLegend()}catch(i){let s=this.descriptorValue?.performances.map(n=>n.eventKey)??[];s.length&&(this.api.setIncludedEventKeys(s),this.syncIncludedDates(),await this.picker?.refreshAvailability().catch(()=>{})),this.options.onError?.(i)}}}syncHoldTicker(){this.booked||(this.activeHandoff&&!this.holdTicker?this.holdTicker=setInterval(()=>this.syncPane(),1e3):!this.activeHandoff&&this.holdTicker&&(clearInterval(this.holdTicker),this.holdTicker=null))}async switchSelectionMode(e){if(!(this.destroyed||this.switchingMode||e===this.mode)&&!(this.activeHandoff||this.holdBlocked())){this.switchingMode=!0;try{this.api.setSelectionMode(e,this.options.numberOfPlacesToSelect),this.selectionModeValue=e,this.picker?.destroy(),this.picker=null,this.selectionsByEvent.clear(),this.validByEvent.clear(),this.markedLabels.clear(),this.availability=null;let t=this.descriptorValue;if(this.activePerformanceKey=t.performances[0]?.eventKey??null,this.buildChrome(Pr(this.options.container),t),await this.mountPicker(t),this.destroyed)return;this.announce(this.copy("picker.group.nightByNightStarted")),this.options.onSelectionModeChange?.(e)}catch(t){if(t instanceof K)return;this.options.onError?.(t)}finally{this.switchingMode=!1}}}async release(){await this.picker?.release()}close(){this.destroy()}destroy(){if(this.destroyed)return;this.destroyed=!0,this.api.destroy(),this.holdTicker&&clearInterval(this.holdTicker),this.holdTicker=null;let e=this.picker;this.root?.setAttribute("hidden","");let t=()=>{e?.destroy(),this.access.clear(),this.root?.remove(),this.root=null,this.picker=null,this.innerHost=null,this.tabsHost=null,this.statusHost=null,this.statusCopy=null,this.statusAction=null,this.live=null};e?.getCurrentHold()&&!this.continued?e.release().catch(()=>{}).finally(t):t()}copy(e,t){let i=this.options.messages?.[e];return i!==void 0?t?i.replace(/\{(\w+)\}/g,(s,n)=>String(t[n]??`{${n}}`)):i:(0,Ce.t)(e,t)}performanceTabs(e){let t=document.createElement("div");t.className="sl-pg-tabsbar";let i=document.createElement("button");i.type="button",i.className="sl-pg-step",i.dataset.step="previous",i.setAttribute("aria-label",this.copy("picker.group.previousPerformance")),i.textContent="\u2039",i.addEventListener("click",()=>{this.stepPerformance(-1)});let s=document.createElement("button");s.type="button",s.className="sl-pg-step",s.dataset.step="next",s.setAttribute("aria-label",this.copy("picker.group.nextPerformance")),s.textContent="\u203A",s.addEventListener("click",()=>{this.stepPerformance(1)});let n=document.createElement("div");return n.className="sl-pg-tabs",n.setAttribute("role","tablist"),n.setAttribute("aria-label",this.copy("picker.group.performances")),e.performances.forEach((o,a)=>{let l=document.createElement("button");l.type="button",l.className="sl-pg-tab",l.id=`sl-pg-tab-${e.key}-${o.eventKey}`,l.dataset.eventKey=o.eventKey,l.dataset.state="not-started",l.setAttribute("role","tab"),l.setAttribute("aria-selected",String(a===0)),l.setAttribute("aria-controls",this.panelId),l.tabIndex=a===0?0:-1;let c=document.createElement("span");c.className="sl-pg-tab-name",c.textContent=o.name;let h=document.createElement("span");h.className="sl-pg-tab-state",h.textContent=this.copy("picker.group.stillNeedsSeat");let p=document.createElement("span");p.className="sl-pg-tab-badge",p.textContent=this.copy("picker.group.chosenOfTotal",{chosen:0,total:this.options.numberOfPlacesToSelect??1}),l.append(c,p,h),l.addEventListener("click",()=>{this.switchPerformance(o.eventKey)}),l.addEventListener("keydown",d=>this.tabKeydown(d)),n.appendChild(l)}),t.append(i,n,s),this.tabsHost=n,this.prevButton=i,this.nextButton=s,t}tabButtons(){return[...this.tabsHost?.querySelectorAll(".sl-pg-tab")??[]]}tabKeydown(e){let t=this.tabButtons(),i=t.findIndex(a=>a===e.target);if(i<0)return;let s=getComputedStyle(this.tabsHost??document.body).direction==="rtl",n=-1;switch(e.key){case"ArrowRight":n=i+(s?-1:1);break;case"ArrowLeft":n=i+(s?1:-1);break;case"ArrowDown":n=i+1;break;case"ArrowUp":n=i-1;break;case"Home":n=0;break;case"End":n=t.length-1;break;default:return}if(n<0||n>=t.length)return;e.preventDefault();let o=t[n];o.focus({preventScroll:!0}),o.disabled||this.switchPerformance(o.dataset.eventKey)}stepPerformance(e){let t=this.tabButtons(),i=t.findIndex(n=>n.dataset.eventKey===this.activePerformanceKey),s=t[i+e];!s||s.disabled||(s.focus({preventScroll:!0}),this.switchPerformance(s.dataset.eventKey))}submissionState(){let e=this.descriptorValue?.performances??[];if(this.mode!=="per_performance"){let s=!this.holdBlocked();return{complete:e.length,total:e.length,ready:s}}let t=this.options.numberOfPlacesToSelect,i=e.filter(s=>this.selectionsByEvent.get(s.eventKey)?.length===t&&this.validByEvent.get(s.eventKey)!==!1).length;return{complete:i,total:e.length,ready:i===e.length&&!this.holdBlocked()}}holdBlocked(){return this.operationPending||this.recovery.kind!=="idle"||!!this.availability?.salesClosed}selectionChanged(e){if(this.mode!=="per_performance"){this.options.onSelectionChange?.(e),this.syncPane(),this.syncLegend(),!e.length&&!this.activeHandoff&&!this.resettingFlexibleSelection&&this.descriptorValue?.inclusionMode==="flexible_dates"&&this.api.includedPerformanceKeys().length<this.descriptorValue.performanceCount&&(this.resettingFlexibleSelection=!0,this.api.setIncludedEventKeys(this.descriptorValue.performances.map(i=>i.eventKey)),this.syncIncludedDates(),this.picker?.refreshAvailability().catch(i=>this.options.onError?.(i)).finally(()=>{this.resettingFlexibleSelection=!1}));return}if(this.refreshingComposition||this.switchingPerformance||!this.activePerformanceKey)return;let t=e.map(i=>({...i}));this.selectionsByEvent.set(this.activePerformanceKey,t),this.api.setPerformanceSelections(this.activePerformanceKey,t.map(i=>({label:i.label}))),t.length!==this.options.numberOfPlacesToSelect?this.validByEvent.set(this.activePerformanceKey,!1):this.validByEvent.has(this.activePerformanceKey)||this.validByEvent.set(this.activePerformanceKey,!0),this.updateTabs(),this.options.onSelectionChange?.(e),this.refreshComposition(),this.syncLegend()}selectionValidityChanged(e){if(this.mode==="per_performance"&&!this.switchingPerformance&&this.activePerformanceKey){let t=this.validByEvent.get(this.activePerformanceKey);this.validByEvent.set(this.activePerformanceKey,e.isValid),this.updateTabs(),!this.refreshingComposition&&t!==e.isValid&&this.refreshComposition()}this.options.onSelectionValidityChange?.(e)}refreshComposition(){if(this.refreshingComposition||!this.picker)return;let e=this.submissionState();this.refreshingComposition=!0;try{this.picker.refreshPerformanceGroupComposition();let t=this.submissionState();(e.complete!==t.complete||e.ready!==t.ready)&&this.picker.refreshPerformanceGroupComposition()}finally{this.refreshingComposition=!1}}tabState(e){let t=this.options.numberOfPlacesToSelect??1,i=(this.selectionsByEvent.get(e)??[]).map(n=>n.label),s=this.copy("picker.group.chosenOfTotal",{chosen:i.length,total:t});return i.length===0?{key:"not-started",label:this.copy("picker.group.stillNeedsSeat"),badge:s}:i.length===t&&this.validByEvent.get(e)!==!1?{key:"complete",label:this.copy("picker.group.completeWithSeats",{seats:i.join(", ")}),badge:s}:i.length===t?{key:"needs-attention",label:this.copy("picker.group.needsAttention"),badge:s}:{key:"in-progress",label:this.copy("picker.group.needsMoreSeats",{count:t-i.length}),badge:s}}updateTabs(){let e=this.tabButtons(),t=this.switchingPerformance||this.operationPending||this.recovery.kind!=="idle"||!!this.activeHandoff;e.forEach(s=>{let n=s.dataset.eventKey,o=this.tabState(n),a=n===this.activePerformanceKey;s.dataset.state=o.key,s.disabled=t,s.setAttribute("aria-selected",String(a)),s.tabIndex=a?0:-1;let l=s.querySelector(".sl-pg-tab-state");l&&(l.textContent=o.label);let c=s.querySelector(".sl-pg-tab-badge");c&&(c.textContent=o.badge);let h=s.querySelector(".sl-pg-tab-name")?.textContent??n;s.setAttribute("aria-label",`${h}: ${o.badge} \xB7 ${o.label}`),a&&this.innerHost?.setAttribute("aria-labelledby",s.id)});let i=e.findIndex(s=>s.dataset.eventKey===this.activePerformanceKey);this.prevButton&&(this.prevButton.disabled=t||i<=0),this.nextButton&&(this.nextButton.disabled=t||i<0||i>=e.length-1)}async switchPerformance(e){if(this.mode!=="per_performance"||this.switchingPerformance||this.holdBlocked()||this.activeHandoff||e===this.activePerformanceKey||!this.picker)return;this.activePerformanceKey&&this.selectionChanged(this.picker.getSelection());let t=this.selectionsByEvent.get(e)?.map(i=>i.label)??[];this.switchingPerformance=!0,this.activePerformanceKey=e,this.updateTabs(),this.setInteractionLocked(!0);try{this.picker.clearSelection(),this.api.setActivePerformance(e),await this.picker.refreshAvailability();let i=this.picker.selectObjects(t);this.switchingPerformance=!1,this.selectionChanged(i),i.length!==t.length&&this.validByEvent.set(e,!1),this.options.onSelectionChange?.(i);let s=this.descriptorValue?.performances.find(n=>n.eventKey===e);s&&this.announce(this.copy("picker.group.performanceOpened",{performance:s.name}))}catch(i){this.options.onError?.(i)}finally{this.switchingPerformance=!1,!this.operationPending&&this.recovery.kind==="idle"&&this.setInteractionLocked(!1),this.updateTabs(),this.picker.refreshPerformanceGroupComposition()}}setInteractionLocked(e){let t=this.innerHost;t&&(t.dataset.locked=String(e),t.setAttribute("aria-busy",String(e)),t.setAttribute("aria-disabled",String(e)))}announce(e){this.live&&(this.live.textContent=e)}showStatus(e,t,i={}){this.statusHost&&this.statusCopy&&this.statusAction&&(this.statusCopy.textContent=t,this.statusHost.hidden=!t,this.statusAction.hidden=!i.retry),this.announce(t),this.options.onStatusChange?.({kind:e,message:t,...i.reference?{reference:i.reference}:{}})}clearStatus(){this.statusHost&&(this.statusHost.hidden=!0),this.statusAction&&(this.statusAction.hidden=!0),this.options.onStatusChange?.({kind:"idle",message:""})}operationChanged(e){if(this.destroyed)return;let t=e.state==="preparing"||e.state==="commit_pending"||e.state==="abort_pending"||e.state==="expire_pending";if(this.operationPending=t,this.setInteractionLocked(t||this.recovery.kind!=="idle"),this.updateTabs(),t){this.showStatus("pending",this.copy(e.state==="commit_pending"?"picker.group.commitPending":e.state==="abort_pending"||e.state==="expire_pending"?"picker.group.abortPending":"picker.group.securing"));return}if(e.state==="booked"){this.bookingSettled();return}if(e.state==="expired"||e.state==="aborted"){this.activeHandoff&&this.holdLost();return}if(e.state==="committed"){this.clearStatus(),this.announce(this.copy("picker.group.secured")),queueMicrotask(()=>this.innerHost?.querySelector('[data-ref="cta"]')?.focus({preventScroll:!0}));return}e.decision==="abort"&&this.recovery.kind==="idle"&&(this.clearStatus(),this.announce(this.copy("picker.group.notSecured")))}bookingSettled(){if(this.booked)return;this.booked=!0,this.root&&(this.root.dataset.booking="booked"),this.clearStatus(),this.holdTicker&&clearInterval(this.holdTicker),this.holdTicker=null;let e=this.activeHandoff?{...this.activeHandoff,bookingState:"booked"}:null;e&&(this.activeHandoff=e),this.syncProgress(),this.syncPane(),this.updateTabs(),this.picker?.notifyGroupSettled("booked"),this.announce(this.copy("picker.group.bookedAll",{count:this.descriptorValue?.performanceCount??0})),e&&this.options.onBooked?.(e)}holdLost(){this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.picker?.notifyGroupSettled("lost"),this.announce(this.copy("picker.group.notSecured")),this.options.onHoldChange?.(null),this.options.onHoldExpired?.()}recoveryChanged(e){if(!this.destroyed){if(this.recovery=e,this.setInteractionLocked(this.operationPending||e.kind!=="idle"),this.updateTabs(),this.refreshComposition(),e.kind==="idle"){this.operationPending||this.clearStatus();return}if(e.kind==="pending"){this.showStatus("pending",e.longRunning?this.copy("picker.group.longRunning",{reference:e.reference}):this.copy("picker.group.outcomeUnknown"),{reference:e.reference});return}this.showStatus("recovery_failed",this.copy("picker.group.longRunning",{reference:e.reference}),{retry:e.retryable,reference:e.reference}),this.setInteractionLocked(!1)}}async retryRecovery(){if(!(this.destroyed||this.recovery.kind!=="failed"||!this.recovery.retryable))try{await this.api.retryRecovery()}catch(e){if(e instanceof K)return;this.options.onError?.(e)}}async restoreOperation(){try{let e=await this.api.restoreOperation();e&&!this.destroyed&&await this.picker?.adoptRestoredHold(e.holdId)}catch(e){if(e instanceof K)return;this.options.onError?.(e)}}availabilityChanged(e){if(this.destroyed)return;let t=this.availability;if(this.availability=e,e.revisionChanged){this.showStatus("revision_changed",this.copy("picker.group.revisionChanged")),this.reloadDescriptor(e.revision);return}e.salesClosed?this.showStatus("sales_closed",this.copy("picker.group.salesClosed")):t?.salesClosed&&this.clearStatus(),this.updateTabs(),this.refreshComposition(),this.syncLegend()}async reloadDescriptor(e){this.api.acceptRevision(e);try{let t=await this.api.descriptor();if(this.destroyed)return;this.descriptorValue=t,await this.picker?.refreshAvailability()}catch(t){if(t instanceof K)return;this.options.onError?.(t)}}handoff(e,t){let i=this.descriptorValue,s=this.api.operationIdForHold(e.holdId);if(!i||!s)throw new Error("seatlayer: Performance Group hold identity is unavailable");let n=this.api.allocationsForHold(e.holdId);return{operationId:s,holdId:e.holdId,expiresAt:e.expiresAt,performanceGroup:i,selectionMode:this.mode,performanceKeys:n.map(o=>o.eventKey),bookingState:this.booked?"booked":"held",seatLabels:t.map(o=>o.label),...this.mode==="per_performance"?{allocations:n.map(o=>({eventKey:o.eventKey,seatLabels:o.items.map(a=>a.label)}))}:{}}}renderHeldAllocations(e){if(!(!this.heldSummary||this.mode!=="per_performance")){this.heldSummary.replaceChildren();for(let t of e){let i=this.descriptorValue?.performances.find(o=>o.eventKey===t.eventKey),s=document.createElement("p"),n=document.createElement("strong");n.textContent=i?.name??t.eventKey,s.append(n,document.createTextNode(t.items.map(o=>o.label).join(", "))),this.heldSummary.appendChild(s)}this.heldSummary.hidden=e.length===0}}resetPerPerformanceSelection(){this.mode==="per_performance"&&(this.selectionsByEvent.clear(),this.validByEvent.clear(),this.heldSummary?.replaceChildren(),this.heldSummary&&(this.heldSummary.hidden=!0),this.updateTabs(),this.picker?.refreshPerformanceGroupComposition())}holdChanged(e,t){if(!e){this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.options.onHoldChange?.(null);return}let i=this.handoff(e,t),s=this.activeHandoff?.holdId!==i.holdId;this.activeHandoff=i,this.renderHeldAllocations(this.api.allocationsForHold(e.holdId)),this.updateTabs(),this.api.watchSettlement(e.holdId),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),s&&this.options.onHold?.(i),this.options.onHoldChange?.(i)}checkout(e,t){let i=this.handoff(e,t);this.continued=!0,this.activeHandoff=i,this.options.onCheckout?.(i)}};var mo="https://api.seatlayer.io",fo=6e4,go=5e3,ne=class extends Error{constructor(t,i){super(`season_request_failed:${t}`);this.code=t;this.status=i;this.name="SeasonApiError"}},ft=class extends Error{constructor(t){super(`season_operation_timeout:${t}`);this.operationId=t;this.name="SeasonRecoveryTimeoutError"}};function bo(r,e){let t=Number(r.headers.get("Retry-After")),i=Number.isFinite(t)&&t>=0?t:e.retryAfterSeconds;return Math.max(0,Math.min(go,i*1e3))}function vo(r,e){return e?.aborted?Promise.reject(e.reason??new DOMException("Aborted","AbortError")):new Promise((t,i)=>{let s=setTimeout(t,r);e?.addEventListener("abort",()=>{clearTimeout(s),i(e.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function yo(r){if(!r||typeof r!="object")return"unknown";let e=r;return typeof e.code=="string"?e.code:typeof e.error=="string"?e.error:"unknown"}function Li(r){if(!r||typeof r!="object")throw new ne("invalid_operation_response",502);let e=r,t=JSON.stringify(e);if(!e.operationId||!e.holdId||!Array.isArray(e.allocations)||t.includes("shc_")||t.includes("childHoldId")||t.includes("child_hold_id"))throw new ne("unsafe_operation_response",502);return e}function Lr(r,e){return{seasonKey:r.key,planActivationId:r.planActivationId,operationId:e.operationId,holdId:e.holdId,expiresAt:e.expiresAt,policy:e.policy,state:e.state,allocations:e.allocations.map(({eventId:t,state:i})=>({eventKey:t,state:i}))}}var gt,bt,Te,vt,yt,ae,Ee,Zt=class{constructor(e,t){B(this,ae);B(this,gt);B(this,bt);B(this,Te);B(this,vt);B(this,yt);A(this,gt,e),A(this,bt,(t.apiBase??mo).replace(/\/$/,"")),A(this,Te,t.access),A(this,vt,t.fetch??globalThis.fetch.bind(globalThis)),A(this,yt,t.recoveryTimeoutMs??fo)}async descriptor(){let{body:e}=await M(this,ae,Ee).call(this,"GET","");return e.season}async availability(){let{body:e}=await M(this,ae,Ee).call(this,"GET","/availability"),t=Object.values(e.seats??{});return{...e,freeCount:t.filter(i=>i==="free").length,blockedCount:t.filter(i=>i!=="free").length}}async hold(e,t){let{body:i,response:s}=await M(this,ae,Ee).call(this,"POST","/holds",{operationId:t,labels:[...e]});return{operation:Li(i.operation),response:s}}async operation(e){let{body:t,response:i}=await M(this,ae,Ee).call(this,"GET",`/operations/${encodeURIComponent(e)}`);return{operation:Li(t.operation),response:i}}async release(e,t){let{body:i,response:s}=await M(this,ae,Ee).call(this,"POST",`/holds/${encodeURIComponent(e)}/release`,{releaseActionId:t});return{operation:Li(i.operation),response:s}}async renewalIntent(e){let{body:t}=await M(this,ae,Ee).call(this,"POST","/renewal-intents",{offerId:e}),i=t.intent;if(!i||i.offerId!==e||i.state!=="intent_received"||!i.intentId||!Number.isFinite(i.receivedAt))throw new ne("invalid_renewal_intent_response",502);return i}async waitForTerminal(e,t,i){let s=Date.now(),n=t??await this.operation(e);for(;n.operation.state==="preparing"||n.operation.state==="commit_pending"||n.operation.state==="abort_pending";){if(Date.now()-s>=x(this,yt))throw new ft(e);await vo(bo(n.response,n.operation),i),n=await this.operation(e)}return n.operation}destroy(){x(this,Te).clear()}};gt=new WeakMap,bt=new WeakMap,Te=new WeakMap,vt=new WeakMap,yt=new WeakMap,ae=new WeakSet,Ee=async function(e,t,i,s=!0){let n=await x(this,Te).authorization();if(!n)throw new ie({reason:"no_token",retryable:!1});let o=await x(this,vt).call(this,`${x(this,bt)}/pub/seasons/${encodeURIComponent(x(this,gt))}${t}`,{method:e,headers:{Authorization:n,...i===void 0?{}:{"Content-Type":"application/json"}},body:i===void 0?void 0:JSON.stringify(i)}),a=await o.json().catch(()=>null);if(!o.ok){let l=yo(a);if(s&&await x(this,Te).handleFailure(o.status,l))return M(this,ae,Ee).call(this,e,t,i,!1);let c=x(this,Te).unavailable;throw c?new ie(c):new ne(l,o.status)}if(a===null)throw new ne("invalid_json_response",502);return{body:a,response:o}};var Hr="seatlayer-season-picker-style";function xo(){if(document.getElementById(Hr))return;let r=document.createElement("style");r.id=Hr,r.textContent=`
|
|
2297
|
+
`,document.head.appendChild(r)}var Fa="https://api.seatlayer.io",ja=6e4,Ga=2e3,Ua=1e3,Ka=36e5,qa=5e3,Wa=5e3,Ya=15e3,Qa=12e4,Xa=new Set(["preparing","commit_pending","abort_pending","expire_pending"]),q=class extends Error{constructor(){super("performance_group_destroyed"),this.name="PerformanceGroupDestroyedError"}};function Za(r){return new Promise(e=>setTimeout(e,r))}function or(r){let e=Number(r.headers.get("Retry-After")??"1");return Number.isFinite(e)?Math.max(50,Math.min(qa,e*1e3)):1e3}function lt(r,e){return`/pub/performance-groups/${encodeURIComponent(r)}/operations/${encodeURIComponent(e)}`}function ct(r){return r.replace(/^pghop_/,"").replace(/-/g,"").slice(-8).toUpperCase()}var ar=class{constructor(e,t,i){this.api=e;this.sink=t;this.intervalMs=i;this.stopped=!0;this.timer=null;this.prior=new Map}start(){this.stopped&&(this.stopped=!1,this.tick())}stop(){this.stopped=!0,this.timer&&clearTimeout(this.timer),this.timer=null}async tick(){try{let e=await this.api.objects(this.api.groupKey);if(this.stopped)return;let t=new Map(Object.entries(e.seats)),s=[...new Set([...this.prior.keys(),...t.keys()])].filter(n=>this.prior.get(n)!==t.get(n)).map(n=>({label:n,status:t.get(n)??"blocked"}));this.prior=t,s.length&&this.sink.applyStatuses(s),this.sink.onSections?.(e.hidden??[],e.closed??[])}catch(e){if(e instanceof q){this.stop();return}this.stopped||await this.sink.resync()}finally{this.stopped||(this.timer=setTimeout(()=>{this.tick()},this.intervalMs))}}},bi=class{constructor(e,t){this.descriptorCache=null;this.chartRequest=null;this.objectsCache=null;this.activePerformanceKey=null;this.includedEventKeys=new Set;this.reuseObjectsCacheOnce=!1;this.selectionsByEvent=new Map;this.allocationsByHold=new Map;this.pendingOperationId=null;this.operationByHold=new Map;this.knownRevision=null;this.destroyed=!1;this.aborter=new AbortController;this.adoptFailure=null;this.settleTimer=null;this.settleOperationId=null;this.settleStartedAt=0;this.settleState=null;this.settleVisibility=null;this.lastRecovery={kind:"idle"};if(!e)throw new Error("seatlayer: `performanceGroup` key is required");this.groupKey=e,this.base=(t.apiBase??Fa).replace(/\/+$/,""),this.access=t.access,this.fetcher=t.fetch??globalThis.fetch.bind(globalThis),this.recoveryTimeoutMs=t.recoveryTimeoutMs??ja,this.realtimePollMs=Math.max(500,t.realtimePollMs??Ga),this.selectionMode=t.selectionMode??"same_seat",this.partySize=t.partySize??null,this.onOperationState=t.onOperationState,this.onRecoveryState=t.onRecoveryState,this.onAvailability=t.onAvailability,this.access.onRenewed(s=>this.adoptSession(s));let i=this.readOperationRecord();i&&this.storedIsUndecided(i)&&(this.pendingOperationId=i.operationId)}get pendingOperation(){return this.pendingOperationId}get holdBlocked(){return!!this.adoptFailure||!!this.pendingOperationId&&this.lastRecovery.kind!=="idle"}async descriptor(){let e=await this.json(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/descriptor`);return this.descriptorCache=e.performanceGroup,this.includedEventKeys.size||(this.includedEventKeys=new Set(e.performanceGroup.performances.map(t=>t.eventKey))),e.performanceGroup.revision&&(this.knownRevision=e.performanceGroup.revision),this.activePerformanceKey??=e.performanceGroup.performances[0]?.eventKey??null,e.performanceGroup}async chart(e){this.chartRequest??=this.json(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/chart`).catch(s=>{throw this.chartRequest=null,s});let[t,i]=await Promise.all([this.descriptorCache?Promise.resolve(this.descriptorCache):this.descriptor(),this.chartRequest]);return{doc:i,event:{key:t.key,name:t.name,salesClosed:t.state!=="active",venue:t.venue,startsAt:t.performances[0]?.startsAt??null,timezone:t.timezone,currency:t.currency,mode:t.mode,inventoryModelVersion:2}}}asset(e,t){return/^[a-zA-Z0-9._-]+$/.test(t)?this.blob(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/assets/${encodeURIComponent(t)}`):Promise.reject(new V(404,"not_found","not_found"))}async objects(e){let t=this.descriptorCache?.inclusionMode==="flexible_dates",i=`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/objects`+(this.selectionMode==="per_performance"||t?"?view=per-performance":"");if(this.reuseObjectsCacheOnce&&this.objectsCache)this.reuseObjectsCacheOnce=!1;else{let o=await this.authorized(i,this.objectsCache?.revision?{headers:{"If-None-Match":`"${this.objectsCache.revision}"`}}:{});if(o.status!==304){if(!o.ok)return this.throwResponse(o);this.objectsCache=await this.responseJson(o)}}if(!this.objectsCache)throw new V(502,"group_projection_unavailable","group_projection_unavailable");if(this.selectionMode==="same_seat"&&!t){let o=this.objectsCache;return this.noteAvailability(o,o.salesClosed,o),o}let s=this.objectsCache;if(this.selectionMode==="same_seat"){let o=s.performances.filter(p=>this.includedEventKeys.has(p.eventKey));if(!o.length)throw new V(409,"group_selection_incomplete","group_selection_incomplete");let a=Object.keys(o[0]?.seats??{}),l=Object.fromEntries(a.map(p=>[p,o.every(d=>d.seats[p]==="free")?"free":"blocked"])),c=Object.fromEntries(a.flatMap(p=>{let d=o.filter(u=>u.seats[p]!=="free").map(u=>u.eventKey);return d.length>0&&d.length<o.length?[[p,d]]:[]})),h={seats:l,partial:c,hidden:[...new Set(o.flatMap(p=>p.hidden??[]))],closed:[...new Set(o.flatMap(p=>p.closed??[]))],revision:s.revision,state:s.state,salesClosed:o.some(p=>p.salesClosed)};return this.noteAvailability(s,h.salesClosed,h),h}let n=s.performances.find(o=>o.eventKey===this.activePerformanceKey);if(!n)throw new V(409,"group_performance_unavailable","group_performance_unavailable");return this.noteAvailability(s,s.salesClosed||s.performances.some(o=>o.salesClosed),n),n}setSelectionMode(e,t){if(this.pendingOperationId||this.holdBlocked)throw new V(409,"group_operation_pending","group_operation_pending");e!==this.selectionMode&&(this.selectionMode=e,t!=null&&(this.partySize=t),this.objectsCache=null,this.selectionsByEvent.clear(),this.activePerformanceKey=this.descriptorCache?.performances[0]?.eventKey??this.activePerformanceKey)}setActivePerformance(e){if(this.descriptorCache&&!this.descriptorCache.performances.some(t=>t.eventKey===e))throw new V(404,"group_performance_not_found","group_performance_not_found");this.activePerformanceKey=e}setIncludedEventKeys(e){let t=new Set(this.descriptorCache?.performances.map(i=>i.eventKey)??[]);if(!e.length||new Set(e).size!==e.length||e.some(i=>!t.has(i)))throw new V(422,"invalid_event_keys","invalid_event_keys");this.includedEventKeys=new Set(e),this.reuseObjectsCacheOnce=!!this.objectsCache}includedPerformanceKeys(){return(this.descriptorCache?.performances??[]).map(e=>e.eventKey).filter(e=>this.includedEventKeys.has(e))}setPerformanceSelections(e,t){this.selectionsByEvent.set(e,t.map(i=>({...i})))}allocationsForHold(e){return(this.allocationsByHold.get(e)??[]).map(t=>({eventKey:t.eventKey,items:t.items.map(i=>({...i}))}))}async hold(e,t,i,s){if(this.assertUsable(),s)throw new V(409,"group_hold_replace_unsupported","group_hold_replace_unsupported");let n=t.map(c=>c.label),o={labels:n};if(this.descriptorCache?.inclusionMode==="flexible_dates"&&(o.eventKeys=this.includedPerformanceKeys()),this.selectionMode==="per_performance"){if(!this.activePerformanceKey||!this.descriptorCache||!this.partySize)throw new V(409,"group_selection_incomplete","group_selection_incomplete");this.setPerformanceSelections(this.activePerformanceKey,t);let c=this.descriptorCache.performances.filter(h=>this.includedEventKeys.has(h.eventKey)).map(h=>({eventKey:h.eventKey,selections:this.selectionsByEvent.get(h.eventKey)??[]}));if(c.some(h=>h.selections.length!==this.partySize))throw new V(409,"group_selection_incomplete","group_selection_incomplete");o={selectionMode:"per_performance",allocations:c,...this.descriptorCache.inclusionMode==="flexible_dates"?{eventKeys:this.includedPerformanceKeys()}:{}}}let a=this.pendingOperationId??`pghop_${crypto.randomUUID()}`;this.beginOperation(a),this.onOperationState?.({operationId:a,state:"preparing",decision:null});let l;try{l=await this.authorized(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/hold`,{method:"POST",body:JSON.stringify({operationId:a,...o,...i?{ttlMs:i}:{}})})}catch(c){if(c instanceof q)throw c;if(c instanceof oe)throw this.failOperation(a),c;return this.recover(a,n,Date.now()+this.recoveryTimeoutMs)}if(l.status===201||l.status===202||l.status===504){let c=await this.responseJson(l);return this.emit(c.operation),l.status===201?this.complete(c.operation):this.recover(a,n,Date.now()+this.recoveryTimeoutMs,or(l))}if(l.status===503){let c=await l.clone().json().catch(()=>null);if((c?.code??c?.error)==="performance_group_abort_pending"){let h=c?.operation?.operationId??a;return this.beginOperation(h),c?.operation&&this.emit(c.operation),this.recover(h,n,Date.now()+this.recoveryTimeoutMs,or(l))}}try{return await this.throwResponse(l,n)}catch(c){throw this.failOperation(a),c}}async release(e,t,i){this.assertUsable();let s=this.operationForHold(i),n=await this.json(`${lt(this.groupKey,s)}/release`,{method:"POST",body:"{}"});return this.operationByHold.delete(i),this.allocationsByHold.delete(i),this.clearOperationRecord(),n}async resume(e,t){this.assertUsable();let i=this.operationForHold(t),s=await this.json(lt(this.groupKey,i));return this.complete(s.operation)}async extend(e,t,i=12e4){this.assertUsable();let s=this.operationForHold(t),n=Math.max(Ua,Math.min(Ka,Math.round(i))),o=await this.json(`${lt(this.groupKey,s)}/extend`,{method:"POST",body:JSON.stringify({ttlMs:n})}),a=this.complete(o.operation);return{holdId:a.holdId,expiresAt:a.expiresAt}}bestAvailable(){return Promise.reject(new V(400,"group_best_available_unsupported","group_best_available_unsupported"))}socketUrl(){return""}createRealtime(e,t){return new ar(this,t,this.realtimePollMs)}operationIdForHold(e){return this.operationByHold.get(e)??this.readMapping(e)}rememberOperation(e,t){!e||!t||(this.operationByHold.set(e,t),this.writeMapping(e,t))}async restoreOperation(){let e=this.readOperationRecord();if(!e)return null;if(!this.storedIsUndecided(e)&&e.state!=="committed"&&e.state!=="booked")return this.clearOperationRecord(),null;this.pendingOperationId=e.operationId,this.emitRecovery({kind:"pending",operationId:e.operationId,phase:e.state==="undecided"?"unknown":e.state,longRunning:!1,reference:ct(e.operationId)});let t;try{t=await this.authorized(lt(this.groupKey,e.operationId))}catch(n){return n instanceof q||this.recoveryFailed(e.operationId,"request_failed"),null}if(t.status===404)return this.failOperation(e.operationId),null;if(!t.ok)return this.recoveryFailed(e.operationId,"request_failed"),null;let i=await this.responseJson(t);this.emit(i.operation);let s=i.operation.state;return s==="committed"||s==="booked"?(this.emitRecovery({kind:"idle"}),this.complete(i.operation)):s==="aborted"||s==="expired"?(this.failOperation(e.operationId),null):this.recover(e.operationId,[],Date.now()+this.recoveryTimeoutMs)}async retryRecovery(){this.assertUsable();let e=this.pendingOperationId??this.readOperationRecord()?.operationId??null;return e?(this.pendingOperationId=e,this.recover(e,[],Date.now()+this.recoveryTimeoutMs)):null}watchSettlement(e){if(this.destroyed)return;let t=this.operationIdForHold(e);!t||t===this.settleOperationId||(this.stopSettlementWatch(),this.settleOperationId=t,this.settleStartedAt=Date.now(),this.settleState="committed",typeof document<"u"&&(this.settleVisibility=()=>{document.hidden||!this.settleOperationId||this.pollSettlement()},document.addEventListener("visibilitychange",this.settleVisibility)),this.scheduleSettlementPoll())}stopSettlementWatch(){this.settleTimer&&clearTimeout(this.settleTimer),this.settleTimer=null,this.settleOperationId=null,this.settleState=null,this.settleVisibility&&typeof document<"u"&&document.removeEventListener("visibilitychange",this.settleVisibility),this.settleVisibility=null}scheduleSettlementPoll(){if(this.destroyed||!this.settleOperationId)return;if(this.settleTimer&&clearTimeout(this.settleTimer),typeof document<"u"&&document.hidden){this.settleTimer=null;return}let t=Date.now()-this.settleStartedAt>=Qa?Ya:Wa;this.settleTimer=setTimeout(()=>{this.pollSettlement()},t)}settled(e){return e==="booked"||e==="expired"||e==="aborted"}async pollSettlement(){let e=this.settleOperationId;if(this.destroyed||!e)return;if(typeof document<"u"&&document.hidden){this.settleTimer&&clearTimeout(this.settleTimer),this.settleTimer=null;return}let t;try{let s=await this.authorized(lt(this.groupKey,e));if(!s.ok)return this.scheduleSettlementPoll();t=(await this.responseJson(s)).operation}catch(s){return s instanceof q?this.stopSettlementWatch():this.scheduleSettlementPoll()}if(this.destroyed||this.settleOperationId!==e)return;let i=t.state!==this.settleState;if(this.settleState=t.state,i&&this.noteOperationState(e,t.state),this.settled(t.state)){this.stopSettlementWatch(),t.state!=="booked"&&this.clearOperationRecord(),this.emit(t);return}i&&this.emit(t),this.scheduleSettlementPoll()}destroy(){if(!this.destroyed){this.destroyed=!0,this.stopSettlementWatch(),this.access.onRenewed(void 0);try{this.aborter.abort()}catch{}}}operationRecordKey(){return`@seatlayer/performance-group-operation/v1/${encodeURIComponent(this.base)}/${encodeURIComponent(this.groupKey)}`}readOperationRecord(){try{let e=window.sessionStorage.getItem(this.operationRecordKey());if(!e)return null;let t=JSON.parse(e);return!t?.operationId||t.groupKey!==this.groupKey?null:t}catch{return null}}storedIsUndecided(e){return e.state==="undecided"||Xa.has(e.state)}writeOperationRecord(e){try{window.sessionStorage.setItem(this.operationRecordKey(),JSON.stringify(e))}catch{}}clearOperationRecord(){try{window.sessionStorage.removeItem(this.operationRecordKey())}catch{}}beginOperation(e){this.pendingOperationId=e;let t=this.readOperationRecord();this.writeOperationRecord({operationId:e,groupKey:this.groupKey,state:"undecided",createdAt:t?.operationId===e?t.createdAt:Date.now()})}noteOperationState(e,t){let i=this.readOperationRecord();!i||i.operationId!==e||this.writeOperationRecord({...i,state:t})}failOperation(e){this.pendingOperationId=null,this.clearOperationRecord(),this.emitRecovery({kind:"idle"}),this.onOperationState?.({operationId:e,state:"aborted",decision:"abort"})}async adoptSession(e){if(this.destroyed)return;let t=`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/session/adopt`;for(let s=0;s<2;s++){if(this.destroyed)return;try{if((await this.fetcher(`${this.base}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.token}`},body:JSON.stringify({previousToken:e.previousToken}),credentials:"omit",signal:this.aborter.signal})).ok){this.adoptFailure=null;return}}catch{}}if(this.destroyed)return;this.adoptFailure=new V(409,"performance_group_session_adopt_failed","performance_group_session_adopt_failed");let i=this.pendingOperationId??"";throw this.emitRecovery({kind:"failed",operationId:i,reference:i?ct(i):"",reason:"session_adopt_failed",retryable:!1}),this.adoptFailure}async recover(e,t,i,s=100){let n=s,o=Date.now()+Math.min(8e3,Math.max(500,this.recoveryTimeoutMs/2)),a="unknown";for(;Date.now()<=i;){if(this.destroyed)throw new q;if(this.emitRecovery({kind:"pending",operationId:e,phase:a,longRunning:Date.now()>=o,reference:ct(e)}),await Za(n),this.destroyed)throw new q;let l;try{l=await this.authorized(lt(this.groupKey,e))}catch(p){if(p instanceof q)throw p;if(p instanceof oe)throw this.recoveryFailed(e,"request_failed"),p;n=Math.min(2e3,Math.max(100,n*2));continue}if(l.status===404){n=Math.min(1e3,Math.max(100,n*2));continue}if(!l.ok){this.recoveryFailed(e,"request_failed");try{return await this.throwResponse(l,t)}finally{this.pendingOperationId=null,this.clearOperationRecord()}}let h=(await this.responseJson(l)).operation;if(a=h.state,this.noteOperationState(e,h.state),this.emit(h),h.state==="committed"||h.state==="booked")return this.emitRecovery({kind:"idle"}),this.complete(h);if(h.state==="aborted"||h.state==="expired")throw this.failOperation(e),new V(409,"conflict","conflict",t.map(p=>({label:p,status:"held"})));n=or(l)}throw this.recoveryFailed(e,"deadline"),new V(504,"performance_group_outcome_unknown","performance_group_outcome_unknown")}recoveryFailed(e,t){this.emitRecovery({kind:"failed",operationId:e,reference:ct(e),reason:t,retryable:!0})}emitRecovery(e){if(this.destroyed)return;let t=this.lastRecovery.kind===e.kind&&JSON.stringify(this.lastRecovery)===JSON.stringify(e);this.lastRecovery=e,t||this.onRecoveryState?.(e)}noteAvailability(e,t,i){if(this.destroyed||!this.onAvailability)return;let s=e.state??this.descriptorCache?.state??"active",n=e.revision??null,o=!!n&&!!this.knownRevision&&n!==this.knownRevision;n&&!this.knownRevision&&(this.knownRevision=n);let a=i?.partial??{},l=Object.values(i?.seats??{});this.onAvailability({partial:a,freeCount:l.filter(c=>c==="free").length,blockedCount:Object.keys(i?.seats??{}).filter(c=>i.seats[c]!=="free"&&!(c in a)).length,state:s,salesClosed:!!t||s!=="active",revision:n,revisionChanged:o})}acceptRevision(e){this.knownRevision=e}complete(e){if(!e.hold||e.hold.expiresAt==null)throw new V(409,"group_hold_not_active","group_hold_not_active");this.pendingOperationId=null,this.noteOperationState(e.operationId,e.state),this.operationByHold.set(e.hold.id,e.operationId),this.writeMapping(e.hold.id,e.operationId);let t=e.hold.allocations??[];this.allocationsByHold.set(e.hold.id,t);let i=t.find(s=>s.eventKey===this.activePerformanceKey)?.items;return{holdId:e.hold.id,expiresAt:e.hold.expiresAt,items:i??e.hold.items??[]}}emit(e){this.destroyed||this.onOperationState?.({operationId:e.operationId,state:e.state,decision:e.decision})}operationForHold(e){let t=this.operationIdForHold(e);if(!t)throw new V(404,"group_hold_not_found","group_hold_not_found");return t}mappingKey(e){return`@seatlayer/performance-group-hold/v1/${encodeURIComponent(this.base)}/${encodeURIComponent(this.groupKey)}/${encodeURIComponent(e)}`}readMapping(e){try{return window.sessionStorage.getItem(this.mappingKey(e))}catch{return null}}writeMapping(e,t){try{window.sessionStorage.setItem(this.mappingKey(e),t)}catch{}}assertUsable(){if(this.destroyed)throw new q;if(this.adoptFailure)throw this.adoptFailure}async authorized(e,t={},i=!1){if(this.destroyed)throw new q;if(this.adoptFailure)throw this.adoptFailure;let s={...t.headers};t.body!==void 0&&(s["Content-Type"]="application/json");let n=await this.access.authorization(i?"unauthorized":"initial");if(this.destroyed)throw new q;if(this.adoptFailure)throw this.adoptFailure;if(!n)throw new Error("performance_group_buyer_access_required");s.Authorization=n;let o=await this.fetcher(`${this.base}${e}`,{method:t.method??"GET",headers:s,body:t.body,credentials:"omit",signal:this.aborter.signal});if(!i&&(o.status===401||o.status===403||o.status===422)){let a=await o.clone().json().catch(()=>null);if(await this.access.handleFailure(o.status,a?.code??a?.error))return this.authorized(e,t,!0)}return o}async json(e,t={}){let i=await this.authorized(e,t);return i.ok?this.responseJson(i):this.throwResponse(i)}async blob(e){let t=await this.authorized(e);return t.ok?t.blob():this.throwResponse(t)}async responseJson(e){return e.json()}async throwResponse(e,t=[]){let s=await e.json().catch(()=>null)??{},n=s.code??s.error??`request_failed_${e.status}`;throw e.status===409&&!s.conflicts?.length&&t.length&&(s.conflicts=t.map(o=>({label:o,status:"held"}))),new V(e.status,s.error??n,n,s.conflicts)}};var Ja="https://api.seatlayer.io";function qn(r){let e=typeof r=="string"?document.querySelector(r):r;if(!e)throw new Error("seatlayer: Performance Group picker container was not found");return e}var vi=class{constructor(e){this.descriptorValue=null;this.picker=null;this.root=null;this.innerHost=null;this.tabsHost=null;this.prevButton=null;this.nextButton=null;this.heldSummary=null;this.live=null;this.statusHost=null;this.statusCopy=null;this.statusAction=null;this.rendered=!1;this.destroyed=!1;this.continued=!1;this.switchingPerformance=!1;this.operationPending=!1;this.recovery={kind:"idle"};this.availability=null;this.activePerformanceKey=null;this.selectionsByEvent=new Map;this.validByEvent=new Map;this.refreshingComposition=!1;this.activeHandoff=null;this.selectionModeValue="same_seat";this.progressHost=null;this.legendHost=null;this.paneHost=null;this.datesSummaryHost=null;this.datesCardsHost=null;this.resettingFlexibleSelection=!1;this.selectingPartialSeat=!1;this.partialSeatDates=new Map;this.markedLabels=new Set;this.holdTicker=null;this.switchingMode=!1;this.booked=!1;if(!e||typeof e!="object")throw new Error("seatlayer: options object is required");if(!e.performanceGroup)throw new Error("seatlayer: `performanceGroup` key is required");if(!e.container)throw new Error("seatlayer: `container` is required");if(!e.buyerAccessToken&&!e.buyerAccessTokenProvider)throw new Error("seatlayer: Performance Group buyer access is required");if(!!e.initialHoldId!=!!e.initialOperationId)throw new Error("seatlayer: `initialHoldId` and `initialOperationId` must be supplied together");if((e.selectionMode==="per_performance"||e.allowSelectionModeSwitch)&&(!Number.isSafeInteger(e.numberOfPlacesToSelect)||(e.numberOfPlacesToSelect??0)<1))throw new Error("seatlayer: `numberOfPlacesToSelect` is required for per-performance selection");this.selectionModeValue=e.selectionMode??"same_seat",this.options=e,this.panelId=`sl-pg-panel-${e.performanceGroup}`,this.access=new de({provider:e.buyerAccessTokenProvider,token:e.buyerAccessToken,onExpired:e.onAccessExpired,onUnavailable:e.onAccessUnavailable}),this.api=new bi(e.performanceGroup,{apiBase:e.apiBase,access:this.access,selectionMode:e.selectionMode,partySize:e.selectionMode==="per_performance"?e.numberOfPlacesToSelect:void 0,onOperationState:t=>this.operationChanged(t),onRecoveryState:t=>this.recoveryChanged(t),onAvailability:t=>this.availabilityChanged(t)}),e.initialHoldId&&e.initialOperationId&&this.api.rememberOperation(e.initialHoldId,e.initialOperationId)}get mode(){return this.selectionModeValue}get selectionMode(){return this.selectionModeValue}get descriptor(){return this.descriptorValue}get currentHold(){return this.activeHandoff}async render(){if(this.rendered)return this;let e=performance.now();if(this.rendered=!0,Kn(),await(0,Oe.loadLocale)(this.options.locale),this.options.messages&&(0,Oe.setStringOverrides)(this.options.messages),this.destroyed)return this;let t;try{t=await this.api.descriptor()}catch(i){throw ye({apiBase:this.options.apiBase??Ja,event:this.options.performanceGroup,scope:"performance_group",surface:"performance_group_picker",outcome:"failure",stage:"group_descriptor",ms:performance.now()-e,load:Pe(this.options.performanceGroup),transport:"pubapi"}),i}return this.destroyed?this:(this.descriptorValue=t,this.activePerformanceKey=t.performances[0]?.eventKey??null,this.buildChrome(qn(this.options.container),t),this.announce(this.copy("picker.group.checkingAvailability")),await this.mountPicker(t),this.destroyed?this:(await this.restoreOperation(),this))}buildChrome(e,t){e.replaceChildren();let i=document.createElement("div");i.className="sl-pg-root",i.dataset.performanceGroup=t.key,i.dataset.selectionMode=this.mode;let s=document.createElement("div");s.className="sl-pg-progress";let n=document.createElement("section");n.className="sl-pg-head",n.setAttribute("aria-labelledby",`sl-pg-title-${t.key}`);let o=document.createElement("h2");o.id=`sl-pg-title-${t.key}`,o.textContent=t.name;let a=document.createElement("p");a.className="sl-pg-summary",a.textContent=this.copy(this.mode==="per_performance"?"picker.group.perPerformanceSummary":"picker.group.sameSeatSummary",{count:t.performanceCount});let l=document.createElement("p");l.className="sl-pg-help",l.textContent=this.copy(this.mode==="per_performance"?"picker.group.perPerformanceMapHelp":"picker.group.sameSeatMapHelp");let c=document.createElement("details");c.className="sl-pg-dates",c.open=t.performanceCount<=3;let h=document.createElement("summary");h.textContent=this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:t.performanceCount});let p=document.createElement("div");p.innerHTML=nr(this.performanceCards(t),this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesNote":"picker.group.includedNote",{count:t.performanceCount})),c.append(h,p);let d=document.createElement("div");d.className="sl-pg-held-summary",d.hidden=!0,n.append(o,a,l,c,d);let u=document.createElement("div");u.className="sl-pg-legend";let g=document.createElement("div");g.className="sl-pg-pane",g.setAttribute("role","group"),g.setAttribute("aria-label",this.copy("picker.group.yourSelection")),g.hidden=!0;let b=this.mode==="per_performance"?this.performanceTabs(t):null,x=document.createElement("div");x.className="sl-pg-inner",x.id=this.panelId,x.setAttribute("aria-busy","false"),x.dataset.locked="false",this.mode==="per_performance"&&(x.setAttribute("role","tabpanel"),x.tabIndex=-1);let k=document.createElement("div");k.className="sl-pg-status",k.setAttribute("role","status"),k.setAttribute("aria-live","polite"),k.hidden=!0;let S=document.createElement("p"),C=document.createElement("button");C.type="button",C.hidden=!0,C.textContent=this.copy("picker.group.retry"),C.addEventListener("click",()=>{this.retryRecovery()}),k.append(S,C),x.appendChild(k);let A=document.createElement("div");A.className="sl-pg-live",A.setAttribute("role","status"),A.setAttribute("aria-live","polite"),i.append(s,n),b&&i.append(b),i.append(u,x,g,A),e.appendChild(i),this.root=i,this.progressHost=s,this.legendHost=u,this.paneHost=g,this.datesSummaryHost=h,this.datesCardsHost=p,this.innerHost=x,this.heldSummary=d,this.live=A,this.statusHost=k,this.statusCopy=S,this.statusAction=C,this.syncProgress(),this.syncLegend(),this.syncPane()}async mountPicker(e){let t=new at(fn({container:this.innerHost,event:e.key,apiBase:this.options.apiBase,transport:this.api,hideEventDetails:!0,maxSelection:this.options.maxSelection,selectedObjects:this.options.selectedObjects,selectableObjects:this.options.selectableObjects,numberOfPlacesToSelect:this.options.numberOfPlacesToSelect,selectionValidators:this.options.selectionValidators,locale:this.options.locale,messages:this.options.messages,languages:this.options.languages,colorblindSafe:this.options.colorblindSafe,initialView:this.options.initialView,enable3D:this.options.enable3D,max3DSeats:this.options.max3DSeats,onBuyerViewChange:this.options.onBuyerViewChange,onAnalytics:(i,s)=>{try{this.options.onAnalytics?.(i,{...s,metricScope:"performance_group",performanceGroupKey:e.key,performanceCount:e.performanceCount,selectionMode:this.mode})}catch{}},hideBadge:this.options.hideBadge,theme:this.options.theme,holdTtlMs:this.options.holdTtlMs,initialHoldId:this.options.initialHoldId,restoreHold:this.options.restoreHold,confirmSelection:this.options.confirmSelection,seatView:this.options.seatView,onSelectionChange:i=>this.selectionChanged(i),onSelectionValidityChange:i=>this.selectionValidityChanged(i),onSelectionValid:this.options.onSelectionValid,onSelectionInvalid:this.options.onSelectionInvalid,onSelectionLimit:this.options.onSelectionLimit,onHoldChange:(i,s)=>this.holdChanged(i,s),onCheckout:(i,s)=>this.checkout(i,s),onHoldExpired:()=>{this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.options.onHoldChange?.(null),this.options.onHoldExpired?.()},onError:this.options.onError},{performanceCount:e.performanceCount,selectionMode:this.mode,submissionState:()=>this.submissionState(),suppressPricing:!0,nights:()=>this.nights(),seatMarks:()=>this.seatMarks(),nightSummary:()=>this.nightSummary(),groupSelectionSummary:()=>this.groupSelectionSummary(),activePerformanceLabel:()=>this.activePerformanceLabel(),selectedPerformanceDates:()=>this.mode==="same_seat"&&e.inclusionMode==="flexible_dates"?bn(this.includedPerformances(),e.performanceCount,this.options.locale,this.copy("picker.group.flexibleSelectedNote",{count:this.includedPerformances().length})):null,selectNight:i=>{this.switchPerformance(i)},selectionModeSwitch:this.options.allowSelectionModeSwitch&&this.mode==="same_seat"?{label:this.copy("picker.group.chooseNightByNight"),activate:()=>{this.switchSelectionMode("per_performance")}}:null,partialSeatSelection:e.inclusionMode==="flexible_dates"&&this.mode==="same_seat"?{label:i=>this.copy("picker.group.selectAvailableDates",{count:i}),activate:(i,s)=>{this.selectPartialSeat(i,s)}}:null,confirmDateSelection:e.inclusionMode==="flexible_dates"&&this.mode==="same_seat"?{includedEventKeys:()=>this.api.includedPerformanceKeys(),availableEventKeys:i=>this.partialSeatDates.get(i)??this.nights().map(s=>s.eventKey),label:i=>this.copy("picker.group.selectAvailableDates",{count:i}),apply:(i,s)=>this.applySeatDates(i,s,!0)}:null}));this.picker=t,await t.render(),!this.destroyed&&this.updateTabs()}performanceCards(e){return e.performances.map(t=>({eventKey:t.eventKey,name:t.name,iso:new Date(t.startsAt).toISOString(),date:mi(t,this.options.locale),time:fi(t,this.options.locale)}))}nights(){return(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:e.name,shortDate:gi(e,this.options.locale)}))}seatMarks(){let e=this.descriptorValue?.performanceCount??0,t=this.availability,i=!!t?.salesClosed||!!t&&t.state!=="active",s=this.mode==="same_seat"&&!i?t?.partial??{}:{},n={};for(let o of this.markedLabels)n[o]=null;if(this.markedLabels.clear(),e>0)for(let[o,a]of Object.entries(s))!a.length||a.length>=e||(n[o]={kind:"partial",fraction:(e-a.length)/e,data:{blockedEventKeys:[...a]}},this.markedLabels.add(o));return n}activePerformanceLabel(){if(this.mode!=="per_performance")return null;let e=this.descriptorValue?.performances.find(s=>s.eventKey===this.activePerformanceKey);if(!e)return null;let t=gi(e,this.options.locale),i=e.name?.trim();return i&&i!==t?`${i} \xB7 ${t}`:t}nightSummary(){return this.mode!=="per_performance"?[]:(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:gi(e,this.options.locale),labels:(this.selectionsByEvent.get(e.eventKey)??[]).map(t=>t.label),active:e.eventKey===this.activePerformanceKey}))}groupSelectionSummary(){let e=this.includedPerformances();if(!e.length)return null;if(this.mode==="same_seat"){let n=this.activeHandoff?.seatLabels.length??this.picker?.getSelection().length??0;return{seats:n*e.length,performances:e.length,totalPerformances:this.descriptorValue?.performanceCount??e.length,performancesChosen:n?e.length:0,perPerformance:n}}let t=e.map(n=>this.selectionsByEvent.get(n.eventKey)?.length??0),i=t.filter(n=>n>0),s=i.length===t.length&&i.every(n=>n===i[0]);return{seats:t.reduce((n,o)=>n+o,0),performances:e.length,totalPerformances:this.descriptorValue?.performanceCount??e.length,performancesChosen:i.length,perPerformance:s&&i.length?i[0]:null}}syncProgress(){if(!this.progressHost)return;let e=!!this.activeHandoff,t=[{id:"performances",label:this.copy("picker.group.stepPerformances"),state:"done"},{id:"seats",label:this.copy("picker.group.stepSeats"),state:e?"done":"current"},{id:"review",label:this.copy("picker.group.stepReview"),state:this.booked?"done":e?"current":"upcoming"}];this.progressHost.innerHTML=An(t,{label:this.copy("picker.group.progressLabel"),done:this.copy("picker.group.stepDone"),current:this.copy("picker.group.stepCurrent"),upcoming:this.copy("picker.group.notStarted")})}syncLegend(){if(!this.legendHost)return;let e=this.availability,t=!!e?.salesClosed||e&&e.state!=="active";if(!e||t){this.legendHost.replaceChildren();return}this.legendHost.innerHTML=yn({available:e.freeCount>0,selected:(this.picker?.getSelection().length??0)>0,partial:Object.keys(e.partial).length>0,unavailable:e.blockedCount>0},{title:this.copy("picker.group.legendTitle"),available:this.copy("picker.group.legendAvailable"),selected:this.copy("picker.group.legendSelected"),partial:this.copy("picker.group.legendNotEveryDate"),unavailable:this.copy("picker.group.legendUnavailable")},this.categoryColor())}categoryColor(){return this.picker?.categoryLegendColor()??"#2563eb"}syncPane(){let e=this.paneHost;if(!e)return;let t=this.includedPerformances();if(this.mode!=="same_seat"||!t.length){e.hidden=!0,e.replaceChildren();return}let i=this.activeHandoff?.seatLabels??this.picker?.getSelection().map(n=>n.label)??[],s=this.heldTotal();e.hidden=!1,e.innerHTML=Pn({title:this.copy("picker.group.yourSelection"),rows:t.map(n=>({eventKey:n.eventKey,name:`${mi(n,this.options.locale)} ${fi(n,this.options.locale)}`,labels:i})),empty:this.copy("picker.group.noSeatsChosenYet"),note:s?null:this.copy("picker.group.pricesPerPerformance"),total:s?{label:this.copy("picker.group.total"),amount:s}:null,holdStatus:this.booked?this.copy("picker.group.bookedAll",{count:t.length}):this.activeHandoff?this.copy("picker.group.heldTogether",{count:t.length,time:Mn(this.activeHandoff.expiresAt-Date.now())}):null})}heldTotal(){let e=this.activeHandoff,t=this.descriptorValue;if(!e||!t)return null;let s=this.api.allocationsForHold(e.holdId).flatMap(a=>a.items);if(!s.length)return null;let n=s.reduce((a,l)=>a+l.unitPrice*(l.quantity??1),0),o=s[0]?.currency??t.currency;try{return(0,Oe.formatMoney)(n,o,void 0,this.options.locale)}catch{return`${o} ${n.toFixed(2)}`}}includedPerformances(){let e=this.descriptorValue?.performances??[];if(this.descriptorValue?.inclusionMode!=="flexible_dates")return e;let t=new Set(this.api.includedPerformanceKeys());return e.filter(i=>t.has(i.eventKey))}syncIncludedDates(){let e=this.descriptorValue;if(!e||!this.datesSummaryHost||!this.datesCardsHost)return;let t=this.includedPerformances(),i=e.inclusionMode==="flexible_dates";this.datesSummaryHost.textContent=i&&t.length<e.performanceCount?this.copy("picker.group.flexibleDatesSelected",{selected:t.length,total:e.performanceCount}):this.copy(i?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:e.performanceCount}),this.datesCardsHost.innerHTML=nr(this.performanceCards({...e,performances:t}),this.copy(i&&t.length<e.performanceCount?"picker.group.flexibleSelectedNote":i?"picker.group.flexibleDatesNote":"picker.group.includedNote",{count:t.length}))}async selectPartialSeat(e,t){if(!(this.destroyed||this.holdBlocked()||this.activeHandoff||!t.length)){if((this.picker?.getSelection().length??0)>0){this.announce(this.copy("picker.group.clearBeforePartial"));return}this.partialSeatDates.set(e,[...t]),await this.applySeatDates(e,t,!1)}}async applySeatDates(e,t,i){if(this.destroyed||this.holdBlocked()||this.activeHandoff||!t.length)return!1;let s=this.api.includedPerformanceKeys();if(s.length===t.length&&s.every(n=>t.includes(n)))return!0;this.selectingPartialSeat=!0;try{if(this.api.setIncludedEventKeys(t),this.syncIncludedDates(),await this.picker?.refreshAvailability(),!(i?this.picker?.selectObjectsWithoutConfirmation([e])??[]:this.picker?.selectObjects([e])??[]).length)throw new Error("performance_group_partial_seat_unavailable");return this.announce(this.copy("picker.group.selectedAvailableDates",{count:t.length})),this.syncPane(),this.syncLegend(),!0}catch(n){return s.length&&(this.api.setIncludedEventKeys(s),this.syncIncludedDates(),await this.picker?.refreshAvailability().catch(()=>{})),this.options.onError?.(n),!1}finally{this.selectingPartialSeat=!1}}syncHoldTicker(){this.booked||(this.activeHandoff&&!this.holdTicker?this.holdTicker=setInterval(()=>this.syncPane(),1e3):!this.activeHandoff&&this.holdTicker&&(clearInterval(this.holdTicker),this.holdTicker=null))}async switchSelectionMode(e){if(!(this.destroyed||this.switchingMode||e===this.mode)&&!(this.activeHandoff||this.holdBlocked())){this.switchingMode=!0;try{this.api.setSelectionMode(e,this.options.numberOfPlacesToSelect),this.selectionModeValue=e,this.picker?.destroy(),this.picker=null,this.selectionsByEvent.clear(),this.validByEvent.clear(),this.markedLabels.clear(),this.availability=null;let t=this.descriptorValue;if(this.activePerformanceKey=t.performances[0]?.eventKey??null,this.buildChrome(qn(this.options.container),t),await this.mountPicker(t),this.destroyed)return;this.announce(this.copy("picker.group.nightByNightStarted")),this.options.onSelectionModeChange?.(e)}catch(t){if(t instanceof q)return;this.options.onError?.(t)}finally{this.switchingMode=!1}}}async release(){await this.picker?.release()}close(){this.destroy()}destroy(){if(this.destroyed)return;this.destroyed=!0,this.api.destroy(),this.holdTicker&&clearInterval(this.holdTicker),this.holdTicker=null;let e=this.picker;this.root?.setAttribute("hidden","");let t=()=>{e?.destroy(),this.access.clear(),this.root?.remove(),this.root=null,this.picker=null,this.innerHost=null,this.tabsHost=null,this.statusHost=null,this.statusCopy=null,this.statusAction=null,this.live=null};e?.getCurrentHold()&&!this.continued?e.release().catch(()=>{}).finally(t):t()}copy(e,t){let i=this.options.messages?.[e];return i!==void 0?t?i.replace(/\{(\w+)\}/g,(s,n)=>String(t[n]??`{${n}}`)):i:(0,Oe.t)(e,t)}performanceTabs(e){let t=document.createElement("div");t.className="sl-pg-tabsbar";let i=document.createElement("button");i.type="button",i.className="sl-pg-step",i.dataset.step="previous",i.setAttribute("aria-label",this.copy("picker.group.previousPerformance")),i.textContent="\u2039",i.addEventListener("click",()=>{this.stepPerformance(-1)});let s=document.createElement("button");s.type="button",s.className="sl-pg-step",s.dataset.step="next",s.setAttribute("aria-label",this.copy("picker.group.nextPerformance")),s.textContent="\u203A",s.addEventListener("click",()=>{this.stepPerformance(1)});let n=document.createElement("div");return n.className="sl-pg-tabs",n.setAttribute("role","tablist"),n.setAttribute("aria-label",this.copy("picker.group.performances")),e.performances.forEach((o,a)=>{let l=document.createElement("button");l.type="button",l.className="sl-pg-tab",l.id=`sl-pg-tab-${e.key}-${o.eventKey}`,l.dataset.eventKey=o.eventKey,l.dataset.state="not-started",l.setAttribute("role","tab"),l.setAttribute("aria-selected",String(a===0)),l.setAttribute("aria-controls",this.panelId),l.tabIndex=a===0?0:-1;let c=document.createElement("span");c.className="sl-pg-tab-name",c.textContent=o.name;let h=document.createElement("span");h.className="sl-pg-tab-state",h.textContent=this.copy("picker.group.stillNeedsSeat");let p=document.createElement("span");p.className="sl-pg-tab-badge",p.textContent=this.copy("picker.group.chosenOfTotal",{chosen:0,total:this.options.numberOfPlacesToSelect??1}),l.append(c,p,h),l.addEventListener("click",()=>{this.switchPerformance(o.eventKey)}),l.addEventListener("keydown",d=>this.tabKeydown(d)),n.appendChild(l)}),t.append(i,n,s),this.tabsHost=n,this.prevButton=i,this.nextButton=s,t}tabButtons(){return[...this.tabsHost?.querySelectorAll(".sl-pg-tab")??[]]}tabKeydown(e){let t=this.tabButtons(),i=t.findIndex(a=>a===e.target);if(i<0)return;let s=getComputedStyle(this.tabsHost??document.body).direction==="rtl",n=-1;switch(e.key){case"ArrowRight":n=i+(s?-1:1);break;case"ArrowLeft":n=i+(s?1:-1);break;case"ArrowDown":n=i+1;break;case"ArrowUp":n=i-1;break;case"Home":n=0;break;case"End":n=t.length-1;break;default:return}if(n<0||n>=t.length)return;e.preventDefault();let o=t[n];o.focus({preventScroll:!0}),o.disabled||this.switchPerformance(o.dataset.eventKey)}stepPerformance(e){let t=this.tabButtons(),i=t.findIndex(n=>n.dataset.eventKey===this.activePerformanceKey),s=t[i+e];!s||s.disabled||(s.focus({preventScroll:!0}),this.switchPerformance(s.dataset.eventKey))}submissionState(){let e=this.descriptorValue?.performances??[];if(this.mode!=="per_performance"){let s=!this.holdBlocked();return{complete:e.length,total:e.length,ready:s}}let t=this.options.numberOfPlacesToSelect,i=e.filter(s=>this.selectionsByEvent.get(s.eventKey)?.length===t&&this.validByEvent.get(s.eventKey)!==!1).length;return{complete:i,total:e.length,ready:i===e.length&&!this.holdBlocked()}}holdBlocked(){return this.operationPending||this.recovery.kind!=="idle"||!!this.availability?.salesClosed}selectionChanged(e){if(this.mode!=="per_performance"){this.options.onSelectionChange?.(e),this.syncPane(),this.syncLegend(),!e.length&&!this.activeHandoff&&!this.resettingFlexibleSelection&&!this.selectingPartialSeat&&this.descriptorValue?.inclusionMode==="flexible_dates"&&this.api.includedPerformanceKeys().length<this.descriptorValue.performanceCount&&(this.resettingFlexibleSelection=!0,this.api.setIncludedEventKeys(this.descriptorValue.performances.map(i=>i.eventKey)),this.syncIncludedDates(),this.picker?.refreshAvailability().catch(i=>this.options.onError?.(i)).finally(()=>{this.resettingFlexibleSelection=!1}));return}if(this.refreshingComposition||this.switchingPerformance||!this.activePerformanceKey)return;let t=e.map(i=>({...i}));this.selectionsByEvent.set(this.activePerformanceKey,t),this.api.setPerformanceSelections(this.activePerformanceKey,t.map(i=>({label:i.label}))),t.length!==this.options.numberOfPlacesToSelect?this.validByEvent.set(this.activePerformanceKey,!1):this.validByEvent.has(this.activePerformanceKey)||this.validByEvent.set(this.activePerformanceKey,!0),this.updateTabs(),this.options.onSelectionChange?.(e),this.refreshComposition(),this.syncLegend()}selectionValidityChanged(e){if(this.mode==="per_performance"&&!this.switchingPerformance&&this.activePerformanceKey){let t=this.validByEvent.get(this.activePerformanceKey);this.validByEvent.set(this.activePerformanceKey,e.isValid),this.updateTabs(),!this.refreshingComposition&&t!==e.isValid&&this.refreshComposition()}this.options.onSelectionValidityChange?.(e)}refreshComposition(){if(this.refreshingComposition||!this.picker)return;let e=this.submissionState();this.refreshingComposition=!0;try{this.picker.refreshPerformanceGroupComposition();let t=this.submissionState();(e.complete!==t.complete||e.ready!==t.ready)&&this.picker.refreshPerformanceGroupComposition()}finally{this.refreshingComposition=!1}}tabState(e){let t=this.options.numberOfPlacesToSelect??1,i=(this.selectionsByEvent.get(e)??[]).map(n=>n.label),s=this.copy("picker.group.chosenOfTotal",{chosen:i.length,total:t});return i.length===0?{key:"not-started",label:this.copy("picker.group.stillNeedsSeat"),badge:s}:i.length===t&&this.validByEvent.get(e)!==!1?{key:"complete",label:this.copy("picker.group.completeWithSeats",{seats:i.join(", ")}),badge:s}:i.length===t?{key:"needs-attention",label:this.copy("picker.group.needsAttention"),badge:s}:{key:"in-progress",label:this.copy("picker.group.needsMoreSeats",{count:t-i.length}),badge:s}}updateTabs(){let e=this.tabButtons(),t=this.switchingPerformance||this.operationPending||this.recovery.kind!=="idle"||!!this.activeHandoff;e.forEach(s=>{let n=s.dataset.eventKey,o=this.tabState(n),a=n===this.activePerformanceKey;s.dataset.state=o.key,s.disabled=t,s.setAttribute("aria-selected",String(a)),s.tabIndex=a?0:-1;let l=s.querySelector(".sl-pg-tab-state");l&&(l.textContent=o.label);let c=s.querySelector(".sl-pg-tab-badge");c&&(c.textContent=o.badge);let h=s.querySelector(".sl-pg-tab-name")?.textContent??n;s.setAttribute("aria-label",`${h}: ${o.badge} \xB7 ${o.label}`),a&&this.innerHost?.setAttribute("aria-labelledby",s.id)});let i=e.findIndex(s=>s.dataset.eventKey===this.activePerformanceKey);this.prevButton&&(this.prevButton.disabled=t||i<=0),this.nextButton&&(this.nextButton.disabled=t||i<0||i>=e.length-1)}async switchPerformance(e){if(this.mode!=="per_performance"||this.switchingPerformance||this.holdBlocked()||this.activeHandoff||e===this.activePerformanceKey||!this.picker)return;this.activePerformanceKey&&this.selectionChanged(this.picker.getSelection());let t=this.selectionsByEvent.get(e)?.map(i=>i.label)??[];this.switchingPerformance=!0,this.activePerformanceKey=e,this.updateTabs(),this.setInteractionLocked(!0);try{this.picker.clearSelection(),this.api.setActivePerformance(e),await this.picker.refreshAvailability();let i=this.picker.selectObjects(t);this.switchingPerformance=!1,this.selectionChanged(i),i.length!==t.length&&this.validByEvent.set(e,!1),this.options.onSelectionChange?.(i);let s=this.descriptorValue?.performances.find(n=>n.eventKey===e);s&&this.announce(this.copy("picker.group.performanceOpened",{performance:s.name}))}catch(i){this.options.onError?.(i)}finally{this.switchingPerformance=!1,!this.operationPending&&this.recovery.kind==="idle"&&this.setInteractionLocked(!1),this.updateTabs(),this.picker.refreshPerformanceGroupComposition()}}setInteractionLocked(e){let t=this.innerHost;t&&(t.dataset.locked=String(e),t.setAttribute("aria-busy",String(e)),t.setAttribute("aria-disabled",String(e)))}announce(e){this.live&&(this.live.textContent=e)}showStatus(e,t,i={}){this.statusHost&&this.statusCopy&&this.statusAction&&(this.statusCopy.textContent=t,this.statusHost.hidden=!t,this.statusAction.hidden=!i.retry),this.announce(t),this.options.onStatusChange?.({kind:e,message:t,...i.reference?{reference:i.reference}:{}})}clearStatus(){this.statusHost&&(this.statusHost.hidden=!0),this.statusAction&&(this.statusAction.hidden=!0),this.options.onStatusChange?.({kind:"idle",message:""})}operationChanged(e){if(this.destroyed)return;let t=e.state==="preparing"||e.state==="commit_pending"||e.state==="abort_pending"||e.state==="expire_pending";if(this.operationPending=t,this.setInteractionLocked(t||this.recovery.kind!=="idle"),this.updateTabs(),t){this.showStatus("pending",this.copy(e.state==="commit_pending"?"picker.group.commitPending":e.state==="abort_pending"||e.state==="expire_pending"?"picker.group.abortPending":"picker.group.securing"));return}if(e.state==="booked"){this.bookingSettled();return}if(e.state==="expired"||e.state==="aborted"){this.activeHandoff&&this.holdLost();return}if(e.state==="committed"){this.clearStatus(),this.announce(this.copy("picker.group.secured")),queueMicrotask(()=>this.innerHost?.querySelector('[data-ref="cta"]')?.focus({preventScroll:!0}));return}e.decision==="abort"&&this.recovery.kind==="idle"&&(this.clearStatus(),this.announce(this.copy("picker.group.notSecured")))}bookingSettled(){if(this.booked)return;this.booked=!0,this.root&&(this.root.dataset.booking="booked"),this.clearStatus(),this.holdTicker&&clearInterval(this.holdTicker),this.holdTicker=null;let e=this.activeHandoff?{...this.activeHandoff,bookingState:"booked"}:null;e&&(this.activeHandoff=e),this.syncProgress(),this.syncPane(),this.updateTabs(),this.picker?.notifyGroupSettled("booked"),this.announce(this.copy("picker.group.bookedAll",{count:this.descriptorValue?.performanceCount??0})),e&&this.options.onBooked?.(e)}holdLost(){this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.picker?.notifyGroupSettled("lost"),this.announce(this.copy("picker.group.notSecured")),this.options.onHoldChange?.(null),this.options.onHoldExpired?.()}recoveryChanged(e){if(!this.destroyed){if(this.recovery=e,this.setInteractionLocked(this.operationPending||e.kind!=="idle"),this.updateTabs(),this.refreshComposition(),e.kind==="idle"){this.operationPending||this.clearStatus();return}if(e.kind==="pending"){this.showStatus("pending",e.longRunning?this.copy("picker.group.longRunning",{reference:e.reference}):this.copy("picker.group.outcomeUnknown"),{reference:e.reference});return}this.showStatus("recovery_failed",this.copy("picker.group.longRunning",{reference:e.reference}),{retry:e.retryable,reference:e.reference}),this.setInteractionLocked(!1)}}async retryRecovery(){if(!(this.destroyed||this.recovery.kind!=="failed"||!this.recovery.retryable))try{await this.api.retryRecovery()}catch(e){if(e instanceof q)return;this.options.onError?.(e)}}async restoreOperation(){try{let e=await this.api.restoreOperation();e&&!this.destroyed&&await this.picker?.adoptRestoredHold(e.holdId)}catch(e){if(e instanceof q)return;this.options.onError?.(e)}}availabilityChanged(e){if(this.destroyed)return;let t=this.availability;if(this.availability=e,e.revisionChanged){this.showStatus("revision_changed",this.copy("picker.group.revisionChanged")),this.reloadDescriptor(e.revision);return}e.salesClosed?this.showStatus("sales_closed",this.copy("picker.group.salesClosed")):t?.salesClosed&&this.clearStatus(),this.updateTabs(),this.refreshComposition(),this.syncLegend()}async reloadDescriptor(e){this.api.acceptRevision(e);try{let t=await this.api.descriptor();if(this.destroyed)return;this.descriptorValue=t,await this.picker?.refreshAvailability()}catch(t){if(t instanceof q)return;this.options.onError?.(t)}}handoff(e,t){let i=this.descriptorValue,s=this.api.operationIdForHold(e.holdId);if(!i||!s)throw new Error("seatlayer: Performance Group hold identity is unavailable");let n=this.api.allocationsForHold(e.holdId);return{operationId:s,holdId:e.holdId,expiresAt:e.expiresAt,performanceGroup:i,selectionMode:this.mode,performanceKeys:n.map(o=>o.eventKey),bookingState:this.booked?"booked":"held",seatLabels:t.map(o=>o.label),...this.mode==="per_performance"?{allocations:n.map(o=>({eventKey:o.eventKey,seatLabels:o.items.map(a=>a.label)}))}:{}}}renderHeldAllocations(e){if(!(!this.heldSummary||this.mode!=="per_performance")){this.heldSummary.replaceChildren();for(let t of e){let i=this.descriptorValue?.performances.find(o=>o.eventKey===t.eventKey),s=document.createElement("p"),n=document.createElement("strong");n.textContent=i?.name??t.eventKey,s.append(n,document.createTextNode(t.items.map(o=>o.label).join(", "))),this.heldSummary.appendChild(s)}this.heldSummary.hidden=e.length===0}}resetPerPerformanceSelection(){this.mode==="per_performance"&&(this.selectionsByEvent.clear(),this.validByEvent.clear(),this.heldSummary?.replaceChildren(),this.heldSummary&&(this.heldSummary.hidden=!0),this.updateTabs(),this.picker?.refreshPerformanceGroupComposition())}holdChanged(e,t){if(!e){this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.options.onHoldChange?.(null);return}let i=this.handoff(e,t),s=this.activeHandoff?.holdId!==i.holdId;this.activeHandoff=i,this.renderHeldAllocations(this.api.allocationsForHold(e.holdId)),this.updateTabs(),this.api.watchSettlement(e.holdId),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),s&&this.options.onHold?.(i),this.options.onHoldChange?.(i)}checkout(e,t){let i=this.handoff(e,t);this.continued=!0,this.activeHandoff=i,this.options.onCheckout?.(i)}};var el="https://api.seatlayer.io",tl=6e4,il=5e3,he=class extends Error{constructor(t,i){super(`season_request_failed:${t}`);this.code=t;this.status=i;this.name="SeasonApiError"}},Pt=class extends Error{constructor(t){super(`season_operation_timeout:${t}`);this.operationId=t;this.name="SeasonRecoveryTimeoutError"}};function rl(r,e){let t=Number(r.headers.get("Retry-After")),i=Number.isFinite(t)&&t>=0?t:e.retryAfterSeconds;return Math.max(0,Math.min(il,i*1e3))}function sl(r,e){return e?.aborted?Promise.reject(e.reason??new DOMException("Aborted","AbortError")):new Promise((t,i)=>{let s=setTimeout(t,r);e?.addEventListener("abort",()=>{clearTimeout(s),i(e.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function nl(r){if(!r||typeof r!="object")return"unknown";let e=r;return typeof e.code=="string"?e.code:typeof e.error=="string"?e.error:"unknown"}function lr(r){if(!r||typeof r!="object")throw new he("invalid_operation_response",502);let e=r,t=JSON.stringify(e);if(!e.operationId||!e.holdId||!Array.isArray(e.allocations)||t.includes("shc_")||t.includes("childHoldId")||t.includes("child_hold_id"))throw new he("unsafe_operation_response",502);return e}function Wn(r,e){return{seasonKey:r.key,planActivationId:r.planActivationId,operationId:e.operationId,holdId:e.holdId,expiresAt:e.expiresAt,policy:e.policy,state:e.state,allocations:e.allocations.map(({eventId:t,state:i})=>({eventKey:t,state:i}))}}var Mt,Lt,_e,Ht,Rt,ge,Ie,yi=class{constructor(e,t){B(this,ge);B(this,Mt);B(this,Lt);B(this,_e);B(this,Ht);B(this,Rt);L(this,Mt,e),L(this,Lt,(t.apiBase??el).replace(/\/$/,"")),L(this,_e,t.access),L(this,Ht,t.fetch??globalThis.fetch.bind(globalThis)),L(this,Rt,t.recoveryTimeoutMs??tl)}async descriptor(){let{body:e}=await H(this,ge,Ie).call(this,"GET","");return e.season}async availability(){let{body:e}=await H(this,ge,Ie).call(this,"GET","/availability"),t=Object.values(e.seats??{});return{...e,freeCount:t.filter(i=>i==="free").length,blockedCount:t.filter(i=>i!=="free").length}}async hold(e,t){let{body:i,response:s}=await H(this,ge,Ie).call(this,"POST","/holds",{operationId:t,labels:[...e]});return{operation:lr(i.operation),response:s}}async operation(e){let{body:t,response:i}=await H(this,ge,Ie).call(this,"GET",`/operations/${encodeURIComponent(e)}`);return{operation:lr(t.operation),response:i}}async release(e,t){let{body:i,response:s}=await H(this,ge,Ie).call(this,"POST",`/holds/${encodeURIComponent(e)}/release`,{releaseActionId:t});return{operation:lr(i.operation),response:s}}async renewalIntent(e){let{body:t}=await H(this,ge,Ie).call(this,"POST","/renewal-intents",{offerId:e}),i=t.intent;if(!i||i.offerId!==e||i.state!=="intent_received"||!i.intentId||!Number.isFinite(i.receivedAt))throw new he("invalid_renewal_intent_response",502);return i}async waitForTerminal(e,t,i){let s=Date.now(),n=t??await this.operation(e);for(;n.operation.state==="preparing"||n.operation.state==="commit_pending"||n.operation.state==="abort_pending";){if(Date.now()-s>=w(this,Rt))throw new Pt(e);await sl(rl(n.response,n.operation),i),n=await this.operation(e)}return n.operation}destroy(){w(this,_e).clear()}};Mt=new WeakMap,Lt=new WeakMap,_e=new WeakMap,Ht=new WeakMap,Rt=new WeakMap,ge=new WeakSet,Ie=async function(e,t,i,s=!0){let n=await w(this,_e).authorization();if(!n)throw new oe({reason:"no_token",retryable:!1});let o=await w(this,Ht).call(this,`${w(this,Lt)}/pub/seasons/${encodeURIComponent(w(this,Mt))}${t}`,{method:e,headers:{Authorization:n,...i===void 0?{}:{"Content-Type":"application/json"}},body:i===void 0?void 0:JSON.stringify(i)}),a=await o.json().catch(()=>null);if(!o.ok){let l=nl(a);if(s&&await w(this,_e).handleFailure(o.status,l))return H(this,ge,Ie).call(this,e,t,i,!1);let c=w(this,_e).unavailable;throw c?new oe(c):new he(l,o.status)}if(a===null)throw new he("invalid_json_response",502);return{body:a,response:o}};var Yn="seatlayer-season-picker-style";function ol(){if(document.getElementById(Yn))return;let r=document.createElement("style");r.id=Yn,r.textContent=`
|
|
1725
2298
|
.sl-season-root{box-sizing:border-box;display:grid;gap:12px;min-width:0;max-width:100%;overflow-wrap:anywhere;color:#18202b;font-family:Inter,system-ui,sans-serif}
|
|
1726
2299
|
.sl-season-card{box-sizing:border-box;display:grid;gap:8px;min-width:0;padding:16px;border:1px solid #dde3ea;border-radius:14px;background:#fff}
|
|
1727
2300
|
.sl-season-card h2{margin:0;font:700 20px/1.25 inherit}.sl-season-card p{margin:0;color:#627081;font-size:14px}
|
|
@@ -1730,4 +2303,4 @@
|
|
|
1730
2303
|
.sl-season-status[data-kind=ready]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
|
|
1731
2304
|
.sl-season-root[data-busy=true]{cursor:progress}.sl-season-root[data-busy=true] .sl-season-card{opacity:.88}
|
|
1732
2305
|
@media(max-width:360px){.sl-season-card{padding:12px}.sl-season-card h2{font-size:18px}}
|
|
1733
|
-
`,document.head.appendChild(r)}function
|
|
2306
|
+
`,document.head.appendChild(r)}function al(r){let e=typeof r=="string"?document.querySelector(r):r;if(!e)throw new Error("seatlayer: Season picker container was not found");return e}function ll(r,e){if(r.startsAt===null)return r.name;try{let t=new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short",...e?{timeZone:e}:{}}).format(new Date(r.startsAt));return`${r.name} \u2014 ${t}`}catch{return r.name}}var se,Ve,It,ne,Fe,ke,je,Se,De,$e,pt,I,Qn,Xn,xi,re,dt,cr,Ot,wi=class{constructor(e){B(this,I);B(this,se);B(this,Ve);B(this,It);B(this,ne);B(this,Fe,new AbortController);B(this,ke,null);B(this,je,null);B(this,Se,null);B(this,De,null);B(this,$e,null);B(this,pt,!1);if(!e?.season)throw new Error("seatlayer: `season` key is required");if(!e.container)throw new Error("seatlayer: `container` is required");if(!e.buyerAccessToken&&!e.buyerAccessTokenProvider)throw new Error("seatlayer: Season buyer access is required");if("event"in e||"performanceGroup"in e)throw new Error("seatlayer: SeasonPicker is not SeatPicker or PerformanceGroupPicker");L(this,se,e),L(this,Ve,al(e.container)),L(this,It,new de({token:e.buyerAccessToken,provider:e.buyerAccessTokenProvider,onExpired:e.onAccessExpired,onUnavailable:e.onAccessUnavailable})),L(this,ne,new yi(e.season,{apiBase:e.apiBase,access:w(this,It),fetch:e.fetch,recoveryTimeoutMs:e.recoveryTimeoutMs}))}async render(){H(this,I,cr).call(this),ol(),H(this,I,Qn).call(this),H(this,I,re).call(this,{kind:"loading",message:"Loading Season availability."},!0);try{let[e,t]=await Promise.all([w(this,ne).descriptor(),w(this,ne).availability()]);return L(this,ke,e),L(this,je,t),H(this,I,Xn).call(this),H(this,I,re).call(this,{kind:"ready",message:`${t.freeCount} seat${t.freeCount===1?"":"s"} available for every included occurrence.`}),w(this,se).initialOperationId&&await this.restoreOperation(w(this,se).initialOperationId),this}catch(e){throw H(this,I,dt).call(this,e),e}}async holdSameSeat(e,t){if(H(this,I,Ot).call(this),!t.startsWith("sop_"))throw new Error("seatlayer: caller-stable Season operation id is required");if(!e.length)throw new Error("seatlayer: select at least one seat");H(this,I,re).call(this,{kind:"pending",message:"Confirming this selection across every occurrence.",operationId:t},!0);try{let i=await w(this,ne).hold(e,t),s=await w(this,ne).waitForTerminal(t,i,w(this,Fe).signal);return H(this,I,xi).call(this,s)}catch(i){throw H(this,I,dt).call(this,i,t),i}}async restoreOperation(e){H(this,I,Ot).call(this),H(this,I,re).call(this,{kind:"pending",message:"Restoring your Season selection.",operationId:e},!0);try{let t=await w(this,ne).waitForTerminal(e,void 0,w(this,Fe).signal);return t.state==="aborted"||t.state==="expired"?(L(this,Se,null),w(this,se).onHoldChange?.(null),H(this,I,re).call(this,{kind:"released",message:"The previous Season selection is no longer held.",operationId:e}),null):H(this,I,xi).call(this,t)}catch(t){throw H(this,I,dt).call(this,t,e),t}}async release(e){H(this,I,Ot).call(this);let t=w(this,Se)?.operationId;if(t){if(!e)throw new Error("seatlayer: caller-stable release action id is required");H(this,I,re).call(this,{kind:"pending",message:"Releasing the Season selection.",operationId:t},!0);try{let i=await w(this,ne).release(t,e),s=await w(this,ne).waitForTerminal(t,i,w(this,Fe).signal);if(s.state==="partial_terminal"){H(this,I,xi).call(this,s);return}L(this,Se,null),w(this,se).onHoldChange?.(null),H(this,I,re).call(this,{kind:"released",message:"The Season selection was released.",operationId:t})}catch(i){throw H(this,I,dt).call(this,i,t),i}}}async createRenewalIntent(e){if(H(this,I,Ot).call(this),!e.startsWith("sro_"))throw new Error("seatlayer: Season renewal offer id is required");H(this,I,re).call(this,{kind:"pending",message:"Recording renewal intent. No purchase is made in the browser."},!0);try{let t=await w(this,ne).renewalIntent(e);return H(this,I,re).call(this,{kind:"renewal_intent",message:"Renewal intent recorded. Your ticketing platform will confirm price, payment, and the final renewal."}),w(this,se).onRenewalIntent?.(t),t}catch(t){throw H(this,I,dt).call(this,t),t}}getDescriptor(){return w(this,ke)}getAvailability(){return w(this,je)}getHandoff(){return w(this,Se)}destroy(){w(this,pt)||(L(this,pt,!0),w(this,Fe).abort(),w(this,ne).destroy(),w(this,Ve).replaceChildren(),L(this,De,null),L(this,$e,null),L(this,ke,null),L(this,je,null),L(this,Se,null))}};se=new WeakMap,Ve=new WeakMap,It=new WeakMap,ne=new WeakMap,Fe=new WeakMap,ke=new WeakMap,je=new WeakMap,Se=new WeakMap,De=new WeakMap,$e=new WeakMap,pt=new WeakMap,I=new WeakSet,Qn=function(){w(this,Ve).replaceChildren();let e=document.createElement("section");e.className="sl-season-root",e.setAttribute("aria-label","Season ticket selection");let t=document.createElement("div");t.className="sl-season-card";let i=document.createElement("h2");i.textContent="Season";let s=document.createElement("p");s.className="sl-season-summary",s.textContent="Every included occurrence is part of this selection.";let n=document.createElement("p");n.className="sl-season-status",n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),t.append(i,s),e.append(t,n),w(this,Ve).append(e),L(this,De,e),L(this,$e,n)},Xn=function(){let e=w(this,ke),t=w(this,je),i=w(this,De).querySelector(".sl-season-card");i.replaceChildren();let s=document.createElement("h2");s.textContent=e.name;let n=document.createElement("p");n.className="sl-season-summary",n.textContent=`One fixed plan includes all ${e.occurrenceCount} occurrences.`;let o=document.createElement("details"),a=document.createElement("summary");a.textContent=`All ${e.occurrenceCount} occurrences included`;let l=document.createElement("ol");l.className="sl-season-list";for(let h of e.occurrences){let p=document.createElement("li");p.textContent=ll(h,e.timezone),l.append(p)}o.append(a,l);let c=document.createElement("p");c.className="sl-season-availability",c.textContent=`${t.freeCount} seat${t.freeCount===1?"":"s"} available for every occurrence`,i.append(s,n,o,c)},xi=function(e){let t=Wn(w(this,ke),e);return L(this,Se,t),w(this,se).onHoldChange?.(t),e.state==="committed"||e.state==="booked"?(H(this,I,re).call(this,{kind:"held",message:"Your seats are held for every included occurrence.",operationId:e.operationId}),w(this,se).onHold?.(t),w(this,se).onContinue?.(t)):e.state==="partial_terminal"?H(this,I,re).call(this,{kind:"partial_terminal",message:"This Season selection needs organizer review. Do not try another selection.",operationId:e.operationId}):H(this,I,re).call(this,{kind:"failed",message:"The Season selection could not be completed.",operationId:e.operationId}),t},re=function(e,t=!1){w(this,$e)&&(w(this,$e).textContent=e.message,w(this,$e).dataset.kind=e.kind),w(this,De)&&(w(this,De).dataset.busy=String(t)),w(this,se).onStatusChange?.(e)},dt=function(e,t){let i=e instanceof he?`Season selection unavailable (${e.code}).`:"Season selection could not be completed.";H(this,I,re).call(this,{kind:"failed",message:i,operationId:t}),w(this,se).onError?.(e)},cr=function(){if(w(this,pt))throw new Error("seatlayer: SeasonPicker was destroyed")},Ot=function(){if(H(this,I,cr).call(this),!w(this,ke))throw new Error("seatlayer: render SeasonPicker before using it")};function Zn(r,e={}){let t=e.origin??"";if(!t)try{t=new URL(r.src,window.location.href).origin}catch{t=""}let i=!1,s=null,n=null,o=null,a="",l=null,c=()=>{if(i)return;i=!0,s=r.getAttribute("style"),Object.assign(r.style,{position:"fixed",inset:"0",width:"100vw",height:"100vh",margin:"0",border:"0",zIndex:"2147483000",background:"#101625"});let d=document.documentElement;n=d.style.overflow,d.style.overflow="hidden",document.body&&(o=document.body.style.overflow,document.body.style.overflow="hidden"),l=u=>{u.key==="Escape"&&h()},window.addEventListener("keydown",l)},h=()=>{i&&(i=!1,s===null?r.removeAttribute("style"):r.setAttribute("style",s),s=null,a&&(r.style.height=a),n!==null&&(document.documentElement.style.overflow=n,n=null),o!==null&&document.body&&(document.body.style.overflow=o,o=null),l&&(window.removeEventListener("keydown",l),l=null))},p=d=>{if(d.source!==r.contentWindow||t&&d.origin!==t||!d.data||typeof d.data!="object")return;let u=d.data;if(u.type==="seatlayer:height"){typeof u.px=="number"&&Number.isFinite(u.px)&&u.px>0&&(a=`${Math.round(u.px)}px`,i||(r.style.height=a));return}u.type==="seatlayer:fullscreen"&&(u.on===!0?c():u.on===!1&&h())};return window.addEventListener("message",p),()=>{window.removeEventListener("message",p),h()}}0&&(module.exports={ApiError,BuyerAccessContext,BuyerAccessUnavailableError,BuyerRealtimeClient,EmbeddedDesigner,PerformanceGroupDestroyedError,PerformanceGroupPicker,SEATING_CHART_CALLBACK_PROPS,SEATING_CHART_HANDLE_METHODS,SEATING_CHART_IDENTITY_PROPS,SEATING_CHART_VALUE_PROPS,SeasonApiError,SeasonPicker,SeasonRecoveryTimeoutError,SeatPicker,SeatingChart,attachPickerFrame,bindSeatingChartHandle,buildSeatingChartOptions,createBuyerAccessContext,createControllerSink,parseTicketOfferAvailability,shortOperationReference,ticketOfferPrices});
|