@seatlayer/js 0.106.1 → 0.106.2
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/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -182,7 +182,7 @@ textarea.sl-hco-input{min-height:76px;resize:vertical}
|
|
|
182
182
|
.sl-hco-order:not([data-open]) .sl-hco-order-full{display:none}
|
|
183
183
|
.sl-hco-order{padding-top:0}
|
|
184
184
|
}
|
|
185
|
-
`;Fs=3,vh=1,wh=400,xh=3e3;Ds="http://www.w3.org/2000/svg";gt={back:["M12.5 4.5 7 10l5.5 5.5"],clock:["M10 2.8a7.2 7.2 0 1 1 0 14.4a7.2 7.2 0 1 1 0-14.4","M10 6.2V10l2.6 1.7"],down:["m5 7.5 5 5 5-5"],lock:["M4.2 8.8h7.6a1.4 1.4 0 0 1 1.4 1.4v4.4a1.4 1.4 0 0 1-1.4 1.4H4.2a1.4 1.4 0 0 1-1.4-1.4v-4.4a1.4 1.4 0 0 1 1.4-1.4z","M5.4 8.8V6.6a2.6 2.6 0 0 1 5.2 0v2.2"],hour:["M12 3a9 9 0 1 1 0 18a9 9 0 1 1 0-18","M12 7v5l3 2"],seat:["M6 11V6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5M4 11h16v4H4zM6 15v4M18 15v4"],card:["M5 5.5h14a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2z","M3 10h18M7 15h3"],alert:["M12 3a9 9 0 1 1 0 18a9 9 0 1 1 0-18","M12 7.5v5.5M12 16.5v.1"]},Sh=12e4});var Bf={};us(Bf,{ApiError:()=>ie,BuyerAccessContext:()=>De,BuyerAccessUnavailableError:()=>he,BuyerRealtimeClient:()=>Ze,EmbeddedDesigner:()=>bo,PerformanceGroupDestroyedError:()=>ye,PerformanceGroupPicker:()=>Fo,SEATING_CHART_CALLBACK_PROPS:()=>kr,SEATING_CHART_HANDLE_METHODS:()=>vr,SEATING_CHART_IDENTITY_PROPS:()=>wr,SEATING_CHART_VALUE_PROPS:()=>xr,SeasonApiError:()=>ee,SeasonPicker:()=>zo,SeasonPublicSessionRefused:()=>mn,SeasonRecoveryTimeoutError:()=>bn,SeatPicker:()=>lt,SeatingChart:()=>go,attachPickerFrame:()=>Tp,bindSeatingChartHandle:()=>kl,buildSeatingChartOptions:()=>Sl,createBuyerAccessContext:()=>gi,createControllerSink:()=>ri,parseTicketOfferAvailability:()=>vo,prewarmSeatPicker:()=>Jd,shortOperationReference:()=>Ii,ticketOfferPrices:()=>Cr});module.exports=Rp(Bf);var ae=require("@seatlayer/core");var Ip=/^[0-9A-Za-z.+-]{1,24}$/,Op=Ip.test("0.106.1")?"0.106.1":"",_p={host:"web",platform:"web",bundle:Op,protocol:0,chromeOwner:"web"},Np={..._p},Cn=null,gs=null;function Dp(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():0}function Bp(){let i=e=>Math.max(0,Math.round(e*100)/100);return{bootMs:i(Dp()),documentMs:Cn==null?0:i(Cn),handshakeMs:Cn==null||gs==null?0:i(gs-Cn)}}function bs(){let{host:i,platform:e,bundle:t,protocol:n,chromeOwner:o}=Np,r=Bp();return{host:i,platform:e,...t?{bundle:t}:{},...n?{protocol:n}:{},chromeOwner:o,bootMs:r.bootMs,documentMs:r.documentMs,handshakeMs:r.handshakeMs}}var ys=new Set,vs=new Map;function ot(i){return ys.has(i)?"repeat":"cold"}function An(i){let e=ot(i);return ys.add(i),e}function Be(i){return typeof i=="number"&&Number.isFinite(i)&&i>=0?Math.round(i):0}function Wi(){return typeof location>"u"?!1:/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(location.hostname)}function Fp(i){if(!/^[A-Za-z0-9_-]{1,80}$/.test(i.event))return null;let e=i.performanceProfile??{};return{event:i.event,scope:i.scope,surface:i.surface,outcome:i.outcome,stage:i.stage?.slice(0,32)??"",ms:Be(i.ms),api:Be(e.loadChartAndStatuses)||Be(e.loadChart),scene:Be(e.buildScene),panel:Be(e.buildBuyerControls),paint:Be(e.firstPaint),normalize:Be(e.normalizeBuyerModel),renderer:Be(e.createRenderer),seats:Be(i.seats),floors:Be(i.floors),view:i.view??"map",load:i.load??ot(i.event),transport:i.transport??"pubapi",...bs(),availabilityMs:Be(e.loadStatuses),...typeof i.revealWaitMs=="number"?{revealWaitMs:Be(i.revealWaitMs)}:{},...typeof i.handoverMs=="number"?{handoverMs:Be(i.handoverMs)}:{},mounts:(vs.get(i.event)??0)+1,reconnects:Be(i.reconnects)}}var Vp=new Set;function Qe(i){let e=Fp(i);if(e){vs.set(i.event,e.mounts);for(let t of Vp)try{t(e)}catch{}typeof fetch>"u"||Wi()||fetch(`${i.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 $p="realtime.fallback_polling",ws=new Set;function zp(i){let e=/^(wss?):\/\/([^/]+)(.*?)\/pub\/events\/([^/?#]+)\/subscribe(?:[?#]|$)/.exec(i);if(!e)return null;let t;try{t=decodeURIComponent(e[4])}catch{return null}return/^[A-Za-z0-9_-]{1,80}$/.test(t)?{apiBase:`${e[1]==="wss"?"https":"http"}://${e[2]}${e[3]}`,eventKey:t}:null}function xs(i){let e=zp(i);return!e||ws.has(e.eventKey)||(ws.add(e.eventKey),typeof fetch>"u"||Wi())?!1:(fetch(`${e.apiBase}/pub/telemetry/client-error`,{method:"POST",headers:{"Content-Type":"application/json","X-SeatLayer-Client":"1"},body:JSON.stringify({surface:"picker",errorCode:$p,eventKey:e.eventKey}),credentials:"omit",keepalive:!0}).catch(()=>{}),!0)}var It="seatlayer.v1",ks="\0",Ss=4401,jp=15e3,Kp=25e3,Gp=1e4,Ts=5e3,Up=3,qp=15e3,Es=6e4;function Wp(i){let e=typeof i.default=="string"?i.default:"free",t={};if(i.seats&&typeof i.seats=="object")for(let[n,o]of Object.entries(i.seats))typeof o=="string"&&o!==e&&(t[n]=o);return{default:e,exceptions:t}}function Yp(i,e){if(!i||i.default!==e.default)return null;let t=[];for(let[n,o]of Object.entries(e.exceptions))i.exceptions[n]!==o&&t.push({label:n,status:o});for(let n of Object.keys(i.exceptions))n in e.exceptions||t.push({label:n,status:e.default});return t}function Xp(i,e){for(let t of e)t.status===i.default?delete i.exceptions[t.label]:i.exceptions[t.label]=t.status}function Cs(i){if(/(?:^|[?&#])(?:token|access_token|bearer|authorization|ticket|tkt|bse)=/i.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL");if(/\bbse_[A-Za-z0-9._-]+/.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL")}var Ze=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.failedUpgrades=0;this.pollTimer=null;this.fellBack=!1;this.reconnectCount=0;this.opts=e,typeof e.url=="string"&&Cs(e.url)}get polling(){return this.pollTimer!==null}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(),this.stopPolling();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.failedUpgrades=0,this.start()}async connect(){if(this.stopped)return;let e=[It];if(this.opts.mintTicket){let a;try{a=await this.opts.mintTicket()}catch(l){this.reportIfAccessError(l),this.scheduleReconnect();return}if(this.stopped)return;a?.protocols?.length?(e=[...a.protocols],e.includes(It)||e.unshift(It)):a?.ticket&&(e=[It,`tkt.${a.ticket}`])}let t=this.version!==null;t&&e.push(`sv.${this.version}`);let n=typeof this.opts.url=="function"?this.opts.url():this.opts.url,o=this.useQueryMarker?`${n}${n.includes("?")?"&":"?"}pv=1`:n;Cs(o);let r;try{r=(this.opts.socketFactory??((l,c)=>new WebSocket(l,c)))(o,e)}catch{this.upgradeFailed(),this.scheduleReconnect();return}this.ws=r;let s=!1;r.onopen=()=>{this.ws===r&&(s=!0,this.attempt=0,this.failedUpgrades=0,this.stopPolling(),this.v1=r.protocol===It,this.v1||(this.useQueryMarker=!0),this.startKeepalive(r),t?this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync()},Ts):this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync({reason:"connect"})},Ts))},r.onmessage=a=>{if(this.ws!==r)return;let l;try{l=JSON.parse(typeof a.data=="string"?a.data:"")}catch{return}!l||typeof l!="object"||this.handleFrame(l)},r.onclose=a=>{if(this.ws===r){if(this.ws=null,this.clearTimers(),!s&&a?.code!==Ss&&this.upgradeFailed(),a?.code===Ss){if(a.reason==="access_expired"){this.scheduleReconnect();return}if(a.reason==="idle_expired"&&this.opts.onIdleExpired){this.stopped=!0,this.stopPolling(),this.opts.onIdleExpired();return}this.stopped=!0,this.stopPolling(),this.opts.onAccessUnavailable?.({reason:"revoked",code:"access_revoked",retryable:!1});return}this.scheduleReconnect()}},r.onerror=()=>{try{r.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 n=Array.isArray(e.hidden)?e.hidden:[],o=Array.isArray(e.closed)?e.closed:[],r=n.join(ks),s=o.join(ks);(r!==this.hidden||s!==this.closedSections)&&(this.hidden=r,this.closedSections=s,this.opts.sink.onSections?.(n,o,{withInventory:t==="snapshot"||!!e.seats}))}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 n=Wp(e),o=Yp(this.projection,n);this.projection=n,o===null?this.opts.sink.applyProjection?this.opts.sink.applyProjection(n):this.opts.sink.resync():o.length&&this.opts.sink.applyStatuses(o);return}if(t==="delta"&&Array.isArray(e.changes)){this.answered();let n=e.changes.filter(o=>typeof o?.label=="string"&&typeof o?.status=="string").map(o=>({label:o.label,status:o.status}));if(!n.length)return;this.projection&&Xp(this.projection,n),this.opts.sink.applyStatuses(n)}}}}answered(){this.resumeTimer&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}reportIfAccessError(e){let t=e?.reason;e?.name==="BuyerAccessUnavailableError"&&(this.stopped=!0,this.stopPolling(),this.opts.onAccessUnavailable?.({reason:t??"invalid",code:e.code,status:e.status,retryable:t==="paused"}))}upgradeFailed(){this.failedUpgrades+=1,this.failedUpgrades>=Up&&this.startPolling()}startPolling(){if(!(this.pollTimer||this.stopped)){if(!this.fellBack){this.fellBack=!0;try{this.opts.onFallbackPolling?.()}catch{}let e=typeof this.opts.url=="function"?this.opts.url():this.opts.url;xs(e)}this.pollTimer=setInterval(()=>{if(this.stopped){this.stopPolling();return}typeof document<"u"&&document.hidden||Promise.resolve().then(()=>this.opts.poll?this.opts.poll():this.opts.sink.resync({reason:"frame"})).catch(()=>{})},qp)}}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}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{}},Gp)}},Kp)}scheduleReconnect(){if(this.stopped||this.reconnectTimer)return;let e=Math.min(this.attempt++,5),t=Math.min(1e3*2**e,jp),n=this.pollTimer?Es/2+Math.random()*Es/2:Math.random()*t;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.reconnectCount+=1,this.connect()},n)}get reconnects(){return this.reconnectCount}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 Qp(i){return i==="blocked"?"not_for_sale":i==="held"||i==="booked"||i==="free"||i==="not_for_sale"?i:"free"}function ri(i,e={}){let t=n=>{let o=i.tableSelection(n);if(o)return o.physicalSeatIds;let r=i.idForLabel(n);return r?[r]:[]};return{applyStatuses(n){let o=new Set([...i.currentHold()?.labels??[],...e.ownLabels?.()??[]]),r={free:[],held:[],booked:[],not_for_sale:[]},s=[],a=[],l=new Map(i.getSelection().map(c=>[c.label,c.id]));for(let c of n){let d=t(c.label);if(!d.length)continue;let p=Qp(c.status);if(r[p].push(...d),e.flashOnLiveChange&&p!=="free"&&!o.has(c.label)&&d.some(u=>i.getStatus(u)==="free")){let u=p==="held"?"#f4b740":"#f43f5e";for(let h of d)s.push({id:h,color:u})}p!=="free"&&!o.has(c.label)&&l.has(c.label)&&a.push(c.label)}for(let c of["free","held","booked","not_for_sale"])r[c].length&&i.setStatus(r[c],c);for(let c of s)i.flashSeat(c.id,c.color);if(a.length){let c=a.flatMap(p=>t(p));c.length&&i.deselect(c);let d=n.some(p=>p.status==="blocked"&&a.includes(p.label));e.onSelectedObjectUnavailable?.(a,d?"ineligible":"taken")}e.onStatusChange?.()},...i.applyProjection?{applyProjection:n=>{i.applyProjection(n)}}:{},async resync(n){await(i.resync?i.resync(n):i.refresh())},onSections(n,o,r){r?.withInventory||(i.resync?i.resync({reason:"frame"}):i.refresh()),e.onSections?.(n,o,r)}}}var ie=class extends Error{constructor(e,t,n,o,r,s,a,l){super(t),this.name="ApiError",this.status=e,this.code=n,this.conflicts=o,this.reason=r,this.retryAfterS=s,this.notice=a,l?.fields&&(this.fields=l.fields),typeof l?.retryable=="boolean"&&(this.retryable=l.retryable),l?.hint&&(this.hint=l.hint),l?.serverMessage&&(this.serverMessage=l.serverMessage)}},As=10,Ps=1;function Yi(i,e){let t=(i??"").trim();if(t){let n=Number(t);if(Number.isFinite(n)&&n>=0)return Math.ceil(n);let o=Date.parse(t);if(Number.isFinite(o))return Math.max(0,Math.ceil((o-Date.now())/1e3))}if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return Math.ceil(e)}function Zp(i){let e=i;return!!e&&typeof e.ticketKey=="string"&&typeof e.label=="string"&&Number.isFinite(e.unitIndex)&&Number.isFinite(e.quantity)&&(e.displayLabel===void 0||typeof e.displayLabel=="string")}var Jp={seat_conflict:"taken",conflict:"taken",channel_assignment_conflict:"ineligible",allocation_exhausted:"exhausted"};function eh(){return typeof crypto>"u"?null:typeof crypto.randomUUID=="function"?crypto.randomUUID():typeof crypto.getRandomValues!="function"?null:Array.from(crypto.getRandomValues(new Uint8Array(18)),i=>i.toString(16).padStart(2,"0")).join("")}function th(i,e){let t=e.map(n=>[n.label,n.tierId??null,n.quantity??null]).sort((n,o)=>n[0]<o[0]?-1:n[0]>o[0]?1:0);return JSON.stringify([i,t])}function ih(i){return i instanceof ie?i.status===408||i.status===429||i.status>=500:!0}function Ms(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`viewer_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`}var ft=class{constructor(e,t={}){this.base=e;this.viewerId=Ms();this.holdAttempt=null;this.holdIdempotency=!0;this.ticketKeysByHold=new Map;this.access=t.access,this.onObjectUnavailable=t.onObjectUnavailable;let n=t.referral?.trim();this.referral=n?n.slice(0,120):void 0}rotateViewerId(){this.viewerId=Ms()}async pickerIdleMinutes(){return null}get accessScoped(){return!!this.access?.configured}async request(e,t={},n={}){let o=t.method??"GET",r={},s;t.body!==void 0&&(r["Content-Type"]="application/json",s=JSON.stringify(t.body));let a=await this.access?.authorization(n.auth?"unauthorized":"initial");if(a&&(r.Authorization=a),t.idempotency){let u=this.holdAttemptKey(`${t.idempotency.binding}\0${a??""}`);t.idempotency.used(u??void 0),u&&(r["Idempotency-Key"]=u)}let l=o==="GET"||e.endsWith("/hold/resume")?new AbortController:null,c=l?setTimeout(()=>l.abort(),4e4):null,d,p;try{d=await fetch(`${this.base}${e}`,{method:o,headers:r,body:s,credentials:"omit",...l?{signal:l.signal}:{}}),p=(d.headers.get("content-type")??"").includes("application/json")?await d.json().catch(h=>{if(l?.signal.aborted)throw h;return null}):null}finally{c!==null&&clearTimeout(c)}if(!d.ok){let u=p,h=u?.code??u?.error,b=d.status===401&&h==="buyer_access_invalid"&&e.endsWith("/hold/resume");if(this.access?.configured&&!b&&(d.status===401||d.status===403||d.status===422)&&await this.access.handleFailure(d.status,h)&&!n.auth)return this.request(e,t,{...n,auth:!0});if(d.status===409){let T=h?Jp[h]:void 0,w=u?.conflicts?.map(v=>v.label)??t.labels??[];T&&this.onObjectUnavailable?.({labels:w,reason:T,code:h})}let g;if(d.status===429&&(g=Yi(d.headers.get("Retry-After"),u?.retryAfterSeconds)??Ps,o==="GET"&&!n.rateLimit&&g<=As))return await new Promise(T=>setTimeout(T,g*1e3)),this.request(e,t,{...n,rateLimit:!0});throw d.status===503&&(g=Yi(d.headers.get("Retry-After"),u?.retryAfterSeconds)),new ie(d.status,u?.error??`request_failed_${d.status}`,h,u?.conflicts,u?.reason,g,typeof u?.notice=="string"&&u.notice?u.notice:void 0,{...Array.isArray(u?.fields)?{fields:u.fields}:{},...typeof u?.retryable=="boolean"?{retryable:u.retryable}:{},...typeof u?.hint=="string"&&u.hint?{hint:u.hint}:{},...typeof u?.message=="string"&&u.message?{serverMessage:u.message}:{}})}return p}async requestBlob(e,t={}){let n={},o=await this.access?.authorization(t.auth?"unauthorized":"initial");o&&(n.Authorization=o);let r=await fetch(`${this.base}${e}`,{method:"GET",headers:n,credentials:"omit"});if(r.ok)return r.blob();let a=(r.headers.get("content-type")??"").includes("application/json")?await r.json().catch(()=>null):null,l=a?.code??a?.error;if(this.access?.configured&&(r.status===401||r.status===403||r.status===422)&&await this.access.handleFailure(r.status,l)&&!t.auth)return this.requestBlob(e,{...t,auth:!0});let c;if(r.status===429&&(c=Yi(r.headers.get("Retry-After"),a?.retryAfterSeconds)??Ps,!t.rateLimit&&c<=As))return await new Promise(d=>setTimeout(d,c*1e3)),this.requestBlob(e,{...t,rateLimit:!0});throw new ie(r.status,a?.error??`request_failed_${r.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 ie(404,"not_found","not_found"))}async objects(e){return{...await this.request(`/pub/events/${encodeURIComponent(e)}/objects?compact=1`),fetchedAt:Date.now()}}hold(e,t,n,o){let r=`/pub/events/${encodeURIComponent(e)}/hold?pricingContract=matrix-v1`,s={method:"POST",body:{selections:t,...n?{ttlMs:n}:{},...o?{replaceHoldId:o}:{},...this.referral?{referral:this.referral}:{}},labels:t.map(l=>l.label)};return(o||!this.holdIdempotency?this.request(r,s):this.keyedHold(r,s,th(e,t))).then(l=>this.noteTicketKeys(l,o))}holdAttemptKey(e){if(this.holdAttempt?.binding===e)return this.holdAttempt.key;let t=eh();return this.holdAttempt=t?{binding:e,key:t}:null,t}endHoldAttempt(e){e&&this.holdAttempt?.key===e&&(this.holdAttempt=null)}async keyedHold(e,t,n,o=!1){let r;try{let s=await this.request(e,{...t,idempotency:{binding:n,used:a=>{r=a}}});return this.endHoldAttempt(r),s}catch(s){if(ih(s))throw s;this.endHoldAttempt(r);let a=s.code;if(a==="idempotency_key_reused"&&!o)return this.keyedHold(e,t,n,!0);if(a==="invalid_idempotency_key")return this.holdIdempotency=!1,this.request(e,t);throw s}}noteTicketKeys(e,t){if(t&&this.ticketKeysByHold.delete(t),!e?.holdId)return e;let n=Array.isArray(e.ticketKeys)&&e.ticketKeys.every(r=>typeof r=="string")?[...e.ticketKeys]:null,o=Array.isArray(e.ticketKeyDetails)&&e.ticketKeyDetails.every(Zp)?e.ticketKeyDetails.map(({ticketKey:r,label:s,unitIndex:a,quantity:l,displayLabel:c})=>({ticketKey:r,label:s,unitIndex:a,quantity:l,...c?{displayLabel:c}:{}})):null;return n||o?this.ticketKeysByHold.set(e.holdId,{...n?{ticketKeys:n}:{},...o?{ticketKeyDetails:o}:{}}):this.ticketKeysByHold.delete(e.holdId),e}ticketKeysFor(e){let t=this.ticketKeysByHold.get(e);return t?{...t}:null}bestAvailable(e,t,n,o,r){return this.request(`/pub/events/${encodeURIComponent(e)}/best-available?pricingContract=matrix-v1`,{method:"POST",body:{qty:t,...n?{categoryKey:n}:{},...o?{zoneId:o}:{},...r?{ttlMs:r}:{},...this.referral?{referral:this.referral}:{}}}).then(s=>this.noteTicketKeys(s))}resume(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/hold/resume`,{method:"POST",body:{holdId:t}}).then(n=>this.noteTicketKeys(n))}release(e,t,n){return this.holdAttempt=null,this.request(`/pub/events/${encodeURIComponent(e)}/release`,{method:"POST",body:{labels:t,holdId:n}}).then(o=>{let r=this.ticketKeysByHold.get(n);if(r){let s=new Set(o?.released??t);this.ticketKeysByHold.set(n,{...r.ticketKeys?{ticketKeys:r.ticketKeys.filter(a=>!s.has(a))}:{},...r.ticketKeyDetails?{ticketKeyDetails:r.ticketKeyDetails.filter(a=>!s.has(a.ticketKey))}:{}})}return o})}extend(e,t,n){return this.request(`/pub/events/${encodeURIComponent(e)}/extend`,{method:"POST",body:{holdId:t,...n?{ttlMs:n}:{}}})}paymentOptions(e){return this.request(`/pub/events/${encodeURIComponent(e)}/payment-options`)}availability(e,t=!1){return this.request(`/pub/events/${encodeURIComponent(e)}/availability?pricingContract=matrix-v1${t?"&live=1":""}`)}startCheckout(e,t){return this.holdAttempt=null,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"),n=new URLSearchParams({surface:"picker",viewerId:this.viewerId});return`${t}/pub/events/${encodeURIComponent(e)}/subscribe?${n}`}socketUrl(e){return this.accessScoped?"":this.subscribeUrl(e)}socketProtocols(e){return this.accessScoped?[]:[It]}createRealtime(e,t){return this.accessScoped?null:new Ze({url:this.subscribeUrl(e),sink:t})}};var Ji=require("@seatlayer/core");var Oe=require("@seatlayer/core"),ta=require("@seatlayer/core/core/seatConfidence");var Yo=require("@seatlayer/core"),Qi=require("@seatlayer/core/core/cdnAsset");var nh=/^data:image\/(?:png|jpe?g|webp|gif|avif);base64,[a-z0-9+/]+={0,2}$/i,oh=/[\s"'<>`\\]/;function rh(i){return i.startsWith("//")?!1:i.startsWith("/")||i.startsWith("./")||i.startsWith("../")}function sh(){try{let i=typeof location>"u"?"":location.origin;return i&&i!=="null"?i:null}catch{return null}}function si(i){if(typeof i!="string"||!i||i.length>2e6||i!==i.trim())return!1;if(i.startsWith("data:"))return nh.test(i);if(oh.test(i))return!1;let e=sh();if(rh(i)){if(!e)return!1;try{let t=new URL(i,e);return t.origin===e&&!t.username&&!t.password}catch{return!1}}try{let t=new URL(i);return t.username||t.password?!1:t.protocol==="https:"||e!=null&&t.origin===e}catch{return!1}}var Ah=require("@seatlayer/core/core/cdnAsset");function y(i,e){let t=(0,Yo.t)(i);return t===i?e:t}function Nt(){return globalThis.matchMedia?.("(pointer: coarse)").matches??!1?y("picker.dragToLookTouch","Drag to look \xB7 pinch to zoom \xB7 tap \u2715 to close"):y("picker.dragToLookMouse","Drag to look \xB7 pinch or scroll to zoom \xB7 Esc to close")}function Ln(){return{rotate:y("picker.dragToRotateVenue","Drag to rotate the venue"),move:y("picker.dragToMoveVenue","Drag to move the venue"),zoomIn:y("picker.zoomIn","Zoom in"),zoomOut:y("picker.zoomOut","Zoom out"),fitView:y("picker.fitWholeVenue","Show whole venue")}}function Gs(i,e){let t=e?i.toLocaleUpperCase(e):i.toLocaleUpperCase(),n=e?i.toLocaleLowerCase(e):i.toLocaleLowerCase();if(i!==t||t===n)return i;let o=[...n][0]??"";return(e?o.toLocaleUpperCase(e):o.toLocaleUpperCase())+n.slice(o.length)}function Us(i){if(typeof i=="string"){let e=document.querySelector(i);if(!e)throw new Error(`seatmap: container "${i}" not found`);return e}if(!(i instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return i}function q(i){return String(i??"").replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function qs(i,e,t){let n=e.find(r=>si(r))??null;if(i.replaceChildren(),!n)return i.textContent=t.slice(0,1).toUpperCase(),null;let o=document.createElement("img");return o.alt="",o.referrerPolicy="no-referrer",o.src=n,i.appendChild(o),n}var ai=null;function Hn(){if(ai!==null)return ai;try{if(typeof document>"u")return ai=!1;ai=!!document.createElement("canvas").getContext("webgl2")}catch{ai=!1}return ai}var Xi=null;function Zi(){return Xi||(Xi=(typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?(0,Qi.importCdnAsset)("seatlayer-view3d.mjs"):import("@seatlayer/core/view3d")).catch(e=>{throw Xi=null,e}),Xi)}function Rn(){(typeof navigator>"u"?void 0:navigator.connection)?.saveData||Zi().catch(()=>{})}async function In(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?(0,Qi.importCdnAsset)("seatlayer-panorama.mjs"):import("@seatlayer/core")}async function li(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?(0,Qi.importCdnAsset)("seatlayer-checkout.mjs"):Promise.resolve().then(()=>(js(),zs))}function Ws(i){return i==="unavailable_for_event"||i==="payments_off_for_event"?i:"not_configured"}function Ys(i){return i.lineItems.reduce((e,t)=>e+t.quantity,0)}function Xo(i,e){if(i.objectType!=="ga")return i.displayLabel??i.label;let t=e.find(n=>n.id===i.objectId);return i.displayLabel??t?.displayLabel??t?.label??y("picker.generalAdmission","General admission")}function Eh(i,e){let t=new Map;for(let n of i){let o=n.rowLabel&&n.seatNumber?[n.sectionLabel,`${y("picker.row","Row")} ${n.rowLabel}`,`${y("picker.seat","Seat")} ${n.seatNumber}`].filter(Boolean).join(" \xB7 "):Xo(n,e),r=[n.categoryLabel,n.tierLabel].filter(Boolean).join(" \xB7 "),s=Math.max(1,Math.floor(n.quantity||1)),a=`${o}\0${r}`,l=t.get(a)??{label:o,detail:r,units:0,amount:0};l.units+=s,l.amount+=n.unitPrice*s,t.set(a,l)}return[...t.values()].map(n=>({label:n.units>1?`${n.label} \xD7${n.units}`:n.label,...n.detail?{detail:n.detail}:{},amount:n.amount}))}var Ks=(i,e,t)=>(0,Yo.t)("picker.bookingForm.guestOfCount",{label:i,index:e,total:t});function Ch(i,e,t=[]){let n=new Map,o=[];for(let d of i.lineItems){let p=Xo(d,t),u=Math.max(1,Math.floor(d.quantity)||1);if(d.objectType!=="ga"&&!(d.objectType==="table"&&u>1)){o.push({key:d.label,name:p,unitIndex:1,quantity:1});continue}for(let h=1;h<=u;h+=1){let b=(n.get(d.label)??0)+1;n.set(d.label,b),o.push({key:`${d.label}#${b}`,name:p,unitIndex:h,quantity:u})}}let r=e?.ticketKeyDetails??[],s=e?.ticketKeys??r.map(d=>d.ticketKey),a=(s.length===o.length?s:o.map(d=>d.key)).map(d=>{let p=o.find(h=>h.key===d),u=r.find(h=>h.ticketKey===d);return{key:d,name:u?.displayLabel??p?.name,unitIndex:u?.unitIndex??p?.unitIndex??1,quantity:u?.quantity??p?.quantity??1}}),l=new Map;for(let d of a)d.name&&d.quantity<=1&&l.set(d.name,(l.get(d.name)??0)+1);let c=new Map;return a.map(({key:d,name:p,unitIndex:u,quantity:h})=>{if(!p)return{key:d};if(h>1)return{key:d,title:Ks(p,u,h)};let b=(c.get(p)??0)+1;c.set(p,b);let g=l.get(p)??1;return{key:d,title:g>1?Ks(p,b,g):p}})}function Xs(i,e,t,n,o=[]){let r=new Map;for(let s of i.lineItems){let a=Xo(s,o);r.set(a,(r.get(a)??0)+1)}return{kind:"pay",provider:e,order:{holdId:i.holdId,expiresAt:i.expiresAt,currency:i.currency,total:i.total,labels:[...r].map(([s,a])=>a>1?`${s} \xD7${a}`:s),tickets:Ch(i,n,o),lines:Eh(i.lineItems,o)},bookingForm:t?.bookingForm??null,...t?.bookingMode==="free"?{free:!0}:{}}}function Qs(i){return String(i?.code).startsWith("booking_form_")}function On(i,e,t){let n={month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},o=new Date(i);if(e)try{return o.toLocaleString(t,{...n,timeZone:e})}catch{}return o.toLocaleString(t,n)}function Qo(i){return/early[\s-]*bird/i.test(i?.trim()??"")}function Zs(i){return Qo(i)?'<svg class="sl-offer-icon sl-offer-icon-discount" viewBox="0 0 32 32" aria-hidden="true"><defs><linearGradient id="sl-offer-discount-gradient" x1="29.492" y1="0" x2="20.028" y2="36.183" gradientUnits="userSpaceOnUse"><stop stop-color="#FD6D00"/><stop offset="1" stop-color="#F8B302"/></linearGradient></defs><path d="M16 22.751a1.071 1.071 0 1 0 0-2.142 1.071 1.071 0 0 0 0 2.142ZM16 11.39a1.071 1.071 0 1 0 0-2.141 1.071 1.071 0 0 0 0 2.141Z" fill="url(#sl-offer-discount-gradient)"/><path d="M31.137.863A2.928 2.928 0 0 0 29.054 0H17.836c-.787 0-1.527.307-2.083.863L.863 15.753A2.93 2.93 0 0 0 0 17.836c0 .787.307 1.527.863 2.083l11.218 11.218A2.927 2.927 0 0 0 14.164 32c.787 0 1.527-.307 2.083-.863l14.89-14.89A2.928 2.928 0 0 0 32 14.164V2.946c0-.788-.307-1.527-.863-2.083ZM16 7.374a2.946 2.946 0 1 1 0 5.891 2.946 2.946 0 0 1 0-5.891Zm0 17.252a2.946 2.946 0 1 1 0-5.891 2.946 2.946 0 0 1 0 5.891Zm6.025-7.689H9.975a.938.938 0 0 1 0-1.875h12.05a.938.938 0 0 1 0 1.875Zm4.017-10.041a.938.938 0 1 1 0-1.875.938.938 0 0 1 0 1.875Z" fill="url(#sl-offer-discount-gradient)"/></svg>':'<svg class="sl-offer-icon sl-offer-icon-tag" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.6 13.6 13.7 20.5a2 2 0 0 1-2.8 0L3.5 13.1A2 2 0 0 1 3 11.7V4h7.7a2 2 0 0 1 1.4.6l8.5 8.5a.7.7 0 0 1 0 .5Z"/><circle cx="7.5" cy="8.5" r="1"/></svg>'}function _n(i,e){return`<span class="sl-offer-mark" role="img" aria-label="${e(i)}" title="${e(i)}">${Zs(i)}</span>`}function Nn(i,e){return`<span class="sl-offer-badge">${Zs(i)}<span>${e(i)}</span></span>`}function Js(i,e=Date.now()){let t=i-e;if(t<=0)return null;let n=Math.max(1,Math.ceil(t/6e4)),o=Math.floor(n/1440),r=Math.floor(n%1440/60),s=n%60;return`${(o>0?[`${o}d`,...r?[`${r}h`]:[]]:[...r?[`${r}h`]:[],...s||!r?[`${s}m`]:[]]).join(" ")} left`}function Zo(i){return String(i??"\u2014").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function L(i){return String(i??"").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function Jo(i){return i?(0,Oe.seatNoteRowModel)(i).map(e=>({...e,title:y(e.titleKey,e.titleFallback)})):[]}function ia(i){return Jo(i).map(e=>e.title)}function Dt(i,e={}){return er(Jo(i),e)}function er(i,e={}){if(!i.length)return"";let t=e.compact?15:17,n=i.map(o=>`<div class="sl-note sl-note-${L(o.tone)}"><span class="sl-note-i">${(0,Oe.seatTypeIconSvg)(o.icon,{size:t})}</span><span class="sl-note-t"><b>${L(o.title)}</b>`+(o.note?`<span class="sl-note-n">${L(o.note)}</span>`:"")+"</span></div>").join("");return`<div class="sl-notes${e.compact?" compact":""}">${n}</div>`}function na(i){return Jo(i).map(e=>{let t=L(e.note?`${e.title}: ${e.note}`:e.title);return`<span class="sl-cx-mark sl-cx-mark-${L(e.tone)}" role="img" aria-label="${t}" title="${t}">${(0,Oe.seatTypeIconSvg)(e.icon,{size:13})}</span>`}).join("")}function Dn(i){let e=[];return i?.restrictedView&&e.push(y("picker.restrictedView","Restricted view")),i?.obstructedView&&e.push(y("picker.obstructedView","Obstructed view")),e}function tr(i,e){if(!i)return"";let t=e?y("picker.viewFromThisSeat","View from this seat"):y("picker.seeItIn3d","See it in 3D"),n=e?y("picker.viewFromHere","View from here"):t;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>${n}</span></button>`}function oa(i,e){if(!e)return"";let t=e,n=t.includes(i.id),o=n?t.length>1?y("picker.openComparison","Open comparison"):y("picker.savedForComparison","Saved for comparison"):t.length?y("picker.compareWithSaved","Compare with saved"):y("picker.saveToCompare","Save to compare");return`<button type="button" class="sl-confirm-compare"${n&&t.length===1?" disabled":""}><span aria-hidden="true">\u21C4</span><span>${L(o)}</span></button>`}function ra(i,e,t){if(!t)return"";let n=(0,ta.seatConfidenceDisclosure)(i.confidenceEvidence),o=n.modeledTarget??n.reality;return`<button type="button" class="sl-confirm-confidence" aria-label="Open seat confidence passport for ${L(i.displayLabel??i.label)}"><span><em>${L(e)}</em><strong>${L(n.headline)}</strong><small>${L(o)}</small></span><b>Passport</b></button>`}function fe(i){let e=i?.rowLabel,t=i?.sectionLabel;if(!e||!t)return e;for(let n of["-"," ","\xB7","/","_"]){let o=`${t}${n}`;if(e.startsWith(o)&&e.length>o.length)return e.slice(o.length)}return(0,Oe.compactRowLabel)(e,t)}function Ph(i){switch(i){case"paused":return{title:y("picker.accessPausedTitle","These seats are on hold right now"),body:y("picker.accessPausedBody","The organizer has paused this selection. Try again in a few minutes."),action:y("picker.accessRetry","Try again")};case"revoked":return{title:y("picker.accessRevokedTitle","This access link is no longer active"),body:y("picker.accessRevokedBody","Ask whoever sent you here for a new link to keep booking these seats."),action:y("picker.accessRefresh","Refresh")};case"idle":return{title:y("picker.idlePausedTitle","Your session expired"),body:y("picker.idlePausedBody","You were away for a while. Refresh to see which seats are free now."),action:y("picker.idleRefresh","Show latest seats")};case"no_token":case"provider_failed":return{title:y("picker.accessExpiredTitle","The seat map timed out"),body:y("picker.accessExpiredBody","Any seats you\u2019re holding stay held. Refresh to see what\u2019s available now."),action:y("picker.accessRefresh","Refresh")};default:return{title:y("picker.accessInvalidTitle","We couldn\u2019t verify your access"),body:y("picker.accessInvalidBody","You can still book anything shown as available. Contact whoever sent you here for access to the rest."),action:y("picker.accessRefresh","Refresh")}}}var Mh=6;function sa(i,e,t){let n=Zo;return[i?.sectionLabel?`<div class="sl-confirm-field sl-confirm-sec${i.sectionLabel.length>Mh?" sl-confirm-sec-long":""}"><span class="sl-confirm-key">${y("picker.section","Section")}</span><span class="sl-confirm-value">${n(i.sectionLabel)}</span></div>`:"",i?.rowLabel||i?.objectType==="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${n(t)}</span><span class="sl-confirm-value">${n(fe(i)??i?.displayLabel??e)}</span></div>`:"",i?.objectType!=="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${y("picker.seat","Seat")}</span><span class="sl-confirm-value">${n(i?.seatNumber??i?.displayLabel??e)}</span></div>`:""].filter(Boolean).join("")}function aa(i,e,t){let n=Zo,o=i?.objectType==="booth",r=i?.objectType==="table"&&!!i?.bookingMode,s=o||r||!i?.seatNumber,a=i?.sectionLabel??(s?void 0:i?.displayLabel),l=r?`${y("picker.guests","Guests")} ${i?.bookingMode==="variable"?`${i?.minOccupancy}\u2013${i?.maxOccupancy}`:i?.capacity}`:void 0,d=(s?[l,a?i?.rowLabel??i?.displayLabel:void 0]:[i?.rowLabel?`${t} ${fe(i)??""}`.trim():void 0,`${y("picker.seat","Seat")} ${i?.seatNumber??e}`]).filter(Boolean).join(" \xB7 ");return(a?`<span class="sl-confirm-place">${n(a)}</span>`:"")+(d?`<span class="sl-confirm-pos">${a?" \xB7 ":""}${n(d)}</span>`:"")+(a||d?"":`<span class="sl-confirm-pos">${n(e)}</span>`)}function la(i,e){if(!i)return"";let t=e?y("picker.viewFromThisSeat","View from this seat"):y("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 ca(i,e){if(!i||e)return"";let t=y("picker.seeItIn3d","See it in 3D");return`<button type="button" class="sl-confirm-3drow" 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 ea(i){return i.buyerMessage?.trim()||(i.restriction==="companion"?y("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):void 0)}function Bn(i,e,t,n=()=>{}){let o=Zo;if(i.length>1)return`<fieldset class="sl-confirm-tiers"><legend><span>${y("picker.ticketType","Ticket type")}</span></legend>`+i.map(a=>{let l=ea(a),c=n(a);return`<button type="button" class="sl-confirm-tier" data-confirm-tier="${o(a.id)}"${c?` data-offer-name="${o(c)}"`:""} aria-pressed="${a.id===e}"><span class="sl-confirm-tier-copy"><span class="sl-confirm-tier-name">${o(a.name)}`+(c?`<span class="sl-confirm-tier-offer">${Nn(c,o)}</span>`:"")+"</span>"+(l?`<small class="sl-confirm-tier-note">${o(l)}</small>`:"")+`</span><span class="sl-confirm-tier-price">${o(t(a))}</span></button>`}).join("")+"</fieldset>";let r=i[0],s=r?ea(r):void 0;return s?`<p class="sl-confirm-tier-note">${o(s)}</p>`:""}function da(i){return'<div class="sl-confirm-grid">'+i.identityFields+`</div><div class="sl-confirm-cat"><span class="sl-confirm-cat-name">${L(i.categoryLabel)}</span>`+(i.priceLabel?`<span class="sl-confirm-price">${L(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-id">'+i.marker+`<span class="sl-confirm-dot" style="background:${L(i.categoryColor)}" aria-hidden="true"></span><span class="sl-sr">${L(i.categoryLabel)}</span><span class="sl-confirm-who">`+i.identity+"</span>"+(i.priceLabel?`<span class="sl-confirm-idprice">${L(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-body">'+i.commercial+i.tierChoices+i.groupDates+i.wheelchair+(i.thumb||i.see3dPill?`<div class="sl-confirm-strip">${i.thumb}<span class="sl-confirm-pills">${i.see3dPill}</span></div>`:"")+i.inspect+'<div class="sl-confirm-row">'+(i.see3dRow??"")+`<button type="button" class="sl-confirm-cancel">${L(i.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><span class="sl-confirm-add-t">${L(i.selectLabel)}</span></button></div></div>`}function pa(i,e){let t=q,{variable:n}=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(n?(0,Oe.t)("picker.flexiblePartyTypeWord",{typeWord:e.typeWord}):(0,Oe.t)("picker.wholeTypeWord",{typeWord:e.typeWord}))}</div><h2 class="sl-table-title" id="sl-table-title">${t(i.displayLabel??i.label)}</h2><p class="sl-table-copy" id="sl-table-copy">${t(n?y("picker.chooseGuestsCopy","Choose how many guests will sit together. This table is held exclusively for your party."):(0,Oe.t)("picker.allPlacesBookedTogether",{count:i.capacity}))}</p></div><div class="sl-table-body"><div class="sl-table-summary"><span>${t(e.categoryLabel)}</span>`+(e.suppressPricing?"":`<b data-table-unit>${t((0,Oe.t)("picker.perGuestPrice",{price:e.unitPrice}))}</b>`)+`<span class="muted">${t(y("picker.tableCapacity","Table capacity"))}</span><span>${t((0,Oe.t)("picker.guestsCount",{count:i.capacity}))}</span>`+(i.entrance?`<span class="muted">${t(y("picker.entrance","Entrance"))}</span><span>${t(i.entrance)}</span>`:"")+(e.suppressPricing?"":`<span class="muted">${t(y("picker.total","Total"))}</span><b data-table-total></b>`)+"</div>"+(n?`<label class="sl-table-qtylabel" id="sl-table-qty-label">${t(y("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(y("picker.fewerGuests","Fewer guests"))}">\u2212</button><output aria-live="polite" data-table-qty>${i.quantity}</output><button type="button" data-table-step="1" aria-label="${t(y("picker.moreGuests","More guests"))}">+</button></div><div class="sl-table-range">${t((0,Oe.t)("picker.chooseMinMaxGuests",{min:i.minOccupancy,max:i.maxOccupancy}))}</div>`:`<input type="hidden" data-table-qty value="${i.capacity}">`)+`<div class="sl-table-actions"><button type="button" class="sl-table-cancel">${t((0,Oe.t)("common.cancel"))}</button><button type="button" class="sl-table-confirm">${t(e.held?y("picker.updateTable","Update table"):n?y("picker.selectTable","Select table"):y("picker.selectWholeTable","Select whole table"))}</button></div></div></section>`}function ha(i,e){let t=Ph(i),n=document.createElement("div");n.className="sl-interrupt sl-access",n.setAttribute("role","status"),n.setAttribute("aria-live","polite");let o=document.createElement("div");o.className="sl-interrupt-card";let r=document.createElement("div");r.className="sl-interrupt-title",r.textContent=t.title;let s=document.createElement("div");s.className="sl-interrupt-body",s.textContent=t.body,o.append(r,s);let a=document.createElement("div");a.className="sl-interrupt-actions";let l=document.createElement("button");l.type="button",l.className="sl-interrupt-act";let c=document.createElement("span");c.className="sl-interrupt-act-icon",c.setAttribute("aria-hidden","true"),c.textContent="\u21BB";let d=document.createElement("span");return d.textContent=t.action,l.append(c,d),l.addEventListener("click",async()=>{n.classList.add("is-reloading"),l.disabled=!0;try{await e()}catch{}finally{n.isConnected&&(n.classList.remove("is-reloading"),l.disabled=!1)}}),a.appendChild(l),o.appendChild(a),n.appendChild(o),n}function ua(i,e){return`<div class="sl-a11yhead"><span class="sl-a11yhead-t">${L(i)}</span><button type="button" class="sl-a11yclose" data-a11y-close aria-label="${q(e)}"><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 ma(i){return i.map(e=>{let t=`<button type="button" role="switch" class="sl-a11yrow${e.className?` ${e.className}`:""}${e.on?" on":""}" data-a11y-row="${L(e.key)}" aria-checked="${e.on}" aria-pressed="${e.on}"`+(e.disabled?' disabled aria-disabled="true"':"")+`><span class="sl-a11yrow-i" aria-hidden="true">${e.iconHtml}</span><span class="sl-a11yrow-t"><span class="sl-a11yrow-l">${L(e.label)}</span></span>`+(e.count?`<span class="sl-a11yrow-c">${L(e.count)}</span>`:"")+'<span class="sl-a11yrow-s" aria-hidden="true"></span></button>';return e.note?`<div class="sl-a11yrow-w">${t}${ci({id:`sl-info-${q(e.key.replace(/[^A-Za-z0-9]+/g,"-"))}`,label:e.note,text:L(e.note)})}</div>`:t}).join("")}function ci(i){return`<span class="sl-info"${i.wrapRef?` data-ref="${q(i.wrapRef)}"`:""}><button type="button" class="sl-info-btn" data-sl-info aria-label="${q(i.label)}" aria-describedby="${q(i.id)}" aria-expanded="false"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 11v5"/><path d="M12 8h.01"/></svg></button><span class="sl-info-pop" role="tooltip" id="${q(i.id)}"${i.ref?` data-ref="${q(i.ref)}"`:""}>${i.text}</span></span>`}function fa(i){let e=Math.max(0,i),t=Math.floor(e/6e4),n=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return`${t}:${n}`}function ga(i){let e=i.performanceLabel?`<div class="sl-chip-when">${q(i.performanceLabel)}</div>`:"",t=i.performanceDates?.labels.length?`<div class="sl-chip-dates"><span class="sl-chip-dates-summary">${q(i.performanceDates.summary)}</span><span class="sl-chip-date-list">${i.performanceDates.labels.map(n=>`<span class="sl-chip-date">${q(n)}</span>`).join("")}</span></div>`:"";return e+Lh(i)+t}function Lh(i){let{d:e,area:t,label:n,objectType:o,quantity:r=1,identity:s}=i,a=F=>String(F??"\u2014").replace(/[&<>"]/g,X=>({"&":"&","<":"<",">":">",'"':"""})[X]),l=o==="ga"?"ga":e?.objectType??o,c=s?.displayType?.trim()||e?.displayType?.trim()||t?.displayType?.trim()||(l==="table"?y("picker.table","Table"):l==="booth"?y("picker.booth","Booth"):l==="ga"?y("picker.generalAdmission","General admission"):y("picker.row","Row")),d=s?.rowLabel??s?.displayLabel??e?.rowLabel??e?.displayLabel??t?.label??n,p=i.categoryLabel?.trim()??"",u="",h=[];l==="table"&&s?.bookingMode?(u=`${c} ${d}`,h.push([y("picker.guests","Guests"),String(r)])):l==="ga"?(u=String(t?.displayLabel??d),r>1&&h.push([y("picker.tickets","Tickets"),String(r)])):l==="booth"?(u=e?.sectionLabel??`${c} ${d}`,e?.sectionLabel&&h.push([c,String(d)])):!e?.sectionLabel&&!e?.rowLabel&&!e?.seatNumber?u=String(d):(u=e.sectionLabel??"",e.rowLabel&&h.push([c,String(fe(e)??e.rowLabel)]),e.seatNumber&&h.push([y("picker.seat","Seat"),String(e.seatNumber)]));let b=!u&&!!p,g=u||p||String(d),T=!!p&&!b&&p!==g,w=i.offerName?_n(i.offerName,a):"",v=h.map(([F,X])=>`<span class="sl-chip-seg" data-fit-seg><span class="w">${a(F)}</span> <b>${a(X)}</b></span>`);T&&v.push(`<span class="sl-chip-seg" data-fit-seg data-fit-type><span class="w">${a(p)}</span>${w}</span>`);let M=[g,...h.map(([F,X])=>`${F} ${X}`),T?p:"",i.offerName??""].filter(Boolean).join(" \xB7 ");return`<div class="sl-chip-id"><span class="sl-sr">${a(M)}</span><span class="sl-chip-name" aria-hidden="true">${a(g)}${T?"":w}</span>`+(v.length?`<span class="sl-chip-pos" aria-hidden="true">${v.join("<i>\xB7</i>")}</span>`:"")+"</div>"}function ir(i,e,t){return i.map(n=>`<option value="${t(n.id)}"${n.id===e?" selected":""}>${t(n.name)}</option>`).join("")}function Hh(i){let e=q;return` data-key="${e(i.key)}"`+(i.heldLabels.length?` data-held="${e(encodeURIComponent(i.heldLabels.join(`
|
|
185
|
+
`;Fs=3,vh=1,wh=400,xh=3e3;Ds="http://www.w3.org/2000/svg";gt={back:["M12.5 4.5 7 10l5.5 5.5"],clock:["M10 2.8a7.2 7.2 0 1 1 0 14.4a7.2 7.2 0 1 1 0-14.4","M10 6.2V10l2.6 1.7"],down:["m5 7.5 5 5 5-5"],lock:["M4.2 8.8h7.6a1.4 1.4 0 0 1 1.4 1.4v4.4a1.4 1.4 0 0 1-1.4 1.4H4.2a1.4 1.4 0 0 1-1.4-1.4v-4.4a1.4 1.4 0 0 1 1.4-1.4z","M5.4 8.8V6.6a2.6 2.6 0 0 1 5.2 0v2.2"],hour:["M12 3a9 9 0 1 1 0 18a9 9 0 1 1 0-18","M12 7v5l3 2"],seat:["M6 11V6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5M4 11h16v4H4zM6 15v4M18 15v4"],card:["M5 5.5h14a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2z","M3 10h18M7 15h3"],alert:["M12 3a9 9 0 1 1 0 18a9 9 0 1 1 0-18","M12 7.5v5.5M12 16.5v.1"]},Sh=12e4});var Bf={};us(Bf,{ApiError:()=>ie,BuyerAccessContext:()=>De,BuyerAccessUnavailableError:()=>he,BuyerRealtimeClient:()=>Ze,EmbeddedDesigner:()=>bo,PerformanceGroupDestroyedError:()=>ye,PerformanceGroupPicker:()=>Fo,SEATING_CHART_CALLBACK_PROPS:()=>kr,SEATING_CHART_HANDLE_METHODS:()=>vr,SEATING_CHART_IDENTITY_PROPS:()=>wr,SEATING_CHART_VALUE_PROPS:()=>xr,SeasonApiError:()=>ee,SeasonPicker:()=>zo,SeasonPublicSessionRefused:()=>mn,SeasonRecoveryTimeoutError:()=>bn,SeatPicker:()=>lt,SeatingChart:()=>go,attachPickerFrame:()=>Tp,bindSeatingChartHandle:()=>kl,buildSeatingChartOptions:()=>Sl,createBuyerAccessContext:()=>gi,createControllerSink:()=>ri,parseTicketOfferAvailability:()=>vo,prewarmSeatPicker:()=>Jd,shortOperationReference:()=>Ii,ticketOfferPrices:()=>Cr});module.exports=Rp(Bf);var ae=require("@seatlayer/core");var Ip=/^[0-9A-Za-z.+-]{1,24}$/,Op=Ip.test("0.106.2")?"0.106.2":"",_p={host:"web",platform:"web",bundle:Op,protocol:0,chromeOwner:"web"},Np={..._p},Cn=null,gs=null;function Dp(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():0}function Bp(){let i=e=>Math.max(0,Math.round(e*100)/100);return{bootMs:i(Dp()),documentMs:Cn==null?0:i(Cn),handshakeMs:Cn==null||gs==null?0:i(gs-Cn)}}function bs(){let{host:i,platform:e,bundle:t,protocol:n,chromeOwner:o}=Np,r=Bp();return{host:i,platform:e,...t?{bundle:t}:{},...n?{protocol:n}:{},chromeOwner:o,bootMs:r.bootMs,documentMs:r.documentMs,handshakeMs:r.handshakeMs}}var ys=new Set,vs=new Map;function ot(i){return ys.has(i)?"repeat":"cold"}function An(i){let e=ot(i);return ys.add(i),e}function Be(i){return typeof i=="number"&&Number.isFinite(i)&&i>=0?Math.round(i):0}function Wi(){return typeof location>"u"?!1:/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(location.hostname)}function Fp(i){if(!/^[A-Za-z0-9_-]{1,80}$/.test(i.event))return null;let e=i.performanceProfile??{};return{event:i.event,scope:i.scope,surface:i.surface,outcome:i.outcome,stage:i.stage?.slice(0,32)??"",ms:Be(i.ms),api:Be(e.loadChartAndStatuses)||Be(e.loadChart),scene:Be(e.buildScene),panel:Be(e.buildBuyerControls),paint:Be(e.firstPaint),normalize:Be(e.normalizeBuyerModel),renderer:Be(e.createRenderer),seats:Be(i.seats),floors:Be(i.floors),view:i.view??"map",load:i.load??ot(i.event),transport:i.transport??"pubapi",...bs(),availabilityMs:Be(e.loadStatuses),...typeof i.revealWaitMs=="number"?{revealWaitMs:Be(i.revealWaitMs)}:{},...typeof i.handoverMs=="number"?{handoverMs:Be(i.handoverMs)}:{},mounts:(vs.get(i.event)??0)+1,reconnects:Be(i.reconnects)}}var Vp=new Set;function Qe(i){let e=Fp(i);if(e){vs.set(i.event,e.mounts);for(let t of Vp)try{t(e)}catch{}typeof fetch>"u"||Wi()||fetch(`${i.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 $p="realtime.fallback_polling",ws=new Set;function zp(i){let e=/^(wss?):\/\/([^/]+)(.*?)\/pub\/events\/([^/?#]+)\/subscribe(?:[?#]|$)/.exec(i);if(!e)return null;let t;try{t=decodeURIComponent(e[4])}catch{return null}return/^[A-Za-z0-9_-]{1,80}$/.test(t)?{apiBase:`${e[1]==="wss"?"https":"http"}://${e[2]}${e[3]}`,eventKey:t}:null}function xs(i){let e=zp(i);return!e||ws.has(e.eventKey)||(ws.add(e.eventKey),typeof fetch>"u"||Wi())?!1:(fetch(`${e.apiBase}/pub/telemetry/client-error`,{method:"POST",headers:{"Content-Type":"application/json","X-SeatLayer-Client":"1"},body:JSON.stringify({surface:"picker",errorCode:$p,eventKey:e.eventKey}),credentials:"omit",keepalive:!0}).catch(()=>{}),!0)}var It="seatlayer.v1",ks="\0",Ss=4401,jp=15e3,Kp=25e3,Gp=1e4,Ts=5e3,Up=3,qp=15e3,Es=6e4;function Wp(i){let e=typeof i.default=="string"?i.default:"free",t={};if(i.seats&&typeof i.seats=="object")for(let[n,o]of Object.entries(i.seats))typeof o=="string"&&o!==e&&(t[n]=o);return{default:e,exceptions:t}}function Yp(i,e){if(!i||i.default!==e.default)return null;let t=[];for(let[n,o]of Object.entries(e.exceptions))i.exceptions[n]!==o&&t.push({label:n,status:o});for(let n of Object.keys(i.exceptions))n in e.exceptions||t.push({label:n,status:e.default});return t}function Xp(i,e){for(let t of e)t.status===i.default?delete i.exceptions[t.label]:i.exceptions[t.label]=t.status}function Cs(i){if(/(?:^|[?&#])(?:token|access_token|bearer|authorization|ticket|tkt|bse)=/i.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL");if(/\bbse_[A-Za-z0-9._-]+/.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL")}var Ze=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.failedUpgrades=0;this.pollTimer=null;this.fellBack=!1;this.reconnectCount=0;this.opts=e,typeof e.url=="string"&&Cs(e.url)}get polling(){return this.pollTimer!==null}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(),this.stopPolling();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.failedUpgrades=0,this.start()}async connect(){if(this.stopped)return;let e=[It];if(this.opts.mintTicket){let a;try{a=await this.opts.mintTicket()}catch(l){this.reportIfAccessError(l),this.scheduleReconnect();return}if(this.stopped)return;a?.protocols?.length?(e=[...a.protocols],e.includes(It)||e.unshift(It)):a?.ticket&&(e=[It,`tkt.${a.ticket}`])}let t=this.version!==null;t&&e.push(`sv.${this.version}`);let n=typeof this.opts.url=="function"?this.opts.url():this.opts.url,o=this.useQueryMarker?`${n}${n.includes("?")?"&":"?"}pv=1`:n;Cs(o);let r;try{r=(this.opts.socketFactory??((l,c)=>new WebSocket(l,c)))(o,e)}catch{this.upgradeFailed(),this.scheduleReconnect();return}this.ws=r;let s=!1;r.onopen=()=>{this.ws===r&&(s=!0,this.attempt=0,this.failedUpgrades=0,this.stopPolling(),this.v1=r.protocol===It,this.v1||(this.useQueryMarker=!0),this.startKeepalive(r),t?this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync()},Ts):this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync({reason:"connect"})},Ts))},r.onmessage=a=>{if(this.ws!==r)return;let l;try{l=JSON.parse(typeof a.data=="string"?a.data:"")}catch{return}!l||typeof l!="object"||this.handleFrame(l)},r.onclose=a=>{if(this.ws===r){if(this.ws=null,this.clearTimers(),!s&&a?.code!==Ss&&this.upgradeFailed(),a?.code===Ss){if(a.reason==="access_expired"){this.scheduleReconnect();return}if(a.reason==="idle_expired"&&this.opts.onIdleExpired){this.stopped=!0,this.stopPolling(),this.opts.onIdleExpired();return}this.stopped=!0,this.stopPolling(),this.opts.onAccessUnavailable?.({reason:"revoked",code:"access_revoked",retryable:!1});return}this.scheduleReconnect()}},r.onerror=()=>{try{r.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 n=Array.isArray(e.hidden)?e.hidden:[],o=Array.isArray(e.closed)?e.closed:[],r=n.join(ks),s=o.join(ks);(r!==this.hidden||s!==this.closedSections)&&(this.hidden=r,this.closedSections=s,this.opts.sink.onSections?.(n,o,{withInventory:t==="snapshot"||!!e.seats}))}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 n=Wp(e),o=Yp(this.projection,n);this.projection=n,o===null?this.opts.sink.applyProjection?this.opts.sink.applyProjection(n):this.opts.sink.resync():o.length&&this.opts.sink.applyStatuses(o);return}if(t==="delta"&&Array.isArray(e.changes)){this.answered();let n=e.changes.filter(o=>typeof o?.label=="string"&&typeof o?.status=="string").map(o=>({label:o.label,status:o.status}));if(!n.length)return;this.projection&&Xp(this.projection,n),this.opts.sink.applyStatuses(n)}}}}answered(){this.resumeTimer&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}reportIfAccessError(e){let t=e?.reason;e?.name==="BuyerAccessUnavailableError"&&(this.stopped=!0,this.stopPolling(),this.opts.onAccessUnavailable?.({reason:t??"invalid",code:e.code,status:e.status,retryable:t==="paused"}))}upgradeFailed(){this.failedUpgrades+=1,this.failedUpgrades>=Up&&this.startPolling()}startPolling(){if(!(this.pollTimer||this.stopped)){if(!this.fellBack){this.fellBack=!0;try{this.opts.onFallbackPolling?.()}catch{}let e=typeof this.opts.url=="function"?this.opts.url():this.opts.url;xs(e)}this.pollTimer=setInterval(()=>{if(this.stopped){this.stopPolling();return}typeof document<"u"&&document.hidden||Promise.resolve().then(()=>this.opts.poll?this.opts.poll():this.opts.sink.resync({reason:"frame"})).catch(()=>{})},qp)}}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}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{}},Gp)}},Kp)}scheduleReconnect(){if(this.stopped||this.reconnectTimer)return;let e=Math.min(this.attempt++,5),t=Math.min(1e3*2**e,jp),n=this.pollTimer?Es/2+Math.random()*Es/2:Math.random()*t;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.reconnectCount+=1,this.connect()},n)}get reconnects(){return this.reconnectCount}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 Qp(i){return i==="blocked"?"not_for_sale":i==="held"||i==="booked"||i==="free"||i==="not_for_sale"?i:"free"}function ri(i,e={}){let t=n=>{let o=i.tableSelection(n);if(o)return o.physicalSeatIds;let r=i.idForLabel(n);return r?[r]:[]};return{applyStatuses(n){let o=new Set([...i.currentHold()?.labels??[],...e.ownLabels?.()??[]]),r={free:[],held:[],booked:[],not_for_sale:[]},s=[],a=[],l=new Map(i.getSelection().map(c=>[c.label,c.id]));for(let c of n){let d=t(c.label);if(!d.length)continue;let p=Qp(c.status);if(r[p].push(...d),e.flashOnLiveChange&&p!=="free"&&!o.has(c.label)&&d.some(u=>i.getStatus(u)==="free")){let u=p==="held"?"#f4b740":"#f43f5e";for(let h of d)s.push({id:h,color:u})}p!=="free"&&!o.has(c.label)&&l.has(c.label)&&a.push(c.label)}for(let c of["free","held","booked","not_for_sale"])r[c].length&&i.setStatus(r[c],c);for(let c of s)i.flashSeat(c.id,c.color);if(a.length){let c=a.flatMap(p=>t(p));c.length&&i.deselect(c);let d=n.some(p=>p.status==="blocked"&&a.includes(p.label));e.onSelectedObjectUnavailable?.(a,d?"ineligible":"taken")}e.onStatusChange?.()},...i.applyProjection?{applyProjection:n=>{i.applyProjection(n)}}:{},async resync(n){await(i.resync?i.resync(n):i.refresh())},onSections(n,o,r){r?.withInventory||(i.resync?i.resync({reason:"frame"}):i.refresh()),e.onSections?.(n,o,r)}}}var ie=class extends Error{constructor(e,t,n,o,r,s,a,l){super(t),this.name="ApiError",this.status=e,this.code=n,this.conflicts=o,this.reason=r,this.retryAfterS=s,this.notice=a,l?.fields&&(this.fields=l.fields),typeof l?.retryable=="boolean"&&(this.retryable=l.retryable),l?.hint&&(this.hint=l.hint),l?.serverMessage&&(this.serverMessage=l.serverMessage)}},As=10,Ps=1;function Yi(i,e){let t=(i??"").trim();if(t){let n=Number(t);if(Number.isFinite(n)&&n>=0)return Math.ceil(n);let o=Date.parse(t);if(Number.isFinite(o))return Math.max(0,Math.ceil((o-Date.now())/1e3))}if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return Math.ceil(e)}function Zp(i){let e=i;return!!e&&typeof e.ticketKey=="string"&&typeof e.label=="string"&&Number.isFinite(e.unitIndex)&&Number.isFinite(e.quantity)&&(e.displayLabel===void 0||typeof e.displayLabel=="string")}var Jp={seat_conflict:"taken",conflict:"taken",channel_assignment_conflict:"ineligible",allocation_exhausted:"exhausted"};function eh(){return typeof crypto>"u"?null:typeof crypto.randomUUID=="function"?crypto.randomUUID():typeof crypto.getRandomValues!="function"?null:Array.from(crypto.getRandomValues(new Uint8Array(18)),i=>i.toString(16).padStart(2,"0")).join("")}function th(i,e){let t=e.map(n=>[n.label,n.tierId??null,n.quantity??null]).sort((n,o)=>n[0]<o[0]?-1:n[0]>o[0]?1:0);return JSON.stringify([i,t])}function ih(i){return i instanceof ie?i.status===408||i.status===429||i.status>=500:!0}function Ms(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`viewer_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`}var ft=class{constructor(e,t={}){this.base=e;this.viewerId=Ms();this.holdAttempt=null;this.holdIdempotency=!0;this.ticketKeysByHold=new Map;this.access=t.access,this.onObjectUnavailable=t.onObjectUnavailable;let n=t.referral?.trim();this.referral=n?n.slice(0,120):void 0}rotateViewerId(){this.viewerId=Ms()}async pickerIdleMinutes(){return null}get accessScoped(){return!!this.access?.configured}async request(e,t={},n={}){let o=t.method??"GET",r={},s;t.body!==void 0&&(r["Content-Type"]="application/json",s=JSON.stringify(t.body));let a=await this.access?.authorization(n.auth?"unauthorized":"initial");if(a&&(r.Authorization=a),t.idempotency){let u=this.holdAttemptKey(`${t.idempotency.binding}\0${a??""}`);t.idempotency.used(u??void 0),u&&(r["Idempotency-Key"]=u)}let l=o==="GET"||e.endsWith("/hold/resume")?new AbortController:null,c=l?setTimeout(()=>l.abort(),4e4):null,d,p;try{d=await fetch(`${this.base}${e}`,{method:o,headers:r,body:s,credentials:"omit",...l?{signal:l.signal}:{}}),p=(d.headers.get("content-type")??"").includes("application/json")?await d.json().catch(h=>{if(l?.signal.aborted)throw h;return null}):null}finally{c!==null&&clearTimeout(c)}if(!d.ok){let u=p,h=u?.code??u?.error,b=d.status===401&&h==="buyer_access_invalid"&&e.endsWith("/hold/resume");if(this.access?.configured&&!b&&(d.status===401||d.status===403||d.status===422)&&await this.access.handleFailure(d.status,h)&&!n.auth)return this.request(e,t,{...n,auth:!0});if(d.status===409){let T=h?Jp[h]:void 0,w=u?.conflicts?.map(v=>v.label)??t.labels??[];T&&this.onObjectUnavailable?.({labels:w,reason:T,code:h})}let g;if(d.status===429&&(g=Yi(d.headers.get("Retry-After"),u?.retryAfterSeconds)??Ps,o==="GET"&&!n.rateLimit&&g<=As))return await new Promise(T=>setTimeout(T,g*1e3)),this.request(e,t,{...n,rateLimit:!0});throw d.status===503&&(g=Yi(d.headers.get("Retry-After"),u?.retryAfterSeconds)),new ie(d.status,u?.error??`request_failed_${d.status}`,h,u?.conflicts,u?.reason,g,typeof u?.notice=="string"&&u.notice?u.notice:void 0,{...Array.isArray(u?.fields)?{fields:u.fields}:{},...typeof u?.retryable=="boolean"?{retryable:u.retryable}:{},...typeof u?.hint=="string"&&u.hint?{hint:u.hint}:{},...typeof u?.message=="string"&&u.message?{serverMessage:u.message}:{}})}return p}async requestBlob(e,t={}){let n={},o=await this.access?.authorization(t.auth?"unauthorized":"initial");o&&(n.Authorization=o);let r=await fetch(`${this.base}${e}`,{method:"GET",headers:n,credentials:"omit"});if(r.ok)return r.blob();let a=(r.headers.get("content-type")??"").includes("application/json")?await r.json().catch(()=>null):null,l=a?.code??a?.error;if(this.access?.configured&&(r.status===401||r.status===403||r.status===422)&&await this.access.handleFailure(r.status,l)&&!t.auth)return this.requestBlob(e,{...t,auth:!0});let c;if(r.status===429&&(c=Yi(r.headers.get("Retry-After"),a?.retryAfterSeconds)??Ps,!t.rateLimit&&c<=As))return await new Promise(d=>setTimeout(d,c*1e3)),this.requestBlob(e,{...t,rateLimit:!0});throw new ie(r.status,a?.error??`request_failed_${r.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 ie(404,"not_found","not_found"))}async objects(e){return{...await this.request(`/pub/events/${encodeURIComponent(e)}/objects?compact=1`),fetchedAt:Date.now()}}hold(e,t,n,o){let r=`/pub/events/${encodeURIComponent(e)}/hold?pricingContract=matrix-v1`,s={method:"POST",body:{selections:t,...n?{ttlMs:n}:{},...o?{replaceHoldId:o}:{},...this.referral?{referral:this.referral}:{}},labels:t.map(l=>l.label)};return(o||!this.holdIdempotency?this.request(r,s):this.keyedHold(r,s,th(e,t))).then(l=>this.noteTicketKeys(l,o))}holdAttemptKey(e){if(this.holdAttempt?.binding===e)return this.holdAttempt.key;let t=eh();return this.holdAttempt=t?{binding:e,key:t}:null,t}endHoldAttempt(e){e&&this.holdAttempt?.key===e&&(this.holdAttempt=null)}async keyedHold(e,t,n,o=!1){let r;try{let s=await this.request(e,{...t,idempotency:{binding:n,used:a=>{r=a}}});return this.endHoldAttempt(r),s}catch(s){if(ih(s))throw s;this.endHoldAttempt(r);let a=s.code;if(a==="idempotency_key_reused"&&!o)return this.keyedHold(e,t,n,!0);if(a==="invalid_idempotency_key")return this.holdIdempotency=!1,this.request(e,t);throw s}}noteTicketKeys(e,t){if(t&&this.ticketKeysByHold.delete(t),!e?.holdId)return e;let n=Array.isArray(e.ticketKeys)&&e.ticketKeys.every(r=>typeof r=="string")?[...e.ticketKeys]:null,o=Array.isArray(e.ticketKeyDetails)&&e.ticketKeyDetails.every(Zp)?e.ticketKeyDetails.map(({ticketKey:r,label:s,unitIndex:a,quantity:l,displayLabel:c})=>({ticketKey:r,label:s,unitIndex:a,quantity:l,...c?{displayLabel:c}:{}})):null;return n||o?this.ticketKeysByHold.set(e.holdId,{...n?{ticketKeys:n}:{},...o?{ticketKeyDetails:o}:{}}):this.ticketKeysByHold.delete(e.holdId),e}ticketKeysFor(e){let t=this.ticketKeysByHold.get(e);return t?{...t}:null}bestAvailable(e,t,n,o,r){return this.request(`/pub/events/${encodeURIComponent(e)}/best-available?pricingContract=matrix-v1`,{method:"POST",body:{qty:t,...n?{categoryKey:n}:{},...o?{zoneId:o}:{},...r?{ttlMs:r}:{},...this.referral?{referral:this.referral}:{}}}).then(s=>this.noteTicketKeys(s))}resume(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/hold/resume`,{method:"POST",body:{holdId:t}}).then(n=>this.noteTicketKeys(n))}release(e,t,n){return this.holdAttempt=null,this.request(`/pub/events/${encodeURIComponent(e)}/release`,{method:"POST",body:{labels:t,holdId:n}}).then(o=>{let r=this.ticketKeysByHold.get(n);if(r){let s=new Set(o?.released??t);this.ticketKeysByHold.set(n,{...r.ticketKeys?{ticketKeys:r.ticketKeys.filter(a=>!s.has(a))}:{},...r.ticketKeyDetails?{ticketKeyDetails:r.ticketKeyDetails.filter(a=>!s.has(a.ticketKey))}:{}})}return o})}extend(e,t,n){return this.request(`/pub/events/${encodeURIComponent(e)}/extend`,{method:"POST",body:{holdId:t,...n?{ttlMs:n}:{}}})}paymentOptions(e){return this.request(`/pub/events/${encodeURIComponent(e)}/payment-options`)}availability(e,t=!1){return this.request(`/pub/events/${encodeURIComponent(e)}/availability?pricingContract=matrix-v1${t?"&live=1":""}`)}startCheckout(e,t){return this.holdAttempt=null,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"),n=new URLSearchParams({surface:"picker",viewerId:this.viewerId});return`${t}/pub/events/${encodeURIComponent(e)}/subscribe?${n}`}socketUrl(e){return this.accessScoped?"":this.subscribeUrl(e)}socketProtocols(e){return this.accessScoped?[]:[It]}createRealtime(e,t){return this.accessScoped?null:new Ze({url:this.subscribeUrl(e),sink:t})}};var Ji=require("@seatlayer/core");var Oe=require("@seatlayer/core"),ta=require("@seatlayer/core/core/seatConfidence");var Yo=require("@seatlayer/core"),Qi=require("@seatlayer/core/core/cdnAsset");var nh=/^data:image\/(?:png|jpe?g|webp|gif|avif);base64,[a-z0-9+/]+={0,2}$/i,oh=/[\s"'<>`\\]/;function rh(i){return i.startsWith("//")?!1:i.startsWith("/")||i.startsWith("./")||i.startsWith("../")}function sh(){try{let i=typeof location>"u"?"":location.origin;return i&&i!=="null"?i:null}catch{return null}}function si(i){if(typeof i!="string"||!i||i.length>2e6||i!==i.trim())return!1;if(i.startsWith("data:"))return nh.test(i);if(oh.test(i))return!1;let e=sh();if(rh(i)){if(!e)return!1;try{let t=new URL(i,e);return t.origin===e&&!t.username&&!t.password}catch{return!1}}try{let t=new URL(i);return t.username||t.password?!1:t.protocol==="https:"||e!=null&&t.origin===e}catch{return!1}}var Ah=require("@seatlayer/core/core/cdnAsset");function y(i,e){let t=(0,Yo.t)(i);return t===i?e:t}function Nt(){return globalThis.matchMedia?.("(pointer: coarse)").matches??!1?y("picker.dragToLookTouch","Drag to look \xB7 pinch to zoom \xB7 tap \u2715 to close"):y("picker.dragToLookMouse","Drag to look \xB7 pinch or scroll to zoom \xB7 Esc to close")}function Ln(){return{rotate:y("picker.dragToRotateVenue","Drag to rotate the venue"),move:y("picker.dragToMoveVenue","Drag to move the venue"),zoomIn:y("picker.zoomIn","Zoom in"),zoomOut:y("picker.zoomOut","Zoom out"),fitView:y("picker.fitWholeVenue","Show whole venue")}}function Gs(i,e){let t=e?i.toLocaleUpperCase(e):i.toLocaleUpperCase(),n=e?i.toLocaleLowerCase(e):i.toLocaleLowerCase();if(i!==t||t===n)return i;let o=[...n][0]??"";return(e?o.toLocaleUpperCase(e):o.toLocaleUpperCase())+n.slice(o.length)}function Us(i){if(typeof i=="string"){let e=document.querySelector(i);if(!e)throw new Error(`seatmap: container "${i}" not found`);return e}if(!(i instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return i}function q(i){return String(i??"").replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function qs(i,e,t){let n=e.find(r=>si(r))??null;if(i.replaceChildren(),!n)return i.textContent=t.slice(0,1).toUpperCase(),null;let o=document.createElement("img");return o.alt="",o.referrerPolicy="no-referrer",o.src=n,i.appendChild(o),n}var ai=null;function Hn(){if(ai!==null)return ai;try{if(typeof document>"u")return ai=!1;ai=!!document.createElement("canvas").getContext("webgl2")}catch{ai=!1}return ai}var Xi=null;function Zi(){return Xi||(Xi=(typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?(0,Qi.importCdnAsset)("seatlayer-view3d.mjs"):import("@seatlayer/core/view3d")).catch(e=>{throw Xi=null,e}),Xi)}function Rn(){(typeof navigator>"u"?void 0:navigator.connection)?.saveData||Zi().catch(()=>{})}async function In(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?(0,Qi.importCdnAsset)("seatlayer-panorama.mjs"):import("@seatlayer/core")}async function li(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?(0,Qi.importCdnAsset)("seatlayer-checkout.mjs"):Promise.resolve().then(()=>(js(),zs))}function Ws(i){return i==="unavailable_for_event"||i==="payments_off_for_event"?i:"not_configured"}function Ys(i){return i.lineItems.reduce((e,t)=>e+t.quantity,0)}function Xo(i,e){if(i.objectType!=="ga")return i.displayLabel??i.label;let t=e.find(n=>n.id===i.objectId);return i.displayLabel??t?.displayLabel??t?.label??y("picker.generalAdmission","General admission")}function Eh(i,e){let t=new Map;for(let n of i){let o=n.rowLabel&&n.seatNumber?[n.sectionLabel,`${y("picker.row","Row")} ${n.rowLabel}`,`${y("picker.seat","Seat")} ${n.seatNumber}`].filter(Boolean).join(" \xB7 "):Xo(n,e),r=[n.categoryLabel,n.tierLabel].filter(Boolean).join(" \xB7 "),s=Math.max(1,Math.floor(n.quantity||1)),a=`${o}\0${r}`,l=t.get(a)??{label:o,detail:r,units:0,amount:0};l.units+=s,l.amount+=n.unitPrice*s,t.set(a,l)}return[...t.values()].map(n=>({label:n.units>1?`${n.label} \xD7${n.units}`:n.label,...n.detail?{detail:n.detail}:{},amount:n.amount}))}var Ks=(i,e,t)=>(0,Yo.t)("picker.bookingForm.guestOfCount",{label:i,index:e,total:t});function Ch(i,e,t=[]){let n=new Map,o=[];for(let d of i.lineItems){let p=Xo(d,t),u=Math.max(1,Math.floor(d.quantity)||1);if(d.objectType!=="ga"&&!(d.objectType==="table"&&u>1)){o.push({key:d.label,name:p,unitIndex:1,quantity:1});continue}for(let h=1;h<=u;h+=1){let b=(n.get(d.label)??0)+1;n.set(d.label,b),o.push({key:`${d.label}#${b}`,name:p,unitIndex:h,quantity:u})}}let r=e?.ticketKeyDetails??[],s=e?.ticketKeys??r.map(d=>d.ticketKey),a=(s.length===o.length?s:o.map(d=>d.key)).map(d=>{let p=o.find(h=>h.key===d),u=r.find(h=>h.ticketKey===d);return{key:d,name:u?.displayLabel??p?.name,unitIndex:u?.unitIndex??p?.unitIndex??1,quantity:u?.quantity??p?.quantity??1}}),l=new Map;for(let d of a)d.name&&d.quantity<=1&&l.set(d.name,(l.get(d.name)??0)+1);let c=new Map;return a.map(({key:d,name:p,unitIndex:u,quantity:h})=>{if(!p)return{key:d};if(h>1)return{key:d,title:Ks(p,u,h)};let b=(c.get(p)??0)+1;c.set(p,b);let g=l.get(p)??1;return{key:d,title:g>1?Ks(p,b,g):p}})}function Xs(i,e,t,n,o=[]){let r=new Map;for(let s of i.lineItems){let a=Xo(s,o);r.set(a,(r.get(a)??0)+1)}return{kind:"pay",provider:e,order:{holdId:i.holdId,expiresAt:i.expiresAt,currency:i.currency,total:i.total,labels:[...r].map(([s,a])=>a>1?`${s} \xD7${a}`:s),tickets:Ch(i,n,o),lines:Eh(i.lineItems,o)},bookingForm:t?.bookingForm??null,...t?.bookingMode==="free"?{free:!0}:{}}}function Qs(i){return String(i?.code).startsWith("booking_form_")}function On(i,e,t){let n={month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},o=new Date(i);if(e)try{return o.toLocaleString(t,{...n,timeZone:e})}catch{}return o.toLocaleString(t,n)}function Qo(i){return/early[\s-]*bird/i.test(i?.trim()??"")}function Zs(i){return Qo(i)?'<svg class="sl-offer-icon sl-offer-icon-discount" viewBox="0 0 32 32" aria-hidden="true"><defs><linearGradient id="sl-offer-discount-gradient" x1="29.492" y1="0" x2="20.028" y2="36.183" gradientUnits="userSpaceOnUse"><stop stop-color="#FD6D00"/><stop offset="1" stop-color="#F8B302"/></linearGradient></defs><path d="M16 22.751a1.071 1.071 0 1 0 0-2.142 1.071 1.071 0 0 0 0 2.142ZM16 11.39a1.071 1.071 0 1 0 0-2.141 1.071 1.071 0 0 0 0 2.141Z" fill="url(#sl-offer-discount-gradient)"/><path d="M31.137.863A2.928 2.928 0 0 0 29.054 0H17.836c-.787 0-1.527.307-2.083.863L.863 15.753A2.93 2.93 0 0 0 0 17.836c0 .787.307 1.527.863 2.083l11.218 11.218A2.927 2.927 0 0 0 14.164 32c.787 0 1.527-.307 2.083-.863l14.89-14.89A2.928 2.928 0 0 0 32 14.164V2.946c0-.788-.307-1.527-.863-2.083ZM16 7.374a2.946 2.946 0 1 1 0 5.891 2.946 2.946 0 0 1 0-5.891Zm0 17.252a2.946 2.946 0 1 1 0-5.891 2.946 2.946 0 0 1 0 5.891Zm6.025-7.689H9.975a.938.938 0 0 1 0-1.875h12.05a.938.938 0 0 1 0 1.875Zm4.017-10.041a.938.938 0 1 1 0-1.875.938.938 0 0 1 0 1.875Z" fill="url(#sl-offer-discount-gradient)"/></svg>':'<svg class="sl-offer-icon sl-offer-icon-tag" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.6 13.6 13.7 20.5a2 2 0 0 1-2.8 0L3.5 13.1A2 2 0 0 1 3 11.7V4h7.7a2 2 0 0 1 1.4.6l8.5 8.5a.7.7 0 0 1 0 .5Z"/><circle cx="7.5" cy="8.5" r="1"/></svg>'}function _n(i,e){return`<span class="sl-offer-mark" role="img" aria-label="${e(i)}" title="${e(i)}">${Zs(i)}</span>`}function Nn(i,e){return`<span class="sl-offer-badge">${Zs(i)}<span>${e(i)}</span></span>`}function Js(i,e=Date.now()){let t=i-e;if(t<=0)return null;let n=Math.max(1,Math.ceil(t/6e4)),o=Math.floor(n/1440),r=Math.floor(n%1440/60),s=n%60;return`${(o>0?[`${o}d`,...r?[`${r}h`]:[]]:[...r?[`${r}h`]:[],...s||!r?[`${s}m`]:[]]).join(" ")} left`}function Zo(i){return String(i??"\u2014").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function L(i){return String(i??"").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function Jo(i){return i?(0,Oe.seatNoteRowModel)(i).map(e=>({...e,title:y(e.titleKey,e.titleFallback)})):[]}function ia(i){return Jo(i).map(e=>e.title)}function Dt(i,e={}){return er(Jo(i),e)}function er(i,e={}){if(!i.length)return"";let t=e.compact?15:17,n=i.map(o=>`<div class="sl-note sl-note-${L(o.tone)}"><span class="sl-note-i">${(0,Oe.seatTypeIconSvg)(o.icon,{size:t})}</span><span class="sl-note-t"><b>${L(o.title)}</b>`+(o.note?`<span class="sl-note-n">${L(o.note)}</span>`:"")+"</span></div>").join("");return`<div class="sl-notes${e.compact?" compact":""}">${n}</div>`}function na(i){return Jo(i).map(e=>{let t=L(e.note?`${e.title}: ${e.note}`:e.title);return`<span class="sl-cx-mark sl-cx-mark-${L(e.tone)}" role="img" aria-label="${t}" title="${t}">${(0,Oe.seatTypeIconSvg)(e.icon,{size:13})}</span>`}).join("")}function Dn(i){let e=[];return i?.restrictedView&&e.push(y("picker.restrictedView","Restricted view")),i?.obstructedView&&e.push(y("picker.obstructedView","Obstructed view")),e}function tr(i,e){if(!i)return"";let t=e?y("picker.viewFromThisSeat","View from this seat"):y("picker.seeItIn3d","See it in 3D"),n=e?y("picker.viewFromHere","View from here"):t;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>${n}</span></button>`}function oa(i,e){if(!e)return"";let t=e,n=t.includes(i.id),o=n?t.length>1?y("picker.openComparison","Open comparison"):y("picker.savedForComparison","Saved for comparison"):t.length?y("picker.compareWithSaved","Compare with saved"):y("picker.saveToCompare","Save to compare");return`<button type="button" class="sl-confirm-compare"${n&&t.length===1?" disabled":""}><span aria-hidden="true">\u21C4</span><span>${L(o)}</span></button>`}function ra(i,e,t){if(!t)return"";let n=(0,ta.seatConfidenceDisclosure)(i.confidenceEvidence),o=n.modeledTarget??n.reality;return`<button type="button" class="sl-confirm-confidence" aria-label="Open seat confidence passport for ${L(i.displayLabel??i.label)}"><span><em>${L(e)}</em><strong>${L(n.headline)}</strong><small>${L(o)}</small></span><b>Passport</b></button>`}function fe(i){let e=i?.rowLabel,t=i?.sectionLabel;if(!e||!t)return e;for(let n of["-"," ","\xB7","/","_"]){let o=`${t}${n}`;if(e.startsWith(o)&&e.length>o.length)return e.slice(o.length)}return(0,Oe.compactRowLabel)(e,t)}function Ph(i){switch(i){case"paused":return{title:y("picker.accessPausedTitle","These seats are on hold right now"),body:y("picker.accessPausedBody","The organizer has paused this selection. Try again in a few minutes."),action:y("picker.accessRetry","Try again")};case"revoked":return{title:y("picker.accessRevokedTitle","This access link is no longer active"),body:y("picker.accessRevokedBody","Ask whoever sent you here for a new link to keep booking these seats."),action:y("picker.accessRefresh","Refresh")};case"idle":return{title:y("picker.idlePausedTitle","Your session expired"),body:y("picker.idlePausedBody","You were away for a while. Refresh to see which seats are free now."),action:y("picker.idleRefresh","Show latest seats")};case"no_token":case"provider_failed":return{title:y("picker.accessExpiredTitle","The seat map timed out"),body:y("picker.accessExpiredBody","Any seats you\u2019re holding stay held. Refresh to see what\u2019s available now."),action:y("picker.accessRefresh","Refresh")};default:return{title:y("picker.accessInvalidTitle","We couldn\u2019t verify your access"),body:y("picker.accessInvalidBody","You can still book anything shown as available. Contact whoever sent you here for access to the rest."),action:y("picker.accessRefresh","Refresh")}}}var Mh=6;function sa(i,e,t){let n=Zo;return[i?.sectionLabel?`<div class="sl-confirm-field sl-confirm-sec${i.sectionLabel.length>Mh?" sl-confirm-sec-long":""}"><span class="sl-confirm-key">${y("picker.section","Section")}</span><span class="sl-confirm-value">${n(i.sectionLabel)}</span></div>`:"",i?.rowLabel||i?.objectType==="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${n(t)}</span><span class="sl-confirm-value">${n(fe(i)??i?.displayLabel??e)}</span></div>`:"",i?.objectType!=="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${y("picker.seat","Seat")}</span><span class="sl-confirm-value">${n(i?.seatNumber??i?.displayLabel??e)}</span></div>`:""].filter(Boolean).join("")}function aa(i,e,t){let n=Zo,o=i?.objectType==="booth",r=i?.objectType==="table"&&!!i?.bookingMode,s=o||r||!i?.seatNumber,a=i?.sectionLabel??(s?void 0:i?.displayLabel),l=r?`${y("picker.guests","Guests")} ${i?.bookingMode==="variable"?`${i?.minOccupancy}\u2013${i?.maxOccupancy}`:i?.capacity}`:void 0,d=(s?[l,a?i?.rowLabel??i?.displayLabel:void 0]:[i?.rowLabel?`${t} ${fe(i)??""}`.trim():void 0,`${y("picker.seat","Seat")} ${i?.seatNumber??e}`]).filter(Boolean).join(" \xB7 ");return(a?`<span class="sl-confirm-place">${n(a)}</span>`:"")+(d?`<span class="sl-confirm-pos">${a?" \xB7 ":""}${n(d)}</span>`:"")+(a||d?"":`<span class="sl-confirm-pos">${n(e)}</span>`)}function la(i,e){if(!i)return"";let t=e?y("picker.viewFromThisSeat","View from this seat"):y("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 ca(i,e){if(!i||e)return"";let t=y("picker.seeItIn3d","See it in 3D");return`<button type="button" class="sl-confirm-3drow" 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 ea(i){return i.buyerMessage?.trim()||(i.restriction==="companion"?y("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):void 0)}function Bn(i,e,t,n=()=>{}){let o=Zo;if(i.length>1)return`<fieldset class="sl-confirm-tiers"><legend><span>${y("picker.ticketType","Ticket type")}</span></legend>`+i.map(a=>{let l=ea(a),c=n(a);return`<button type="button" class="sl-confirm-tier" data-confirm-tier="${o(a.id)}"${c?` data-offer-name="${o(c)}"`:""} aria-pressed="${a.id===e}"><span class="sl-confirm-tier-copy"><span class="sl-confirm-tier-name">${o(a.name)}`+(c?`<span class="sl-confirm-tier-offer">${Nn(c,o)}</span>`:"")+"</span>"+(l?`<small class="sl-confirm-tier-note">${o(l)}</small>`:"")+`</span><span class="sl-confirm-tier-price">${o(t(a))}</span></button>`}).join("")+"</fieldset>";let r=i[0],s=r?ea(r):void 0;return s?`<p class="sl-confirm-tier-note">${o(s)}</p>`:""}function da(i){return'<div class="sl-confirm-grid">'+i.identityFields+`</div><div class="sl-confirm-cat"><span class="sl-confirm-cat-name">${L(i.categoryLabel)}</span>`+(i.priceLabel?`<span class="sl-confirm-price">${L(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-id">'+i.marker+`<span class="sl-confirm-dot" style="background:${L(i.categoryColor)}" aria-hidden="true"></span><span class="sl-sr">${L(i.categoryLabel)}</span><span class="sl-confirm-who">`+i.identity+"</span>"+(i.priceLabel?`<span class="sl-confirm-idprice">${L(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-body">'+i.commercial+i.tierChoices+i.groupDates+i.wheelchair+(i.thumb||i.see3dPill?`<div class="sl-confirm-strip">${i.thumb}<span class="sl-confirm-pills">${i.see3dPill}</span></div>`:"")+i.inspect+'<div class="sl-confirm-row">'+(i.see3dRow??"")+`<button type="button" class="sl-confirm-cancel">${L(i.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><span class="sl-confirm-add-t">${L(i.selectLabel)}</span></button></div></div>`}function pa(i,e){let t=q,{variable:n}=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(n?(0,Oe.t)("picker.flexiblePartyTypeWord",{typeWord:e.typeWord}):(0,Oe.t)("picker.wholeTypeWord",{typeWord:e.typeWord}))}</div><h2 class="sl-table-title" id="sl-table-title">${t(i.displayLabel??i.label)}</h2><p class="sl-table-copy" id="sl-table-copy">${t(n?y("picker.chooseGuestsCopy","Choose how many guests will sit together. This table is held exclusively for your party."):(0,Oe.t)("picker.allPlacesBookedTogether",{count:i.capacity}))}</p></div><div class="sl-table-body"><div class="sl-table-summary"><span>${t(e.categoryLabel)}</span>`+(e.suppressPricing?"":`<b data-table-unit>${t((0,Oe.t)("picker.perGuestPrice",{price:e.unitPrice}))}</b>`)+`<span class="muted">${t(y("picker.tableCapacity","Table capacity"))}</span><span>${t((0,Oe.t)("picker.guestsCount",{count:i.capacity}))}</span>`+(i.entrance?`<span class="muted">${t(y("picker.entrance","Entrance"))}</span><span>${t(i.entrance)}</span>`:"")+(e.suppressPricing?"":`<span class="muted">${t(y("picker.total","Total"))}</span><b data-table-total></b>`)+"</div>"+(n?`<label class="sl-table-qtylabel" id="sl-table-qty-label">${t(y("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(y("picker.fewerGuests","Fewer guests"))}">\u2212</button><output aria-live="polite" data-table-qty>${i.quantity}</output><button type="button" data-table-step="1" aria-label="${t(y("picker.moreGuests","More guests"))}">+</button></div><div class="sl-table-range">${t((0,Oe.t)("picker.chooseMinMaxGuests",{min:i.minOccupancy,max:i.maxOccupancy}))}</div>`:`<input type="hidden" data-table-qty value="${i.capacity}">`)+`<div class="sl-table-actions"><button type="button" class="sl-table-cancel">${t((0,Oe.t)("common.cancel"))}</button><button type="button" class="sl-table-confirm">${t(e.held?y("picker.updateTable","Update table"):n?y("picker.selectTable","Select table"):y("picker.selectWholeTable","Select whole table"))}</button></div></div></section>`}function ha(i,e){let t=Ph(i),n=document.createElement("div");n.className="sl-interrupt sl-access",n.setAttribute("role","status"),n.setAttribute("aria-live","polite");let o=document.createElement("div");o.className="sl-interrupt-card";let r=document.createElement("div");r.className="sl-interrupt-title",r.textContent=t.title;let s=document.createElement("div");s.className="sl-interrupt-body",s.textContent=t.body,o.append(r,s);let a=document.createElement("div");a.className="sl-interrupt-actions";let l=document.createElement("button");l.type="button",l.className="sl-interrupt-act";let c=document.createElement("span");c.className="sl-interrupt-act-icon",c.setAttribute("aria-hidden","true"),c.textContent="\u21BB";let d=document.createElement("span");return d.textContent=t.action,l.append(c,d),l.addEventListener("click",async()=>{n.classList.add("is-reloading"),l.disabled=!0;try{await e()}catch{}finally{n.isConnected&&(n.classList.remove("is-reloading"),l.disabled=!1)}}),a.appendChild(l),o.appendChild(a),n.appendChild(o),n}function ua(i,e){return`<div class="sl-a11yhead"><span class="sl-a11yhead-t">${L(i)}</span><button type="button" class="sl-a11yclose" data-a11y-close aria-label="${q(e)}"><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 ma(i){return i.map(e=>{let t=`<button type="button" role="switch" class="sl-a11yrow${e.className?` ${e.className}`:""}${e.on?" on":""}" data-a11y-row="${L(e.key)}" aria-checked="${e.on}" aria-pressed="${e.on}"`+(e.disabled?' disabled aria-disabled="true"':"")+`><span class="sl-a11yrow-i" aria-hidden="true">${e.iconHtml}</span><span class="sl-a11yrow-t"><span class="sl-a11yrow-l">${L(e.label)}</span></span>`+(e.count?`<span class="sl-a11yrow-c">${L(e.count)}</span>`:"")+'<span class="sl-a11yrow-s" aria-hidden="true"></span></button>';return e.note?`<div class="sl-a11yrow-w">${t}${ci({id:`sl-info-${q(e.key.replace(/[^A-Za-z0-9]+/g,"-"))}`,label:e.note,text:L(e.note)})}</div>`:t}).join("")}function ci(i){return`<span class="sl-info"${i.wrapRef?` data-ref="${q(i.wrapRef)}"`:""}><button type="button" class="sl-info-btn" data-sl-info aria-label="${q(i.label)}" aria-describedby="${q(i.id)}" aria-expanded="false"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 11v5"/><path d="M12 8h.01"/></svg></button><span class="sl-info-pop" role="tooltip" id="${q(i.id)}"${i.ref?` data-ref="${q(i.ref)}"`:""}>${i.text}</span></span>`}function fa(i){let e=Math.max(0,i),t=Math.floor(e/6e4),n=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return`${t}:${n}`}function ga(i){let e=i.performanceLabel?`<div class="sl-chip-when">${q(i.performanceLabel)}</div>`:"",t=i.performanceDates?.labels.length?`<div class="sl-chip-dates"><span class="sl-chip-dates-summary">${q(i.performanceDates.summary)}</span><span class="sl-chip-date-list">${i.performanceDates.labels.map(n=>`<span class="sl-chip-date">${q(n)}</span>`).join("")}</span></div>`:"";return e+Lh(i)+t}function Lh(i){let{d:e,area:t,label:n,objectType:o,quantity:r=1,identity:s}=i,a=F=>String(F??"\u2014").replace(/[&<>"]/g,X=>({"&":"&","<":"<",">":">",'"':"""})[X]),l=o==="ga"?"ga":e?.objectType??o,c=s?.displayType?.trim()||e?.displayType?.trim()||t?.displayType?.trim()||(l==="table"?y("picker.table","Table"):l==="booth"?y("picker.booth","Booth"):l==="ga"?y("picker.generalAdmission","General admission"):y("picker.row","Row")),d=s?.rowLabel??s?.displayLabel??e?.rowLabel??e?.displayLabel??t?.label??n,p=i.categoryLabel?.trim()??"",u="",h=[];l==="table"&&s?.bookingMode?(u=`${c} ${d}`,h.push([y("picker.guests","Guests"),String(r)])):l==="ga"?(u=String(t?.displayLabel??d),r>1&&h.push([y("picker.tickets","Tickets"),String(r)])):l==="booth"?(u=e?.sectionLabel??`${c} ${d}`,e?.sectionLabel&&h.push([c,String(d)])):!e?.sectionLabel&&!e?.rowLabel&&!e?.seatNumber?u=String(d):(u=e.sectionLabel??"",e.rowLabel&&h.push([c,String(fe(e)??e.rowLabel)]),e.seatNumber&&h.push([y("picker.seat","Seat"),String(e.seatNumber)]));let b=!u&&!!p,g=u||p||String(d),T=!!p&&!b&&p!==g,w=i.offerName?_n(i.offerName,a):"",v=h.map(([F,X])=>`<span class="sl-chip-seg" data-fit-seg><span class="w">${a(F)}</span> <b>${a(X)}</b></span>`);T&&v.push(`<span class="sl-chip-seg" data-fit-seg data-fit-type><span class="w">${a(p)}</span>${w}</span>`);let M=[g,...h.map(([F,X])=>`${F} ${X}`),T?p:"",i.offerName??""].filter(Boolean).join(" \xB7 ");return`<div class="sl-chip-id"><span class="sl-sr">${a(M)}</span><span class="sl-chip-name" aria-hidden="true">${a(g)}${T?"":w}</span>`+(v.length?`<span class="sl-chip-pos" aria-hidden="true">${v.join("<i>\xB7</i>")}</span>`:"")+"</div>"}function ir(i,e,t){return i.map(n=>`<option value="${t(n.id)}"${n.id===e?" selected":""}>${t(n.name)}</option>`).join("")}function Hh(i){let e=q;return` data-key="${e(i.key)}"`+(i.heldLabels.length?` data-held="${e(encodeURIComponent(i.heldLabels.join(`
|
|
186
186
|
`)))}"`:"")+(i.seatIds.length?` data-seat="${e(i.seatIds.join(" "))}"`:"")+(i.locateId?` data-locate="${e(i.locateId)}"`:"")}function ba(i){let e=q;return`<div class="sl-chip${i.held?" sl-held":""}${i.fresh?" sl-enter":""}"`+Hh(i)+">"+(i.held?i.stateHtml:`<span class="sl-chip-dot" style="background:${L(i.categoryColor)}" aria-hidden="true"></span>`)+`<div class="sl-chip-main">${i.identityHtml}`+(i.extrasHtml?`<div class="sl-chip-sub">${i.extrasHtml}</div>`:"")+`${i.noteHtml}</div>`+(i.amountText?`<span class="amt">${e(i.amountText)}</span>`:"")+i.railHtml+"</div>"}function nr(i,e){let t=q(i),n=e?q(e):"";return'<div class="sl-chip-rail">'+(e?`<button type="button" class="view" data-view-label="${n}" aria-label="${q((0,Ji.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>`:"")+`<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></div>`}function Fn(i,e){return new Set(i.filter(t=>(e[t.key]??0)<=0).map(t=>t.key))}function Vn(i,e){let t=(i.doc?.categories??[]).filter(s=>!s.notForSale),n=e?t.filter(s=>s.key===e):t;if(!n.length)return null;let o=Fn(n,i.categoryAvailability());return o.size<n.length||(i.currentHold()?.items??[]).some(s=>o.has(s.categoryKey))?null:Object.assign(new Error("seatlayer: that ticket type is sold out"),{status:409,code:"sold_out",reason:"sold_out"})}function ya(i){return i.confirming?`<div class="sl-ba" role="alert"><div class="sl-ba-title"><span class="spark" aria-hidden="true">\u2726</span>${y("picker.replaceCurrentChoices","Replace your current choices?")}</div><div class="sl-ba-replace"><b>${(0,Ji.t)("picker.willFindSeatsTogether",{count:i.quantity})}</b><span>${y("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>${y("picker.keepMine","Keep mine")}</button><button type="button" class="replace" data-ba-replace>${y("picker.findNewSeats","Find new seats")}</button></div></div>`:`<div class="sl-ba"><div class="sl-ba-title"><span class="sl-ba-title-t">${y("picker.findSeatsTogether","Find seats together")}</span>`+ci({id:"sl-info-best-seats",label:y("picker.aboutBestSeats","About finding seats together"),text:y("picker.closestGroupChosenInstantly","Closest available group, chosen instantly.")})+(i.offerPremium?`<button type="button" class="sl-ba-premium${i.premium?" on":""}" data-ba-premium aria-pressed="${i.premium?"true":"false"}"><span class="star" aria-hidden="true">\u2605</span>${y("picker.bestSeatsPremium","Best seats")}</button>`:"")+`</div><div class="sl-ba-qty"><button type="button" data-ba="-1" aria-label="${y("picker.fewerSeats","Fewer seats")}">\u2212</button><span>${i.quantity}</span><button type="button" data-ba="1" aria-label="${y("picker.moreSeats","More seats")}">+</button></div>`+(i.categories.length>1?`<select class="sl-ba-cat" aria-label="${q(y("picker.preferredTicketType","Preferred ticket type"))}" data-ba-cat><option value="">${q(y("picker.anyTicketType","Any ticket type"))}</option>`+i.categories.map(e=>e.soldOut?`<option value="${q(e.key)}" disabled>${q(`${e.label} \xB7 ${y("picker.soldOutTitle","Sold out")}`)}</option>`:`<option value="${q(e.key)}"${i.selectedCategory===e.key?" selected":""}>${q(e.label)}</option>`).join("")+"</select>":'<span class="sl-ba-cat" aria-hidden="true"></span>')+(i.zones.length?`<select class="sl-ba-zone" aria-label="${y("picker.preferredVenueZone","Preferred venue zone")}" data-ba-zone><option value="">${y("picker.anyVenueZone","Any venue zone")}</option>`+i.zones.map(e=>`<option value="${q(e.id)}"${i.selectedZone===e.id?" selected":""}>${q(e.label)}</option>`).join("")+"</select>":"")+`<button type="button" class="sl-ba-go${i.busy?" sl-busy":""}"${i.busy?" disabled":""}>`+(i.busy?`<span class="sl-ba-spin" aria-hidden="true"></span>${y("picker.findingBestSeats","Finding the best seats\u2026")}`:(0,Ji.tCount)("picker.findBestSeatsCount",i.quantity))+"</button>"+(i.reopened?`<button type="button" class="sl-ba-back" data-ba-close>${y("picker.keepMyPicks","Keep my picks")}</button>`:"")+"</div>"}function va(i){return i==="setup"||i==="testable"?{heading:y("picker.salesNotOpenPill","Sales haven\u2019t opened yet"),sentence:y("picker.salesNotOpenCopy","Tickets for this event aren\u2019t on sale yet.")}:i==="paused"?{heading:y("picker.salesPausedPill","Sales are paused"),sentence:y("picker.salesPausedCopy","Ticket sales are paused for now.")}:{heading:y("picker.salesClosedPill","Sales are closed"),sentence:y("picker.salesClosedCopy","Ticket sales for this event have ended.")}}function wa(i,e=!1){if(!e&&(i==="setup"||i==="testable"||i==="paused")){let t=va(i);return{pill:t.heading,cta:t.heading,toast:t.sentence}}return{pill:y("picker.salesClosedPill","Sales are closed"),cta:y("picker.salesClosedCta","Sales closed"),toast:y("picker.salesClosedToast","Sales are closed for this event.")}}function xa(i){if(i.salesClosed&&!i.hasPicks){let e=i.whenText?`<span class="when">${q(i.whenText)}</span>`:"",t=va(i.salesState);return`<div class="sl-closed-note" role="status"><b>${t.heading}</b><span>${t.sentence}${e}</span></div>`}return""}function ka(i){return i.hasGaAreas?i.seated?i.venue3d?y("picker.trayHintChoose3dOrStanding","Choose a seat in the 3D venue, or grab standing tickets below."):y("picker.trayHintTapOrStanding","Tap a seat on the map or grab standing tickets below."):i.venue3d?y("picker.gaTrayHintChoose3dArea","Choose an area in the 3D venue to select tickets."):y("picker.gaTrayHintTapArea","Tap an area on the map to choose tickets."):i.groupMode==="per_performance"?y("picker.groupPerPerformanceTrayHint","Choose seats for this performance, then complete every date above."):i.groupMode?y("picker.groupTrayHint","Choose seats once. The same seats will be held for every performance."):i.venue3d?y("picker.trayHintChoose3dOrBest","Choose a seat in the 3D venue, or let us pick the best available for you."):y("picker.trayHintTapOrBest","Tap a seat on the map, or let us pick the best available for you.")}var Ae=require("@seatlayer/core");var hi=require("@seatlayer/core");var jn=require("@seatlayer/core/core/color");function rt(i){if(!i)return null;let e=i.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 o=t.length<=4?[...t].map(r=>`${r}${r}`).join(""):t;return{r:Number.parseInt(o.slice(0,2),16),g:Number.parseInt(o.slice(2,4),16),b:Number.parseInt(o.slice(4,6),16)}}let n=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*[\d.]+%?)?\s*\)$/i.exec(e);return n?{r:Math.max(0,Math.min(255,Number(n[1]))),g:Math.max(0,Math.min(255,Number(n[2]))),b:Math.max(0,Math.min(255,Number(n[3])))}:null}function $n(i){return(0,jn.relativeLuminance255)([i.r,i.g,i.b])}function Ue(i,e){let t=rt(i),n=rt(e);if(!t||!n)return null;let o=Math.max($n(t),$n(n)),r=Math.min($n(t),$n(n));return(o+.05)/(r+.05)}function Bt(i,e="#172033",t="#eef1f8"){return(Ue(e,i)??0)>=(Ue(t,i)??0)?e:t}function Rh(i){return(0,jn.rgb255ToHex)(i.r,i.g,i.b)}function or(i,e,t){let n=rt(i),o=rt(e);if(!n||!o)return null;let r=Math.max(0,Math.min(1,t));return Rh({r:n.r*r+o.r*(1-r),g:n.g*r+o.g*(1-r),b:n.b*r+o.b*(1-r)})}var zn="#d8a425",Ih=.18;function Sa(i,e){let t=or(zn,e,Ih)??e;if((Ue(zn,t)??0)>=4.5)return zn;for(let n=.15;n<=1;n+=.05){let o=or(zn,i,1-n);if(o&&(Ue(o,t)??0)>=4.5)return o}return Bt(t)}function Ta(i,e,t,n){if((Ue(i,t)??4.5)>=4.5&&(Ue(i,n)??4.5)>=4.5)return i;if(!rt(i)||!rt(e))return e;for(let o=.15;o<=1;o+=.05){let r=or(i,e,1-o);if(r&&(Ue(r,t)??0)>=4.5&&(Ue(r,n)??0)>=4.5)return r}return e}function Ea(i){return{"--sl-chrome":i?"#d6dce6":"#556278","--sl-chrome-line":i?"rgba(23,32,51,.55)":"rgba(233,238,247,.55)"}}var Ca=["--sl-bg","--sl-surface","--sl-text","--sl-muted","--sl-line","--sl-accent-text","--sl-warn-text","--sl-chrome","--sl-chrome-line"];function Aa(i,e){let t=e??i["--sl-bg"],n=rt(t)?Bt(t)==="#172033":!1,o=rt(i["--sl-bg"])?Bt(i["--sl-bg"])==="#172033":!1;if(n===o)return null;let r=n?"#ffffff":"#1a2234",s=Bt(t),a=i["--sl-accent"];return{"--sl-bg":t,"--sl-surface":r,"--sl-text":s,"--sl-muted":n?"#667085":"#a5aec2","--sl-line":n?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)","--sl-accent-text":Ta(a,s,t,r),...Ea(n),"--sl-warn-text":Sa(s,r)}}var Oh="#f7f8fb",Pa={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 _h(){try{return window.matchMedia?.("(prefers-color-scheme: dark)").matches===!0}catch{return!1}}function en(i){if(i)return i==="auto"?_h()?"dark":"light":i}function di(i,e=i?.mode){if(i?.map)return i.map;let t=en(e);return t?{background:Pa[t].map}:null}function Kn(i){let e;try{e=window.matchMedia?.("(prefers-color-scheme: dark)")}catch{return()=>{}}if(!e)return()=>{};let t=n=>i(n.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 pi(i,e,t){let n=t?Pa[t]:null,o=e?.background??n?.background??i?.background??Oh,r=rt(o)?Bt(o)==="#172033":!1,s=e?.surface??n?.surface??(r?"#ffffff":"#1a2234"),a=e?.accent??i?.accent??"#f4b740",l=i?.accentInk,c=e?.accentInk??(l&&(Ue(l,a)??4.5)>=4.5?l:Bt(a,"#1a1200","#ffffff")),d=n?void 0:i?.textColor,p=e?.text??n?.text??(d&&(Ue(d,o)??4.5)>=4.5&&(Ue(d,s)??4.5)>=4.5?d:Bt(o));return{"--sl-accent":a,"--sl-accent-ink":c,"--sl-accent-text":Ta(a,p,o,s),"--sl-warn-text":Sa(p,s),"--sl-bg":o,"--sl-surface":s,"--sl-text":p,"--sl-muted":e?.muted??n?.muted??(r?"#667085":"#a5aec2"),"--sl-line":e?.line??n?.line??(r?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)"),...Ea(r),"--sl-scrim-ink":r?"rgba(16,22,36,1)":"rgba(4,7,13,1)","--sl-font":e?.fontFamily??i?.fontFamily??"-apple-system,BlinkMacSystemFont,'Segoe UI',Inter,sans-serif","--sl-radius":`${e?.radius??14}px`}}function Nh(){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 Ma(i,e,t){let n=document.createElement("div");n.className="sl-picker",n.tabIndex=-1,n.lang=(0,hi.getLocale)(),n.dir=(0,hi.localeDirection)(),i.appendChild(n),Object.entries(pi(void 0,t)).forEach(([r,s])=>n.style.setProperty(r,s)),n.innerHTML=`
|
|
187
187
|
<div class="sl-head">
|
|
188
188
|
<div class="sl-logo" data-ref="logo"></div>
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as fi,b,c as We,d as gi,e as zr,f as $r,g as _,h as jr,i as bi,j as yi,k as vi,l as wi,m as ft,n as Gr,o as Kr,p as Ur,q as qr,r as xi,s as Zr,t as Qr}from"./chunk-X7FRGMS2.js";import{a as Vr}from"./chunk-ICMSBXRJ.js";import{a as Wr,b as Yr,d as ki,e as gt,f as Si,g as bt}from"./chunk-UBFNMA7U.js";import{a as h,b as C,c as x,d as w}from"./chunk-OSZ7DOEH.js";import{PickerController as hp,formatMoney as up,getLocale as Zn,loadLocale as mp,localeDirection as fp,LOCALE_NAMES as gp,resolveLocale as bp,setStringOverrides as yp,t as me}from"@seatlayer/core";var Rc=/^[0-9A-Za-z.+-]{1,24}$/,Ic=Rc.test("0.106.1")?"0.106.1":"",Oc={host:"web",platform:"web",bundle:Ic,protocol:0,chromeOwner:"web"},_c={...Oc},Ti=null,Xr=null;function Nc(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():0}function Dc(){let i=e=>Math.max(0,Math.round(e*100)/100);return{bootMs:i(Nc()),documentMs:Ti==null?0:i(Ti),handshakeMs:Ti==null||Xr==null?0:i(Xr-Ti)}}function Jr(){let{host:i,platform:e,bundle:t,protocol:n,chromeOwner:r}=_c,o=Dc();return{host:i,platform:e,...t?{bundle:t}:{},...n?{protocol:n}:{},chromeOwner:r,bootMs:o.bootMs,documentMs:o.documentMs,handshakeMs:o.handshakeMs}}var eo=new Set,to=new Map;function Ee(i){return eo.has(i)?"repeat":"cold"}function Ei(i){let e=Ee(i);return eo.add(i),e}function se(i){return typeof i=="number"&&Number.isFinite(i)&&i>=0?Math.round(i):0}function qt(){return typeof location>"u"?!1:/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(location.hostname)}function Bc(i){if(!/^[A-Za-z0-9_-]{1,80}$/.test(i.event))return null;let e=i.performanceProfile??{};return{event:i.event,scope:i.scope,surface:i.surface,outcome:i.outcome,stage:i.stage?.slice(0,32)??"",ms:se(i.ms),api:se(e.loadChartAndStatuses)||se(e.loadChart),scene:se(e.buildScene),panel:se(e.buildBuyerControls),paint:se(e.firstPaint),normalize:se(e.normalizeBuyerModel),renderer:se(e.createRenderer),seats:se(i.seats),floors:se(i.floors),view:i.view??"map",load:i.load??Ee(i.event),transport:i.transport??"pubapi",...Jr(),availabilityMs:se(e.loadStatuses),...typeof i.revealWaitMs=="number"?{revealWaitMs:se(i.revealWaitMs)}:{},...typeof i.handoverMs=="number"?{handoverMs:se(i.handoverMs)}:{},mounts:(to.get(i.event)??0)+1,reconnects:se(i.reconnects)}}var Fc=new Set;function ve(i){let e=Bc(i);if(e){to.set(i.event,e.mounts);for(let t of Fc)try{t(e)}catch{}typeof fetch>"u"||qt()||fetch(`${i.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 Vc="realtime.fallback_polling",io=new Set;function zc(i){let e=/^(wss?):\/\/([^/]+)(.*?)\/pub\/events\/([^/?#]+)\/subscribe(?:[?#]|$)/.exec(i);if(!e)return null;let t;try{t=decodeURIComponent(e[4])}catch{return null}return/^[A-Za-z0-9_-]{1,80}$/.test(t)?{apiBase:`${e[1]==="wss"?"https":"http"}://${e[2]}${e[3]}`,eventKey:t}:null}function no(i){let e=zc(i);return!e||io.has(e.eventKey)||(io.add(e.eventKey),typeof fetch>"u"||qt())?!1:(fetch(`${e.apiBase}/pub/telemetry/client-error`,{method:"POST",headers:{"Content-Type":"application/json","X-SeatLayer-Client":"1"},body:JSON.stringify({surface:"picker",errorCode:Vc,eventKey:e.eventKey}),credentials:"omit",keepalive:!0}).catch(()=>{}),!0)}var Ye="seatlayer.v1",ro="\0",oo=4401,$c=15e3,jc=25e3,Gc=1e4,so=5e3,Kc=3,Uc=15e3,ao=6e4;function qc(i){let e=typeof i.default=="string"?i.default:"free",t={};if(i.seats&&typeof i.seats=="object")for(let[n,r]of Object.entries(i.seats))typeof r=="string"&&r!==e&&(t[n]=r);return{default:e,exceptions:t}}function Wc(i,e){if(!i||i.default!==e.default)return null;let t=[];for(let[n,r]of Object.entries(e.exceptions))i.exceptions[n]!==r&&t.push({label:n,status:r});for(let n of Object.keys(i.exceptions))n in e.exceptions||t.push({label:n,status:e.default});return t}function Yc(i,e){for(let t of e)t.status===i.default?delete i.exceptions[t.label]:i.exceptions[t.label]=t.status}function lo(i){if(/(?:^|[?&#])(?:token|access_token|bearer|authorization|ticket|tkt|bse)=/i.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL");if(/\bbse_[A-Za-z0-9._-]+/.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL")}var Ce=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.failedUpgrades=0;this.pollTimer=null;this.fellBack=!1;this.reconnectCount=0;this.opts=e,typeof e.url=="string"&&lo(e.url)}get polling(){return this.pollTimer!==null}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(),this.stopPolling();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.failedUpgrades=0,this.start()}async connect(){if(this.stopped)return;let e=[Ye];if(this.opts.mintTicket){let a;try{a=await this.opts.mintTicket()}catch(l){this.reportIfAccessError(l),this.scheduleReconnect();return}if(this.stopped)return;a?.protocols?.length?(e=[...a.protocols],e.includes(Ye)||e.unshift(Ye)):a?.ticket&&(e=[Ye,`tkt.${a.ticket}`])}let t=this.version!==null;t&&e.push(`sv.${this.version}`);let n=typeof this.opts.url=="function"?this.opts.url():this.opts.url,r=this.useQueryMarker?`${n}${n.includes("?")?"&":"?"}pv=1`:n;lo(r);let o;try{o=(this.opts.socketFactory??((l,c)=>new WebSocket(l,c)))(r,e)}catch{this.upgradeFailed(),this.scheduleReconnect();return}this.ws=o;let s=!1;o.onopen=()=>{this.ws===o&&(s=!0,this.attempt=0,this.failedUpgrades=0,this.stopPolling(),this.v1=o.protocol===Ye,this.v1||(this.useQueryMarker=!0),this.startKeepalive(o),t?this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync()},so):this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync({reason:"connect"})},so))},o.onmessage=a=>{if(this.ws!==o)return;let l;try{l=JSON.parse(typeof a.data=="string"?a.data:"")}catch{return}!l||typeof l!="object"||this.handleFrame(l)},o.onclose=a=>{if(this.ws===o){if(this.ws=null,this.clearTimers(),!s&&a?.code!==oo&&this.upgradeFailed(),a?.code===oo){if(a.reason==="access_expired"){this.scheduleReconnect();return}if(a.reason==="idle_expired"&&this.opts.onIdleExpired){this.stopped=!0,this.stopPolling(),this.opts.onIdleExpired();return}this.stopped=!0,this.stopPolling(),this.opts.onAccessUnavailable?.({reason:"revoked",code:"access_revoked",retryable:!1});return}this.scheduleReconnect()}},o.onerror=()=>{try{o.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 n=Array.isArray(e.hidden)?e.hidden:[],r=Array.isArray(e.closed)?e.closed:[],o=n.join(ro),s=r.join(ro);(o!==this.hidden||s!==this.closedSections)&&(this.hidden=o,this.closedSections=s,this.opts.sink.onSections?.(n,r,{withInventory:t==="snapshot"||!!e.seats}))}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 n=qc(e),r=Wc(this.projection,n);this.projection=n,r===null?this.opts.sink.applyProjection?this.opts.sink.applyProjection(n):this.opts.sink.resync():r.length&&this.opts.sink.applyStatuses(r);return}if(t==="delta"&&Array.isArray(e.changes)){this.answered();let n=e.changes.filter(r=>typeof r?.label=="string"&&typeof r?.status=="string").map(r=>({label:r.label,status:r.status}));if(!n.length)return;this.projection&&Yc(this.projection,n),this.opts.sink.applyStatuses(n)}}}}answered(){this.resumeTimer&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}reportIfAccessError(e){let t=e?.reason;e?.name==="BuyerAccessUnavailableError"&&(this.stopped=!0,this.stopPolling(),this.opts.onAccessUnavailable?.({reason:t??"invalid",code:e.code,status:e.status,retryable:t==="paused"}))}upgradeFailed(){this.failedUpgrades+=1,this.failedUpgrades>=Kc&&this.startPolling()}startPolling(){if(!(this.pollTimer||this.stopped)){if(!this.fellBack){this.fellBack=!0;try{this.opts.onFallbackPolling?.()}catch{}let e=typeof this.opts.url=="function"?this.opts.url():this.opts.url;no(e)}this.pollTimer=setInterval(()=>{if(this.stopped){this.stopPolling();return}typeof document<"u"&&document.hidden||Promise.resolve().then(()=>this.opts.poll?this.opts.poll():this.opts.sink.resync({reason:"frame"})).catch(()=>{})},Uc)}}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}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{}},Gc)}},jc)}scheduleReconnect(){if(this.stopped||this.reconnectTimer)return;let e=Math.min(this.attempt++,5),t=Math.min(1e3*2**e,$c),n=this.pollTimer?ao/2+Math.random()*ao/2:Math.random()*t;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.reconnectCount+=1,this.connect()},n)}get reconnects(){return this.reconnectCount}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 Zc(i){return i==="blocked"?"not_for_sale":i==="held"||i==="booked"||i==="free"||i==="not_for_sale"?i:"free"}function Wt(i,e={}){let t=n=>{let r=i.tableSelection(n);if(r)return r.physicalSeatIds;let o=i.idForLabel(n);return o?[o]:[]};return{applyStatuses(n){let r=new Set([...i.currentHold()?.labels??[],...e.ownLabels?.()??[]]),o={free:[],held:[],booked:[],not_for_sale:[]},s=[],a=[],l=new Map(i.getSelection().map(c=>[c.label,c.id]));for(let c of n){let d=t(c.label);if(!d.length)continue;let u=Zc(c.status);if(o[u].push(...d),e.flashOnLiveChange&&u!=="free"&&!r.has(c.label)&&d.some(m=>i.getStatus(m)==="free")){let m=u==="held"?"#f4b740":"#f43f5e";for(let p of d)s.push({id:p,color:m})}u!=="free"&&!r.has(c.label)&&l.has(c.label)&&a.push(c.label)}for(let c of["free","held","booked","not_for_sale"])o[c].length&&i.setStatus(o[c],c);for(let c of s)i.flashSeat(c.id,c.color);if(a.length){let c=a.flatMap(u=>t(u));c.length&&i.deselect(c);let d=n.some(u=>u.status==="blocked"&&a.includes(u.label));e.onSelectedObjectUnavailable?.(a,d?"ineligible":"taken")}e.onStatusChange?.()},...i.applyProjection?{applyProjection:n=>{i.applyProjection(n)}}:{},async resync(n){await(i.resync?i.resync(n):i.refresh())},onSections(n,r,o){o?.withInventory||(i.resync?i.resync({reason:"frame"}):i.refresh()),e.onSections?.(n,r,o)}}}var V=class extends Error{constructor(e,t,n,r,o,s,a,l){super(t),this.name="ApiError",this.status=e,this.code=n,this.conflicts=r,this.reason=o,this.retryAfterS=s,this.notice=a,l?.fields&&(this.fields=l.fields),typeof l?.retryable=="boolean"&&(this.retryable=l.retryable),l?.hint&&(this.hint=l.hint),l?.serverMessage&&(this.serverMessage=l.serverMessage)}},co=10,po=1;function Yt(i,e){let t=(i??"").trim();if(t){let n=Number(t);if(Number.isFinite(n)&&n>=0)return Math.ceil(n);let r=Date.parse(t);if(Number.isFinite(r))return Math.max(0,Math.ceil((r-Date.now())/1e3))}if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return Math.ceil(e)}function Qc(i){let e=i;return!!e&&typeof e.ticketKey=="string"&&typeof e.label=="string"&&Number.isFinite(e.unitIndex)&&Number.isFinite(e.quantity)&&(e.displayLabel===void 0||typeof e.displayLabel=="string")}var Xc={seat_conflict:"taken",conflict:"taken",channel_assignment_conflict:"ineligible",allocation_exhausted:"exhausted"};function Jc(){return typeof crypto>"u"?null:typeof crypto.randomUUID=="function"?crypto.randomUUID():typeof crypto.getRandomValues!="function"?null:Array.from(crypto.getRandomValues(new Uint8Array(18)),i=>i.toString(16).padStart(2,"0")).join("")}function ed(i,e){let t=e.map(n=>[n.label,n.tierId??null,n.quantity??null]).sort((n,r)=>n[0]<r[0]?-1:n[0]>r[0]?1:0);return JSON.stringify([i,t])}function td(i){return i instanceof V?i.status===408||i.status===429||i.status>=500:!0}function ho(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`viewer_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`}var Oe=class{constructor(e,t={}){this.base=e;this.viewerId=ho();this.holdAttempt=null;this.holdIdempotency=!0;this.ticketKeysByHold=new Map;this.access=t.access,this.onObjectUnavailable=t.onObjectUnavailable;let n=t.referral?.trim();this.referral=n?n.slice(0,120):void 0}rotateViewerId(){this.viewerId=ho()}async pickerIdleMinutes(){return null}get accessScoped(){return!!this.access?.configured}async request(e,t={},n={}){let r=t.method??"GET",o={},s;t.body!==void 0&&(o["Content-Type"]="application/json",s=JSON.stringify(t.body));let a=await this.access?.authorization(n.auth?"unauthorized":"initial");if(a&&(o.Authorization=a),t.idempotency){let m=this.holdAttemptKey(`${t.idempotency.binding}\0${a??""}`);t.idempotency.used(m??void 0),m&&(o["Idempotency-Key"]=m)}let l=r==="GET"||e.endsWith("/hold/resume")?new AbortController:null,c=l?setTimeout(()=>l.abort(),4e4):null,d,u;try{d=await fetch(`${this.base}${e}`,{method:r,headers:o,body:s,credentials:"omit",...l?{signal:l.signal}:{}}),u=(d.headers.get("content-type")??"").includes("application/json")?await d.json().catch(p=>{if(l?.signal.aborted)throw p;return null}):null}finally{c!==null&&clearTimeout(c)}if(!d.ok){let m=u,p=m?.code??m?.error,v=d.status===401&&p==="buyer_access_invalid"&&e.endsWith("/hold/resume");if(this.access?.configured&&!v&&(d.status===401||d.status===403||d.status===422)&&await this.access.handleFailure(d.status,p)&&!n.auth)return this.request(e,t,{...n,auth:!0});if(d.status===409){let T=p?Xc[p]:void 0,S=m?.conflicts?.map(y=>y.label)??t.labels??[];T&&this.onObjectUnavailable?.({labels:S,reason:T,code:p})}let g;if(d.status===429&&(g=Yt(d.headers.get("Retry-After"),m?.retryAfterSeconds)??po,r==="GET"&&!n.rateLimit&&g<=co))return await new Promise(T=>setTimeout(T,g*1e3)),this.request(e,t,{...n,rateLimit:!0});throw d.status===503&&(g=Yt(d.headers.get("Retry-After"),m?.retryAfterSeconds)),new V(d.status,m?.error??`request_failed_${d.status}`,p,m?.conflicts,m?.reason,g,typeof m?.notice=="string"&&m.notice?m.notice:void 0,{...Array.isArray(m?.fields)?{fields:m.fields}:{},...typeof m?.retryable=="boolean"?{retryable:m.retryable}:{},...typeof m?.hint=="string"&&m.hint?{hint:m.hint}:{},...typeof m?.message=="string"&&m.message?{serverMessage:m.message}:{}})}return u}async requestBlob(e,t={}){let n={},r=await this.access?.authorization(t.auth?"unauthorized":"initial");r&&(n.Authorization=r);let o=await fetch(`${this.base}${e}`,{method:"GET",headers:n,credentials:"omit"});if(o.ok)return o.blob();let a=(o.headers.get("content-type")??"").includes("application/json")?await o.json().catch(()=>null):null,l=a?.code??a?.error;if(this.access?.configured&&(o.status===401||o.status===403||o.status===422)&&await this.access.handleFailure(o.status,l)&&!t.auth)return this.requestBlob(e,{...t,auth:!0});let c;if(o.status===429&&(c=Yt(o.headers.get("Retry-After"),a?.retryAfterSeconds)??po,!t.rateLimit&&c<=co))return await new Promise(d=>setTimeout(d,c*1e3)),this.requestBlob(e,{...t,rateLimit:!0});throw new V(o.status,a?.error??`request_failed_${o.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"))}async objects(e){return{...await this.request(`/pub/events/${encodeURIComponent(e)}/objects?compact=1`),fetchedAt:Date.now()}}hold(e,t,n,r){let o=`/pub/events/${encodeURIComponent(e)}/hold?pricingContract=matrix-v1`,s={method:"POST",body:{selections:t,...n?{ttlMs:n}:{},...r?{replaceHoldId:r}:{},...this.referral?{referral:this.referral}:{}},labels:t.map(l=>l.label)};return(r||!this.holdIdempotency?this.request(o,s):this.keyedHold(o,s,ed(e,t))).then(l=>this.noteTicketKeys(l,r))}holdAttemptKey(e){if(this.holdAttempt?.binding===e)return this.holdAttempt.key;let t=Jc();return this.holdAttempt=t?{binding:e,key:t}:null,t}endHoldAttempt(e){e&&this.holdAttempt?.key===e&&(this.holdAttempt=null)}async keyedHold(e,t,n,r=!1){let o;try{let s=await this.request(e,{...t,idempotency:{binding:n,used:a=>{o=a}}});return this.endHoldAttempt(o),s}catch(s){if(td(s))throw s;this.endHoldAttempt(o);let a=s.code;if(a==="idempotency_key_reused"&&!r)return this.keyedHold(e,t,n,!0);if(a==="invalid_idempotency_key")return this.holdIdempotency=!1,this.request(e,t);throw s}}noteTicketKeys(e,t){if(t&&this.ticketKeysByHold.delete(t),!e?.holdId)return e;let n=Array.isArray(e.ticketKeys)&&e.ticketKeys.every(o=>typeof o=="string")?[...e.ticketKeys]:null,r=Array.isArray(e.ticketKeyDetails)&&e.ticketKeyDetails.every(Qc)?e.ticketKeyDetails.map(({ticketKey:o,label:s,unitIndex:a,quantity:l,displayLabel:c})=>({ticketKey:o,label:s,unitIndex:a,quantity:l,...c?{displayLabel:c}:{}})):null;return n||r?this.ticketKeysByHold.set(e.holdId,{...n?{ticketKeys:n}:{},...r?{ticketKeyDetails:r}:{}}):this.ticketKeysByHold.delete(e.holdId),e}ticketKeysFor(e){let t=this.ticketKeysByHold.get(e);return t?{...t}:null}bestAvailable(e,t,n,r,o){return this.request(`/pub/events/${encodeURIComponent(e)}/best-available?pricingContract=matrix-v1`,{method:"POST",body:{qty:t,...n?{categoryKey:n}:{},...r?{zoneId:r}:{},...o?{ttlMs:o}:{},...this.referral?{referral:this.referral}:{}}}).then(s=>this.noteTicketKeys(s))}resume(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/hold/resume`,{method:"POST",body:{holdId:t}}).then(n=>this.noteTicketKeys(n))}release(e,t,n){return this.holdAttempt=null,this.request(`/pub/events/${encodeURIComponent(e)}/release`,{method:"POST",body:{labels:t,holdId:n}}).then(r=>{let o=this.ticketKeysByHold.get(n);if(o){let s=new Set(r?.released??t);this.ticketKeysByHold.set(n,{...o.ticketKeys?{ticketKeys:o.ticketKeys.filter(a=>!s.has(a))}:{},...o.ticketKeyDetails?{ticketKeyDetails:o.ticketKeyDetails.filter(a=>!s.has(a.ticketKey))}:{}})}return r})}extend(e,t,n){return this.request(`/pub/events/${encodeURIComponent(e)}/extend`,{method:"POST",body:{holdId:t,...n?{ttlMs:n}:{}}})}paymentOptions(e){return this.request(`/pub/events/${encodeURIComponent(e)}/payment-options`)}availability(e,t=!1){return this.request(`/pub/events/${encodeURIComponent(e)}/availability?pricingContract=matrix-v1${t?"&live=1":""}`)}startCheckout(e,t){return this.holdAttempt=null,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"),n=new URLSearchParams({surface:"picker",viewerId:this.viewerId});return`${t}/pub/events/${encodeURIComponent(e)}/subscribe?${n}`}socketUrl(e){return this.accessScoped?"":this.subscribeUrl(e)}socketProtocols(e){return this.accessScoped?[]:[Ye]}createRealtime(e,t){return this.accessScoped?null:new Ce({url:this.subscribeUrl(e),sink:t})}};import{t as Mo,tCount as ad}from"@seatlayer/core";import{compactRowLabel as id,seatNoteRowModel as nd,seatTypeIconSvg as go,t as Ze}from"@seatlayer/core";import{seatConfidenceDisclosure as rd}from"@seatlayer/core/core/seatConfidence";function Ln(i){return/early[\s-]*bird/i.test(i?.trim()??"")}function uo(i){return Ln(i)?'<svg class="sl-offer-icon sl-offer-icon-discount" viewBox="0 0 32 32" aria-hidden="true"><defs><linearGradient id="sl-offer-discount-gradient" x1="29.492" y1="0" x2="20.028" y2="36.183" gradientUnits="userSpaceOnUse"><stop stop-color="#FD6D00"/><stop offset="1" stop-color="#F8B302"/></linearGradient></defs><path d="M16 22.751a1.071 1.071 0 1 0 0-2.142 1.071 1.071 0 0 0 0 2.142ZM16 11.39a1.071 1.071 0 1 0 0-2.141 1.071 1.071 0 0 0 0 2.141Z" fill="url(#sl-offer-discount-gradient)"/><path d="M31.137.863A2.928 2.928 0 0 0 29.054 0H17.836c-.787 0-1.527.307-2.083.863L.863 15.753A2.93 2.93 0 0 0 0 17.836c0 .787.307 1.527.863 2.083l11.218 11.218A2.927 2.927 0 0 0 14.164 32c.787 0 1.527-.307 2.083-.863l14.89-14.89A2.928 2.928 0 0 0 32 14.164V2.946c0-.788-.307-1.527-.863-2.083ZM16 7.374a2.946 2.946 0 1 1 0 5.891 2.946 2.946 0 0 1 0-5.891Zm0 17.252a2.946 2.946 0 1 1 0-5.891 2.946 2.946 0 0 1 0 5.891Zm6.025-7.689H9.975a.938.938 0 0 1 0-1.875h12.05a.938.938 0 0 1 0 1.875Zm4.017-10.041a.938.938 0 1 1 0-1.875.938.938 0 0 1 0 1.875Z" fill="url(#sl-offer-discount-gradient)"/></svg>':'<svg class="sl-offer-icon sl-offer-icon-tag" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.6 13.6 13.7 20.5a2 2 0 0 1-2.8 0L3.5 13.1A2 2 0 0 1 3 11.7V4h7.7a2 2 0 0 1 1.4.6l8.5 8.5a.7.7 0 0 1 0 .5Z"/><circle cx="7.5" cy="8.5" r="1"/></svg>'}function Ci(i,e){return`<span class="sl-offer-mark" role="img" aria-label="${e(i)}" title="${e(i)}">${uo(i)}</span>`}function Ai(i,e){return`<span class="sl-offer-badge">${uo(i)}<span>${e(i)}</span></span>`}function mo(i,e=Date.now()){let t=i-e;if(t<=0)return null;let n=Math.max(1,Math.ceil(t/6e4)),r=Math.floor(n/1440),o=Math.floor(n%1440/60),s=n%60;return`${(r>0?[`${r}d`,...o?[`${o}h`]:[]]:[...o?[`${o}h`]:[],...s||!o?[`${s}m`]:[]]).join(" ")} left`}function Mn(i){return String(i??"\u2014").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function E(i){return String(i??"").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function Hn(i){return i?nd(i).map(e=>({...e,title:b(e.titleKey,e.titleFallback)})):[]}function bo(i){return Hn(i).map(e=>e.title)}function Qe(i,e={}){return Rn(Hn(i),e)}function Rn(i,e={}){if(!i.length)return"";let t=e.compact?15:17,n=i.map(r=>`<div class="sl-note sl-note-${E(r.tone)}"><span class="sl-note-i">${go(r.icon,{size:t})}</span><span class="sl-note-t"><b>${E(r.title)}</b>`+(r.note?`<span class="sl-note-n">${E(r.note)}</span>`:"")+"</span></div>").join("");return`<div class="sl-notes${e.compact?" compact":""}">${n}</div>`}function yo(i){return Hn(i).map(e=>{let t=E(e.note?`${e.title}: ${e.note}`:e.title);return`<span class="sl-cx-mark sl-cx-mark-${E(e.tone)}" role="img" aria-label="${t}" title="${t}">${go(e.icon,{size:13})}</span>`}).join("")}function Pi(i){let e=[];return i?.restrictedView&&e.push(b("picker.restrictedView","Restricted view")),i?.obstructedView&&e.push(b("picker.obstructedView","Obstructed view")),e}function In(i,e){if(!i)return"";let t=e?b("picker.viewFromThisSeat","View from this seat"):b("picker.seeItIn3d","See it in 3D"),n=e?b("picker.viewFromHere","View from here"):t;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>${n}</span></button>`}function vo(i,e){if(!e)return"";let t=e,n=t.includes(i.id),r=n?t.length>1?b("picker.openComparison","Open comparison"):b("picker.savedForComparison","Saved for comparison"):t.length?b("picker.compareWithSaved","Compare with saved"):b("picker.saveToCompare","Save to compare");return`<button type="button" class="sl-confirm-compare"${n&&t.length===1?" disabled":""}><span aria-hidden="true">\u21C4</span><span>${E(r)}</span></button>`}function wo(i,e,t){if(!t)return"";let n=rd(i.confidenceEvidence),r=n.modeledTarget??n.reality;return`<button type="button" class="sl-confirm-confidence" aria-label="Open seat confidence passport for ${E(i.displayLabel??i.label)}"><span><em>${E(e)}</em><strong>${E(n.headline)}</strong><small>${E(r)}</small></span><b>Passport</b></button>`}function q(i){let e=i?.rowLabel,t=i?.sectionLabel;if(!e||!t)return e;for(let n of["-"," ","\xB7","/","_"]){let r=`${t}${n}`;if(e.startsWith(r)&&e.length>r.length)return e.slice(r.length)}return id(e,t)}function od(i){switch(i){case"paused":return{title:b("picker.accessPausedTitle","These seats are on hold right now"),body:b("picker.accessPausedBody","The organizer has paused this selection. Try again in a few minutes."),action:b("picker.accessRetry","Try again")};case"revoked":return{title:b("picker.accessRevokedTitle","This access link is no longer active"),body:b("picker.accessRevokedBody","Ask whoever sent you here for a new link to keep booking these seats."),action:b("picker.accessRefresh","Refresh")};case"idle":return{title:b("picker.idlePausedTitle","Your session expired"),body:b("picker.idlePausedBody","You were away for a while. Refresh to see which seats are free now."),action:b("picker.idleRefresh","Show latest seats")};case"no_token":case"provider_failed":return{title:b("picker.accessExpiredTitle","The seat map timed out"),body:b("picker.accessExpiredBody","Any seats you\u2019re holding stay held. Refresh to see what\u2019s available now."),action:b("picker.accessRefresh","Refresh")};default:return{title:b("picker.accessInvalidTitle","We couldn\u2019t verify your access"),body:b("picker.accessInvalidBody","You can still book anything shown as available. Contact whoever sent you here for access to the rest."),action:b("picker.accessRefresh","Refresh")}}}var sd=6;function xo(i,e,t){let n=Mn;return[i?.sectionLabel?`<div class="sl-confirm-field sl-confirm-sec${i.sectionLabel.length>sd?" sl-confirm-sec-long":""}"><span class="sl-confirm-key">${b("picker.section","Section")}</span><span class="sl-confirm-value">${n(i.sectionLabel)}</span></div>`:"",i?.rowLabel||i?.objectType==="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${n(t)}</span><span class="sl-confirm-value">${n(q(i)??i?.displayLabel??e)}</span></div>`:"",i?.objectType!=="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${b("picker.seat","Seat")}</span><span class="sl-confirm-value">${n(i?.seatNumber??i?.displayLabel??e)}</span></div>`:""].filter(Boolean).join("")}function ko(i,e,t){let n=Mn,r=i?.objectType==="booth",o=i?.objectType==="table"&&!!i?.bookingMode,s=r||o||!i?.seatNumber,a=i?.sectionLabel??(s?void 0:i?.displayLabel),l=o?`${b("picker.guests","Guests")} ${i?.bookingMode==="variable"?`${i?.minOccupancy}\u2013${i?.maxOccupancy}`:i?.capacity}`:void 0,d=(s?[l,a?i?.rowLabel??i?.displayLabel:void 0]:[i?.rowLabel?`${t} ${q(i)??""}`.trim():void 0,`${b("picker.seat","Seat")} ${i?.seatNumber??e}`]).filter(Boolean).join(" \xB7 ");return(a?`<span class="sl-confirm-place">${n(a)}</span>`:"")+(d?`<span class="sl-confirm-pos">${a?" \xB7 ":""}${n(d)}</span>`:"")+(a||d?"":`<span class="sl-confirm-pos">${n(e)}</span>`)}function So(i,e){if(!i)return"";let t=e?b("picker.viewFromThisSeat","View from this seat"):b("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 To(i,e){if(!i||e)return"";let t=b("picker.seeItIn3d","See it in 3D");return`<button type="button" class="sl-confirm-3drow" 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 fo(i){return i.buyerMessage?.trim()||(i.restriction==="companion"?b("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):void 0)}function Li(i,e,t,n=()=>{}){let r=Mn;if(i.length>1)return`<fieldset class="sl-confirm-tiers"><legend><span>${b("picker.ticketType","Ticket type")}</span></legend>`+i.map(a=>{let l=fo(a),c=n(a);return`<button type="button" class="sl-confirm-tier" data-confirm-tier="${r(a.id)}"${c?` data-offer-name="${r(c)}"`:""} aria-pressed="${a.id===e}"><span class="sl-confirm-tier-copy"><span class="sl-confirm-tier-name">${r(a.name)}`+(c?`<span class="sl-confirm-tier-offer">${Ai(c,r)}</span>`:"")+"</span>"+(l?`<small class="sl-confirm-tier-note">${r(l)}</small>`:"")+`</span><span class="sl-confirm-tier-price">${r(t(a))}</span></button>`}).join("")+"</fieldset>";let o=i[0],s=o?fo(o):void 0;return s?`<p class="sl-confirm-tier-note">${r(s)}</p>`:""}function Eo(i){return'<div class="sl-confirm-grid">'+i.identityFields+`</div><div class="sl-confirm-cat"><span class="sl-confirm-cat-name">${E(i.categoryLabel)}</span>`+(i.priceLabel?`<span class="sl-confirm-price">${E(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-id">'+i.marker+`<span class="sl-confirm-dot" style="background:${E(i.categoryColor)}" aria-hidden="true"></span><span class="sl-sr">${E(i.categoryLabel)}</span><span class="sl-confirm-who">`+i.identity+"</span>"+(i.priceLabel?`<span class="sl-confirm-idprice">${E(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-body">'+i.commercial+i.tierChoices+i.groupDates+i.wheelchair+(i.thumb||i.see3dPill?`<div class="sl-confirm-strip">${i.thumb}<span class="sl-confirm-pills">${i.see3dPill}</span></div>`:"")+i.inspect+'<div class="sl-confirm-row">'+(i.see3dRow??"")+`<button type="button" class="sl-confirm-cancel">${E(i.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><span class="sl-confirm-add-t">${E(i.selectLabel)}</span></button></div></div>`}function Co(i,e){let t=_,{variable:n}=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(n?Ze("picker.flexiblePartyTypeWord",{typeWord:e.typeWord}):Ze("picker.wholeTypeWord",{typeWord:e.typeWord}))}</div><h2 class="sl-table-title" id="sl-table-title">${t(i.displayLabel??i.label)}</h2><p class="sl-table-copy" id="sl-table-copy">${t(n?b("picker.chooseGuestsCopy","Choose how many guests will sit together. This table is held exclusively for your party."):Ze("picker.allPlacesBookedTogether",{count:i.capacity}))}</p></div><div class="sl-table-body"><div class="sl-table-summary"><span>${t(e.categoryLabel)}</span>`+(e.suppressPricing?"":`<b data-table-unit>${t(Ze("picker.perGuestPrice",{price:e.unitPrice}))}</b>`)+`<span class="muted">${t(b("picker.tableCapacity","Table capacity"))}</span><span>${t(Ze("picker.guestsCount",{count:i.capacity}))}</span>`+(i.entrance?`<span class="muted">${t(b("picker.entrance","Entrance"))}</span><span>${t(i.entrance)}</span>`:"")+(e.suppressPricing?"":`<span class="muted">${t(b("picker.total","Total"))}</span><b data-table-total></b>`)+"</div>"+(n?`<label class="sl-table-qtylabel" id="sl-table-qty-label">${t(b("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(b("picker.fewerGuests","Fewer guests"))}">\u2212</button><output aria-live="polite" data-table-qty>${i.quantity}</output><button type="button" data-table-step="1" aria-label="${t(b("picker.moreGuests","More guests"))}">+</button></div><div class="sl-table-range">${t(Ze("picker.chooseMinMaxGuests",{min:i.minOccupancy,max:i.maxOccupancy}))}</div>`:`<input type="hidden" data-table-qty value="${i.capacity}">`)+`<div class="sl-table-actions"><button type="button" class="sl-table-cancel">${t(Ze("common.cancel"))}</button><button type="button" class="sl-table-confirm">${t(e.held?b("picker.updateTable","Update table"):n?b("picker.selectTable","Select table"):b("picker.selectWholeTable","Select whole table"))}</button></div></div></section>`}function Ao(i,e){let t=od(i),n=document.createElement("div");n.className="sl-interrupt sl-access",n.setAttribute("role","status"),n.setAttribute("aria-live","polite");let r=document.createElement("div");r.className="sl-interrupt-card";let o=document.createElement("div");o.className="sl-interrupt-title",o.textContent=t.title;let s=document.createElement("div");s.className="sl-interrupt-body",s.textContent=t.body,r.append(o,s);let a=document.createElement("div");a.className="sl-interrupt-actions";let l=document.createElement("button");l.type="button",l.className="sl-interrupt-act";let c=document.createElement("span");c.className="sl-interrupt-act-icon",c.setAttribute("aria-hidden","true"),c.textContent="\u21BB";let d=document.createElement("span");return d.textContent=t.action,l.append(c,d),l.addEventListener("click",async()=>{n.classList.add("is-reloading"),l.disabled=!0;try{await e()}catch{}finally{n.isConnected&&(n.classList.remove("is-reloading"),l.disabled=!1)}}),a.appendChild(l),r.appendChild(a),n.appendChild(r),n}function Po(i,e){return`<div class="sl-a11yhead"><span class="sl-a11yhead-t">${E(i)}</span><button type="button" class="sl-a11yclose" data-a11y-close aria-label="${_(e)}"><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 Lo(i){return i.map(e=>{let t=`<button type="button" role="switch" class="sl-a11yrow${e.className?` ${e.className}`:""}${e.on?" on":""}" data-a11y-row="${E(e.key)}" aria-checked="${e.on}" aria-pressed="${e.on}"`+(e.disabled?' disabled aria-disabled="true"':"")+`><span class="sl-a11yrow-i" aria-hidden="true">${e.iconHtml}</span><span class="sl-a11yrow-t"><span class="sl-a11yrow-l">${E(e.label)}</span></span>`+(e.count?`<span class="sl-a11yrow-c">${E(e.count)}</span>`:"")+'<span class="sl-a11yrow-s" aria-hidden="true"></span></button>';return e.note?`<div class="sl-a11yrow-w">${t}${yt({id:`sl-info-${_(e.key.replace(/[^A-Za-z0-9]+/g,"-"))}`,label:e.note,text:E(e.note)})}</div>`:t}).join("")}function yt(i){return`<span class="sl-info"${i.wrapRef?` data-ref="${_(i.wrapRef)}"`:""}><button type="button" class="sl-info-btn" data-sl-info aria-label="${_(i.label)}" aria-describedby="${_(i.id)}" aria-expanded="false"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 11v5"/><path d="M12 8h.01"/></svg></button><span class="sl-info-pop" role="tooltip" id="${_(i.id)}"${i.ref?` data-ref="${_(i.ref)}"`:""}>${i.text}</span></span>`}function Ho(i){let e=Math.max(0,i),t=Math.floor(e/6e4),n=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return`${t}:${n}`}function Ro(i){let e=i.performanceLabel?`<div class="sl-chip-when">${_(i.performanceLabel)}</div>`:"",t=i.performanceDates?.labels.length?`<div class="sl-chip-dates"><span class="sl-chip-dates-summary">${_(i.performanceDates.summary)}</span><span class="sl-chip-date-list">${i.performanceDates.labels.map(n=>`<span class="sl-chip-date">${_(n)}</span>`).join("")}</span></div>`:"";return e+ld(i)+t}function ld(i){let{d:e,area:t,label:n,objectType:r,quantity:o=1,identity:s}=i,a=R=>String(R??"\u2014").replace(/[&<>"]/g,G=>({"&":"&","<":"<",">":">",'"':"""})[G]),l=r==="ga"?"ga":e?.objectType??r,c=s?.displayType?.trim()||e?.displayType?.trim()||t?.displayType?.trim()||(l==="table"?b("picker.table","Table"):l==="booth"?b("picker.booth","Booth"):l==="ga"?b("picker.generalAdmission","General admission"):b("picker.row","Row")),d=s?.rowLabel??s?.displayLabel??e?.rowLabel??e?.displayLabel??t?.label??n,u=i.categoryLabel?.trim()??"",m="",p=[];l==="table"&&s?.bookingMode?(m=`${c} ${d}`,p.push([b("picker.guests","Guests"),String(o)])):l==="ga"?(m=String(t?.displayLabel??d),o>1&&p.push([b("picker.tickets","Tickets"),String(o)])):l==="booth"?(m=e?.sectionLabel??`${c} ${d}`,e?.sectionLabel&&p.push([c,String(d)])):!e?.sectionLabel&&!e?.rowLabel&&!e?.seatNumber?m=String(d):(m=e.sectionLabel??"",e.rowLabel&&p.push([c,String(q(e)??e.rowLabel)]),e.seatNumber&&p.push([b("picker.seat","Seat"),String(e.seatNumber)]));let v=!m&&!!u,g=m||u||String(d),T=!!u&&!v&&u!==g,S=i.offerName?Ci(i.offerName,a):"",y=p.map(([R,G])=>`<span class="sl-chip-seg" data-fit-seg><span class="w">${a(R)}</span> <b>${a(G)}</b></span>`);T&&y.push(`<span class="sl-chip-seg" data-fit-seg data-fit-type><span class="w">${a(u)}</span>${S}</span>`);let P=[g,...p.map(([R,G])=>`${R} ${G}`),T?u:"",i.offerName??""].filter(Boolean).join(" \xB7 ");return`<div class="sl-chip-id"><span class="sl-sr">${a(P)}</span><span class="sl-chip-name" aria-hidden="true">${a(g)}${T?"":S}</span>`+(y.length?`<span class="sl-chip-pos" aria-hidden="true">${y.join("<i>\xB7</i>")}</span>`:"")+"</div>"}function On(i,e,t){return i.map(n=>`<option value="${t(n.id)}"${n.id===e?" selected":""}>${t(n.name)}</option>`).join("")}function cd(i){let e=_;return` data-key="${e(i.key)}"`+(i.heldLabels.length?` data-held="${e(encodeURIComponent(i.heldLabels.join(`
|
|
1
|
+
import{a as fi,b,c as We,d as gi,e as zr,f as $r,g as _,h as jr,i as bi,j as yi,k as vi,l as wi,m as ft,n as Gr,o as Kr,p as Ur,q as qr,r as xi,s as Zr,t as Qr}from"./chunk-X7FRGMS2.js";import{a as Vr}from"./chunk-ICMSBXRJ.js";import{a as Wr,b as Yr,d as ki,e as gt,f as Si,g as bt}from"./chunk-UBFNMA7U.js";import{a as h,b as C,c as x,d as w}from"./chunk-OSZ7DOEH.js";import{PickerController as hp,formatMoney as up,getLocale as Zn,loadLocale as mp,localeDirection as fp,LOCALE_NAMES as gp,resolveLocale as bp,setStringOverrides as yp,t as me}from"@seatlayer/core";var Rc=/^[0-9A-Za-z.+-]{1,24}$/,Ic=Rc.test("0.106.2")?"0.106.2":"",Oc={host:"web",platform:"web",bundle:Ic,protocol:0,chromeOwner:"web"},_c={...Oc},Ti=null,Xr=null;function Nc(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():0}function Dc(){let i=e=>Math.max(0,Math.round(e*100)/100);return{bootMs:i(Nc()),documentMs:Ti==null?0:i(Ti),handshakeMs:Ti==null||Xr==null?0:i(Xr-Ti)}}function Jr(){let{host:i,platform:e,bundle:t,protocol:n,chromeOwner:r}=_c,o=Dc();return{host:i,platform:e,...t?{bundle:t}:{},...n?{protocol:n}:{},chromeOwner:r,bootMs:o.bootMs,documentMs:o.documentMs,handshakeMs:o.handshakeMs}}var eo=new Set,to=new Map;function Ee(i){return eo.has(i)?"repeat":"cold"}function Ei(i){let e=Ee(i);return eo.add(i),e}function se(i){return typeof i=="number"&&Number.isFinite(i)&&i>=0?Math.round(i):0}function qt(){return typeof location>"u"?!1:/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(location.hostname)}function Bc(i){if(!/^[A-Za-z0-9_-]{1,80}$/.test(i.event))return null;let e=i.performanceProfile??{};return{event:i.event,scope:i.scope,surface:i.surface,outcome:i.outcome,stage:i.stage?.slice(0,32)??"",ms:se(i.ms),api:se(e.loadChartAndStatuses)||se(e.loadChart),scene:se(e.buildScene),panel:se(e.buildBuyerControls),paint:se(e.firstPaint),normalize:se(e.normalizeBuyerModel),renderer:se(e.createRenderer),seats:se(i.seats),floors:se(i.floors),view:i.view??"map",load:i.load??Ee(i.event),transport:i.transport??"pubapi",...Jr(),availabilityMs:se(e.loadStatuses),...typeof i.revealWaitMs=="number"?{revealWaitMs:se(i.revealWaitMs)}:{},...typeof i.handoverMs=="number"?{handoverMs:se(i.handoverMs)}:{},mounts:(to.get(i.event)??0)+1,reconnects:se(i.reconnects)}}var Fc=new Set;function ve(i){let e=Bc(i);if(e){to.set(i.event,e.mounts);for(let t of Fc)try{t(e)}catch{}typeof fetch>"u"||qt()||fetch(`${i.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 Vc="realtime.fallback_polling",io=new Set;function zc(i){let e=/^(wss?):\/\/([^/]+)(.*?)\/pub\/events\/([^/?#]+)\/subscribe(?:[?#]|$)/.exec(i);if(!e)return null;let t;try{t=decodeURIComponent(e[4])}catch{return null}return/^[A-Za-z0-9_-]{1,80}$/.test(t)?{apiBase:`${e[1]==="wss"?"https":"http"}://${e[2]}${e[3]}`,eventKey:t}:null}function no(i){let e=zc(i);return!e||io.has(e.eventKey)||(io.add(e.eventKey),typeof fetch>"u"||qt())?!1:(fetch(`${e.apiBase}/pub/telemetry/client-error`,{method:"POST",headers:{"Content-Type":"application/json","X-SeatLayer-Client":"1"},body:JSON.stringify({surface:"picker",errorCode:Vc,eventKey:e.eventKey}),credentials:"omit",keepalive:!0}).catch(()=>{}),!0)}var Ye="seatlayer.v1",ro="\0",oo=4401,$c=15e3,jc=25e3,Gc=1e4,so=5e3,Kc=3,Uc=15e3,ao=6e4;function qc(i){let e=typeof i.default=="string"?i.default:"free",t={};if(i.seats&&typeof i.seats=="object")for(let[n,r]of Object.entries(i.seats))typeof r=="string"&&r!==e&&(t[n]=r);return{default:e,exceptions:t}}function Wc(i,e){if(!i||i.default!==e.default)return null;let t=[];for(let[n,r]of Object.entries(e.exceptions))i.exceptions[n]!==r&&t.push({label:n,status:r});for(let n of Object.keys(i.exceptions))n in e.exceptions||t.push({label:n,status:e.default});return t}function Yc(i,e){for(let t of e)t.status===i.default?delete i.exceptions[t.label]:i.exceptions[t.label]=t.status}function lo(i){if(/(?:^|[?&#])(?:token|access_token|bearer|authorization|ticket|tkt|bse)=/i.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL");if(/\bbse_[A-Za-z0-9._-]+/.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL")}var Ce=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.failedUpgrades=0;this.pollTimer=null;this.fellBack=!1;this.reconnectCount=0;this.opts=e,typeof e.url=="string"&&lo(e.url)}get polling(){return this.pollTimer!==null}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(),this.stopPolling();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.failedUpgrades=0,this.start()}async connect(){if(this.stopped)return;let e=[Ye];if(this.opts.mintTicket){let a;try{a=await this.opts.mintTicket()}catch(l){this.reportIfAccessError(l),this.scheduleReconnect();return}if(this.stopped)return;a?.protocols?.length?(e=[...a.protocols],e.includes(Ye)||e.unshift(Ye)):a?.ticket&&(e=[Ye,`tkt.${a.ticket}`])}let t=this.version!==null;t&&e.push(`sv.${this.version}`);let n=typeof this.opts.url=="function"?this.opts.url():this.opts.url,r=this.useQueryMarker?`${n}${n.includes("?")?"&":"?"}pv=1`:n;lo(r);let o;try{o=(this.opts.socketFactory??((l,c)=>new WebSocket(l,c)))(r,e)}catch{this.upgradeFailed(),this.scheduleReconnect();return}this.ws=o;let s=!1;o.onopen=()=>{this.ws===o&&(s=!0,this.attempt=0,this.failedUpgrades=0,this.stopPolling(),this.v1=o.protocol===Ye,this.v1||(this.useQueryMarker=!0),this.startKeepalive(o),t?this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync()},so):this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync({reason:"connect"})},so))},o.onmessage=a=>{if(this.ws!==o)return;let l;try{l=JSON.parse(typeof a.data=="string"?a.data:"")}catch{return}!l||typeof l!="object"||this.handleFrame(l)},o.onclose=a=>{if(this.ws===o){if(this.ws=null,this.clearTimers(),!s&&a?.code!==oo&&this.upgradeFailed(),a?.code===oo){if(a.reason==="access_expired"){this.scheduleReconnect();return}if(a.reason==="idle_expired"&&this.opts.onIdleExpired){this.stopped=!0,this.stopPolling(),this.opts.onIdleExpired();return}this.stopped=!0,this.stopPolling(),this.opts.onAccessUnavailable?.({reason:"revoked",code:"access_revoked",retryable:!1});return}this.scheduleReconnect()}},o.onerror=()=>{try{o.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 n=Array.isArray(e.hidden)?e.hidden:[],r=Array.isArray(e.closed)?e.closed:[],o=n.join(ro),s=r.join(ro);(o!==this.hidden||s!==this.closedSections)&&(this.hidden=o,this.closedSections=s,this.opts.sink.onSections?.(n,r,{withInventory:t==="snapshot"||!!e.seats}))}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 n=qc(e),r=Wc(this.projection,n);this.projection=n,r===null?this.opts.sink.applyProjection?this.opts.sink.applyProjection(n):this.opts.sink.resync():r.length&&this.opts.sink.applyStatuses(r);return}if(t==="delta"&&Array.isArray(e.changes)){this.answered();let n=e.changes.filter(r=>typeof r?.label=="string"&&typeof r?.status=="string").map(r=>({label:r.label,status:r.status}));if(!n.length)return;this.projection&&Yc(this.projection,n),this.opts.sink.applyStatuses(n)}}}}answered(){this.resumeTimer&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}reportIfAccessError(e){let t=e?.reason;e?.name==="BuyerAccessUnavailableError"&&(this.stopped=!0,this.stopPolling(),this.opts.onAccessUnavailable?.({reason:t??"invalid",code:e.code,status:e.status,retryable:t==="paused"}))}upgradeFailed(){this.failedUpgrades+=1,this.failedUpgrades>=Kc&&this.startPolling()}startPolling(){if(!(this.pollTimer||this.stopped)){if(!this.fellBack){this.fellBack=!0;try{this.opts.onFallbackPolling?.()}catch{}let e=typeof this.opts.url=="function"?this.opts.url():this.opts.url;no(e)}this.pollTimer=setInterval(()=>{if(this.stopped){this.stopPolling();return}typeof document<"u"&&document.hidden||Promise.resolve().then(()=>this.opts.poll?this.opts.poll():this.opts.sink.resync({reason:"frame"})).catch(()=>{})},Uc)}}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}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{}},Gc)}},jc)}scheduleReconnect(){if(this.stopped||this.reconnectTimer)return;let e=Math.min(this.attempt++,5),t=Math.min(1e3*2**e,$c),n=this.pollTimer?ao/2+Math.random()*ao/2:Math.random()*t;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.reconnectCount+=1,this.connect()},n)}get reconnects(){return this.reconnectCount}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 Zc(i){return i==="blocked"?"not_for_sale":i==="held"||i==="booked"||i==="free"||i==="not_for_sale"?i:"free"}function Wt(i,e={}){let t=n=>{let r=i.tableSelection(n);if(r)return r.physicalSeatIds;let o=i.idForLabel(n);return o?[o]:[]};return{applyStatuses(n){let r=new Set([...i.currentHold()?.labels??[],...e.ownLabels?.()??[]]),o={free:[],held:[],booked:[],not_for_sale:[]},s=[],a=[],l=new Map(i.getSelection().map(c=>[c.label,c.id]));for(let c of n){let d=t(c.label);if(!d.length)continue;let u=Zc(c.status);if(o[u].push(...d),e.flashOnLiveChange&&u!=="free"&&!r.has(c.label)&&d.some(m=>i.getStatus(m)==="free")){let m=u==="held"?"#f4b740":"#f43f5e";for(let p of d)s.push({id:p,color:m})}u!=="free"&&!r.has(c.label)&&l.has(c.label)&&a.push(c.label)}for(let c of["free","held","booked","not_for_sale"])o[c].length&&i.setStatus(o[c],c);for(let c of s)i.flashSeat(c.id,c.color);if(a.length){let c=a.flatMap(u=>t(u));c.length&&i.deselect(c);let d=n.some(u=>u.status==="blocked"&&a.includes(u.label));e.onSelectedObjectUnavailable?.(a,d?"ineligible":"taken")}e.onStatusChange?.()},...i.applyProjection?{applyProjection:n=>{i.applyProjection(n)}}:{},async resync(n){await(i.resync?i.resync(n):i.refresh())},onSections(n,r,o){o?.withInventory||(i.resync?i.resync({reason:"frame"}):i.refresh()),e.onSections?.(n,r,o)}}}var V=class extends Error{constructor(e,t,n,r,o,s,a,l){super(t),this.name="ApiError",this.status=e,this.code=n,this.conflicts=r,this.reason=o,this.retryAfterS=s,this.notice=a,l?.fields&&(this.fields=l.fields),typeof l?.retryable=="boolean"&&(this.retryable=l.retryable),l?.hint&&(this.hint=l.hint),l?.serverMessage&&(this.serverMessage=l.serverMessage)}},co=10,po=1;function Yt(i,e){let t=(i??"").trim();if(t){let n=Number(t);if(Number.isFinite(n)&&n>=0)return Math.ceil(n);let r=Date.parse(t);if(Number.isFinite(r))return Math.max(0,Math.ceil((r-Date.now())/1e3))}if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return Math.ceil(e)}function Qc(i){let e=i;return!!e&&typeof e.ticketKey=="string"&&typeof e.label=="string"&&Number.isFinite(e.unitIndex)&&Number.isFinite(e.quantity)&&(e.displayLabel===void 0||typeof e.displayLabel=="string")}var Xc={seat_conflict:"taken",conflict:"taken",channel_assignment_conflict:"ineligible",allocation_exhausted:"exhausted"};function Jc(){return typeof crypto>"u"?null:typeof crypto.randomUUID=="function"?crypto.randomUUID():typeof crypto.getRandomValues!="function"?null:Array.from(crypto.getRandomValues(new Uint8Array(18)),i=>i.toString(16).padStart(2,"0")).join("")}function ed(i,e){let t=e.map(n=>[n.label,n.tierId??null,n.quantity??null]).sort((n,r)=>n[0]<r[0]?-1:n[0]>r[0]?1:0);return JSON.stringify([i,t])}function td(i){return i instanceof V?i.status===408||i.status===429||i.status>=500:!0}function ho(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`viewer_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`}var Oe=class{constructor(e,t={}){this.base=e;this.viewerId=ho();this.holdAttempt=null;this.holdIdempotency=!0;this.ticketKeysByHold=new Map;this.access=t.access,this.onObjectUnavailable=t.onObjectUnavailable;let n=t.referral?.trim();this.referral=n?n.slice(0,120):void 0}rotateViewerId(){this.viewerId=ho()}async pickerIdleMinutes(){return null}get accessScoped(){return!!this.access?.configured}async request(e,t={},n={}){let r=t.method??"GET",o={},s;t.body!==void 0&&(o["Content-Type"]="application/json",s=JSON.stringify(t.body));let a=await this.access?.authorization(n.auth?"unauthorized":"initial");if(a&&(o.Authorization=a),t.idempotency){let m=this.holdAttemptKey(`${t.idempotency.binding}\0${a??""}`);t.idempotency.used(m??void 0),m&&(o["Idempotency-Key"]=m)}let l=r==="GET"||e.endsWith("/hold/resume")?new AbortController:null,c=l?setTimeout(()=>l.abort(),4e4):null,d,u;try{d=await fetch(`${this.base}${e}`,{method:r,headers:o,body:s,credentials:"omit",...l?{signal:l.signal}:{}}),u=(d.headers.get("content-type")??"").includes("application/json")?await d.json().catch(p=>{if(l?.signal.aborted)throw p;return null}):null}finally{c!==null&&clearTimeout(c)}if(!d.ok){let m=u,p=m?.code??m?.error,v=d.status===401&&p==="buyer_access_invalid"&&e.endsWith("/hold/resume");if(this.access?.configured&&!v&&(d.status===401||d.status===403||d.status===422)&&await this.access.handleFailure(d.status,p)&&!n.auth)return this.request(e,t,{...n,auth:!0});if(d.status===409){let T=p?Xc[p]:void 0,S=m?.conflicts?.map(y=>y.label)??t.labels??[];T&&this.onObjectUnavailable?.({labels:S,reason:T,code:p})}let g;if(d.status===429&&(g=Yt(d.headers.get("Retry-After"),m?.retryAfterSeconds)??po,r==="GET"&&!n.rateLimit&&g<=co))return await new Promise(T=>setTimeout(T,g*1e3)),this.request(e,t,{...n,rateLimit:!0});throw d.status===503&&(g=Yt(d.headers.get("Retry-After"),m?.retryAfterSeconds)),new V(d.status,m?.error??`request_failed_${d.status}`,p,m?.conflicts,m?.reason,g,typeof m?.notice=="string"&&m.notice?m.notice:void 0,{...Array.isArray(m?.fields)?{fields:m.fields}:{},...typeof m?.retryable=="boolean"?{retryable:m.retryable}:{},...typeof m?.hint=="string"&&m.hint?{hint:m.hint}:{},...typeof m?.message=="string"&&m.message?{serverMessage:m.message}:{}})}return u}async requestBlob(e,t={}){let n={},r=await this.access?.authorization(t.auth?"unauthorized":"initial");r&&(n.Authorization=r);let o=await fetch(`${this.base}${e}`,{method:"GET",headers:n,credentials:"omit"});if(o.ok)return o.blob();let a=(o.headers.get("content-type")??"").includes("application/json")?await o.json().catch(()=>null):null,l=a?.code??a?.error;if(this.access?.configured&&(o.status===401||o.status===403||o.status===422)&&await this.access.handleFailure(o.status,l)&&!t.auth)return this.requestBlob(e,{...t,auth:!0});let c;if(o.status===429&&(c=Yt(o.headers.get("Retry-After"),a?.retryAfterSeconds)??po,!t.rateLimit&&c<=co))return await new Promise(d=>setTimeout(d,c*1e3)),this.requestBlob(e,{...t,rateLimit:!0});throw new V(o.status,a?.error??`request_failed_${o.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"))}async objects(e){return{...await this.request(`/pub/events/${encodeURIComponent(e)}/objects?compact=1`),fetchedAt:Date.now()}}hold(e,t,n,r){let o=`/pub/events/${encodeURIComponent(e)}/hold?pricingContract=matrix-v1`,s={method:"POST",body:{selections:t,...n?{ttlMs:n}:{},...r?{replaceHoldId:r}:{},...this.referral?{referral:this.referral}:{}},labels:t.map(l=>l.label)};return(r||!this.holdIdempotency?this.request(o,s):this.keyedHold(o,s,ed(e,t))).then(l=>this.noteTicketKeys(l,r))}holdAttemptKey(e){if(this.holdAttempt?.binding===e)return this.holdAttempt.key;let t=Jc();return this.holdAttempt=t?{binding:e,key:t}:null,t}endHoldAttempt(e){e&&this.holdAttempt?.key===e&&(this.holdAttempt=null)}async keyedHold(e,t,n,r=!1){let o;try{let s=await this.request(e,{...t,idempotency:{binding:n,used:a=>{o=a}}});return this.endHoldAttempt(o),s}catch(s){if(td(s))throw s;this.endHoldAttempt(o);let a=s.code;if(a==="idempotency_key_reused"&&!r)return this.keyedHold(e,t,n,!0);if(a==="invalid_idempotency_key")return this.holdIdempotency=!1,this.request(e,t);throw s}}noteTicketKeys(e,t){if(t&&this.ticketKeysByHold.delete(t),!e?.holdId)return e;let n=Array.isArray(e.ticketKeys)&&e.ticketKeys.every(o=>typeof o=="string")?[...e.ticketKeys]:null,r=Array.isArray(e.ticketKeyDetails)&&e.ticketKeyDetails.every(Qc)?e.ticketKeyDetails.map(({ticketKey:o,label:s,unitIndex:a,quantity:l,displayLabel:c})=>({ticketKey:o,label:s,unitIndex:a,quantity:l,...c?{displayLabel:c}:{}})):null;return n||r?this.ticketKeysByHold.set(e.holdId,{...n?{ticketKeys:n}:{},...r?{ticketKeyDetails:r}:{}}):this.ticketKeysByHold.delete(e.holdId),e}ticketKeysFor(e){let t=this.ticketKeysByHold.get(e);return t?{...t}:null}bestAvailable(e,t,n,r,o){return this.request(`/pub/events/${encodeURIComponent(e)}/best-available?pricingContract=matrix-v1`,{method:"POST",body:{qty:t,...n?{categoryKey:n}:{},...r?{zoneId:r}:{},...o?{ttlMs:o}:{},...this.referral?{referral:this.referral}:{}}}).then(s=>this.noteTicketKeys(s))}resume(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/hold/resume`,{method:"POST",body:{holdId:t}}).then(n=>this.noteTicketKeys(n))}release(e,t,n){return this.holdAttempt=null,this.request(`/pub/events/${encodeURIComponent(e)}/release`,{method:"POST",body:{labels:t,holdId:n}}).then(r=>{let o=this.ticketKeysByHold.get(n);if(o){let s=new Set(r?.released??t);this.ticketKeysByHold.set(n,{...o.ticketKeys?{ticketKeys:o.ticketKeys.filter(a=>!s.has(a))}:{},...o.ticketKeyDetails?{ticketKeyDetails:o.ticketKeyDetails.filter(a=>!s.has(a.ticketKey))}:{}})}return r})}extend(e,t,n){return this.request(`/pub/events/${encodeURIComponent(e)}/extend`,{method:"POST",body:{holdId:t,...n?{ttlMs:n}:{}}})}paymentOptions(e){return this.request(`/pub/events/${encodeURIComponent(e)}/payment-options`)}availability(e,t=!1){return this.request(`/pub/events/${encodeURIComponent(e)}/availability?pricingContract=matrix-v1${t?"&live=1":""}`)}startCheckout(e,t){return this.holdAttempt=null,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"),n=new URLSearchParams({surface:"picker",viewerId:this.viewerId});return`${t}/pub/events/${encodeURIComponent(e)}/subscribe?${n}`}socketUrl(e){return this.accessScoped?"":this.subscribeUrl(e)}socketProtocols(e){return this.accessScoped?[]:[Ye]}createRealtime(e,t){return this.accessScoped?null:new Ce({url:this.subscribeUrl(e),sink:t})}};import{t as Mo,tCount as ad}from"@seatlayer/core";import{compactRowLabel as id,seatNoteRowModel as nd,seatTypeIconSvg as go,t as Ze}from"@seatlayer/core";import{seatConfidenceDisclosure as rd}from"@seatlayer/core/core/seatConfidence";function Ln(i){return/early[\s-]*bird/i.test(i?.trim()??"")}function uo(i){return Ln(i)?'<svg class="sl-offer-icon sl-offer-icon-discount" viewBox="0 0 32 32" aria-hidden="true"><defs><linearGradient id="sl-offer-discount-gradient" x1="29.492" y1="0" x2="20.028" y2="36.183" gradientUnits="userSpaceOnUse"><stop stop-color="#FD6D00"/><stop offset="1" stop-color="#F8B302"/></linearGradient></defs><path d="M16 22.751a1.071 1.071 0 1 0 0-2.142 1.071 1.071 0 0 0 0 2.142ZM16 11.39a1.071 1.071 0 1 0 0-2.141 1.071 1.071 0 0 0 0 2.141Z" fill="url(#sl-offer-discount-gradient)"/><path d="M31.137.863A2.928 2.928 0 0 0 29.054 0H17.836c-.787 0-1.527.307-2.083.863L.863 15.753A2.93 2.93 0 0 0 0 17.836c0 .787.307 1.527.863 2.083l11.218 11.218A2.927 2.927 0 0 0 14.164 32c.787 0 1.527-.307 2.083-.863l14.89-14.89A2.928 2.928 0 0 0 32 14.164V2.946c0-.788-.307-1.527-.863-2.083ZM16 7.374a2.946 2.946 0 1 1 0 5.891 2.946 2.946 0 0 1 0-5.891Zm0 17.252a2.946 2.946 0 1 1 0-5.891 2.946 2.946 0 0 1 0 5.891Zm6.025-7.689H9.975a.938.938 0 0 1 0-1.875h12.05a.938.938 0 0 1 0 1.875Zm4.017-10.041a.938.938 0 1 1 0-1.875.938.938 0 0 1 0 1.875Z" fill="url(#sl-offer-discount-gradient)"/></svg>':'<svg class="sl-offer-icon sl-offer-icon-tag" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.6 13.6 13.7 20.5a2 2 0 0 1-2.8 0L3.5 13.1A2 2 0 0 1 3 11.7V4h7.7a2 2 0 0 1 1.4.6l8.5 8.5a.7.7 0 0 1 0 .5Z"/><circle cx="7.5" cy="8.5" r="1"/></svg>'}function Ci(i,e){return`<span class="sl-offer-mark" role="img" aria-label="${e(i)}" title="${e(i)}">${uo(i)}</span>`}function Ai(i,e){return`<span class="sl-offer-badge">${uo(i)}<span>${e(i)}</span></span>`}function mo(i,e=Date.now()){let t=i-e;if(t<=0)return null;let n=Math.max(1,Math.ceil(t/6e4)),r=Math.floor(n/1440),o=Math.floor(n%1440/60),s=n%60;return`${(r>0?[`${r}d`,...o?[`${o}h`]:[]]:[...o?[`${o}h`]:[],...s||!o?[`${s}m`]:[]]).join(" ")} left`}function Mn(i){return String(i??"\u2014").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function E(i){return String(i??"").replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e])}function Hn(i){return i?nd(i).map(e=>({...e,title:b(e.titleKey,e.titleFallback)})):[]}function bo(i){return Hn(i).map(e=>e.title)}function Qe(i,e={}){return Rn(Hn(i),e)}function Rn(i,e={}){if(!i.length)return"";let t=e.compact?15:17,n=i.map(r=>`<div class="sl-note sl-note-${E(r.tone)}"><span class="sl-note-i">${go(r.icon,{size:t})}</span><span class="sl-note-t"><b>${E(r.title)}</b>`+(r.note?`<span class="sl-note-n">${E(r.note)}</span>`:"")+"</span></div>").join("");return`<div class="sl-notes${e.compact?" compact":""}">${n}</div>`}function yo(i){return Hn(i).map(e=>{let t=E(e.note?`${e.title}: ${e.note}`:e.title);return`<span class="sl-cx-mark sl-cx-mark-${E(e.tone)}" role="img" aria-label="${t}" title="${t}">${go(e.icon,{size:13})}</span>`}).join("")}function Pi(i){let e=[];return i?.restrictedView&&e.push(b("picker.restrictedView","Restricted view")),i?.obstructedView&&e.push(b("picker.obstructedView","Obstructed view")),e}function In(i,e){if(!i)return"";let t=e?b("picker.viewFromThisSeat","View from this seat"):b("picker.seeItIn3d","See it in 3D"),n=e?b("picker.viewFromHere","View from here"):t;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>${n}</span></button>`}function vo(i,e){if(!e)return"";let t=e,n=t.includes(i.id),r=n?t.length>1?b("picker.openComparison","Open comparison"):b("picker.savedForComparison","Saved for comparison"):t.length?b("picker.compareWithSaved","Compare with saved"):b("picker.saveToCompare","Save to compare");return`<button type="button" class="sl-confirm-compare"${n&&t.length===1?" disabled":""}><span aria-hidden="true">\u21C4</span><span>${E(r)}</span></button>`}function wo(i,e,t){if(!t)return"";let n=rd(i.confidenceEvidence),r=n.modeledTarget??n.reality;return`<button type="button" class="sl-confirm-confidence" aria-label="Open seat confidence passport for ${E(i.displayLabel??i.label)}"><span><em>${E(e)}</em><strong>${E(n.headline)}</strong><small>${E(r)}</small></span><b>Passport</b></button>`}function q(i){let e=i?.rowLabel,t=i?.sectionLabel;if(!e||!t)return e;for(let n of["-"," ","\xB7","/","_"]){let r=`${t}${n}`;if(e.startsWith(r)&&e.length>r.length)return e.slice(r.length)}return id(e,t)}function od(i){switch(i){case"paused":return{title:b("picker.accessPausedTitle","These seats are on hold right now"),body:b("picker.accessPausedBody","The organizer has paused this selection. Try again in a few minutes."),action:b("picker.accessRetry","Try again")};case"revoked":return{title:b("picker.accessRevokedTitle","This access link is no longer active"),body:b("picker.accessRevokedBody","Ask whoever sent you here for a new link to keep booking these seats."),action:b("picker.accessRefresh","Refresh")};case"idle":return{title:b("picker.idlePausedTitle","Your session expired"),body:b("picker.idlePausedBody","You were away for a while. Refresh to see which seats are free now."),action:b("picker.idleRefresh","Show latest seats")};case"no_token":case"provider_failed":return{title:b("picker.accessExpiredTitle","The seat map timed out"),body:b("picker.accessExpiredBody","Any seats you\u2019re holding stay held. Refresh to see what\u2019s available now."),action:b("picker.accessRefresh","Refresh")};default:return{title:b("picker.accessInvalidTitle","We couldn\u2019t verify your access"),body:b("picker.accessInvalidBody","You can still book anything shown as available. Contact whoever sent you here for access to the rest."),action:b("picker.accessRefresh","Refresh")}}}var sd=6;function xo(i,e,t){let n=Mn;return[i?.sectionLabel?`<div class="sl-confirm-field sl-confirm-sec${i.sectionLabel.length>sd?" sl-confirm-sec-long":""}"><span class="sl-confirm-key">${b("picker.section","Section")}</span><span class="sl-confirm-value">${n(i.sectionLabel)}</span></div>`:"",i?.rowLabel||i?.objectType==="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${n(t)}</span><span class="sl-confirm-value">${n(q(i)??i?.displayLabel??e)}</span></div>`:"",i?.objectType!=="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${b("picker.seat","Seat")}</span><span class="sl-confirm-value">${n(i?.seatNumber??i?.displayLabel??e)}</span></div>`:""].filter(Boolean).join("")}function ko(i,e,t){let n=Mn,r=i?.objectType==="booth",o=i?.objectType==="table"&&!!i?.bookingMode,s=r||o||!i?.seatNumber,a=i?.sectionLabel??(s?void 0:i?.displayLabel),l=o?`${b("picker.guests","Guests")} ${i?.bookingMode==="variable"?`${i?.minOccupancy}\u2013${i?.maxOccupancy}`:i?.capacity}`:void 0,d=(s?[l,a?i?.rowLabel??i?.displayLabel:void 0]:[i?.rowLabel?`${t} ${q(i)??""}`.trim():void 0,`${b("picker.seat","Seat")} ${i?.seatNumber??e}`]).filter(Boolean).join(" \xB7 ");return(a?`<span class="sl-confirm-place">${n(a)}</span>`:"")+(d?`<span class="sl-confirm-pos">${a?" \xB7 ":""}${n(d)}</span>`:"")+(a||d?"":`<span class="sl-confirm-pos">${n(e)}</span>`)}function So(i,e){if(!i)return"";let t=e?b("picker.viewFromThisSeat","View from this seat"):b("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 To(i,e){if(!i||e)return"";let t=b("picker.seeItIn3d","See it in 3D");return`<button type="button" class="sl-confirm-3drow" 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 fo(i){return i.buyerMessage?.trim()||(i.restriction==="companion"?b("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):void 0)}function Li(i,e,t,n=()=>{}){let r=Mn;if(i.length>1)return`<fieldset class="sl-confirm-tiers"><legend><span>${b("picker.ticketType","Ticket type")}</span></legend>`+i.map(a=>{let l=fo(a),c=n(a);return`<button type="button" class="sl-confirm-tier" data-confirm-tier="${r(a.id)}"${c?` data-offer-name="${r(c)}"`:""} aria-pressed="${a.id===e}"><span class="sl-confirm-tier-copy"><span class="sl-confirm-tier-name">${r(a.name)}`+(c?`<span class="sl-confirm-tier-offer">${Ai(c,r)}</span>`:"")+"</span>"+(l?`<small class="sl-confirm-tier-note">${r(l)}</small>`:"")+`</span><span class="sl-confirm-tier-price">${r(t(a))}</span></button>`}).join("")+"</fieldset>";let o=i[0],s=o?fo(o):void 0;return s?`<p class="sl-confirm-tier-note">${r(s)}</p>`:""}function Eo(i){return'<div class="sl-confirm-grid">'+i.identityFields+`</div><div class="sl-confirm-cat"><span class="sl-confirm-cat-name">${E(i.categoryLabel)}</span>`+(i.priceLabel?`<span class="sl-confirm-price">${E(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-id">'+i.marker+`<span class="sl-confirm-dot" style="background:${E(i.categoryColor)}" aria-hidden="true"></span><span class="sl-sr">${E(i.categoryLabel)}</span><span class="sl-confirm-who">`+i.identity+"</span>"+(i.priceLabel?`<span class="sl-confirm-idprice">${E(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-body">'+i.commercial+i.tierChoices+i.groupDates+i.wheelchair+(i.thumb||i.see3dPill?`<div class="sl-confirm-strip">${i.thumb}<span class="sl-confirm-pills">${i.see3dPill}</span></div>`:"")+i.inspect+'<div class="sl-confirm-row">'+(i.see3dRow??"")+`<button type="button" class="sl-confirm-cancel">${E(i.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><span class="sl-confirm-add-t">${E(i.selectLabel)}</span></button></div></div>`}function Co(i,e){let t=_,{variable:n}=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(n?Ze("picker.flexiblePartyTypeWord",{typeWord:e.typeWord}):Ze("picker.wholeTypeWord",{typeWord:e.typeWord}))}</div><h2 class="sl-table-title" id="sl-table-title">${t(i.displayLabel??i.label)}</h2><p class="sl-table-copy" id="sl-table-copy">${t(n?b("picker.chooseGuestsCopy","Choose how many guests will sit together. This table is held exclusively for your party."):Ze("picker.allPlacesBookedTogether",{count:i.capacity}))}</p></div><div class="sl-table-body"><div class="sl-table-summary"><span>${t(e.categoryLabel)}</span>`+(e.suppressPricing?"":`<b data-table-unit>${t(Ze("picker.perGuestPrice",{price:e.unitPrice}))}</b>`)+`<span class="muted">${t(b("picker.tableCapacity","Table capacity"))}</span><span>${t(Ze("picker.guestsCount",{count:i.capacity}))}</span>`+(i.entrance?`<span class="muted">${t(b("picker.entrance","Entrance"))}</span><span>${t(i.entrance)}</span>`:"")+(e.suppressPricing?"":`<span class="muted">${t(b("picker.total","Total"))}</span><b data-table-total></b>`)+"</div>"+(n?`<label class="sl-table-qtylabel" id="sl-table-qty-label">${t(b("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(b("picker.fewerGuests","Fewer guests"))}">\u2212</button><output aria-live="polite" data-table-qty>${i.quantity}</output><button type="button" data-table-step="1" aria-label="${t(b("picker.moreGuests","More guests"))}">+</button></div><div class="sl-table-range">${t(Ze("picker.chooseMinMaxGuests",{min:i.minOccupancy,max:i.maxOccupancy}))}</div>`:`<input type="hidden" data-table-qty value="${i.capacity}">`)+`<div class="sl-table-actions"><button type="button" class="sl-table-cancel">${t(Ze("common.cancel"))}</button><button type="button" class="sl-table-confirm">${t(e.held?b("picker.updateTable","Update table"):n?b("picker.selectTable","Select table"):b("picker.selectWholeTable","Select whole table"))}</button></div></div></section>`}function Ao(i,e){let t=od(i),n=document.createElement("div");n.className="sl-interrupt sl-access",n.setAttribute("role","status"),n.setAttribute("aria-live","polite");let r=document.createElement("div");r.className="sl-interrupt-card";let o=document.createElement("div");o.className="sl-interrupt-title",o.textContent=t.title;let s=document.createElement("div");s.className="sl-interrupt-body",s.textContent=t.body,r.append(o,s);let a=document.createElement("div");a.className="sl-interrupt-actions";let l=document.createElement("button");l.type="button",l.className="sl-interrupt-act";let c=document.createElement("span");c.className="sl-interrupt-act-icon",c.setAttribute("aria-hidden","true"),c.textContent="\u21BB";let d=document.createElement("span");return d.textContent=t.action,l.append(c,d),l.addEventListener("click",async()=>{n.classList.add("is-reloading"),l.disabled=!0;try{await e()}catch{}finally{n.isConnected&&(n.classList.remove("is-reloading"),l.disabled=!1)}}),a.appendChild(l),r.appendChild(a),n.appendChild(r),n}function Po(i,e){return`<div class="sl-a11yhead"><span class="sl-a11yhead-t">${E(i)}</span><button type="button" class="sl-a11yclose" data-a11y-close aria-label="${_(e)}"><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 Lo(i){return i.map(e=>{let t=`<button type="button" role="switch" class="sl-a11yrow${e.className?` ${e.className}`:""}${e.on?" on":""}" data-a11y-row="${E(e.key)}" aria-checked="${e.on}" aria-pressed="${e.on}"`+(e.disabled?' disabled aria-disabled="true"':"")+`><span class="sl-a11yrow-i" aria-hidden="true">${e.iconHtml}</span><span class="sl-a11yrow-t"><span class="sl-a11yrow-l">${E(e.label)}</span></span>`+(e.count?`<span class="sl-a11yrow-c">${E(e.count)}</span>`:"")+'<span class="sl-a11yrow-s" aria-hidden="true"></span></button>';return e.note?`<div class="sl-a11yrow-w">${t}${yt({id:`sl-info-${_(e.key.replace(/[^A-Za-z0-9]+/g,"-"))}`,label:e.note,text:E(e.note)})}</div>`:t}).join("")}function yt(i){return`<span class="sl-info"${i.wrapRef?` data-ref="${_(i.wrapRef)}"`:""}><button type="button" class="sl-info-btn" data-sl-info aria-label="${_(i.label)}" aria-describedby="${_(i.id)}" aria-expanded="false"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 11v5"/><path d="M12 8h.01"/></svg></button><span class="sl-info-pop" role="tooltip" id="${_(i.id)}"${i.ref?` data-ref="${_(i.ref)}"`:""}>${i.text}</span></span>`}function Ho(i){let e=Math.max(0,i),t=Math.floor(e/6e4),n=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return`${t}:${n}`}function Ro(i){let e=i.performanceLabel?`<div class="sl-chip-when">${_(i.performanceLabel)}</div>`:"",t=i.performanceDates?.labels.length?`<div class="sl-chip-dates"><span class="sl-chip-dates-summary">${_(i.performanceDates.summary)}</span><span class="sl-chip-date-list">${i.performanceDates.labels.map(n=>`<span class="sl-chip-date">${_(n)}</span>`).join("")}</span></div>`:"";return e+ld(i)+t}function ld(i){let{d:e,area:t,label:n,objectType:r,quantity:o=1,identity:s}=i,a=R=>String(R??"\u2014").replace(/[&<>"]/g,G=>({"&":"&","<":"<",">":">",'"':"""})[G]),l=r==="ga"?"ga":e?.objectType??r,c=s?.displayType?.trim()||e?.displayType?.trim()||t?.displayType?.trim()||(l==="table"?b("picker.table","Table"):l==="booth"?b("picker.booth","Booth"):l==="ga"?b("picker.generalAdmission","General admission"):b("picker.row","Row")),d=s?.rowLabel??s?.displayLabel??e?.rowLabel??e?.displayLabel??t?.label??n,u=i.categoryLabel?.trim()??"",m="",p=[];l==="table"&&s?.bookingMode?(m=`${c} ${d}`,p.push([b("picker.guests","Guests"),String(o)])):l==="ga"?(m=String(t?.displayLabel??d),o>1&&p.push([b("picker.tickets","Tickets"),String(o)])):l==="booth"?(m=e?.sectionLabel??`${c} ${d}`,e?.sectionLabel&&p.push([c,String(d)])):!e?.sectionLabel&&!e?.rowLabel&&!e?.seatNumber?m=String(d):(m=e.sectionLabel??"",e.rowLabel&&p.push([c,String(q(e)??e.rowLabel)]),e.seatNumber&&p.push([b("picker.seat","Seat"),String(e.seatNumber)]));let v=!m&&!!u,g=m||u||String(d),T=!!u&&!v&&u!==g,S=i.offerName?Ci(i.offerName,a):"",y=p.map(([R,G])=>`<span class="sl-chip-seg" data-fit-seg><span class="w">${a(R)}</span> <b>${a(G)}</b></span>`);T&&y.push(`<span class="sl-chip-seg" data-fit-seg data-fit-type><span class="w">${a(u)}</span>${S}</span>`);let P=[g,...p.map(([R,G])=>`${R} ${G}`),T?u:"",i.offerName??""].filter(Boolean).join(" \xB7 ");return`<div class="sl-chip-id"><span class="sl-sr">${a(P)}</span><span class="sl-chip-name" aria-hidden="true">${a(g)}${T?"":S}</span>`+(y.length?`<span class="sl-chip-pos" aria-hidden="true">${y.join("<i>\xB7</i>")}</span>`:"")+"</div>"}function On(i,e,t){return i.map(n=>`<option value="${t(n.id)}"${n.id===e?" selected":""}>${t(n.name)}</option>`).join("")}function cd(i){let e=_;return` data-key="${e(i.key)}"`+(i.heldLabels.length?` data-held="${e(encodeURIComponent(i.heldLabels.join(`
|
|
2
2
|
`)))}"`:"")+(i.seatIds.length?` data-seat="${e(i.seatIds.join(" "))}"`:"")+(i.locateId?` data-locate="${e(i.locateId)}"`:"")}function Io(i){let e=_;return`<div class="sl-chip${i.held?" sl-held":""}${i.fresh?" sl-enter":""}"`+cd(i)+">"+(i.held?i.stateHtml:`<span class="sl-chip-dot" style="background:${E(i.categoryColor)}" aria-hidden="true"></span>`)+`<div class="sl-chip-main">${i.identityHtml}`+(i.extrasHtml?`<div class="sl-chip-sub">${i.extrasHtml}</div>`:"")+`${i.noteHtml}</div>`+(i.amountText?`<span class="amt">${e(i.amountText)}</span>`:"")+i.railHtml+"</div>"}function _n(i,e){let t=_(i),n=e?_(e):"";return'<div class="sl-chip-rail">'+(e?`<button type="button" class="view" data-view-label="${n}" aria-label="${_(Mo("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>`:"")+`<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></div>`}function Mi(i,e){return new Set(i.filter(t=>(e[t.key]??0)<=0).map(t=>t.key))}function Hi(i,e){let t=(i.doc?.categories??[]).filter(s=>!s.notForSale),n=e?t.filter(s=>s.key===e):t;if(!n.length)return null;let r=Mi(n,i.categoryAvailability());return r.size<n.length||(i.currentHold()?.items??[]).some(s=>r.has(s.categoryKey))?null:Object.assign(new Error("seatlayer: that ticket type is sold out"),{status:409,code:"sold_out",reason:"sold_out"})}function Oo(i){return i.confirming?`<div class="sl-ba" role="alert"><div class="sl-ba-title"><span class="spark" aria-hidden="true">\u2726</span>${b("picker.replaceCurrentChoices","Replace your current choices?")}</div><div class="sl-ba-replace"><b>${Mo("picker.willFindSeatsTogether",{count:i.quantity})}</b><span>${b("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>${b("picker.keepMine","Keep mine")}</button><button type="button" class="replace" data-ba-replace>${b("picker.findNewSeats","Find new seats")}</button></div></div>`:`<div class="sl-ba"><div class="sl-ba-title"><span class="sl-ba-title-t">${b("picker.findSeatsTogether","Find seats together")}</span>`+yt({id:"sl-info-best-seats",label:b("picker.aboutBestSeats","About finding seats together"),text:b("picker.closestGroupChosenInstantly","Closest available group, chosen instantly.")})+(i.offerPremium?`<button type="button" class="sl-ba-premium${i.premium?" on":""}" data-ba-premium aria-pressed="${i.premium?"true":"false"}"><span class="star" aria-hidden="true">\u2605</span>${b("picker.bestSeatsPremium","Best seats")}</button>`:"")+`</div><div class="sl-ba-qty"><button type="button" data-ba="-1" aria-label="${b("picker.fewerSeats","Fewer seats")}">\u2212</button><span>${i.quantity}</span><button type="button" data-ba="1" aria-label="${b("picker.moreSeats","More seats")}">+</button></div>`+(i.categories.length>1?`<select class="sl-ba-cat" aria-label="${_(b("picker.preferredTicketType","Preferred ticket type"))}" data-ba-cat><option value="">${_(b("picker.anyTicketType","Any ticket type"))}</option>`+i.categories.map(e=>e.soldOut?`<option value="${_(e.key)}" disabled>${_(`${e.label} \xB7 ${b("picker.soldOutTitle","Sold out")}`)}</option>`:`<option value="${_(e.key)}"${i.selectedCategory===e.key?" selected":""}>${_(e.label)}</option>`).join("")+"</select>":'<span class="sl-ba-cat" aria-hidden="true"></span>')+(i.zones.length?`<select class="sl-ba-zone" aria-label="${b("picker.preferredVenueZone","Preferred venue zone")}" data-ba-zone><option value="">${b("picker.anyVenueZone","Any venue zone")}</option>`+i.zones.map(e=>`<option value="${_(e.id)}"${i.selectedZone===e.id?" selected":""}>${_(e.label)}</option>`).join("")+"</select>":"")+`<button type="button" class="sl-ba-go${i.busy?" sl-busy":""}"${i.busy?" disabled":""}>`+(i.busy?`<span class="sl-ba-spin" aria-hidden="true"></span>${b("picker.findingBestSeats","Finding the best seats\u2026")}`:ad("picker.findBestSeatsCount",i.quantity))+"</button>"+(i.reopened?`<button type="button" class="sl-ba-back" data-ba-close>${b("picker.keepMyPicks","Keep my picks")}</button>`:"")+"</div>"}function _o(i){return i==="setup"||i==="testable"?{heading:b("picker.salesNotOpenPill","Sales haven\u2019t opened yet"),sentence:b("picker.salesNotOpenCopy","Tickets for this event aren\u2019t on sale yet.")}:i==="paused"?{heading:b("picker.salesPausedPill","Sales are paused"),sentence:b("picker.salesPausedCopy","Ticket sales are paused for now.")}:{heading:b("picker.salesClosedPill","Sales are closed"),sentence:b("picker.salesClosedCopy","Ticket sales for this event have ended.")}}function No(i,e=!1){if(!e&&(i==="setup"||i==="testable"||i==="paused")){let t=_o(i);return{pill:t.heading,cta:t.heading,toast:t.sentence}}return{pill:b("picker.salesClosedPill","Sales are closed"),cta:b("picker.salesClosedCta","Sales closed"),toast:b("picker.salesClosedToast","Sales are closed for this event.")}}function Do(i){if(i.salesClosed&&!i.hasPicks){let e=i.whenText?`<span class="when">${_(i.whenText)}</span>`:"",t=_o(i.salesState);return`<div class="sl-closed-note" role="status"><b>${t.heading}</b><span>${t.sentence}${e}</span></div>`}return""}function Bo(i){return i.hasGaAreas?i.seated?i.venue3d?b("picker.trayHintChoose3dOrStanding","Choose a seat in the 3D venue, or grab standing tickets below."):b("picker.trayHintTapOrStanding","Tap a seat on the map or grab standing tickets below."):i.venue3d?b("picker.gaTrayHintChoose3dArea","Choose an area in the 3D venue to select tickets."):b("picker.gaTrayHintTapArea","Tap an area on the map to choose tickets."):i.groupMode==="per_performance"?b("picker.groupPerPerformanceTrayHint","Choose seats for this performance, then complete every date above."):i.groupMode?b("picker.groupTrayHint","Choose seats once. The same seats will be held for every performance."):i.venue3d?b("picker.trayHintChoose3dOrBest","Choose a seat in the 3D venue, or let us pick the best available for you."):b("picker.trayHintTapOrBest","Tap a seat on the map, or let us pick the best available for you.")}import{getLocale as md,loadLocale as fd,LOCALE_NAMES as gd,localeDirection as zo,resolveLocale as $o,setStringOverrides as bd,TRANSLATED_LOCALES as yd}from"@seatlayer/core";import{getLocale as dd,localeDirection as pd,t as hd}from"@seatlayer/core";function ud(){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 Fo(i,e,t){let n=document.createElement("div");n.className="sl-picker",n.tabIndex=-1,n.lang=dd(),n.dir=pd(),i.appendChild(n),Object.entries(bt(void 0,t)).forEach(([o,s])=>n.style.setProperty(o,s)),n.innerHTML=`
|
|
3
3
|
<div class="sl-head">
|
|
4
4
|
<div class="sl-logo" data-ref="logo"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seatlayer/js",
|
|
3
|
-
"version": "0.106.
|
|
3
|
+
"version": "0.106.2",
|
|
4
4
|
"description": "SeatLayer's official JavaScript seating chart and seat map SDK — live availability, seat selection, temporary holds, and a typed API for any web ticketing app.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"typescript"
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@seatlayer/core": "0.106.
|
|
71
|
+
"@seatlayer/core": "0.106.2"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"tsup": "^8.5.1",
|