@seatlayer/core 0.110.0 → 0.111.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-IOQUWTKM.js +1 -0
- package/dist/be-XLR5WTXS.js +1 -0
- package/dist/bg-AVCWLASZ.js +1 -0
- package/dist/ca-TKG35ICB.js +1 -0
- package/dist/{categoryInventory-BfvwE3nC.d.cts → categoryInventory-BE1AThTx.d.cts} +1 -1
- package/dist/{categoryInventory-ClZ-68jI.d.ts → categoryInventory-DxciZQK_.d.ts} +1 -1
- package/dist/{chunk-ZYQXT5JP.js → chunk-5FIX35HN.js} +1 -1
- package/dist/{chunk-2JFCDE27.js → chunk-5GHPGPWE.js} +1 -1
- package/dist/{chunk-MRLWH6RC.js → chunk-AZWAP4OE.js} +1 -1
- package/dist/chunk-BXQQKDIX.js +1 -0
- package/dist/{chunk-OJSGMXJS.js → chunk-FZ74MVKY.js} +1 -1
- package/dist/chunk-JQBJZMLG.js +1 -0
- package/dist/{chunk-UUIZHJYL.js → chunk-MN4M5QZ4.js} +1 -1
- package/dist/chunk-N6K5NQYG.js +1 -0
- package/dist/{chunk-6VOUTNRV.js → chunk-NQLQNJV2.js} +1 -1
- package/dist/{chunk-BNLANXXZ.js → chunk-NXS6JFBI.js} +1 -1
- package/dist/{chunk-WUNZCUE6.js → chunk-XWTAFHYQ.js} +1 -1
- package/dist/{chunk-FBXZWNND.js → chunk-Z6YGWTT3.js} +1 -1
- package/dist/core/chart-ops/index.cjs +1 -1
- package/dist/core/chart-ops/index.d.cts +7 -5
- package/dist/core/chart-ops/index.d.ts +7 -5
- package/dist/core/chart-ops/index.js +1 -1
- package/dist/core/inventory/index.cjs +1 -1
- package/dist/core/inventory/index.d.cts +4 -4
- package/dist/core/inventory/index.d.ts +4 -4
- package/dist/core/inventory/index.js +1 -1
- package/dist/core/layout/index.cjs +1 -1
- package/dist/core/layout/index.d.cts +5 -5
- package/dist/core/layout/index.d.ts +5 -5
- package/dist/core/layout/index.js +1 -1
- package/dist/core/quality/index.cjs +1 -1
- package/dist/core/quality/index.d.cts +3 -3
- package/dist/core/quality/index.d.ts +3 -3
- package/dist/core/render-assets/index.cjs +1 -1
- package/dist/core/render-assets/index.d.cts +2 -2
- package/dist/core/render-assets/index.d.ts +2 -2
- package/dist/core/render-assets/index.js +1 -1
- package/dist/core/seatConfidence.d.cts +1 -1
- package/dist/core/seatConfidence.d.ts +1 -1
- package/dist/core/sections/index.d.cts +5 -5
- package/dist/core/sections/index.d.ts +5 -5
- package/dist/core/sections/index.js +1 -1
- package/dist/cs-JRLKXXM5.js +1 -0
- package/dist/cy-W3CYXTOV.js +1 -0
- package/dist/da-HG4PFYWH.js +1 -0
- package/dist/de-KOM2AXXJ.js +1 -0
- package/dist/el-NBRQ66EQ.js +1 -0
- package/dist/es-AVEG4ZNM.js +1 -0
- package/dist/et-33PIOTI4.js +1 -0
- package/dist/{eventConfigurations-DsW5Mj2e.d.ts → eventConfigurations-Cdt-e0uD.d.ts} +1 -1
- package/dist/{eventConfigurations-dmn9FClw.d.cts → eventConfigurations-D0us5j0K.d.cts} +1 -1
- package/dist/fa-CDV2VTXV.js +1 -0
- package/dist/fi-TKATIOE6.js +1 -0
- package/dist/fr-TMDNSR5N.js +1 -0
- package/dist/he-4G7OVLJX.js +1 -0
- package/dist/hi-XKXNYPYF.js +1 -0
- package/dist/hr-BX444QNM.js +1 -0
- package/dist/hu-FM46JMDP.js +1 -0
- package/dist/id-CBVTYGFP.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +46 -38
- package/dist/index.d.ts +46 -38
- package/dist/index.js +1 -1
- package/dist/it-ZOFOAG6E.js +1 -0
- package/dist/ja-NKEBMXTO.js +1 -0
- package/dist/ko-RUCELYV7.js +1 -0
- package/dist/ku-KKYBDVSA.js +1 -0
- package/dist/{labeling-Bn41ByDd.d.ts → labeling-DXgkxMoi.d.ts} +1 -1
- package/dist/{labeling-BmEjVxFt.d.cts → labeling-eYKVPLMb.d.cts} +1 -1
- package/dist/localeLoaders-YQXZZVNH.js +1 -0
- package/dist/lt-3CJ37W7A.js +1 -0
- package/dist/lv-H37RDMRX.js +1 -0
- package/dist/ms-E5RVBRE6.js +1 -0
- package/dist/nl-QHEOTQ7U.js +1 -0
- package/dist/no-43HJQ5MK.js +1 -0
- package/dist/pl-4LKJHMFJ.js +1 -0
- package/dist/pt-LSSE5QHE.js +1 -0
- package/dist/{renderedQuality-MDkNe8GA.d.ts → renderedQuality-Dzo2_8f4.d.ts} +1 -1
- package/dist/{renderedQuality-Bt2d0uq1.d.cts → renderedQuality-Frgw6jdx.d.cts} +1 -1
- package/dist/{renderer-DH0yI32q.d.cts → renderer-DM2sv1un.d.cts} +1 -1
- package/dist/{renderer-BJrpMV6U.d.ts → renderer-DuieD7jP.d.ts} +1 -1
- package/dist/ro-U2QASPIY.js +1 -0
- package/dist/ru-PTMWREXY.js +1 -0
- package/dist/{seatTypeIcons-CG_Uzpaw.d.ts → seatTypeIcons-Bz0OJtEi.d.ts} +1 -1
- package/dist/{seatTypeIcons-Ck7oEFei.d.cts → seatTypeIcons-Cm8tjLYl.d.cts} +1 -1
- package/dist/{sections-C-UAqr1x.d.ts → sections-Bf_DV0oG.d.ts} +1 -1
- package/dist/{sections-C8HApYxd.d.cts → sections-PbQiqN0i.d.cts} +1 -1
- package/dist/{segmentedRowModel-DR1w9M13.d.ts → segmentedRowModel-CO7DD803.d.ts} +1 -1
- package/dist/{segmentedRowModel-CeoMsBnt.d.cts → segmentedRowModel-Co9LqS4i.d.cts} +1 -1
- package/dist/sk-AY2N2ORA.js +1 -0
- package/dist/sl-5MQJVNB7.js +1 -0
- package/dist/sr-25FTJPUA.js +1 -0
- package/dist/{stage-CKb7aNoH.d.cts → stage-BtqKu5aX.d.cts} +1 -1
- package/dist/{stage-CKb7aNoH.d.ts → stage-BtqKu5aX.d.ts} +1 -1
- package/dist/sv-7VQX4BFH.js +1 -0
- package/dist/{tableSizing-RRmpxOXl.d.ts → tableSizing-BDePQyPD.d.ts} +3 -3
- package/dist/{tableSizing-Bz-hxLza.d.cts → tableSizing-C6EjKNnk.d.cts} +3 -3
- package/dist/th-E53HQMDC.js +1 -0
- package/dist/{ticketRestrictions-lq4dH4k6.d.cts → ticketRestrictions-CgYwHQOf.d.cts} +2 -2
- package/dist/{ticketRestrictions-C7KUrulv.d.ts → ticketRestrictions-D5wgOq4P.d.ts} +2 -2
- package/dist/tr-IIR6E7OD.js +1 -0
- package/dist/{types-DM-OneoD.d.ts → types-CGOr0BpE.d.cts} +40 -16
- package/dist/{types-DM-OneoD.d.cts → types-CGOr0BpE.d.ts} +40 -16
- package/dist/uk-HBINQ4XE.js +1 -0
- package/dist/vi-TX6I5RWN.js +1 -0
- package/dist/view3d/crossfade/panorama.d.cts +1 -1
- package/dist/view3d/crossfade/panorama.d.ts +1 -1
- package/dist/view3d/index.cjs +531 -172
- package/dist/view3d/index.d.cts +350 -73
- package/dist/view3d/index.d.ts +350 -73
- package/dist/view3d/index.js +529 -170
- package/dist/view3d/scene/scene.worker.cjs +1 -1
- package/dist/view3d/scene/scene.worker.js +1 -1
- package/dist/zh-Hans-7QNBTEYC.js +1 -0
- package/dist/zh-Hant-6KK3D42X.js +1 -0
- package/package.json +1 -1
- package/dist/ar-O3RHQRH3.js +0 -1
- package/dist/be-SXFCG3F5.js +0 -1
- package/dist/bg-W7YBNYB2.js +0 -1
- package/dist/ca-FA7WHACR.js +0 -1
- package/dist/chunk-4N5CHKHD.js +0 -1
- package/dist/chunk-4QQG5EEP.js +0 -1
- package/dist/chunk-YE4NP3XB.js +0 -1
- package/dist/cs-RR3VIKRC.js +0 -1
- package/dist/cy-U4JJ5C47.js +0 -1
- package/dist/da-ATULGB2M.js +0 -1
- package/dist/de-VB543CPC.js +0 -1
- package/dist/el-7Y2KXU6N.js +0 -1
- package/dist/es-GUV5XIYC.js +0 -1
- package/dist/et-SZ6I4Z44.js +0 -1
- package/dist/fa-FM6ELEN7.js +0 -1
- package/dist/fi-6QQ2M5JI.js +0 -1
- package/dist/fr-2SEQSVLR.js +0 -1
- package/dist/he-V3EVB7IW.js +0 -1
- package/dist/hi-I4QIBK5Q.js +0 -1
- package/dist/hr-I5DNEVUU.js +0 -1
- package/dist/hu-KTFWBQMF.js +0 -1
- package/dist/id-RZWUH426.js +0 -1
- package/dist/it-CNQP36V4.js +0 -1
- package/dist/ja-JQZOYIHI.js +0 -1
- package/dist/ko-6YCWWHFQ.js +0 -1
- package/dist/ku-33PM4OWG.js +0 -1
- package/dist/localeLoaders-VFQOZMUH.js +0 -1
- package/dist/lt-24JO2B7V.js +0 -1
- package/dist/lv-HTSDEEAB.js +0 -1
- package/dist/ms-PUEZJJ3R.js +0 -1
- package/dist/nl-NQPDRSCW.js +0 -1
- package/dist/no-3N3MUMSA.js +0 -1
- package/dist/pl-YHBEO6ZF.js +0 -1
- package/dist/pt-5RPESNZB.js +0 -1
- package/dist/ro-XDFXIMHX.js +0 -1
- package/dist/ru-BIIALOM5.js +0 -1
- package/dist/sk-LHSFRUFT.js +0 -1
- package/dist/sl-MPE5TPI3.js +0 -1
- package/dist/sr-T3N67KTP.js +0 -1
- package/dist/sv-LJWWYUIY.js +0 -1
- package/dist/th-E5POGG37.js +0 -1
- package/dist/tr-2DCWQ2CY.js +0 -1
- package/dist/uk-C3VJP6EA.js +0 -1
- package/dist/vi-XVMTKCOL.js +0 -1
- package/dist/zh-Hans-RG4CQGBY.js +0 -1
- package/dist/zh-Hant-YHNTYPFS.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-
|
|
2
|
-
import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-
|
|
3
|
-
export { C as CATEGORY_INVENTORY_FAMILIES, a as CategoryInventoryClone, b as CategoryInventoryConflict, c as CategoryInventoryFamily, d as CategoryInventoryFamilyUsage, e as CategoryInventoryObjectType, f as CategoryInventoryReassignment, g as CategoryInventoryRemediationChange, h as CategoryInventoryRemediationResult, i as CategoryInventoryTarget, j as describeCategoryInventoryConflict, k as effectiveSeatOwnerCategoryCounts, l as inspectCategoryInventoryConflicts, r as remediateCategoryInventoryConflicts } from '../../categoryInventory-
|
|
4
|
-
export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GABoxMode, b as GA_UNIT_LABEL_PREFIX, c as GroupedTableBookingMode, d as GroupedTableInventoryUnit, e as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, f as MAX_GA_CAPACITY, g as MAX_ONE_PARTY_GUESTS, N as NotForSaleSelectionIssue, O as ONE_PARTY_LIMIT_MESSAGE, R as RestrictionChartDoc, h as RestrictionSeat, T as TicketOptionApplicabilityIssue, i as TicketSelection, j as TicketSelectionIssue, k as TicketSelectionOptions, l as TicketTierResolution, m as applicableTicketTiers, n as companionSelectionIssue, o as eventInventoryLimitFor, p as gaAreasOf, q as gaBoxBounds, r as gaBoxMode, s as gaInventorySegments, t as gaUnitLabel, u as gaUnitLabels, v as gaUnitLabelsForModel, w as gaWheelchairPlaceCount, x as gaWheelchairUnitLabels, y as groupedTableInventory, z as growJoinedGAInventory, A as isFullChartDoc, B as isGaUnitLabel, E as resolveTicketTierForSeat, F as ticketOptionNotApplicableIssue, H as ticketSelectionIssue, I as ticketTierAppliesToSeat, J as validGAInventorySegments } from '../../ticketRestrictions-
|
|
1
|
+
import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-CGOr0BpE.cjs';
|
|
2
|
+
import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-DM2sv1un.cjs';
|
|
3
|
+
export { C as CATEGORY_INVENTORY_FAMILIES, a as CategoryInventoryClone, b as CategoryInventoryConflict, c as CategoryInventoryFamily, d as CategoryInventoryFamilyUsage, e as CategoryInventoryObjectType, f as CategoryInventoryReassignment, g as CategoryInventoryRemediationChange, h as CategoryInventoryRemediationResult, i as CategoryInventoryTarget, j as describeCategoryInventoryConflict, k as effectiveSeatOwnerCategoryCounts, l as inspectCategoryInventoryConflicts, r as remediateCategoryInventoryConflicts } from '../../categoryInventory-BE1AThTx.cjs';
|
|
4
|
+
export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GABoxMode, b as GA_UNIT_LABEL_PREFIX, c as GroupedTableBookingMode, d as GroupedTableInventoryUnit, e as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, f as MAX_GA_CAPACITY, g as MAX_ONE_PARTY_GUESTS, N as NotForSaleSelectionIssue, O as ONE_PARTY_LIMIT_MESSAGE, R as RestrictionChartDoc, h as RestrictionSeat, T as TicketOptionApplicabilityIssue, i as TicketSelection, j as TicketSelectionIssue, k as TicketSelectionOptions, l as TicketTierResolution, m as applicableTicketTiers, n as companionSelectionIssue, o as eventInventoryLimitFor, p as gaAreasOf, q as gaBoxBounds, r as gaBoxMode, s as gaInventorySegments, t as gaUnitLabel, u as gaUnitLabels, v as gaUnitLabelsForModel, w as gaWheelchairPlaceCount, x as gaWheelchairUnitLabels, y as groupedTableInventory, z as growJoinedGAInventory, A as isFullChartDoc, B as isGaUnitLabel, E as resolveTicketTierForSeat, F as ticketOptionNotApplicableIssue, H as ticketSelectionIssue, I as ticketTierAppliesToSeat, J as validGAInventorySegments } from '../../ticketRestrictions-CgYwHQOf.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Best-available seat selection — a PURE, fully unit-testable ranking function.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-
|
|
2
|
-
import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-
|
|
3
|
-
export { C as CATEGORY_INVENTORY_FAMILIES, a as CategoryInventoryClone, b as CategoryInventoryConflict, c as CategoryInventoryFamily, d as CategoryInventoryFamilyUsage, e as CategoryInventoryObjectType, f as CategoryInventoryReassignment, g as CategoryInventoryRemediationChange, h as CategoryInventoryRemediationResult, i as CategoryInventoryTarget, j as describeCategoryInventoryConflict, k as effectiveSeatOwnerCategoryCounts, l as inspectCategoryInventoryConflicts, r as remediateCategoryInventoryConflicts } from '../../categoryInventory-
|
|
4
|
-
export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GABoxMode, b as GA_UNIT_LABEL_PREFIX, c as GroupedTableBookingMode, d as GroupedTableInventoryUnit, e as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, f as MAX_GA_CAPACITY, g as MAX_ONE_PARTY_GUESTS, N as NotForSaleSelectionIssue, O as ONE_PARTY_LIMIT_MESSAGE, R as RestrictionChartDoc, h as RestrictionSeat, T as TicketOptionApplicabilityIssue, i as TicketSelection, j as TicketSelectionIssue, k as TicketSelectionOptions, l as TicketTierResolution, m as applicableTicketTiers, n as companionSelectionIssue, o as eventInventoryLimitFor, p as gaAreasOf, q as gaBoxBounds, r as gaBoxMode, s as gaInventorySegments, t as gaUnitLabel, u as gaUnitLabels, v as gaUnitLabelsForModel, w as gaWheelchairPlaceCount, x as gaWheelchairUnitLabels, y as groupedTableInventory, z as growJoinedGAInventory, A as isFullChartDoc, B as isGaUnitLabel, E as resolveTicketTierForSeat, F as ticketOptionNotApplicableIssue, H as ticketSelectionIssue, I as ticketTierAppliesToSeat, J as validGAInventorySegments } from '../../ticketRestrictions-
|
|
1
|
+
import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-CGOr0BpE.js';
|
|
2
|
+
import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-DuieD7jP.js';
|
|
3
|
+
export { C as CATEGORY_INVENTORY_FAMILIES, a as CategoryInventoryClone, b as CategoryInventoryConflict, c as CategoryInventoryFamily, d as CategoryInventoryFamilyUsage, e as CategoryInventoryObjectType, f as CategoryInventoryReassignment, g as CategoryInventoryRemediationChange, h as CategoryInventoryRemediationResult, i as CategoryInventoryTarget, j as describeCategoryInventoryConflict, k as effectiveSeatOwnerCategoryCounts, l as inspectCategoryInventoryConflicts, r as remediateCategoryInventoryConflicts } from '../../categoryInventory-DxciZQK_.js';
|
|
4
|
+
export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GABoxMode, b as GA_UNIT_LABEL_PREFIX, c as GroupedTableBookingMode, d as GroupedTableInventoryUnit, e as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, f as MAX_GA_CAPACITY, g as MAX_ONE_PARTY_GUESTS, N as NotForSaleSelectionIssue, O as ONE_PARTY_LIMIT_MESSAGE, R as RestrictionChartDoc, h as RestrictionSeat, T as TicketOptionApplicabilityIssue, i as TicketSelection, j as TicketSelectionIssue, k as TicketSelectionOptions, l as TicketTierResolution, m as applicableTicketTiers, n as companionSelectionIssue, o as eventInventoryLimitFor, p as gaAreasOf, q as gaBoxBounds, r as gaBoxMode, s as gaInventorySegments, t as gaUnitLabel, u as gaUnitLabels, v as gaUnitLabelsForModel, w as gaWheelchairPlaceCount, x as gaWheelchairUnitLabels, y as groupedTableInventory, z as growJoinedGAInventory, A as isFullChartDoc, B as isGaUnitLabel, E as resolveTicketTierForSeat, F as ticketOptionNotApplicableIssue, H as ticketSelectionIssue, I as ticketTierAppliesToSeat, J as validGAInventorySegments } from '../../ticketRestrictions-D5wgOq4P.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Best-available seat selection — a PURE, fully unit-testable ranking function.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D,b as Y,c as $,d as q,e as H,f as Q,g as U,h as V,i as Z,j as tt,k as nt,l as ot,m as et}from"../../chunk-
|
|
1
|
+
import{a as D,b as Y,c as $,d as q,e as H,f as Q,g as U,h as V,i as Z,j as tt,k as nt,l as ot,m as et}from"../../chunk-5FIX35HN.js";import{a as ut,b as lt,c as pt,d as ft}from"../../chunk-XWTAFHYQ.js";import{a as m}from"../../chunk-TZBJCAXH.js";import{a as rt,b as it,c as at,d as ct,e as st}from"../../chunk-FZ74MVKY.js";import"../../chunk-Z6YGWTT3.js";import"../../chunk-NXS6JFBI.js";import"../../chunk-GUNNA5LB.js";import"../../chunk-M4NGX5NM.js";import"../../chunk-EE2CVYFJ.js";import"../../chunk-URW7MSCJ.js";import{a as C,b as N,c as g,d as k,e as G,f as B,g as W,h as A,i as E,j as F,k as T,l as L,m as X,n as K,o as J,p as z}from"../../chunk-MN4M5QZ4.js";import{ab as f,d as _,e as v,f as I,g as j}from"../../chunk-BXQQKDIX.js";import"../../chunk-S3VH7IDA.js";import"../../chunk-JBOTRSMY.js";import"../../chunk-CRCGO52K.js";var b=1,d=100;function w(t,n){if(!Number.isInteger(n)||n<b||n>d)return null;let e=t.rotation*Math.PI/180,i={x:Math.cos(e),y:Math.sin(e)},o={x:-i.y,y:i.x};return Array.from({length:n},(r,a)=>{let c=t.style==="intertwined"&&a%2===1?t.seatSpacing/2:0;return{type:"row",id:`__block_preview_${a}`,label:"",origin:{x:t.origin.x+o.x*a*t.rowGap+i.x*c,y:t.origin.y+o.y*a*t.rowGap+i.y*c},rotation:t.rotation,curve:t.curve,seatCount:t.seatsPerRow,seatSpacing:t.seatSpacing,categoryKey:"__preview__"}})}function x(t,n=t.rowCount){let e=w(t,n);return e?.length?f(e[e.length-1]):null}function xt(t,n){if(!Number.isFinite(n.x)||!Number.isFinite(n.y)||t.rowGap<=0)return null;let e=x(t,1);if(!e)return null;let i=t.rotation*Math.PI/180,o={x:-Math.sin(i),y:Math.cos(i)},r=(n.x-e.x)*o.x+(n.y-e.y)*o.y,a=Math.max(b,Math.min(d,Math.round(r/t.rowGap)+1)),c=x(t,a);return c?{rowCount:a,edgePoint:c}:null}function bt(t,n){return t.length!==n.rowCount?!1:[...t].sort((i,o)=>(i.rowBlockGeneration?.rowIndex??1/0)-(o.rowBlockGeneration?.rowIndex??1/0)).every((i,o)=>{let r=i.rowBlockGeneration;return r?.kind==="row-block-v1"&&r.groupId===n.groupId&&r.rowIndex===o&&r.signature===n.signature&&JSON.stringify(r)===JSON.stringify({...n,rowIndex:o})})}var s=1,u=300,y=330;function l(t){return t.seatCount>1?t.curve/(t.seatCount-1):0}function h(t,n){let e=t.rotation*Math.PI/180,i=l(t)*Math.PI/180,o,r;if(Math.abs(i)<1e-9)o=n*t.seatSpacing,r=0;else{let a=t.seatSpacing/(2*Math.sin(Math.abs(i)/2)),c=i*n;o=a*Math.sin(c),r=-a+a*Math.cos(c)}return{x:t.origin.x+o*Math.cos(e)-r*Math.sin(e),y:t.origin.y+o*Math.sin(e)+r*Math.cos(e)}}function M(t,n,e){let i=(t??[]).map(o=>({...o,index:o.index+n})).filter(o=>o.index>=0&&o.index<e);return i.length?i:void 0}function R(t,n){if(t.path||!Number.isInteger(n)||n<s||n>u)return null;let e=l(t);return{...t,seatCount:n,curve:e*(n-1)}}function O(t,n){if(t.path||!Number.isInteger(n)||n<s||n>u)return null;let e=l(t),i=t.seatCount-n,o=-i;return{...t,origin:h(t,i),rotation:m(t.rotation-e*i),seatCount:n,curve:e*(n-1),overrides:M(t.overrides,o,n)}}function P(t,n=t.seatCount){let e=R(t,n);return e?h(e,n-1):null}function S(t,n=t.seatCount){return O(t,n)?.origin??null}function ht(t,n){if(t.path||!Number.isFinite(n.x)||!Number.isFinite(n.y))return null;let e=l(t),i=Math.abs(e)<1e-9?u:Math.min(u,Math.floor(y/Math.abs(e))+1),o=null;for(let r=s;r<=Math.max(s,i);r+=1){let a=P(t,r);if(!a)continue;let c=Math.hypot(a.x-n.x,a.y-n.y),p=e*(r-1);(!o||c<o.distance||c===o.distance&&r<o.seatCount)&&(o={seatCount:r,curve:p,endpoint:a,distance:c})}return o}function wt(t,n){if(t.path||!Number.isFinite(n.x)||!Number.isFinite(n.y))return null;let e=l(t),i=Math.abs(e)<1e-9?u:Math.min(u,Math.floor(y/Math.abs(e))+1),o=null;for(let r=s;r<=Math.max(s,i);r+=1){let a=S(t,r);if(!a)continue;let c=Math.hypot(a.x-n.x,a.y-n.y),p=e*(r-1);(!o||c<o.distance||c===o.distance&&r<o.seatCount)&&(o={seatCount:r,curve:p,endpoint:a,distance:c})}return o}export{rt as CATEGORY_INVENTORY_FAMILIES,v as DEFAULT_EVENT_INVENTORY_LIMIT,C as GA_UNIT_LABEL_PREFIX,ot as GroupedTableProjectionError,I as LARGE_VENUE_INVENTORY_MODULE,y as MAX_DIRECT_ROW_SWEEP,_ as MAX_EVENT_INVENTORY,g as MAX_GA_CAPACITY,W as MAX_ONE_PARTY_GUESTS,d as MAX_ROW_BLOCK_ROWS,u as MAX_ROW_SEATS,b as MIN_ROW_BLOCK_ROWS,s as MIN_ROW_SEATS,A as ONE_PARTY_LIMIT_MESSAGE,H as applicableTicketTiers,Z as behindStageLabels,pt as capacityControl,lt as categoryCapacity,ut as chartCapacity,U as companionSelectionIssue,ct as describeCategoryInventoryConflict,it as effectiveSeatOwnerCategoryCounts,j as eventInventoryLimitFor,z as gaAreasOf,F as gaBoxBounds,E as gaBoxMode,B as gaInventorySegments,k as gaUnitLabel,T as gaUnitLabels,L as gaUnitLabelsForModel,X as gaWheelchairPlaceCount,K as gaWheelchairUnitLabels,et as groupedTableInventory,J as growJoinedGAInventory,at as inspectCategoryInventoryConflicts,bt as intactRowBlockMembers,Y as isFullChartDoc,N as isGaUnitLabel,tt as pickBestAvailable,nt as pickBestAvailableInventory,st as remediateCategoryInventoryConflicts,ft as resizeChartCapacity,xt as resolveRowBlockCount,wt as resolveRowStartCapacity,ht as resolveRowTerminalCapacity,Q as resolveTicketTierForSeat,x as rowBlockEdgePoint,w as rowBlockPreviewRows,S as rowStartEndpoint,P as rowTerminalEndpoint,O as rowWithStartCapacity,R as rowWithTerminalCapacity,D as strandedSingles,$ as ticketOptionNotApplicableIssue,V as ticketSelectionIssue,q as ticketTierAppliesToSeat,G as validGAInventorySegments};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var pe=Object.defineProperty;var Wt=Object.getOwnPropertyDescriptor;var qt=Object.getOwnPropertyNames;var Qt=Object.prototype.hasOwnProperty;var Zt=(e,t)=>{for(var n in t)pe(e,n,{get:t[n],enumerable:!0})},Jt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of qt(t))!Qt.call(e,r)&&r!==n&&pe(e,r,{get:()=>t[r],enumerable:!(o=Wt(t,r))||o.enumerable});return e};var en=e=>Jt(pe({},"__esModule",{value:!0}),e);var or={};Zt(or,{AUTOMATIC_ROUND_TABLE_RADIUS_MAX:()=>yt,AUTOMATIC_ROUND_TABLE_RADIUS_MIN:()=>pt,CHAIR_NUMBERING_DIRECTIONS:()=>at,CHAIR_NUMBERING_FORMATS:()=>st,CHAIR_NUMBERING_START_MAX:()=>Ie,DEFAULT_SEAT_RADIUS:()=>Vt,FLOOR_COVER_LIMIT:()=>Gt,FLOOR_STACK_GAP_RATIO:()=>Nt,FLOOR_STACK_MIN_SURFACE_PX:()=>Ho,LEVEL_CONTEXT_PREFIX:()=>he,TABLE_SEAT_OFFSET:()=>V,TEXT_BACKGROUND_PADDING_MAX:()=>pr,TEXT_BACKGROUND_RADIUS_MAX:()=>yr,TEXT_LETTER_SPACING_MAX:()=>hr,TEXT_LETTER_SPACING_MIN:()=>mr,TEXT_LINE_HEIGHT_MAX:()=>fr,TEXT_LINE_HEIGHT_MIN:()=>dr,TEXT_OPACITY_MIN:()=>br,TEXT_WIDTH_MAX:()=>ur,TEXT_WIDTH_MIN:()=>lr,aisleSeatIds:()=>Yt,allObjects:()=>_t,automaticRoundTableRadius:()=>oo,buildAisleHoles:()=>on,buildSeatIndex:()=>Ko,buildSectionShell:()=>nn,chairNumberingProblem:()=>Ln,chartBounds:()=>X,combinedFloorZoneId:()=>Be,compactChairNumbering:()=>_n,cubicPoint:()=>se,distanceToRings:()=>We,distributeAlongCubic:()=>ye,effectiveFloorOverview:()=>Ht,expandBooth:()=>At,expandChart:()=>Ne,expandRow:()=>Rt,expandRowSlots:()=>kt,expandTable:()=>Et,expandTableSlots:()=>De,floorObjects:()=>Co,floorStackPlacements:()=>Bt,floorsOf:()=>Q,gridStats:()=>Wo,hitTest:()=>Yo,initialFloorMode:()=>Go,isAisleSeat:()=>er,isRowAisleSeats:()=>Z,layoutCombinedFloorPlan:()=>Lo,layoutFloorStack:()=>To,levelContextOutlines:()=>Fo,mainFloorId:()=>Bo,mergeRowAisleSeats:()=>nr,nearestWithin:()=>zo,objectCenter:()=>Fe,owningSectionForObject:()=>Lt,pointInPolygon:()=>Le,pointInPolygonWithHoles:()=>B,pointOnPolygonBoundary:()=>Tt,polygonArea:()=>Se,polygonInscribedAnchor:()=>Me,polygonLabelPoint:()=>je,polygonNetArea:()=>cn,queryRect:()=>$o,resolveRowAisleSeats:()=>Jo,resolveSegmentedRowGroups:()=>te,rowInventoryCount:()=>Mo,rowSeatPositions:()=>oe,segmentedRowComponentSeats:()=>vn,segmentedRowComponents:()=>wn,segmentedRowSeatTotal:()=>Pn,smoothCubicThroughMiddle:()=>tn,splitRowAisleSeats:()=>tr,stackFloors:()=>ko,suggestedFloorOverview:()=>_o,tableChairBookingLabel:()=>Ce,tableChairDisplayLabel:()=>ke,tableChairToken:()=>ct,tableInventoryCount:()=>wo,tableSeatCountsBySide:()=>Ot,textLayoutMetrics:()=>ge,translateObject:()=>me,usableHoles:()=>U});module.exports=en(or);var ir=Math.PI/180;function T(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function L(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function se(e,t){let n=1-t,o=n*n*n,r=3*n*n*t,i=3*n*t*t,a=t*t*t;return{x:o*e.start.x+r*e.control1.x+i*e.control2.x+a*e.end.x,y:o*e.start.y+r*e.control1.y+i*e.control2.y+a*e.end.y}}function tn(e,t,n){let o={x:(e.x+t.x)/2,y:(e.y+t.y)/2},r={x:(n.x-o.x)*4/3,y:(n.y-o.y)*4/3};return{start:{...e},control1:{x:e.x+(t.x-e.x)/3+r.x,y:e.y+(t.y-e.y)/3+r.y},control2:{x:e.x+(t.x-e.x)*2/3+r.x,y:e.y+(t.y-e.y)*2/3+r.y},end:{...t}}}function ye(e,t,n=192){if(!Number.isInteger(t)||t<1)throw new Error("Path point count must be a positive integer");if(t===1)return[se(e,.5)];let o=Array.from({length:n+1},(u,c)=>se(e,c/n)),r=new Float64Array(o.length);for(let u=1;u<o.length;u+=1){let c=o[u].x-o[u-1].x,l=o[u].y-o[u-1].y;r[u]=r[u-1]+Math.hypot(c,l)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let a=[],s=1;for(let u=0;u<t;u+=1){let c=i*u/(t-1);for(;s<r.length-1&&r[s]<c;)s+=1;let l=r[s-1],d=r[s],m=d===l?0:(c-l)/(d-l);a.push({x:o[s-1].x+(o[s].x-o[s-1].x)*m,y:o[s-1].y+(o[s].y-o[s-1].y)*m})}return a}function _(e,t){return{x:e.x+t.x,y:e.y+t.y}}function J(e,t){return{x:e.x-t.x,y:e.y-t.y}}function D(e,t){return{x:e.x*t,y:e.y*t}}function ce(e,t=13){return Array.from({length:t},(n,o)=>se(e,o/(t-1)))}function Ue(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return L(e[o],e[o+1],n-o)}function Xe(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[Ue(e,o)];for(let a=1;a<e.length-1;a+=1){let s=a/(e.length-1);s>o+1e-9&&s<r-1e-9&&i.push(e[a])}return i.push(Ue(e,r)),i}function Ke(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([m,p],y)=>{let b=T(L(e[m],e[p],.5),t);b<r&&(r=b,o=y)});let i=e[o],a=e[(o+1)%4],s=e[(o+2)%4],u=e[(o+3)%4],c=L(i,a,.5),l=J(t,c),d=Math.max(1e-9,Math.hypot(l.x,l.y));return{p0:i,p1:a,p2:s,p3:u,normal:D(l,1/d),depth:(T(i,u)+T(a,s))/2}}function Ye(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:a}=e,s=J(n,t),u=J(o,r),c=a*.22,l=a*.12;return{nearPath:{start:t,control1:_(_(t,D(s,1/3)),D(i,c)),control2:_(_(t,D(s,2/3)),D(i,c)),end:n},farPath:{start:o,control1:_(_(r,D(u,2/3)),D(i,l)),control2:_(_(r,D(u,1/3)),D(i,l)),end:r}}}function nn(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((y,b)=>_(y,b),{x:0,y:0});o.x/=4,o.y/=4;let r=T(e[0],e[1]),i=T(e[0],e[3]),a=n==="auto"?r>i*1.25&&T(o,t)>i?"bezier":"tapered":n;if(a==="rectangle")return{mode:a,outline:e.map(y=>({...y}))};let s=Ke(e,t),{p0:u,p1:c,p2:l,p3:d}=s;if(a==="tapered")return{mode:a,outline:[_(u,D(J(c,u),.14)),_(u,D(J(c,u),1-.14)),l,d]};let{nearPath:m,farPath:p}=Ye(s);return{mode:a,outline:[...ce(m),...ce(p).slice(1)]}}function on(e,t,n,o){if(e.length!==4)throw new Error("Aisle generation requires four mapped bounds corners");if(!Number.isInteger(n)||n<0||n>3)throw new Error("Aisle count must be an integer from 0 to 3");if(n===0)return[];let r=Ke(e,t),{p0:i,p1:a,p2:s,p3:u}=r,c=o==="bezier"?Ye(r):null,l=c?ce(c.nearPath):null,d=c?ce(c.farPath).reverse():null,m=Math.min(.055,.18/(n+1));return Array.from({length:n},(p,y)=>{let b=(y+1)/(n+1),M=b-m/2,v=b+m/2;return l&&d?[...Xe(l,M,v),...Xe(d,M,v).reverse()]:[L(i,a,M),L(i,a,v),L(u,s,v),L(u,s,M)]})}var lr=40,ur=1200,dr=.8,fr=3,mr=-2,hr=20,br=.1,pr=40,yr=40,ze=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function rn(e,t){let n=e.text.split(/\r?\n/);if(!e.width)return Math.max(1,n.length);let o=Math.max(1,Math.floor(t/ze(e))),r=0;for(let i of n){if(!i.length){r+=1;continue}let a=0;for(let s of i.split(/\s+/)){let u=s.length;a&&a+1+u<=o?a+=1+u:(r+=Math.max(1,Math.ceil(u/o)),a=u%o)}}return Math.max(1,r)}function ge(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(s=>s.length))*ze(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),a=rn(e,i);return{width:r,height:a*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:a,padding:t}}function an(e,t,n){let o=n.x-t.x,r=n.y-t.y,i=o*o+r*r,a=i?Math.max(0,Math.min(1,((e.x-t.x)*o+(e.y-t.y)*r)/i)):0;return Math.hypot(e.x-(t.x+a*o),e.y-(t.y+a*r))}function We(e,t){let n=1/0;for(let o of t)if(!(o.length<2))for(let r=0,i=o.length-1;r<o.length;i=r++){let a=an(e,o[i],o[r]);a<n&&(n=a)}return n}function $e(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,a=t[o].y,s=t[r].x,u=t[r].y;a>e.y!=u>e.y&&e.x<(s-i)*(e.y-a)/(u-a)+i&&(n=!n)}return n}function qe(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function sn(e,t,n){let o=$e(e,t)&&!n.some(i=>$e(e,i)),r=We(e,[t,...n]);return o?r:-r}function Y(e,t,n,o,r){let i=sn({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var xe=class{constructor(){this.items=[]}get size(){return this.items.length}push(t){let n=this.items;n.push(t);let o=n.length-1;for(;o>0;){let r=o-1>>1;if(n[r].max>=n[o].max)break;[n[r],n[o]]=[n[o],n[r]],o=r}}pop(){let t=this.items,n=t[0],o=t.pop();if(t.length&&o){t[0]=o;let r=0;for(;;){let i=r*2+1,a=i+1,s=r;if(i<t.length&&t[i].max>t[s].max&&(s=i),a<t.length&&t[a].max>t[s].max&&(s=a),s===r)break;[t[s],t[r]]=[t[r],t[s]],r=s}}return n}};function Se(e){if(e.length<3)return 0;let t=0;for(let n=0,o=e.length-1;n<e.length;o=n++)t+=(e[o].x+e[n].x)*(e[o].y-e[n].y);return Math.abs(t)/2}function cn(e,t){return Math.max(0,Se(e)-qe(t).reduce((n,o)=>n+Se(o),0))}function Me(e,t){let n=qe(t);if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let b=e.reduce((v,C)=>v+C.x,0)/e.length,M=e.reduce((v,C)=>v+C.y,0)/e.length;return{point:{x:b,y:M},radius:0}}let o=1/0,r=1/0,i=-1/0,a=-1/0;for(let b of e)b.x<o&&(o=b.x),b.y<r&&(r=b.y),b.x>i&&(i=b.x),b.y>a&&(a=b.y);let s=i-o,u=a-r,c=Math.min(s,u);if(!(c>0))return{point:{x:(o+i)/2,y:(r+a)/2},radius:0};let l=Math.max(s,u)/150,d=new xe,m=c/2;for(let b=o;b<i;b+=c)for(let M=r;M<a;M+=c)d.push(Y(b+m,M+m,m,e,n));let p=Y(o+s/2,r+u/2,0,e,n),y=0;for(;d.size;){let b=d.pop();if(!b)break;b.d>p.d&&(p=b),!(b.max-p.d<=l)&&(y>=4e3||(y+=1,m=b.h/2,d.push(Y(b.x-m,b.y-m,m,e,n)),d.push(Y(b.x+m,b.y-m,m,e,n)),d.push(Y(b.x-m,b.y+m,m,e,n)),d.push(Y(b.x+m,b.y+m,m,e,n))))}return{point:{x:p.x,y:p.y},radius:Math.max(0,p.d)}}function ee(e,t,n){return Math.max(t,Math.min(n,e))}function N(e,t,n){return e<t?t:e>n?n:e}function ln(e){return ee(e,0,1)}function Qe(e){let t=ln(e);return t*t*(3-2*t)}var z=Math.PI*2;function $(e){return Number.isFinite(e.x)&&Number.isFinite(e.y)}function un(e,t,n){let o=t-e;if(n){for(;o<0;)o+=z;for(;o>=z;)o-=z}else{for(;o>0;)o-=z;for(;o<=-z;)o+=z}return o}function et(e){if(e.version!==1||e.closed!==!0||!$(e.start)||!Array.isArray(e.segments)||e.segments.length<2||e.segments.length>512)return!1;let t=e.start;for(let n of e.segments){if(!n||!$(n.end))return!1;if(n.kind==="line"){if(T(t,n.end)<=1e-9)return!1}else if(n.kind==="bezier"){if(!$(n.control1)||!$(n.control2)||T(t,n.end)<=1e-9)return!1}else if(n.kind==="arc"){if(!$(n.center)||!Number.isFinite(n.radius)||n.radius<=1e-6||Math.abs(T(t,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||Math.abs(T(n.end,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||T(t,n.end)<=1e-9)return!1}else return!1;t=n.end}return T(t,e.start)<=1e-4}function dn(e,t,n){let o=1-n;return{x:o**3*e.x+3*o**2*n*t.control1.x+3*o*n**2*t.control2.x+n**3*t.end.x,y:o**3*e.y+3*o**2*n*t.control1.y+3*o*n**2*t.control2.y+n**3*t.end.y}}function tt(e,t=2){if(!et(e))throw new Error("Section outline path is invalid");let n=Math.max(.25,t),o=[{...e.start}],r=e.start;for(let i of e.segments){if(i.kind==="line")o.push({...i.end});else if(i.kind==="arc"){let a=Math.atan2(r.y-i.center.y,r.x-i.center.x),s=Math.atan2(i.end.y-i.center.y,i.end.x-i.center.x),u=un(a,s,i.clockwise),c=Math.max(2,Math.ceil(Math.abs(u)*i.radius/n));for(let l=1;l<=c;l+=1){let d=a+u*l/c;o.push({x:i.center.x+Math.cos(d)*i.radius,y:i.center.y+Math.sin(d)*i.radius})}}else{let a=T(r,i.control1)+T(i.control1,i.control2)+T(i.control2,i.end),s=Math.max(2,Math.ceil(a/n));for(let u=1;u<=s;u+=1)o.push(dn(r,i,u/s))}r=i.end}return T(o[o.length-1],o[0])<=1e-4&&o.pop(),o}function nt(e,t,n){return fn(e,r=>({x:r.x+t,y:r.y+n}))}function fn(e,t,n=1,o=!1){return{...e,start:t(e.start),segments:e.segments.map(r=>r.kind==="line"?{...r,end:t(r.end)}:r.kind==="arc"?{...r,center:t(r.center),radius:r.radius*Math.abs(n),clockwise:o?!r.clockwise:r.clockwise,end:t(r.end)}:{...r,control1:t(r.control1),control2:t(r.control2),end:t(r.end)})}}var mn=45,we=150,hn=60;function bn(e){let t=mn/100;if(e<=t)return we;let n=Math.min(1,(e-t)/(1-t));return we-n*(we-hn)}var Ze=.5523;function Je(e,t){return Math.abs(e.x-t.x)<=1e-6&&Math.abs(e.y-t.y)<=1e-6}function pn(e){let t=[],n=[];for(e.forEach((o,r)=>{$(o)&&(t.length&&Je(t[t.length-1],o)||(t.push({x:o.x,y:o.y}),n.push(r)))});t.length>1&&Je(t[0],t[t.length-1]);)t.pop(),n.pop();return{points:t,sourceIndex:n}}var yn=.5,gn=4/3;function xn(e,t,n){let o=t.x-e.x,r=t.y-e.y,i=Math.hypot(o,r);if(i<=1e-9)return{kind:"line",end:{...t}};let a=-r/i,s=o/i,u=n*gn;return{kind:"bezier",control1:{x:e.x+o/3+a*u,y:e.y+r/3+s*u},control2:{x:e.x+o*2/3+a*u,y:e.y+r*2/3+s*u},end:{...t}}}function ot(e,t){let{points:n,sourceIndex:o}=pn(e),r=n.length;if(r<3)return null;let i=Math.min(100,Math.max(0,t.cornerSmoothing??0))/100,a=t.edgeCurvature,s=new Array(r).fill(0);if(a?.length)for(let S=0;S<r;S+=1){let g=a[o[S]];s[S]=Number.isFinite(g)?Math.min(100,Math.max(-100,g))/100:0}let u=s.some(S=>Math.abs(S)>1e-6);if(i<=0&&!u)return null;let c=t.wideAngleThresholdDeg??bn(i),l=[];for(let S=0;S<r;S+=1)l[S]=T(n[S],n[(S+1)%r]);let d=new Array(r).fill(0);for(let S=0;S<r;S+=1){let g=n[(S-1+r)%r],f=n[S],h=n[(S+1)%r],w={x:g.x-f.x,y:g.y-f.y},x={x:h.x-f.x,y:h.y-f.y},I=Math.hypot(w.x,w.y),E=Math.hypot(x.x,x.y);if(I<=1e-9||E<=1e-9)continue;let P=Math.min(1,Math.max(-1,(w.x*x.x+w.y*x.y)/(I*E))),k=Math.acos(P)*180/Math.PI;if(k<c)continue;let O=Qe((k-c)/(180-c));d[S]=i*O*.5*Math.min(I,E)}for(let S=0;S<r;S+=1){let g=(S+1)%r,f=d[S]+d[g];if(f>l[S]&&f>1e-9){let h=l[S]/f;d[S]*=h,d[g]*=h}}let m=new Array(r),p=new Array(r);for(let S=0;S<r;S+=1){let g=n[(S-1+r)%r],f=n[S],h=n[(S+1)%r];if(d[S]<=1e-6){m[S]={...f},p[S]={...f};continue}let w=T(f,g)||1,x=T(f,h)||1;m[S]={x:f.x+(g.x-f.x)/w*d[S],y:f.y+(g.y-f.y)/w*d[S]},p[S]={x:f.x+(h.x-f.x)/x*d[S],y:f.y+(h.y-f.y)/x*d[S]}}if(d.every(S=>S<=1e-6)&&!u)return null;let y=[],b={...p[0]},M=b,v=(S,g)=>{if(T(M,S)<=1e-9)return;let f=s[g];Math.abs(f)>1e-6?y.push(xn(M,S,f*yn*l[g])):y.push({kind:"line",end:{...S}}),M=S};for(let S=1;S<=r;S+=1){let g=S%r,f=n[g];v(m[g],(S-1)%r),d[g]>1e-6&&T(m[g],p[g])>1e-9&&(y.push({kind:"bezier",control1:L(m[g],f,Ze),control2:L(p[g],f,Ze),end:{...p[g]}}),M=p[g])}if(!y.length)return null;let C=y[y.length-1];T(C.end,b)>1e-9&&(C.kind==="line"?C.end={...b}:y.push({kind:"line",end:{...b}}));let R={version:1,closed:!0,start:b,segments:y};return et(R)?R:null}function Sn(e){let t=e.points??[];if(e.kind!=="polygon"||t.length<3||!Array.isArray(e.edgeCurvature))return[];let n=t.map((o,r)=>{let i=e.edgeCurvature[r];return Number.isFinite(i)?Math.min(100,Math.max(-100,i)):0});return n.some(o=>Math.abs(o)>.5)?n:[]}function Mn(e){let t=Sn(e);return t.length?ot(e.points,{edgeCurvature:t}):null}function le(e,t=2){let n=Mn(e);return n?tt(n,t):e.points??[]}function wn(e,t,n){let o=[];for(let r=0;r<e.length-1;r+=1){let i=e[r],a=e[r+1],s=Math.hypot(a.x-i.x,a.y-i.y);if(s<=0)continue;let u=Math.max(1,Math.round(s/n)),c=s/u,l=Math.atan2(a.y-i.y,a.x-i.x),d=r===0,p=(r>0?t[r-1]:void 0)==="break"?2:1,y=d?{...i}:{x:i.x+Math.cos(l)*c*p,y:i.y+Math.sin(l)*c*p},b=d?u+1:Math.max(1,u-(p-1));o.push({origin:y,rotation:l*180/Math.PI,seatCount:b,seatSpacing:c})}return o}function vn(e){let t=e.rotation*Math.PI/180,n={x:Math.cos(t),y:Math.sin(t)};return Array.from({length:e.seatCount},(o,r)=>({x:e.origin.x+n.x*r*e.seatSpacing,y:e.origin.y+n.y*r*e.seatSpacing}))}function Pn(e){return e.reduce((t,n)=>t+n.seatCount,0)}function te(e){let t=new Map,n=new Map;for(let o of e){if(o.type!=="row"||!o.segmentedRow)continue;let r=n.get(o.segmentedRow.groupId)??[];r.push(o),n.set(o.segmentedRow.groupId,r)}for(let[o,r]of n){let i=r.slice().sort((m,p)=>m.segmentedRow.componentIndex-p.segmentedRow.componentIndex),a=i[0]?.segmentedRow?.componentCount??0,s=i[0]?.segmentedRow;if(!s||!(a>=2&&i.length===a&&s?.boundaryBefore==="start"&&i.every((m,p)=>m.segmentedRow?.kind==="segmented-row-v1"&&m.segmentedRow.groupId===o&&m.segmentedRow.componentCount===a&&m.segmentedRow.componentIndex===p&&m.segmentedRow.repeatLabelOnComponents===s.repeatLabelOnComponents&&(p===0?m.segmentedRow.boundaryBefore==="start":m.segmentedRow.boundaryBefore!=="start")&&m.segmentedRow.displayLabel===s.displayLabel)))continue;let c=i.reduce((m,p)=>m+p.seatCount,0),l=0,d=0;for(let m of i)m.segmentedRow.boundaryBefore==="break"&&(l+=1),t.set(m.id,{groupId:o,adjacencyOffset:l,displayOffset:d,displayLabel:s.displayLabel,totalSeats:c,canonical:i[0],viewFromSeatUrl:s.viewFromSeatUrl,viewFromSeatMeta:s.viewFromSeatMeta,confidenceEvidence:s.confidenceEvidence}),l+=m.seatCount,d+=m.seatCount}return t}var In="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var Cn="abcdefghijklmnopqrstuvwxyz";function kn(e,t){let n=t.length,o=e+1,r="";for(;o>0;){o-=1;let i=o%n;r=t[i]+r,o=Math.floor(o/n)}return r}function ne(e,t=!1){let n=t?Cn:In;return kn(Math.max(0,Math.floor(e)-1),n)}var Rn=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function rt(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of Rn)for(;t>=o;)n+=r,t-=o;return n}function On(e){let t=new Array(e);return Array.from({length:e},(n,o)=>o).sort((n,o)=>Math.abs(2*n-(e-1))-Math.abs(2*o-(e-1))||n-o).forEach((n,o)=>t[n]=o),t}function ve(e,t){let n=e.seatLabelStart??1,o=e.seatNumbering?.direction??"ltr",r=e.seatNumbering?.step??1,i=e.seatNumbering?.scheme??"decimal",a=e.seatNumbering?.prefix??"",s=e.seatNumbering?.endAt,u=e.seatCount;if(i==="updown"||i==="updown-descending"){let p=Math.ceil(u/2),y=i==="updown"?t<p?n+2*t:n-1+2*(u-t):t<p?n+2*(p-1-t):n+1+2*(t-p);return`${a}${y}`}let c=i==="odd"||i==="even"?2:r,l=s!=null&&Number.isFinite(s)?s-(u-1)*c:n,d=o==="center"?On(u)[t]:o==="rtl"?u-1-t:t,m;switch(i){case"odd":{let p=l%2===1?l:l+1;m=String(p+d*2);break}case"even":{let p=l%2===0?l:l+1;m=String(p+d*2);break}case"roman":m=rt(l+d*r);break;case"letters-upper":m=ne(l+d*r,!1);break;case"letters-lower":m=ne(l+d*r,!0);break;default:m=String(l+d*r);break}return`${a}${m}`}function En(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function it(e,t,n){return n?.label??`${e.seatLabelBase??e.label}-${ve(e,t)}`}function An(e,t,n,o){if(o?.displayLabel)return null;if(e.seatDisplayLabelMode==="number"||!n)return{row:e.displayLabel||e.label,seat:ve(e,t)};let r=En(n);return{row:n.displayLabel,seat:ve(r,n.displayOffset+t)}}function Pe(e,t,n,o){let r=An(e,t,n,o);return r?e.seatDisplayLabelMode==="number"?r.seat:`${r.row}-${r.seat}`:o.displayLabel}var Ie=999,at=["clockwise","anticlockwise"],st=["table-number","number","letter"];function Ce(e,t){return`${e.label}-${t+1}`}function Tn(e,t,n){return e?.direction==="anticlockwise"?Math.max(0,t-1-n):n}function ct(e,t){let n=e.chairNumbering,o=n?.start??1,r=Tn(n,Math.max(0,Math.round(e.seatCount)),t);return n?.format==="letter"?ne(Math.max(1,o)+r):String(o+r)}function ke(e,t){let n=ct(e,t);return(e.chairNumbering?.format??"table-number")==="table-number"?`${e.displayLabel??e.label}-${n}`:n}function Ln(e){if(e===void 0)return null;if(!e||typeof e!="object"||Array.isArray(e))return"chairNumbering must be an object";let t=e,n=Object.keys(t).filter(o=>!["start","direction","format"].includes(o));return n.length?`chairNumbering has unsupported field(s): ${n.join(", ")}`:t.start!==void 0&&(!Number.isInteger(t.start)||t.start<0||t.start>Ie)?`chairNumbering.start must be a whole number from 0 to ${Ie}`:t.direction!==void 0&&!at.includes(t.direction)?"chairNumbering.direction must be clockwise or anticlockwise":t.format!==void 0&&!st.includes(t.format)?"chairNumbering.format must be table-number, number or letter":null}function _n(e){let t={};return e.start!==void 0&&e.start!==1&&(t.start=e.start),e.direction==="anticlockwise"&&(t.direction="anticlockwise"),e.format&&e.format!=="table-number"&&(t.format=e.format),Object.keys(t).length?t:void 0}var W=.02291666666666667,Tr=1/W,Dn=58,jn=Dn*W;var Fn=3,lt=0,Re=120,Nn=0,Bn=45,Hn=7,q=1.2;function Oe(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function Gn(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Hn?e:Fn}function ut(e,t={}){let n=Oe(t.floorBaseHeightM,lt,Re,0),o=Math.min(Re,n+Gn(e.elevation)*jn),r=e.height===void 0?o:Oe(e.height,lt,Re,o),i=Oe(e.rake,Nn,Bn,0);return{height:r,rake:i}}function dt(e){let t=e.length;return t<=3?[...e]:[e[Math.floor(t*.25)],e[Math.floor(t*.5)],e[Math.floor(t*.75)]]}function ft(e,t,n){if(!e.length)return 1/0;if(e.length===1)return Math.hypot(t-e[0].x,n-e[0].y);let o=1/0;for(let r=0;r+1<e.length;r++){let i=e[r],a=e[r+1],s=a.x-i.x,u=a.y-i.y,c=s*s+u*u,l=c>1e-12?((t-i.x)*s+(n-i.y)*u)/c:0;l<0?l=0:l>1&&(l=1);let d=t-(i.x+l*s),m=n-(i.y+l*u);if(Math.abs(d)>=o||Math.abs(m)>=o)continue;let p=Math.hypot(d,m);p<o&&(o=p)}return o}function Vn(e){let t=0,n=0;for(let i of e)t+=i.x,n+=i.y;let o=e.length||1;t/=o,n/=o;let r=0;for(let i of e){let a=Math.hypot(i.x-t,i.y-n);a>r&&(r=a)}return{cx:t,cy:n,r}}function mt(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function Ee(e,t){let n=1/0;for(let o of dt(e)){let r=ft(t,o.x,o.y);r<n&&(n=r)}for(let o of dt(t)){let r=ft(e,o.x,o.y);r<n&&(n=r)}return n}function Un(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let l of e)n+=l.x,o+=l.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let l of e){let d=Math.hypot(l.x-n,l.y-o);d>r&&(r=d,i=l)}let a=i.x-n,s=i.y-o,u=Math.hypot(a,s);u>1e-9?(a/=u,s/=u):(a=1,s=0);let c=e.map((l,d)=>({p:l,i:d,t:(l.x-n)*a+(l.y-o)*s})).sort((l,d)=>l.t-d.t);return{pts:c.map(l=>l.p),seatIndices:c.map(l=>t[l.i])}}function Xn(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let C of e)n+=C.x,o+=C.y;n/=t,o/=t;let r=0,i=0,a=0,s=0,u=0,c=0,l=0;for(let C of e){let R=C.x-n,S=C.y-o;r+=R*R,a+=S*S,i+=R*S,s+=R*R*R,u+=S*S*S,c+=R*S*S,l+=S*R*R}let d=r*a-i*i;if(Math.abs(d)<1e-9)return null;let m=(s+c)/2,p=(u+l)/2,y=(m*a-p*i)/d,b=(p*r-m*i)/d,M=y+n,v=b+o;return!Number.isFinite(M)||!Number.isFinite(v)?null:{cx:M,cy:v}}var Kn=.15,Yn=.001;function zn(e){let t=e[0],n=e[e.length-1],o=n.x-t.x,r=n.y-t.y,i=Math.hypot(o,r);if(!(i>1e-9))return 0;let a=0;for(let s of e){let u=Math.abs((s.x-t.x)*r-(s.y-t.y)*o)/i;u>a&&(a=u)}return a/i}function $n(e){if(e.length<2)return null;let t=e.map(g=>{let f=0,h=0;for(let w of g.pts)f+=w.x,h+=w.y;return{x:f/g.pts.length,y:h/g.pts.length}}),n=0,o=0;for(let g of t)n+=g.x,o+=g.y;n/=t.length,o/=t.length;let r=0,i=0,a=0;for(let g of t){let f=g.x-n,h=g.y-o;r+=f*f,i+=f*h,a+=h*h}let s=r+a,u=r*a-i*i,c=s/2+Math.sqrt(Math.max(0,s*s/4-u)),l,d;Math.abs(i)>1e-12?(l=c-a,d=i):r>=a?(l=1,d=0):(l=0,d=1);let m=Math.hypot(l,d);if(!(m>1e-12))return null;l/=m,d/=m;let p=0,y=0,b=0;for(let g of e){if(g.pts.length<2)continue;let f=g.pts[0],h=g.pts[g.pts.length-1],w=h.x-f.x,x=h.y-f.y,I=Math.hypot(w,x);if(!(I>1e-9))continue;let E=w/I,P=x/I;p+=(E*E-P*P)*I,y+=2*E*P*I,b+=I}if(b>0&&Math.hypot(p,y)>=qn*b){let g=Math.atan2(y,p)/2;l=-Math.sin(g),d=Math.cos(g)}let M=1/0,v=-1/0,C=[];for(let g of e){let f=1/0,h=-1/0;for(let w of g.pts){let x=w.x*l+w.y*d;x<f&&(f=x),x>h&&(h=x),x<M&&(M=x),x>v&&(v=x)}C.push(h-f)}let R=v-M;return R>1e-9?(C.sort((g,f)=>g-f),C[Math.min(C.length-1,Math.floor(C.length*.9))]/R<=Wn?{x:l,y:d}:null):null}var Wn=.35,qn=.8;function ht(e,t,n,o){let r=new Map;for(let f of n){let h=t[f],w=h.rowId||`__seat-${f}`,x=r.get(w);x||(x={pts:[],idx:[]},r.set(w,x)),x.pts.push({x:h.x,y:h.y}),x.idx.push(f)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[f,h]of r){let w=Un(h.pts,h.idx),x=0;for(let I of w.pts)x+=Math.hypot(I.x-o.x,I.y-o.y);i.push({id:f,pts:w.pts,seatIndices:w.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:x/w.pts.length})}let a=i.map(f=>Vn(f.pts)),s=i.length<=256?i.length*(i.length-1)/2:0,u=s?new Float64Array(s):null;u?.fill(Number.NaN);let c=u?new Map(i.map((f,h)=>[f,h])):null,l=(f,h)=>(f>h&&([f,h]=[h,f]),f*(2*i.length-f-1)/2+(h-f-1)),d=(f,h)=>{if(!u)return Ee(i[f].pts,i[h].pts);let w=l(f,h),x=u[w];if(!Number.isNaN(x))return x;let I=Ee(i[f].pts,i[h].pts);return u[w]=I,I},m=(f,h)=>c?d(c.get(f),c.get(h)):Ee(f.pts,h.pts),p=[];for(let f=0;f<i.length;f++){let h=1/0;for(let w=0;w<i.length;w++){if(f===w||mt(a[f],a[w])>=h)continue;let x=d(f,w);x<h&&(h=x)}Number.isFinite(h)&&p.push(h)}p.sort((f,h)=>f-h);let y=p.length?p[Math.floor(p.length/2)]:1,b=Math.max(y*1.8,1e-6),M=i.map(()=>[]);for(let f=0;f<i.length;f++)for(let h=f+1;h<i.length;h++)mt(a[f],a[h])>b||d(f,h)<=b&&(M[f].push(h),M[h].push(f));let v=0;for(let f=0;f<i.length;f++){if(i[f].blockId!==-1)continue;let h=v++,w=[f];for(i[f].blockId=h;w.length;){let x=w.pop();for(let I of M[x])i[I].blockId===-1&&(i[I].blockId=h,w.push(I))}}let C=new Map;for(let f of i){let h=C.get(f.blockId)??[];h.push(f),C.set(f.blockId,h)}let R=[];for(let f of i){if(f.pts.length<4||zn(f.pts)<Yn)continue;let h=Xn(f.pts);h&&(!Number.isFinite(h.cx)||!Number.isFinite(h.cy)||R.push({x:h.cx,y:h.cy}))}let S=R.length>=2?(()=>{let f=R.map(x=>x.x).sort((x,I)=>x-I),h=R.map(x=>x.y).sort((x,I)=>x-I),w=Math.floor(R.length/2);return{cx:f[w],cy:h[w]}})():null;if(S){let f=P=>Math.hypot(P.x-S.cx,P.y-S.cy),h=1/0,w=-1/0,x=[];for(let P of i){let k=1/0,O=-1/0;for(let j of P.pts){let H=f(j);H<k&&(k=H),H>O&&(O=H)}x.push(O-k),k<h&&(h=k),O>w&&(w=O)}let I=w-h;x.sort((P,k)=>P-k);let E=x[Math.min(x.length-1,Math.floor(x.length*.9))];if(I>1e-9&&E/I<=Kn){let P=i.map(A=>{let ae=0;for(let $t of A.pts)ae+=f($t);return{row:A,radius:ae/A.pts.length}}),k=0,O=0;for(let A of P)k+=A.radius,O+=A.row.focalDistance;k/=P.length,O/=P.length;let j=0;for(let A of P)j+=(A.radius-k)*(A.row.focalDistance-O);if(j<0)for(let A of P)A.radius=-A.radius;let G=1/0;for(let A of P)A.radius<G&&(G=A.radius);P.sort((A,ae)=>A.radius-ae.radius);let F=-1,K=-1/0,zt=I/Math.max(1,P.length)*.5,Ve=[];for(let A of P)A.radius-K>zt&&(F++,K=A.radius),A.row.ordinal=F,A.row.blockDepth=A.radius-G,Ve.push(A.row);return{sectionId:e,rows:Ve,blockCount:v}}}let g=[];for(let[,f]of C){let h=$n(f);if(h){let w=P=>{let k=0;for(let O of P.pts)k+=O.x*h.x+O.y*h.y;return k/P.pts.length};f.sort((P,k)=>w(P)-w(k)),f.length>=2&&f[0].focalDistance>f[f.length-1].focalDistance&&f.reverse();let x=[],I=y*.5;for(let P of f){let k=x[x.length-1];k&&Math.abs(w(P)-w(k[0]))<I?k.push(P):x.push([P])}let E=0;for(let P=0;P<x.length;P++){if(P>0){let k=1/0;for(let O of x[P-1])for(let j of x[P])k=Math.min(k,m(O,j));k=Math.min(k,Math.abs(w(x[P][0])-w(x[P-1][0]))),E+=k}for(let k of x[P])k.ordinal=P,k.blockDepth=E,g.push(k)}}else{let w=1/0;for(let x of f)x.focalDistance<w&&(w=x.focalDistance);f.sort((x,I)=>x.focalDistance-I.focalDistance);for(let x=0;x<f.length;x++)f[x].ordinal=x,f[x].blockDepth=Math.max(0,f[x].focalDistance-w),g.push(f[x])}}return{sectionId:e,rows:g,blockCount:v}}var Qn=/^\d{4}-\d{2}-\d{2}$/;function Zn(e){let t=Date.parse(e);return Number.isFinite(t)?Qn.test(e)?t+864e5:t:null}function Jn(e,t=Date.now()){if(e.validUntil===void 0){if(e.status!=="approved")return!0;let o=e.assessedAt?Date.parse(e.assessedAt):Number.NaN;return Number.isFinite(o)&&(t instanceof Date?t.getTime():t)<=o+366*864e5}let n=Zn(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function eo(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function to(e){return e.status!=="draft"&&e.status!=="retracted"}function no(e,t){return e.status===void 0?t===void 0:e.status!=="approved"?!0:typeof t=="string"&&typeof e.basisSha256=="string"&&e.basisSha256===t}function bt(e,t={}){return!!e&&to(e)&&eo(e,t.activeConfigurationId,t.activeConfigurationVersion)&&no(e,t.activeBasisSha256)&&Jn(e,t.now)}var pt=36,yt=160;function oo(e,t=360){let n=ee(Math.round(Number.isFinite(e)?e:1),1,40),o=ee(Number.isFinite(t)?t:360,120,360);return Math.round(ee(n*4*(360/o),pt,yt))}var ro=new Set(["pitch-football","rink-hockey","track-athletics","oval-cricket","pitch-rugby","diamond-baseball","court-basketball","court-tennis","ring-boxing"]);function io(e){return!!e&&ro.has(e)}var gt=1.1;var Nr=Math.PI*2;var Br=(()=>{let t={x:0,y:52},n=25,o={x:70,y:t.y-70},r=(o.x*o.x+o.y*o.y-4900)/(2*(o.y+70)),i=r+70,a=[],s=Math.atan2(o.y-r,o.x),u=Math.atan2(o.y-r,-o.x);for(let c=0;c<=24;c++){let l=s+(u-s)*c/24;a.push({x:i*Math.cos(l),y:r+i*Math.sin(l)})}return{half:70,home:t,backstop:n,fence:a}})();function xt(e){return io(e)}function ao(e){if((e.kind==="polygon"||e.kind==="polyline"||e.kind==="line")&&e.points&&e.points.length>=2)return e.kind==="polygon"?le(e,6):e.points;if(e.x==null||e.y==null||e.width==null||e.height==null)return null;let t=e.x,n=e.y,o=e.width,r=e.height;return[{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+r},{x:t,y:n+r}]}function so(e,t,n){let o=n*Math.PI/180,r=Math.cos(o),i=Math.sin(o),a=e.x-t.x,s=e.y-t.y;return{x:t.x+a*r-s*i,y:t.y+a*i+s*r}}function St(e){let t=ao(e);if(!t||t.length<2)return null;let n=e.rotation??0,o=Math.abs(n)<1e-6?t:t.map(u=>so(u,{x:t.reduce((c,l)=>c+l.x,0)/t.length,y:t.reduce((c,l)=>c+l.y,0)/t.length},n)),r=1/0,i=1/0,a=-1/0,s=-1/0;for(let u of o)r=Math.min(r,u.x),i=Math.min(i,u.y),a=Math.max(a,u.x),s=Math.max(s,u.y);return!Number.isFinite(r)||a-r<1e-6||s-i<1e-6?null:{minX:r,minY:i,maxX:a,maxY:s}}var co=5,lo=3,uo=.92,fo=1.9,mo=2,ho=.6,bo=1,po=.06;function yo(e){return e.heightM!==void 0?e.heightM:e.stageKind==="ring-boxing"?gt:xt(e.stageKind)?po:bo}function Mt(e){let t=1/0,n=1/0,o=-1/0,r=-1/0,i=-1/0;for(let a of Q(e)){let s=a.baseHeightM??0;for(let u of a.objects){if(u.type!=="shape"||u.role!=="stage")continue;let c=St(u);c&&(t=Math.min(t,c.minX),n=Math.min(n,c.minY),o=Math.max(o,c.maxX),r=Math.max(r,c.maxY),i=Math.max(i,s+yo(u)))}}return!Number.isFinite(t)||!Number.isFinite(i)?null:{minX:t,minY:n,maxX:o,maxY:r,deckTopM:i}}function go(e,t,n,o){let r=1/0,i=1/0,a=-1/0,s=-1/0;for(let p of e)Number.isFinite(p.eyeHeightM)&&(r=Math.min(r,p.x),a=Math.max(a,p.x),i=Math.min(i,p.y),s=Math.max(s,p.y));if(!Number.isFinite(r))return null;let u=r*t,c=i*t,l=Math.max(1,Math.ceil((a-r)*t/n)+1),d=Math.max(1,Math.ceil((s-i)*t/n)+1),m=new Float64Array(l*d).fill(-1/0);for(let p of e){if(!Number.isFinite(p.eyeHeightM))continue;let y=p.eyeHeightM-q,b=Math.min(l-1,Math.max(0,Math.floor((p.x*t-u)/n))),v=Math.min(d-1,Math.max(0,Math.floor((p.y*t-c)/n)))*l+b,C=y+o;C>m[v]&&(m[v]=C)}return{cellM:n,minX:u,minY:c,cols:l,rows:d,top:m}}function xo(e,t,n){let o=Math.floor((t-e.minX)/e.cellM),r=Math.floor((n-e.minY)/e.cellM);return o<0||r<0||o>=e.cols||r>=e.rows?-1/0:e.top[r*e.cols+o]}function wt(e,t,n={}){let o=new Map;if(!t||!e.length)return o;let r=n.metresPerChartUnit??W,i=n.cellM??ho,a=n.chairBackM??uo,s=n.selfRowSkipM??mo,u=n.clearThreshold??.9,c=n.partialThreshold??.25,l=Math.max(1,n.columns??co),d=Math.max(1,n.rows??lo),m=go(e,r,i,a);if(!m)return o;let p=(t.maxX-t.minX)*r,y=(t.maxY-t.minY)*r,b=p>=y,M=(t.minX+t.maxX)/2*r,v=(t.minY+t.maxY)/2*r,C=[];for(let S=0;S<l;S++){let g=(S+.5)/l-.5,f=b?M+g*p:M,h=b?v:v+g*y;for(let w=0;w<d;w++){let x=t.deckTopM+(d===1?0:w/(d-1)*fo);C.push({x:f,y:h,z:x})}}let R=i/2;for(let S of e){if(!Number.isFinite(S.eyeHeightM))continue;let g=S.x*r,f=S.y*r,h=S.eyeHeightM,w=0,x=1/0;for(let E of C){let P=E.x-g,k=E.y-f,O=Math.hypot(P,k);if(!(O>s)){w++;continue}let j=P/O,H=k/O,G=0;for(let F=s;F<O;F+=R){let K=xo(m,g+j*F,f+H*F);if(!(!Number.isFinite(K)||K>=h)&&K>h+(E.z-h)*F/O){G=F;break}}G?x=Math.min(x,G):w++}let I=w/C.length;I>=u||o.set(S.id,{seatId:S.id,mark:I<c?"obstructedView":"restrictedView",visibleFraction:I,totalRays:C.length,atDistanceM:Number.isFinite(x)?x:0})}return o}function vt(e,t){if(!t.size)return 0;let n=0;for(let o of e){let r=t.get(o.id);if(!r)continue;let i=o.commercial;i?.restrictedView!==void 0||i?.obstructedView!==void 0||(o.commercial={...i,[r.mark]:!0},n++)}return n}function Ae(e){return e?e.accessibility?.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var fe=Math.PI/180,So=9,V=16;function Te(e,t,n,o){let r=n*fe,i=Math.cos(r),a=Math.sin(r);return{x:o.x+e*i-t*a,y:o.y+e*a+t*i}}function oe(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,a=[];if(e.path)return ye(e.path,t);if(t<=1)return t===1&&a.push({x:i.x,y:i.y}),a;if(o===0){for(let c=0;c<t;c++)a.push(Te(c*n,0,r,i));return a}let s=o/(t-1)*fe,u=n/(2*Math.sin(Math.abs(s)/2));for(let c=0;c<t;c++){let l=c*s,d=u*Math.sin(l),m=-u+u*Math.cos(l);a.push(Te(d,m,r,i))}return a}function _e(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function Mo(e){let t=new Set((e.overrides??[]).filter(n=>n.skip&&Number.isInteger(n.index)&&n.index>=0&&n.index<e.seatCount).map(n=>n.index));return Math.max(0,e.seatCount-t.size)}function kt(e,t){let n=_e(e);return oe(e).map((o,r)=>{let i=n.get(r),a=Ae(i),s=it(e,r,i),u={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:s,displayLabel:Pe(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:a.length>0,accessibility:a,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(u).some(c=>c!==void 0&&c!==!1&&c!=="")?u:void 0,glyph:i?.glyph,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle??e.seatLabelStyle}})}function Rt(e){let t=[];for(let n of kt(e))n.skipped||t.push({id:`${e.id}:${n.index}`,label:n.label,displayLabel:n.displayLabel===n.label?void 0:n.displayLabel,x:n.x,y:n.y,rowId:e.id,categoryKey:n.categoryKey,accessible:n.accessible||void 0,accessibility:n.accessibility.length?n.accessibility:void 0,wheelchairSpaceType:n.wheelchairSpaceType,commercial:n.commercial,glyph:n.glyph,viewUrl:n.viewUrl,viewMeta:n.viewMeta,labelStyle:n.labelStyle});return t}function Ot(e){if(e.seatCountsBySide)return{...e.seatCountsBySide};let t=e.sides&&e.sides.length?e.sides:["top","bottom"],n=["top","bottom","left","right"].filter(i=>t.includes(i)),o={top:0,bottom:0,left:0,right:0};if(!n.length)return o;let r=Math.max(0,Math.round(e.seatCount));for(let i=0;i<r;i++)o[n[i%n.length]]+=1;return o}function De(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(l=>[l.index,l])),r=(l,d,m,p)=>{let y=o.get(l),b=Ae(y),M=y?.label??Ce(e,l);return{index:l,label:M,displayLabel:y?.displayLabel??ke(e,l),x:d+(y?.dx??0),y:m+(y?.dy??0),categoryKey:y?.categoryKey??e.categoryKey,skipped:!!y?.skip,accessible:b.length>0,accessibility:b,wheelchairSpaceType:y?.wheelchairSpaceType,commercial:y?.commercial,glyph:y?.glyph,viewUrl:y?.viewFromSeatUrl,viewMeta:y?.viewFromSeatUrl?y.viewFromSeatMeta:void 0,labelStyle:y?.labelStyle,...p?{side:p}:{}}};if(e.shape==="round"){let l=(e.radius??40)+V,d=e.rotation*fe,m=Math.max(0,Math.min(360,e.seatArc??360));if(m>=360||n===1){for(let M=0;M<n;M++){let v=d+M/n*2*Math.PI;t.push(r(M,e.center.x+l*Math.cos(v),e.center.y+l*Math.sin(v)))}return t}let p=m*fe,y=(2*Math.PI-p)/2,b=d+y;for(let M=0;M<n;M++){let v=b+M/(n-1)*p;t.push(r(M,e.center.x+l*Math.cos(v),e.center.y+l*Math.sin(v)))}return t}let i=e.width??80,a=e.height??50,s=Ot(e),u=["top","bottom","left","right"],c=0;for(let l of u){let d=s[l];for(let m=0;m<d;m++){let p,y;l==="top"?(p=-i/2+(m+.5)*i/d,y=-a/2-V):l==="bottom"?(p=-i/2+(m+.5)*i/d,y=a/2+V):l==="left"?(p=-i/2-V,y=-a/2+(m+.5)*a/d):(p=i/2+V,y=-a/2+(m+.5)*a/d);let b=Te(p,y,e.rotation,e.center);t.push(r(c++,b.x,b.y,l))}}return t}function wo(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):De(e).filter(t=>!t.skipped).length}function Et(e){return De(e).filter(t=>!t.skipped).map(t=>({id:`${e.id}:${t.index}`,label:t.label,...t.displayLabel!==t.label?{displayLabel:t.displayLabel}:{},x:t.x,y:t.y,rowId:e.id,categoryKey:t.categoryKey,...t.accessible?{accessible:!0}:{},...t.accessibility.length?{accessibility:t.accessibility}:{},...t.wheelchairSpaceType?{wheelchairSpaceType:t.wheelchairSpaceType}:{},...t.commercial?{commercial:t.commercial}:{},...t.glyph?{glyph:t.glyph}:{},...t.viewUrl?{viewUrl:t.viewUrl}:{},...t.viewUrl&&t.viewMeta?{viewMeta:t.viewMeta}:{},...t.labelStyle?{labelStyle:t.labelStyle}:{}}))}function At(e){return[{id:`${e.id}:0`,label:e.label,...e.displayLabel&&e.displayLabel!==e.label?{displayLabel:e.displayLabel}:{},x:e.center.x,y:e.center.y,rowId:e.id,categoryKey:e.categoryKey,kind:"booth",...e.commercial?.note?{commercial:{note:e.commercial.note}}:{}}]}function Le(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,a=t[o].y,s=t[r].x,u=t[r].y;a>e.y!=u>e.y&&e.x<(s-i)*(e.y-a)/(u-a)+i&&(n=!n)}return n}function Tt(e,t){return t.some((n,o)=>{let r=t[(o+1)%t.length],i=(e.y-n.y)*(r.x-n.x)-(e.x-n.x)*(r.y-n.y);if(Math.abs(i)>1e-7)return!1;let a=(e.x-n.x)*(r.x-n.x)+(e.y-n.y)*(r.y-n.y),s=(r.x-n.x)**2+(r.y-n.y)**2;return a>=-1e-7&&a<=s+1e-7})}function U(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function B(e,t,n){return Le(e,t)&&!U(n).some(o=>Le(e,o)||Tt(e,o))}function je(e,t){return Me(e,t).point}function de(e){if(!e.length)return{x:0,y:0};let t=0,n=0;for(let o of e)t+=o.x,n+=o.y;return{x:t/e.length,y:n/e.length}}function Fe(e){switch(e.type){case"row":{let t=oe(e),n=_e(e),o=0,r=0,i=0;for(let a=0;a<t.length;a++){let s=n.get(a);s?.skip||(o+=t[a].x+(s?.dx??0),r+=t[a].y+(s?.dy??0),i++)}return i?{x:o/i,y:r/i}:{x:e.origin.x,y:e.origin.y}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return de(e.points);case"section":return de(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?de(e.points):e.x!=null&&e.y!=null&&e.width!=null&&e.height!=null?{x:e.x+e.width/2,y:e.y+e.height/2}:{x:e.x??0,y:e.y??0};case"decorImage":return{x:e.x+e.width/2,y:e.y+e.height/2}}}function Pt(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function vo(e,t){if(e.type!=="gaArea"||!Pt(e.points,t.outline))return!1;let n=U(e.holes),o=U(t.holes);return n.length===o.length&&n.every((r,i)=>Pt(r,o[i]))}function Lt(e,t,n=e.filter(r=>r.type==="section"),o=Fe(t)){let r="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0;return(r?n.find(a=>(a.logicalSectionId??a.id)===r&&(vo(t,a)||B(o,a.outline,a.holes))):void 0)??n.find(a=>B(o,a.outline,a.holes))??(t.type==="row"&&Po(t)?Io(t,n):void 0)}function Po(e){return(e.overrides??[]).some(t=>t.skip===!0)}function Io(e,t){let n=oe(e),o=_e(e),r,i=0;for(let a of t){let s=0;for(let u=0;u<n.length;u++){let c=o.get(u);if(c?.skip)continue;let l={x:n[u].x+(c?.dx??0),y:n[u].y+(c?.dy??0)};B(l,a.outline,a.holes)&&s++}s>i&&(r=a,i=s)}return r}function Q(e){return e.floors&&e.floors.length?e.floors:[{id:"floor-0",name:"Main",objects:e.objects,focalPoint:e.focalPoint,referenceImage:e.referenceImage,backgroundImage:e.backgroundImage}]}function Co(e,t){let n=Q(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function _t(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function me(e,t,n){let o=i=>({x:i.x+t,y:i.y+n}),r=i=>i.map(o);switch(e.type){case"row":return{...e,origin:o(e.origin)};case"table":case"booth":return{...e,center:o(e.center)};case"gaArea":return{...e,points:r(e.points),...e.holes?{holes:U(e.holes).map(r)}:{}};case"section":return{...e,outline:r(e.outline),...e.outlinePath?{outlinePath:nt(e.outlinePath,t,n)}:{},...e.holes?{holes:U(e.holes).map(r)}:{}};case"text":return{...e,position:o(e.position)};case"shape":return{...e,...e.points?{points:r(e.points)}:{},...e.holes?{holes:U(e.holes).map(r)}:{},...e.x!=null?{x:e.x+t}:{},...e.y!=null?{y:e.y+n}:{}};case"decorImage":return{...e,x:e.x+t,y:e.y+n}}}function ko(e,t=900){if(!e.floors||e.floors.length<2)return e;let n=[];return e.floors.forEach((o,r)=>{let i=-r*t;for(let a of o.objects)n.push(i===0?a:me(a,0,i))}),{...e,objects:n,floors:void 0}}function It(e,t,n,o,r,i,a,s,u){let c=[],l=e.filter(b=>b.type==="section"),d=te(e),m=b=>!b?.eventConfigurationId||b.eventConfigurationId===o&&(b.eventConfigurationVersion===void 0||b.eventConfigurationVersion===u),p=b=>bt(b,{activeConfigurationId:o,activeConfigurationVersion:u,activeBasisSha256:r,now:s}),y=(b,M)=>p(b)?{...b,coverage:M}:void 0;for(let b of e){let M=[];if(b.type==="row"?M=Rt(b):b.type==="table"?M=Et(b):b.type==="booth"&&(M=At(b)),!M.length)continue;for(let g of M)g.viewUrl&&!m(g.viewMeta)&&(g.viewUrl=void 0,g.viewMeta=void 0);if(b.type==="row"){let g=d.get(b.id);if(g){let f=new Map((b.overrides??[]).map(h=>[h.index,h]));for(let h of M){let w=Number(h.id.slice(h.id.lastIndexOf(":")+1));if(!Number.isInteger(w))continue;h.logicalRowId=g.groupId,h.logicalSeatIndex=g.adjacencyOffset+w,f.get(w)?.displayLabel||(h.displayLabel=Pe(b,w,g)),!h.viewUrl&&g.viewFromSeatUrl&&m(g.viewFromSeatMeta)&&(h.viewUrl=g.viewFromSeatUrl,h.viewMeta=g.viewFromSeatMeta);let x=f.get(w)?.confidenceEvidence;h.confidenceEvidence=y(x,"exact-seat")??y(b.confidenceEvidence,"row-representative")??y(g.confidenceEvidence,"row-representative")}}}let v=Lt(e,b,l,b.type==="row"?de(M):Fe(b)),C=v?.viewFromSeatUrl,S=(v?.zone?t?.find(g=>g.id===v.zone):void 0)?.focalPoint??n;for(let g of M){if(!g.confidenceEvidence){let f=Number(g.id.slice(g.id.lastIndexOf(":")+1)),h=(b.type==="row"||b.type==="table")&&Number.isInteger(f)?b.overrides?.find(w=>w.index===f)?.confidenceEvidence:void 0;g.confidenceEvidence=y(h,"exact-seat")??(b.type==="row"?y(b.confidenceEvidence,"row-representative"):void 0)}g.confidenceEvidence??=y(v?.confidenceEvidence,"section-representative")??(a?y(a.evidence,a.coverage):void 0),!g.viewUrl&&C&&m(v?.viewFromSeatMeta)&&(g.viewUrl=C,g.viewMeta=v?.viewFromSeatMeta),!g.viewUrl&&i&&m(i.meta)&&(g.viewUrl=i.url,g.viewMeta=i.meta),v&&(g.sectionId=v.logicalSectionId??v.id),v?.zone&&(g.zoneId=v.zone),S&&(g.focalPoint={...S})}c.push(...M)}return c}function Ne(e,t={}){if(e.floors?.length){let o=[];for(let r of e.floors){let i=r.focalPoint??e.focalPoint,a=r.viewFromSeatUrl?{url:r.viewFromSeatUrl,meta:r.viewFromSeatMeta}:e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,s=r.confidenceEvidence?{evidence:r.confidenceEvidence,coverage:"floor-representative"}:e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,u=It(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,a,s,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&Ct(r.objects,r.focalPoint??e.focalPoint,r.baseHeightM??0,u);for(let c of u)c.floorId=r.id;for(let c of u)o.push(c)}return o}let n=It(e.objects,e.zones,e.focalPoint,e.eventConfigurationId,e.confidenceBasisSha256,e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);return t.resolveEyeHeights!==!1&&Ct(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),Ro(e,n,t)}function Ro(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||vt(t,wt(t,Mt(e))),t}function Ct(e,t,n,o){let r=e.filter(d=>d.type==="section"),i=n>0||r.some(d=>d.height!==void 0||d.rake!==void 0||(d.elevation??0)>0);if(!r.length||!i||!t){for(let d of o)d.eyeHeightM=n+q;return}let a=new Array(o.length),s=new Map;for(let d of r)s.has(d.id)||s.set(d.id,d);let u=new Map,c=new Map;for(let d=0;d<o.length;d++){let m=o[d],y=(m.sectionId?s.get(m.sectionId)??r.find(M=>M.logicalSectionId===m.sectionId&&B({x:m.x,y:m.y},M.outline,M.holes)):void 0)??r.find(M=>B({x:m.x,y:m.y},M.outline,M.holes))??null;if(a[d]=y,!y)continue;u.has(y.id)||u.set(y.id,ut(y,{floorBaseHeightM:n}));let b=c.get(y.id);b?b.push(d):c.set(y.id,[d])}let l=new Array(o.length).fill(void 0);for(let[d,m]of c){let p=u.get(d);if(!p)continue;let y=p.rake>0?Math.tan(p.rake*Math.PI/180):0,b=ht(d,o,m,t);for(let M of b.rows){let v=M.blockDepth*W*y,C=p.height+v;for(let R of M.seatIndices)l[R]=C}}for(let d=0;d<o.length;d++){let m=o[d],p=a[d];if(!p){m.eyeHeightM=n+q;continue}let y=u.get(p.id);m.eyeHeightM=(l[d]??y.height)+q}}var ue=40;function X(e,t){let n=t?.freeText==="exclude",o=1/0,r=1/0,i=-1/0,a=-1/0,s=(c,l)=>{c<o&&(o=c),l<r&&(r=l),c>i&&(i=c),l>a&&(a=l)},u=c=>{if(Array.isArray(c))for(let l of c)!l||typeof l!="object"||s(l.x,l.y)};for(let c of _t(e))if(c.type==="row"){let l=new Map((c.overrides??[]).map(d=>[d.index,d]));oe(c).forEach((d,m)=>{let p=l.get(m);p?.skip||s(d.x+(p?.dx??0),d.y+(p?.dy??0))})}else if(c.type==="gaArea")u(c.points);else if(c.type==="section")u(c.outline);else if(c.type==="decorImage")s(c.x,c.y),s(c.x+c.width,c.y+c.height);else if(c.type==="shape")c.points&&c.points.length?u(le(c)):c.x!=null&&c.y!=null&&c.width!=null&&c.height!=null&&(s(c.x,c.y),s(c.x+c.width,c.y+c.height));else if(c.type==="table"){let l=V+So,d=c.shape==="round"?(c.radius??40)+l:Math.max((c.width??80)/2,(c.height??50)/2)+l;s(c.center.x-d,c.center.y-d),s(c.center.x+d,c.center.y+d)}else if(c.type==="booth"){let l=Math.max(c.width,c.height)/2;s(c.center.x-l,c.center.y-l),s(c.center.x+l,c.center.y+l)}else if(c.type==="text"){if(n)continue;let l=ge(c);s(c.position.x,c.position.y),s(c.position.x+l.width,c.position.y+l.height)}for(let c of[e.referenceImage,e.backgroundImage]){if(!c)continue;let{center:l,width:d}=c;if(!l||!Number.isFinite(l.x)||!Number.isFinite(l.y)||!Number.isFinite(d))continue;let m=d*3/4;s(l.x-d/2,l.y-m/2),s(l.x+d/2,l.y+m/2)}if(!isFinite(o)){let c=e.focalPoint??{x:0,y:0};return{x:c.x-200,y:c.y-200,width:400,height:400}}return{x:o-ue,y:r-ue,width:i-o+ue*2,height:a-r+ue*2}}function Dt(e){let t=e.backgroundImage;return t?.url&&!t.assetId?t:void 0}var Nt=.08,Oo=.045;function Be(e){return`__floor__:${encodeURIComponent(e)}`}function ie(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function Eo(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function Bt(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(a=>X(ie(e,a.objects,a.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(a=>a.width))*Nt,i=0;return t.map((a,s)=>{let u=n[s],c=i-(u.y+u.height);return i-=u.height+r,{floorId:a.id,label:a.name??a.id,level:s,levelBadge:s===0?"G":String(s),translation:{x:-Eo(a,e,u),y:c},bounds:u}})}function Ao(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*Oo),a=e.bounds.x+e.translation.x-i*2.4,s=e.bounds.y+e.translation.y+i*.4,u=`floor-level-${e.floorId}`;if(t==="name")return[{type:"text",id:`${u}-text`,text:r,position:{x:a,y:s},fontSize:i,rotation:0,color:o,bold:!0}];let c=i*.95,l={type:"shape",id:`${u}-badge`,kind:"ellipse",x:a-c*.35,y:s-c*.3,width:c*2,height:c*2,fill:"transparent",stroke:{color:o,width:Math.max(1,i*.09)},opacity:.8},d={type:"text",id:`${u}-text`,text:r,position:{x:l.x,y:l.y+c-i/2},width:c*2,align:"center",lineHeight:1,fontSize:i,rotation:0,color:o,bold:!0};return[l,d]}function To(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=Bt(e),r=[];n.forEach((c,l)=>{let{x:d,y:m}=o[l].translation;for(let p of c.objects)l>0&&p.type==="shape"&&p.role==="stage"||r.push(me(p,d,m))});let i={...e,objects:r,floors:void 0},a=X(i,{freeText:"exclude"}),s=Math.max(1,a.width,a.height),u=e.theme?.textColor??"#94a3b8";for(let c of o)r.push(...Ao(c,t.labelStyle??"number",s,u));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function Lo(e){if(!e.floors||e.floors.length<2)return e;let t=!e.zones?.length,n=new Set,o=e.floors.flatMap(i=>i.objects.flatMap(a=>{if(a.type==="shape"&&a.role==="stage"){let s=JSON.stringify([a.kind,a.x,a.y,a.width,a.height,a.points,a.rotation??0,a.label,a.heightM,a.eventConfigurationIds]);if(n.has(s))return[];n.add(s)}return t&&a.type==="section"?[{...a,zone:Be(i.id)}]:[a]})),r=t?e.floors.map(i=>({id:Be(i.id),label:i.name,focalPoint:{...i.focalPoint}})):e.zones;return{...e,objects:o,zones:r,floors:void 0,referenceImage:void 0,backgroundImage:Dt(e)}}function Ht(e){return e.floorOverview==="combined"?"combined":"separated"}function _o(e){let t=e.floors??[];if(t.length<2||t.some(r=>!r.objects.some(i=>Do.has(i.type))))return"separated";let n=jt.get(e);if(n)return n;let o=jo(e)?"separated":"combined";return jt.set(e,o),o}var Do=new Set(["row","table","booth","gaArea","section"]),Gt=.1,re=18,jt=new WeakMap;function jo(e){let t=e.floors??[],n=(i,a)=>`${Math.floor(i/re)}:${Math.floor(a/re)}`,o=t.map(i=>{let a=Ne(ie(e,i.objects,i.focalPoint)).map(u=>({x:u.x,y:u.y})),s={areas:[],seats:new Map};for(let u of i.objects)u.type==="section"&&u.outline?.length>=3&&s.areas.push({outer:u.outline,holes:u.holes}),u.type==="gaArea"&&u.points?.length>=3&&s.areas.push({outer:u.points,holes:u.holes});for(let u of a){let c=n(u.x,u.y),l=s.seats.get(c);l?l.push(u):s.seats.set(c,[u])}return{seats:a,footprint:s}}),r=(i,a)=>{let s=Math.floor(i.x/re),u=Math.floor(i.y/re);for(let c=-1;c<=1;c+=1)for(let l=-1;l<=1;l+=1)for(let d of a.seats.get(`${s+c}:${u+l}`)??[])if(Math.hypot(d.x-i.x,d.y-i.y)<re)return!0;return!1};return o.some((i,a)=>{if(!i.seats.length)return!1;let s=o.filter((c,l)=>l!==a).map(c=>c.footprint),u=0;for(let c of i.seats)s.some(l=>l.areas.some(d=>B(c,d.outer,d.holes))||r(c,l))&&(u+=1);return u/i.seats.length>Gt})}var he="level-context:";function Fo(e,t){let n=e.floors??[];if(n.length<2||Ht(e)!=="combined")return[];let o="#8a93a6",r=[],i=n.find(s=>s.id===t),a=i?X(ie(e,i.objects,i.focalPoint),{freeText:"exclude"}):null;for(let s of n){if(s.id===t)continue;let u=0;for(let m of s.objects){let p=m.type==="section"?m.outline:m.type==="gaArea"?m.points:null;if(!p||p.length<3)continue;let y={type:"shape",id:`${he}${s.id}:${u++}`,kind:"polygon",label:"",points:p.map(b=>({...b})),fill:"transparent",stroke:{color:o,width:1.5},opacity:.35};r.push(y)}let c=X(ie(e,s.objects,s.focalPoint),{freeText:"exclude"});if(!u||!a||!No(c,a))continue;let l=r.filter(m=>m.type==="shape"&&m.id.startsWith(`${he}${s.id}:`)&&!!m.points),d=l.reduce((m,p)=>Ft(p.points)>Ft(m.points)?p:m,l[0]);r.push({type:"text",id:`${he}${s.id}:name`,text:s.name??s.id,position:je(d.points,void 0),fontSize:Math.max(1,Math.max(a.width,a.height)*.024),rotation:0,color:o,opacity:.6})}return r}function No(e,t){return e.x>=t.x&&e.y>=t.y&&e.x+e.width<=t.x+t.width&&e.y+e.height<=t.y+t.height}function Ft(e){let t=e.map(o=>o.x),n=e.map(o=>o.y);return(Math.max(...t)-Math.min(...t))*(Math.max(...n)-Math.min(...n))}function Bo(e){let t=e.floors;if(!t?.length)return null;let n=t.find(i=>i.objects.some(a=>a.type==="shape"&&a.role==="stage"));if(n)return n.id;let o=t[0],r=-1;for(let i of t){let a=X(ie(e,i.objects,i.focalPoint),{freeText:"exclude"}),s=a.width*a.height;s>r&&(r=s,o=i)}return o.id}var Ho=640;function Go(e,t){return(e.floors?.length??0)<2?null:"all"}var Vt=9;function Vo(e){if(e.kind==="circle")return{hx:e.r,hy:e.r};let t=e.width/2,n=e.height/2,o=e.rotation??0;if(!o)return{hx:t,hy:n};let r=o*Math.PI/180,i=Math.abs(Math.cos(r)),a=Math.abs(Math.sin(r));return{hx:t*i+n*a,hy:t*a+n*i}}function Uo(e,t,n){let o=t-e.seat.x,r=n-e.seat.y;if(e.shape.kind==="circle")return o*o+r*r<=e.shape.r*e.shape.r;let i=e.shape.rotation??0,a=o,s=r;if(i){let u=-i*Math.PI/180,c=Math.cos(u),l=Math.sin(u);a=o*c-r*l,s=o*l+r*c}return Math.abs(a)<=e.shape.width/2&&Math.abs(s)<=e.shape.height/2}function Xo(e,t,n,o,r){if(e.shape.kind==="circle"){let y=Math.min(Math.max(e.seat.x,t),o),b=Math.min(Math.max(e.seat.y,n),r),M=e.seat.x-y,v=e.seat.y-b;return M*M+v*v<=e.shape.r*e.shape.r}let i=e.shape.rotation??0;if(!i)return e.seat.x-e.hx<=o&&e.seat.x+e.hx>=t&&e.seat.y-e.hy<=r&&e.seat.y+e.hy>=n;let a=i*Math.PI/180,s=Math.cos(a),u=Math.sin(a),c=e.shape.width/2,l=e.shape.height/2,d=[[-c,-l],[c,-l],[c,l],[-c,l]].map(([y,b])=>[e.seat.x+y*s-b*u,e.seat.y+y*u+b*s]),m=[[t,n],[o,n],[o,r],[t,r]],p=[[1,0],[0,1],[s,u],[-u,s]];for(let[y,b]of p){let M=1/0,v=-1/0;for(let[S,g]of d){let f=S*y+g*b;f<M&&(M=f),f>v&&(v=f)}let C=1/0,R=-1/0;for(let[S,g]of m){let f=S*y+g*b;f<C&&(C=f),f>R&&(R=f)}if(v<C||R<M)return!1}return!0}function Ko(e,t={}){let n=t.seatRadius??Vt,o=e.length,r=new Array(o),i=1/0,a=1/0,s=-1/0,u=-1/0,c=0;for(let f=0;f<o;f++){let h=e[f],w=t.shapeOf?.(h)??{kind:"circle",r:n},{hx:x,hy:I}=Vo(w);r[f]={seat:h,shape:w,hx:x,hy:I},h.x-x<i&&(i=h.x-x),h.y-I<a&&(a=h.y-I),h.x+x>s&&(s=h.x+x),h.y+I>u&&(u=h.y+I),x>c&&(c=x),I>c&&(c=I)}o===0&&(i=0,a=0,s=0,u=0);let l=c>0?c*4:1,d=Math.max(s-i,0),m=Math.max(u-a,0),p=Math.max(64,t.maxCells??o*4),y=l,b=Math.max(1,Math.ceil(d/y)||1),M=Math.max(1,Math.ceil(m/y)||1);for(;b*M>p&&(b>1||M>1);)y*=2,b=Math.max(1,Math.ceil(d/y)||1),M=Math.max(1,Math.ceil(m/y)||1);let v=b*M,C=new Int32Array(v+1),R=0;for(let f=0;f<o;f++){let h=r[f],w=N(Math.floor((h.seat.x-h.hx-i)/y),0,b-1),x=N(Math.floor((h.seat.x+h.hx-i)/y),0,b-1),I=N(Math.floor((h.seat.y-h.hy-a)/y),0,M-1),E=N(Math.floor((h.seat.y+h.hy-a)/y),0,M-1);for(let P=I;P<=E;P++)for(let k=w;k<=x;k++)C[P*b+k+1]++,R++}for(let f=0;f<v;f++)C[f+1]+=C[f];let S=new Int32Array(R),g=C.slice(0,v);for(let f=0;f<o;f++){let h=r[f],w=N(Math.floor((h.seat.x-h.hx-i)/y),0,b-1),x=N(Math.floor((h.seat.x+h.hx-i)/y),0,b-1),I=N(Math.floor((h.seat.y-h.hy-a)/y),0,M-1),E=N(Math.floor((h.seat.y+h.hy-a)/y),0,M-1);for(let P=I;P<=E;P++)for(let k=w;k<=x;k++){let O=P*b+k;S[g[O]++]=f}}return{seats:e,entries:r,minX:i,minY:a,cell:y,cols:b,rows:M,cellStart:C,items:S,stamp:new Int32Array(o),epoch:0}}function Yo(e,t,n={}){let{cols:o,rows:r,cell:i,minX:a,minY:s,cellStart:u,items:c,entries:l}=e,d=Math.floor((t.x-a)/i),m=Math.floor((t.y-s)/i);if(d<0||m<0||d>=o||m>=r)return null;let p=m*o+d,y=u[p+1],b=-1,M=1/0;for(let v=u[p];v<y;v++){let C=c[v],R=l[C];if(n.filter&&!n.filter(R.seat.id,R.seat)||!Uo(R,t.x,t.y))continue;let S=t.x-R.seat.x,g=t.y-R.seat.y,f=S*S+g*g;(f<M||f===M&&C<b)&&(M=f,b=C)}return b<0?null:l[b].seat.id}function zo(e,t,n,o={}){if(!(n>0))return null;let{cols:r,rows:i,cell:a,minX:s,minY:u,cellStart:c,items:l,entries:d}=e,m=Math.max(0,Math.floor((t.x-n-s)/a)),p=Math.min(r-1,Math.floor((t.x+n-s)/a)),y=Math.max(0,Math.floor((t.y-n-u)/a)),b=Math.min(i-1,Math.floor((t.y+n-u)/a));if(m>p||y>b)return null;let M=-1,v=n*n,C=e.stamp,R=++e.epoch;for(let S=y;S<=b;S++){let g=S*r;for(let f=m;f<=p;f++){let h=g+f,w=c[h+1];for(let x=c[h];x<w;x++){let I=l[x];if(C[I]===R)continue;C[I]=R;let E=d[I];if(o.filter&&!o.filter(E.seat.id,E.seat))continue;let P=t.x-E.seat.x,k=t.y-E.seat.y,O=P*P+k*k;(O<v||O===v&&I<M)&&(v=O,M=I)}}}return M<0?null:d[M].seat.id}function $o(e,t,n={}){let o=Math.min(t.x,t.x+t.width),r=Math.max(t.x,t.x+t.width),i=Math.min(t.y,t.y+t.height),a=Math.max(t.y,t.y+t.height),s=n.mode??"center",{cols:u,rows:c,cell:l,minX:d,minY:m,cellStart:p,items:y,entries:b}=e,M=Math.max(0,Math.floor((o-d)/l)),v=Math.min(u-1,Math.floor((r-d)/l)),C=Math.max(0,Math.floor((i-m)/l)),R=Math.min(c-1,Math.floor((a-m)/l));if(M>v||C>R)return[];let S=[],g=e.stamp,f=++e.epoch;for(let h=C;h<=R;h++){let w=h*u;for(let x=M;x<=v;x++){let I=w+x,E=p[I+1];for(let P=p[I];P<E;P++){let k=y[P];if(g[k]===f)continue;g[k]=f;let O=b[k];if(n.filter&&!n.filter(O.seat.id,O.seat))continue;(s==="center"?O.seat.x>=o&&O.seat.x<=r&&O.seat.y>=i&&O.seat.y<=a:Xo(O,o,i,r,a))&&S.push(k)}}}return S.sort((h,w)=>h-w),S.map(h=>b[h].seat.id)}function Wo(e){let t=e.cols*e.rows,n=0,o=0;for(let i=0;i<t;i++){let a=e.cellStart[i+1]-e.cellStart[i];a>0&&n++,a>o&&(o=a)}let r=e.items.length;return{cell:e.cell,cols:e.cols,rows:e.rows,cells:t,occupiedCells:n,refs:r,maxPerCell:o,meanPerOccupiedCell:n?r/n:0}}var qo=[{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"}],yi=new Map(qo.map(e=>[e.key,e]));var Qo=[{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"}],gi=new Map(Qo.map(e=>[e.key,e]));var Ut=["start","end","both","none"];var Zo=["reference-focal","bar","entrance","exit","restroom","screen","sound","concession","coat","wall","rail","suite","obstruction"],xi=new Set(Zo);function Z(e){return typeof e=="string"&&Ut.includes(e)}function be(e,t){return e&&t?"both":e?"start":t?"end":"none"}function Xt(e){let t=new Map,n=te(e);if(!n.size)return t;let o=new Map;for(let r of e){if(r.type!=="row"||!n.has(r.id))continue;let i=r.segmentedRow.groupId,a=o.get(i)??[];a.push(r),o.set(i,a)}for(let r of o.values())r.sort((i,a)=>i.segmentedRow.componentIndex-a.segmentedRow.componentIndex),r.forEach((i,a)=>{let s=r[a+1];t.set(i.id,{start:a>0&&i.segmentedRow.boundaryBefore==="continuous",end:!!s&&s.segmentedRow.boundaryBefore==="continuous"})});return t}function Kt(e,t){let n=Number.isInteger(e.seatCount)&&e.seatCount>0?e.seatCount:0,o=new Set;for(let d of e.overrides??[])d.skip&&o.add(d.index);let r=d=>d>=0&&d<n&&!o.has(d),i=be(!t?.start,!t?.end),a=Z(e.aisleSeats)?e.aisleSeats:void 0;if(!a)return{automatic:i,slots:[]};let s=a,u=-1,c=-1;for(let d=0;d<n;d+=1)r(d)&&(u<0&&(u=d),c=d);let l=new Set;if(u>=0){(s==="start"||s==="both")&&l.add(u),(s==="end"||s==="both")&&l.add(c);for(let d of o)r(d-1)&&l.add(d-1),r(d+1)&&l.add(d+1)}return{override:a,automatic:i,slots:[...l].sort((d,m)=>d-m)}}function Jo(e,t=[e]){return Kt(e,e.segmentedRow?Xt(t).get(e.id):void 0)}function Yt(e){let t=new Set;for(let n of Q(e)){let o=Xt(n.objects);for(let r of n.objects)if(r.type==="row")for(let i of Kt(r,o.get(r.id)).slots)t.add(`${r.id}:${i}`)}return t}function er(e,t,n){return Yt(e).has(`${t}:${n}`)}function He(e){let t=Z(e.aisleSeats)?e.aisleSeats:"none";return{start:t==="start"||t==="both",end:t==="end"||t==="both"}}function Ge(e,t){e.aisleSeats=t}function tr(e,t,n){if(!Z(e.aisleSeats)){delete t.aisleSeats,delete n.aisleSeats;return}let o=He(e);Ge(t,be(o.start,!0)),Ge(n,be(!0,o.end))}function nr(e,t){let n=e[0],o=e[e.length-1];if(!n||!o||!Z(n.aisleSeats)&&!Z(o.aisleSeats)){delete t.aisleSeats;return}Ge(t,be(He(n).start,He(o).end))}0&&(module.exports={AUTOMATIC_ROUND_TABLE_RADIUS_MAX,AUTOMATIC_ROUND_TABLE_RADIUS_MIN,CHAIR_NUMBERING_DIRECTIONS,CHAIR_NUMBERING_FORMATS,CHAIR_NUMBERING_START_MAX,DEFAULT_SEAT_RADIUS,FLOOR_COVER_LIMIT,FLOOR_STACK_GAP_RATIO,FLOOR_STACK_MIN_SURFACE_PX,LEVEL_CONTEXT_PREFIX,TABLE_SEAT_OFFSET,TEXT_BACKGROUND_PADDING_MAX,TEXT_BACKGROUND_RADIUS_MAX,TEXT_LETTER_SPACING_MAX,TEXT_LETTER_SPACING_MIN,TEXT_LINE_HEIGHT_MAX,TEXT_LINE_HEIGHT_MIN,TEXT_OPACITY_MIN,TEXT_WIDTH_MAX,TEXT_WIDTH_MIN,aisleSeatIds,allObjects,automaticRoundTableRadius,buildAisleHoles,buildSeatIndex,buildSectionShell,chairNumberingProblem,chartBounds,combinedFloorZoneId,compactChairNumbering,cubicPoint,distanceToRings,distributeAlongCubic,effectiveFloorOverview,expandBooth,expandChart,expandRow,expandRowSlots,expandTable,expandTableSlots,floorObjects,floorStackPlacements,floorsOf,gridStats,hitTest,initialFloorMode,isAisleSeat,isRowAisleSeats,layoutCombinedFloorPlan,layoutFloorStack,levelContextOutlines,mainFloorId,mergeRowAisleSeats,nearestWithin,objectCenter,owningSectionForObject,pointInPolygon,pointInPolygonWithHoles,pointOnPolygonBoundary,polygonArea,polygonInscribedAnchor,polygonLabelPoint,polygonNetArea,queryRect,resolveRowAisleSeats,resolveSegmentedRowGroups,rowInventoryCount,rowSeatPositions,segmentedRowComponentSeats,segmentedRowComponents,segmentedRowSeatTotal,smoothCubicThroughMiddle,splitRowAisleSeats,stackFloors,suggestedFloorOverview,tableChairBookingLabel,tableChairDisplayLabel,tableChairToken,tableInventoryCount,tableSeatCountsBySide,textLayoutMetrics,translateObject,usableHoles});
|
|
1
|
+
"use strict";var pe=Object.defineProperty;var Wt=Object.getOwnPropertyDescriptor;var qt=Object.getOwnPropertyNames;var Qt=Object.prototype.hasOwnProperty;var Zt=(e,t)=>{for(var n in t)pe(e,n,{get:t[n],enumerable:!0})},Jt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of qt(t))!Qt.call(e,r)&&r!==n&&pe(e,r,{get:()=>t[r],enumerable:!(o=Wt(t,r))||o.enumerable});return e};var en=e=>Jt(pe({},"__esModule",{value:!0}),e);var ir={};Zt(ir,{AUTOMATIC_ROUND_TABLE_RADIUS_MAX:()=>yt,AUTOMATIC_ROUND_TABLE_RADIUS_MIN:()=>pt,CHAIR_NUMBERING_DIRECTIONS:()=>at,CHAIR_NUMBERING_FORMATS:()=>st,CHAIR_NUMBERING_START_MAX:()=>Ie,DEFAULT_SEAT_RADIUS:()=>Vt,FLOOR_COVER_LIMIT:()=>Gt,FLOOR_STACK_GAP_RATIO:()=>Ft,FLOOR_STACK_MIN_SURFACE_PX:()=>Vo,LEVEL_CONTEXT_PREFIX:()=>he,TABLE_SEAT_OFFSET:()=>V,TEXT_BACKGROUND_PADDING_MAX:()=>gr,TEXT_BACKGROUND_RADIUS_MAX:()=>xr,TEXT_LETTER_SPACING_MAX:()=>pr,TEXT_LETTER_SPACING_MIN:()=>br,TEXT_LINE_HEIGHT_MAX:()=>hr,TEXT_LINE_HEIGHT_MIN:()=>mr,TEXT_OPACITY_MIN:()=>yr,TEXT_WIDTH_MAX:()=>fr,TEXT_WIDTH_MIN:()=>dr,aisleSeatIds:()=>Yt,allObjects:()=>Lt,automaticRoundTableRadius:()=>oo,buildAisleHoles:()=>on,buildSeatIndex:()=>zo,buildSectionShell:()=>nn,chairNumberingProblem:()=>_n,chartBounds:()=>U,combinedFloorZoneId:()=>Be,compactChairNumbering:()=>Ln,cubicPoint:()=>se,distanceToRings:()=>We,distributeAlongCubic:()=>ye,effectiveFloorOverview:()=>Ht,expandBooth:()=>At,expandChart:()=>Fe,expandRow:()=>Rt,expandRowSlots:()=>kt,expandTable:()=>Et,expandTableSlots:()=>De,floorObjects:()=>Ro,floorStackPlacements:()=>Bt,floorsOf:()=>Q,gridStats:()=>Qo,hitTest:()=>$o,initialFloorMode:()=>Ko,isAisleSeat:()=>nr,isRowAisleSeats:()=>Z,layoutCombinedFloorPlan:()=>Do,layoutFloorStack:()=>Lo,levelContextOutlines:()=>Bo,mainFloorId:()=>Go,mergeRowAisleSeats:()=>rr,nearestWithin:()=>Wo,objectCenter:()=>Ne,owningSectionForObject:()=>_t,pointInPolygon:()=>_e,pointInPolygonWithHoles:()=>B,pointOnPolygonBoundary:()=>Tt,polygonArea:()=>Se,polygonInscribedAnchor:()=>Me,polygonLabelPoint:()=>je,polygonNetArea:()=>cn,queryRect:()=>qo,resolveRowAisleSeats:()=>tr,resolveSegmentedRowGroups:()=>te,rowInventoryCount:()=>vo,rowSeatPositions:()=>oe,segmentedRowComponentSeats:()=>vn,segmentedRowComponents:()=>wn,segmentedRowSeatTotal:()=>Pn,smoothCubicThroughMiddle:()=>tn,splitRowAisleSeats:()=>or,stackFloors:()=>Oo,suggestedFloorOverview:()=>jo,tableChairBookingLabel:()=>Ce,tableChairDisplayLabel:()=>ke,tableChairToken:()=>ct,tableInventoryCount:()=>Po,tableSeatCountsBySide:()=>Ot,textLayoutMetrics:()=>ge,translateObject:()=>me,usableHoles:()=>K});module.exports=en(ir);var sr=Math.PI/180;function T(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function _(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function se(e,t){let n=1-t,o=n*n*n,r=3*n*n*t,i=3*n*t*t,a=t*t*t;return{x:o*e.start.x+r*e.control1.x+i*e.control2.x+a*e.end.x,y:o*e.start.y+r*e.control1.y+i*e.control2.y+a*e.end.y}}function tn(e,t,n){let o={x:(e.x+t.x)/2,y:(e.y+t.y)/2},r={x:(n.x-o.x)*4/3,y:(n.y-o.y)*4/3};return{start:{...e},control1:{x:e.x+(t.x-e.x)/3+r.x,y:e.y+(t.y-e.y)/3+r.y},control2:{x:e.x+(t.x-e.x)*2/3+r.x,y:e.y+(t.y-e.y)*2/3+r.y},end:{...t}}}function ye(e,t,n=192){if(!Number.isInteger(t)||t<1)throw new Error("Path point count must be a positive integer");if(t===1)return[se(e,.5)];let o=Array.from({length:n+1},(u,c)=>se(e,c/n)),r=new Float64Array(o.length);for(let u=1;u<o.length;u+=1){let c=o[u].x-o[u-1].x,l=o[u].y-o[u-1].y;r[u]=r[u-1]+Math.hypot(c,l)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let a=[],s=1;for(let u=0;u<t;u+=1){let c=i*u/(t-1);for(;s<r.length-1&&r[s]<c;)s+=1;let l=r[s-1],d=r[s],m=d===l?0:(c-l)/(d-l);a.push({x:o[s-1].x+(o[s].x-o[s-1].x)*m,y:o[s-1].y+(o[s].y-o[s-1].y)*m})}return a}function L(e,t){return{x:e.x+t.x,y:e.y+t.y}}function J(e,t){return{x:e.x-t.x,y:e.y-t.y}}function D(e,t){return{x:e.x*t,y:e.y*t}}function ce(e,t=13){return Array.from({length:t},(n,o)=>se(e,o/(t-1)))}function Ke(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return _(e[o],e[o+1],n-o)}function Ue(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[Ke(e,o)];for(let a=1;a<e.length-1;a+=1){let s=a/(e.length-1);s>o+1e-9&&s<r-1e-9&&i.push(e[a])}return i.push(Ke(e,r)),i}function Xe(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([m,p],y)=>{let b=T(_(e[m],e[p],.5),t);b<r&&(r=b,o=y)});let i=e[o],a=e[(o+1)%4],s=e[(o+2)%4],u=e[(o+3)%4],c=_(i,a,.5),l=J(t,c),d=Math.max(1e-9,Math.hypot(l.x,l.y));return{p0:i,p1:a,p2:s,p3:u,normal:D(l,1/d),depth:(T(i,u)+T(a,s))/2}}function Ye(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:a}=e,s=J(n,t),u=J(o,r),c=a*.22,l=a*.12;return{nearPath:{start:t,control1:L(L(t,D(s,1/3)),D(i,c)),control2:L(L(t,D(s,2/3)),D(i,c)),end:n},farPath:{start:o,control1:L(L(r,D(u,2/3)),D(i,l)),control2:L(L(r,D(u,1/3)),D(i,l)),end:r}}}function nn(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((y,b)=>L(y,b),{x:0,y:0});o.x/=4,o.y/=4;let r=T(e[0],e[1]),i=T(e[0],e[3]),a=n==="auto"?r>i*1.25&&T(o,t)>i?"bezier":"tapered":n;if(a==="rectangle")return{mode:a,outline:e.map(y=>({...y}))};let s=Xe(e,t),{p0:u,p1:c,p2:l,p3:d}=s;if(a==="tapered")return{mode:a,outline:[L(u,D(J(c,u),.14)),L(u,D(J(c,u),1-.14)),l,d]};let{nearPath:m,farPath:p}=Ye(s);return{mode:a,outline:[...ce(m),...ce(p).slice(1)]}}function on(e,t,n,o){if(e.length!==4)throw new Error("Aisle generation requires four mapped bounds corners");if(!Number.isInteger(n)||n<0||n>3)throw new Error("Aisle count must be an integer from 0 to 3");if(n===0)return[];let r=Xe(e,t),{p0:i,p1:a,p2:s,p3:u}=r,c=o==="bezier"?Ye(r):null,l=c?ce(c.nearPath):null,d=c?ce(c.farPath).reverse():null,m=Math.min(.055,.18/(n+1));return Array.from({length:n},(p,y)=>{let b=(y+1)/(n+1),M=b-m/2,v=b+m/2;return l&&d?[...Ue(l,M,v),...Ue(d,M,v).reverse()]:[_(i,a,M),_(i,a,v),_(u,s,v),_(u,s,M)]})}var dr=40,fr=1200,mr=.8,hr=3,br=-2,pr=20,yr=.1,gr=40,xr=40,ze=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function rn(e,t){let n=e.text.split(/\r?\n/);if(!e.width)return Math.max(1,n.length);let o=Math.max(1,Math.floor(t/ze(e))),r=0;for(let i of n){if(!i.length){r+=1;continue}let a=0;for(let s of i.split(/\s+/)){let u=s.length;a&&a+1+u<=o?a+=1+u:(r+=Math.max(1,Math.ceil(u/o)),a=u%o)}}return Math.max(1,r)}function ge(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(s=>s.length))*ze(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),a=rn(e,i);return{width:r,height:a*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:a,padding:t}}function an(e,t,n){let o=n.x-t.x,r=n.y-t.y,i=o*o+r*r,a=i?Math.max(0,Math.min(1,((e.x-t.x)*o+(e.y-t.y)*r)/i)):0;return Math.hypot(e.x-(t.x+a*o),e.y-(t.y+a*r))}function We(e,t){let n=1/0;for(let o of t)if(!(o.length<2))for(let r=0,i=o.length-1;r<o.length;i=r++){let a=an(e,o[i],o[r]);a<n&&(n=a)}return n}function $e(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,a=t[o].y,s=t[r].x,u=t[r].y;a>e.y!=u>e.y&&e.x<(s-i)*(e.y-a)/(u-a)+i&&(n=!n)}return n}function qe(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function sn(e,t,n){let o=$e(e,t)&&!n.some(i=>$e(e,i)),r=We(e,[t,...n]);return o?r:-r}function Y(e,t,n,o,r){let i=sn({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var xe=class{constructor(){this.items=[]}get size(){return this.items.length}push(t){let n=this.items;n.push(t);let o=n.length-1;for(;o>0;){let r=o-1>>1;if(n[r].max>=n[o].max)break;[n[r],n[o]]=[n[o],n[r]],o=r}}pop(){let t=this.items,n=t[0],o=t.pop();if(t.length&&o){t[0]=o;let r=0;for(;;){let i=r*2+1,a=i+1,s=r;if(i<t.length&&t[i].max>t[s].max&&(s=i),a<t.length&&t[a].max>t[s].max&&(s=a),s===r)break;[t[s],t[r]]=[t[r],t[s]],r=s}}return n}};function Se(e){if(e.length<3)return 0;let t=0;for(let n=0,o=e.length-1;n<e.length;o=n++)t+=(e[o].x+e[n].x)*(e[o].y-e[n].y);return Math.abs(t)/2}function cn(e,t){return Math.max(0,Se(e)-qe(t).reduce((n,o)=>n+Se(o),0))}function Me(e,t){let n=qe(t);if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let b=e.reduce((v,C)=>v+C.x,0)/e.length,M=e.reduce((v,C)=>v+C.y,0)/e.length;return{point:{x:b,y:M},radius:0}}let o=1/0,r=1/0,i=-1/0,a=-1/0;for(let b of e)b.x<o&&(o=b.x),b.y<r&&(r=b.y),b.x>i&&(i=b.x),b.y>a&&(a=b.y);let s=i-o,u=a-r,c=Math.min(s,u);if(!(c>0))return{point:{x:(o+i)/2,y:(r+a)/2},radius:0};let l=Math.max(s,u)/150,d=new xe,m=c/2;for(let b=o;b<i;b+=c)for(let M=r;M<a;M+=c)d.push(Y(b+m,M+m,m,e,n));let p=Y(o+s/2,r+u/2,0,e,n),y=0;for(;d.size;){let b=d.pop();if(!b)break;b.d>p.d&&(p=b),!(b.max-p.d<=l)&&(y>=4e3||(y+=1,m=b.h/2,d.push(Y(b.x-m,b.y-m,m,e,n)),d.push(Y(b.x+m,b.y-m,m,e,n)),d.push(Y(b.x-m,b.y+m,m,e,n)),d.push(Y(b.x+m,b.y+m,m,e,n))))}return{point:{x:p.x,y:p.y},radius:Math.max(0,p.d)}}function ee(e,t,n){return Math.max(t,Math.min(n,e))}function F(e,t,n){return e<t?t:e>n?n:e}function ln(e){return ee(e,0,1)}function Qe(e){let t=ln(e);return t*t*(3-2*t)}var z=Math.PI*2;function $(e){return Number.isFinite(e.x)&&Number.isFinite(e.y)}function un(e,t,n){let o=t-e;if(n){for(;o<0;)o+=z;for(;o>=z;)o-=z}else{for(;o>0;)o-=z;for(;o<=-z;)o+=z}return o}function et(e){if(e.version!==1||e.closed!==!0||!$(e.start)||!Array.isArray(e.segments)||e.segments.length<2||e.segments.length>512)return!1;let t=e.start;for(let n of e.segments){if(!n||!$(n.end))return!1;if(n.kind==="line"){if(T(t,n.end)<=1e-9)return!1}else if(n.kind==="bezier"){if(!$(n.control1)||!$(n.control2)||T(t,n.end)<=1e-9)return!1}else if(n.kind==="arc"){if(!$(n.center)||!Number.isFinite(n.radius)||n.radius<=1e-6||Math.abs(T(t,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||Math.abs(T(n.end,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||T(t,n.end)<=1e-9)return!1}else return!1;t=n.end}return T(t,e.start)<=1e-4}function dn(e,t,n){let o=1-n;return{x:o**3*e.x+3*o**2*n*t.control1.x+3*o*n**2*t.control2.x+n**3*t.end.x,y:o**3*e.y+3*o**2*n*t.control1.y+3*o*n**2*t.control2.y+n**3*t.end.y}}function tt(e,t=2){if(!et(e))throw new Error("Section outline path is invalid");let n=Math.max(.25,t),o=[{...e.start}],r=e.start;for(let i of e.segments){if(i.kind==="line")o.push({...i.end});else if(i.kind==="arc"){let a=Math.atan2(r.y-i.center.y,r.x-i.center.x),s=Math.atan2(i.end.y-i.center.y,i.end.x-i.center.x),u=un(a,s,i.clockwise),c=Math.max(2,Math.ceil(Math.abs(u)*i.radius/n));for(let l=1;l<=c;l+=1){let d=a+u*l/c;o.push({x:i.center.x+Math.cos(d)*i.radius,y:i.center.y+Math.sin(d)*i.radius})}}else{let a=T(r,i.control1)+T(i.control1,i.control2)+T(i.control2,i.end),s=Math.max(2,Math.ceil(a/n));for(let u=1;u<=s;u+=1)o.push(dn(r,i,u/s))}r=i.end}return T(o[o.length-1],o[0])<=1e-4&&o.pop(),o}function nt(e,t,n){return fn(e,r=>({x:r.x+t,y:r.y+n}))}function fn(e,t,n=1,o=!1){return{...e,start:t(e.start),segments:e.segments.map(r=>r.kind==="line"?{...r,end:t(r.end)}:r.kind==="arc"?{...r,center:t(r.center),radius:r.radius*Math.abs(n),clockwise:o?!r.clockwise:r.clockwise,end:t(r.end)}:{...r,control1:t(r.control1),control2:t(r.control2),end:t(r.end)})}}var mn=45,we=150,hn=60;function bn(e){let t=mn/100;if(e<=t)return we;let n=Math.min(1,(e-t)/(1-t));return we-n*(we-hn)}var Ze=.5523;function Je(e,t){return Math.abs(e.x-t.x)<=1e-6&&Math.abs(e.y-t.y)<=1e-6}function pn(e){let t=[],n=[];for(e.forEach((o,r)=>{$(o)&&(t.length&&Je(t[t.length-1],o)||(t.push({x:o.x,y:o.y}),n.push(r)))});t.length>1&&Je(t[0],t[t.length-1]);)t.pop(),n.pop();return{points:t,sourceIndex:n}}var yn=.5,gn=4/3;function xn(e,t,n){let o=t.x-e.x,r=t.y-e.y,i=Math.hypot(o,r);if(i<=1e-9)return{kind:"line",end:{...t}};let a=-r/i,s=o/i,u=n*gn;return{kind:"bezier",control1:{x:e.x+o/3+a*u,y:e.y+r/3+s*u},control2:{x:e.x+o*2/3+a*u,y:e.y+r*2/3+s*u},end:{...t}}}function ot(e,t){let{points:n,sourceIndex:o}=pn(e),r=n.length;if(r<3)return null;let i=Math.min(100,Math.max(0,t.cornerSmoothing??0))/100,a=t.edgeCurvature,s=new Array(r).fill(0);if(a?.length)for(let S=0;S<r;S+=1){let g=a[o[S]];s[S]=Number.isFinite(g)?Math.min(100,Math.max(-100,g))/100:0}let u=s.some(S=>Math.abs(S)>1e-6);if(i<=0&&!u)return null;let c=t.wideAngleThresholdDeg??bn(i),l=[];for(let S=0;S<r;S+=1)l[S]=T(n[S],n[(S+1)%r]);let d=new Array(r).fill(0);for(let S=0;S<r;S+=1){let g=n[(S-1+r)%r],f=n[S],h=n[(S+1)%r],w={x:g.x-f.x,y:g.y-f.y},x={x:h.x-f.x,y:h.y-f.y},I=Math.hypot(w.x,w.y),E=Math.hypot(x.x,x.y);if(I<=1e-9||E<=1e-9)continue;let P=Math.min(1,Math.max(-1,(w.x*x.x+w.y*x.y)/(I*E))),k=Math.acos(P)*180/Math.PI;if(k<c)continue;let O=Qe((k-c)/(180-c));d[S]=i*O*.5*Math.min(I,E)}for(let S=0;S<r;S+=1){let g=(S+1)%r,f=d[S]+d[g];if(f>l[S]&&f>1e-9){let h=l[S]/f;d[S]*=h,d[g]*=h}}let m=new Array(r),p=new Array(r);for(let S=0;S<r;S+=1){let g=n[(S-1+r)%r],f=n[S],h=n[(S+1)%r];if(d[S]<=1e-6){m[S]={...f},p[S]={...f};continue}let w=T(f,g)||1,x=T(f,h)||1;m[S]={x:f.x+(g.x-f.x)/w*d[S],y:f.y+(g.y-f.y)/w*d[S]},p[S]={x:f.x+(h.x-f.x)/x*d[S],y:f.y+(h.y-f.y)/x*d[S]}}if(d.every(S=>S<=1e-6)&&!u)return null;let y=[],b={...p[0]},M=b,v=(S,g)=>{if(T(M,S)<=1e-9)return;let f=s[g];Math.abs(f)>1e-6?y.push(xn(M,S,f*yn*l[g])):y.push({kind:"line",end:{...S}}),M=S};for(let S=1;S<=r;S+=1){let g=S%r,f=n[g];v(m[g],(S-1)%r),d[g]>1e-6&&T(m[g],p[g])>1e-9&&(y.push({kind:"bezier",control1:_(m[g],f,Ze),control2:_(p[g],f,Ze),end:{...p[g]}}),M=p[g])}if(!y.length)return null;let C=y[y.length-1];T(C.end,b)>1e-9&&(C.kind==="line"?C.end={...b}:y.push({kind:"line",end:{...b}}));let R={version:1,closed:!0,start:b,segments:y};return et(R)?R:null}function Sn(e){let t=e.points??[];if(e.kind!=="polygon"||t.length<3||!Array.isArray(e.edgeCurvature))return[];let n=t.map((o,r)=>{let i=e.edgeCurvature[r];return Number.isFinite(i)?Math.min(100,Math.max(-100,i)):0});return n.some(o=>Math.abs(o)>.5)?n:[]}function Mn(e){let t=Sn(e);return t.length?ot(e.points,{edgeCurvature:t}):null}function le(e,t=2){let n=Mn(e);return n?tt(n,t):e.points??[]}function wn(e,t,n){let o=[];for(let r=0;r<e.length-1;r+=1){let i=e[r],a=e[r+1],s=Math.hypot(a.x-i.x,a.y-i.y);if(s<=0)continue;let u=Math.max(1,Math.round(s/n)),c=s/u,l=Math.atan2(a.y-i.y,a.x-i.x),d=r===0,p=(r>0?t[r-1]:void 0)==="break"?2:1,y=d?{...i}:{x:i.x+Math.cos(l)*c*p,y:i.y+Math.sin(l)*c*p},b=d?u+1:Math.max(1,u-(p-1));o.push({origin:y,rotation:l*180/Math.PI,seatCount:b,seatSpacing:c})}return o}function vn(e){let t=e.rotation*Math.PI/180,n={x:Math.cos(t),y:Math.sin(t)};return Array.from({length:e.seatCount},(o,r)=>({x:e.origin.x+n.x*r*e.seatSpacing,y:e.origin.y+n.y*r*e.seatSpacing}))}function Pn(e){return e.reduce((t,n)=>t+n.seatCount,0)}function te(e){let t=new Map,n=new Map;for(let o of e){if(o.type!=="row"||!o.segmentedRow)continue;let r=n.get(o.segmentedRow.groupId)??[];r.push(o),n.set(o.segmentedRow.groupId,r)}for(let[o,r]of n){let i=r.slice().sort((m,p)=>m.segmentedRow.componentIndex-p.segmentedRow.componentIndex),a=i[0]?.segmentedRow?.componentCount??0,s=i[0]?.segmentedRow;if(!s||!(a>=2&&i.length===a&&s?.boundaryBefore==="start"&&i.every((m,p)=>m.segmentedRow?.kind==="segmented-row-v1"&&m.segmentedRow.groupId===o&&m.segmentedRow.componentCount===a&&m.segmentedRow.componentIndex===p&&m.segmentedRow.repeatLabelOnComponents===s.repeatLabelOnComponents&&(p===0?m.segmentedRow.boundaryBefore==="start":m.segmentedRow.boundaryBefore!=="start")&&m.segmentedRow.displayLabel===s.displayLabel)))continue;let c=i.reduce((m,p)=>m+p.seatCount,0),l=0,d=0;for(let m of i)m.segmentedRow.boundaryBefore==="break"&&(l+=1),t.set(m.id,{groupId:o,adjacencyOffset:l,displayOffset:d,displayLabel:s.displayLabel,totalSeats:c,canonical:i[0],viewFromSeatUrl:s.viewFromSeatUrl,viewFromSeatMeta:s.viewFromSeatMeta,confidenceEvidence:s.confidenceEvidence}),l+=m.seatCount,d+=m.seatCount}return t}var In="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var Cn="abcdefghijklmnopqrstuvwxyz";function kn(e,t){let n=t.length,o=e+1,r="";for(;o>0;){o-=1;let i=o%n;r=t[i]+r,o=Math.floor(o/n)}return r}function ne(e,t=!1){let n=t?Cn:In;return kn(Math.max(0,Math.floor(e)-1),n)}var Rn=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function rt(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of Rn)for(;t>=o;)n+=r,t-=o;return n}function On(e){let t=new Array(e);return Array.from({length:e},(n,o)=>o).sort((n,o)=>Math.abs(2*n-(e-1))-Math.abs(2*o-(e-1))||n-o).forEach((n,o)=>t[n]=o),t}function ve(e,t){let n=e.seatLabelStart??1,o=e.seatNumbering?.direction??"ltr",r=e.seatNumbering?.step??1,i=e.seatNumbering?.scheme??"decimal",a=e.seatNumbering?.prefix??"",s=e.seatNumbering?.endAt,u=e.seatCount;if(i==="updown"||i==="updown-descending"){let p=Math.ceil(u/2),y=i==="updown"?t<p?n+2*t:n-1+2*(u-t):t<p?n+2*(p-1-t):n+1+2*(t-p);return`${a}${y}`}let c=i==="odd"||i==="even"?2:r,l=s!=null&&Number.isFinite(s)?s-(u-1)*c:n,d=o==="center"?On(u)[t]:o==="rtl"?u-1-t:t,m;switch(i){case"odd":{let p=l%2===1?l:l+1;m=String(p+d*2);break}case"even":{let p=l%2===0?l:l+1;m=String(p+d*2);break}case"roman":m=rt(l+d*r);break;case"letters-upper":m=ne(l+d*r,!1);break;case"letters-lower":m=ne(l+d*r,!0);break;default:m=String(l+d*r);break}return`${a}${m}`}function En(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function it(e,t,n){return n?.label??`${e.seatLabelBase??e.label}-${ve(e,t)}`}function An(e,t,n,o){if(o?.displayLabel)return null;if(e.seatDisplayLabelMode==="number"||!n)return{row:e.displayLabel||e.label,seat:ve(e,t)};let r=En(n);return{row:n.displayLabel,seat:ve(r,n.displayOffset+t)}}function Pe(e,t,n,o){let r=An(e,t,n,o);return r?e.seatDisplayLabelMode==="number"?r.seat:`${r.row}-${r.seat}`:o.displayLabel}var Ie=999,at=["clockwise","anticlockwise"],st=["table-number","number","letter"];function Ce(e,t){return`${e.label}-${t+1}`}function Tn(e,t,n){return e?.direction==="anticlockwise"?Math.max(0,t-1-n):n}function ct(e,t){let n=e.chairNumbering,o=n?.start??1,r=Tn(n,Math.max(0,Math.round(e.seatCount)),t);return n?.format==="letter"?ne(Math.max(1,o)+r):String(o+r)}function ke(e,t){let n=ct(e,t);return(e.chairNumbering?.format??"table-number")==="table-number"?`${e.displayLabel??e.label}-${n}`:n}function _n(e){if(e===void 0)return null;if(!e||typeof e!="object"||Array.isArray(e))return"chairNumbering must be an object";let t=e,n=Object.keys(t).filter(o=>!["start","direction","format"].includes(o));return n.length?`chairNumbering has unsupported field(s): ${n.join(", ")}`:t.start!==void 0&&(!Number.isInteger(t.start)||t.start<0||t.start>Ie)?`chairNumbering.start must be a whole number from 0 to ${Ie}`:t.direction!==void 0&&!at.includes(t.direction)?"chairNumbering.direction must be clockwise or anticlockwise":t.format!==void 0&&!st.includes(t.format)?"chairNumbering.format must be table-number, number or letter":null}function Ln(e){let t={};return e.start!==void 0&&e.start!==1&&(t.start=e.start),e.direction==="anticlockwise"&&(t.direction="anticlockwise"),e.format&&e.format!=="table-number"&&(t.format=e.format),Object.keys(t).length?t:void 0}var W=.02291666666666667,Lr=1/W,Dn=58,jn=Dn*W;var Nn=3,lt=0,Re=120,Fn=0,Bn=45,Hn=7,q=1.2;function Oe(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function Gn(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Hn?e:Nn}function ut(e,t={}){let n=Oe(t.floorBaseHeightM,lt,Re,0),o=Math.min(Re,n+Gn(e.elevation)*jn),r=e.height===void 0?o:Oe(e.height,lt,Re,o),i=Oe(e.rake,Fn,Bn,0);return{height:r,rake:i}}function dt(e){let t=e.length;return t<=3?[...e]:[e[Math.floor(t*.25)],e[Math.floor(t*.5)],e[Math.floor(t*.75)]]}function ft(e,t,n){if(!e.length)return 1/0;if(e.length===1)return Math.hypot(t-e[0].x,n-e[0].y);let o=1/0;for(let r=0;r+1<e.length;r++){let i=e[r],a=e[r+1],s=a.x-i.x,u=a.y-i.y,c=s*s+u*u,l=c>1e-12?((t-i.x)*s+(n-i.y)*u)/c:0;l<0?l=0:l>1&&(l=1);let d=t-(i.x+l*s),m=n-(i.y+l*u);if(Math.abs(d)>=o||Math.abs(m)>=o)continue;let p=Math.hypot(d,m);p<o&&(o=p)}return o}function Vn(e){let t=0,n=0;for(let i of e)t+=i.x,n+=i.y;let o=e.length||1;t/=o,n/=o;let r=0;for(let i of e){let a=Math.hypot(i.x-t,i.y-n);a>r&&(r=a)}return{cx:t,cy:n,r}}function mt(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function Ee(e,t){let n=1/0;for(let o of dt(e)){let r=ft(t,o.x,o.y);r<n&&(n=r)}for(let o of dt(t)){let r=ft(e,o.x,o.y);r<n&&(n=r)}return n}function Kn(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let l of e)n+=l.x,o+=l.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let l of e){let d=Math.hypot(l.x-n,l.y-o);d>r&&(r=d,i=l)}let a=i.x-n,s=i.y-o,u=Math.hypot(a,s);u>1e-9?(a/=u,s/=u):(a=1,s=0);let c=e.map((l,d)=>({p:l,i:d,t:(l.x-n)*a+(l.y-o)*s})).sort((l,d)=>l.t-d.t);return{pts:c.map(l=>l.p),seatIndices:c.map(l=>t[l.i])}}function Un(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let C of e)n+=C.x,o+=C.y;n/=t,o/=t;let r=0,i=0,a=0,s=0,u=0,c=0,l=0;for(let C of e){let R=C.x-n,S=C.y-o;r+=R*R,a+=S*S,i+=R*S,s+=R*R*R,u+=S*S*S,c+=R*S*S,l+=S*R*R}let d=r*a-i*i;if(Math.abs(d)<1e-9)return null;let m=(s+c)/2,p=(u+l)/2,y=(m*a-p*i)/d,b=(p*r-m*i)/d,M=y+n,v=b+o;return!Number.isFinite(M)||!Number.isFinite(v)?null:{cx:M,cy:v}}var Xn=.15,Yn=.001;function zn(e){let t=e[0],n=e[e.length-1],o=n.x-t.x,r=n.y-t.y,i=Math.hypot(o,r);if(!(i>1e-9))return 0;let a=0;for(let s of e){let u=Math.abs((s.x-t.x)*r-(s.y-t.y)*o)/i;u>a&&(a=u)}return a/i}function $n(e){if(e.length<2)return null;let t=e.map(g=>{let f=0,h=0;for(let w of g.pts)f+=w.x,h+=w.y;return{x:f/g.pts.length,y:h/g.pts.length}}),n=0,o=0;for(let g of t)n+=g.x,o+=g.y;n/=t.length,o/=t.length;let r=0,i=0,a=0;for(let g of t){let f=g.x-n,h=g.y-o;r+=f*f,i+=f*h,a+=h*h}let s=r+a,u=r*a-i*i,c=s/2+Math.sqrt(Math.max(0,s*s/4-u)),l,d;Math.abs(i)>1e-12?(l=c-a,d=i):r>=a?(l=1,d=0):(l=0,d=1);let m=Math.hypot(l,d);if(!(m>1e-12))return null;l/=m,d/=m;let p=0,y=0,b=0;for(let g of e){if(g.pts.length<2)continue;let f=g.pts[0],h=g.pts[g.pts.length-1],w=h.x-f.x,x=h.y-f.y,I=Math.hypot(w,x);if(!(I>1e-9))continue;let E=w/I,P=x/I;p+=(E*E-P*P)*I,y+=2*E*P*I,b+=I}if(b>0&&Math.hypot(p,y)>=qn*b){let g=Math.atan2(y,p)/2;l=-Math.sin(g),d=Math.cos(g)}let M=1/0,v=-1/0,C=[];for(let g of e){let f=1/0,h=-1/0;for(let w of g.pts){let x=w.x*l+w.y*d;x<f&&(f=x),x>h&&(h=x),x<M&&(M=x),x>v&&(v=x)}C.push(h-f)}let R=v-M;return R>1e-9?(C.sort((g,f)=>g-f),C[Math.min(C.length-1,Math.floor(C.length*.9))]/R<=Wn?{x:l,y:d}:null):null}var Wn=.35,qn=.8;function ht(e,t,n,o){let r=new Map;for(let f of n){let h=t[f],w=h.rowId||`__seat-${f}`,x=r.get(w);x||(x={pts:[],idx:[]},r.set(w,x)),x.pts.push({x:h.x,y:h.y}),x.idx.push(f)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[f,h]of r){let w=Kn(h.pts,h.idx),x=0;for(let I of w.pts)x+=Math.hypot(I.x-o.x,I.y-o.y);i.push({id:f,pts:w.pts,seatIndices:w.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:x/w.pts.length})}let a=i.map(f=>Vn(f.pts)),s=i.length<=256?i.length*(i.length-1)/2:0,u=s?new Float64Array(s):null;u?.fill(Number.NaN);let c=u?new Map(i.map((f,h)=>[f,h])):null,l=(f,h)=>(f>h&&([f,h]=[h,f]),f*(2*i.length-f-1)/2+(h-f-1)),d=(f,h)=>{if(!u)return Ee(i[f].pts,i[h].pts);let w=l(f,h),x=u[w];if(!Number.isNaN(x))return x;let I=Ee(i[f].pts,i[h].pts);return u[w]=I,I},m=(f,h)=>c?d(c.get(f),c.get(h)):Ee(f.pts,h.pts),p=[];for(let f=0;f<i.length;f++){let h=1/0;for(let w=0;w<i.length;w++){if(f===w||mt(a[f],a[w])>=h)continue;let x=d(f,w);x<h&&(h=x)}Number.isFinite(h)&&p.push(h)}p.sort((f,h)=>f-h);let y=p.length?p[Math.floor(p.length/2)]:1,b=Math.max(y*1.8,1e-6),M=i.map(()=>[]);for(let f=0;f<i.length;f++)for(let h=f+1;h<i.length;h++)mt(a[f],a[h])>b||d(f,h)<=b&&(M[f].push(h),M[h].push(f));let v=0;for(let f=0;f<i.length;f++){if(i[f].blockId!==-1)continue;let h=v++,w=[f];for(i[f].blockId=h;w.length;){let x=w.pop();for(let I of M[x])i[I].blockId===-1&&(i[I].blockId=h,w.push(I))}}let C=new Map;for(let f of i){let h=C.get(f.blockId)??[];h.push(f),C.set(f.blockId,h)}let R=[];for(let f of i){if(f.pts.length<4||zn(f.pts)<Yn)continue;let h=Un(f.pts);h&&(!Number.isFinite(h.cx)||!Number.isFinite(h.cy)||R.push({x:h.cx,y:h.cy}))}let S=R.length>=2?(()=>{let f=R.map(x=>x.x).sort((x,I)=>x-I),h=R.map(x=>x.y).sort((x,I)=>x-I),w=Math.floor(R.length/2);return{cx:f[w],cy:h[w]}})():null;if(S){let f=P=>Math.hypot(P.x-S.cx,P.y-S.cy),h=1/0,w=-1/0,x=[];for(let P of i){let k=1/0,O=-1/0;for(let j of P.pts){let H=f(j);H<k&&(k=H),H>O&&(O=H)}x.push(O-k),k<h&&(h=k),O>w&&(w=O)}let I=w-h;x.sort((P,k)=>P-k);let E=x[Math.min(x.length-1,Math.floor(x.length*.9))];if(I>1e-9&&E/I<=Xn){let P=i.map(A=>{let ae=0;for(let $t of A.pts)ae+=f($t);return{row:A,radius:ae/A.pts.length}}),k=0,O=0;for(let A of P)k+=A.radius,O+=A.row.focalDistance;k/=P.length,O/=P.length;let j=0;for(let A of P)j+=(A.radius-k)*(A.row.focalDistance-O);if(j<0)for(let A of P)A.radius=-A.radius;let G=1/0;for(let A of P)A.radius<G&&(G=A.radius);P.sort((A,ae)=>A.radius-ae.radius);let N=-1,X=-1/0,zt=I/Math.max(1,P.length)*.5,Ve=[];for(let A of P)A.radius-X>zt&&(N++,X=A.radius),A.row.ordinal=N,A.row.blockDepth=A.radius-G,Ve.push(A.row);return{sectionId:e,rows:Ve,blockCount:v}}}let g=[];for(let[,f]of C){let h=$n(f);if(h){let w=P=>{let k=0;for(let O of P.pts)k+=O.x*h.x+O.y*h.y;return k/P.pts.length};f.sort((P,k)=>w(P)-w(k)),f.length>=2&&f[0].focalDistance>f[f.length-1].focalDistance&&f.reverse();let x=[],I=y*.5;for(let P of f){let k=x[x.length-1];k&&Math.abs(w(P)-w(k[0]))<I?k.push(P):x.push([P])}let E=0;for(let P=0;P<x.length;P++){if(P>0){let k=1/0;for(let O of x[P-1])for(let j of x[P])k=Math.min(k,m(O,j));k=Math.min(k,Math.abs(w(x[P][0])-w(x[P-1][0]))),E+=k}for(let k of x[P])k.ordinal=P,k.blockDepth=E,g.push(k)}}else{let w=1/0;for(let x of f)x.focalDistance<w&&(w=x.focalDistance);f.sort((x,I)=>x.focalDistance-I.focalDistance);for(let x=0;x<f.length;x++)f[x].ordinal=x,f[x].blockDepth=Math.max(0,f[x].focalDistance-w),g.push(f[x])}}return{sectionId:e,rows:g,blockCount:v}}var Qn=/^\d{4}-\d{2}-\d{2}$/;function Zn(e){let t=Date.parse(e);return Number.isFinite(t)?Qn.test(e)?t+864e5:t:null}function Jn(e,t=Date.now()){if(e.validUntil===void 0){if(e.status!=="approved")return!0;let o=e.assessedAt?Date.parse(e.assessedAt):Number.NaN;return Number.isFinite(o)&&(t instanceof Date?t.getTime():t)<=o+366*864e5}let n=Zn(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function eo(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function to(e){return e.status!=="draft"&&e.status!=="retracted"}function no(e,t){return e.status===void 0?t===void 0:e.status!=="approved"?!0:typeof t=="string"&&typeof e.basisSha256=="string"&&e.basisSha256===t}function bt(e,t={}){return!!e&&to(e)&&eo(e,t.activeConfigurationId,t.activeConfigurationVersion)&&no(e,t.activeBasisSha256)&&Jn(e,t.now)}var pt=36,yt=160;function oo(e,t=360){let n=ee(Math.round(Number.isFinite(e)?e:1),1,40),o=ee(Number.isFinite(t)?t:360,120,360);return Math.round(ee(n*4*(360/o),pt,yt))}var ro=new Set(["pitch-football","rink-hockey","track-athletics","oval-cricket","pitch-rugby","diamond-baseball","court-basketball","court-tennis","ring-boxing","track-motorsport"]),io=new Set(["pitch-football","track-athletics","oval-cricket","pitch-rugby","diamond-baseball"]);function ao(e){return!!e&&ro.has(e)}var so="open-air",Hr=new Set([...io,"court-tennis","track-motorsport",so]);var gt=1.1;var Gr=Math.PI*2;var Vr=(()=>{let t={x:0,y:52},n=25,o={x:70,y:t.y-70},r=(o.x*o.x+o.y*o.y-4900)/(2*(o.y+70)),i=r+70,a=[],s=Math.atan2(o.y-r,o.x),u=Math.atan2(o.y-r,-o.x);for(let c=0;c<=24;c++){let l=s+(u-s)*c/24;a.push({x:i*Math.cos(l),y:r+i*Math.sin(l)})}return{half:70,home:t,backstop:n,fence:a}})();function xt(e){return ao(e)}function co(e){if((e.kind==="polygon"||e.kind==="polyline"||e.kind==="line")&&e.points&&e.points.length>=2)return e.kind==="polygon"?le(e,6):e.points;if(e.x==null||e.y==null||e.width==null||e.height==null)return null;let t=e.x,n=e.y,o=e.width,r=e.height;return[{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+r},{x:t,y:n+r}]}function lo(e,t,n){let o=n*Math.PI/180,r=Math.cos(o),i=Math.sin(o),a=e.x-t.x,s=e.y-t.y;return{x:t.x+a*r-s*i,y:t.y+a*i+s*r}}function St(e){let t=co(e);if(!t||t.length<2)return null;let n=e.rotation??0,o=Math.abs(n)<1e-6?t:t.map(u=>lo(u,{x:t.reduce((c,l)=>c+l.x,0)/t.length,y:t.reduce((c,l)=>c+l.y,0)/t.length},n)),r=1/0,i=1/0,a=-1/0,s=-1/0;for(let u of o)r=Math.min(r,u.x),i=Math.min(i,u.y),a=Math.max(a,u.x),s=Math.max(s,u.y);return!Number.isFinite(r)||a-r<1e-6||s-i<1e-6?null:{minX:r,minY:i,maxX:a,maxY:s}}var uo=5,fo=3,mo=.92,ho=1.9,bo=2,po=.6,yo=1,go=.06;function xo(e){return e.heightM!==void 0?e.heightM:e.stageKind==="ring-boxing"?gt:xt(e.stageKind)?go:yo}function Mt(e){let t=1/0,n=1/0,o=-1/0,r=-1/0,i=-1/0;for(let a of Q(e)){let s=a.baseHeightM??0;for(let u of a.objects){if(u.type!=="shape"||u.role!=="stage")continue;let c=St(u);c&&(t=Math.min(t,c.minX),n=Math.min(n,c.minY),o=Math.max(o,c.maxX),r=Math.max(r,c.maxY),i=Math.max(i,s+xo(u)))}}return!Number.isFinite(t)||!Number.isFinite(i)?null:{minX:t,minY:n,maxX:o,maxY:r,deckTopM:i}}function So(e,t,n,o){let r=1/0,i=1/0,a=-1/0,s=-1/0;for(let p of e)Number.isFinite(p.eyeHeightM)&&(r=Math.min(r,p.x),a=Math.max(a,p.x),i=Math.min(i,p.y),s=Math.max(s,p.y));if(!Number.isFinite(r))return null;let u=r*t,c=i*t,l=Math.max(1,Math.ceil((a-r)*t/n)+1),d=Math.max(1,Math.ceil((s-i)*t/n)+1),m=new Float64Array(l*d).fill(-1/0);for(let p of e){if(!Number.isFinite(p.eyeHeightM))continue;let y=p.eyeHeightM-q,b=Math.min(l-1,Math.max(0,Math.floor((p.x*t-u)/n))),v=Math.min(d-1,Math.max(0,Math.floor((p.y*t-c)/n)))*l+b,C=y+o;C>m[v]&&(m[v]=C)}return{cellM:n,minX:u,minY:c,cols:l,rows:d,top:m}}function Mo(e,t,n){let o=Math.floor((t-e.minX)/e.cellM),r=Math.floor((n-e.minY)/e.cellM);return o<0||r<0||o>=e.cols||r>=e.rows?-1/0:e.top[r*e.cols+o]}function wt(e,t,n={}){let o=new Map;if(!t||!e.length)return o;let r=n.metresPerChartUnit??W,i=n.cellM??po,a=n.chairBackM??mo,s=n.selfRowSkipM??bo,u=n.clearThreshold??.9,c=n.partialThreshold??.25,l=Math.max(1,n.columns??uo),d=Math.max(1,n.rows??fo),m=So(e,r,i,a);if(!m)return o;let p=(t.maxX-t.minX)*r,y=(t.maxY-t.minY)*r,b=p>=y,M=(t.minX+t.maxX)/2*r,v=(t.minY+t.maxY)/2*r,C=[];for(let S=0;S<l;S++){let g=(S+.5)/l-.5,f=b?M+g*p:M,h=b?v:v+g*y;for(let w=0;w<d;w++){let x=t.deckTopM+(d===1?0:w/(d-1)*ho);C.push({x:f,y:h,z:x})}}let R=i/2;for(let S of e){if(!Number.isFinite(S.eyeHeightM))continue;let g=S.x*r,f=S.y*r,h=S.eyeHeightM,w=0,x=1/0;for(let E of C){let P=E.x-g,k=E.y-f,O=Math.hypot(P,k);if(!(O>s)){w++;continue}let j=P/O,H=k/O,G=0;for(let N=s;N<O;N+=R){let X=Mo(m,g+j*N,f+H*N);if(!(!Number.isFinite(X)||X>=h)&&X>h+(E.z-h)*N/O){G=N;break}}G?x=Math.min(x,G):w++}let I=w/C.length;I>=u||o.set(S.id,{seatId:S.id,mark:I<c?"obstructedView":"restrictedView",visibleFraction:I,totalRays:C.length,atDistanceM:Number.isFinite(x)?x:0})}return o}function vt(e,t){if(!t.size)return 0;let n=0;for(let o of e){let r=t.get(o.id);if(!r)continue;let i=o.commercial;i?.restrictedView!==void 0||i?.obstructedView!==void 0||(o.commercial={...i,[r.mark]:!0},n++)}return n}function Ae(e){return e?e.accessibility?.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var fe=Math.PI/180,wo=9,V=16;function Te(e,t,n,o){let r=n*fe,i=Math.cos(r),a=Math.sin(r);return{x:o.x+e*i-t*a,y:o.y+e*a+t*i}}function oe(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,a=[];if(e.path)return ye(e.path,t);if(t<=1)return t===1&&a.push({x:i.x,y:i.y}),a;if(o===0){for(let c=0;c<t;c++)a.push(Te(c*n,0,r,i));return a}let s=o/(t-1)*fe,u=n/(2*Math.sin(Math.abs(s)/2));for(let c=0;c<t;c++){let l=c*s,d=u*Math.sin(l),m=-u+u*Math.cos(l);a.push(Te(d,m,r,i))}return a}function Le(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function vo(e){let t=new Set((e.overrides??[]).filter(n=>n.skip&&Number.isInteger(n.index)&&n.index>=0&&n.index<e.seatCount).map(n=>n.index));return Math.max(0,e.seatCount-t.size)}function kt(e,t){let n=Le(e);return oe(e).map((o,r)=>{let i=n.get(r),a=Ae(i),s=it(e,r,i),u={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:s,displayLabel:Pe(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:a.length>0,accessibility:a,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(u).some(c=>c!==void 0&&c!==!1&&c!=="")?u:void 0,glyph:i?.glyph,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle??e.seatLabelStyle}})}function Rt(e){let t=[];for(let n of kt(e))n.skipped||t.push({id:`${e.id}:${n.index}`,label:n.label,displayLabel:n.displayLabel===n.label?void 0:n.displayLabel,x:n.x,y:n.y,rowId:e.id,categoryKey:n.categoryKey,accessible:n.accessible||void 0,accessibility:n.accessibility.length?n.accessibility:void 0,wheelchairSpaceType:n.wheelchairSpaceType,commercial:n.commercial,glyph:n.glyph,viewUrl:n.viewUrl,viewMeta:n.viewMeta,labelStyle:n.labelStyle});return t}function Ot(e){if(e.seatCountsBySide)return{...e.seatCountsBySide};let t=e.sides&&e.sides.length?e.sides:["top","bottom"],n=["top","bottom","left","right"].filter(i=>t.includes(i)),o={top:0,bottom:0,left:0,right:0};if(!n.length)return o;let r=Math.max(0,Math.round(e.seatCount));for(let i=0;i<r;i++)o[n[i%n.length]]+=1;return o}function De(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(l=>[l.index,l])),r=(l,d,m,p)=>{let y=o.get(l),b=Ae(y),M=y?.label??Ce(e,l);return{index:l,label:M,displayLabel:y?.displayLabel??ke(e,l),x:d+(y?.dx??0),y:m+(y?.dy??0),categoryKey:y?.categoryKey??e.categoryKey,skipped:!!y?.skip,accessible:b.length>0,accessibility:b,wheelchairSpaceType:y?.wheelchairSpaceType,commercial:y?.commercial,glyph:y?.glyph,viewUrl:y?.viewFromSeatUrl,viewMeta:y?.viewFromSeatUrl?y.viewFromSeatMeta:void 0,labelStyle:y?.labelStyle,...p?{side:p}:{}}};if(e.shape==="round"){let l=(e.radius??40)+V,d=e.rotation*fe,m=Math.max(0,Math.min(360,e.seatArc??360));if(m>=360||n===1){for(let M=0;M<n;M++){let v=d+M/n*2*Math.PI;t.push(r(M,e.center.x+l*Math.cos(v),e.center.y+l*Math.sin(v)))}return t}let p=m*fe,y=(2*Math.PI-p)/2,b=d+y;for(let M=0;M<n;M++){let v=b+M/(n-1)*p;t.push(r(M,e.center.x+l*Math.cos(v),e.center.y+l*Math.sin(v)))}return t}let i=e.width??80,a=e.height??50,s=Ot(e),u=["top","bottom","left","right"],c=0;for(let l of u){let d=s[l];for(let m=0;m<d;m++){let p,y;l==="top"?(p=-i/2+(m+.5)*i/d,y=-a/2-V):l==="bottom"?(p=-i/2+(m+.5)*i/d,y=a/2+V):l==="left"?(p=-i/2-V,y=-a/2+(m+.5)*a/d):(p=i/2+V,y=-a/2+(m+.5)*a/d);let b=Te(p,y,e.rotation,e.center);t.push(r(c++,b.x,b.y,l))}}return t}function Po(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):De(e).filter(t=>!t.skipped).length}function Et(e){return De(e).filter(t=>!t.skipped).map(t=>({id:`${e.id}:${t.index}`,label:t.label,...t.displayLabel!==t.label?{displayLabel:t.displayLabel}:{},x:t.x,y:t.y,rowId:e.id,categoryKey:t.categoryKey,...t.accessible?{accessible:!0}:{},...t.accessibility.length?{accessibility:t.accessibility}:{},...t.wheelchairSpaceType?{wheelchairSpaceType:t.wheelchairSpaceType}:{},...t.commercial?{commercial:t.commercial}:{},...t.glyph?{glyph:t.glyph}:{},...t.viewUrl?{viewUrl:t.viewUrl}:{},...t.viewUrl&&t.viewMeta?{viewMeta:t.viewMeta}:{},...t.labelStyle?{labelStyle:t.labelStyle}:{}}))}function At(e){return[{id:`${e.id}:0`,label:e.label,...e.displayLabel&&e.displayLabel!==e.label?{displayLabel:e.displayLabel}:{},x:e.center.x,y:e.center.y,rowId:e.id,categoryKey:e.categoryKey,kind:"booth",...e.commercial?.note?{commercial:{note:e.commercial.note}}:{}}]}function _e(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,a=t[o].y,s=t[r].x,u=t[r].y;a>e.y!=u>e.y&&e.x<(s-i)*(e.y-a)/(u-a)+i&&(n=!n)}return n}function Tt(e,t){return t.some((n,o)=>{let r=t[(o+1)%t.length],i=(e.y-n.y)*(r.x-n.x)-(e.x-n.x)*(r.y-n.y);if(Math.abs(i)>1e-7)return!1;let a=(e.x-n.x)*(r.x-n.x)+(e.y-n.y)*(r.y-n.y),s=(r.x-n.x)**2+(r.y-n.y)**2;return a>=-1e-7&&a<=s+1e-7})}function K(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function B(e,t,n){return _e(e,t)&&!K(n).some(o=>_e(e,o)||Tt(e,o))}function je(e,t){return Me(e,t).point}function de(e){if(!e.length)return{x:0,y:0};let t=0,n=0;for(let o of e)t+=o.x,n+=o.y;return{x:t/e.length,y:n/e.length}}function Ne(e){switch(e.type){case"row":{let t=oe(e),n=Le(e),o=0,r=0,i=0;for(let a=0;a<t.length;a++){let s=n.get(a);s?.skip||(o+=t[a].x+(s?.dx??0),r+=t[a].y+(s?.dy??0),i++)}return i?{x:o/i,y:r/i}:{x:e.origin.x,y:e.origin.y}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return de(e.points);case"section":return de(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?de(e.points):e.x!=null&&e.y!=null&&e.width!=null&&e.height!=null?{x:e.x+e.width/2,y:e.y+e.height/2}:{x:e.x??0,y:e.y??0};case"decorImage":return{x:e.x+e.width/2,y:e.y+e.height/2}}}function Pt(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function Io(e,t){if(e.type!=="gaArea"||!Pt(e.points,t.outline))return!1;let n=K(e.holes),o=K(t.holes);return n.length===o.length&&n.every((r,i)=>Pt(r,o[i]))}function _t(e,t,n=e.filter(r=>r.type==="section"),o=Ne(t)){let r="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0;return(r?n.find(a=>(a.logicalSectionId??a.id)===r&&(Io(t,a)||B(o,a.outline,a.holes))):void 0)??n.find(a=>B(o,a.outline,a.holes))??(t.type==="row"&&Co(t)?ko(t,n):void 0)}function Co(e){return(e.overrides??[]).some(t=>t.skip===!0)}function ko(e,t){let n=oe(e),o=Le(e),r,i=0;for(let a of t){let s=0;for(let u=0;u<n.length;u++){let c=o.get(u);if(c?.skip)continue;let l={x:n[u].x+(c?.dx??0),y:n[u].y+(c?.dy??0)};B(l,a.outline,a.holes)&&s++}s>i&&(r=a,i=s)}return r}function Q(e){return e.floors&&e.floors.length?e.floors:[{id:"floor-0",name:"Main",objects:e.objects,focalPoint:e.focalPoint,referenceImage:e.referenceImage,backgroundImage:e.backgroundImage}]}function Ro(e,t){let n=Q(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function Lt(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function me(e,t,n){let o=i=>({x:i.x+t,y:i.y+n}),r=i=>i.map(o);switch(e.type){case"row":return{...e,origin:o(e.origin)};case"table":case"booth":return{...e,center:o(e.center)};case"gaArea":return{...e,points:r(e.points),...e.holes?{holes:K(e.holes).map(r)}:{}};case"section":return{...e,outline:r(e.outline),...e.outlinePath?{outlinePath:nt(e.outlinePath,t,n)}:{},...e.holes?{holes:K(e.holes).map(r)}:{}};case"text":return{...e,position:o(e.position)};case"shape":return{...e,...e.points?{points:r(e.points)}:{},...e.holes?{holes:K(e.holes).map(r)}:{},...e.x!=null?{x:e.x+t}:{},...e.y!=null?{y:e.y+n}:{}};case"decorImage":return{...e,x:e.x+t,y:e.y+n}}}function Oo(e,t=900){if(!e.floors||e.floors.length<2)return e;let n=[];return e.floors.forEach((o,r)=>{let i=-r*t;for(let a of o.objects)n.push(i===0?a:me(a,0,i))}),{...e,objects:n,floors:void 0}}function It(e,t,n,o,r,i,a,s,u){let c=[],l=e.filter(b=>b.type==="section"),d=te(e),m=b=>!b?.eventConfigurationId||b.eventConfigurationId===o&&(b.eventConfigurationVersion===void 0||b.eventConfigurationVersion===u),p=b=>bt(b,{activeConfigurationId:o,activeConfigurationVersion:u,activeBasisSha256:r,now:s}),y=(b,M)=>p(b)?{...b,coverage:M}:void 0;for(let b of e){let M=[];if(b.type==="row"?M=Rt(b):b.type==="table"?M=Et(b):b.type==="booth"&&(M=At(b)),!M.length)continue;for(let g of M)g.viewUrl&&!m(g.viewMeta)&&(g.viewUrl=void 0,g.viewMeta=void 0);if(b.type==="row"){let g=d.get(b.id);if(g){let f=new Map((b.overrides??[]).map(h=>[h.index,h]));for(let h of M){let w=Number(h.id.slice(h.id.lastIndexOf(":")+1));if(!Number.isInteger(w))continue;h.logicalRowId=g.groupId,h.logicalSeatIndex=g.adjacencyOffset+w,f.get(w)?.displayLabel||(h.displayLabel=Pe(b,w,g)),!h.viewUrl&&g.viewFromSeatUrl&&m(g.viewFromSeatMeta)&&(h.viewUrl=g.viewFromSeatUrl,h.viewMeta=g.viewFromSeatMeta);let x=f.get(w)?.confidenceEvidence;h.confidenceEvidence=y(x,"exact-seat")??y(b.confidenceEvidence,"row-representative")??y(g.confidenceEvidence,"row-representative")}}}let v=_t(e,b,l,b.type==="row"?de(M):Ne(b)),C=v?.viewFromSeatUrl,S=(v?.zone?t?.find(g=>g.id===v.zone):void 0)?.focalPoint??n;for(let g of M){if(!g.confidenceEvidence){let f=Number(g.id.slice(g.id.lastIndexOf(":")+1)),h=(b.type==="row"||b.type==="table")&&Number.isInteger(f)?b.overrides?.find(w=>w.index===f)?.confidenceEvidence:void 0;g.confidenceEvidence=y(h,"exact-seat")??(b.type==="row"?y(b.confidenceEvidence,"row-representative"):void 0)}g.confidenceEvidence??=y(v?.confidenceEvidence,"section-representative")??(a?y(a.evidence,a.coverage):void 0),!g.viewUrl&&C&&m(v?.viewFromSeatMeta)&&(g.viewUrl=C,g.viewMeta=v?.viewFromSeatMeta),!g.viewUrl&&i&&m(i.meta)&&(g.viewUrl=i.url,g.viewMeta=i.meta),v&&(g.sectionId=v.logicalSectionId??v.id),v?.zone&&(g.zoneId=v.zone),S&&(g.focalPoint={...S})}c.push(...M)}return c}function Fe(e,t={}){if(e.floors?.length){let o=[];for(let r of e.floors){let i=r.focalPoint??e.focalPoint,a=r.viewFromSeatUrl?{url:r.viewFromSeatUrl,meta:r.viewFromSeatMeta}:e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,s=r.confidenceEvidence?{evidence:r.confidenceEvidence,coverage:"floor-representative"}:e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,u=It(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,a,s,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&Ct(r.objects,r.focalPoint??e.focalPoint,r.baseHeightM??0,u);for(let c of u)c.floorId=r.id;for(let c of u)o.push(c)}return o}let n=It(e.objects,e.zones,e.focalPoint,e.eventConfigurationId,e.confidenceBasisSha256,e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);return t.resolveEyeHeights!==!1&&Ct(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),Eo(e,n,t)}function Eo(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||vt(t,wt(t,Mt(e))),t}function Ct(e,t,n,o){let r=e.filter(d=>d.type==="section"),i=n>0||r.some(d=>d.height!==void 0||d.rake!==void 0||(d.elevation??0)>0);if(!r.length||!i||!t){for(let d of o)d.eyeHeightM=n+q;return}let a=new Array(o.length),s=new Map;for(let d of r)s.has(d.id)||s.set(d.id,d);let u=new Map,c=new Map;for(let d=0;d<o.length;d++){let m=o[d],y=(m.sectionId?s.get(m.sectionId)??r.find(M=>M.logicalSectionId===m.sectionId&&B({x:m.x,y:m.y},M.outline,M.holes)):void 0)??r.find(M=>B({x:m.x,y:m.y},M.outline,M.holes))??null;if(a[d]=y,!y)continue;u.has(y.id)||u.set(y.id,ut(y,{floorBaseHeightM:n}));let b=c.get(y.id);b?b.push(d):c.set(y.id,[d])}let l=new Array(o.length).fill(void 0);for(let[d,m]of c){let p=u.get(d);if(!p)continue;let y=p.rake>0?Math.tan(p.rake*Math.PI/180):0,b=ht(d,o,m,t);for(let M of b.rows){let v=M.blockDepth*W*y,C=p.height+v;for(let R of M.seatIndices)l[R]=C}}for(let d=0;d<o.length;d++){let m=o[d],p=a[d];if(!p){m.eyeHeightM=n+q;continue}let y=u.get(p.id);m.eyeHeightM=(l[d]??y.height)+q}}var ue=40;function U(e,t){let n=t?.freeText==="exclude",o=1/0,r=1/0,i=-1/0,a=-1/0,s=(c,l)=>{c<o&&(o=c),l<r&&(r=l),c>i&&(i=c),l>a&&(a=l)},u=c=>{if(Array.isArray(c))for(let l of c)!l||typeof l!="object"||s(l.x,l.y)};for(let c of Lt(e))if(c.type==="row"){let l=new Map((c.overrides??[]).map(d=>[d.index,d]));oe(c).forEach((d,m)=>{let p=l.get(m);p?.skip||s(d.x+(p?.dx??0),d.y+(p?.dy??0))})}else if(c.type==="gaArea")u(c.points);else if(c.type==="section")u(c.outline);else if(c.type==="decorImage")s(c.x,c.y),s(c.x+c.width,c.y+c.height);else if(c.type==="shape")c.points&&c.points.length?u(le(c)):c.x!=null&&c.y!=null&&c.width!=null&&c.height!=null&&(s(c.x,c.y),s(c.x+c.width,c.y+c.height));else if(c.type==="table"){let l=V+wo,d=c.shape==="round"?(c.radius??40)+l:Math.max((c.width??80)/2,(c.height??50)/2)+l;s(c.center.x-d,c.center.y-d),s(c.center.x+d,c.center.y+d)}else if(c.type==="booth"){let l=Math.max(c.width,c.height)/2;s(c.center.x-l,c.center.y-l),s(c.center.x+l,c.center.y+l)}else if(c.type==="text"){if(n)continue;let l=ge(c);s(c.position.x,c.position.y),s(c.position.x+l.width,c.position.y+l.height)}for(let c of[e.referenceImage,e.backgroundImage]){if(!c)continue;let{center:l,width:d}=c;if(!l||!Number.isFinite(l.x)||!Number.isFinite(l.y)||!Number.isFinite(d))continue;let m=d*3/4;s(l.x-d/2,l.y-m/2),s(l.x+d/2,l.y+m/2)}if(!isFinite(o)){let c=e.focalPoint??{x:0,y:0};return{x:c.x-200,y:c.y-200,width:400,height:400}}return{x:o-ue,y:r-ue,width:i-o+ue*2,height:a-r+ue*2}}function Dt(e){let t=e.backgroundImage;return t?.url&&!t.assetId?t:void 0}var Ft=.08,Ao=.045;function Be(e){return`__floor__:${encodeURIComponent(e)}`}function ie(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function To(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function Bt(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(a=>U(ie(e,a.objects,a.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(a=>a.width))*Ft,i=0;return t.map((a,s)=>{let u=n[s],c=i-(u.y+u.height);return i-=u.height+r,{floorId:a.id,label:a.name??a.id,level:s,levelBadge:s===0?"G":String(s),translation:{x:-To(a,e,u),y:c},bounds:u}})}function _o(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*Ao),a=e.bounds.x+e.translation.x-i*2.4,s=e.bounds.y+e.translation.y+i*.4,u=`floor-level-${e.floorId}`;if(t==="name")return[{type:"text",id:`${u}-text`,text:r,position:{x:a,y:s},fontSize:i,rotation:0,color:o,bold:!0}];let c=i*.95,l={type:"shape",id:`${u}-badge`,kind:"ellipse",x:a-c*.35,y:s-c*.3,width:c*2,height:c*2,fill:"transparent",stroke:{color:o,width:Math.max(1,i*.09)},opacity:.8},d={type:"text",id:`${u}-text`,text:r,position:{x:l.x,y:l.y+c-i/2},width:c*2,align:"center",lineHeight:1,fontSize:i,rotation:0,color:o,bold:!0};return[l,d]}function Lo(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=Bt(e),r=[];n.forEach((c,l)=>{let{x:d,y:m}=o[l].translation;for(let p of c.objects)l>0&&p.type==="shape"&&p.role==="stage"||r.push(me(p,d,m))});let i={...e,objects:r,floors:void 0},a=U(i,{freeText:"exclude"}),s=Math.max(1,a.width,a.height),u=e.theme?.textColor??"#94a3b8";for(let c of o)r.push(..._o(c,t.labelStyle??"number",s,u));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function Do(e){if(!e.floors||e.floors.length<2)return e;let t=!e.zones?.length,n=new Set,o=e.floors.flatMap(i=>i.objects.flatMap(a=>{if(a.type==="shape"&&a.role==="stage"){let s=JSON.stringify([a.kind,a.x,a.y,a.width,a.height,a.points,a.rotation??0,a.label,a.heightM,a.eventConfigurationIds]);if(n.has(s))return[];n.add(s)}return t&&a.type==="section"?[{...a,zone:Be(i.id)}]:[a]})),r=t?e.floors.map(i=>({id:Be(i.id),label:i.name,focalPoint:{...i.focalPoint}})):e.zones;return{...e,objects:o,zones:r,floors:void 0,referenceImage:void 0,backgroundImage:Dt(e)}}function Ht(e){return e.floorOverview==="combined"?"combined":"separated"}function jo(e){let t=e.floors??[];if(t.length<2||t.some(r=>!r.objects.some(i=>No.has(i.type))))return"separated";let n=jt.get(e);if(n)return n;let o=Fo(e)?"separated":"combined";return jt.set(e,o),o}var No=new Set(["row","table","booth","gaArea","section"]),Gt=.1,re=18,jt=new WeakMap;function Fo(e){let t=e.floors??[],n=(i,a)=>`${Math.floor(i/re)}:${Math.floor(a/re)}`,o=t.map(i=>{let a=Fe(ie(e,i.objects,i.focalPoint)).map(u=>({x:u.x,y:u.y})),s={areas:[],seats:new Map};for(let u of i.objects)u.type==="section"&&u.outline?.length>=3&&s.areas.push({outer:u.outline,holes:u.holes}),u.type==="gaArea"&&u.points?.length>=3&&s.areas.push({outer:u.points,holes:u.holes});for(let u of a){let c=n(u.x,u.y),l=s.seats.get(c);l?l.push(u):s.seats.set(c,[u])}return{seats:a,footprint:s}}),r=(i,a)=>{let s=Math.floor(i.x/re),u=Math.floor(i.y/re);for(let c=-1;c<=1;c+=1)for(let l=-1;l<=1;l+=1)for(let d of a.seats.get(`${s+c}:${u+l}`)??[])if(Math.hypot(d.x-i.x,d.y-i.y)<re)return!0;return!1};return o.some((i,a)=>{if(!i.seats.length)return!1;let s=o.filter((c,l)=>l!==a).map(c=>c.footprint),u=0;for(let c of i.seats)s.some(l=>l.areas.some(d=>B(c,d.outer,d.holes))||r(c,l))&&(u+=1);return u/i.seats.length>Gt})}var he="level-context:";function Bo(e,t){let n=e.floors??[];if(n.length<2||Ht(e)!=="combined")return[];let o="#8a93a6",r=[],i=n.find(s=>s.id===t),a=i?U(ie(e,i.objects,i.focalPoint),{freeText:"exclude"}):null;for(let s of n){if(s.id===t)continue;let u=0;for(let m of s.objects){let p=m.type==="section"?m.outline:m.type==="gaArea"?m.points:null;if(!p||p.length<3)continue;let y={type:"shape",id:`${he}${s.id}:${u++}`,kind:"polygon",label:"",points:p.map(b=>({...b})),fill:"transparent",stroke:{color:o,width:1.5},opacity:.35};r.push(y)}let c=U(ie(e,s.objects,s.focalPoint),{freeText:"exclude"});if(!u||!a||!Ho(c,a))continue;let l=r.filter(m=>m.type==="shape"&&m.id.startsWith(`${he}${s.id}:`)&&!!m.points),d=l.reduce((m,p)=>Nt(p.points)>Nt(m.points)?p:m,l[0]);r.push({type:"text",id:`${he}${s.id}:name`,text:s.name??s.id,position:je(d.points,void 0),fontSize:Math.max(1,Math.max(a.width,a.height)*.024),rotation:0,color:o,opacity:.6})}return r}function Ho(e,t){return e.x>=t.x&&e.y>=t.y&&e.x+e.width<=t.x+t.width&&e.y+e.height<=t.y+t.height}function Nt(e){let t=e.map(o=>o.x),n=e.map(o=>o.y);return(Math.max(...t)-Math.min(...t))*(Math.max(...n)-Math.min(...n))}function Go(e){let t=e.floors;if(!t?.length)return null;let n=t.find(i=>i.objects.some(a=>a.type==="shape"&&a.role==="stage"));if(n)return n.id;let o=t[0],r=-1;for(let i of t){let a=U(ie(e,i.objects,i.focalPoint),{freeText:"exclude"}),s=a.width*a.height;s>r&&(r=s,o=i)}return o.id}var Vo=640;function Ko(e,t){return(e.floors?.length??0)<2?null:"all"}var Vt=9;function Uo(e){if(e.kind==="circle")return{hx:e.r,hy:e.r};let t=e.width/2,n=e.height/2,o=e.rotation??0;if(!o)return{hx:t,hy:n};let r=o*Math.PI/180,i=Math.abs(Math.cos(r)),a=Math.abs(Math.sin(r));return{hx:t*i+n*a,hy:t*a+n*i}}function Xo(e,t,n){let o=t-e.seat.x,r=n-e.seat.y;if(e.shape.kind==="circle")return o*o+r*r<=e.shape.r*e.shape.r;let i=e.shape.rotation??0,a=o,s=r;if(i){let u=-i*Math.PI/180,c=Math.cos(u),l=Math.sin(u);a=o*c-r*l,s=o*l+r*c}return Math.abs(a)<=e.shape.width/2&&Math.abs(s)<=e.shape.height/2}function Yo(e,t,n,o,r){if(e.shape.kind==="circle"){let y=Math.min(Math.max(e.seat.x,t),o),b=Math.min(Math.max(e.seat.y,n),r),M=e.seat.x-y,v=e.seat.y-b;return M*M+v*v<=e.shape.r*e.shape.r}let i=e.shape.rotation??0;if(!i)return e.seat.x-e.hx<=o&&e.seat.x+e.hx>=t&&e.seat.y-e.hy<=r&&e.seat.y+e.hy>=n;let a=i*Math.PI/180,s=Math.cos(a),u=Math.sin(a),c=e.shape.width/2,l=e.shape.height/2,d=[[-c,-l],[c,-l],[c,l],[-c,l]].map(([y,b])=>[e.seat.x+y*s-b*u,e.seat.y+y*u+b*s]),m=[[t,n],[o,n],[o,r],[t,r]],p=[[1,0],[0,1],[s,u],[-u,s]];for(let[y,b]of p){let M=1/0,v=-1/0;for(let[S,g]of d){let f=S*y+g*b;f<M&&(M=f),f>v&&(v=f)}let C=1/0,R=-1/0;for(let[S,g]of m){let f=S*y+g*b;f<C&&(C=f),f>R&&(R=f)}if(v<C||R<M)return!1}return!0}function zo(e,t={}){let n=t.seatRadius??Vt,o=e.length,r=new Array(o),i=1/0,a=1/0,s=-1/0,u=-1/0,c=0;for(let f=0;f<o;f++){let h=e[f],w=t.shapeOf?.(h)??{kind:"circle",r:n},{hx:x,hy:I}=Uo(w);r[f]={seat:h,shape:w,hx:x,hy:I},h.x-x<i&&(i=h.x-x),h.y-I<a&&(a=h.y-I),h.x+x>s&&(s=h.x+x),h.y+I>u&&(u=h.y+I),x>c&&(c=x),I>c&&(c=I)}o===0&&(i=0,a=0,s=0,u=0);let l=c>0?c*4:1,d=Math.max(s-i,0),m=Math.max(u-a,0),p=Math.max(64,t.maxCells??o*4),y=l,b=Math.max(1,Math.ceil(d/y)||1),M=Math.max(1,Math.ceil(m/y)||1);for(;b*M>p&&(b>1||M>1);)y*=2,b=Math.max(1,Math.ceil(d/y)||1),M=Math.max(1,Math.ceil(m/y)||1);let v=b*M,C=new Int32Array(v+1),R=0;for(let f=0;f<o;f++){let h=r[f],w=F(Math.floor((h.seat.x-h.hx-i)/y),0,b-1),x=F(Math.floor((h.seat.x+h.hx-i)/y),0,b-1),I=F(Math.floor((h.seat.y-h.hy-a)/y),0,M-1),E=F(Math.floor((h.seat.y+h.hy-a)/y),0,M-1);for(let P=I;P<=E;P++)for(let k=w;k<=x;k++)C[P*b+k+1]++,R++}for(let f=0;f<v;f++)C[f+1]+=C[f];let S=new Int32Array(R),g=C.slice(0,v);for(let f=0;f<o;f++){let h=r[f],w=F(Math.floor((h.seat.x-h.hx-i)/y),0,b-1),x=F(Math.floor((h.seat.x+h.hx-i)/y),0,b-1),I=F(Math.floor((h.seat.y-h.hy-a)/y),0,M-1),E=F(Math.floor((h.seat.y+h.hy-a)/y),0,M-1);for(let P=I;P<=E;P++)for(let k=w;k<=x;k++){let O=P*b+k;S[g[O]++]=f}}return{seats:e,entries:r,minX:i,minY:a,cell:y,cols:b,rows:M,cellStart:C,items:S,stamp:new Int32Array(o),epoch:0}}function $o(e,t,n={}){let{cols:o,rows:r,cell:i,minX:a,minY:s,cellStart:u,items:c,entries:l}=e,d=Math.floor((t.x-a)/i),m=Math.floor((t.y-s)/i);if(d<0||m<0||d>=o||m>=r)return null;let p=m*o+d,y=u[p+1],b=-1,M=1/0;for(let v=u[p];v<y;v++){let C=c[v],R=l[C];if(n.filter&&!n.filter(R.seat.id,R.seat)||!Xo(R,t.x,t.y))continue;let S=t.x-R.seat.x,g=t.y-R.seat.y,f=S*S+g*g;(f<M||f===M&&C<b)&&(M=f,b=C)}return b<0?null:l[b].seat.id}function Wo(e,t,n,o={}){if(!(n>0))return null;let{cols:r,rows:i,cell:a,minX:s,minY:u,cellStart:c,items:l,entries:d}=e,m=Math.max(0,Math.floor((t.x-n-s)/a)),p=Math.min(r-1,Math.floor((t.x+n-s)/a)),y=Math.max(0,Math.floor((t.y-n-u)/a)),b=Math.min(i-1,Math.floor((t.y+n-u)/a));if(m>p||y>b)return null;let M=-1,v=n*n,C=e.stamp,R=++e.epoch;for(let S=y;S<=b;S++){let g=S*r;for(let f=m;f<=p;f++){let h=g+f,w=c[h+1];for(let x=c[h];x<w;x++){let I=l[x];if(C[I]===R)continue;C[I]=R;let E=d[I];if(o.filter&&!o.filter(E.seat.id,E.seat))continue;let P=t.x-E.seat.x,k=t.y-E.seat.y,O=P*P+k*k;(O<v||O===v&&I<M)&&(v=O,M=I)}}}return M<0?null:d[M].seat.id}function qo(e,t,n={}){let o=Math.min(t.x,t.x+t.width),r=Math.max(t.x,t.x+t.width),i=Math.min(t.y,t.y+t.height),a=Math.max(t.y,t.y+t.height),s=n.mode??"center",{cols:u,rows:c,cell:l,minX:d,minY:m,cellStart:p,items:y,entries:b}=e,M=Math.max(0,Math.floor((o-d)/l)),v=Math.min(u-1,Math.floor((r-d)/l)),C=Math.max(0,Math.floor((i-m)/l)),R=Math.min(c-1,Math.floor((a-m)/l));if(M>v||C>R)return[];let S=[],g=e.stamp,f=++e.epoch;for(let h=C;h<=R;h++){let w=h*u;for(let x=M;x<=v;x++){let I=w+x,E=p[I+1];for(let P=p[I];P<E;P++){let k=y[P];if(g[k]===f)continue;g[k]=f;let O=b[k];if(n.filter&&!n.filter(O.seat.id,O.seat))continue;(s==="center"?O.seat.x>=o&&O.seat.x<=r&&O.seat.y>=i&&O.seat.y<=a:Yo(O,o,i,r,a))&&S.push(k)}}}return S.sort((h,w)=>h-w),S.map(h=>b[h].seat.id)}function Qo(e){let t=e.cols*e.rows,n=0,o=0;for(let i=0;i<t;i++){let a=e.cellStart[i+1]-e.cellStart[i];a>0&&n++,a>o&&(o=a)}let r=e.items.length;return{cell:e.cell,cols:e.cols,rows:e.rows,cells:t,occupiedCells:n,refs:r,maxPerCell:o,meanPerOccupiedCell:n?r/n:0}}var Zo=[{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"}],Si=new Map(Zo.map(e=>[e.key,e]));var Jo=[{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"}],Mi=new Map(Jo.map(e=>[e.key,e]));var Kt=["start","end","both","none"];var er=["reference-focal","bar","entrance","exit","restroom","screen","sound","concession","coat","wall","rail","suite","obstruction"],wi=new Set(er);function Z(e){return typeof e=="string"&&Kt.includes(e)}function be(e,t){return e&&t?"both":e?"start":t?"end":"none"}function Ut(e){let t=new Map,n=te(e);if(!n.size)return t;let o=new Map;for(let r of e){if(r.type!=="row"||!n.has(r.id))continue;let i=r.segmentedRow.groupId,a=o.get(i)??[];a.push(r),o.set(i,a)}for(let r of o.values())r.sort((i,a)=>i.segmentedRow.componentIndex-a.segmentedRow.componentIndex),r.forEach((i,a)=>{let s=r[a+1];t.set(i.id,{start:a>0&&i.segmentedRow.boundaryBefore==="continuous",end:!!s&&s.segmentedRow.boundaryBefore==="continuous"})});return t}function Xt(e,t){let n=Number.isInteger(e.seatCount)&&e.seatCount>0?e.seatCount:0,o=new Set;for(let d of e.overrides??[])d.skip&&o.add(d.index);let r=d=>d>=0&&d<n&&!o.has(d),i=be(!t?.start,!t?.end),a=Z(e.aisleSeats)?e.aisleSeats:void 0;if(!a)return{automatic:i,slots:[]};let s=a,u=-1,c=-1;for(let d=0;d<n;d+=1)r(d)&&(u<0&&(u=d),c=d);let l=new Set;if(u>=0){(s==="start"||s==="both")&&l.add(u),(s==="end"||s==="both")&&l.add(c);for(let d of o)r(d-1)&&l.add(d-1),r(d+1)&&l.add(d+1)}return{override:a,automatic:i,slots:[...l].sort((d,m)=>d-m)}}function tr(e,t=[e]){return Xt(e,e.segmentedRow?Ut(t).get(e.id):void 0)}function Yt(e){let t=new Set;for(let n of Q(e)){let o=Ut(n.objects);for(let r of n.objects)if(r.type==="row")for(let i of Xt(r,o.get(r.id)).slots)t.add(`${r.id}:${i}`)}return t}function nr(e,t,n){return Yt(e).has(`${t}:${n}`)}function He(e){let t=Z(e.aisleSeats)?e.aisleSeats:"none";return{start:t==="start"||t==="both",end:t==="end"||t==="both"}}function Ge(e,t){e.aisleSeats=t}function or(e,t,n){if(!Z(e.aisleSeats)){delete t.aisleSeats,delete n.aisleSeats;return}let o=He(e);Ge(t,be(o.start,!0)),Ge(n,be(!0,o.end))}function rr(e,t){let n=e[0],o=e[e.length-1];if(!n||!o||!Z(n.aisleSeats)&&!Z(o.aisleSeats)){delete t.aisleSeats;return}Ge(t,be(He(n).start,He(o).end))}0&&(module.exports={AUTOMATIC_ROUND_TABLE_RADIUS_MAX,AUTOMATIC_ROUND_TABLE_RADIUS_MIN,CHAIR_NUMBERING_DIRECTIONS,CHAIR_NUMBERING_FORMATS,CHAIR_NUMBERING_START_MAX,DEFAULT_SEAT_RADIUS,FLOOR_COVER_LIMIT,FLOOR_STACK_GAP_RATIO,FLOOR_STACK_MIN_SURFACE_PX,LEVEL_CONTEXT_PREFIX,TABLE_SEAT_OFFSET,TEXT_BACKGROUND_PADDING_MAX,TEXT_BACKGROUND_RADIUS_MAX,TEXT_LETTER_SPACING_MAX,TEXT_LETTER_SPACING_MIN,TEXT_LINE_HEIGHT_MAX,TEXT_LINE_HEIGHT_MIN,TEXT_OPACITY_MIN,TEXT_WIDTH_MAX,TEXT_WIDTH_MIN,aisleSeatIds,allObjects,automaticRoundTableRadius,buildAisleHoles,buildSeatIndex,buildSectionShell,chairNumberingProblem,chartBounds,combinedFloorZoneId,compactChairNumbering,cubicPoint,distanceToRings,distributeAlongCubic,effectiveFloorOverview,expandBooth,expandChart,expandRow,expandRowSlots,expandTable,expandTableSlots,floorObjects,floorStackPlacements,floorsOf,gridStats,hitTest,initialFloorMode,isAisleSeat,isRowAisleSeats,layoutCombinedFloorPlan,layoutFloorStack,levelContextOutlines,mainFloorId,mergeRowAisleSeats,nearestWithin,objectCenter,owningSectionForObject,pointInPolygon,pointInPolygonWithHoles,pointOnPolygonBoundary,polygonArea,polygonInscribedAnchor,polygonLabelPoint,polygonNetArea,queryRect,resolveRowAisleSeats,resolveSegmentedRowGroups,rowInventoryCount,rowSeatPositions,segmentedRowComponentSeats,segmentedRowComponents,segmentedRowSeatTotal,smoothCubicThroughMiddle,splitRowAisleSeats,stackFloors,suggestedFloorOverview,tableChairBookingLabel,tableChairDisplayLabel,tableChairToken,tableInventoryCount,tableSeatCountsBySide,textLayoutMetrics,translateObject,usableHoles});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as Point, v as CubicPath, w as TextObject, x as TableChairNumbering, T as TableObject, y as RowAisleSeats, C as ChartDoc, R as RowObject, a as ChartObject } from '../../types-
|
|
2
|
-
export { F as FloorLabelStyle } from '../../types-
|
|
3
|
-
export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_COVER_LIMIT, b as FLOOR_STACK_GAP_RATIO, c as FLOOR_STACK_MIN_SURFACE_PX, d as FloorStackOptions, e as FloorStackPlacement, L as LEVEL_CONTEXT_PREFIX, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, f as TableSeatSlot, g as allObjects, h as automaticRoundTableRadius, i as chartBounds, j as combinedFloorZoneId, k as effectiveFloorOverview, l as expandBooth, m as expandChart, n as expandRow, o as expandRowSlots, p as expandTable, q as expandTableSlots, r as floorObjects, s as floorStackPlacements, t as floorsOf, u as initialFloorMode, v as layoutCombinedFloorPlan, w as layoutFloorStack, x as levelContextOutlines, y as mainFloorId, z as objectCenter, B as owningSectionForObject, D as pointInPolygon, G as pointInPolygonWithHoles, H as pointOnPolygonBoundary, I as polygonLabelPoint, J as rowInventoryCount, K as rowSeatPositions, M as stackFloors, N as suggestedFloorOverview, O as tableInventoryCount, P as tableSeatCountsBySide, Q as translateObject, S as usableHoles } from '../../tableSizing-
|
|
4
|
-
export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-
|
|
5
|
-
import { E as ExpandedSeat } from '../../renderer-
|
|
1
|
+
import { P as Point, v as CubicPath, w as TextObject, x as TableChairNumbering, T as TableObject, y as RowAisleSeats, C as ChartDoc, R as RowObject, a as ChartObject } from '../../types-CGOr0BpE.cjs';
|
|
2
|
+
export { F as FloorLabelStyle } from '../../types-CGOr0BpE.cjs';
|
|
3
|
+
export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_COVER_LIMIT, b as FLOOR_STACK_GAP_RATIO, c as FLOOR_STACK_MIN_SURFACE_PX, d as FloorStackOptions, e as FloorStackPlacement, L as LEVEL_CONTEXT_PREFIX, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, f as TableSeatSlot, g as allObjects, h as automaticRoundTableRadius, i as chartBounds, j as combinedFloorZoneId, k as effectiveFloorOverview, l as expandBooth, m as expandChart, n as expandRow, o as expandRowSlots, p as expandTable, q as expandTableSlots, r as floorObjects, s as floorStackPlacements, t as floorsOf, u as initialFloorMode, v as layoutCombinedFloorPlan, w as layoutFloorStack, x as levelContextOutlines, y as mainFloorId, z as objectCenter, B as owningSectionForObject, D as pointInPolygon, G as pointInPolygonWithHoles, H as pointOnPolygonBoundary, I as polygonLabelPoint, J as rowInventoryCount, K as rowSeatPositions, M as stackFloors, N as suggestedFloorOverview, O as tableInventoryCount, P as tableSeatCountsBySide, Q as translateObject, S as usableHoles } from '../../tableSizing-C6EjKNnk.cjs';
|
|
4
|
+
export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-Co9LqS4i.cjs';
|
|
5
|
+
import { E as ExpandedSeat } from '../../renderer-DM2sv1un.cjs';
|
|
6
6
|
|
|
7
7
|
type SectionShellMode = 'auto' | 'rectangle' | 'tapered' | 'bezier';
|
|
8
8
|
declare function cubicPoint(path: CubicPath, t: number): Point;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as Point, v as CubicPath, w as TextObject, x as TableChairNumbering, T as TableObject, y as RowAisleSeats, C as ChartDoc, R as RowObject, a as ChartObject } from '../../types-
|
|
2
|
-
export { F as FloorLabelStyle } from '../../types-
|
|
3
|
-
export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_COVER_LIMIT, b as FLOOR_STACK_GAP_RATIO, c as FLOOR_STACK_MIN_SURFACE_PX, d as FloorStackOptions, e as FloorStackPlacement, L as LEVEL_CONTEXT_PREFIX, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, f as TableSeatSlot, g as allObjects, h as automaticRoundTableRadius, i as chartBounds, j as combinedFloorZoneId, k as effectiveFloorOverview, l as expandBooth, m as expandChart, n as expandRow, o as expandRowSlots, p as expandTable, q as expandTableSlots, r as floorObjects, s as floorStackPlacements, t as floorsOf, u as initialFloorMode, v as layoutCombinedFloorPlan, w as layoutFloorStack, x as levelContextOutlines, y as mainFloorId, z as objectCenter, B as owningSectionForObject, D as pointInPolygon, G as pointInPolygonWithHoles, H as pointOnPolygonBoundary, I as polygonLabelPoint, J as rowInventoryCount, K as rowSeatPositions, M as stackFloors, N as suggestedFloorOverview, O as tableInventoryCount, P as tableSeatCountsBySide, Q as translateObject, S as usableHoles } from '../../tableSizing-
|
|
4
|
-
export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-
|
|
5
|
-
import { E as ExpandedSeat } from '../../renderer-
|
|
1
|
+
import { P as Point, v as CubicPath, w as TextObject, x as TableChairNumbering, T as TableObject, y as RowAisleSeats, C as ChartDoc, R as RowObject, a as ChartObject } from '../../types-CGOr0BpE.js';
|
|
2
|
+
export { F as FloorLabelStyle } from '../../types-CGOr0BpE.js';
|
|
3
|
+
export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_COVER_LIMIT, b as FLOOR_STACK_GAP_RATIO, c as FLOOR_STACK_MIN_SURFACE_PX, d as FloorStackOptions, e as FloorStackPlacement, L as LEVEL_CONTEXT_PREFIX, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, f as TableSeatSlot, g as allObjects, h as automaticRoundTableRadius, i as chartBounds, j as combinedFloorZoneId, k as effectiveFloorOverview, l as expandBooth, m as expandChart, n as expandRow, o as expandRowSlots, p as expandTable, q as expandTableSlots, r as floorObjects, s as floorStackPlacements, t as floorsOf, u as initialFloorMode, v as layoutCombinedFloorPlan, w as layoutFloorStack, x as levelContextOutlines, y as mainFloorId, z as objectCenter, B as owningSectionForObject, D as pointInPolygon, G as pointInPolygonWithHoles, H as pointOnPolygonBoundary, I as polygonLabelPoint, J as rowInventoryCount, K as rowSeatPositions, M as stackFloors, N as suggestedFloorOverview, O as tableInventoryCount, P as tableSeatCountsBySide, Q as translateObject, S as usableHoles } from '../../tableSizing-BDePQyPD.js';
|
|
4
|
+
export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-CO7DD803.js';
|
|
5
|
+
import { E as ExpandedSeat } from '../../renderer-DuieD7jP.js';
|
|
6
6
|
|
|
7
7
|
type SectionShellMode = 'auto' | 'rectangle' | 'tapered' | 'bezier';
|
|
8
8
|
declare function cubicPoint(path: CubicPath, t: number): Point;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ro,b as eo,c as fo,d as mo,e as po,f as to,g as xo,h as ao,i as bo,j as co,k as go,l as ho,m as io,n as yo,o as zo,p as Ao,q as Bo,r as Co,s as Do}from"../../chunk-
|
|
1
|
+
import{a as ro,b as eo,c as fo,d as mo,e as po,f as to,g as xo,h as ao,i as bo,j as co,k as go,l as ho,m as io,n as yo,o as zo,p as Ao,q as Bo,r as Co,s as Do}from"../../chunk-AZWAP4OE.js";import{a as jo,b as ko,c as lo,d as no,e as qo,f as so,g as uo,h as vo,i as wo}from"../../chunk-NXS6JFBI.js";import"../../chunk-M4NGX5NM.js";import"../../chunk-URW7MSCJ.js";import{$a as T,E as c,F as d,G as g,H as h,I as i,J as j,K as k,L as l,M as n,Na as F,Oa as G,Pa as H,Qa as I,Ra as J,Sa as K,Ta as L,Ua as M,Va as N,Wa as O,Xa as P,Ya as Q,Za as R,_a as S,ab as U,bb as V,cb as W,db as X,eb as Y,fb as Z,ga as q,gb as _,ha as s,hb as $,ia as u,ib as oo,ja as v,q as o,r,s as e,t as f,u as m,v as p,w as t,x,y as a,z as b}from"../../chunk-BXQQKDIX.js";import{k as w,l as y,m as z,n as A,o as B,p as C,q as D,r as E}from"../../chunk-S3VH7IDA.js";import"../../chunk-CRCGO52K.js";export{ko as AUTOMATIC_ROUND_TABLE_RADIUS_MAX,jo as AUTOMATIC_ROUND_TABLE_RADIUS_MIN,y as CHAIR_NUMBERING_DIRECTIONS,z as CHAIR_NUMBERING_FORMATS,w as CHAIR_NUMBERING_START_MAX,yo as DEFAULT_SEAT_RADIUS,ao as FLOOR_COVER_LIMIT,ro as FLOOR_STACK_GAP_RATIO,ho as FLOOR_STACK_MIN_SURFACE_PX,bo as LEVEL_CONTEXT_PREFIX,F as TABLE_SEAT_OFFSET,x as TEXT_BACKGROUND_PADDING_MAX,a as TEXT_BACKGROUND_RADIUS_MAX,p as TEXT_LETTER_SPACING_MAX,m as TEXT_LETTER_SPACING_MIN,f as TEXT_LINE_HEIGHT_MAX,e as TEXT_LINE_HEIGHT_MIN,t as TEXT_OPACITY_MIN,r as TEXT_WIDTH_MAX,o as TEXT_WIDTH_MIN,so as aisleSeatIds,Y as allObjects,lo as automaticRoundTableRadius,i as buildAisleHoles,zo as buildSeatIndex,h as buildSectionShell,D as chairNumberingProblem,oo as chartBounds,eo as combinedFloorZoneId,E as compactChairNumbering,c as cubicPoint,j as distanceToRings,g as distributeAlongCubic,to as effectiveFloorOverview,O as expandBooth,$ as expandChart,J as expandRow,I as expandRowSlots,N as expandTable,L as expandTableSlots,X as floorObjects,fo as floorStackPlacements,W as floorsOf,Do as gridStats,Ao as hitTest,io as initialFloorMode,uo as isAisleSeat,no as isRowAisleSeats,po as layoutCombinedFloorPlan,mo as layoutFloorStack,co as levelContextOutlines,go as mainFloorId,wo as mergeRowAisleSeats,Bo as nearestWithin,U as objectCenter,V as owningSectionForObject,P as pointInPolygon,S as pointInPolygonWithHoles,Q as pointOnPolygonBoundary,k as polygonArea,n as polygonInscribedAnchor,T as polygonLabelPoint,l as polygonNetArea,Co as queryRect,qo as resolveRowAisleSeats,v as resolveSegmentedRowGroups,H as rowInventoryCount,G as rowSeatPositions,s as segmentedRowComponentSeats,q as segmentedRowComponents,u as segmentedRowSeatTotal,d as smoothCubicThroughMiddle,vo as splitRowAisleSeats,_ as stackFloors,xo as suggestedFloorOverview,A as tableChairBookingLabel,C as tableChairDisplayLabel,B as tableChairToken,M as tableInventoryCount,K as tableSeatCountsBySide,b as textLayoutMetrics,Z as translateObject,R as usableHoles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Z=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Ie=Object.getOwnPropertyNames;var Re=Object.prototype.hasOwnProperty;var Ce=(t,r)=>{for(var n in r)Z(t,n,{get:r[n],enumerable:!0})},Ae=(t,r,n,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of Ie(r))!Re.call(t,l)&&l!==n&&Z(t,l,{get:()=>r[l],enumerable:!(a=we(r,l))||a.enumerable});return t};var ke=t=>Ae(Z({},"__esModule",{value:!0}),t);var dt={};Ce(dt,{ACCESS_GLYPH_PATH:()=>We,ACCESS_GLYPH_VIEWBOX:()=>Ye,ACCESS_TYPE_GLYPH_PATHS:()=>X,AUTHORED_LABEL_MIN_CONTRAST:()=>rt,BLOCK_LABEL_FILL_RATIO:()=>ue,BOOTH_LABEL_FONT_SIZE:()=>U,DARK_BOOKABLE_LABEL_INK:()=>f,DARK_NEUTRAL_SECTION_FILL:()=>pe,GA_CAPACITY_LABEL_FONT_SIZE:()=>Ge,GA_FILL_OPACITY:()=>Ze,GA_LABEL_FONT_SIZE:()=>De,LARGE_TEXT_CONTRAST:()=>de,LIGHT_BOOKABLE_LABEL_INK:()=>h,LIGHT_NEUTRAL_SECTION_FILL:()=>me,MIN_POINTER_TARGET_PX:()=>W,MIN_VISIBLE_BOOKABLE_LABEL_PX:()=>k,RENDERED_QUALITY_REPORT_VERSION:()=>he,ROW_LABEL_FONT_SIZE:()=>Fe,SEAT_LABEL_FONT_SIZE:()=>Oe,SECTION_NAME_CONTRAST:()=>$,SMALL_TEXT_CONTRAST:()=>v,TABLE_NAME_FONT_SIZE:()=>je,accessGlyphInk:()=>at,accessGlyphPath:()=>Je,accessibilityRingInk:()=>qe,blockLabelFontSize:()=>Ve,bookableMarkerLabel:()=>et,bookableNameSize:()=>He,bookableNameVisible:()=>Ke,categoryBandInk:()=>nt,compositeHexOver:()=>tt,explicitOrStateAwareLabelInk:()=>it,inspectRenderedQualityEvidence:()=>ut,isBookableLabelLegibleAtScale:()=>Xe,isLightFill:()=>ge,mapSeparatingInk:()=>be,minimumTextContrast:()=>$e,neutralSectionFill:()=>st,renderedTextContrast:()=>d,stateAwareBookableLabelInk:()=>Y,summarizeLabelInkContrast:()=>ct});module.exports=ke(dt);var Te=[{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"}],gt=new Map(Te.map(t=>[t.key,t]));var Ee={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 se(t){let r=t?.[0];return r&&Ee[r]||"#3b82f6"}var Me=[{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"}],mt=new Map(Me.map(t=>[t.key,t]));var Pe=["reference-focal","bar","entrance","exit","restroom","screen","sound","concession","coat","wall","rail","suite","obstruction"],pt=new Set(Pe);var Be=/^#?([\da-f]{3}|[\da-f]{6})$/i;function L(t){let r=Be.exec((t??"").trim());if(!r)return null;let n=r[1].length===3?r[1].split("").map(l=>l+l).join(""):r[1],a=parseInt(n,16);return[a>>16&255,a>>8&255,a&255]}function Q(t){let r=t/255;return r<=.04045?r/12.92:((r+.055)/1.055)**2.4}function N(t){return .2126*Q(t[0])+.7152*Q(t[1])+.0722*Q(t[2])}function ce(t,r){let n=L(t),a=L(r);if(!n||!a)return null;let l=N(n),u=N(a);return(Math.max(l,u)+.05)/(Math.min(l,u)+.05)}function _e(t){let r=t.trim();if(r.startsWith("#")){let a=L(r);return a?(.2126*a[0]+.7152*a[1]+.0722*a[2])/255:NaN}let n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/.exec(r);return n?(.2126*+n[1]+.7152*+n[2]+.0722*+n[3])/255:NaN}function z(t,r=.6){let n=_e(t);return!Number.isNaN(n)&&n>r}var Oe=7,Fe=10,U=10,ue=.39,Ne=.8,ze=.62;function Ve(t){let r=Math.min(Math.abs(t.width),Math.abs(t.height));if(!(r>0))return U;let n=Math.max(1,t.text.length),a=Math.abs(t.width)*Ne/(n*ze);return Math.max(U,Math.min(r*ue,a))}var De=15,Ge=11,je=12;function Ke(t){return t.labelPresentation?.visible!==!1}function He(t){let r=t.labelPresentation?.labelStyle?.size;return typeof r=="number"&&Number.isFinite(r)?r:void 0}var Ze=.85,k=12,v=4.5,$=3,de=3,f="#000000",h="#ffffff",Qe=24,Ue=18.67;function $e(t,r=400){return t>=Qe||r>=700&&t>=Ue?de:v}function Xe(t,r){return t*r>=k}var Ye=24,X={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"},We=X.wheelchair;function Je(t){if(!t?.length)return null;let r=t.includes("wheelchair")?"wheelchair":t[0];return X[r]??null}function qe(t,r){return r.colorblind?be(r.canvasBackground):se(t)}function et(t){return/-(\d{1,5})$/.exec(t)?.[1]??t}var d=ce;function tt(t,r,n){let a=L(t),l=L(r);if(!a||!l)return r;let u=Math.max(0,Math.min(1,n));return`#${a.map((p,M)=>Math.round(p*u+l[M]*(1-u))).map(p=>p.toString(16).padStart(2,"0")).join("")}`}var rt=3;function nt(t){let r=d(h,t)??0,n=d(f,t)??0;return r>=v?h:n>=v&&z(t)||z(t)?f:h}function be(t){return z(t)?f:h}function Y(t,r,n=v){let a=d(r,t);if(a!=null&&a>=n)return r;let l=d(f,t)??0,u=d(h,t)??0;return l===0&&u===0?r:l>=u?f:h}function it(t,r,n,a=v){return r??Y(t,n,a)}var ot=3;function at(t){let r=d("#ffffff",t);if(r!=null&&r>=ot)return"#ffffff";let n=d(f,t)??0,a=d(h,t)??0;return n===0&&a===0?"#ffffff":n>=a?f:h}var le=/^#[0-9a-f]{6}$/i;function ge(t){let r=L(t);return r!=null&&N(r)>.5}var me="#e5e7eb",pe="#273142";function st(t){return ge(t)?me:pe}function ct(t,r,n=v){let a=le.test(t.trim()),l=t.trim().toLowerCase(),u=0,m=0,p=null;for(let P of r){if(!a||!le.test(P.trim()))continue;u+=1;let B=Y(P,t,n);B.toLowerCase()!==l&&(m+=1,p=B)}return{total:u,overridden:m,status:u===0?"none":m===0?"applies":m===u?"overridden":"mixed",overrideInk:p}}var he=3,T=4.5,V=3,W=24,lt=20;function D(t){return t.filter(r=>r.visible&&!!r.screenBox)}function S(t,r){return t.x<r.x+r.width&&t.x+t.width>r.x&&t.y<r.y+r.height&&t.y+t.height>r.y}function y(t){return t.length?Math.round(Math.min(...t)*100)/100:null}function c(t,r,n){return n.length?{code:t,message:r,count:n.length,samples:n.slice(0,lt)}:null}function E(t,r,n){return{primaryId:t.seatId,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...n==null?{}:{minimum:n}}}function G(t,r,n){return{primaryId:t.id,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...n==null?{}:{minimum:n}}}function fe(t,r,n){return{primaryId:t.objectId,primaryLabel:t.text,...r==null?{}:{measured:Math.round(r*100)/100},...n==null?{}:{minimum:n}}}function w(t,r,n,a){return{primaryId:t,primaryLabel:r,secondaryId:n,secondaryLabel:a}}function ut(t,r="overview",n=null){let a=D(t.labels),l=D(t.hierarchyLabels),u=D(t.freeTextLabels),m=D(t.rowLabels),p=t.gaAreas.filter(e=>e.visible),M=a.map(e=>d(e.ink,e.fill)??0),P=l.map(e=>d(e.ink,e.fill)??0),B=u.map(e=>d(e.ink,e.background)??0),ye=p.map(e=>d(e.effectiveBackground,t.canvasBackground)??0),b=n?t.labels.filter(e=>e.categoryKey===n):t.labels,I=n?t.gaAreas.filter(e=>e.categoryKey===n):t.gaAreas,x=b.filter(e=>e.selected),R=b.filter(e=>e.status==="held"),C=b.filter(e=>e.status==="booked"),_=b.filter(e=>e.pointerTarget.active),J=new Set([...t.labels.filter(e=>e.visible&&(e.opacity>.25||e.selected||e.status!=="free")).map(e=>e.categoryKey),...t.gaAreas.filter(e=>e.visible&&e.opacity>.1).map(e=>e.categoryKey)]),O=x.length?y(x.map(e=>d(e.selectionRingColor??t.selectionRingColor,e.fill)??0)):null,s=[],A=(e,i)=>Array.from({length:e},(g,F)=>({primaryId:`overview:${F+1}`,primaryLabel:i}));r==="overview"&&t.rung==="sections"&&(s.push(c("overview-section-category-paint","Section overview shells must use the neutral hierarchy palette, not category paint",A(t.overviewStyle.categoryPaintedSectionShells,"category-painted section shell"))),s.push(c("overview-category-detail-visible","Category-tinted section detail must wait until section focus or seat zoom",A(t.overviewStyle.visibleCategoryDetailOutlines,"category detail outline"))),s.push(c("overview-row-hints-visible","Row and seat patterns must not clutter the section overview",A(t.overviewStyle.visibleSectionRowHints,"section row hint"))),s.push(c("overview-availability-clutter","Live availability counts belong in focused detail, not on section overview shells",A(t.overviewStyle.visibleSectionAvailabilityLabels,"section availability label"))),s.push(c("overview-ga-detail-visible","Section-contained standing paint belongs in focused detail, not on section overview shells",A(t.overviewStyle.visibleSectionGADetails,"section-contained GA detail")))),s.push(c("bookable-label-undersized","Visible bookable labels must meet the rendered small-text size floor",a.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>E(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),s.push(c("bookable-label-viewport-clipped","Visible interaction labels must remain fully inside the buyer viewport",r==="interaction"?a.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>E(e)):[])),s.push(c("row-label-viewport-clipped","Visible interaction row labels must remain fully inside the buyer viewport",r==="interaction"?m.flatMap((e,i)=>{let g=e.screenBox;return g.x<0||g.y<0||g.x+g.width>t.viewport.width||g.y+g.height>t.viewport.height?[{primaryId:`row-label-${i}`,primaryLabel:e.text}]:[]}):[]));let q=[];if(r==="interaction")for(let e=0;e<m.length;e+=1)for(let i=0;i<e;i+=1)S(m[e].screenBox,m[i].screenBox)&&q.push(w(`row-label-${i}`,m[i].text,`row-label-${e}`,m[e].text));if(s.push(c("row-label-collision","Visible interaction row labels must not overlap",q)),r==="interaction"){let e=b.length>0,i=I.length>0,g=e||i,F=I.filter(o=>o.visible),xe=new Set([...b.flatMap(o=>o.sectionId?[o.sectionId]:[]),...I.flatMap(o=>o.sectionId?[o.sectionId]:[])]),Le=new Set([...t.labels.map(o=>o.categoryKey),...t.gaAreas.map(o=>o.categoryKey)]),j=o=>o.screenCenter.x>=0&&o.screenCenter.x<=t.viewport.width&&o.screenCenter.y>=0&&o.screenCenter.y<=t.viewport.height;s.push(c("detail-rung-missing","Interaction evidence with bookable inventory must render the seat-detail rung",g&&t.rung!=="seats"?[{primaryId:"renderer",primaryLabel:t.rung}]:[])),s.push(c("detail-inventory-not-visible","Interaction evidence must frame at least one real bookable unit",g&&!b.some(j)&&!F.length?[{primaryId:"renderer",primaryLabel:"no target inventory in viewport"}]:[])),s.push(c("pointer-target-inactive","Interaction evidence must expose a live production pointer target",e&&!_.some(j)||!e&&i&&!F.some(o=>o.interactive)?[{primaryId:"renderer",primaryLabel:"no active pointer target in viewport"}]:[])),s.push(c("pointer-target-undersized","Every active production pointer target must reach at least 24 CSS pixels",_.filter(o=>j(o)&&o.pointerTarget.effectiveMinimumPx<W).map(o=>E(o,o.pointerTarget.effectiveMinimumPx,W)))),s.push(c("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!x.length||!x.some(o=>t.selectionRingSeatIds.includes(o.seatId)))?[{primaryId:"renderer",primaryLabel:"selected state"}]:[])),s.push(c("selected-state-contrast-low","The selected-state ring must maintain 3:1 graphical contrast with the seat paint",x.length&&(O??0)<V?[{primaryId:x[0].seatId,primaryLabel:x[0].label,measured:Math.round((O??0)*100)/100,minimum:V}]:[])),s.push(c("held-state-missing","Interaction evidence must paint a held state when the floor has at least two status-managed units",b.length>=2&&!R.length?[{primaryId:"renderer",primaryLabel:"held state"}]:[])),s.push(c("booked-state-missing","Interaction evidence must paint a taken state when the floor has at least three status-managed units",b.length>=3&&!C.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let ve=new Set(R.map(o=>`${o.fill.toLowerCase()}:${o.opacity}`)),Se=new Set(C.map(o=>`${o.fill.toLowerCase()}:${o.opacity}`));s.push(c("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",R.length&&C.length&&[...ve].some(o=>Se.has(o))?[{primaryId:R[0].seatId,primaryLabel:R[0].label,secondaryId:C[0].seatId,secondaryLabel:C[0].label}]:[])),s.push(c("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",xe.size&&(!t.focusedSectionId||!t.focusBackdropVisible)?[{primaryId:"renderer",primaryLabel:"section focus"}]:[])),s.push(c("category-filter-missing","Interaction evidence must exercise a category filter when multiple categories exist",Le.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let K=t.labels.filter(o=>o.status==="free"&&!o.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(o.categoryKey)),H=t.gaAreas.filter(o=>t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(o.categoryKey));s.push(c("category-filter-ineffective","The active category filter must visibly dim excluded free inventory",(K.length||H.length)&&!K.some(o=>o.opacity<=.25)&&!H.some(o=>o.opacity<=.1)?[...K.map(o=>E(o,o.opacity)),...H.map(o=>({primaryId:o.areaId,primaryLabel:o.label,measured:o.opacity}))]:[])),s.push(c("target-category-not-visible","A category-specific interaction scene must visibly paint its exact target category",n&&!J.has(n)?[{primaryId:n,primaryLabel:n}]:[])),s.push(c("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",n&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==n)?[{primaryId:n,primaryLabel:n}]:[]))}s.push(c("bookable-label-contrast-low","Visible bookable labels must meet 4.5:1 contrast against their actual paint",a.flatMap(e=>{let i=d(e.ink,e.fill)??0;return i<T?[E(e,i,T)]:[]})));let ee=[];for(let e=0;e<a.length;e+=1)for(let i=0;i<e;i+=1)S(a[e].screenBox,a[i].screenBox)&&ee.push(w(a[i].seatId,a[i].label,a[e].seatId,a[e].label));s.push(c("bookable-label-collision","Visible bookable labels must not overlap",ee)),s.push(c("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",l.filter(e=>e.renderedFontPx<(e.sizeFloorPx??k)).map(e=>G(e,e.renderedFontPx,e.sizeFloorPx??k)))),s.push(c("hierarchy-label-contrast-low","Visible section and zone labels must meet 4.5:1 contrast against their backing paint",l.flatMap(e=>{let i=d(e.ink,e.fill)??0,g=e.kind==="section"&&e.role==="name"?$:T;return i<g?[G(e,i,g)]:[]}))),s.push(c("hierarchy-label-viewport-clipped","Visible overview hierarchy labels must remain fully inside the buyer viewport",r==="overview"?l.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>G(e)):[])),s.push(c("hierarchy-label-outside-section","Visible section labels must remain inside the filled section surface and outside holes",l.filter(e=>e.kind==="section"&&e.fitsContainer===!1).map(e=>G(e))));let te=[];for(let e=0;e<l.length;e+=1)for(let i=0;i<e;i+=1)S(l[e].screenBox,l[i].screenBox)&&te.push(w(l[i].id,l[i].label,l[e].id,l[e].label));s.push(c("hierarchy-label-collision","Visible hierarchy labels must not overlap each other",te));let re=[];for(let e of l)for(let i of a)S(e.screenBox,i.screenBox)&&re.push(w(e.id,e.label,i.seatId,i.label));s.push(c("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",re)),s.push(c("free-text-undersized","Visible chart text must meet the rendered small-text size floor",u.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>fe(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),s.push(c("free-text-contrast-low","Visible chart text must meet 4.5:1 contrast against its measured background",u.flatMap(e=>{let i=d(e.ink,e.background)??0;return i<T?[fe(e,i,T)]:[]})));let ne=[];for(let e=0;e<u.length;e+=1)for(let i=0;i<e;i+=1)S(u[e].screenBox,u[i].screenBox)&&ne.push(w(u[i].objectId,u[i].text,u[e].objectId,u[e].text));s.push(c("free-text-collision","Visible chart text labels must not overlap each other",ne));let ie=[];for(let e of u)for(let i of a)S(e.screenBox,i.screenBox)&&ie.push(w(e.objectId,e.text,i.seatId,i.label));s.push(c("free-text-bookable-collision","Visible chart text must not overlap bookable labels",ie));let oe=[];for(let e of u)for(let i of l)S(e.screenBox,i.screenBox)&&oe.push(w(e.objectId,e.text,i.id,i.label));s.push(c("free-text-hierarchy-collision","Visible chart text must not overlap hierarchy labels",oe)),s.push(c("ga-contrast-low","Visible GA surfaces must maintain 3:1 graphical contrast with the canvas",p.flatMap(e=>{let i=d(e.effectiveBackground,t.canvasBackground)??0;return i<V?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(i*100)/100,minimum:V}]:[]})));let ae=s.filter(e=>!!e);return{version:he,passed:ae.length===0,state:r,targetCategoryKey:n,resolvedRules:["rendered-overview-label-size","rendered-overview-label-contrast","rendered-overview-label-collision","rendered-overview-hierarchy-viewport","rendered-overview-hierarchy-containment","rendered-overview-section-first-style","rendered-overview-ga-contrast",...r==="interaction"?["rendered-detail-label-viewport","rendered-detail-inventory","rendered-pointer-target","rendered-selected-held-taken-states","rendered-section-focus","rendered-category-filter"]:[]],viewport:t.viewport,canvasBackground:t.canvasBackground,effectiveScale:t.effectiveScale,rung:t.rung,inventory:{totalBookableUnits:t.totalBookableUnits,totalLabelledBookableUnits:t.totalLabelledBookableUnits,visibleBookableLabels:a.length,hiddenBookableLabels:t.hiddenLabels,visibleHierarchyLabels:l.length,visibleFreeTextLabels:u.length,visibleGAAreas:p.length},overviewStyle:t.overviewStyle,composition:{hierarchy:t.hierarchyLabels.filter(e=>e.role==="name").map(e=>({id:e.id,kind:e.kind,label:e.label,visible:e.visible})).sort((e,i)=>e.kind.localeCompare(i.kind)||e.id.localeCompare(i.id)),labelledObjects:t.freeTextLabels.map(e=>({objectId:e.objectId,kind:e.kind,text:e.text,visible:e.visible})).sort((e,i)=>e.objectId.localeCompare(i.objectId)||e.kind.localeCompare(i.kind)),gaAreas:t.gaAreas.map(e=>({areaId:e.areaId,label:e.label,categoryKey:e.categoryKey,...e.sectionId?{sectionId:e.sectionId}:{},visible:e.visible})).sort((e,i)=>e.areaId.localeCompare(i.areaId)),bookableSectionIds:[...new Set(t.labels.flatMap(e=>e.sectionId?[e.sectionId]:[]))].sort(),categoryKeys:[...new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)])].sort(),activeCategoryKeys:[...J].sort()},metrics:{minimumRenderedBookableLabelPx:y(a.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:y(M),minimumRenderedHierarchyLabelPx:y(l.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:y(P),minimumRenderedFreeTextPx:y(u.map(e=>e.renderedFontPx)),minimumFreeTextContrast:y(B),minimumGAContrast:y(ye),minimumEffectivePointerTargetPx:y(_.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:O==null?null:Math.round(O*100)/100},interaction:{applicable:{detail:b.length>0||I.length>0,pointer:b.length>0||I.length>0,held:b.length>=2,booked:b.length>=3,sectionFocus:b.some(e=>!!e.sectionId)||I.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:x.length,heldUnits:R.length,bookedUnits:C.length,activePointerTargets:_.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:ae}}0&&(module.exports={ACCESS_GLYPH_PATH,ACCESS_GLYPH_VIEWBOX,ACCESS_TYPE_GLYPH_PATHS,AUTHORED_LABEL_MIN_CONTRAST,BLOCK_LABEL_FILL_RATIO,BOOTH_LABEL_FONT_SIZE,DARK_BOOKABLE_LABEL_INK,DARK_NEUTRAL_SECTION_FILL,GA_CAPACITY_LABEL_FONT_SIZE,GA_FILL_OPACITY,GA_LABEL_FONT_SIZE,LARGE_TEXT_CONTRAST,LIGHT_BOOKABLE_LABEL_INK,LIGHT_NEUTRAL_SECTION_FILL,MIN_POINTER_TARGET_PX,MIN_VISIBLE_BOOKABLE_LABEL_PX,RENDERED_QUALITY_REPORT_VERSION,ROW_LABEL_FONT_SIZE,SEAT_LABEL_FONT_SIZE,SECTION_NAME_CONTRAST,SMALL_TEXT_CONTRAST,TABLE_NAME_FONT_SIZE,accessGlyphInk,accessGlyphPath,accessibilityRingInk,blockLabelFontSize,bookableMarkerLabel,bookableNameSize,bookableNameVisible,categoryBandInk,compositeHexOver,explicitOrStateAwareLabelInk,inspectRenderedQualityEvidence,isBookableLabelLegibleAtScale,isLightFill,mapSeparatingInk,minimumTextContrast,neutralSectionFill,renderedTextContrast,stateAwareBookableLabelInk,summarizeLabelInkContrast});
|
|
1
|
+
"use strict";var Z=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Ie=Object.getOwnPropertyNames;var Re=Object.prototype.hasOwnProperty;var Ce=(t,r)=>{for(var n in r)Z(t,n,{get:r[n],enumerable:!0})},ke=(t,r,n,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of Ie(r))!Re.call(t,l)&&l!==n&&Z(t,l,{get:()=>r[l],enumerable:!(a=we(r,l))||a.enumerable});return t};var Ae=t=>ke(Z({},"__esModule",{value:!0}),t);var dt={};Ce(dt,{ACCESS_GLYPH_PATH:()=>We,ACCESS_GLYPH_VIEWBOX:()=>Ye,ACCESS_TYPE_GLYPH_PATHS:()=>X,AUTHORED_LABEL_MIN_CONTRAST:()=>rt,BLOCK_LABEL_FILL_RATIO:()=>ue,BOOTH_LABEL_FONT_SIZE:()=>U,DARK_BOOKABLE_LABEL_INK:()=>f,DARK_NEUTRAL_SECTION_FILL:()=>pe,GA_CAPACITY_LABEL_FONT_SIZE:()=>Ge,GA_FILL_OPACITY:()=>Ze,GA_LABEL_FONT_SIZE:()=>De,LARGE_TEXT_CONTRAST:()=>de,LIGHT_BOOKABLE_LABEL_INK:()=>y,LIGHT_NEUTRAL_SECTION_FILL:()=>ge,MIN_POINTER_TARGET_PX:()=>W,MIN_VISIBLE_BOOKABLE_LABEL_PX:()=>A,RENDERED_QUALITY_REPORT_VERSION:()=>ye,ROW_LABEL_FONT_SIZE:()=>Fe,SEAT_LABEL_FONT_SIZE:()=>Oe,SECTION_NAME_CONTRAST:()=>$,SMALL_TEXT_CONTRAST:()=>v,TABLE_NAME_FONT_SIZE:()=>je,accessGlyphInk:()=>at,accessGlyphPath:()=>Je,accessibilityRingInk:()=>qe,blockLabelFontSize:()=>Ve,bookableMarkerLabel:()=>et,bookableNameSize:()=>He,bookableNameVisible:()=>Ke,categoryBandInk:()=>nt,compositeHexOver:()=>tt,explicitOrStateAwareLabelInk:()=>it,inspectRenderedQualityEvidence:()=>ut,isBookableLabelLegibleAtScale:()=>Xe,isLightFill:()=>me,mapSeparatingInk:()=>be,minimumTextContrast:()=>$e,neutralSectionFill:()=>st,renderedTextContrast:()=>d,stateAwareBookableLabelInk:()=>Y,summarizeLabelInkContrast:()=>ct});module.exports=Ae(dt);var Te=[{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"}],mt=new Map(Te.map(t=>[t.key,t]));var Ee={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 se(t){let r=t?.[0];return r&&Ee[r]||"#3b82f6"}var Me=[{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"}],gt=new Map(Me.map(t=>[t.key,t]));var Pe=["reference-focal","bar","entrance","exit","restroom","screen","sound","concession","coat","wall","rail","suite","obstruction"],pt=new Set(Pe);var Be=/^#?([\da-f]{3}|[\da-f]{6})$/i;function L(t){let r=Be.exec((t??"").trim());if(!r)return null;let n=r[1].length===3?r[1].split("").map(l=>l+l).join(""):r[1],a=parseInt(n,16);return[a>>16&255,a>>8&255,a&255]}function Q(t){let r=t/255;return r<=.04045?r/12.92:((r+.055)/1.055)**2.4}function N(t){return .2126*Q(t[0])+.7152*Q(t[1])+.0722*Q(t[2])}function ce(t,r){let n=L(t),a=L(r);if(!n||!a)return null;let l=N(n),u=N(a);return(Math.max(l,u)+.05)/(Math.min(l,u)+.05)}function _e(t){let r=t.trim();if(r.startsWith("#")){let a=L(r);return a?(.2126*a[0]+.7152*a[1]+.0722*a[2])/255:NaN}let n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/.exec(r);return n?(.2126*+n[1]+.7152*+n[2]+.0722*+n[3])/255:NaN}function z(t,r=.6){let n=_e(t);return!Number.isNaN(n)&&n>r}var Oe=7,Fe=10,U=10,ue=.39,Ne=.8,ze=.62;function Ve(t){let r=Math.min(Math.abs(t.width),Math.abs(t.height));if(!(r>0))return U;let n=Math.max(1,t.text.length),a=Math.abs(t.width)*Ne/(n*ze);return Math.max(U,Math.min(r*ue,a))}var De=15,Ge=11,je=12;function Ke(t){return t.labelPresentation?.visible!==!1}function He(t){let r=t.labelPresentation?.labelStyle?.size;return typeof r=="number"&&Number.isFinite(r)?r:void 0}var Ze=.85,A=12,v=4.5,$=3,de=3,f="#000000",y="#ffffff",Qe=24,Ue=18.67;function $e(t,r=400){return t>=Qe||r>=700&&t>=Ue?de:v}function Xe(t,r){return t*r>=A}var Ye=24,X={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"},We=X.wheelchair;function Je(t){if(!t?.length)return null;let r=t.includes("wheelchair")?"wheelchair":t[0];return X[r]??null}function qe(t,r){return r.colorblind?be(r.canvasBackground):se(t)}function et(t){return/-(\d{1,5})$/.exec(t)?.[1]??t}var d=ce;function tt(t,r,n){let a=L(t),l=L(r);if(!a||!l)return r;let u=Math.max(0,Math.min(1,n));return`#${a.map((p,M)=>Math.round(p*u+l[M]*(1-u))).map(p=>p.toString(16).padStart(2,"0")).join("")}`}var rt=3;function nt(t){let r=d(y,t)??0,n=d(f,t)??0;return r>=v?y:n>=v&&z(t)||z(t)?f:y}function be(t){return z(t)?f:y}function Y(t,r,n=v){let a=d(r,t);if(a!=null&&a>=n)return r;let l=d(f,t)??0,u=d(y,t)??0;return l===0&&u===0?r:l>=u?f:y}function it(t,r,n,a=v){return r??Y(t,n,a)}var ot=3;function at(t){let r=d("#ffffff",t);if(r!=null&&r>=ot)return"#ffffff";let n=d(f,t)??0,a=d(y,t)??0;return n===0&&a===0?"#ffffff":n>=a?f:y}var le=/^#[0-9a-f]{6}$/i;function me(t){let r=L(t);return r!=null&&N(r)>.5}var ge="#e5e7eb",pe="#273142";function st(t){return me(t)?ge:pe}function ct(t,r,n=v){let a=le.test(t.trim()),l=t.trim().toLowerCase(),u=0,g=0,p=null;for(let P of r){if(!a||!le.test(P.trim()))continue;u+=1;let B=Y(P,t,n);B.toLowerCase()!==l&&(g+=1,p=B)}return{total:u,overridden:g,status:u===0?"none":g===0?"applies":g===u?"overridden":"mixed",overrideInk:p}}var ye=3,T=4.5,V=3,W=24,lt=20;function D(t){return t.filter(r=>r.visible&&!!r.screenBox)}function S(t,r){return t.x<r.x+r.width&&t.x+t.width>r.x&&t.y<r.y+r.height&&t.y+t.height>r.y}function h(t){return t.length?Math.round(Math.min(...t)*100)/100:null}function c(t,r,n){return n.length?{code:t,message:r,count:n.length,samples:n.slice(0,lt)}:null}function E(t,r,n){return{primaryId:t.seatId,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...n==null?{}:{minimum:n}}}function G(t,r,n){return{primaryId:t.id,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...n==null?{}:{minimum:n}}}function fe(t,r,n){return{primaryId:t.objectId,primaryLabel:t.text,...r==null?{}:{measured:Math.round(r*100)/100},...n==null?{}:{minimum:n}}}function w(t,r,n,a){return{primaryId:t,primaryLabel:r,secondaryId:n,secondaryLabel:a}}function ut(t,r="overview",n=null){let a=D(t.labels),l=D(t.hierarchyLabels),u=D(t.freeTextLabels),g=D(t.rowLabels),p=t.gaAreas.filter(e=>e.visible),M=a.map(e=>d(e.ink,e.fill)??0),P=l.map(e=>d(e.ink,e.fill)??0),B=u.map(e=>d(e.ink,e.background)??0),he=p.map(e=>d(e.effectiveBackground,t.canvasBackground)??0),b=n?t.labels.filter(e=>e.categoryKey===n):t.labels,I=n?t.gaAreas.filter(e=>e.categoryKey===n):t.gaAreas,x=b.filter(e=>e.selected),R=b.filter(e=>e.status==="held"),C=b.filter(e=>e.status==="booked"),_=b.filter(e=>e.pointerTarget.active),J=new Set([...t.labels.filter(e=>e.visible&&(e.opacity>.25||e.selected||e.status!=="free")).map(e=>e.categoryKey),...t.gaAreas.filter(e=>e.visible&&e.opacity>.1).map(e=>e.categoryKey)]),O=x.length?h(x.map(e=>d(e.selectionRingColor??t.selectionRingColor,e.fill)??0)):null,s=[],k=(e,i)=>Array.from({length:e},(m,F)=>({primaryId:`overview:${F+1}`,primaryLabel:i}));r==="overview"&&t.rung==="sections"&&(s.push(c("overview-section-category-paint","Section overview shells must use the neutral hierarchy palette, not category paint",k(t.overviewStyle.categoryPaintedSectionShells,"category-painted section shell"))),s.push(c("overview-category-detail-visible","Category-tinted section detail must wait until section focus or seat zoom",k(t.overviewStyle.visibleCategoryDetailOutlines,"category detail outline"))),s.push(c("overview-row-hints-visible","Row and seat patterns must not clutter the section overview",k(t.overviewStyle.visibleSectionRowHints,"section row hint"))),s.push(c("overview-availability-clutter","Live availability counts belong in focused detail, not on section overview shells",k(t.overviewStyle.visibleSectionAvailabilityLabels,"section availability label"))),s.push(c("overview-ga-detail-visible","Section-contained standing paint belongs in focused detail, not on section overview shells",k(t.overviewStyle.visibleSectionGADetails,"section-contained GA detail")))),s.push(c("bookable-label-undersized","Visible bookable labels must meet the rendered small-text size floor",a.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>E(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),s.push(c("bookable-label-viewport-clipped","Visible interaction labels must remain fully inside the buyer viewport",r==="interaction"?a.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>E(e)):[])),s.push(c("row-label-viewport-clipped","Visible interaction row labels must remain fully inside the buyer viewport",r==="interaction"?g.flatMap((e,i)=>{let m=e.screenBox;return m.x<0||m.y<0||m.x+m.width>t.viewport.width||m.y+m.height>t.viewport.height?[{primaryId:`row-label-${i}`,primaryLabel:e.text}]:[]}):[]));let q=[];if(r==="interaction")for(let e=0;e<g.length;e+=1)for(let i=0;i<e;i+=1)S(g[e].screenBox,g[i].screenBox)&&q.push(w(`row-label-${i}`,g[i].text,`row-label-${e}`,g[e].text));if(s.push(c("row-label-collision","Visible interaction row labels must not overlap",q)),r==="interaction"){let e=b.length>0,i=I.length>0,m=e||i,F=I.filter(o=>o.visible),xe=new Set([...b.flatMap(o=>o.sectionId?[o.sectionId]:[]),...I.flatMap(o=>o.sectionId?[o.sectionId]:[])]),Le=new Set([...t.labels.map(o=>o.categoryKey),...t.gaAreas.map(o=>o.categoryKey)]),j=o=>o.screenCenter.x>=0&&o.screenCenter.x<=t.viewport.width&&o.screenCenter.y>=0&&o.screenCenter.y<=t.viewport.height;s.push(c("detail-rung-missing","Interaction evidence with bookable inventory must render the seat-detail rung",m&&t.rung!=="seats"?[{primaryId:"renderer",primaryLabel:t.rung}]:[])),s.push(c("detail-inventory-not-visible","Interaction evidence must frame at least one real bookable unit",m&&!b.some(j)&&!F.length?[{primaryId:"renderer",primaryLabel:"no target inventory in viewport"}]:[])),s.push(c("pointer-target-inactive","Interaction evidence must expose a live production pointer target",e&&!_.some(j)||!e&&i&&!F.some(o=>o.interactive)?[{primaryId:"renderer",primaryLabel:"no active pointer target in viewport"}]:[])),s.push(c("pointer-target-undersized","Every active production pointer target must reach at least 24 CSS pixels",_.filter(o=>j(o)&&o.pointerTarget.effectiveMinimumPx<W).map(o=>E(o,o.pointerTarget.effectiveMinimumPx,W)))),s.push(c("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!x.length||!x.some(o=>t.selectionRingSeatIds.includes(o.seatId)))?[{primaryId:"renderer",primaryLabel:"selected state"}]:[])),s.push(c("selected-state-contrast-low","The selected-state ring must maintain 3:1 graphical contrast with the seat paint",x.length&&(O??0)<V?[{primaryId:x[0].seatId,primaryLabel:x[0].label,measured:Math.round((O??0)*100)/100,minimum:V}]:[])),s.push(c("held-state-missing","Interaction evidence must paint a held state when the floor has at least two status-managed units",b.length>=2&&!R.length?[{primaryId:"renderer",primaryLabel:"held state"}]:[])),s.push(c("booked-state-missing","Interaction evidence must paint a taken state when the floor has at least three status-managed units",b.length>=3&&!C.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let ve=new Set(R.map(o=>`${o.fill.toLowerCase()}:${o.opacity}`)),Se=new Set(C.map(o=>`${o.fill.toLowerCase()}:${o.opacity}`));s.push(c("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",R.length&&C.length&&[...ve].some(o=>Se.has(o))?[{primaryId:R[0].seatId,primaryLabel:R[0].label,secondaryId:C[0].seatId,secondaryLabel:C[0].label}]:[])),s.push(c("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",xe.size&&(!t.focusedSectionId||!t.focusBackdropVisible)?[{primaryId:"renderer",primaryLabel:"section focus"}]:[])),s.push(c("category-filter-missing","Interaction evidence must exercise a category filter when multiple categories exist",Le.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let K=t.labels.filter(o=>o.status==="free"&&!o.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(o.categoryKey)),H=t.gaAreas.filter(o=>t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(o.categoryKey));s.push(c("category-filter-ineffective","The active category filter must visibly dim excluded free inventory",(K.length||H.length)&&!K.some(o=>o.opacity<=.25)&&!H.some(o=>o.opacity<=.1)?[...K.map(o=>E(o,o.opacity)),...H.map(o=>({primaryId:o.areaId,primaryLabel:o.label,measured:o.opacity}))]:[])),s.push(c("target-category-not-visible","A category-specific interaction scene must visibly paint its exact target category",n&&!J.has(n)?[{primaryId:n,primaryLabel:n}]:[])),s.push(c("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",n&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==n)?[{primaryId:n,primaryLabel:n}]:[]))}s.push(c("bookable-label-contrast-low","Visible bookable labels must meet 4.5:1 contrast against their actual paint",a.flatMap(e=>{let i=d(e.ink,e.fill)??0;return i<T?[E(e,i,T)]:[]})));let ee=[];for(let e=0;e<a.length;e+=1)for(let i=0;i<e;i+=1)S(a[e].screenBox,a[i].screenBox)&&ee.push(w(a[i].seatId,a[i].label,a[e].seatId,a[e].label));s.push(c("bookable-label-collision","Visible bookable labels must not overlap",ee)),s.push(c("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",l.filter(e=>e.renderedFontPx<(e.sizeFloorPx??A)).map(e=>G(e,e.renderedFontPx,e.sizeFloorPx??A)))),s.push(c("hierarchy-label-contrast-low","Visible section and zone labels must meet 4.5:1 contrast against their backing paint",l.flatMap(e=>{let i=d(e.ink,e.fill)??0,m=e.kind==="section"&&e.role==="name"?$:T;return i<m?[G(e,i,m)]:[]}))),s.push(c("hierarchy-label-viewport-clipped","Visible overview hierarchy labels must remain fully inside the buyer viewport",r==="overview"?l.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>G(e)):[])),s.push(c("hierarchy-label-outside-section","Visible section labels must remain inside the filled section surface and outside holes",l.filter(e=>e.kind==="section"&&e.fitsContainer===!1).map(e=>G(e))));let te=[];for(let e=0;e<l.length;e+=1)for(let i=0;i<e;i+=1)S(l[e].screenBox,l[i].screenBox)&&te.push(w(l[i].id,l[i].label,l[e].id,l[e].label));s.push(c("hierarchy-label-collision","Visible hierarchy labels must not overlap each other",te));let re=[];for(let e of l)for(let i of a)S(e.screenBox,i.screenBox)&&re.push(w(e.id,e.label,i.seatId,i.label));s.push(c("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",re)),s.push(c("free-text-undersized","Visible chart text must meet the rendered small-text size floor",u.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>fe(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),s.push(c("free-text-contrast-low","Visible chart text must meet 4.5:1 contrast against its measured background",u.flatMap(e=>{let i=d(e.ink,e.background)??0;return i<T?[fe(e,i,T)]:[]})));let ne=[];for(let e=0;e<u.length;e+=1)for(let i=0;i<e;i+=1)S(u[e].screenBox,u[i].screenBox)&&ne.push(w(u[i].objectId,u[i].text,u[e].objectId,u[e].text));s.push(c("free-text-collision","Visible chart text labels must not overlap each other",ne));let ie=[];for(let e of u)for(let i of a)S(e.screenBox,i.screenBox)&&ie.push(w(e.objectId,e.text,i.seatId,i.label));s.push(c("free-text-bookable-collision","Visible chart text must not overlap bookable labels",ie));let oe=[];for(let e of u)for(let i of l)S(e.screenBox,i.screenBox)&&oe.push(w(e.objectId,e.text,i.id,i.label));s.push(c("free-text-hierarchy-collision","Visible chart text must not overlap hierarchy labels",oe)),s.push(c("ga-contrast-low","Visible GA surfaces must maintain 3:1 graphical contrast with the canvas",p.flatMap(e=>{let i=d(e.effectiveBackground,t.canvasBackground)??0;return i<V?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(i*100)/100,minimum:V}]:[]})));let ae=s.filter(e=>!!e);return{version:ye,passed:ae.length===0,state:r,targetCategoryKey:n,resolvedRules:["rendered-overview-label-size","rendered-overview-label-contrast","rendered-overview-label-collision","rendered-overview-hierarchy-viewport","rendered-overview-hierarchy-containment","rendered-overview-section-first-style","rendered-overview-ga-contrast",...r==="interaction"?["rendered-detail-label-viewport","rendered-detail-inventory","rendered-pointer-target","rendered-selected-held-taken-states","rendered-section-focus","rendered-category-filter"]:[]],viewport:t.viewport,canvasBackground:t.canvasBackground,effectiveScale:t.effectiveScale,rung:t.rung,inventory:{totalBookableUnits:t.totalBookableUnits,totalLabelledBookableUnits:t.totalLabelledBookableUnits,visibleBookableLabels:a.length,hiddenBookableLabels:t.hiddenLabels,visibleHierarchyLabels:l.length,visibleFreeTextLabels:u.length,visibleGAAreas:p.length},overviewStyle:t.overviewStyle,composition:{hierarchy:t.hierarchyLabels.filter(e=>e.role==="name").map(e=>({id:e.id,kind:e.kind,label:e.label,visible:e.visible})).sort((e,i)=>e.kind.localeCompare(i.kind)||e.id.localeCompare(i.id)),labelledObjects:t.freeTextLabels.map(e=>({objectId:e.objectId,kind:e.kind,text:e.text,visible:e.visible})).sort((e,i)=>e.objectId.localeCompare(i.objectId)||e.kind.localeCompare(i.kind)),gaAreas:t.gaAreas.map(e=>({areaId:e.areaId,label:e.label,categoryKey:e.categoryKey,...e.sectionId?{sectionId:e.sectionId}:{},visible:e.visible})).sort((e,i)=>e.areaId.localeCompare(i.areaId)),bookableSectionIds:[...new Set(t.labels.flatMap(e=>e.sectionId?[e.sectionId]:[]))].sort(),categoryKeys:[...new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)])].sort(),activeCategoryKeys:[...J].sort()},metrics:{minimumRenderedBookableLabelPx:h(a.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:h(M),minimumRenderedHierarchyLabelPx:h(l.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:h(P),minimumRenderedFreeTextPx:h(u.map(e=>e.renderedFontPx)),minimumFreeTextContrast:h(B),minimumGAContrast:h(he),minimumEffectivePointerTargetPx:h(_.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:O==null?null:Math.round(O*100)/100},interaction:{applicable:{detail:b.length>0||I.length>0,pointer:b.length>0||I.length>0,held:b.length>=2,booked:b.length>=3,sectionFocus:b.some(e=>!!e.sectionId)||I.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:x.length,heldUnits:R.length,bookedUnits:C.length,activePointerTargets:_.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:ae}}0&&(module.exports={ACCESS_GLYPH_PATH,ACCESS_GLYPH_VIEWBOX,ACCESS_TYPE_GLYPH_PATHS,AUTHORED_LABEL_MIN_CONTRAST,BLOCK_LABEL_FILL_RATIO,BOOTH_LABEL_FONT_SIZE,DARK_BOOKABLE_LABEL_INK,DARK_NEUTRAL_SECTION_FILL,GA_CAPACITY_LABEL_FONT_SIZE,GA_FILL_OPACITY,GA_LABEL_FONT_SIZE,LARGE_TEXT_CONTRAST,LIGHT_BOOKABLE_LABEL_INK,LIGHT_NEUTRAL_SECTION_FILL,MIN_POINTER_TARGET_PX,MIN_VISIBLE_BOOKABLE_LABEL_PX,RENDERED_QUALITY_REPORT_VERSION,ROW_LABEL_FONT_SIZE,SEAT_LABEL_FONT_SIZE,SECTION_NAME_CONTRAST,SMALL_TEXT_CONTRAST,TABLE_NAME_FONT_SIZE,accessGlyphInk,accessGlyphPath,accessibilityRingInk,blockLabelFontSize,bookableMarkerLabel,bookableNameSize,bookableNameVisible,categoryBandInk,compositeHexOver,explicitOrStateAwareLabelInk,inspectRenderedQualityEvidence,isBookableLabelLegibleAtScale,isLightFill,mapSeparatingInk,minimumTextContrast,neutralSectionFill,renderedTextContrast,stateAwareBookableLabelInk,summarizeLabelInkContrast});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as AccessibilityType } from '../../types-
|
|
1
|
+
import { A as AccessibilityType } from '../../types-CGOr0BpE.cjs';
|
|
2
2
|
import { contrastRatioOrNull } from '../color.cjs';
|
|
3
|
-
export { M as MIN_POINTER_TARGET_PX, R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from '../../renderedQuality-
|
|
4
|
-
import '../../renderer-
|
|
3
|
+
export { M as MIN_POINTER_TARGET_PX, R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from '../../renderedQuality-Frgw6jdx.cjs';
|
|
4
|
+
import '../../renderer-DM2sv1un.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Rendering constants that quality inspection must agree with.
|