@seatlayer/core 0.75.1 → 0.75.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/{categoryInventory-DFp26meo.d.cts → categoryInventory-CBuJy9KM.d.cts} +1 -1
  2. package/dist/{categoryInventory-C5I2U-EM.d.ts → categoryInventory-Cy5pQ0KW.d.ts} +1 -1
  3. package/dist/chunk-24O23MNB.js +1 -0
  4. package/dist/chunk-BT2KJXQC.js +1 -0
  5. package/dist/{chunk-3L4M7L5I.js → chunk-BXU5D2Q5.js} +1 -1
  6. package/dist/chunk-FGMGDTMR.js +1 -0
  7. package/dist/{chunk-KHFCTR3V.js → chunk-JQL77POQ.js} +1 -1
  8. package/dist/{chunk-UVAV3E7K.js → chunk-NQZAZFAC.js} +1 -1
  9. package/dist/{chunk-OGIAQX62.js → chunk-O5UH442K.js} +1 -1
  10. package/dist/{chunk-TN6DFYEV.js → chunk-PRED5KHO.js} +1 -1
  11. package/dist/{chunk-N3DPHRJ3.js → chunk-Q3U3F4YJ.js} +1 -1
  12. package/dist/{chunk-YACNGDTE.js → chunk-WXGW2SYC.js} +1 -1
  13. package/dist/{chunk-FMZ6HLDH.js → chunk-XD2P4ZS4.js} +1 -1
  14. package/dist/core/chart-ops/index.cjs +1 -1
  15. package/dist/core/chart-ops/index.d.cts +7 -5
  16. package/dist/core/chart-ops/index.d.ts +7 -5
  17. package/dist/core/chart-ops/index.js +1 -1
  18. package/dist/core/inventory/index.cjs +1 -1
  19. package/dist/core/inventory/index.d.cts +4 -4
  20. package/dist/core/inventory/index.d.ts +4 -4
  21. package/dist/core/inventory/index.js +1 -1
  22. package/dist/core/layout/index.cjs +1 -1
  23. package/dist/core/layout/index.d.cts +5 -5
  24. package/dist/core/layout/index.d.ts +5 -5
  25. package/dist/core/layout/index.js +1 -1
  26. package/dist/core/quality/index.cjs +1 -1
  27. package/dist/core/quality/index.d.cts +18 -14
  28. package/dist/core/quality/index.d.ts +18 -14
  29. package/dist/core/quality/index.js +1 -1
  30. package/dist/core/render-assets/index.d.cts +1 -1
  31. package/dist/core/render-assets/index.d.ts +1 -1
  32. package/dist/core/seatConfidence.d.cts +1 -1
  33. package/dist/core/seatConfidence.d.ts +1 -1
  34. package/dist/core/sections/index.cjs +1 -1
  35. package/dist/core/sections/index.d.cts +5 -5
  36. package/dist/core/sections/index.d.ts +5 -5
  37. package/dist/core/sections/index.js +1 -1
  38. package/dist/{eventConfigurations-DAaOaKJK.d.cts → eventConfigurations-CqfrYWAb.d.cts} +1 -1
  39. package/dist/{eventConfigurations-BQGuLLv0.d.ts → eventConfigurations-Dhauc9V3.d.ts} +1 -1
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.d.cts +16 -16
  42. package/dist/index.d.ts +16 -16
  43. package/dist/index.js +1 -1
  44. package/dist/{labeling-BZp91HiS.d.cts → labeling-B1xsmowB.d.cts} +1 -1
  45. package/dist/{labeling-Duul2sao.d.ts → labeling-BwPEI5JN.d.ts} +1 -1
  46. package/dist/{renderedQuality-CEPse8ir.d.cts → renderedQuality-1E9KuJvY.d.cts} +1 -1
  47. package/dist/{renderedQuality-BYhJ3Cer.d.ts → renderedQuality-ChAZNV2N.d.ts} +1 -1
  48. package/dist/{renderer-Cv_gzYvT.d.cts → renderer-BRmVrITG.d.cts} +1 -1
  49. package/dist/{renderer-BlLKrW-U.d.ts → renderer-q7viZLGZ.d.ts} +1 -1
  50. package/dist/{sections-DIVvr8QN.d.ts → sections-ByTMouG8.d.ts} +1 -1
  51. package/dist/{sections-CRSGPI3T.d.cts → sections-CA-bBex5.d.cts} +1 -1
  52. package/dist/{segmentedRowModel-CvyOS6Bx.d.cts → segmentedRowModel-C7XOEjHk.d.cts} +1 -1
  53. package/dist/{segmentedRowModel-CD-YT9bT.d.ts → segmentedRowModel-DcvJVKLD.d.ts} +1 -1
  54. package/dist/{layout-Gkx3fo5_.d.cts → tableSizing-BdCyNeqX.d.cts} +14 -4
  55. package/dist/{layout-DGbWo5fV.d.ts → tableSizing-D8e8QAJ-.d.ts} +14 -4
  56. package/dist/{ticketRestrictions-C31mrE97.d.cts → ticketRestrictions-CPZglNvw.d.cts} +2 -2
  57. package/dist/{ticketRestrictions-DXO2eckD.d.ts → ticketRestrictions-CorjMY49.d.ts} +2 -2
  58. package/dist/{types-BVRza86Q.d.ts → types-CqaNLbU6.d.cts} +10 -4
  59. package/dist/{types-BVRza86Q.d.cts → types-CqaNLbU6.d.ts} +10 -4
  60. package/dist/view3d/crossfade/panorama.d.cts +1 -1
  61. package/dist/view3d/crossfade/panorama.d.ts +1 -1
  62. package/dist/view3d/index.cjs +6 -6
  63. package/dist/view3d/index.d.cts +3 -3
  64. package/dist/view3d/index.d.ts +3 -3
  65. package/dist/view3d/index.js +1 -1
  66. package/dist/view3d/scene/scene.worker.cjs +1 -1
  67. package/dist/view3d/scene/scene.worker.js +1 -1
  68. package/package.json +1 -1
  69. package/dist/chunk-QUOAQQMP.js +0 -1
  70. package/dist/chunk-X2GZ5O7C.js +0 -1
@@ -1,7 +1,7 @@
1
- import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-BVRza86Q.cjs';
2
- import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-Cv_gzYvT.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-DFp26meo.cjs';
4
- export { C as CompanionSelectionIssue, M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, T as TicketOptionApplicabilityIssue, b as TicketSelection, c as TicketSelectionIssue, d as TicketTierResolution, e as applicableTicketTiers, f as companionSelectionIssue, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, r as resolveTicketTierForSeat, t as ticketOptionNotApplicableIssue, m as ticketSelectionIssue, n as ticketTierAppliesToSeat, v as validGAInventorySegments } from '../../ticketRestrictions-C31mrE97.cjs';
1
+ import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-CqaNLbU6.cjs';
2
+ import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-BRmVrITG.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-CBuJy9KM.cjs';
4
+ export { C as CompanionSelectionIssue, M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, T as TicketOptionApplicabilityIssue, b as TicketSelection, c as TicketSelectionIssue, d as TicketTierResolution, e as applicableTicketTiers, f as companionSelectionIssue, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, r as resolveTicketTierForSeat, t as ticketOptionNotApplicableIssue, m as ticketSelectionIssue, n as ticketTierAppliesToSeat, v as validGAInventorySegments } from '../../ticketRestrictions-CPZglNvw.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-BVRza86Q.js';
2
- import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-BlLKrW-U.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-C5I2U-EM.js';
4
- export { C as CompanionSelectionIssue, M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, T as TicketOptionApplicabilityIssue, b as TicketSelection, c as TicketSelectionIssue, d as TicketTierResolution, e as applicableTicketTiers, f as companionSelectionIssue, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, r as resolveTicketTierForSeat, t as ticketOptionNotApplicableIssue, m as ticketSelectionIssue, n as ticketTierAppliesToSeat, v as validGAInventorySegments } from '../../ticketRestrictions-DXO2eckD.js';
1
+ import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-CqaNLbU6.js';
2
+ import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-q7viZLGZ.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-Cy5pQ0KW.js';
4
+ export { C as CompanionSelectionIssue, M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, T as TicketOptionApplicabilityIssue, b as TicketSelection, c as TicketSelectionIssue, d as TicketTierResolution, e as applicableTicketTiers, f as companionSelectionIssue, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, r as resolveTicketTierForSeat, t as ticketOptionNotApplicableIssue, m as ticketSelectionIssue, n as ticketTierAppliesToSeat, v as validGAInventorySegments } from '../../ticketRestrictions-CorjMY49.js';
5
5
 
