@getontime/cli 4.4.1 → 4.5.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.
Files changed (371) hide show
  1. package/client/assets/{Backstage-BY9GL_rk.js → Backstage-DQu8ne-1.js} +2 -2
  2. package/client/assets/Backstage-DQu8ne-1.js.br +0 -0
  3. package/client/assets/Backstage-DQu8ne-1.js.gz +0 -0
  4. package/client/assets/{Backstage-BY9GL_rk.js.map → Backstage-DQu8ne-1.js.map} +1 -1
  5. package/client/assets/{Countdown-CXFgDHND.js → Countdown-COte1yne.js} +2 -2
  6. package/client/assets/Countdown-COte1yne.js.br +0 -0
  7. package/client/assets/Countdown-COte1yne.js.gz +0 -0
  8. package/client/assets/{Countdown-CXFgDHND.js.map → Countdown-COte1yne.js.map} +1 -1
  9. package/client/assets/CuesheetTable-BQfxAp-I.js +2 -0
  10. package/client/assets/CuesheetTable-BQfxAp-I.js.br +0 -0
  11. package/client/assets/CuesheetTable-BQfxAp-I.js.gz +0 -0
  12. package/client/assets/CuesheetTable-BQfxAp-I.js.map +1 -0
  13. package/client/assets/CustomTranslationModal-C5mAtBjW.js +2 -0
  14. package/client/assets/CustomTranslationModal-C5mAtBjW.js.br +0 -0
  15. package/client/assets/CustomTranslationModal-C5mAtBjW.js.gz +0 -0
  16. package/client/assets/{CustomTranslationModal-4PVZBtkC.js.map → CustomTranslationModal-C5mAtBjW.js.map} +1 -1
  17. package/client/assets/{DelayIndicator-DUbpd6DG.js → DelayIndicator-B0cudY9N.js} +2 -2
  18. package/client/assets/DelayIndicator-B0cudY9N.js.br +0 -0
  19. package/client/assets/DelayIndicator-B0cudY9N.js.gz +0 -0
  20. package/client/assets/DelayIndicator-B0cudY9N.js.map +1 -0
  21. package/client/assets/{EditorFeatureWrapper-CV_zaDoG.js → EditorFeatureWrapper-DpDaCaJ3.js} +2 -2
  22. package/client/assets/EditorFeatureWrapper-DpDaCaJ3.js.br +0 -0
  23. package/client/assets/EditorFeatureWrapper-DpDaCaJ3.js.gz +0 -0
  24. package/client/assets/{EditorFeatureWrapper-CV_zaDoG.js.map → EditorFeatureWrapper-DpDaCaJ3.js.map} +1 -1
  25. package/client/assets/{EditorUtils-CLBWDP4k.js → EditorUtils-k5KpETPG.js} +2 -2
  26. package/client/assets/EditorUtils-k5KpETPG.js.br +0 -0
  27. package/client/assets/EditorUtils-k5KpETPG.js.gz +0 -0
  28. package/client/assets/{EditorUtils-CLBWDP4k.js.map → EditorUtils-k5KpETPG.js.map} +1 -1
  29. package/client/assets/EmptyPage-aTb22KTq.js +2 -0
  30. package/client/assets/EmptyPage-aTb22KTq.js.br +0 -0
  31. package/client/assets/EmptyPage-aTb22KTq.js.gz +0 -0
  32. package/client/assets/{EmptyPage-DmpOAg7R.js.map → EmptyPage-aTb22KTq.js.map} +1 -1
  33. package/client/assets/{FollowButton-CAUWz5Ma.js → FollowButton--Bj9S6jO.js} +2 -2
  34. package/client/assets/FollowButton--Bj9S6jO.js.br +0 -0
  35. package/client/assets/FollowButton--Bj9S6jO.js.gz +0 -0
  36. package/client/assets/{FollowButton-CAUWz5Ma.js.map → FollowButton--Bj9S6jO.js.map} +1 -1
  37. package/client/assets/MessageControlExport-BN6OfADo.js +3 -0
  38. package/client/assets/MessageControlExport-BN6OfADo.js.br +0 -0
  39. package/client/assets/MessageControlExport-BN6OfADo.js.gz +0 -0
  40. package/client/assets/{MessageControlExport-Dm8IjSr4.js.map → MessageControlExport-BN6OfADo.js.map} +1 -1
  41. package/client/assets/{MultiPartProgressBar-Fp-sTN2u.js → MultiPartProgressBar-BlLJNQ0D.js} +2 -2
  42. package/client/assets/MultiPartProgressBar-BlLJNQ0D.js.br +0 -0
  43. package/client/assets/MultiPartProgressBar-BlLJNQ0D.js.gz +0 -0
  44. package/client/assets/{MultiPartProgressBar-Fp-sTN2u.js.map → MultiPartProgressBar-BlLJNQ0D.js.map} +1 -1
  45. package/client/assets/{OperatorExport-CE4ajLPS.js → OperatorExport-CmgIl1lz.js} +2 -2
  46. package/client/assets/OperatorExport-CmgIl1lz.js.br +0 -0
  47. package/client/assets/OperatorExport-CmgIl1lz.js.gz +0 -0
  48. package/client/assets/OperatorExport-CmgIl1lz.js.map +1 -0
  49. package/client/assets/OverviewWrapper-B4nU68Eq.js +2 -0
  50. package/client/assets/OverviewWrapper-B4nU68Eq.js.br +0 -0
  51. package/client/assets/OverviewWrapper-B4nU68Eq.js.gz +0 -0
  52. package/client/assets/{OverviewWrapper-BNnAIUP1.js.map → OverviewWrapper-B4nU68Eq.js.map} +1 -1
  53. package/client/assets/OverviewWrapper-fPfl6o_p.css +1 -0
  54. package/client/assets/OverviewWrapper-fPfl6o_p.css.br +0 -0
  55. package/client/assets/OverviewWrapper-fPfl6o_p.css.gz +0 -0
  56. package/client/assets/{PipHost-CbNFsfqp.js → PipHost-BZy7ouDv.js} +2 -2
  57. package/client/assets/PipHost-BZy7ouDv.js.br +0 -0
  58. package/client/assets/PipHost-BZy7ouDv.js.gz +0 -0
  59. package/client/assets/{PipHost-CbNFsfqp.js.map → PipHost-BZy7ouDv.js.map} +1 -1
  60. package/client/assets/{ProjectInfo-Bf5z4Xsv.js → ProjectInfo-D0X9vdIX.js} +2 -2
  61. package/client/assets/ProjectInfo-D0X9vdIX.js.br +0 -0
  62. package/client/assets/ProjectInfo-D0X9vdIX.js.gz +0 -0
  63. package/client/assets/{ProjectInfo-Bf5z4Xsv.js.map → ProjectInfo-D0X9vdIX.js.map} +1 -1
  64. package/client/assets/ProtectRoute-DSilyhst.js +2 -0
  65. package/client/assets/ProtectRoute-DSilyhst.js.br +0 -0
  66. package/client/assets/ProtectRoute-DSilyhst.js.gz +0 -0
  67. package/client/assets/{ProtectRoute-CCHzyy0I.js.map → ProtectRoute-DSilyhst.js.map} +1 -1
  68. package/client/assets/ProtectedCuesheet-DRTfZTZN.js +2 -0
  69. package/client/assets/ProtectedCuesheet-DRTfZTZN.js.br +0 -0
  70. package/client/assets/ProtectedCuesheet-DRTfZTZN.js.gz +0 -0
  71. package/client/assets/ProtectedCuesheet-DRTfZTZN.js.map +1 -0
  72. package/client/assets/ProtectedEditor-DNOiQqIU.js +3 -0
  73. package/client/assets/ProtectedEditor-DNOiQqIU.js.br +0 -0
  74. package/client/assets/ProtectedEditor-DNOiQqIU.js.gz +0 -0
  75. package/client/assets/ProtectedEditor-DNOiQqIU.js.map +1 -0
  76. package/client/assets/ProtectedEditor-DyaLP0mG.css +1 -0
  77. package/client/assets/ProtectedEditor-DyaLP0mG.css.br +0 -0
  78. package/client/assets/ProtectedEditor-DyaLP0mG.css.gz +0 -0
  79. package/client/assets/{RundownExport-C_q3KYN_.js → RundownExport-Bvc1J50m.js} +2 -2
  80. package/client/assets/RundownExport-Bvc1J50m.js.br +0 -0
  81. package/client/assets/RundownExport-Bvc1J50m.js.gz +0 -0
  82. package/client/assets/RundownExport-Bvc1J50m.js.map +1 -0
  83. package/client/assets/{Select-DQwYPDyI.js → Select-CvUrsmYI.js} +2 -2
  84. package/client/assets/Select-CvUrsmYI.js.br +0 -0
  85. package/client/assets/Select-CvUrsmYI.js.gz +0 -0
  86. package/client/assets/{Select-DQwYPDyI.js.map → Select-CvUrsmYI.js.map} +1 -1
  87. package/client/assets/{Studio-DzXTmBx4.js → Studio-BSSiKd6k.js} +2 -2
  88. package/client/assets/Studio-BSSiKd6k.js.br +0 -0
  89. package/client/assets/Studio-BSSiKd6k.js.gz +0 -0
  90. package/client/assets/{Studio-DzXTmBx4.js.map → Studio-BSSiKd6k.js.map} +1 -1
  91. package/client/assets/{StyleEditor-ClMEMaWh.js → StyleEditor-buc-zQHR.js} +2 -2
  92. package/client/assets/StyleEditor-buc-zQHR.js.br +0 -0
  93. package/client/assets/StyleEditor-buc-zQHR.js.gz +0 -0
  94. package/client/assets/{StyleEditor-ClMEMaWh.js.map → StyleEditor-buc-zQHR.js.map} +1 -1
  95. package/client/assets/{SuperscriptPeriod-CBiZU34J.js → SuperscriptPeriod-CSX8zFgq.js} +2 -2
  96. package/client/assets/SuperscriptPeriod-CSX8zFgq.js.br +0 -0
  97. package/client/assets/SuperscriptPeriod-CSX8zFgq.js.gz +0 -0
  98. package/client/assets/{SuperscriptPeriod-CBiZU34J.js.map → SuperscriptPeriod-CSX8zFgq.js.map} +1 -1
  99. package/client/assets/{SuperscriptTime-DP1CDlOX.js → SuperscriptTime-retbmT5o.js} +2 -2
  100. package/client/assets/SuperscriptTime-retbmT5o.js.br +0 -0
  101. package/client/assets/SuperscriptTime-retbmT5o.js.gz +0 -0
  102. package/client/assets/{SuperscriptTime-DP1CDlOX.js.map → SuperscriptTime-retbmT5o.js.map} +1 -1
  103. package/client/assets/SwatchPicker-DuWAohyD.js +2 -0
  104. package/client/assets/SwatchPicker-DuWAohyD.js.br +0 -0
  105. package/client/assets/SwatchPicker-DuWAohyD.js.gz +0 -0
  106. package/client/assets/{SwatchPicker-Dyxkxf3_.js.map → SwatchPicker-DuWAohyD.js.map} +1 -1
  107. package/client/assets/TimeElements-BfxdLkpO.js +2 -0
  108. package/client/assets/TimeElements-BfxdLkpO.js.br +0 -0
  109. package/client/assets/TimeElements-BfxdLkpO.js.gz +0 -0
  110. package/client/assets/{TimeElements-pDYJeFbV.js.map → TimeElements-BfxdLkpO.js.map} +1 -1
  111. package/client/assets/{TimeInput-DTWDnaum.js → TimeInput-BjOTgjcv.js} +2 -2
  112. package/client/assets/TimeInput-BjOTgjcv.js.br +0 -0
  113. package/client/assets/TimeInput-BjOTgjcv.js.gz +0 -0
  114. package/client/assets/{TimeInput-DTWDnaum.js.map → TimeInput-BjOTgjcv.js.map} +1 -1
  115. package/client/assets/{TimelinePage-DbLt9rQi.js → TimelinePage-pjff5TxG.js} +2 -2
  116. package/client/assets/TimelinePage-pjff5TxG.js.br +0 -0
  117. package/client/assets/TimelinePage-pjff5TxG.js.gz +0 -0
  118. package/client/assets/TimelinePage-pjff5TxG.js.map +1 -0
  119. package/client/assets/{Timer-BfyVKQ8U.js → Timer-ahF-O2zN.js} +2 -2
  120. package/client/assets/Timer-ahF-O2zN.js.br +0 -0
  121. package/client/assets/Timer-ahF-O2zN.js.gz +0 -0
  122. package/client/assets/{Timer-BfyVKQ8U.js.map → Timer-ahF-O2zN.js.map} +1 -1
  123. package/client/assets/TimerControlExport-De2n8HWG.js +2 -0
  124. package/client/assets/TimerControlExport-De2n8HWG.js.br +0 -0
  125. package/client/assets/TimerControlExport-De2n8HWG.js.gz +0 -0
  126. package/client/assets/TimerControlExport-De2n8HWG.js.map +1 -0
  127. package/client/assets/TimerDisplay-DeFQvmo9.js +2 -0
  128. package/client/assets/TimerDisplay-DeFQvmo9.js.br +0 -0
  129. package/client/assets/TimerDisplay-DeFQvmo9.js.gz +0 -0
  130. package/client/assets/{TimerDisplay-Dgmbqf65.js.map → TimerDisplay-DeFQvmo9.js.map} +1 -1
  131. package/client/assets/{TitleCard-MUurHeZ7.js → TitleCard-BiaQE4ZK.js} +2 -2
  132. package/client/assets/TitleCard-BiaQE4ZK.js.br +0 -0
  133. package/client/assets/TitleCard-BiaQE4ZK.js.gz +0 -0
  134. package/client/assets/{TitleCard-MUurHeZ7.js.map → TitleCard-BiaQE4ZK.js.map} +1 -1
  135. package/client/assets/{Tooltip-DXph8P8p.js → Tooltip-C5iPq6NR.js} +2 -2
  136. package/client/assets/Tooltip-C5iPq6NR.js.br +0 -0
  137. package/client/assets/Tooltip-C5iPq6NR.js.gz +0 -0
  138. package/client/assets/{Tooltip-DXph8P8p.js.map → Tooltip-C5iPq6NR.js.map} +1 -1
  139. package/client/assets/{ViewLogo-Ckp7i75x.js → ViewLogo-DcDhyyIF.js} +2 -2
  140. package/client/assets/ViewLogo-DcDhyyIF.js.br +0 -0
  141. package/client/assets/ViewLogo-DcDhyyIF.js.gz +0 -0
  142. package/client/assets/{ViewLogo-Ckp7i75x.js.map → ViewLogo-DcDhyyIF.js.map} +1 -1
  143. package/client/assets/{ViewParamsEditor-Cxngd15h.js → ViewParamsEditor-DeMdkxxC.js} +2 -2
  144. package/client/assets/ViewParamsEditor-DeMdkxxC.js.br +0 -0
  145. package/client/assets/ViewParamsEditor-DeMdkxxC.js.gz +0 -0
  146. package/client/assets/{ViewParamsEditor-Cxngd15h.js.map → ViewParamsEditor-DeMdkxxC.js.map} +1 -1
  147. package/client/assets/{editorSettings-D4jfu68W.js → editorSettings-xk5GwlLv.js} +2 -2
  148. package/client/assets/editorSettings-xk5GwlLv.js.br +0 -0
  149. package/client/assets/editorSettings-xk5GwlLv.js.gz +0 -0
  150. package/client/assets/{editorSettings-D4jfu68W.js.map → editorSettings-xk5GwlLv.js.map} +1 -1
  151. package/client/assets/{getProgress-B9UANc25.js → getProgress-CWSCZOIN.js} +2 -2
  152. package/client/assets/getProgress-CWSCZOIN.js.br +0 -0
  153. package/client/assets/getProgress-CWSCZOIN.js.gz +0 -0
  154. package/client/assets/{getProgress-B9UANc25.js.map → getProgress-CWSCZOIN.js.map} +1 -1
  155. package/client/assets/index-3aosT33y.js +3 -0
  156. package/client/assets/index-3aosT33y.js.br +0 -0
  157. package/client/assets/index-3aosT33y.js.gz +0 -0
  158. package/client/assets/index-3aosT33y.js.map +1 -0
  159. package/client/assets/{offset-DAyBfv5b.js → offset-yVqq_CB1.js} +2 -2
  160. package/client/assets/offset-yVqq_CB1.js.br +0 -0
  161. package/client/assets/offset-yVqq_CB1.js.gz +0 -0
  162. package/client/assets/{offset-DAyBfv5b.js.map → offset-yVqq_CB1.js.map} +1 -1
  163. package/client/assets/parseUserTime-wAKk9aCJ.js +2 -0
  164. package/client/assets/parseUserTime-wAKk9aCJ.js.br +0 -0
  165. package/client/assets/parseUserTime-wAKk9aCJ.js.gz +0 -0
  166. package/client/assets/{parseUserTime-WkVNjkkE.js.map → parseUserTime-wAKk9aCJ.js.map} +1 -1
  167. package/client/assets/{playbackstate-znZk3SSJ.js → playbackstate-BZ9WYn2k.js} +2 -2
  168. package/client/assets/playbackstate-BZ9WYn2k.js.br +0 -0
  169. package/client/assets/playbackstate-BZ9WYn2k.js.gz +0 -0
  170. package/client/assets/{playbackstate-znZk3SSJ.js.map → playbackstate-BZ9WYn2k.js.map} +1 -1
  171. package/client/assets/{presentation.utils-CjjYs5II.js → presentation.utils-lyuuD4A5.js} +2 -2
  172. package/client/assets/presentation.utils-lyuuD4A5.js.br +0 -0
  173. package/client/assets/presentation.utils-lyuuD4A5.js.gz +0 -0
  174. package/client/assets/{presentation.utils-CjjYs5II.js.map → presentation.utils-lyuuD4A5.js.map} +1 -1
  175. package/client/assets/{rundownUtils-BTQ3EeqN.js → rundownUtils-XX_c4Pcl.js} +2 -2
  176. package/client/assets/rundownUtils-XX_c4Pcl.js.br +0 -0
  177. package/client/assets/rundownUtils-XX_c4Pcl.js.gz +0 -0
  178. package/client/assets/{rundownUtils-BTQ3EeqN.js.map → rundownUtils-XX_c4Pcl.js.map} +1 -1
  179. package/client/assets/timer.utils-CWHFVz06.js +2 -0
  180. package/client/assets/timer.utils-CWHFVz06.js.br +0 -0
  181. package/client/assets/timer.utils-CWHFVz06.js.gz +0 -0
  182. package/client/assets/{timer.utils-B-Ui91P7.js.map → timer.utils-CWHFVz06.js.map} +1 -1
  183. package/client/assets/useCustomFields-kBD1jvDA.js +2 -0
  184. package/client/assets/useCustomFields-kBD1jvDA.js.br +0 -0
  185. package/client/assets/useCustomFields-kBD1jvDA.js.gz +0 -0
  186. package/client/assets/{useCustomFields-zr9SUl5o.js.map → useCustomFields-kBD1jvDA.js.map} +1 -1
  187. package/client/assets/{useEventSelection-B9mbj1cM.js → useEventSelection-Cvdw9all.js} +2 -2
  188. package/client/assets/useEventSelection-Cvdw9all.js.br +0 -0
  189. package/client/assets/useEventSelection-Cvdw9all.js.gz +0 -0
  190. package/client/assets/{useEventSelection-B9mbj1cM.js.map → useEventSelection-Cvdw9all.js.map} +1 -1
  191. package/client/assets/{useProjectData-DD_BQ9eJ.js → useProjectData-gGT2eczr.js} +2 -2
  192. package/client/assets/useProjectData-gGT2eczr.js.br +0 -0
  193. package/client/assets/useProjectData-gGT2eczr.js.gz +0 -0
  194. package/client/assets/{useProjectData-DD_BQ9eJ.js.map → useProjectData-gGT2eczr.js.map} +1 -1
  195. package/client/assets/{useReport-DozG5uz5.js → useReport-CG6m_Zb0.js} +2 -2
  196. package/client/assets/useReport-CG6m_Zb0.js.br +0 -0
  197. package/client/assets/useReport-CG6m_Zb0.js.gz +0 -0
  198. package/client/assets/{useReport-DozG5uz5.js.map → useReport-CG6m_Zb0.js.map} +1 -1
  199. package/client/assets/{useRundown-D6vokFHi.js → useRundown-C6stroSA.js} +2 -2
  200. package/client/assets/useRundown-C6stroSA.js.br +0 -0
  201. package/client/assets/useRundown-C6stroSA.js.gz +0 -0
  202. package/client/assets/useRundown-C6stroSA.js.map +1 -0
  203. package/client/assets/{useSelectAndRevealEntry-Dd6MpVHe.js → useSelectAndRevealEntry-D79sYFHr.js} +2 -2
  204. package/client/assets/useSelectAndRevealEntry-D79sYFHr.js.br +0 -0
  205. package/client/assets/useSelectAndRevealEntry-D79sYFHr.js.gz +0 -0
  206. package/client/assets/{useSelectAndRevealEntry-Dd6MpVHe.js.map → useSelectAndRevealEntry-D79sYFHr.js.map} +1 -1
  207. package/client/assets/{useWindowTitle-bg-fLPOk.js → useWindowTitle-CQ8nEeel.js} +2 -2
  208. package/client/assets/useWindowTitle-CQ8nEeel.js.br +0 -0
  209. package/client/assets/useWindowTitle-CQ8nEeel.js.gz +0 -0
  210. package/client/assets/{useWindowTitle-bg-fLPOk.js.map → useWindowTitle-CQ8nEeel.js.map} +1 -1
  211. package/client/assets/{validateEvent-BUgLWn7x.js → validateEvent-BnwPmDph.js} +2 -2
  212. package/client/assets/validateEvent-BnwPmDph.js.br +0 -0
  213. package/client/assets/validateEvent-BnwPmDph.js.gz +0 -0
  214. package/client/assets/{validateEvent-BUgLWn7x.js.map → validateEvent-BnwPmDph.js.map} +1 -1
  215. package/client/assets/{vendor-CKDP5hij.js → vendor-Dt3_Fdfs.js} +2 -2
  216. package/client/assets/vendor-Dt3_Fdfs.js.br +0 -0
  217. package/client/assets/vendor-Dt3_Fdfs.js.gz +0 -0
  218. package/client/assets/{vendor-CKDP5hij.js.map → vendor-Dt3_Fdfs.js.map} +1 -1
  219. package/client/assets/{viewLoader.utils-Bn5zu5sz.js → viewLoader.utils-H7r-zNPP.js} +2 -2
  220. package/client/assets/viewLoader.utils-H7r-zNPP.js.br +0 -0
  221. package/client/assets/viewLoader.utils-H7r-zNPP.js.gz +0 -0
  222. package/client/assets/{viewLoader.utils-Bn5zu5sz.js.map → viewLoader.utils-H7r-zNPP.js.map} +1 -1
  223. package/client/assets/{viewUtils-DQFwr7hm.js → viewUtils-k0tARVDN.js} +2 -2
  224. package/client/assets/viewUtils-k0tARVDN.js.br +0 -0
  225. package/client/assets/viewUtils-k0tARVDN.js.gz +0 -0
  226. package/client/assets/{viewUtils-DQFwr7hm.js.map → viewUtils-k0tARVDN.js.map} +1 -1
  227. package/client/index.html +2 -2
  228. package/package.json +1 -1
  229. package/server/index.cjs +104 -104
  230. package/client/assets/Backstage-BY9GL_rk.js.br +0 -0
  231. package/client/assets/Backstage-BY9GL_rk.js.gz +0 -0
  232. package/client/assets/Countdown-CXFgDHND.js.br +0 -0
  233. package/client/assets/Countdown-CXFgDHND.js.gz +0 -0
  234. package/client/assets/CuesheetTable-BLICUNky.js +0 -2
  235. package/client/assets/CuesheetTable-BLICUNky.js.br +0 -0
  236. package/client/assets/CuesheetTable-BLICUNky.js.gz +0 -0
  237. package/client/assets/CuesheetTable-BLICUNky.js.map +0 -1
  238. package/client/assets/CustomTranslationModal-4PVZBtkC.js +0 -2
  239. package/client/assets/CustomTranslationModal-4PVZBtkC.js.br +0 -0
  240. package/client/assets/CustomTranslationModal-4PVZBtkC.js.gz +0 -0
  241. package/client/assets/DelayIndicator-DUbpd6DG.js.br +0 -0
  242. package/client/assets/DelayIndicator-DUbpd6DG.js.gz +0 -0
  243. package/client/assets/DelayIndicator-DUbpd6DG.js.map +0 -1
  244. package/client/assets/EditorFeatureWrapper-CV_zaDoG.js.br +0 -0
  245. package/client/assets/EditorFeatureWrapper-CV_zaDoG.js.gz +0 -0
  246. package/client/assets/EditorUtils-CLBWDP4k.js.br +0 -0
  247. package/client/assets/EditorUtils-CLBWDP4k.js.gz +0 -0
  248. package/client/assets/EmptyPage-DmpOAg7R.js +0 -2
  249. package/client/assets/EmptyPage-DmpOAg7R.js.br +0 -2
  250. package/client/assets/EmptyPage-DmpOAg7R.js.gz +0 -0
  251. package/client/assets/FollowButton-CAUWz5Ma.js.br +0 -0
  252. package/client/assets/FollowButton-CAUWz5Ma.js.gz +0 -0
  253. package/client/assets/MessageControlExport-Dm8IjSr4.js +0 -3
  254. package/client/assets/MessageControlExport-Dm8IjSr4.js.br +0 -0
  255. package/client/assets/MessageControlExport-Dm8IjSr4.js.gz +0 -0
  256. package/client/assets/MultiPartProgressBar-Fp-sTN2u.js.br +0 -0
  257. package/client/assets/MultiPartProgressBar-Fp-sTN2u.js.gz +0 -0
  258. package/client/assets/OperatorExport-CE4ajLPS.js.br +0 -0
  259. package/client/assets/OperatorExport-CE4ajLPS.js.gz +0 -0
  260. package/client/assets/OperatorExport-CE4ajLPS.js.map +0 -1
  261. package/client/assets/OverviewWrapper-BNnAIUP1.js +0 -2
  262. package/client/assets/OverviewWrapper-BNnAIUP1.js.br +0 -0
  263. package/client/assets/OverviewWrapper-BNnAIUP1.js.gz +0 -0
  264. package/client/assets/OverviewWrapper-DOYzR0Ef.css +0 -1
  265. package/client/assets/OverviewWrapper-DOYzR0Ef.css.br +0 -0
  266. package/client/assets/OverviewWrapper-DOYzR0Ef.css.gz +0 -0
  267. package/client/assets/PipHost-CbNFsfqp.js.br +0 -0
  268. package/client/assets/PipHost-CbNFsfqp.js.gz +0 -0
  269. package/client/assets/ProjectInfo-Bf5z4Xsv.js.br +0 -0
  270. package/client/assets/ProjectInfo-Bf5z4Xsv.js.gz +0 -0
  271. package/client/assets/ProtectRoute-CCHzyy0I.js +0 -2
  272. package/client/assets/ProtectRoute-CCHzyy0I.js.br +0 -0
  273. package/client/assets/ProtectRoute-CCHzyy0I.js.gz +0 -0
  274. package/client/assets/ProtectedCuesheet-COI1W_V3.js +0 -2
  275. package/client/assets/ProtectedCuesheet-COI1W_V3.js.br +0 -0
  276. package/client/assets/ProtectedCuesheet-COI1W_V3.js.gz +0 -0
  277. package/client/assets/ProtectedCuesheet-COI1W_V3.js.map +0 -1
  278. package/client/assets/ProtectedEditor-BvTFmv-F.js +0 -3
  279. package/client/assets/ProtectedEditor-BvTFmv-F.js.br +0 -0
  280. package/client/assets/ProtectedEditor-BvTFmv-F.js.gz +0 -0
  281. package/client/assets/ProtectedEditor-BvTFmv-F.js.map +0 -1
  282. package/client/assets/ProtectedEditor-DID9cfOA.css +0 -1
  283. package/client/assets/ProtectedEditor-DID9cfOA.css.br +0 -0
  284. package/client/assets/ProtectedEditor-DID9cfOA.css.gz +0 -0
  285. package/client/assets/RundownExport-C_q3KYN_.js.br +0 -0
  286. package/client/assets/RundownExport-C_q3KYN_.js.gz +0 -0
  287. package/client/assets/RundownExport-C_q3KYN_.js.map +0 -1
  288. package/client/assets/Select-DQwYPDyI.js.br +0 -0
  289. package/client/assets/Select-DQwYPDyI.js.gz +0 -0
  290. package/client/assets/Studio-DzXTmBx4.js.br +0 -0
  291. package/client/assets/Studio-DzXTmBx4.js.gz +0 -0
  292. package/client/assets/StyleEditor-ClMEMaWh.js.br +0 -0
  293. package/client/assets/StyleEditor-ClMEMaWh.js.gz +0 -0
  294. package/client/assets/SuperscriptPeriod-CBiZU34J.js.br +0 -0
  295. package/client/assets/SuperscriptPeriod-CBiZU34J.js.gz +0 -0
  296. package/client/assets/SuperscriptTime-DP1CDlOX.js.br +0 -0
  297. package/client/assets/SuperscriptTime-DP1CDlOX.js.gz +0 -0
  298. package/client/assets/SwatchPicker-Dyxkxf3_.js +0 -2
  299. package/client/assets/SwatchPicker-Dyxkxf3_.js.br +0 -0
  300. package/client/assets/SwatchPicker-Dyxkxf3_.js.gz +0 -0
  301. package/client/assets/TimeElements-pDYJeFbV.js +0 -2
  302. package/client/assets/TimeElements-pDYJeFbV.js.br +0 -0
  303. package/client/assets/TimeElements-pDYJeFbV.js.gz +0 -0
  304. package/client/assets/TimeInput-DTWDnaum.js.br +0 -0
  305. package/client/assets/TimeInput-DTWDnaum.js.gz +0 -0
  306. package/client/assets/TimelinePage-DbLt9rQi.js.br +0 -0
  307. package/client/assets/TimelinePage-DbLt9rQi.js.gz +0 -0
  308. package/client/assets/TimelinePage-DbLt9rQi.js.map +0 -1
  309. package/client/assets/Timer-BfyVKQ8U.js.br +0 -0
  310. package/client/assets/Timer-BfyVKQ8U.js.gz +0 -0
  311. package/client/assets/TimerControlExport-BJfhJc07.js +0 -2
  312. package/client/assets/TimerControlExport-BJfhJc07.js.br +0 -0
  313. package/client/assets/TimerControlExport-BJfhJc07.js.gz +0 -0
  314. package/client/assets/TimerControlExport-BJfhJc07.js.map +0 -1
  315. package/client/assets/TimerDisplay-Dgmbqf65.js +0 -2
  316. package/client/assets/TimerDisplay-Dgmbqf65.js.br +0 -0
  317. package/client/assets/TimerDisplay-Dgmbqf65.js.gz +0 -0
  318. package/client/assets/TitleCard-MUurHeZ7.js.br +0 -0
  319. package/client/assets/TitleCard-MUurHeZ7.js.gz +0 -0
  320. package/client/assets/Tooltip-DXph8P8p.js.br +0 -0
  321. package/client/assets/Tooltip-DXph8P8p.js.gz +0 -0
  322. package/client/assets/ViewLogo-Ckp7i75x.js.br +0 -0
  323. package/client/assets/ViewLogo-Ckp7i75x.js.gz +0 -0
  324. package/client/assets/ViewParamsEditor-Cxngd15h.js.br +0 -0
  325. package/client/assets/ViewParamsEditor-Cxngd15h.js.gz +0 -0
  326. package/client/assets/editorSettings-D4jfu68W.js.br +0 -0
  327. package/client/assets/editorSettings-D4jfu68W.js.gz +0 -0
  328. package/client/assets/getProgress-B9UANc25.js.br +0 -0
  329. package/client/assets/getProgress-B9UANc25.js.gz +0 -0
  330. package/client/assets/index-2lQ-45a9.js +0 -3
  331. package/client/assets/index-2lQ-45a9.js.br +0 -0
  332. package/client/assets/index-2lQ-45a9.js.gz +0 -0
  333. package/client/assets/index-2lQ-45a9.js.map +0 -1
  334. package/client/assets/offset-DAyBfv5b.js.br +0 -4
  335. package/client/assets/offset-DAyBfv5b.js.gz +0 -0
  336. package/client/assets/parseUserTime-WkVNjkkE.js +0 -2
  337. package/client/assets/parseUserTime-WkVNjkkE.js.br +0 -0
  338. package/client/assets/parseUserTime-WkVNjkkE.js.gz +0 -0
  339. package/client/assets/playbackstate-znZk3SSJ.js.br +0 -0
  340. package/client/assets/playbackstate-znZk3SSJ.js.gz +0 -0
  341. package/client/assets/presentation.utils-CjjYs5II.js.br +0 -0
  342. package/client/assets/presentation.utils-CjjYs5II.js.gz +0 -0
  343. package/client/assets/rundownUtils-BTQ3EeqN.js.br +0 -0
  344. package/client/assets/rundownUtils-BTQ3EeqN.js.gz +0 -0
  345. package/client/assets/timer.utils-B-Ui91P7.js +0 -2
  346. package/client/assets/timer.utils-B-Ui91P7.js.br +0 -0
  347. package/client/assets/timer.utils-B-Ui91P7.js.gz +0 -0
  348. package/client/assets/useCustomFields-zr9SUl5o.js +0 -2
  349. package/client/assets/useCustomFields-zr9SUl5o.js.br +0 -0
  350. package/client/assets/useCustomFields-zr9SUl5o.js.gz +0 -0
  351. package/client/assets/useEventSelection-B9mbj1cM.js.br +0 -0
  352. package/client/assets/useEventSelection-B9mbj1cM.js.gz +0 -0
  353. package/client/assets/useProjectData-DD_BQ9eJ.js.br +0 -0
  354. package/client/assets/useProjectData-DD_BQ9eJ.js.gz +0 -0
  355. package/client/assets/useReport-DozG5uz5.js.br +0 -0
  356. package/client/assets/useReport-DozG5uz5.js.gz +0 -0
  357. package/client/assets/useRundown-D6vokFHi.js.br +0 -0
  358. package/client/assets/useRundown-D6vokFHi.js.gz +0 -0
  359. package/client/assets/useRundown-D6vokFHi.js.map +0 -1
  360. package/client/assets/useSelectAndRevealEntry-Dd6MpVHe.js.br +0 -0
  361. package/client/assets/useSelectAndRevealEntry-Dd6MpVHe.js.gz +0 -0
  362. package/client/assets/useWindowTitle-bg-fLPOk.js.br +0 -0
  363. package/client/assets/useWindowTitle-bg-fLPOk.js.gz +0 -0
  364. package/client/assets/validateEvent-BUgLWn7x.js.br +0 -0
  365. package/client/assets/validateEvent-BUgLWn7x.js.gz +0 -0
  366. package/client/assets/vendor-CKDP5hij.js.br +0 -0
  367. package/client/assets/vendor-CKDP5hij.js.gz +0 -0
  368. package/client/assets/viewLoader.utils-Bn5zu5sz.js.br +0 -0
  369. package/client/assets/viewLoader.utils-Bn5zu5sz.js.gz +0 -0
  370. package/client/assets/viewUtils-DQFwr7hm.js.br +0 -0
  371. package/client/assets/viewUtils-DQFwr7hm.js.gz +0 -0
