@seatlayer/js 0.110.1 → 0.112.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/{channelsMode-DS6TLE4L.js → channelsMode-3WSP6CYO.js} +1 -1
- package/dist/{channelsMode-CVhVwfEC.d.cts → channelsMode-rHChoJwY.d.cts} +46 -1
- package/dist/{channelsMode-CVhVwfEC.d.ts → channelsMode-rHChoJwY.d.ts} +46 -1
- package/dist/{chunk-ECM3ZZET.js → chunk-NTJ5PJXD.js} +6 -4
- package/dist/index.cjs +21 -21
- package/dist/index.d.cts +144 -10
- package/dist/index.d.ts +144 -10
- package/dist/index.js +19 -19
- package/dist/manager.cjs +180 -178
- package/dist/manager.d.cts +2 -2
- package/dist/manager.d.ts +2 -2
- package/dist/manager.js +41 -41
- package/dist/{managerExtras-XQSDPEQ7.js → managerExtras-MWCMUAZU.js} +1 -1
- package/dist/pickerSalesClose-Y7RUQ2MY.js +11 -0
- package/package.json +2 -2
- package/dist/pickerSalesClose-2APTQFVA.js +0 -11
package/README.md
CHANGED
|
@@ -352,6 +352,14 @@ section without filtering, dimming or touching the selection (`zoomToFit()`
|
|
|
352
352
|
returns to the whole venue). A table sold as one unit paints all its chairs
|
|
353
353
|
with the table's status.
|
|
354
354
|
|
|
355
|
+
`markedObjects: ['B-12']` rings seats in ink, for example a guest's current
|
|
356
|
+
seat while the box office moves them; `setMarkedObjects(labels)` moves or
|
|
357
|
+
clears the rings in place. It is paint only: a marked seat keeps its status, its
|
|
358
|
+
paint and whether it can be chosen. The ink is the plain opposite of the map's
|
|
359
|
+
background, so it reads on light and dark maps. The painter ships in the
|
|
360
|
+
cockpit's lazy extras, which load a moment after the map, so it adds nothing to
|
|
361
|
+
the first download.
|
|
362
|
+
|
|
355
363
|
Switching tools and rotating tokens happen in place: the renderer, camera,
|
|
356
364
|
selection, WebSocket, and DOM are not remounted. Give the container a height;
|
|
357
365
|
the cockpit responds to its container rather than the browser viewport.
|
|
@@ -540,6 +548,17 @@ Lifecycle/hold methods: `render()`, `hold()`, `bestAvailable(qty, categoryKey?)`
|
|
|
540
548
|
`resumeHold(holdId)`, `getCurrentHold()`, `releaseLabels(labels)`, `release()`,
|
|
541
549
|
`destroy()`.
|
|
542
550
|
|
|
551
|
+
`SeatPicker.markBooked(holdId?)` is for a page that books the held seats itself
|
|
552
|
+
(its own checkout, or its server's book call) and keeps the picker open. It
|
|
553
|
+
resolves `true` when it settled the hold: the picker shows its booked state and
|
|
554
|
+
calls `onBooked(handoff)` once, stops the hold clock, forgets the hold so a
|
|
555
|
+
reload does not restore it, stops offering checkout, and unticks the seats of
|
|
556
|
+
that hold on the map. It resolves `false` and changes nothing when `holdId`
|
|
557
|
+
names another hold, when nothing is held (so a second call answers `false`), or
|
|
558
|
+
when the picker was destroyed. Leave `holdId` out to settle whatever is held.
|
|
559
|
+
Either way a live picker then reads the map again. It never books or releases
|
|
560
|
+
anything on the server: call it only after your booking succeeded.
|
|
561
|
+
|
|
543
562
|
The full `SeatPicker` automatically restores an active hold after same-tab
|
|
544
563
|
checkout navigation and lets the buyer remove individual held tickets. Set
|
|
545
564
|
`restoreHold: false` and pass `initialHoldId` when your host owns persistence.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as a,Q as b,R as c}from"./chunk-
|
|
1
|
+
import{P as a,Q as b,R as c}from"./chunk-NTJ5PJXD.js";import"./chunk-3IZZM7EV.js";import"./chunk-3FEGZ5HA.js";import"./chunk-7I563G2N.js";export{b as CHANNELS_CSS,c as ChannelsMode,a as bucketRowsHtml};
|
|
@@ -108,7 +108,7 @@ interface ChannelCounts {
|
|
|
108
108
|
units: number;
|
|
109
109
|
}
|
|
110
110
|
/** Buyer-access intents the server stores per channel. */
|
|
111
|
-
type ChannelAccessIntent = 'none' | 'internal' | 'server' | 'hosted_link';
|
|
111
|
+
type ChannelAccessIntent = 'none' | 'internal' | 'server' | 'hosted_link' | 'venue';
|
|
112
112
|
/**
|
|
113
113
|
* Buyer-access summary on a channel row. Shipped by the access hardening branch
|
|
114
114
|
* (merged to app main). Still optional in this type: a worker that predates the
|
|
@@ -1404,6 +1404,22 @@ interface SeatManagerOptions {
|
|
|
1404
1404
|
* `unavailableObjects`, e.g. `'Kept for renewal'`. Default `'Unavailable'`.
|
|
1405
1405
|
*/
|
|
1406
1406
|
unavailableObjectsReason?: string;
|
|
1407
|
+
/** Seats open to nobody (CR26): hollow on the map, "Not for sale" in words, out of Free. */
|
|
1408
|
+
closedObjects?: readonly string[];
|
|
1409
|
+
/** Seats on sale through channels: the Status legend's line, and each seat's channel by label for its hover. */
|
|
1410
|
+
channelSeats?: {
|
|
1411
|
+
label: string;
|
|
1412
|
+
count: number;
|
|
1413
|
+
names?: Record<string, string>;
|
|
1414
|
+
};
|
|
1415
|
+
/**
|
|
1416
|
+
* Public labels to ring in ink — for example the guest's current seat while
|
|
1417
|
+
* the box office moves them. Paint only: a marked seat keeps its status, its
|
|
1418
|
+
* paint, its hover and whether it can be chosen. The ink is the plain
|
|
1419
|
+
* opposite of the map's background, so it reads on a light map and on a
|
|
1420
|
+
* dark one. Replace the list with `setMarkedObjects()`.
|
|
1421
|
+
*/
|
|
1422
|
+
markedObjects?: readonly string[];
|
|
1407
1423
|
/**
|
|
1408
1424
|
* Seats and tables with their own price, by label: each wears a violet ring
|
|
1409
1425
|
* on the map so it can be found again. Display only; status, selection and
|
|
@@ -1626,6 +1642,12 @@ interface SeatManagerOptions {
|
|
|
1626
1642
|
* arbitrarily old numbers that looked exactly like fresh ones.
|
|
1627
1643
|
*/
|
|
1628
1644
|
onConnectionChange?: (state: SeatManagerConnection) => void;
|
|
1645
|
+
/**
|
|
1646
|
+
* A Protected reserve channel's panel offers "Open seats…" only when the host
|
|
1647
|
+
* gives this: opening Closed seats is the host's own step (CR26), so with no
|
|
1648
|
+
* handler there is no button that does nothing.
|
|
1649
|
+
*/
|
|
1650
|
+
onOpenSeats?: () => void;
|
|
1629
1651
|
/**
|
|
1630
1652
|
* What the room itself shows about live updates, as it changes: `connecting`
|
|
1631
1653
|
* before the first live moment, `live`, `paused` (updates stopped for 5 s),
|
|
@@ -1731,6 +1753,9 @@ declare class SeatManager {
|
|
|
1731
1753
|
private selectableObjectLabels;
|
|
1732
1754
|
/** Host-listed labels painted as held while the event has them free. */
|
|
1733
1755
|
private unavailableLabels;
|
|
1756
|
+
private closedLabels;
|
|
1757
|
+
/** A Closed seat is painted blocked, without the cross (CR26). */
|
|
1758
|
+
private closedIds;
|
|
1734
1759
|
private lastSelectionLabels;
|
|
1735
1760
|
/** Selection undo and redo (boards CR04, CR10): earlier picks, newest last; cleared when the tool changes. */
|
|
1736
1761
|
private selBack;
|
|
@@ -2253,9 +2278,23 @@ declare class SeatManager {
|
|
|
2253
2278
|
* them, without remounting. Seats leaving the list repaint as the event has
|
|
2254
2279
|
* them; seats joining it repaint as held and leave the selection.
|
|
2255
2280
|
*/
|
|
2281
|
+
/** Seats open to nobody (CR26). They repaint hollow, and leave Free in the legend. */
|
|
2282
|
+
setClosedObjects(labels: readonly string[]): void;
|
|
2283
|
+
/** The channel line in the Status legend, and each seat's own channel for its hover (CR26). */
|
|
2284
|
+
setChannelSeats(seats: SeatManagerOptions['channelSeats']): void;
|
|
2256
2285
|
setUnavailableObjects(labels: readonly string[], reason?: string): void;
|
|
2257
2286
|
/** Replace the seats and tables that wear the own-price ring, without remounting. */
|
|
2258
2287
|
setPricedObjects(labels: readonly string[]): void;
|
|
2288
|
+
/** Replace the labels ringed in ink (`markedObjects`) without remounting. `[]` takes every ring away. */
|
|
2289
|
+
setMarkedObjects(labels: readonly string[]): void;
|
|
2290
|
+
/** Whether the map wears rings now, so an empty list clears only what was drawn. */
|
|
2291
|
+
private marksOn;
|
|
2292
|
+
/**
|
|
2293
|
+
* Again after every rebuild: a new chart may give a label another id. The
|
|
2294
|
+
* painter is in the manager-extras chunk (in a moment after the map). While
|
|
2295
|
+
* nothing is marked the map is never touched.
|
|
2296
|
+
*/
|
|
2297
|
+
private applyMarkedObjects;
|
|
2259
2298
|
/** `setChart` drops every mark, so a rebuild resets `pricedIds` before this. */
|
|
2260
2299
|
private applyPricedMarks;
|
|
2261
2300
|
/**
|
|
@@ -2266,6 +2305,8 @@ declare class SeatManager {
|
|
|
2266
2305
|
setCategoryPrices(prices: Record<string, SeatManagerCategoryPrice> | null | undefined): void;
|
|
2267
2306
|
/** The host's category prices in the renderer's shape: every amount is a range. */
|
|
2268
2307
|
private hoverPriceRanges;
|
|
2308
|
+
/** A seat's ticket type and price: its own price, then the host's for its type, then the chart's. `categoryPrices: null` shows none. */
|
|
2309
|
+
private ticketTypeFact;
|
|
2269
2310
|
/** Change whether unavailable inventory participates in custom selection. */
|
|
2270
2311
|
setUnavailableObjectsSelectable(enabled: boolean): void;
|
|
2271
2312
|
/** Replace the final per-object selection predicate. */
|
|
@@ -2366,6 +2407,8 @@ declare class SeatManager {
|
|
|
2366
2407
|
private chipLabels;
|
|
2367
2408
|
/** Click lights a chip's seats and the rest step back; again, × or Esc clears; ⇧ click selects them in a picking tool. */
|
|
2368
2409
|
private onLegendChip;
|
|
2410
|
+
/** The legend repaints its chips, and the pressed one goes with its focus: the room's keys, Esc first, must still reach it. */
|
|
2411
|
+
private paintChipFocused;
|
|
2369
2412
|
/** The sections a lit chip touches: at venue zoom seats aren't drawn, so their blocks say where. */
|
|
2370
2413
|
private litSections;
|
|
2371
2414
|
private lightSections;
|
|
@@ -3136,6 +3179,8 @@ interface ChannelsModeHost {
|
|
|
3136
3179
|
pillLane?: HTMLElement;
|
|
3137
3180
|
/** The widget root — dialogs mount here so they inherit the widget's tokens. */
|
|
3138
3181
|
root: HTMLElement;
|
|
3182
|
+
/** The host's Open seats step; absent, a Protected reserve channel offers no button. */
|
|
3183
|
+
openSeats?: () => void;
|
|
3139
3184
|
seats(): ChannelsSeatView[];
|
|
3140
3185
|
statusOf(label: string): ChannelSeatStatus | undefined;
|
|
3141
3186
|
selectionLabels(): string[];
|
|
@@ -108,7 +108,7 @@ interface ChannelCounts {
|
|
|
108
108
|
units: number;
|
|
109
109
|
}
|
|
110
110
|
/** Buyer-access intents the server stores per channel. */
|
|
111
|
-
type ChannelAccessIntent = 'none' | 'internal' | 'server' | 'hosted_link';
|
|
111
|
+
type ChannelAccessIntent = 'none' | 'internal' | 'server' | 'hosted_link' | 'venue';
|
|
112
112
|
/**
|
|
113
113
|
* Buyer-access summary on a channel row. Shipped by the access hardening branch
|
|
114
114
|
* (merged to app main). Still optional in this type: a worker that predates the
|
|
@@ -1404,6 +1404,22 @@ interface SeatManagerOptions {
|
|
|
1404
1404
|
* `unavailableObjects`, e.g. `'Kept for renewal'`. Default `'Unavailable'`.
|
|
1405
1405
|
*/
|
|
1406
1406
|
unavailableObjectsReason?: string;
|
|
1407
|
+
/** Seats open to nobody (CR26): hollow on the map, "Not for sale" in words, out of Free. */
|
|
1408
|
+
closedObjects?: readonly string[];
|
|
1409
|
+
/** Seats on sale through channels: the Status legend's line, and each seat's channel by label for its hover. */
|
|
1410
|
+
channelSeats?: {
|
|
1411
|
+
label: string;
|
|
1412
|
+
count: number;
|
|
1413
|
+
names?: Record<string, string>;
|
|
1414
|
+
};
|
|
1415
|
+
/**
|
|
1416
|
+
* Public labels to ring in ink — for example the guest's current seat while
|
|
1417
|
+
* the box office moves them. Paint only: a marked seat keeps its status, its
|
|
1418
|
+
* paint, its hover and whether it can be chosen. The ink is the plain
|
|
1419
|
+
* opposite of the map's background, so it reads on a light map and on a
|
|
1420
|
+
* dark one. Replace the list with `setMarkedObjects()`.
|
|
1421
|
+
*/
|
|
1422
|
+
markedObjects?: readonly string[];
|
|
1407
1423
|
/**
|
|
1408
1424
|
* Seats and tables with their own price, by label: each wears a violet ring
|
|
1409
1425
|
* on the map so it can be found again. Display only; status, selection and
|
|
@@ -1626,6 +1642,12 @@ interface SeatManagerOptions {
|
|
|
1626
1642
|
* arbitrarily old numbers that looked exactly like fresh ones.
|
|
1627
1643
|
*/
|
|
1628
1644
|
onConnectionChange?: (state: SeatManagerConnection) => void;
|
|
1645
|
+
/**
|
|
1646
|
+
* A Protected reserve channel's panel offers "Open seats…" only when the host
|
|
1647
|
+
* gives this: opening Closed seats is the host's own step (CR26), so with no
|
|
1648
|
+
* handler there is no button that does nothing.
|
|
1649
|
+
*/
|
|
1650
|
+
onOpenSeats?: () => void;
|
|
1629
1651
|
/**
|
|
1630
1652
|
* What the room itself shows about live updates, as it changes: `connecting`
|
|
1631
1653
|
* before the first live moment, `live`, `paused` (updates stopped for 5 s),
|
|
@@ -1731,6 +1753,9 @@ declare class SeatManager {
|
|
|
1731
1753
|
private selectableObjectLabels;
|
|
1732
1754
|
/** Host-listed labels painted as held while the event has them free. */
|
|
1733
1755
|
private unavailableLabels;
|
|
1756
|
+
private closedLabels;
|
|
1757
|
+
/** A Closed seat is painted blocked, without the cross (CR26). */
|
|
1758
|
+
private closedIds;
|
|
1734
1759
|
private lastSelectionLabels;
|
|
1735
1760
|
/** Selection undo and redo (boards CR04, CR10): earlier picks, newest last; cleared when the tool changes. */
|
|
1736
1761
|
private selBack;
|
|
@@ -2253,9 +2278,23 @@ declare class SeatManager {
|
|
|
2253
2278
|
* them, without remounting. Seats leaving the list repaint as the event has
|
|
2254
2279
|
* them; seats joining it repaint as held and leave the selection.
|
|
2255
2280
|
*/
|
|
2281
|
+
/** Seats open to nobody (CR26). They repaint hollow, and leave Free in the legend. */
|
|
2282
|
+
setClosedObjects(labels: readonly string[]): void;
|
|
2283
|
+
/** The channel line in the Status legend, and each seat's own channel for its hover (CR26). */
|
|
2284
|
+
setChannelSeats(seats: SeatManagerOptions['channelSeats']): void;
|
|
2256
2285
|
setUnavailableObjects(labels: readonly string[], reason?: string): void;
|
|
2257
2286
|
/** Replace the seats and tables that wear the own-price ring, without remounting. */
|
|
2258
2287
|
setPricedObjects(labels: readonly string[]): void;
|
|
2288
|
+
/** Replace the labels ringed in ink (`markedObjects`) without remounting. `[]` takes every ring away. */
|
|
2289
|
+
setMarkedObjects(labels: readonly string[]): void;
|
|
2290
|
+
/** Whether the map wears rings now, so an empty list clears only what was drawn. */
|
|
2291
|
+
private marksOn;
|
|
2292
|
+
/**
|
|
2293
|
+
* Again after every rebuild: a new chart may give a label another id. The
|
|
2294
|
+
* painter is in the manager-extras chunk (in a moment after the map). While
|
|
2295
|
+
* nothing is marked the map is never touched.
|
|
2296
|
+
*/
|
|
2297
|
+
private applyMarkedObjects;
|
|
2259
2298
|
/** `setChart` drops every mark, so a rebuild resets `pricedIds` before this. */
|
|
2260
2299
|
private applyPricedMarks;
|
|
2261
2300
|
/**
|
|
@@ -2266,6 +2305,8 @@ declare class SeatManager {
|
|
|
2266
2305
|
setCategoryPrices(prices: Record<string, SeatManagerCategoryPrice> | null | undefined): void;
|
|
2267
2306
|
/** The host's category prices in the renderer's shape: every amount is a range. */
|
|
2268
2307
|
private hoverPriceRanges;
|
|
2308
|
+
/** A seat's ticket type and price: its own price, then the host's for its type, then the chart's. `categoryPrices: null` shows none. */
|
|
2309
|
+
private ticketTypeFact;
|
|
2269
2310
|
/** Change whether unavailable inventory participates in custom selection. */
|
|
2270
2311
|
setUnavailableObjectsSelectable(enabled: boolean): void;
|
|
2271
2312
|
/** Replace the final per-object selection predicate. */
|
|
@@ -2366,6 +2407,8 @@ declare class SeatManager {
|
|
|
2366
2407
|
private chipLabels;
|
|
2367
2408
|
/** Click lights a chip's seats and the rest step back; again, × or Esc clears; ⇧ click selects them in a picking tool. */
|
|
2368
2409
|
private onLegendChip;
|
|
2410
|
+
/** The legend repaints its chips, and the pressed one goes with its focus: the room's keys, Esc first, must still reach it. */
|
|
2411
|
+
private paintChipFocused;
|
|
2369
2412
|
/** The sections a lit chip touches: at venue zoom seats aren't drawn, so their blocks say where. */
|
|
2370
2413
|
private litSections;
|
|
2371
2414
|
private lightSections;
|
|
@@ -3136,6 +3179,8 @@ interface ChannelsModeHost {
|
|
|
3136
3179
|
pillLane?: HTMLElement;
|
|
3137
3180
|
/** The widget root — dialogs mount here so they inherit the widget's tokens. */
|
|
3138
3181
|
root: HTMLElement;
|
|
3182
|
+
/** The host's Open seats step; absent, a Protected reserve channel offers no button. */
|
|
3183
|
+
openSeats?: () => void;
|
|
3139
3184
|
seats(): ChannelsSeatView[];
|
|
3140
3185
|
statusOf(label: string): ChannelSeatStatus | undefined;
|
|
3141
3186
|
selectionLabels(): string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ne,m as S}from"./chunk-3IZZM7EV.js";var ie={tag:'<path d="M3.5 12.2V4.5a1 1 0 0 1 1-1h7.7l8.3 8.3a1.4 1.4 0 0 1 0 2l-6.3 6.3a1.4 1.4 0 0 1-2 0z"/><circle cx="8" cy="8" r="1.6"/>',ban:'<circle cx="12" cy="12" r="8.5"/><path d="M6 6l12 12"/>',cursor:'<path d="M5 3.5l13 7-5.6 1.6L10 18z"/>',box:'<rect x="4" y="4" width="16" height="16" rx="2" stroke-dasharray="3 2.4"/>',search:'<circle cx="11" cy="11" r="6.5"/><path d="M16 16l4.5 4.5"/>',alert:'<path d="M12 3.8l9.3 16.2H2.7z"/><path d="M12 10v4.5M12 17.3v.2"/>',check:'<path d="M5 12.5l4.5 4.5L19 7.5"/>',eye:'<path d="M2.5 12s3.5-6.5 9.5-6.5 9.5 6.5 9.5 6.5-3.5 6.5-9.5 6.5S2.5 12 2.5 12z"/><circle cx="12" cy="12" r="3"/>',bookmark:'<path d="M6.5 3.5h11v17l-5.5-4-5.5 4z"/>',layers:'<path d="M12 3.5l8.5 4.5L12 12.5 3.5 8z"/><path d="M3.5 12L12 16.5 20.5 12"/><path d="M3.5 16L12 20.5 20.5 16"/>',table:'<circle cx="12" cy="12" r="5"/><circle cx="12" cy="3.5" r="1.6"/><circle cx="12" cy="20.5" r="1.6"/><circle cx="3.5" cy="12" r="1.6"/><circle cx="20.5" cy="12" r="1.6"/>',clock:'<circle cx="12" cy="12" r="8.5"/><path d="M12 7.5V12l3 2"/>',lock:'<rect x="5" y="10.5" width="14" height="10" rx="2"/><path d="M8 10.5V7.5a4 4 0 0 1 8 0v3"/>',info:'<circle cx="12" cy="12" r="8.5"/><path d="M12 11v5.5M12 7.6v.2"/>',user:'<circle cx="12" cy="8" r="3.8"/><path d="M4.5 20.5a7.5 7.5 0 0 1 15 0"/>',bolt:'<path d="M13 3L5 13.5h6l-1 7.5 8-10.5h-6z"/>',star:'<path d="M12 3.8l2.5 5.2 5.7.8-4.1 4 1 5.6L12 16.8l-5.1 2.6 1-5.6-4.1-4 5.7-.8z"/>',seat:'<path d="M7 11V6.5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2V11"/><path d="M5 11h14v4H5z"/><path d="M7 15v4.5M17 15v4.5"/>',gauge:'<path d="M4 16a8 8 0 1 1 16 0"/><path d="M12 16l4-5"/>',bell:'<path d="M6 16V11a6 6 0 0 1 12 0v5l1.5 2h-15z"/><path d="M10 20.5a2 2 0 0 0 4 0"/>',undo:'<path d="M8.5 5L4 9.5 8.5 14"/><path d="M4 9.5h10a6 6 0 0 1 0 12h-3"/>',plus:'<path d="M12 5v14M5 12h14"/>',palette:'<path d="M12 3.5a8.5 8.5 0 1 0 0 17c1.2 0 1.8-.8 1.8-1.7 0-1.3-1-1.6-1-2.8 0-1 .8-1.7 1.8-1.7h2.2a3.7 3.7 0 0 0 3.7-3.7C20.5 6.4 16.7 3.5 12 3.5z"/><circle cx="7.8" cy="11" r="1.2"/><circle cx="10.5" cy="7.3" r="1.2"/><circle cx="15" cy="7.6" r="1.2"/>',x:'<path d="M6 6l12 12M18 6L6 18"/>',ticket:'<path d="M3.5 8.5V6a1 1 0 0 1 1-1h15a1 1 0 0 1 1 1v2.5a2.5 2.5 0 0 0 0 5V16a1 1 0 0 1-1 1h-15a1 1 0 0 1-1-1v-2.5a2.5 2.5 0 0 0 0-5z"/><path d="M14 5.5v11" stroke-dasharray="1.6 2"/>',history:'<path d="M4 12a8 8 0 1 0 2.3-5.6"/><path d="M4 4.5v3.5h3.5"/><path d="M12 8v4.2l2.8 1.8"/>',spark:'<path d="M12 3.5l1.8 5 5 1.8-5 1.8-1.8 5-1.8-5-5-1.8 5-1.8z"/><path d="M18.5 15.5l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z"/>',lasso:'<ellipse cx="12" cy="9.5" rx="8" ry="5.5" stroke-dasharray="3 2.4"/><path d="M8.5 14.5c-1.5 1.2-1.6 3.4.2 4.2 1.4.6 2.8-.3 2.8-1.7"/>',hand:'<path d="M8 13V6a2 2 0 0 1 4 0v6-8a2 2 0 0 1 4 0v8-6a2 2 0 0 1 4 0v10c0 4-3 6-7 6-3 0-5-2-7-5l-3-4a2 2 0 0 1 3-2l2 2Z"/>',fit:'<path d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5"/>',route:'<circle cx="6" cy="6" r="2.2"/><circle cx="18" cy="18" r="2.2"/><path d="M8.2 6H15a3 3 0 0 1 0 6H9a3 3 0 0 0 0 6h6.8"/>'};function M(i,e,t=30){let n=Math.round(t*.58);return`<span class="slm-plate" style="width:${t}px;height:${t}px;background:color-mix(in srgb,${e} 15%,transparent)"><svg width="${n}" height="${n}" viewBox="0 0 24 24" fill="none" stroke="${e}" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${ie[i]??""}</svg></span>`}var yt={booked:["seat","#8a94a6"],free:["seat","#22a06b"],held:["clock","#d99a0b"],blocked:["ban","#d64545"],reserved:["bookmark","#c026d3"]};function B(i,e="currentColor",t=16){return`<svg width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${e}" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${ie[i]??""}</svg>`}function ae(i){return`<div class="slm-railhead slm-taskhead">${M(i.glyph,i.hue)}<p class="slm-eyebrow">${S(i.title)}</p>${i.badge?`<span class="slm-scope event">${S(i.badge)}</span>`:""}</div><p class="slm-hint">${i.purpose}${i.how?` <button type="button" class="slm-howlink" data-how="${i.how}">How it works \u203A</button>`:""}</p>`}function kt(){return'<div class="slm-selcard" data-ref="selcard" aria-live="polite"></div>'}function oe(){return typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent)?"\u2318K":"Ctrl K"}function wt(){return oe().replace("\u2318","\u2318 ").split(" ").map(i=>`<kbd>${i}</kbd>`).join("")}function se(){return typeof matchMedia=="function"&&matchMedia("(pointer: coarse)").matches}var Oe=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent)?"\u2318Z":"Ctrl Z",_e='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6l6 6-6 6"/></svg>',qe=[["cursor","#d99a0b","Click a seat","or anywhere near it"],["box","#d99a0b","Drag on the map","to draw a box"],["search","#4c6fff","Search",", then Enter"]],
|
|
1
|
+
import{a as ne,m as S}from"./chunk-3IZZM7EV.js";var ie={tag:'<path d="M3.5 12.2V4.5a1 1 0 0 1 1-1h7.7l8.3 8.3a1.4 1.4 0 0 1 0 2l-6.3 6.3a1.4 1.4 0 0 1-2 0z"/><circle cx="8" cy="8" r="1.6"/>',ban:'<circle cx="12" cy="12" r="8.5"/><path d="M6 6l12 12"/>',cursor:'<path d="M5 3.5l13 7-5.6 1.6L10 18z"/>',box:'<rect x="4" y="4" width="16" height="16" rx="2" stroke-dasharray="3 2.4"/>',search:'<circle cx="11" cy="11" r="6.5"/><path d="M16 16l4.5 4.5"/>',alert:'<path d="M12 3.8l9.3 16.2H2.7z"/><path d="M12 10v4.5M12 17.3v.2"/>',check:'<path d="M5 12.5l4.5 4.5L19 7.5"/>',eye:'<path d="M2.5 12s3.5-6.5 9.5-6.5 9.5 6.5 9.5 6.5-3.5 6.5-9.5 6.5S2.5 12 2.5 12z"/><circle cx="12" cy="12" r="3"/>',bookmark:'<path d="M6.5 3.5h11v17l-5.5-4-5.5 4z"/>',layers:'<path d="M12 3.5l8.5 4.5L12 12.5 3.5 8z"/><path d="M3.5 12L12 16.5 20.5 12"/><path d="M3.5 16L12 20.5 20.5 16"/>',table:'<circle cx="12" cy="12" r="5"/><circle cx="12" cy="3.5" r="1.6"/><circle cx="12" cy="20.5" r="1.6"/><circle cx="3.5" cy="12" r="1.6"/><circle cx="20.5" cy="12" r="1.6"/>',clock:'<circle cx="12" cy="12" r="8.5"/><path d="M12 7.5V12l3 2"/>',lock:'<rect x="5" y="10.5" width="14" height="10" rx="2"/><path d="M8 10.5V7.5a4 4 0 0 1 8 0v3"/>',info:'<circle cx="12" cy="12" r="8.5"/><path d="M12 11v5.5M12 7.6v.2"/>',user:'<circle cx="12" cy="8" r="3.8"/><path d="M4.5 20.5a7.5 7.5 0 0 1 15 0"/>',bolt:'<path d="M13 3L5 13.5h6l-1 7.5 8-10.5h-6z"/>',star:'<path d="M12 3.8l2.5 5.2 5.7.8-4.1 4 1 5.6L12 16.8l-5.1 2.6 1-5.6-4.1-4 5.7-.8z"/>',seat:'<path d="M7 11V6.5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2V11"/><path d="M5 11h14v4H5z"/><path d="M7 15v4.5M17 15v4.5"/>',gauge:'<path d="M4 16a8 8 0 1 1 16 0"/><path d="M12 16l4-5"/>',bell:'<path d="M6 16V11a6 6 0 0 1 12 0v5l1.5 2h-15z"/><path d="M10 20.5a2 2 0 0 0 4 0"/>',undo:'<path d="M8.5 5L4 9.5 8.5 14"/><path d="M4 9.5h10a6 6 0 0 1 0 12h-3"/>',plus:'<path d="M12 5v14M5 12h14"/>',palette:'<path d="M12 3.5a8.5 8.5 0 1 0 0 17c1.2 0 1.8-.8 1.8-1.7 0-1.3-1-1.6-1-2.8 0-1 .8-1.7 1.8-1.7h2.2a3.7 3.7 0 0 0 3.7-3.7C20.5 6.4 16.7 3.5 12 3.5z"/><circle cx="7.8" cy="11" r="1.2"/><circle cx="10.5" cy="7.3" r="1.2"/><circle cx="15" cy="7.6" r="1.2"/>',x:'<path d="M6 6l12 12M18 6L6 18"/>',ticket:'<path d="M3.5 8.5V6a1 1 0 0 1 1-1h15a1 1 0 0 1 1 1v2.5a2.5 2.5 0 0 0 0 5V16a1 1 0 0 1-1 1h-15a1 1 0 0 1-1-1v-2.5a2.5 2.5 0 0 0 0-5z"/><path d="M14 5.5v11" stroke-dasharray="1.6 2"/>',history:'<path d="M4 12a8 8 0 1 0 2.3-5.6"/><path d="M4 4.5v3.5h3.5"/><path d="M12 8v4.2l2.8 1.8"/>',spark:'<path d="M12 3.5l1.8 5 5 1.8-5 1.8-1.8 5-1.8-5-5-1.8 5-1.8z"/><path d="M18.5 15.5l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z"/>',lasso:'<ellipse cx="12" cy="9.5" rx="8" ry="5.5" stroke-dasharray="3 2.4"/><path d="M8.5 14.5c-1.5 1.2-1.6 3.4.2 4.2 1.4.6 2.8-.3 2.8-1.7"/>',hand:'<path d="M8 13V6a2 2 0 0 1 4 0v6-8a2 2 0 0 1 4 0v8-6a2 2 0 0 1 4 0v10c0 4-3 6-7 6-3 0-5-2-7-5l-3-4a2 2 0 0 1 3-2l2 2Z"/>',fit:'<path d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5"/>',route:'<circle cx="6" cy="6" r="2.2"/><circle cx="18" cy="18" r="2.2"/><path d="M8.2 6H15a3 3 0 0 1 0 6H9a3 3 0 0 0 0 6h6.8"/>'};function M(i,e,t=30){let n=Math.round(t*.58);return`<span class="slm-plate" style="width:${t}px;height:${t}px;background:color-mix(in srgb,${e} 15%,transparent)"><svg width="${n}" height="${n}" viewBox="0 0 24 24" fill="none" stroke="${e}" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${ie[i]??""}</svg></span>`}var yt={booked:["seat","#8a94a6"],free:["seat","#22a06b"],held:["clock","#d99a0b"],blocked:["ban","#d64545"],reserved:["bookmark","#c026d3"]};function B(i,e="currentColor",t=16){return`<svg width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${e}" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${ie[i]??""}</svg>`}function ae(i){return`<div class="slm-railhead slm-taskhead">${M(i.glyph,i.hue)}<p class="slm-eyebrow">${S(i.title)}</p>${i.badge?`<span class="slm-scope event">${S(i.badge)}</span>`:""}</div><p class="slm-hint">${i.purpose}${i.how?` <button type="button" class="slm-howlink" data-how="${i.how}">How it works \u203A</button>`:""}</p>`}function kt(){return'<div class="slm-selcard" data-ref="selcard" aria-live="polite"></div>'}function oe(){return typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent)?"\u2318K":"Ctrl K"}function wt(){return oe().replace("\u2318","\u2318 ").split(" ").map(i=>`<kbd>${i}</kbd>`).join("")}function se(){return typeof matchMedia=="function"&&matchMedia("(pointer: coarse)").matches}var Oe=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent)?"\u2318Z":"Ctrl Z",_e='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6l6 6-6 6"/></svg>',qe=[["cursor","#d99a0b","Click a seat","or anywhere near it"],["box","#d99a0b","Drag on the map","to draw a box"],["search","#4c6fff","Search",", then Enter"]],Ue=[["cursor","#d99a0b","Tap a seat","or anywhere near it"],["box","#d99a0b","Press and hold, then drag","to draw a box"],["search","#4c6fff","Find","a seat, row or section"]];function xt(i,e){if(i.classList.toggle("empty",e.count===0),!e.count){i.innerHTML=`<div class="slm-selcount"><b>0</b> seats selected</div><div class="slm-ways">${(se()?Ue:qe).map(([n,s,a,o])=>`<span>${M(n,s,26)}<span><b>${a}</b>${n==="search"&&!se()?oe():""}${o}</span></span>`).join("")}${e.saved?`<button type="button" class="slm-savedrow" data-saved-list>${M("star","#d99a0b",26)}<span><b>Saved selections</b>${e.saved.toLocaleString()} on this event</span>${_e}</button>`:""}</div>`;return}let t=e.count===1?"seat":"seats";i.innerHTML=`<div class="slm-selcount"><b>${e.count.toLocaleString()}</b> ${t} selected<button type="button" class="slm-linkbtn" data-sel-clear>Clear</button></div><p class="slm-selwhere">${S(e.where)}</p><div class="slm-selparts">${e.parts.map(n=>`<span class="tone-${n.tone}">${S(n.label)}</span>`).join("")}${e.types.map(n=>`<span class="type"><i style="background:${S(n.color)}"></i>${S(n.label)}${n.count==null?"":` ${n.count.toLocaleString()}`}</span>`).join("")}</div>`+(e.stale?`<p class="slm-selstale">${M("alert","#b45309",20)}${S(e.stale)}</p>`:"")+`<div class="slm-selbtns">${e.canSimilar?`<span class="slm-simwrap"><button type="button" class="slm-btn ghost" data-sel-similar aria-haspopup="menu" aria-expanded="false">${B("spark","#d99a0b")}Select similar</button></span>`:""}<button type="button" class="slm-btn ghost" data-sel-undo title="Undo the last change to the selection (${Oe})"${e.canUndo?"":" disabled"}>${B("undo","#64748b")}Undo</button>${e.canSave?`<button type="button" class="slm-btn ghost slm-selsave" data-sel-save>${B("star","#d99a0b")}Save</button>`:""}</div>`}function Ne(i){return i.length?i.length===1?`row ${i[0]}`:i.length<=4?`rows ${i[0]}\u2013${i[i.length-1]}`:`${i.length} rows`:""}function St(i){if(!i.length)return"";if(i.length===1){let t=Ne(i[0].rows);return t?`${i[0].label} \xB7 ${t}`:i[0].label}let e=i.slice(0,2).map(t=>t.label).join(", ");return`${i.length} sections: ${e}${i.length>2?"\u2026":""}`}function v(i,e,t,n){return`<div class="slm-panelalert ${i}" role="${i==="error"?"alert":"status"}">${B(n??(i==="ok"?"check":"alert"),"currentColor",18)}<span><b>${S(e)}</b>${S(t)}</span></div>`}function Ct(i){return`<div class="slm-railfoot" data-ref="${i}"><button type="button" class="slm-btn" data-foot-action></button><button type="button" class="slm-linkbtn" data-foot-secondary hidden></button><p class="slm-note" data-foot-note></p></div>`}function $t(i,e){let t=i.querySelector("[data-foot-action]"),n=i.querySelector("[data-foot-note]");t&&(t.textContent=e.label,t.disabled=!!e.disabled||!!e.busy,t.classList.toggle("danger",!!e.danger),t.classList.toggle("busy",!!e.busy),t.setAttribute("aria-busy",String(!!e.busy)));let s=i.querySelector("[data-foot-secondary]");s&&(s.hidden=!e.secondary,s.innerHTML=e.secondary?`${e.look?B("undo","currentColor",14):""}${S(e.secondary)}`:"",s.disabled=!!e.busy),n&&(n.textContent=e.note??"",n.hidden=!e.note),i.classList.toggle("done",e.look==="done"),i.classList.toggle("settle",e.look==="settle")}function Ve(i,e){if(!i.labels.length)return"Nothing found";let t=[];i.sections&&t.push(`${i.sections.toLocaleString()} section${i.sections===1?"":"s"}`),i.rows&&t.push(`${i.rows.toLocaleString()} row${i.rows===1?"":"s"}`);let n=`${i.labels.length.toLocaleString()} seat${i.labels.length===1?"":"s"} found`,s=t.length?`${t.join(" \xB7 ")} \xB7 ${n}`:n;return e?`${s} \xB7 Enter to ${e==="frame"?"show":"select"}`:s}function Fe(i={}){return`
|
|
2
2
|
<div class="slm-find${i.compact?" slm-find-bar":""}" data-ch-find>
|
|
3
3
|
<input type="search" class="slm-input" data-ch-find-input placeholder="Find seat, row or section" aria-label="Find seat, row or section" autocomplete="off"${i.compact?' aria-keyshortcuts="/"':""}>
|
|
4
4
|
<span class="slm-find-count" data-ch-find-count role="status"></span>
|
|
@@ -15,7 +15,7 @@ import{a as ne,m as S}from"./chunk-3IZZM7EV.js";var ie={tag:'<path d="M3.5 12.2V
|
|
|
15
15
|
<button type="button" role="menuitem" data-ch-scope-id="${S(c.id)}"${c.labels.length?"":" disabled"}>
|
|
16
16
|
<span class="dot" style="background:${S(c.color??"#6e7bff")}" aria-hidden="true"></span>
|
|
17
17
|
<span><b>${S(c.label)}</b><small>${Ye(c.labels.length,c.total)}</small></span>
|
|
18
|
-
</button>`).join("")||'<p class="slm-ch-menuhead">This chart has no sections with free seats.</p>'}<p class="slm-ch-menuerr" data-ch-error hidden></p>`;let o=t?.parentElement??document.body;o.style.position=o===document.body?o.style.position:"relative",o.appendChild(a),this.menu=a;let r=()=>{a.remove(),this.menu===a&&(this.menu=null),document.removeEventListener("pointerdown",l,!0)},l=c=>{!a.contains(c.target)&&c.target!==t&&r()};document.addEventListener("pointerdown",l,!0),a.addEventListener("keydown",c=>{let d=[...a.querySelectorAll("button:not([disabled])")],u=d.indexOf(document.activeElement);c.key==="Escape"?(r(),t?.focus(),c.preventDefault()):(c.key==="ArrowDown"||c.key==="ArrowUp")&&(d[(u+(c.key==="ArrowDown"?1:-1)+d.length)%d.length]?.focus(),c.preventDefault())}),a.querySelectorAll("[data-ch-scope-id]").forEach(c=>c.addEventListener("click",()=>{let d=s.find(g=>g.id===c.dataset.chScopeId);if(!d)return;let u=new Set([...this.host.selectionLabels(),...d.labels]);if(u.size>n){let g=a.querySelector("[data-ch-error]");g.hidden=!1,g.textContent=`That would make ${je(u.size)}. One change can take up to ${n.toLocaleString()}.`;return}r(),this.host.selectByLabels([...u])})),a.querySelector("button:not([disabled])")?.focus()}};var f="public",C="Public sale";function $(i){return i==null||i===""||i===f}var V=["#a78bfa","#2dd4bf","#fb923c","#60a5fa","#f472b6","#a3e635","#f87171","#38bdf8","#c084fc","#facc15"],Ke="#f4b740",le="ABCDEFGHJKLMNPQRSTUVWXYZ";function P(i,e){let t=(i??"").trim();return((/\p{L}/u.exec(t)?.[0]??t[0]??"")||e).toUpperCase().slice(0,1)}function W(i,e){let t=new Set([...e].map(a=>P(a,"")).filter(Boolean)),n=P(i,"");return{letter:le.includes(n)&&!t.has(n)?n:[...le].find(a=>!t.has(a))??(n||"X"),color:V[t.size%V.length]}}function he(i,e=0){return $(i.id)?{letter:P(i.marker,"P"),color:i.color||Ke}:{letter:P(i.marker||i.name,"?"),color:i.color||V[e%V.length]}}function de(i,e,t){let n=new Map;for(let o of i){let r=X(e.get(o));n.set(r,(n.get(r)??0)+1)}let s=[{id:f,name:t?.publicSale?.name??C},...(t?.channels??[]).map(o=>({id:o.id,name:o.name}))],a=[];for(let o of s){let r=n.get(o.id);r&&a.push({channelId:o.id,name:o.name,count:r}),n.delete(o.id)}for(let[o,r]of n)a.push({channelId:o,name:$(o)?C:"Another channel",count:r});return a}function X(i){return $(i)?f:i}var ce=12;function K(i){return{count:i.length,labels:i.slice(0,ce),truncated:i.length>ce}}function ue(i){let{labels:e,allocation:t,statusOf:n,nameOf:s}=i,a=X(i.targetChannelId),o=new Set,r=0,l=0,c=new Map,d=[],u=[],g=[];for(let p of e){if(o.has(p))continue;o.add(p);let L=n(p);if(!L){g.push(p);continue}let A=X(t.get(p));if(A===a){l+=1;continue}if(L==="held"){d.push(p);continue}if(L==="booked"){u.push(p);continue}A===f?r+=1:c.set(A,(c.get(A)??0)+1)}let x=[...c.entries()].map(([p,L])=>({channelId:p,name:s(p),count:L}));return{changedFromPublic:{count:r},movedFromOtherChannel:{count:x.reduce((p,L)=>p+L.count,0),channels:x},alreadyInTarget:{count:l},skippedHeld:K(d),skippedBooked:K(u),notFound:K(g)}}function F(i){return i.changedFromPublic.count+i.movedFromOtherChannel.count}function Et(i){return i.movedFromOtherChannel.count>0}function pe(i,e){let t=[];i.changedFromPublic.count&&t.push({kind:"add",icon:"+",count:i.changedFromPublic.count,text:`${i.changedFromPublic.count.toLocaleString()} from ${C}`});for(let n of i.movedFromOtherChannel.channels)t.push({kind:"move",icon:"\u21C4",count:n.count,text:`${n.count.toLocaleString()} moved out of ${n.name??"another channel"}`,why:"this needs your OK"});return i.alreadyInTarget.count&&t.push({kind:"same",icon:"=",count:i.alreadyInTarget.count,text:`${i.alreadyInTarget.count.toLocaleString()} already in ${e}`,why:"unchanged"}),i.skippedHeld.count&&t.push({kind:"skip",icon:"\u23F8",count:i.skippedHeld.count,text:`${i.skippedHeld.count.toLocaleString()} in a buyer's cart`,why:"can't move while held",peek:U(i.skippedHeld)}),i.skippedBooked.count&&t.push({kind:"skip",icon:"\u{1F512}",count:i.skippedBooked.count,text:`${i.skippedBooked.count.toLocaleString()} already sold`,why:"sales are never rewritten",peek:U(i.skippedBooked)}),i.notFound.count&&t.push({kind:"skip",icon:"?",count:i.notFound.count,text:`${i.notFound.count.toLocaleString()} not on this map`,why:"these seats are no longer part of the event",peek:U(i.notFound)}),t}function U(i){if(!i.labels.length)return;let e=i.labels.slice(0,4).join(", ");return i.truncated||i.labels.length>4?`${e}\u2026`:e}function me(i){let e=i?.retryAfterMs??(i?.latestHoldExpiresAt?Math.max(0,i.latestHoldExpiresAt-Date.now()):0);if(!e)return"in a moment";let t=Math.ceil(e/6e4);return t<=1?"in about a minute":`in about ${t} minutes`}function ge(i){if(!i||!i.intent)return"\u2014";let e=i.intent==="server"?"Your website or app":i.intent==="hosted_link"?"Buyer links":i.intent==="internal"?"Your own staff sell these":"Protected reserve",t=i.hasActiveGrants?"in use now":i.lastMintAt?`last used ${new Date(i.lastMintAt).toLocaleDateString()}`:null,n=i.detail??t;return n?`${e} \xB7 ${n}`:e}function H(i){return i==="internal"?"Sell through your own staff":i==="server"?"Integrate a website or app":i==="hosted_link"?"Sell with a buyer link":"Keep as protected reserve"}function Pt(i){switch(i){case"internal":return"Only your own box office can sell these seats, through your secret key. Buyer links and website integrations are refused.";case"server":return"Your website's backend mints each buyer a short-lived session for these seats. Buyer links are refused; the code lives on the Embed page.";case"hosted_link":return"SeatLayer makes a link you send to a named group. They open it and buy only these seats. No other route can sell them.";default:return"Nobody can buy these seats. Every way of letting a buyer in \u2014 a buyer link, your website, even your own staff \u2014 is refused while this is the route. The seats stay out of public sale."}}function Xe(i){return i==="hosted_link"?"hosted_link":i==="server"?"server":i==="staff"?"internal":null}function z(i){let e=G(i?.accessIntent),t=Xe(i?.route),n=`This channel is set to "${H(e)}"`;return t?`${n}, so it cannot do that. Switch it to "${H(t)}" first.`:`${n}, so it cannot do that. Choose a different route for this channel first.`}function G(i){return i==="internal"||i==="server"||i==="hosted_link"||i==="none"?i:"none"}function N(i,e,t){return`${i.toLocaleString()} ${i===1?e:t}`}function be(i){let e=Math.max(0,i?.liveAccessLinks??0),t=Math.max(0,i?.activeSessions??0),n=G(i?.from),s=G(i?.to),o=`${[e?N(e,"buyer link is live","buyer links are live"):null,t?N(t,"buyer is in a checkout","buyers are in a checkout"):null].filter(Boolean).join(", and ")||"Buyers are inside this channel"} on "${H(n)}". Moving it to "${H(s)}" changes what happens to them.`,r=[];return e&&r.push(`${N(e,"buyer link closes","buyer links close")} immediately. Anyone who has not opened it yet never will \u2014 send a new link if you still need one.`),t&&r.push(`${N(t,"buyer who is already in a checkout keeps","buyers who are already in a checkout keep")} their seats and can finish paying. Nobody is thrown out. No new buyers come in this way, so the old route empties on its own within 12 hours.`),{headline:o,consequences:r}}var Q={maxRedemptions:100,maxQuantity:4};function ve(i){switch(i.status??i.state){case"active":return{text:"Active",kind:"active"};case"expired":return{text:"Expired",kind:"archived"};case"exhausted":return{text:"All used",kind:"paused"};case"rotated":return{text:"Replaced",kind:"archived"};default:return{text:"Revoked",kind:"archived"}}}function fe(i){return i.state==="active"&&i.status==="active"}function Z(i){return Number.isFinite(i)?new Date(i).toLocaleString(void 0,{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit"}):"\u2014"}function Tt(i){return[{k:"Expires",v:Z(i.expiresAt)},{k:"Redemptions",v:`${i.redemptions.toLocaleString()} of ${i.maxRedemptions.toLocaleString()} used`},{k:"Seats per buyer",v:`${i.maxQuantity.toLocaleString()} seat${i.maxQuantity===1?"":"s"} maximum`},{k:"Covers",v:i.includePublic?"This channel's allocation and Public sale seats":"This channel's allocation only"}]}function ye(i){return[`${i.redemptions.toLocaleString()} of ${i.maxRedemptions.toLocaleString()} used`,`${i.maxQuantity.toLocaleString()} ${i.maxQuantity===1?"seat":"seats"} per buyer`,`ends ${Z(i.expiresAt)}`,i.includePublic?"with Public sale seats":"",i.activeSessions?`${i.activeSessions.toLocaleString()} ${i.activeSessions===1?"buyer":"buyers"} inside now`:""].filter(Boolean).join(" \xB7 ")}function ke(i){let e=`${i.maxQuantity.toLocaleString()} ${i.maxQuantity===1?"seat":"seats"} each`,t=`${i.maxRedemptions.toLocaleString()} ${i.maxRedemptions===1?"person":"people"} in all`;return`Anyone with this link can buy up to ${e}, ${t}, until ${Z(i.expiresAt)}.`+(i.includePublic?" It also opens Public sale seats.":"")}function O(i){let e=i?.serverMessage?.trim();switch(i?.code){case"invalid_expiry":case"invalid_max_redemptions":case"invalid_max_quantity":case"invalid_session_ttl":case"invalid_label":return e||"That setting is outside what a hosted link allows. Adjust it and try again.";case"too_many_access_links":return e||"This channel already has as many live links as it can hold. Revoke one before creating another.";case"access_link_not_active":return"That link is no longer active, so it cannot be rotated or revoked.";case"channel_unavailable":return"This channel is paused or archived, so it cannot let new buyers in. Resume it first.";case"channel_access_intent_forbids":return z(i?.details);case"end_active_sessions_required":return"Choose what happens to the buyers who already came in through this link.";case"not_found":return"That link is no longer here. Refresh and try again.";default:return i?.status===403?"Hosted access links need channel-management permission.":e||"That did not go through. Try again."}}function Mt(i){return(i?.channels??[]).map(e=>({kind:"skip",icon:"\u26A0",count:e.count,text:`${e.count.toLocaleString()} would leave ${e.name??"a channel"}`,why:"the new chart no longer has these seats",peek:e.labels?.length?U({count:e.count,labels:e.labels,truncated:e.truncated??!1}):void 0}))}function we(i){return i==="builtin"?"Built-in":i==="active"?"Active":i==="paused"?"Paused":"Archived"}var xe=Symbol.for("seatlayer.ManageApiError"),m=class extends Error{static[Symbol.hasInstance](e){return typeof e=="object"&&e!==null&&e[xe]===!0}constructor(e,t,n,s,a,o){super(t),Object.defineProperty(this,xe,{value:!0}),this.name="ManageApiError",this.status=e,this.code=n,this.conflicts=s,this.details=a,this.serverMessage=o}};async function Se(i){let t=(i.headers.get("content-type")??"").includes("application/json")?await i.json().catch(()=>null):null;if(!i.ok){let n=t;throw new m(i.status,n?.error??`request_failed_${i.status}`,n?.code,n?.conflicts,n?.details,typeof n?.message=="string"?n.message:void 0)}return t}function k(i){return i&&typeof i=="object"?i:{}}function j(i,e,t=0){return typeof i=="number"&&Number.isFinite(i)?i:typeof e=="number"&&Number.isFinite(e)?e:t}function Ce(i,e){return i===null?null:typeof i=="number"&&Number.isFinite(i)?i:i!==void 0?null:typeof e=="number"&&Number.isFinite(e)?e:null}function Le(i){let e=k(i),t=j(e.bookedValue,e.bookedRevenue);return{...e,bookedValue:t,bookedRevenue:t}}function Ge(i){let e=k(i),t=k(e.report),n=Array.isArray(t.byCategory)?t.byCategory.map(a=>{let o=k(a),r=j(o.bookedValue,o.bookedRevenue);return{...o,bookedValue:r,bookedRevenue:r}}):[],s=Array.isArray(t.bySection)?t.bySection.map(Le):void 0;return{...e,report:{...t,byCategory:n,...s?{bySection:s}:{}}}}function We(i){let e=k(i),t=k(e.bookedValue),n=k(e.revenue),s=Object.keys(t).length?t:n,a=Array.isArray(t.bySection)?t.bySection:Array.isArray(n.bySection)?n.bySection:[],o={...s,gross:j(t.gross,n.gross),bySection:a.map(Le)},r=k(e.velocity),l=Array.isArray(r.bySection)?r.bySection.map(c=>{let d=k(c),u=j(d.bookedValue,d.grossRevenue);return{...d,bookedValue:u,grossRevenue:u}}):[];return{...e,bookedValue:o,revenue:o,velocity:{...r,bySection:l}}}function Qe(i){let e=k(i),t=k(e.report),n=typeof t.includesBookedValue=="boolean"?t.includesBookedValue:t.includesRevenue===!0,s=Array.isArray(t.rows)?t.rows.map(r=>{let l=k(r),c=k(l.attribution),d=Ce(c.bookedValue,c.revenue);return{...l,attribution:{...c,bookedValue:d,revenue:d}}}):[],a=k(t.totals),o=Ce(a.bookedValue,a.revenue);return{...e,report:{...t,includesBookedValue:n,includesRevenue:n,rows:s,totals:{...a,bookedValue:o,revenue:o}}}}function J(i){let e=k(i),t=typeof e.includesBookedValue=="boolean"?e.includesBookedValue:e.includesRevenue===!0;return{...e,includesBookedValue:t,includesRevenue:t}}var $e=class{constructor(e,t){this.base=e.replace(/\/+$/,""),this.token=t}setToken(e){this.token=e}auth(e,t={}){let n=t.method??"GET",s={Authorization:`Bearer ${this.token}`},a;return t.body!==void 0&&(s["Content-Type"]="application/json",a=JSON.stringify(t.body)),fetch(`${this.base}${e}`,{method:n,headers:s,body:a,credentials:"omit"}).then(o=>Se(o))}async authBlob(e){let t=await fetch(`${this.base}${e}`,{method:"GET",headers:{Authorization:`Bearer ${this.token}`},credentials:"omit"});return t.ok||await Se(t),t.blob()}chart(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/chart`)}asset(e,t){return/^[a-zA-Z0-9._-]+$/.test(t)?this.authBlob(`/v1/events/${encodeURIComponent(e)}/assets/${encodeURIComponent(t)}`):Promise.reject(new m(404,"not_found","not_found"))}objects(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/objects`)}subscribeTicket(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/subscribe-tickets`,{method:"POST"})}socketUrl(e){return`${this.base.replace(/^http/,"ws")}/pub/events/${encodeURIComponent(e)}/subscribe?surface=manager`}block(e,t,n={}){let s={labels:t};return typeof n.releaseAt=="number"&&(s.releaseAt=n.releaseAt),n.reason&&(s.reason=n.reason),this.auth(`/v1/events/${encodeURIComponent(e)}/block`,{method:"POST",body:s})}unblock(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/unblock`,{method:"POST",body:{labels:t}})}unblockAll(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/unblock-all`,{method:"POST"})}eventRequest(e,t,n={}){return this.auth(`/v1/events/${encodeURIComponent(e)}/${t}`,n)}unbook(e,t,n){return this.auth(`/v1/events/${encodeURIComponent(e)}/unbook`,{method:"POST",body:{labels:t,bookingRef:n}})}setHoldTtl(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/hold-ttl`,{method:"POST",body:{holdTtlMs:t}})}setCategory(e,t,n){return this.auth(`/v1/events/${encodeURIComponent(e)}/category-assignments`,{method:"POST",body:{labels:t,categoryKey:n}})}lookupOrders(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/orders/lookup?q=${encodeURIComponent(t)}`)}categoryDifferences(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/category-assignments`)}resetCategoriesToChart(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/category-assignments`,{method:"POST",body:{mode:"chart",...t?{labels:t}:{}}})}setTableBooking(e,t,n,s={}){return this.auth(`/v1/events/${encodeURIComponent(e)}/table-booking`,{method:"POST",body:{tableIds:t,mode:n,...s}})}bookings(e,t={}){let n=new URLSearchParams;t.q&&n.set("q",t.q),t.state&&n.set("state",t.state),t.cursor&&n.set("cursor",t.cursor),t.limit!=null&&n.set("limit",String(t.limit));let s=n.toString();return this.auth(`/v1/events/${encodeURIComponent(e)}/bookings${s?`?${s}`:""}`)}booking(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/bookings/${encodeURIComponent(t)}`)}listBookings(e,t={}){return this.bookings(e,t)}retrieveBooking(e,t){return this.booking(e,t)}availability(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/availability`)}setAvailability(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/availability`,{method:"POST",body:{rules:t}})}channels(e,t={}){let n=t.includeArchived?"?includeArchived=1":"";return this.auth(`/v1/events/${encodeURIComponent(e)}/channels${n}`)}channelAllocation(e,t={}){let n=new URLSearchParams;t.afterLabel&&n.set("afterLabel",t.afterLabel),t.limit!=null&&n.set("limit",String(t.limit));let s=n.toString();return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/allocation${s?`?${s}`:""}`)}channelAudit(e,t={}){let n=new URLSearchParams;t.limit!=null&&n.set("limit",String(t.limit)),t.before!=null&&n.set("before",String(t.before));let s=n.toString();return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/audit${s?`?${s}`:""}`)}createChannel(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels`,{method:"POST",body:t})}renameChannel(e,t,n){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}`,{method:"PATCH",body:{name:n}})}updateChannelPricing(e,t,n,s){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}`,{method:"PATCH",body:{priceOverrides:n,expectedPricingVersion:s}})}setChannelPaused(e,t,n){let s=n?"pause":"unpause";return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/${s}`,{method:"POST",body:{}})}archiveChannel(e,t,n){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/archive`,{method:"POST",body:{destination:n}})}applyChannelAssignment(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/assignments`,{method:"POST",body:{targetChannelId:t.targetChannelId||null,labels:t.labels,assignmentVersion:t.assignmentVersion}})}channelPreview(e,t,n={}){let s=new URLSearchParams;t.length&&s.set("channelIds",t.join(",")),n.includePublic!=null&&s.set("includePublic",n.includePublic?"1":"0");let a=s.toString();return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/preview${a?`?${a}`:""}`)}setChannelAccessIntent(e,t,n,s={}){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}`,{method:"PATCH",body:{accessIntent:n,...s.acknowledgeLiveAccess?{acknowledgeLiveAccess:!0}:{},...s.reason?{reason:s.reason}:{}}})}createAccessLink(e,t,n={}){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/access-links`,{method:"POST",body:n})}accessLinks(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/access-links`)}rotateAccessLink(e,t,n,s){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/access-links/${encodeURIComponent(n)}/rotate`,{method:"POST",body:{endActiveSessions:s}})}revokeAccessLink(e,t,n,s=!1){let a=s?"?endActiveSessions=1":"";return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/access-links/${encodeURIComponent(n)}${a}`,{method:"DELETE"})}report(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/report`).then(Ge)}seatHistory(e,t,n,s){let a=new URLSearchParams({label:t});return n&&a.set("before",String(n)),s&&a.set("action",s),this.auth(`/v1/events/${encodeURIComponent(e)}/seat-history?${a}`)}seatStory(e,t,n,s){let a=new URLSearchParams({label:t,v:"2"});return n&&a.set("before",String(n)),s&&a.set("action",s),this.auth(`/v1/events/${encodeURIComponent(e)}/seat-history?${a}`)}controlRoom(e,t=15){return this.auth(`/v1/events/${encodeURIComponent(e)}/control-room?window=${t}&activity=2`).then(We)}channelReport(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/report`).then(Qe)}createChannelReportLink(e,t,n={}){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/report-links`,{method:"POST",body:n}).then(s=>{let a=k(s);return{...a,link:J(a.link)}})}channelReportLinks(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/report-links`).then(n=>{let s=k(n);return{links:Array.isArray(s.links)?s.links.map(J):[]}})}revokeChannelReportLink(e,t,n){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/report-links/${encodeURIComponent(n)}`,{method:"DELETE"}).then(s=>{let a=k(s);return{...a,link:J(a.link)}})}log(e,t={}){let n=new URLSearchParams;t.limit!=null&&n.set("limit",String(t.limit)),t.before!=null&&n.set("before",String(t.before));let s=n.toString();return this.auth(`/v1/events/${encodeURIComponent(e)}/log${s?`?${s}`:""}`)}async reportCsv(e){let t=await fetch(`${this.base}/v1/events/${encodeURIComponent(e)}/report.csv`,{headers:{Authorization:`Bearer ${this.token}`},credentials:"omit"});if(!t.ok)throw new m(t.status,`request_failed_${t.status}`);return t.blob()}};function ee(i){return i.map((e,t)=>`
|
|
18
|
+
</button>`).join("")||'<p class="slm-ch-menuhead">This chart has no sections with free seats.</p>'}<p class="slm-ch-menuerr" data-ch-error hidden></p>`;let o=t?.parentElement??document.body;o.style.position=o===document.body?o.style.position:"relative",o.appendChild(a),this.menu=a;let r=()=>{a.remove(),this.menu===a&&(this.menu=null),document.removeEventListener("pointerdown",l,!0)},l=c=>{!a.contains(c.target)&&c.target!==t&&r()};document.addEventListener("pointerdown",l,!0),a.addEventListener("keydown",c=>{let d=[...a.querySelectorAll("button:not([disabled])")],u=d.indexOf(document.activeElement);c.key==="Escape"?(r(),t?.focus(),c.preventDefault()):(c.key==="ArrowDown"||c.key==="ArrowUp")&&(d[(u+(c.key==="ArrowDown"?1:-1)+d.length)%d.length]?.focus(),c.preventDefault())}),a.querySelectorAll("[data-ch-scope-id]").forEach(c=>c.addEventListener("click",()=>{let d=s.find(g=>g.id===c.dataset.chScopeId);if(!d)return;let u=new Set([...this.host.selectionLabels(),...d.labels]);if(u.size>n){let g=a.querySelector("[data-ch-error]");g.hidden=!1,g.textContent=`That would make ${je(u.size)}. One change can take up to ${n.toLocaleString()}.`;return}r(),this.host.selectByLabels([...u])})),a.querySelector("button:not([disabled])")?.focus()}};var f="public",C="Public sale";function $(i){return i==null||i===""||i===f}var V=["#a78bfa","#2dd4bf","#fb923c","#60a5fa","#f472b6","#a3e635","#f87171","#38bdf8","#c084fc","#facc15"],Ke="#f4b740",le="ABCDEFGHJKLMNPQRSTUVWXYZ";function P(i,e){let t=(i??"").trim();return((/\p{L}/u.exec(t)?.[0]??t[0]??"")||e).toUpperCase().slice(0,1)}function W(i,e){let t=new Set([...e].map(a=>P(a,"")).filter(Boolean)),n=P(i,"");return{letter:le.includes(n)&&!t.has(n)?n:[...le].find(a=>!t.has(a))??(n||"X"),color:V[t.size%V.length]}}function he(i,e=0){return $(i.id)?{letter:P(i.marker,"P"),color:i.color||Ke}:{letter:P(i.marker||i.name,"?"),color:i.color||V[e%V.length]}}function de(i,e,t){let n=new Map;for(let o of i){let r=X(e.get(o));n.set(r,(n.get(r)??0)+1)}let s=[{id:f,name:t?.publicSale?.name??C},...(t?.channels??[]).map(o=>({id:o.id,name:o.name}))],a=[];for(let o of s){let r=n.get(o.id);r&&a.push({channelId:o.id,name:o.name,count:r}),n.delete(o.id)}for(let[o,r]of n)a.push({channelId:o,name:$(o)?C:"Another channel",count:r});return a}function X(i){return $(i)?f:i}var ce=12;function K(i){return{count:i.length,labels:i.slice(0,ce),truncated:i.length>ce}}function ue(i){let{labels:e,allocation:t,statusOf:n,nameOf:s}=i,a=X(i.targetChannelId),o=new Set,r=0,l=0,c=new Map,d=[],u=[],g=[];for(let p of e){if(o.has(p))continue;o.add(p);let L=n(p);if(!L){g.push(p);continue}let A=X(t.get(p));if(A===a){l+=1;continue}if(L==="held"){d.push(p);continue}if(L==="booked"){u.push(p);continue}A===f?r+=1:c.set(A,(c.get(A)??0)+1)}let x=[...c.entries()].map(([p,L])=>({channelId:p,name:s(p),count:L}));return{changedFromPublic:{count:r},movedFromOtherChannel:{count:x.reduce((p,L)=>p+L.count,0),channels:x},alreadyInTarget:{count:l},skippedHeld:K(d),skippedBooked:K(u),notFound:K(g)}}function F(i){return i.changedFromPublic.count+i.movedFromOtherChannel.count}function Et(i){return i.movedFromOtherChannel.count>0}function pe(i,e){let t=[];i.changedFromPublic.count&&t.push({kind:"add",icon:"+",count:i.changedFromPublic.count,text:`${i.changedFromPublic.count.toLocaleString()} from ${C}`});for(let n of i.movedFromOtherChannel.channels)t.push({kind:"move",icon:"\u21C4",count:n.count,text:`${n.count.toLocaleString()} moved out of ${n.name??"another channel"}`,why:"this needs your OK"});return i.alreadyInTarget.count&&t.push({kind:"same",icon:"=",count:i.alreadyInTarget.count,text:`${i.alreadyInTarget.count.toLocaleString()} already in ${e}`,why:"unchanged"}),i.skippedHeld.count&&t.push({kind:"skip",icon:"\u23F8",count:i.skippedHeld.count,text:`${i.skippedHeld.count.toLocaleString()} in a buyer's cart`,why:"can't move while held",peek:N(i.skippedHeld)}),i.skippedBooked.count&&t.push({kind:"skip",icon:"\u{1F512}",count:i.skippedBooked.count,text:`${i.skippedBooked.count.toLocaleString()} already sold`,why:"sales are never rewritten",peek:N(i.skippedBooked)}),i.notFound.count&&t.push({kind:"skip",icon:"?",count:i.notFound.count,text:`${i.notFound.count.toLocaleString()} not on this map`,why:"these seats are no longer part of the event",peek:N(i.notFound)}),t}function N(i){if(!i.labels.length)return;let e=i.labels.slice(0,4).join(", ");return i.truncated||i.labels.length>4?`${e}\u2026`:e}function me(i){let e=i?.retryAfterMs??(i?.latestHoldExpiresAt?Math.max(0,i.latestHoldExpiresAt-Date.now()):0);if(!e)return"in a moment";let t=Math.ceil(e/6e4);return t<=1?"in about a minute":`in about ${t} minutes`}function ge(i){if(!i||!i.intent)return"\u2014";let e=i.intent==="server"?"Your website or app":i.intent==="hosted_link"?"Buyer links":i.intent==="internal"?"Your own staff sell these":i.intent==="venue"?"A partner sells them":"Protected reserve",t=i.hasActiveGrants?"in use now":i.lastMintAt?`last used ${new Date(i.lastMintAt).toLocaleDateString()}`:null,n=i.detail??t;return n?`${e} \xB7 ${n}`:e}function H(i){return i==="internal"?"Sell through your own staff":i==="server"?"Integrate a website or app":i==="hosted_link"?"Sell with a buyer link":"Keep as protected reserve"}function Pt(i){switch(i){case"internal":return"Only your own box office can sell these seats, through your secret key. Buyer links and website integrations are refused.";case"server":return"Your website's backend mints each buyer a short-lived session for these seats. Buyer links are refused; the code lives on the Embed page.";case"hosted_link":return"SeatLayer makes a link you send to a named group. They open it and buy only these seats. No other route can sell them.";default:return"Nobody can buy these seats. Every way of letting a buyer in \u2014 a buyer link, your website, even your own staff \u2014 is refused while this is the route. The seats stay out of public sale."}}function Xe(i){return i==="hosted_link"?"hosted_link":i==="server"?"server":i==="staff"?"internal":null}function z(i){let e=G(i?.accessIntent),t=Xe(i?.route),n=`This channel is set to "${H(e)}"`;return t?`${n}, so it cannot do that. Switch it to "${H(t)}" first.`:`${n}, so it cannot do that. Choose a different route for this channel first.`}function G(i){return i==="internal"||i==="server"||i==="hosted_link"||i==="none"||i==="venue"?i:"none"}function U(i,e,t){return`${i.toLocaleString()} ${i===1?e:t}`}function be(i){let e=Math.max(0,i?.liveAccessLinks??0),t=Math.max(0,i?.activeSessions??0),n=G(i?.from),s=G(i?.to),o=`${[e?U(e,"buyer link is live","buyer links are live"):null,t?U(t,"buyer is in a checkout","buyers are in a checkout"):null].filter(Boolean).join(", and ")||"Buyers are inside this channel"} on "${H(n)}". Moving it to "${H(s)}" changes what happens to them.`,r=[];return e&&r.push(`${U(e,"buyer link closes","buyer links close")} immediately. Anyone who has not opened it yet never will \u2014 send a new link if you still need one.`),t&&r.push(`${U(t,"buyer who is already in a checkout keeps","buyers who are already in a checkout keep")} their seats and can finish paying. Nobody is thrown out. No new buyers come in this way, so the old route empties on its own within 12 hours.`),{headline:o,consequences:r}}var Q={maxRedemptions:100,maxQuantity:4};function ve(i){switch(i.status??i.state){case"active":return{text:"Active",kind:"active"};case"expired":return{text:"Expired",kind:"archived"};case"exhausted":return{text:"All used",kind:"paused"};case"rotated":return{text:"Replaced",kind:"archived"};default:return{text:"Revoked",kind:"archived"}}}function fe(i){return i.state==="active"&&i.status==="active"}function Z(i){return Number.isFinite(i)?new Date(i).toLocaleString(void 0,{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit"}):"\u2014"}function Tt(i){return[{k:"Expires",v:Z(i.expiresAt)},{k:"Redemptions",v:`${i.redemptions.toLocaleString()} of ${i.maxRedemptions.toLocaleString()} used`},{k:"Seats per buyer",v:`${i.maxQuantity.toLocaleString()} seat${i.maxQuantity===1?"":"s"} maximum`},{k:"Covers",v:i.includePublic?"This channel's allocation and Public sale seats":"This channel's allocation only"}]}function ye(i){return[`${i.redemptions.toLocaleString()} of ${i.maxRedemptions.toLocaleString()} used`,`${i.maxQuantity.toLocaleString()} ${i.maxQuantity===1?"seat":"seats"} per buyer`,`ends ${Z(i.expiresAt)}`,i.includePublic?"with Public sale seats":"",i.activeSessions?`${i.activeSessions.toLocaleString()} ${i.activeSessions===1?"buyer":"buyers"} inside now`:""].filter(Boolean).join(" \xB7 ")}function ke(i){let e=`${i.maxQuantity.toLocaleString()} ${i.maxQuantity===1?"seat":"seats"} each`,t=`${i.maxRedemptions.toLocaleString()} ${i.maxRedemptions===1?"person":"people"} in all`;return`Anyone with this link can buy up to ${e}, ${t}, until ${Z(i.expiresAt)}.`+(i.includePublic?" It also opens Public sale seats.":"")}function O(i){let e=i?.serverMessage?.trim();switch(i?.code){case"invalid_expiry":case"invalid_max_redemptions":case"invalid_max_quantity":case"invalid_session_ttl":case"invalid_label":return e||"That setting is outside what a hosted link allows. Adjust it and try again.";case"too_many_access_links":return e||"This channel already has as many live links as it can hold. Revoke one before creating another.";case"access_link_not_active":return"That link is no longer active, so it cannot be rotated or revoked.";case"channel_unavailable":return"This channel is paused or archived, so it cannot let new buyers in. Resume it first.";case"channel_access_intent_forbids":return z(i?.details);case"end_active_sessions_required":return"Choose what happens to the buyers who already came in through this link.";case"not_found":return"That link is no longer here. Refresh and try again.";default:return i?.status===403?"Hosted access links need channel-management permission.":e||"That did not go through. Try again."}}function Mt(i){return(i?.channels??[]).map(e=>({kind:"skip",icon:"\u26A0",count:e.count,text:`${e.count.toLocaleString()} would leave ${e.name??"a channel"}`,why:"the new chart no longer has these seats",peek:e.labels?.length?N({count:e.count,labels:e.labels,truncated:e.truncated??!1}):void 0}))}function we(i){return i==="builtin"?"Built-in":i==="active"?"Active":i==="paused"?"Paused":"Archived"}var xe=Symbol.for("seatlayer.ManageApiError"),m=class extends Error{static[Symbol.hasInstance](e){return typeof e=="object"&&e!==null&&e[xe]===!0}constructor(e,t,n,s,a,o){super(t),Object.defineProperty(this,xe,{value:!0}),this.name="ManageApiError",this.status=e,this.code=n,this.conflicts=s,this.details=a,this.serverMessage=o}};async function Se(i){let t=(i.headers.get("content-type")??"").includes("application/json")?await i.json().catch(()=>null):null;if(!i.ok){let n=t;throw new m(i.status,n?.error??`request_failed_${i.status}`,n?.code,n?.conflicts,n?.details,typeof n?.message=="string"?n.message:void 0)}return t}function k(i){return i&&typeof i=="object"?i:{}}function j(i,e,t=0){return typeof i=="number"&&Number.isFinite(i)?i:typeof e=="number"&&Number.isFinite(e)?e:t}function Ce(i,e){return i===null?null:typeof i=="number"&&Number.isFinite(i)?i:i!==void 0?null:typeof e=="number"&&Number.isFinite(e)?e:null}function Le(i){let e=k(i),t=j(e.bookedValue,e.bookedRevenue);return{...e,bookedValue:t,bookedRevenue:t}}function Ge(i){let e=k(i),t=k(e.report),n=Array.isArray(t.byCategory)?t.byCategory.map(a=>{let o=k(a),r=j(o.bookedValue,o.bookedRevenue);return{...o,bookedValue:r,bookedRevenue:r}}):[],s=Array.isArray(t.bySection)?t.bySection.map(Le):void 0;return{...e,report:{...t,byCategory:n,...s?{bySection:s}:{}}}}function We(i){let e=k(i),t=k(e.bookedValue),n=k(e.revenue),s=Object.keys(t).length?t:n,a=Array.isArray(t.bySection)?t.bySection:Array.isArray(n.bySection)?n.bySection:[],o={...s,gross:j(t.gross,n.gross),bySection:a.map(Le)},r=k(e.velocity),l=Array.isArray(r.bySection)?r.bySection.map(c=>{let d=k(c),u=j(d.bookedValue,d.grossRevenue);return{...d,bookedValue:u,grossRevenue:u}}):[];return{...e,bookedValue:o,revenue:o,velocity:{...r,bySection:l}}}function Qe(i){let e=k(i),t=k(e.report),n=typeof t.includesBookedValue=="boolean"?t.includesBookedValue:t.includesRevenue===!0,s=Array.isArray(t.rows)?t.rows.map(r=>{let l=k(r),c=k(l.attribution),d=Ce(c.bookedValue,c.revenue);return{...l,attribution:{...c,bookedValue:d,revenue:d}}}):[],a=k(t.totals),o=Ce(a.bookedValue,a.revenue);return{...e,report:{...t,includesBookedValue:n,includesRevenue:n,rows:s,totals:{...a,bookedValue:o,revenue:o}}}}function J(i){let e=k(i),t=typeof e.includesBookedValue=="boolean"?e.includesBookedValue:e.includesRevenue===!0;return{...e,includesBookedValue:t,includesRevenue:t}}var $e=class{constructor(e,t){this.base=e.replace(/\/+$/,""),this.token=t}setToken(e){this.token=e}auth(e,t={}){let n=t.method??"GET",s={Authorization:`Bearer ${this.token}`},a;return t.body!==void 0&&(s["Content-Type"]="application/json",a=JSON.stringify(t.body)),fetch(`${this.base}${e}`,{method:n,headers:s,body:a,credentials:"omit"}).then(o=>Se(o))}async authBlob(e){let t=await fetch(`${this.base}${e}`,{method:"GET",headers:{Authorization:`Bearer ${this.token}`},credentials:"omit"});return t.ok||await Se(t),t.blob()}chart(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/chart`)}asset(e,t){return/^[a-zA-Z0-9._-]+$/.test(t)?this.authBlob(`/v1/events/${encodeURIComponent(e)}/assets/${encodeURIComponent(t)}`):Promise.reject(new m(404,"not_found","not_found"))}objects(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/objects`)}subscribeTicket(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/subscribe-tickets`,{method:"POST"})}socketUrl(e){return`${this.base.replace(/^http/,"ws")}/pub/events/${encodeURIComponent(e)}/subscribe?surface=manager`}block(e,t,n={}){let s={labels:t};return typeof n.releaseAt=="number"&&(s.releaseAt=n.releaseAt),n.reason&&(s.reason=n.reason),this.auth(`/v1/events/${encodeURIComponent(e)}/block`,{method:"POST",body:s})}unblock(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/unblock`,{method:"POST",body:{labels:t}})}unblockAll(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/unblock-all`,{method:"POST"})}eventRequest(e,t,n={}){return this.auth(`/v1/events/${encodeURIComponent(e)}/${t}`,n)}unbook(e,t,n){return this.auth(`/v1/events/${encodeURIComponent(e)}/unbook`,{method:"POST",body:{labels:t,bookingRef:n}})}setHoldTtl(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/hold-ttl`,{method:"POST",body:{holdTtlMs:t}})}setCategory(e,t,n){return this.auth(`/v1/events/${encodeURIComponent(e)}/category-assignments`,{method:"POST",body:{labels:t,categoryKey:n}})}lookupOrders(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/orders/lookup?q=${encodeURIComponent(t)}`)}categoryDifferences(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/category-assignments`)}resetCategoriesToChart(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/category-assignments`,{method:"POST",body:{mode:"chart",...t?{labels:t}:{}}})}setTableBooking(e,t,n,s={}){return this.auth(`/v1/events/${encodeURIComponent(e)}/table-booking`,{method:"POST",body:{tableIds:t,mode:n,...s}})}bookings(e,t={}){let n=new URLSearchParams;t.q&&n.set("q",t.q),t.state&&n.set("state",t.state),t.cursor&&n.set("cursor",t.cursor),t.limit!=null&&n.set("limit",String(t.limit));let s=n.toString();return this.auth(`/v1/events/${encodeURIComponent(e)}/bookings${s?`?${s}`:""}`)}booking(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/bookings/${encodeURIComponent(t)}`)}listBookings(e,t={}){return this.bookings(e,t)}retrieveBooking(e,t){return this.booking(e,t)}availability(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/availability`)}setAvailability(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/availability`,{method:"POST",body:{rules:t}})}channels(e,t={}){let n=t.includeArchived?"?includeArchived=1":"";return this.auth(`/v1/events/${encodeURIComponent(e)}/channels${n}`)}channelAllocation(e,t={}){let n=new URLSearchParams;t.afterLabel&&n.set("afterLabel",t.afterLabel),t.limit!=null&&n.set("limit",String(t.limit));let s=n.toString();return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/allocation${s?`?${s}`:""}`)}channelAudit(e,t={}){let n=new URLSearchParams;t.limit!=null&&n.set("limit",String(t.limit)),t.before!=null&&n.set("before",String(t.before));let s=n.toString();return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/audit${s?`?${s}`:""}`)}createChannel(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels`,{method:"POST",body:t})}renameChannel(e,t,n){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}`,{method:"PATCH",body:{name:n}})}updateChannelPricing(e,t,n,s){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}`,{method:"PATCH",body:{priceOverrides:n,expectedPricingVersion:s}})}setChannelPaused(e,t,n){let s=n?"pause":"unpause";return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/${s}`,{method:"POST",body:{}})}archiveChannel(e,t,n){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/archive`,{method:"POST",body:{destination:n}})}applyChannelAssignment(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/assignments`,{method:"POST",body:{targetChannelId:t.targetChannelId||null,labels:t.labels,assignmentVersion:t.assignmentVersion}})}channelPreview(e,t,n={}){let s=new URLSearchParams;t.length&&s.set("channelIds",t.join(",")),n.includePublic!=null&&s.set("includePublic",n.includePublic?"1":"0");let a=s.toString();return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/preview${a?`?${a}`:""}`)}setChannelAccessIntent(e,t,n,s={}){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}`,{method:"PATCH",body:{accessIntent:n,...s.acknowledgeLiveAccess?{acknowledgeLiveAccess:!0}:{},...s.reason?{reason:s.reason}:{}}})}createAccessLink(e,t,n={}){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/access-links`,{method:"POST",body:n})}accessLinks(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/access-links`)}rotateAccessLink(e,t,n,s){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/access-links/${encodeURIComponent(n)}/rotate`,{method:"POST",body:{endActiveSessions:s}})}revokeAccessLink(e,t,n,s=!1){let a=s?"?endActiveSessions=1":"";return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/access-links/${encodeURIComponent(n)}${a}`,{method:"DELETE"})}report(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/report`).then(Ge)}seatHistory(e,t,n,s){let a=new URLSearchParams({label:t});return n&&a.set("before",String(n)),s&&a.set("action",s),this.auth(`/v1/events/${encodeURIComponent(e)}/seat-history?${a}`)}seatStory(e,t,n,s){let a=new URLSearchParams({label:t,v:"2"});return n&&a.set("before",String(n)),s&&a.set("action",s),this.auth(`/v1/events/${encodeURIComponent(e)}/seat-history?${a}`)}controlRoom(e,t=15){return this.auth(`/v1/events/${encodeURIComponent(e)}/control-room?window=${t}&activity=2`).then(We)}channelReport(e){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/report`).then(Qe)}createChannelReportLink(e,t,n={}){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/report-links`,{method:"POST",body:n}).then(s=>{let a=k(s);return{...a,link:J(a.link)}})}channelReportLinks(e,t){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/report-links`).then(n=>{let s=k(n);return{links:Array.isArray(s.links)?s.links.map(J):[]}})}revokeChannelReportLink(e,t,n){return this.auth(`/v1/events/${encodeURIComponent(e)}/channels/${encodeURIComponent(t)}/report-links/${encodeURIComponent(n)}`,{method:"DELETE"}).then(s=>{let a=k(s);return{...a,link:J(a.link)}})}log(e,t={}){let n=new URLSearchParams;t.limit!=null&&n.set("limit",String(t.limit)),t.before!=null&&n.set("before",String(t.before));let s=n.toString();return this.auth(`/v1/events/${encodeURIComponent(e)}/log${s?`?${s}`:""}`)}async reportCsv(e){let t=await fetch(`${this.base}/v1/events/${encodeURIComponent(e)}/report.csv`,{headers:{Authorization:`Bearer ${this.token}`},credentials:"omit"});if(!t.ok)throw new m(t.status,`request_failed_${t.status}`);return t.blob()}};function ee(i){return i.map((e,t)=>`
|
|
19
19
|
<div class="slm-ch-bucket" style="animation-delay:${Math.min(t,4)*30}ms">
|
|
20
20
|
<span class="ico ${e.kind}" aria-hidden="true">${h(e.icon)}</span>
|
|
21
21
|
<span><b>${e.count.toLocaleString()}</b> ${h(e.text.replace(/^[\d,.\s]+/,""))}
|
|
@@ -283,7 +283,7 @@ import{a as ne,m as S}from"./chunk-3IZZM7EV.js";var ie={tag:'<path d="M3.5 12.2V
|
|
|
283
283
|
.slm-ch-staged.shake{outline:2px solid #e5484d;outline-offset:2px}
|
|
284
284
|
.slm-ch-staged.done{outline:2px solid #5bd39b;outline-offset:2px}
|
|
285
285
|
}
|
|
286
|
-
`;var ut=3e4,I=5e3,Y=ae({glyph:"route",hue:"#ea7a1e",title:"Channels",purpose:"Give seats to a sales channel, such as the box office or a partner, and decide how buyers reach them.",how:"channels"}),He=3e4,pt='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#8b5cf6" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3.5 12.2V4.5a1 1 0 0 1 1-1h7.7l8.3 8.3a1.4 1.4 0 0 1 0 2l-6.3 6.3a1.4 1.4 0 0 1-2 0z"/><circle cx="8" cy="8" r="1.6"/></svg>',mt={hosted_link:["Buyer links","Only people with a link can buy these seats."],server:["Your website or app","Your integration lets buyers in."],internal:["Your own staff","Sold at the box office or by phone."],none:["Protected reserve","
|
|
286
|
+
`;var ut=3e4,I=5e3,Y=ae({glyph:"route",hue:"#ea7a1e",title:"Channels",purpose:"Give seats to a sales channel, such as the box office or a partner, and decide how buyers reach them.",how:"channels"}),He=3e4,pt='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#8b5cf6" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3.5 12.2V4.5a1 1 0 0 1 1-1h7.7l8.3 8.3a1.4 1.4 0 0 1 0 2l-6.3 6.3a1.4 1.4 0 0 1-2 0z"/><circle cx="8" cy="8" r="1.6"/></svg>',mt={hosted_link:["Buyer links","Only people with a link can buy these seats."],server:["Your website or app","Your integration lets buyers in."],internal:["Your own staff","Sold at the box office or by phone."],none:["Protected reserve","Open to nobody. They leave your counts until you open them."],venue:["A partner sells them","On its own system. They count as on sale, with their own number."]},gt='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#64748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8.5 5L4 9.5 8.5 14"/><path d="M4 9.5h10a6 6 0 0 1 0 12h-3"/></svg>',bt='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#ea7a1e" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>',vt='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#d99a0b" stroke-width="1.9" stroke-linejoin="round" aria-hidden="true"><path d="M5 3.5l13 7-5.6 1.6L10 18z"/></svg>',De=class{constructor(e,t){this.active=!1;this.list=null;this.allocation=new Map;this.assignmentVersion=0;this.loadError=null;this.loading=!0;this.view="inspect";this.mapIntent="pan";this.focusedSectionId=null;this.showArchived=!1;this.detailChannelId=null;this.assignOpen=!1;this.targetChannelId="";this.conflict=!1;this.applied=null;this.railNote=null;this.appliedTimer=null;this.dialog=null;this.detent="medium";this.links=[];this.linksChannelId=null;this.linksState="idle";this.listSeq=0;this.linksSeq=0;this.previewAudience=[];this.previewIncludePublic=!1;this.previewProjection=null;this.previewState="idle";this.pollTimer=null;this.layer=null;this.canvas=null;this.overlayVisible=!0;this.ctx=void 0;this.bannerEl=null;this.stagedEl=null;this.liveEl=null;this.scrimEl=null;this.lastFocus=null;this.stagedDoneTimer=null;this.lastSelectionCount=0;this.lastCounts=new Map;this.railHtml=null;this.allocationVersion=null;this.onVisibility=null;this.host=e,this.caps=t;let n={selectionLabels:()=>e.selectionLabels(),selectByLabels:s=>e.selectByLabels(s),clearSelection:()=>e.clearSelection(),selectSection:s=>e.selectSection(s),sections:()=>e.sections(),labelsInSection:s=>e.labelsInSection(s),rows:()=>e.rows(),categories:()=>e.categories(),labelsInCategory:s=>e.labelsInCategory(s),seats:()=>e.seats(),statusOf:s=>e.statusOf(s),sectionOfLabel:s=>e.sectionOfLabel(s),seatMeta:s=>{let a=this.allocation.get(s)??f;return`${this.nameOf(a)??C} \xB7 ${e.statusOf(s)??"free"}`},openDialog:(s,a)=>this.renderScrim(s,a),closeDialog:()=>this.closeDialog(),pickers:e.pickers,pickerFailed:e.pickerFailed,enhanceDialog:e.enhanceDialog,cap:I};this.chooser=new q(n)}enter(){this.active||(this.active=!0,this.mapIntent="pan",this.assignOpen=!1,this.focusedSectionId=null,this.chooser.reset(),this.railHtml=null,this.ensureLayer(),this.host.root.classList.add("ch-mode"),this.applySheetClasses(),this.host.sections().length>1&&this.host.showSectionOverview(),this.paintRail(),this.onInteractionChange?.(),this.refresh(),this.pollTimer=setInterval(()=>{typeof document<"u"&&document.hidden||this.refresh({quiet:!0})},ut),typeof document<"u"&&typeof document.addEventListener=="function"&&(this.onVisibility=()=>{this.active&&!document.hidden&&this.refresh({quiet:!0})},document.addEventListener("visibilitychange",this.onVisibility)))}leave(){this.active&&(this.active=!1,this.pollTimer&&clearInterval(this.pollTimer),this.pollTimer=null,this.onVisibility&&typeof document<"u"&&document.removeEventListener("visibilitychange",this.onVisibility),this.onVisibility=null,this.railHtml=null,this.closeDialog({restoreFocus:!1}),this.links=[],this.linksChannelId=null,this.linksState="idle",this.layer?.classList.remove("on"),this.host.root.classList.remove("ch-mode","ch-preview","ch-sheet","detent-collapsed","detent-medium","detent-full"),this.host.setMapInert(!1),this.setBanner(!1),this.setStaged(null))}destroy(){this.leave(),this.stagedDoneTimer&&clearTimeout(this.stagedDoneTimer),this.layer?.remove(),this.layer=null,this.bannerEl?.remove(),this.bannerEl=null}setCapabilities(e){this.caps=e,this.active&&this.paintRail()}isActive(){return this.active}canSelect(){return this.caps.manage&&this.view==="inspect"}usesMarqueeSelection(){return this.canSelect()&&this.mapIntent==="assign"}handleSectionFocus(e){this.active&&(this.focusedSectionId=e,this.paintRail())}applyRealtimeHint(){this.active&&this.refresh({quiet:!0})}handleSelectionChange(){this.active&&(this.paintSelection(),this.paintStagedBar())}handleViewChange(){this.active&&this.paintOverlay()}handleLayoutChange(){this.active&&(this.applySheetClasses(),this.paintOverlay())}async refresh(e={}){if(!this.caps.view)return;let t=++this.listSeq,n=()=>t!==this.listSeq;try{let s=await this.host.api.channels(this.host.eventKey,{includeArchived:this.showArchived});if(n())return;if(this.list=s,this.assignmentVersion=s.assignmentVersion,this.loadError=null,this.targetChannelId||(this.targetChannelId=s.channels.find(a=>a.state==="active")?.id??f),this.allocationVersion!==s.assignmentVersion){if(await this.loadAllocation(t),n())return;this.allocationVersion=s.assignmentVersion}if(this.detailChannelId&&await this.loadLinks(this.detailChannelId),n())return;this.loading=!1,this.active&&(this.paintRail(),this.paintOverlay()),this.host.channelsChanged?.()}catch(s){if(n())return;this.loading=!1,s instanceof m&&s.status===403&&(this.caps={view:!1,manage:!1}),this.loadError=s,e.quiet||this.host.onError(s),this.active&&this.paintRail()}}async loadAllocation(e){let t=new Map,n;for(let s=0;s<200;s+=1){if(e!==void 0&&e!==this.listSeq)return;let a=await this.host.api.channelAllocation(this.host.eventKey,{afterLabel:n,limit:1e3});for(let o of a.allocations)$(o.channelId)||t.set(o.label,o.channelId);if(this.assignmentVersion=a.assignmentVersion,!a.nextAfterLabel)break;n=a.nextAfterLabel}e!==void 0&&e!==this.listSeq||(this.allocation=t)}legendChannels(){return this.list?[{label:this.list.publicSale.name||C,color:"#c9d0dc",free:this.list.publicSale.counts.free},...this.list.channels.filter(e=>e.archivedAt==null).map(e=>({label:e.name,color:this.markerFor(e.id).color,free:e.counts.allocated?e.counts.free:-1}))]:[]}channelById(e){if($(e))return{id:f,name:this.list?.publicSale?.name??C,marker:"P",color:null};let t=this.list?.channels.find(n=>n.id===e);return t?{id:e,name:t.name,marker:t.marker,color:t.color}:null}nameOf(e){return this.channelById(e)?.name??null}channelNameForLabel(e){return this.list?this.nameOf(this.allocation.get(e)??f):null}plateHtml(e=""){let t=this.markerFor(e);return`<span class="slm-ch-mk" style="background:${h(t.color)}" aria-hidden="true">${h(t.letter)}</span>`}markerFor(e){let t=Math.max(0,this.list?.channels.findIndex(s=>s.id===e)??0),n=this.channelById(e);return he(n??{id:e,name:"?",marker:null,color:null},t)}assignableChannels(){return[{id:f,name:this.list?.publicSale.name??C},...(this.list?.channels??[]).filter(e=>e.state!=="archived").map(e=>({id:e.id,name:e.name}))]}currentPlan(){let e=this.host.selectionLabels(),t=ue({labels:e,targetChannelId:this.targetChannelId,allocation:this.allocation,statusOf:n=>this.host.statusOf(n),nameOf:n=>this.nameOf(n)});return{labels:e,buckets:t,target:this.targetChannelId}}ensureLayer(){if(this.layer)return;let e=document.createElement("div");e.className="slm-ch-layer",e.innerHTML=`
|
|
287
287
|
<canvas class="slm-ch-canvas" data-ch="canvas" aria-hidden="true"></canvas>
|
|
288
288
|
<div class="slm-ch-banner" data-ch="banner" role="status"></div>
|
|
289
289
|
<div class="slm-ch-staged" data-ch="staged" role="group" aria-label="Staged channel changes"></div>
|
|
@@ -365,11 +365,13 @@ import{a as ne,m as S}from"./chunk-3IZZM7EV.js";var ie={tag:'<path d="M3.5 12.2V
|
|
|
365
365
|
<span class="top"><b>${l}</b>${r?`<span class="cur">Current</span>${a==="server"?'<button type="button" class="slm-linkbtn" data-ch-act="embed-code">Get embed code</button>':""}`:`<button type="button" class="slm-btn ghost slm-ch-small" data-ch-act="${h(o)}">Switch</button>`}</span>
|
|
366
366
|
<span class="why">${c}</span>
|
|
367
367
|
</div>`};return`
|
|
368
|
+
${t==="none"&&this.host.openSeats?'<button type="button" class="slm-btn" style="width:100%;margin-top:12px" data-ch-act="open-seats">Open seats\u2026</button>':""}
|
|
368
369
|
<p class="slm-eyebrow" style="margin-top:14px">How buyers reach it</p>
|
|
369
370
|
${n||t==="hosted_link"?s("hosted_link","link-create"):""}
|
|
370
371
|
${s("server","embed-code")}
|
|
371
372
|
${s("internal","route-internal")}
|
|
372
373
|
${s("none","route-none")}
|
|
374
|
+
${s("venue","route-venue")}
|
|
373
375
|
${this.hostedLinksHtml(t==="hosted_link")}
|
|
374
376
|
${t==="server"?Ae:""}`}async loadLinks(e){if(!this.caps.view)return;let t=++this.linksSeq,n=()=>t!==this.linksSeq||this.linksChannelId!==e;this.linksChannelId!==e&&(this.links=[],this.linksChannelId=e,this.linksState="loading");try{let s=await this.host.api.accessLinks(this.host.eventKey,e);if(n())return;this.links=s.links??[],this.linksState="ready"}catch(s){if(n())return;let a=s instanceof m?s.status:0;this.links=[],this.linksState=a===404||a===405||a===501?"unsupported":"error",this.linksState==="error"&&this.host.onError(s)}}hostedLinksHtml(e=!1){let t='<p class="slm-eyebrow" style="margin-top:14px">Buyer links</p>';return this.linksState==="unsupported"?`${t}<div data-ch-state="links-unsupported">${v("info","Buyer links need a newer server"," Everything else on this channel works normally.")}</div>`:this.linksState==="error"?`${t}<div data-ch-state="links-error" role="alert">${v("error","Couldn't load this channel's links"," This is a failed read, not an empty list; any live link is still working.").replace(' role="alert"',"")}</div>
|
|
375
377
|
<button type="button" class="slm-btn ghost slm-ch-small" data-ch-act="link-reload">Try again</button>`:this.linksState==="idle"||this.linksState==="loading"&&!this.links.length?`${t}<div class="slm-ch-busy" role="status" data-ch-state="links-loading">Loading buyer links\u2026</div>`:this.links.length?`${t}
|
|
@@ -392,7 +394,7 @@ import{a as ne,m as S}from"./chunk-3IZZM7EV.js";var ie={tag:'<path d="M3.5 12.2V
|
|
|
392
394
|
<select class="slm-select" id="slm-ch-audience" data-ch-audience>${n}</select>
|
|
393
395
|
</div>
|
|
394
396
|
${x}
|
|
395
|
-
${o}${r}${a}${d}${g}`}paintSelection(){this.caps.manage&&this.host.selectionLabels().length&&(this.assignOpen=!0),this.view==="inspect"&&!this.detailChannelId&&this.paintRail()}wireRail(){let e=this.host.rail;e.querySelectorAll("[data-ch-view]").forEach(o=>{o.addEventListener("click",()=>this.setView(o.dataset.chView))}),e.querySelectorAll("[data-ch-map]").forEach(o=>{o.addEventListener("click",()=>{this.mapIntent=o.dataset.chMap==="assign"?"assign":"pan",this.mapIntent==="assign"&&(this.assignOpen=!0),this.paintRail(),this.onInteractionChange?.()})}),e.querySelectorAll("[data-ch-open]").forEach(o=>{let r=()=>this.openChannel(o.dataset.chOpen);o.addEventListener("click",r),o.addEventListener("keydown",l=>{l.key!=="Enter"&&l.key!==" "&&l.key!=="Spacebar"||(l.preventDefault(),r())})}),e.querySelectorAll("[data-ch-menu]").forEach(o=>{o.addEventListener("click",r=>{r.stopPropagation(),this.openDialog({kind:"menu",channelId:o.dataset.chMenu})}),o.addEventListener("keydown",r=>{r.stopPropagation()})}),e.querySelectorAll("[data-ch-rotate]").forEach(o=>{o.addEventListener("click",()=>this.openDialog({kind:"linkRotate",channelId:this.detailChannelId,linkId:o.dataset.chRotate}))}),e.querySelectorAll("[data-ch-revoke]").forEach(o=>{o.addEventListener("click",()=>this.openDialog({kind:"linkRevoke",channelId:this.detailChannelId,linkId:o.dataset.chRevoke}))});let t=e.querySelector("[data-ch-target]");t?.addEventListener("change",()=>{this.targetChannelId=t.value,this.conflict=!1,this.paintRail()});let n=e.querySelector("[data-ch-audience]");n?.addEventListener("change",()=>{this.previewAudience=[n.value],this.loadPreview()});let s=e.querySelector("[data-ch-includepublic]");s?.addEventListener("change",()=>{this.previewIncludePublic=s.checked,this.loadPreview()}),e.querySelector(".slm-ch-grab")?.addEventListener("click",()=>this.cycleDetent()),e.querySelectorAll("[data-ch-act]").forEach(o=>{o.addEventListener("click",()=>this.railAction(o.dataset.chAct))}),this.chooser.wireFind(e)}openChannel(e){this.detailChannelId=e,this.paintRail(),this.loadLinks(e).then(()=>this.paintRail())}railAction(e){switch(e){case"sections":this.focusedSectionId=null,this.host.showSectionOverview(),this.paintRail();break;case"create":this.openDialog({kind:"create"});break;case"review":this.openDialog({kind:"review"});break;case"rename":this.openDialog({kind:"rename",channelId:this.detailChannelId});break;case"pricing":this.openDialog({kind:"pricing",channelId:this.detailChannelId});break;case"archive":this.openDialog({kind:"archive",channelId:this.detailChannelId});break;case"seatlist":this.openDialog({kind:"seatlist"});break;case"pause":this.togglePause();break;case"discard":this.host.clearSelection();break;case"applied-details":this.applied&&this.openDialog({kind:"review",applied:this.applied.result});break;case"undo-applied":this.undoApplied();break;case"back":this.detailChannelId=null,this.linksChannelId=null,this.links=[],this.linksState="idle",this.paintRail();break;case"link-create":this.openDialog({kind:"linkCreate",channelId:this.detailChannelId});break;case"embed-code":this.chooseWebsiteIntegration();break;case"route-internal":this.setAccessIntent("internal");break;case"route-none":this.setAccessIntent("none");break;case"link-reload":this.detailChannelId&&this.reloadLinks();break;case"retry":this.refresh();break;case"toggle-archived":this.showArchived=!this.showArchived,this.refresh();break;case"refresh-review":this.conflict=!1,this.refresh().then(()=>this.openDialog({kind:"review"}));break;case"pick-sections":this.openDialog({kind:"scope",scope:"sections"});break;case"pick-rows":this.openDialog({kind:"scope",scope:"rows"});break;case"drag-select":this.mapIntent="assign",this.paintRail(),this.onInteractionChange?.();break;case"pick-category":this.pickCategory();break;case"assign-open":this.assignOpen=!0,this.mapIntent="assign",this.paintRail(),this.onInteractionChange?.();break;case"assign-close":this.assignOpen=!1,this.mapIntent="pan",this.paintRail(),this.onInteractionChange?.();break;case"preview-retry":this.loadPreview();break;default:break}}pickCategory(){this.chooser.openCategory()}renderScopeDialog(e){e.scope==="rows"?this.chooser.openRows():this.chooser.openSections()}openDialog(e){this.dialog=e,this.renderDialog()}renderDialog(){let e=this.dialog;e&&(e.kind==="create"?this.renderCreateDialog(e):e.kind==="review"?this.renderReviewDialog(e):e.kind==="scope"?this.renderScopeDialog(e):e.kind==="archive"?this.renderArchiveDialog(e):e.kind==="rename"?this.renderRenameDialog(e):e.kind==="pricing"?this.renderPricingDialog(e):e.kind==="seatlist"?this.renderSeatListDialog():e.kind==="menu"?this.renderMenuDialog(e):e.kind==="linkCreate"?this.renderLinkCreateDialog(e):e.kind==="linkRotate"?this.renderLinkRotateDialog(e):e.kind==="linkRevoke"?this.renderLinkRevokeDialog(e):e.kind==="intentSwitch"&&this.renderIntentSwitchDialog(e))}renderIntentSwitchDialog(e){let t=this.list?.channels.find(o=>o.id===e.channelId),n=e.intentTo;if(!t||!n||!this.caps.manage){this.closeDialog();return}let{headline:s,consequences:a}=be(e.switchBlocked);this.renderScrim(`
|
|
397
|
+
${o}${r}${a}${d}${g}`}paintSelection(){this.caps.manage&&this.host.selectionLabels().length&&(this.assignOpen=!0),this.view==="inspect"&&!this.detailChannelId&&this.paintRail()}wireRail(){let e=this.host.rail;e.querySelectorAll("[data-ch-view]").forEach(o=>{o.addEventListener("click",()=>this.setView(o.dataset.chView))}),e.querySelectorAll("[data-ch-map]").forEach(o=>{o.addEventListener("click",()=>{this.mapIntent=o.dataset.chMap==="assign"?"assign":"pan",this.mapIntent==="assign"&&(this.assignOpen=!0),this.paintRail(),this.onInteractionChange?.()})}),e.querySelectorAll("[data-ch-open]").forEach(o=>{let r=()=>this.openChannel(o.dataset.chOpen);o.addEventListener("click",r),o.addEventListener("keydown",l=>{l.key!=="Enter"&&l.key!==" "&&l.key!=="Spacebar"||(l.preventDefault(),r())})}),e.querySelectorAll("[data-ch-menu]").forEach(o=>{o.addEventListener("click",r=>{r.stopPropagation(),this.openDialog({kind:"menu",channelId:o.dataset.chMenu})}),o.addEventListener("keydown",r=>{r.stopPropagation()})}),e.querySelectorAll("[data-ch-rotate]").forEach(o=>{o.addEventListener("click",()=>this.openDialog({kind:"linkRotate",channelId:this.detailChannelId,linkId:o.dataset.chRotate}))}),e.querySelectorAll("[data-ch-revoke]").forEach(o=>{o.addEventListener("click",()=>this.openDialog({kind:"linkRevoke",channelId:this.detailChannelId,linkId:o.dataset.chRevoke}))});let t=e.querySelector("[data-ch-target]");t?.addEventListener("change",()=>{this.targetChannelId=t.value,this.conflict=!1,this.paintRail()});let n=e.querySelector("[data-ch-audience]");n?.addEventListener("change",()=>{this.previewAudience=[n.value],this.loadPreview()});let s=e.querySelector("[data-ch-includepublic]");s?.addEventListener("change",()=>{this.previewIncludePublic=s.checked,this.loadPreview()}),e.querySelector(".slm-ch-grab")?.addEventListener("click",()=>this.cycleDetent()),e.querySelectorAll("[data-ch-act]").forEach(o=>{o.addEventListener("click",()=>this.railAction(o.dataset.chAct))}),this.chooser.wireFind(e)}openChannel(e){this.detailChannelId=e,this.paintRail(),this.loadLinks(e).then(()=>this.paintRail())}railAction(e){switch(e){case"sections":this.focusedSectionId=null,this.host.showSectionOverview(),this.paintRail();break;case"create":this.openDialog({kind:"create"});break;case"review":this.openDialog({kind:"review"});break;case"rename":this.openDialog({kind:"rename",channelId:this.detailChannelId});break;case"pricing":this.openDialog({kind:"pricing",channelId:this.detailChannelId});break;case"archive":this.openDialog({kind:"archive",channelId:this.detailChannelId});break;case"seatlist":this.openDialog({kind:"seatlist"});break;case"pause":this.togglePause();break;case"discard":this.host.clearSelection();break;case"applied-details":this.applied&&this.openDialog({kind:"review",applied:this.applied.result});break;case"undo-applied":this.undoApplied();break;case"back":this.detailChannelId=null,this.linksChannelId=null,this.links=[],this.linksState="idle",this.paintRail();break;case"link-create":this.openDialog({kind:"linkCreate",channelId:this.detailChannelId});break;case"embed-code":this.chooseWebsiteIntegration();break;case"route-internal":this.setAccessIntent("internal");break;case"route-none":this.setAccessIntent("none");break;case"open-seats":this.host.openSeats?.();break;case"route-venue":this.setAccessIntent("venue");break;case"link-reload":this.detailChannelId&&this.reloadLinks();break;case"retry":this.refresh();break;case"toggle-archived":this.showArchived=!this.showArchived,this.refresh();break;case"refresh-review":this.conflict=!1,this.refresh().then(()=>this.openDialog({kind:"review"}));break;case"pick-sections":this.openDialog({kind:"scope",scope:"sections"});break;case"pick-rows":this.openDialog({kind:"scope",scope:"rows"});break;case"drag-select":this.mapIntent="assign",this.paintRail(),this.onInteractionChange?.();break;case"pick-category":this.pickCategory();break;case"assign-open":this.assignOpen=!0,this.mapIntent="assign",this.paintRail(),this.onInteractionChange?.();break;case"assign-close":this.assignOpen=!1,this.mapIntent="pan",this.paintRail(),this.onInteractionChange?.();break;case"preview-retry":this.loadPreview();break;default:break}}pickCategory(){this.chooser.openCategory()}renderScopeDialog(e){e.scope==="rows"?this.chooser.openRows():this.chooser.openSections()}openDialog(e){this.dialog=e,this.renderDialog()}renderDialog(){let e=this.dialog;e&&(e.kind==="create"?this.renderCreateDialog(e):e.kind==="review"?this.renderReviewDialog(e):e.kind==="scope"?this.renderScopeDialog(e):e.kind==="archive"?this.renderArchiveDialog(e):e.kind==="rename"?this.renderRenameDialog(e):e.kind==="pricing"?this.renderPricingDialog(e):e.kind==="seatlist"?this.renderSeatListDialog():e.kind==="menu"?this.renderMenuDialog(e):e.kind==="linkCreate"?this.renderLinkCreateDialog(e):e.kind==="linkRotate"?this.renderLinkRotateDialog(e):e.kind==="linkRevoke"?this.renderLinkRevokeDialog(e):e.kind==="intentSwitch"&&this.renderIntentSwitchDialog(e))}renderIntentSwitchDialog(e){let t=this.list?.channels.find(o=>o.id===e.channelId),n=e.intentTo;if(!t||!n||!this.caps.manage){this.closeDialog();return}let{headline:s,consequences:a}=be(e.switchBlocked);this.renderScrim(`
|
|
396
398
|
<h3 id="slm-ch-dlg-title">Change how ${h(t.name)} reaches buyers?</h3>
|
|
397
399
|
<p class="sub">${h(s)}</p>
|
|
398
400
|
<div class="slm-ch-alert warn" role="alert"><span>\u26A0</span><span>
|