@seatlayer/core 0.83.0 → 0.84.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-4ABXX5PL.js → chunk-3BSYPGF3.js} +1 -1
- package/dist/chunk-WP5XGIE6.js +1 -0
- package/dist/core/chart-ops/index.js +1 -1
- package/dist/core/inventory/index.js +1 -1
- package/dist/core/render-assets/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/view3d/index.js +1 -1
- package/dist/view3d/scene/scene.worker.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-56QTNPLP.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as xt,b as Mt,c as gt,d as wt,e as Ct,g as B,h as N}from"../../chunk-WP5XGIE6.js";import{a as it,b as st,c as ct,d as lt,e as ut,f as pt,g as ft,h as mt,i as yt,j as dt,k as ht,l as bt}from"../../chunk-7LMW7QTP.js";import"../../chunk-BT2KJXQC.js";import"../../chunk-FQ2MMJMH.js";import"../../chunk-TQN2VWQO.js";import"../../chunk-NJTU4QK7.js";import{a as H,b as V,c as Z,d as tt,e as et,f as ot,g as rt,h as nt,i as at}from"../../chunk-Q3U3F4YJ.js";import"../../chunk-BS37TGPX.js";import"../../chunk-4I2VWFJY.js";import{Ea as S,Ga as v,Ha as P,I as O,Ja as j,Ka as _,Pa as I,x as R}from"../../chunk-24O23MNB.js";import"../../chunk-JBOTRSMY.js";import"../../chunk-CRCGO52K.js";function g(t){return t.floors?.length?t.floors.flatMap(e=>e.objects):t.objects}function k(t){return g(t).reduce((e,r)=>r.type==="row"?e+S(r):r.type==="table"?e+j(r):r.type==="gaArea"?e+Math.max(0,Math.floor(r.capacity)):r.type==="booth"?e+1:e,0)}function Pt(t){let e={};for(let o of t.categories??[])e[o.key]=0;let r=(o,n)=>{n>0&&(e[o]=(e[o]??0)+n)};for(let o of g(t))if(o.type==="row")for(let n of v(o))r(n.categoryKey,1);else if(o.type==="table")if(o.bookAsWhole||o.variableOccupancy)r(o.categoryKey,Math.max(0,Math.round(o.seatCount)));else for(let n of _(o))r(n.categoryKey,1);else o.type==="gaArea"?r(o.categoryKey,Math.max(0,Math.floor(o.capacity))):o.type==="booth"&&r(o.categoryKey,1);return e}function z(t){if(!t.template)return null;let e=g(t),r=e.filter(u=>u.type==="row"||u.type==="table"||u.type==="gaArea");if(!r.length)return null;let n=e.filter(u=>u.type==="booth").length+r.reduce((u,f)=>u+(f.type==="table"?2:1),0),i=k(t),c=Math.max(n+1,Math.min(5e4,i*4)),l=[.5,1,1.5,2].map(u=>O(Math.round(i*u),n,c));return{family:t.template.family,display:t.template.family.replace(/-/g," ").replace(/\b\w/g,u=>u.toUpperCase()),min:n,max:c,presets:["S","M","L","XL"].map((u,f)=>({size:u,seats:l[f]}))}}function A(t){let e=v(t);return e.length?R(e):{...t.origin}}function jt(t,e){let r=z(t);if(!r)return structuredClone(t);let o=structuredClone(t),n=g(o),i=n.filter(a=>a.type==="row"||a.type==="table"||a.type==="gaArea"),c=n.filter(a=>a.type==="booth").length,l=Math.max(r.min,Math.min(r.max,Math.round(e))),u=l-c,f=i.map((a,s)=>{let m=a.type==="gaArea"?Math.max(0,Math.floor(a.capacity)):a.seatCount,x=a.type==="table"?2:1;return{object:a,index:s,current:m,minimum:x,value:x,fraction:0}}),K=f.reduce((a,s)=>a+s.minimum,0),w=Math.max(0,u-K),L=f.reduce((a,s)=>a+Math.max(1,s.current-s.minimum),0);for(let a of f){let s=w*Math.max(1,a.current-a.minimum)/L,m=Math.floor(s);a.value+=m,a.fraction=s-m}w=u-f.reduce((a,s)=>a+s.value,0),f.sort((a,s)=>s.fraction-a.fraction||a.index-s.index);for(let a=0;a<w;a++)f[a%f.length].value++;f.sort((a,s)=>a.index-s.index);for(let a of f)if(a.object.type==="row"){let s=A(a.object);a.object.seatCount=a.value;let m=A(a.object);a.object.origin.x+=s.x-m.x,a.object.origin.y+=s.y-m.y}else if(a.object.type==="table"){let s=a.object;if(s.seatCountsBySide){let m=["top","bottom","left","right"],x=P(s),F=m.reduce((p,y)=>p+x[y],0)||1,d=m.map((p,y)=>{let C=a.value*x[p]/F;return{side:p,index:y,value:Math.floor(C),fraction:C-Math.floor(C)}}),X=a.value-d.reduce((p,y)=>p+y.value,0);d.sort((p,y)=>y.fraction-p.fraction||p.index-y.index);for(let p=0;p<X;p++)d[p%d.length].value+=1;d.sort((p,y)=>p.index-y.index),s.seatCountsBySide={top:d[0].value,bottom:d[1].value,left:d[2].value,right:d[3].value},s.sides=m.filter(p=>s.seatCountsBySide[p]>0)}s.seatCount=a.value,s.overrides&&(s.overrides=s.overrides.filter(m=>m.index<a.value),s.overrides.length||delete s.overrides)}else a.object.capacity=a.value;return o.floors?.length&&(o.objects=o.floors[0].objects),o.template={family:o.template.family,targetSeats:l},o=B(o).doc,o.template={family:t.template.family,targetSeats:k(o)},o}var W=1,T=100;function J(t,e){if(!Number.isInteger(e)||e<W||e>T)return null;let r=t.rotation*Math.PI/180,o={x:Math.cos(r),y:Math.sin(r)},n={x:-o.y,y:o.x};return Array.from({length:e},(i,c)=>{let l=t.style==="intertwined"&&c%2===1?t.seatSpacing/2:0;return{type:"row",id:`__block_preview_${c}`,label:"",origin:{x:t.origin.x+n.x*c*t.rowGap+o.x*l,y:t.origin.y+n.y*c*t.rowGap+o.y*l},rotation:t.rotation,curve:t.curve,seatCount:t.seatsPerRow,seatSpacing:t.seatSpacing,categoryKey:"__preview__"}})}function G(t,e=t.rowCount){let r=J(t,e);return r?.length?I(r[r.length-1]):null}function Bt(t,e){if(!Number.isFinite(e.x)||!Number.isFinite(e.y)||t.rowGap<=0)return null;let r=G(t,1);if(!r)return null;let o=t.rotation*Math.PI/180,n={x:-Math.sin(o),y:Math.cos(o)},i=(e.x-r.x)*n.x+(e.y-r.y)*n.y,c=Math.max(W,Math.min(T,Math.round(i/t.rowGap)+1)),l=G(t,c);return l?{rowCount:c,edgePoint:l}:null}function Nt(t,e){return t.length!==e.rowCount?!1:[...t].sort((o,n)=>(o.rowBlockGeneration?.rowIndex??1/0)-(n.rowBlockGeneration?.rowIndex??1/0)).every((o,n)=>{let i=o.rowBlockGeneration;return i?.kind==="row-block-v1"&&i.groupId===e.groupId&&i.rowIndex===n&&i.signature===e.signature&&JSON.stringify(i)===JSON.stringify({...e,rowIndex:n})})}var h=1,b=300,D=330;function M(t){return t.seatCount>1?t.curve/(t.seatCount-1):0}function E(t,e){let r=t.rotation*Math.PI/180,o=M(t)*Math.PI/180,n,i;if(Math.abs(o)<1e-9)n=e*t.seatSpacing,i=0;else{let c=t.seatSpacing/(2*Math.sin(Math.abs(o)/2)),l=o*e;n=c*Math.sin(l),i=-c+c*Math.cos(l)}return{x:t.origin.x+n*Math.cos(r)-i*Math.sin(r),y:t.origin.y+n*Math.sin(r)+i*Math.cos(r)}}function Q(t,e,r){let o=(t??[]).map(n=>({...n,index:n.index+e})).filter(n=>n.index>=0&&n.index<r);return o.length?o:void 0}function U(t,e){if(t.path||!Number.isInteger(e)||e<h||e>b)return null;let r=M(t);return{...t,seatCount:e,curve:r*(e-1)}}function Y(t,e){if(t.path||!Number.isInteger(e)||e<h||e>b)return null;let r=M(t),o=t.seatCount-e,n=-o;return{...t,origin:E(t,o),rotation:N(t.rotation-r*o),seatCount:e,curve:r*(e-1),overrides:Q(t.overrides,n,e)}}function $(t,e=t.seatCount){let r=U(t,e);return r?E(r,e-1):null}function q(t,e=t.seatCount){return Y(t,e)?.origin??null}function Gt(t,e){if(t.path||!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let r=M(t),o=Math.abs(r)<1e-9?b:Math.min(b,Math.floor(D/Math.abs(r))+1),n=null;for(let i=h;i<=Math.max(h,o);i+=1){let c=$(t,i);if(!c)continue;let l=Math.hypot(c.x-e.x,c.y-e.y),u=r*(i-1);(!n||l<n.distance||l===n.distance&&i<n.seatCount)&&(n={seatCount:i,curve:u,endpoint:c,distance:l})}return n}function Wt(t,e){if(t.path||!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let r=M(t),o=Math.abs(r)<1e-9?b:Math.min(b,Math.floor(D/Math.abs(r))+1),n=null;for(let i=h;i<=Math.max(h,o);i+=1){let c=q(t,i);if(!c)continue;let l=Math.hypot(c.x-e.x,c.y-e.y),u=r*(i-1);(!n||l<n.distance||l===n.distance&&i<n.seatCount)&&(n={seatCount:i,curve:u,endpoint:c,distance:l})}return n}export{xt as CATEGORY_INVENTORY_FAMILIES,ht as GroupedTableProjectionError,D as MAX_DIRECT_ROW_SWEEP,V as MAX_EVENT_INVENTORY,H as MAX_GA_CAPACITY,T as MAX_ROW_BLOCK_ROWS,b as MAX_ROW_SEATS,W as MIN_ROW_BLOCK_ROWS,h as MIN_ROW_SEATS,ut as applicableTicketTiers,z as capacityControl,Pt as categoryCapacity,k as chartCapacity,ft as companionSelectionIssue,wt as describeCategoryInventoryConflict,Mt as effectiveSeatOwnerCategoryCounts,nt as gaAreasOf,et as gaInventorySegments,Z as gaUnitLabel,ot as gaUnitLabels,bt as groupedTableInventory,rt as growJoinedGAInventory,gt as inspectCategoryInventoryConflicts,Nt as intactRowBlockMembers,st as isFullChartDoc,at as isGaUnitLabel,yt as pickBestAvailable,dt as pickBestAvailableInventory,Ct as remediateCategoryInventoryConflicts,jt as resizeChartCapacity,Bt as resolveRowBlockCount,Wt as resolveRowStartCapacity,Gt as resolveRowTerminalCapacity,pt as resolveTicketTierForSeat,G as rowBlockEdgePoint,J as rowBlockPreviewRows,q as rowStartEndpoint,$ as rowTerminalEndpoint,Y as rowWithStartCapacity,U as rowWithTerminalCapacity,it as strandedSingles,ct as ticketOptionNotApplicableIssue,mt as ticketSelectionIssue,lt as ticketTierAppliesToSeat,tt as validGAInventorySegments};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,b as t,c as x,d as a}from"../../chunk-P4J57TK6.js";import{a as s,b as u,c as v,d as w,e as y,f as z,g as A,h as B,i as C,j as D,k as E,l as F,m as G,n as H,o as I,p as J,q as K,r as L,s as M,t as N}from"../../chunk-TQN2VWQO.js";import{d as o,e as r,f as e,g as f,h as m}from"../../chunk-NJTU4QK7.js";
|
|
1
|
+
import{a as p,b as t,c as x,d as a}from"../../chunk-P4J57TK6.js";import{a as b,b as c,c as d,d as g,e as h,f as i,g as j,h as k,i as l,j as n,k as q}from"../../chunk-UL5OIGIF.js";import{a as s,b as u,c as v,d as w,e as y,f as z,g as A,h as B,i as C,j as D,k as E,l as F,m as G,n as H,o as I,p as J,q as K,r as L,s as M,t as N}from"../../chunk-TQN2VWQO.js";import{d as o,e as r,f as e,g as f,h as m}from"../../chunk-NJTU4QK7.js";export{z as DECOR_STAMP_ICON_PATHS,H as DEFAULT_SHAPE_LINE_CAP,J as DEFAULT_SHAPE_LINE_ENDING,I as DEFAULT_SHAPE_LINE_JOIN,g as SEAT_GLYPHS,c as SEAT_GLYPH_DETAIL_MIN_PX,d as SEAT_GLYPH_INSET,h as SEAT_GLYPH_ORDER,b as SEAT_GLYPH_VIEWBOX,t as SEAT_TYPE_ICON_BODY,p as SEAT_TYPE_ICON_VIEWBOX,E as SHAPE_LINE_CAPS,G as SHAPE_LINE_ENDINGS,F as SHAPE_LINE_JOINS,y as VENUE_ICONS,v as VENUE_ICON_GROUP_LABELS,w as VENUE_ICON_GROUP_ORDER,D as VENUE_ICON_KEYS,u as VENUE_ICON_STROKE,s as VENUE_ICON_VIEWBOX,r as buyerBackgroundImage,f as buyerFacingChartDoc,m as hasConflictingLegacyTrace,K as isOpenShapeKind,L as isPointShapeKind,n as isSeatGlyphKind,C as isVenueIconKey,e as migrateLegacyBackgroundLayersInPlace,q as resolveSeatGlyph,M as resolvedShapeLineStyle,i as seatGlyph,l as seatGlyphFit,j as seatGlyphLabel,k as seatGlyphPath,x as seatTypeIconBody,a as seatTypeIconSvg,N as shapeArrowMetrics,o as traceReferenceImage,A as venueIcon,B as venueIconPath};
|