6
6
  /**
7
7
  * Best-available seat selection — a PURE, fully unit-testable ranking function.
@@ -1 +1 @@
1
- import{a as it,b as st,c as ct,d as lt,e as ut,f as pt,g as ft,h as mt,i as yt,j as dt,k as ht}from"../../chunk-OGIAQX62.js";import{a as bt,b as xt,c as Mt,d as gt,e as wt,f as B,h as N}from"../../chunk-X2GZ5O7C.js";import"../../chunk-FMZ6HLDH.js";import"../../chunk-QLDV5ZGA.js";import{a as H,b as V,c as Z,d as tt,e as et,f as ot,g as rt,h as nt,i as at}from"../../chunk-N3DPHRJ3.js";import"../../chunk-YACNGDTE.js";import{Da as S,Fa as v,Ga as P,I as O,Ia as j,Ja as _,Oa as I,x as R}from"../../chunk-QUOAQQMP.js";import"../../chunk-JBOTRSMY.js";import"../../chunk-CRCGO52K.js";function g(t){return t.floors?.length?t.floors.flatMap(e=>e.objects):t.objects}function k(t){return g(t).reduce((e,r)=>r.type==="row"?e+S(r):r.type==="table"?e+j(r):r.type==="gaArea"?e+Math.max(0,Math.floor(r.capacity)):r.type==="booth"?e+1:e,0)}function St(t){let e={};for(let o of t.categories??[])e[o.key]=0;let r=(o,n)=>{n>0&&(e[o]=(e[o]??0)+n)};for(let o of g(t))if(o.type==="row")for(let n of v(o))r(n.categoryKey,1);else if(o.type==="table")if(o.bookAsWhole||o.variableOccupancy)r(o.categoryKey,Math.max(0,Math.round(o.seatCount)));else for(let n of _(o))r(n.categoryKey,1);else o.type==="gaArea"?r(o.categoryKey,Math.max(0,Math.floor(o.capacity))):o.type==="booth"&&r(o.categoryKey,1);return e}function z(t){if(!t.template)return null;let e=g(t),r=e.filter(u=>u.type==="row"||u.type==="table"||u.type==="gaArea");if(!r.length)return null;let n=e.filter(u=>u.type==="booth").length+r.reduce((u,f)=>u+(f.type==="table"?2:1),0),i=k(t),c=Math.max(n+1,Math.min(5e4,i*4)),l=[.5,1,1.5,2].map(u=>O(Math.round(i*u),n,c));return{family:t.template.family,display:t.template.family.replace(/-/g," ").replace(/\b\w/g,u=>u.toUpperCase()),min:n,max:c,presets:["S","M","L","XL"].map((u,f)=>({size:u,seats:l[f]}))}}function A(t){let e=v(t);return e.length?R(e):{...t.origin}}function Pt(t,e){let r=z(t);if(!r)return structuredClone(t);let o=structuredClone(t),n=g(o),i=n.filter(a=>a.type==="row"||a.type==="table"||a.type==="gaArea"),c=n.filter(a=>a.type==="booth").length,l=Math.max(r.min,Math.min(r.max,Math.round(e))),u=l-c,f=i.map((a,s)=>{let m=a.type==="gaArea"?Math.max(0,Math.floor(a.capacity)):a.seatCount,x=a.type==="table"?2:1;return{object:a,index:s,current:m,minimum:x,value:x,fraction:0}}),K=f.reduce((a,s)=>a+s.minimum,0),w=Math.max(0,u-K),L=f.reduce((a,s)=>a+Math.max(1,s.current-s.minimum),0);for(let a of f){let s=w*Math.max(1,a.current-a.minimum)/L,m=Math.floor(s);a.value+=m,a.fraction=s-m}w=u-f.reduce((a,s)=>a+s.value,0),f.sort((a,s)=>s.fraction-a.fraction||a.index-s.index);for(let a=0;a<w;a++)f[a%f.length].value++;f.sort((a,s)=>a.index-s.index);for(let a of f)if(a.object.type==="row"){let s=A(a.object);a.object.seatCount=a.value;let m=A(a.object);a.object.origin.x+=s.x-m.x,a.object.origin.y+=s.y-m.y}else if(a.object.type==="table"){let s=a.object;if(s.seatCountsBySide){let m=["top","bottom","left","right"],x=P(s),F=m.reduce((p,y)=>p+x[y],0)||1,d=m.map((p,y)=>{let C=a.value*x[p]/F;return{side:p,index:y,value:Math.floor(C),fraction:C-Math.floor(C)}}),X=a.value-d.reduce((p,y)=>p+y.value,0);d.sort((p,y)=>y.fraction-p.fraction||p.index-y.index);for(let p=0;p<X;p++)d[p%d.length].value+=1;d.sort((p,y)=>p.index-y.index),s.seatCountsBySide={top:d[0].value,bottom:d[1].value,left:d[2].value,right:d[3].value},s.sides=m.filter(p=>s.seatCountsBySide[p]>0)}s.seatCount=a.value,s.overrides&&(s.overrides=s.overrides.filter(m=>m.index<a.value),s.overrides.length||delete s.overrides)}else a.object.capacity=a.value;return o.floors?.length&&(o.objects=o.floors[0].objects),o.template={family:o.template.family,targetSeats:l},o=N(o).doc,o.template={family:t.template.family,targetSeats:k(o)},o}var W=1,T=100;function J(t,e){if(!Number.isInteger(e)||e<W||e>T)return null;let r=t.rotation*Math.PI/180,o={x:Math.cos(r),y:Math.sin(r)},n={x:-o.y,y:o.x};return Array.from({length:e},(i,c)=>{let l=t.style==="intertwined"&&c%2===1?t.seatSpacing/2:0;return{type:"row",id:`__block_preview_${c}`,label:"",origin:{x:t.origin.x+n.x*c*t.rowGap+o.x*l,y:t.origin.y+n.y*c*t.rowGap+o.y*l},rotation:t.rotation,curve:t.curve,seatCount:t.seatsPerRow,seatSpacing:t.seatSpacing,categoryKey:"__preview__"}})}function G(t,e=t.rowCount){let r=J(t,e);return r?.length?I(r[r.length-1]):null}function It(t,e){if(!Number.isFinite(e.x)||!Number.isFinite(e.y)||t.rowGap<=0)return null;let r=G(t,1);if(!r)return null;let o=t.rotation*Math.PI/180,n={x:-Math.sin(o),y:Math.cos(o)},i=(e.x-r.x)*n.x+(e.y-r.y)*n.y,c=Math.max(W,Math.min(T,Math.round(i/t.rowGap)+1)),l=G(t,c);return l?{rowCount:c,edgePoint:l}:null}function Bt(t,e){return t.length!==e.rowCount?!1:[...t].sort((o,n)=>(o.rowBlockGeneration?.rowIndex??1/0)-(n.rowBlockGeneration?.rowIndex??1/0)).every((o,n)=>{let i=o.rowBlockGeneration;return i?.kind==="row-block-v1"&&i.groupId===e.groupId&&i.rowIndex===n&&i.signature===e.signature&&JSON.stringify(i)===JSON.stringify({...e,rowIndex:n})})}var h=1,b=300,D=330;function M(t){return t.seatCount>1?t.curve/(t.seatCount-1):0}function E(t,e){let r=t.rotation*Math.PI/180,o=M(t)*Math.PI/180,n,i;if(Math.abs(o)<1e-9)n=e*t.seatSpacing,i=0;else{let c=t.seatSpacing/(2*Math.sin(Math.abs(o)/2)),l=o*e;n=c*Math.sin(l),i=-c+c*Math.cos(l)}return{x:t.origin.x+n*Math.cos(r)-i*Math.sin(r),y:t.origin.y+n*Math.sin(r)+i*Math.cos(r)}}function Q(t,e,r){let o=(t??[]).map(n=>({...n,index:n.index+e})).filter(n=>n.index>=0&&n.index<r);return o.length?o:void 0}function U(t,e){if(t.path||!Number.isInteger(e)||e<h||e>b)return null;let r=M(t);return{...t,seatCount:e,curve:r*(e-1)}}function Y(t,e){if(t.path||!Number.isInteger(e)||e<h||e>b)return null;let r=M(t),o=t.seatCount-e,n=-o;return{...t,origin:E(t,o),rotation:B(t.rotation-r*o),seatCount:e,curve:r*(e-1),overrides:Q(t.overrides,n,e)}}function $(t,e=t.seatCount){let r=U(t,e);return r?E(r,e-1):null}function q(t,e=t.seatCount){return Y(t,e)?.origin??null}function kt(t,e){if(t.path||!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let r=M(t),o=Math.abs(r)<1e-9?b:Math.min(b,Math.floor(D/Math.abs(r))+1),n=null;for(let i=h;i<=Math.max(h,o);i+=1){let c=$(t,i);if(!c)continue;let l=Math.hypot(c.x-e.x,c.y-e.y),u=r*(i-1);(!n||l<n.distance||l===n.distance&&i<n.seatCount)&&(n={seatCount:i,curve:u,endpoint:c,distance:l})}return n}function Gt(t,e){if(t.path||!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let r=M(t),o=Math.abs(r)<1e-9?b:Math.min(b,Math.floor(D/Math.abs(r))+1),n=null;for(let i=h;i<=Math.max(h,o);i+=1){let c=q(t,i);if(!c)continue;let l=Math.hypot(c.x-e.x,c.y-e.y),u=r*(i-1);(!n||l<n.distance||l===n.distance&&i<n.seatCount)&&(n={seatCount:i,curve:u,endpoint:c,distance:l})}return n}export{bt as CATEGORY_INVENTORY_FAMILIES,dt as GroupedTableProjectionError,D as MAX_DIRECT_ROW_SWEEP,V as MAX_EVENT_INVENTORY,H as MAX_GA_CAPACITY,T as MAX_ROW_BLOCK_ROWS,b as MAX_ROW_SEATS,W as MIN_ROW_BLOCK_ROWS,h as MIN_ROW_SEATS,lt as applicableTicketTiers,z as capacityControl,St as categoryCapacity,k as chartCapacity,pt as companionSelectionIssue,gt as describeCategoryInventoryConflict,xt as effectiveSeatOwnerCategoryCounts,nt as gaAreasOf,et as gaInventorySegments,Z as gaUnitLabel,ot as gaUnitLabels,ht as groupedTableInventory,rt as growJoinedGAInventory,Mt as inspectCategoryInventoryConflicts,Bt as intactRowBlockMembers,at as isGaUnitLabel,mt as pickBestAvailable,yt as pickBestAvailableInventory,wt as remediateCategoryInventoryConflicts,Pt as resizeChartCapacity,It as resolveRowBlockCount,Gt as resolveRowStartCapacity,kt as resolveRowTerminalCapacity,ut as resolveTicketTierForSeat,G as rowBlockEdgePoint,J as rowBlockPreviewRows,q as rowStartEndpoint,$ as rowTerminalEndpoint,Y as rowWithStartCapacity,U as rowWithTerminalCapacity,it as strandedSingles,st as ticketOptionNotApplicableIssue,ft as ticketSelectionIssue,ct as ticketTierAppliesToSeat,tt as validGAInventorySegments};
1
+ import{a as it,b as st,c as ct,d as lt,e as ut,f as pt,g as ft,h as mt,i as yt,j as dt,k as ht}from"../../chunk-O5UH442K.js";import{a as bt,b as xt,c as Mt,d as gt,e as wt,f as B,h as N}from"../../chunk-FGMGDTMR.js";import"../../chunk-BT2KJXQC.js";import"../../chunk-XD2P4ZS4.js";import"../../chunk-QLDV5ZGA.js";import{a as H,b as V,c as Z,d as tt,e as et,f as ot,g as rt,h as nt,i as at}from"../../chunk-Q3U3F4YJ.js";import"../../chunk-WXGW2SYC.js";import{Ea as S,Ga as v,Ha as P,I as O,Ja as j,Ka as _,Pa as I,x as R}from"../../chunk-24O23MNB.js";import"../../chunk-JBOTRSMY.js";import"../../chunk-CRCGO52K.js";function g(t){return t.floors?.length?t.floors.flatMap(e=>e.objects):t.objects}function k(t){return g(t).reduce((e,r)=>r.type==="row"?e+S(r):r.type==="table"?e+j(r):r.type==="gaArea"?e+Math.max(0,Math.floor(r.capacity)):r.type==="booth"?e+1:e,0)}function St(t){let e={};for(let o of t.categories??[])e[o.key]=0;let r=(o,n)=>{n>0&&(e[o]=(e[o]??0)+n)};for(let o of g(t))if(o.type==="row")for(let n of v(o))r(n.categoryKey,1);else if(o.type==="table")if(o.bookAsWhole||o.variableOccupancy)r(o.categoryKey,Math.max(0,Math.round(o.seatCount)));else for(let n of _(o))r(n.categoryKey,1);else o.type==="gaArea"?r(o.categoryKey,Math.max(0,Math.floor(o.capacity))):o.type==="booth"&&r(o.categoryKey,1);return e}function z(t){if(!t.template)return null;let e=g(t),r=e.filter(u=>u.type==="row"||u.type==="table"||u.type==="gaArea");if(!r.length)return null;let n=e.filter(u=>u.type==="booth").length+r.reduce((u,f)=>u+(f.type==="table"?2:1),0),i=k(t),c=Math.max(n+1,Math.min(5e4,i*4)),l=[.5,1,1.5,2].map(u=>O(Math.round(i*u),n,c));return{family:t.template.family,display:t.template.family.replace(/-/g," ").replace(/\b\w/g,u=>u.toUpperCase()),min:n,max:c,presets:["S","M","L","XL"].map((u,f)=>({size:u,seats:l[f]}))}}function A(t){let e=v(t);return e.length?R(e):{...t.origin}}function Pt(t,e){let r=z(t);if(!r)return structuredClone(t);let o=structuredClone(t),n=g(o),i=n.filter(a=>a.type==="row"||a.type==="table"||a.type==="gaArea"),c=n.filter(a=>a.type==="booth").length,l=Math.max(r.min,Math.min(r.max,Math.round(e))),u=l-c,f=i.map((a,s)=>{let m=a.type==="gaArea"?Math.max(0,Math.floor(a.capacity)):a.seatCount,x=a.type==="table"?2:1;return{object:a,index:s,current:m,minimum:x,value:x,fraction:0}}),K=f.reduce((a,s)=>a+s.minimum,0),w=Math.max(0,u-K),L=f.reduce((a,s)=>a+Math.max(1,s.current-s.minimum),0);for(let a of f){let s=w*Math.max(1,a.current-a.minimum)/L,m=Math.floor(s);a.value+=m,a.fraction=s-m}w=u-f.reduce((a,s)=>a+s.value,0),f.sort((a,s)=>s.fraction-a.fraction||a.index-s.index);for(let a=0;a<w;a++)f[a%f.length].value++;f.sort((a,s)=>a.index-s.index);for(let a of f)if(a.object.type==="row"){let s=A(a.object);a.object.seatCount=a.value;let m=A(a.object);a.object.origin.x+=s.x-m.x,a.object.origin.y+=s.y-m.y}else if(a.object.type==="table"){let s=a.object;if(s.seatCountsBySide){let m=["top","bottom","left","right"],x=P(s),F=m.reduce((p,y)=>p+x[y],0)||1,d=m.map((p,y)=>{let C=a.value*x[p]/F;return{side:p,index:y,value:Math.floor(C),fraction:C-Math.floor(C)}}),X=a.value-d.reduce((p,y)=>p+y.value,0);d.sort((p,y)=>y.fraction-p.fraction||p.index-y.index);for(let p=0;p<X;p++)d[p%d.length].value+=1;d.sort((p,y)=>p.index-y.index),s.seatCountsBySide={top:d[0].value,bottom:d[1].value,left:d[2].value,right:d[3].value},s.sides=m.filter(p=>s.seatCountsBySide[p]>0)}s.seatCount=a.value,s.overrides&&(s.overrides=s.overrides.filter(m=>m.index<a.value),s.overrides.length||delete s.overrides)}else a.object.capacity=a.value;return o.floors?.length&&(o.objects=o.floors[0].objects),o.template={family:o.template.family,targetSeats:l},o=N(o).doc,o.template={family:t.template.family,targetSeats:k(o)},o}var W=1,T=100;function J(t,e){if(!Number.isInteger(e)||e<W||e>T)return null;let r=t.rotation*Math.PI/180,o={x:Math.cos(r),y:Math.sin(r)},n={x:-o.y,y:o.x};return Array.from({length:e},(i,c)=>{let l=t.style==="intertwined"&&c%2===1?t.seatSpacing/2:0;return{type:"row",id:`__block_preview_${c}`,label:"",origin:{x:t.origin.x+n.x*c*t.rowGap+o.x*l,y:t.origin.y+n.y*c*t.rowGap+o.y*l},rotation:t.rotation,curve:t.curve,seatCount:t.seatsPerRow,seatSpacing:t.seatSpacing,categoryKey:"__preview__"}})}function G(t,e=t.rowCount){let r=J(t,e);return r?.length?I(r[r.length-1]):null}function It(t,e){if(!Number.isFinite(e.x)||!Number.isFinite(e.y)||t.rowGap<=0)return null;let r=G(t,1);if(!r)return null;let o=t.rotation*Math.PI/180,n={x:-Math.sin(o),y:Math.cos(o)},i=(e.x-r.x)*n.x+(e.y-r.y)*n.y,c=Math.max(W,Math.min(T,Math.round(i/t.rowGap)+1)),l=G(t,c);return l?{rowCount:c,edgePoint:l}:null}function Bt(t,e){return t.length!==e.rowCount?!1:[...t].sort((o,n)=>(o.rowBlockGeneration?.rowIndex??1/0)-(n.rowBlockGeneration?.rowIndex??1/0)).every((o,n)=>{let i=o.rowBlockGeneration;return i?.kind==="row-block-v1"&&i.groupId===e.groupId&&i.rowIndex===n&&i.signature===e.signature&&JSON.stringify(i)===JSON.stringify({...e,rowIndex:n})})}var h=1,b=300,D=330;function M(t){return t.seatCount>1?t.curve/(t.seatCount-1):0}function E(t,e){let r=t.rotation*Math.PI/180,o=M(t)*Math.PI/180,n,i;if(Math.abs(o)<1e-9)n=e*t.seatSpacing,i=0;else{let c=t.seatSpacing/(2*Math.sin(Math.abs(o)/2)),l=o*e;n=c*Math.sin(l),i=-c+c*Math.cos(l)}return{x:t.origin.x+n*Math.cos(r)-i*Math.sin(r),y:t.origin.y+n*Math.sin(r)+i*Math.cos(r)}}function Q(t,e,r){let o=(t??[]).map(n=>({...n,index:n.index+e})).filter(n=>n.index>=0&&n.index<r);return o.length?o:void 0}function U(t,e){if(t.path||!Number.isInteger(e)||e<h||e>b)return null;let r=M(t);return{...t,seatCount:e,curve:r*(e-1)}}function Y(t,e){if(t.path||!Number.isInteger(e)||e<h||e>b)return null;let r=M(t),o=t.seatCount-e,n=-o;return{...t,origin:E(t,o),rotation:B(t.rotation-r*o),seatCount:e,curve:r*(e-1),overrides:Q(t.overrides,n,e)}}function $(t,e=t.seatCount){let r=U(t,e);return r?E(r,e-1):null}function q(t,e=t.seatCount){return Y(t,e)?.origin??null}function kt(t,e){if(t.path||!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let r=M(t),o=Math.abs(r)<1e-9?b:Math.min(b,Math.floor(D/Math.abs(r))+1),n=null;for(let i=h;i<=Math.max(h,o);i+=1){let c=$(t,i);if(!c)continue;let l=Math.hypot(c.x-e.x,c.y-e.y),u=r*(i-1);(!n||l<n.distance||l===n.distance&&i<n.seatCount)&&(n={seatCount:i,curve:u,endpoint:c,distance:l})}return n}function Gt(t,e){if(t.path||!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let r=M(t),o=Math.abs(r)<1e-9?b:Math.min(b,Math.floor(D/Math.abs(r))+1),n=null;for(let i=h;i<=Math.max(h,o);i+=1){let c=q(t,i);if(!c)continue;let l=Math.hypot(c.x-e.x,c.y-e.y),u=r*(i-1);(!n||l<n.distance||l===n.distance&&i<n.seatCount)&&(n={seatCount:i,curve:u,endpoint:c,distance:l})}return n}export{bt as CATEGORY_INVENTORY_FAMILIES,dt as GroupedTableProjectionError,D as MAX_DIRECT_ROW_SWEEP,V as MAX_EVENT_INVENTORY,H as MAX_GA_CAPACITY,T as MAX_ROW_BLOCK_ROWS,b as MAX_ROW_SEATS,W as MIN_ROW_BLOCK_ROWS,h as MIN_ROW_SEATS,lt as applicableTicketTiers,z as capacityControl,St as categoryCapacity,k as chartCapacity,pt as companionSelectionIssue,gt as describeCategoryInventoryConflict,xt as effectiveSeatOwnerCategoryCounts,nt as gaAreasOf,et as gaInventorySegments,Z as gaUnitLabel,ot as gaUnitLabels,ht as groupedTableInventory,rt as growJoinedGAInventory,Mt as inspectCategoryInventoryConflicts,Bt as intactRowBlockMembers,at as isGaUnitLabel,mt as pickBestAvailable,yt as pickBestAvailableInventory,wt as remediateCategoryInventoryConflicts,Pt as resizeChartCapacity,It as resolveRowBlockCount,Gt as resolveRowStartCapacity,kt as resolveRowTerminalCapacity,ut as resolveTicketTierForSeat,G as rowBlockEdgePoint,J as rowBlockPreviewRows,q as rowStartEndpoint,$ as rowTerminalEndpoint,Y as rowWithStartCapacity,U as rowWithTerminalCapacity,it as strandedSingles,st as ticketOptionNotApplicableIssue,ft as ticketSelectionIssue,ct as ticketTierAppliesToSeat,tt as validGAInventorySegments};
@@ -1 +1 @@
1
- "use strict";var te=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var st=Object.getOwnPropertyNames;var ct=Object.prototype.hasOwnProperty;var at=(e,t)=>{for(var n in t)te(e,n,{get:t[n],enumerable:!0})},lt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of st(t))!ct.call(e,r)&&r!==n&&te(e,r,{get:()=>t[r],enumerable:!(o=it(t,r))||o.enumerable});return e};var ut=e=>lt(te({},"__esModule",{value:!0}),e);var jn={};at(jn,{DEFAULT_SEAT_RADIUS:()=>rt,FLOOR_STACK_GAP_RATIO:()=>Je,FLOOR_STACK_MIN_SURFACE_PX:()=>ot,TABLE_SEAT_OFFSET:()=>H,TEXT_BACKGROUND_PADDING_MAX:()=>qn,TEXT_BACKGROUND_RADIUS_MAX:()=>Qn,TEXT_LETTER_SPACING_MAX:()=>$n,TEXT_LETTER_SPACING_MIN:()=>zn,TEXT_LINE_HEIGHT_MAX:()=>Gn,TEXT_LINE_HEIGHT_MIN:()=>Vn,TEXT_OPACITY_MIN:()=>Wn,TEXT_WIDTH_MAX:()=>Kn,TEXT_WIDTH_MIN:()=>Yn,allObjects:()=>Ze,applyAffine:()=>In,buildAisleHoles:()=>ht,buildSeatIndex:()=>An,buildSectionShell:()=>dt,chartBounds:()=>G,composeAffine:()=>Cn,createPerspectiveCamera:()=>Pn,cubicPoint:()=>z,decomposeAffineLinear:()=>kn,distanceToRings:()=>Ce,distributeAlongCubic:()=>ne,expandBooth:()=>We,expandChart:()=>pn,expandRow:()=>xe,expandRowSlots:()=>Ge,expandTable:()=>$e,expandTableSlots:()=>ge,floorObjects:()=>mn,floorStackPlacements:()=>tt,floorsOf:()=>W,gridStats:()=>Fn,hitTest:()=>_n,initialFloorMode:()=>wn,invertAffine:()=>vn,layoutFloorStack:()=>Sn,mainFloorId:()=>nt,nearestWithin:()=>Dn,objectCenter:()=>qe,owningSectionForObject:()=>Qe,perspectiveTangentAffine:()=>En,pointInPolygon:()=>pe,pointInPolygonWithHoles:()=>V,polygonArea:()=>ie,polygonInscribedAnchor:()=>se,polygonLabelPoint:()=>dn,polygonNetArea:()=>yt,projectPerspectivePoint:()=>J,queryRect:()=>Ln,resolveSegmentedRowGroups:()=>ce,rowInventoryCount:()=>ln,rowSeatPositions:()=>ye,segmentedRowComponentSeats:()=>Mt,segmentedRowComponents:()=>gt,segmentedRowSeatTotal:()=>St,smoothCubicThroughMiddle:()=>ft,stackFloors:()=>bn,tableInventoryCount:()=>un,tableSeatCountsBySide:()=>ze,textLayoutMetrics:()=>oe,translateObject:()=>Z});module.exports=ut(jn);var Hn=Math.PI/180;function N(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function j(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function z(e,t){let n=1-t,o=n*n*n,r=3*n*n*t,i=3*n*t*t,s=t*t*t;return{x:o*e.start.x+r*e.control1.x+i*e.control2.x+s*e.end.x,y:o*e.start.y+r*e.control1.y+i*e.control2.y+s*e.end.y}}function ft(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 ne(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[z(e,.5)];let o=Array.from({length:n+1},(c,u)=>z(e,u/n)),r=new Float64Array(o.length);for(let c=1;c<o.length;c+=1){let u=o[c].x-o[c-1].x,a=o[c].y-o[c-1].y;r[c]=r[c-1]+Math.hypot(u,a)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],l=1;for(let c=0;c<t;c+=1){let u=i*c/(t-1);for(;l<r.length-1&&r[l]<u;)l+=1;let a=r[l-1],d=r[l],m=d===a?0:(u-a)/(d-a);s.push({x:o[l-1].x+(o[l].x-o[l-1].x)*m,y:o[l-1].y+(o[l].y-o[l-1].y)*m})}return s}function A(e,t){return{x:e.x+t.x,y:e.y+t.y}}function K(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _(e,t){return{x:e.x*t,y:e.y*t}}function $(e,t=13){return Array.from({length:t},(n,o)=>z(e,o/(t-1)))}function Me(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return j(e[o],e[o+1],n-o)}function Se(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[Me(e,o)];for(let s=1;s<e.length-1;s+=1){let l=s/(e.length-1);l>o+1e-9&&l<r-1e-9&&i.push(e[s])}return i.push(Me(e,r)),i}function we(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([m,y],b)=>{let h=N(j(e[m],e[y],.5),t);h<r&&(r=h,o=b)});let i=e[o],s=e[(o+1)%4],l=e[(o+2)%4],c=e[(o+3)%4],u=j(i,s,.5),a=K(t,u),d=Math.max(1e-9,Math.hypot(a.x,a.y));return{p0:i,p1:s,p2:l,p3:c,normal:_(a,1/d),depth:(N(i,c)+N(s,l))/2}}function Pe(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:s}=e,l=K(n,t),c=K(o,r),u=s*.22,a=s*.12;return{nearPath:{start:t,control1:A(A(t,_(l,1/3)),_(i,u)),control2:A(A(t,_(l,2/3)),_(i,u)),end:n},farPath:{start:o,control1:A(A(r,_(c,2/3)),_(i,a)),control2:A(A(r,_(c,1/3)),_(i,a)),end:r}}}function dt(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((b,h)=>A(b,h),{x:0,y:0});o.x/=4,o.y/=4;let r=N(e[0],e[1]),i=N(e[0],e[3]),s=n==="auto"?r>i*1.25&&N(o,t)>i?"bezier":"tapered":n;if(s==="rectangle")return{mode:s,outline:e.map(b=>({...b}))};let l=we(e,t),{p0:c,p1:u,p2:a,p3:d}=l;if(s==="tapered")return{mode:s,outline:[A(c,_(K(u,c),.14)),A(c,_(K(u,c),1-.14)),a,d]};let{nearPath:m,farPath:y}=Pe(l);return{mode:s,outline:[...$(m),...$(y).slice(1)]}}function ht(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=we(e,t),{p0:i,p1:s,p2:l,p3:c}=r,u=o==="bezier"?Pe(r):null,a=u?$(u.nearPath):null,d=u?$(u.farPath).reverse():null,m=Math.min(.055,.18/(n+1));return Array.from({length:n},(y,b)=>{let h=(b+1)/(n+1),f=h-m/2,x=h+m/2;return a&&d?[...Se(a,f,x),...Se(d,f,x).reverse()]:[j(i,s,f),j(i,s,x),j(c,l,x),j(c,l,f)]})}var Yn=40,Kn=1200,Vn=.8,Gn=3,zn=-2,$n=20,Wn=.1,qn=40,Qn=40,Ie=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function mt(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/Ie(e))),r=0;for(let i of n){if(!i.length){r+=1;continue}let s=0;for(let l of i.split(/\s+/)){let c=l.length;s&&s+1+c<=o?s+=1+c:(r+=Math.max(1,Math.ceil(c/o)),s=c%o)}}return Math.max(1,r)}function oe(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(l=>l.length))*Ie(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),s=mt(e,i);return{width:r,height:s*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:s,padding:t}}function bt(e,t,n){let o=n.x-t.x,r=n.y-t.y,i=o*o+r*r,s=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+s*o),e.y-(t.y+s*r))}function Ce(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 s=bt(e,o[i],o[r]);s<n&&(n=s)}return n}function ve(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,l=t[r].x,c=t[r].y;s>e.y!=c>e.y&&e.x<(l-i)*(e.y-s)/(c-s)+i&&(n=!n)}return n}function pt(e,t,n){let o=ve(e,t)&&!n.some(i=>ve(e,i)),r=Ce(e,[t,...n]);return o?r:-r}function X(e,t,n,o,r){let i=pt({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var re=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,s=i+1,l=r;if(i<t.length&&t[i].max>t[l].max&&(l=i),s<t.length&&t[s].max>t[l].max&&(l=s),l===r)break;[t[l],t[r]]=[t[r],t[l]],r=l}}return n}};function ie(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 yt(e,t){return Math.max(0,ie(e)-(t??[]).reduce((n,o)=>n+ie(o),0))}function se(e,t){let n=t??[];if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let h=e.reduce((x,S)=>x+S.x,0)/e.length,f=e.reduce((x,S)=>x+S.y,0)/e.length;return{point:{x:h,y:f},radius:0}}let o=1/0,r=1/0,i=-1/0,s=-1/0;for(let h of e)h.x<o&&(o=h.x),h.y<r&&(r=h.y),h.x>i&&(i=h.x),h.y>s&&(s=h.y);let l=i-o,c=s-r,u=Math.min(l,c);if(!(u>0))return{point:{x:(o+i)/2,y:(r+s)/2},radius:0};let a=Math.max(l,c)/150,d=new re,m=u/2;for(let h=o;h<i;h+=u)for(let f=r;f<s;f+=u)d.push(X(h+m,f+m,m,e,n));let y=X(o+l/2,r+c/2,0,e,n),b=0;for(;d.size;){let h=d.pop();if(!h)break;h.d>y.d&&(y=h),!(h.max-y.d<=a)&&(b>=4e3||(b+=1,m=h.h/2,d.push(X(h.x-m,h.y-m,m,e,n)),d.push(X(h.x+m,h.y-m,m,e,n)),d.push(X(h.x-m,h.y+m,m,e,n)),d.push(X(h.x+m,h.y+m,m,e,n))))}return{point:{x:y.x,y:y.y},radius:Math.max(0,y.d)}}function D(e,t,n){return e<t?t:e>n?n:e}var to=Math.PI*2;function Ee(e,t,n){return xt(e,r=>({x:r.x+t,y:r.y+n}))}function xt(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 no=4/3;function gt(e,t,n){let o=[];for(let r=0;r<e.length-1;r+=1){let i=e[r],s=e[r+1],l=Math.hypot(s.x-i.x,s.y-i.y);if(l<=0)continue;let c=Math.max(1,Math.round(l/n)),u=l/c,a=Math.atan2(s.y-i.y,s.x-i.x),d=r===0,y=(r>0?t[r-1]:void 0)==="break"?2:1,b=d?{...i}:{x:i.x+Math.cos(a)*u*y,y:i.y+Math.sin(a)*u*y},h=d?c+1:Math.max(1,c-(y-1));o.push({origin:b,rotation:a*180/Math.PI,seatCount:h,seatSpacing:u})}return o}function Mt(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 St(e){return e.reduce((t,n)=>t+n.seatCount,0)}function ce(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,y)=>m.segmentedRow.componentIndex-y.segmentedRow.componentIndex),s=i[0]?.segmentedRow?.componentCount??0,l=i[0]?.segmentedRow;if(!l||!(s>=2&&i.length===s&&l?.boundaryBefore==="start"&&i.every((m,y)=>m.segmentedRow?.kind==="segmented-row-v1"&&m.segmentedRow.groupId===o&&m.segmentedRow.componentCount===s&&m.segmentedRow.componentIndex===y&&m.segmentedRow.repeatLabelOnComponents===l.repeatLabelOnComponents&&(y===0?m.segmentedRow.boundaryBefore==="start":m.segmentedRow.boundaryBefore!=="start")&&m.segmentedRow.displayLabel===l.displayLabel)))continue;let u=i.reduce((m,y)=>m+y.seatCount,0),a=0,d=0;for(let m of i)m.segmentedRow.boundaryBefore==="break"&&(a+=1),t.set(m.id,{groupId:o,adjacencyOffset:a,displayOffset:d,displayLabel:l.displayLabel,totalSeats:u,canonical:i[0],viewFromSeatUrl:l.viewFromSeatUrl,viewFromSeatMeta:l.viewFromSeatMeta,confidenceEvidence:l.confidenceEvidence}),a+=m.seatCount,d+=m.seatCount}return t}var wt="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var Pt="abcdefghijklmnopqrstuvwxyz";function It(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 ae(e,t=!1){let n=t?Pt:wt;return It(Math.max(0,Math.floor(e)-1),n)}var vt=[[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 ke(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of vt)for(;t>=o;)n+=r,t-=o;return n}function Ct(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 le(e,t){let n=e.seatLabelStart??1,o=e.seatNumbering?.direction??"ltr",r=e.seatNumbering?.step??1,i=e.seatNumbering?.scheme??"decimal",s=e.seatNumbering?.prefix??"",l=e.seatNumbering?.endAt,c=e.seatCount;if(i==="updown"||i==="updown-descending"){let y=Math.ceil(c/2),b=i==="updown"?t<y?n+2*t:n-1+2*(c-t):t<y?n+2*(y-1-t):n+1+2*(t-y);return`${s}${b}`}let u=i==="odd"||i==="even"?2:r,a=l!=null&&Number.isFinite(l)?l-(c-1)*u:n,d=o==="center"?Ct(c)[t]:o==="rtl"?c-1-t:t,m;switch(i){case"odd":{let y=a%2===1?a:a+1;m=String(y+d*2);break}case"even":{let y=a%2===0?a:a+1;m=String(y+d*2);break}case"roman":m=ke(a+d*r);break;case"letters-upper":m=ae(a+d*r,!1);break;case"letters-lower":m=ae(a+d*r,!0);break;default:m=String(a+d*r);break}return`${s}${m}`}function Et(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function Oe(e,t,n){return n?.label??`${e.label}-${le(e,t)}`}function ue(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(!n)return`${e.displayLabel||e.label}-${le(e,t)}`;let r=Et(n),i=n.displayOffset+t;return`${n.displayLabel}-${le(r,i)}`}var B=.02291666666666667,ao=1/B,kt=58,Ot=kt*B;var Rt=3,Re=0,fe=120,Tt=0,At=45,_t=7,U=1.2;function de(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function Dt(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=_t?e:Rt}function Te(e,t={}){let n=de(t.floorBaseHeightM,Re,fe,0),o=Math.min(fe,n+Dt(e.elevation)*Ot),r=e.height===void 0?o:de(e.height,Re,fe,o),i=de(e.rake,Tt,At,0);return{height:r,rake:i}}function Ae(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 _e(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],s=e[r+1],l=s.x-i.x,c=s.y-i.y,u=l*l+c*c,a=u>1e-12?((t-i.x)*l+(n-i.y)*c)/u:0;a<0?a=0:a>1&&(a=1);let d=Math.hypot(t-(i.x+a*l),n-(i.y+a*c));d<o&&(o=d)}return o}function Lt(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 s=Math.hypot(i.x-t,i.y-n);s>r&&(r=s)}return{cx:t,cy:n,r}}function De(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function he(e,t){let n=1/0;for(let o of Ae(e)){let r=_e(t,o.x,o.y);r<n&&(n=r)}for(let o of Ae(t)){let r=_e(e,o.x,o.y);r<n&&(n=r)}return n}function Ft(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let a of e)n+=a.x,o+=a.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let a of e){let d=Math.hypot(a.x-n,a.y-o);d>r&&(r=d,i=a)}let s=i.x-n,l=i.y-o,c=Math.hypot(s,l);c>1e-9?(s/=c,l/=c):(s=1,l=0);let u=e.map((a,d)=>({p:a,i:d,t:(a.x-n)*s+(a.y-o)*l})).sort((a,d)=>a.t-d.t);return{pts:u.map(a=>a.p),seatIndices:u.map(a=>t[a.i])}}function jt(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let S of e)n+=S.x,o+=S.y;n/=t,o/=t;let r=0,i=0,s=0,l=0,c=0,u=0,a=0;for(let S of e){let g=S.x-n,p=S.y-o;r+=g*g,s+=p*p,i+=g*p,l+=g*g*g,c+=p*p*p,u+=g*p*p,a+=p*g*g}let d=r*s-i*i;if(Math.abs(d)<1e-9)return null;let m=(l+u)/2,y=(c+a)/2,b=(m*s-y*i)/d,h=(y*r-m*i)/d,f=b+n,x=h+o;return!Number.isFinite(f)||!Number.isFinite(x)?null:{cx:f,cy:x}}var Nt=.15;function Ht(e){if(e.length<2)return null;let t=e.map(S=>{let g=0,p=0;for(let P of S.pts)g+=P.x,p+=P.y;return{x:g/S.pts.length,y:p/S.pts.length}}),n=0,o=0;for(let S of t)n+=S.x,o+=S.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let S of t){let g=S.x-n,p=S.y-o;r+=g*g,i+=g*p,s+=p*p}let l=r+s,c=r*s-i*i,u=l/2+Math.sqrt(Math.max(0,l*l/4-c)),a,d;Math.abs(i)>1e-12?(a=u-s,d=i):r>=s?(a=1,d=0):(a=0,d=1);let m=Math.hypot(a,d);if(!(m>1e-12))return null;a/=m,d/=m;let y=1/0,b=-1/0,h=[];for(let S of e){let g=1/0,p=-1/0;for(let P of S.pts){let M=P.x*a+P.y*d;M<g&&(g=M),M>p&&(p=M),M<y&&(y=M),M>b&&(b=M)}h.push(p-g)}let f=b-y;return f>1e-9?(h.sort((S,g)=>S-g),h[Math.min(h.length-1,Math.floor(h.length*.9))]/f<=Xt?{x:a,y:d}:null):null}var Xt=.35;function Le(e,t,n,o){let r=new Map;for(let f of n){let x=t[f],S=x.rowId||`__seat-${f}`,g=r.get(S);g||(g={pts:[],idx:[]},r.set(S,g)),g.pts.push({x:x.x,y:x.y}),g.idx.push(f)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[f,x]of r){let S=Ft(x.pts,x.idx),g=0;for(let p of S.pts)g+=Math.hypot(p.x-o.x,p.y-o.y);i.push({id:f,pts:S.pts,seatIndices:S.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:g/S.pts.length})}let s=i.map(f=>Lt(f.pts)),l=[];for(let f=0;f<i.length;f++){let x=1/0;for(let S=0;S<i.length;S++){if(f===S||De(s[f],s[S])>=x)continue;let g=he(i[f].pts,i[S].pts);g<x&&(x=g)}Number.isFinite(x)&&l.push(x)}l.sort((f,x)=>f-x);let c=l.length?l[Math.floor(l.length/2)]:1,u=Math.max(c*1.8,1e-6),a=i.map(()=>[]);for(let f=0;f<i.length;f++)for(let x=f+1;x<i.length;x++)De(s[f],s[x])>u||he(i[f].pts,i[x].pts)<=u&&(a[f].push(x),a[x].push(f));let d=0;for(let f=0;f<i.length;f++){if(i[f].blockId!==-1)continue;let x=d++,S=[f];for(i[f].blockId=x;S.length;){let g=S.pop();for(let p of a[g])i[p].blockId===-1&&(i[p].blockId=x,S.push(p))}}let m=new Map;for(let f of i){let x=m.get(f.blockId)??[];x.push(f),m.set(f.blockId,x)}let y=[];for(let f of i){if(f.pts.length<4)continue;let x=jt(f.pts);x&&(!Number.isFinite(x.cx)||!Number.isFinite(x.cy)||y.push({x:x.cx,y:x.cy}))}let b=y.length>=2?(()=>{let f=y.map(g=>g.x).sort((g,p)=>g-p),x=y.map(g=>g.y).sort((g,p)=>g-p),S=Math.floor(y.length/2);return{cx:f[S],cy:x[S]}})():null;if(b){let f=M=>Math.hypot(M.x-b.cx,M.y-b.cy),x=1/0,S=-1/0,g=[];for(let M of i){let w=1/0,I=-1/0;for(let v of M.pts){let C=f(v);C<w&&(w=C),C>I&&(I=C)}g.push(I-w),w<x&&(x=w),I>S&&(S=I)}let p=S-x;g.sort((M,w)=>M-w);let P=g[Math.min(g.length-1,Math.floor(g.length*.9))];if(p>1e-9&&P/p<=Nt){let M=i.map(E=>{let L=0;for(let F of E.pts)L+=f(F);return{row:E,radius:L/E.pts.length}}),w=0,I=0;for(let E of M)w+=E.radius,I+=E.row.focalDistance;w/=M.length,I/=M.length;let v=0;for(let E of M)v+=(E.radius-w)*(E.row.focalDistance-I);if(v<0)for(let E of M)E.radius=-E.radius;let T=1/0;for(let E of M)E.radius<T&&(T=E.radius);M.sort((E,L)=>E.radius-L.radius);let R=-1,k=-1/0,O=p/Math.max(1,M.length)*.5,Y=[];for(let E of M)E.radius-k>O&&(R++,k=E.radius),E.row.ordinal=R,E.row.blockDepth=E.radius-T,Y.push(E.row);return{sectionId:e,rows:Y,blockCount:d}}}let h=[];for(let[,f]of m){let x=Ht(f);if(x){let S=p=>{let P=0;for(let M of p.pts)P+=M.x*x.x+M.y*x.y;return P/p.pts.length};f.sort((p,P)=>S(p)-S(P)),f.length>=2&&f[0].focalDistance>f[f.length-1].focalDistance&&f.reverse();let g=0;for(let p=0;p<f.length;p++)p>0&&(g+=he(f[p-1].pts,f[p].pts)),f[p].ordinal=p,f[p].blockDepth=g,h.push(f[p])}else{let S=1/0;for(let g of f)g.focalDistance<S&&(S=g.focalDistance);f.sort((g,p)=>g.focalDistance-p.focalDistance);for(let g=0;g<f.length;g++)f[g].ordinal=g,f[g].blockDepth=Math.max(0,f[g].focalDistance-S),h.push(f[g])}}return{sectionId:e,rows:h,blockCount:d}}var Bt=/^\d{4}-\d{2}-\d{2}$/;function Ut(e){let t=Date.parse(e);return Number.isFinite(t)?Bt.test(e)?t+864e5:t:null}function Yt(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=Ut(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function Kt(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function Vt(e){return e.status!=="draft"&&e.status!=="retracted"}function Gt(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 Fe(e,t={}){return!!e&&Vt(e)&&Kt(e,t.activeConfigurationId,t.activeConfigurationVersion)&&Gt(e,t.activeBasisSha256)&&Yt(e,t.now)}var ho=Math.PI*2;function je(e){return e==="pitch-football"||e==="rink-hockey"||e==="track-athletics"||e==="oval-cricket"}function zt(e){if((e.kind==="polygon"||e.kind==="polyline"||e.kind==="line")&&e.points&&e.points.length>=2)return 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 $t(e,t,n){let o=n*Math.PI/180,r=Math.cos(o),i=Math.sin(o),s=e.x-t.x,l=e.y-t.y;return{x:t.x+s*r-l*i,y:t.y+s*i+l*r}}function Ne(e){let t=zt(e);if(!t||t.length<2)return null;let n=e.rotation??0,o=Math.abs(n)<1e-6?t:t.map(c=>$t(c,{x:t.reduce((u,a)=>u+a.x,0)/t.length,y:t.reduce((u,a)=>u+a.y,0)/t.length},n)),r=1/0,i=1/0,s=-1/0,l=-1/0;for(let c of o)r=Math.min(r,c.x),i=Math.min(i,c.y),s=Math.max(s,c.x),l=Math.max(l,c.y);return!Number.isFinite(r)||s-r<1e-6||l-i<1e-6?null:{minX:r,minY:i,maxX:s,maxY:l}}var Wt=5,qt=3,Qt=.92,Zt=1.9,Jt=2,en=.6,tn=1,nn=.06;function on(e){return e.heightM!==void 0?e.heightM:je(e.stageKind)?nn:tn}function He(e){let t=1/0,n=1/0,o=-1/0,r=-1/0,i=-1/0;for(let s of W(e)){let l=s.baseHeightM??0;for(let c of s.objects){if(c.type!=="shape"||c.role!=="stage")continue;let u=Ne(c);u&&(t=Math.min(t,u.minX),n=Math.min(n,u.minY),o=Math.max(o,u.maxX),r=Math.max(r,u.maxY),i=Math.max(i,l+on(c)))}}return!Number.isFinite(t)||!Number.isFinite(i)?null:{minX:t,minY:n,maxX:o,maxY:r,deckTopM:i}}function rn(e,t,n,o){let r=1/0,i=1/0,s=-1/0,l=-1/0;for(let y of e)Number.isFinite(y.eyeHeightM)&&(r=Math.min(r,y.x),s=Math.max(s,y.x),i=Math.min(i,y.y),l=Math.max(l,y.y));if(!Number.isFinite(r))return null;let c=r*t,u=i*t,a=Math.max(1,Math.ceil((s-r)*t/n)+1),d=Math.max(1,Math.ceil((l-i)*t/n)+1),m=new Float64Array(a*d).fill(-1/0);for(let y of e){if(!Number.isFinite(y.eyeHeightM))continue;let b=y.eyeHeightM-U,h=Math.min(a-1,Math.max(0,Math.floor((y.x*t-c)/n))),x=Math.min(d-1,Math.max(0,Math.floor((y.y*t-u)/n)))*a+h,S=b+o;S>m[x]&&(m[x]=S)}return{cellM:n,minX:c,minY:u,cols:a,rows:d,top:m}}function sn(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 Xe(e,t,n={}){let o=new Map;if(!t||!e.length)return o;let r=n.metresPerChartUnit??B,i=n.cellM??en,s=n.chairBackM??Qt,l=n.selfRowSkipM??Jt,c=n.clearThreshold??.9,u=n.partialThreshold??.25,a=Math.max(1,n.columns??Wt),d=Math.max(1,n.rows??qt),m=rn(e,r,i,s);if(!m)return o;let y=(t.maxX-t.minX)*r,b=(t.maxY-t.minY)*r,h=y>=b,f=(t.minX+t.maxX)/2*r,x=(t.minY+t.maxY)/2*r,S=[];for(let p=0;p<a;p++){let P=(p+.5)/a-.5,M=h?f+P*y:f,w=h?x:x+P*b;for(let I=0;I<d;I++){let v=t.deckTopM+(d===1?0:I/(d-1)*Zt);S.push({x:M,y:w,z:v})}}let g=i/2;for(let p of e){if(!Number.isFinite(p.eyeHeightM))continue;let P=p.x*r,M=p.y*r,w=p.eyeHeightM,I=0,v=1/0;for(let T of S){let R=T.x-P,k=T.y-M,O=Math.hypot(R,k);if(!(O>l)){I++;continue}let Y=R/O,E=k/O,L=0;for(let F=l;F<O;F+=g){let ee=sn(m,P+Y*F,M+E*F);if(!(!Number.isFinite(ee)||ee>=w)&&ee>w+(T.z-w)*F/O){L=F;break}}L?v=Math.min(v,L):I++}let C=I/S.length;C>=c||o.set(p.id,{seatId:p.id,mark:C<u?"obstructedView":"restrictedView",visibleFraction:C,totalRays:S.length,atDistanceM:Number.isFinite(v)?v:0})}return o}function Be(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 Ve(e){return e?e.accessibility&&e.accessibility.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var Q=Math.PI/180,cn=9,H=16;function be(e,t,n,o){let r=n*Q,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function ye(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return ne(e.path,t);if(t<=1)return t===1&&s.push({x:i.x,y:i.y}),s;if(o===0){for(let u=0;u<t;u++)s.push(be(u*n,0,r,i));return s}let l=o/(t-1)*Q,c=n/(2*Math.sin(Math.abs(l)/2));for(let u=0;u<t;u++){let a=u*l,d=c*Math.sin(a),m=-c+c*Math.cos(a);s.push(be(d,m,r,i))}return s}function an(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function ln(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 Ge(e,t){let n=an(e);return ye(e).map((o,r)=>{let i=n.get(r),s=Ve(i),l=Oe(e,r,i),c={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:l,displayLabel:ue(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:s.length>0,accessibility:s,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(c).some(u=>u!==void 0&&u!==!1&&u!=="")?c:void 0,glyph:i?.glyph,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle}})}function xe(e){let t=[];for(let n of Ge(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 ze(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 ge(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(a=>[a.index,a])),r=(a,d,m,y)=>{let b=o.get(a),h=Ve(b),f=b?.label??`${e.label}-${a+1}`,x=e.displayLabel??e.label;return{index:a,label:f,displayLabel:b?.displayLabel??`${x}-${a+1}`,x:d+(b?.dx??0),y:m+(b?.dy??0),categoryKey:b?.categoryKey??e.categoryKey,skipped:!!b?.skip,accessible:h.length>0,accessibility:h,wheelchairSpaceType:b?.wheelchairSpaceType,commercial:b?.commercial,glyph:b?.glyph,viewUrl:b?.viewFromSeatUrl,viewMeta:b?.viewFromSeatUrl?b.viewFromSeatMeta:void 0,labelStyle:b?.labelStyle,...y?{side:y}:{}}};if(e.shape==="round"){let a=(e.radius??40)+H,d=e.rotation*Q,m=Math.max(0,Math.min(360,e.seatArc??360));if(m>=360||n===1){for(let f=0;f<n;f++){let x=d+f/n*2*Math.PI;t.push(r(f,e.center.x+a*Math.cos(x),e.center.y+a*Math.sin(x)))}return t}let y=m*Q,b=(2*Math.PI-y)/2,h=d+b;for(let f=0;f<n;f++){let x=h+f/(n-1)*y;t.push(r(f,e.center.x+a*Math.cos(x),e.center.y+a*Math.sin(x)))}return t}let i=e.width??80,s=e.height??50,l=ze(e),c=["top","bottom","left","right"],u=0;for(let a of c){let d=l[a];for(let m=0;m<d;m++){let y,b;a==="top"?(y=-i/2+(m+.5)*i/d,b=-s/2-H):a==="bottom"?(y=-i/2+(m+.5)*i/d,b=s/2+H):a==="left"?(y=-i/2-H,b=-s/2+(m+.5)*s/d):(y=i/2+H,b=-s/2+(m+.5)*s/d);let h=be(y,b,e.rotation,e.center);t.push(r(u++,h.x,h.y,a))}}return t}function un(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):ge(e).filter(t=>!t.skipped).length}function $e(e){return ge(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 We(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"}]}function pe(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,l=t[r].x,c=t[r].y;s>e.y!=c>e.y&&e.x<(l-i)*(e.y-s)/(c-s)+i&&(n=!n)}return n}function fn(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 s=(e.x-n.x)*(r.x-n.x)+(e.y-n.y)*(r.y-n.y),l=(r.x-n.x)**2+(r.y-n.y)**2;return s>=-1e-7&&s<=l+1e-7})}function V(e,t,n){return pe(e,t)&&!(n??[]).some(o=>pe(e,o)||fn(e,o))}function dn(e,t){return se(e,t).point}function me(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 qe(e){switch(e.type){case"row":{let t=xe(e);if(!t.length)return{x:e.origin.x,y:e.origin.y};let n=0,o=0;for(let r of t)n+=r.x,o+=r.y;return{x:n/t.length,y:o/t.length}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return me(e.points);case"section":return me(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?me(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 Ue(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function hn(e,t){if(e.type!=="gaArea"||!Ue(e.points,t.outline))return!1;let n=e.holes??[],o=t.holes??[];return n.length===o.length&&n.every((r,i)=>Ue(r,o[i]))}function Qe(e,t){let n=e.filter(s=>s.type==="section"),o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0,r=qe(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(hn(t,s)||V(r,s.outline,s.holes))):void 0)??n.find(s=>V(r,s.outline,s.holes))}function W(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 mn(e,t){let n=W(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function Ze(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function Z(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:e.holes.map(r)}:{}};case"section":return{...e,outline:r(e.outline),...e.outlinePath?{outlinePath:Ee(e.outlinePath,t,n)}:{},...e.holes?{holes:e.holes.map(r)}:{}};case"text":return{...e,position:o(e.position)};case"shape":return{...e,...e.points?{points:r(e.points)}:{},...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 bn(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 s of o.objects)n.push(i===0?s:Z(s,0,i))}),{...e,objects:n,floors:void 0}}function Ye(e,t,n,o,r,i,s,l,c){let u=[],a=ce(e),d=b=>!b?.eventConfigurationId||b.eventConfigurationId===o&&(b.eventConfigurationVersion===void 0||b.eventConfigurationVersion===c),m=b=>Fe(b,{activeConfigurationId:o,activeConfigurationVersion:c,activeBasisSha256:r,now:l}),y=(b,h)=>m(b)?{...b,coverage:h}:void 0;for(let b of e){let h=[];if(b.type==="row"?h=xe(b):b.type==="table"?h=$e(b):b.type==="booth"&&(h=We(b)),!h.length)continue;for(let p of h)p.viewUrl&&!d(p.viewMeta)&&(p.viewUrl=void 0,p.viewMeta=void 0);if(b.type==="row"){let p=a.get(b.id);if(p){let P=new Map((b.overrides??[]).map(M=>[M.index,M]));for(let M of h){let w=Number(M.id.slice(M.id.lastIndexOf(":")+1));if(!Number.isInteger(w))continue;M.logicalRowId=p.groupId,M.logicalSeatIndex=p.adjacencyOffset+w,P.get(w)?.displayLabel||(M.displayLabel=ue(b,w,p)),!M.viewUrl&&p.viewFromSeatUrl&&d(p.viewFromSeatMeta)&&(M.viewUrl=p.viewFromSeatUrl,M.viewMeta=p.viewFromSeatMeta);let I=P.get(w)?.confidenceEvidence;M.confidenceEvidence=y(I,"exact-seat")??y(b.confidenceEvidence,"row-representative")??y(p.confidenceEvidence,"row-representative")}}}let f=Qe(e,b),x=f?.viewFromSeatUrl,g=(f?.zone?t?.find(p=>p.id===f.zone):void 0)?.focalPoint??n;for(let p of h){if(!p.confidenceEvidence){let P=Number(p.id.slice(p.id.lastIndexOf(":")+1)),M=(b.type==="row"||b.type==="table")&&Number.isInteger(P)?b.overrides?.find(w=>w.index===P)?.confidenceEvidence:void 0;p.confidenceEvidence=y(M,"exact-seat")??(b.type==="row"?y(b.confidenceEvidence,"row-representative"):void 0)}p.confidenceEvidence??=y(f?.confidenceEvidence,"section-representative")??(s?y(s.evidence,s.coverage):void 0),!p.viewUrl&&x&&d(f?.viewFromSeatMeta)&&(p.viewUrl=x,p.viewMeta=f?.viewFromSeatMeta),!p.viewUrl&&i&&d(i.meta)&&(p.viewUrl=i.url,p.viewMeta=i.meta),f&&(p.sectionId=f.logicalSectionId??f.id),f?.zone&&(p.zoneId=f.zone),g&&(p.focalPoint={...g})}u.push(...h)}return u}function pn(e,t={}){if(e.floors?.length){let o=[];for(let r of e.floors){let i=r.focalPoint??e.focalPoint,s=r.viewFromSeatUrl?{url:r.viewFromSeatUrl,meta:r.viewFromSeatMeta}:e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,l=r.confidenceEvidence?{evidence:r.confidenceEvidence,coverage:"floor-representative"}:e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,c=Ye(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,s,l,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&Ke(r.objects,r.focalPoint??e.focalPoint,r.baseHeightM??0,c);for(let u of c)u.floorId=r.id;o.push(...c)}return o}let n=Ye(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&&Ke(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),yn(e,n,t)}function yn(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||Be(t,Xe(t,He(e))),t}function Ke(e,t,n,o){let r=e.filter(a=>a.type==="section"),i=n>0||r.some(a=>a.height!==void 0||a.rake!==void 0||(a.elevation??0)>0);if(!r.length||!i||!t){for(let a of o)a.eyeHeightM=n+U;return}let s=new Array(o.length),l=new Map,c=new Map;for(let a=0;a<o.length;a++){let d=o[a],y=(d.sectionId?r.find(h=>h.id===d.sectionId)??r.find(h=>h.logicalSectionId===d.sectionId&&V({x:d.x,y:d.y},h.outline,h.holes)):void 0)??r.find(h=>V({x:d.x,y:d.y},h.outline,h.holes))??null;if(s[a]=y,!y)continue;l.has(y.id)||l.set(y.id,Te(y,{floorBaseHeightM:n}));let b=c.get(y.id);b?b.push(a):c.set(y.id,[a])}let u=new Array(o.length).fill(void 0);for(let[a,d]of c){let m=l.get(a);if(!m)continue;let y=m.rake>0?Math.tan(m.rake*Math.PI/180):0,b=Le(a,o,d,t);for(let h of b.rows){let f=h.blockDepth*B*y,x=m.height+f;for(let S of h.seatIndices)u[S]=x}}for(let a=0;a<o.length;a++){let d=o[a],m=s[a];if(!m){d.eyeHeightM=n+U;continue}let y=l.get(m.id);d.eyeHeightM=(u[a]??y.height)+U}}var q=40;function G(e,t){let n=t?.freeText==="exclude",o=1/0,r=1/0,i=-1/0,s=-1/0,l=(c,u)=>{c<o&&(o=c),u<r&&(r=u),c>i&&(i=c),u>s&&(s=u)};for(let c of Ze(e))if(c.type==="row"){let u=new Map((c.overrides??[]).map(a=>[a.index,a]));ye(c).forEach((a,d)=>{let m=u.get(d);m?.skip||l(a.x+(m?.dx??0),a.y+(m?.dy??0))})}else if(c.type==="gaArea")for(let u of c.points)l(u.x,u.y);else if(c.type==="section")for(let u of c.outline)l(u.x,u.y);else if(c.type==="decorImage")l(c.x,c.y),l(c.x+c.width,c.y+c.height);else if(c.type==="shape")if(c.points&&c.points.length)for(let u of c.points)l(u.x,u.y);else c.x!=null&&c.y!=null&&c.width!=null&&c.height!=null&&(l(c.x,c.y),l(c.x+c.width,c.y+c.height));else if(c.type==="table"){let u=H+cn,a=c.shape==="round"?(c.radius??40)+u:Math.max((c.width??80)/2,(c.height??50)/2)+u;l(c.center.x-a,c.center.y-a),l(c.center.x+a,c.center.y+a)}else if(c.type==="booth"){let u=Math.max(c.width,c.height)/2;l(c.center.x-u,c.center.y-u),l(c.center.x+u,c.center.y+u)}else if(c.type==="text"){if(n)continue;let u=oe(c);l(c.position.x,c.position.y),l(c.position.x+u.width,c.position.y+u.height)}for(let c of[e.referenceImage,e.backgroundImage]){if(!c)continue;let{center:u,width:a}=c,d=a*3/4;l(u.x-a/2,u.y-d/2),l(u.x+a/2,u.y+d/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-q,y:r-q,width:i-o+q*2,height:s-r+q*2}}var Je=.08,xn=.045;function et(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function gn(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function tt(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(s=>G(et(e,s.objects,s.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(s=>s.width))*Je,i=0;return t.map((s,l)=>{let c=n[l],u=i-(c.y+c.height);return i-=c.height+r,{floorId:s.id,label:s.name??s.id,level:l,levelBadge:l===0?"G":String(l),translation:{x:-gn(s,e,c),y:u},bounds:c}})}function Mn(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*xn),s=e.bounds.x+e.translation.x,l=e.bounds.y+e.translation.y+i*.4,c=`floor-level-${e.floorId}`,u={type:"text",id:`${c}-text`,text:r,position:{x:s,y:l},fontSize:i,rotation:0,color:o,bold:!0};if(t==="name")return[u];let a=i*.95;return[{type:"shape",id:`${c}-badge`,kind:"ellipse",x:s-a*.35,y:l-a*.3,width:a*2,height:a*2,fill:"transparent",stroke:{color:o,width:Math.max(1,i*.09)},opacity:.8},u]}function Sn(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=tt(e),r=[];n.forEach((u,a)=>{let{x:d,y:m}=o[a].translation;for(let y of u.objects)a>0&&y.type==="shape"&&y.role==="stage"||r.push(Z(y,d,m))});let i={...e,objects:r,floors:void 0},s=G(i,{freeText:"exclude"}),l=Math.max(1,s.width,s.height),c=e.theme?.textColor??"#94a3b8";for(let u of o)r.push(...Mn(u,t.labelStyle??"number",l,c));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function nt(e){let t=e.floors;if(!t?.length)return null;let n=t.find(i=>i.objects.some(s=>s.type==="shape"&&s.role==="stage"));if(n)return n.id;let o=t[0],r=-1;for(let i of t){let s=G(et(e,i.objects,i.focalPoint),{freeText:"exclude"}),l=s.width*s.height;l>r&&(r=l,o=i)}return o.id}var ot=640;function wn(e,t){return(e.floors?.length??0)<2?null:!Number.isFinite(t)||t<=0||t>=ot?"all":nt(e)}function Pn(e,t=0){let n=Math.max(1,e.width,e.height),o={x:e.x+e.width/2,y:e.y+e.height/2},r=n*1.55,i=Math.max(n*.82,Math.max(0,t)+n*.45);return{target:o,distance:r,height:i,focalLength:Math.hypot(r,i),yawRad:-8*Math.PI/180}}function J(e,t,n=0){let o=t.x-e.target.x,r=t.y-e.target.y,i=Math.cos(e.yawRad),s=Math.sin(e.yawRad),l=o*i-r*s,u=o*s+r*i-e.distance,a=n-e.height,d=Math.hypot(e.distance,e.height),m=(-e.distance*u-e.height*a)/d,y=(-e.height*u+e.distance*a)/d,b=Math.max(d*.08,m),h=e.focalLength/b;return{x:e.target.x+l*h,y:e.target.y-y*h,depth:b,scale:h}}function In(e,t){return{x:e.a*t.x+e.c*t.y+e.e,y:e.b*t.x+e.d*t.y+e.f}}function vn(e){let t=e.a*e.d-e.b*e.c;if(!Number.isFinite(t)||Math.abs(t)<1e-9)throw new Error("perspective projection produced a singular affine");let n=e.d/t,o=-e.b/t,r=-e.c/t,i=e.a/t;return{a:n,b:o,c:r,d:i,e:-(n*e.e+r*e.f),f:-(o*e.e+i*e.f)}}function Cn(e,t){return{a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f}}function En(e,t,n=()=>0){let o=J(e,t,n(t)),r={x:t.x+1,y:t.y},i={x:t.x,y:t.y+1},s=J(e,r,n(r)),l=J(e,i,n(i)),c=s.x-o.x,u=s.y-o.y,a=l.x-o.x,d=l.y-o.y;return{a:c,b:u,c:a,d,e:o.x-c*t.x-a*t.y,f:o.y-u*t.x-d*t.y}}function kn(e){let t=Math.hypot(e.a,e.b),n=e.a*e.d-e.b*e.c;return{rotationDeg:Math.atan2(e.b,e.a)*180/Math.PI,scaleX:t,scaleY:n/Math.max(t,1e-9),skewX:(e.a*e.c+e.b*e.d)/Math.max(n,1e-9)}}var rt=9;function On(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)),s=Math.abs(Math.sin(r));return{hx:t*i+n*s,hy:t*s+n*i}}function Rn(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,s=o,l=r;if(i){let c=-i*Math.PI/180,u=Math.cos(c),a=Math.sin(c);s=o*u-r*a,l=o*a+r*u}return Math.abs(s)<=e.shape.width/2&&Math.abs(l)<=e.shape.height/2}function Tn(e,t,n,o,r){if(e.shape.kind==="circle"){let b=Math.min(Math.max(e.seat.x,t),o),h=Math.min(Math.max(e.seat.y,n),r),f=e.seat.x-b,x=e.seat.y-h;return f*f+x*x<=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 s=i*Math.PI/180,l=Math.cos(s),c=Math.sin(s),u=e.shape.width/2,a=e.shape.height/2,d=[[-u,-a],[u,-a],[u,a],[-u,a]].map(([b,h])=>[e.seat.x+b*l-h*c,e.seat.y+b*c+h*l]),m=[[t,n],[o,n],[o,r],[t,r]],y=[[1,0],[0,1],[l,c],[-c,l]];for(let[b,h]of y){let f=1/0,x=-1/0;for(let[p,P]of d){let M=p*b+P*h;M<f&&(f=M),M>x&&(x=M)}let S=1/0,g=-1/0;for(let[p,P]of m){let M=p*b+P*h;M<S&&(S=M),M>g&&(g=M)}if(x<S||g<f)return!1}return!0}function An(e,t={}){let n=t.seatRadius??rt,o=e.length,r=new Array(o),i=1/0,s=1/0,l=-1/0,c=-1/0,u=0;for(let M=0;M<o;M++){let w=e[M],I=t.shapeOf?.(w)??{kind:"circle",r:n},{hx:v,hy:C}=On(I);r[M]={seat:w,shape:I,hx:v,hy:C},w.x-v<i&&(i=w.x-v),w.y-C<s&&(s=w.y-C),w.x+v>l&&(l=w.x+v),w.y+C>c&&(c=w.y+C),v>u&&(u=v),C>u&&(u=C)}o===0&&(i=0,s=0,l=0,c=0);let a=u>0?u*4:1,d=Math.max(l-i,0),m=Math.max(c-s,0),y=Math.max(64,t.maxCells??o*4),b=a,h=Math.max(1,Math.ceil(d/b)||1),f=Math.max(1,Math.ceil(m/b)||1);for(;h*f>y&&(h>1||f>1);)b*=2,h=Math.max(1,Math.ceil(d/b)||1),f=Math.max(1,Math.ceil(m/b)||1);let x=h*f,S=new Int32Array(x+1),g=0;for(let M=0;M<o;M++){let w=r[M],I=D(Math.floor((w.seat.x-w.hx-i)/b),0,h-1),v=D(Math.floor((w.seat.x+w.hx-i)/b),0,h-1),C=D(Math.floor((w.seat.y-w.hy-s)/b),0,f-1),T=D(Math.floor((w.seat.y+w.hy-s)/b),0,f-1);for(let R=C;R<=T;R++)for(let k=I;k<=v;k++)S[R*h+k+1]++,g++}for(let M=0;M<x;M++)S[M+1]+=S[M];let p=new Int32Array(g),P=S.slice(0,x);for(let M=0;M<o;M++){let w=r[M],I=D(Math.floor((w.seat.x-w.hx-i)/b),0,h-1),v=D(Math.floor((w.seat.x+w.hx-i)/b),0,h-1),C=D(Math.floor((w.seat.y-w.hy-s)/b),0,f-1),T=D(Math.floor((w.seat.y+w.hy-s)/b),0,f-1);for(let R=C;R<=T;R++)for(let k=I;k<=v;k++){let O=R*h+k;p[P[O]++]=M}}return{seats:e,entries:r,minX:i,minY:s,cell:b,cols:h,rows:f,cellStart:S,items:p,stamp:new Int32Array(o),epoch:0}}function _n(e,t,n={}){let{cols:o,rows:r,cell:i,minX:s,minY:l,cellStart:c,items:u,entries:a}=e,d=Math.floor((t.x-s)/i),m=Math.floor((t.y-l)/i);if(d<0||m<0||d>=o||m>=r)return null;let y=m*o+d,b=c[y+1],h=-1,f=1/0;for(let x=c[y];x<b;x++){let S=u[x],g=a[S];if(n.filter&&!n.filter(g.seat.id,g.seat)||!Rn(g,t.x,t.y))continue;let p=t.x-g.seat.x,P=t.y-g.seat.y,M=p*p+P*P;(M<f||M===f&&S<h)&&(f=M,h=S)}return h<0?null:a[h].seat.id}function Dn(e,t,n,o={}){if(!(n>0))return null;let{cols:r,rows:i,cell:s,minX:l,minY:c,cellStart:u,items:a,entries:d}=e,m=Math.max(0,Math.floor((t.x-n-l)/s)),y=Math.min(r-1,Math.floor((t.x+n-l)/s)),b=Math.max(0,Math.floor((t.y-n-c)/s)),h=Math.min(i-1,Math.floor((t.y+n-c)/s));if(m>y||b>h)return null;let f=-1,x=n*n,S=e.stamp,g=++e.epoch;for(let p=b;p<=h;p++){let P=p*r;for(let M=m;M<=y;M++){let w=P+M,I=u[w+1];for(let v=u[w];v<I;v++){let C=a[v];if(S[C]===g)continue;S[C]=g;let T=d[C];if(o.filter&&!o.filter(T.seat.id,T.seat))continue;let R=t.x-T.seat.x,k=t.y-T.seat.y,O=R*R+k*k;(O<x||O===x&&C<f)&&(x=O,f=C)}}}return f<0?null:d[f].seat.id}function Ln(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),s=Math.max(t.y,t.y+t.height),l=n.mode??"center",{cols:c,rows:u,cell:a,minX:d,minY:m,cellStart:y,items:b,entries:h}=e,f=Math.max(0,Math.floor((o-d)/a)),x=Math.min(c-1,Math.floor((r-d)/a)),S=Math.max(0,Math.floor((i-m)/a)),g=Math.min(u-1,Math.floor((s-m)/a));if(f>x||S>g)return[];let p=[],P=e.stamp,M=++e.epoch;for(let w=S;w<=g;w++){let I=w*c;for(let v=f;v<=x;v++){let C=I+v,T=y[C+1];for(let R=y[C];R<T;R++){let k=b[R];if(P[k]===M)continue;P[k]=M;let O=h[k];if(n.filter&&!n.filter(O.seat.id,O.seat))continue;(l==="center"?O.seat.x>=o&&O.seat.x<=r&&O.seat.y>=i&&O.seat.y<=s:Tn(O,o,i,r,s))&&p.push(k)}}}return p.sort((w,I)=>w-I),p.map(w=>h[w].seat.id)}function Fn(e){let t=e.cols*e.rows,n=0,o=0;for(let i=0;i<t;i++){let s=e.cellStart[i+1]-e.cellStart[i];s>0&&n++,s>o&&(o=s)}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}}0&&(module.exports={DEFAULT_SEAT_RADIUS,FLOOR_STACK_GAP_RATIO,FLOOR_STACK_MIN_SURFACE_PX,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,allObjects,applyAffine,buildAisleHoles,buildSeatIndex,buildSectionShell,chartBounds,composeAffine,createPerspectiveCamera,cubicPoint,decomposeAffineLinear,distanceToRings,distributeAlongCubic,expandBooth,expandChart,expandRow,expandRowSlots,expandTable,expandTableSlots,floorObjects,floorStackPlacements,floorsOf,gridStats,hitTest,initialFloorMode,invertAffine,layoutFloorStack,mainFloorId,nearestWithin,objectCenter,owningSectionForObject,perspectiveTangentAffine,pointInPolygon,pointInPolygonWithHoles,polygonArea,polygonInscribedAnchor,polygonLabelPoint,polygonNetArea,projectPerspectivePoint,queryRect,resolveSegmentedRowGroups,rowInventoryCount,rowSeatPositions,segmentedRowComponentSeats,segmentedRowComponents,segmentedRowSeatTotal,smoothCubicThroughMiddle,stackFloors,tableInventoryCount,tableSeatCountsBySide,textLayoutMetrics,translateObject});
1
+ "use strict";var ne=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var lt=Object.getOwnPropertyNames;var ut=Object.prototype.hasOwnProperty;var ft=(e,t)=>{for(var n in t)ne(e,n,{get:t[n],enumerable:!0})},dt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of lt(t))!ut.call(e,r)&&r!==n&&ne(e,r,{get:()=>t[r],enumerable:!(o=at(t,r))||o.enumerable});return e};var ht=e=>dt(ne({},"__esModule",{value:!0}),e);var Bn={};ft(Bn,{AUTOMATIC_ROUND_TABLE_RADIUS_MAX:()=>Xe,AUTOMATIC_ROUND_TABLE_RADIUS_MIN:()=>He,DEFAULT_SEAT_RADIUS:()=>ct,FLOOR_STACK_GAP_RATIO:()=>nt,FLOOR_STACK_MIN_SURFACE_PX:()=>st,TABLE_SEAT_OFFSET:()=>H,TEXT_BACKGROUND_PADDING_MAX:()=>eo,TEXT_BACKGROUND_RADIUS_MAX:()=>to,TEXT_LETTER_SPACING_MAX:()=>Zn,TEXT_LETTER_SPACING_MIN:()=>Qn,TEXT_LINE_HEIGHT_MAX:()=>qn,TEXT_LINE_HEIGHT_MIN:()=>Wn,TEXT_OPACITY_MIN:()=>Jn,TEXT_WIDTH_MAX:()=>$n,TEXT_WIDTH_MIN:()=>zn,allObjects:()=>tt,applyAffine:()=>kn,automaticRoundTableRadius:()=>qt,buildAisleHoles:()=>pt,buildSeatIndex:()=>Fn,buildSectionShell:()=>bt,chartBounds:()=>G,composeAffine:()=>Rn,createPerspectiveCamera:()=>En,cubicPoint:()=>z,decomposeAffineLinear:()=>An,distanceToRings:()=>ke,distributeAlongCubic:()=>oe,expandBooth:()=>Ze,expandChart:()=>Mn,expandRow:()=>Me,expandRowSlots:()=>We,expandTable:()=>Qe,expandTableSlots:()=>Se,floorObjects:()=>xn,floorStackPlacements:()=>rt,floorsOf:()=>q,gridStats:()=>Xn,hitTest:()=>jn,initialFloorMode:()=>Cn,invertAffine:()=>On,layoutFloorStack:()=>vn,mainFloorId:()=>it,nearestWithin:()=>Nn,objectCenter:()=>Je,owningSectionForObject:()=>et,perspectiveTangentAffine:()=>Tn,pointInPolygon:()=>xe,pointInPolygonWithHoles:()=>V,polygonArea:()=>se,polygonInscribedAnchor:()=>ce,polygonLabelPoint:()=>pn,polygonNetArea:()=>Mt,projectPerspectivePoint:()=>ee,queryRect:()=>Hn,resolveSegmentedRowGroups:()=>ae,rowInventoryCount:()=>hn,rowSeatPositions:()=>ge,segmentedRowComponentSeats:()=>Pt,segmentedRowComponents:()=>wt,segmentedRowSeatTotal:()=>It,smoothCubicThroughMiddle:()=>mt,stackFloors:()=>gn,tableInventoryCount:()=>mn,tableSeatCountsBySide:()=>qe,textLayoutMetrics:()=>re,translateObject:()=>J});module.exports=ht(Bn);var Yn=Math.PI/180;function N(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function j(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function z(e,t){let n=1-t,o=n*n*n,r=3*n*n*t,i=3*n*t*t,s=t*t*t;return{x:o*e.start.x+r*e.control1.x+i*e.control2.x+s*e.end.x,y:o*e.start.y+r*e.control1.y+i*e.control2.y+s*e.end.y}}function mt(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 oe(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[z(e,.5)];let o=Array.from({length:n+1},(c,u)=>z(e,u/n)),r=new Float64Array(o.length);for(let c=1;c<o.length;c+=1){let u=o[c].x-o[c-1].x,a=o[c].y-o[c-1].y;r[c]=r[c-1]+Math.hypot(u,a)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],l=1;for(let c=0;c<t;c+=1){let u=i*c/(t-1);for(;l<r.length-1&&r[l]<u;)l+=1;let a=r[l-1],d=r[l],m=d===a?0:(u-a)/(d-a);s.push({x:o[l-1].x+(o[l].x-o[l-1].x)*m,y:o[l-1].y+(o[l].y-o[l-1].y)*m})}return s}function A(e,t){return{x:e.x+t.x,y:e.y+t.y}}function K(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _(e,t){return{x:e.x*t,y:e.y*t}}function $(e,t=13){return Array.from({length:t},(n,o)=>z(e,o/(t-1)))}function we(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return j(e[o],e[o+1],n-o)}function Pe(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[we(e,o)];for(let s=1;s<e.length-1;s+=1){let l=s/(e.length-1);l>o+1e-9&&l<r-1e-9&&i.push(e[s])}return i.push(we(e,r)),i}function Ie(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([m,y],b)=>{let h=N(j(e[m],e[y],.5),t);h<r&&(r=h,o=b)});let i=e[o],s=e[(o+1)%4],l=e[(o+2)%4],c=e[(o+3)%4],u=j(i,s,.5),a=K(t,u),d=Math.max(1e-9,Math.hypot(a.x,a.y));return{p0:i,p1:s,p2:l,p3:c,normal:_(a,1/d),depth:(N(i,c)+N(s,l))/2}}function ve(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:s}=e,l=K(n,t),c=K(o,r),u=s*.22,a=s*.12;return{nearPath:{start:t,control1:A(A(t,_(l,1/3)),_(i,u)),control2:A(A(t,_(l,2/3)),_(i,u)),end:n},farPath:{start:o,control1:A(A(r,_(c,2/3)),_(i,a)),control2:A(A(r,_(c,1/3)),_(i,a)),end:r}}}function bt(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((b,h)=>A(b,h),{x:0,y:0});o.x/=4,o.y/=4;let r=N(e[0],e[1]),i=N(e[0],e[3]),s=n==="auto"?r>i*1.25&&N(o,t)>i?"bezier":"tapered":n;if(s==="rectangle")return{mode:s,outline:e.map(b=>({...b}))};let l=Ie(e,t),{p0:c,p1:u,p2:a,p3:d}=l;if(s==="tapered")return{mode:s,outline:[A(c,_(K(u,c),.14)),A(c,_(K(u,c),1-.14)),a,d]};let{nearPath:m,farPath:y}=ve(l);return{mode:s,outline:[...$(m),...$(y).slice(1)]}}function pt(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=Ie(e,t),{p0:i,p1:s,p2:l,p3:c}=r,u=o==="bezier"?ve(r):null,a=u?$(u.nearPath):null,d=u?$(u.farPath).reverse():null,m=Math.min(.055,.18/(n+1));return Array.from({length:n},(y,b)=>{let h=(b+1)/(n+1),f=h-m/2,x=h+m/2;return a&&d?[...Pe(a,f,x),...Pe(d,f,x).reverse()]:[j(i,s,f),j(i,s,x),j(c,l,x),j(c,l,f)]})}var zn=40,$n=1200,Wn=.8,qn=3,Qn=-2,Zn=20,Jn=.1,eo=40,to=40,Ce=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function yt(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/Ce(e))),r=0;for(let i of n){if(!i.length){r+=1;continue}let s=0;for(let l of i.split(/\s+/)){let c=l.length;s&&s+1+c<=o?s+=1+c:(r+=Math.max(1,Math.ceil(c/o)),s=c%o)}}return Math.max(1,r)}function re(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(l=>l.length))*Ce(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),s=yt(e,i);return{width:r,height:s*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:s,padding:t}}function xt(e,t,n){let o=n.x-t.x,r=n.y-t.y,i=o*o+r*r,s=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+s*o),e.y-(t.y+s*r))}function ke(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 s=xt(e,o[i],o[r]);s<n&&(n=s)}return n}function Ee(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,l=t[r].x,c=t[r].y;s>e.y!=c>e.y&&e.x<(l-i)*(e.y-s)/(c-s)+i&&(n=!n)}return n}function gt(e,t,n){let o=Ee(e,t)&&!n.some(i=>Ee(e,i)),r=ke(e,[t,...n]);return o?r:-r}function X(e,t,n,o,r){let i=gt({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var ie=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,s=i+1,l=r;if(i<t.length&&t[i].max>t[l].max&&(l=i),s<t.length&&t[s].max>t[l].max&&(l=s),l===r)break;[t[l],t[r]]=[t[r],t[l]],r=l}}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 Mt(e,t){return Math.max(0,se(e)-(t??[]).reduce((n,o)=>n+se(o),0))}function ce(e,t){let n=t??[];if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let h=e.reduce((x,S)=>x+S.x,0)/e.length,f=e.reduce((x,S)=>x+S.y,0)/e.length;return{point:{x:h,y:f},radius:0}}let o=1/0,r=1/0,i=-1/0,s=-1/0;for(let h of e)h.x<o&&(o=h.x),h.y<r&&(r=h.y),h.x>i&&(i=h.x),h.y>s&&(s=h.y);let l=i-o,c=s-r,u=Math.min(l,c);if(!(u>0))return{point:{x:(o+i)/2,y:(r+s)/2},radius:0};let a=Math.max(l,c)/150,d=new ie,m=u/2;for(let h=o;h<i;h+=u)for(let f=r;f<s;f+=u)d.push(X(h+m,f+m,m,e,n));let y=X(o+l/2,r+c/2,0,e,n),b=0;for(;d.size;){let h=d.pop();if(!h)break;h.d>y.d&&(y=h),!(h.max-y.d<=a)&&(b>=4e3||(b+=1,m=h.h/2,d.push(X(h.x-m,h.y-m,m,e,n)),d.push(X(h.x+m,h.y-m,m,e,n)),d.push(X(h.x-m,h.y+m,m,e,n)),d.push(X(h.x+m,h.y+m,m,e,n))))}return{point:{x:y.x,y:y.y},radius:Math.max(0,y.d)}}function W(e,t,n){return Math.max(t,Math.min(n,e))}function D(e,t,n){return e<t?t:e>n?n:e}var io=Math.PI*2;function Oe(e,t,n){return St(e,r=>({x:r.x+t,y:r.y+n}))}function St(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 so=4/3;function wt(e,t,n){let o=[];for(let r=0;r<e.length-1;r+=1){let i=e[r],s=e[r+1],l=Math.hypot(s.x-i.x,s.y-i.y);if(l<=0)continue;let c=Math.max(1,Math.round(l/n)),u=l/c,a=Math.atan2(s.y-i.y,s.x-i.x),d=r===0,y=(r>0?t[r-1]:void 0)==="break"?2:1,b=d?{...i}:{x:i.x+Math.cos(a)*u*y,y:i.y+Math.sin(a)*u*y},h=d?c+1:Math.max(1,c-(y-1));o.push({origin:b,rotation:a*180/Math.PI,seatCount:h,seatSpacing:u})}return o}function Pt(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 It(e){return e.reduce((t,n)=>t+n.seatCount,0)}function ae(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,y)=>m.segmentedRow.componentIndex-y.segmentedRow.componentIndex),s=i[0]?.segmentedRow?.componentCount??0,l=i[0]?.segmentedRow;if(!l||!(s>=2&&i.length===s&&l?.boundaryBefore==="start"&&i.every((m,y)=>m.segmentedRow?.kind==="segmented-row-v1"&&m.segmentedRow.groupId===o&&m.segmentedRow.componentCount===s&&m.segmentedRow.componentIndex===y&&m.segmentedRow.repeatLabelOnComponents===l.repeatLabelOnComponents&&(y===0?m.segmentedRow.boundaryBefore==="start":m.segmentedRow.boundaryBefore!=="start")&&m.segmentedRow.displayLabel===l.displayLabel)))continue;let u=i.reduce((m,y)=>m+y.seatCount,0),a=0,d=0;for(let m of i)m.segmentedRow.boundaryBefore==="break"&&(a+=1),t.set(m.id,{groupId:o,adjacencyOffset:a,displayOffset:d,displayLabel:l.displayLabel,totalSeats:u,canonical:i[0],viewFromSeatUrl:l.viewFromSeatUrl,viewFromSeatMeta:l.viewFromSeatMeta,confidenceEvidence:l.confidenceEvidence}),a+=m.seatCount,d+=m.seatCount}return t}var vt="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var Ct="abcdefghijklmnopqrstuvwxyz";function Et(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 le(e,t=!1){let n=t?Ct:vt;return Et(Math.max(0,Math.floor(e)-1),n)}var kt=[[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 Re(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of kt)for(;t>=o;)n+=r,t-=o;return n}function Ot(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 ue(e,t){let n=e.seatLabelStart??1,o=e.seatNumbering?.direction??"ltr",r=e.seatNumbering?.step??1,i=e.seatNumbering?.scheme??"decimal",s=e.seatNumbering?.prefix??"",l=e.seatNumbering?.endAt,c=e.seatCount;if(i==="updown"||i==="updown-descending"){let y=Math.ceil(c/2),b=i==="updown"?t<y?n+2*t:n-1+2*(c-t):t<y?n+2*(y-1-t):n+1+2*(t-y);return`${s}${b}`}let u=i==="odd"||i==="even"?2:r,a=l!=null&&Number.isFinite(l)?l-(c-1)*u:n,d=o==="center"?Ot(c)[t]:o==="rtl"?c-1-t:t,m;switch(i){case"odd":{let y=a%2===1?a:a+1;m=String(y+d*2);break}case"even":{let y=a%2===0?a:a+1;m=String(y+d*2);break}case"roman":m=Re(a+d*r);break;case"letters-upper":m=le(a+d*r,!1);break;case"letters-lower":m=le(a+d*r,!0);break;default:m=String(a+d*r);break}return`${s}${m}`}function Rt(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function Te(e,t,n){return n?.label??`${e.label}-${ue(e,t)}`}function fe(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(!n)return`${e.displayLabel||e.label}-${ue(e,t)}`;let r=Rt(n),i=n.displayOffset+t;return`${n.displayLabel}-${ue(r,i)}`}var B=.02291666666666667,ho=1/B,Tt=58,At=Tt*B;var _t=3,Ae=0,de=120,Dt=0,Lt=45,Ft=7,U=1.2;function he(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function jt(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Ft?e:_t}function _e(e,t={}){let n=he(t.floorBaseHeightM,Ae,de,0),o=Math.min(de,n+jt(e.elevation)*At),r=e.height===void 0?o:he(e.height,Ae,de,o),i=he(e.rake,Dt,Lt,0);return{height:r,rake:i}}function De(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 Le(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],s=e[r+1],l=s.x-i.x,c=s.y-i.y,u=l*l+c*c,a=u>1e-12?((t-i.x)*l+(n-i.y)*c)/u:0;a<0?a=0:a>1&&(a=1);let d=Math.hypot(t-(i.x+a*l),n-(i.y+a*c));d<o&&(o=d)}return o}function Nt(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 s=Math.hypot(i.x-t,i.y-n);s>r&&(r=s)}return{cx:t,cy:n,r}}function Fe(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function me(e,t){let n=1/0;for(let o of De(e)){let r=Le(t,o.x,o.y);r<n&&(n=r)}for(let o of De(t)){let r=Le(e,o.x,o.y);r<n&&(n=r)}return n}function Ht(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let a of e)n+=a.x,o+=a.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let a of e){let d=Math.hypot(a.x-n,a.y-o);d>r&&(r=d,i=a)}let s=i.x-n,l=i.y-o,c=Math.hypot(s,l);c>1e-9?(s/=c,l/=c):(s=1,l=0);let u=e.map((a,d)=>({p:a,i:d,t:(a.x-n)*s+(a.y-o)*l})).sort((a,d)=>a.t-d.t);return{pts:u.map(a=>a.p),seatIndices:u.map(a=>t[a.i])}}function Xt(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let S of e)n+=S.x,o+=S.y;n/=t,o/=t;let r=0,i=0,s=0,l=0,c=0,u=0,a=0;for(let S of e){let g=S.x-n,p=S.y-o;r+=g*g,s+=p*p,i+=g*p,l+=g*g*g,c+=p*p*p,u+=g*p*p,a+=p*g*g}let d=r*s-i*i;if(Math.abs(d)<1e-9)return null;let m=(l+u)/2,y=(c+a)/2,b=(m*s-y*i)/d,h=(y*r-m*i)/d,f=b+n,x=h+o;return!Number.isFinite(f)||!Number.isFinite(x)?null:{cx:f,cy:x}}var Bt=.15;function Ut(e){if(e.length<2)return null;let t=e.map(S=>{let g=0,p=0;for(let P of S.pts)g+=P.x,p+=P.y;return{x:g/S.pts.length,y:p/S.pts.length}}),n=0,o=0;for(let S of t)n+=S.x,o+=S.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let S of t){let g=S.x-n,p=S.y-o;r+=g*g,i+=g*p,s+=p*p}let l=r+s,c=r*s-i*i,u=l/2+Math.sqrt(Math.max(0,l*l/4-c)),a,d;Math.abs(i)>1e-12?(a=u-s,d=i):r>=s?(a=1,d=0):(a=0,d=1);let m=Math.hypot(a,d);if(!(m>1e-12))return null;a/=m,d/=m;let y=1/0,b=-1/0,h=[];for(let S of e){let g=1/0,p=-1/0;for(let P of S.pts){let M=P.x*a+P.y*d;M<g&&(g=M),M>p&&(p=M),M<y&&(y=M),M>b&&(b=M)}h.push(p-g)}let f=b-y;return f>1e-9?(h.sort((S,g)=>S-g),h[Math.min(h.length-1,Math.floor(h.length*.9))]/f<=Yt?{x:a,y:d}:null):null}var Yt=.35;function je(e,t,n,o){let r=new Map;for(let f of n){let x=t[f],S=x.rowId||`__seat-${f}`,g=r.get(S);g||(g={pts:[],idx:[]},r.set(S,g)),g.pts.push({x:x.x,y:x.y}),g.idx.push(f)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[f,x]of r){let S=Ht(x.pts,x.idx),g=0;for(let p of S.pts)g+=Math.hypot(p.x-o.x,p.y-o.y);i.push({id:f,pts:S.pts,seatIndices:S.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:g/S.pts.length})}let s=i.map(f=>Nt(f.pts)),l=[];for(let f=0;f<i.length;f++){let x=1/0;for(let S=0;S<i.length;S++){if(f===S||Fe(s[f],s[S])>=x)continue;let g=me(i[f].pts,i[S].pts);g<x&&(x=g)}Number.isFinite(x)&&l.push(x)}l.sort((f,x)=>f-x);let c=l.length?l[Math.floor(l.length/2)]:1,u=Math.max(c*1.8,1e-6),a=i.map(()=>[]);for(let f=0;f<i.length;f++)for(let x=f+1;x<i.length;x++)Fe(s[f],s[x])>u||me(i[f].pts,i[x].pts)<=u&&(a[f].push(x),a[x].push(f));let d=0;for(let f=0;f<i.length;f++){if(i[f].blockId!==-1)continue;let x=d++,S=[f];for(i[f].blockId=x;S.length;){let g=S.pop();for(let p of a[g])i[p].blockId===-1&&(i[p].blockId=x,S.push(p))}}let m=new Map;for(let f of i){let x=m.get(f.blockId)??[];x.push(f),m.set(f.blockId,x)}let y=[];for(let f of i){if(f.pts.length<4)continue;let x=Xt(f.pts);x&&(!Number.isFinite(x.cx)||!Number.isFinite(x.cy)||y.push({x:x.cx,y:x.cy}))}let b=y.length>=2?(()=>{let f=y.map(g=>g.x).sort((g,p)=>g-p),x=y.map(g=>g.y).sort((g,p)=>g-p),S=Math.floor(y.length/2);return{cx:f[S],cy:x[S]}})():null;if(b){let f=M=>Math.hypot(M.x-b.cx,M.y-b.cy),x=1/0,S=-1/0,g=[];for(let M of i){let w=1/0,I=-1/0;for(let v of M.pts){let C=f(v);C<w&&(w=C),C>I&&(I=C)}g.push(I-w),w<x&&(x=w),I>S&&(S=I)}let p=S-x;g.sort((M,w)=>M-w);let P=g[Math.min(g.length-1,Math.floor(g.length*.9))];if(p>1e-9&&P/p<=Bt){let M=i.map(E=>{let L=0;for(let F of E.pts)L+=f(F);return{row:E,radius:L/E.pts.length}}),w=0,I=0;for(let E of M)w+=E.radius,I+=E.row.focalDistance;w/=M.length,I/=M.length;let v=0;for(let E of M)v+=(E.radius-w)*(E.row.focalDistance-I);if(v<0)for(let E of M)E.radius=-E.radius;let T=1/0;for(let E of M)E.radius<T&&(T=E.radius);M.sort((E,L)=>E.radius-L.radius);let R=-1,k=-1/0,O=p/Math.max(1,M.length)*.5,Y=[];for(let E of M)E.radius-k>O&&(R++,k=E.radius),E.row.ordinal=R,E.row.blockDepth=E.radius-T,Y.push(E.row);return{sectionId:e,rows:Y,blockCount:d}}}let h=[];for(let[,f]of m){let x=Ut(f);if(x){let S=p=>{let P=0;for(let M of p.pts)P+=M.x*x.x+M.y*x.y;return P/p.pts.length};f.sort((p,P)=>S(p)-S(P)),f.length>=2&&f[0].focalDistance>f[f.length-1].focalDistance&&f.reverse();let g=0;for(let p=0;p<f.length;p++)p>0&&(g+=me(f[p-1].pts,f[p].pts)),f[p].ordinal=p,f[p].blockDepth=g,h.push(f[p])}else{let S=1/0;for(let g of f)g.focalDistance<S&&(S=g.focalDistance);f.sort((g,p)=>g.focalDistance-p.focalDistance);for(let g=0;g<f.length;g++)f[g].ordinal=g,f[g].blockDepth=Math.max(0,f[g].focalDistance-S),h.push(f[g])}}return{sectionId:e,rows:h,blockCount:d}}var Kt=/^\d{4}-\d{2}-\d{2}$/;function Vt(e){let t=Date.parse(e);return Number.isFinite(t)?Kt.test(e)?t+864e5:t:null}function Gt(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=Vt(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function zt(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function $t(e){return e.status!=="draft"&&e.status!=="retracted"}function Wt(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 Ne(e,t={}){return!!e&&$t(e)&&zt(e,t.activeConfigurationId,t.activeConfigurationVersion)&&Wt(e,t.activeBasisSha256)&&Gt(e,t.now)}var He=36,Xe=160;function qt(e,t=360){let n=W(Math.round(Number.isFinite(e)?e:1),1,40),o=W(Number.isFinite(t)?t:360,120,360);return Math.round(W(n*4*(360/o),He,Xe))}var go=Math.PI*2;function Be(e){return e==="pitch-football"||e==="rink-hockey"||e==="track-athletics"||e==="oval-cricket"}function Qt(e){if((e.kind==="polygon"||e.kind==="polyline"||e.kind==="line")&&e.points&&e.points.length>=2)return 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 Zt(e,t,n){let o=n*Math.PI/180,r=Math.cos(o),i=Math.sin(o),s=e.x-t.x,l=e.y-t.y;return{x:t.x+s*r-l*i,y:t.y+s*i+l*r}}function Ue(e){let t=Qt(e);if(!t||t.length<2)return null;let n=e.rotation??0,o=Math.abs(n)<1e-6?t:t.map(c=>Zt(c,{x:t.reduce((u,a)=>u+a.x,0)/t.length,y:t.reduce((u,a)=>u+a.y,0)/t.length},n)),r=1/0,i=1/0,s=-1/0,l=-1/0;for(let c of o)r=Math.min(r,c.x),i=Math.min(i,c.y),s=Math.max(s,c.x),l=Math.max(l,c.y);return!Number.isFinite(r)||s-r<1e-6||l-i<1e-6?null:{minX:r,minY:i,maxX:s,maxY:l}}var Jt=5,en=3,tn=.92,nn=1.9,on=2,rn=.6,sn=1,cn=.06;function an(e){return e.heightM!==void 0?e.heightM:Be(e.stageKind)?cn:sn}function Ye(e){let t=1/0,n=1/0,o=-1/0,r=-1/0,i=-1/0;for(let s of q(e)){let l=s.baseHeightM??0;for(let c of s.objects){if(c.type!=="shape"||c.role!=="stage")continue;let u=Ue(c);u&&(t=Math.min(t,u.minX),n=Math.min(n,u.minY),o=Math.max(o,u.maxX),r=Math.max(r,u.maxY),i=Math.max(i,l+an(c)))}}return!Number.isFinite(t)||!Number.isFinite(i)?null:{minX:t,minY:n,maxX:o,maxY:r,deckTopM:i}}function ln(e,t,n,o){let r=1/0,i=1/0,s=-1/0,l=-1/0;for(let y of e)Number.isFinite(y.eyeHeightM)&&(r=Math.min(r,y.x),s=Math.max(s,y.x),i=Math.min(i,y.y),l=Math.max(l,y.y));if(!Number.isFinite(r))return null;let c=r*t,u=i*t,a=Math.max(1,Math.ceil((s-r)*t/n)+1),d=Math.max(1,Math.ceil((l-i)*t/n)+1),m=new Float64Array(a*d).fill(-1/0);for(let y of e){if(!Number.isFinite(y.eyeHeightM))continue;let b=y.eyeHeightM-U,h=Math.min(a-1,Math.max(0,Math.floor((y.x*t-c)/n))),x=Math.min(d-1,Math.max(0,Math.floor((y.y*t-u)/n)))*a+h,S=b+o;S>m[x]&&(m[x]=S)}return{cellM:n,minX:c,minY:u,cols:a,rows:d,top:m}}function un(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 Ke(e,t,n={}){let o=new Map;if(!t||!e.length)return o;let r=n.metresPerChartUnit??B,i=n.cellM??rn,s=n.chairBackM??tn,l=n.selfRowSkipM??on,c=n.clearThreshold??.9,u=n.partialThreshold??.25,a=Math.max(1,n.columns??Jt),d=Math.max(1,n.rows??en),m=ln(e,r,i,s);if(!m)return o;let y=(t.maxX-t.minX)*r,b=(t.maxY-t.minY)*r,h=y>=b,f=(t.minX+t.maxX)/2*r,x=(t.minY+t.maxY)/2*r,S=[];for(let p=0;p<a;p++){let P=(p+.5)/a-.5,M=h?f+P*y:f,w=h?x:x+P*b;for(let I=0;I<d;I++){let v=t.deckTopM+(d===1?0:I/(d-1)*nn);S.push({x:M,y:w,z:v})}}let g=i/2;for(let p of e){if(!Number.isFinite(p.eyeHeightM))continue;let P=p.x*r,M=p.y*r,w=p.eyeHeightM,I=0,v=1/0;for(let T of S){let R=T.x-P,k=T.y-M,O=Math.hypot(R,k);if(!(O>l)){I++;continue}let Y=R/O,E=k/O,L=0;for(let F=l;F<O;F+=g){let te=un(m,P+Y*F,M+E*F);if(!(!Number.isFinite(te)||te>=w)&&te>w+(T.z-w)*F/O){L=F;break}}L?v=Math.min(v,L):I++}let C=I/S.length;C>=c||o.set(p.id,{seatId:p.id,mark:C<u?"obstructedView":"restrictedView",visibleFraction:C,totalRays:S.length,atDistanceM:Number.isFinite(v)?v:0})}return o}function Ve(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 be(e){return e?e.accessibility?.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var Z=Math.PI/180,fn=9,H=16;function ye(e,t,n,o){let r=n*Z,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function ge(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return oe(e.path,t);if(t<=1)return t===1&&s.push({x:i.x,y:i.y}),s;if(o===0){for(let u=0;u<t;u++)s.push(ye(u*n,0,r,i));return s}let l=o/(t-1)*Z,c=n/(2*Math.sin(Math.abs(l)/2));for(let u=0;u<t;u++){let a=u*l,d=c*Math.sin(a),m=-c+c*Math.cos(a);s.push(ye(d,m,r,i))}return s}function dn(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function hn(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 We(e,t){let n=dn(e);return ge(e).map((o,r)=>{let i=n.get(r),s=be(i),l=Te(e,r,i),c={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:l,displayLabel:fe(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:s.length>0,accessibility:s,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(c).some(u=>u!==void 0&&u!==!1&&u!=="")?c:void 0,glyph:i?.glyph,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle}})}function Me(e){let t=[];for(let n of We(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 qe(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 Se(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(a=>[a.index,a])),r=(a,d,m,y)=>{let b=o.get(a),h=be(b),f=b?.label??`${e.label}-${a+1}`,x=e.displayLabel??e.label;return{index:a,label:f,displayLabel:b?.displayLabel??`${x}-${a+1}`,x:d+(b?.dx??0),y:m+(b?.dy??0),categoryKey:b?.categoryKey??e.categoryKey,skipped:!!b?.skip,accessible:h.length>0,accessibility:h,wheelchairSpaceType:b?.wheelchairSpaceType,commercial:b?.commercial,glyph:b?.glyph,viewUrl:b?.viewFromSeatUrl,viewMeta:b?.viewFromSeatUrl?b.viewFromSeatMeta:void 0,labelStyle:b?.labelStyle,...y?{side:y}:{}}};if(e.shape==="round"){let a=(e.radius??40)+H,d=e.rotation*Z,m=Math.max(0,Math.min(360,e.seatArc??360));if(m>=360||n===1){for(let f=0;f<n;f++){let x=d+f/n*2*Math.PI;t.push(r(f,e.center.x+a*Math.cos(x),e.center.y+a*Math.sin(x)))}return t}let y=m*Z,b=(2*Math.PI-y)/2,h=d+b;for(let f=0;f<n;f++){let x=h+f/(n-1)*y;t.push(r(f,e.center.x+a*Math.cos(x),e.center.y+a*Math.sin(x)))}return t}let i=e.width??80,s=e.height??50,l=qe(e),c=["top","bottom","left","right"],u=0;for(let a of c){let d=l[a];for(let m=0;m<d;m++){let y,b;a==="top"?(y=-i/2+(m+.5)*i/d,b=-s/2-H):a==="bottom"?(y=-i/2+(m+.5)*i/d,b=s/2+H):a==="left"?(y=-i/2-H,b=-s/2+(m+.5)*s/d):(y=i/2+H,b=-s/2+(m+.5)*s/d);let h=ye(y,b,e.rotation,e.center);t.push(r(u++,h.x,h.y,a))}}return t}function mn(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):Se(e).filter(t=>!t.skipped).length}function Qe(e){return Se(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 Ze(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"}]}function xe(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,l=t[r].x,c=t[r].y;s>e.y!=c>e.y&&e.x<(l-i)*(e.y-s)/(c-s)+i&&(n=!n)}return n}function bn(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 s=(e.x-n.x)*(r.x-n.x)+(e.y-n.y)*(r.y-n.y),l=(r.x-n.x)**2+(r.y-n.y)**2;return s>=-1e-7&&s<=l+1e-7})}function V(e,t,n){return xe(e,t)&&!(n??[]).some(o=>xe(e,o)||bn(e,o))}function pn(e,t){return ce(e,t).point}function pe(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 Je(e){switch(e.type){case"row":{let t=Me(e);if(!t.length)return{x:e.origin.x,y:e.origin.y};let n=0,o=0;for(let r of t)n+=r.x,o+=r.y;return{x:n/t.length,y:o/t.length}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return pe(e.points);case"section":return pe(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?pe(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 Ge(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function yn(e,t){if(e.type!=="gaArea"||!Ge(e.points,t.outline))return!1;let n=e.holes??[],o=t.holes??[];return n.length===o.length&&n.every((r,i)=>Ge(r,o[i]))}function et(e,t){let n=e.filter(s=>s.type==="section"),o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0,r=Je(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(yn(t,s)||V(r,s.outline,s.holes))):void 0)??n.find(s=>V(r,s.outline,s.holes))}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 xn(e,t){let n=q(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function tt(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function J(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:e.holes.map(r)}:{}};case"section":return{...e,outline:r(e.outline),...e.outlinePath?{outlinePath:Oe(e.outlinePath,t,n)}:{},...e.holes?{holes:e.holes.map(r)}:{}};case"text":return{...e,position:o(e.position)};case"shape":return{...e,...e.points?{points:r(e.points)}:{},...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 gn(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 s of o.objects)n.push(i===0?s:J(s,0,i))}),{...e,objects:n,floors:void 0}}function ze(e,t,n,o,r,i,s,l,c){let u=[],a=ae(e),d=b=>!b?.eventConfigurationId||b.eventConfigurationId===o&&(b.eventConfigurationVersion===void 0||b.eventConfigurationVersion===c),m=b=>Ne(b,{activeConfigurationId:o,activeConfigurationVersion:c,activeBasisSha256:r,now:l}),y=(b,h)=>m(b)?{...b,coverage:h}:void 0;for(let b of e){let h=[];if(b.type==="row"?h=Me(b):b.type==="table"?h=Qe(b):b.type==="booth"&&(h=Ze(b)),!h.length)continue;for(let p of h)p.viewUrl&&!d(p.viewMeta)&&(p.viewUrl=void 0,p.viewMeta=void 0);if(b.type==="row"){let p=a.get(b.id);if(p){let P=new Map((b.overrides??[]).map(M=>[M.index,M]));for(let M of h){let w=Number(M.id.slice(M.id.lastIndexOf(":")+1));if(!Number.isInteger(w))continue;M.logicalRowId=p.groupId,M.logicalSeatIndex=p.adjacencyOffset+w,P.get(w)?.displayLabel||(M.displayLabel=fe(b,w,p)),!M.viewUrl&&p.viewFromSeatUrl&&d(p.viewFromSeatMeta)&&(M.viewUrl=p.viewFromSeatUrl,M.viewMeta=p.viewFromSeatMeta);let I=P.get(w)?.confidenceEvidence;M.confidenceEvidence=y(I,"exact-seat")??y(b.confidenceEvidence,"row-representative")??y(p.confidenceEvidence,"row-representative")}}}let f=et(e,b),x=f?.viewFromSeatUrl,g=(f?.zone?t?.find(p=>p.id===f.zone):void 0)?.focalPoint??n;for(let p of h){if(!p.confidenceEvidence){let P=Number(p.id.slice(p.id.lastIndexOf(":")+1)),M=(b.type==="row"||b.type==="table")&&Number.isInteger(P)?b.overrides?.find(w=>w.index===P)?.confidenceEvidence:void 0;p.confidenceEvidence=y(M,"exact-seat")??(b.type==="row"?y(b.confidenceEvidence,"row-representative"):void 0)}p.confidenceEvidence??=y(f?.confidenceEvidence,"section-representative")??(s?y(s.evidence,s.coverage):void 0),!p.viewUrl&&x&&d(f?.viewFromSeatMeta)&&(p.viewUrl=x,p.viewMeta=f?.viewFromSeatMeta),!p.viewUrl&&i&&d(i.meta)&&(p.viewUrl=i.url,p.viewMeta=i.meta),f&&(p.sectionId=f.logicalSectionId??f.id),f?.zone&&(p.zoneId=f.zone),g&&(p.focalPoint={...g})}u.push(...h)}return u}function Mn(e,t={}){if(e.floors?.length){let o=[];for(let r of e.floors){let i=r.focalPoint??e.focalPoint,s=r.viewFromSeatUrl?{url:r.viewFromSeatUrl,meta:r.viewFromSeatMeta}:e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,l=r.confidenceEvidence?{evidence:r.confidenceEvidence,coverage:"floor-representative"}:e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,c=ze(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,s,l,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&$e(r.objects,r.focalPoint??e.focalPoint,r.baseHeightM??0,c);for(let u of c)u.floorId=r.id;o.push(...c)}return o}let n=ze(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&&$e(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),Sn(e,n,t)}function Sn(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||Ve(t,Ke(t,Ye(e))),t}function $e(e,t,n,o){let r=e.filter(a=>a.type==="section"),i=n>0||r.some(a=>a.height!==void 0||a.rake!==void 0||(a.elevation??0)>0);if(!r.length||!i||!t){for(let a of o)a.eyeHeightM=n+U;return}let s=new Array(o.length),l=new Map,c=new Map;for(let a=0;a<o.length;a++){let d=o[a],y=(d.sectionId?r.find(h=>h.id===d.sectionId)??r.find(h=>h.logicalSectionId===d.sectionId&&V({x:d.x,y:d.y},h.outline,h.holes)):void 0)??r.find(h=>V({x:d.x,y:d.y},h.outline,h.holes))??null;if(s[a]=y,!y)continue;l.has(y.id)||l.set(y.id,_e(y,{floorBaseHeightM:n}));let b=c.get(y.id);b?b.push(a):c.set(y.id,[a])}let u=new Array(o.length).fill(void 0);for(let[a,d]of c){let m=l.get(a);if(!m)continue;let y=m.rake>0?Math.tan(m.rake*Math.PI/180):0,b=je(a,o,d,t);for(let h of b.rows){let f=h.blockDepth*B*y,x=m.height+f;for(let S of h.seatIndices)u[S]=x}}for(let a=0;a<o.length;a++){let d=o[a],m=s[a];if(!m){d.eyeHeightM=n+U;continue}let y=l.get(m.id);d.eyeHeightM=(u[a]??y.height)+U}}var Q=40;function G(e,t){let n=t?.freeText==="exclude",o=1/0,r=1/0,i=-1/0,s=-1/0,l=(c,u)=>{c<o&&(o=c),u<r&&(r=u),c>i&&(i=c),u>s&&(s=u)};for(let c of tt(e))if(c.type==="row"){let u=new Map((c.overrides??[]).map(a=>[a.index,a]));ge(c).forEach((a,d)=>{let m=u.get(d);m?.skip||l(a.x+(m?.dx??0),a.y+(m?.dy??0))})}else if(c.type==="gaArea")for(let u of c.points)l(u.x,u.y);else if(c.type==="section")for(let u of c.outline)l(u.x,u.y);else if(c.type==="decorImage")l(c.x,c.y),l(c.x+c.width,c.y+c.height);else if(c.type==="shape")if(c.points&&c.points.length)for(let u of c.points)l(u.x,u.y);else c.x!=null&&c.y!=null&&c.width!=null&&c.height!=null&&(l(c.x,c.y),l(c.x+c.width,c.y+c.height));else if(c.type==="table"){let u=H+fn,a=c.shape==="round"?(c.radius??40)+u:Math.max((c.width??80)/2,(c.height??50)/2)+u;l(c.center.x-a,c.center.y-a),l(c.center.x+a,c.center.y+a)}else if(c.type==="booth"){let u=Math.max(c.width,c.height)/2;l(c.center.x-u,c.center.y-u),l(c.center.x+u,c.center.y+u)}else if(c.type==="text"){if(n)continue;let u=re(c);l(c.position.x,c.position.y),l(c.position.x+u.width,c.position.y+u.height)}for(let c of[e.referenceImage,e.backgroundImage]){if(!c)continue;let{center:u,width:a}=c,d=a*3/4;l(u.x-a/2,u.y-d/2),l(u.x+a/2,u.y+d/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-Q,y:r-Q,width:i-o+Q*2,height:s-r+Q*2}}var nt=.08,wn=.045;function ot(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function Pn(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function rt(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(s=>G(ot(e,s.objects,s.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(s=>s.width))*nt,i=0;return t.map((s,l)=>{let c=n[l],u=i-(c.y+c.height);return i-=c.height+r,{floorId:s.id,label:s.name??s.id,level:l,levelBadge:l===0?"G":String(l),translation:{x:-Pn(s,e,c),y:u},bounds:c}})}function In(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*wn),s=e.bounds.x+e.translation.x,l=e.bounds.y+e.translation.y+i*.4,c=`floor-level-${e.floorId}`,u={type:"text",id:`${c}-text`,text:r,position:{x:s,y:l},fontSize:i,rotation:0,color:o,bold:!0};if(t==="name")return[u];let a=i*.95;return[{type:"shape",id:`${c}-badge`,kind:"ellipse",x:s-a*.35,y:l-a*.3,width:a*2,height:a*2,fill:"transparent",stroke:{color:o,width:Math.max(1,i*.09)},opacity:.8},u]}function vn(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=rt(e),r=[];n.forEach((u,a)=>{let{x:d,y:m}=o[a].translation;for(let y of u.objects)a>0&&y.type==="shape"&&y.role==="stage"||r.push(J(y,d,m))});let i={...e,objects:r,floors:void 0},s=G(i,{freeText:"exclude"}),l=Math.max(1,s.width,s.height),c=e.theme?.textColor??"#94a3b8";for(let u of o)r.push(...In(u,t.labelStyle??"number",l,c));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function it(e){let t=e.floors;if(!t?.length)return null;let n=t.find(i=>i.objects.some(s=>s.type==="shape"&&s.role==="stage"));if(n)return n.id;let o=t[0],r=-1;for(let i of t){let s=G(ot(e,i.objects,i.focalPoint),{freeText:"exclude"}),l=s.width*s.height;l>r&&(r=l,o=i)}return o.id}var st=640;function Cn(e,t){return(e.floors?.length??0)<2?null:!Number.isFinite(t)||t<=0||t>=st?"all":it(e)}function En(e,t=0){let n=Math.max(1,e.width,e.height),o={x:e.x+e.width/2,y:e.y+e.height/2},r=n*1.55,i=Math.max(n*.82,Math.max(0,t)+n*.45);return{target:o,distance:r,height:i,focalLength:Math.hypot(r,i),yawRad:-8*Math.PI/180}}function ee(e,t,n=0){let o=t.x-e.target.x,r=t.y-e.target.y,i=Math.cos(e.yawRad),s=Math.sin(e.yawRad),l=o*i-r*s,u=o*s+r*i-e.distance,a=n-e.height,d=Math.hypot(e.distance,e.height),m=(-e.distance*u-e.height*a)/d,y=(-e.height*u+e.distance*a)/d,b=Math.max(d*.08,m),h=e.focalLength/b;return{x:e.target.x+l*h,y:e.target.y-y*h,depth:b,scale:h}}function kn(e,t){return{x:e.a*t.x+e.c*t.y+e.e,y:e.b*t.x+e.d*t.y+e.f}}function On(e){let t=e.a*e.d-e.b*e.c;if(!Number.isFinite(t)||Math.abs(t)<1e-9)throw new Error("perspective projection produced a singular affine");let n=e.d/t,o=-e.b/t,r=-e.c/t,i=e.a/t;return{a:n,b:o,c:r,d:i,e:-(n*e.e+r*e.f),f:-(o*e.e+i*e.f)}}function Rn(e,t){return{a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f}}function Tn(e,t,n=()=>0){let o=ee(e,t,n(t)),r={x:t.x+1,y:t.y},i={x:t.x,y:t.y+1},s=ee(e,r,n(r)),l=ee(e,i,n(i)),c=s.x-o.x,u=s.y-o.y,a=l.x-o.x,d=l.y-o.y;return{a:c,b:u,c:a,d,e:o.x-c*t.x-a*t.y,f:o.y-u*t.x-d*t.y}}function An(e){let t=Math.hypot(e.a,e.b),n=e.a*e.d-e.b*e.c;return{rotationDeg:Math.atan2(e.b,e.a)*180/Math.PI,scaleX:t,scaleY:n/Math.max(t,1e-9),skewX:(e.a*e.c+e.b*e.d)/Math.max(n,1e-9)}}var ct=9;function _n(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)),s=Math.abs(Math.sin(r));return{hx:t*i+n*s,hy:t*s+n*i}}function Dn(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,s=o,l=r;if(i){let c=-i*Math.PI/180,u=Math.cos(c),a=Math.sin(c);s=o*u-r*a,l=o*a+r*u}return Math.abs(s)<=e.shape.width/2&&Math.abs(l)<=e.shape.height/2}function Ln(e,t,n,o,r){if(e.shape.kind==="circle"){let b=Math.min(Math.max(e.seat.x,t),o),h=Math.min(Math.max(e.seat.y,n),r),f=e.seat.x-b,x=e.seat.y-h;return f*f+x*x<=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 s=i*Math.PI/180,l=Math.cos(s),c=Math.sin(s),u=e.shape.width/2,a=e.shape.height/2,d=[[-u,-a],[u,-a],[u,a],[-u,a]].map(([b,h])=>[e.seat.x+b*l-h*c,e.seat.y+b*c+h*l]),m=[[t,n],[o,n],[o,r],[t,r]],y=[[1,0],[0,1],[l,c],[-c,l]];for(let[b,h]of y){let f=1/0,x=-1/0;for(let[p,P]of d){let M=p*b+P*h;M<f&&(f=M),M>x&&(x=M)}let S=1/0,g=-1/0;for(let[p,P]of m){let M=p*b+P*h;M<S&&(S=M),M>g&&(g=M)}if(x<S||g<f)return!1}return!0}function Fn(e,t={}){let n=t.seatRadius??ct,o=e.length,r=new Array(o),i=1/0,s=1/0,l=-1/0,c=-1/0,u=0;for(let M=0;M<o;M++){let w=e[M],I=t.shapeOf?.(w)??{kind:"circle",r:n},{hx:v,hy:C}=_n(I);r[M]={seat:w,shape:I,hx:v,hy:C},w.x-v<i&&(i=w.x-v),w.y-C<s&&(s=w.y-C),w.x+v>l&&(l=w.x+v),w.y+C>c&&(c=w.y+C),v>u&&(u=v),C>u&&(u=C)}o===0&&(i=0,s=0,l=0,c=0);let a=u>0?u*4:1,d=Math.max(l-i,0),m=Math.max(c-s,0),y=Math.max(64,t.maxCells??o*4),b=a,h=Math.max(1,Math.ceil(d/b)||1),f=Math.max(1,Math.ceil(m/b)||1);for(;h*f>y&&(h>1||f>1);)b*=2,h=Math.max(1,Math.ceil(d/b)||1),f=Math.max(1,Math.ceil(m/b)||1);let x=h*f,S=new Int32Array(x+1),g=0;for(let M=0;M<o;M++){let w=r[M],I=D(Math.floor((w.seat.x-w.hx-i)/b),0,h-1),v=D(Math.floor((w.seat.x+w.hx-i)/b),0,h-1),C=D(Math.floor((w.seat.y-w.hy-s)/b),0,f-1),T=D(Math.floor((w.seat.y+w.hy-s)/b),0,f-1);for(let R=C;R<=T;R++)for(let k=I;k<=v;k++)S[R*h+k+1]++,g++}for(let M=0;M<x;M++)S[M+1]+=S[M];let p=new Int32Array(g),P=S.slice(0,x);for(let M=0;M<o;M++){let w=r[M],I=D(Math.floor((w.seat.x-w.hx-i)/b),0,h-1),v=D(Math.floor((w.seat.x+w.hx-i)/b),0,h-1),C=D(Math.floor((w.seat.y-w.hy-s)/b),0,f-1),T=D(Math.floor((w.seat.y+w.hy-s)/b),0,f-1);for(let R=C;R<=T;R++)for(let k=I;k<=v;k++){let O=R*h+k;p[P[O]++]=M}}return{seats:e,entries:r,minX:i,minY:s,cell:b,cols:h,rows:f,cellStart:S,items:p,stamp:new Int32Array(o),epoch:0}}function jn(e,t,n={}){let{cols:o,rows:r,cell:i,minX:s,minY:l,cellStart:c,items:u,entries:a}=e,d=Math.floor((t.x-s)/i),m=Math.floor((t.y-l)/i);if(d<0||m<0||d>=o||m>=r)return null;let y=m*o+d,b=c[y+1],h=-1,f=1/0;for(let x=c[y];x<b;x++){let S=u[x],g=a[S];if(n.filter&&!n.filter(g.seat.id,g.seat)||!Dn(g,t.x,t.y))continue;let p=t.x-g.seat.x,P=t.y-g.seat.y,M=p*p+P*P;(M<f||M===f&&S<h)&&(f=M,h=S)}return h<0?null:a[h].seat.id}function Nn(e,t,n,o={}){if(!(n>0))return null;let{cols:r,rows:i,cell:s,minX:l,minY:c,cellStart:u,items:a,entries:d}=e,m=Math.max(0,Math.floor((t.x-n-l)/s)),y=Math.min(r-1,Math.floor((t.x+n-l)/s)),b=Math.max(0,Math.floor((t.y-n-c)/s)),h=Math.min(i-1,Math.floor((t.y+n-c)/s));if(m>y||b>h)return null;let f=-1,x=n*n,S=e.stamp,g=++e.epoch;for(let p=b;p<=h;p++){let P=p*r;for(let M=m;M<=y;M++){let w=P+M,I=u[w+1];for(let v=u[w];v<I;v++){let C=a[v];if(S[C]===g)continue;S[C]=g;let T=d[C];if(o.filter&&!o.filter(T.seat.id,T.seat))continue;let R=t.x-T.seat.x,k=t.y-T.seat.y,O=R*R+k*k;(O<x||O===x&&C<f)&&(x=O,f=C)}}}return f<0?null:d[f].seat.id}function Hn(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),s=Math.max(t.y,t.y+t.height),l=n.mode??"center",{cols:c,rows:u,cell:a,minX:d,minY:m,cellStart:y,items:b,entries:h}=e,f=Math.max(0,Math.floor((o-d)/a)),x=Math.min(c-1,Math.floor((r-d)/a)),S=Math.max(0,Math.floor((i-m)/a)),g=Math.min(u-1,Math.floor((s-m)/a));if(f>x||S>g)return[];let p=[],P=e.stamp,M=++e.epoch;for(let w=S;w<=g;w++){let I=w*c;for(let v=f;v<=x;v++){let C=I+v,T=y[C+1];for(let R=y[C];R<T;R++){let k=b[R];if(P[k]===M)continue;P[k]=M;let O=h[k];if(n.filter&&!n.filter(O.seat.id,O.seat))continue;(l==="center"?O.seat.x>=o&&O.seat.x<=r&&O.seat.y>=i&&O.seat.y<=s:Ln(O,o,i,r,s))&&p.push(k)}}}return p.sort((w,I)=>w-I),p.map(w=>h[w].seat.id)}function Xn(e){let t=e.cols*e.rows,n=0,o=0;for(let i=0;i<t;i++){let s=e.cellStart[i+1]-e.cellStart[i];s>0&&n++,s>o&&(o=s)}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}}0&&(module.exports={AUTOMATIC_ROUND_TABLE_RADIUS_MAX,AUTOMATIC_ROUND_TABLE_RADIUS_MIN,DEFAULT_SEAT_RADIUS,FLOOR_STACK_GAP_RATIO,FLOOR_STACK_MIN_SURFACE_PX,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,allObjects,applyAffine,automaticRoundTableRadius,buildAisleHoles,buildSeatIndex,buildSectionShell,chartBounds,composeAffine,createPerspectiveCamera,cubicPoint,decomposeAffineLinear,distanceToRings,distributeAlongCubic,expandBooth,expandChart,expandRow,expandRowSlots,expandTable,expandTableSlots,floorObjects,floorStackPlacements,floorsOf,gridStats,hitTest,initialFloorMode,invertAffine,layoutFloorStack,mainFloorId,nearestWithin,objectCenter,owningSectionForObject,perspectiveTangentAffine,pointInPolygon,pointInPolygonWithHoles,polygonArea,polygonInscribedAnchor,polygonLabelPoint,polygonNetArea,projectPerspectivePoint,queryRect,resolveSegmentedRowGroups,rowInventoryCount,rowSeatPositions,segmentedRowComponentSeats,segmentedRowComponents,segmentedRowSeatTotal,smoothCubicThroughMiddle,stackFloors,tableInventoryCount,tableSeatCountsBySide,textLayoutMetrics,translateObject});
@@ -1,8 +1,8 @@
1
- import { P as Point, u as CubicPath, v as TextObject } from '../../types-BVRza86Q.cjs';
2
- export { F as FloorLabelStyle } from '../../types-BVRza86Q.cjs';
3
- export { C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_STACK_GAP_RATIO, a as FLOOR_STACK_MIN_SURFACE_PX, b as FloorStackOptions, c as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, d as TableSeatSlot, e as allObjects, f as chartBounds, g as expandBooth, h as expandChart, i as expandRow, j as expandRowSlots, k as expandTable, l as expandTableSlots, m as floorObjects, n as floorStackPlacements, o as floorsOf, p as initialFloorMode, q as layoutFloorStack, r as mainFloorId, s as objectCenter, t as owningSectionForObject, u as pointInPolygon, v as pointInPolygonWithHoles, w as polygonLabelPoint, x as rowInventoryCount, y as rowSeatPositions, z as stackFloors, A as tableInventoryCount, B as tableSeatCountsBySide, D as translateObject } from '../../layout-Gkx3fo5_.cjs';
4
- export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-CvyOS6Bx.cjs';
5
- import { E as ExpandedSeat } from '../../renderer-Cv_gzYvT.cjs';
1
+ import { P as Point, u as CubicPath, v as TextObject } from '../../types-CqaNLbU6.cjs';
2
+ export { F as FloorLabelStyle } from '../../types-CqaNLbU6.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_STACK_GAP_RATIO, b as FLOOR_STACK_MIN_SURFACE_PX, c as FloorStackOptions, d as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, e as TableSeatSlot, f as allObjects, g as automaticRoundTableRadius, h as chartBounds, i as expandBooth, j as expandChart, k as expandRow, l as expandRowSlots, m as expandTable, n as expandTableSlots, o as floorObjects, p as floorStackPlacements, q as floorsOf, r as initialFloorMode, s as layoutFloorStack, t as mainFloorId, u as objectCenter, v as owningSectionForObject, w as pointInPolygon, x as pointInPolygonWithHoles, y as polygonLabelPoint, z as rowInventoryCount, B as rowSeatPositions, D as stackFloors, G as tableInventoryCount, H as tableSeatCountsBySide, I as translateObject } from '../../tableSizing-BdCyNeqX.cjs';
4
+ export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-C7XOEjHk.cjs';
5
+ import { E as ExpandedSeat } from '../../renderer-BRmVrITG.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, u as CubicPath, v as TextObject } from '../../types-BVRza86Q.js';
2
- export { F as FloorLabelStyle } from '../../types-BVRza86Q.js';
3
- export { C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_STACK_GAP_RATIO, a as FLOOR_STACK_MIN_SURFACE_PX, b as FloorStackOptions, c as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, d as TableSeatSlot, e as allObjects, f as chartBounds, g as expandBooth, h as expandChart, i as expandRow, j as expandRowSlots, k as expandTable, l as expandTableSlots, m as floorObjects, n as floorStackPlacements, o as floorsOf, p as initialFloorMode, q as layoutFloorStack, r as mainFloorId, s as objectCenter, t as owningSectionForObject, u as pointInPolygon, v as pointInPolygonWithHoles, w as polygonLabelPoint, x as rowInventoryCount, y as rowSeatPositions, z as stackFloors, A as tableInventoryCount, B as tableSeatCountsBySide, D as translateObject } from '../../layout-DGbWo5fV.js';
4
- export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-CD-YT9bT.js';
5
- import { E as ExpandedSeat } from '../../renderer-BlLKrW-U.js';
1
+ import { P as Point, u as CubicPath, v as TextObject } from '../../types-CqaNLbU6.js';
2
+ export { F as FloorLabelStyle } from '../../types-CqaNLbU6.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_STACK_GAP_RATIO, b as FLOOR_STACK_MIN_SURFACE_PX, c as FloorStackOptions, d as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, e as TableSeatSlot, f as allObjects, g as automaticRoundTableRadius, h as chartBounds, i as expandBooth, j as expandChart, k as expandRow, l as expandRowSlots, m as expandTable, n as expandTableSlots, o as floorObjects, p as floorStackPlacements, q as floorsOf, r as initialFloorMode, s as layoutFloorStack, t as mainFloorId, u as objectCenter, v as owningSectionForObject, w as pointInPolygon, x as pointInPolygonWithHoles, y as polygonLabelPoint, z as rowInventoryCount, B as rowSeatPositions, D as stackFloors, G as tableInventoryCount, H as tableSeatCountsBySide, I as translateObject } from '../../tableSizing-D8e8QAJ-.js';
4
+ export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-DcvJVKLD.js';
5
+ import { E as ExpandedSeat } from '../../renderer-q7viZLGZ.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 T,b as U,c as V,d as W,e as X,f as Y,g as Z,h as _,i as $,j as oo,k as ro,l as eo,m as fo,n as mo,o as po,p as to,q as xo,r as ao,s as bo}from"../../chunk-UVAV3E7K.js";import{A as d,B as g,Ba as w,C as h,Ca as y,D as i,Da as z,E as j,Ea as A,F as k,Fa as B,G as l,Ga as C,H as n,Ha as D,Ia as E,Ja as F,Ka as G,La as H,Ma as I,Na as J,Oa as K,Pa as L,Qa as M,Ra as N,Sa as O,Ta as P,Ua as Q,V as q,Va as R,W as s,Wa as S,X as u,Y as v,m as o,n as r,o as e,p as f,q as m,r as p,s as t,t as x,u as a,v as b,z as c}from"../../chunk-QUOAQQMP.js";import"../../chunk-CRCGO52K.js";export{Z as DEFAULT_SEAT_RADIUS,T as FLOOR_STACK_GAP_RATIO,X as FLOOR_STACK_MIN_SURFACE_PX,w 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,O as allObjects,po as applyAffine,i as buildAisleHoles,_ as buildSeatIndex,h as buildSectionShell,S as chartBounds,xo as composeAffine,fo as createPerspectiveCamera,c as cubicPoint,bo as decomposeAffineLinear,j as distanceToRings,g as distributeAlongCubic,G as expandBooth,R as expandChart,B as expandRow,A as expandRowSlots,F as expandTable,D as expandTableSlots,N as floorObjects,U as floorStackPlacements,M as floorsOf,eo as gridStats,$ as hitTest,Y as initialFloorMode,to as invertAffine,V as layoutFloorStack,W as mainFloorId,oo as nearestWithin,K as objectCenter,L as owningSectionForObject,ao as perspectiveTangentAffine,H as pointInPolygon,I as pointInPolygonWithHoles,k as polygonArea,n as polygonInscribedAnchor,J as polygonLabelPoint,l as polygonNetArea,mo as projectPerspectivePoint,ro as queryRect,v as resolveSegmentedRowGroups,z as rowInventoryCount,y as rowSeatPositions,s as segmentedRowComponentSeats,q as segmentedRowComponents,u as segmentedRowSeatTotal,d as smoothCubicThroughMiddle,Q as stackFloors,E as tableInventoryCount,C as tableSeatCountsBySide,b as textLayoutMetrics,P as translateObject};
1
+ import{a as T,b as U,c as V,d as W,e as X,f as Y,g as oo,h as ro,i as eo,j as fo,k as mo,l as po,m as to,n as xo,o as ao,p as bo,q as co,r as go,s as ho}from"../../chunk-NQZAZFAC.js";import{a as Z,b as _,c as $}from"../../chunk-BT2KJXQC.js";import{A as d,B as g,C as h,Ca as w,D as i,Da as y,E as j,Ea as z,F as k,Fa as A,G as l,Ga as B,H as n,Ha as C,Ia as D,Ja as E,Ka as F,La as G,Ma as H,Na as I,Oa as J,Pa as K,Qa as L,Ra as M,Sa as N,Ta as O,Ua as P,V as q,Va as Q,W as s,Wa as R,X as u,Xa as S,Y as v,m as o,n as r,o as e,p as f,q as m,r as p,s as t,t as x,u as a,v as b,z as c}from"../../chunk-24O23MNB.js";import"../../chunk-CRCGO52K.js";export{_ as AUTOMATIC_ROUND_TABLE_RADIUS_MAX,Z as AUTOMATIC_ROUND_TABLE_RADIUS_MIN,oo as DEFAULT_SEAT_RADIUS,T as FLOOR_STACK_GAP_RATIO,X as FLOOR_STACK_MIN_SURFACE_PX,w 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,O as allObjects,ao as applyAffine,$ as automaticRoundTableRadius,i as buildAisleHoles,ro as buildSeatIndex,h as buildSectionShell,S as chartBounds,co as composeAffine,to as createPerspectiveCamera,c as cubicPoint,ho as decomposeAffineLinear,j as distanceToRings,g as distributeAlongCubic,G as expandBooth,R as expandChart,B as expandRow,A as expandRowSlots,F as expandTable,D as expandTableSlots,N as floorObjects,U as floorStackPlacements,M as floorsOf,po as gridStats,eo as hitTest,Y as initialFloorMode,bo as invertAffine,V as layoutFloorStack,W as mainFloorId,fo as nearestWithin,K as objectCenter,L as owningSectionForObject,go as perspectiveTangentAffine,H as pointInPolygon,I as pointInPolygonWithHoles,k as polygonArea,n as polygonInscribedAnchor,J as polygonLabelPoint,l as polygonNetArea,xo as projectPerspectivePoint,mo as queryRect,v as resolveSegmentedRowGroups,z as rowInventoryCount,y as rowSeatPositions,s as segmentedRowComponentSeats,q as segmentedRowComponents,u as segmentedRowSeatTotal,d as smoothCubicThroughMiddle,Q as stackFloors,E as tableInventoryCount,C as tableSeatCountsBySide,b as textLayoutMetrics,P as translateObject};
@@ -1 +1 @@
1
- "use strict";var K=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var Le=Object.prototype.hasOwnProperty;var xe=(t,r)=>{for(var o in r)K(t,o,{get:r[o],enumerable:!0})},ve=(t,r,o,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of ye(r))!Le.call(t,c)&&c!==o&&K(t,c,{get:()=>r[c],enumerable:!(s=fe(r,c))||s.enumerable});return t};var we=t=>ve(K({},"__esModule",{value:!0}),t);var Ue={};xe(Ue,{ACCESS_GLYPH_PATH:()=>Pe,ACCESS_GLYPH_VIEWBOX:()=>Fe,ACCESS_TYPE_GLYPH_PATHS:()=>U,AUTHORED_LABEL_MIN_CONTRAST:()=>Ve,BOOTH_LABEL_FONT_SIZE:()=>Se,DARK_BOOKABLE_LABEL_INK:()=>S,DARK_NEUTRAL_SECTION_FILL:()=>ce,GA_CAPACITY_LABEL_FONT_SIZE:()=>Te,GA_FILL_OPACITY:()=>Ae,GA_LABEL_FONT_SIZE:()=>Be,LARGE_TEXT_CONTRAST:()=>oe,LIGHT_BOOKABLE_LABEL_INK:()=>B,LIGHT_NEUTRAL_SECTION_FILL:()=>le,MIN_POINTER_TARGET_PX:()=>j,MIN_VISIBLE_BOOKABLE_LABEL_PX:()=>T,RENDERED_QUALITY_REPORT_VERSION:()=>be,ROW_LABEL_FONT_SIZE:()=>ke,SEAT_LABEL_FONT_SIZE:()=>Ie,SMALL_TEXT_CONTRAST:()=>z,accessGlyphInk:()=>He,accessGlyphPath:()=>Ne,bookableMarkerLabel:()=>ze,compositeHexOver:()=>Oe,inspectRenderedQualityEvidence:()=>$e,isBookableLabelLegibleAtScale:()=>_e,isLightFill:()=>ae,minimumTextContrast:()=>Ee,neutralSectionFill:()=>Qe,renderedTextContrast:()=>b,stateAwareBookableLabelInk:()=>se,summarizeLabelInkContrast:()=>Ge});module.exports=we(Ue);var Re=/^#?([\da-f]{3}|[\da-f]{6})$/i;function R(t){let r=Re.exec((t??"").trim());if(!r)return null;let o=r[1].length===3?r[1].split("").map(c=>c+c).join(""):r[1],s=parseInt(o,16);return[s>>16&255,s>>8&255,s&255]}function $(t){let r=t/255;return r<=.04045?r/12.92:((r+.055)/1.055)**2.4}function N(t){return .2126*$(t[0])+.7152*$(t[1])+.0722*$(t[2])}function ne(t,r){let o=R(t),s=R(r);if(!o||!s)return null;let c=N(o),u=N(s);return(Math.max(c,u)+.05)/(Math.min(c,u)+.05)}var Ie=7,ke=10,Se=10,Be=15,Te=11,Ae=.85,T=12,z=4.5,oe=3,S="#000000",B="#ffffff",Me=24,Ce=18.67;function Ee(t,r=400){return t>=Me||r>=700&&t>=Ce?oe:z}function _e(t,r){return t*r>=T}var Fe=24,U={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"},Pe=U.wheelchair;function Ne(t){if(!t?.length)return null;let r=t.includes("wheelchair")?"wheelchair":t[0];return U[r]??null}function ze(t){return/-(\d{1,5})$/.exec(t)?.[1]??t}var b=ne;function Oe(t,r,o){let s=R(t),c=R(r);if(!s||!c)return r;let u=Math.max(0,Math.min(1,o));return`#${s.map((p,M)=>Math.round(p*u+c[M]*(1-u))).map(p=>p.toString(16).padStart(2,"0")).join("")}`}var Ve=3;function se(t,r,o=z){let s=b(r,t);if(s!=null&&s>=o)return r;let c=b(S,t)??0,u=b(B,t)??0;return c===0&&u===0?r:c>=u?S:B}var Ze=3;function He(t){let r=b("#ffffff",t);if(r!=null&&r>=Ze)return"#ffffff";let o=b(S,t)??0,s=b(B,t)??0;return o===0&&s===0?"#ffffff":o>=s?S:B}var ie=/^#[0-9a-f]{6}$/i;function ae(t){let r=R(t);return r!=null&&N(r)>.5}var le="#e5e7eb",ce="#273142";function Qe(t){return ae(t)?le:ce}function Ge(t,r,o=z){let s=ie.test(t.trim()),c=t.trim().toLowerCase(),u=0,m=0,p=null;for(let C of r){if(!s||!ie.test(C.trim()))continue;u+=1;let E=se(C,t,o);E.toLowerCase()!==c&&(m+=1,p=E)}return{total:u,overridden:m,status:u===0?"none":m===0?"applies":m===u?"overridden":"mixed",overrideInk:p}}var be=3,I=4.5,O=3,j=24,Ke=20;function V(t){return t.filter(r=>r.visible&&!!r.screenBox)}function y(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 l(t,r,o){return o.length?{code:t,message:r,count:o.length,samples:o.slice(0,Ke)}:null}function A(t,r,o){return{primaryId:t.seatId,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function Z(t,r,o){return{primaryId:t.id,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function ue(t,r,o){return{primaryId:t.objectId,primaryLabel:t.text,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function L(t,r,o,s){return{primaryId:t,primaryLabel:r,secondaryId:o,secondaryLabel:s}}function $e(t,r="overview",o=null){let s=V(t.labels),c=V(t.hierarchyLabels),u=V(t.freeTextLabels),m=V(t.rowLabels),p=t.gaAreas.filter(e=>e.visible),M=s.map(e=>b(e.ink,e.fill)??0),C=c.map(e=>b(e.ink,e.fill)??0),E=u.map(e=>b(e.ink,e.background)??0),de=p.map(e=>b(e.effectiveBackground,t.canvasBackground)??0),d=o?t.labels.filter(e=>e.categoryKey===o):t.labels,x=o?t.gaAreas.filter(e=>e.categoryKey===o):t.gaAreas,f=d.filter(e=>e.selected),v=d.filter(e=>e.status==="held"),w=d.filter(e=>e.status==="booked"),_=d.filter(e=>e.pointerTarget.active),X=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)]),F=f.length?h(f.map(e=>b(e.selectionRingColor??t.selectionRingColor,e.fill)??0)):null,a=[],k=(e,n)=>Array.from({length:e},(g,P)=>({primaryId:`overview:${P+1}`,primaryLabel:n}));r==="overview"&&t.rung==="sections"&&(a.push(l("overview-section-category-paint","Section overview shells must use the neutral hierarchy palette, not category paint",k(t.overviewStyle.categoryPaintedSectionShells,"category-painted section shell"))),a.push(l("overview-category-detail-visible","Category-tinted section detail must wait until section focus or seat zoom",k(t.overviewStyle.visibleCategoryDetailOutlines,"category detail outline"))),a.push(l("overview-row-hints-visible","Row and seat patterns must not clutter the section overview",k(t.overviewStyle.visibleSectionRowHints,"section row hint"))),a.push(l("overview-availability-clutter","Live availability counts belong in focused detail, not on section overview shells",k(t.overviewStyle.visibleSectionAvailabilityLabels,"section availability label"))),a.push(l("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")))),a.push(l("bookable-label-undersized","Visible bookable labels must meet the rendered small-text size floor",s.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>A(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),a.push(l("bookable-label-viewport-clipped","Visible interaction labels must remain fully inside the buyer viewport",r==="interaction"?s.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=>A(e)):[])),a.push(l("row-label-viewport-clipped","Visible interaction row labels must remain fully inside the buyer viewport",r==="interaction"?m.flatMap((e,n)=>{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-${n}`,primaryLabel:e.text}]:[]}):[]));let D=[];if(r==="interaction")for(let e=0;e<m.length;e+=1)for(let n=0;n<e;n+=1)y(m[e].screenBox,m[n].screenBox)&&D.push(L(`row-label-${n}`,m[n].text,`row-label-${e}`,m[e].text));if(a.push(l("row-label-collision","Visible interaction row labels must not overlap",D)),r==="interaction"){let e=d.length>0,n=x.length>0,g=e||n,P=x.filter(i=>i.visible),me=new Set([...d.flatMap(i=>i.sectionId?[i.sectionId]:[]),...x.flatMap(i=>i.sectionId?[i.sectionId]:[])]),pe=new Set([...t.labels.map(i=>i.categoryKey),...t.gaAreas.map(i=>i.categoryKey)]),H=i=>i.screenCenter.x>=0&&i.screenCenter.x<=t.viewport.width&&i.screenCenter.y>=0&&i.screenCenter.y<=t.viewport.height;a.push(l("detail-rung-missing","Interaction evidence with bookable inventory must render the seat-detail rung",g&&t.rung!=="seats"?[{primaryId:"renderer",primaryLabel:t.rung}]:[])),a.push(l("detail-inventory-not-visible","Interaction evidence must frame at least one real bookable unit",g&&!d.some(H)&&!P.length?[{primaryId:"renderer",primaryLabel:"no target inventory in viewport"}]:[])),a.push(l("pointer-target-inactive","Interaction evidence must expose a live production pointer target",e&&!_.some(H)||!e&&n&&!P.some(i=>i.interactive)?[{primaryId:"renderer",primaryLabel:"no active pointer target in viewport"}]:[])),a.push(l("pointer-target-undersized","Every active production pointer target must reach at least 24 CSS pixels",_.filter(i=>H(i)&&i.pointerTarget.effectiveMinimumPx<j).map(i=>A(i,i.pointerTarget.effectiveMinimumPx,j)))),a.push(l("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!f.length||!f.some(i=>t.selectionRingSeatIds.includes(i.seatId)))?[{primaryId:"renderer",primaryLabel:"selected state"}]:[])),a.push(l("selected-state-contrast-low","The selected-state ring must maintain 3:1 graphical contrast with the seat paint",f.length&&(F??0)<O?[{primaryId:f[0].seatId,primaryLabel:f[0].label,measured:Math.round((F??0)*100)/100,minimum:O}]:[])),a.push(l("held-state-missing","Interaction evidence must paint a held state when the floor has at least two status-managed units",d.length>=2&&!v.length?[{primaryId:"renderer",primaryLabel:"held state"}]:[])),a.push(l("booked-state-missing","Interaction evidence must paint a taken state when the floor has at least three status-managed units",d.length>=3&&!w.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let ge=new Set(v.map(i=>`${i.fill.toLowerCase()}:${i.opacity}`)),he=new Set(w.map(i=>`${i.fill.toLowerCase()}:${i.opacity}`));a.push(l("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",v.length&&w.length&&[...ge].some(i=>he.has(i))?[{primaryId:v[0].seatId,primaryLabel:v[0].label,secondaryId:w[0].seatId,secondaryLabel:w[0].label}]:[])),a.push(l("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",me.size&&(!t.focusedSectionId||!t.focusBackdropVisible)?[{primaryId:"renderer",primaryLabel:"section focus"}]:[])),a.push(l("category-filter-missing","Interaction evidence must exercise a category filter when multiple categories exist",pe.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let Q=t.labels.filter(i=>i.status==="free"&&!i.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(i.categoryKey)),G=t.gaAreas.filter(i=>t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(i.categoryKey));a.push(l("category-filter-ineffective","The active category filter must visibly dim excluded free inventory",(Q.length||G.length)&&!Q.some(i=>i.opacity<=.25)&&!G.some(i=>i.opacity<=.1)?[...Q.map(i=>A(i,i.opacity)),...G.map(i=>({primaryId:i.areaId,primaryLabel:i.label,measured:i.opacity}))]:[])),a.push(l("target-category-not-visible","A category-specific interaction scene must visibly paint its exact target category",o&&!X.has(o)?[{primaryId:o,primaryLabel:o}]:[])),a.push(l("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",o&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==o)?[{primaryId:o,primaryLabel:o}]:[]))}a.push(l("bookable-label-contrast-low","Visible bookable labels must meet 4.5:1 contrast against their actual paint",s.flatMap(e=>{let n=b(e.ink,e.fill)??0;return n<I?[A(e,n,I)]:[]})));let Y=[];for(let e=0;e<s.length;e+=1)for(let n=0;n<e;n+=1)y(s[e].screenBox,s[n].screenBox)&&Y.push(L(s[n].seatId,s[n].label,s[e].seatId,s[e].label));a.push(l("bookable-label-collision","Visible bookable labels must not overlap",Y)),a.push(l("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",c.filter(e=>e.renderedFontPx<T).map(e=>Z(e,e.renderedFontPx,T)))),a.push(l("hierarchy-label-contrast-low","Visible section and zone labels must meet 4.5:1 contrast against their backing paint",c.flatMap(e=>{let n=b(e.ink,e.fill)??0;return n<I?[Z(e,n,I)]:[]}))),a.push(l("hierarchy-label-viewport-clipped","Visible overview hierarchy labels must remain fully inside the buyer viewport",r==="overview"?c.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=>Z(e)):[])),a.push(l("hierarchy-label-outside-section","Visible section labels must remain inside the filled section surface and outside holes",c.filter(e=>e.kind==="section"&&e.fitsContainer===!1).map(e=>Z(e))));let W=[];for(let e=0;e<c.length;e+=1)for(let n=0;n<e;n+=1)y(c[e].screenBox,c[n].screenBox)&&W.push(L(c[n].id,c[n].label,c[e].id,c[e].label));a.push(l("hierarchy-label-collision","Visible hierarchy labels must not overlap each other",W));let J=[];for(let e of c)for(let n of s)y(e.screenBox,n.screenBox)&&J.push(L(e.id,e.label,n.seatId,n.label));a.push(l("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",J)),a.push(l("free-text-undersized","Visible chart text must meet the rendered small-text size floor",u.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>ue(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),a.push(l("free-text-contrast-low","Visible chart text must meet 4.5:1 contrast against its measured background",u.flatMap(e=>{let n=b(e.ink,e.background)??0;return n<I?[ue(e,n,I)]:[]})));let q=[];for(let e=0;e<u.length;e+=1)for(let n=0;n<e;n+=1)y(u[e].screenBox,u[n].screenBox)&&q.push(L(u[n].objectId,u[n].text,u[e].objectId,u[e].text));a.push(l("free-text-collision","Visible chart text labels must not overlap each other",q));let ee=[];for(let e of u)for(let n of s)y(e.screenBox,n.screenBox)&&ee.push(L(e.objectId,e.text,n.seatId,n.label));a.push(l("free-text-bookable-collision","Visible chart text must not overlap bookable labels",ee));let te=[];for(let e of u)for(let n of c)y(e.screenBox,n.screenBox)&&te.push(L(e.objectId,e.text,n.id,n.label));a.push(l("free-text-hierarchy-collision","Visible chart text must not overlap hierarchy labels",te)),a.push(l("ga-contrast-low","Visible GA surfaces must maintain 3:1 graphical contrast with the canvas",p.flatMap(e=>{let n=b(e.effectiveBackground,t.canvasBackground)??0;return n<O?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(n*100)/100,minimum:O}]:[]})));let re=a.filter(e=>!!e);return{version:be,passed:re.length===0,state:r,targetCategoryKey:o,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:s.length,hiddenBookableLabels:t.hiddenLabels,visibleHierarchyLabels:c.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,n)=>e.kind.localeCompare(n.kind)||e.id.localeCompare(n.id)),labelledObjects:t.freeTextLabels.map(e=>({objectId:e.objectId,kind:e.kind,text:e.text,visible:e.visible})).sort((e,n)=>e.objectId.localeCompare(n.objectId)||e.kind.localeCompare(n.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,n)=>e.areaId.localeCompare(n.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:[...X].sort()},metrics:{minimumRenderedBookableLabelPx:h(s.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:h(M),minimumRenderedHierarchyLabelPx:h(c.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:h(C),minimumRenderedFreeTextPx:h(u.map(e=>e.renderedFontPx)),minimumFreeTextContrast:h(E),minimumGAContrast:h(de),minimumEffectivePointerTargetPx:h(_.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:F==null?null:Math.round(F*100)/100},interaction:{applicable:{detail:d.length>0||x.length>0,pointer:d.length>0||x.length>0,held:d.length>=2,booked:d.length>=3,sectionFocus:d.some(e=>!!e.sectionId)||x.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:f.length,heldUnits:v.length,bookedUnits:w.length,activePointerTargets:_.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:re}}0&&(module.exports={ACCESS_GLYPH_PATH,ACCESS_GLYPH_VIEWBOX,ACCESS_TYPE_GLYPH_PATHS,AUTHORED_LABEL_MIN_CONTRAST,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,SMALL_TEXT_CONTRAST,accessGlyphInk,accessGlyphPath,bookableMarkerLabel,compositeHexOver,inspectRenderedQualityEvidence,isBookableLabelLegibleAtScale,isLightFill,minimumTextContrast,neutralSectionFill,renderedTextContrast,stateAwareBookableLabelInk,summarizeLabelInkContrast});
1
+ "use strict";var K=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var Le=Object.prototype.hasOwnProperty;var xe=(t,r)=>{for(var o in r)K(t,o,{get:r[o],enumerable:!0})},ve=(t,r,o,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of ye(r))!Le.call(t,c)&&c!==o&&K(t,c,{get:()=>r[c],enumerable:!(s=fe(r,c))||s.enumerable});return t};var we=t=>ve(K({},"__esModule",{value:!0}),t);var je={};xe(je,{ACCESS_GLYPH_PATH:()=>Pe,ACCESS_GLYPH_VIEWBOX:()=>Fe,ACCESS_TYPE_GLYPH_PATHS:()=>U,AUTHORED_LABEL_MIN_CONTRAST:()=>Ve,BOOTH_LABEL_FONT_SIZE:()=>Se,DARK_BOOKABLE_LABEL_INK:()=>S,DARK_NEUTRAL_SECTION_FILL:()=>ce,GA_CAPACITY_LABEL_FONT_SIZE:()=>Be,GA_FILL_OPACITY:()=>Te,GA_LABEL_FONT_SIZE:()=>Ae,LARGE_TEXT_CONTRAST:()=>se,LIGHT_BOOKABLE_LABEL_INK:()=>A,LIGHT_NEUTRAL_SECTION_FILL:()=>le,MIN_POINTER_TARGET_PX:()=>X,MIN_VISIBLE_BOOKABLE_LABEL_PX:()=>B,RENDERED_QUALITY_REPORT_VERSION:()=>be,ROW_LABEL_FONT_SIZE:()=>ke,SEAT_LABEL_FONT_SIZE:()=>Ie,SMALL_TEXT_CONTRAST:()=>T,accessGlyphInk:()=>Qe,accessGlyphPath:()=>Ne,bookableMarkerLabel:()=>ze,compositeHexOver:()=>Oe,explicitOrStateAwareLabelInk:()=>Ze,inspectRenderedQualityEvidence:()=>Ue,isBookableLabelLegibleAtScale:()=>_e,isLightFill:()=>ae,minimumTextContrast:()=>Ee,neutralSectionFill:()=>Ge,renderedTextContrast:()=>b,stateAwareBookableLabelInk:()=>j,summarizeLabelInkContrast:()=>Ke});module.exports=we(je);var Re=/^#?([\da-f]{3}|[\da-f]{6})$/i;function R(t){let r=Re.exec((t??"").trim());if(!r)return null;let o=r[1].length===3?r[1].split("").map(c=>c+c).join(""):r[1],s=parseInt(o,16);return[s>>16&255,s>>8&255,s&255]}function $(t){let r=t/255;return r<=.04045?r/12.92:((r+.055)/1.055)**2.4}function z(t){return .2126*$(t[0])+.7152*$(t[1])+.0722*$(t[2])}function ie(t,r){let o=R(t),s=R(r);if(!o||!s)return null;let c=z(o),u=z(s);return(Math.max(c,u)+.05)/(Math.min(c,u)+.05)}var Ie=7,ke=10,Se=10,Ae=15,Be=11,Te=.85,B=12,T=4.5,se=3,S="#000000",A="#ffffff",Me=24,Ce=18.67;function Ee(t,r=400){return t>=Me||r>=700&&t>=Ce?se:T}function _e(t,r){return t*r>=B}var Fe=24,U={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"},Pe=U.wheelchair;function Ne(t){if(!t?.length)return null;let r=t.includes("wheelchair")?"wheelchair":t[0];return U[r]??null}function ze(t){return/-(\d{1,5})$/.exec(t)?.[1]??t}var b=ie;function Oe(t,r,o){let s=R(t),c=R(r);if(!s||!c)return r;let u=Math.max(0,Math.min(1,o));return`#${s.map((p,C)=>Math.round(p*u+c[C]*(1-u))).map(p=>p.toString(16).padStart(2,"0")).join("")}`}var Ve=3;function j(t,r,o=T){let s=b(r,t);if(s!=null&&s>=o)return r;let c=b(S,t)??0,u=b(A,t)??0;return c===0&&u===0?r:c>=u?S:A}function Ze(t,r,o,s=T){return r??j(t,o,s)}var He=3;function Qe(t){let r=b("#ffffff",t);if(r!=null&&r>=He)return"#ffffff";let o=b(S,t)??0,s=b(A,t)??0;return o===0&&s===0?"#ffffff":o>=s?S:A}var oe=/^#[0-9a-f]{6}$/i;function ae(t){let r=R(t);return r!=null&&z(r)>.5}var le="#e5e7eb",ce="#273142";function Ge(t){return ae(t)?le:ce}function Ke(t,r,o=T){let s=oe.test(t.trim()),c=t.trim().toLowerCase(),u=0,m=0,p=null;for(let E of r){if(!s||!oe.test(E.trim()))continue;u+=1;let _=j(E,t,o);_.toLowerCase()!==c&&(m+=1,p=_)}return{total:u,overridden:m,status:u===0?"none":m===0?"applies":m===u?"overridden":"mixed",overrideInk:p}}var be=3,I=4.5,O=3,X=24,$e=20;function V(t){return t.filter(r=>r.visible&&!!r.screenBox)}function y(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 l(t,r,o){return o.length?{code:t,message:r,count:o.length,samples:o.slice(0,$e)}:null}function M(t,r,o){return{primaryId:t.seatId,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function Z(t,r,o){return{primaryId:t.id,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function ue(t,r,o){return{primaryId:t.objectId,primaryLabel:t.text,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function L(t,r,o,s){return{primaryId:t,primaryLabel:r,secondaryId:o,secondaryLabel:s}}function Ue(t,r="overview",o=null){let s=V(t.labels),c=V(t.hierarchyLabels),u=V(t.freeTextLabels),m=V(t.rowLabels),p=t.gaAreas.filter(e=>e.visible),C=s.map(e=>b(e.ink,e.fill)??0),E=c.map(e=>b(e.ink,e.fill)??0),_=u.map(e=>b(e.ink,e.background)??0),de=p.map(e=>b(e.effectiveBackground,t.canvasBackground)??0),d=o?t.labels.filter(e=>e.categoryKey===o):t.labels,x=o?t.gaAreas.filter(e=>e.categoryKey===o):t.gaAreas,f=d.filter(e=>e.selected),v=d.filter(e=>e.status==="held"),w=d.filter(e=>e.status==="booked"),F=d.filter(e=>e.pointerTarget.active),D=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)]),P=f.length?h(f.map(e=>b(e.selectionRingColor??t.selectionRingColor,e.fill)??0)):null,a=[],k=(e,n)=>Array.from({length:e},(g,N)=>({primaryId:`overview:${N+1}`,primaryLabel:n}));r==="overview"&&t.rung==="sections"&&(a.push(l("overview-section-category-paint","Section overview shells must use the neutral hierarchy palette, not category paint",k(t.overviewStyle.categoryPaintedSectionShells,"category-painted section shell"))),a.push(l("overview-category-detail-visible","Category-tinted section detail must wait until section focus or seat zoom",k(t.overviewStyle.visibleCategoryDetailOutlines,"category detail outline"))),a.push(l("overview-row-hints-visible","Row and seat patterns must not clutter the section overview",k(t.overviewStyle.visibleSectionRowHints,"section row hint"))),a.push(l("overview-availability-clutter","Live availability counts belong in focused detail, not on section overview shells",k(t.overviewStyle.visibleSectionAvailabilityLabels,"section availability label"))),a.push(l("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")))),a.push(l("bookable-label-undersized","Visible bookable labels must meet the rendered small-text size floor",s.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>M(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),a.push(l("bookable-label-viewport-clipped","Visible interaction labels must remain fully inside the buyer viewport",r==="interaction"?s.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=>M(e)):[])),a.push(l("row-label-viewport-clipped","Visible interaction row labels must remain fully inside the buyer viewport",r==="interaction"?m.flatMap((e,n)=>{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-${n}`,primaryLabel:e.text}]:[]}):[]));let Y=[];if(r==="interaction")for(let e=0;e<m.length;e+=1)for(let n=0;n<e;n+=1)y(m[e].screenBox,m[n].screenBox)&&Y.push(L(`row-label-${n}`,m[n].text,`row-label-${e}`,m[e].text));if(a.push(l("row-label-collision","Visible interaction row labels must not overlap",Y)),r==="interaction"){let e=d.length>0,n=x.length>0,g=e||n,N=x.filter(i=>i.visible),me=new Set([...d.flatMap(i=>i.sectionId?[i.sectionId]:[]),...x.flatMap(i=>i.sectionId?[i.sectionId]:[])]),pe=new Set([...t.labels.map(i=>i.categoryKey),...t.gaAreas.map(i=>i.categoryKey)]),H=i=>i.screenCenter.x>=0&&i.screenCenter.x<=t.viewport.width&&i.screenCenter.y>=0&&i.screenCenter.y<=t.viewport.height;a.push(l("detail-rung-missing","Interaction evidence with bookable inventory must render the seat-detail rung",g&&t.rung!=="seats"?[{primaryId:"renderer",primaryLabel:t.rung}]:[])),a.push(l("detail-inventory-not-visible","Interaction evidence must frame at least one real bookable unit",g&&!d.some(H)&&!N.length?[{primaryId:"renderer",primaryLabel:"no target inventory in viewport"}]:[])),a.push(l("pointer-target-inactive","Interaction evidence must expose a live production pointer target",e&&!F.some(H)||!e&&n&&!N.some(i=>i.interactive)?[{primaryId:"renderer",primaryLabel:"no active pointer target in viewport"}]:[])),a.push(l("pointer-target-undersized","Every active production pointer target must reach at least 24 CSS pixels",F.filter(i=>H(i)&&i.pointerTarget.effectiveMinimumPx<X).map(i=>M(i,i.pointerTarget.effectiveMinimumPx,X)))),a.push(l("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!f.length||!f.some(i=>t.selectionRingSeatIds.includes(i.seatId)))?[{primaryId:"renderer",primaryLabel:"selected state"}]:[])),a.push(l("selected-state-contrast-low","The selected-state ring must maintain 3:1 graphical contrast with the seat paint",f.length&&(P??0)<O?[{primaryId:f[0].seatId,primaryLabel:f[0].label,measured:Math.round((P??0)*100)/100,minimum:O}]:[])),a.push(l("held-state-missing","Interaction evidence must paint a held state when the floor has at least two status-managed units",d.length>=2&&!v.length?[{primaryId:"renderer",primaryLabel:"held state"}]:[])),a.push(l("booked-state-missing","Interaction evidence must paint a taken state when the floor has at least three status-managed units",d.length>=3&&!w.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let ge=new Set(v.map(i=>`${i.fill.toLowerCase()}:${i.opacity}`)),he=new Set(w.map(i=>`${i.fill.toLowerCase()}:${i.opacity}`));a.push(l("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",v.length&&w.length&&[...ge].some(i=>he.has(i))?[{primaryId:v[0].seatId,primaryLabel:v[0].label,secondaryId:w[0].seatId,secondaryLabel:w[0].label}]:[])),a.push(l("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",me.size&&(!t.focusedSectionId||!t.focusBackdropVisible)?[{primaryId:"renderer",primaryLabel:"section focus"}]:[])),a.push(l("category-filter-missing","Interaction evidence must exercise a category filter when multiple categories exist",pe.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let Q=t.labels.filter(i=>i.status==="free"&&!i.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(i.categoryKey)),G=t.gaAreas.filter(i=>t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(i.categoryKey));a.push(l("category-filter-ineffective","The active category filter must visibly dim excluded free inventory",(Q.length||G.length)&&!Q.some(i=>i.opacity<=.25)&&!G.some(i=>i.opacity<=.1)?[...Q.map(i=>M(i,i.opacity)),...G.map(i=>({primaryId:i.areaId,primaryLabel:i.label,measured:i.opacity}))]:[])),a.push(l("target-category-not-visible","A category-specific interaction scene must visibly paint its exact target category",o&&!D.has(o)?[{primaryId:o,primaryLabel:o}]:[])),a.push(l("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",o&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==o)?[{primaryId:o,primaryLabel:o}]:[]))}a.push(l("bookable-label-contrast-low","Visible bookable labels must meet 4.5:1 contrast against their actual paint",s.flatMap(e=>{let n=b(e.ink,e.fill)??0;return n<I?[M(e,n,I)]:[]})));let W=[];for(let e=0;e<s.length;e+=1)for(let n=0;n<e;n+=1)y(s[e].screenBox,s[n].screenBox)&&W.push(L(s[n].seatId,s[n].label,s[e].seatId,s[e].label));a.push(l("bookable-label-collision","Visible bookable labels must not overlap",W)),a.push(l("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",c.filter(e=>e.renderedFontPx<B).map(e=>Z(e,e.renderedFontPx,B)))),a.push(l("hierarchy-label-contrast-low","Visible section and zone labels must meet 4.5:1 contrast against their backing paint",c.flatMap(e=>{let n=b(e.ink,e.fill)??0;return n<I?[Z(e,n,I)]:[]}))),a.push(l("hierarchy-label-viewport-clipped","Visible overview hierarchy labels must remain fully inside the buyer viewport",r==="overview"?c.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=>Z(e)):[])),a.push(l("hierarchy-label-outside-section","Visible section labels must remain inside the filled section surface and outside holes",c.filter(e=>e.kind==="section"&&e.fitsContainer===!1).map(e=>Z(e))));let J=[];for(let e=0;e<c.length;e+=1)for(let n=0;n<e;n+=1)y(c[e].screenBox,c[n].screenBox)&&J.push(L(c[n].id,c[n].label,c[e].id,c[e].label));a.push(l("hierarchy-label-collision","Visible hierarchy labels must not overlap each other",J));let q=[];for(let e of c)for(let n of s)y(e.screenBox,n.screenBox)&&q.push(L(e.id,e.label,n.seatId,n.label));a.push(l("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",q)),a.push(l("free-text-undersized","Visible chart text must meet the rendered small-text size floor",u.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>ue(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),a.push(l("free-text-contrast-low","Visible chart text must meet 4.5:1 contrast against its measured background",u.flatMap(e=>{let n=b(e.ink,e.background)??0;return n<I?[ue(e,n,I)]:[]})));let ee=[];for(let e=0;e<u.length;e+=1)for(let n=0;n<e;n+=1)y(u[e].screenBox,u[n].screenBox)&&ee.push(L(u[n].objectId,u[n].text,u[e].objectId,u[e].text));a.push(l("free-text-collision","Visible chart text labels must not overlap each other",ee));let te=[];for(let e of u)for(let n of s)y(e.screenBox,n.screenBox)&&te.push(L(e.objectId,e.text,n.seatId,n.label));a.push(l("free-text-bookable-collision","Visible chart text must not overlap bookable labels",te));let re=[];for(let e of u)for(let n of c)y(e.screenBox,n.screenBox)&&re.push(L(e.objectId,e.text,n.id,n.label));a.push(l("free-text-hierarchy-collision","Visible chart text must not overlap hierarchy labels",re)),a.push(l("ga-contrast-low","Visible GA surfaces must maintain 3:1 graphical contrast with the canvas",p.flatMap(e=>{let n=b(e.effectiveBackground,t.canvasBackground)??0;return n<O?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(n*100)/100,minimum:O}]:[]})));let ne=a.filter(e=>!!e);return{version:be,passed:ne.length===0,state:r,targetCategoryKey:o,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:s.length,hiddenBookableLabels:t.hiddenLabels,visibleHierarchyLabels:c.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,n)=>e.kind.localeCompare(n.kind)||e.id.localeCompare(n.id)),labelledObjects:t.freeTextLabels.map(e=>({objectId:e.objectId,kind:e.kind,text:e.text,visible:e.visible})).sort((e,n)=>e.objectId.localeCompare(n.objectId)||e.kind.localeCompare(n.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,n)=>e.areaId.localeCompare(n.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:[...D].sort()},metrics:{minimumRenderedBookableLabelPx:h(s.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:h(C),minimumRenderedHierarchyLabelPx:h(c.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:h(E),minimumRenderedFreeTextPx:h(u.map(e=>e.renderedFontPx)),minimumFreeTextContrast:h(_),minimumGAContrast:h(de),minimumEffectivePointerTargetPx:h(F.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:P==null?null:Math.round(P*100)/100},interaction:{applicable:{detail:d.length>0||x.length>0,pointer:d.length>0||x.length>0,held:d.length>=2,booked:d.length>=3,sectionFocus:d.some(e=>!!e.sectionId)||x.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:f.length,heldUnits:v.length,bookedUnits:w.length,activePointerTargets:F.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:ne}}0&&(module.exports={ACCESS_GLYPH_PATH,ACCESS_GLYPH_VIEWBOX,ACCESS_TYPE_GLYPH_PATHS,AUTHORED_LABEL_MIN_CONTRAST,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,SMALL_TEXT_CONTRAST,accessGlyphInk,accessGlyphPath,bookableMarkerLabel,compositeHexOver,explicitOrStateAwareLabelInk,inspectRenderedQualityEvidence,isBookableLabelLegibleAtScale,isLightFill,minimumTextContrast,neutralSectionFill,renderedTextContrast,stateAwareBookableLabelInk,summarizeLabelInkContrast});
@@ -1,7 +1,7 @@
1
- import { A as AccessibilityType } from '../../types-BVRza86Q.cjs';
1
+ import { A as AccessibilityType } from '../../types-CqaNLbU6.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-CEPse8ir.cjs';
4
- import '../../renderer-Cv_gzYvT.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-1E9KuJvY.cjs';
4
+ import '../../renderer-BRmVrITG.cjs';
5
5
 
6
6
  /**
7
7
  * Rendering constants that quality inspection must agree with.
@@ -96,15 +96,20 @@ declare function compositeHexOver(foreground: string, background: string, opacit
96
96
  * passes, then deterministically choose the strongest normal-text candidate.
97
97
  */