@@ -1,2 +0,0 @@
1
- import{j as e,h as m,bs as qe,bt as $t,am as ot,bl as Ft,bu as Ne,bv as we,bw as Wt,bx as At,ah as rt,by as Ht,bc as Pt,f as be,ay as lt,a$ as Bt,b0 as Ue,bo as qt,bz as Ut,bA as Kt,b1 as Vt,bn as Gt,bB as Jt,C as Xt,aX as ee,aG as Yt,aY as ct,aZ as Zt,a_ as Ke,bC as dt,bD as ut,bE as mt,aN as ht,bF as Qt,b3 as en,b4 as tn,bG as se,bq as nn,bH as sn,as as Oe,ar as Ve,T as Ge,y as an,av as on,bI as rn,bJ as ln,bK as cn,bL as dn}from"./vendor-CKDP5hij.js";import{S as Le,u as xt,T as Je,M as ft,G as un,p as ie,P as mn,l as Xe}from"./useEventSelection-B9mbj1cM.js";import{ah as Y,aD as G,e as W,ak as A,s as hn,m as R,T as le,B as F,bC as xn,x as fe,bk as Ye,bD as Me,f as te,b6 as D,k as Ze,bE as fn,an as gn,aw as pn,O as jn,P as bn,bd as Qe,bF as De,bG as ze,o as Cn}from"./index-2lQ-45a9.js";import{u as yn,i as ae,k as gt,j as pt,w as $e,S as ne,a as vn}from"./useRundown-D6vokFHi.js";import{L as C,T as O,S as _n}from"./EditorUtils-CLBWDP4k.js";import{T as Q,A as ge,s as En}from"./TimeInput-DTWDnaum.js";import{u as Fe}from"./useCustomFields-zr9SUl5o.js";import{T as K,E as Se}from"./validateEvent-BUgLWn7x.js";import{S as pe}from"./Select-DQwYPDyI.js";import{S as jt,P as bt,C as Z}from"./SwatchPicker-Dyxkxf3_.js";import{T as P}from"./Tooltip-DXph8P8p.js";import{a as Ct,D as je}from"./DelayIndicator-DUbpd6DG.js";import{p as Ce}from"./parseUserTime-WkVNjkkE.js";import{g as kn}from"./offset-DAyBfv5b.js";import{T as Sn}from"./editorSettings-D4jfu68W.js";import{E as Tn}from"./EmptyPage-DmpOAg7R.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="f6b8f6f3-323d-4c38-865d-88a6822b6338",t._sentryDebugIdIdentifier="sentry-dbid-f6b8f6f3-323d-4c38-865d-88a6822b6338")}catch{}})();var $=(t=>(t.onLoad="onLoad",t.onStart="onStart",t.onPause="onPause",t.onStop="onStop",t.onClock="onClock",t.onUpdate="onUpdate",t.onFinish="onFinish",t.onWarning="onWarning",t.onDanger="onDanger",t))($||{});const In=Object.keys($);function Nn(t){return t.replaceAll(" ","").replaceAll(",",".")}const yt=m.createContext(null);function ba({children:t,actions:s}){return e.jsx(yt.Provider,{value:s,children:t})}function L(){const t=m.useContext(yt);if(!t)throw new Error("useEntryActionsContext must be used within EntryActionsProvider");return t}const wn="_imageContainer_1k5qa_17",Dn="_imageOverlay_1k5qa_25",et={imageContainer:wn,imageOverlay:Dn};function zn({src:t}){return e.jsxs("div",{className:et.imageContainer,children:[!!t&&e.jsx("img",{loading:"lazy",src:t}),e.jsx("div",{className:et.imageOverlay})]})}function vt({value:t,inputref:s,...i}){return m.useEffect(()=>{const n=s.current;return qe(s.current),()=>{qe.destroy(n)}},[s,t]),e.jsx(Sn,{ref:s,value:t,...i})}function ye(t,s,i,n){const[r,o]=m.useState(t),a=m.useRef(!1);m.useEffect(()=>{o(typeof t>"u"?"":t)},[t]);const l=m.useCallback(x=>{x!==r&&o(x)},[r]),c=m.useCallback(x=>{var f;if(x===t&&!(n!=null&&n.allowSubmitSameValue))(f=n==null?void 0:n.onCancelUpdate)==null||f.call(n);else{const u=x.trim();s(u),u!==x&&o(u)}setTimeout(()=>{var u,j,p;n!=null&&n.allowKeyboardNavigation?(j=(u=i.current)==null?void 0:u.parentElement)==null||j.focus():(p=i.current)==null||p.blur()})},[t,n,i,s]),d=m.useCallback(()=>{var x;o(t),i.current&&(i.current.value=t),(x=n==null?void 0:n.onCancelUpdate)==null||x.call(n),setTimeout(()=>{var f;return(f=i.current)==null?void 0:f.blur()})},[t,n,i]),h=m.useMemo(()=>{const x=[["Escape",u=>{u.preventDefault(),d()},{preventDefault:!0}]];n!=null&&n.submitOnEnter&&x.push(["Enter",()=>{a.current=!0,c(r),setTimeout(()=>{a.current=!1},0)}]),n!=null&&n.submitOnCtrlEnter&&x.push(["mod + Enter",()=>{a.current=!0,c(r),setTimeout(()=>{a.current=!1},0)}]);const f=$t(x);return u=>{(u.key==="ArrowLeft"||u.key==="ArrowRight"||u.key==="ArrowUp"||u.key==="ArrowDown")&&u.stopPropagation(),f(u)}},[d,c,n==null?void 0:n.submitOnCtrlEnter,n==null?void 0:n.submitOnEnter,r]);return{value:r,onChange:x=>l(x.target.value),onBlur:x=>{a.current||c(x.target.value)},onKeyDown:h}}function ve({className:t,field:s,label:i,initialValue:n,style:r,submitHandler:o}){const a=m.useRef(null),l=m.useCallback(f=>o(s,f),[s,o]),{value:c,onChange:d,onBlur:h,onKeyDown:x}=ye(n,l,a,{submitOnCtrlEnter:!0});return e.jsxs("div",{children:[e.jsx(C,{className:t,htmlFor:s,style:r,children:i}),e.jsx(vt,{id:s,inputref:a,rows:1,"data-testid":"input-textarea",fluid:!0,value:c,onChange:d,onBlur:h,onKeyDown:x})]})}function J({className:t,field:s,label:i,initialValue:n,style:r,submitHandler:o,maxLength:a,placeholder:l}){const c=m.useRef(null),d=m.useCallback(j=>o(s,j),[s,o]),{value:h,onChange:x,onBlur:f,onKeyDown:u}=ye(n,d,c,{submitOnEnter:!0});return e.jsxs("div",{children:[e.jsx(C,{className:t,htmlFor:s,style:r,children:i}),e.jsx(Y,{id:s,ref:c,maxLength:a,fluid:!0,"data-testid":"input-textfield",value:h,placeholder:l,onChange:x,onBlur:f,onKeyDown:u})]})}const Rn="_rundownEditor_d7rpz_19",On="_content_d7rpz_29",Ln="_column_d7rpz_48",Mn="_decorated_d7rpz_57",$n="_delayLabel_d7rpz_65",Fn="_switchLabel_d7rpz_73",Wn="_inline_d7rpz_83",An="_splitTwo_d7rpz_89",Hn="_splitThree_d7rpz_96",Pn="_tooltipIcon_d7rpz_103",Bn="_customImage_d7rpz_110",qn="_textLikeInput_d7rpz_117",Un="_inactive_d7rpz_125",Kn="_active_d7rpz_129",b={rundownEditor:Rn,content:On,column:Ln,decorated:Mn,delayLabel:$n,switchLabel:Fn,inline:Wn,splitTwo:An,splitThree:Hn,tooltipIcon:Pn,customImage:Bn,textLikeInput:qn,inactive:Un,active:Kn};function We({fields:t,handleSubmit:s,entry:i}){return e.jsx(m.Fragment,{children:Object.keys(t).map(n=>{const r=`${i.id}-${n}`,o=`custom-${n}`,a=i.custom[n]??"",{backgroundColor:l,color:c}=G(t[n].colour),d=t[n].label;return t[n].type==="text"?e.jsx(ve,{field:o,label:d,initialValue:a,submitHandler:s,className:b.decorated,style:{"--decorator-bg":l,"--decorator-color":c}},r):t[n].type==="image"?e.jsxs("div",{className:b.customImage,children:[e.jsx(J,{field:o,label:d,initialValue:a,placeholder:"Paste image URL",submitHandler:s,className:b.decorated,maxLength:255,style:{"--decorator-bg":l,"--decorator-color":c}},r),e.jsx(zn,{src:a})]},r):null})})}const Vn="_inputGroup_1e1jq_17",Gn="_delayed_1e1jq_24",tt={inputGroup:Vn,delayed:Gn};function he({hasDelay:t,children:s}){return e.jsx("div",{className:W([tt.inputGroup,t&&tt.delayed]),children:s})}const Jn="_fourtyfive_ezj8b_13",Xn="_timerNote_ezj8b_21",Yn="_inactive_ezj8b_27",Zn="_active_ezj8b_31",Qn="_inputWrapper_ezj8b_35",es="_hoverLabel_ezj8b_39",N={fourtyfive:Jn,timerNote:Xn,inactive:Yn,active:Zn,inputWrapper:Qn,hoverLabel:es},ts=m.memo(ns);function ns({eventId:t,countToEnd:s,timeStart:i,timeEnd:n,duration:r,timeStrategy:o,linkStart:a,delay:l,showLabels:c}){const{updateEntry:d,updateTimer:h}=L(),x=(_,v)=>{h(t,_,v)},f=_=>{d({id:t,timeStrategy:_})},u=_=>{d({id:t,linkStart:_})},j=[];i+r>hn&&j.push("Over midnight"),s&&j.push("Count to End");const p=l!==0,g=o===K.LockEnd,y=o===K.LockDuration;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:N.inputWrapper,children:[c&&e.jsx(C,{className:N.sectionTitle,children:"Start time"}),e.jsx(C,{className:N.hoverLabel,children:"Start"}),e.jsxs(he,{hasDelay:p,children:[e.jsx(Q,{name:"timeStart",submitHandler:x,time:i,placeholder:"Start",align:"left",disabled:a}),e.jsx(P,{text:"Link start to previous end",onClick:()=>u(!a),render:e.jsx(A,{variant:"subtle-white",className:a?N.active:N.inactive}),children:e.jsx("span",{className:N.fourtyfive,children:a?e.jsx(ot,{}):e.jsx(Ft,{})})})]})]}),e.jsxs("div",{className:N.inputWrapper,children:[c&&e.jsx(C,{children:"End time"}),e.jsx(C,{className:N.hoverLabel,children:"End"}),e.jsxs(he,{hasDelay:p,children:[e.jsx(Q,{name:"timeEnd",submitHandler:x,time:n,placeholder:"End",align:"left",disabled:y}),e.jsx(P,{text:"Lock end",render:e.jsx(A,{variant:"subtle-white",className:g?N.active:N.inactive}),onClick:()=>f(K.LockEnd),"data-testid":"lock__end",children:g?e.jsx(Ne,{}):e.jsx(we,{})})]})]}),e.jsxs("div",{className:N.inputWrapper,children:[c&&e.jsx(C,{children:"Duration"}),e.jsx(C,{className:N.hoverLabel,children:"Duration"}),e.jsxs(he,{hasDelay:p,children:[e.jsx(Q,{name:"duration",submitHandler:x,time:r,placeholder:"Duration",align:"left",disabled:g}),e.jsx(P,{text:"Lock duration",render:e.jsx(A,{variant:"subtle-white",className:y?N.active:N.inactive}),onClick:()=>f(K.LockDuration),"data-testid":"lock__duration",children:y?e.jsx(Ne,{}):e.jsx(we,{})})]})]}),j.length>0&&e.jsx(P,{text:j.join(" - "),className:N.timerNote,"data-testid":"event-warning",render:e.jsx("span",{}),children:e.jsx(Wt,{})})]})}const ss=m.memo(is);function is({eventId:t,timeStart:s,timeEnd:i,duration:n,timeStrategy:r,linkStart:o,countToEnd:a,delay:l,endAction:c,timerType:d,timeWarning:h,timeDanger:x}){const{updateEntry:f}=L(),u=(g,y)=>{if(g==="countToEnd"){f({id:t,countToEnd:y});return}if(g==="timeWarning"||g==="timeDanger"){const _=Ce(y);f({id:t,[g]:_});return}if(g==="timerType"||g==="endAction"){f({id:t,[g]:y});return}},p=l!==0?`Event is ${Ct(l,"expanded")}. New schedule ${R(s+l)} → ${R(i+l)}`:"";return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:b.column,children:[e.jsx(O,{children:"Event schedule"}),e.jsxs("div",{children:[e.jsx("div",{className:b.inline,children:e.jsx(ts,{eventId:t,timeStart:s,timeEnd:i,duration:n,timeStrategy:r,linkStart:o,delay:l,countToEnd:a,showLabels:!0})}),e.jsx("div",{className:b.delayLabel,children:p})]})]}),e.jsxs("div",{className:b.column,children:[e.jsx(O,{children:"Event Behaviour"}),e.jsxs("div",{className:b.splitTwo,children:[e.jsxs("div",{children:[e.jsx(C,{htmlFor:"endAction",children:"End Action"}),e.jsx(pe,{value:c,onValueChange:g=>{g!==null&&u("endAction",g)},options:[{value:Se.None,label:"None"},{value:Se.LoadNext,label:"Load next event"},{value:Se.PlayNext,label:"Play next event"}]})]}),e.jsxs("div",{children:[e.jsx(C,{htmlFor:"countToEnd",children:"Count to End"}),e.jsxs(C,{className:b.switchLabel,children:[e.jsx(jt,{id:"countToEnd",checked:a,onCheckedChange:g=>u("countToEnd",g)}),a?"On":"Off"]})]})]})]}),e.jsxs("div",{className:b.column,children:[e.jsx(O,{children:e.jsxs(P,{text:"Changes how the timer is displayed in different views. It is not reflected in the rundown",render:e.jsx("span",{}),children:["Display Options",e.jsx(At,{className:b.tooltipIcon})]})}),e.jsxs("div",{className:b.splitTwo,children:[e.jsxs("div",{children:[e.jsx(C,{htmlFor:"timerType",children:"Timer Type"}),e.jsx(pe,{value:d,onValueChange:g=>{g!==null&&u("timerType",g)},options:[{value:le.CountDown,label:"Count down"},{value:le.CountUp,label:"Count up"},{value:le.Clock,label:"Clock"},{value:le.None,label:"None"}]})]}),e.jsxs("div",{className:b.inline,children:[e.jsxs("div",{children:[e.jsx(C,{htmlFor:"timeWarning",children:"Warning Time"}),e.jsx(Q,{id:"timeWarning",name:"timeWarning",submitHandler:u,time:h,placeholder:"Duration"})]}),e.jsxs("div",{children:[e.jsx(C,{htmlFor:"timeDanger",children:"Danger Time"}),e.jsx(Q,{id:"timeDanger",name:"timeDanger",submitHandler:u,time:x,placeholder:"Duration"})]})]})]})]})]})}const as=m.memo(os);function os({eventId:t,cue:s,flag:i,title:n,note:r,colour:o}){const{updateEntry:a}=L(),l=(h,x)=>{a({id:t,cue:Nn(x)})},c=h=>{a({id:t,flag:h})},d=(h,x)=>{a({id:t,[h]:x})};return e.jsxs("div",{className:b.column,children:[e.jsx(O,{children:"Event Data"}),e.jsxs("div",{className:b.splitThree,children:[e.jsxs("div",{children:[e.jsx(C,{htmlFor:"eventId",children:"Event ID (read only)"}),e.jsx(Y,{id:"eventId","data-testid":"input-textfield",value:t,readOnly:!0,fluid:!0})]}),e.jsx(J,{field:"cue",label:"Cue",initialValue:s,submitHandler:l,maxLength:10}),e.jsxs("div",{children:[e.jsx(C,{htmlFor:"flag",children:"Flag"}),e.jsxs(C,{className:b.switchLabel,children:[e.jsx(jt,{id:"flag",checked:i,onCheckedChange:c}),i?"On":"Off"]})]})]}),e.jsxs("div",{children:[e.jsx(C,{children:"Colour"}),e.jsx(Le,{name:"colour",value:o,handleChange:d})]}),e.jsx(J,{field:"title",label:"Title",initialValue:n,submitHandler:d}),e.jsx(ve,{field:"note",label:"Note",initialValue:r,submitHandler:d})]})}const rs=[$.onLoad,$.onStart,$.onPause,$.onFinish,$.onWarning,$.onDanger],ls="_triggerForm_l7413_17",cs="_trigger_l7413_17",ds="_errorLabel_l7413_38",us="_success_l7413_42",xe={triggerForm:ls,trigger:cs,errorLabel:ds,success:us};function ms({triggers:t,eventId:s}){const i=t.length>0;return e.jsxs(e.Fragment,{children:[i&&e.jsx(xs,{triggers:t,eventId:s}),e.jsx(hs,{triggers:t,eventId:s})]})}function hs({eventId:t,triggers:s}){const{data:i}=xt(),{updateEntry:n}=L(),[r,o]=m.useState(void 0),[a,l]=m.useState($.onStart),c=(u,j)=>{const p=s??new Array,g=xn();p.push({id:g,title:"",trigger:u,automationId:j}),n({id:t,triggers:p})},h=((u,j)=>{if(j===void 0)return"Select an automation";if(!Object.keys(i.automations).includes(j))return"This automation does not exist";if(s!==void 0)return Object.values(s).some(p=>p.automationId===j&&p.trigger===u)?"Automation can only be used once":void 0})(a,r),x=m.useMemo(()=>[{value:null,label:"Select Trigger"},...rs.map(u=>({value:u,label:u}))],[]),f=m.useMemo(()=>[{value:null,label:"Select Automation"},...Object.values(i.automations).map(({id:u,title:j})=>({value:u,label:j}))],[i.automations]);return e.jsxs("div",{className:xe.triggerForm,children:[e.jsx(pe,{value:a,onValueChange:u=>{u!==null&&l(u)},options:x}),e.jsx(pe,{value:r??null,onValueChange:u=>{u!==null&&o(u)},options:f}),e.jsx(F,{disabled:h!==void 0,onClick:()=>r&&c(a,r),children:"Add"}),h!==void 0?e.jsx(P,{text:h,render:e.jsx("span",{}),children:e.jsx(Ht,{className:xe.errorLabel})}):e.jsx(Pt,{className:xe.success})]})}function xs({eventId:t,triggers:s}){const{updateEntry:i}=L(),{data:n}=xt(),r=m.useCallback(a=>{const l=s.filter(c=>c.id!==a);i({id:t,triggers:l})},[t,s,i]),o={};return In.forEach(a=>{const l=s.filter(c=>c.trigger===a);l.length&&Object.assign(o,{[a]:l})}),e.jsx("div",{children:Object.entries(o).map(([a,l])=>e.jsx(m.Fragment,{children:l.map(c=>{var f;const{id:d,automationId:h}=c,x=((f=n.automations[h])==null?void 0:f.title)??"<MISSING AUTOMATION>";return e.jsxs("div",{className:xe.trigger,children:[e.jsx(Je,{children:a}),e.jsx(Je,{children:x}),e.jsx(A,{variant:"ghosted-destructive",onClick:()=>r(d),children:e.jsx(rt,{})})]},d)})},a))})}function fs({event:t}){const{data:s}=Fe(),{updateEntry:i}=L(),n=window.location.pathname.includes("editor"),r=m.useCallback((o,a)=>{if(o.startsWith("custom-")){const l=o.split("custom-")[1];i({id:t.id,custom:{[l]:a}})}else i({id:t.id,[o]:a})},[t.id,i]);return e.jsxs("div",{className:b.content,children:[e.jsx(ss,{eventId:t.id,timeStart:t.timeStart,timeEnd:t.timeEnd,duration:t.duration,timeStrategy:t.timeStrategy,linkStart:t.linkStart,countToEnd:t.countToEnd,delay:t.delay,endAction:t.endAction,timerType:t.timerType,timeWarning:t.timeWarning,timeDanger:t.timeDanger},`${t.id}-times`),e.jsx(as,{eventId:t.id,cue:t.cue,flag:t.flag,title:t.title,note:t.note,colour:t.colour},`${t.id}-titles`),e.jsxs("div",{className:b.column,children:[e.jsxs(O,{children:["Custom Fields",n&&e.jsx(ge,{search:"settings=manage__custom",children:"Manage Custom Fields"})]}),e.jsx(We,{fields:s,handleSubmit:r,entry:t})]}),e.jsxs("div",{className:b.column,children:[e.jsxs(O,{children:["Automations",n&&e.jsx(ge,{search:"settings=automation",children:"Manage Automations"})]}),e.jsx(ms,{triggers:t.triggers,eventId:t.id})]})]})}const gs="_blink_1qqxl_1",ps="_fourtyfive_1qqxl_13",js="_textInput_1qqxl_18",bs="_under_1qqxl_31",Cs="_over_1qqxl_34",ys="_muted_1qqxl_37",vs="_disabled_1qqxl_40",ce={blink:gs,fourtyfive:ps,textInput:js,under:bs,over:Cs,muted:ys,disabled:vs},_t=m.forwardRef(({offset:t,muted:s,disabled:i,children:n,className:r,...o},a)=>{const l=m.useRef(null),c=W([ce.textInput,t&&ce[t],s&&ce.muted,i&&ce.disabled,r]);return m.useImperativeHandle(a,()=>({focusParentElement(){var d,h;(h=(d=l.current)==null?void 0:d.parentElement)==null||h.focus()}})),e.jsx("div",{className:c,tabIndex:i?-1:0,...o,ref:l,children:n})});_t.displayName="TextLikeInput";const V=m.memo(_t);function _s({id:t,name:s,submitHandler:i,time:n,emptyDisplay:r,placeholder:o,disabled:a,align:l="center",className:c}){const d=m.useRef(null),[h,x]=m.useState(""),f=m.useRef(!1),u=m.useCallback(()=>{typeof n!="number"||isNaN(n)?x(r):x(R(n))},[r,n]),j=m.useCallback(()=>{var v;(v=d.current)==null||v.select()},[]),p=m.useCallback(v=>{if(v===""&&n===null)return!1;const E=Ce(v);return E===n?!1:(i(s,E),!0)},[s,i,n]),g=m.useCallback(v=>{p(v)||u()},[p,u]),y=m.useCallback(v=>{var E,H;v.key==="Enter"&&((E=d.current)==null||E.blur()),v.key==="Escape"&&(f.current=!0,(H=d.current)==null||H.blur(),u())},[u]),_=m.useCallback(v=>{if(f.current){f.current=!1;return}g(v.target.value)},[g]);return m.useEffect(()=>{u()},[u]),e.jsx(Y,{id:t,disabled:a,ref:d,"data-testid":`time-input-${s}`,className:W([En.timeInput,c]),placeholder:o,onFocus:j,onChange:v=>x(v.target.value),onBlur:_,onKeyDown:y,value:h,maxLength:8,autoComplete:"off",style:{textAlign:l}})}function Es({duration:t,targetDuration:s,submitHandler:i}){const n=s!==null;return e.jsxs("div",{children:[e.jsx(C,{htmlFor:"targetDuration",children:"Target duration"}),e.jsxs(he,{hasDelay:n&&s!==t,children:[e.jsx(_s,{name:"targetDuration",time:s,submitHandler:i,emptyDisplay:fe,className:n?"":b.inactive}),e.jsx(P,{text:"Lock to target duration",className:W([b.timeAction,n&&b.active]),onClick:()=>i("targetDuration",n?null:t),"data-testid":"lock__duration",render:e.jsx(A,{variant:"subtle-white",className:n?b.active:b.inactive}),children:n?e.jsx(Ne,{}):e.jsx(we,{})})]})]})}function ks({group:t}){const{data:s}=Fe(),{updateEntry:i}=L(),n=m.useCallback((l,c)=>{if(typeof l=="string"&&l.startsWith("custom-")){const d=l.split("custom-")[1];i({id:t.id,custom:{[d]:c}});return}return i(l==="targetDuration"?{id:t.id,targetDuration:c}:{id:t.id,[l]:c})},[t.id,i]),r=window.location.pathname.includes("editor"),o=t.targetDuration===null?null:t.duration-t.targetDuration,a=o!==null?kn(o):null;return e.jsxs("div",{className:b.content,children:[e.jsxs("div",{className:b.column,children:[e.jsx(O,{children:"Group schedule"}),e.jsxs("div",{className:b.inline,children:[e.jsxs("div",{children:[e.jsx(C,{children:"First event start"}),e.jsx(V,{className:b.textLikeInput,disabled:!0,children:R(t.timeStart,{fallback:Ye})})]}),e.jsxs("div",{children:[e.jsx(C,{children:"Last event end"}),e.jsx(V,{className:b.textLikeInput,disabled:!0,children:R(t.timeEnd,{fallback:Ye})})]}),e.jsxs("div",{children:[e.jsx(C,{htmlFor:"duration",children:"Scheduled duration"}),e.jsx(V,{className:b.textLikeInput,disabled:!0,children:R(t.duration,{fallback:fe})})]})]}),e.jsxs("div",{className:b.inline,children:[e.jsxs("div",{children:[e.jsx(C,{htmlFor:"eventId",children:"Plan offset"}),e.jsxs(V,{offset:a,className:W([b.textLikeInput,o===null&&b.inactive]),disabled:!0,children:[o!==null&&o>0?"+":"",R(o,{fallback:fe})]})]}),e.jsx(Es,{duration:t.duration,targetDuration:t.targetDuration,submitHandler:n})]})]}),e.jsxs("div",{className:b.column,children:[e.jsx(O,{children:"Group data"}),e.jsxs("div",{children:[e.jsx(C,{children:"Colour"}),e.jsx(Le,{name:"colour",value:t.colour,handleChange:n})]}),e.jsx(J,{field:"title",label:"Title",initialValue:t.title,submitHandler:n}),e.jsx(ve,{field:"note",label:"Note",initialValue:t.note,submitHandler:n})]}),e.jsxs("div",{className:b.column,children:[e.jsxs(O,{children:["Custom Fields",r&&e.jsx(ge,{search:"settings=manage__custom",children:"Manage Custom Fields"})]}),e.jsx(We,{fields:s,handleSubmit:n,entry:t})]})]})}function Ss({milestone:t}){const{data:s}=Fe(),{updateEntry:i}=L(),n=m.useCallback((o,a)=>{if(typeof o=="string"&&o.startsWith("custom-")){const l=o.split("custom-")[1];i({id:t.id,custom:{[l]:a}});return}return i({id:t.id,[o]:a})},[t.id,i]),r=window.location.pathname.includes("editor");return e.jsxs("div",{className:b.content,children:[e.jsxs("div",{className:b.column,children:[e.jsx(O,{children:"Milestone data"}),e.jsxs("div",{className:b.splitTwo,children:[e.jsxs("div",{children:[e.jsx(C,{htmlFor:"entryId",children:"Milestone ID (read only)"}),e.jsx(Y,{id:"entryId","data-testid":"input-textfield",value:t.id,readOnly:!0,fluid:!0})]}),e.jsx(J,{field:"cue",label:"Cue",initialValue:t.cue,submitHandler:n,maxLength:10})]}),e.jsxs("div",{children:[e.jsx(C,{children:"Colour"}),e.jsx(Le,{name:"colour",value:t.colour,handleChange:n})]}),e.jsx(J,{field:"title",label:"Title",initialValue:t.title,submitHandler:n}),e.jsx(ve,{field:"note",label:"Note",initialValue:t.note,submitHandler:n})]}),e.jsxs("div",{className:b.column,children:[e.jsxs(O,{children:["Custom Fields",r&&e.jsx(ge,{search:"settings=manage__custom",children:"Manage Custom Fields"})]}),e.jsx(We,{fields:s,handleSubmit:n,entry:t})]})]})}function Ts({entryId:t}){const{data:s}=yn(),i=m.useMemo(()=>s.order.length===0?null:s.entries[t]??null,[t,s.order,s.entries]);return ae(i)?e.jsx("div",{className:b.entryEditor,"data-testid":"editor-container",children:e.jsx(fs,{event:i})}):gt(i)?e.jsx("div",{className:b.inModal,"data-testid":"editor-container",children:e.jsx(Ss,{milestone:i})}):pt(i)?e.jsx("div",{className:b.inModal,"data-testid":"editor-container",children:e.jsx(ks,{group:i})}):null}const Re=be(t=>({selectedEntryId:null,setEditableEntry:s=>t({selectedEntryId:s}),clearSelection:()=>t({selectedEntryId:null})})),Ca=m.memo(Is);function Is(){const t=Re(i=>i.selectedEntryId),s=Re(i=>i.clearSelection);return t===null?null:e.jsx(ft,{isOpen:!0,onClose:s,title:"Edit entry",showCloseButton:!0,bodyElements:e.jsx(Ts,{entryId:t})})}function Ns(t,s){let i;return(...n)=>{i&&clearTimeout(i),i=setTimeout(()=>{i=null,t(...n)},s)}}function ws(t="cuesheet"){const s=m.useMemo(()=>Me(`${t}-table-sizes`),[t]),[i,n]=m.useState(()=>{try{const o=localStorage.getItem(s);return o?JSON.parse(o):{}}catch{return{}}});m.useEffect(()=>{Ns(a=>{localStorage.setItem(s,JSON.stringify(a))},500)(i)},[i,s]);const r=m.useCallback(o=>{n(o)},[]);return{columnSizing:i,setColumnSizing:r}}function Et(t,s="cuesheet"){const i=m.useMemo(()=>Me(`${s}-table-order`),[s]),[n,r]=lt({key:i,defaultValue:t.map(a=>a.id)});m.useEffect(()=>{const a=t.map(l=>l.id);a.some(l=>!n.includes(l))&&r(a)},[n,t,r]);const o=m.useCallback(()=>{r(t.map(a=>a.id))},[t,r]);return{columnOrder:n,saveColumnOrder:r,resetColumnOrder:o}}function Ds(t="cuesheet"){const s=m.useMemo(()=>Me(`${t}-table-hidden`),[t]),[i,n]=lt({key:s,defaultValue:{}});return{columnVisibility:i,setColumnVisibility:n}}function ya({columns:t,tableRoot:s="cuesheet",children:i}){const{columnOrder:n,saveColumnOrder:r}=Et(t,s),o=Bt(Ue(Vt,{activationConstraint:{delay:100,tolerance:50}}),Ue(Kt,{activationConstraint:{delay:100,tolerance:50}})),a=l=>{const{delta:c,active:d,over:h}=l;if(c.y>200||(h==null?void 0:h.id)==null)return;const x=n.indexOf(d.id),f=n.indexOf(h.id);if(f===-1)return;const u=[...n],j=u.splice(x,1);u.splice(f,0,j[0]),r(u)};return e.jsx(qt,{sensors:o,collisionDetection:Ut,onDragEnd:a,children:i})}const kt=m.forwardRef(({initialValue:t,fieldId:s,fieldLabel:i,allowSubmitSameValue:n,handleUpdate:r,handleCancelUpdate:o},a)=>{const l=m.useRef(null),c=m.useCallback(u=>r(u),[r]),{value:d,onChange:h,onBlur:x,onKeyDown:f}=ye(t,c,l,{allowSubmitSameValue:n,allowKeyboardNavigation:!0,submitOnEnter:!0,submitOnCtrlEnter:!0,onCancelUpdate:o});return m.useImperativeHandle(a,()=>({focus(){var u;(u=l.current)==null||u.focus()},select(){var u;(u=l.current)==null||u.select()},focusParentElement(){var u,j;(j=(u=l.current)==null?void 0:u.parentElement)==null||j.focus()}}),[l]),e.jsx(Y,{ref:l,variant:"ghosted",fluid:!0,value:d,onChange:h,onBlur:x,onKeyDown:f,"data-testid":s?`cuesheet-editor-${s}`:void 0,"aria-label":i?`${i} editor`:void 0})});kt.displayName="SingleLineCell";const Ae=m.memo(kt),zs=m.memo(Rs);function Rs({initialValue:t,lockedValue:s,delayed:i,onSubmit:n,children:r}){const[o,a]=m.useState(!1),[l,c]=m.useState(t),d=m.useRef(null),h=m.useRef(null);m.useEffect(()=>{o&&d.current&&(d.current.focus(),d.current.select())},[o]),m.useEffect(()=>{o||c(t)},[t,o]);const x=()=>a(!0),f=()=>{a(!1),setTimeout(()=>{var p;return(p=h.current)==null?void 0:p.focusParentElement()})},u=m.useCallback(p=>{var y,_,v;if(a(!1),p===""){n(p),(y=d.current)==null||y.focusParentElement();return}if(p.startsWith("p")||p.startsWith("+")){n(p),(_=d.current)==null||_.focusParentElement();return}const g=Ce(p);if(g<0||isNaN(g)){c(t),setTimeout(()=>{var E;return(E=h.current)==null?void 0:E.focusParentElement()});return}if(g===t&&s){(v=d.current)==null||v.focusParentElement();return}n(p),c(Number(p)),setTimeout(()=>{var E;return(E=h.current)==null?void 0:E.focusParentElement()})},[t,s,n]),j=R(l);return o?e.jsx(Ae,{ref:d,initialValue:j,allowSubmitSameValue:!s,handleUpdate:u,handleCancelUpdate:f}):e.jsx(V,{onClick:x,onFocus:x,muted:!s,offset:i?"over":void 0,ref:h,children:r})}const Os="_imageInput_1dtk5_17",Ls="_imageCell_1dtk5_24",Ms="_overlay_1dtk5_28",$s="_image_1dtk5_17",de={imageInput:Os,imageCell:Ls,overlay:Ms,image:$s},Fs=m.memo(Ws);function Ws({initialValue:t,readOnly:s,updateValue:i}){const n=o=>{o!==t&&(o!==""&&!o.startsWith("http")||i(o))},r=()=>{t&&window.open(t,"_blank","noopener,noreferrer")};return t?e.jsxs("div",{className:de.imageCell,children:[!s&&e.jsxs("div",{className:de.overlay,children:[e.jsx(F,{onClick:r,children:"Preview"}),e.jsx(F,{variant:"subtle-destructive",onClick:()=>n(""),children:"Delete"})]}),!!t&&e.jsx("img",{loading:"lazy",src:t,className:de.image})]}):e.jsx(Y,{variant:"ghosted",className:de.imageInput,fluid:!0,readOnly:s,disabled:s,placeholder:"Paste image URL",onBlur:o=>n(o.currentTarget.value),onKeyDown:o=>{o.key==="Enter"&&n(o.currentTarget.value)},defaultValue:t})}const As="_flag_yy7ty_17",Hs={flag:As};function Ps(){return e.jsx("div",{className:Hs.flag,children:e.jsx(Gt,{})})}const Bs="_ghostedText_18xqt_17",qs="_multiline_18xqt_24",nt={ghostedText:Bs,multiline:qs};function He({children:t,multiline:s}){return e.jsx("div",{className:`${nt.ghostedText} ${s?nt.multiline:""}`,children:t})}const St=m.memo(Us);function Us({initialValue:t,fieldId:s,fieldLabel:i,handleUpdate:n}){const r=m.useRef(null),o=m.useCallback(h=>n(h),[n]),{value:a,onChange:l,onBlur:c,onKeyDown:d}=ye(t,o,r,{submitOnCtrlEnter:!0,allowKeyboardNavigation:!0});return e.jsx(vt,{inputref:r,variant:"ghosted",fluid:!0,rows:1,value:a,onChange:l,onBlur:c,onKeyDown:d,spellCheck:!1,"data-testid":s?`cuesheet-editor-${s}`:void 0,"aria-label":i?`${i} editor`:void 0})}const Ks="_muted_1u021_17",Vs="_numeric_1u021_22",st={muted:Ks,numeric:Vs};function X({numeric:t,children:s}){return e.jsx("span",{className:W([st.muted,t&&st.numeric]),children:s})}const Tt=m.memo(Gs);function Gs({initialValue:t,lockedValue:s,delayed:i,onSubmit:n,children:r}){const[o,a]=m.useState(!1),[l,c]=m.useState(t),d=m.useRef(null),h=m.useRef(null);m.useEffect(()=>{o&&d.current&&(d.current.focus(),d.current.select())},[o]),m.useEffect(()=>{o||c(t)},[t,o]);const x=()=>a(!0),f=()=>{a(!1),setTimeout(()=>{var p;return(p=h.current)==null?void 0:p.focusParentElement()})},u=m.useCallback(p=>{var y,_,v;if(a(!1),p===""){n(p),(y=d.current)==null||y.focusParentElement();return}if(p.startsWith("p")||p.startsWith("+")){n(p),(_=d.current)==null||_.focusParentElement();return}const g=Ce(p);if(g<0||isNaN(g)){c(t),setTimeout(()=>{var E;return(E=h.current)==null?void 0:E.focusParentElement()});return}if(g===t&&s){(v=d.current)==null||v.focusParentElement();return}n(p),c(Number(p)),setTimeout(()=>{var E;return(E=h.current)==null?void 0:E.focusParentElement()})},[t,s,n]),j=te(l);return o?e.jsx(Ae,{ref:d,initialValue:j,allowSubmitSameValue:!s,handleUpdate:u,handleCancelUpdate:f}):e.jsx(V,{onClick:x,onFocus:x,muted:!s,offset:i?"over":void 0,ref:h,children:r})}function Pe(t){return typeof t.columnDef.header=="string"?t.columnDef.header:t.id}function Js({getValue:t,row:s,table:i,column:n}){var p;if(!i.options.meta)return null;const{showDelayedTimes:r,hideTableSeconds:o}=i.options.meta.options,a=o?{format12:"h:mm a",format24:"HH:mm"}:void 0,l=s.original;if(!ae(l))return e.jsx(X,{numeric:!0,children:te(t(),a)});const{handleUpdateTimer:c}=i.options.meta,d=g=>c(s.original.id,"timeStart",g),h=t(),x=!l.linkStart,f=r?h+l.delay:h,u=te(f,a);return((p=n.columnDef.meta)==null?void 0:p.canWrite)?e.jsxs(Tt,{initialValue:h,onSubmit:d,lockedValue:x,delayed:l.delay!==0,children:[u,e.jsx(je,{delayValue:l.delay,tooltipPrefix:R(h)})]}):e.jsxs(X,{numeric:!0,children:[u,e.jsx(je,{delayValue:l.delay,tooltipPrefix:R(h)})]})}function Xs({getValue:t,row:s,table:i,column:n}){var p;if(!i.options.meta)return null;const{showDelayedTimes:r,hideTableSeconds:o}=i.options.meta.options,a=o?{format12:"h:mm a",format24:"HH:mm"}:void 0,l=s.original;if(!ae(l))return e.jsx(X,{numeric:!0,children:te(t(),a)});const{handleUpdateTimer:c}=i.options.meta,d=g=>c(s.original.id,"timeEnd",g),h=t(),x=l.timeStrategy===K.LockEnd,f=r?h+l.delay:h,u=te(f,a);return((p=n.columnDef.meta)==null?void 0:p.canWrite)?e.jsxs(Tt,{initialValue:h,onSubmit:d,lockedValue:x,delayed:l.delay!==0,children:[u,e.jsx(je,{delayValue:l.delay,tooltipPrefix:R(h)})]}):e.jsxs(X,{numeric:!0,children:[u,e.jsx(je,{delayValue:l.delay,tooltipPrefix:R(h)})]})}function Ys({getValue:t,row:s,table:i,column:n}){var f;if(!i.options.meta)return null;const{hideTableSeconds:r}=i.options.meta.options,o=s.original;if(!ae(o))return e.jsx(X,{numeric:!0,children:Ze(t(),r)});const{handleUpdateTimer:a}=i.options.meta,l=u=>a(s.original.id,"duration",u),c=t(),d=o.timeStrategy===K.LockDuration,h=Ze(c,r);return((f=n.columnDef.meta)==null?void 0:f.canWrite)?e.jsx(zs,{initialValue:c,onSubmit:l,lockedValue:d,children:h}):e.jsx(X,{numeric:!0,children:h})}function Zs({row:t,column:s,table:i}){var a;const n=m.useCallback(l=>{var c;(c=i.options.meta)==null||c.handleUpdate(t.index,s.id,l,!1)},[s.id,t.index,i.options.meta]),r=t.original[s.id];return typeof r!="string"?null:((a=s.columnDef.meta)==null?void 0:a.canWrite)?e.jsx(St,{initialValue:r,fieldId:s.id,fieldLabel:Pe(s),handleUpdate:n}):e.jsx(He,{multiline:!0,children:r})}function Qs({row:t,column:s,table:i}){var l;const n=m.useCallback(c=>{var d;(d=i.options.meta)==null||d.handleUpdate(t.index,s.id,c,!0)},[s.id,t.index,i.options.meta]),r=t.original;if($e(r))return null;const o=(l=s.columnDef.meta)==null?void 0:l.canWrite,a=r.custom[s.id];return e.jsx(Fs,{initialValue:a,updateValue:n,readOnly:!o})}function it({row:t,column:s,table:i}){var a;const n=m.useCallback(l=>{var c;(c=i.options.meta)==null||c.handleUpdate(t.index,s.id,l,!1)},[s.id,t.index,i.options.meta]),r=t.original[s.id];return typeof r!="string"?null:((a=s.columnDef.meta)==null?void 0:a.canWrite)?e.jsx(Ae,{initialValue:r,fieldId:s.id,fieldLabel:Pe(s),handleUpdate:n}):e.jsx(He,{children:r})}function ei({row:t}){const s=t.original;return!ae(s)||!s.flag?null:e.jsx(Ps,{})}function ti({row:t,column:s,table:i}){var l;const n=m.useCallback(c=>{var d;(d=i.options.meta)==null||d.handleUpdate(t.index,s.id,c,!0)},[s.id,t.index,i.options.meta]),r=t.original;if($e(r))return null;const o=r.custom[s.id]??"";return((l=s.columnDef.meta)==null?void 0:l.canWrite)?e.jsx(St,{initialValue:o,fieldId:s.id,fieldLabel:Pe(s),handleUpdate:n}):e.jsx(He,{multiline:!0,children:o})}function va(t,s,i){var f,u,j,p;const n=[],r=s===D.Edit,o=i?((f=i.options)==null?void 0:f.read)==="full":!0,a=i?((u=i.options)==null?void 0:u.write)==="full":!0,l=(j=i==null?void 0:i.options)!=null&&j.write?new Set(i.options.write.split(",")):new Set,c=(p=i==null?void 0:i.options)!=null&&p.read?new Set(i.options.read.split(",")):new Set,d=g=>o||c.has(g),h=g=>r&&(a||l.has(g));d("flag")&&n.push({accessorKey:"flag",id:"flag",header:"Flag",cell:ei,size:45,minSize:45,meta:{canWrite:h("flag")}}),d("cue")&&n.push({accessorKey:"cue",id:"cue",header:"Cue",cell:it,size:75,minSize:40,meta:{canWrite:h("cue")}}),d("timeStart")&&n.push({accessorKey:"timeStart",id:"timeStart",header:"Start",cell:Js,size:75,minSize:75,meta:{canWrite:h("timeStart")}}),d("timeEnd")&&n.push({accessorKey:"timeEnd",id:"timeEnd",header:"End",cell:Xs,size:75,minSize:75,meta:{canWrite:h("timeEnd")}}),d("duration")&&n.push({accessorKey:"duration",id:"duration",header:"Duration",cell:Ys,size:75,minSize:75,meta:{canWrite:h("duration")}}),d("title")&&n.push({accessorKey:"title",id:"title",header:"Title",cell:it,size:250,minSize:75,meta:{canWrite:h("title")}}),d("note")&&n.push({accessorKey:"note",id:"note",header:"Note",cell:Zs,size:250,minSize:75,meta:{canWrite:h("note")}});const x=Object.keys(t);for(let g=0;g<x.length;g++){const y=x[g],_=`custom-${y}`;d(_)&&n.push({accessorKey:y,id:y,header:t[y].label,cell:t[y].type==="text"?ti:Qs,size:250,minSize:75,meta:{colour:t[y].colour,canWrite:h(_)}})}return n}const ni="_emptyContainer_1dp7m_17",si="_emptyCell_1dp7m_21",ii="_empty_1dp7m_17",ai="_text_1dp7m_30",ue={emptyContainer:ni,emptyCell:si,empty:ii,text:ai};function oi({text:t}){return e.jsx("tbody",{className:ue.emptyContainer,children:e.jsx("tr",{children:e.jsxs("td",{colSpan:99,className:ue.emptyCell,children:[e.jsx(fn,{className:ue.empty}),t&&e.jsx("span",{className:ue.text,children:t})]})})})}const at={hideTableSeconds:!1,hideIndexColumn:!1,showDelayedTimes:!1,hideDelays:!1},It=be()(Jt(t=>({...at,setOption:(s,i)=>t(n=>({...n,[s]:i})),toggleOption:s=>t(i=>({...i,[s]:!i[s]})),resetOptions:()=>t(at)}),{name:"editor-options"}));var ri=(t=>(t.List="list",t.Table="table",t))(ri||{});const Nt=be(t=>({canChangeMode:!1,canCreateEntries:!1,canEditEntries:!1,canFlag:!1,canShare:!1,setPermissions(s){t({canChangeMode:s.canChangeMode,canFlag:s.canFlag,canCreateEntries:s.canCreateEntries,canEditEntries:s.canEditEntries,canShare:s.canShare})}}));function li(t){return e.jsx(ot,{style:{transform:"rotate(-45deg)"},...t})}function ci(){const{data:t}=gn(),{data:s}=pn(),[i,n]=Xt(),r=i&&t&&s;return e.jsxs(e.Fragment,{children:[e.jsxs(ee,{onClick:n.open,render:e.jsx(F,{}),children:[e.jsx(li,{}),"Share..."]}),e.jsx(ft,{isOpen:i,onClose:n.close,title:"Share cuesheet view",showBackdrop:!0,showCloseButton:!0,bodyElements:r?e.jsx(un,{lockedPath:{value:jn.Cuesheet,label:"Cuesheet"}}):null})]})}const di="_tableSettings_18k3s_17",ui="_sectionTitle_18k3s_29",mi="_option_18k3s_40",hi="_column_18k3s_47",xi="_inline_18k3s_54",fi="_apart_18k3s_60",gi="_group_18k3s_65",pi="_radioButton_18k3s_76",S={tableSettings:di,sectionTitle:ui,option:mi,column:hi,inline:xi,apart:fi,group:gi,radioButton:pi};function ji({columns:t,handleResetResizing:s,handleResetReordering:i,handleClearToggles:n}){const r=Nt(h=>h.canShare),o=m.use(bn),a=ie(),[l,c]=Yt({key:o?`${o.alias}${Qe.cuesheetMode}`:Qe.cuesheetMode,defaultValue:o?D.Run:D.Edit}),d=h=>{const x=h.at(0);x&&c(x)};return e.jsxs(ct,{className:S.tableSettings,children:[e.jsx(wt,{optionsStore:a}),e.jsx(Dt,{columns:t,handleResetResizing:s,handleResetReordering:i,handleClearToggles:n}),e.jsxs(Zt,{value:[l],onValueChange:d,className:W([S.group,S.apart]),children:[e.jsx(ee,{render:e.jsx(Ke,{}),value:D.Run,className:S.radioButton,children:"Run"}),e.jsx(ee,{render:e.jsx(Ke,{}),value:D.Edit,className:S.radioButton,children:"Edit"})]}),r&&e.jsxs(e.Fragment,{children:[e.jsx(_n,{orientation:"vertical"}),e.jsx(ci,{})]})]})}function wt({optionsStore:t}){const s=t;return e.jsxs(dt,{children:[e.jsx(ut,{render:e.jsx(ee,{render:e.jsxs(F,{variant:"ghosted-white",children:[e.jsx(mt,{})," Settings",e.jsx(ht,{})]})})}),e.jsxs(bt,{align:"start",className:S.inline,children:[e.jsxs("div",{className:S.column,children:[e.jsx(C,{className:S.sectionTitle,children:"Element visibility"}),e.jsxs(C,{className:S.option,children:[e.jsx(Z,{defaultChecked:s.hideTableSeconds,onCheckedChange:i=>s.setOption("hideTableSeconds",i)}),"Hide seconds in table"]}),e.jsxs(C,{className:S.option,children:[e.jsx(Z,{defaultChecked:s.hideIndexColumn,onCheckedChange:i=>s.setOption("hideIndexColumn",i)}),"Hide index column"]})]}),e.jsxs("div",{className:S.column,children:[e.jsx(C,{className:S.sectionTitle,children:"Table Behaviour"}),e.jsxs(C,{className:S.option,children:[e.jsx(Z,{defaultChecked:s.showDelayedTimes,onCheckedChange:i=>s.setOption("showDelayedTimes",i)}),"Show delayed times"]}),e.jsxs(C,{className:S.option,children:[e.jsx(Z,{defaultChecked:s.hideDelays,onCheckedChange:i=>s.setOption("hideDelays",i)}),"Hide delay entries"]})]})]})]})}function Dt({columns:t,handleResetResizing:s,handleResetReordering:i,handleClearToggles:n}){return e.jsxs(dt,{children:[e.jsx(ut,{render:e.jsx(ee,{render:e.jsxs(F,{variant:"ghosted-white",children:[e.jsx(Qt,{})," Columns",e.jsx(ht,{})]})})}),e.jsxs(bt,{align:"start",className:S.inline,children:[e.jsxs("div",{className:S.column,children:[e.jsx(C,{className:S.sectionTitle,children:"Column visibility"}),t.map(r=>{const o=r.columnDef.header,a=r.getIsVisible();return e.jsxs(C,{className:S.option,children:[e.jsx(Z,{defaultChecked:a,onCheckedChange:r.toggleVisibility}),o]},`${r.id}-${a}`)})]}),e.jsxs("div",{className:S.column,children:[e.jsx(C,{className:S.sectionTitle,children:"Reset Options"}),e.jsx(F,{size:"small",fluid:!0,onClick:n,children:"Show All"}),e.jsx(F,{size:"small",fluid:!0,onClick:s,children:"Reset Resizing"}),e.jsx(F,{size:"small",fluid:!0,onClick:i,children:"Reset Reordering"})]})]})]})}function bi({columns:t,handleResetResizing:s,handleResetReordering:i,handleClearToggles:n}){const r=It();return e.jsxs(ct,{className:S.tableSettings,children:[e.jsx(wt,{optionsStore:r}),e.jsx(Dt,{columns:t,handleResetResizing:s,handleResetReordering:i,handleClearToggles:n})]})}const Ci="_actionColumn_1gx4m_17",yi="_indexColumn_1gx4m_26",vi="_cuesheet_1gx4m_37",_i="_resizer_1gx4m_61",Ei="_tableHeader_1gx4m_77",B={actionColumn:Ci,indexColumn:yi,cuesheet:vi,resizer:_i,tableHeader:Ei};function ki({columnId:t,colSpan:s,injectedStyles:i,children:n,draggable:r}){const{attributes:o,listeners:a,setNodeRef:l,transform:c,transition:d,isDragging:h}=en({id:t}),x={...i,zIndex:h?2:"inherit",transform:tn.Translate.toString(c),transition:d};return e.jsxs("th",{ref:l,style:x,colSpan:s,tabIndex:-1,children:[e.jsx("div",{...o,...a,children:n}),r]})}function Si({colSpan:t,injectedStyles:s,children:i,draggable:n}){return e.jsxs("th",{style:s,colSpan:t,tabIndex:-1,children:[e.jsx("div",{children:i}),n]})}function zt({header:t}){return e.jsx("div",{onDoubleClick:()=>t.column.resetSize(),onMouseDown:t.getResizeHandler(),onTouchStart:t.getResizeHandler(),className:B.resizer})}function Ti({headerGroup:t,cuesheetMode:s}){const i=ie(n=>n.hideIndexColumn);return e.jsxs("tr",{children:[s===D.Edit&&e.jsx("th",{className:B.actionColumn,tabIndex:-1}),!i&&e.jsx("th",{className:B.indexColumn,tabIndex:-1,children:"#"}),e.jsx(nn,{items:t.headers,strategy:sn,children:t.headers.map(n=>{var l,c;const r=(l=n.column.columnDef.meta)==null?void 0:l.colour,a={opacity:((c=n.column.columnDef.meta)==null?void 0:c.canWrite)?1:.6};if(r){const d=G(r);a.backgroundColor=d.backgroundColor,a.color=d.color}return e.jsx(ki,{columnId:n.column.id,colSpan:n.colSpan,injectedStyles:{width:`calc(var(--header-${n==null?void 0:n.id}-size) * 1px)`,...a},draggable:e.jsx(zt,{header:n}),children:n.isPlaceholder?null:se(n.column.columnDef.header,n.getContext())},n.column.columnDef.id)})},t.id)]},t.id)}function Ii({headerGroup:t,cuesheetMode:s}){const i=ie(n=>n.hideIndexColumn);return e.jsxs("tr",{children:[s===D.Edit&&e.jsx("th",{className:B.actionColumn,tabIndex:-1}),!i&&e.jsx("th",{className:B.indexColumn,tabIndex:-1,children:"#"}),t.headers.map(n=>{var l,c;const r=(l=n.column.columnDef.meta)==null?void 0:l.colour,a={opacity:((c=n.column.columnDef.meta)==null?void 0:c.canWrite)?1:.6};if(r){const d=G(r);a.backgroundColor=d.backgroundColor,a.color=d.color}return e.jsx(Si,{columnId:n.column.id,colSpan:n.colSpan,injectedStyles:{width:`calc(var(--header-${n==null?void 0:n.id}-size) * 1px)`,...a},draggable:e.jsx(zt,{header:n}),children:n.isPlaceholder?null:se(n.column.columnDef.header,n.getContext())},n.column.columnDef.id)})]},t.id)}const Ni="_delayRow_1yrjh_37",wi="_delayRowHidden_1yrjh_55",Te={delayRow:Ni,delayRowHidden:wi};function Di({duration:t,injectedStyles:s,hasCursor:i,...n}){if(ie(a=>a.hideDelays)||t===0)return e.jsx("tr",{className:`${Te.delayRow} ${Te.delayRowHidden}`,"data-testid":"cuesheet-delay-hidden",style:s,...n,children:e.jsx("td",{})});const o=Ct(t,"expanded");return e.jsx("tr",{className:Te.delayRow,"data-testid":"cuesheet-delay",style:s,"data-cursor":i,...n,children:e.jsx("td",{tabIndex:0,children:o})})}const zi=m.memo(Di),_e=be(t=>({isOpen:!1,entryId:null,entryType:null,entryIndex:null,parentId:null,position:{x:0,y:0},flag:null,openMenu:(s,i,n,r,o,a)=>t({isOpen:!0,position:s,entryId:i,entryType:n,entryIndex:r,parentId:o,flag:a}),closeMenu:()=>t({isOpen:!1})})),Ri="_actionColumn_xqld8_17",Oi="_indexColumn_xqld8_26",Li="_eventRow_xqld8_37",Mi="_firstAfterGroup_xqld8_52",$i="_skip_xqld8_55",U={actionColumn:Ri,indexColumn:Oi,eventRow:Li,firstAfterGroup:Mi,skip:$i};function Fi({rowId:t,id:s,eventIndex:i,colour:n,isFirstAfterGroup:r,isLoaded:o,isPast:a,groupColour:l,flag:c,skip:d,parent:h,rowIndex:x,table:f,injectedStyles:u,hasCursor:j,...p}){var oe;const{cuesheetMode:g,hideIndexColumn:y}=((oe=f.options.meta)==null?void 0:oe.options)??{cuesheetMode:D.Edit,hideIndexColumn:!1},_=_e(I=>I.openMenu),{color:v,backgroundColor:E}=G(n),H=De(v),Ee=ze({...H,alpha:H.alpha*.8}),w=m.useMemo(()=>{if(o)return"#087A27";if(n){const I=De(G(n).backgroundColor);if(I!==null)return ze({...I,alpha:I.alpha*.25})}},[n,o]);return e.jsxs("tr",{id:t,className:W([U.eventRow,d&&U.skip,r&&U.firstAfterGroup,h&&U.hasParent]),style:{...u,opacity:`${a?"0.2":"1"}`,"--user-bg":l??"transparent"},"data-cursor":j,"data-testid":"cuesheet-event","data-entry-id":s,...p,children:[g===D.Edit&&e.jsx("td",{className:U.actionColumn,tabIndex:-1,role:"cell",children:e.jsx(A,{"aria-label":"Options",variant:"ghosted-white",size:"small",onClick:I=>{const q=I.currentTarget.getBoundingClientRect(),ke=8+q.y+q.height/2;_({x:q.x,y:ke},s,ne.Event,x,h,c)},children:e.jsx(Oe,{})})}),!y&&e.jsx("td",{className:U.indexColumn,style:{backgroundColor:E,color:Ee},tabIndex:-1,role:"cell",children:i}),f.getRow(t).getVisibleCells().map(I=>e.jsx("td",{style:{width:`calc(var(--col-${I.column.id}-size) * 1px)`,backgroundColor:w},tabIndex:-1,role:"cell","data-testid":`cuesheet-cell-${I.column.id}`,"data-column-id":I.column.id,children:se(I.column.columnDef.cell,I.getContext())},I.id))]})}const Wi="_actionColumn_1sgq2_17",Ai="_indexColumn_1sgq2_26",Hi="_groupRow_1sgq2_37",Ie={actionColumn:Wi,indexColumn:Ai,groupRow:Hi};function Pi({groupId:t,colour:s,rowId:i,rowIndex:n,table:r,injectedStyles:o,hasCursor:a,...l}){var x;const{cuesheetMode:c,hideIndexColumn:d}=((x=r.options.meta)==null?void 0:x.options)??{cuesheetMode:D.Edit,hideIndexColumn:!1},h=_e(f=>f.openMenu);return e.jsxs("tr",{className:Ie.groupRow,style:{...o,"--user-bg":s},"data-testid":"cuesheet-group","data-cursor":a,...l,children:[c===D.Edit&&e.jsx("td",{className:Ie.actionColumn,tabIndex:-1,role:"cell",children:e.jsx(A,{"aria-label":"Options",variant:"ghosted-white",size:"small",onClick:f=>{const u=f.currentTarget.getBoundingClientRect(),j=8+u.y+u.height/2;h({x:u.x,y:j},t,ne.Group,n,null,null)},children:e.jsx(Oe,{})})}),!d&&e.jsx("td",{className:Ie.indexColumn,tabIndex:-1,role:"cell"}),r.getRow(i).getVisibleCells().map(f=>e.jsx("td",{tabIndex:-1,style:{width:`calc(var(--col-${f.column.id}-size) * 1px)`},role:"cell",children:se(f.column.columnDef.cell,f.getContext())},f.id))]})}const Bi="_actionColumn_tym0z_17",qi="_indexColumn_tym0z_26",Ui="_milestoneRow_tym0z_37",me={actionColumn:Bi,indexColumn:qi,milestoneRow:Ui};function Ki({entryId:t,isPast:s,parentBgColour:i,parentId:n,colour:r,rowId:o,rowIndex:a,hasCursor:l,table:c,injectedStyles:d,...h}){var p;const{cuesheetMode:x,hideIndexColumn:f}=((p=c.options.meta)==null?void 0:p.options)??{cuesheetMode:D.Edit,hideIndexColumn:!1},u=_e(g=>g.openMenu);let j;if(r){const g=De(G(r).backgroundColor);g!==null&&(j=ze({...g,alpha:g.alpha*.25}))}return e.jsxs("tr",{className:W([me.milestoneRow,!!i&&me.hasParent]),style:{...d,opacity:`${s?"0.2":"1"}`,"--user-bg":i??"transparent"},"data-testid":"cuesheet-milestone","data-cursor":l,...h,children:[x===D.Edit&&e.jsx("td",{className:me.actionColumn,tabIndex:-1,role:"cell",children:e.jsx(A,{"aria-label":"Options",variant:"ghosted-white",size:"small",onClick:g=>{const y=g.currentTarget.getBoundingClientRect(),_=8+y.y+y.height/2;u({x:y.x,y:_},t,ne.Milestone,a,n,null)},children:e.jsx(Oe,{})})}),!f&&e.jsx("td",{className:me.indexColumn,tabIndex:-1,role:"cell",children:fe}),c.getRow(o).getVisibleCells().map(g=>{const y=g.column.id!=="duration"&&g.column.id!=="timeStart"&&g.column.id!=="timeEnd";return e.jsx("td",{style:{width:`calc(var(--col-${g.column.id}-size) * 1px)`,backgroundColor:j,opacity:y?1:.4},tabIndex:-1,children:y&&se(g.column.columnDef.cell,g.getContext())},g.id)})]})}const Vi=m.memo(Gi);function Gi(){const{isOpen:t,entryId:s,entryIndex:i,parentId:n,flag:r,position:o,closeMenu:a}=_e(),{addEntry:l,clone:c,deleteEntry:d,move:h,updateEntry:x}=L(),f=Re(j=>j.setEditableEntry),u=Nt();return t?e.jsx(mn,{isOpen:!0,onClose:a,items:[{type:"item",label:"Edit...",onClick:()=>f(s),icon:mt,disabled:!u.canEditEntries},{type:"divider"},{type:"item",label:r?"Remove flag":"Add flag",onClick:()=>x({id:s,flag:!r}),icon:Ve,disabled:r===null||!u.canFlag},{type:"divider"},{type:"item",label:"Add event above",onClick:()=>l({type:ne.Event,parent:n},{before:s}),icon:Ge,disabled:!u.canCreateEntries},{type:"item",label:"Add event below",onClick:()=>l({type:ne.Event,parent:n},{after:s}),icon:Ge,disabled:!u.canCreateEntries},{type:"item",label:"Clone event",onClick:()=>c(s),icon:Ve,disabled:!u.canCreateEntries},{type:"divider"},{type:"item",label:"Move up",onClick:()=>h(s,"up"),icon:an,disabled:i<1||!u.canEditEntries},{type:"item",label:"Move down",onClick:()=>h(s,"down"),icon:on,disabled:!u.canEditEntries},{type:"divider"},{type:"item",label:"Delete",onClick:()=>d([s]),icon:rt,disabled:!u.canEditEntries}],position:o}):null}function _a({columns:t,cuesheetMode:s,tableRoot:i="cuesheet"}){const{data:n,status:r}=vn(),{updateEntry:o,updateTimer:a}=L(),l=i==="editor"?It:ie,c=l(k=>k.showDelayedTimes),d=l(k=>k.hideTableSeconds),h=l(k=>k.hideIndexColumn),x=Cn(),f=Xe(k=>k.cursor),u=Xe(k=>k.setScrollHandler),j=m.useRef(null),{listeners:p}=rn(),g=m.useMemo(()=>({handleUpdate:(k,T,z,M=!1)=>{const re=n[k];if(!(!re||re[T]===z)){if(M){o({id:re.id,custom:{[T]:z}});return}o({id:re.id,[T]:z})}},handleUpdateTimer:(k,T,z)=>{a(k,T,z,!0)},options:{showDelayedTimes:c,hideTableSeconds:d,cuesheetMode:s,hideIndexColumn:h}}),[s,n,h,d,c,o,a]),{columnOrder:y,resetColumnOrder:_}=Et(t,i),{columnSizing:v,setColumnSizing:E}=ws(i),{columnVisibility:H,setColumnVisibility:Ee}=Ds(i),w=ln({data:n,columns:t,columnResizeMode:"onChange",state:{columnOrder:y,columnVisibility:H,columnSizing:v},onColumnVisibilityChange:Ee,onColumnSizingChange:E,getCoreRowModel:dn(),meta:g}),oe=m.useCallback(()=>{w.toggleAllColumnsVisible(!0)},[w]),I=m.useCallback(()=>{E({})},[E]);m.useEffect(()=>{if(j.current===null||s!==D.Run||!x)return;const k=n.findIndex(T=>T.id===x);k!==-1&&j.current.scrollToIndex({index:k,behavior:"auto",align:"start",offset:-50})},[s,n,x]),m.useEffect(()=>(u(T=>{if(j.current===null)return;const z=n.findIndex(M=>M.id===T);z!==-1&&j.current.scrollToIndex({index:z,behavior:"auto",align:"start",offset:-50})}),()=>{u(null)}),[n,u]);const q=m.useMemo(()=>{const k=w.getFlatHeaders(),T={};for(let z=0;z<k.length;z++){const M=k[z];M&&(T[`--header-${M.id}-size`]=M.getSize(),T[`--col-${M.column.id}-size`]=M.column.getSize())}return T},[w.getState().columnSizingInfo,w.getState().columnSizing]),ke=w.getAllLeafColumns(),{rows:Be}=w.getRowModel(),Rt=m.useMemo(()=>({columnSizeVars:q,cursor:f,listeners:p,rows:Be,table:w}),[q,f,p,Be,w]),Ot=m.useCallback((k,T)=>T.id,[]),Lt=m.useCallback(()=>w.getHeaderGroups().map(k=>{const T=w.getState().columnSizingInfo.isResizingColumn?Ii:Ti;return e.jsx(T,{cuesheetMode:s,headerGroup:k},k.id)}),[s,w]);if(!n||r==="pending")return e.jsx(Tn,{text:"Loading..."});const Mt=i==="editor"?bi:ji;return e.jsxs(e.Fragment,{children:[e.jsx(Mt,{columns:ke,handleResetResizing:I,handleResetReordering:_,handleClearToggles:oe}),e.jsx(cn,{ref:j,data:n,context:Rt,style:i==="editor"?{paddingLeft:"1rem"}:void 0,computeItemKey:Ot,increaseViewportBy:{top:100,bottom:200},components:Qi,fixedHeaderContent:Lt}),e.jsx(Vi,{})]})}const Ji=m.memo(function(){return e.jsx(oi,{text:"No data in rundown"})}),Xi=m.memo(function({style:s,context:i,...n}){return e.jsx("table",{className:B.cuesheet,id:"cuesheet",style:{...s,...i.columnSizeVars},...i.listeners,...n})}),Yi=m.memo(function({context:s,className:i,...n}){return e.jsx("thead",{className:B.tableHeader,...n})}),Zi=m.memo(function({item:s,style:i,context:n,...r}){const o=r["data-index"],a=n.rows[o];if(!a)return null;const l=a.original.id,c=a.original,d=c.id===n.cursor;return pt(c)?e.jsx(Pi,{groupId:c.id,colour:c.colour,rowId:a.id,rowIndex:a.index,table:n.table,injectedStyles:i,hasCursor:d,...r},l):$e(c)?e.jsx(zi,{duration:c.duration,injectedStyles:i,hasCursor:d,...r},l):gt(c)?e.jsx(Ki,{entryId:c.id,isPast:c.isPast,parentBgColour:c.groupColour,parentId:c.parent,colour:c.colour,rowId:a.id,rowIndex:o,table:n.table,injectedStyles:i,hasCursor:d,...r},l):e.jsx(Fi,{id:c.id,eventIndex:c.eventIndex,colour:c.colour,isFirstAfterGroup:c.isFirstAfterGroup,isLoaded:c.isLoaded,isPast:c.isPast,groupColour:c.groupColour,flag:c.flag,skip:c.skip,parent:c.parent,rowId:a.id,rowIndex:o,table:n.table,injectedStyles:i,hasCursor:d,...r},a.id)}),Qi={EmptyPlaceholder:Ji,Table:Xi,TableHead:Yi,TableRow:Zi};export{ya as C,ba as E,ks as G,Ss as M,ri as R,ts as T,_a as a,Ca as b,fs as c,L as d,ye as e,va as m,b as s,Nt as u};
2
- //# sourceMappingURL=CuesheetTable-BLICUNky.js.map