1import{d as x,F as p,j as e,m,r as n,an as o,B as j}from"./index-_aijvlUq.js";import{p as u}from"./performances-duTJPchz.js";import{P as y}from"./PrintSheet-BwuplKw5.js";const N=8,f=` 2 #players-sheet .pl-lead { font-size: 13px; margin: 0 0 6px; } 3 #players-sheet .pl-pitch { font-size: 13px; border-left: 3px solid #2e6b8a; padding: 4px 0 4px 10px; margin: 6px 0 10px; white-space: pre-line; } 4 #players-sheet h2 { font-size: 15px; color: #163d55; margin: 16px 0 0; font-weight: 700; } 5 #players-sheet .pl-sec { break-inside: avoid; page-break-inside: avoid; } 6 #players-sheet table.pl-rows { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13px; } 7 #players-sheet .pl-rows th { text-align: left; border-bottom: 1.5px solid #163d55; color: #163d55; padding: 3px 6px 3px 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; } 8 #players-sheet .pl-rows td { border-bottom: 1px solid #99a3ab; padding: 0 6px 0 0; height: 28px; vertical-align: middle; } 9 #players-sheet .pl-rows tr.pl-open td { height: 36px; } 10 #players-sheet .pl-num { width: 22px; color: #555; } 11 #players-sheet .pl-inst { width: 28%; } 12 #players-sheet .pl-contact { width: 30%; } 13 #players-sheet .pl-here { width: 44px; text-align: center; } 14 #players-sheet .pl-box { display: inline-block; width: 16px; height: 16px; border: 1.5px solid #163d55; } 15 #players-sheet .pl-note { font-size: 12px; color: #444; margin: 12px 0 0; } 16`;function d(){return e.jsx("span",{className:"pl-box","aria-hidden":"true"})}function g({sheet:s,screen:l=!1}){const i=[s.date?x(s.date):null,s.time?p(s.time):null,s.callTime?`call ${p(s.callTime)}`:null,s.venue].filter(Boolean).join(" · ");return e.jsx(y,{id:"players-sheet",sheetName:"Players wanted",concert:{title:s.title,performanceDate:s.date,ensembleName:s.ensemble},subtitle:i,css:f,screen:l,orgName:s.orgName,children:e.jsxs("div",{"data-testid":"players-sheet",children:[s.pitch&&e.jsx("p",{className:"pl-pitch",children:s.pitch}),e.jsxs("p",{className:"pl-lead",children:["Only part of the band plays this one. Can you play? Write your name, instrument and a phone or email below. On the day, tick ",e.jsx("strong",{children:"Here"})," beside each player."]}),e.jsxs("section",{className:"pl-sec",children:[e.jsxs("h2",{children:["Playing so far (",s.players.length,")"]}),e.jsxs("table",{className:"pl-rows",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"pl-num",children:"#"}),e.jsx("th",{children:"Name"}),e.jsx("th",{className:"pl-inst",children:"Instrument"}),e.jsx("th",{className:"pl-here",children:"Here"})]})}),e.jsxs("tbody",{children:[s.players.length===0&&e.jsxs("tr",{children:[e.jsx("td",{className:"pl-num"}),e.jsx("td",{colSpan:3,children:"Nobody yet."})]}),s.players.map((t,r)=>e.jsxs("tr",{children:[e.jsx("td",{className:"pl-num",children:r+1}),e.jsx("td",{children:e.jsx("strong",{children:t.name})}),e.jsx("td",{className:"pl-inst",children:t.instrument||""}),e.jsx("td",{className:"pl-here",children:e.jsx(d,{})})]},`p${r}`))]})]})]}),s.needed.length>0&&e.jsxs("section",{className:"pl-sec","data-testid":"players-needed",children:[e.jsx("h2",{children:"Still needed"}),e.jsx("p",{className:"pl-note",style:{marginTop:2},children:"The music calls for these, and nobody is on them yet."}),e.jsxs("table",{className:"pl-rows",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"pl-inst",children:"Instrument"}),e.jsx("th",{children:"Name"}),e.jsx("th",{className:"pl-contact",children:"Phone or email"}),e.jsx("th",{className:"pl-here",children:"Here"})]})}),e.jsx("tbody",{children:s.needed.map(t=>e.jsxs("tr",{className:"pl-open",children:[e.jsx("td",{className:"pl-inst",children:e.jsx("strong",{children:t.instrument})}),e.jsx("td",{children:e.jsx("span",{className:"sr-only",children:"Write a name"})}),e.jsx("td",{className:"pl-contact"}),e.jsx("td",{className:"pl-here",children:e.jsx(d,{})})]},t.instrument))})]})]}),e.jsxs("section",{className:"pl-sec",children:[e.jsx("h2",{children:"Can you play?"}),e.jsxs("table",{className:"pl-rows",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{className:"pl-inst",children:"Instrument"}),e.jsx("th",{className:"pl-contact",children:"Phone or email"}),e.jsx("th",{className:"pl-here",children:"Here"})]})}),e.jsx("tbody",{children:Array.from({length:N}).map((t,r)=>e.jsxs("tr",{className:"pl-open","data-testid":"players-write-in",children:[e.jsx("td",{children:e.jsx("span",{className:"sr-only",children:"Write a name"})}),e.jsx("td",{className:"pl-inst"}),e.jsx("td",{className:"pl-contact"}),e.jsx("td",{className:"pl-here",children:e.jsx(d,{})})]},`w${r}`))})]})]}),e.jsx("p",{className:"pl-note",children:"Names written here are added to the concert by your director."})]})})}function h({children:s}){return e.jsxs(e.Fragment,{children:[e.jsx(o,{}),e.jsx("div",{className:"min-h-[80vh] flex items-center justify-center text-gray-500 text-base px-6 text-center",children:s})]})}function S(){const{perfId:s}=m(),[l,i]=n.useState(null),[t,r]=n.useState(null);return n.useEffect(()=>{let a=!1;return u.getCastSheet(s).then(c=>{a||i(c)}).catch(c=>{a||r(c?.message||"Could not load")}),()=>{a=!0}},[s]),n.useEffect(()=>{if(!l)return;const a=setTimeout(()=>{try{window.print()}catch{}},500);return()=>clearTimeout(a)},[l]),t?e.jsxs(h,{children:["Couldnât load the sign-up sheet: ",t]}):l?e.jsxs(e.Fragment,{children:[e.jsx(o,{children:e.jsx(j,{variant:"primary",size:"md",onClick:()=>window.print(),children:"Print"})}),e.jsx(g,{sheet:l,screen:!0})]}):e.jsx(h,{children:"Preparing the sign-up sheetâ¦"})}export{g as PlayersSheet,S as PrintPlayersSheetPage};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.