98
98
  /**
99
- * Acceptance bar for AUTHORED seat-number / row-label colors (the theme
100
- * swatches). These are short bold marks whose information is duplicated in
101
- * tooltips/chips, so the WCAG non-text 3:1 bar applies under the 4.5:1
102
- * small-text bar a normal mid-tone category palette rejects EVERY authored
103
- * color (each seat silently falls back to black/white and the control feels
104
- * broken; owner-found 07-23). Auto-swap still guards anything below 3:1.
99
+ * Advisory floor for explicit label swatches and the repair threshold for
100
+ * Automatic row/seat ink. Explicit colours remain exact and the inspector
101
+ * warns when they miss this floor; inherited theme ink stays contrast-safe.
105
102
  */
106
103
  declare const AUTHORED_LABEL_MIN_CONTRAST = 3;
107
104
  declare function stateAwareBookableLabelInk(fill: string, preferred: string, minContrast?: number): string;
105
+ /**
106
+ * Resolve a label colour controlled by an explicit per-object picker.
107
+ *
108
+ * A chosen swatch is an authoring instruction and must render exactly; only
109
+ * Automatic/inherited ink is contrast-repaired. This is the shared contract for
110
+ * row letters, seat numbers, and section names in Designer and buyer rendering.
111
+ */
112
+ declare function explicitOrStateAwareLabelInk(fill: string, explicit: string | null | undefined, automatic: string, minContrast?: number): string;
108
113
  declare function accessGlyphInk(fill: string): string;
