@seatlayer/core 0.93.0 → 0.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ar-ALH3NJ5S.js → ar-2SI7NFFP.js} +1 -1
- package/dist/be-U2FT56IF.js +1 -0
- package/dist/bg-CZXBFEYM.js +1 -0
- package/dist/ca-S6HHRSSW.js +1 -0
- package/dist/{chunk-4I2VWFJY.js → chunk-F2EXXZSZ.js} +1 -1
- package/dist/{chunk-HC3U5BWH.js → chunk-LAX7F5ML.js} +1 -1
- package/dist/{chunk-ZFWHAKAI.js → chunk-LFJUXTIO.js} +1 -1
- package/dist/{chunk-ZDETFCDH.js → chunk-M7JA4BGP.js} +1 -1
- package/dist/{chunk-LVIAHZ4N.js → chunk-Q3MSDG4S.js} +1 -1
- package/dist/core/chart-ops/index.cjs +1 -1
- package/dist/core/chart-ops/index.d.cts +18 -3
- package/dist/core/chart-ops/index.d.ts +18 -3
- package/dist/core/chart-ops/index.js +1 -1
- package/dist/core/inventory/index.d.cts +2 -2
- package/dist/core/inventory/index.d.ts +2 -2
- package/dist/core/inventory/index.js +1 -1
- package/dist/core/layout/index.d.cts +2 -2
- package/dist/core/layout/index.d.ts +2 -2
- package/dist/core/quality/index.d.cts +2 -2
- package/dist/core/quality/index.d.ts +2 -2
- package/dist/core/quality/index.js +1 -1
- package/dist/core/sections/index.d.cts +1 -1
- package/dist/core/sections/index.d.ts +1 -1
- package/dist/cs-LGHHO6S2.js +1 -0
- package/dist/cy-BR55DXTI.js +1 -0
- package/dist/da-AWX6N4TO.js +1 -0
- package/dist/de-77YNHYP5.js +1 -0
- package/dist/el-NIQKJA32.js +1 -0
- package/dist/es-VHGELLST.js +1 -0
- package/dist/et-4TD7XADS.js +1 -0
- package/dist/fa-UAZ5KV3N.js +1 -0
- package/dist/fi-JLCYSRVX.js +1 -0
- package/dist/fr-JX7QFSSO.js +1 -0
- package/dist/he-DOZ45PIT.js +1 -0
- package/dist/hr-H3GWMNG4.js +1 -0
- package/dist/hu-GSQF7ES3.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +34 -17
- package/dist/index.d.ts +34 -17
- package/dist/index.js +1 -1
- package/dist/it-PAUFAEAT.js +1 -0
- package/dist/ja-HFHAFCUM.js +1 -0
- package/dist/ku-KG57RZH4.js +1 -0
- package/dist/localeLoaders-7RRR6IXA.js +1 -0
- package/dist/lt-OWGR7NDQ.js +1 -0
- package/dist/lv-NI4L2PLM.js +1 -0
- package/dist/nl-KJNBH7GK.js +1 -0
- package/dist/no-DPBJYJKY.js +1 -0
- package/dist/pl-XAV56ZWO.js +1 -0
- package/dist/pt-4V7DSTE3.js +1 -0
- package/dist/{renderedQuality-D5G1fHtR.d.ts → renderedQuality-BrCnk3-x.d.ts} +1 -1
- package/dist/{renderedQuality-DThBK6x4.d.cts → renderedQuality-CXlWvz_l.d.cts} +1 -1
- package/dist/{renderer-B7IrAGHP.d.ts → renderer-DbnKKo5K.d.ts} +100 -1
- package/dist/{renderer-BePADdjE.d.cts → renderer-fetXkaDe.d.cts} +100 -1
- package/dist/ro-OIPNCCS7.js +1 -0
- package/dist/ru-JS5BEIO5.js +1 -0
- package/dist/sk-CS5FNAAC.js +1 -0
- package/dist/sl-UKLY77MM.js +1 -0
- package/dist/sr-DGGTR6NQ.js +1 -0
- package/dist/sv-6O6AJ5ZD.js +1 -0
- package/dist/{tableSizing-DmZYe2v2.d.ts → tableSizing-CPYpm4iH.d.ts} +1 -1
- package/dist/{tableSizing-Blb9Z_Tt.d.cts → tableSizing-DKo6Zlt_.d.cts} +1 -1
- package/dist/{ticketRestrictions-5qEU-1eK.d.cts → ticketRestrictions-CEgj821Q.d.cts} +1 -1
- package/dist/{ticketRestrictions-rrajqzOB.d.ts → ticketRestrictions-le9Yoa10.d.ts} +1 -1
- package/dist/tr-HSODCNOA.js +1 -0
- package/dist/uk-PLZCNDOX.js +1 -0
- package/dist/view3d/index.d.cts +1 -1
- package/dist/view3d/index.d.ts +1 -1
- package/dist/view3d/index.js +1 -1
- package/dist/view3d/scene/scene.worker.js +1 -1
- package/dist/zh-Hans-DQX4CWFR.js +1 -0
- package/dist/zh-Hant-MAEIHPS4.js +1 -0
- package/package.json +1 -1
- package/dist/be-L2ARGVAN.js +0 -1
- package/dist/bg-7664YNCK.js +0 -1
- package/dist/ca-FAFWDJLI.js +0 -1
- package/dist/cs-X2R3ZSIS.js +0 -1
- package/dist/cy-TZAP42PI.js +0 -1
- package/dist/da-TXXYTHRV.js +0 -1
- package/dist/de-QTBBGD7H.js +0 -1
- package/dist/el-D5FP7YYV.js +0 -1
- package/dist/es-WBASDRVC.js +0 -1
- package/dist/et-DI4AFGPJ.js +0 -1
- package/dist/fa-475UAFRJ.js +0 -1
- package/dist/fi-VLWI3PVM.js +0 -1
- package/dist/fr-RIEQP5R4.js +0 -1
- package/dist/he-LMIQFGT5.js +0 -1
- package/dist/hr-HWWXJXMT.js +0 -1
- package/dist/hu-EGRPKEMV.js +0 -1
- package/dist/it-QU2BONLV.js +0 -1
- package/dist/ja-GTPGN7AW.js +0 -1
- package/dist/ku-Q3XMN7GH.js +0 -1
- package/dist/localeLoaders-X2DDK7KL.js +0 -1
- package/dist/lt-ZGTEWYU4.js +0 -1
- package/dist/lv-3SV4YW2L.js +0 -1
- package/dist/nl-ALCHLVP2.js +0 -1
- package/dist/no-WRBQJCLX.js +0 -1
- package/dist/pl-4G6VEQZ3.js +0 -1
- package/dist/pt-OLA6ELAW.js +0 -1
- package/dist/ro-H5GU4DVI.js +0 -1
- package/dist/ru-BM3TYI5V.js +0 -1
- package/dist/sk-VU45GJYV.js +0 -1
- package/dist/sl-SYNAWIPU.js +0 -1
- package/dist/sr-6ZNE7HDN.js +0 -1
- package/dist/sv-52BO3IXQ.js +0 -1
- package/dist/tr-SZJCCTGR.js +0 -1
- package/dist/uk-OSWQK4LA.js +0 -1
- package/dist/zh-Hans-JK2SPHB6.js +0 -1
- package/dist/zh-Hant-BYGBT56E.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"common.cancel":"Cancel\xB7la","common.close":"Tanca","common.done":"Fet","common.copied":"\u2713 Copiat","picker.viewSeats":"Veure seients","picker.holdExpired":"La teva reserva ha caducat: els seients s'han alliberat. Torna a triar.","picker.holdExpiredTitle":"Els vostres seients s\u2019han alliberat","picker.holdExpiredBody":"S\u2019ha acabat el temps de reserva i els seients han tornat a la venda.","picker.holdExpiredRestart":"Tria seients de nou","picker.holdExpiredPickAgain":"Torneu a triar els seients per continuar. Pot ser que ja estiguin ocupats.","picker.releasedPair":"{first} \xB7 {second}","picker.releasedSeatPlace":"Secci\xF3 {section}, fila {row}, seient {seat}","picker.releasedSeatRange":"Secci\xF3 {section}, fila {row}, seients {from}\u2013{to}","picker.releasedInSection":"{seats} a la secci\xF3 {section}","picker.releasedInSections":"{seats} a les seccions {sections}","picker.releasedGa":"{quantity} \xD7 {area}","picker.poweredBy":"Amb la tecnologia de SeatLayer","picker.testMode":"MODE DE PROVA","picker.testModeExplained":"Les reserves aqu\xED no s\xF3n reals i no es cobra cap targeta","picker.findClosestSeatsTogether":"Busca els seients junts m\xE9s propers","picker.findSeatsTogether":"Busca seients junts","picker.addSeat":"Afegeix seient","picker.removeSeat":"Elimina seient","picker.added":"Afegit","picker.findSeats":"Busca seients","picker.findBestSeats":"Busca els millors seients","picker.displayOptions":"Opcions de visualitzaci\xF3","picker.closeVenueNavigation":"Tanca la navegaci\xF3 del recinte","picker.orphanHint":"Aix\xED queda un seient sol: valora despla\xE7ar-te un seient.","picker.companionRequiresWheelchair":"Requereix la pla\xE7a de cadira de rodes contigua","picker.companionPairRequired":"Selecciona la pla\xE7a de cadira de rodes contigua amb cada entrada d'acompanyant.","map.aria":"Mapa de seients. Fes servir les fletxes per moure't entre seients i Retorn per seleccionar.","map.beaconAria":"V\xE9s als teus {seats} a {name}","map.seatsLeft":"EN QUEDEN {count}","map.soldOut":"ESGOTAT","map.fromPrice":"DES DE {price}","map.statusHeld":"Reservat","map.statusTaken":"Ocupat","picker.floor":"Planta","picker.zoomLevel":"Nivell de zoom","picker.rungTip.zones":"Vista general del recinte: grups de sectors com Grada Nord o VIP","picker.rungTip.sections":"Blocs de sectors: els sectors esgotats i gaireb\xE9 plens s'enfosqueixen perqu\xE8 vegis la disponibilitat d'un cop d'ull","picker.rungTip.seats":"Seients individuals: els blocs es desfan en punts","picker.rungLabel.zones":"ZONES","picker.rungLabel.sections":"SECTORS","picker.rungLabel.seats":"SEIENTS","picker.sectionSummaryAria":"Resum del sector {label}","picker.closeSectionSummary":"Tanca el resum del sector","picker.seatsLeftInSection.one":"Queda {count} seient","picker.seatsLeftInSection.many":"Queden {count} seients","picker.seatsLeftInSection.other":"Queden {count} seients","picker.seatsLeftShort":"En queden {count}","picker.overview":"Recinte","picker.entrance":"Entrada","picker.turnOffAccessibilityFilter":"Desactiva el filtre de cadira de rodes per triar aquest seient","picker.tapSeatHint":"Toca qualsevol seient per veure'n la vista","picker.ticketTierFor":"Tipus d'entrada per a {label}","picker.viewFromSeat":"Vista des del seient {label}","picker.real360":"360\xB0 REAL","picker.preview":"PREVISUALITZACI\xD3","picker.sightline":"\u2248 {m} m fins a l'escenari","picker.panorama360":"Foto del recinte en 360\xB0","picker.illustrationCaption":"il\xB7lustraci\xF3 \xB7 \u2248 {m} m de l'escenari","picker.restrictedView":"Visibilitat limitada","picker.obstructedView":"Visibilitat obstru\xEFda","picker.premiumSeat":"Seient pr\xE8mium","picker.access.wheelchair":"Espai per a cadira de rodes","picker.access.companion":"Seient d\u2019acompanyant","picker.access.semi-ambulatory":"Mobilitat redu\xEFda","picker.access.designated-aisle":"Seient de passad\xEDs per a transfer\xE8ncia","picker.access.step-free":"Seient accessible sense escales","picker.access.hearing":"Escolta assistida","picker.access.cart":"Subt\xEDtols en directe (CART)","picker.access.sign-language":"Vista de llengua de signes","picker.access.low-vision":"Vista per a ceguesa o baixa visi\xF3","picker.access.sensory-friendly":"Seients tranquils i sensorialment amables","picker.access.plus-size":"Seient de talla gran","picker.access.lift-armrest":"Reposabra\xE7os abatible","picker.accessShort.wheelchair":"Espai per a cadira de rodes","picker.accessShort.companion":"Seient d\u2019acompanyant","picker.accessShort.semi-ambulatory":"Mobilitat redu\xEFda","picker.accessShort.designated-aisle":"Passad\xEDs / transfer\xE8ncia","picker.accessShort.step-free":"Sense escales","picker.accessShort.hearing":"Escolta assistida","picker.accessShort.cart":"Subt\xEDtols en directe","picker.accessShort.sign-language":"Llengua de signes","picker.accessShort.low-vision":"Baixa visi\xF3","picker.accessShort.sensory-friendly":"Sensorialment amable","picker.accessShort.plus-size":"Talla gran","picker.accessShort.lift-armrest":"Reposabra\xE7os abatible","picker.organizerNote":"Nota de l\u2019organitzador","picker.hideLimitedView":"Amaga els seients amb visibilitat limitada","picker.bestSeatsPremium":"Millors seients","picker.premiumFallbackNote":"No hi ha cap bloc pr\xE8mium de {count}: et mostrem la millor opci\xF3 global","picker.loading3d":"Construint el recinte en 3D\u2026","picker.unavailable3d":"El 3D no s'ha pogut iniciar. El mapa de seients continua disponible.","picker.jumpToSection":"Ves al sector","picker.salesClosedPill":"Venda tancada","picker.salesClosedCopy":"La venda d'entrades per a aquest esdeveniment ha finalitzat.","picker.salesNotOpenPill":"Les vendes encara no han comen\xE7at","picker.salesNotOpenCopy":"Les entrades per a aquest esdeveniment encara no estan a la venda.","picker.salesPausedPill":"Les vendes estan en pausa","picker.salesPausedCopy":"La venda d'entrades est\xE0 aturada de moment.","picker.salesClosedCta":"Venda tancada","picker.salesClosedToast":"La venda per a aquest esdeveniment est\xE0 tancada.","picker.securingSeats":"Assegurant els teus seients\u2026","picker.openingCheckout":"Obrint el pagament segur\u2026","picker.peekSecured":"\u2713 {count} assegurats \xB7 {total}. Encara no et cobrarem","picker.priceHint":"Els colors del mapa s\xF3n tipus d'entrada: toca'n un a sota per mostrar nom\xE9s aquests seients.","picker.aboutTicketPrices":"Sobre els preus de les entrades","picker.keepMyPicks":"Conserva la meva tria","picker.accessExpiredBody":"Els seients que teniu retinguts es mantenen. Actualitzeu per veure qu\xE8 hi ha disponible ara.","picker.accessExpiredTitle":"El mapa de seients ha caducat","picker.accessInvalidBody":"Encara pots comprar tot el que aparegui com a disponible. Contacta amb qui t'ha enviat aqu\xED per accedir a la resta.","picker.accessInvalidTitle":"No hem pogut verificar el teu acc\xE9s","picker.accessPausedBody":"L'organitzador ha pausat aquesta selecci\xF3. Torna-ho a provar d'aqu\xED a uns minuts.","picker.accessPausedTitle":"Aquests seients estan bloquejats ara mateix","picker.accessRefresh":"Actualitza","picker.accessRetry":"Torna-ho a provar","picker.accessRevokedBody":"Demana un enlla\xE7 nou a qui te'l va enviar per continuar reservant aquests seients.","picker.accessRevokedTitle":"Aquest enlla\xE7 d'acc\xE9s ja no \xE9s actiu","picker.idlePausedBody":"Actualitza per veure qu\xE8 hi ha disponible ara.","picker.idlePausedTitle":"El mapa de seients s\u2019ha aturat mentre eres fora","picker.accessiblePhysicalSeat":"Seient f\xEDsic accessible","picker.addMinutes":"+{count} min","picker.accessibilityOptions":"Opcions d\u2019accessibilitat i color","picker.addingEllipsis":"Afegint\u2026","picker.allLevels":"Tots els nivells","picker.allPlacesBookedTogether":"Les {count} places es reserven juntes com una taula exclusiva.","picker.allPrices":"Tots els preus","picker.allSeats":"Tots els seients","picker.allSetTitle":"Ja ho tens tot a punt","picker.anyTicketType":"Qualsevol tipus d'entrada","picker.anyVenueZone":"Qualsevol zona del recinte","picker.areas":"\xC0rees","picker.available":"Disponible","picker.backToMap":"Torna al mapa","picker.backToVenue":"Torna al recinte","picker.bestSeatsStar":"\u2726 Millors seients","picker.booth":"Estand","picker.capacityGuests":"{count} convidats","picker.chartDerivedModel":"Model derivat del mapa","picker.chartDerivedSeatEye":"3D en directe \xB7 al\xE7ada de la vista derivada del mapa \xB7 sense mesures in situ","picker.checkConnection":"Comprova la connexi\xF3 i torna-ho a provar.","picker.checkoutCouldNotBeOpened":"No s'ha pogut obrir el pagament. Els teus seients continuen reservats: torna-ho a provar.","picker.chooseAnotherToCompare":"Tria un altre seient per comparar.","picker.chooseGuestsCopy":"Tria quants convidats seuran junts. Aquesta taula es reserva en exclusiva per al teu grup.","picker.chooseMinMaxGuests":"Tria {min}\u2013{max} convidats","picker.clearSavedSeatComparison":"Esborra la comparaci\xF3 de seients desada","picker.close":"Tanca","picker.closeSeatStatus":"Tanca l'estat del seient","picker.closestGroupChosenInstantly":"El grup disponible m\xE9s proper, triat a l'instant.","picker.aboutBestSeats":"Sobre trobar seients junts","picker.collapseTicketPanel":"Redueix el tauler d'entrades","picker.colorblindColors":"Colors adaptats al daltonisme","picker.companionSeatsNote":"Les places d\u2019acompanyant del costat continuen sent seleccionables","picker.accessFreeCount":"{count} lliures","picker.accessSpreadHint":"{count} places accessibles a {sections} sectors \xB7 toca un sector destacat","picker.holdLapsedStillFree.one":"La teva reserva ha caducat mentre eres fora. Aquesta pla\xE7a encara \xE9s lliure.","picker.holdLapsedStillFree.many":"La teva reserva ha caducat mentre eres fora. Aquestes places encara s\xF3n lliures.","picker.holdLapsedStillFree.other":"La teva reserva ha caducat mentre eres fora. Aquestes places encara s\xF3n lliures.","picker.holdLapsedSomeTaken.one":"La teva reserva ha caducat mentre eres fora i {count} d\u2019aquestes places ja est\xE0 ocupada. La resta encara s\xF3n lliures.","picker.holdLapsedSomeTaken.many":"La teva reserva ha caducat mentre eres fora i {count} d\u2019aquestes places ja estan ocupades. La resta encara s\xF3n lliures.","picker.holdLapsedSomeTaken.other":"La teva reserva ha caducat mentre eres fora i {count} d\u2019aquestes places ja estan ocupades. La resta encara s\xF3n lliures.","picker.holdLapsedAllTaken.one":"La teva reserva ha caducat mentre eres fora i aquesta pla\xE7a ja est\xE0 ocupada.","picker.holdLapsedAllTaken.many":"La teva reserva ha caducat mentre eres fora i aquestes places ja estan ocupades.","picker.holdLapsedAllTaken.other":"La teva reserva ha caducat mentre eres fora i aquestes places ja estan ocupades.","picker.holdLapsedSelectAgain.one":"Tornar-la a seleccionar","picker.holdLapsedSelectAgain.many":"Tornar-les a seleccionar","picker.holdLapsedSelectAgain.other":"Tornar-les a seleccionar","picker.compareCount":"Compara {count}","picker.compareWithSaved":"Compara amb el desat","picker.confirmOrCancelSeat":"Confirma o cancel\xB7la aquest seient","picker.confirmSeatLabel":"Confirma el seient {label}","picker.confirmYourTable":"Confirma la teva taula","picker.confirmedAndOnWay":"confirmat. La confirmaci\xF3 ja est\xE0 en cam\xED.","picker.continue":"Continua","picker.continueToCheckout":"Continua cap al pagament","picker.couldNotAddMoreTime":"No s'ha pogut afegir m\xE9s temps: ves al pagament ara.","picker.couldNotFindSeatsTogether":"No hem trobat {count} seients junts. Prova amb menys seients o un altre tipus d'entrada.","picker.couldNotReleaseTickets":"No hem pogut alliberar les teves entrades. La reserva no ha canviat.","picker.couldNotRemoveLabel":"No hem pogut treure {label}. La reserva no ha canviat.","picker.currentOffer":"Oferta actual","picker.currentTicketOffer":"Oferta d'entrades actual","picker.dragToLookAround":"Arrossega per mirar al voltant \xB7 despla\xE7a't per fer zoom","picker.dragToLookTouch":"Arrossega per mirar al voltant \xB7 pessiga per fer zoom \xB7 toca \u2715 per tancar","picker.dragToLookMouse":"Arrossega per mirar al voltant \xB7 pessiga o despla\xE7a't per fer zoom \xB7 Esc per tancar","picker.emptyWheelchairSpace":"Espai lliure per a cadira de rodes","picker.exitFullScreen":"Surt de pantalla completa","picker.fewer":"Menys","picker.fewerGuests":"Menys convidats","picker.fewerSeats":"Menys seients","picker.filterAndFocusByPrice":"Filtra i destaca els seients per preu","picker.filters":"Filtres","picker.findBestSeatsCount.one":"Busca {count} millor seient","picker.findBestSeatsCount.many":"Busca els {count} millors seients","picker.findBestSeatsCount.other":"Busca els {count} millors seients","picker.findBestSeatsTogether":"Busca els millors seients junts","picker.findNewSeats":"Busca seients nous","picker.findingBestSeats":"Buscant els millors seients\u2026","picker.findingEllipsis":"Buscant\u2026","picker.flat2dMap":"Mapa 2D pla","picker.flexiblePartyTypeWord":"Grup flexible \xB7 {typeWord}","picker.fullScreen":"Pantalla completa","picker.generalAdmission":"Entrada general","picker.guestCountCouldNotBeSecured":"No hem pogut assegurar aquest nombre de convidats. La teva reserva de taula no ha canviat.","picker.guestCountNoLongerAvailable":"Aquest nombre de convidats ja no est\xE0 disponible. La teva reserva no ha canviat.","picker.guests":"Convidats","picker.guestsCount":"{count} convidats","picker.guestsCountEdit":"{count} convidats \xB7 Edita","picker.held":"Reservat","picker.heldByOther":"Reservat per un altre comprador, pot alliberar-se","picker.heldForYou":"Reservat per a tu","picker.heldSeatExplanation":"Un altre comprador t\xE9 aquest seient reservat. Pot tornar a quedar lliure.","picker.hidePanel":"Amaga el tauler","picker.hideTicketPanel":"Amaga el tauler d'entrades","picker.holdSeatsAndCheckout":"Reserva els seients i paga","picker.howOfferWorks":"Com funciona l'oferta {name}","picker.interactive3dVenueView":"Vista 3D interactiva del recinte","picker.keepMine":"Conserva els meus","picker.labelNoLongerAvailable":"{label} ja no est\xE0 disponible.","picker.labelRemoved":"{label} s'ha tret.","picker.labelRemovedFromHold":"{label} s'ha tret de la teva reserva.","picker.labelRestored":"{label} s'ha restaurat.","picker.labelsNoLongerAvailable.one":"{labels} ja no est\xE0 disponible. Tria un altre seient.","picker.labelsNoLongerAvailable.many":"{labels} ja no estan disponibles. Tria un altre grup.","picker.labelsNoLongerAvailable.other":"{labels} ja no estan disponibles. Tria un altre grup.","picker.leftCount.one":"en queda {count}","picker.leftCount.many":"en queden {count}","picker.leftCount.other":"en queden {count}","picker.levelNumber":"Nivell {number}","picker.levels":"Nivells","picker.loadingSeatMap":"Carregant el mapa de seients\u2026","picker.lookAroundLive3d":"Mira al voltant en 3D en directe","picker.manualTicketsRemovedNote":"Les entrades que has triat manualment nom\xE9s es trauran quan s'hagi assegurat un grup nou.","picker.map":"Mapa","picker.mapDidNotLoad":"El mapa de seients no s'ha carregat","picker.maxTicketsForOrder":"Pots seleccionar fins a {count} entrades per a aquesta comanda.","picker.selectExactMore":"Selecciona'n {count} m\xE9s","picker.selectExactCount":"Selecciona exactament {count} entrades","picker.selectMinimumMore":"Selecciona'n {count} m\xE9s","picker.adjustSeatSelection":"Ajusta la selecci\xF3 de seients","picker.selectSeatsTogether":"Tria seients junts a la mateixa fila i categoria d'entrada.","picker.minToMaxGuests":"De {min} a {max} convidats","picker.more":"M\xE9s","picker.moreCount":"+{count} m\xE9s","picker.showLess":"Mostra menys","picker.moreGuests":"M\xE9s convidats","picker.moreSeats":"M\xE9s seients","picker.moreTimeAdded":"S'ha afegit m\xE9s temps: els teus seients continuen reservats.","picker.noAccessibilityMetadata":"No s'han facilitat dades d'accessibilitat","picker.noAuthoredRestriction":"L'organitzador no ha indicat cap restricci\xF3","picker.noSeatsSelected":"Cap seient seleccionat","picker.notForSale":"No est\xE0 a la venda","picker.notAvailable":"No disponible","picker.notForSaleExplanation":"Aquest seient no s'inclou en la venda actual.","picker.numberOfGuests":"Nombre de convidats","picker.offerDetailActive":"Aquest preu s'aplica autom\xE0ticament als seients elegibles. Les entrades en cistelles actives redueixen temporalment la quantitat disponible; les reserves alliberades o caducades la retornen. Quan acabi l'oferta, hi entrar\xE0 la seg\xFCent oferta aplicable o el preu normal de l'entrada.","picker.offerDetailUpcoming":"Ara les entrades estan disponibles al preu normal. Aquesta oferta programada s'aplicar\xE0 autom\xE0ticament als seients elegibles quan comenci.","picker.offerRemainingAvailable":"{count} disponibles","picker.offerStarts":"comen\xE7a {time}","picker.offerUntil":"fins a {time}","picker.oneSeatSaved":"1 seient desat","picker.oneSeatSavedChooseAnother":"Un seient desat; tria'n un altre per comparar","picker.openAuthored360":"Obre el recinte en 360\xB0","picker.openComparison":"Obre la comparaci\xF3","picker.openComparisonOfSeats":"Obre la comparaci\xF3 de {count} seients","picker.openTicketPanel":"Obre el tauler d'entrades","picker.peekFromPrice":"Des de {price}","picker.peekTicketsTotal.one":"{count} entrada \xB7 {total}","picker.peekTicketsTotal.many":"{count} entrades \xB7 {total}","picker.peekTicketsTotal.other":"{count} entrades \xB7 {total}","picker.perGuestPrice":"{price} per convidat","picker.pickYourSeats":"Tria els teus seients","picker.preferredTicketType":"Tipus d'entrada preferit","picker.preferredVenueZone":"Zona del recinte preferida","picker.priceNotSupplied":"Preu no indicat","picker.removeHeldTicketLabel":"Treu l'entrada reservada {label}","picker.removeSeatLabel":"Treu {label}","picker.removeTicketsUntilOrFewer":"Treu entrades fins que la comanda en tingui {count} o menys.","picker.replaceCurrentChoices":"Vols substituir les teves tries actuals?","picker.review":"Revisa","picker.row":"Fila","picker.rowLabel":"Fila {label}","picker.saveToCompare":"Desa per comparar","picker.savedForComparison":"Desat per comparar","picker.savedSeatComparison":"Comparaci\xF3 de seients desada","picker.scheduledOffer":"Oferta programada","picker.seat":"Seient","picker.seatCount.one":"{count} seient","picker.seatCount.many":"{count} seients","picker.seatCount.other":"{count} seients","picker.seatJustTakenByAnother":"Un altre comprador acaba d'agafar el seient {label}.","picker.seatLabel":"Seient {label}","picker.seatNoLongerAvailable":"Aquest seient ja no est\xE0 disponible.","picker.seatNoLongerYours":"Alguns seients ja no estan disponibles per a tu. S'han tret de la teva comanda.","picker.seatNumberLower":"seient {label}","picker.seatSalesClosedForEvent":"La venda de seients per a aquest esdeveniment s'ha tancat.","picker.maintenancePaused.one":"La reserva est\xE0 en pausa per manteniment. Torna-ho a provar d\u2019aqu\xED a {count} minut aproximadament.","picker.maintenancePaused.many":"La reserva est\xE0 en pausa per manteniment. Torna-ho a provar d\u2019aqu\xED a {count} minuts aproximadament.","picker.maintenancePaused.other":"La reserva est\xE0 en pausa per manteniment. Torna-ho a provar d\u2019aqu\xED a {count} minuts aproximadament.","picker.maintenancePausedShortly":"La reserva est\xE0 en pausa uns minuts per manteniment. Torna-ho a provar d\u2019aqu\xED a poc.","picker.seatSelection":"Selecci\xF3 de seients","picker.seatStatusLegend":"Llegenda d'estats dels seients","picker.seatTaken":"Una altra persona ha agafat un seient que havies triat. S'ha tret de la teva comanda.","picker.seatsJustTaken":"Un o m\xE9s seients s'acaben d'ocupar. Torna a triar.","picker.seatsNoLongerAvailableTryAnother":"Aquests seients ja no estan disponibles. Prova amb una altra quantitat o tipus d'entrada.","picker.seatsSelectedCount.one":"{count} seleccionat","picker.seatsSelectedCount.many":"{count} seleccionats","picker.seatsSelectedCount.other":"{count} seleccionats","picker.section":"Sector","picker.secureMore":"Assegura'n m\xE9s","picker.secureMoreAndCheckout":"Assegura'n {count} m\xE9s i paga","picker.seeItIn3d":"Mira-ho en 3D","picker.select":"Selecciona","picker.selectSeats":"Selecciona seients","picker.selectTable":"Selecciona la taula","picker.selectWholeTable":"Selecciona tota la taula","picker.selected":"Seleccionat","picker.selectingEllipsis":"Seleccionant\u2026","picker.showAllSeats":"Mostra tots els seients","picker.showAllTicketTypes":"Mostra els {count} tipus d'entrada","picker.showFewer":"Mostra'n menys","picker.showLabelSeatsOnMap":"Mostra els seients {label} al mapa","picker.showTicketPanel":"Mostra el tauler d'entrades","picker.sold":"Venut","picker.soldOutCopy":"Ara mateix no hi ha seients numerats disponibles per a aquest esdeveniment.","picker.soldOutEyebrow":"Aquest esdeveniment","picker.soldOutTitle":"Esgotat","picker.soldSeatExplanation":"Aquest seient ja s'ha reservat.","picker.statusAvailable":"disponible","picker.statusOnHold":"reservat","picker.statusTaken2":"ocupat","picker.table":"Taula","picker.tableCapacity":"Capacitat de la taula","picker.tableUpdatedForGuests":"{label} actualitzada per a {count} convidats.","picker.temporarilyHeld":"Reservat temporalment","picker.ticketPrices":"Preus de les entrades","picker.ticketTypeNotChanged":"Aquest tipus d'entrada no est\xE0 disponible per a aquest seient. La teva reserva no ha canviat.","picker.ticketTypeSoldOut":"Aquest tipus d'entrada est\xE0 esgotat. Prova un altre tipus.","picker.tickets":"Entrades","picker.ticketsCount.one":"{count} entrada","picker.ticketsCount.many":"{count} entrades","picker.ticketsCount.other":"{count} entrades","picker.toggleColorblindColors":"Activa o desactiva els colors adaptats al daltonisme","picker.total":"Total","picker.trayHintTapOrBest":"Toca un seient al mapa, o deixa que triem els millors disponibles per a tu.","picker.aboutYourSeats":"Com triar seients","picker.trayHintTapOrStanding":"Toca un seient al mapa o agafa entrades de peu a sota.","picker.undo":"Desf\xE9s","picker.upcomingTicketOffer":"Propera oferta d'entrades","picker.updateTable":"Actualitza la taula","picker.updatingEllipsis":"Actualitzant\u2026","picker.venueView":"Vista del recinte","picker.recentreOnStage":"Torna a centrar a l\u2019escenari","picker.stopYourSeat":"El teu seient","picker.stopYourRow":"La teva fila","picker.stopYourSection":"El teu sector","picker.stopWholeVenue":"Tot el recinte","picker.viewFromHere":"Vista des d'aqu\xED","picker.viewFromYourSeat":"vista des del teu seient","picker.fromYourSeat":"des del teu seient","picker.viewFromThisSeat":"Vista des d'aquest seient","picker.wholeTypeWord":"{typeWord} sencera","picker.willChooseClosestGroup":"Triarem per a tu el grup disponible m\xE9s proper.","picker.willFindSeatsTogether":"Trobarem {count} seients junts.","picker.yourSeats":"Els teus seients","picker.zoomIn":"Amplia","picker.zoomOut":"Redueix","picker.fitWholeVenue":"Mostra tot el recinte","picker.dragToRotateVenue":"Arrossega per girar el recinte","picker.dragToMoveVenue":"Arrossega per moure el recinte","picker.closeVenueNav":"Tanca","picker.levelsAndAreas":"Nivells i \xE0rees","picker.gaChooseTickets":"Quantes entrades?","picker.gaAdd.one":"Afegeix {count} entrada \xB7 {price}","picker.gaAdd.many":"Afegeix {count} entrades \xB7 {price}","picker.gaAdd.other":"Afegeix {count} entrades \xB7 {price}","picker.gaUpdate.one":"Actualitza \xB7 {count} entrada","picker.gaUpdate.many":"Actualitza \xB7 {count} entrades","picker.gaUpdate.other":"Actualitza \xB7 {count} entrades","picker.gaRemove":"Treu","picker.gaAreasHeading":"\xC0rees","picker.gaTrayHintTapArea":"Toca una \xE0rea del mapa per triar entrades.","picker.gaAdded.one":"{count} entrada de {area} afegida, {price}","picker.gaAdded.many":"{count} entrades de {area} afegides, {price}","picker.gaAdded.other":"{count} entrades de {area} afegides, {price}","picker.gaRemoved":"Entrades de {area} tretes","picker.gaChooseForArea":"Tria entrades per a {area}","picker.holdSeatsForAllPerformances":"Reserva els seients per a les {count} funcions","picker.completeAllPerformances":"Completa totes les funcions ({complete}/{total})","picker.groupTrayHint":"Tria els seients una vegada. Es reservaran els mateixos seients per a cada funci\xF3.","picker.groupPerPerformanceTrayHint":"Tria seients per a aquesta funci\xF3 i despr\xE9s completa cada data de dalt.","picker.group.sameSeatSummary":"Tria una sola vegada. Es reservaran els mateixos seients per a les {count} funcions.","picker.group.perPerformanceSummary":"Tria seients per a cada funci\xF3. Les {count} seleccions es reserven juntes.","picker.group.allDates":"Hi ha incloses les {count} dates","picker.group.flexibleDatesInView":"Es veuen les {count} dates","picker.group.flexibleDatesSelected":"{selected} de {total} dates seleccionades","picker.group.performances":"Funcions","picker.group.heldForEveryPerformance":"Reservats per a cada funci\xF3","picker.group.notStarted":"Sense comen\xE7ar","picker.group.inProgress":"En curs","picker.group.complete":"Completa","picker.group.needsAttention":"Cal revisar-ho","picker.group.previousPerformance":"Funci\xF3 anterior","picker.group.nextPerformance":"Funci\xF3 seg\xFCent","picker.group.performanceOpened":"Ara tries seients per a {performance}.","picker.group.checkingAvailability":"Comprovant els seients disponibles per a cada funci\xF3\u2026","picker.group.securing":"Estem reservant aquests seients per a cada funci\xF3. Espera un moment.","picker.group.commitPending":"Encara estem reservant aquests seients per a cada funci\xF3. SeatLayer continua treballant i aquesta p\xE0gina est\xE0 comprovant el resultat.","picker.group.outcomeUnknown":"Estem comprovant si els teus seients han quedat reservats. No tri\xEFs altres seients encara.","picker.group.longRunning":"Aix\xF2 triga m\xE9s del normal. Continuem comprovant la mateixa sol\xB7licitud. No la tornis a enviar. Refer\xE8ncia: {reference}.","picker.group.abortPending":"No hem pogut reservar totes les funcions. Estem comprovant que tots els seients quedin alliberats abans que ho tornis a provar.","picker.group.secured":"Seients reservats per a cada funci\xF3. Continua quan vulguis.","picker.group.notSecured":"No hem pogut reservar aquests seients per a cada funci\xF3. No hi ha res reservat. Torna-ho a provar.","picker.group.retry":"Torna-ho a provar","picker.group.salesClosed":"Els seients d'aquest conjunt de funcions no estan disponibles ara. Torna a la p\xE0gina de l'esdeveniment per veure altres opcions.","picker.group.revisionChanged":"Aquest conjunt de funcions ha canviat. Revisa les funcions incloses abans de tornar a triar seients.","picker.group.legendTitle":"Disponibilitat de seients","picker.group.legendUnavailable":"No disponible","picker.group.partlyAvailableTitle":"Lliure nom\xE9s algunes nits","picker.group.notAvailableOn":"No disponible el {dates}","picker.group.nightFree":"Lliure","picker.group.nightBlocked":"No disponible","picker.group.pickSeatFreeEveryNight":"Tria un seient que estigui lliure totes les nits.","picker.group.chooseNightByNight":"Tria els seients nit a nit","picker.group.nightByNightStarted":"Ara tries seients per a cada funci\xF3 per separat. S'ha esborrat la teva selecci\xF3.","picker.group.yourSeatsByNight":"Els teus seients per nit","picker.group.noSeatsChosenYet":"Encara cap seient","picker.group.chosenOfTotal":"{chosen} de {total}","picker.group.needsMoreSeats":"En falten {count}","picker.group.closeSeatDetails":"Tanca els detalls del seient","picker.group.seatPartlyAvailable":"{label}: lliure en {free} de {total} funcions. No disponible el {dates}.","picker.group.selectAvailableDates":"Selecciona per a {count} dates disponibles","picker.group.selectedAvailableDates":"Seleccionat per a {count} dates disponibles.","picker.group.clearBeforePartial":"Buida els seients actuals abans de triar un altre conjunt de dates.","picker.group.legendAvailable":"Disponible","picker.group.legendSelected":"Seleccionat","picker.group.legendNotEveryDate":"No disponible totes les dates","picker.group.progressLabel":"Passos de la reserva","picker.group.stepPerformances":"Funcions","picker.group.stepSeats":"Seients","picker.group.stepReview":"Revisi\xF3","picker.group.stepDone":"Fet","picker.group.stepCurrent":"Pas actual","picker.group.includedNote":"Hi ha incloses les {count} funcions \xB7 les dates no es poden treure aqu\xED","picker.group.flexibleDatesNote":"Tria un seient parcial per incloure nom\xE9s les dates en qu\xE8 est\xE0 disponible.","picker.group.flexibleSelectedNote":"Nom\xE9s es reservaran aquestes {count} dates per a aquest seient.","picker.group.yourSelection":"La teva selecci\xF3","picker.group.pricesPerPerformance":"Preus per funci\xF3","picker.group.total":"Total","picker.group.heldTogether":"Les {count} seleccions de funcions es reserven juntes \xB7 queden {time}","picker.group.completeWithSeats":"Completa \xB7 {seats}","picker.group.stillNeedsSeat":"Encara falta un seient","picker.group.sameSeatMapHelp":"Un sol pl\xE0nol mostra nom\xE9s els seients disponibles per a totes les funcions triades.","picker.group.perPerformanceMapHelp":"Canvia de data a dalt; la posici\xF3 del pl\xE0nol i cada tria es mantenen desades.","picker.group.bookedAll":"Tot a punt. Seients reservats per a les {count} funcions.","picker.group.seatsEveryPerformance.one":"{count} seient \xB7 cada funci\xF3","picker.group.seatsEveryPerformance.many":"{count} seients \xB7 cada funci\xF3","picker.group.seatsEveryPerformance.other":"{count} seients \xB7 cada funci\xF3","picker.group.seatsPerPerformance.one":"{count} seient \xB7 {per} per funci\xF3","picker.group.seatsPerPerformance.many":"{count} seients \xB7 {per} per funci\xF3","picker.group.seatsPerPerformance.other":"{count} seients \xB7 {per} per funci\xF3","picker.group.performancesChosenOf.one":"{chosen} de {total} funcions triades \xB7 {count} seient","picker.group.performancesChosenOf.many":"{chosen} de {total} funcions triades \xB7 {count} seients","picker.group.performancesChosenOf.other":"{chosen} de {total} funcions triades \xB7 {count} seients","picker.group.ticketsConfirmedAcross.one":"{count} entrada confirmada per a {performances} funcions","picker.group.ticketsConfirmedAcross.many":"{count} entrades confirmades per a {performances} funcions","picker.group.ticketsConfirmedAcross.other":"{count} entrades confirmades per a {performances} funcions","checkout.free":"Gratu\xEFt","checkout.confirmBooking":"Confirma la reserva","checkout.price":"Preu","checkout.freeNote":"Aquest esdeveniment \xE9s gratu\xEFt. No es cobra res.","checkout.confirmingBooking":"S'est\xE0 confirmant la teva reserva\u2026","checkout.confirmingSeats":"S'estan confirmant els teus seients\u2026","checkout.busyRetryingBooking":"Ara hi ha molta activitat. Encara s'est\xE0 confirmant la teva reserva\u2026","checkout.busyRetryingPayment":"Ara hi ha molta activitat. Encara s'est\xE0 obrint el pagament segur\u2026","checkout.busyFailedBooking":"Encara no hem pogut confirmar la teva reserva perqu\xE8 hi ha molta activitat. No s'ha cobrat res. Torna-ho a provar.","checkout.busyFailedPayment":"Encara no hem pogut iniciar el pagament perqu\xE8 hi ha molta activitat. No s'ha cobrat res. Torna-ho a provar.","checkout.seatsUnavailable":"Alg\xFA ha agafat aquests seients mentre omplies el formulari. No s'ha cobrat res. Torna'ls a triar.","bookingForm.ticketHolders":"Titulars de les entrades","bookingForm.bookingQuestions":"Sobre la teva reserva","bookingForm.ticketNumber":"Entrada {number}","bookingForm.guestOf":"{area} \xB7 Assistent {index} de {total}","bookingForm.useMyDetails":"Utilitza les meves dades","bookingForm.syncedHint":"Emplenat amb les teves dades de m\xE9s amunt.","bookingForm.name":"Nom","bookingForm.email":"Correu electr\xF2nic","bookingForm.phone":"Tel\xE8fon","bookingForm.optional":"(opcional)","bookingForm.fixErrors":"Cal revisar algunes dades abans de continuar.","bookingForm.error.required":"{field}: camp obligatori.","bookingForm.error.tooLong":"{field}: m\xE0xim {max} car\xE0cters.","bookingForm.error.email":"{field}: introdueix una adre\xE7a de correu electr\xF2nic v\xE0lida.","bookingForm.error.phone":"{field}: 6\u201320 car\xE0cters: xifres, espais, + - ( ).","bookingForm.error.number":"{field}: ha de ser un n\xFAmero.","bookingForm.error.date":"{field}: ha de ser una data.","bookingForm.error.choice":"Tria una opci\xF3 v\xE0lida per a {field}.","bookingForm.error.invalid":"Revisa el camp {field}.","tickets.editNames":"Edita els noms","tickets.editNamesHint":"Pots corregir els noms fins que comenci l'esdeveniment.","tickets.saveNames":"Desa els noms","tickets.savingNames":"S'est\xE0 desant\u2026","tickets.cancel":"Cancel\xB7la","tickets.namesSaved":"S'han actualitzat els noms.","tickets.editClosed":"Els noms no es poden canviar un cop ha comen\xE7at l'esdeveniment.","tickets.saveFailed":"No s'han pogut desar els noms. Comprova la connexi\xF3 i torna-ho a provar.","picker.bookingForm.ticket":"Entrada {number}","picker.bookingForm.useMyDetails":"Fes servir les meves dades","picker.bookingForm.name":"Nom","picker.bookingForm.email":"Correu electr\xF2nic","picker.bookingForm.phone":"Tel\xE8fon","picker.bookingForm.optional":"{label} (opcional)","picker.bookingForm.choose":"Tria\u2026","picker.bookingForm.required":"Aquest camp \xE9s obligatori.","picker.bookingForm.invalid":"Revisa aquesta resposta.","picker.bookingForm.invalidEmail":"Introdueix una adre\xE7a electr\xF2nica v\xE0lida.","picker.bookingForm.invalidPhone":"Introdueix un n\xFAmero de tel\xE8fon v\xE0lid.","picker.bookingForm.tooLong":"\xC9s massa llarg.","picker.bookingForm.fix":"Cal revisar algunes dades.","picker.bookingForm.unsupported":"Aquest esdeveniment necessita dades de cada titular d'entrada que aquest pagament no pot recollir. Els teus seients continuen reservats i no s'ha cobrat res.","picker.bookingForm.continueOnEventPage":"Continua a la p\xE0gina de l'esdeveniment","picker.bookingForm.guestOfCount":"{label} \xB7 Convidat {index} de {total}","buyer.testBookingStrip":"Reserva de prova: cap entrada real, cap pagament","buyer.testTicketNotValid":"Entrada de prova: no v\xE0lida per accedir"};export{e as ca};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var n=72;var u="seatmap.chart";var r=[{key:"wheelchair",label:"Wheelchair space",short:"Wheelchair",icon:"\u267F"},{key:"companion",label:"Companion seat",short:"Companion",icon:"\u{1F9D1}\u200D\u{1F91D}\u200D\u{1F9D1}"},{key:"semi-ambulatory",label:"Semi-ambulatory (limited mobility)",short:"Limited mobility",icon:"\u{1F9AF}"},{key:"designated-aisle",label:"Designated aisle / transfer seat",short:"Aisle transfer",icon:"AS"},{key:"step-free",label:"Step-free accessible seat",short:"Step-free",icon:"SF"},{key:"hearing",label:"Assistive listening",short:"Hearing",icon:"\u{1F9BB}"},{key:"cart",label:"CART live-caption view",short:"CART captions",icon:"CC"},{key:"sign-language",label:"Sign-language view",short:"Sign language",icon:"\u{1F91F}"},{key:"low-vision",label:"Blind / low-vision viewing",short:"Low vision",icon:"LV"},{key:"sensory-friendly",label:"Quiet / sensory-friendly seating",short:"Sensory-friendly",icon:"QS"},{key:"plus-size",label:"Plus-size seat",short:"Plus-size",icon:"\u{1F4BA}"},{key:"lift-armrest",label:"Lift-up armrest",short:"Lift armrest",icon:"\u2195\uFE0F"}],i=new Map(r.map(e=>[e.key,e]));function g(e){return i.get(e)}var o={wheelchair:"#3b82f6",companion:"#8b5cf6","semi-ambulatory":"#0ea5e9","designated-aisle":"#0284c7","step-free":"#16a34a",hearing:"#14b8a6",cart:"#7c3aed","sign-language":"#f59e0b","low-vision":"#d97706","sensory-friendly":"#6366f1","plus-size":"#ec4899","lift-armrest":"#22c55e"};function m(e){let t=e?.[0];return t&&o[t]||"#3b82f6"}var a=[{key:"obstructedView",label:"Obstructed view",short:"Obstructed",icon:"\u26D4"},{key:"restrictedView",label:"Restricted view",short:"Restricted",icon:"\u{1F441}"},{key:"premium",label:"Premium seat",short:"Premium",icon:"\u2605"}],s=new Map(a.map(e=>[e.key,e]));function p(e){return s.get(e)}var
|
|
1
|
+
var n=72;var u="seatmap.chart";var r=[{key:"wheelchair",label:"Wheelchair space",short:"Wheelchair",icon:"\u267F"},{key:"companion",label:"Companion seat",short:"Companion",icon:"\u{1F9D1}\u200D\u{1F91D}\u200D\u{1F9D1}"},{key:"semi-ambulatory",label:"Semi-ambulatory (limited mobility)",short:"Limited mobility",icon:"\u{1F9AF}"},{key:"designated-aisle",label:"Designated aisle / transfer seat",short:"Aisle transfer",icon:"AS"},{key:"step-free",label:"Step-free accessible seat",short:"Step-free",icon:"SF"},{key:"hearing",label:"Assistive listening",short:"Hearing",icon:"\u{1F9BB}"},{key:"cart",label:"CART live-caption view",short:"CART captions",icon:"CC"},{key:"sign-language",label:"Sign-language view",short:"Sign language",icon:"\u{1F91F}"},{key:"low-vision",label:"Blind / low-vision viewing",short:"Low vision",icon:"LV"},{key:"sensory-friendly",label:"Quiet / sensory-friendly seating",short:"Sensory-friendly",icon:"QS"},{key:"plus-size",label:"Plus-size seat",short:"Plus-size",icon:"\u{1F4BA}"},{key:"lift-armrest",label:"Lift-up armrest",short:"Lift armrest",icon:"\u2195\uFE0F"}],i=new Map(r.map(e=>[e.key,e]));function g(e){return i.get(e)}var o={wheelchair:"#3b82f6",companion:"#8b5cf6","semi-ambulatory":"#0ea5e9","designated-aisle":"#0284c7","step-free":"#16a34a",hearing:"#14b8a6",cart:"#7c3aed","sign-language":"#f59e0b","low-vision":"#d97706","sensory-friendly":"#6366f1","plus-size":"#ec4899","lift-armrest":"#22c55e"};function m(e){let t=e?.[0];return t&&o[t]||"#3b82f6"}var a=[{key:"obstructedView",label:"Obstructed view",short:"Obstructed",icon:"\u26D4"},{key:"restrictedView",label:"Restricted view",short:"Restricted",icon:"\u{1F441}"},{key:"premium",label:"Premium seat",short:"Premium",icon:"\u2605"}],s=new Map(a.map(e=>[e.key,e]));function p(e){return s.get(e)}var y=8,S=24,c=["reference-focal","bar","entrance","exit","restroom","screen","sound","concession","coat","wall","rail","suite","obstruction"],l=new Set(c);function v(e){switch(e.type){case"row":case"table":case"gaArea":case"booth":case"section":return"interactive";case"decorImage":return e.layer==="foreground"?"foreground":"background";case"shape":return e.role&&l.has(e.role)?"surroundings":"background";case"text":return"background";default:return"interactive"}}export{n as a,u as b,r as c,g as d,o as e,m as f,a as g,p as h,y as i,S as j,c as k,v as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as A}from"./chunk-
|
|
1
|
+
import{f as A}from"./chunk-F2EXXZSZ.js";import{c as M,k as x,n as m,t as _}from"./chunk-JBOTRSMY.js";var w=7,P=10,C=10,E=.39,I=.8,O=.62;function F(t){let n=Math.min(Math.abs(t.width),Math.abs(t.height));if(!(n>0))return C;let r=Math.max(1,t.text.length),L=Math.abs(t.width)*I/(r*O);return Math.max(C,Math.min(n*E,L))}var v=15,K=11,X=.85,d=12,u=4.5,Y=3,S=3,o="#000000",i="#ffffff",Z=24,B=18.67;function D(t,n=400){return t>=Z||n>=700&&t>=B?S:u}function U(t,n){return t*n>=d}var W=24,b={wheelchair:"M7.8 4.5a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM8 7L10.5 7L10.5 15L8 15ZM8 12.5L18 12.5L18 15L8 15ZM16 15L18 15L18 18L16 18ZM5.5 16a5.5 5.5 0 1 0 11 0a5.5 5.5 0 1 0 -11 0zM8 16a3 3 0 1 1 6 0a3 3 0 1 1 -6 0z",companion:"M5.5 6.5a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM4.5 18.5L6 11.5L11 11.5L12.5 18.5ZM12.5 7.5a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM11.5 19L13 12.5L18 12.5L19.5 19Z","semi-ambulatory":"M8.3 3.8a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM9 6.2L12 6.6L11 13.5L8.6 13L9 6.2ZM8.6 13L11 13L9.5 21L7 21ZM10.4 13L12.6 13L13.6 21L11.2 21ZM11.2 7.2L14 8L14.6 9.6L11.9 8.9ZM14.4 6.8L15.9 6.8L16.4 21L14.8 21Z","designated-aisle":"M3 5L6 5L6 14L3 14ZM3 12L13 12L13 15L3 15ZM5 15L7 15L7 20L5 20ZM11 15L13 15L13 20L11 20ZM13 7L20 7L17 4L19 4L23 8.5L19 13L17 13L20 10L13 10Z","step-free":"M4 4.5a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM4.4 7L7.5 7L7.5 13L11 15L9.5 17L5 14L4.4 7ZM2 19L8 19L17 10L22 10L22 13L18 13L10 21L2 21Z",hearing:"M15.5 3.5C9 2.2 5.5 6 5.5 11.5C5.5 16 8 19.5 10.5 21C13.2 22.6 16.4 20.8 15.4 18C14.8 16.4 12.9 16.1 13 14C13.1 11.9 15.8 11.4 15.8 8.5C15.8 5.4 13 4 15.5 3.5Z",cart:"M5.5 6L18.5 6a2.5 2.5 0 0 1 2.5 2.5L21 15.5a2.5 2.5 0 0 1 -2.5 2.5L11 18L7 20.5L7.5 18L5.5 18a2.5 2.5 0 0 1 -2.5 -2.5L3 8.5a2.5 2.5 0 0 1 2.5 -2.5zM6.5 11L17.5 11L17.5 12.6L6.5 12.6zM6.5 14L17.5 14L17.5 15.6L6.5 15.6z","sign-language":"M7 11L17 11L17 18a2 2 0 0 1 -2 2L9 20a2 2 0 0 1 -2 -2zM7.6 5L9.4 5L9.4 12L7.6 12zM9.9 3.5L11.7 3.5L11.7 12L9.9 12zM12.3 3.5L14.1 3.5L14.1 12L12.3 12zM14.6 5L16.4 5L16.4 12L14.6 12zM7.2 12.5L5 10.2L6.4 8.9L8.6 11.2Z","low-vision":"M2.5 12C6 6 18 6 21.5 12C18 18 6 18 2.5 12ZM9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM17.5 3L19 3L19 6L17.5 6ZM19 4L22 4L22 5.5L19 5.5Z","sensory-friendly":"M4 11C4 5 7 2.5 12 2.5S20 5 20 11L17 11C17 7 15.5 5.5 12 5.5S7 7 7 11ZM3 10L8 10L8 19L5 19a2 2 0 0 1 -2 -2ZM16 10L21 10L21 17a2 2 0 0 1 -2 2L16 19ZM9 12L15 12L15 14L9 14ZM10 16L14 16L14 18L10 18Z","plus-size":"M9.4 4.3a2.6 2.6 0 1 0 5.2 0a2.6 2.6 0 1 0 -5.2 0zM5 20L4 13C4 10.5 7 9.5 12 9.5C17 9.5 20 10.5 20 13L19 20Z","lift-armrest":"M5 6L8 6L8 19L5 19zM5 16L18 16L18 19L5 19zM8 12L17 12L17 14.5L8 14.5zM14 7L16 7L16 12L14 12zM12 7L18 7L15 3Z"},V=b.wheelchair;function $(t){if(!t?.length)return null;let n=t.includes("wheelchair")?"wheelchair":t[0];return b[n]??null}function j(t,n){return n.colorblind?k(n.canvasBackground):A(t)}function Q(t){return/-(\d{1,5})$/.exec(t)?.[1]??t}var s=m;function q(t,n,r){let L=M(t),a=M(n);if(!L||!a)return n;let e=Math.max(0,Math.min(1,r));return`#${L.map((c,p)=>Math.round(c*e+a[p]*(1-e))).map(c=>c.toString(16).padStart(2,"0")).join("")}`}var J=3;function t1(t){let n=s(i,t)??0,r=s(o,t)??0;return n>=u?i:r>=u&&_(t)||_(t)?o:i}function k(t){return _(t)?o:i}function h(t,n,r=u){let L=s(n,t);if(L!=null&&L>=r)return n;let a=s(o,t)??0,e=s(i,t)??0;return a===0&&e===0?n:a>=e?o:i}function n1(t,n,r,L=u){return n??h(t,r,L)}var z=3;function r1(t){let n=s("#ffffff",t);if(n!=null&&n>=z)return"#ffffff";let r=s(o,t)??0,L=s(i,t)??0;return r===0&&L===0?"#ffffff":r>=L?o:i}var T=/^#[0-9a-f]{6}$/i;function R(t){let n=M(t);return n!=null&&x(n)>.5}var N="#e5e7eb",y="#273142";function L1(t){return R(t)?N:y}function e1(t,n,r=u){let L=T.test(t.trim()),a=t.trim().toLowerCase(),e=0,l=0,c=null;for(let f of n){if(!L||!T.test(f.trim()))continue;e+=1;let g=h(f,t,r);g.toLowerCase()!==a&&(l+=1,c=g)}return{total:e,overridden:l,status:e===0?"none":l===0?"applies":l===e?"overridden":"mixed",overrideInk:c}}export{w as a,P as b,C as c,E as d,F as e,v as f,K as g,X as h,d as i,u as j,Y as k,S as l,o as m,i as n,D as o,U as p,W as q,b as r,V as s,$ as t,j as u,Q as v,s as w,q as x,J as y,t1 as z,k as A,h as B,n1 as C,r1 as D,R as E,N as F,y as G,L1 as H,e1 as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Pn,c as In,d as wn}from"./chunk-U7CVRE4P.js";import{a as Sn}from"./chunk-QJXSZT3H.js";import{a as Rn,c as Nt,d as ft,f as It,i as An}from"./chunk-M5X6G7FD.js";import{f as hn}from"./chunk-4I2VWFJY.js";import{e as gn,l as Mn}from"./chunk-4N5CHKHD.js";import{B as pn,C as At,Ja as qt,ba as ut,ca as lt,j as bn,la as Gt,na as dn,oa as Dt,qa as yn,ua as xn}from"./chunk-F7TP67LK.js";import{A as Pt,d as H,y as nt}from"./chunk-JBOTRSMY.js";import Ae from"earcut";import Pe from"polygon-clipping";var g=ut,Ie=.002;function we(t,n,e){let r=Math.hypot(n[0]-t[0],n[1]-t[1],n[2]-t[2]),o=Math.hypot(e[0]-n[0],e[1]-n[1],e[2]-n[2]),a=Math.hypot(t[0]-e[0],t[1]-e[1],t[2]-e[2]),i=Math.max(r,o,a);if(i<1e-9)return!0;let s=(r+o+a)/2;return 2*Math.sqrt(Math.max(0,s*(s-r)*(s-o)*(s-a)))/i<Ie}var ht=class{constructor(n=16384){this.len=0;this.buf=new Float32Array(n)}push3(n,e,r){this.len+3>this.buf.length&&this.grow(this.len+3),this.buf[this.len++]=n,this.buf[this.len++]=e,this.buf[this.len++]=r}push1(n){this.len+1>this.buf.length&&this.grow(this.len+1),this.buf[this.len++]=n}grow(n){let e=this.buf.length*2;for(;e<n;)e*=2;let r=new Float32Array(e);r.set(this.buf.subarray(0,this.len)),this.buf=r}get length(){return this.len}toArray(){return this.buf.slice(0,this.len)}},Yt=class{constructor(){this.pos=new ht;this.nor=new ht;this.col=new ht;this.flr=new ht;this.mat=new ht;this.currentFloor=0;this.currentMaterial=0}setFloor(n){this.currentFloor=n}setMaterial(n){this.currentMaterial=n}tri(n,e,r,o,a,i=a,s=a){we(n,e,r)||(this.pos.push3(n[0],n[1],n[2]),this.pos.push3(e[0],e[1],e[2]),this.pos.push3(r[0],r[1],r[2]),this.nor.push3(o[0],o[1],o[2]),this.nor.push3(o[0],o[1],o[2]),this.nor.push3(o[0],o[1],o[2]),this.col.push3(a[0],a[1],a[2]),this.col.push3(i[0],i[1],i[2]),this.col.push3(s[0],s[1],s[2]),this.flr.push1(this.currentFloor),this.flr.push1(this.currentFloor),this.flr.push1(this.currentFloor),this.mat.push1(this.currentMaterial),this.mat.push1(this.currentMaterial),this.mat.push1(this.currentMaterial))}triN(n,e,r,o,a,i,s,l=s,c=s){[...n,...e,...r].every(Number.isFinite)&&(this.pos.push3(n[0],n[1],n[2]),this.pos.push3(e[0],e[1],e[2]),this.pos.push3(r[0],r[1],r[2]),this.nor.push3(o[0],o[1],o[2]),this.nor.push3(a[0],a[1],a[2]),this.nor.push3(i[0],i[1],i[2]),this.col.push3(s[0],s[1],s[2]),this.col.push3(l[0],l[1],l[2]),this.col.push3(c[0],c[1],c[2]),this.flr.push1(this.currentFloor),this.flr.push1(this.currentFloor),this.flr.push1(this.currentFloor),this.mat.push1(this.currentMaterial),this.mat.push1(this.currentMaterial),this.mat.push1(this.currentMaterial))}get vertexCount(){return this.pos.length/3}build(){return{position:this.pos.toArray(),normal:this.nor.toArray(),color:this.col.toArray(),floor:this.flr.toArray(),material:this.mat.toArray(),count:this.pos.length/3}}};function _e(t,n,e){let r=n[0]-t[0],o=n[1]-t[1],a=n[2]-t[2],i=e[0]-t[0],s=e[1]-t[1],l=e[2]-t[2],c=o*l-a*s,f=a*i-r*l,m=r*s-o*i,u=Math.hypot(c,f,m)||1;return c/=u,f/=u,m/=u,[c,f,m]}function Te(t,n){let e=[...t],r=[];for(let i of t)r.push(i.x,i.y);let o=[];if(n){for(let i of n)if(!(i.length<3)){o.push(e.length);for(let s of i)e.push(s),r.push(s.x,s.y)}}let a=Ae(r,o.length?o:void 0,2);return{pts:e,tris:a}}function Jt(t){return ft(t)<0?[...t].reverse():t}var Be=3;function Ee(t,n,e,r){let o=r(t),a=r(n),i=r(e),s=(h,b,p,d)=>Math.abs(r({x:(h.x+b.x)/2,y:(h.y+b.y)/2})-(p+d)/2),l=(t.x+n.x+e.x)/3,c=(t.y+n.y+e.y)/3,f=(o+a+i)/3,m=Math.max(s(t,n,o,a),s(n,e,a,i),s(e,t,i,o),Math.abs(r({x:l,y:c})-f)),u=(h,b,p)=>{let d=Math.abs(r({x:(h+l)/2,y:(b+c)/2})-(p+f)/2);d>m&&(m=d)};return u((t.x+n.x)/2,(t.y+n.y)/2,(o+a)/2),u((n.x+e.x)/2,(n.y+e.y)/2,(a+i)/2),u((e.x+t.x)/2,(e.y+t.y)/2,(i+o)/2),m}function wt(t,n,e,r,o){if(o<=0)return Ee(t,n,e,r);let a={x:(t.x+n.x)/2,y:(t.y+n.y)/2},i={x:(n.x+e.x)/2,y:(n.y+e.y)/2},s={x:(e.x+t.x)/2,y:(e.y+t.y)/2};return Math.max(wt(t,a,s,r,o-1),wt(a,n,i,r,o-1),wt(s,i,e,r,o-1),wt(a,i,s,r,o-1))}function _t(t,n,e,r,o,a,i,s){if(i>0){let u={x:(n.x+e.x)/2,y:(n.y+e.y)/2},h={x:(e.x+r.x)/2,y:(e.y+r.y)/2},b={x:(r.x+n.x)/2,y:(r.y+n.y)/2};_t(t,n,u,b,o,a,i-1,s),_t(t,u,e,h,o,a,i-1,s),_t(t,b,h,r,o,a,i-1,s),_t(t,u,h,b,o,a,i-1,s);return}let l=[n.x*g,o(n),n.y*g],c=[e.x*g,o(e),e.y*g],f=[r.x*g,o(r),r.y*g];if(s){t.triN(l,c,f,s(n),s(e),s(r),a);return}let m=_e(l,c,f);m[1]<0&&(m=[-m[0],-m[1],-m[2]]),t.tri(l,c,f,m,a)}var Ce=8;function _n(t,n,e){if(!Number.isFinite(e))return t;let r=[],o=(a,i,s,l,c)=>{if(c>0){let f={x:(a.x+i.x)/2,y:(a.y+i.y)/2},m=n(f);if(Math.abs(m-(s+l)/2)>e){o(a,f,s,m,c-1),o(f,i,m,l,c-1);return}}r.push(a)};for(let a=0;a<t.length;a++){let i=t[a],s=t[(a+1)%t.length];o(i,s,n(i),n(s),Ce)}return r}function Xt(t,n){if(t.length<3)return t;let e=[];for(let o of t){let a=e[e.length-1];a&&Math.hypot(o.x-a.x,o.y-a.y)<n||e.push(o)}for(;e.length>2&&Math.hypot(e[0].x-e[e.length-1].x,e[0].y-e[e.length-1].y)<n;)e.pop();if(e.length<3)return t;let r=[];for(let o=0;o<e.length;o++){let a=r.length?r[r.length-1]:e[(o-1+e.length)%e.length],i=e[o],s=e[(o+1)%e.length],l=s.x-a.x,c=s.y-a.y,f=Math.hypot(l,c);f>n&&Math.abs((i.x-a.x)*c-(i.y-a.y)*l)/f<n||r.push(i)}return r.length>=3?r:e}var Ut=.001*lt*.1;function K(t,n,e,r,o,a,i,s,l=1/0,c){if(!n||n.length<3||(l===void 0&&(l=1/0),Math.abs(ft(n))<1e-4))return;let f=Xt(_n(Xt(Jt(n),Ut),r,l),Ut),m=e?.map(M=>Xt(_n(Xt(Jt(M),Ut),r,l),Ut)).filter(M=>M.length>=3&&Math.abs(ft(M))>=1e-4),{pts:u,tris:h}=Te(f,m),b=[a[0]*s.top,a[1]*s.top,a[2]*s.top],p=[a[0]*s.bottomCap,a[1]*s.bottomCap,a[2]*s.bottomCap],d=[i[0]*s.top,i[1]*s.top,i[2]*s.top],y=[i[0]*s.wallBottom,i[1]*s.wallBottom,i[2]*s.wallBottom],x=0;if(Number.isFinite(l))for(;x<Be;x++){let M=0;for(let I=0;I<h.length;I+=3){let B=wt(u[h[I]],u[h[I+1]],u[h[I+2]],r,x);B>M&&(M=B)}if(M<=l)break}for(let M=0;M<h.length;M+=3){let I=u[h[M]],B=u[h[M+1]],k=u[h[M+2]];_t(t,I,B,k,r,b,x,c);let D=[I.x*g,o,I.y*g],U=[B.x*g,o,B.y*g],S=[k.x*g,o,k.y*g];t.tri(D,S,U,[0,-1,0],p)}let w=M=>{if(x<=0)return M;let I=1<<x,B=[];for(let k=0;k<M.length;k++){let D=M[k],U=M[(k+1)%M.length];for(let S=0;S<I;S++){let _=S/I;B.push({x:D.x+(U.x-D.x)*_,y:D.y+(U.y-D.y)*_})}}return B},A=pn(f),E=[{ring:w(f),flip:!1}];if(m)for(let M of m)M.length>=3&&E.push({ring:w(M),flip:!0});for(let{ring:M,flip:I}of E)for(let B=0;B<M.length;B++){let k=M[B],D=M[(B+1)%M.length],U=(D.x-k.x)*g,_=(D.y-k.y)*g,N=-U,O=Math.hypot(_,N)||1;_/=O,N/=O;let P=(k.x+D.x)/2-A.x,F=(k.y+D.y)/2-A.y,R=_*P+N*F;I&&(R=-R),R<0&&(_=-_,N=-N);let T=[_,0,N],C=[k.x*g,r(k),k.y*g],v=[D.x*g,r(D),D.y*g],G=[k.x*g,o,k.y*g],X=[D.x*g,o,D.y*g];t.tri(C,v,X,T,d,d,y),t.tri(C,X,G,T,d,y,y)}}function Tn(t){let n=0;for(let l of t)n+=l.count;let e=new Float32Array(n*3),r=new Float32Array(n*3),o=new Float32Array(n*3),a=new Float32Array(n),i=new Float32Array(n),s=0;for(let l of t)e.set(l.position,s*3),r.set(l.normal,s*3),o.set(l.color,s*3),a.set(l.floor,s),i.set(l.material,s),s+=l.count;return{position:e,normal:r,color:o,floor:a,material:i,count:n}}function jt(t,n,e=2.5){if(n<=0||t.length<3)return t;let r=Jt(t),o=r.length,a=[];for(let s=0;s<o;s++){let l=r[s],c=r[(s+1)%o],f=c.x-l.x,m=c.y-l.y,u=Math.hypot(f,m)||1;a.push({x:m/u,y:-f/u})}let i=[];for(let s=0;s<o;s++){let l=r[s],c=a[(s-1+o)%o],f=a[s],m=c.x+f.x,u=c.y+f.y,h=Math.hypot(m,u),b=()=>{i.push([l.x+c.x*n,l.y+c.y*n]),i.push([l.x+f.x*n,l.y+f.y*n])};if(h<1e-9){b();continue}m/=h,u/=h;let p=m*c.x+u*c.y,d=1/Math.max(p,1e-6);if(!Number.isFinite(d)||d>e){b();continue}i.push([l.x+m*n*d,l.y+u*n*d])}if(i.length<3)return t;try{let s=Pe.union([[...i,i[0]]]),l=null,c=-1/0;for(let m of s){let u=Math.abs(ft(m[0].map(([h,b])=>({x:h,y:b}))));u>c&&(c=u,l=m[0])}if(!l)return t;let f=l.map(([m,u])=>({x:m,y:u}));if(f.length>1){let m=f[0],u=f[f.length-1];Math.abs(m.x-u.x)<1e-9&&Math.abs(m.y-u.y)<1e-9&&f.pop()}return f.length>=3?f:t}catch{return t}}function Ht(t,n,e,r,o=28){let a=[];for(let i=0;i<o;i++){let s=i/o*Math.PI*2;a.push({x:t+e*Math.cos(s),y:n+r*Math.sin(s)})}return a}function Tt(t,n,e,r){return[{x:t,y:n},{x:t+e,y:n},{x:t+e,y:n+r},{x:t,y:n+r}]}var Bt=["available","held","sold","selected","dimmed"];function Qt(t){let n=Bt.indexOf(t);return n<0?0:n}var Bn={available:[.24,.82,.52],held:[.95,.66,.22],sold:[.34,.39,.45],selected:[.24,.74,1],dimmed:[.28,.32,.37]};function mr(t){let n=.2126*t[0]+.7152*t[1]+.0722*t[2],e=.42,r=.62;return[(n+(t[0]-n)*e)*r,(n+(t[1]-n)*e)*r,(n+(t[2]-n)*e)*r]}var tn={ground:[.07,.085,.11],tierTop:[.24,.28,.34],tierWall:[.17,.2,.25],stageTop:[.94,.7,.38],stageWall:[.48,.33,.18],decorTop:[.22,.25,.29],decorWall:[.15,.17,.2],gaTop:[.24,.28,.33],gaWall:[.16,.19,.23],boothTop:[.3,.33,.38],boothWall:[.2,.23,.27],tableTop:[.38,.34,.29],tableWall:[.24,.21,.18]},nn={top:[.05,.06,.08],bottom:[.1,.12,.15]};function et(t,n){return[Math.min(1,t[0]*n),Math.min(1,t[1]*n),Math.min(1,t[2]*n)]}var V={pedestal:0,pad:1,back:2,arm:3,footrest:4,leg:5,body:10,head:11},Fe=.44,ve=.15,ke=.3,Oe=.24;function En(t){return t===void 0||!Number.isFinite(t)||t<=0?Oe:Math.min(ke,Math.max(ve,t*Fe))}var hr=.21,Le=.05,en=.45,Ge=en+Le,De=.92,Ne=1.205,Xe=-.23,Ue=.38,Ye=[{part:V.pedestal,min:[-.3,0,-.3],max:[.3,.36,.3]},{part:V.pad,min:[-1,.36,-.95],max:[1,en,1]},{part:V.back,min:[-1,Ge,-1],max:[1,De,-.72]},{part:V.arm,min:[-1,.44,-.82],max:[-.78,.65,.78]},{part:V.arm,min:[.78,.44,-.82],max:[1,.65,.78]},{part:V.footrest,min:[-.9,.18,.78],max:[.9,.31,1.34]},{part:V.leg,min:[-.82,0,-.7],max:[-.62,.37,-.48]},{part:V.leg,min:[.62,0,-.7],max:[.82,.37,-.48]},{part:V.leg,min:[-.82,0,.48],max:[-.62,.37,.7]},{part:V.leg,min:[.62,0,.48],max:[.82,.37,.7]}],je=[{part:V.body,min:[-.52,.39,-.08],max:[-.08,.55,.82]},{part:V.body,min:[.08,.39,-.08],max:[.52,.55,.82]},{part:V.body,min:[-.47,.05,.58],max:[-.13,.43,.82]},{part:V.body,min:[.13,.05,.58],max:[.47,.43,.82]},{part:V.head,min:[-.16,1.04,-.33],max:[.16,1.1,-.13]}],He=[{n:[1,0,0],c:[[1,0,0],[1,1,0],[1,1,1],[1,0,1]]},{n:[-1,0,0],c:[[0,0,1],[0,1,1],[0,1,0],[0,0,0]]},{n:[0,1,0],c:[[0,1,0],[0,1,1],[1,1,1],[1,1,0]]},{n:[0,-1,0],c:[[0,0,1],[0,0,0],[1,0,0],[1,0,1]]},{n:[0,0,1],c:[[0,0,1],[1,0,1],[1,1,1],[0,1,1]]},{n:[0,0,-1],c:[[1,0,0],[0,0,0],[0,1,0],[1,1,0]]}];function br(){let t=[],n=[],e=[],r=[],o=(O,P,F)=>{let R=e.length,[T,C,v]=O,G=[C[0]-T[0],C[1]-T[1],C[2]-T[2]],X=[v[0]-T[0],v[1]-T[1],v[2]-T[2]],L=G[1]*X[2]-G[2]*X[1],Y=G[2]*X[0]-G[0]*X[2],j=G[0]*X[1]-G[1]*X[0],$=Math.hypot(L,Y,j);$>1e-9?(L/=$,Y/=$,j/=$):[L,Y,j]=P,L*P[0]+Y*P[1]+j*P[2]<0&&(L=-L,Y=-Y,j=-j);for(let z of O)t.push(...z),n.push(L,Y,j),e.push(F);r.push(R,R+1,R+2,R,R+2,R+3)},a=O=>{for(let P of He){let F=P.c.map(R=>R.map((T,C)=>T?O.max[C]:O.min[C]));o(F,P.n,O.part)}};for(let O of Ye)a(O);for(let O of je)a(O);let i=en,s=1.08,l=.47,c=.69,f=-.55,m=.08,u=-.48,h=.01,b=[-l,i,f],p=[l,i,f],d=[-l,i,m],y=[l,i,m],x=[-c,s,u],w=[c,s,u],A=[-c,s,h],E=[c,s,h];o([p,w,E,y],[1,0,0],V.body),o([d,A,x,b],[-1,0,0],V.body),o([A,E,w,x],[0,1,0],V.body),o([b,p,y,d],[0,-1,0],V.body),o([y,E,A,d],[0,0,1],V.body),o([b,x,w,p],[0,0,-1],V.body);let M=10,I=8,B=[0,Ne,Xe],k=[.42,.115,Ue],D=e.length;for(let O=0;O<=I;O++){let P=Math.PI*O/I,F=Math.cos(P),R=Math.sin(P);for(let T=0;T<=M;T++){let C=Math.PI*2*T/M,v=R*Math.cos(C),G=R*Math.sin(C);t.push(B[0]+k[0]*v,B[1]+k[1]*F,B[2]+k[2]*G);let X=v/k[0],L=F/k[1],Y=G/k[2],j=Math.hypot(X,L,Y)||1;X/=j,L/=j,Y/=j,n.push(X,L,Y),e.push(V.head)}}for(let O=0;O<I;O++)for(let P=0;P<M;P++){let F=D+O*(M+1)+P,R=F+M+1;r.push(F,R,F+1,F+1,R,R+1)}let U=new Float32Array(t),S=new Float32Array(n),_=new Float32Array(e),N=new Uint16Array(r);return{position:U,normal:S,part:_,index:N,vertexCount:e.length,indexCount:r.length}}function Cn(t,n,e,r){let o=new Float32Array(n),a=c=>t[c*3],i=c=>t[c*3+2],s=0,l=(c,f)=>{let m=f-c;for(let u=c;u<f;u++){let[h,b]=r(u),p=h-a(u),d=b-i(u);if(m>=2){let y=Math.max(c,u-1),x=Math.min(f-1,u+1),w=a(x)-a(y),A=i(x)-i(y),E=Math.hypot(w,A);if(E>1e-6){let M=-A/E,I=w/E;M*p+I*d<0&&(M=-M,I=-I),p=M,d=I}}o[u]=p===0&&d===0?0:Math.atan2(p,d)}};for(let c=1;c<=n;c++)(c===n||e(c)!==e(s))&&(l(s,c),s=c);return o}var Vt=.22;function Ar(t,n){let e=Bt[t];if(e!=="sold"&&e!=="held")return-1;let r=(n+1)*2654435761;return r^=r>>>15,r=Math.imul(r,2246822519),r^=r>>>13,(r>>>0)%1e5/1e5}var Ve=.42;function We(t){let n=t.length,e=new Float64Array(n);if(n<2)return e.fill(1/0),e;let r=1/0,o=1/0,a=-1/0,i=-1/0;for(let b of t)b.x<r&&(r=b.x),b.y<o&&(o=b.y),b.x>a&&(a=b.x),b.y>i&&(i=b.y);let s=Math.max(a-r,1e-6),l=Math.max(i-o,1e-6),c=Math.max(Math.sqrt(s*l/n),1e-6),f=Math.max(1,Math.ceil(s/c)+1),m=Math.max(1,Math.ceil(l/c)+1),u=new Map,h=(b,p)=>{let d=Math.min(f-1,Math.max(0,Math.floor((b-r)/c)));return Math.min(m-1,Math.max(0,Math.floor((p-o)/c)))*f+d};for(let b=0;b<n;b++){let p=h(t[b].x,t[b].y),d=u.get(p);d?d.push(b):u.set(p,[b])}for(let b=0;b<n;b++){let p=t[b],d=Math.min(f-1,Math.max(0,Math.floor((p.x-r)/c))),y=Math.min(m-1,Math.max(0,Math.floor((p.y-o)/c))),x=1/0;for(let w=1;w<=4;w++){for(let A=y-w;A<=y+w;A++)if(!(A<0||A>=m))for(let E=d-w;E<=d+w;E++){if(E<0||E>=f||w>1&&Math.abs(A-y)<w&&Math.abs(E-d)<w)continue;let M=u.get(A*f+E);if(M)for(let I of M){if(I===b)continue;let B=Math.hypot(t[I].x-p.x,t[I].y-p.y);B<x&&(x=B)}}if(Number.isFinite(x)&&x<=w*c)break}e[b]=x}return e}function ze(t){let n=t.eyeHeightM;return Number.isFinite(n)?Math.max(0,n-Gt):0}function Fn(t,n,e,r,o,a){let i=t.length,s=new Float32Array(i*3),l=new Float32Array(i),c=new Float32Array(i*3),f=new Float32Array(i),m=new Float32Array(i),u=new Float32Array(i),h=new Float32Array(i),b=new Float32Array(i*3),p=new Map,d=We(t);for(let y=0;y<i;y++){let x=t[y],A=(e?.seatPitchU(y)??d[y])*g;f[y]=Number.isFinite(A)?Math.max(.06,Math.min(Vt,A*Ve)):Vt,m[y]=En(Number.isFinite(A)?A:void 0);let E=Mn(x.glyph,{seatGlyph:a?.get(x.categoryKey)});u[y]=gn.indexOf(E),h[y]=x.wheelchairSpaceType==="no-seat"?0:1,s[y*3]=x.x*g,s[y*3+1]=e?e.seatDeckY(y):ze(x),s[y*3+2]=x.y*g,l[y]=Qt(n?n(x):"available");let M=H(o?.get(x.categoryKey)??"#6e7bff")??[.43,.48,1];if(c[y*3]=M[0],c[y*3+1]=M[1],c[y*3+2]=M[2],x.accessibility?.length){let I=H(hn(x.accessibility));I&&(b[y*3]=I[0],b[y*3+1]=I[1],b[y*3+2]=I[2])}p.set(x.id,y)}return{count:i,iPosition:s,iState:l,iCategory:c,iMaxRadius:f,iRing:b,idToIndex:p,iChairWidth:m,iGlyph:u,iPhysicalSeat:h,iFloor:r??new Float32Array(i),iYaw:new Float32Array(i)}}var Ze=64;function Pr(t,n){let e=[];for(let i of n){let s=t.idToIndex.get(i.seatId);if(s===void 0)continue;let l=Qt(i.state);t.iState[s]!==l&&(t.iState[s]=l,e.push(s))}if(!e.length)return[];e.sort((i,s)=>i-s);let r=[],o=e[0],a=e[0];for(let i=1;i<e.length;i++){let s=e[i];if(s!==a){if(s<=a+Ze){a=s;continue}r.push({start:o,length:a-o+1}),o=s,a=s}}return r.push({start:o,length:a-o+1}),r}function _r(t,n,e){return e<0?n>1?t.filter(r=>r.kind==="floor"):[...t]:t.filter(r=>r.floorIndex===void 0||r.floorIndex===e)}function Tr(t,n){let e=[...t].sort((o,a)=>o.screen.y-a.screen.y),r=[];for(let o of e){let a=r.find(i=>i.some(s=>Math.abs(s.screen.x-o.screen.x)<104&&Math.abs(s.screen.y-o.screen.y)<34));a?a.push(o):r.push([o])}return r.flatMap(o=>o.length<2?o:o.map((a,i)=>({...a,screen:{...a.screen,x:Math.max(54,Math.min(n-54,a.screen.x+(i-(o.length-1)/2)*104))}})))}var Ke=1.15,$e=2.75,qe=4.5,Je=.85,Qe=.5,to=.26;function Br(t,n,e){let r=Math.max(1e-6,n),o=t/r,a=e?.hasZoneLabels??!0,i=new Set;return o>=.75&&i.add("floor"),o>=Ke&&i.add("zone"),o<=(a?$e:qe)&&(i.add("section"),i.add("ga")),o<=Je&&(i.add("annotation"),i.add("booth")),o<=Qe&&i.add("row"),o<=to&&i.add("seat"),i}function Er(t,n,e,r,o,a=6){let i=a+n,s=r-a-n,l=a+e,c=o-a-e;return{...t,x:i>s?r/2:Math.max(i,Math.min(s,t.x)),y:l>c?o/2:Math.max(l,Math.min(c,t.y))}}function Cr(t,n,e,r){let o=t,a=n[0],i=n[1],s=n[2],l=o[0]*a+o[4]*i+o[8]*s+o[12],c=o[1]*a+o[5]*i+o[9]*s+o[13],f=o[2]*a+o[6]*i+o[10]*s+o[14],m=o[3]*a+o[7]*i+o[11]*s+o[15];if(!(m>1e-6))return{x:0,y:0,depth:1/0,visible:!1};let u=l/m,h=c/m,b=f/m,p=u>=-1.05&&u<=1.05&&h>=-1.05&&h<=1.05&&b<=1;return{x:(u*.5+.5)*e,y:(1-(h*.5+.5))*r,depth:b,visible:p}}function Fr(t,n,e=n){let r=[],o=[...t].sort((a,i)=>a.screen.depth-i.screen.depth);for(let a of o){let i=!1;for(let s of r)if(on(a,s,n,e)){i=!0;break}i||r.push(a)}return r}var no=6;function on(t,n,e,r){let o=Math.abs(t.screen.x-n.screen.x),a=Math.abs(t.screen.y-n.screen.y),i=t.halfWidth!=null&&n.halfWidth!=null?Math.max(e,t.halfWidth+n.halfWidth+no):e;return o<i&&a<r}function vr(t,n,e){return t.length*n*.58+(e?14:0)}var eo={row:8,seat:14};function kr(t){return t<480?{row:5,seat:8}:t<768?{row:6,seat:10}:eo}function Or(t,n,e,r){let o=Math.max(1,Math.min(e,r)*.5),a=Math.min(2,Math.hypot(t.x-e/2,t.y-r/2)/o);return n*(1+1.5*a)}function Lr(t,n,e,r,o=[]){let a=[...t].sort((s,l)=>(l.priority??0)-(s.priority??0)||s.focus-l.focus),i=[];for(let s of a){if(i.length>=r)break;let l=!1;for(let c of o)if(on(s,c,n,e)){l=!0;break}if(!l){for(let c of i)if(on(s,c,n,e)){l=!0;break}}l||i.push(s)}return i}import bo from"polygon-clipping";var W={top:1,wallBottom:.5,bottomCap:.4};function st(t,n){if(!t)return n;let e=et(Pt(t,.4),.62);return nt(n,e,.72)}function vn(t,n){let e=new Map;for(let a of t.categories??[])e.set(a.key,a.color);let r=new Map;for(let a of n){if(!a.sectionId)continue;let i=r.get(a.sectionId);i||(i=new Map,r.set(a.sectionId,i)),i.set(a.categoryKey,(i.get(a.categoryKey)??0)+1)}let o=new Map;for(let[a,i]of r){let s=0,l=0,c=0,f=0;for(let[m,u]of i){let h=H(e.get(m));h&&(s+=h[0]*u,l+=h[1]*u,c+=h[2]*u,f+=u)}f>0&&o.set(a,[s/f,l/f,c/f])}return o}function kn(t,n){return H(t.color)??n.get(t.logicalSectionId??t.id)??null}import zn from"polygon-clipping";import Dn from"polygon-clipping";import oo from"earcut";var ro=.58,On=.01,ot=Vt*1.5*lt,io=.5,so=.6;function ao(t,n){let e=t.length,r=[];for(let i=0;i<e;i++){let s=t[Math.max(0,i-1)],l=t[Math.min(e-1,i+1)],c=l.x-s.x,f=l.y-s.y,m=Math.hypot(c,f);if(m<1e-9){r.push([0,0]);continue}c/=m,f/=m,r.push([-f,c])}let o=0;for(let i=0;i<e;i++)o+=(t[i].x-n.x)*r[i][0]+(t[i].y-n.y)*r[i][1];return o<0?r.map(([i,s])=>[-i,-s]):r}function co(t,n){if(t.length<2||n<=0)return[...t];let e=[...t],r=(i,s)=>{let l=s.x-i.x,c=s.y-i.y,f=Math.hypot(l,c)||1;return{x:l/f,y:c/f}},o=r(e[1],e[0]),a=r(e[e.length-2],e[e.length-1]);return e.unshift({x:e[0].x+o.x*n,y:e[0].y+o.y*n}),e.push({x:e[e.length-1].x+a.x*n,y:e[e.length-1].y+a.y*n}),e}var Ln=Math.PI/12;function uo(t){if(t.length<3)return[...t];let n=[...t].sort((a,i)=>a.x-i.x||a.y-i.y),e=(a,i,s)=>(i.x-a.x)*(s.y-a.y)-(i.y-a.y)*(s.x-a.x),r=a=>{let i=[];for(let s of a){for(;i.length>=2&&e(i[i.length-2],i[i.length-1],s)<=0;)i.pop();i.push(s)}return i.pop(),i},o=[...r(n),...r([...n].reverse())];return o.length>=3?o:[...t]}function Nn(t,n){if(!t.length||!(n>0))return[];let e=uo(t),r=(s,l,c,f)=>{let m=c-l;for(;m<0;)m+=Math.PI*2;for(;m>Math.PI*2;)m-=Math.PI*2;let u=Math.max(1,Math.ceil(m/Ln)),h=n/Math.cos(m/u/2);for(let b=0;b<=u;b++){let p=l+m*b/u;f.push({x:s.x+Math.cos(p)*h,y:s.y+Math.sin(p)*h})}};if(e.length<3){let s=0,l=0;for(let h of e)s+=h.x,l+=h.y;s/=e.length||1,l/=e.length||1;let c=0;for(let h of e)c=Math.max(c,Math.hypot(h.x-s,h.y-l));let f=[],m=Math.max(3,Math.ceil(Math.PI*2/Ln)),u=(c+n)/Math.cos(Math.PI/m);for(let h=0;h<m;h++){let b=h/m*Math.PI*2;f.push({x:s+Math.cos(b)*u,y:l+Math.sin(b)*u})}return f}let o=e.length,a=[];for(let s=0;s<o;s++){let l=e[s],c=e[(s+1)%o];a.push(Math.atan2(-(c.x-l.x),c.y-l.y))}let i=[];for(let s=0;s<o;s++)r(e[s],a[(s+o-1)%o],a[s],i);return Hn(i)}function lo(t,n,e){if(t.length===1)return Math.hypot(n-t[0].x,e-t[0].y);let r=1/0;for(let o=0;o+1<t.length;o++){let a=t[o],i=t[o+1],s=i.x-a.x,l=i.y-a.y,c=s*s+l*l,f=c>1e-12?((n-a.x)*s+(e-a.y)*l)/c:0;f<0?f=0:f>1&&(f=1);let m=Math.hypot(n-(a.x+f*s),e-(a.y+f*l));m<r&&(r=m)}return r}function Wt(t){let n=t.map(o=>{let a=0,i=0;for(let c of o.pts)a+=c.x,i+=c.y;let s=o.pts.length||1;a/=s,i/=s;let l=0;for(let c of o.pts){let f=Math.hypot(c.x-a,c.y-i);f>l&&(l=f)}return{cx:a,cy:i,rad:l}}),e=o=>{let a=o.length;return a<=2?[...o]:[o[Math.floor(a*.25)],o[Math.floor(a*.5)],o[Math.floor(a*.75)]]},r=[];for(let o=0;o<t.length;o++){let a=e(t[o].pts),i=[],s=1/0,l=null;for(let f of a){let m=1/0;for(let u=0;u<t.length;u++){if(u===o||Math.abs(t[u].y-t[o].y)<.001)continue;let h=n[u],b=Math.hypot(f.x-h.cx,f.y-h.cy)-h.rad;if(b>=m&&b>=s)continue;let p=lo(t[u].pts,f.x,f.y);p<m&&(m=p),t[u].depth<t[o].depth&&p<s&&(s=p,l=t[u].y)}Number.isFinite(m)&&m>0&&i.push(m)}i.sort((f,m)=>f-m);let c=i.length?i[Math.floor(i.length/2)]:1;r.push({pitch:c,belowY:l})}return r}function Xn(t,n,e,r){let o=t[n],a=o.pts.length>=2?[...o.pts]:o.pts.length===1?(()=>{let f=o.pts[0],m=f.x-r.x,u=f.y-r.y,h=Math.hypot(m,u)||1;m/=h,u/=h;let b=Math.max(e[n].pitch,.001)*.5;return[{x:f.x+u*b,y:f.y-m*b},{x:f.x-u*b,y:f.y+m*b}]})():[];if(a.length<2)return null;let i=0,s=0;for(let f=1;f<a.length;f++){let m=Math.hypot(a[f].x-a[f-1].x,a[f].y-a[f-1].y);m>1e-6&&(i+=m,s++)}let l=s>0?i/s:0,c=co(a,Math.max(l*so,ot));return{pts:c,nrm:ao(c,r),front:Math.max(e[n].pitch*ro,ot),back:Math.max(e[n].pitch*io,ot)}}var gt=1.5,Un=.3;function rn(t,n){if(t.length<3)return t;let e=t[0],r=t[t.length-1],o=r.x-e.x,a=r.y-e.y,i=Math.hypot(o,a),s=-1,l=-1;for(let m=1;m<t.length-1;m++){let u=t[m],h=i>1e-12?Math.abs((u.x-e.x)*a-(u.y-e.y)*o)/i:Math.hypot(u.x-e.x,u.y-e.y);h>s&&(s=h,l=m)}if(s<=n||l<0)return[e,r];let c=rn(t.slice(0,l+1),n),f=rn(t.slice(l),n);return[...c.slice(0,-1),...f]}function Yn(t,n){if(t.length<4)return t;let e=rn([...t,t[0]],n);return e.pop(),e.length>=3?e:t}function jn(t,n,e){if(t.length<2)return[];let r=e??Wt(t),o=new Map;for(let i=0;i<t.length;i++){let s=o.get(t[i].blockId);s?s.push(i):o.set(t[i].blockId,[i])}let a=[];for(let[,i]of o){let s=[];for(let x of i){let w=t[x].patch;w&&w.length>=3?a.push({outline:[...w],holes:[],topY:t[x].y}):s.push(x)}if(!s.length)continue;s.sort((x,w)=>t[x].depth-t[w].depth);let c=s.map(x=>Xn(t,x,r,n)).filter(x=>x!==null);if(!c.length)continue;let f=(x,w)=>({x:x.pts[w].x-x.nrm[w][0]*(x.front+gt),y:x.pts[w].y-x.nrm[w][1]*(x.front+gt)}),m=(x,w)=>({x:x.pts[w].x+x.nrm[w][0]*(x.back+gt),y:x.pts[w].y+x.nrm[w][1]*(x.back+gt)}),u=c[0],h=c[c.length-1],b=[];for(let x=0;x<u.pts.length;x++)b.push(f(u,x));for(let x of c)b.push(m(x,x.pts.length-1));for(let x=h.pts.length-1;x>=0;x--)b.push(m(h,x));for(let x=c.length-1;x>=0;x--)b.push(f(c[x],0));let p=Hn(b),d=1/0;for(let x of s)t[x].y<d&&(d=t[x].y);if(!Number.isFinite(d))continue;if(p.length>=3&&Math.abs(ft(p))>1e-6&&c.every(x=>{let w=x.pts[Math.floor(x.pts.length/2)];return It(p,w.x,w.y)})){a.push({outline:Yn(p,Un),holes:[],topY:d});continue}for(let x of mo(c))a.push({outline:x,holes:[],topY:d})}return a}function mo(t){let n=[];for(let e of t){let r=[],o=[],a=e.front+gt,i=e.back+gt;for(let l=0;l<e.pts.length;l++){let c=e.pts[l],f=e.nrm[l];r.push([c.x-f[0]*a,c.y-f[1]*a]),o.push([c.x+f[0]*i,c.y+f[1]*i])}let s=[...r,...o.reverse()];s.length<3||(s.push(s[0]),n.push([s]))}if(!n.length)return[];try{let e=Dn.union(n[0],...n.slice(1)),r=[];for(let o of e){if(!o.length||o[0].length<4)continue;let a=o[0].map(([l,c])=>({x:l,y:c})),i=a[0],s=a[a.length-1];a.length>1&&Math.abs(i.x-s.x)<1e-9&&Math.abs(i.y-s.y)<1e-9&&a.pop(),a.length>=3&&r.push(Yn(a,Un))}return r}catch{return[]}}function Hn(t){let n=[];for(let e of t){let r=n[n.length-1];r&&Math.hypot(e.x-r.x,e.y-r.y)<1e-9||n.push(e)}for(;n.length>2&&Math.hypot(n[0].x-n[n.length-1].x,n[0].y-n[n.length-1].y)<1e-9;)n.pop();return n}var sn=class{constructor(n){this.minX=1/0;this.minY=1/0;this.maxX=-1/0;this.maxY=-1/0;this.rings=n;for(let e of n)for(let r of e)r.x<this.minX&&(this.minX=r.x),r.y<this.minY&&(this.minY=r.y),r.x>this.maxX&&(this.maxX=r.x),r.y>this.maxY&&(this.maxY=r.y)}containsAll(n){for(let e of n)if(e.x<this.minX||e.x>this.maxX||e.y<this.minY||e.y>this.maxY)return!1;for(let e of this.rings){let r=!0;for(let o of n)if(!It(e,o.x,o.y)){r=!1;break}if(r)return!0}return!1}};function Gn(t,n,e,r,o,a){if(r.length<3)return;if(e.containsAll(r)){let c=[0,1,0],f=r[0];for(let m=1;m+1<r.length;m++){let u=r[m],h=r[m+1];t.tri([f.x*g,o,f.y*g],[u.x*g,o,u.y*g],[h.x*g,o,h.y*g],c,a)}return}let i=r.map(c=>[c.x,c.y]);i.push(i[0]);let s;try{s=Dn.intersection([i],n)}catch{return}let l=[0,1,0];for(let c of s){if(!c.length||c[0].length<4)continue;let f=c[0],m=[],u=[];for(let b=0;b<f.length-1;b++)m.push(f[b][0],f[b][1]),u.push([f[b][0],f[b][1]]);if(u.length<3)continue;let h=oo(m,void 0,2);for(let b=0;b<h.length;b+=3){let p=u[h[b]],d=u[h[b+1]],y=u[h[b+2]];t.tri([p[0]*g,o,p[1]*g],[d[0]*g,o,d[1]*g],[y[0]*g,o,y[1]*g],l,a)}}}function Vn(t,n,e,r,o,a,i){if(n.length<2)return;let s=i??Wt(n),l=[0,1,0],c=a&&a.length>=3?[[...a.map(h=>[h.x,h.y]),[a[0].x,a[0].y]]]:null,f=a&&a.length>=3?new sn([[...a]]):null,m=h=>{t.setMaterial(2),h(),t.setMaterial(0)},u=h=>{t.setMaterial(3),h(),t.setMaterial(0)};for(let h=0;h<n.length;h++){let b=n[h];if(b.patch&&b.patch.length>=3){let E=[...b.patch],M=s[h].belowY??r;if(u(()=>{if(c&&f)Gn(t,c,f,E,b.y,o.tread);else{let I=E[0];for(let B=1;B+1<E.length;B++){let k=E[B],D=E[B+1];t.tri([I.x*g,b.y,I.y*g],[k.x*g,b.y,k.y*g],[D.x*g,b.y,D.y*g],l,o.tread)}}}),b.y>M+On){let I=0,B=0;for(let k of E)I+=k.x,B+=k.y;I/=E.length,B/=E.length,m(()=>{for(let k=0;k<E.length;k++){let D=E[k],U=E[(k+1)%E.length],S=U.x-D.x,_=U.y-D.y,N=Math.hypot(S,_);if(N<1e-6)continue;let O=_/N,P=-S/N;(D.x-I)*O+(D.y-B)*P<0&&(O=-O,P=-P);let F=[O,0,P],R=[D.x*g,b.y,D.y*g],T=[U.x*g,b.y,U.y*g],C=[D.x*g,M,D.y*g],v=[U.x*g,M,U.y*g];t.tri(R,T,v,F,o.riser),t.tri(R,v,C,F,o.riser)}})}continue}let p=Xn(n,h,s,e);if(!p)continue;let{pts:d,nrm:y,front:x,back:w}=p,A=s[h].belowY??r;for(let E=0;E+1<d.length;E++){let M=d[E],I=d[E+1],B=y[E],k=y[E+1];if(Math.hypot(I.x-M.x,I.y-M.y)<1e-6||B[0]===0&&B[1]===0||k[0]===0&&k[1]===0)continue;let D=[(M.x-B[0]*x)*g,b.y,(M.y-B[1]*x)*g],U=[(I.x-k[0]*x)*g,b.y,(I.y-k[1]*x)*g],S=[(M.x+B[0]*w)*g,b.y,(M.y+B[1]*w)*g],_=[(I.x+k[0]*w)*g,b.y,(I.y+k[1]*w)*g];if(u(()=>{c&&f?Gn(t,c,f,[{x:M.x-B[0]*x,y:M.y-B[1]*x},{x:I.x-k[0]*x,y:I.y-k[1]*x},{x:I.x+k[0]*w,y:I.y+k[1]*w},{x:M.x+B[0]*w,y:M.y+B[1]*w}],b.y,o.tread):(t.tri(D,U,_,l,o.tread),t.tri(D,_,S,l,o.tread))}),b.y>A+On){let N=[D[0],A,D[2]],O=[U[0],A,U[2]],P=[-B[0],0,-B[1]];m(()=>{t.tri(D,U,O,P,o.riser),t.tri(D,O,N,P,o.riser)})}}}}function fo(t,n){let e=t.eventConfigurationIds;return!e?.length||!!n&&e.includes(n)}function Wn(t,n){return t.filter(e=>e.type!=="shape"||fo(e,n))}function Zn(t,n){let e=t.focalPoint??{x:0,y:0};return t.floors?.length?t.floors.map((r,o)=>({objects:Wn(r.objects,n),focal:{x:(r.focalPoint??e).x,y:(r.focalPoint??e).y},baseHeightM:r.baseHeightM??0,index:o})):[{objects:Wn(t.objects,n),focal:e,baseHeightM:0,index:0}]}var ho={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};function Mt(t){return Rn(t)??ho}function Kn(t,n){let e=jt(t.outline,ot),r=Mt(e),o=n.filter(i=>i!==t&&i.outline&&i.outline.length>=3&&Nt(r,Mt(i.outline)));if(!o.length)return[e];let a=i=>{let s=i.map(l=>[l.x,l.y]);return s.push(s[0]),s};try{let i=zn.difference([a(e)],...o.map(l=>[a(l.outline)])),s=[];for(let l of i){if(!l.length)continue;let c=l[0].map(([f,m])=>({x:f,y:m}));if(c.length>1){let f=c[0],m=c[c.length-1];Math.abs(f.x-m.x)<1e-9&&Math.abs(f.y-m.y)<1e-9&&c.pop()}c.length>=3&&s.push(c)}return s.length?s:[e]}catch{return[e]}}function $n(t,n){if(!n.length)return t;let e=a=>{let i=a.map(s=>[s.x,s.y]);return i.push(i[0]),i},r=n.map(a=>[e(a)]),o=[];for(let a of t){let i;try{i=zn.intersection([e(a.outline)],r.flat())}catch{o.push(a);continue}for(let s of i){if(!s.length)continue;let l=s[0].map(([c,f])=>({x:c,y:f}));if(l.length>1){let c=l[0],f=l[l.length-1];Math.abs(c.x-f.x)<1e-9&&Math.abs(c.y-f.y)<1e-9&&l.pop()}l.length>=3&&o.push({outline:l,holes:[],topY:a.topY})}}return o.length?o:t}function po(t,n){return t===void 0||n===void 0?!0:Math.abs(t-n)<.001}var zt=class{constructor(){this.rings=[];this.boxes=[];this.levels=[]}subtract(n,e){let r=n.map(l=>[l.x,l.y]);if(r.length<3)return[];r.push(r[0]);let o=Mt(n),a=this.rings.filter((l,c)=>Nt(o,this.boxes[c])&&po(e,this.levels[c])),i=[[r]];if(a.length)try{i=bo.difference([r],...a).map(c=>c.map(f=>f.map(([m,u])=>[m,u])))}catch{i=[[r]]}this.rings.push([r]),this.boxes.push(o),this.levels.push(e);let s=[];for(let l of i){if(!l.length)continue;let c=l[0].map(([f,m])=>({x:f,y:m}));if(c.length>1){let f=c[0],m=c[c.length-1];Math.abs(f.x-m.x)<1e-9&&Math.abs(f.y-m.y)<1e-9&&c.pop()}c.length>=3&&s.push(c)}return s}};function yo(t,n){if(!n)return t;let e=1/0,r=-1/0,o=1/0,a=-1/0;for(let m of t)e=Math.min(e,m.x),r=Math.max(r,m.x),o=Math.min(o,m.y),a=Math.max(a,m.y);let i=(e+r)/2,s=(o+a)/2,l=n*Math.PI/180,c=Math.cos(l),f=Math.sin(l);return t.map(m=>{let u=m.x-i,h=m.y-s;return{x:i+u*c-h*f,y:s+u*f+h*c}})}function bt(t){let n=null;if(t.kind==="polygon"&&t.points&&t.points.length>=3&&(n=t.points),t.kind==="rect"&&t.width&&t.height&&(n=Tt(t.x??0,t.y??0,t.width,t.height)),t.kind==="ellipse"&&t.width&&t.height){let e=(t.x??0)+t.width/2,r=(t.y??0)+t.height/2;n=Ht(e,r,t.width/2,t.height/2)}return n?yo(n,t.rotation):null}function Et(t){let n=t.role??"",e={stage:{kind:"stage",heightM:1},entrance:{kind:"portal",heightM:2.7},exit:{kind:"portal",heightM:2.7},screen:{kind:"solid",heightM:6},wall:{kind:"solid",heightM:2.8},rail:{kind:"solid",heightM:1.1},suite:{kind:"suite",heightM:3},obstruction:{kind:"solid",heightM:4.5},sound:{kind:"solid",heightM:1.45},restroom:{kind:"solid",heightM:2.4},bar:{kind:"solid",heightM:1.1},concession:{kind:"solid",heightM:1.1},coat:{kind:"solid",heightM:1.1},goal:{kind:"portal",heightM:1.8}},r=n==="stage"&&xn(t.stageKind)?{kind:"stage",heightM:.06}:e[n]??{kind:"plate",heightM:.25};return{...r,heightM:t.heightM??r.heightM}}var xo=.08;function qn(t,n){let e=bt(t),r=Et(t),o=r.heightM;if(!e||r.kind!=="plate"&&r.kind!=="stage")return o;let a=1/0,i=1/0,s=-1/0,l=-1/0;for(let f of e)a=Math.min(a,f.x),i=Math.min(i,f.y),s=Math.max(s,f.x),l=Math.max(l,f.y);let c=o;for(let f of n)s>f.minX&&a<f.maxX&&l>f.minY&&i<f.maxY&&c<=f.topOffsetM+1e-6&&(c=f.topOffsetM+xo);return n.push({minX:a,minY:i,maxX:s,maxY:l,topOffsetM:c}),c}function mt(t,n,e){return{x:t.x+(n.x-t.x)*e,y:t.y+(n.y-t.y)*e}}function Jn(t){if(t.length!==4)return t;let n=Math.hypot(t[1].x-t[0].x,t[1].y-t[0].y),e=Math.hypot(t[2].x-t[1].x,t[2].y-t[1].y);return n>=e?t:[t[1],t[2],t[3],t[0]]}function Ct(t,n,e){return[mt(t[0],t[1],n),mt(t[0],t[1],e),mt(t[3],t[2],e),mt(t[3],t[2],n)]}function Qn(t,n,e){return[mt(t[0],t[3],n),mt(t[1],t[2],n),mt(t[1],t[2],e),mt(t[0],t[3],e)]}function at(t,n,e,r,o,a){K(t,n,void 0,()=>e,r,o,a,W)}var an=2.4,go=.75,Mo=.15;function Ft(t){if(t.points&&t.points.length>=3)return t.points;let{center:n,width:e,height:r,rotation:o}=t;if(!e||!r)return null;let a=(o??0)*Math.PI/180,i=Math.cos(a),s=Math.sin(a),l=e/2,c=r/2;return[[-l,-c],[l,-c],[l,c],[-l,c]].map(([f,m])=>({x:n.x+f*i-m*s,y:n.y+f*s+m*i}))}function te(t,n,e,r,o){let a=Ft(n);a&&K(t,a,void 0,()=>e+an,e,st(r,o.boothTop),o.boothWall,W)}function cn(t){if(t.shape==="round"){let f=t.radius;return f?Ht(t.center.x,t.center.y,f,f,24):null}let{width:n,height:e,rotation:r,center:o}=t;if(!n||!e)return null;let a=(r??0)*Math.PI/180,i=Math.cos(a),s=Math.sin(a),l=n/2,c=e/2;return[[-l,-c],[l,-c],[l,c],[-l,c]].map(([f,m])=>({x:o.x+f*i-m*s,y:o.y+f*s+m*i}))}function ne(t,n,e,r,o){let a=cn(n);a&&K(t,a,void 0,()=>e+go,e,st(r,o.tableTop),o.tableWall,W)}function ee(t,n,e,r,o,a,i,s){let l=bt(n);if(!l)return;let c=s?s.kind==="stage":n.role==="stage",f=s?s.kind==="screen":n.role==="screen",m=s?{kind:c?"stage":"solid",heightM:s.topY-s.baseY}:Et(n),u=s?.baseY??e,h=s?.topY??e+r;if(c&&i){let x=1/0,w=-1/0,A=1/0,E=-1/0;for(let M of l)M.x<x&&(x=M.x),M.x>w&&(w=M.x),M.y<A&&(A=M.y),M.y>E&&(E=M.y);i.push({cx:(x+w)/2*g,cz:(A+E)/2*g,y:h,halfX:Math.max((w-x)/2*g,.5),halfZ:Math.max((E-A)/2*g,.5)})}let b=H(n.fill),p=c&&b?nt(o.stageTop,et(Pt(b,.18),.9),.9):st(b,c?o.stageTop:o.decorTop),d=f?b:null,y=c?b?nt(o.stageWall,et(b,.58),.82):o.stageWall:f?d?nt(et(d,1.42),[.24,.46,.82],.08):[.24,.46,.82]:st(H(n.fill),o.decorWall);if(m.kind==="portal"&&l.length===4){let x=Jn(l);at(t,Ct(x,0,.16),h,u,p,y),at(t,Ct(x,.84,1),h,u,p,y),at(t,x,h,Math.max(u,h-.35),p,y);return}if(m.kind==="suite"&&l.length===4){let x=l.map((E,M)=>{let I=l[(M+1)%4],B=(E.x+I.x)/2,k=(E.y+I.y)/2;return Math.hypot(B-a.x,k-a.y)}),w=x.indexOf(Math.min(...x)),A=[0,1,2,3].map(E=>l[(w+E)%4]);at(t,Ct(A,0,.08),h,u,p,y),at(t,Ct(A,.92,1),h,u,p,y),at(t,Qn(A,.88,1),h,u,p,y),at(t,A,h,Math.max(u,h-.18),p,y);return}at(t,l,h,u,p,y)}function un(t){let{x:n,y:e,width:r,height:o}=t;if(!r||!o)return null;let a=n+r/2,i=e+o/2,s=(t.rotation??0)*Math.PI/180,l=Math.cos(s),c=Math.sin(s),f=r/2,m=o/2;return[[-f,-m],[f,-m],[f,m],[-f,m]].map(([u,h])=>({x:a+u*l-h*c,y:i+u*c+h*l}))}function So(t){if(!t||!t.startsWith("data:image/svg+xml"))return null;let n=t.slice(t.indexOf(",")+1);if(/;base64/i.test(t.slice(0,t.indexOf(","))))try{n=atob(n)}catch{return null}else try{n=decodeURIComponent(n)}catch{}let e=n.match(/<(?:rect|path)\b[^>]*\bfill="([^"]+)"/i);if(!e)return null;let r=e[1].trim();if(r==="none"||r==="transparent")return null;let o=r.match(/^url\(#([^)]+)\)$/);if(!o)return H(r);let a=n.match(new RegExp(`<(?:linear|radial)Gradient\\b[^>]*\\bid="${o[1]}"[^>]*>([\\s\\S]*?)</(?:linear|radial)Gradient>`,"i"));if(!a)return null;let i=[];for(let s of a[1].matchAll(/stop-color="([^"]+)"/gi)){let l=H(s[1].trim());l&&i.push(l)}return i.length?i.reduce((s,l,c)=>nt(s,l,1/(c+1)),i[0]):null}function oe(t,n,e,r){if(n.layer==="foreground")return;let o=un(n);if(!o)return;let a=e+Mo,i=st(So(n.href),r.decorTop),s=Math.max(0,Math.min(1,n.opacity??1));s<1&&(i=nt(r.ground,i,s)),K(t,o,void 0,()=>a,e,i,nt(i,r.decorWall,.5),W)}function re(t,n,e,r,o){if(!n.points||n.points.length<3)return;let a=st(r,o.gaTop);K(t,n.points,n.holes,()=>e+.15,e,a,o.gaWall,W)}var Ro=6,Ao=2.2,ie=.1,Po=.3,Io=1.8,wo=.9,_o=.55,To=6e3;function se(t){let{doc:n,units:e,seats:r,surfaces:o,focal:a}=t,i=n.zones??[],s=[];if(i.length){let l=new Map;for(let f of e)for(let m of f.objects)m.type==="section"&&m.zone&&l.set(m.id,m.zone);let c=new Map;for(let f=0;f<r.length;f++){let m=r[f],u=o.seatOwner[f],h=m.zoneId??(u?l.get(u):void 0);if(!h)continue;let b=c.get(h);b||(b={n:0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,sumY:0},c.set(h,b)),b.n++,m.x<b.minX&&(b.minX=m.x),m.y<b.minY&&(b.minY=m.y),m.x>b.maxX&&(b.maxX=m.x),m.y>b.maxY&&(b.maxY=m.y),b.sumY+=o.seatDeckY(f)}for(let f of i){let m=c.get(f.id),u=[];for(let[h,b]of l)b===f.id&&u.push(h);if(!m||m.n===0){s.push({id:f.id,label:f.label,color:H(f.color),sectionIds:u,seatCount:0,center:[0,0,0],radius:0,focalWorld:[(f.focalPoint??a).x*g,1.5,(f.focalPoint??a).y*g]});continue}s.push({id:f.id,label:f.label,color:H(f.color),sectionIds:u,seatCount:m.n,center:[(m.minX+m.maxX)/2*g,m.sumY/m.n,(m.minY+m.maxY)/2*g],radius:.5*Math.hypot((m.maxX-m.minX)*g,(m.maxY-m.minY)*g)||1,focalWorld:[(f.focalPoint??a).x*g,1.5,(f.focalPoint??a).y*g]})}}return s}function ae(t){let{doc:n,units:e,seats:r,surfaces:o,seatData:a,hintedSeatFloor:i,zones:s,focal:l}=t,c=[],f=[],m=[];for(let u of s)u.seatCount!==0&&c.push({id:`zone:${u.id}`,kind:"zone",text:u.label,anchor:[u.center[0],u.center[1]+Ro,u.center[2]],color:n.zones?.find(h=>h.id===u.id)?.color});{let u=new Map,h=new Map;for(let b=0;b<r.length;b++){let p=o.seatOwner[b];if(!p)continue;let d=u.get(p);d||(d={n:0,x:0,y:0,deck:0},u.set(p,d)),d.n++,d.x+=r[b].x,d.y+=r[b].y,d.deck+=o.seatDeckY(b);let y=h.get(p);y||(y={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0},h.set(p,y)),r[b].x<y.minX&&(y.minX=r[b].x),r[b].x>y.maxX&&(y.maxX=r[b].x),r[b].y<y.minY&&(y.minY=r[b].y),r[b].y>y.maxY&&(y.maxY=r[b].y)}for(let b of e)for(let p of b.objects){if(p.type!=="section")continue;let d=u.get(p.id);if(!d||d.n===0)continue;let y=h.get(p.id),x=[d.x/d.n*g,d.deck/d.n,d.y/d.n*g],w=p.displayLabel||p.label||p.id;f.push({id:p.id,floorIndex:b.index,label:w,seatCount:d.n,center:x,radius:Math.max(1,Math.hypot(y.maxX-y.minX,y.maxY-y.minY)*.5*g),focalWorld:[b.focal.x*g,b.baseHeightM+1.5,b.focal.y*g]});let A=n.floors?.[b.index]?.name?.trim().toLocaleLowerCase();e.length>1&&A===w.trim().toLocaleLowerCase()||c.push({id:`section:${p.id}`,kind:"section",text:w,anchor:[x[0],x[1]+Ao,x[2]],floorIndex:b.index})}}{for(let p of e)for(let d of p.objects){if(d.type!=="gaArea")continue;let y=At(d.points);if(!y)continue;let x=d.displayLabel||d.label||d.id;c.push({id:`ga:${d.id}`,kind:"ga",text:d.capacity>0?`${x} \xB7 ${d.capacity.toLocaleString()}`:x,anchor:[y.x*g,p.baseHeightM+Io,y.y*g],floorIndex:p.index})}let u=new Map;for(let p of e)for(let d of p.objects)d.type==="section"&&u.set(d.id,d.displayLabel||d.label||d.id);let h=new Map;for(let p=0;p<r.length;p++){let d=r[p],y=Math.hypot(d.x-l.x,d.y-l.y),x=h.get(d.rowId);(!x||y>x.far)&&h.set(d.rowId,{seat:d,index:p,far:y})}for(let[p,d]of h){let y=Eo(d.seat.label,p,u.get(d.seat.sectionId??""));y&&c.push({id:`row:${p}`,kind:"row",text:y,anchor:[d.seat.x*g,o.seatDeckY(d.index)+wo,d.seat.y*g],floorIndex:i[d.index]})}let b=new Map;for(let p=0;p<r.length;p++){let d=r[p],y=d.label?d.label.lastIndexOf("-"):-1,x=b.get(d.rowId);x||(x={n:0,x:0,y:0,z:0,minX:1/0,maxX:-1/0,minZ:1/0,maxZ:-1/0,label:y>0?d.label.slice(0,y):d.rowId,sectionId:d.sectionId},b.set(d.rowId,x));let w=p*3,A=a.iPosition[w],E=a.iPosition[w+1],M=a.iPosition[w+2];x.n++,x.x+=A,x.y+=E,x.z+=M,x.minX=Math.min(x.minX,A),x.maxX=Math.max(x.maxX,A),x.minZ=Math.min(x.minZ,M),x.maxZ=Math.max(x.maxZ,M)}for(let[p,d]of b)m.push({id:p,label:d.label,sectionId:d.sectionId,seatCount:d.n,center:[d.x/d.n,d.y/d.n,d.z/d.n],radius:Math.max(.8,Math.hypot(d.maxX-d.minX,d.maxZ-d.minZ)*.5)});if(r.length<=To)for(let p=0;p<r.length;p++){let d=r[p],y=Bo(d.displayLabel||d.label);y&&c.push({id:`seat:${d.id}`,kind:"seat",text:y,anchor:[d.x*g,o.seatDeckY(p)+_o,d.y*g],floorIndex:i[p]})}}for(let u of e)for(let h of u.objects)if(h.type==="shape"&&h.role&&["entrance","exit","screen","suite","obstruction"].includes(h.role)){let b=bt(h),p=b?At(b):null;if(!p||!h.label)continue;c.push({id:`architecture:${h.id}`,kind:"annotation",text:h.label,anchor:[p.x*g,u.baseHeightM+Et(h).heightM+ie,p.y*g],color:h.fill,floorIndex:u.index})}else if(h.type==="text"){if(!h.text)continue;c.push({id:`text:${h.id}`,kind:"annotation",text:h.text,anchor:[h.position.x*g,u.baseHeightM+ie,h.position.y*g],color:h.color,rotation:h.rotation,floorIndex:u.index})}else if(h.type==="booth"){let b=Ft(h);if(!b)continue;let p=At(b);if(!p)continue;c.push({id:`booth:${h.id}`,kind:"booth",text:h.displayLabel||h.label||h.id,anchor:[p.x*g,u.baseHeightM+an+Po,p.y*g],floorIndex:u.index})}return{labels:c,sections:f,rows:m}}function ce(t,n){if(n.length>1)for(let e of n)t.push({id:`floor:${e.id}`,kind:"floor",text:e.label,anchor:[e.center[0],e.box.max[1]+1.2,e.center[2]],floorIndex:e.index})}function Bo(t){let n=t.lastIndexOf("-");return n>=0&&n<t.length-1?t.slice(n+1):t}function Eo(t,n,e){let r=t?t.lastIndexOf("-"):-1,o=r>0?t.slice(0,r):n;return o&&Sn(o,e)}var Co=.15,Fo=.9,vo=1.76;function ko(){return{background:{top:[...nn.top],bottom:[...nn.bottom]},structure:tn,seatStates:{...Bn},seatScale:1,materials:{seat:null,shell:null,roughness:.78}}}function ue(t){let n=ko();if(!t)return n;let e=H(t.background);if(e){n.background={top:et(e,Fo),bottom:et(e,vo)};let i={};for(let[s,l]of Object.entries(tn))i[s]=nt(l,e,Co);n.structure=i}let r=H(t.selectionColor)??H(t.accent);r&&(n.seatStates={...n.seatStates,selected:r});let o=t.seatScale;typeof o=="number"&&Number.isFinite(o)&&(n.seatScale=An(o));let a=t.venue3d;if(a){let i=H(a.deck),s=H(a.fascia);i&&(n.structure={...n.structure,tierTop:i,gaTop:i}),s&&(n.structure={...n.structure,tierWall:s,gaWall:s}),n.materials.seat=H(a.seat),n.materials.shell=H(a.shell),typeof a.roughness=="number"&&Number.isFinite(a.roughness)&&(n.materials.roughness=Math.min(1,Math.max(0,a.roughness)))}return n}function le(t,n){let e=[];for(let r of n)e.push(...t.seatStates[r]);return e}var Oo=.05,me=.05,Lo=.15,ln=25;function fe(t,n,e){let r=new Map,o=new Array(n.length).fill(null),a=new Float64Array(n.length),i=new Array(n.length).fill(void 0),s=new Array(n.length).fill(void 0),l=new Map,c=[],f=new Set;for(let u=0;u<t.length;u+=1){let h=t[u];for(let b of h.objects){if(b.type==="table"&&f.add(b.id),b.type!=="section"||!b.outline||b.outline.length<3)continue;let p=jt(b.outline,ot);l.set(b.id,{section:b,unit:h,frontU:1/0,hasSeats:!1,rows:new Map,seatIndices:[]}),c.push({id:b.id,floorIndex:u,box:Mt(p),section:b,unit:h,outline:p})}}let m=new Map;for(let u of c){let h=m.get(u.floorIndex);h?h.push(u):m.set(u.floorIndex,[u])}for(let u=0;u<n.length;u++){let h=n[u],b=e?m.get(e[u])??[]:c,p=h.sectionId?b.find(y=>y.id===h.sectionId)??b.find(y=>y.section.logicalSectionId===h.sectionId&&qt({x:h.x,y:h.y},y.outline,y.section.holes)):void 0,d=p?[p]:b;for(let y of d){if(e&&y.floorIndex!==e[u]||!p&&(h.x<y.box.minX||h.x>y.box.maxX||h.y<y.box.minY||h.y>y.box.maxY||!qt({x:h.x,y:h.y},y.outline,y.section.holes)))continue;o[u]=y.id;let x=l.get(y.id);x.hasSeats=!0;let w=h.focalPoint??y.unit.focal,A=Math.hypot(h.x-w.x,h.y-w.y);A<x.frontU&&(x.frontU=A),x.seatIndices.push(u);let E=h.rowId||`__seat-${u}`,M=x.rows.get(E);M?M.push({x:h.x,y:h.y}):x.rows.set(E,[{x:h.x,y:h.y}]);break}}for(let[u,h]of l){let b=dn(h.section,{floorBaseHeightM:h.unit.baseHeightM}),p=h.unit.baseHeightM,d=b.rake>0?Math.tan(b.rake*Math.PI/180):0,y=b.rake<=.01&&b.height<=p+.001,x=h.section.surfaceKind,w=x==="flat"?!0:x==="rakedRows"&&b.rake>.01?!1:y,A=h.hasSeats?yn(u,n,h.seatIndices,h.unit.focal):{sectionId:u,rows:[],blockCount:0},M=A.rows.length<2?Pn([...h.rows.values()].map(R=>({points:R})),h.unit.focal):null,I=1/0;if(M){if(h.hasSeats)for(let R of h.rows.values())for(let T of R){let C=M.depthAt(T.x,T.y);C<I&&(I=C)}if(!h.hasSeats||!Number.isFinite(I)){I=1/0;for(let R of h.section.outline){let T=M.depthAt(R.x,R.y);T<I&&(I=T)}}}let B=p+Oo,k=Math.max(B,b.height),D=R=>{let T=Math.max(0,R-I)*ut,C=Math.min(T*d,ln);return Math.max(B,b.height+C)},U=R=>{let T=Math.max(0,R)*ut,C=Math.min(T*d,ln);return Math.max(B,b.height+C)},S=w?[]:A.rows.map(R=>({pts:R.pts,y:U(R.blockDepth),depth:R.blockDepth,blockId:R.blockId,...f.has(R.id)?{patch:Nn(R.pts,ot)}:{}})),_=S.length?S[0].y:k,N=S.map(R=>{let T=R.patch&&R.patch.length>=3?R.patch:R.pts,C=0,v=0;for(let L of T)C+=L.x,v+=L.y;let G=T.length||1;C/=G,v/=G;let X=0;for(let L of T){let Y=Math.hypot(L.x-C,L.y-v);Y>X&&(X=Y)}return{cx:C,cy:v,rad:X}}),O=w?()=>k:S.length>=2?(R,T)=>{let C=1/0,v=_;for(let G=0;G<S.length;G++){let X=N[G];if(Math.hypot(R-X.cx,T-X.cy)-X.rad>=C)continue;let L=S[G].patch,Y=L&&L.length>=3?It(L,R,T)?0:Dt(L,R,T):Dt(S[G].pts,R,T);Y<C&&(C=Y,v=S[G].y)}return v}:(R,T)=>M?D(M.depthAt(R,T)):k,P=[0,1,0],F=S.length>=2||w?()=>P:(R,T)=>{if(!M)return P;let C=M.depthAt(R,T);if(C<=I)return P;let v=(C-I)*ut;if(v*d>=ln||b.height+v*d<=B)return P;let[G,X]=M.gradientAt(R,T);if(G===0&&X===0)return P;let L=1/Math.hypot(d,1);return[-G*d*L,L,-X*d*L]};if(!w)for(let R of A.rows){let T=U(R.blockDepth);for(let C of R.seatIndices)i[C]=T}for(let R of A.rows){let T=[];for(let L=1;L<R.pts.length;L++){let Y=Math.hypot(R.pts[L].x-R.pts[L-1].x,R.pts[L].y-R.pts[L-1].y);Y>1e-6&&T.push(Y)}T.sort((L,Y)=>L-Y);let C=T.length?T[Math.floor(T.length/2)]:1/0,v=1/0,G=R.pts[Math.floor(R.pts.length/2)];if(G)for(let L of A.rows){if(L===R||L.blockId!==R.blockId)continue;let Y=Dt(L.pts,G.x,G.y);Y>1e-6&&Y<v&&(v=Y)}let X=Math.min(C,Math.max(v,C*.5));if(Number.isFinite(X)&&X>0)for(let L of R.seatIndices)s[L]=X}r.set(u,{sectionId:u,deckAt:O,normalAt:F,flat:w,bottomY:p,rowLevels:S,landingY:_})}for(let u=0;u<n.length;u++){let h=o[u],b=n[u];if(h){let d=i[u];a[u]=(d??r.get(h).deckAt(b.x,b.y))+Lo;continue}let p=b.eyeHeightM;a[u]=Number.isFinite(p)?Math.max(0,p-Gt):0}return{bySection:r,seatOwner:o,seatDeckY:u=>a[u],seatPitchU:u=>s[u]}}var Go=.25,Do=1.2,No=.6,Xo=.45,Uo=2.3,Yo=Math.PI/180;function pt(t,n,e){let r=e*Yo;return{x:t.x+n*Math.sin(r),y:t.y+n*Math.cos(r)}}function jo(t,n){let e=n.rings[n.rings.length-1];if(!e)return!1;let r=e.outerRMedian*.85;for(let o of t){if(o.role!=="wall")continue;let a=o.points&&o.points.length>=2?o.points:o.x!==void 0&&o.y!==void 0&&o.width!==void 0&&o.height!==void 0?[{x:o.x,y:o.y},{x:o.x+o.width,y:o.y},{x:o.x+o.width,y:o.y+o.height},{x:o.x,y:o.y+o.height}]:[];if(a.length<2)continue;let i=0;for(let s of a)Math.hypot(s.x-n.centre.x,s.y-n.centre.y)>=r&&i++;if(i>=a.length/2)return!0}return!1}var Ho=24;function Vo(t,n,e,r,o,a,i,s){let l=e.binCount,c=Ho,f=ut,m=a+.02,u=[];for(let S=0;S<l;S++){let _=(e.startBin+S+.5)*n.binStepDeg,N=new Float64Array(c+1);for(let O=0;O<=c;O++){let P=r[S]+(o[S]-r[S])*O/c;N[O]=Math.max(m,wn(n,e,_,P)-Go)}u.push(N)}let h=[i.bandTop[0]*s.top,i.bandTop[1]*s.top,i.bandTop[2]*s.top],b=[i.bandTop[0]*s.bottomCap,i.bandTop[1]*s.bottomCap,i.bandTop[2]*s.bottomCap],p=[i.bandWall[0]*s.top,i.bandWall[1]*s.top,i.bandWall[2]*s.top],d=[i.bandWall[0]*s.wallBottom,i.bandWall[1]*s.wallBottom,i.bandWall[2]*s.wallBottom],y=(S,_)=>{let N=(e.startBin+S+.5)*n.binStepDeg,O=r[S]+(o[S]-r[S])*_/c,P=pt(n.centre,O,N);return[P.x*f,u[S][_],P.y*f]};{let S=Math.tan(12*Math.PI/180);for(let _=0;_<6;_++){let N=!1;for(let P=0;P<l;P++)for(let F=c-1;F>=0;F--)u[P][F]>u[P][F+1]&&(u[P][F]=u[P][F+1],N=!0);let O=e.closed?l:l-1;for(let P=0;P<O;P++){let F=(P+1)%l;for(let R=0;R<=c;R++){let T=u[F][R]-u[P][R];if(Math.abs(T)>1)continue;let C=r[P]+(o[P]-r[P])*R/c,v=r[F]+(o[F]-r[F])*R/c,G=pt(n.centre,C,(e.startBin+P+.5)*n.binStepDeg),X=pt(n.centre,v,(e.startBin+F+.5)*n.binStepDeg),L=S*Math.hypot(X.x-G.x,X.y-G.y)*f;T>L?(u[F][R]=u[P][R]+L,N=!0):-T>L&&(u[P][R]=u[F][R]+L,N=!0)}}if(!N)break}}let x=1,w=(S,_)=>{for(let N=0;N<=c;N+=4)if(Math.abs(u[S][N]-u[_][N])>x)return!0;return Math.abs(u[S][c]-u[_][c])>x},A=Math.tan(38*Math.PI/180),E=S=>(o[S]-r[S])/c*f,M=(S,_)=>u[S][_+1]-u[S][_]>A*Math.max(1e-6,E(S)),I=(S,_)=>{let N=e.closed?(S-1+l)%l:Math.max(0,S-1),O=e.closed?(S+1)%l:Math.min(l-1,S+1);Math.abs(u[N][_]-u[S][_])>x&&(N=S),Math.abs(u[O][_]-u[S][_])>x&&(O=S);let P=Math.max(0,_-1),F=Math.min(c,_+1);P<_&&M(S,P)&&(P=_),F>_&&M(S,_)&&(F=_);let R=y(N,_),T=y(O,_),C=y(S,P),v=y(S,F),G=T[0]-R[0],X=T[1]-R[1],L=T[2]-R[2],Y=v[0]-C[0],j=v[1]-C[1],$=v[2]-C[2],z=X*$-L*j,q=L*Y-G*$,tt=G*j-X*Y,Z=Math.hypot(z,q,tt);return Z>1e-12?(z/=Z,q/=Z,tt/=Z,q<0&&(z=-z,q=-q,tt=-tt),[z,q,tt]):[0,1,0]},B=(S,_)=>{let N=[S[0],a,S[2]],O=[_[0],a,_[2]],P=_[0]-S[0],F=_[2]-S[2],R=Math.hypot(P,F);if(!(R>1e-12))return;let T=[F/R,0,-P/R];t.tri(S,_,O,T,p,p,d),t.tri(S,O,N,T,p,d,d)},k=.05*lt,D=S=>o[S]-r[S]<k,U=e.closed?l:l-1;for(let S=0;S<U;S++){let _=(S+1)%l;if(D(S)||D(_))continue;if(w(S,_)){let T=(e.startBin+S+1)*n.binStepDeg,C=(j,$)=>{let z=(r[S]+r[_])/2,q=(o[S]+o[_])/2,tt=z+(q-z)*$/c,Z=pt(n.centre,tt,T);return[Z.x*f,u[j][$],Z.y*f]};for(let j=0;j<c;j++){let $=y(S,j),z=y(S,j+1),q=C(S,j),tt=C(S,j+1),Z=I(S,j),it=I(S,j+1);t.triN($,q,tt,Z,Z,it,h),t.triN($,tt,z,Z,it,it,h);let vt=y(_,j),kt=y(_,j+1),dt=C(_,j),St=C(_,j+1),yt=I(_,j),xt=I(_,j+1);t.triN(dt,vt,kt,yt,yt,xt,h),t.triN(dt,kt,St,yt,xt,xt,h);let ct=C(S,j),rt=C(S,j+1),Ot=C(_,j+1),Kt=C(_,j),Lt=rt[0]-ct[0],Rt=rt[2]-ct[2],$t=Math.hypot(Lt,Rt);if($t>1e-12){let fn=[Rt/$t,0,-Lt/$t];t.tri(ct,rt,Ot,fn,p),t.tri(ct,Ot,Kt,fn,p)}}let v=y(S,0),G=y(_,0),X=y(_,c),L=y(S,c),Y=j=>[j[0],a,j[2]];t.tri(Y(v),Y(X),Y(G),[0,-1,0],b),t.tri(Y(v),Y(L),Y(X),[0,-1,0],b),B(v,G),B(L,X);continue}for(let T=0;T<c;T++){let C=I(S,T),v=I(_,T),G=I(_,T+1),X=I(S,T+1);if(M(S,T)||M(_,T)){let z=(rt,Ot)=>{let Kt=(e.startBin+rt+.5)*n.binStepDeg,Lt=r[rt]+(o[rt]-r[rt])*(T+.5)/c,Rt=pt(n.centre,Lt,Kt);return[Rt.x*f,Ot,Rt.y*f]},q=y(S,T),tt=y(_,T),Z=z(S,u[S][T]),it=z(_,u[_][T]);t.triN(q,tt,it,C,v,v,h),t.triN(q,it,Z,C,v,C,h);let vt=y(_,T+1),kt=y(S,T+1),dt=z(S,u[S][T+1]),St=z(_,u[_][T+1]);t.triN(dt,St,vt,X,G,G,h),t.triN(dt,vt,kt,X,G,X,h);let yt=it[0]-Z[0],xt=it[2]-Z[2],ct=Math.hypot(yt,xt);if(ct>1e-12){let rt=[-xt/ct,0,yt/ct];t.tri(Z,it,St,rt,p),t.tri(Z,St,dt,rt,p)}continue}let L=y(S,T),Y=y(_,T),j=y(_,T+1),$=y(S,T+1);t.triN(L,Y,j,C,v,G,h),t.triN(L,j,$,C,G,X,h)}let N=y(S,0),O=y(_,0),P=y(_,c),F=y(S,c),R=T=>[T[0],a,T[2]];t.tri(R(N),R(P),R(O),[0,-1,0],b),t.tri(R(N),R(F),R(P),[0,-1,0],b),B(N,O),B(F,P)}if(!e.closed)for(let S of[0,l-1])for(let _=0;_<c;_++)B(y(S,_),y(S,_+1))}function he(t,n,e){let{bottomY:r,colors:o,ao:a}=e,i=new Float64Array(n.binCount).fill(-1/0);for(let f of n.rings)for(let m of f.arcs){let u=new Float64Array(m.binCount),h=new Float64Array(m.binCount);for(let p=0;p<m.binCount;p++){let d=(m.startBin+p)%n.binCount,y=Math.max(0,m.innerR[p]-ot);u[p]=Math.max(y,i[d]+.001),h[p]=Math.max(u[p]+.001,m.outerR[p]+ot)}let b=0;for(let p=0;p<m.binCount;p++){let d=m.topLevelM[p]-r;d>b&&(b=d)}b>=Do&&Vo(t,n,m,u,h,r,o,a);for(let p=0;p<m.binCount;p++){let d=(m.startBin+p)%n.binCount;h[p]>i[d]&&(i[d]=h[p])}}if(e.deriveShell===!1||jo(e.shapes,n))return;let s=n.rings[n.rings.length-1],l=No*lt,c=Xo*lt;for(let f of s.arcs){let m=[],u=[];for(let p=0;p<f.binCount;p++){let d=(f.startBin+p+.5)*n.binStepDeg,y=f.outerR[p]+ot+l;m.push(pt(n.centre,y,d)),u.push(pt(n.centre,y+c,d))}let h=-1/0;for(let p=0;p<f.binCount;p++)f.topLevelM[p]>h&&(h=f.topLevelM[p]);let b=()=>h+Uo;f.closed?K(t,u,[m.slice().reverse()],b,r,o.shellTop,o.shellWall,a):K(t,[...u,...m.slice().reverse()],void 0,b,r,o.shellTop,o.shellWall,a)}}function be(t,n,e,r,o,a,i,s){if(!n.outline||n.outline.length<3)return;let l=e.baseHeightM,c=st(r,s.tierTop);if(!o)return;let f=d=>o.deckAt(d.x,d.y),m=Kn(n,i),u=m[0]??n.outline;if(o.rowLevels.length>=2){let d=Wt(o.rowLevels),y=$n(jn(o.rowLevels,e.focal,d),m),x=()=>[0,1,0];for(let A of y){let E=Math.max(l,A.topY-.02);for(let M of a.subtract(A.outline,E))K(t,M,A.holes,()=>E,l,c,s.tierWall,W,void 0,x)}y.length||K(t,u,n.holes,()=>o.landingY,l,c,s.tierWall,W);let w={tread:[c[0]*W.top,c[1]*W.top,c[2]*W.top],riser:[c[0]*.72,c[1]*.72,c[2]*.72]};for(let A of m.length?m:[u])Vn(t,o.rowLevels,e.focal,o.landingY,w,A,d);return}let h=o.flat?1/0:me,b=d=>o.normalAt(d.x,d.y),p=o.flat?o.landingY:void 0;for(let d of a.subtract(u,p))K(t,d,n.holes,f,l,c,s.tierWall,W,h,b)}function Wo(t,n,e){let r=new Set;for(let i of t.objects)i.type==="section"&&r.add(i.id);let o=new Map;for(let i=0;i<n.length;i++){let s=e.seatOwner[i];if(!s||!r.has(s))continue;let l=e.bySection.get(s);if(l&&l.rowLevels.length>=2)continue;let c=n[i],f=o.get(s);f||(f=new Map,o.set(s,f));let m=c.rowId||`__seat-${i}`,u=f.get(m);u||(u={pts:[],levelM:0,n:0},f.set(m,u)),u.pts.push({x:c.x,y:c.y}),u.levelM+=e.seatDeckY(i),u.n++}let a=[];for(let i of t.objects){if(i.type!=="section")continue;let s=e.bySection.get(i.id);if(s&&s.rowLevels.length>=2){let c=s.rowLevels.filter(f=>!f.patch).map(f=>({pts:f.pts,levelM:f.y}));c.length>=2&&a.push({sectionId:i.id,rows:c});continue}let l=o.get(i.id);l&&a.push({sectionId:i.id,rows:[...l.values()].map(c=>({pts:c.pts,levelM:c.levelM/c.n}))})}return a}function pe(t,n,e,r,o,a,i=!0){let s=Wo(n,e,r);if(!s.length)return;let l=In(s,n.focal);l&&(t.setMaterial(0),he(t,l,{bottomY:n.baseHeightM,colors:{bandTop:et(o.tierTop,.8),bandWall:o.tierWall,shellTop:a??et(o.tierWall,1.15),shellWall:a??o.tierWall},ao:W,shapes:n.objects.filter(c=>c.type==="shape"),deriveShell:i}))}function de(t){let{doc:n,units:e,seats:r,surfaces:o,solids:a,hintedSeatFloor:i,seatFloor:s}=t,l=[];{let c=e.map(()=>({minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0}));for(let u=0;u<a.floor.length;u+=1){let h=Math.max(0,Math.min(e.length-1,Math.round(a.floor[u]))),b=u*3,p=c[h];p.minX=Math.min(p.minX,a.position[b]),p.minY=Math.min(p.minY,a.position[b+1]),p.minZ=Math.min(p.minZ,a.position[b+2]),p.maxX=Math.max(p.maxX,a.position[b]),p.maxY=Math.max(p.maxY,a.position[b+1]),p.maxZ=Math.max(p.maxZ,a.position[b+2])}let f=new Map;for(let u=0;u<e.length;u++)for(let h of e[u].objects)h.type==="section"&&f.set(h.id,u);let m=e.map(()=>({n:0,minX:1/0,minY:1/0,minDeck:1/0,maxX:-1/0,maxY:-1/0,maxDeck:-1/0,sumX:0,sumDeck:0,sumZ:0}));for(let u=0;u<r.length;u++){let h=o.seatOwner[u],b=(h!==null?f.get(h):void 0)??i[u];if(b===void 0)continue;let p=m[b],d=r[u];p.n++,d.x<p.minX&&(p.minX=d.x),d.y<p.minY&&(p.minY=d.y),d.x>p.maxX&&(p.maxX=d.x),d.y>p.maxY&&(p.maxY=d.y);let y=o.seatDeckY(u);p.sumX+=d.x*g,p.sumDeck+=y,p.sumZ+=d.y*g,p.minDeck=Math.min(p.minDeck,y),p.maxDeck=Math.max(p.maxDeck,y+1.6),s[u]=b}for(let u=0;u<e.length;u++){let h=m[u],b=n.floors?.[u],p=c[u],d=Math.min(h.n?h.minX*g:e[u].focal.x*g-1,Number.isFinite(p.minX)?p.minX:1/0),y=Math.max(h.n?h.maxX*g:e[u].focal.x*g+1,Number.isFinite(p.maxX)?p.maxX:-1/0),x=Math.min(h.n?h.minY*g:e[u].focal.y*g-1,Number.isFinite(p.minZ)?p.minZ:1/0),w=Math.max(h.n?h.maxY*g:e[u].focal.y*g+1,Number.isFinite(p.maxZ)?p.maxZ:-1/0),A=Math.min(h.n?Math.min(e[u].baseHeightM,h.minDeck):e[u].baseHeightM,Number.isFinite(p.minY)?p.minY:1/0),E=Math.max(h.n?Math.max(h.maxDeck,A+.5):A+.5,Number.isFinite(p.maxY)?p.maxY:-1/0),M=[h.n?h.sumX/h.n:(d+y)/2,h.n?h.sumDeck/h.n:(A+E)/2,h.n?h.sumZ/h.n:(x+w)/2],I=Math.max(1,.5*Math.hypot(y-d,E-A,w-x));l.push({index:u,id:b?.id??`floor-${u}`,label:b?.name??(e.length>1?`Floor ${u+1}`:"Venue"),seatCount:h.n,center:M,radius:I,box:{min:[d,A,x],max:[y,E,w]},focalWorld:[e[u].focal.x*g,e[u].baseHeightM+1.5,e[u].focal.y*g]})}}return l}function mn(t,n){let e=1/0,r=1/0,o=-1/0,a=-1/0,i=(s,l)=>{s<e&&(e=s),l<r&&(r=l),s>o&&(o=s),l>a&&(a=l)};for(let s of n)i(s.x,s.y);for(let s of t)for(let l of s.objects)if(l.type==="section")for(let c of l.outline)i(c.x,c.y);else if(l.type==="shape"&&l.points)for(let c of l.points)i(c.x,c.y);else if(l.type==="gaArea")for(let c of l.points)i(c.x,c.y);else if(l.type==="booth"){let c=Ft(l);if(c)for(let f of c)i(f.x,f.y)}else if(l.type==="table"){let c=cn(l);if(c)for(let f of c)i(f.x,f.y)}else if(l.type==="decorImage"){let c=un(l);if(c)for(let f of c)i(f.x,f.y)}return Number.isFinite(e)||(e=-100,r=-100,o=100,a=100),{minX:e,minY:r,maxX:o,maxY:a}}function ye(t,n,e,r,o,a){if(n.length===1){let i=Math.max(60,(o.maxX-o.minX+o.maxY-o.minY)*.06),s=Tt(o.minX-i,o.minY-i,o.maxX-o.minX+i*2,o.maxY-o.minY+i*2);K(t,s,void 0,()=>0,-.4,a.ground,a.ground,W)}else{let i=n.reduce((h,b)=>b.baseHeightM<h.baseHeightM?b:h);t.setFloor(i.index);let s=e.filter((h,b)=>r[b]===i.index),l=mn([i],s),c=Math.hypot(l.maxX-l.minX,l.maxY-l.minY),f=Math.max(28,Math.min(80,c*.04)),m=Tt(l.minX-f,l.minY-f,l.maxX-l.minX+f*2,l.maxY-l.minY+f*2),u=i.baseHeightM-.03;K(t,m,void 0,()=>u,u-.22,a.ground,a.ground,W)}}function xe(t,n,e){let{cx:r,cz:o,radius:a}=e,i=1/0,s=1/0,l=1/0,c=-1/0,f=-1/0,m=-1/0,u=(p,d,y)=>{i=Math.min(i,p),c=Math.max(c,p),s=Math.min(s,d),f=Math.max(f,d),l=Math.min(l,y),m=Math.max(m,y)};for(let p=0;p<t.position.length;p+=3)u(t.position[p],t.position[p+1],t.position[p+2]);for(let p=0;p<n.count;p++){let d=p*3,y=n.iPosition[d],x=n.iPosition[d+1],w=n.iPosition[d+2],A=Math.max(.35,n.iMaxRadius[p]??.35);u(y-A,x,w-A),u(y+A,x+1.6,w+A)}Number.isFinite(i)||(i=r-a,c=r+a,s=0,f=a*.16,l=o-a,m=o+a);let h=[(i+c)/2,(s+f)/2,(l+m)/2],b=Math.max(1,.5*Math.hypot(c-i,f-s,m-l));return{center:h,radius:b,minY:s,maxY:f}}function ge(t,n,e,r,o,a){let i=1/0,s=1/0,l=-1/0,c=-1/0;for(let A=0;A<t.count;A++){let E=A*3,M=t.iPosition[E],I=t.iPosition[E+2];M<i&&(i=M),M>l&&(l=M),I<s&&(s=I),I>c&&(c=I)}for(let A of n)i=Math.min(i,A.cx-A.halfX),l=Math.max(l,A.cx+A.halfX),s=Math.min(s,A.cz-A.halfZ),c=Math.max(c,A.cz+A.halfZ);let f=e.minX*g,m=e.maxX*g,u=e.minY*g,h=e.maxY*g,b=f,p=m,d=u,y=h;if(Number.isFinite(i)){let A=Math.max(2,.06*Math.hypot(l-i,c-s));b=Math.max(f,i-A),p=Math.min(m,l+A),d=Math.max(u,s-A),y=Math.min(h,c+A)}let x=Math.min(0,r),w=Math.max(o,a*.05);return{min:[b,x,d],max:[p,w,y]}}function Me(t,n,e){let r=()=>({byObjectId:new Map,elements:[]});if(!n||!t)return r();let o=bn(n);if(!o.ok||o.value.id!==t)return r();let a=new Map;for(let m of e)for(let u of m.objects)u.type==="shape"&&a.set(u.id,{shape:u,unit:m});let i=new Set,s=new Set,l=new Map((n.overlay.productionElements??[]).map(m=>{let u=m.runtimeContentImageUrl;return[m.id,typeof u=="string"&&/^(?:blob:|data:image\/|https:\/\/)/.test(u)?u:void 0]})),c=[];for(let m of o.value.overlay.productionElements??[]){let u=a.get(m.objectId),h=u?bt(u.shape):null,b=m.baseElevationM??0;if(!u||!h||h.length<3||!m.id||i.has(m.id)||s.has(m.objectId)||!Number.isFinite(m.heightM)||m.heightM<.05||m.heightM>50||!Number.isFinite(b)||b<-10||b>100)return r();i.add(m.id),s.add(m.objectId);let p=h.map(B=>B.x*g),d=h.map(B=>B.y*g),y=u.unit.baseHeightM+b,x=Math.min(...p),w=Math.max(...p),A=Math.min(...d),E=Math.max(...d),M,I=l.get(m.id)??m.contentImageUrl;if(m.kind==="screen"&&I)if(w-x>=E-A){let B=Math.abs(A-u.unit.focal.y*g)<=Math.abs(E-u.unit.focal.y*g)?A-.006:E+.006;M=[[x,y,B],[w,y,B],[x,y+m.heightM,B],[w,y+m.heightM,B]]}else{let B=Math.abs(x-u.unit.focal.x*g)<=Math.abs(w-u.unit.focal.x*g)?x-.006:w+.006;M=[[B,y,A],[B,y,E],[B,y+m.heightM,A],[B,y+m.heightM,E]]}c.push({id:m.id,objectId:m.objectId,kind:m.kind,floorIndex:u.unit.index,baseY:y,topY:y+m.heightM,bounds:{min:[x,y,A],max:[w,y+m.heightM,E]},occlusion:m.occlusion,...I?{contentImageUrl:I}:{},...M?{contentPlane:M}:{}})}let f=c.sort((m,u)=>m.id.localeCompare(u.id));return{byObjectId:new Map(f.map(m=>[m.objectId,m])),elements:f}}function Q(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function J(t){return Array.isArray(t)?t:[]}function zo(t){let n=[t];for(;n.length;){let e=n.pop();if(Array.isArray(e)){n.push(...e);continue}if(!Q(e))continue;let r=Q(e.extensions)?e.extensions:null;if(r&&Object.prototype.hasOwnProperty.call(r,"KHR_draco_mesh_compression"))return!0;n.push(...Object.values(e))}return!1}function Zt(t,n){return!Array.isArray(t)||t.length!==n||!t.every(e=>typeof e=="number"&&Number.isFinite(e))?null:t}function Zo(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Ko(t,n){let e=new Array(16).fill(0);for(let r=0;r<4;r++)for(let o=0;o<4;o++)for(let a=0;a<4;a++)e[r*4+o]+=t[a*4+o]*n[r*4+a];return e}function $o(t){let n=Zt(t.matrix,16);if(n)return n;if(t.matrix!==void 0)return null;let e=t.translation===void 0?[0,0,0]:Zt(t.translation,3),r=t.rotation===void 0?[0,0,0,1]:Zt(t.rotation,4),o=t.scale===void 0?[1,1,1]:Zt(t.scale,3);if(!e||!r||!o)return null;let[a,i,s,l]=r,c=Math.hypot(a,i,s,l);if(!(c>1e-8))return null;let f=a/c,m=i/c,u=s/c,h=l/c,b=f+f,p=m+m,d=u+u,y=f*b,x=f*p,w=f*d,A=m*p,E=m*d,M=u*d,I=h*b,B=h*p,k=h*d;return[(1-(A+M))*o[0],(x+k)*o[0],(w-B)*o[0],0,(x-k)*o[1],(1-(y+M))*o[1],(E+I)*o[1],0,(w+B)*o[2],(E-I)*o[2],(1-(y+A))*o[2],0,e[0],e[1],e[2],1]}function qo(t,n,e,r){return[t[0]*n+t[4]*e+t[8]*r+t[12],t[1]*n+t[5]*e+t[9]*r+t[13],t[2]*n+t[6]*e+t[10]*r+t[14]]}function Jo(t){let n=t[0],e=t[4],r=t[8],o=t[1],a=t[5],i=t[9],s=t[2],l=t[6],c=t[10],f=a*c-i*l,m=i*s-o*c,u=o*l-a*s,h=n*f+e*m+r*u;if(Math.abs(h)<1e-12)return null;let b=1/h;return[f*b,m*b,u*b,(r*l-e*c)*b,(n*c-r*s)*b,(e*s-n*l)*b,(e*i-r*a)*b,(r*o-n*i)*b,(n*a-e*o)*b]}function Se(t,n,e,r){let o=t[0]*n+t[1]*e+t[2]*r,a=t[3]*n+t[4]*e+t[5]*r,i=t[6]*n+t[7]*e+t[8]*r,s=Math.hypot(o,a,i)||1;return o/=s,a/=s,i/=s,[o,a,i]}function Qo(t){if(t.byteLength<20||t.byteLength>8388608)return null;let n=new DataView(t.buffer,t.byteOffset,t.byteLength);if(n.getUint32(0,!0)!==1179937895||n.getUint32(4,!0)!==2||n.getUint32(8,!0)!==t.byteLength)return null;let e=12,r=null,o=null;for(;e+8<=t.byteLength;){let a=n.getUint32(e,!0),i=n.getUint32(e+4,!0);if(e+=8,a%4!==0||e+a>t.byteLength)return null;let s=t.subarray(e,e+a);if(i===1313821514&&!r)try{let l=JSON.parse(new TextDecoder().decode(s).replace(/[\u0000 ]+$/g,""));if(!Q(l))return null;r=l}catch{return null}else if(i===5130562&&!o)o=s;else return null;e+=a}return e===t.byteLength&&r&&o?{json:r,bin:o}:null}function tr(t){return t===5120||t===5121?1:t===5122||t===5123?2:t===5125||t===5126?4:0}function nr(t){return t==="SCALAR"?1:t==="VEC2"?2:t==="VEC3"?3:t==="VEC4"?4:0}function er(t,n,e){return e===5120?t.getInt8(n):e===5121?t.getUint8(n):e===5122?t.getInt16(n,!0):e===5123?t.getUint16(n,!0):e===5125?t.getUint32(n,!0):t.getFloat32(n,!0)}function or(t){let n=t instanceof Uint8Array?t:new Uint8Array(t),e=Qo(n);if(!e)return{ok:!1,issue:"invalid_glb"};let{json:r,bin:o}=e;if(!Q(r.asset)||r.asset.version!=="2.0")return{ok:!1,issue:"unsupported_glb"};let a=J(r.extensionsUsed).filter(A=>typeof A=="string");if(a.includes("KHR_draco_mesh_compression")||zo(r))return{ok:!1,issue:"draco_not_allowed"};if(a.length||J(r.extensionsRequired).length)return{ok:!1,issue:"unsupported_glb"};if(J(r.images).length||J(r.textures).length)return{ok:!1,issue:"external_resource"};let i=J(r.buffers);if(i.length!==1||!Q(i[0])||i[0].uri!==void 0||typeof i[0].byteLength!="number"||!Number.isInteger(i[0].byteLength)||i[0].byteLength<0||i[0].byteLength>o.byteLength)return{ok:!1,issue:"external_resource"};let s=J(r.accessors),l=J(r.bufferViews),c=J(r.meshes),f=J(r.nodes),m=J(r.scenes),u=typeof r.scene=="number"?r.scene:0;if(!Q(m[u]))return{ok:!1,issue:"unsupported_glb"};let h=new DataView(o.buffer,o.byteOffset,o.byteLength),b=(A,E,M)=>{if(typeof A!="number"||!Number.isInteger(A)||!Q(s[A]))return null;let I=s[A];if(I.type!==E||I.sparse!==void 0||I.normalized===!0||typeof I.count!="number"||!Number.isInteger(I.count)||I.count<1||typeof I.componentType!="number"||!M.includes(I.componentType)||typeof I.bufferView!="number")return null;let B=l[I.bufferView];if(!Q(B)||B.buffer!==0||typeof B.byteLength!="number"||!Number.isInteger(B.byteLength)||B.byteLength<0)return null;let k=nr(I.type),D=tr(I.componentType),U=typeof B.byteStride=="number"?B.byteStride:k*D,S=typeof B.byteOffset=="number"?B.byteOffset:0,_=typeof I.byteOffset=="number"?I.byteOffset:0,N=S+_,O=_+(I.count-1)*U+k*D;if(!Number.isInteger(U)||!Number.isInteger(S)||!Number.isInteger(_)||U<k*D||S<0||_<0||S+B.byteLength>o.byteLength||O>B.byteLength)return null;let P=[];for(let F=0;F<I.count;F++){let R=[];for(let T=0;T<k;T++){let C=er(h,N+F*U+T*D,I.componentType);if(!Number.isFinite(C))return null;R.push(C)}P.push(R)}return P},p=[],d=[],y=0,x=new Set,w=(A,E)=>{if(typeof A!="number"||!Number.isInteger(A)||!Q(f[A])||x.has(A))return!1;x.add(A);let M=f[A],I=$o(M);if(!I)return!1;let B=Ko(E,I),k=Jo(B);if(!k)return!1;if(M.mesh!==void 0){if(typeof M.mesh!="number")return!1;let D=c[M.mesh];if(!Q(D))return!1;for(let U of J(D.primitives)){if(!Q(U)||U.mode!==void 0&&U.mode!==4||!Q(U.attributes))return!1;let S=b(U.attributes.POSITION,"VEC3",[5126]),_=U.attributes.NORMAL===void 0?null:b(U.attributes.NORMAL,"VEC3",[5126]);if(!S||U.attributes.NORMAL!==void 0&&!_)return!1;let N=S.length;if(U.indices!==void 0){let P=typeof U.indices=="number"?s[U.indices]:null;N=Q(P)?P.count:void 0}if(typeof N!="number"||!Number.isInteger(N)||N%3!==0||(y+=N/3,y>1e5))return!1;let O=U.indices===void 0?S.map((P,F)=>[F]):b(U.indices,"SCALAR",[5121,5123,5125]);if(!O||O.length%3!==0||O.length!==N)return!1;for(let P=0;P<O.length;P+=3){let F=[O[P][0],O[P+1][0],O[P+2][0]];if(F.some(C=>!Number.isInteger(C)||C<0||C>=S.length))return!1;let R=F.map(C=>qo(B,...S[C])),T=null;if(!_){let C=R[1][0]-R[0][0],v=R[1][1]-R[0][1],G=R[1][2]-R[0][2],X=R[2][0]-R[0][0],L=R[2][1]-R[0][1],Y=R[2][2]-R[0][2];T=Se([1,0,0,0,1,0,0,0,1],v*Y-G*L,G*X-C*Y,C*L-v*X)}for(let C=0;C<3;C++)p.push(...R[C]),d.push(..._?Se(k,..._[F[C]]):T)}}}for(let D of J(M.children))if(!w(D,B))return!1;return x.delete(A),!0};for(let A of J(m[u].nodes))if(!w(A,Zo()))return{ok:!1,issue:y>1e5?"triangle_limit":"unsupported_glb"};return!y||p.length!==y*9||d.length!==p.length?{ok:!1,issue:"unsupported_glb"}:{ok:!0,triangleCount:y,position:new Float32Array(p),normal:new Float32Array(d)}}function Re(t){try{return or(t)}catch{return{ok:!1,issue:"invalid_glb"}}}function As(t){let{doc:n}=t,e=ue(n.theme),r=e.structure,o=Zn(n,t.eventConfigurationId??n.eventConfigurationId),a=Me(t.eventConfigurationId,t.eventConfiguration,o),i=t.seats,s=new Yt,l=null;if(t.registeredShellGlb){let P=Re(t.registeredShellGlb);if(P.ok){let F=P.position.length/3,R=new Float32Array(P.position.length),T=e.materials.shell??r.tierWall;for(let C=0;C<F;C++){let v=P.normal[C*3+1],G=v<-.25?.4:.62+.38*Math.max(0,v);R[C*3]=T[0]*G,R[C*3+1]=T[1]*G,R[C*3+2]=T[2]*G}l={position:P.position,normal:P.normal,color:R,floor:new Float32Array(F).fill(-2),material:new Float32Array(F),count:F}}}let c=new Map;for(let P of o)for(let F of P.objects)c.set(F.id,P.index),F.type==="section"&&c.set(F.logicalSectionId??F.id,P.index);let f=i.map(P=>c.get(P.sectionId??"")??c.get(P.rowId??"")??0),m=mn(o,i);ye(s,o,i,f,m,r);let u=vn(n,i),h=new Map,b=new Map;for(let P of n.categories??[])h.set(P.key,P.color),P.seatGlyph&&b.set(P.key,P.seatGlyph);let p=[],d=fe(o,i,f),y=new Float32Array(i.length),x=[];for(let P=0;P<o.length;P++){let F=o[P];s.setFloor(P);let R=new zt,T=[],C=F.objects.filter(v=>v.type==="section"&&!!v.outline&&v.outline.length>=3);for(let v of F.objects)if(v.type==="section"){let G=s.vertexCount;be(s,v,F,kn(v,u),d.bySection.get(v.id),R,C,r);let X=s.vertexCount-G;X>0&&x.push({sectionId:v.id,start:G,count:X})}else if(v.type==="shape"){let G=a.byObjectId.get(v.id);s.setMaterial((G?.kind??v.role)==="screen"?1:0),ee(s,v,F.baseHeightM,qn(v,T),r,F.focal,p,G),s.setMaterial(0)}else v.type==="gaArea"?re(s,v,F.baseHeightM,H(h.get(v.categoryKey)),r):v.type==="booth"?te(s,v,F.baseHeightM,H(h.get(v.categoryKey)),r):v.type==="table"?ne(s,v,F.baseHeightM,H(v.fill??n.theme?.decorFill??"#232c40"),r):v.type==="decorImage"&&oe(s,v,F.baseHeightM,r);pe(s,F,i,d,r,e.materials.shell,!l)}let w=o.length>1?{x:o.reduce((P,F)=>P+F.focal.x,0)/o.length,y:o.reduce((P,F)=>P+F.focal.y,0)/o.length}:n.focalPoint??{x:(m.minX+m.maxX)/2,y:(m.minY+m.maxY)/2},A=Tn(l?[s.build(),l]:[s.build()]),E=Fn(i,t.initialState,d,y,h,b),M=se({doc:n,units:o,seats:i,surfaces:d,focal:w}),{labels:I,sections:B,rows:k}=ae({doc:n,units:o,seats:i,surfaces:d,seatData:E,hintedSeatFloor:f,zones:M,focal:w}),D=de({doc:n,units:o,seats:i,surfaces:d,solids:A,hintedSeatFloor:f,seatFloor:y});ce(I,D),E.iYaw=Cn(E.iPosition,i.length,P=>i[P].rowId,P=>{let F=o[y[P]]?.focal??w;return[F.x*g,F.y*g]});let U=(m.minX+m.maxX)/2*g,S=(m.minY+m.maxY)/2*g,_=.5*Math.hypot((m.maxX-m.minX)*g,(m.maxY-m.minY)*g)||10,N=xe(A,E,{cx:U,cz:S,radius:_}),O=ge(E,p,m,N.minY,N.maxY,_);return{solids:A,sectionSolidRanges:x,seats:E,bounds:{center:[(O.min[0]+O.max[0])/2,(O.min[1]+O.max[1])/2,(O.min[2]+O.max[2])/2],radius:_,groundY:0,box:O},renderBounds:{center:N.center,radius:N.radius},stateColorLUT:le(e,Bt),theme:e,seatCount:i.length,focalWorld:[w.x*g,1.5,w.y*g],zones:M,stages:p,productionElements:a.elements,sections:B,rows:k,labels:I,floors:D}}export{Bt as a,Qt as b,mr as c,nn as d,g as e,hr as f,Ge as g,Ne as h,br as i,Vt as j,Ar as k,Pr as l,_r as m,Tr as n,Br as o,Er as p,Cr as q,Fr as r,vr as s,kr as t,Or as u,Lr as v,Bo as w,As as x};
|
|
1
|
+
import{a as Pn,c as In,d as wn}from"./chunk-U7CVRE4P.js";import{a as Sn}from"./chunk-QJXSZT3H.js";import{a as Rn,c as Nt,d as ft,f as It,i as An}from"./chunk-M5X6G7FD.js";import{f as hn}from"./chunk-F2EXXZSZ.js";import{e as gn,l as Mn}from"./chunk-4N5CHKHD.js";import{B as pn,C as At,Ja as qt,ba as ut,ca as lt,j as bn,la as Gt,na as dn,oa as Dt,qa as yn,ua as xn}from"./chunk-F7TP67LK.js";import{A as Pt,d as H,y as nt}from"./chunk-JBOTRSMY.js";import Ae from"earcut";import Pe from"polygon-clipping";var g=ut,Ie=.002;function we(t,n,e){let r=Math.hypot(n[0]-t[0],n[1]-t[1],n[2]-t[2]),o=Math.hypot(e[0]-n[0],e[1]-n[1],e[2]-n[2]),a=Math.hypot(t[0]-e[0],t[1]-e[1],t[2]-e[2]),i=Math.max(r,o,a);if(i<1e-9)return!0;let s=(r+o+a)/2;return 2*Math.sqrt(Math.max(0,s*(s-r)*(s-o)*(s-a)))/i<Ie}var ht=class{constructor(n=16384){this.len=0;this.buf=new Float32Array(n)}push3(n,e,r){this.len+3>this.buf.length&&this.grow(this.len+3),this.buf[this.len++]=n,this.buf[this.len++]=e,this.buf[this.len++]=r}push1(n){this.len+1>this.buf.length&&this.grow(this.len+1),this.buf[this.len++]=n}grow(n){let e=this.buf.length*2;for(;e<n;)e*=2;let r=new Float32Array(e);r.set(this.buf.subarray(0,this.len)),this.buf=r}get length(){return this.len}toArray(){return this.buf.slice(0,this.len)}},Yt=class{constructor(){this.pos=new ht;this.nor=new ht;this.col=new ht;this.flr=new ht;this.mat=new ht;this.currentFloor=0;this.currentMaterial=0}setFloor(n){this.currentFloor=n}setMaterial(n){this.currentMaterial=n}tri(n,e,r,o,a,i=a,s=a){we(n,e,r)||(this.pos.push3(n[0],n[1],n[2]),this.pos.push3(e[0],e[1],e[2]),this.pos.push3(r[0],r[1],r[2]),this.nor.push3(o[0],o[1],o[2]),this.nor.push3(o[0],o[1],o[2]),this.nor.push3(o[0],o[1],o[2]),this.col.push3(a[0],a[1],a[2]),this.col.push3(i[0],i[1],i[2]),this.col.push3(s[0],s[1],s[2]),this.flr.push1(this.currentFloor),this.flr.push1(this.currentFloor),this.flr.push1(this.currentFloor),this.mat.push1(this.currentMaterial),this.mat.push1(this.currentMaterial),this.mat.push1(this.currentMaterial))}triN(n,e,r,o,a,i,s,l=s,c=s){[...n,...e,...r].every(Number.isFinite)&&(this.pos.push3(n[0],n[1],n[2]),this.pos.push3(e[0],e[1],e[2]),this.pos.push3(r[0],r[1],r[2]),this.nor.push3(o[0],o[1],o[2]),this.nor.push3(a[0],a[1],a[2]),this.nor.push3(i[0],i[1],i[2]),this.col.push3(s[0],s[1],s[2]),this.col.push3(l[0],l[1],l[2]),this.col.push3(c[0],c[1],c[2]),this.flr.push1(this.currentFloor),this.flr.push1(this.currentFloor),this.flr.push1(this.currentFloor),this.mat.push1(this.currentMaterial),this.mat.push1(this.currentMaterial),this.mat.push1(this.currentMaterial))}get vertexCount(){return this.pos.length/3}build(){return{position:this.pos.toArray(),normal:this.nor.toArray(),color:this.col.toArray(),floor:this.flr.toArray(),material:this.mat.toArray(),count:this.pos.length/3}}};function _e(t,n,e){let r=n[0]-t[0],o=n[1]-t[1],a=n[2]-t[2],i=e[0]-t[0],s=e[1]-t[1],l=e[2]-t[2],c=o*l-a*s,f=a*i-r*l,m=r*s-o*i,u=Math.hypot(c,f,m)||1;return c/=u,f/=u,m/=u,[c,f,m]}function Te(t,n){let e=[...t],r=[];for(let i of t)r.push(i.x,i.y);let o=[];if(n){for(let i of n)if(!(i.length<3)){o.push(e.length);for(let s of i)e.push(s),r.push(s.x,s.y)}}let a=Ae(r,o.length?o:void 0,2);return{pts:e,tris:a}}function Jt(t){return ft(t)<0?[...t].reverse():t}var Be=3;function Ee(t,n,e,r){let o=r(t),a=r(n),i=r(e),s=(h,b,p,d)=>Math.abs(r({x:(h.x+b.x)/2,y:(h.y+b.y)/2})-(p+d)/2),l=(t.x+n.x+e.x)/3,c=(t.y+n.y+e.y)/3,f=(o+a+i)/3,m=Math.max(s(t,n,o,a),s(n,e,a,i),s(e,t,i,o),Math.abs(r({x:l,y:c})-f)),u=(h,b,p)=>{let d=Math.abs(r({x:(h+l)/2,y:(b+c)/2})-(p+f)/2);d>m&&(m=d)};return u((t.x+n.x)/2,(t.y+n.y)/2,(o+a)/2),u((n.x+e.x)/2,(n.y+e.y)/2,(a+i)/2),u((e.x+t.x)/2,(e.y+t.y)/2,(i+o)/2),m}function wt(t,n,e,r,o){if(o<=0)return Ee(t,n,e,r);let a={x:(t.x+n.x)/2,y:(t.y+n.y)/2},i={x:(n.x+e.x)/2,y:(n.y+e.y)/2},s={x:(e.x+t.x)/2,y:(e.y+t.y)/2};return Math.max(wt(t,a,s,r,o-1),wt(a,n,i,r,o-1),wt(s,i,e,r,o-1),wt(a,i,s,r,o-1))}function _t(t,n,e,r,o,a,i,s){if(i>0){let u={x:(n.x+e.x)/2,y:(n.y+e.y)/2},h={x:(e.x+r.x)/2,y:(e.y+r.y)/2},b={x:(r.x+n.x)/2,y:(r.y+n.y)/2};_t(t,n,u,b,o,a,i-1,s),_t(t,u,e,h,o,a,i-1,s),_t(t,b,h,r,o,a,i-1,s),_t(t,u,h,b,o,a,i-1,s);return}let l=[n.x*g,o(n),n.y*g],c=[e.x*g,o(e),e.y*g],f=[r.x*g,o(r),r.y*g];if(s){t.triN(l,c,f,s(n),s(e),s(r),a);return}let m=_e(l,c,f);m[1]<0&&(m=[-m[0],-m[1],-m[2]]),t.tri(l,c,f,m,a)}var Ce=8;function _n(t,n,e){if(!Number.isFinite(e))return t;let r=[],o=(a,i,s,l,c)=>{if(c>0){let f={x:(a.x+i.x)/2,y:(a.y+i.y)/2},m=n(f);if(Math.abs(m-(s+l)/2)>e){o(a,f,s,m,c-1),o(f,i,m,l,c-1);return}}r.push(a)};for(let a=0;a<t.length;a++){let i=t[a],s=t[(a+1)%t.length];o(i,s,n(i),n(s),Ce)}return r}function Xt(t,n){if(t.length<3)return t;let e=[];for(let o of t){let a=e[e.length-1];a&&Math.hypot(o.x-a.x,o.y-a.y)<n||e.push(o)}for(;e.length>2&&Math.hypot(e[0].x-e[e.length-1].x,e[0].y-e[e.length-1].y)<n;)e.pop();if(e.length<3)return t;let r=[];for(let o=0;o<e.length;o++){let a=r.length?r[r.length-1]:e[(o-1+e.length)%e.length],i=e[o],s=e[(o+1)%e.length],l=s.x-a.x,c=s.y-a.y,f=Math.hypot(l,c);f>n&&Math.abs((i.x-a.x)*c-(i.y-a.y)*l)/f<n||r.push(i)}return r.length>=3?r:e}var Ut=.001*lt*.1;function K(t,n,e,r,o,a,i,s,l=1/0,c){if(!n||n.length<3||(l===void 0&&(l=1/0),Math.abs(ft(n))<1e-4))return;let f=Xt(_n(Xt(Jt(n),Ut),r,l),Ut),m=e?.map(M=>Xt(_n(Xt(Jt(M),Ut),r,l),Ut)).filter(M=>M.length>=3&&Math.abs(ft(M))>=1e-4),{pts:u,tris:h}=Te(f,m),b=[a[0]*s.top,a[1]*s.top,a[2]*s.top],p=[a[0]*s.bottomCap,a[1]*s.bottomCap,a[2]*s.bottomCap],d=[i[0]*s.top,i[1]*s.top,i[2]*s.top],y=[i[0]*s.wallBottom,i[1]*s.wallBottom,i[2]*s.wallBottom],x=0;if(Number.isFinite(l))for(;x<Be;x++){let M=0;for(let I=0;I<h.length;I+=3){let B=wt(u[h[I]],u[h[I+1]],u[h[I+2]],r,x);B>M&&(M=B)}if(M<=l)break}for(let M=0;M<h.length;M+=3){let I=u[h[M]],B=u[h[M+1]],k=u[h[M+2]];_t(t,I,B,k,r,b,x,c);let D=[I.x*g,o,I.y*g],U=[B.x*g,o,B.y*g],S=[k.x*g,o,k.y*g];t.tri(D,S,U,[0,-1,0],p)}let w=M=>{if(x<=0)return M;let I=1<<x,B=[];for(let k=0;k<M.length;k++){let D=M[k],U=M[(k+1)%M.length];for(let S=0;S<I;S++){let _=S/I;B.push({x:D.x+(U.x-D.x)*_,y:D.y+(U.y-D.y)*_})}}return B},A=pn(f),E=[{ring:w(f),flip:!1}];if(m)for(let M of m)M.length>=3&&E.push({ring:w(M),flip:!0});for(let{ring:M,flip:I}of E)for(let B=0;B<M.length;B++){let k=M[B],D=M[(B+1)%M.length],U=(D.x-k.x)*g,_=(D.y-k.y)*g,N=-U,O=Math.hypot(_,N)||1;_/=O,N/=O;let P=(k.x+D.x)/2-A.x,F=(k.y+D.y)/2-A.y,R=_*P+N*F;I&&(R=-R),R<0&&(_=-_,N=-N);let T=[_,0,N],C=[k.x*g,r(k),k.y*g],v=[D.x*g,r(D),D.y*g],G=[k.x*g,o,k.y*g],X=[D.x*g,o,D.y*g];t.tri(C,v,X,T,d,d,y),t.tri(C,X,G,T,d,y,y)}}function Tn(t){let n=0;for(let l of t)n+=l.count;let e=new Float32Array(n*3),r=new Float32Array(n*3),o=new Float32Array(n*3),a=new Float32Array(n),i=new Float32Array(n),s=0;for(let l of t)e.set(l.position,s*3),r.set(l.normal,s*3),o.set(l.color,s*3),a.set(l.floor,s),i.set(l.material,s),s+=l.count;return{position:e,normal:r,color:o,floor:a,material:i,count:n}}function jt(t,n,e=2.5){if(n<=0||t.length<3)return t;let r=Jt(t),o=r.length,a=[];for(let s=0;s<o;s++){let l=r[s],c=r[(s+1)%o],f=c.x-l.x,m=c.y-l.y,u=Math.hypot(f,m)||1;a.push({x:m/u,y:-f/u})}let i=[];for(let s=0;s<o;s++){let l=r[s],c=a[(s-1+o)%o],f=a[s],m=c.x+f.x,u=c.y+f.y,h=Math.hypot(m,u),b=()=>{i.push([l.x+c.x*n,l.y+c.y*n]),i.push([l.x+f.x*n,l.y+f.y*n])};if(h<1e-9){b();continue}m/=h,u/=h;let p=m*c.x+u*c.y,d=1/Math.max(p,1e-6);if(!Number.isFinite(d)||d>e){b();continue}i.push([l.x+m*n*d,l.y+u*n*d])}if(i.length<3)return t;try{let s=Pe.union([[...i,i[0]]]),l=null,c=-1/0;for(let m of s){let u=Math.abs(ft(m[0].map(([h,b])=>({x:h,y:b}))));u>c&&(c=u,l=m[0])}if(!l)return t;let f=l.map(([m,u])=>({x:m,y:u}));if(f.length>1){let m=f[0],u=f[f.length-1];Math.abs(m.x-u.x)<1e-9&&Math.abs(m.y-u.y)<1e-9&&f.pop()}return f.length>=3?f:t}catch{return t}}function Ht(t,n,e,r,o=28){let a=[];for(let i=0;i<o;i++){let s=i/o*Math.PI*2;a.push({x:t+e*Math.cos(s),y:n+r*Math.sin(s)})}return a}function Tt(t,n,e,r){return[{x:t,y:n},{x:t+e,y:n},{x:t+e,y:n+r},{x:t,y:n+r}]}var Bt=["available","held","sold","selected","dimmed"];function Qt(t){let n=Bt.indexOf(t);return n<0?0:n}var Bn={available:[.24,.82,.52],held:[.95,.66,.22],sold:[.34,.39,.45],selected:[.24,.74,1],dimmed:[.28,.32,.37]};function mr(t){let n=.2126*t[0]+.7152*t[1]+.0722*t[2],e=.42,r=.62;return[(n+(t[0]-n)*e)*r,(n+(t[1]-n)*e)*r,(n+(t[2]-n)*e)*r]}var tn={ground:[.07,.085,.11],tierTop:[.24,.28,.34],tierWall:[.17,.2,.25],stageTop:[.94,.7,.38],stageWall:[.48,.33,.18],decorTop:[.22,.25,.29],decorWall:[.15,.17,.2],gaTop:[.24,.28,.33],gaWall:[.16,.19,.23],boothTop:[.3,.33,.38],boothWall:[.2,.23,.27],tableTop:[.38,.34,.29],tableWall:[.24,.21,.18]},nn={top:[.05,.06,.08],bottom:[.1,.12,.15]};function et(t,n){return[Math.min(1,t[0]*n),Math.min(1,t[1]*n),Math.min(1,t[2]*n)]}var V={pedestal:0,pad:1,back:2,arm:3,footrest:4,leg:5,body:10,head:11},Fe=.44,ve=.15,ke=.3,Oe=.24;function En(t){return t===void 0||!Number.isFinite(t)||t<=0?Oe:Math.min(ke,Math.max(ve,t*Fe))}var hr=.21,Le=.05,en=.45,Ge=en+Le,De=.92,Ne=1.205,Xe=-.23,Ue=.38,Ye=[{part:V.pedestal,min:[-.3,0,-.3],max:[.3,.36,.3]},{part:V.pad,min:[-1,.36,-.95],max:[1,en,1]},{part:V.back,min:[-1,Ge,-1],max:[1,De,-.72]},{part:V.arm,min:[-1,.44,-.82],max:[-.78,.65,.78]},{part:V.arm,min:[.78,.44,-.82],max:[1,.65,.78]},{part:V.footrest,min:[-.9,.18,.78],max:[.9,.31,1.34]},{part:V.leg,min:[-.82,0,-.7],max:[-.62,.37,-.48]},{part:V.leg,min:[.62,0,-.7],max:[.82,.37,-.48]},{part:V.leg,min:[-.82,0,.48],max:[-.62,.37,.7]},{part:V.leg,min:[.62,0,.48],max:[.82,.37,.7]}],je=[{part:V.body,min:[-.52,.39,-.08],max:[-.08,.55,.82]},{part:V.body,min:[.08,.39,-.08],max:[.52,.55,.82]},{part:V.body,min:[-.47,.05,.58],max:[-.13,.43,.82]},{part:V.body,min:[.13,.05,.58],max:[.47,.43,.82]},{part:V.head,min:[-.16,1.04,-.33],max:[.16,1.1,-.13]}],He=[{n:[1,0,0],c:[[1,0,0],[1,1,0],[1,1,1],[1,0,1]]},{n:[-1,0,0],c:[[0,0,1],[0,1,1],[0,1,0],[0,0,0]]},{n:[0,1,0],c:[[0,1,0],[0,1,1],[1,1,1],[1,1,0]]},{n:[0,-1,0],c:[[0,0,1],[0,0,0],[1,0,0],[1,0,1]]},{n:[0,0,1],c:[[0,0,1],[1,0,1],[1,1,1],[0,1,1]]},{n:[0,0,-1],c:[[1,0,0],[0,0,0],[0,1,0],[1,1,0]]}];function br(){let t=[],n=[],e=[],r=[],o=(O,P,F)=>{let R=e.length,[T,C,v]=O,G=[C[0]-T[0],C[1]-T[1],C[2]-T[2]],X=[v[0]-T[0],v[1]-T[1],v[2]-T[2]],L=G[1]*X[2]-G[2]*X[1],Y=G[2]*X[0]-G[0]*X[2],j=G[0]*X[1]-G[1]*X[0],$=Math.hypot(L,Y,j);$>1e-9?(L/=$,Y/=$,j/=$):[L,Y,j]=P,L*P[0]+Y*P[1]+j*P[2]<0&&(L=-L,Y=-Y,j=-j);for(let z of O)t.push(...z),n.push(L,Y,j),e.push(F);r.push(R,R+1,R+2,R,R+2,R+3)},a=O=>{for(let P of He){let F=P.c.map(R=>R.map((T,C)=>T?O.max[C]:O.min[C]));o(F,P.n,O.part)}};for(let O of Ye)a(O);for(let O of je)a(O);let i=en,s=1.08,l=.47,c=.69,f=-.55,m=.08,u=-.48,h=.01,b=[-l,i,f],p=[l,i,f],d=[-l,i,m],y=[l,i,m],x=[-c,s,u],w=[c,s,u],A=[-c,s,h],E=[c,s,h];o([p,w,E,y],[1,0,0],V.body),o([d,A,x,b],[-1,0,0],V.body),o([A,E,w,x],[0,1,0],V.body),o([b,p,y,d],[0,-1,0],V.body),o([y,E,A,d],[0,0,1],V.body),o([b,x,w,p],[0,0,-1],V.body);let M=10,I=8,B=[0,Ne,Xe],k=[.42,.115,Ue],D=e.length;for(let O=0;O<=I;O++){let P=Math.PI*O/I,F=Math.cos(P),R=Math.sin(P);for(let T=0;T<=M;T++){let C=Math.PI*2*T/M,v=R*Math.cos(C),G=R*Math.sin(C);t.push(B[0]+k[0]*v,B[1]+k[1]*F,B[2]+k[2]*G);let X=v/k[0],L=F/k[1],Y=G/k[2],j=Math.hypot(X,L,Y)||1;X/=j,L/=j,Y/=j,n.push(X,L,Y),e.push(V.head)}}for(let O=0;O<I;O++)for(let P=0;P<M;P++){let F=D+O*(M+1)+P,R=F+M+1;r.push(F,R,F+1,F+1,R,R+1)}let U=new Float32Array(t),S=new Float32Array(n),_=new Float32Array(e),N=new Uint16Array(r);return{position:U,normal:S,part:_,index:N,vertexCount:e.length,indexCount:r.length}}function Cn(t,n,e,r){let o=new Float32Array(n),a=c=>t[c*3],i=c=>t[c*3+2],s=0,l=(c,f)=>{let m=f-c;for(let u=c;u<f;u++){let[h,b]=r(u),p=h-a(u),d=b-i(u);if(m>=2){let y=Math.max(c,u-1),x=Math.min(f-1,u+1),w=a(x)-a(y),A=i(x)-i(y),E=Math.hypot(w,A);if(E>1e-6){let M=-A/E,I=w/E;M*p+I*d<0&&(M=-M,I=-I),p=M,d=I}}o[u]=p===0&&d===0?0:Math.atan2(p,d)}};for(let c=1;c<=n;c++)(c===n||e(c)!==e(s))&&(l(s,c),s=c);return o}var Vt=.22;function Ar(t,n){let e=Bt[t];if(e!=="sold"&&e!=="held")return-1;let r=(n+1)*2654435761;return r^=r>>>15,r=Math.imul(r,2246822519),r^=r>>>13,(r>>>0)%1e5/1e5}var Ve=.42;function We(t){let n=t.length,e=new Float64Array(n);if(n<2)return e.fill(1/0),e;let r=1/0,o=1/0,a=-1/0,i=-1/0;for(let b of t)b.x<r&&(r=b.x),b.y<o&&(o=b.y),b.x>a&&(a=b.x),b.y>i&&(i=b.y);let s=Math.max(a-r,1e-6),l=Math.max(i-o,1e-6),c=Math.max(Math.sqrt(s*l/n),1e-6),f=Math.max(1,Math.ceil(s/c)+1),m=Math.max(1,Math.ceil(l/c)+1),u=new Map,h=(b,p)=>{let d=Math.min(f-1,Math.max(0,Math.floor((b-r)/c)));return Math.min(m-1,Math.max(0,Math.floor((p-o)/c)))*f+d};for(let b=0;b<n;b++){let p=h(t[b].x,t[b].y),d=u.get(p);d?d.push(b):u.set(p,[b])}for(let b=0;b<n;b++){let p=t[b],d=Math.min(f-1,Math.max(0,Math.floor((p.x-r)/c))),y=Math.min(m-1,Math.max(0,Math.floor((p.y-o)/c))),x=1/0;for(let w=1;w<=4;w++){for(let A=y-w;A<=y+w;A++)if(!(A<0||A>=m))for(let E=d-w;E<=d+w;E++){if(E<0||E>=f||w>1&&Math.abs(A-y)<w&&Math.abs(E-d)<w)continue;let M=u.get(A*f+E);if(M)for(let I of M){if(I===b)continue;let B=Math.hypot(t[I].x-p.x,t[I].y-p.y);B<x&&(x=B)}}if(Number.isFinite(x)&&x<=w*c)break}e[b]=x}return e}function ze(t){let n=t.eyeHeightM;return Number.isFinite(n)?Math.max(0,n-Gt):0}function Fn(t,n,e,r,o,a){let i=t.length,s=new Float32Array(i*3),l=new Float32Array(i),c=new Float32Array(i*3),f=new Float32Array(i),m=new Float32Array(i),u=new Float32Array(i),h=new Float32Array(i),b=new Float32Array(i*3),p=new Map,d=We(t);for(let y=0;y<i;y++){let x=t[y],A=(e?.seatPitchU(y)??d[y])*g;f[y]=Number.isFinite(A)?Math.max(.06,Math.min(Vt,A*Ve)):Vt,m[y]=En(Number.isFinite(A)?A:void 0);let E=Mn(x.glyph,{seatGlyph:a?.get(x.categoryKey)});u[y]=gn.indexOf(E),h[y]=x.wheelchairSpaceType==="no-seat"?0:1,s[y*3]=x.x*g,s[y*3+1]=e?e.seatDeckY(y):ze(x),s[y*3+2]=x.y*g,l[y]=Qt(n?n(x):"available");let M=H(o?.get(x.categoryKey)??"#6e7bff")??[.43,.48,1];if(c[y*3]=M[0],c[y*3+1]=M[1],c[y*3+2]=M[2],x.accessibility?.length){let I=H(hn(x.accessibility));I&&(b[y*3]=I[0],b[y*3+1]=I[1],b[y*3+2]=I[2])}p.set(x.id,y)}return{count:i,iPosition:s,iState:l,iCategory:c,iMaxRadius:f,iRing:b,idToIndex:p,iChairWidth:m,iGlyph:u,iPhysicalSeat:h,iFloor:r??new Float32Array(i),iYaw:new Float32Array(i)}}var Ze=64;function Pr(t,n){let e=[];for(let i of n){let s=t.idToIndex.get(i.seatId);if(s===void 0)continue;let l=Qt(i.state);t.iState[s]!==l&&(t.iState[s]=l,e.push(s))}if(!e.length)return[];e.sort((i,s)=>i-s);let r=[],o=e[0],a=e[0];for(let i=1;i<e.length;i++){let s=e[i];if(s!==a){if(s<=a+Ze){a=s;continue}r.push({start:o,length:a-o+1}),o=s,a=s}}return r.push({start:o,length:a-o+1}),r}function _r(t,n,e){return e<0?n>1?t.filter(r=>r.kind==="floor"):[...t]:t.filter(r=>r.floorIndex===void 0||r.floorIndex===e)}function Tr(t,n){let e=[...t].sort((o,a)=>o.screen.y-a.screen.y),r=[];for(let o of e){let a=r.find(i=>i.some(s=>Math.abs(s.screen.x-o.screen.x)<104&&Math.abs(s.screen.y-o.screen.y)<34));a?a.push(o):r.push([o])}return r.flatMap(o=>o.length<2?o:o.map((a,i)=>({...a,screen:{...a.screen,x:Math.max(54,Math.min(n-54,a.screen.x+(i-(o.length-1)/2)*104))}})))}var Ke=1.15,$e=2.75,qe=4.5,Je=.85,Qe=.5,to=.26;function Br(t,n,e){let r=Math.max(1e-6,n),o=t/r,a=e?.hasZoneLabels??!0,i=new Set;return o>=.75&&i.add("floor"),o>=Ke&&i.add("zone"),o<=(a?$e:qe)&&(i.add("section"),i.add("ga")),o<=Je&&(i.add("annotation"),i.add("booth")),o<=Qe&&i.add("row"),o<=to&&i.add("seat"),i}function Er(t,n,e,r,o,a=6){let i=a+n,s=r-a-n,l=a+e,c=o-a-e;return{...t,x:i>s?r/2:Math.max(i,Math.min(s,t.x)),y:l>c?o/2:Math.max(l,Math.min(c,t.y))}}function Cr(t,n,e,r){let o=t,a=n[0],i=n[1],s=n[2],l=o[0]*a+o[4]*i+o[8]*s+o[12],c=o[1]*a+o[5]*i+o[9]*s+o[13],f=o[2]*a+o[6]*i+o[10]*s+o[14],m=o[3]*a+o[7]*i+o[11]*s+o[15];if(!(m>1e-6))return{x:0,y:0,depth:1/0,visible:!1};let u=l/m,h=c/m,b=f/m,p=u>=-1.05&&u<=1.05&&h>=-1.05&&h<=1.05&&b<=1;return{x:(u*.5+.5)*e,y:(1-(h*.5+.5))*r,depth:b,visible:p}}function Fr(t,n,e=n){let r=[],o=[...t].sort((a,i)=>a.screen.depth-i.screen.depth);for(let a of o){let i=!1;for(let s of r)if(on(a,s,n,e)){i=!0;break}i||r.push(a)}return r}var no=6;function on(t,n,e,r){let o=Math.abs(t.screen.x-n.screen.x),a=Math.abs(t.screen.y-n.screen.y),i=t.halfWidth!=null&&n.halfWidth!=null?Math.max(e,t.halfWidth+n.halfWidth+no):e;return o<i&&a<r}function vr(t,n,e){return t.length*n*.58+(e?14:0)}var eo={row:8,seat:14};function kr(t){return t<480?{row:5,seat:8}:t<768?{row:6,seat:10}:eo}function Or(t,n,e,r){let o=Math.max(1,Math.min(e,r)*.5),a=Math.min(2,Math.hypot(t.x-e/2,t.y-r/2)/o);return n*(1+1.5*a)}function Lr(t,n,e,r,o=[]){let a=[...t].sort((s,l)=>(l.priority??0)-(s.priority??0)||s.focus-l.focus),i=[];for(let s of a){if(i.length>=r)break;let l=!1;for(let c of o)if(on(s,c,n,e)){l=!0;break}if(!l){for(let c of i)if(on(s,c,n,e)){l=!0;break}}l||i.push(s)}return i}import bo from"polygon-clipping";var W={top:1,wallBottom:.5,bottomCap:.4};function st(t,n){if(!t)return n;let e=et(Pt(t,.4),.62);return nt(n,e,.72)}function vn(t,n){let e=new Map;for(let a of t.categories??[])e.set(a.key,a.color);let r=new Map;for(let a of n){if(!a.sectionId)continue;let i=r.get(a.sectionId);i||(i=new Map,r.set(a.sectionId,i)),i.set(a.categoryKey,(i.get(a.categoryKey)??0)+1)}let o=new Map;for(let[a,i]of r){let s=0,l=0,c=0,f=0;for(let[m,u]of i){let h=H(e.get(m));h&&(s+=h[0]*u,l+=h[1]*u,c+=h[2]*u,f+=u)}f>0&&o.set(a,[s/f,l/f,c/f])}return o}function kn(t,n){return H(t.color)??n.get(t.logicalSectionId??t.id)??null}import zn from"polygon-clipping";import Dn from"polygon-clipping";import oo from"earcut";var ro=.58,On=.01,ot=Vt*1.5*lt,io=.5,so=.6;function ao(t,n){let e=t.length,r=[];for(let i=0;i<e;i++){let s=t[Math.max(0,i-1)],l=t[Math.min(e-1,i+1)],c=l.x-s.x,f=l.y-s.y,m=Math.hypot(c,f);if(m<1e-9){r.push([0,0]);continue}c/=m,f/=m,r.push([-f,c])}let o=0;for(let i=0;i<e;i++)o+=(t[i].x-n.x)*r[i][0]+(t[i].y-n.y)*r[i][1];return o<0?r.map(([i,s])=>[-i,-s]):r}function co(t,n){if(t.length<2||n<=0)return[...t];let e=[...t],r=(i,s)=>{let l=s.x-i.x,c=s.y-i.y,f=Math.hypot(l,c)||1;return{x:l/f,y:c/f}},o=r(e[1],e[0]),a=r(e[e.length-2],e[e.length-1]);return e.unshift({x:e[0].x+o.x*n,y:e[0].y+o.y*n}),e.push({x:e[e.length-1].x+a.x*n,y:e[e.length-1].y+a.y*n}),e}var Ln=Math.PI/12;function uo(t){if(t.length<3)return[...t];let n=[...t].sort((a,i)=>a.x-i.x||a.y-i.y),e=(a,i,s)=>(i.x-a.x)*(s.y-a.y)-(i.y-a.y)*(s.x-a.x),r=a=>{let i=[];for(let s of a){for(;i.length>=2&&e(i[i.length-2],i[i.length-1],s)<=0;)i.pop();i.push(s)}return i.pop(),i},o=[...r(n),...r([...n].reverse())];return o.length>=3?o:[...t]}function Nn(t,n){if(!t.length||!(n>0))return[];let e=uo(t),r=(s,l,c,f)=>{let m=c-l;for(;m<0;)m+=Math.PI*2;for(;m>Math.PI*2;)m-=Math.PI*2;let u=Math.max(1,Math.ceil(m/Ln)),h=n/Math.cos(m/u/2);for(let b=0;b<=u;b++){let p=l+m*b/u;f.push({x:s.x+Math.cos(p)*h,y:s.y+Math.sin(p)*h})}};if(e.length<3){let s=0,l=0;for(let h of e)s+=h.x,l+=h.y;s/=e.length||1,l/=e.length||1;let c=0;for(let h of e)c=Math.max(c,Math.hypot(h.x-s,h.y-l));let f=[],m=Math.max(3,Math.ceil(Math.PI*2/Ln)),u=(c+n)/Math.cos(Math.PI/m);for(let h=0;h<m;h++){let b=h/m*Math.PI*2;f.push({x:s+Math.cos(b)*u,y:l+Math.sin(b)*u})}return f}let o=e.length,a=[];for(let s=0;s<o;s++){let l=e[s],c=e[(s+1)%o];a.push(Math.atan2(-(c.x-l.x),c.y-l.y))}let i=[];for(let s=0;s<o;s++)r(e[s],a[(s+o-1)%o],a[s],i);return Hn(i)}function lo(t,n,e){if(t.length===1)return Math.hypot(n-t[0].x,e-t[0].y);let r=1/0;for(let o=0;o+1<t.length;o++){let a=t[o],i=t[o+1],s=i.x-a.x,l=i.y-a.y,c=s*s+l*l,f=c>1e-12?((n-a.x)*s+(e-a.y)*l)/c:0;f<0?f=0:f>1&&(f=1);let m=Math.hypot(n-(a.x+f*s),e-(a.y+f*l));m<r&&(r=m)}return r}function Wt(t){let n=t.map(o=>{let a=0,i=0;for(let c of o.pts)a+=c.x,i+=c.y;let s=o.pts.length||1;a/=s,i/=s;let l=0;for(let c of o.pts){let f=Math.hypot(c.x-a,c.y-i);f>l&&(l=f)}return{cx:a,cy:i,rad:l}}),e=o=>{let a=o.length;return a<=2?[...o]:[o[Math.floor(a*.25)],o[Math.floor(a*.5)],o[Math.floor(a*.75)]]},r=[];for(let o=0;o<t.length;o++){let a=e(t[o].pts),i=[],s=1/0,l=null;for(let f of a){let m=1/0;for(let u=0;u<t.length;u++){if(u===o||Math.abs(t[u].y-t[o].y)<.001)continue;let h=n[u],b=Math.hypot(f.x-h.cx,f.y-h.cy)-h.rad;if(b>=m&&b>=s)continue;let p=lo(t[u].pts,f.x,f.y);p<m&&(m=p),t[u].depth<t[o].depth&&p<s&&(s=p,l=t[u].y)}Number.isFinite(m)&&m>0&&i.push(m)}i.sort((f,m)=>f-m);let c=i.length?i[Math.floor(i.length/2)]:1;r.push({pitch:c,belowY:l})}return r}function Xn(t,n,e,r){let o=t[n],a=o.pts.length>=2?[...o.pts]:o.pts.length===1?(()=>{let f=o.pts[0],m=f.x-r.x,u=f.y-r.y,h=Math.hypot(m,u)||1;m/=h,u/=h;let b=Math.max(e[n].pitch,.001)*.5;return[{x:f.x+u*b,y:f.y-m*b},{x:f.x-u*b,y:f.y+m*b}]})():[];if(a.length<2)return null;let i=0,s=0;for(let f=1;f<a.length;f++){let m=Math.hypot(a[f].x-a[f-1].x,a[f].y-a[f-1].y);m>1e-6&&(i+=m,s++)}let l=s>0?i/s:0,c=co(a,Math.max(l*so,ot));return{pts:c,nrm:ao(c,r),front:Math.max(e[n].pitch*ro,ot),back:Math.max(e[n].pitch*io,ot)}}var gt=1.5,Un=.3;function rn(t,n){if(t.length<3)return t;let e=t[0],r=t[t.length-1],o=r.x-e.x,a=r.y-e.y,i=Math.hypot(o,a),s=-1,l=-1;for(let m=1;m<t.length-1;m++){let u=t[m],h=i>1e-12?Math.abs((u.x-e.x)*a-(u.y-e.y)*o)/i:Math.hypot(u.x-e.x,u.y-e.y);h>s&&(s=h,l=m)}if(s<=n||l<0)return[e,r];let c=rn(t.slice(0,l+1),n),f=rn(t.slice(l),n);return[...c.slice(0,-1),...f]}function Yn(t,n){if(t.length<4)return t;let e=rn([...t,t[0]],n);return e.pop(),e.length>=3?e:t}function jn(t,n,e){if(t.length<2)return[];let r=e??Wt(t),o=new Map;for(let i=0;i<t.length;i++){let s=o.get(t[i].blockId);s?s.push(i):o.set(t[i].blockId,[i])}let a=[];for(let[,i]of o){let s=[];for(let x of i){let w=t[x].patch;w&&w.length>=3?a.push({outline:[...w],holes:[],topY:t[x].y}):s.push(x)}if(!s.length)continue;s.sort((x,w)=>t[x].depth-t[w].depth);let c=s.map(x=>Xn(t,x,r,n)).filter(x=>x!==null);if(!c.length)continue;let f=(x,w)=>({x:x.pts[w].x-x.nrm[w][0]*(x.front+gt),y:x.pts[w].y-x.nrm[w][1]*(x.front+gt)}),m=(x,w)=>({x:x.pts[w].x+x.nrm[w][0]*(x.back+gt),y:x.pts[w].y+x.nrm[w][1]*(x.back+gt)}),u=c[0],h=c[c.length-1],b=[];for(let x=0;x<u.pts.length;x++)b.push(f(u,x));for(let x of c)b.push(m(x,x.pts.length-1));for(let x=h.pts.length-1;x>=0;x--)b.push(m(h,x));for(let x=c.length-1;x>=0;x--)b.push(f(c[x],0));let p=Hn(b),d=1/0;for(let x of s)t[x].y<d&&(d=t[x].y);if(!Number.isFinite(d))continue;if(p.length>=3&&Math.abs(ft(p))>1e-6&&c.every(x=>{let w=x.pts[Math.floor(x.pts.length/2)];return It(p,w.x,w.y)})){a.push({outline:Yn(p,Un),holes:[],topY:d});continue}for(let x of mo(c))a.push({outline:x,holes:[],topY:d})}return a}function mo(t){let n=[];for(let e of t){let r=[],o=[],a=e.front+gt,i=e.back+gt;for(let l=0;l<e.pts.length;l++){let c=e.pts[l],f=e.nrm[l];r.push([c.x-f[0]*a,c.y-f[1]*a]),o.push([c.x+f[0]*i,c.y+f[1]*i])}let s=[...r,...o.reverse()];s.length<3||(s.push(s[0]),n.push([s]))}if(!n.length)return[];try{let e=Dn.union(n[0],...n.slice(1)),r=[];for(let o of e){if(!o.length||o[0].length<4)continue;let a=o[0].map(([l,c])=>({x:l,y:c})),i=a[0],s=a[a.length-1];a.length>1&&Math.abs(i.x-s.x)<1e-9&&Math.abs(i.y-s.y)<1e-9&&a.pop(),a.length>=3&&r.push(Yn(a,Un))}return r}catch{return[]}}function Hn(t){let n=[];for(let e of t){let r=n[n.length-1];r&&Math.hypot(e.x-r.x,e.y-r.y)<1e-9||n.push(e)}for(;n.length>2&&Math.hypot(n[0].x-n[n.length-1].x,n[0].y-n[n.length-1].y)<1e-9;)n.pop();return n}var sn=class{constructor(n){this.minX=1/0;this.minY=1/0;this.maxX=-1/0;this.maxY=-1/0;this.rings=n;for(let e of n)for(let r of e)r.x<this.minX&&(this.minX=r.x),r.y<this.minY&&(this.minY=r.y),r.x>this.maxX&&(this.maxX=r.x),r.y>this.maxY&&(this.maxY=r.y)}containsAll(n){for(let e of n)if(e.x<this.minX||e.x>this.maxX||e.y<this.minY||e.y>this.maxY)return!1;for(let e of this.rings){let r=!0;for(let o of n)if(!It(e,o.x,o.y)){r=!1;break}if(r)return!0}return!1}};function Gn(t,n,e,r,o,a){if(r.length<3)return;if(e.containsAll(r)){let c=[0,1,0],f=r[0];for(let m=1;m+1<r.length;m++){let u=r[m],h=r[m+1];t.tri([f.x*g,o,f.y*g],[u.x*g,o,u.y*g],[h.x*g,o,h.y*g],c,a)}return}let i=r.map(c=>[c.x,c.y]);i.push(i[0]);let s;try{s=Dn.intersection([i],n)}catch{return}let l=[0,1,0];for(let c of s){if(!c.length||c[0].length<4)continue;let f=c[0],m=[],u=[];for(let b=0;b<f.length-1;b++)m.push(f[b][0],f[b][1]),u.push([f[b][0],f[b][1]]);if(u.length<3)continue;let h=oo(m,void 0,2);for(let b=0;b<h.length;b+=3){let p=u[h[b]],d=u[h[b+1]],y=u[h[b+2]];t.tri([p[0]*g,o,p[1]*g],[d[0]*g,o,d[1]*g],[y[0]*g,o,y[1]*g],l,a)}}}function Vn(t,n,e,r,o,a,i){if(n.length<2)return;let s=i??Wt(n),l=[0,1,0],c=a&&a.length>=3?[[...a.map(h=>[h.x,h.y]),[a[0].x,a[0].y]]]:null,f=a&&a.length>=3?new sn([[...a]]):null,m=h=>{t.setMaterial(2),h(),t.setMaterial(0)},u=h=>{t.setMaterial(3),h(),t.setMaterial(0)};for(let h=0;h<n.length;h++){let b=n[h];if(b.patch&&b.patch.length>=3){let E=[...b.patch],M=s[h].belowY??r;if(u(()=>{if(c&&f)Gn(t,c,f,E,b.y,o.tread);else{let I=E[0];for(let B=1;B+1<E.length;B++){let k=E[B],D=E[B+1];t.tri([I.x*g,b.y,I.y*g],[k.x*g,b.y,k.y*g],[D.x*g,b.y,D.y*g],l,o.tread)}}}),b.y>M+On){let I=0,B=0;for(let k of E)I+=k.x,B+=k.y;I/=E.length,B/=E.length,m(()=>{for(let k=0;k<E.length;k++){let D=E[k],U=E[(k+1)%E.length],S=U.x-D.x,_=U.y-D.y,N=Math.hypot(S,_);if(N<1e-6)continue;let O=_/N,P=-S/N;(D.x-I)*O+(D.y-B)*P<0&&(O=-O,P=-P);let F=[O,0,P],R=[D.x*g,b.y,D.y*g],T=[U.x*g,b.y,U.y*g],C=[D.x*g,M,D.y*g],v=[U.x*g,M,U.y*g];t.tri(R,T,v,F,o.riser),t.tri(R,v,C,F,o.riser)}})}continue}let p=Xn(n,h,s,e);if(!p)continue;let{pts:d,nrm:y,front:x,back:w}=p,A=s[h].belowY??r;for(let E=0;E+1<d.length;E++){let M=d[E],I=d[E+1],B=y[E],k=y[E+1];if(Math.hypot(I.x-M.x,I.y-M.y)<1e-6||B[0]===0&&B[1]===0||k[0]===0&&k[1]===0)continue;let D=[(M.x-B[0]*x)*g,b.y,(M.y-B[1]*x)*g],U=[(I.x-k[0]*x)*g,b.y,(I.y-k[1]*x)*g],S=[(M.x+B[0]*w)*g,b.y,(M.y+B[1]*w)*g],_=[(I.x+k[0]*w)*g,b.y,(I.y+k[1]*w)*g];if(u(()=>{c&&f?Gn(t,c,f,[{x:M.x-B[0]*x,y:M.y-B[1]*x},{x:I.x-k[0]*x,y:I.y-k[1]*x},{x:I.x+k[0]*w,y:I.y+k[1]*w},{x:M.x+B[0]*w,y:M.y+B[1]*w}],b.y,o.tread):(t.tri(D,U,_,l,o.tread),t.tri(D,_,S,l,o.tread))}),b.y>A+On){let N=[D[0],A,D[2]],O=[U[0],A,U[2]],P=[-B[0],0,-B[1]];m(()=>{t.tri(D,U,O,P,o.riser),t.tri(D,O,N,P,o.riser)})}}}}function fo(t,n){let e=t.eventConfigurationIds;return!e?.length||!!n&&e.includes(n)}function Wn(t,n){return t.filter(e=>e.type!=="shape"||fo(e,n))}function Zn(t,n){let e=t.focalPoint??{x:0,y:0};return t.floors?.length?t.floors.map((r,o)=>({objects:Wn(r.objects,n),focal:{x:(r.focalPoint??e).x,y:(r.focalPoint??e).y},baseHeightM:r.baseHeightM??0,index:o})):[{objects:Wn(t.objects,n),focal:e,baseHeightM:0,index:0}]}var ho={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};function Mt(t){return Rn(t)??ho}function Kn(t,n){let e=jt(t.outline,ot),r=Mt(e),o=n.filter(i=>i!==t&&i.outline&&i.outline.length>=3&&Nt(r,Mt(i.outline)));if(!o.length)return[e];let a=i=>{let s=i.map(l=>[l.x,l.y]);return s.push(s[0]),s};try{let i=zn.difference([a(e)],...o.map(l=>[a(l.outline)])),s=[];for(let l of i){if(!l.length)continue;let c=l[0].map(([f,m])=>({x:f,y:m}));if(c.length>1){let f=c[0],m=c[c.length-1];Math.abs(f.x-m.x)<1e-9&&Math.abs(f.y-m.y)<1e-9&&c.pop()}c.length>=3&&s.push(c)}return s.length?s:[e]}catch{return[e]}}function $n(t,n){if(!n.length)return t;let e=a=>{let i=a.map(s=>[s.x,s.y]);return i.push(i[0]),i},r=n.map(a=>[e(a)]),o=[];for(let a of t){let i;try{i=zn.intersection([e(a.outline)],r.flat())}catch{o.push(a);continue}for(let s of i){if(!s.length)continue;let l=s[0].map(([c,f])=>({x:c,y:f}));if(l.length>1){let c=l[0],f=l[l.length-1];Math.abs(c.x-f.x)<1e-9&&Math.abs(c.y-f.y)<1e-9&&l.pop()}l.length>=3&&o.push({outline:l,holes:[],topY:a.topY})}}return o.length?o:t}function po(t,n){return t===void 0||n===void 0?!0:Math.abs(t-n)<.001}var zt=class{constructor(){this.rings=[];this.boxes=[];this.levels=[]}subtract(n,e){let r=n.map(l=>[l.x,l.y]);if(r.length<3)return[];r.push(r[0]);let o=Mt(n),a=this.rings.filter((l,c)=>Nt(o,this.boxes[c])&&po(e,this.levels[c])),i=[[r]];if(a.length)try{i=bo.difference([r],...a).map(c=>c.map(f=>f.map(([m,u])=>[m,u])))}catch{i=[[r]]}this.rings.push([r]),this.boxes.push(o),this.levels.push(e);let s=[];for(let l of i){if(!l.length)continue;let c=l[0].map(([f,m])=>({x:f,y:m}));if(c.length>1){let f=c[0],m=c[c.length-1];Math.abs(f.x-m.x)<1e-9&&Math.abs(f.y-m.y)<1e-9&&c.pop()}c.length>=3&&s.push(c)}return s}};function yo(t,n){if(!n)return t;let e=1/0,r=-1/0,o=1/0,a=-1/0;for(let m of t)e=Math.min(e,m.x),r=Math.max(r,m.x),o=Math.min(o,m.y),a=Math.max(a,m.y);let i=(e+r)/2,s=(o+a)/2,l=n*Math.PI/180,c=Math.cos(l),f=Math.sin(l);return t.map(m=>{let u=m.x-i,h=m.y-s;return{x:i+u*c-h*f,y:s+u*f+h*c}})}function bt(t){let n=null;if(t.kind==="polygon"&&t.points&&t.points.length>=3&&(n=t.points),t.kind==="rect"&&t.width&&t.height&&(n=Tt(t.x??0,t.y??0,t.width,t.height)),t.kind==="ellipse"&&t.width&&t.height){let e=(t.x??0)+t.width/2,r=(t.y??0)+t.height/2;n=Ht(e,r,t.width/2,t.height/2)}return n?yo(n,t.rotation):null}function Et(t){let n=t.role??"",e={stage:{kind:"stage",heightM:1},entrance:{kind:"portal",heightM:2.7},exit:{kind:"portal",heightM:2.7},screen:{kind:"solid",heightM:6},wall:{kind:"solid",heightM:2.8},rail:{kind:"solid",heightM:1.1},suite:{kind:"suite",heightM:3},obstruction:{kind:"solid",heightM:4.5},sound:{kind:"solid",heightM:1.45},restroom:{kind:"solid",heightM:2.4},bar:{kind:"solid",heightM:1.1},concession:{kind:"solid",heightM:1.1},coat:{kind:"solid",heightM:1.1},goal:{kind:"portal",heightM:1.8}},r=n==="stage"&&xn(t.stageKind)?{kind:"stage",heightM:.06}:e[n]??{kind:"plate",heightM:.25};return{...r,heightM:t.heightM??r.heightM}}var xo=.08;function qn(t,n){let e=bt(t),r=Et(t),o=r.heightM;if(!e||r.kind!=="plate"&&r.kind!=="stage")return o;let a=1/0,i=1/0,s=-1/0,l=-1/0;for(let f of e)a=Math.min(a,f.x),i=Math.min(i,f.y),s=Math.max(s,f.x),l=Math.max(l,f.y);let c=o;for(let f of n)s>f.minX&&a<f.maxX&&l>f.minY&&i<f.maxY&&c<=f.topOffsetM+1e-6&&(c=f.topOffsetM+xo);return n.push({minX:a,minY:i,maxX:s,maxY:l,topOffsetM:c}),c}function mt(t,n,e){return{x:t.x+(n.x-t.x)*e,y:t.y+(n.y-t.y)*e}}function Jn(t){if(t.length!==4)return t;let n=Math.hypot(t[1].x-t[0].x,t[1].y-t[0].y),e=Math.hypot(t[2].x-t[1].x,t[2].y-t[1].y);return n>=e?t:[t[1],t[2],t[3],t[0]]}function Ct(t,n,e){return[mt(t[0],t[1],n),mt(t[0],t[1],e),mt(t[3],t[2],e),mt(t[3],t[2],n)]}function Qn(t,n,e){return[mt(t[0],t[3],n),mt(t[1],t[2],n),mt(t[1],t[2],e),mt(t[0],t[3],e)]}function at(t,n,e,r,o,a){K(t,n,void 0,()=>e,r,o,a,W)}var an=2.4,go=.75,Mo=.15;function Ft(t){if(t.points&&t.points.length>=3)return t.points;let{center:n,width:e,height:r,rotation:o}=t;if(!e||!r)return null;let a=(o??0)*Math.PI/180,i=Math.cos(a),s=Math.sin(a),l=e/2,c=r/2;return[[-l,-c],[l,-c],[l,c],[-l,c]].map(([f,m])=>({x:n.x+f*i-m*s,y:n.y+f*s+m*i}))}function te(t,n,e,r,o){let a=Ft(n);a&&K(t,a,void 0,()=>e+an,e,st(r,o.boothTop),o.boothWall,W)}function cn(t){if(t.shape==="round"){let f=t.radius;return f?Ht(t.center.x,t.center.y,f,f,24):null}let{width:n,height:e,rotation:r,center:o}=t;if(!n||!e)return null;let a=(r??0)*Math.PI/180,i=Math.cos(a),s=Math.sin(a),l=n/2,c=e/2;return[[-l,-c],[l,-c],[l,c],[-l,c]].map(([f,m])=>({x:o.x+f*i-m*s,y:o.y+f*s+m*i}))}function ne(t,n,e,r,o){let a=cn(n);a&&K(t,a,void 0,()=>e+go,e,st(r,o.tableTop),o.tableWall,W)}function ee(t,n,e,r,o,a,i,s){let l=bt(n);if(!l)return;let c=s?s.kind==="stage":n.role==="stage",f=s?s.kind==="screen":n.role==="screen",m=s?{kind:c?"stage":"solid",heightM:s.topY-s.baseY}:Et(n),u=s?.baseY??e,h=s?.topY??e+r;if(c&&i){let x=1/0,w=-1/0,A=1/0,E=-1/0;for(let M of l)M.x<x&&(x=M.x),M.x>w&&(w=M.x),M.y<A&&(A=M.y),M.y>E&&(E=M.y);i.push({cx:(x+w)/2*g,cz:(A+E)/2*g,y:h,halfX:Math.max((w-x)/2*g,.5),halfZ:Math.max((E-A)/2*g,.5)})}let b=H(n.fill),p=c&&b?nt(o.stageTop,et(Pt(b,.18),.9),.9):st(b,c?o.stageTop:o.decorTop),d=f?b:null,y=c?b?nt(o.stageWall,et(b,.58),.82):o.stageWall:f?d?nt(et(d,1.42),[.24,.46,.82],.08):[.24,.46,.82]:st(H(n.fill),o.decorWall);if(m.kind==="portal"&&l.length===4){let x=Jn(l);at(t,Ct(x,0,.16),h,u,p,y),at(t,Ct(x,.84,1),h,u,p,y),at(t,x,h,Math.max(u,h-.35),p,y);return}if(m.kind==="suite"&&l.length===4){let x=l.map((E,M)=>{let I=l[(M+1)%4],B=(E.x+I.x)/2,k=(E.y+I.y)/2;return Math.hypot(B-a.x,k-a.y)}),w=x.indexOf(Math.min(...x)),A=[0,1,2,3].map(E=>l[(w+E)%4]);at(t,Ct(A,0,.08),h,u,p,y),at(t,Ct(A,.92,1),h,u,p,y),at(t,Qn(A,.88,1),h,u,p,y),at(t,A,h,Math.max(u,h-.18),p,y);return}at(t,l,h,u,p,y)}function un(t){let{x:n,y:e,width:r,height:o}=t;if(!r||!o)return null;let a=n+r/2,i=e+o/2,s=(t.rotation??0)*Math.PI/180,l=Math.cos(s),c=Math.sin(s),f=r/2,m=o/2;return[[-f,-m],[f,-m],[f,m],[-f,m]].map(([u,h])=>({x:a+u*l-h*c,y:i+u*c+h*l}))}function So(t){if(!t||!t.startsWith("data:image/svg+xml"))return null;let n=t.slice(t.indexOf(",")+1);if(/;base64/i.test(t.slice(0,t.indexOf(","))))try{n=atob(n)}catch{return null}else try{n=decodeURIComponent(n)}catch{}let e=n.match(/<(?:rect|path)\b[^>]*\bfill="([^"]+)"/i);if(!e)return null;let r=e[1].trim();if(r==="none"||r==="transparent")return null;let o=r.match(/^url\(#([^)]+)\)$/);if(!o)return H(r);let a=n.match(new RegExp(`<(?:linear|radial)Gradient\\b[^>]*\\bid="${o[1]}"[^>]*>([\\s\\S]*?)</(?:linear|radial)Gradient>`,"i"));if(!a)return null;let i=[];for(let s of a[1].matchAll(/stop-color="([^"]+)"/gi)){let l=H(s[1].trim());l&&i.push(l)}return i.length?i.reduce((s,l,c)=>nt(s,l,1/(c+1)),i[0]):null}function oe(t,n,e,r){if(n.layer==="foreground")return;let o=un(n);if(!o)return;let a=e+Mo,i=st(So(n.href),r.decorTop),s=Math.max(0,Math.min(1,n.opacity??1));s<1&&(i=nt(r.ground,i,s)),K(t,o,void 0,()=>a,e,i,nt(i,r.decorWall,.5),W)}function re(t,n,e,r,o){if(!n.points||n.points.length<3)return;let a=st(r,o.gaTop);K(t,n.points,n.holes,()=>e+.15,e,a,o.gaWall,W)}var Ro=6,Ao=2.2,ie=.1,Po=.3,Io=1.8,wo=.9,_o=.55,To=6e3;function se(t){let{doc:n,units:e,seats:r,surfaces:o,focal:a}=t,i=n.zones??[],s=[];if(i.length){let l=new Map;for(let f of e)for(let m of f.objects)m.type==="section"&&m.zone&&l.set(m.id,m.zone);let c=new Map;for(let f=0;f<r.length;f++){let m=r[f],u=o.seatOwner[f],h=m.zoneId??(u?l.get(u):void 0);if(!h)continue;let b=c.get(h);b||(b={n:0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,sumY:0},c.set(h,b)),b.n++,m.x<b.minX&&(b.minX=m.x),m.y<b.minY&&(b.minY=m.y),m.x>b.maxX&&(b.maxX=m.x),m.y>b.maxY&&(b.maxY=m.y),b.sumY+=o.seatDeckY(f)}for(let f of i){let m=c.get(f.id),u=[];for(let[h,b]of l)b===f.id&&u.push(h);if(!m||m.n===0){s.push({id:f.id,label:f.label,color:H(f.color),sectionIds:u,seatCount:0,center:[0,0,0],radius:0,focalWorld:[(f.focalPoint??a).x*g,1.5,(f.focalPoint??a).y*g]});continue}s.push({id:f.id,label:f.label,color:H(f.color),sectionIds:u,seatCount:m.n,center:[(m.minX+m.maxX)/2*g,m.sumY/m.n,(m.minY+m.maxY)/2*g],radius:.5*Math.hypot((m.maxX-m.minX)*g,(m.maxY-m.minY)*g)||1,focalWorld:[(f.focalPoint??a).x*g,1.5,(f.focalPoint??a).y*g]})}}return s}function ae(t){let{doc:n,units:e,seats:r,surfaces:o,seatData:a,hintedSeatFloor:i,zones:s,focal:l}=t,c=[],f=[],m=[];for(let u of s)u.seatCount!==0&&c.push({id:`zone:${u.id}`,kind:"zone",text:u.label,anchor:[u.center[0],u.center[1]+Ro,u.center[2]],color:n.zones?.find(h=>h.id===u.id)?.color});{let u=new Map,h=new Map;for(let b=0;b<r.length;b++){let p=o.seatOwner[b];if(!p)continue;let d=u.get(p);d||(d={n:0,x:0,y:0,deck:0},u.set(p,d)),d.n++,d.x+=r[b].x,d.y+=r[b].y,d.deck+=o.seatDeckY(b);let y=h.get(p);y||(y={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0},h.set(p,y)),r[b].x<y.minX&&(y.minX=r[b].x),r[b].x>y.maxX&&(y.maxX=r[b].x),r[b].y<y.minY&&(y.minY=r[b].y),r[b].y>y.maxY&&(y.maxY=r[b].y)}for(let b of e)for(let p of b.objects){if(p.type!=="section")continue;let d=u.get(p.id);if(!d||d.n===0)continue;let y=h.get(p.id),x=[d.x/d.n*g,d.deck/d.n,d.y/d.n*g],w=p.displayLabel||p.label||p.id;f.push({id:p.id,floorIndex:b.index,label:w,seatCount:d.n,center:x,radius:Math.max(1,Math.hypot(y.maxX-y.minX,y.maxY-y.minY)*.5*g),focalWorld:[b.focal.x*g,b.baseHeightM+1.5,b.focal.y*g]});let A=n.floors?.[b.index]?.name?.trim().toLocaleLowerCase();e.length>1&&A===w.trim().toLocaleLowerCase()||c.push({id:`section:${p.id}`,kind:"section",text:w,anchor:[x[0],x[1]+Ao,x[2]],floorIndex:b.index})}}{for(let p of e)for(let d of p.objects){if(d.type!=="gaArea")continue;let y=At(d.points);if(!y)continue;let x=d.displayLabel||d.label||d.id;c.push({id:`ga:${d.id}`,kind:"ga",text:d.capacity>0?`${x} \xB7 ${d.capacity.toLocaleString()}`:x,anchor:[y.x*g,p.baseHeightM+Io,y.y*g],floorIndex:p.index})}let u=new Map;for(let p of e)for(let d of p.objects)d.type==="section"&&u.set(d.id,d.displayLabel||d.label||d.id);let h=new Map;for(let p=0;p<r.length;p++){let d=r[p],y=Math.hypot(d.x-l.x,d.y-l.y),x=h.get(d.rowId);(!x||y>x.far)&&h.set(d.rowId,{seat:d,index:p,far:y})}for(let[p,d]of h){let y=Eo(d.seat.label,p,u.get(d.seat.sectionId??""));y&&c.push({id:`row:${p}`,kind:"row",text:y,anchor:[d.seat.x*g,o.seatDeckY(d.index)+wo,d.seat.y*g],floorIndex:i[d.index]})}let b=new Map;for(let p=0;p<r.length;p++){let d=r[p],y=d.label?d.label.lastIndexOf("-"):-1,x=b.get(d.rowId);x||(x={n:0,x:0,y:0,z:0,minX:1/0,maxX:-1/0,minZ:1/0,maxZ:-1/0,label:y>0?d.label.slice(0,y):d.rowId,sectionId:d.sectionId},b.set(d.rowId,x));let w=p*3,A=a.iPosition[w],E=a.iPosition[w+1],M=a.iPosition[w+2];x.n++,x.x+=A,x.y+=E,x.z+=M,x.minX=Math.min(x.minX,A),x.maxX=Math.max(x.maxX,A),x.minZ=Math.min(x.minZ,M),x.maxZ=Math.max(x.maxZ,M)}for(let[p,d]of b)m.push({id:p,label:d.label,sectionId:d.sectionId,seatCount:d.n,center:[d.x/d.n,d.y/d.n,d.z/d.n],radius:Math.max(.8,Math.hypot(d.maxX-d.minX,d.maxZ-d.minZ)*.5)});if(r.length<=To)for(let p=0;p<r.length;p++){let d=r[p],y=Bo(d.displayLabel||d.label);y&&c.push({id:`seat:${d.id}`,kind:"seat",text:y,anchor:[d.x*g,o.seatDeckY(p)+_o,d.y*g],floorIndex:i[p]})}}for(let u of e)for(let h of u.objects)if(h.type==="shape"&&h.role&&["entrance","exit","screen","suite","obstruction"].includes(h.role)){let b=bt(h),p=b?At(b):null;if(!p||!h.label)continue;c.push({id:`architecture:${h.id}`,kind:"annotation",text:h.label,anchor:[p.x*g,u.baseHeightM+Et(h).heightM+ie,p.y*g],color:h.fill,floorIndex:u.index})}else if(h.type==="text"){if(!h.text)continue;c.push({id:`text:${h.id}`,kind:"annotation",text:h.text,anchor:[h.position.x*g,u.baseHeightM+ie,h.position.y*g],color:h.color,rotation:h.rotation,floorIndex:u.index})}else if(h.type==="booth"){let b=Ft(h);if(!b)continue;let p=At(b);if(!p)continue;c.push({id:`booth:${h.id}`,kind:"booth",text:h.displayLabel||h.label||h.id,anchor:[p.x*g,u.baseHeightM+an+Po,p.y*g],floorIndex:u.index})}return{labels:c,sections:f,rows:m}}function ce(t,n){if(n.length>1)for(let e of n)t.push({id:`floor:${e.id}`,kind:"floor",text:e.label,anchor:[e.center[0],e.box.max[1]+1.2,e.center[2]],floorIndex:e.index})}function Bo(t){let n=t.lastIndexOf("-");return n>=0&&n<t.length-1?t.slice(n+1):t}function Eo(t,n,e){let r=t?t.lastIndexOf("-"):-1,o=r>0?t.slice(0,r):n;return o&&Sn(o,e)}var Co=.15,Fo=.9,vo=1.76;function ko(){return{background:{top:[...nn.top],bottom:[...nn.bottom]},structure:tn,seatStates:{...Bn},seatScale:1,materials:{seat:null,shell:null,roughness:.78}}}function ue(t){let n=ko();if(!t)return n;let e=H(t.background);if(e){n.background={top:et(e,Fo),bottom:et(e,vo)};let i={};for(let[s,l]of Object.entries(tn))i[s]=nt(l,e,Co);n.structure=i}let r=H(t.selectionColor)??H(t.accent);r&&(n.seatStates={...n.seatStates,selected:r});let o=t.seatScale;typeof o=="number"&&Number.isFinite(o)&&(n.seatScale=An(o));let a=t.venue3d;if(a){let i=H(a.deck),s=H(a.fascia);i&&(n.structure={...n.structure,tierTop:i,gaTop:i}),s&&(n.structure={...n.structure,tierWall:s,gaWall:s}),n.materials.seat=H(a.seat),n.materials.shell=H(a.shell),typeof a.roughness=="number"&&Number.isFinite(a.roughness)&&(n.materials.roughness=Math.min(1,Math.max(0,a.roughness)))}return n}function le(t,n){let e=[];for(let r of n)e.push(...t.seatStates[r]);return e}var Oo=.05,me=.05,Lo=.15,ln=25;function fe(t,n,e){let r=new Map,o=new Array(n.length).fill(null),a=new Float64Array(n.length),i=new Array(n.length).fill(void 0),s=new Array(n.length).fill(void 0),l=new Map,c=[],f=new Set;for(let u=0;u<t.length;u+=1){let h=t[u];for(let b of h.objects){if(b.type==="table"&&f.add(b.id),b.type!=="section"||!b.outline||b.outline.length<3)continue;let p=jt(b.outline,ot);l.set(b.id,{section:b,unit:h,frontU:1/0,hasSeats:!1,rows:new Map,seatIndices:[]}),c.push({id:b.id,floorIndex:u,box:Mt(p),section:b,unit:h,outline:p})}}let m=new Map;for(let u of c){let h=m.get(u.floorIndex);h?h.push(u):m.set(u.floorIndex,[u])}for(let u=0;u<n.length;u++){let h=n[u],b=e?m.get(e[u])??[]:c,p=h.sectionId?b.find(y=>y.id===h.sectionId)??b.find(y=>y.section.logicalSectionId===h.sectionId&&qt({x:h.x,y:h.y},y.outline,y.section.holes)):void 0,d=p?[p]:b;for(let y of d){if(e&&y.floorIndex!==e[u]||!p&&(h.x<y.box.minX||h.x>y.box.maxX||h.y<y.box.minY||h.y>y.box.maxY||!qt({x:h.x,y:h.y},y.outline,y.section.holes)))continue;o[u]=y.id;let x=l.get(y.id);x.hasSeats=!0;let w=h.focalPoint??y.unit.focal,A=Math.hypot(h.x-w.x,h.y-w.y);A<x.frontU&&(x.frontU=A),x.seatIndices.push(u);let E=h.rowId||`__seat-${u}`,M=x.rows.get(E);M?M.push({x:h.x,y:h.y}):x.rows.set(E,[{x:h.x,y:h.y}]);break}}for(let[u,h]of l){let b=dn(h.section,{floorBaseHeightM:h.unit.baseHeightM}),p=h.unit.baseHeightM,d=b.rake>0?Math.tan(b.rake*Math.PI/180):0,y=b.rake<=.01&&b.height<=p+.001,x=h.section.surfaceKind,w=x==="flat"?!0:x==="rakedRows"&&b.rake>.01?!1:y,A=h.hasSeats?yn(u,n,h.seatIndices,h.unit.focal):{sectionId:u,rows:[],blockCount:0},M=A.rows.length<2?Pn([...h.rows.values()].map(R=>({points:R})),h.unit.focal):null,I=1/0;if(M){if(h.hasSeats)for(let R of h.rows.values())for(let T of R){let C=M.depthAt(T.x,T.y);C<I&&(I=C)}if(!h.hasSeats||!Number.isFinite(I)){I=1/0;for(let R of h.section.outline){let T=M.depthAt(R.x,R.y);T<I&&(I=T)}}}let B=p+Oo,k=Math.max(B,b.height),D=R=>{let T=Math.max(0,R-I)*ut,C=Math.min(T*d,ln);return Math.max(B,b.height+C)},U=R=>{let T=Math.max(0,R)*ut,C=Math.min(T*d,ln);return Math.max(B,b.height+C)},S=w?[]:A.rows.map(R=>({pts:R.pts,y:U(R.blockDepth),depth:R.blockDepth,blockId:R.blockId,...f.has(R.id)?{patch:Nn(R.pts,ot)}:{}})),_=S.length?S[0].y:k,N=S.map(R=>{let T=R.patch&&R.patch.length>=3?R.patch:R.pts,C=0,v=0;for(let L of T)C+=L.x,v+=L.y;let G=T.length||1;C/=G,v/=G;let X=0;for(let L of T){let Y=Math.hypot(L.x-C,L.y-v);Y>X&&(X=Y)}return{cx:C,cy:v,rad:X}}),O=w?()=>k:S.length>=2?(R,T)=>{let C=1/0,v=_;for(let G=0;G<S.length;G++){let X=N[G];if(Math.hypot(R-X.cx,T-X.cy)-X.rad>=C)continue;let L=S[G].patch,Y=L&&L.length>=3?It(L,R,T)?0:Dt(L,R,T):Dt(S[G].pts,R,T);Y<C&&(C=Y,v=S[G].y)}return v}:(R,T)=>M?D(M.depthAt(R,T)):k,P=[0,1,0],F=S.length>=2||w?()=>P:(R,T)=>{if(!M)return P;let C=M.depthAt(R,T);if(C<=I)return P;let v=(C-I)*ut;if(v*d>=ln||b.height+v*d<=B)return P;let[G,X]=M.gradientAt(R,T);if(G===0&&X===0)return P;let L=1/Math.hypot(d,1);return[-G*d*L,L,-X*d*L]};if(!w)for(let R of A.rows){let T=U(R.blockDepth);for(let C of R.seatIndices)i[C]=T}for(let R of A.rows){let T=[];for(let L=1;L<R.pts.length;L++){let Y=Math.hypot(R.pts[L].x-R.pts[L-1].x,R.pts[L].y-R.pts[L-1].y);Y>1e-6&&T.push(Y)}T.sort((L,Y)=>L-Y);let C=T.length?T[Math.floor(T.length/2)]:1/0,v=1/0,G=R.pts[Math.floor(R.pts.length/2)];if(G)for(let L of A.rows){if(L===R||L.blockId!==R.blockId)continue;let Y=Dt(L.pts,G.x,G.y);Y>1e-6&&Y<v&&(v=Y)}let X=Math.min(C,Math.max(v,C*.5));if(Number.isFinite(X)&&X>0)for(let L of R.seatIndices)s[L]=X}r.set(u,{sectionId:u,deckAt:O,normalAt:F,flat:w,bottomY:p,rowLevels:S,landingY:_})}for(let u=0;u<n.length;u++){let h=o[u],b=n[u];if(h){let d=i[u];a[u]=(d??r.get(h).deckAt(b.x,b.y))+Lo;continue}let p=b.eyeHeightM;a[u]=Number.isFinite(p)?Math.max(0,p-Gt):0}return{bySection:r,seatOwner:o,seatDeckY:u=>a[u],seatPitchU:u=>s[u]}}var Go=.25,Do=1.2,No=.6,Xo=.45,Uo=2.3,Yo=Math.PI/180;function pt(t,n,e){let r=e*Yo;return{x:t.x+n*Math.sin(r),y:t.y+n*Math.cos(r)}}function jo(t,n){let e=n.rings[n.rings.length-1];if(!e)return!1;let r=e.outerRMedian*.85;for(let o of t){if(o.role!=="wall")continue;let a=o.points&&o.points.length>=2?o.points:o.x!==void 0&&o.y!==void 0&&o.width!==void 0&&o.height!==void 0?[{x:o.x,y:o.y},{x:o.x+o.width,y:o.y},{x:o.x+o.width,y:o.y+o.height},{x:o.x,y:o.y+o.height}]:[];if(a.length<2)continue;let i=0;for(let s of a)Math.hypot(s.x-n.centre.x,s.y-n.centre.y)>=r&&i++;if(i>=a.length/2)return!0}return!1}var Ho=24;function Vo(t,n,e,r,o,a,i,s){let l=e.binCount,c=Ho,f=ut,m=a+.02,u=[];for(let S=0;S<l;S++){let _=(e.startBin+S+.5)*n.binStepDeg,N=new Float64Array(c+1);for(let O=0;O<=c;O++){let P=r[S]+(o[S]-r[S])*O/c;N[O]=Math.max(m,wn(n,e,_,P)-Go)}u.push(N)}let h=[i.bandTop[0]*s.top,i.bandTop[1]*s.top,i.bandTop[2]*s.top],b=[i.bandTop[0]*s.bottomCap,i.bandTop[1]*s.bottomCap,i.bandTop[2]*s.bottomCap],p=[i.bandWall[0]*s.top,i.bandWall[1]*s.top,i.bandWall[2]*s.top],d=[i.bandWall[0]*s.wallBottom,i.bandWall[1]*s.wallBottom,i.bandWall[2]*s.wallBottom],y=(S,_)=>{let N=(e.startBin+S+.5)*n.binStepDeg,O=r[S]+(o[S]-r[S])*_/c,P=pt(n.centre,O,N);return[P.x*f,u[S][_],P.y*f]};{let S=Math.tan(12*Math.PI/180);for(let _=0;_<6;_++){let N=!1;for(let P=0;P<l;P++)for(let F=c-1;F>=0;F--)u[P][F]>u[P][F+1]&&(u[P][F]=u[P][F+1],N=!0);let O=e.closed?l:l-1;for(let P=0;P<O;P++){let F=(P+1)%l;for(let R=0;R<=c;R++){let T=u[F][R]-u[P][R];if(Math.abs(T)>1)continue;let C=r[P]+(o[P]-r[P])*R/c,v=r[F]+(o[F]-r[F])*R/c,G=pt(n.centre,C,(e.startBin+P+.5)*n.binStepDeg),X=pt(n.centre,v,(e.startBin+F+.5)*n.binStepDeg),L=S*Math.hypot(X.x-G.x,X.y-G.y)*f;T>L?(u[F][R]=u[P][R]+L,N=!0):-T>L&&(u[P][R]=u[F][R]+L,N=!0)}}if(!N)break}}let x=1,w=(S,_)=>{for(let N=0;N<=c;N+=4)if(Math.abs(u[S][N]-u[_][N])>x)return!0;return Math.abs(u[S][c]-u[_][c])>x},A=Math.tan(38*Math.PI/180),E=S=>(o[S]-r[S])/c*f,M=(S,_)=>u[S][_+1]-u[S][_]>A*Math.max(1e-6,E(S)),I=(S,_)=>{let N=e.closed?(S-1+l)%l:Math.max(0,S-1),O=e.closed?(S+1)%l:Math.min(l-1,S+1);Math.abs(u[N][_]-u[S][_])>x&&(N=S),Math.abs(u[O][_]-u[S][_])>x&&(O=S);let P=Math.max(0,_-1),F=Math.min(c,_+1);P<_&&M(S,P)&&(P=_),F>_&&M(S,_)&&(F=_);let R=y(N,_),T=y(O,_),C=y(S,P),v=y(S,F),G=T[0]-R[0],X=T[1]-R[1],L=T[2]-R[2],Y=v[0]-C[0],j=v[1]-C[1],$=v[2]-C[2],z=X*$-L*j,q=L*Y-G*$,tt=G*j-X*Y,Z=Math.hypot(z,q,tt);return Z>1e-12?(z/=Z,q/=Z,tt/=Z,q<0&&(z=-z,q=-q,tt=-tt),[z,q,tt]):[0,1,0]},B=(S,_)=>{let N=[S[0],a,S[2]],O=[_[0],a,_[2]],P=_[0]-S[0],F=_[2]-S[2],R=Math.hypot(P,F);if(!(R>1e-12))return;let T=[F/R,0,-P/R];t.tri(S,_,O,T,p,p,d),t.tri(S,O,N,T,p,d,d)},k=.05*lt,D=S=>o[S]-r[S]<k,U=e.closed?l:l-1;for(let S=0;S<U;S++){let _=(S+1)%l;if(D(S)||D(_))continue;if(w(S,_)){let T=(e.startBin+S+1)*n.binStepDeg,C=(j,$)=>{let z=(r[S]+r[_])/2,q=(o[S]+o[_])/2,tt=z+(q-z)*$/c,Z=pt(n.centre,tt,T);return[Z.x*f,u[j][$],Z.y*f]};for(let j=0;j<c;j++){let $=y(S,j),z=y(S,j+1),q=C(S,j),tt=C(S,j+1),Z=I(S,j),it=I(S,j+1);t.triN($,q,tt,Z,Z,it,h),t.triN($,tt,z,Z,it,it,h);let vt=y(_,j),kt=y(_,j+1),dt=C(_,j),St=C(_,j+1),yt=I(_,j),xt=I(_,j+1);t.triN(dt,vt,kt,yt,yt,xt,h),t.triN(dt,kt,St,yt,xt,xt,h);let ct=C(S,j),rt=C(S,j+1),Ot=C(_,j+1),Kt=C(_,j),Lt=rt[0]-ct[0],Rt=rt[2]-ct[2],$t=Math.hypot(Lt,Rt);if($t>1e-12){let fn=[Rt/$t,0,-Lt/$t];t.tri(ct,rt,Ot,fn,p),t.tri(ct,Ot,Kt,fn,p)}}let v=y(S,0),G=y(_,0),X=y(_,c),L=y(S,c),Y=j=>[j[0],a,j[2]];t.tri(Y(v),Y(X),Y(G),[0,-1,0],b),t.tri(Y(v),Y(L),Y(X),[0,-1,0],b),B(v,G),B(L,X);continue}for(let T=0;T<c;T++){let C=I(S,T),v=I(_,T),G=I(_,T+1),X=I(S,T+1);if(M(S,T)||M(_,T)){let z=(rt,Ot)=>{let Kt=(e.startBin+rt+.5)*n.binStepDeg,Lt=r[rt]+(o[rt]-r[rt])*(T+.5)/c,Rt=pt(n.centre,Lt,Kt);return[Rt.x*f,Ot,Rt.y*f]},q=y(S,T),tt=y(_,T),Z=z(S,u[S][T]),it=z(_,u[_][T]);t.triN(q,tt,it,C,v,v,h),t.triN(q,it,Z,C,v,C,h);let vt=y(_,T+1),kt=y(S,T+1),dt=z(S,u[S][T+1]),St=z(_,u[_][T+1]);t.triN(dt,St,vt,X,G,G,h),t.triN(dt,vt,kt,X,G,X,h);let yt=it[0]-Z[0],xt=it[2]-Z[2],ct=Math.hypot(yt,xt);if(ct>1e-12){let rt=[-xt/ct,0,yt/ct];t.tri(Z,it,St,rt,p),t.tri(Z,St,dt,rt,p)}continue}let L=y(S,T),Y=y(_,T),j=y(_,T+1),$=y(S,T+1);t.triN(L,Y,j,C,v,G,h),t.triN(L,j,$,C,G,X,h)}let N=y(S,0),O=y(_,0),P=y(_,c),F=y(S,c),R=T=>[T[0],a,T[2]];t.tri(R(N),R(P),R(O),[0,-1,0],b),t.tri(R(N),R(F),R(P),[0,-1,0],b),B(N,O),B(F,P)}if(!e.closed)for(let S of[0,l-1])for(let _=0;_<c;_++)B(y(S,_),y(S,_+1))}function he(t,n,e){let{bottomY:r,colors:o,ao:a}=e,i=new Float64Array(n.binCount).fill(-1/0);for(let f of n.rings)for(let m of f.arcs){let u=new Float64Array(m.binCount),h=new Float64Array(m.binCount);for(let p=0;p<m.binCount;p++){let d=(m.startBin+p)%n.binCount,y=Math.max(0,m.innerR[p]-ot);u[p]=Math.max(y,i[d]+.001),h[p]=Math.max(u[p]+.001,m.outerR[p]+ot)}let b=0;for(let p=0;p<m.binCount;p++){let d=m.topLevelM[p]-r;d>b&&(b=d)}b>=Do&&Vo(t,n,m,u,h,r,o,a);for(let p=0;p<m.binCount;p++){let d=(m.startBin+p)%n.binCount;h[p]>i[d]&&(i[d]=h[p])}}if(e.deriveShell===!1||jo(e.shapes,n))return;let s=n.rings[n.rings.length-1],l=No*lt,c=Xo*lt;for(let f of s.arcs){let m=[],u=[];for(let p=0;p<f.binCount;p++){let d=(f.startBin+p+.5)*n.binStepDeg,y=f.outerR[p]+ot+l;m.push(pt(n.centre,y,d)),u.push(pt(n.centre,y+c,d))}let h=-1/0;for(let p=0;p<f.binCount;p++)f.topLevelM[p]>h&&(h=f.topLevelM[p]);let b=()=>h+Uo;f.closed?K(t,u,[m.slice().reverse()],b,r,o.shellTop,o.shellWall,a):K(t,[...u,...m.slice().reverse()],void 0,b,r,o.shellTop,o.shellWall,a)}}function be(t,n,e,r,o,a,i,s){if(!n.outline||n.outline.length<3)return;let l=e.baseHeightM,c=st(r,s.tierTop);if(!o)return;let f=d=>o.deckAt(d.x,d.y),m=Kn(n,i),u=m[0]??n.outline;if(o.rowLevels.length>=2){let d=Wt(o.rowLevels),y=$n(jn(o.rowLevels,e.focal,d),m),x=()=>[0,1,0];for(let A of y){let E=Math.max(l,A.topY-.02);for(let M of a.subtract(A.outline,E))K(t,M,A.holes,()=>E,l,c,s.tierWall,W,void 0,x)}y.length||K(t,u,n.holes,()=>o.landingY,l,c,s.tierWall,W);let w={tread:[c[0]*W.top,c[1]*W.top,c[2]*W.top],riser:[c[0]*.72,c[1]*.72,c[2]*.72]};for(let A of m.length?m:[u])Vn(t,o.rowLevels,e.focal,o.landingY,w,A,d);return}let h=o.flat?1/0:me,b=d=>o.normalAt(d.x,d.y),p=o.flat?o.landingY:void 0;for(let d of a.subtract(u,p))K(t,d,n.holes,f,l,c,s.tierWall,W,h,b)}function Wo(t,n,e){let r=new Set;for(let i of t.objects)i.type==="section"&&r.add(i.id);let o=new Map;for(let i=0;i<n.length;i++){let s=e.seatOwner[i];if(!s||!r.has(s))continue;let l=e.bySection.get(s);if(l&&l.rowLevels.length>=2)continue;let c=n[i],f=o.get(s);f||(f=new Map,o.set(s,f));let m=c.rowId||`__seat-${i}`,u=f.get(m);u||(u={pts:[],levelM:0,n:0},f.set(m,u)),u.pts.push({x:c.x,y:c.y}),u.levelM+=e.seatDeckY(i),u.n++}let a=[];for(let i of t.objects){if(i.type!=="section")continue;let s=e.bySection.get(i.id);if(s&&s.rowLevels.length>=2){let c=s.rowLevels.filter(f=>!f.patch).map(f=>({pts:f.pts,levelM:f.y}));c.length>=2&&a.push({sectionId:i.id,rows:c});continue}let l=o.get(i.id);l&&a.push({sectionId:i.id,rows:[...l.values()].map(c=>({pts:c.pts,levelM:c.levelM/c.n}))})}return a}function pe(t,n,e,r,o,a,i=!0){let s=Wo(n,e,r);if(!s.length)return;let l=In(s,n.focal);l&&(t.setMaterial(0),he(t,l,{bottomY:n.baseHeightM,colors:{bandTop:et(o.tierTop,.8),bandWall:o.tierWall,shellTop:a??et(o.tierWall,1.15),shellWall:a??o.tierWall},ao:W,shapes:n.objects.filter(c=>c.type==="shape"),deriveShell:i}))}function de(t){let{doc:n,units:e,seats:r,surfaces:o,solids:a,hintedSeatFloor:i,seatFloor:s}=t,l=[];{let c=e.map(()=>({minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0}));for(let u=0;u<a.floor.length;u+=1){let h=Math.max(0,Math.min(e.length-1,Math.round(a.floor[u]))),b=u*3,p=c[h];p.minX=Math.min(p.minX,a.position[b]),p.minY=Math.min(p.minY,a.position[b+1]),p.minZ=Math.min(p.minZ,a.position[b+2]),p.maxX=Math.max(p.maxX,a.position[b]),p.maxY=Math.max(p.maxY,a.position[b+1]),p.maxZ=Math.max(p.maxZ,a.position[b+2])}let f=new Map;for(let u=0;u<e.length;u++)for(let h of e[u].objects)h.type==="section"&&f.set(h.id,u);let m=e.map(()=>({n:0,minX:1/0,minY:1/0,minDeck:1/0,maxX:-1/0,maxY:-1/0,maxDeck:-1/0,sumX:0,sumDeck:0,sumZ:0}));for(let u=0;u<r.length;u++){let h=o.seatOwner[u],b=(h!==null?f.get(h):void 0)??i[u];if(b===void 0)continue;let p=m[b],d=r[u];p.n++,d.x<p.minX&&(p.minX=d.x),d.y<p.minY&&(p.minY=d.y),d.x>p.maxX&&(p.maxX=d.x),d.y>p.maxY&&(p.maxY=d.y);let y=o.seatDeckY(u);p.sumX+=d.x*g,p.sumDeck+=y,p.sumZ+=d.y*g,p.minDeck=Math.min(p.minDeck,y),p.maxDeck=Math.max(p.maxDeck,y+1.6),s[u]=b}for(let u=0;u<e.length;u++){let h=m[u],b=n.floors?.[u],p=c[u],d=Math.min(h.n?h.minX*g:e[u].focal.x*g-1,Number.isFinite(p.minX)?p.minX:1/0),y=Math.max(h.n?h.maxX*g:e[u].focal.x*g+1,Number.isFinite(p.maxX)?p.maxX:-1/0),x=Math.min(h.n?h.minY*g:e[u].focal.y*g-1,Number.isFinite(p.minZ)?p.minZ:1/0),w=Math.max(h.n?h.maxY*g:e[u].focal.y*g+1,Number.isFinite(p.maxZ)?p.maxZ:-1/0),A=Math.min(h.n?Math.min(e[u].baseHeightM,h.minDeck):e[u].baseHeightM,Number.isFinite(p.minY)?p.minY:1/0),E=Math.max(h.n?Math.max(h.maxDeck,A+.5):A+.5,Number.isFinite(p.maxY)?p.maxY:-1/0),M=[h.n?h.sumX/h.n:(d+y)/2,h.n?h.sumDeck/h.n:(A+E)/2,h.n?h.sumZ/h.n:(x+w)/2],I=Math.max(1,.5*Math.hypot(y-d,E-A,w-x));l.push({index:u,id:b?.id??`floor-${u}`,label:b?.name??(e.length>1?`Floor ${u+1}`:"Venue"),seatCount:h.n,center:M,radius:I,box:{min:[d,A,x],max:[y,E,w]},focalWorld:[e[u].focal.x*g,e[u].baseHeightM+1.5,e[u].focal.y*g]})}}return l}function mn(t,n){let e=1/0,r=1/0,o=-1/0,a=-1/0,i=(s,l)=>{s<e&&(e=s),l<r&&(r=l),s>o&&(o=s),l>a&&(a=l)};for(let s of n)i(s.x,s.y);for(let s of t)for(let l of s.objects)if(l.type==="section")for(let c of l.outline)i(c.x,c.y);else if(l.type==="shape"&&l.points)for(let c of l.points)i(c.x,c.y);else if(l.type==="gaArea")for(let c of l.points)i(c.x,c.y);else if(l.type==="booth"){let c=Ft(l);if(c)for(let f of c)i(f.x,f.y)}else if(l.type==="table"){let c=cn(l);if(c)for(let f of c)i(f.x,f.y)}else if(l.type==="decorImage"){let c=un(l);if(c)for(let f of c)i(f.x,f.y)}return Number.isFinite(e)||(e=-100,r=-100,o=100,a=100),{minX:e,minY:r,maxX:o,maxY:a}}function ye(t,n,e,r,o,a){if(n.length===1){let i=Math.max(60,(o.maxX-o.minX+o.maxY-o.minY)*.06),s=Tt(o.minX-i,o.minY-i,o.maxX-o.minX+i*2,o.maxY-o.minY+i*2);K(t,s,void 0,()=>0,-.4,a.ground,a.ground,W)}else{let i=n.reduce((h,b)=>b.baseHeightM<h.baseHeightM?b:h);t.setFloor(i.index);let s=e.filter((h,b)=>r[b]===i.index),l=mn([i],s),c=Math.hypot(l.maxX-l.minX,l.maxY-l.minY),f=Math.max(28,Math.min(80,c*.04)),m=Tt(l.minX-f,l.minY-f,l.maxX-l.minX+f*2,l.maxY-l.minY+f*2),u=i.baseHeightM-.03;K(t,m,void 0,()=>u,u-.22,a.ground,a.ground,W)}}function xe(t,n,e){let{cx:r,cz:o,radius:a}=e,i=1/0,s=1/0,l=1/0,c=-1/0,f=-1/0,m=-1/0,u=(p,d,y)=>{i=Math.min(i,p),c=Math.max(c,p),s=Math.min(s,d),f=Math.max(f,d),l=Math.min(l,y),m=Math.max(m,y)};for(let p=0;p<t.position.length;p+=3)u(t.position[p],t.position[p+1],t.position[p+2]);for(let p=0;p<n.count;p++){let d=p*3,y=n.iPosition[d],x=n.iPosition[d+1],w=n.iPosition[d+2],A=Math.max(.35,n.iMaxRadius[p]??.35);u(y-A,x,w-A),u(y+A,x+1.6,w+A)}Number.isFinite(i)||(i=r-a,c=r+a,s=0,f=a*.16,l=o-a,m=o+a);let h=[(i+c)/2,(s+f)/2,(l+m)/2],b=Math.max(1,.5*Math.hypot(c-i,f-s,m-l));return{center:h,radius:b,minY:s,maxY:f}}function ge(t,n,e,r,o,a){let i=1/0,s=1/0,l=-1/0,c=-1/0;for(let A=0;A<t.count;A++){let E=A*3,M=t.iPosition[E],I=t.iPosition[E+2];M<i&&(i=M),M>l&&(l=M),I<s&&(s=I),I>c&&(c=I)}for(let A of n)i=Math.min(i,A.cx-A.halfX),l=Math.max(l,A.cx+A.halfX),s=Math.min(s,A.cz-A.halfZ),c=Math.max(c,A.cz+A.halfZ);let f=e.minX*g,m=e.maxX*g,u=e.minY*g,h=e.maxY*g,b=f,p=m,d=u,y=h;if(Number.isFinite(i)){let A=Math.max(2,.06*Math.hypot(l-i,c-s));b=Math.max(f,i-A),p=Math.min(m,l+A),d=Math.max(u,s-A),y=Math.min(h,c+A)}let x=Math.min(0,r),w=Math.max(o,a*.05);return{min:[b,x,d],max:[p,w,y]}}function Me(t,n,e){let r=()=>({byObjectId:new Map,elements:[]});if(!n||!t)return r();let o=bn(n);if(!o.ok||o.value.id!==t)return r();let a=new Map;for(let m of e)for(let u of m.objects)u.type==="shape"&&a.set(u.id,{shape:u,unit:m});let i=new Set,s=new Set,l=new Map((n.overlay.productionElements??[]).map(m=>{let u=m.runtimeContentImageUrl;return[m.id,typeof u=="string"&&/^(?:blob:|data:image\/|https:\/\/)/.test(u)?u:void 0]})),c=[];for(let m of o.value.overlay.productionElements??[]){let u=a.get(m.objectId),h=u?bt(u.shape):null,b=m.baseElevationM??0;if(!u||!h||h.length<3||!m.id||i.has(m.id)||s.has(m.objectId)||!Number.isFinite(m.heightM)||m.heightM<.05||m.heightM>50||!Number.isFinite(b)||b<-10||b>100)return r();i.add(m.id),s.add(m.objectId);let p=h.map(B=>B.x*g),d=h.map(B=>B.y*g),y=u.unit.baseHeightM+b,x=Math.min(...p),w=Math.max(...p),A=Math.min(...d),E=Math.max(...d),M,I=l.get(m.id)??m.contentImageUrl;if(m.kind==="screen"&&I)if(w-x>=E-A){let B=Math.abs(A-u.unit.focal.y*g)<=Math.abs(E-u.unit.focal.y*g)?A-.006:E+.006;M=[[x,y,B],[w,y,B],[x,y+m.heightM,B],[w,y+m.heightM,B]]}else{let B=Math.abs(x-u.unit.focal.x*g)<=Math.abs(w-u.unit.focal.x*g)?x-.006:w+.006;M=[[B,y,A],[B,y,E],[B,y+m.heightM,A],[B,y+m.heightM,E]]}c.push({id:m.id,objectId:m.objectId,kind:m.kind,floorIndex:u.unit.index,baseY:y,topY:y+m.heightM,bounds:{min:[x,y,A],max:[w,y+m.heightM,E]},occlusion:m.occlusion,...I?{contentImageUrl:I}:{},...M?{contentPlane:M}:{}})}let f=c.sort((m,u)=>m.id.localeCompare(u.id));return{byObjectId:new Map(f.map(m=>[m.objectId,m])),elements:f}}function Q(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function J(t){return Array.isArray(t)?t:[]}function zo(t){let n=[t];for(;n.length;){let e=n.pop();if(Array.isArray(e)){n.push(...e);continue}if(!Q(e))continue;let r=Q(e.extensions)?e.extensions:null;if(r&&Object.prototype.hasOwnProperty.call(r,"KHR_draco_mesh_compression"))return!0;n.push(...Object.values(e))}return!1}function Zt(t,n){return!Array.isArray(t)||t.length!==n||!t.every(e=>typeof e=="number"&&Number.isFinite(e))?null:t}function Zo(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Ko(t,n){let e=new Array(16).fill(0);for(let r=0;r<4;r++)for(let o=0;o<4;o++)for(let a=0;a<4;a++)e[r*4+o]+=t[a*4+o]*n[r*4+a];return e}function $o(t){let n=Zt(t.matrix,16);if(n)return n;if(t.matrix!==void 0)return null;let e=t.translation===void 0?[0,0,0]:Zt(t.translation,3),r=t.rotation===void 0?[0,0,0,1]:Zt(t.rotation,4),o=t.scale===void 0?[1,1,1]:Zt(t.scale,3);if(!e||!r||!o)return null;let[a,i,s,l]=r,c=Math.hypot(a,i,s,l);if(!(c>1e-8))return null;let f=a/c,m=i/c,u=s/c,h=l/c,b=f+f,p=m+m,d=u+u,y=f*b,x=f*p,w=f*d,A=m*p,E=m*d,M=u*d,I=h*b,B=h*p,k=h*d;return[(1-(A+M))*o[0],(x+k)*o[0],(w-B)*o[0],0,(x-k)*o[1],(1-(y+M))*o[1],(E+I)*o[1],0,(w+B)*o[2],(E-I)*o[2],(1-(y+A))*o[2],0,e[0],e[1],e[2],1]}function qo(t,n,e,r){return[t[0]*n+t[4]*e+t[8]*r+t[12],t[1]*n+t[5]*e+t[9]*r+t[13],t[2]*n+t[6]*e+t[10]*r+t[14]]}function Jo(t){let n=t[0],e=t[4],r=t[8],o=t[1],a=t[5],i=t[9],s=t[2],l=t[6],c=t[10],f=a*c-i*l,m=i*s-o*c,u=o*l-a*s,h=n*f+e*m+r*u;if(Math.abs(h)<1e-12)return null;let b=1/h;return[f*b,m*b,u*b,(r*l-e*c)*b,(n*c-r*s)*b,(e*s-n*l)*b,(e*i-r*a)*b,(r*o-n*i)*b,(n*a-e*o)*b]}function Se(t,n,e,r){let o=t[0]*n+t[1]*e+t[2]*r,a=t[3]*n+t[4]*e+t[5]*r,i=t[6]*n+t[7]*e+t[8]*r,s=Math.hypot(o,a,i)||1;return o/=s,a/=s,i/=s,[o,a,i]}function Qo(t){if(t.byteLength<20||t.byteLength>8388608)return null;let n=new DataView(t.buffer,t.byteOffset,t.byteLength);if(n.getUint32(0,!0)!==1179937895||n.getUint32(4,!0)!==2||n.getUint32(8,!0)!==t.byteLength)return null;let e=12,r=null,o=null;for(;e+8<=t.byteLength;){let a=n.getUint32(e,!0),i=n.getUint32(e+4,!0);if(e+=8,a%4!==0||e+a>t.byteLength)return null;let s=t.subarray(e,e+a);if(i===1313821514&&!r)try{let l=JSON.parse(new TextDecoder().decode(s).replace(/[\u0000 ]+$/g,""));if(!Q(l))return null;r=l}catch{return null}else if(i===5130562&&!o)o=s;else return null;e+=a}return e===t.byteLength&&r&&o?{json:r,bin:o}:null}function tr(t){return t===5120||t===5121?1:t===5122||t===5123?2:t===5125||t===5126?4:0}function nr(t){return t==="SCALAR"?1:t==="VEC2"?2:t==="VEC3"?3:t==="VEC4"?4:0}function er(t,n,e){return e===5120?t.getInt8(n):e===5121?t.getUint8(n):e===5122?t.getInt16(n,!0):e===5123?t.getUint16(n,!0):e===5125?t.getUint32(n,!0):t.getFloat32(n,!0)}function or(t){let n=t instanceof Uint8Array?t:new Uint8Array(t),e=Qo(n);if(!e)return{ok:!1,issue:"invalid_glb"};let{json:r,bin:o}=e;if(!Q(r.asset)||r.asset.version!=="2.0")return{ok:!1,issue:"unsupported_glb"};let a=J(r.extensionsUsed).filter(A=>typeof A=="string");if(a.includes("KHR_draco_mesh_compression")||zo(r))return{ok:!1,issue:"draco_not_allowed"};if(a.length||J(r.extensionsRequired).length)return{ok:!1,issue:"unsupported_glb"};if(J(r.images).length||J(r.textures).length)return{ok:!1,issue:"external_resource"};let i=J(r.buffers);if(i.length!==1||!Q(i[0])||i[0].uri!==void 0||typeof i[0].byteLength!="number"||!Number.isInteger(i[0].byteLength)||i[0].byteLength<0||i[0].byteLength>o.byteLength)return{ok:!1,issue:"external_resource"};let s=J(r.accessors),l=J(r.bufferViews),c=J(r.meshes),f=J(r.nodes),m=J(r.scenes),u=typeof r.scene=="number"?r.scene:0;if(!Q(m[u]))return{ok:!1,issue:"unsupported_glb"};let h=new DataView(o.buffer,o.byteOffset,o.byteLength),b=(A,E,M)=>{if(typeof A!="number"||!Number.isInteger(A)||!Q(s[A]))return null;let I=s[A];if(I.type!==E||I.sparse!==void 0||I.normalized===!0||typeof I.count!="number"||!Number.isInteger(I.count)||I.count<1||typeof I.componentType!="number"||!M.includes(I.componentType)||typeof I.bufferView!="number")return null;let B=l[I.bufferView];if(!Q(B)||B.buffer!==0||typeof B.byteLength!="number"||!Number.isInteger(B.byteLength)||B.byteLength<0)return null;let k=nr(I.type),D=tr(I.componentType),U=typeof B.byteStride=="number"?B.byteStride:k*D,S=typeof B.byteOffset=="number"?B.byteOffset:0,_=typeof I.byteOffset=="number"?I.byteOffset:0,N=S+_,O=_+(I.count-1)*U+k*D;if(!Number.isInteger(U)||!Number.isInteger(S)||!Number.isInteger(_)||U<k*D||S<0||_<0||S+B.byteLength>o.byteLength||O>B.byteLength)return null;let P=[];for(let F=0;F<I.count;F++){let R=[];for(let T=0;T<k;T++){let C=er(h,N+F*U+T*D,I.componentType);if(!Number.isFinite(C))return null;R.push(C)}P.push(R)}return P},p=[],d=[],y=0,x=new Set,w=(A,E)=>{if(typeof A!="number"||!Number.isInteger(A)||!Q(f[A])||x.has(A))return!1;x.add(A);let M=f[A],I=$o(M);if(!I)return!1;let B=Ko(E,I),k=Jo(B);if(!k)return!1;if(M.mesh!==void 0){if(typeof M.mesh!="number")return!1;let D=c[M.mesh];if(!Q(D))return!1;for(let U of J(D.primitives)){if(!Q(U)||U.mode!==void 0&&U.mode!==4||!Q(U.attributes))return!1;let S=b(U.attributes.POSITION,"VEC3",[5126]),_=U.attributes.NORMAL===void 0?null:b(U.attributes.NORMAL,"VEC3",[5126]);if(!S||U.attributes.NORMAL!==void 0&&!_)return!1;let N=S.length;if(U.indices!==void 0){let P=typeof U.indices=="number"?s[U.indices]:null;N=Q(P)?P.count:void 0}if(typeof N!="number"||!Number.isInteger(N)||N%3!==0||(y+=N/3,y>1e5))return!1;let O=U.indices===void 0?S.map((P,F)=>[F]):b(U.indices,"SCALAR",[5121,5123,5125]);if(!O||O.length%3!==0||O.length!==N)return!1;for(let P=0;P<O.length;P+=3){let F=[O[P][0],O[P+1][0],O[P+2][0]];if(F.some(C=>!Number.isInteger(C)||C<0||C>=S.length))return!1;let R=F.map(C=>qo(B,...S[C])),T=null;if(!_){let C=R[1][0]-R[0][0],v=R[1][1]-R[0][1],G=R[1][2]-R[0][2],X=R[2][0]-R[0][0],L=R[2][1]-R[0][1],Y=R[2][2]-R[0][2];T=Se([1,0,0,0,1,0,0,0,1],v*Y-G*L,G*X-C*Y,C*L-v*X)}for(let C=0;C<3;C++)p.push(...R[C]),d.push(..._?Se(k,..._[F[C]]):T)}}}for(let D of J(M.children))if(!w(D,B))return!1;return x.delete(A),!0};for(let A of J(m[u].nodes))if(!w(A,Zo()))return{ok:!1,issue:y>1e5?"triangle_limit":"unsupported_glb"};return!y||p.length!==y*9||d.length!==p.length?{ok:!1,issue:"unsupported_glb"}:{ok:!0,triangleCount:y,position:new Float32Array(p),normal:new Float32Array(d)}}function Re(t){try{return or(t)}catch{return{ok:!1,issue:"invalid_glb"}}}function As(t){let{doc:n}=t,e=ue(n.theme),r=e.structure,o=Zn(n,t.eventConfigurationId??n.eventConfigurationId),a=Me(t.eventConfigurationId,t.eventConfiguration,o),i=t.seats,s=new Yt,l=null;if(t.registeredShellGlb){let P=Re(t.registeredShellGlb);if(P.ok){let F=P.position.length/3,R=new Float32Array(P.position.length),T=e.materials.shell??r.tierWall;for(let C=0;C<F;C++){let v=P.normal[C*3+1],G=v<-.25?.4:.62+.38*Math.max(0,v);R[C*3]=T[0]*G,R[C*3+1]=T[1]*G,R[C*3+2]=T[2]*G}l={position:P.position,normal:P.normal,color:R,floor:new Float32Array(F).fill(-2),material:new Float32Array(F),count:F}}}let c=new Map;for(let P of o)for(let F of P.objects)c.set(F.id,P.index),F.type==="section"&&c.set(F.logicalSectionId??F.id,P.index);let f=i.map(P=>c.get(P.sectionId??"")??c.get(P.rowId??"")??0),m=mn(o,i);ye(s,o,i,f,m,r);let u=vn(n,i),h=new Map,b=new Map;for(let P of n.categories??[])h.set(P.key,P.color),P.seatGlyph&&b.set(P.key,P.seatGlyph);let p=[],d=fe(o,i,f),y=new Float32Array(i.length),x=[];for(let P=0;P<o.length;P++){let F=o[P];s.setFloor(P);let R=new zt,T=[],C=F.objects.filter(v=>v.type==="section"&&!!v.outline&&v.outline.length>=3);for(let v of F.objects)if(v.type==="section"){let G=s.vertexCount;be(s,v,F,kn(v,u),d.bySection.get(v.id),R,C,r);let X=s.vertexCount-G;X>0&&x.push({sectionId:v.id,start:G,count:X})}else if(v.type==="shape"){let G=a.byObjectId.get(v.id);s.setMaterial((G?.kind??v.role)==="screen"?1:0),ee(s,v,F.baseHeightM,qn(v,T),r,F.focal,p,G),s.setMaterial(0)}else v.type==="gaArea"?re(s,v,F.baseHeightM,H(h.get(v.categoryKey)),r):v.type==="booth"?te(s,v,F.baseHeightM,H(h.get(v.categoryKey)),r):v.type==="table"?ne(s,v,F.baseHeightM,H(v.fill??n.theme?.decorFill??"#232c40"),r):v.type==="decorImage"&&oe(s,v,F.baseHeightM,r);pe(s,F,i,d,r,e.materials.shell,!l)}let w=o.length>1?{x:o.reduce((P,F)=>P+F.focal.x,0)/o.length,y:o.reduce((P,F)=>P+F.focal.y,0)/o.length}:n.focalPoint??{x:(m.minX+m.maxX)/2,y:(m.minY+m.maxY)/2},A=Tn(l?[s.build(),l]:[s.build()]),E=Fn(i,t.initialState,d,y,h,b),M=se({doc:n,units:o,seats:i,surfaces:d,focal:w}),{labels:I,sections:B,rows:k}=ae({doc:n,units:o,seats:i,surfaces:d,seatData:E,hintedSeatFloor:f,zones:M,focal:w}),D=de({doc:n,units:o,seats:i,surfaces:d,solids:A,hintedSeatFloor:f,seatFloor:y});ce(I,D),E.iYaw=Cn(E.iPosition,i.length,P=>i[P].rowId,P=>{let F=o[y[P]]?.focal??w;return[F.x*g,F.y*g]});let U=(m.minX+m.maxX)/2*g,S=(m.minY+m.maxY)/2*g,_=.5*Math.hypot((m.maxX-m.minX)*g,(m.maxY-m.minY)*g)||10,N=xe(A,E,{cx:U,cz:S,radius:_}),O=ge(E,p,m,N.minY,N.maxY,_);return{solids:A,sectionSolidRanges:x,seats:E,bounds:{center:[(O.min[0]+O.max[0])/2,(O.min[1]+O.max[1])/2,(O.min[2]+O.max[2])/2],radius:_,groundY:0,box:O},renderBounds:{center:N.center,radius:N.radius},stateColorLUT:le(e,Bt),theme:e,seatCount:i.length,focalWorld:[w.x*g,1.5,w.y*g],zones:M,stages:p,productionElements:a.elements,sections:B,rows:k,labels:I,floors:D}}export{Bt as a,Qt as b,mr as c,nn as d,g as e,hr as f,Ge as g,Ne as h,br as i,Vt as j,Ar as k,Pr as l,_r as m,Tr as n,Br as o,Er as p,Cr as q,Fr as r,vr as s,kr as t,Or as u,Lr as v,Bo as w,As as x};
|