PageSourceSearch

https://app.backstagebaton.com/app/assets/PrintFolderSheetPage-C1-xMqmm.js

js backstagebaton.com collected 2026-10-07 08:51:37 UTC 2,128 bytes, 1 lines download raw bytes

1import{m as B,r as a,P as y,j as e,an as p,B as S}from"./index-_aijvlUq.js";import{p as l}from"./performances-duTJPchz.js";import{c as C,d as k,P as F,C as b,B as w}from"./FolderCheckoutSheet-D3PRcF2e.js";import"./PrintSheet-BwuplKw5.js";import"./folderCustody-0jTNtNbN.js";function c({children:t}){return e.jsxs(e.Fragment,{children:[e.jsx(p,{}),e.jsx("div",{className:"min-h-[80vh] flex items-center justify-center text-gray-500 text-base px-6 text-center",children:t})]})}function A(){const{kind:t,perfId:i}=B(),[s,h]=a.useState(null),[o,x]=a.useState(null),[m,g]=a.useState(null),[u,j]=a.useState("");a.useEffect(()=>{if(!i)return;let n=!1;return(t==="pull"?l.pullList(i).then(r=>{n||h(r)}):Promise.all([l.pullList(i),l.folders(i)]).then(([r,P])=>{n||(h(r),x(P))})).catch(r=>{n||g(r?.message||"Could not load")}),l.getById(i).then(r=>r?.orgId?y.getById(r.orgId):null).then(r=>{!n&&r?.name&&j(r.name)}).catch(()=>{}),()=>{n=!0}},[t,i]);const d=t==="pull"?!!s:!!(s&&o);if(a.useEffect(()=>{if(!d)return;const n=setTimeout(()=>{try{window.print()}catch{}},500);return()=>clearTimeout(n)},[d]),m)return e.jsxs(c,{children:["Couldn’t load the sheet: ",m]});if(!d)return e.jsx(c,{children:"Preparing the sheet…"});if(s.selfManaged)return e.jsx(c,{children:"This ensemble manages its own music — there is no sheet to print."});if(!["pull","build","changes","checkout"].includes(t))return e.jsxs(c,{children:["There is no “",t,"” sheet."]});const f=e.jsx(p,{children:e.jsx(S,{variant:"primary",size:"md",onClick:()=>window.print(),children:"Print"})});if(t==="pull"){const n=C(k(s.pieces||[],s.percussion?.folders));return e.jsxs(e.Fragment,{children:[f,e.jsx(F,{performance:s.performance,printPieces:n,percussion:s.percussion,foldersNeeded:s.foldersNeeded,screen:!0,orgName:u})]})}return t==="checkout"?e.jsxs(e.Fragment,{children:[f,e.jsx(b,{performance:s.performance,folders:o.folders||[],screen:!0,orgName:u})]}):e.jsxs(e.Fragment,{children:[f,e.jsx(w,{performance:s.performance,folders:o.folders||[],changes:o.changes||[],mode:t==="changes"?"changes":"full",screen:!0,orgName:u})]})}export{A as PrintFolderSheetPage};

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.