109
114
  /** Is a solid hex fill light enough to read as a light surface? Feedback helpers
110
115
  * use this to pick the neutral section shell a label sits on. */
@@ -129,11 +134,10 @@ interface LabelInkContrastSummary {
129
134
  overrideInk: string | null;
130
135
  }
131
136
  /**
132
- * Feedback-only companion to {@link stateAwareBookableLabelInk}: does a preferred
133
- * label ink survive across a set of backgrounds, or does the shared auto-contrast
134
- * rule silently swap it for black/white on some of them? Reuses the exact same
135
- * per-fill decision so a report can never disagree with what the renderer paints.
137
+ * Contrast feedback for a candidate label ink across several backgrounds.
138
+ * Automatic controls use the fallback result directly; explicit controls use
139
+ * the same measurement as advisory feedback while keeping the chosen ink exact.
136
140
  */
137
141
  declare function summarizeLabelInkContrast(preferred: string, backgrounds: Iterable<string>, minContrast?: number): LabelInkContrastSummary;
138
142
 
139
- export { ACCESS_GLYPH_PATH, ACCESS_GLYPH_VIEWBOX, ACCESS_TYPE_GLYPH_PATHS, AUTHORED_LABEL_MIN_CONTRAST, 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, type LabelInkContrastSummary, MIN_VISIBLE_BOOKABLE_LABEL_PX, ROW_LABEL_FONT_SIZE, SEAT_LABEL_FONT_SIZE, SMALL_TEXT_CONTRAST, accessGlyphInk, accessGlyphPath, bookableMarkerLabel, compositeHexOver, isBookableLabelLegibleAtScale, isLightFill, minimumTextContrast, neutralSectionFill, renderedTextContrast, stateAwareBookableLabelInk, summarizeLabelInkContrast };
143
+ export { ACCESS_GLYPH_PATH, ACCESS_GLYPH_VIEWBOX, ACCESS_TYPE_GLYPH_PATHS, AUTHORED_LABEL_MIN_CONTRAST, 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, type LabelInkContrastSummary, MIN_VISIBLE_BOOKABLE_LABEL_PX, ROW_LABEL_FONT_SIZE, SEAT_LABEL_FONT_SIZE, SMALL_TEXT_CONTRAST, accessGlyphInk, accessGlyphPath, bookableMarkerLabel, compositeHexOver, explicitOrStateAwareLabelInk, isBookableLabelLegibleAtScale, isLightFill, minimumTextContrast, neutralSectionFill, renderedTextContrast, stateAwareBookableLabelInk, summarizeLabelInkContrast };
@@ -1,7 +1,7 @@
1
- import { A as AccessibilityType } from '../../types-BVRza86Q.js';
1
+ import { A as AccessibilityType } from '../../types-CqaNLbU6.js';
2
2
  import { contrastRatioOrNull } from '../color.js';
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-BYhJ3Cer.js';
4
- import '../../renderer-BlLKrW-U.js';
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-ChAZNV2N.js';
4
+ import '../../renderer-q7viZLGZ.js';
5
5
 
6
6
  /**
7
7
  * Rendering constants that quality inspection must agree with.
@@ -96,15 +96,20 @@ declare function compositeHexOver(foreground: string, background: string, opacit
96
96
  * passes, then deterministically choose the strongest normal-text candidate.
97
97
  */
98
98
  /**
99
- * Acceptance bar for AUTHORED seat-number / row-label colors (the theme
100
- * swatches). These are short bold marks whose information is duplicated in
101
- * tooltips/chips, so the WCAG non-text 3:1 bar applies under the 4.5:1
102
- * small-text bar a normal mid-tone category palette rejects EVERY authored
103
- * color (each seat silently falls back to black/white and the control feels
104
- * broken; owner-found 07-23). Auto-swap still guards anything below 3:1.
99
+ * Advisory floor for explicit label swatches and the repair threshold for
100
+ * Automatic row/seat ink. Explicit colours remain exact and the inspector
101
+ * warns when they miss this floor; inherited theme ink stays contrast-safe.
105
102
  */
106
103
  declare const AUTHORED_LABEL_MIN_CONTRAST = 3;
107
104
  declare function stateAwareBookableLabelInk(fill: string, preferred: string, minContrast?: number): string;
105
+ /**
106
+ * Resolve a label colour controlled by an explicit per-object picker.
107
+ *
108
+ * A chosen swatch is an authoring instruction and must render exactly; only
109
+ * Automatic/inherited ink is contrast-repaired. This is the shared contract for
110
+ * row letters, seat numbers, and section names in Designer and buyer rendering.
111
+ */
112
+ declare function explicitOrStateAwareLabelInk(fill: string, explicit: string | null | undefined, automatic: string, minContrast?: number): string;
108
113
  declare function accessGlyphInk(fill: string): string;
109
114
  /** Is a solid hex fill light enough to read as a light surface? Feedback helpers
110
115
  * use this to pick the neutral section shell a label sits on. */
@@ -129,11 +134,10 @@ interface LabelInkContrastSummary {
129
134
  overrideInk: string | null;
130
135
  }
131
136
  /**
132
- * Feedback-only companion to {@link stateAwareBookableLabelInk}: does a preferred
133
- * label ink survive across a set of backgrounds, or does the shared auto-contrast
134
- * rule silently swap it for black/white on some of them? Reuses the exact same
135
- * per-fill decision so a report can never disagree with what the renderer paints.
137
+ * Contrast feedback for a candidate label ink across several backgrounds.
138
+ * Automatic controls use the fallback result directly; explicit controls use
139
+ * the same measurement as advisory feedback while keeping the chosen ink exact.
136
140
  */
137
141
  declare function summarizeLabelInkContrast(preferred: string, backgrounds: Iterable<string>, minContrast?: number): LabelInkContrastSummary;
138
142
 
139
- export { ACCESS_GLYPH_PATH, ACCESS_GLYPH_VIEWBOX, ACCESS_TYPE_GLYPH_PATHS, AUTHORED_LABEL_MIN_CONTRAST, 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, type LabelInkContrastSummary, MIN_VISIBLE_BOOKABLE_LABEL_PX, ROW_LABEL_FONT_SIZE, SEAT_LABEL_FONT_SIZE, SMALL_TEXT_CONTRAST, accessGlyphInk, accessGlyphPath, bookableMarkerLabel, compositeHexOver, isBookableLabelLegibleAtScale, isLightFill, minimumTextContrast, neutralSectionFill, renderedTextContrast, stateAwareBookableLabelInk, summarizeLabelInkContrast };
143
+ export { ACCESS_GLYPH_PATH, ACCESS_GLYPH_VIEWBOX, ACCESS_TYPE_GLYPH_PATHS, AUTHORED_LABEL_MIN_CONTRAST, 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, type LabelInkContrastSummary, MIN_VISIBLE_BOOKABLE_LABEL_PX, ROW_LABEL_FONT_SIZE, SEAT_LABEL_FONT_SIZE, SMALL_TEXT_CONTRAST, accessGlyphInk, accessGlyphPath, bookableMarkerLabel, compositeHexOver, explicitOrStateAwareLabelInk, isBookableLabelLegibleAtScale, isLightFill, minimumTextContrast, neutralSectionFill, renderedTextContrast, stateAwareBookableLabelInk, summarizeLabelInkContrast };