@getontime/cli 4.1.0 → 4.2.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 (474) hide show
  1. package/client/assets/Backstage-DG-hwPI3.js +2 -0
  2. package/client/assets/Backstage-DG-hwPI3.js.br +0 -0
  3. package/client/assets/Backstage-DG-hwPI3.js.gz +0 -0
  4. package/client/assets/Backstage-DG-hwPI3.js.map +1 -0
  5. package/client/assets/Countdown-C8LGl1pp.js +2 -0
  6. package/client/assets/Countdown-C8LGl1pp.js.br +0 -0
  7. package/client/assets/Countdown-C8LGl1pp.js.gz +0 -0
  8. package/client/assets/Countdown-C8LGl1pp.js.map +1 -0
  9. package/client/assets/CustomTranslationModal-CJ9-aDjl.js +2 -0
  10. package/client/assets/CustomTranslationModal-CJ9-aDjl.js.br +0 -0
  11. package/client/assets/CustomTranslationModal-CJ9-aDjl.js.gz +0 -0
  12. package/client/assets/{CustomTranslationModal-BBNxpds0.js.map → CustomTranslationModal-CJ9-aDjl.js.map} +1 -1
  13. package/client/assets/DelayIndicator-F4GdgsGh.js +2 -0
  14. package/client/assets/DelayIndicator-F4GdgsGh.js.br +0 -0
  15. package/client/assets/DelayIndicator-F4GdgsGh.js.gz +0 -0
  16. package/client/assets/{DelayIndicator-CFCDQ7FN.js.map → DelayIndicator-F4GdgsGh.js.map} +1 -1
  17. package/client/assets/EditorFeatureWrapper-eIpSr_UK.js +2 -0
  18. package/client/assets/EditorFeatureWrapper-eIpSr_UK.js.br +0 -0
  19. package/client/assets/EditorFeatureWrapper-eIpSr_UK.js.gz +0 -0
  20. package/client/assets/{EditorFeatureWrapper-D55c8JBz.js.map → EditorFeatureWrapper-eIpSr_UK.js.map} +1 -1
  21. package/client/assets/EditorUtils-Bd3J5Dvf.js +2 -0
  22. package/client/assets/EditorUtils-Bd3J5Dvf.js.br +0 -0
  23. package/client/assets/EditorUtils-Bd3J5Dvf.js.gz +0 -0
  24. package/client/assets/EditorUtils-Bd3J5Dvf.js.map +1 -0
  25. package/client/assets/EditorUtils-CgF7UfHP.css +1 -0
  26. package/client/assets/EditorUtils-CgF7UfHP.css.br +0 -0
  27. package/client/assets/EditorUtils-CgF7UfHP.css.gz +0 -0
  28. package/client/assets/Empty-C0IdV_kI.js +2 -0
  29. package/client/assets/Empty-C0IdV_kI.js.br +0 -0
  30. package/client/assets/Empty-C0IdV_kI.js.gz +0 -0
  31. package/client/assets/{Empty-C-JO_XAr.js.map → Empty-C0IdV_kI.js.map} +1 -1
  32. package/client/assets/EmptyPage-Ct3d0DqJ.js +2 -0
  33. package/client/assets/EmptyPage-Ct3d0DqJ.js.br +0 -0
  34. package/client/assets/EmptyPage-Ct3d0DqJ.js.gz +0 -0
  35. package/client/assets/{EmptyPage-BSzsxpGg.js.map → EmptyPage-Ct3d0DqJ.js.map} +1 -1
  36. package/client/assets/FollowButton-BG-ycRWu.js +2 -0
  37. package/client/assets/FollowButton-BG-ycRWu.js.br +0 -0
  38. package/client/assets/FollowButton-BG-ycRWu.js.gz +0 -0
  39. package/client/assets/{FollowButton-Mox6N4JW.js.map → FollowButton-BG-ycRWu.js.map} +1 -1
  40. package/client/assets/MessageControlExport-DjoUioWA.css +1 -0
  41. package/client/assets/MessageControlExport-DjoUioWA.css.br +0 -0
  42. package/client/assets/MessageControlExport-DjoUioWA.css.gz +0 -0
  43. package/client/assets/MessageControlExport-X-4dl9QT.js +3 -0
  44. package/client/assets/MessageControlExport-X-4dl9QT.js.br +0 -0
  45. package/client/assets/MessageControlExport-X-4dl9QT.js.gz +0 -0
  46. package/client/assets/MessageControlExport-X-4dl9QT.js.map +1 -0
  47. package/client/assets/MilestoneEditor-BqNKKlvI.css +1 -0
  48. package/client/assets/MilestoneEditor-BqNKKlvI.css.br +0 -0
  49. package/client/assets/MilestoneEditor-BqNKKlvI.css.gz +0 -0
  50. package/client/assets/MilestoneEditor-rgBQSXVU.js +2 -0
  51. package/client/assets/MilestoneEditor-rgBQSXVU.js.br +0 -0
  52. package/client/assets/MilestoneEditor-rgBQSXVU.js.gz +0 -0
  53. package/client/assets/MilestoneEditor-rgBQSXVU.js.map +1 -0
  54. package/client/assets/Modal-Bn1bZkwb.js +2 -0
  55. package/client/assets/Modal-Bn1bZkwb.js.br +0 -0
  56. package/client/assets/Modal-Bn1bZkwb.js.gz +0 -0
  57. package/client/assets/{Modal-krcwDRb-.js.map → Modal-Bn1bZkwb.js.map} +1 -1
  58. package/client/assets/MultiPartProgressBar-Cmw-gisu.js +2 -0
  59. package/client/assets/MultiPartProgressBar-Cmw-gisu.js.br +0 -0
  60. package/client/assets/MultiPartProgressBar-Cmw-gisu.js.gz +0 -0
  61. package/client/assets/{MultiPartProgressBar-BXQbpM-j.js.map → MultiPartProgressBar-Cmw-gisu.js.map} +1 -1
  62. package/client/assets/OperatorExport-BiBcgVKc.css +1 -0
  63. package/client/assets/OperatorExport-BiBcgVKc.css.br +0 -0
  64. package/client/assets/OperatorExport-BiBcgVKc.css.gz +0 -0
  65. package/client/assets/OperatorExport-CJd8jmY4.js +2 -0
  66. package/client/assets/OperatorExport-CJd8jmY4.js.br +0 -0
  67. package/client/assets/OperatorExport-CJd8jmY4.js.gz +0 -0
  68. package/client/assets/OperatorExport-CJd8jmY4.js.map +1 -0
  69. package/client/assets/{OverviewWrapper-MGJ1uE5W.js → OverviewWrapper-1Vj3_ojX.js} +2 -2
  70. package/client/assets/OverviewWrapper-1Vj3_ojX.js.br +0 -0
  71. package/client/assets/OverviewWrapper-1Vj3_ojX.js.gz +0 -0
  72. package/client/assets/{OverviewWrapper-MGJ1uE5W.js.map → OverviewWrapper-1Vj3_ojX.js.map} +1 -1
  73. package/client/assets/OverviewWrapper-9aebU9w0.css +1 -0
  74. package/client/assets/OverviewWrapper-9aebU9w0.css.br +0 -0
  75. package/client/assets/OverviewWrapper-9aebU9w0.css.gz +0 -0
  76. package/client/assets/PipHost-BUF7n-lT.css +1 -0
  77. package/client/assets/PipHost-BUF7n-lT.css.br +0 -0
  78. package/client/assets/PipHost-BUF7n-lT.css.gz +0 -0
  79. package/client/assets/PipHost-D7liNR4M.js +2 -0
  80. package/client/assets/PipHost-D7liNR4M.js.br +0 -0
  81. package/client/assets/PipHost-D7liNR4M.js.gz +0 -0
  82. package/client/assets/PipHost-D7liNR4M.js.map +1 -0
  83. package/client/assets/ProjectInfo-BduQgjcz.js +2 -0
  84. package/client/assets/ProjectInfo-BduQgjcz.js.br +0 -0
  85. package/client/assets/ProjectInfo-BduQgjcz.js.gz +0 -0
  86. package/client/assets/{ProjectInfo-CJ-GLvVG.js.map → ProjectInfo-BduQgjcz.js.map} +1 -1
  87. package/client/assets/ProtectRoute-Ci_AIozP.js +2 -0
  88. package/client/assets/ProtectRoute-Ci_AIozP.js.br +0 -0
  89. package/client/assets/ProtectRoute-Ci_AIozP.js.gz +0 -0
  90. package/client/assets/{ProtectRoute-DJ9xZnPI.js.map → ProtectRoute-Ci_AIozP.js.map} +1 -1
  91. package/client/assets/{ProtectedCuesheet-CMTscjjR.css → ProtectedCuesheet-C_tKodwo.css} +1 -1
  92. package/client/assets/ProtectedCuesheet-C_tKodwo.css.br +0 -0
  93. package/client/assets/ProtectedCuesheet-C_tKodwo.css.gz +0 -0
  94. package/client/assets/ProtectedCuesheet-D_zdkwM-.js +2 -0
  95. package/client/assets/ProtectedCuesheet-D_zdkwM-.js.br +0 -0
  96. package/client/assets/ProtectedCuesheet-D_zdkwM-.js.gz +0 -0
  97. package/client/assets/ProtectedCuesheet-D_zdkwM-.js.map +1 -0
  98. package/client/assets/ProtectedEditor-CNL2ig79.js +3 -0
  99. package/client/assets/ProtectedEditor-CNL2ig79.js.br +0 -0
  100. package/client/assets/ProtectedEditor-CNL2ig79.js.gz +0 -0
  101. package/client/assets/ProtectedEditor-CNL2ig79.js.map +1 -0
  102. package/client/assets/ProtectedEditor-Dw0pWw0J.css +1 -0
  103. package/client/assets/ProtectedEditor-Dw0pWw0J.css.br +0 -0
  104. package/client/assets/ProtectedEditor-Dw0pWw0J.css.gz +0 -0
  105. package/client/assets/RundownEntry-Blq5OsMH.css +1 -0
  106. package/client/assets/RundownEntry-Blq5OsMH.css.br +0 -0
  107. package/client/assets/RundownEntry-Blq5OsMH.css.gz +0 -0
  108. package/client/assets/RundownEntry-Bs1ombtH.js +2 -0
  109. package/client/assets/RundownEntry-Bs1ombtH.js.br +0 -0
  110. package/client/assets/RundownEntry-Bs1ombtH.js.gz +0 -0
  111. package/client/assets/RundownEntry-Bs1ombtH.js.map +1 -0
  112. package/client/assets/RundownExport-BCT0ybxy.js +3 -0
  113. package/client/assets/RundownExport-BCT0ybxy.js.br +0 -0
  114. package/client/assets/RundownExport-BCT0ybxy.js.gz +0 -0
  115. package/client/assets/RundownExport-BCT0ybxy.js.map +1 -0
  116. package/client/assets/{RundownExport-1zBZurIG.css → RundownExport-DtSvAfBG.css} +1 -1
  117. package/client/assets/RundownExport-DtSvAfBG.css.br +0 -0
  118. package/client/assets/RundownExport-DtSvAfBG.css.gz +0 -0
  119. package/client/assets/Select-B5xNi_tM.js +2 -0
  120. package/client/assets/Select-B5xNi_tM.js.br +0 -0
  121. package/client/assets/Select-B5xNi_tM.js.gz +0 -0
  122. package/client/assets/{Select-BLA-yQMq.js.map → Select-B5xNi_tM.js.map} +1 -1
  123. package/client/assets/Studio-D4hRKhJ1.js +2 -0
  124. package/client/assets/Studio-D4hRKhJ1.js.br +0 -0
  125. package/client/assets/Studio-D4hRKhJ1.js.gz +0 -0
  126. package/client/assets/Studio-D4hRKhJ1.js.map +1 -0
  127. package/client/assets/{StyleEditor-DNjZ46Qf.js → StyleEditor-BvcE8dkA.js} +2 -2
  128. package/client/assets/StyleEditor-BvcE8dkA.js.br +3 -0
  129. package/client/assets/StyleEditor-BvcE8dkA.js.gz +0 -0
  130. package/client/assets/{StyleEditor-DNjZ46Qf.js.map → StyleEditor-BvcE8dkA.js.map} +1 -1
  131. package/client/assets/SuperscriptPeriod-BmHAoSBy.js +2 -0
  132. package/client/assets/SuperscriptPeriod-BmHAoSBy.js.br +0 -0
  133. package/client/assets/SuperscriptPeriod-BmHAoSBy.js.gz +0 -0
  134. package/client/assets/SuperscriptPeriod-BmHAoSBy.js.map +1 -0
  135. package/client/assets/SuperscriptTime-Nou92D8X.js +2 -0
  136. package/client/assets/SuperscriptTime-Nou92D8X.js.br +0 -0
  137. package/client/assets/SuperscriptTime-Nou92D8X.js.gz +0 -0
  138. package/client/assets/{SuperscriptTime-C8ypTVpH.js.map → SuperscriptTime-Nou92D8X.js.map} +1 -1
  139. package/client/assets/TimeElements-XpRwBsaa.js +2 -0
  140. package/client/assets/TimeElements-XpRwBsaa.js.br +0 -0
  141. package/client/assets/TimeElements-XpRwBsaa.js.gz +0 -0
  142. package/client/assets/TimeElements-XpRwBsaa.js.map +1 -0
  143. package/client/assets/TimeElements-c2rTHN98.css +1 -0
  144. package/client/assets/TimeElements-c2rTHN98.css.br +0 -0
  145. package/client/assets/TimeElements-c2rTHN98.css.gz +0 -0
  146. package/client/assets/TimeInput-Bu_5GlHP.js +2 -0
  147. package/client/assets/TimeInput-Bu_5GlHP.js.br +0 -0
  148. package/client/assets/TimeInput-Bu_5GlHP.js.gz +0 -0
  149. package/client/assets/{TimeInput-DU09ewqh.js.map → TimeInput-Bu_5GlHP.js.map} +1 -1
  150. package/client/assets/{TimeInput-BrVdiuOQ.css → TimeInput-Cu-N5DmX.css} +1 -1
  151. package/client/assets/TimeInput-Cu-N5DmX.css.br +0 -0
  152. package/client/assets/TimeInput-Cu-N5DmX.css.gz +0 -0
  153. package/client/assets/TimelinePage-CQqUB1KT.js +2 -0
  154. package/client/assets/TimelinePage-CQqUB1KT.js.br +0 -0
  155. package/client/assets/TimelinePage-CQqUB1KT.js.gz +0 -0
  156. package/client/assets/TimelinePage-CQqUB1KT.js.map +1 -0
  157. package/client/assets/TimelinePage-CcFl3uul.css +1 -0
  158. package/client/assets/TimelinePage-CcFl3uul.css.br +0 -0
  159. package/client/assets/TimelinePage-CcFl3uul.css.gz +0 -0
  160. package/client/assets/Timer-CIr2L3gJ.js +2 -0
  161. package/client/assets/Timer-CIr2L3gJ.js.br +0 -0
  162. package/client/assets/Timer-CIr2L3gJ.js.gz +0 -0
  163. package/client/assets/Timer-CIr2L3gJ.js.map +1 -0
  164. package/client/assets/TimerControlExport-4a3Cd9x8.js +2 -0
  165. package/client/assets/TimerControlExport-4a3Cd9x8.js.br +0 -0
  166. package/client/assets/TimerControlExport-4a3Cd9x8.js.gz +0 -0
  167. package/client/assets/{TimerControlExport-i0ZDpUx7.js.map → TimerControlExport-4a3Cd9x8.js.map} +1 -1
  168. package/client/assets/{TimerControlExport-D8kqHQB0.css → TimerControlExport-DavNxY9p.css} +1 -1
  169. package/client/assets/TimerControlExport-DavNxY9p.css.br +0 -0
  170. package/client/assets/TimerControlExport-DavNxY9p.css.gz +0 -0
  171. package/client/assets/TitleCard-1U35ek0D.js +2 -0
  172. package/client/assets/TitleCard-1U35ek0D.js.br +0 -0
  173. package/client/assets/TitleCard-1U35ek0D.js.gz +0 -0
  174. package/client/assets/{TitleCard-BgOtucv6.js.map → TitleCard-1U35ek0D.js.map} +1 -1
  175. package/client/assets/{Tooltip-C0rGHLsB.js → Tooltip-B8y25e3n.js} +2 -2
  176. package/client/assets/Tooltip-B8y25e3n.js.br +0 -0
  177. package/client/assets/Tooltip-B8y25e3n.js.gz +0 -0
  178. package/client/assets/{Tooltip-C0rGHLsB.js.map → Tooltip-B8y25e3n.js.map} +1 -1
  179. package/client/assets/ViewLogo-BHsV7Faa.js +2 -0
  180. package/client/assets/ViewLogo-BHsV7Faa.js.br +0 -0
  181. package/client/assets/ViewLogo-BHsV7Faa.js.gz +0 -0
  182. package/client/assets/{ViewLogo--9miplQv.js.map → ViewLogo-BHsV7Faa.js.map} +1 -1
  183. package/client/assets/ViewParamsEditor-BMHXOv-K.js +2 -0
  184. package/client/assets/ViewParamsEditor-BMHXOv-K.js.br +0 -0
  185. package/client/assets/ViewParamsEditor-BMHXOv-K.js.gz +0 -0
  186. package/client/assets/ViewParamsEditor-BMHXOv-K.js.map +1 -0
  187. package/client/assets/ViewParamsEditor-CupOV30k.css +1 -0
  188. package/client/assets/ViewParamsEditor-CupOV30k.css.br +0 -0
  189. package/client/assets/ViewParamsEditor-CupOV30k.css.gz +0 -0
  190. package/client/assets/{dateConfig-WYqMzV9D.js → dateConfig-_BhycZza.js} +2 -2
  191. package/client/assets/dateConfig-_BhycZza.js.br +0 -0
  192. package/client/assets/dateConfig-_BhycZza.js.gz +0 -0
  193. package/client/assets/{dateConfig-WYqMzV9D.js.map → dateConfig-_BhycZza.js.map} +1 -1
  194. package/client/assets/{editorSettings-CCHx-wCx.js → editorSettings-DH9ca-nB.js} +2 -2
  195. package/client/assets/editorSettings-DH9ca-nB.js.br +0 -0
  196. package/client/assets/editorSettings-DH9ca-nB.js.gz +0 -0
  197. package/client/assets/{editorSettings-CCHx-wCx.js.map → editorSettings-DH9ca-nB.js.map} +1 -1
  198. package/client/assets/{getProgress-B94Ieskb.js → getProgress-DlrSzpnf.js} +2 -2
  199. package/client/assets/getProgress-DlrSzpnf.js.br +0 -0
  200. package/client/assets/getProgress-DlrSzpnf.js.gz +0 -0
  201. package/client/assets/{getProgress-B94Ieskb.js.map → getProgress-DlrSzpnf.js.map} +1 -1
  202. package/client/assets/{index-De0uf0Ta.css → index-BuJoGGff.css} +1 -1
  203. package/client/assets/index-BuJoGGff.css.br +0 -0
  204. package/client/assets/index-BuJoGGff.css.gz +0 -0
  205. package/client/assets/index-CDBQg2fh.js +3 -0
  206. package/client/assets/index-CDBQg2fh.js.br +0 -0
  207. package/client/assets/index-CDBQg2fh.js.gz +0 -0
  208. package/client/assets/index-CDBQg2fh.js.map +1 -0
  209. package/client/assets/offset-CLG4o744.js +2 -0
  210. package/client/assets/offset-CLG4o744.js.br +0 -0
  211. package/client/assets/offset-CLG4o744.js.gz +0 -0
  212. package/client/assets/offset-CLG4o744.js.map +1 -0
  213. package/client/assets/parseUserTime-Cp5iWS7y.js +2 -0
  214. package/client/assets/parseUserTime-Cp5iWS7y.js.br +0 -0
  215. package/client/assets/parseUserTime-Cp5iWS7y.js.gz +0 -0
  216. package/client/assets/{parseUserTime-Bc1pSJR2.js.map → parseUserTime-Cp5iWS7y.js.map} +1 -1
  217. package/client/assets/playbackstate-B3BKJ8cT.js +2 -0
  218. package/client/assets/playbackstate-B3BKJ8cT.js.br +0 -0
  219. package/client/assets/playbackstate-B3BKJ8cT.js.gz +0 -0
  220. package/client/assets/{playbackstate-BpzbtG9F.js.map → playbackstate-B3BKJ8cT.js.map} +1 -1
  221. package/client/assets/{presentation.utils-B2baBe3j.js → presentation.utils-B-wIv_a5.js} +2 -2
  222. package/client/assets/presentation.utils-B-wIv_a5.js.br +0 -0
  223. package/client/assets/presentation.utils-B-wIv_a5.js.gz +0 -0
  224. package/client/assets/{presentation.utils-B2baBe3j.js.map → presentation.utils-B-wIv_a5.js.map} +1 -1
  225. package/client/assets/{rundownUtils-H6xvQyre.js → rundownUtils-DJKMt8Ih.js} +2 -2
  226. package/client/assets/rundownUtils-DJKMt8Ih.js.br +0 -0
  227. package/client/assets/rundownUtils-DJKMt8Ih.js.gz +0 -0
  228. package/client/assets/{rundownUtils-H6xvQyre.js.map → rundownUtils-DJKMt8Ih.js.map} +1 -1
  229. package/client/assets/timer.utils-ByC_bcT9.js +2 -0
  230. package/client/assets/timer.utils-ByC_bcT9.js.br +0 -0
  231. package/client/assets/timer.utils-ByC_bcT9.js.gz +0 -0
  232. package/client/assets/timer.utils-ByC_bcT9.js.map +1 -0
  233. package/client/assets/useCustomFields-BUJkzZvM.js +2 -0
  234. package/client/assets/useCustomFields-BUJkzZvM.js.br +2 -0
  235. package/client/assets/useCustomFields-BUJkzZvM.js.gz +0 -0
  236. package/client/assets/{useCustomFields-Da0Li7nQ.js.map → useCustomFields-BUJkzZvM.js.map} +1 -1
  237. package/client/assets/{useFollowComponent-Qo3FobyV.js → useFollowComponent-Eyo4hWVG.js} +2 -2
  238. package/client/assets/useFollowComponent-Eyo4hWVG.js.br +0 -0
  239. package/client/assets/useFollowComponent-Eyo4hWVG.js.gz +0 -0
  240. package/client/assets/{useFollowComponent-Qo3FobyV.js.map → useFollowComponent-Eyo4hWVG.js.map} +1 -1
  241. package/client/assets/{useProjectData-DW06zQvF.js → useProjectData-DGA6K2Zs.js} +2 -2
  242. package/client/assets/useProjectData-DGA6K2Zs.js.br +0 -0
  243. package/client/assets/useProjectData-DGA6K2Zs.js.gz +0 -0
  244. package/client/assets/{useProjectData-DW06zQvF.js.map → useProjectData-DGA6K2Zs.js.map} +1 -1
  245. package/client/assets/useReport-BUCsRa2T.js +2 -0
  246. package/client/assets/useReport-BUCsRa2T.js.br +0 -0
  247. package/client/assets/useReport-BUCsRa2T.js.gz +0 -0
  248. package/client/assets/{useReport-DhFY2L8v.js.map → useReport-BUCsRa2T.js.map} +1 -1
  249. package/client/assets/{useRundown-ihoU8qBi.js → useRundown-BFae0_bU.js} +2 -2
  250. package/client/assets/useRundown-BFae0_bU.js.br +0 -0
  251. package/client/assets/useRundown-BFae0_bU.js.gz +0 -0
  252. package/client/assets/{useRundown-ihoU8qBi.js.map → useRundown-BFae0_bU.js.map} +1 -1
  253. package/client/assets/useWindowTitle-DU8NlxIu.js +2 -0
  254. package/client/assets/useWindowTitle-DU8NlxIu.js.br +0 -0
  255. package/client/assets/useWindowTitle-DU8NlxIu.js.gz +0 -0
  256. package/client/assets/{useWindowTitle-B2UzPuki.js.map → useWindowTitle-DU8NlxIu.js.map} +1 -1
  257. package/client/assets/{validateEvent-BJMwP_mq.js → validateEvent-3adKsP1N.js} +2 -2
  258. package/client/assets/validateEvent-3adKsP1N.js.br +0 -0
  259. package/client/assets/validateEvent-3adKsP1N.js.gz +0 -0
  260. package/client/assets/{validateEvent-BJMwP_mq.js.map → validateEvent-3adKsP1N.js.map} +1 -1
  261. package/client/assets/{vendor-9UkPSc5K.js → vendor-BoH5HFNN.js} +21 -21
  262. package/client/assets/vendor-BoH5HFNN.js.br +0 -0
  263. package/client/assets/vendor-BoH5HFNN.js.gz +0 -0
  264. package/client/assets/{vendor-9UkPSc5K.js.map → vendor-BoH5HFNN.js.map} +1 -1
  265. package/client/assets/{viewLoader.utils-DQGhrjSp.js → viewLoader.utils-BPOG1xso.js} +2 -2
  266. package/client/assets/viewLoader.utils-BPOG1xso.js.br +0 -0
  267. package/client/assets/viewLoader.utils-BPOG1xso.js.gz +0 -0
  268. package/client/assets/{viewLoader.utils-DQGhrjSp.js.map → viewLoader.utils-BPOG1xso.js.map} +1 -1
  269. package/client/assets/viewUtils-DI8_kmUZ.js +2 -0
  270. package/client/assets/viewUtils-DI8_kmUZ.js.br +0 -0
  271. package/client/assets/viewUtils-DI8_kmUZ.js.gz +0 -0
  272. package/client/assets/viewUtils-DI8_kmUZ.js.map +1 -0
  273. package/client/index.html +3 -3
  274. package/package.json +1 -1
  275. package/server/index.cjs +70 -70
  276. package/client/assets/Backstage-BhtXVpms.js +0 -2
  277. package/client/assets/Backstage-BhtXVpms.js.br +0 -0
  278. package/client/assets/Backstage-BhtXVpms.js.gz +0 -0
  279. package/client/assets/Backstage-BhtXVpms.js.map +0 -1
  280. package/client/assets/Countdown-NmGi1KMx.js +0 -2
  281. package/client/assets/Countdown-NmGi1KMx.js.br +0 -0
  282. package/client/assets/Countdown-NmGi1KMx.js.gz +0 -0
  283. package/client/assets/Countdown-NmGi1KMx.js.map +0 -1
  284. package/client/assets/CustomTranslationModal-BBNxpds0.js +0 -2
  285. package/client/assets/CustomTranslationModal-BBNxpds0.js.br +0 -0
  286. package/client/assets/CustomTranslationModal-BBNxpds0.js.gz +0 -0
  287. package/client/assets/DelayIndicator-CFCDQ7FN.js +0 -2
  288. package/client/assets/DelayIndicator-CFCDQ7FN.js.br +0 -0
  289. package/client/assets/DelayIndicator-CFCDQ7FN.js.gz +0 -0
  290. package/client/assets/EditorFeatureWrapper-D55c8JBz.js +0 -2
  291. package/client/assets/EditorFeatureWrapper-D55c8JBz.js.br +0 -0
  292. package/client/assets/EditorFeatureWrapper-D55c8JBz.js.gz +0 -0
  293. package/client/assets/EditorUtils-BXko-IuN.css +0 -1
  294. package/client/assets/EditorUtils-BXko-IuN.css.br +0 -0
  295. package/client/assets/EditorUtils-BXko-IuN.css.gz +0 -0
  296. package/client/assets/EditorUtils-CFE106qQ.js +0 -2
  297. package/client/assets/EditorUtils-CFE106qQ.js.br +0 -0
  298. package/client/assets/EditorUtils-CFE106qQ.js.gz +0 -0
  299. package/client/assets/EditorUtils-CFE106qQ.js.map +0 -1
  300. package/client/assets/Empty-C-JO_XAr.js +0 -2
  301. package/client/assets/Empty-C-JO_XAr.js.br +0 -2
  302. package/client/assets/Empty-C-JO_XAr.js.gz +0 -0
  303. package/client/assets/EmptyPage-BSzsxpGg.js +0 -2
  304. package/client/assets/EmptyPage-BSzsxpGg.js.br +0 -1
  305. package/client/assets/EmptyPage-BSzsxpGg.js.gz +0 -0
  306. package/client/assets/FollowButton-Mox6N4JW.js +0 -2
  307. package/client/assets/FollowButton-Mox6N4JW.js.br +0 -0
  308. package/client/assets/FollowButton-Mox6N4JW.js.gz +0 -0
  309. package/client/assets/MessageControlExport-BL2ip9qN.js +0 -2
  310. package/client/assets/MessageControlExport-BL2ip9qN.js.br +0 -0
  311. package/client/assets/MessageControlExport-BL2ip9qN.js.gz +0 -0
  312. package/client/assets/MessageControlExport-BL2ip9qN.js.map +0 -1
  313. package/client/assets/MessageControlExport-DPgqVb-4.css +0 -1
  314. package/client/assets/MessageControlExport-DPgqVb-4.css.br +0 -0
  315. package/client/assets/MessageControlExport-DPgqVb-4.css.gz +0 -0
  316. package/client/assets/MilestoneEditor-906SVj5M.css +0 -1
  317. package/client/assets/MilestoneEditor-906SVj5M.css.br +0 -0
  318. package/client/assets/MilestoneEditor-906SVj5M.css.gz +0 -0
  319. package/client/assets/MilestoneEditor-DcWPGKNK.js +0 -2
  320. package/client/assets/MilestoneEditor-DcWPGKNK.js.br +0 -0
  321. package/client/assets/MilestoneEditor-DcWPGKNK.js.gz +0 -0
  322. package/client/assets/MilestoneEditor-DcWPGKNK.js.map +0 -1
  323. package/client/assets/Modal-krcwDRb-.js +0 -2
  324. package/client/assets/Modal-krcwDRb-.js.br +0 -0
  325. package/client/assets/Modal-krcwDRb-.js.gz +0 -0
  326. package/client/assets/MultiPartProgressBar-BXQbpM-j.js +0 -2
  327. package/client/assets/MultiPartProgressBar-BXQbpM-j.js.br +0 -0
  328. package/client/assets/MultiPartProgressBar-BXQbpM-j.js.gz +0 -0
  329. package/client/assets/OperatorExport-C50KHBrD.js +0 -2
  330. package/client/assets/OperatorExport-C50KHBrD.js.br +0 -0
  331. package/client/assets/OperatorExport-C50KHBrD.js.gz +0 -0
  332. package/client/assets/OperatorExport-C50KHBrD.js.map +0 -1
  333. package/client/assets/OperatorExport-QyLn8tmf.css +0 -1
  334. package/client/assets/OperatorExport-QyLn8tmf.css.br +0 -0
  335. package/client/assets/OperatorExport-QyLn8tmf.css.gz +0 -0
  336. package/client/assets/OverviewWrapper-MGJ1uE5W.js.br +0 -0
  337. package/client/assets/OverviewWrapper-MGJ1uE5W.js.gz +0 -0
  338. package/client/assets/OverviewWrapper-a18gep4m.css +0 -1
  339. package/client/assets/OverviewWrapper-a18gep4m.css.br +0 -0
  340. package/client/assets/OverviewWrapper-a18gep4m.css.gz +0 -0
  341. package/client/assets/ProjectInfo-CJ-GLvVG.js +0 -2
  342. package/client/assets/ProjectInfo-CJ-GLvVG.js.br +0 -0
  343. package/client/assets/ProjectInfo-CJ-GLvVG.js.gz +0 -0
  344. package/client/assets/ProtectRoute-DJ9xZnPI.js +0 -2
  345. package/client/assets/ProtectRoute-DJ9xZnPI.js.br +0 -0
  346. package/client/assets/ProtectRoute-DJ9xZnPI.js.gz +0 -0
  347. package/client/assets/ProtectedCuesheet-B8tg6Mmo.js +0 -2
  348. package/client/assets/ProtectedCuesheet-B8tg6Mmo.js.br +0 -0
  349. package/client/assets/ProtectedCuesheet-B8tg6Mmo.js.gz +0 -0
  350. package/client/assets/ProtectedCuesheet-B8tg6Mmo.js.map +0 -1
  351. package/client/assets/ProtectedCuesheet-CMTscjjR.css.br +0 -0
  352. package/client/assets/ProtectedCuesheet-CMTscjjR.css.gz +0 -0
  353. package/client/assets/ProtectedEditor-Bl4wV72N.js +0 -3
  354. package/client/assets/ProtectedEditor-Bl4wV72N.js.br +0 -0
  355. package/client/assets/ProtectedEditor-Bl4wV72N.js.gz +0 -0
  356. package/client/assets/ProtectedEditor-Bl4wV72N.js.map +0 -1
  357. package/client/assets/ProtectedEditor-BoiAT_IR.css +0 -1
  358. package/client/assets/ProtectedEditor-BoiAT_IR.css.br +0 -0
  359. package/client/assets/ProtectedEditor-BoiAT_IR.css.gz +0 -0
  360. package/client/assets/RundownEntry-3gFEEUnw.css +0 -1
  361. package/client/assets/RundownEntry-3gFEEUnw.css.br +0 -0
  362. package/client/assets/RundownEntry-3gFEEUnw.css.gz +0 -0
  363. package/client/assets/RundownEntry-D9tXNXPy.js +0 -2
  364. package/client/assets/RundownEntry-D9tXNXPy.js.br +0 -0
  365. package/client/assets/RundownEntry-D9tXNXPy.js.gz +0 -0
  366. package/client/assets/RundownEntry-D9tXNXPy.js.map +0 -1
  367. package/client/assets/RundownExport-1zBZurIG.css.br +0 -0
  368. package/client/assets/RundownExport-1zBZurIG.css.gz +0 -0
  369. package/client/assets/RundownExport-D6uAmFbb.js +0 -3
  370. package/client/assets/RundownExport-D6uAmFbb.js.br +0 -0
  371. package/client/assets/RundownExport-D6uAmFbb.js.gz +0 -0
  372. package/client/assets/RundownExport-D6uAmFbb.js.map +0 -1
  373. package/client/assets/Select-BLA-yQMq.js +0 -2
  374. package/client/assets/Select-BLA-yQMq.js.br +0 -0
  375. package/client/assets/Select-BLA-yQMq.js.gz +0 -0
  376. package/client/assets/Studio-DbP92DTf.js +0 -2
  377. package/client/assets/Studio-DbP92DTf.js.br +0 -0
  378. package/client/assets/Studio-DbP92DTf.js.gz +0 -0
  379. package/client/assets/Studio-DbP92DTf.js.map +0 -1
  380. package/client/assets/StyleEditor-DNjZ46Qf.js.br +0 -0
  381. package/client/assets/StyleEditor-DNjZ46Qf.js.gz +0 -0
  382. package/client/assets/SuperscriptTime-C8ypTVpH.js +0 -2
  383. package/client/assets/SuperscriptTime-C8ypTVpH.js.br +0 -0
  384. package/client/assets/SuperscriptTime-C8ypTVpH.js.gz +0 -0
  385. package/client/assets/TimeElements-BcQdm4ZV.css +0 -1
  386. package/client/assets/TimeElements-BcQdm4ZV.css.br +0 -0
  387. package/client/assets/TimeElements-BcQdm4ZV.css.gz +0 -0
  388. package/client/assets/TimeElements-DlEBhXe0.js +0 -2
  389. package/client/assets/TimeElements-DlEBhXe0.js.br +0 -0
  390. package/client/assets/TimeElements-DlEBhXe0.js.gz +0 -0
  391. package/client/assets/TimeElements-DlEBhXe0.js.map +0 -1
  392. package/client/assets/TimeInput-BrVdiuOQ.css.br +0 -0
  393. package/client/assets/TimeInput-BrVdiuOQ.css.gz +0 -0
  394. package/client/assets/TimeInput-DU09ewqh.js +0 -2
  395. package/client/assets/TimeInput-DU09ewqh.js.br +0 -0
  396. package/client/assets/TimeInput-DU09ewqh.js.gz +0 -0
  397. package/client/assets/TimelinePage-BJav6PAb.css +0 -1
  398. package/client/assets/TimelinePage-BJav6PAb.css.br +0 -0
  399. package/client/assets/TimelinePage-BJav6PAb.css.gz +0 -0
  400. package/client/assets/TimelinePage-DTwqRihn.js +0 -2
  401. package/client/assets/TimelinePage-DTwqRihn.js.br +0 -0
  402. package/client/assets/TimelinePage-DTwqRihn.js.gz +0 -0
  403. package/client/assets/TimelinePage-DTwqRihn.js.map +0 -1
  404. package/client/assets/Timer-jjWAunJc.js +0 -2
  405. package/client/assets/Timer-jjWAunJc.js.br +0 -0
  406. package/client/assets/Timer-jjWAunJc.js.gz +0 -0
  407. package/client/assets/Timer-jjWAunJc.js.map +0 -1
  408. package/client/assets/TimerControlExport-D8kqHQB0.css.br +0 -0
  409. package/client/assets/TimerControlExport-D8kqHQB0.css.gz +0 -0
  410. package/client/assets/TimerControlExport-i0ZDpUx7.js +0 -2
  411. package/client/assets/TimerControlExport-i0ZDpUx7.js.br +0 -0
  412. package/client/assets/TimerControlExport-i0ZDpUx7.js.gz +0 -0
  413. package/client/assets/TitleCard-BgOtucv6.js +0 -2
  414. package/client/assets/TitleCard-BgOtucv6.js.br +0 -0
  415. package/client/assets/TitleCard-BgOtucv6.js.gz +0 -0
  416. package/client/assets/Tooltip-C0rGHLsB.js.br +0 -0
  417. package/client/assets/Tooltip-C0rGHLsB.js.gz +0 -0
  418. package/client/assets/ViewLogo--9miplQv.js +0 -2
  419. package/client/assets/ViewLogo--9miplQv.js.br +0 -0
  420. package/client/assets/ViewLogo--9miplQv.js.gz +0 -0
  421. package/client/assets/ViewParamsEditor-1Ok39npF.css +0 -1
  422. package/client/assets/ViewParamsEditor-1Ok39npF.css.br +0 -0
  423. package/client/assets/ViewParamsEditor-1Ok39npF.css.gz +0 -0
  424. package/client/assets/ViewParamsEditor-BFu_0oIb.js +0 -2
  425. package/client/assets/ViewParamsEditor-BFu_0oIb.js.br +0 -0
  426. package/client/assets/ViewParamsEditor-BFu_0oIb.js.gz +0 -0
  427. package/client/assets/ViewParamsEditor-BFu_0oIb.js.map +0 -1
  428. package/client/assets/dateConfig-WYqMzV9D.js.br +0 -0
  429. package/client/assets/dateConfig-WYqMzV9D.js.gz +0 -0
  430. package/client/assets/editorSettings-CCHx-wCx.js.br +0 -0
  431. package/client/assets/editorSettings-CCHx-wCx.js.gz +0 -0
  432. package/client/assets/getProgress-B94Ieskb.js.br +0 -0
  433. package/client/assets/getProgress-B94Ieskb.js.gz +0 -0
  434. package/client/assets/index-De0uf0Ta.css.br +0 -0
  435. package/client/assets/index-De0uf0Ta.css.gz +0 -0
  436. package/client/assets/index-njXwwjfn.js +0 -3
  437. package/client/assets/index-njXwwjfn.js.br +0 -0
  438. package/client/assets/index-njXwwjfn.js.gz +0 -0
  439. package/client/assets/index-njXwwjfn.js.map +0 -1
  440. package/client/assets/offset-D1q-72D-.js +0 -2
  441. package/client/assets/offset-D1q-72D-.js.br +0 -0
  442. package/client/assets/offset-D1q-72D-.js.gz +0 -0
  443. package/client/assets/offset-D1q-72D-.js.map +0 -1
  444. package/client/assets/parseUserTime-Bc1pSJR2.js +0 -2
  445. package/client/assets/parseUserTime-Bc1pSJR2.js.br +0 -0
  446. package/client/assets/parseUserTime-Bc1pSJR2.js.gz +0 -0
  447. package/client/assets/playbackstate-BpzbtG9F.js +0 -2
  448. package/client/assets/playbackstate-BpzbtG9F.js.br +0 -0
  449. package/client/assets/playbackstate-BpzbtG9F.js.gz +0 -0
  450. package/client/assets/presentation.utils-B2baBe3j.js.br +0 -0
  451. package/client/assets/presentation.utils-B2baBe3j.js.gz +0 -0
  452. package/client/assets/rundownUtils-H6xvQyre.js.br +0 -0
  453. package/client/assets/rundownUtils-H6xvQyre.js.gz +0 -0
  454. package/client/assets/useCustomFields-Da0Li7nQ.js +0 -2
  455. package/client/assets/useCustomFields-Da0Li7nQ.js.br +0 -0
  456. package/client/assets/useCustomFields-Da0Li7nQ.js.gz +0 -0
  457. package/client/assets/useFollowComponent-Qo3FobyV.js.br +0 -0
  458. package/client/assets/useFollowComponent-Qo3FobyV.js.gz +0 -0
  459. package/client/assets/useProjectData-DW06zQvF.js.br +0 -0
  460. package/client/assets/useProjectData-DW06zQvF.js.gz +0 -0
  461. package/client/assets/useReport-DhFY2L8v.js +0 -2
  462. package/client/assets/useReport-DhFY2L8v.js.br +0 -0
  463. package/client/assets/useReport-DhFY2L8v.js.gz +0 -0
  464. package/client/assets/useRundown-ihoU8qBi.js.br +0 -0
  465. package/client/assets/useRundown-ihoU8qBi.js.gz +0 -0
  466. package/client/assets/useWindowTitle-B2UzPuki.js +0 -2
  467. package/client/assets/useWindowTitle-B2UzPuki.js.br +0 -0
  468. package/client/assets/useWindowTitle-B2UzPuki.js.gz +0 -0
  469. package/client/assets/validateEvent-BJMwP_mq.js.br +0 -0
  470. package/client/assets/validateEvent-BJMwP_mq.js.gz +0 -0
  471. package/client/assets/vendor-9UkPSc5K.js.br +0 -0
  472. package/client/assets/vendor-9UkPSc5K.js.gz +0 -0
  473. package/client/assets/viewLoader.utils-DQGhrjSp.js.br +0 -0
  474. package/client/assets/viewLoader.utils-DQGhrjSp.js.gz +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"dateConfig-WYqMzV9D.js","sources":["../../src/features/rundown/rundown.utils.ts","../../src/common/hooks/useEntryAction.ts","../../src/common/utils/dateConfig.ts"],"sourcesContent":["import { EntryId, isOntimeEvent, isOntimeGroup, RundownEntries, SupportedEntry } from 'ontime-types';\n\n/**\n * Creates a sortable list of entries\n * ------------------------------------\n * Due to limitations in dnd-kit we need to flatten the list of entries\n * This list should also be aware of any elements that are sortable (ie: group ends)\n */\nexport function makeSortableList(order: EntryId[], entries: RundownEntries): EntryId[] {\n const flatIds: EntryId[] = [];\n\n for (let i = 0; i < order.length; i++) {\n const entry = entries[order[i]];\n\n if (!entry) {\n continue;\n }\n\n if (isOntimeGroup(entry)) {\n // inside a group there are delays and events\n // there is no need for special handling\n flatIds.push(entry.id);\n flatIds.push(...entry.entries);\n\n // close the group\n flatIds.push(`end-${entry.id}`);\n } else {\n flatIds.push(entry.id);\n }\n }\n return flatIds;\n}\n\n/**\n * Checks whether a drop operation is valid\n * Currently only used for validating dropping groups\n */\nexport function canDrop(\n targetType: SupportedEntry | 'end-group',\n targetParent: EntryId | null,\n order?: 'after' | 'before',\n isTargetCollapsed?: boolean,\n): boolean {\n // inserting before would mean adding a group inside another\n if (targetType === 'end-group') {\n return order === 'after';\n }\n\n // this means swapping places with another group\n // !!! if the user is dragging down, they could be inserting into a group depending on whether the group is collapsed\n if (targetType === 'group') {\n if (order !== undefined && order === 'after' && !isTargetCollapsed) {\n return false;\n }\n return true;\n }\n\n // for all other cases, we just need to check if we are inside a group\n return targetParent === null;\n}\n\n/**\n * calculates destinations for an entry moving one position up in the rundown\n * @returns An object describing how to move the entry:\n * - destinationId: The target entry ID (null if no movement possible)\n * - order: How to position relative to the destination:\n * - 'before': Place before the destination\n * - 'after': Place after the destination\n * - 'insert': Insert into the destination (for groups)\n */\nexport function moveUp(\n entryId: EntryId,\n flatOrder: EntryId[],\n entries: RundownEntries,\n): { destinationId: EntryId | null; order: 'before' | 'after' | 'insert' } {\n const currentEntry = entries[entryId];\n const currentIndex = flatOrder.indexOf(entryId);\n const previousEntryId = flatOrder[currentIndex - 1];\n\n // 1. moving at the top of the list\n if (!previousEntryId) {\n // 1a. we are in a group and need to move outside of it\n if ('parent' in currentEntry && currentEntry.parent !== null) {\n return { destinationId: currentEntry.parent, order: 'before' };\n }\n // 1b. we are at the start of the rundown, no movement possible\n return { destinationId: null, order: 'before' };\n }\n\n // 2. moving a group (always moves at top level)\n if (isOntimeGroup(currentEntry)) {\n // 21. if previous entry is inside a group, swap with parent\n const previousEntry = entries[previousEntryId];\n if ('parent' in previousEntry && previousEntry.parent !== null) {\n return { destinationId: previousEntry.parent, order: 'before' };\n }\n\n // 2b. previous entry is at top level, we just swap places\n return { destinationId: previousEntryId, order: 'before' };\n }\n\n const previousEntry = entries[previousEntryId];\n const currentEntryParent = currentEntry.parent;\n\n // 3. moving in and out of a group\n if (isOntimeGroup(previousEntry)) {\n // 3a. if we're not already in the group, move into it\n if (currentEntryParent === null) {\n return { destinationId: previousEntryId, order: 'insert' };\n }\n // 3b. otherwise, move before the group\n return { destinationId: previousEntryId, order: 'before' };\n }\n\n // 4. moving into the same group as previous entry\n if (isOntimeEvent(previousEntry) && previousEntry.parent !== null && currentEntryParent === null) {\n return { destinationId: previousEntryId, order: 'after' };\n }\n\n // default - swap positions with previous entry\n return { destinationId: previousEntryId, order: 'before' };\n}\n\n/**\n * calculates destinations for an entry moving one position down in the rundown\n * @returns An object describing how to move the entry:\n * - destinationId: The target entry ID (null if no movement possible)\n * - order: How to position relative to the destination:\n * - 'before': Place before the destination\n * - 'after': Place after the destination\n * - 'insert': Insert into the destination (for groups)\n */\nexport function moveDown(\n entryId: EntryId,\n flatOrder: EntryId[],\n entries: RundownEntries,\n): { destinationId: EntryId | null; order: 'before' | 'after' | 'insert' } {\n const currentEntry = entries[entryId];\n const currentIndex = flatOrder.indexOf(entryId);\n const nextEntryId = flatOrder[currentIndex + 1];\n\n // 1. check if we're the last entry in a group\n if ('parent' in currentEntry && currentEntry.parent !== null) {\n const parentGroup = entries[currentEntry.parent];\n if (isOntimeGroup(parentGroup) && parentGroup.entries[parentGroup.entries.length - 1] === entryId) {\n return { destinationId: currentEntry.parent, order: 'after' };\n }\n }\n\n // 2. moving at the end of the list\n if (!nextEntryId) {\n return { destinationId: null, order: 'after' };\n }\n\n // 3. moving a group (always moves at top level)\n if (isOntimeGroup(currentEntry)) {\n // if next entry is inside this group, skip past all children\n if (currentEntry.entries.includes(nextEntryId)) {\n const afterGroupIndex = currentIndex + currentEntry.entries.length + 1;\n const afterGroupId = flatOrder[afterGroupIndex];\n\n // 2a. group is the last top level entry\n if (!afterGroupId) {\n return { destinationId: null, order: 'after' };\n }\n // 2b. move after the next top level event\n return { destinationId: afterGroupId, order: 'after' };\n }\n // 2c. empty group move after the next entry\n return { destinationId: nextEntryId, order: 'after' };\n }\n\n const nextEntry = entries[nextEntryId];\n const currentEntryParent = currentEntry.parent;\n\n // 4. handle moving relative to groups\n if (isOntimeGroup(nextEntry)) {\n if (currentEntryParent === null) {\n // we are entering a group\n if (nextEntry.entries.length === 0) {\n // 3a. if the group is empty, insert into it\n return { destinationId: nextEntryId, order: 'insert' };\n }\n // 3b. otherwise, add before the first entry in the group\n const firstGroupEntryId = nextEntry.entries[0];\n return { destinationId: firstGroupEntryId, order: 'before' };\n }\n }\n\n // 5. handle moving between group and top level\n const nextEntryParent = isOntimeEvent(nextEntry) ? nextEntry.parent : null;\n if (nextEntryParent !== null && currentEntryParent === null) {\n return { destinationId: nextEntryId, order: 'after' };\n }\n\n // default - swap positions with next entry\n return { destinationId: nextEntryId, order: 'after' };\n}\n\n/**\n * Reorders unorderedArray to match the flatOrder entries\n * Useful for operations that convert selections (out of order) to rundown\n */\nexport function orderEntries(unorderedArray: EntryId[], flatOrder: EntryId[]): EntryId[] {\n const orderedArray: EntryId[] = [];\n for (const id of flatOrder) {\n if (unorderedArray.includes(id)) {\n orderedArray.push(id);\n }\n }\n return orderedArray;\n}\n","import { useCallback } from 'react';\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport {\n EntryId,\n isOntimeEvent,\n isOntimeGroup,\n MaybeString,\n OntimeEntry,\n OntimeEvent,\n Rundown,\n SupportedEntry,\n TimeField,\n TimeStrategy,\n TransientEventPayload,\n} from 'ontime-types';\nimport { dayInMs, generateId, MILLIS_PER_SECOND, parseUserTime, swapEventData } from 'ontime-utils';\n\nimport { moveDown, moveUp, orderEntries } from '../../features/rundown/rundown.utils';\nimport { RUNDOWN } from '../api/constants';\nimport {\n deleteEntries,\n patchReorderEntry,\n postAddEntry,\n postCloneEntry,\n putBatchEditEvents,\n putEditEntry,\n ReorderEntry,\n requestApplyDelay,\n requestDeleteAll,\n requestEventSwap,\n requestGroupEntries,\n requestUngroup,\n} from '../api/rundown';\nimport { logAxiosError } from '../api/utils';\nimport { useEditorSettings } from '../stores/editorSettings';\n\nexport type EventOptions = Partial<{\n // options of any new entries (event / delay / group)\n after: MaybeString;\n before: MaybeString;\n // options of entries of type OntimeEvent\n linkPrevious: boolean;\n lastEventId: MaybeString;\n}>;\n\n/**\n * Gather utilities for actions on entries\n */\nexport const useEntryActions = () => {\n const queryClient = useQueryClient();\n const {\n linkPrevious,\n defaultTimeStrategy,\n defaultDuration,\n defaultWarnTime,\n defaultDangerTime,\n defaultTimerType,\n defaultEndAction,\n } = useEditorSettings();\n\n /**\n * Returns the currently loaded rundown\n */\n const getCurrentRundownData = useCallback(() => {\n return queryClient.getQueryData<Rundown>(RUNDOWN);\n }, [queryClient]);\n\n /**\n * Looks for an entry with a given ID in the currently loaded rundown\n */\n const getEntryById = useCallback(\n (eventId: EntryId): OntimeEntry | undefined => {\n const cachedRundown = getCurrentRundownData();\n if (!cachedRundown?.entries) {\n return;\n }\n return cachedRundown.entries[eventId];\n },\n [getCurrentRundownData],\n );\n\n /**\n * Calls mutation to add new entry\n * @private\n */\n const { mutateAsync: addEntryMutation } = useMutation({\n mutationFn: ([rundownId, entry]: Parameters<typeof postAddEntry>) => postAddEntry(rundownId, entry),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSettled: () => queryClient.invalidateQueries({ queryKey: RUNDOWN }),\n });\n\n /**\n * Adds an entry to rundown\n */\n const addEntry = useCallback(\n async (entry: Partial<OntimeEntry>, options?: EventOptions) => {\n const rundownData = getCurrentRundownData();\n const rundownId = rundownData?.id;\n\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n const newEntry: TransientEventPayload = { ...entry, id: generateId() };\n\n // ************* CHECK OPTIONS specific to events\n if (isOntimeEvent(newEntry)) {\n if (options?.lastEventId) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- we know this is a value\n const previousEvent = rundownData.entries[options?.lastEventId];\n if (isOntimeEvent(previousEvent)) {\n newEntry.timeStart = previousEvent.timeEnd;\n }\n }\n\n // Override event with options from editor settings\n newEntry.linkStart = options?.linkPrevious ?? linkPrevious;\n\n if (newEntry.duration === undefined && newEntry.timeEnd === undefined) {\n newEntry.duration = parseUserTime(defaultDuration);\n }\n\n if (newEntry.timeDanger === undefined) {\n newEntry.timeDanger = parseUserTime(defaultDangerTime);\n }\n\n if (newEntry.timeWarning === undefined) {\n newEntry.timeWarning = parseUserTime(defaultWarnTime);\n }\n\n if (newEntry.timerType === undefined) {\n newEntry.timerType = defaultTimerType;\n }\n\n if (newEntry.endAction === undefined) {\n newEntry.endAction = defaultEndAction;\n }\n\n if (newEntry.timeStrategy === undefined) {\n newEntry.timeStrategy = defaultTimeStrategy;\n }\n }\n\n // handle adding options that concern all event type\n if (options?.after) {\n (newEntry as TransientEventPayload).after = options.after;\n }\n if (options?.before) {\n (newEntry as TransientEventPayload).before = options.before;\n }\n\n try {\n await addEntryMutation([rundownId, newEntry]);\n } catch (error) {\n logAxiosError('Failed adding event', error);\n }\n },\n [\n getCurrentRundownData,\n linkPrevious,\n defaultDuration,\n defaultDangerTime,\n defaultWarnTime,\n defaultTimerType,\n defaultEndAction,\n defaultTimeStrategy,\n addEntryMutation,\n ],\n );\n\n /**\n * Calls mutation to clone a selection\n * @private\n */\n const { mutateAsync: cloneEntryMutation } = useMutation({\n mutationFn: ([rundownId, entryId]: Parameters<typeof postCloneEntry>) => postCloneEntry(rundownId, entryId),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSettled: () => queryClient.invalidateQueries({ queryKey: RUNDOWN }),\n });\n\n /**\n * Clone an entry\n */\n const clone = useCallback(\n async (entryId: EntryId) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await cloneEntryMutation([rundownId, entryId]);\n } catch (error) {\n logAxiosError('Error cloning entry', error);\n }\n },\n [cloneEntryMutation, getCurrentRundownData],\n );\n\n /**\n * Calls mutation to update existing entry\n * @private\n */\n const { mutateAsync: updateEntryMutation } = useMutation({\n mutationFn: ([rundownId, newEvent]: Parameters<typeof putEditEntry>) => putEditEntry(rundownId, newEvent),\n // we optimistically update here\n onMutate: async ([_rundownId, newEvent]) => {\n // cancel ongoing queries\n await queryClient.cancelQueries({ queryKey: RUNDOWN });\n\n // Snapshot the previous value\n const previousData = queryClient.getQueryData<Rundown>(RUNDOWN);\n const eventId = newEvent.id;\n\n if (previousData && eventId) {\n // optimistically update object\n const newRundown = { ...previousData.entries };\n // @ts-expect-error -- we expect the events to be of same type\n newRundown[eventId] = { ...newRundown[eventId], ...newEvent };\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id: previousData.id,\n title: previousData.title,\n order: previousData.order,\n flatOrder: previousData.flatOrder,\n entries: newRundown,\n revision: -1,\n });\n }\n\n // Return a context with the previous and new events\n return { previousData, newEvent };\n },\n // Mutation fails, rollback undoes optimist update\n onError: (_error, _newEvent, context) => {\n if (context?.previousData) {\n queryClient.setQueryData<Rundown>(RUNDOWN, context?.previousData);\n }\n },\n // Mutation finished, failed or successful\n // Fetch anyway, just to be sure\n onSettled: async () => {\n await queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Updates existing entry\n */\n const updateEntry = useCallback(\n async (entry: Partial<OntimeEntry>) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await updateEntryMutation([rundownId, entry]);\n } catch (error) {\n logAxiosError('Error updating event', error);\n }\n },\n [getCurrentRundownData, updateEntryMutation],\n );\n\n /**\n * Updates time of existing event\n * @param eventId {EntryId} - id of the event\n * @param field {TimeField} - field to update\n * @param value {string} - new value string to be parsed\n * @param lockOnUpdate {boolean} - whether we will apply the lock / release on update\n */\n const updateTimer = useCallback(\n async (eventId: EntryId, field: TimeField, value: string, lockOnUpdate?: boolean) => {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n // an empty value with no lock has no domain validity\n if (!lockOnUpdate && value === '') {\n return;\n }\n\n const newEvent: Partial<OntimeEvent> = {\n id: eventId,\n };\n\n // check if we should lock the field\n if (lockOnUpdate) {\n if (field === 'timeEnd') {\n // an empty value indicates that we should unlock the field\n newEvent.timeStrategy = value === '' ? TimeStrategy.LockDuration : TimeStrategy.LockEnd;\n newEvent.timeEnd = value === '' ? undefined : calculateNewValue();\n } else if (field === 'duration') {\n // an empty value indicates that we should unlock the field\n newEvent.timeStrategy = value === '' ? TimeStrategy.LockEnd : TimeStrategy.LockDuration;\n newEvent.duration = value === '' ? undefined : calculateNewValue();\n } else if (field === 'timeStart') {\n // an empty values means we should link to the previous\n newEvent.linkStart = value === '';\n newEvent.timeStart = value === '' ? undefined : calculateNewValue();\n }\n } else {\n newEvent[field] = calculateNewValue();\n }\n\n try {\n await updateEntryMutation([rundownId, newEvent]);\n } catch (error) {\n logAxiosError('Error updating event', error);\n }\n\n /**\n * Utility function to calculate the new time value\n */\n function calculateNewValue(): number {\n let newValMillis = 0;\n\n // check for previous keyword\n if (value === 'p' || value === 'prev' || value === 'previous') {\n newValMillis = getPreviousEnd();\n\n // check for adding time keyword\n } else if (value.startsWith('+') || value.startsWith('p+') || value.startsWith('p +')) {\n // TODO: is this logic solid?\n const remainingString = value.substring(1);\n newValMillis = getPreviousEnd() + parseUserTime(remainingString);\n } else {\n newValMillis = parseUserTime(value);\n }\n // dont allow timer values over 23:59:59\n return Math.min(newValMillis, dayInMs - MILLIS_PER_SECOND);\n }\n\n /**\n * Utility function to get the previous event end time\n */\n function getPreviousEnd(): number {\n const cachedRundown = queryClient.getQueryData<Rundown>(RUNDOWN);\n\n if (!cachedRundown?.order || !cachedRundown?.entries) {\n return 0;\n }\n\n const index = cachedRundown.order.indexOf(eventId);\n if (index === 0) {\n return 0;\n }\n let previousEnd = 0;\n for (let i = index - 1; i >= 0; i--) {\n const event = cachedRundown.entries[cachedRundown.order[i]];\n if (isOntimeEvent(event)) {\n previousEnd = event.timeEnd;\n break;\n }\n }\n return previousEnd;\n }\n },\n [getCurrentRundownData, updateEntryMutation, queryClient],\n );\n\n /**\n * Calls mutation to edit multiple events\n * @private\n */\n const { mutateAsync: batchUpdateEventsMutation } = useMutation({\n mutationFn: ([rundownId, data]: Parameters<typeof putBatchEditEvents>) => putBatchEditEvents(rundownId, data),\n onMutate: async ([_rundownId, data]) => {\n // cancel ongoing queries\n await queryClient.cancelQueries({ queryKey: RUNDOWN });\n\n // Snapshot the previous value\n const previousRundown = queryClient.getQueryData<Rundown>(RUNDOWN);\n\n if (previousRundown) {\n const eventIds = new Set(data.ids);\n const newRundown = { ...previousRundown.entries };\n\n eventIds.forEach((eventId) => {\n if (Object.hasOwn(newRundown, eventId)) {\n const event = newRundown[eventId];\n if (isOntimeEvent(event)) {\n newRundown[eventId] = {\n ...event,\n ...data,\n };\n }\n }\n });\n\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id: previousRundown.id,\n title: previousRundown.title,\n order: previousRundown.order,\n flatOrder: previousRundown.flatOrder,\n entries: newRundown,\n revision: -1,\n });\n }\n\n // Return a context with the previous rundown\n return { previousRundown };\n },\n onSuccess: (response) => {\n if (!response.data) return;\n\n const { id, title, order, flatOrder, entries, revision } = response.data;\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id,\n title,\n order,\n flatOrder,\n entries,\n revision,\n });\n },\n onError: (_error, _newEvent, context) => {\n queryClient.setQueryData<Rundown>(RUNDOWN, context?.previousRundown);\n },\n });\n\n const batchUpdateEvents = useCallback(\n async (data: Partial<OntimeEvent>, eventIds: EntryId[]) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await batchUpdateEventsMutation([rundownId, { data, ids: eventIds }]);\n } catch (error) {\n logAxiosError('Error updating events', error);\n }\n },\n [batchUpdateEventsMutation, getCurrentRundownData],\n );\n\n /**\n * Calls mutation to delete an entry\n * @private\n */\n const { mutateAsync: deleteEntryMutation } = useMutation({\n mutationFn: ([rundownId, entryIds]: Parameters<typeof deleteEntries>) => deleteEntries(rundownId, entryIds),\n // we optimistically update here\n onMutate: async ([_rundownId, entryIds]) => {\n // cancel ongoing queries\n await queryClient.cancelQueries({ queryKey: RUNDOWN });\n\n // Snapshot the previous value\n const previousData = queryClient.getQueryData<Rundown>(RUNDOWN);\n\n if (previousData) {\n // optimistically update object\n const { entries, order, flatOrder } = optimisticDeleteEntries(entryIds, previousData);\n\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id: previousData.id,\n title: previousData.title,\n order,\n flatOrder,\n entries,\n revision: -1,\n });\n }\n\n // Return a context with the previous and new events\n return { previousData };\n },\n\n // Mutation fails, rollback undoes optimist update\n onError: (_error, _entryIds, context) => {\n queryClient.setQueryData<Rundown>(RUNDOWN, context?.previousData);\n },\n // Mutation finished, failed or successful\n // Fetch anyway, just to be sure\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Deletes an event entry from the rundown\n */\n const deleteEntry = useCallback(\n async (entryIds: EntryId[]) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await deleteEntryMutation([rundownId, entryIds]);\n } catch (error) {\n logAxiosError('Error deleting event', error);\n }\n },\n [deleteEntryMutation, getCurrentRundownData],\n );\n\n /**\n * Calls mutation to delete all events\n * @private\n */\n const { mutateAsync: deleteAllEntriesMutation } = useMutation({\n mutationFn: ([rundownId]: Parameters<typeof requestDeleteAll>) => requestDeleteAll(rundownId),\n // we optimistically update here\n onMutate: async () => {\n // cancel ongoing queries\n await queryClient.cancelQueries({ queryKey: RUNDOWN });\n\n // Snapshot the previous value\n const previousData = queryClient.getQueryData<Rundown>(RUNDOWN);\n\n // optimistically update object\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id: previousData?.id ?? 'default',\n title: previousData?.title ?? '',\n order: [],\n flatOrder: [],\n entries: {},\n revision: -1,\n });\n\n // Return a context with the previous and new events\n return { previousData };\n },\n\n // Mutation fails, rollback optimist update\n onError: (_error, _, context) => {\n queryClient.setQueryData<Rundown>(RUNDOWN, context?.previousData);\n },\n // Mutation finished, failed or successful\n // Fetch anyway, just to be sure\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Deletes all entries in the rundown\n */\n const deleteAllEntries = useCallback(async () => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await deleteAllEntriesMutation([rundownId]);\n } catch (error) {\n logAxiosError('Error deleting events', error);\n }\n }, [deleteAllEntriesMutation, getCurrentRundownData]);\n\n /**\n * Calls mutation to apply a delay\n * @private\n */\n const { mutateAsync: applyDelayMutation } = useMutation({\n mutationFn: ([rundownId, delayId]: Parameters<typeof requestApplyDelay>) => requestApplyDelay(rundownId, delayId),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSuccess: (response) => {\n if (!response.data) return;\n\n const { id, title, order, flatOrder, entries, revision } = response.data;\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id,\n title,\n order,\n flatOrder,\n entries,\n revision,\n });\n },\n // Mutation finished, failed or successful\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Applies a given delay\n */\n const applyDelay = useCallback(\n async (delayEventId: EntryId) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await applyDelayMutation([rundownId, delayEventId]);\n } catch (error) {\n logAxiosError('Error applying delay', error);\n }\n },\n [applyDelayMutation, getCurrentRundownData],\n );\n\n /**\n * Calls mutation to dissolve a group\n * @private\n */\n const { mutateAsync: ungroupMutation } = useMutation({\n mutationFn: ([rundownId, groupId]: Parameters<typeof requestUngroup>) => requestUngroup(rundownId, groupId),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSuccess: (response) => {\n if (!response.data) return;\n\n const { id, title, order, flatOrder, entries, revision } = response.data;\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id,\n title,\n order,\n flatOrder,\n entries,\n revision,\n });\n },\n onSettled: () => queryClient.invalidateQueries({ queryKey: RUNDOWN }),\n });\n\n /**\n * Deletes a group and moves its events to the top level\n */\n const ungroup = useCallback(\n async (groupId: EntryId) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await ungroupMutation([rundownId, groupId]);\n } catch (error) {\n logAxiosError('Error dissolving group', error);\n }\n },\n [getCurrentRundownData, ungroupMutation],\n );\n\n /**\n * Calls mutation to create a group with a selection\n * @private\n */\n const { mutateAsync: groupEntriesMutation } = useMutation({\n mutationFn: ([rundownId, entryIds]: Parameters<typeof requestGroupEntries>) =>\n requestGroupEntries(rundownId, entryIds),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSuccess: (response) => {\n if (!response.data) return;\n\n const { id, title, order, flatOrder, entries, revision } = response.data;\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id,\n title,\n order,\n flatOrder,\n entries,\n revision,\n });\n },\n onSettled: () => queryClient.invalidateQueries({ queryKey: RUNDOWN }),\n });\n\n /**\n * Create a group with a selection\n */\n const groupEntries = useCallback(\n async (entryIds: EntryId[]) => {\n if (entryIds.length === 0) return;\n\n try {\n const rundownData = getCurrentRundownData();\n const rundownId = rundownData?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n if (entryIds.length === 1) {\n await groupEntriesMutation([rundownId, entryIds]);\n } else {\n // the user selection may be out of order\n const orderedIds = orderEntries(entryIds, rundownData.flatOrder);\n await groupEntriesMutation([rundownId, orderedIds]);\n }\n } catch (error) {\n logAxiosError('Error grouping entries', error);\n }\n },\n [getCurrentRundownData, groupEntriesMutation],\n );\n\n /**\n * Calls mutation to reorder an entry\n * @private\n */\n const { mutateAsync: reorderEntryMutation } = useMutation({\n mutationFn: ([rundownId, data]: Parameters<typeof patchReorderEntry>) => patchReorderEntry(rundownId, data),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Reorders a given entry one step up or down in the timeline\n */\n const move = useCallback(\n async (entryId: EntryId, direction: 'up' | 'down') => {\n try {\n const rundownData = getCurrentRundownData();\n const rundownId = rundownData?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n const { destinationId, order } =\n direction === 'up'\n ? moveUp(entryId, rundownData.flatOrder, rundownData.entries)\n : moveDown(entryId, rundownData.flatOrder, rundownData.entries);\n\n if (!destinationId) {\n return; // noop\n }\n\n const reorderObject: ReorderEntry = {\n entryId,\n destinationId,\n order,\n };\n await reorderEntryMutation([rundownId, reorderObject]);\n // the rundown needs to know whether we moved into a group\n return rundownData.entries[destinationId]?.type === SupportedEntry.Group ? destinationId : undefined;\n } catch (error) {\n logAxiosError('Error re-ordering event', error);\n }\n return undefined;\n },\n [getCurrentRundownData, reorderEntryMutation],\n );\n /**\n * Reorders a given entry\n */\n const reorderEntry = useCallback(\n async (entryId: EntryId, destinationId: EntryId, order: 'before' | 'after' | 'insert') => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await reorderEntryMutation([\n rundownId,\n {\n entryId,\n destinationId,\n order,\n },\n ]);\n } catch (error) {\n logAxiosError('Error re-ordering event', error);\n throw error; // rethrow to handle in the component\n }\n },\n [getCurrentRundownData, reorderEntryMutation],\n );\n\n /**\n * Calls mutation to swap events\n * @private\n */\n const { mutateAsync: swapEventsMutation } = useMutation({\n mutationFn: ([rundownId, from, to]: Parameters<typeof requestEventSwap>) => requestEventSwap(rundownId, from, to),\n // we optimistically update here\n onMutate: async ([_rundownId, from, to]) => {\n // cancel ongoing queries\n await queryClient.cancelQueries({ queryKey: RUNDOWN });\n\n // Snapshot the previous value\n const previousData = queryClient.getQueryData<Rundown>(RUNDOWN);\n if (previousData) {\n // optimistically update object\n const newRundown = { ...previousData.entries };\n const eventA = previousData.entries[from];\n const eventB = previousData.entries[to];\n\n if (!isOntimeEvent(eventA) || !isOntimeEvent(eventB)) {\n return;\n }\n\n const [newA, newB] = swapEventData(eventA, eventB);\n newRundown[from] = newA;\n newRundown[to] = newB;\n\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id: previousData.id,\n title: previousData.title,\n order: previousData.order,\n flatOrder: previousData.flatOrder,\n entries: newRundown,\n revision: -1,\n });\n }\n\n // Return a context with the previous events\n return { previousData };\n },\n\n // Mutation fails, rollback undoes optimist update\n onError: (_error, _eventId, context) => {\n queryClient.setQueryData<Rundown>(RUNDOWN, context?.previousData);\n },\n // Mutation finished, failed or successful\n // Fetch anyway, just to be sure\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Swaps the schedule of two events\n */\n const swapEvents = useCallback(\n async (from: EntryId, to: EntryId) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await swapEventsMutation([rundownId, from, to]);\n } catch (error) {\n logAxiosError('Error re-ordering event', error);\n }\n },\n [getCurrentRundownData, swapEventsMutation],\n );\n\n return {\n addEntry,\n applyDelay,\n batchUpdateEvents,\n clone,\n deleteEntry,\n deleteAllEntries,\n ungroup,\n getEntryById,\n groupEntries,\n move,\n reorderEntry,\n swapEvents,\n updateEntry,\n updateTimer,\n };\n};\n\n/**\n * Utility to optimistically delete entries from client cache\n */\nfunction optimisticDeleteEntries(entryIds: EntryId[], rundown: Rundown) {\n const entries = { ...rundown.entries };\n let order = [...rundown.order];\n let flatOrder = [...rundown.flatOrder];\n\n for (let i = 0; i < entryIds.length; i++) {\n const entry = entries[entryIds[i]];\n deleteEntry(entry);\n }\n\n function deleteEntry(entry: OntimeEntry) {\n if (isOntimeGroup(entry) || !entry.parent) {\n order = order.filter((id) => id !== entry.id);\n } else {\n const parent = entries[entry.parent];\n if (parent && isOntimeGroup(parent)) {\n parent.entries = parent.entries.filter((parentEntry) => parentEntry !== entry.id);\n }\n }\n\n delete entries[entry.id];\n flatOrder = flatOrder.filter((id) => id !== entry.id);\n }\n\n return { entries, order, flatOrder };\n}\n","import { MaybeNumber } from 'ontime-types';\nimport { formatFromMillis, MILLIS_PER_HOUR, MILLIS_PER_MINUTE } from 'ontime-utils';\n\n/**\n * Parses a value in millis to a string which encodes a delay\n * @param millis\n * @param format\n */\nexport function millisToDelayString(millis: MaybeNumber, format: 'compact' | 'expanded' = 'compact'): string {\n if (millis == null || millis === 0) {\n return '';\n }\n\n const isNegative = millis < 0;\n const absMillis = Math.abs(millis);\n const isCompact = format === 'compact';\n const delayed = isCompact ? '+' : 'delayed by ';\n const ahead = isCompact ? '-' : 'ahead by ';\n\n if (absMillis < MILLIS_PER_MINUTE) {\n return `${isNegative ? ahead : delayed}${formatFromMillis(absMillis, 's')} sec`;\n } else if (absMillis < MILLIS_PER_HOUR && absMillis % MILLIS_PER_MINUTE === 0) {\n return `${isNegative ? ahead : delayed}${formatFromMillis(absMillis, 'm')} min`;\n }\n\n return `${isNegative ? ahead : delayed}${formatFromMillis(absMillis, 'HH:mm:ss')}`;\n}\n"],"names":["makeSortableList","order","entries","flatIds","i","entry","isOntimeGroup","canDrop","targetType","targetParent","isTargetCollapsed","moveUp","entryId","flatOrder","currentEntry","currentIndex","previousEntryId","previousEntry","currentEntryParent","isOntimeEvent","moveDown","nextEntryId","parentGroup","afterGroupIndex","afterGroupId","nextEntry","orderEntries","unorderedArray","orderedArray","id","useEntryActions","queryClient","useQueryClient","linkPrevious","defaultTimeStrategy","defaultDuration","defaultWarnTime","defaultDangerTime","defaultTimerType","defaultEndAction","useEditorSettings","getCurrentRundownData","useCallback","RUNDOWN","getEntryById","eventId","cachedRundown","addEntryMutation","useMutation","rundownId","postAddEntry","addEntry","options","rundownData","newEntry","generateId","previousEvent","parseUserTime","error","logAxiosError","cloneEntryMutation","postCloneEntry","clone","_a","updateEntryMutation","newEvent","putEditEntry","_rundownId","previousData","newRundown","_error","_newEvent","context","updateEntry","updateTimer","field","value","lockOnUpdate","TimeStrategy","calculateNewValue","newValMillis","getPreviousEnd","remainingString","dayInMs","MILLIS_PER_SECOND","index","previousEnd","event","batchUpdateEventsMutation","data","putBatchEditEvents","previousRundown","eventIds","response","title","revision","batchUpdateEvents","deleteEntryMutation","entryIds","deleteEntries","optimisticDeleteEntries","_entryIds","deleteEntry","deleteAllEntriesMutation","requestDeleteAll","_","deleteAllEntries","applyDelayMutation","delayId","requestApplyDelay","applyDelay","delayEventId","ungroupMutation","groupId","requestUngroup","ungroup","groupEntriesMutation","requestGroupEntries","groupEntries","orderedIds","reorderEntryMutation","patchReorderEntry","move","direction","destinationId","SupportedEntry","reorderEntry","swapEventsMutation","from","to","requestEventSwap","eventA","eventB","newA","newB","swapEventData","_eventId","swapEvents","rundown","parent","parentEntry","millisToDelayString","millis","format","isNegative","absMillis","isCompact","delayed","ahead","MILLIS_PER_MINUTE","formatFromMillis","MILLIS_PER_HOUR"],"mappings":"00BAQgB,SAAAA,GAAiBC,EAAkBC,EAAoC,CACrF,MAAMC,EAAqB,CAAC,EAE5B,QAASC,EAAI,EAAGA,EAAIH,EAAM,OAAQG,IAAK,CACrC,MAAMC,EAAQH,EAAQD,EAAMG,CAAC,CAAC,EAEzBC,IAIDC,EAAcD,CAAK,GAGbF,EAAA,KAAKE,EAAM,EAAE,EACbF,EAAA,KAAK,GAAGE,EAAM,OAAO,EAG7BF,EAAQ,KAAK,OAAOE,EAAM,EAAE,EAAE,GAEtBF,EAAA,KAAKE,EAAM,EAAE,EACvB,CAEK,OAAAF,CACT,CAMO,SAASI,GACdC,EACAC,EACAR,EACAS,EACS,CAET,OAAIF,IAAe,YACVP,IAAU,QAKfO,IAAe,QACb,EAAAP,IAAU,QAAaA,IAAU,SAAW,CAACS,GAO5CD,IAAiB,IAC1B,CAWgB,SAAAE,GACdC,EACAC,EACAX,EACyE,CACnE,MAAAY,EAAeZ,EAAQU,CAAO,EAC9BG,EAAeF,EAAU,QAAQD,CAAO,EACxCI,EAAkBH,EAAUE,EAAe,CAAC,EAGlD,GAAI,CAACC,EAEH,MAAI,WAAYF,GAAgBA,EAAa,SAAW,KAC/C,CAAE,cAAeA,EAAa,OAAQ,MAAO,QAAS,EAGxD,CAAE,cAAe,KAAM,MAAO,QAAS,EAI5C,GAAAR,EAAcQ,CAAY,EAAG,CAEzBG,MAAAA,EAAgBf,EAAQc,CAAe,EAC7C,MAAI,WAAYC,GAAiBA,EAAc,SAAW,KACjD,CAAE,cAAeA,EAAc,OAAQ,MAAO,QAAS,EAIzD,CAAE,cAAeD,EAAiB,MAAO,QAAS,CAAA,CAGrD,MAAAC,EAAgBf,EAAQc,CAAe,EACvCE,EAAqBJ,EAAa,OAGpC,OAAAR,EAAcW,CAAa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,MAAA,CAAE,QAAAH,EAAS,MAAAD,EAAO,UAAAY,CAAU,CACrC,CC92BgB,SAAAgI,GAAoBC,EAAqBC,EAAiC,UAAmB,CACvG,GAAAD,GAAU,MAAQA,IAAW,EACxB,MAAA,GAGT,MAAME,EAAaF,EAAS,EACtBG,EAAY,KAAK,IAAIH,CAAM,EAC3BI,EAAYH,IAAW,UACvBI,EAAUD,EAAY,IAAM,cAC5BE,EAAQF,EAAY,IAAM,YAEhC,OAAID,EAAYI,EACP,GAAGL,EAAaI,EAAQD,CAAO,GAAGG,EAAiBL,EAAW,GAAG,CAAC,OAChEA,EAAYM,IAAmBN,EAAYI,IAAsB,EACnE,GAAGL,EAAaI,EAAQD,CAAO,GAAGG,EAAiBL,EAAW,GAAG,CAAC,OAGpE,GAAGD,EAAaI,EAAQD,CAAO,GAAGG,EAAiBL,EAAW,UAAU,CAAC,EAClF"}
1
+ {"version":3,"file":"dateConfig-_BhycZza.js","sources":["../../src/features/rundown/rundown.utils.ts","../../src/common/hooks/useEntryAction.ts","../../src/common/utils/dateConfig.ts"],"sourcesContent":["import { EntryId, isOntimeEvent, isOntimeGroup, RundownEntries, SupportedEntry } from 'ontime-types';\n\n/**\n * Creates a sortable list of entries\n * ------------------------------------\n * Due to limitations in dnd-kit we need to flatten the list of entries\n * This list should also be aware of any elements that are sortable (ie: group ends)\n */\nexport function makeSortableList(order: EntryId[], entries: RundownEntries): EntryId[] {\n const flatIds: EntryId[] = [];\n\n for (let i = 0; i < order.length; i++) {\n const entry = entries[order[i]];\n\n if (!entry) {\n continue;\n }\n\n if (isOntimeGroup(entry)) {\n // inside a group there are delays and events\n // there is no need for special handling\n flatIds.push(entry.id);\n flatIds.push(...entry.entries);\n\n // close the group\n flatIds.push(`end-${entry.id}`);\n } else {\n flatIds.push(entry.id);\n }\n }\n return flatIds;\n}\n\n/**\n * Checks whether a drop operation is valid\n * Currently only used for validating dropping groups\n */\nexport function canDrop(\n targetType: SupportedEntry | 'end-group',\n targetParent: EntryId | null,\n order?: 'after' | 'before',\n isTargetCollapsed?: boolean,\n): boolean {\n // inserting before would mean adding a group inside another\n if (targetType === 'end-group') {\n return order === 'after';\n }\n\n // this means swapping places with another group\n // !!! if the user is dragging down, they could be inserting into a group depending on whether the group is collapsed\n if (targetType === 'group') {\n if (order !== undefined && order === 'after' && !isTargetCollapsed) {\n return false;\n }\n return true;\n }\n\n // for all other cases, we just need to check if we are inside a group\n return targetParent === null;\n}\n\n/**\n * calculates destinations for an entry moving one position up in the rundown\n * @returns An object describing how to move the entry:\n * - destinationId: The target entry ID (null if no movement possible)\n * - order: How to position relative to the destination:\n * - 'before': Place before the destination\n * - 'after': Place after the destination\n * - 'insert': Insert into the destination (for groups)\n */\nexport function moveUp(\n entryId: EntryId,\n flatOrder: EntryId[],\n entries: RundownEntries,\n): { destinationId: EntryId | null; order: 'before' | 'after' | 'insert' } {\n const currentEntry = entries[entryId];\n const currentIndex = flatOrder.indexOf(entryId);\n const previousEntryId = flatOrder[currentIndex - 1];\n\n // 1. moving at the top of the list\n if (!previousEntryId) {\n // 1a. we are in a group and need to move outside of it\n if ('parent' in currentEntry && currentEntry.parent !== null) {\n return { destinationId: currentEntry.parent, order: 'before' };\n }\n // 1b. we are at the start of the rundown, no movement possible\n return { destinationId: null, order: 'before' };\n }\n\n // 2. moving a group (always moves at top level)\n if (isOntimeGroup(currentEntry)) {\n // 21. if previous entry is inside a group, swap with parent\n const previousEntry = entries[previousEntryId];\n if ('parent' in previousEntry && previousEntry.parent !== null) {\n return { destinationId: previousEntry.parent, order: 'before' };\n }\n\n // 2b. previous entry is at top level, we just swap places\n return { destinationId: previousEntryId, order: 'before' };\n }\n\n const previousEntry = entries[previousEntryId];\n const currentEntryParent = currentEntry.parent;\n\n // 3. moving in and out of a group\n if (isOntimeGroup(previousEntry)) {\n // 3a. if we're not already in the group, move into it\n if (currentEntryParent === null) {\n return { destinationId: previousEntryId, order: 'insert' };\n }\n // 3b. otherwise, move before the group\n return { destinationId: previousEntryId, order: 'before' };\n }\n\n // 4. moving into the same group as previous entry\n if (isOntimeEvent(previousEntry) && previousEntry.parent !== null && currentEntryParent === null) {\n return { destinationId: previousEntryId, order: 'after' };\n }\n\n // default - swap positions with previous entry\n return { destinationId: previousEntryId, order: 'before' };\n}\n\n/**\n * calculates destinations for an entry moving one position down in the rundown\n * @returns An object describing how to move the entry:\n * - destinationId: The target entry ID (null if no movement possible)\n * - order: How to position relative to the destination:\n * - 'before': Place before the destination\n * - 'after': Place after the destination\n * - 'insert': Insert into the destination (for groups)\n */\nexport function moveDown(\n entryId: EntryId,\n flatOrder: EntryId[],\n entries: RundownEntries,\n): { destinationId: EntryId | null; order: 'before' | 'after' | 'insert' } {\n const currentEntry = entries[entryId];\n const currentIndex = flatOrder.indexOf(entryId);\n const nextEntryId = flatOrder[currentIndex + 1];\n\n // 1. check if we're the last entry in a group\n if ('parent' in currentEntry && currentEntry.parent !== null) {\n const parentGroup = entries[currentEntry.parent];\n if (isOntimeGroup(parentGroup) && parentGroup.entries[parentGroup.entries.length - 1] === entryId) {\n return { destinationId: currentEntry.parent, order: 'after' };\n }\n }\n\n // 2. moving at the end of the list\n if (!nextEntryId) {\n return { destinationId: null, order: 'after' };\n }\n\n // 3. moving a group (always moves at top level)\n if (isOntimeGroup(currentEntry)) {\n // if next entry is inside this group, skip past all children\n if (currentEntry.entries.includes(nextEntryId)) {\n const afterGroupIndex = currentIndex + currentEntry.entries.length + 1;\n const afterGroupId = flatOrder[afterGroupIndex];\n\n // 2a. group is the last top level entry\n if (!afterGroupId) {\n return { destinationId: null, order: 'after' };\n }\n // 2b. move after the next top level event\n return { destinationId: afterGroupId, order: 'after' };\n }\n // 2c. empty group move after the next entry\n return { destinationId: nextEntryId, order: 'after' };\n }\n\n const nextEntry = entries[nextEntryId];\n const currentEntryParent = currentEntry.parent;\n\n // 4. handle moving relative to groups\n if (isOntimeGroup(nextEntry)) {\n if (currentEntryParent === null) {\n // we are entering a group\n if (nextEntry.entries.length === 0) {\n // 3a. if the group is empty, insert into it\n return { destinationId: nextEntryId, order: 'insert' };\n }\n // 3b. otherwise, add before the first entry in the group\n const firstGroupEntryId = nextEntry.entries[0];\n return { destinationId: firstGroupEntryId, order: 'before' };\n }\n }\n\n // 5. handle moving between group and top level\n const nextEntryParent = isOntimeEvent(nextEntry) ? nextEntry.parent : null;\n if (nextEntryParent !== null && currentEntryParent === null) {\n return { destinationId: nextEntryId, order: 'after' };\n }\n\n // default - swap positions with next entry\n return { destinationId: nextEntryId, order: 'after' };\n}\n\n/**\n * Reorders unorderedArray to match the flatOrder entries\n * Useful for operations that convert selections (out of order) to rundown\n */\nexport function orderEntries(unorderedArray: EntryId[], flatOrder: EntryId[]): EntryId[] {\n const orderedArray: EntryId[] = [];\n for (const id of flatOrder) {\n if (unorderedArray.includes(id)) {\n orderedArray.push(id);\n }\n }\n return orderedArray;\n}\n","import { useCallback } from 'react';\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport {\n EntryId,\n isOntimeEvent,\n isOntimeGroup,\n MaybeString,\n OntimeEntry,\n OntimeEvent,\n Rundown,\n SupportedEntry,\n TimeField,\n TimeStrategy,\n TransientEventPayload,\n} from 'ontime-types';\nimport { dayInMs, generateId, MILLIS_PER_SECOND, parseUserTime, swapEventData } from 'ontime-utils';\n\nimport { moveDown, moveUp, orderEntries } from '../../features/rundown/rundown.utils';\nimport { RUNDOWN } from '../api/constants';\nimport {\n deleteEntries,\n patchReorderEntry,\n postAddEntry,\n postCloneEntry,\n putBatchEditEvents,\n putEditEntry,\n ReorderEntry,\n requestApplyDelay,\n requestDeleteAll,\n requestEventSwap,\n requestGroupEntries,\n requestUngroup,\n} from '../api/rundown';\nimport { logAxiosError } from '../api/utils';\nimport { useEditorSettings } from '../stores/editorSettings';\n\nexport type EventOptions = Partial<{\n // options of any new entries (event / delay / group)\n after: MaybeString;\n before: MaybeString;\n // options of entries of type OntimeEvent\n linkPrevious: boolean;\n lastEventId: MaybeString;\n}>;\n\n/**\n * Gather utilities for actions on entries\n */\nexport const useEntryActions = () => {\n const queryClient = useQueryClient();\n const {\n linkPrevious,\n defaultTimeStrategy,\n defaultDuration,\n defaultWarnTime,\n defaultDangerTime,\n defaultTimerType,\n defaultEndAction,\n } = useEditorSettings();\n\n /**\n * Returns the currently loaded rundown\n */\n const getCurrentRundownData = useCallback(() => {\n return queryClient.getQueryData<Rundown>(RUNDOWN);\n }, [queryClient]);\n\n /**\n * Looks for an entry with a given ID in the currently loaded rundown\n */\n const getEntryById = useCallback(\n (eventId: EntryId): OntimeEntry | undefined => {\n const cachedRundown = getCurrentRundownData();\n if (!cachedRundown?.entries) {\n return;\n }\n return cachedRundown.entries[eventId];\n },\n [getCurrentRundownData],\n );\n\n /**\n * Calls mutation to add new entry\n * @private\n */\n const { mutateAsync: addEntryMutation } = useMutation({\n mutationFn: ([rundownId, entry]: Parameters<typeof postAddEntry>) => postAddEntry(rundownId, entry),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSettled: () => queryClient.invalidateQueries({ queryKey: RUNDOWN }),\n });\n\n /**\n * Adds an entry to rundown\n */\n const addEntry = useCallback(\n async (entry: Partial<OntimeEntry>, options?: EventOptions) => {\n const rundownData = getCurrentRundownData();\n const rundownId = rundownData?.id;\n\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n const newEntry: TransientEventPayload = { ...entry, id: generateId() };\n\n // ************* CHECK OPTIONS specific to events\n if (isOntimeEvent(newEntry)) {\n if (options?.lastEventId) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- we know this is a value\n const previousEvent = rundownData.entries[options?.lastEventId];\n if (isOntimeEvent(previousEvent)) {\n newEntry.timeStart = previousEvent.timeEnd;\n }\n }\n\n // Override event with options from editor settings\n newEntry.linkStart = options?.linkPrevious ?? linkPrevious;\n\n if (newEntry.duration === undefined && newEntry.timeEnd === undefined) {\n newEntry.duration = parseUserTime(defaultDuration);\n }\n\n if (newEntry.timeDanger === undefined) {\n newEntry.timeDanger = parseUserTime(defaultDangerTime);\n }\n\n if (newEntry.timeWarning === undefined) {\n newEntry.timeWarning = parseUserTime(defaultWarnTime);\n }\n\n if (newEntry.timerType === undefined) {\n newEntry.timerType = defaultTimerType;\n }\n\n if (newEntry.endAction === undefined) {\n newEntry.endAction = defaultEndAction;\n }\n\n if (newEntry.timeStrategy === undefined) {\n newEntry.timeStrategy = defaultTimeStrategy;\n }\n }\n\n // handle adding options that concern all event type\n if (options?.after) {\n (newEntry as TransientEventPayload).after = options.after;\n }\n if (options?.before) {\n (newEntry as TransientEventPayload).before = options.before;\n }\n\n try {\n await addEntryMutation([rundownId, newEntry]);\n } catch (error) {\n logAxiosError('Failed adding event', error);\n }\n },\n [\n getCurrentRundownData,\n linkPrevious,\n defaultDuration,\n defaultDangerTime,\n defaultWarnTime,\n defaultTimerType,\n defaultEndAction,\n defaultTimeStrategy,\n addEntryMutation,\n ],\n );\n\n /**\n * Calls mutation to clone a selection\n * @private\n */\n const { mutateAsync: cloneEntryMutation } = useMutation({\n mutationFn: ([rundownId, entryId]: Parameters<typeof postCloneEntry>) => postCloneEntry(rundownId, entryId),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSettled: () => queryClient.invalidateQueries({ queryKey: RUNDOWN }),\n });\n\n /**\n * Clone an entry\n */\n const clone = useCallback(\n async (entryId: EntryId) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await cloneEntryMutation([rundownId, entryId]);\n } catch (error) {\n logAxiosError('Error cloning entry', error);\n }\n },\n [cloneEntryMutation, getCurrentRundownData],\n );\n\n /**\n * Calls mutation to update existing entry\n * @private\n */\n const { mutateAsync: updateEntryMutation } = useMutation({\n mutationFn: ([rundownId, newEvent]: Parameters<typeof putEditEntry>) => putEditEntry(rundownId, newEvent),\n // we optimistically update here\n onMutate: async ([_rundownId, newEvent]) => {\n // cancel ongoing queries\n await queryClient.cancelQueries({ queryKey: RUNDOWN });\n\n // Snapshot the previous value\n const previousData = queryClient.getQueryData<Rundown>(RUNDOWN);\n const eventId = newEvent.id;\n\n if (previousData && eventId) {\n // optimistically update object\n const newRundown = { ...previousData.entries };\n // @ts-expect-error -- we expect the events to be of same type\n newRundown[eventId] = { ...newRundown[eventId], ...newEvent };\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id: previousData.id,\n title: previousData.title,\n order: previousData.order,\n flatOrder: previousData.flatOrder,\n entries: newRundown,\n revision: -1,\n });\n }\n\n // Return a context with the previous and new events\n return { previousData, newEvent };\n },\n // Mutation fails, rollback undoes optimist update\n onError: (_error, _newEvent, context) => {\n if (context?.previousData) {\n queryClient.setQueryData<Rundown>(RUNDOWN, context?.previousData);\n }\n },\n // Mutation finished, failed or successful\n // Fetch anyway, just to be sure\n onSettled: async () => {\n await queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Updates existing entry\n */\n const updateEntry = useCallback(\n async (entry: Partial<OntimeEntry>) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await updateEntryMutation([rundownId, entry]);\n } catch (error) {\n logAxiosError('Error updating event', error);\n }\n },\n [getCurrentRundownData, updateEntryMutation],\n );\n\n /**\n * Updates time of existing event\n * @param eventId {EntryId} - id of the event\n * @param field {TimeField} - field to update\n * @param value {string} - new value string to be parsed\n * @param lockOnUpdate {boolean} - whether we will apply the lock / release on update\n */\n const updateTimer = useCallback(\n async (eventId: EntryId, field: TimeField, value: string, lockOnUpdate?: boolean) => {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n // an empty value with no lock has no domain validity\n if (!lockOnUpdate && value === '') {\n return;\n }\n\n const newEvent: Partial<OntimeEvent> = {\n id: eventId,\n };\n\n // check if we should lock the field\n if (lockOnUpdate) {\n if (field === 'timeEnd') {\n // an empty value indicates that we should unlock the field\n newEvent.timeStrategy = value === '' ? TimeStrategy.LockDuration : TimeStrategy.LockEnd;\n newEvent.timeEnd = value === '' ? undefined : calculateNewValue();\n } else if (field === 'duration') {\n // an empty value indicates that we should unlock the field\n newEvent.timeStrategy = value === '' ? TimeStrategy.LockEnd : TimeStrategy.LockDuration;\n newEvent.duration = value === '' ? undefined : calculateNewValue();\n } else if (field === 'timeStart') {\n // an empty values means we should link to the previous\n newEvent.linkStart = value === '';\n newEvent.timeStart = value === '' ? undefined : calculateNewValue();\n }\n } else {\n newEvent[field] = calculateNewValue();\n }\n\n try {\n await updateEntryMutation([rundownId, newEvent]);\n } catch (error) {\n logAxiosError('Error updating event', error);\n }\n\n /**\n * Utility function to calculate the new time value\n */\n function calculateNewValue(): number {\n let newValMillis = 0;\n\n // check for previous keyword\n if (value === 'p' || value === 'prev' || value === 'previous') {\n newValMillis = getPreviousEnd();\n\n // check for adding time keyword\n } else if (value.startsWith('+') || value.startsWith('p+') || value.startsWith('p +')) {\n // TODO: is this logic solid?\n const remainingString = value.substring(1);\n newValMillis = getPreviousEnd() + parseUserTime(remainingString);\n } else {\n newValMillis = parseUserTime(value);\n }\n // dont allow timer values over 23:59:59\n return Math.min(newValMillis, dayInMs - MILLIS_PER_SECOND);\n }\n\n /**\n * Utility function to get the previous event end time\n */\n function getPreviousEnd(): number {\n const cachedRundown = queryClient.getQueryData<Rundown>(RUNDOWN);\n\n if (!cachedRundown?.order || !cachedRundown?.entries) {\n return 0;\n }\n\n const index = cachedRundown.order.indexOf(eventId);\n if (index === 0) {\n return 0;\n }\n let previousEnd = 0;\n for (let i = index - 1; i >= 0; i--) {\n const event = cachedRundown.entries[cachedRundown.order[i]];\n if (isOntimeEvent(event)) {\n previousEnd = event.timeEnd;\n break;\n }\n }\n return previousEnd;\n }\n },\n [getCurrentRundownData, updateEntryMutation, queryClient],\n );\n\n /**\n * Calls mutation to edit multiple events\n * @private\n */\n const { mutateAsync: batchUpdateEventsMutation } = useMutation({\n mutationFn: ([rundownId, data]: Parameters<typeof putBatchEditEvents>) => putBatchEditEvents(rundownId, data),\n onMutate: async ([_rundownId, data]) => {\n // cancel ongoing queries\n await queryClient.cancelQueries({ queryKey: RUNDOWN });\n\n // Snapshot the previous value\n const previousRundown = queryClient.getQueryData<Rundown>(RUNDOWN);\n\n if (previousRundown) {\n const eventIds = new Set(data.ids);\n const newRundown = { ...previousRundown.entries };\n\n eventIds.forEach((eventId) => {\n if (Object.hasOwn(newRundown, eventId)) {\n const event = newRundown[eventId];\n if (isOntimeEvent(event)) {\n newRundown[eventId] = {\n ...event,\n ...data,\n };\n }\n }\n });\n\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id: previousRundown.id,\n title: previousRundown.title,\n order: previousRundown.order,\n flatOrder: previousRundown.flatOrder,\n entries: newRundown,\n revision: -1,\n });\n }\n\n // Return a context with the previous rundown\n return { previousRundown };\n },\n onSuccess: (response) => {\n if (!response.data) return;\n\n const { id, title, order, flatOrder, entries, revision } = response.data;\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id,\n title,\n order,\n flatOrder,\n entries,\n revision,\n });\n },\n onError: (_error, _newEvent, context) => {\n queryClient.setQueryData<Rundown>(RUNDOWN, context?.previousRundown);\n },\n });\n\n const batchUpdateEvents = useCallback(\n async (data: Partial<OntimeEvent>, eventIds: EntryId[]) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await batchUpdateEventsMutation([rundownId, { data, ids: eventIds }]);\n } catch (error) {\n logAxiosError('Error updating events', error);\n }\n },\n [batchUpdateEventsMutation, getCurrentRundownData],\n );\n\n /**\n * Calls mutation to delete an entry\n * @private\n */\n const { mutateAsync: deleteEntryMutation } = useMutation({\n mutationFn: ([rundownId, entryIds]: Parameters<typeof deleteEntries>) => deleteEntries(rundownId, entryIds),\n // we optimistically update here\n onMutate: async ([_rundownId, entryIds]) => {\n // cancel ongoing queries\n await queryClient.cancelQueries({ queryKey: RUNDOWN });\n\n // Snapshot the previous value\n const previousData = queryClient.getQueryData<Rundown>(RUNDOWN);\n\n if (previousData) {\n // optimistically update object\n const { entries, order, flatOrder } = optimisticDeleteEntries(entryIds, previousData);\n\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id: previousData.id,\n title: previousData.title,\n order,\n flatOrder,\n entries,\n revision: -1,\n });\n }\n\n // Return a context with the previous and new events\n return { previousData };\n },\n\n // Mutation fails, rollback undoes optimist update\n onError: (_error, _entryIds, context) => {\n queryClient.setQueryData<Rundown>(RUNDOWN, context?.previousData);\n },\n // Mutation finished, failed or successful\n // Fetch anyway, just to be sure\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Deletes an event entry from the rundown\n */\n const deleteEntry = useCallback(\n async (entryIds: EntryId[]) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await deleteEntryMutation([rundownId, entryIds]);\n } catch (error) {\n logAxiosError('Error deleting event', error);\n }\n },\n [deleteEntryMutation, getCurrentRundownData],\n );\n\n /**\n * Calls mutation to delete all events\n * @private\n */\n const { mutateAsync: deleteAllEntriesMutation } = useMutation({\n mutationFn: ([rundownId]: Parameters<typeof requestDeleteAll>) => requestDeleteAll(rundownId),\n // we optimistically update here\n onMutate: async () => {\n // cancel ongoing queries\n await queryClient.cancelQueries({ queryKey: RUNDOWN });\n\n // Snapshot the previous value\n const previousData = queryClient.getQueryData<Rundown>(RUNDOWN);\n\n // optimistically update object\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id: previousData?.id ?? 'default',\n title: previousData?.title ?? '',\n order: [],\n flatOrder: [],\n entries: {},\n revision: -1,\n });\n\n // Return a context with the previous and new events\n return { previousData };\n },\n\n // Mutation fails, rollback optimist update\n onError: (_error, _, context) => {\n queryClient.setQueryData<Rundown>(RUNDOWN, context?.previousData);\n },\n // Mutation finished, failed or successful\n // Fetch anyway, just to be sure\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Deletes all entries in the rundown\n */\n const deleteAllEntries = useCallback(async () => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await deleteAllEntriesMutation([rundownId]);\n } catch (error) {\n logAxiosError('Error deleting events', error);\n }\n }, [deleteAllEntriesMutation, getCurrentRundownData]);\n\n /**\n * Calls mutation to apply a delay\n * @private\n */\n const { mutateAsync: applyDelayMutation } = useMutation({\n mutationFn: ([rundownId, delayId]: Parameters<typeof requestApplyDelay>) => requestApplyDelay(rundownId, delayId),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSuccess: (response) => {\n if (!response.data) return;\n\n const { id, title, order, flatOrder, entries, revision } = response.data;\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id,\n title,\n order,\n flatOrder,\n entries,\n revision,\n });\n },\n // Mutation finished, failed or successful\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Applies a given delay\n */\n const applyDelay = useCallback(\n async (delayEventId: EntryId) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await applyDelayMutation([rundownId, delayEventId]);\n } catch (error) {\n logAxiosError('Error applying delay', error);\n }\n },\n [applyDelayMutation, getCurrentRundownData],\n );\n\n /**\n * Calls mutation to dissolve a group\n * @private\n */\n const { mutateAsync: ungroupMutation } = useMutation({\n mutationFn: ([rundownId, groupId]: Parameters<typeof requestUngroup>) => requestUngroup(rundownId, groupId),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSuccess: (response) => {\n if (!response.data) return;\n\n const { id, title, order, flatOrder, entries, revision } = response.data;\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id,\n title,\n order,\n flatOrder,\n entries,\n revision,\n });\n },\n onSettled: () => queryClient.invalidateQueries({ queryKey: RUNDOWN }),\n });\n\n /**\n * Deletes a group and moves its events to the top level\n */\n const ungroup = useCallback(\n async (groupId: EntryId) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await ungroupMutation([rundownId, groupId]);\n } catch (error) {\n logAxiosError('Error dissolving group', error);\n }\n },\n [getCurrentRundownData, ungroupMutation],\n );\n\n /**\n * Calls mutation to create a group with a selection\n * @private\n */\n const { mutateAsync: groupEntriesMutation } = useMutation({\n mutationFn: ([rundownId, entryIds]: Parameters<typeof requestGroupEntries>) =>\n requestGroupEntries(rundownId, entryIds),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSuccess: (response) => {\n if (!response.data) return;\n\n const { id, title, order, flatOrder, entries, revision } = response.data;\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id,\n title,\n order,\n flatOrder,\n entries,\n revision,\n });\n },\n onSettled: () => queryClient.invalidateQueries({ queryKey: RUNDOWN }),\n });\n\n /**\n * Create a group with a selection\n */\n const groupEntries = useCallback(\n async (entryIds: EntryId[]) => {\n if (entryIds.length === 0) return;\n\n try {\n const rundownData = getCurrentRundownData();\n const rundownId = rundownData?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n if (entryIds.length === 1) {\n await groupEntriesMutation([rundownId, entryIds]);\n } else {\n // the user selection may be out of order\n const orderedIds = orderEntries(entryIds, rundownData.flatOrder);\n await groupEntriesMutation([rundownId, orderedIds]);\n }\n } catch (error) {\n logAxiosError('Error grouping entries', error);\n }\n },\n [getCurrentRundownData, groupEntriesMutation],\n );\n\n /**\n * Calls mutation to reorder an entry\n * @private\n */\n const { mutateAsync: reorderEntryMutation } = useMutation({\n mutationFn: ([rundownId, data]: Parameters<typeof patchReorderEntry>) => patchReorderEntry(rundownId, data),\n onMutate: () => queryClient.cancelQueries({ queryKey: RUNDOWN }),\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Reorders a given entry one step up or down in the timeline\n */\n const move = useCallback(\n async (entryId: EntryId, direction: 'up' | 'down') => {\n try {\n const rundownData = getCurrentRundownData();\n const rundownId = rundownData?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n const { destinationId, order } =\n direction === 'up'\n ? moveUp(entryId, rundownData.flatOrder, rundownData.entries)\n : moveDown(entryId, rundownData.flatOrder, rundownData.entries);\n\n if (!destinationId) {\n return; // noop\n }\n\n const reorderObject: ReorderEntry = {\n entryId,\n destinationId,\n order,\n };\n await reorderEntryMutation([rundownId, reorderObject]);\n // the rundown needs to know whether we moved into a group\n return rundownData.entries[destinationId]?.type === SupportedEntry.Group ? destinationId : undefined;\n } catch (error) {\n logAxiosError('Error re-ordering event', error);\n }\n return undefined;\n },\n [getCurrentRundownData, reorderEntryMutation],\n );\n /**\n * Reorders a given entry\n */\n const reorderEntry = useCallback(\n async (entryId: EntryId, destinationId: EntryId, order: 'before' | 'after' | 'insert') => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await reorderEntryMutation([\n rundownId,\n {\n entryId,\n destinationId,\n order,\n },\n ]);\n } catch (error) {\n logAxiosError('Error re-ordering event', error);\n throw error; // rethrow to handle in the component\n }\n },\n [getCurrentRundownData, reorderEntryMutation],\n );\n\n /**\n * Calls mutation to swap events\n * @private\n */\n const { mutateAsync: swapEventsMutation } = useMutation({\n mutationFn: ([rundownId, from, to]: Parameters<typeof requestEventSwap>) => requestEventSwap(rundownId, from, to),\n // we optimistically update here\n onMutate: async ([_rundownId, from, to]) => {\n // cancel ongoing queries\n await queryClient.cancelQueries({ queryKey: RUNDOWN });\n\n // Snapshot the previous value\n const previousData = queryClient.getQueryData<Rundown>(RUNDOWN);\n if (previousData) {\n // optimistically update object\n const newRundown = { ...previousData.entries };\n const eventA = previousData.entries[from];\n const eventB = previousData.entries[to];\n\n if (!isOntimeEvent(eventA) || !isOntimeEvent(eventB)) {\n return;\n }\n\n const [newA, newB] = swapEventData(eventA, eventB);\n newRundown[from] = newA;\n newRundown[to] = newB;\n\n queryClient.setQueryData<Rundown>(RUNDOWN, {\n id: previousData.id,\n title: previousData.title,\n order: previousData.order,\n flatOrder: previousData.flatOrder,\n entries: newRundown,\n revision: -1,\n });\n }\n\n // Return a context with the previous events\n return { previousData };\n },\n\n // Mutation fails, rollback undoes optimist update\n onError: (_error, _eventId, context) => {\n queryClient.setQueryData<Rundown>(RUNDOWN, context?.previousData);\n },\n // Mutation finished, failed or successful\n // Fetch anyway, just to be sure\n onSettled: () => {\n queryClient.invalidateQueries({ queryKey: RUNDOWN });\n },\n });\n\n /**\n * Swaps the schedule of two events\n */\n const swapEvents = useCallback(\n async (from: EntryId, to: EntryId) => {\n try {\n const rundownId = getCurrentRundownData()?.id;\n if (!rundownId) {\n throw new Error('Rundown not initialised');\n }\n\n await swapEventsMutation([rundownId, from, to]);\n } catch (error) {\n logAxiosError('Error re-ordering event', error);\n }\n },\n [getCurrentRundownData, swapEventsMutation],\n );\n\n return {\n addEntry,\n applyDelay,\n batchUpdateEvents,\n clone,\n deleteEntry,\n deleteAllEntries,\n ungroup,\n getEntryById,\n groupEntries,\n move,\n reorderEntry,\n swapEvents,\n updateEntry,\n updateTimer,\n };\n};\n\n/**\n * Utility to optimistically delete entries from client cache\n */\nfunction optimisticDeleteEntries(entryIds: EntryId[], rundown: Rundown) {\n const entries = { ...rundown.entries };\n let order = [...rundown.order];\n let flatOrder = [...rundown.flatOrder];\n\n for (let i = 0; i < entryIds.length; i++) {\n const entry = entries[entryIds[i]];\n deleteEntry(entry);\n }\n\n function deleteEntry(entry: OntimeEntry) {\n if (isOntimeGroup(entry) || !entry.parent) {\n order = order.filter((id) => id !== entry.id);\n } else {\n const parent = entries[entry.parent];\n if (parent && isOntimeGroup(parent)) {\n parent.entries = parent.entries.filter((parentEntry) => parentEntry !== entry.id);\n }\n }\n\n delete entries[entry.id];\n flatOrder = flatOrder.filter((id) => id !== entry.id);\n }\n\n return { entries, order, flatOrder };\n}\n","import { MaybeNumber } from 'ontime-types';\nimport { formatFromMillis, MILLIS_PER_HOUR, MILLIS_PER_MINUTE } from 'ontime-utils';\n\n/**\n * Parses a value in millis to a string which encodes a delay\n * @param millis\n * @param format\n */\nexport function millisToDelayString(millis: MaybeNumber, format: 'compact' | 'expanded' = 'compact'): string {\n if (millis == null || millis === 0) {\n return '';\n }\n\n const isNegative = millis < 0;\n const absMillis = Math.abs(millis);\n const isCompact = format === 'compact';\n const delayed = isCompact ? '+' : 'delayed by ';\n const ahead = isCompact ? '-' : 'ahead by ';\n\n if (absMillis < MILLIS_PER_MINUTE) {\n return `${isNegative ? ahead : delayed}${formatFromMillis(absMillis, 's')} sec`;\n } else if (absMillis < MILLIS_PER_HOUR && absMillis % MILLIS_PER_MINUTE === 0) {\n return `${isNegative ? ahead : delayed}${formatFromMillis(absMillis, 'm')} min`;\n }\n\n return `${isNegative ? ahead : delayed}${formatFromMillis(absMillis, 'HH:mm:ss')}`;\n}\n"],"names":["makeSortableList","order","entries","flatIds","i","entry","isOntimeGroup","canDrop","targetType","targetParent","isTargetCollapsed","moveUp","entryId","flatOrder","currentEntry","currentIndex","previousEntryId","previousEntry","currentEntryParent","isOntimeEvent","moveDown","nextEntryId","parentGroup","afterGroupIndex","afterGroupId","nextEntry","orderEntries","unorderedArray","orderedArray","id","useEntryActions","queryClient","useQueryClient","linkPrevious","defaultTimeStrategy","defaultDuration","defaultWarnTime","defaultDangerTime","defaultTimerType","defaultEndAction","useEditorSettings","getCurrentRundownData","useCallback","RUNDOWN","getEntryById","eventId","cachedRundown","addEntryMutation","useMutation","rundownId","postAddEntry","addEntry","options","rundownData","newEntry","generateId","previousEvent","parseUserTime","error","logAxiosError","cloneEntryMutation","postCloneEntry","clone","_a","updateEntryMutation","newEvent","putEditEntry","_rundownId","previousData","newRundown","_error","_newEvent","context","updateEntry","updateTimer","field","value","lockOnUpdate","TimeStrategy","calculateNewValue","newValMillis","getPreviousEnd","remainingString","dayInMs","MILLIS_PER_SECOND","index","previousEnd","event","batchUpdateEventsMutation","data","putBatchEditEvents","previousRundown","eventIds","response","title","revision","batchUpdateEvents","deleteEntryMutation","entryIds","deleteEntries","optimisticDeleteEntries","_entryIds","deleteEntry","deleteAllEntriesMutation","requestDeleteAll","_","deleteAllEntries","applyDelayMutation","delayId","requestApplyDelay","applyDelay","delayEventId","ungroupMutation","groupId","requestUngroup","ungroup","groupEntriesMutation","requestGroupEntries","groupEntries","orderedIds","reorderEntryMutation","patchReorderEntry","move","direction","destinationId","SupportedEntry","reorderEntry","swapEventsMutation","from","to","requestEventSwap","eventA","eventB","newA","newB","swapEventData","_eventId","swapEvents","rundown","parent","parentEntry","millisToDelayString","millis","format","isNegative","absMillis","isCompact","delayed","ahead","MILLIS_PER_MINUTE","formatFromMillis","MILLIS_PER_HOUR"],"mappings":"00BAQgB,SAAAA,GAAiBC,EAAkBC,EAAoC,CACrF,MAAMC,EAAqB,CAAC,EAE5B,QAASC,EAAI,EAAGA,EAAIH,EAAM,OAAQG,IAAK,CACrC,MAAMC,EAAQH,EAAQD,EAAMG,CAAC,CAAC,EAEzBC,IAIDC,EAAcD,CAAK,GAGbF,EAAA,KAAKE,EAAM,EAAE,EACbF,EAAA,KAAK,GAAGE,EAAM,OAAO,EAG7BF,EAAQ,KAAK,OAAOE,EAAM,EAAE,EAAE,GAEtBF,EAAA,KAAKE,EAAM,EAAE,EACvB,CAEK,OAAAF,CACT,CAMO,SAASI,GACdC,EACAC,EACAR,EACAS,EACS,CAET,OAAIF,IAAe,YACVP,IAAU,QAKfO,IAAe,QACb,EAAAP,IAAU,QAAaA,IAAU,SAAW,CAACS,GAO5CD,IAAiB,IAC1B,CAWgB,SAAAE,GACdC,EACAC,EACAX,EACyE,CACnE,MAAAY,EAAeZ,EAAQU,CAAO,EAC9BG,EAAeF,EAAU,QAAQD,CAAO,EACxCI,EAAkBH,EAAUE,EAAe,CAAC,EAGlD,GAAI,CAACC,EAEH,MAAI,WAAYF,GAAgB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B,SAASiG,EAAYjG,EAAoB,CACvC,GAAIC,EAAcD,CAAK,GAAK,CAACA,EAAM,OACjCJ,EAAQA,EAAM,OAAQ4B,GAAOA,IAAOxB,EAAM,EAAE,MACvC,CACC,MAAAsI,EAASzI,EAAQG,EAAM,MAAM,EAC/BsI,GAAUrI,EAAcqI,CAAM,IACzBA,EAAA,QAAUA,EAAO,QAAQ,OAAQC,GAAgBA,IAAgBvI,EAAM,EAAE,EAClF,CAGK,OAAAH,EAAQG,EAAM,EAAE,EACvBQ,EAAYA,EAAU,OAAQgB,GAAOA,IAAOxB,EAAM,EAAE,CAAA,CAG/C,MAAA,CAAE,QAAAH,EAAS,MAAAD,EAAO,UAAAY,CAAU,CACrC,CC92BgB,SAAAgI,GAAoBC,EAAqBC,EAAiC,UAAmB,CACvG,GAAAD,GAAU,MAAQA,IAAW,EACxB,MAAA,GAGT,MAAME,EAAaF,EAAS,EACtBG,EAAY,KAAK,IAAIH,CAAM,EAC3BI,EAAYH,IAAW,UACvBI,EAAUD,EAAY,IAAM,cAC5BE,EAAQF,EAAY,IAAM,YAEhC,OAAID,EAAYI,EACP,GAAGL,EAAaI,EAAQD,CAAO,GAAGG,EAAiBL,EAAW,GAAG,CAAC,OAChEA,EAAYM,IAAmBN,EAAYI,IAAsB,EACnE,GAAGL,EAAaI,EAAQD,CAAO,GAAGG,EAAiBL,EAAW,GAAG,CAAC,OAGpE,GAAGD,EAAaI,EAAQD,CAAO,GAAGG,EAAiBL,EAAW,UAAU,CAAC,EAClF"}
@@ -1,2 +1,2 @@
1
- import{h as f,j as d,f as g}from"./vendor-9UkPSc5K.js";import{i as c,bA as y,T as S}from"./index-njXwwjfn.js";import{a as b,v as T,b as _,E as p,T as I}from"./validateEvent-BJMwP_mq.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="1bf2f693-f45b-4508-8eb2-1196d55423cb",t._sentryDebugIdIdentifier="sentry-dbid-1bf2f693-f45b-4508-8eb2-1196d55423cb")}catch{}})();const h="_blink_19ahf_1",v="_fourtyfive_19ahf_13",x="_textarea_19ahf_17",D="_subtle_19ahf_47",k="_ghosted_19ahf_53",w="_fluid_19ahf_59",o={blink:h,fourtyfive:v,textarea:x,subtle:D,ghosted:k,fluid:w},j=f.forwardRef(function({className:e,variant:r="subtle",fluid:n,rows:i=5,resize:l="none",style:s,...u},m){return d.jsx("textarea",{ref:m,autoCorrect:"off",autoComplete:"off",spellCheck:"false",rows:i,style:{...s,resize:l},className:c([o.textarea,o[r],n&&o.fluid,e]),...u})}),a={duration:"00:10:00",linkPrevious:!0,timeStrategy:I.LockDuration,warnTime:"00:02:00",dangerTime:"00:01:00",timerType:S.CountDown,endAction:p.None},L=g(t=>({defaultDuration:localStorage.getItem("ontime-default-duration")??a.duration,linkPrevious:y("ontime-link-previous",a.linkPrevious),defaultTimeStrategy:_(localStorage.getItem("ontime-time-strategy"),a.timeStrategy),defaultWarnTime:localStorage.getItem("ontime-default-warn-time")??a.warnTime,defaultDangerTime:localStorage.getItem("ontime-default-danger-time")??a.dangerTime,defaultTimerType:T(localStorage.getItem("ontime-default-timer-type"),a.timerType),defaultEndAction:b(localStorage.getItem("ontime-default-end-action"),a.endAction),setDefaultDuration:e=>t(()=>(localStorage.setItem("ontime-default-duration",String(e)),{defaultDuration:e})),setLinkPrevious:e=>t(()=>(localStorage.setItem("ontime-link-previous",String(e)),{linkPrevious:e})),setTimeStrategy:e=>t(()=>(localStorage.setItem("ontime-time-strategy",String(e)),{defaultTimeStrategy:e})),setWarnTime:e=>t(()=>(localStorage.setItem("ontime-default-warn-time",String(e)),{defaultWarnTime:e})),setDangerTime:e=>t(()=>(localStorage.setItem("ontime-default-danger-time",String(e)),{defaultDangerTime:e})),setDefaultTimerType:e=>t(()=>(localStorage.setItem("ontime-default-timer-type",String(e)),{defaultTimerType:e})),setDefaultEndAction:e=>t(()=>(localStorage.setItem("ontime-default-end-action",String(e)),{defaultEndAction:e}))}));export{j as T,a as e,L as u};
2
- //# sourceMappingURL=editorSettings-CCHx-wCx.js.map
1
+ import{h as m,j as f,f as g}from"./vendor-BoH5HFNN.js";import{e as c,bE as y,T as S}from"./index-CDBQg2fh.js";import{a as b,v as T,b as _,E as p,T as I}from"./validateEvent-3adKsP1N.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="44d7883e-0dcd-4778-b8bb-cede203f6b81",t._sentryDebugIdIdentifier="sentry-dbid-44d7883e-0dcd-4778-b8bb-cede203f6b81")}catch{}})();const h="_blink_19ahf_1",v="_fourtyfive_19ahf_13",x="_textarea_19ahf_17",D="_subtle_19ahf_47",k="_ghosted_19ahf_53",w="_fluid_19ahf_59",o={blink:h,fourtyfive:v,textarea:x,subtle:D,ghosted:k,fluid:w},j=m.forwardRef(function({className:e,variant:r="subtle",fluid:n,rows:i=5,resize:l="none",style:s,...d},u){return f.jsx("textarea",{ref:u,autoCorrect:"off",autoComplete:"off",spellCheck:"false",rows:i,style:{...s,resize:l},className:c([o.textarea,o[r],n&&o.fluid,e]),...d})}),a={duration:"00:10:00",linkPrevious:!0,timeStrategy:I.LockDuration,warnTime:"00:02:00",dangerTime:"00:01:00",timerType:S.CountDown,endAction:p.None},L=g(t=>({defaultDuration:localStorage.getItem("ontime-default-duration")??a.duration,linkPrevious:y("ontime-link-previous",a.linkPrevious),defaultTimeStrategy:_(localStorage.getItem("ontime-time-strategy"),a.timeStrategy),defaultWarnTime:localStorage.getItem("ontime-default-warn-time")??a.warnTime,defaultDangerTime:localStorage.getItem("ontime-default-danger-time")??a.dangerTime,defaultTimerType:T(localStorage.getItem("ontime-default-timer-type"),a.timerType),defaultEndAction:b(localStorage.getItem("ontime-default-end-action"),a.endAction),setDefaultDuration:e=>t(()=>(localStorage.setItem("ontime-default-duration",String(e)),{defaultDuration:e})),setLinkPrevious:e=>t(()=>(localStorage.setItem("ontime-link-previous",String(e)),{linkPrevious:e})),setTimeStrategy:e=>t(()=>(localStorage.setItem("ontime-time-strategy",String(e)),{defaultTimeStrategy:e})),setWarnTime:e=>t(()=>(localStorage.setItem("ontime-default-warn-time",String(e)),{defaultWarnTime:e})),setDangerTime:e=>t(()=>(localStorage.setItem("ontime-default-danger-time",String(e)),{defaultDangerTime:e})),setDefaultTimerType:e=>t(()=>(localStorage.setItem("ontime-default-timer-type",String(e)),{defaultTimerType:e})),setDefaultEndAction:e=>t(()=>(localStorage.setItem("ontime-default-end-action",String(e)),{defaultEndAction:e}))}));export{j as T,a as e,L as u};
2
+ //# sourceMappingURL=editorSettings-DH9ca-nB.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"editorSettings-CCHx-wCx.js","sources":["../../src/common/components/input/textarea/Textarea.tsx","../../src/common/stores/editorSettings.ts"],"sourcesContent":["import { forwardRef, TextareaHTMLAttributes } from 'react';\n\nimport { cx } from '../../../utils/styleUtils';\n\nimport style from './Textarea.module.scss';\n\nexport interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n variant?: 'subtle' | 'ghosted';\n fluid?: boolean;\n resize?: 'none' | 'both' | 'horizontal' | 'vertical';\n}\n\nconst Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(function TextArea(\n { className, variant = 'subtle', fluid, rows = 5, resize = 'none', style: customStyle, ...textareaProps },\n ref,\n) {\n return (\n <textarea\n ref={ref}\n autoCorrect='off'\n autoComplete='off'\n spellCheck='false'\n rows={rows}\n style={{ ...customStyle, resize }}\n className={cx([style.textarea, style[variant], fluid && style.fluid, className])}\n {...textareaProps}\n />\n );\n});\n\nexport default Textarea;\n","import { EndAction, TimerType, TimeStrategy } from 'ontime-types';\nimport { validateEndAction, validateTimerType, validateTimeStrategy } from 'ontime-utils';\nimport { create } from 'zustand';\n\nimport { booleanFromLocalStorage } from '../utils/localStorage';\n\ntype EditorSettingsStore = {\n defaultDuration: string;\n linkPrevious: boolean;\n defaultTimeStrategy: TimeStrategy;\n defaultWarnTime: string;\n defaultDangerTime: string;\n defaultTimerType: TimerType;\n defaultEndAction: EndAction;\n setDefaultDuration: (defaultDuration: string) => void;\n setLinkPrevious: (linkPrevious: boolean) => void;\n setTimeStrategy: (timeStrategy: TimeStrategy) => void;\n setWarnTime: (warnTime: string) => void;\n setDangerTime: (dangerTime: string) => void;\n setDefaultTimerType: (defaultTimerType: TimerType) => void;\n setDefaultEndAction: (defaultEndAction: EndAction) => void;\n};\n\nexport const editorSettingsDefaults = {\n duration: '00:10:00',\n linkPrevious: true,\n timeStrategy: TimeStrategy.LockDuration,\n warnTime: '00:02:00', // 120000 same as backend\n dangerTime: '00:01:00', // 60000 same as backend\n timerType: TimerType.CountDown,\n endAction: EndAction.None,\n};\n\nenum EditorSettingsKeys {\n DefaultDuration = 'ontime-default-duration',\n LinkPrevious = 'ontime-link-previous',\n DefaultTimeStrategy = 'ontime-time-strategy',\n DefaultWarnTime = 'ontime-default-warn-time',\n DefaultDangerTime = 'ontime-default-danger-time',\n DefaultTimerType = 'ontime-default-timer-type',\n DefaultEndAction = 'ontime-default-end-action',\n}\n\nexport const useEditorSettings = create<EditorSettingsStore>((set) => {\n return {\n defaultDuration: localStorage.getItem(EditorSettingsKeys.DefaultDuration) ?? editorSettingsDefaults.duration,\n linkPrevious: booleanFromLocalStorage(EditorSettingsKeys.LinkPrevious, editorSettingsDefaults.linkPrevious),\n defaultTimeStrategy: validateTimeStrategy(\n localStorage.getItem(EditorSettingsKeys.DefaultTimeStrategy),\n editorSettingsDefaults.timeStrategy,\n ),\n defaultWarnTime: localStorage.getItem(EditorSettingsKeys.DefaultWarnTime) ?? editorSettingsDefaults.warnTime,\n defaultDangerTime: localStorage.getItem(EditorSettingsKeys.DefaultDangerTime) ?? editorSettingsDefaults.dangerTime,\n defaultTimerType: validateTimerType(\n localStorage.getItem(EditorSettingsKeys.DefaultTimerType),\n editorSettingsDefaults.timerType,\n ),\n defaultEndAction: validateEndAction(\n localStorage.getItem(EditorSettingsKeys.DefaultEndAction),\n editorSettingsDefaults.endAction,\n ),\n\n setDefaultDuration: (defaultDuration) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultDuration, String(defaultDuration));\n return { defaultDuration };\n }),\n\n setLinkPrevious: (linkPrevious) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.LinkPrevious, String(linkPrevious));\n return { linkPrevious };\n }),\n setTimeStrategy: (defaultTimeStrategy) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultTimeStrategy, String(defaultTimeStrategy));\n return { defaultTimeStrategy };\n }),\n\n setWarnTime: (defaultWarnTime) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultWarnTime, String(defaultWarnTime));\n return { defaultWarnTime };\n }),\n setDangerTime: (defaultDangerTime) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultDangerTime, String(defaultDangerTime));\n return { defaultDangerTime };\n }),\n setDefaultTimerType: (defaultTimerType) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultTimerType, String(defaultTimerType));\n return { defaultTimerType };\n }),\n setDefaultEndAction: (defaultEndAction) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultEndAction, String(defaultEndAction));\n return { defaultEndAction };\n }),\n };\n});\n"],"names":["Textarea","forwardRef","className","variant","fluid","rows","resize","customStyle","textareaProps","ref","jsx","cx","style","editorSettingsDefaults","TimeStrategy","TimerType","EndAction","useEditorSettings","create","set","booleanFromLocalStorage","validateTimeStrategy","validateTimerType","validateEndAction","defaultDuration","linkPrevious","defaultTimeStrategy","defaultWarnTime","defaultDangerTime","defaultTimerType","defaultEndAction"],"mappings":"2tBAYMA,EAAWC,EAA+C,WAAA,SAC9D,CAAE,UAAAC,EAAW,QAAAC,EAAU,SAAU,MAAAC,EAAO,KAAAC,EAAO,EA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e,CAAC,EACzE,CAAE,gBAAAA,CAAgB,EAC1B,EACH,cAAgBC,GACdT,EAAI,KACF,aAAa,QAAQ,6BAAsC,OAAOS,CAAiB,CAAC,EAC7E,CAAE,kBAAAA,CAAkB,EAC5B,EACH,oBAAsBC,GACpBV,EAAI,KACF,aAAa,QAAQ,4BAAqC,OAAOU,CAAgB,CAAC,EAC3E,CAAE,iBAAAA,CAAiB,EAC3B,EACH,oBAAsBC,GACpBX,EAAI,KACF,aAAa,QAAQ,4BAAqC,OAAOW,CAAgB,CAAC,EAC3E,CAAE,iBAAAA,CAAiB,EAC3B,CACL,EACD"}
1
+ {"version":3,"file":"editorSettings-DH9ca-nB.js","sources":["../../src/common/components/input/textarea/Textarea.tsx","../../src/common/stores/editorSettings.ts"],"sourcesContent":["import { forwardRef, TextareaHTMLAttributes } from 'react';\n\nimport { cx } from '../../../utils/styleUtils';\n\nimport style from './Textarea.module.scss';\n\nexport interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n variant?: 'subtle' | 'ghosted';\n fluid?: boolean;\n resize?: 'none' | 'both' | 'horizontal' | 'vertical';\n}\n\nconst Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(function TextArea(\n { className, variant = 'subtle', fluid, rows = 5, resize = 'none', style: customStyle, ...textareaProps },\n ref,\n) {\n return (\n <textarea\n ref={ref}\n autoCorrect='off'\n autoComplete='off'\n spellCheck='false'\n rows={rows}\n style={{ ...customStyle, resize }}\n className={cx([style.textarea, style[variant], fluid && style.fluid, className])}\n {...textareaProps}\n />\n );\n});\n\nexport default Textarea;\n","import { EndAction, TimerType, TimeStrategy } from 'ontime-types';\nimport { validateEndAction, validateTimerType, validateTimeStrategy } from 'ontime-utils';\nimport { create } from 'zustand';\n\nimport { booleanFromLocalStorage } from '../utils/localStorage';\n\ntype EditorSettingsStore = {\n defaultDuration: string;\n linkPrevious: boolean;\n defaultTimeStrategy: TimeStrategy;\n defaultWarnTime: string;\n defaultDangerTime: string;\n defaultTimerType: TimerType;\n defaultEndAction: EndAction;\n setDefaultDuration: (defaultDuration: string) => void;\n setLinkPrevious: (linkPrevious: boolean) => void;\n setTimeStrategy: (timeStrategy: TimeStrategy) => void;\n setWarnTime: (warnTime: string) => void;\n setDangerTime: (dangerTime: string) => void;\n setDefaultTimerType: (defaultTimerType: TimerType) => void;\n setDefaultEndAction: (defaultEndAction: EndAction) => void;\n};\n\nexport const editorSettingsDefaults = {\n duration: '00:10:00',\n linkPrevious: true,\n timeStrategy: TimeStrategy.LockDuration,\n warnTime: '00:02:00', // 120000 same as backend\n dangerTime: '00:01:00', // 60000 same as backend\n timerType: TimerType.CountDown,\n endAction: EndAction.None,\n};\n\nenum EditorSettingsKeys {\n DefaultDuration = 'ontime-default-duration',\n LinkPrevious = 'ontime-link-previous',\n DefaultTimeStrategy = 'ontime-time-strategy',\n DefaultWarnTime = 'ontime-default-warn-time',\n DefaultDangerTime = 'ontime-default-danger-time',\n DefaultTimerType = 'ontime-default-timer-type',\n DefaultEndAction = 'ontime-default-end-action',\n}\n\nexport const useEditorSettings = create<EditorSettingsStore>((set) => {\n return {\n defaultDuration: localStorage.getItem(EditorSettingsKeys.DefaultDuration) ?? editorSettingsDefaults.duration,\n linkPrevious: booleanFromLocalStorage(EditorSettingsKeys.LinkPrevious, editorSettingsDefaults.linkPrevious),\n defaultTimeStrategy: validateTimeStrategy(\n localStorage.getItem(EditorSettingsKeys.DefaultTimeStrategy),\n editorSettingsDefaults.timeStrategy,\n ),\n defaultWarnTime: localStorage.getItem(EditorSettingsKeys.DefaultWarnTime) ?? editorSettingsDefaults.warnTime,\n defaultDangerTime: localStorage.getItem(EditorSettingsKeys.DefaultDangerTime) ?? editorSettingsDefaults.dangerTime,\n defaultTimerType: validateTimerType(\n localStorage.getItem(EditorSettingsKeys.DefaultTimerType),\n editorSettingsDefaults.timerType,\n ),\n defaultEndAction: validateEndAction(\n localStorage.getItem(EditorSettingsKeys.DefaultEndAction),\n editorSettingsDefaults.endAction,\n ),\n\n setDefaultDuration: (defaultDuration) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultDuration, String(defaultDuration));\n return { defaultDuration };\n }),\n\n setLinkPrevious: (linkPrevious) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.LinkPrevious, String(linkPrevious));\n return { linkPrevious };\n }),\n setTimeStrategy: (defaultTimeStrategy) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultTimeStrategy, String(defaultTimeStrategy));\n return { defaultTimeStrategy };\n }),\n\n setWarnTime: (defaultWarnTime) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultWarnTime, String(defaultWarnTime));\n return { defaultWarnTime };\n }),\n setDangerTime: (defaultDangerTime) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultDangerTime, String(defaultDangerTime));\n return { defaultDangerTime };\n }),\n setDefaultTimerType: (defaultTimerType) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultTimerType, String(defaultTimerType));\n return { defaultTimerType };\n }),\n setDefaultEndAction: (defaultEndAction) =>\n set(() => {\n localStorage.setItem(EditorSettingsKeys.DefaultEndAction, String(defaultEndAction));\n return { defaultEndAction };\n }),\n };\n});\n"],"names":["Textarea","forwardRef","className","variant","fluid","rows","resize","customStyle","textareaProps","ref","jsx","cx","style","editorSettingsDefaults","TimeStrategy","TimerType","EndAction","useEditorSettings","create","set","booleanFromLocalStorage","validateTimeStrategy","validateTimerType","validateEndAction","defaultDuration","linkPrevious","defaultTimeStrategy","defaultWarnTime","defaultDangerTime","defaultTimerType","defaultEndAction"],"mappings":"2tBAYMA,EAAWC,EAA+C,WAAA,SAC9D,CAAE,UAAAC,EAAW,QAAAC,EAAU,SAAU,MAAAC,EAAO,KAAAC,EAAO,EAAG,OAAAC,EAAS,OAAQ,MAAOC,EAAa,GAAGC,GAC1FC,EACA,CAEE,OAAAC,EAAA,IAAC,WAAA,CACC,IAAAD,EACA,YAAY,MACZ,aAAa,MACb,WAAW,QAC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CAAkB,EAC5B,EACH,oBAAsBC,GACpBV,EAAI,KACF,aAAa,QAAQ,4BAAqC,OAAOU,CAAgB,CAAC,EAC3E,CAAE,iBAAAA,CAAiB,EAC3B,EACH,oBAAsBC,GACpBX,EAAI,KACF,aAAa,QAAQ,4BAAqC,OAAOW,CAAgB,CAAC,EAC3E,CAAE,iBAAAA,CAAiB,EAC3B,CACL,EACD"}
@@ -1,2 +1,2 @@
1
- import"./vendor-9UkPSc5K.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3bddcef3-3c46-4d76-a6ef-4958e2a23011",e._sentryDebugIdIdentifier="sentry-dbid-3bddcef3-3c46-4d76-a6ef-4958e2a23011")}catch{}})();const d=(e,n,t)=>Math.max(Math.min(e,Math.max(n,t)),Math.min(n,t));function s(e,n){return e===null||n===null?0:e<=0?100:e>=n?0:d((n-e)/n*100,0,100)}export{s as g};
2
- //# sourceMappingURL=getProgress-B94Ieskb.js.map
1
+ import"./vendor-BoH5HFNN.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3bddcef3-3c46-4d76-a6ef-4958e2a23011",e._sentryDebugIdIdentifier="sentry-dbid-3bddcef3-3c46-4d76-a6ef-4958e2a23011")}catch{}})();const d=(e,n,t)=>Math.max(Math.min(e,Math.max(n,t)),Math.min(n,t));function s(e,n){return e===null||n===null?0:e<=0?100:e>=n?0:d((n-e)/n*100,0,100)}export{s as g};
2
+ //# sourceMappingURL=getProgress-DlrSzpnf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getProgress-B94Ieskb.js","sources":["../../src/common/utils/math.ts","../../src/common/utils/getProgress.ts"],"sourcesContent":["/**\n * Clamps a value between a min and a max\n * @param {number} num - Value to clamp\n * @param {number} min - min value\n * @param {number} max - max value\n * @returns {number}\n */\nexport const clamp = (num: number, min: number, max: number) =>\n Math.max(Math.min(num, Math.max(min, max)), Math.min(min, max));\n","import { MaybeNumber } from 'ontime-types';\n\nimport { clamp } from './math';\n\n/**\n * Returns completion percentage of a progress bar\n * This code assumes the current time and duration have addedTime already applied\n */\nexport function getProgress(current: MaybeNumber, duration: MaybeNumber) {\n if (current === null || duration === null) {\n return 0;\n }\n\n if (current <= 0) {\n return 100;\n }\n\n if (current >= duration) {\n return 0;\n }\n\n return clamp(((duration - current) / duration) * 100, 0, 100);\n}\n"],"names":["clamp","num","min","max","getProgress","current","duration"],"mappings":"uXAOa,MAAAA,EAAQ,CAACC,EAAaC,EAAaC,IAC9C,KAAK,IAAI,KAAK,IAAIF,EAAK,KAAK,IAAIC,EAAKC,CAAG,CAAC,EAAG,KAAK,IAAID,EAAKC,CAAG,CAAC,ECAhD,SAAAC,EAAYC,EAAsBC,EAAuB,CACnE,OAAAD,IAAY,MAAQC,IAAa,KAC5B,EAGLD,GAAW,EACN,IAGLA,GAAWC,EACN,EAGFN,GAAQM,EAAWD,GAAWC,EAAY,IAAK,EAAG,GAAG,CAC9D"}
1
+ {"version":3,"file":"getProgress-DlrSzpnf.js","sources":["../../src/common/utils/math.ts","../../src/common/utils/getProgress.ts"],"sourcesContent":["/**\n * Clamps a value between a min and a max\n * @param {number} num - Value to clamp\n * @param {number} min - min value\n * @param {number} max - max value\n * @returns {number}\n */\nexport const clamp = (num: number, min: number, max: number) =>\n Math.max(Math.min(num, Math.max(min, max)), Math.min(min, max));\n","import { MaybeNumber } from 'ontime-types';\n\nimport { clamp } from './math';\n\n/**\n * Returns completion percentage of a progress bar\n * This code assumes the current time and duration have addedTime already applied\n */\nexport function getProgress(current: MaybeNumber, duration: MaybeNumber) {\n if (current === null || duration === null) {\n return 0;\n }\n\n if (current <= 0) {\n return 100;\n }\n\n if (current >= duration) {\n return 0;\n }\n\n return clamp(((duration - current) / duration) * 100, 0, 100);\n}\n"],"names":["clamp","num","min","max","getProgress","current","duration"],"mappings":"uXAOa,MAAAA,EAAQ,CAACC,EAAaC,EAAaC,IAC9C,KAAK,IAAI,KAAK,IAAIF,EAAK,KAAK,IAAIC,EAAKC,CAAG,CAAC,EAAG,KAAK,IAAID,EAAKC,CAAG,CAAC,ECAhD,SAAAC,EAAYC,EAAsBC,EAAuB,CACnE,OAAAD,IAAY,MAAQC,IAAa,KAC5B,EAGLD,GAAW,EACN,IAGLA,GAAWC,EACN,EAGFN,GAAQM,EAAWD,GAAWC,EAAY,IAAK,EAAG,GAAG,CAC9D"}
@@ -1 +1 @@
1
- ._blink_35w9k_1{animation:_blink_35w9k_1 1s step-start infinite}@keyframes _blink_35w9k_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_35w9k_13{transform:rotate(45deg)}._errorContainer_35w9k_17{width:100%;height:100%;display:grid;place-content:center;background-color:#101010;color:#f6f6f6}._error_35w9k_17{color:#fa5656}._report_35w9k_30{color:#578af4;text-decoration:underline;text-underline-offset:2px;cursor:pointer}._report_35w9k_30:hover{color:#ff7597}._blink_ujow7_1{animation:_blink_ujow7_1 1s step-start infinite}@keyframes _blink_ujow7_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_ujow7_13{transform:rotate(45deg)}._overlay_ujow7_17{position:absolute;top:0;left:0;margin:0;width:100vw;height:100vh;padding:0;box-sizing:border-box;border:10px solid #f6f6f6;background-color:#101010;color:#f6f6f6;display:grid;place-content:center;text-align:center;cursor:pointer}._name_ujow7_35{font-weight:600;margin-top:-10vh;line-height:1em;font-size:12vw;text-transform:uppercase}._message_ujow7_43{color:#b1b1b1;line-height:2em;font-size:3vw}._blink_bz8cs_1{animation:_blink_bz8cs_1 1s step-start infinite}@keyframes _blink_bz8cs_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_bz8cs_13{transform:rotate(45deg)}._mirror_bz8cs_17{transform:rotate(180deg)}._subtle_bz8cs_21{background:#303030;color:#779be7;line-height:1em}._subtle_bz8cs_21:hover:not(:disabled):not(:active){background:#404040;color:#578af4}._subtle_bz8cs_21:active:not(:disabled){background:#2d2d2d;border-color:#202020}._subtle-white_bz8cs_35{background:#303030;color:#f6f6f6}._subtle-white_bz8cs_35:hover:not(:disabled):not(:active){background:#404040;color:#f6f6f6}._subtle-white_bz8cs_35:active:not(:disabled){background:#2d2d2d;border-color:#202020}._subtle-white_bz8cs_35:disabled{background:#303030}._primary_bz8cs_51{background:#2b5abc;color:#f6f6f6}._primary_bz8cs_51:hover:not(:disabled):not(:active){background:#3e75e8}._primary_bz8cs_51:active:not(:disabled){background:#0a43b9;border-color:#0036a6}._primary_bz8cs_51:disabled{opacity:.6}._destructive_bz8cs_66{background:#d20300;color:#f6f6f6}._destructive_bz8cs_66:hover:not(:disabled):not(:active){background:#ed3333;color:#f6f6f6}._destructive_bz8cs_66:active:not(:disabled){background:#c10000;border-color:#b20000}._subtle-destructive_bz8cs_79{background:#303030;color:#ff7878}._subtle-destructive_bz8cs_79:hover:not(:disabled):not(:active){background:#404040;color:#fa5656}._subtle-destructive_bz8cs_79:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted_bz8cs_92{background:transparent;color:#578af4}._ghosted_bz8cs_92:hover:not(:disabled):not(:active){background:#404040;color:#578af4}._ghosted_bz8cs_92:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted_bz8cs_92:disabled{opacity:.4}._ghosted-white_bz8cs_108{background:transparent;color:#f6f6f6}._ghosted-white_bz8cs_108:hover:not(:disabled):not(:active){background:#404040;color:#f6f6f6}._ghosted-white_bz8cs_108:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted-white_bz8cs_108:disabled{opacity:.4}._ghosted-destructive_bz8cs_124{background:transparent;color:#fa5656}._ghosted-destructive_bz8cs_124:hover:not(:disabled):not(:active){background:#404040;color:#fa5656}._ghosted-destructive_bz8cs_124:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted-destructive_bz8cs_124:disabled{opacity:.4}._baseIconButton_bz8cs_140{aspect-ratio:1;display:grid;place-content:center;border:1px solid transparent;border-radius:3px;cursor:pointer}._baseIconButton_bz8cs_140:focus-visible{outline:2px solid #578AF4;outline-offset:2px}._baseIconButton_bz8cs_140:disabled{opacity:.4;cursor:not-allowed}._small_bz8cs_157{height:1.5rem;font-size:calc(1rem - 3px)}._medium_bz8cs_162{height:2rem;width:2rem}._large_bz8cs_167{height:2.5rem;width:2.5rem}._xlarge_bz8cs_172{height:3rem;font-size:1.5rem}._blink_1nsno_1{animation:_blink_1nsno_1 1s step-start infinite}@keyframes _blink_1nsno_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1nsno_13{transform:rotate(45deg)}._fadeable_1nsno_17{opacity:1;transition-property:opacity;transition-duration:.3s}._fadeable_1nsno_17._hidden_1nsno_22{opacity:0;pointer-events:none}._buttonContainer_1nsno_27{display:flex;flex-direction:column;row-gap:1rem;padding-top:.75rem;padding-left:.5em;position:fixed;left:0;top:0;z-index:200}._blink_1yt6p_1{animation:_blink_1yt6p_1 1s step-start infinite}@keyframes _blink_1yt6p_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1yt6p_13{transform:rotate(45deg)}._fadeable_1yt6p_17{opacity:1;transition-property:opacity;transition-duration:.3s}._fadeable_1yt6p_17._hidden_1yt6p_22{opacity:0;pointer-events:none}._lockIcon_1yt6p_27{font-size:1.5rem;color:#8bb33d;padding:.5em;position:fixed;left:0;top:0;z-index:200}._blink_1erat_1{animation:_blink_1erat_1 1s step-start infinite}@keyframes _blink_1erat_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1erat_13{transform:rotate(45deg)}._mirror_1erat_17{transform:rotate(180deg)}._subtle_1erat_21{background:#303030;color:#779be7;line-height:1em}._subtle_1erat_21:hover:not(:disabled):not(:active){background:#404040;color:#578af4}._subtle_1erat_21:active:not(:disabled){background:#2d2d2d;border-color:#202020}._subtle-white_1erat_35{background:#303030;color:#f6f6f6}._subtle-white_1erat_35:hover:not(:disabled):not(:active){background:#404040;color:#f6f6f6}._subtle-white_1erat_35:active:not(:disabled){background:#2d2d2d;border-color:#202020}._subtle-white_1erat_35:disabled{background:#303030}._primary_1erat_51{background:#2b5abc;color:#f6f6f6}._primary_1erat_51:hover:not(:disabled):not(:active){background:#3e75e8}._primary_1erat_51:active:not(:disabled){background:#0a43b9;border-color:#0036a6}._primary_1erat_51:disabled{opacity:.6}._destructive_1erat_66{background:#d20300;color:#f6f6f6}._destructive_1erat_66:hover:not(:disabled):not(:active){background:#ed3333;color:#f6f6f6}._destructive_1erat_66:active:not(:disabled){background:#c10000;border-color:#b20000}._subtle-destructive_1erat_79{background:#303030;color:#ff7878}._subtle-destructive_1erat_79:hover:not(:disabled):not(:active){background:#404040;color:#fa5656}._subtle-destructive_1erat_79:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted_1erat_92{background:transparent;color:#578af4}._ghosted_1erat_92:hover:not(:disabled):not(:active){background:#404040;color:#578af4}._ghosted_1erat_92:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted_1erat_92:disabled{opacity:.4}._ghosted-white_1erat_108{background:transparent;color:#f6f6f6}._ghosted-white_1erat_108:hover:not(:disabled):not(:active){background:#404040;color:#f6f6f6}._ghosted-white_1erat_108:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted-white_1erat_108:disabled{opacity:.4}._ghosted-destructive_1erat_124{background:transparent;color:#fa5656}._ghosted-destructive_1erat_124:hover:not(:disabled):not(:active){background:#404040;color:#fa5656}._ghosted-destructive_1erat_124:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted-destructive_1erat_124:disabled{opacity:.4}._baseButton_1erat_140{position:relative;display:flex;align-items:center;justify-content:center;gap:.5em;width:fit-content;padding-inline:1em;white-space:nowrap;border:1px solid transparent;border-radius:3px;cursor:pointer}._baseButton_1erat_140:disabled{opacity:.4;cursor:not-allowed}._baseButton_1erat_140:focus-visible{outline:2px solid #578AF4;outline-offset:2px}._baseButton_1erat_140._loading_1erat_161{cursor:wait}._baseButton_1erat_140._loading_1erat_161 ._content_1erat_164{opacity:0}._content_1erat_164{display:flex;align-items:center;gap:inherit}._loadingOverlay_1erat_174{position:absolute;display:grid;place-content:center}._spinner_1erat_180{animation:_spin_1erat_180 1s linear infinite;stroke-dasharray:8}@keyframes _spin_1erat_180{to{transform:rotate(360deg)}}._small_1erat_190{height:1.5rem;font-size:calc(1rem - 3px)}._medium_1erat_195{height:2rem;font-size:calc(1rem - 2px)}._large_1erat_200{height:2.5rem;font-weight:600}._xlarge_1erat_205{height:3rem;font-weight:600}._fluid_1erat_210{width:100%}._blink_fu4d0_1{animation:_blink_fu4d0_1 1s step-start infinite}@keyframes _blink_fu4d0_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_fu4d0_13{transform:rotate(45deg)}._dialog_fu4d0_17{position:fixed;top:10%;left:50%;transform:translate(-50%);padding-inline:1rem;min-width:min(420px,90vw);background-color:#202020;color:#f6f6f6;border-radius:3px;box-shadow:#00000026 0 3px 3px;border:1px solid #2d2d2d;outline:none}._backdrop_fu4d0_32{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000000b3;transition:opacity .3s cubic-bezier(.45,1.005,0,1.005)}._backdrop_fu4d0_32[data-starting-style],._backdrop_fu4d0_32[data-ending-style]{opacity:0}._title_fu4d0_42{font-size:1rem;font-weight:600;padding-block:1rem;display:flex;align-items:center;justify-content:space-between}._body_fu4d0_51{display:flex;flex-direction:column;gap:.5rem;max-height:min(80vh,600px);overflow-y:auto}._footer_fu4d0_59{padding-block:1rem;display:flex;align-items:center;justify-content:end;gap:1rem}._blink_1kix8_1{animation:_blink_1kix8_1 1s step-start infinite}@keyframes _blink_1kix8_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1kix8_13{transform:rotate(45deg)}._input_1kix8_17{box-sizing:border-box;font-size:1rem;font-weight:inherit;color:#e2e2e2;border-radius:3px;border:1px solid transparent;padding-inline:.5em;outline:none}._input_1kix8_17::placeholder{color:#9d9d9d;letter-spacing:0}._input_1kix8_17:hover:not(:disabled):not(:read-only){background-color:#2d2d2d}._input_1kix8_17:focus:not(:read-only){background-color:#404040;outline:2px solid #578AF4;outline-offset:2px}._input_1kix8_17:disabled{opacity:.4;cursor:not-allowed}._input_1kix8_17:read-only::placeholder{opacity:0}._subtle_1kix8_47{background-color:#262626}._ghosted_1kix8_51{background-color:transparent;padding:0}._medium_1kix8_56{height:2rem}._large_1kix8_60{height:2.5rem}._fluid_1kix8_64{width:100%}._blink_pmy0j_1{animation:_blink_pmy0j_1 1s step-start infinite}@keyframes _blink_pmy0j_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_pmy0j_13{transform:rotate(45deg)}._link_pmy0j_17{display:flex;align-items:center;padding:.75rem 1.5rem;gap:.5rem;width:100%;border-left:4px solid transparent;color:#779be7;white-space:nowrap;cursor:pointer;transition-property:color;transition-duration:.1s}._link_pmy0j_17:hover{color:#ff7597;background-color:#101010}._link_pmy0j_17:active{background-color:#ffffff1a}._link_pmy0j_17:focus{outline:2px solid #578AF4;background-color:#101010}._link_pmy0j_17._current_pmy0j_41{background-color:#1a1a1a;border-left:4px solid #779BE7}._blink_1wpyp_1{animation:_blink_1wpyp_1 1s step-start infinite}@keyframes _blink_1wpyp_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1wpyp_13{transform:rotate(45deg)}._linkIcon_1wpyp_17{margin-left:auto;transform:rotate(45deg)}._blink_35xx6_1{animation:_blink_35xx6_1 1s step-start infinite}@keyframes _blink_35xx6_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_35xx6_13{transform:rotate(45deg)}._copytag_35xx6_17{display:flex;align-items:center}._action_35xx6_22{border-top-right-radius:0;border-bottom-right-radius:0}._label_35xx6_27{border-radius:3px 0 0 3px;border:1px solid #262626;background-color:#ffffff08;padding-inline:.5rem 1rem;line-height:1em;display:flex;align-items:center;color:#b1b1b1}._small_35xx6_38{height:1.5rem;font-size:calc(1rem - 3px)}._medium_35xx6_43{height:2rem;font-size:calc(1rem - 2px)}._large_35xx6_48{height:2.5rem;font-weight:600}._copy_35xx6_17{border-top-left-radius:0;border-bottom-left-radius:0}._blink_elv9y_1{animation:_blink_elv9y_1 1s step-start infinite}@keyframes _blink_elv9y_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_elv9y_13{transform:rotate(45deg)}._header_elv9y_17{font-size:calc(1rem - 2px);margin-left:1rem;color:#6c6c6c}._interfaces_elv9y_23{padding:.5rem;display:flex;flex-wrap:wrap;gap:.5rem}._interfaceCopy_elv9y_30{display:flex;align-items:center}._goIcon_elv9y_35{transform:rotate(45deg);margin-left:.25rem;margin-bottom:.25rem}._blink_1f3q6_1{animation:_blink_1f3q6_1 1s step-start infinite}@keyframes _blink_1f3q6_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1f3q6_13{transform:rotate(45deg)}._separator_1f3q6_17{border-color:#ffffff1a}._backdrop_1f3q6_21{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000000b3;transition:opacity .3s cubic-bezier(.45,1.005,0,1.005)}._backdrop_1f3q6_21[data-starting-style],._backdrop_1f3q6_21[data-ending-style]{opacity:0}._drawer_1f3q6_31{box-sizing:border-box;position:fixed;top:0;left:0;bottom:0;width:22rem;height:100vh;display:flex;flex-direction:column;padding-block:1rem;background-color:#202020;color:#f6f6f6;border-right:1px solid #2d2d2d}._drawer_1f3q6_31[data-open]{transform:translate(0);transition:transform .3s cubic-bezier(.45,1.005,0,1.005)}._drawer_1f3q6_31[data-starting-style],._drawer_1f3q6_31[data-ending-style]{transform:translate(-100%);transition:transform .5s cubic-bezier(.45,1.005,0,1.005)}@media (max-width: 500px){._drawer_1f3q6_31{width:100vw}}._header_1f3q6_60{display:flex;align-items:center;justify-content:space-between;height:3.5rem;padding-inline:1.5rem;font-weight:600;font-size:1.25rem}._body_1f3q6_70{flex:1;overflow-y:auto}._note_1f3q6_75{margin-left:auto;color:#fff3}._blink_ypiou_1{animation:_blink_ypiou_1 1s step-start infinite}@keyframes _blink_ypiou_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_ypiou_13{transform:rotate(45deg)}._header_ypiou_17{font-size:2rem;padding-bottom:.5rem;border-bottom:1px solid rgba(255,255,255,.1);font-weight:600}._subheader_ypiou_24{font-size:1.5rem;padding-bottom:.5rem;font-weight:600;display:flex;align-items:center;justify-content:space-between}._title_ypiou_33{font-size:1.375rem;padding:0 2rem;font-weight:600;display:flex;align-items:center;justify-content:space-between;color:#cfcfcf}._section_ypiou_43,._indent_ypiou_44{font-size:calc(1rem - 1px);display:flex;flex-direction:column;gap:1rem;color:#f6f6f6}._section_ypiou_43{position:relative;margin-top:2rem;max-width:850px}._indent_ypiou_44{padding:1rem;background-color:#101010}._paragraph_ypiou_63{padding:.5rem 0}._card_ypiou_67{position:relative;padding:2rem;background-color:#ffffff08;border:1px solid #2d2d2d;border-radius:3px}._highlight_ypiou_75{font-size:calc(1rem - 2px);color:#ffbc56;padding-inline:.25rem}._blockquote_ypiou_81{padding-left:.5rem;border-left:2px solid #ececec;background-color:#ffffff08}._error_ypiou_87{font-size:calc(1rem - 2px);display:block;color:#fa5656}._pad_ypiou_93{padding:0 2rem;max-height:550px;overflow-y:scroll}._table_ypiou_99{width:100%;border-collapse:collapse;font-size:calc(1rem - 2px);text-align:left;margin-bottom:2rem}._table_ypiou_99 thead{position:sticky;top:0;z-index:100;background-color:#101010}._table_ypiou_99 th{font-weight:400;color:#b1b1b1;white-space:nowrap;text-transform:capitalize}._table_ypiou_99 th,._table_ypiou_99 td{padding:.5rem}._table_ypiou_99 tr:nth-child(2n){background-color:#ffffff03}._table_ypiou_99 tr[data-warn=true],._table_ypiou_99 td[data-warn=true]{background-color:#3d2900}._listGroup_ypiou_130{padding:0 2rem}._listGroup_ypiou_130>li:not(:last-child){border-bottom:1px solid rgba(255,255,255,.1)}._listItem_ypiou_137{display:grid;grid-template-columns:1fr auto;align-items:center;gap:1rem;padding:.5rem 0}._fieldTitle_ypiou_145{color:#f6f6f6;font-size:1rem}._fieldDescription_ypiou_150{font-size:calc(1rem - 2px);color:#b1b1b1}._fieldError_ypiou_155{font-size:calc(1rem - 2px);color:#fa5656}._divider_ypiou_160{border:none;border-top:1px solid rgba(255,255,255,.1);margin:1rem -2rem}._overlay_ypiou_166{position:absolute;z-index:300;width:100%;height:100%;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:grid;place-content:center;background-color:#0000001a}._loader_ypiou_177{width:4rem;height:4rem;background:#578af4;display:inline-block;border-radius:50%;box-sizing:border-box;animation:_animloader_ypiou_1 1s ease-in infinite}._empty_ypiou_187{background-color:#0000001a;text-align:center;color:#8a8a8a}._empty_ypiou_187 td{padding-block:5rem}._empty_ypiou_187 button{margin-top:1rem;margin-inline:auto}._inlineElements_ypiou_200{display:flex;align-items:center}._inlineElements_ypiou_200._inner_ypiou_204{gap:.5rem}._inlineElements_ypiou_200._component_ypiou_207{gap:1rem}._inlineElements_ypiou_200._start_ypiou_210{justify-content:flex-start}._inlineElements_ypiou_200._end_ypiou_213{justify-content:flex-end}._inlineElements_ypiou_200._apart_ypiou_216{justify-content:space-between}@keyframes _animloader_ypiou_1{0%{transform:scale(0);opacity:.6}to{transform:scale(1);opacity:0}}._blink_hxuk5_1{animation:_blink_hxuk5_1 1s step-start infinite}@keyframes _blink_hxuk5_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_hxuk5_13{transform:rotate(45deg)}._log_hxuk5_17{font-size:calc(1rem - 2px);overflow-y:auto;-webkit-user-select:text;user-select:text;min-height:20vh;max-height:40vh;background-color:#101010;padding:.5rem}._apart_hxuk5_27{margin-left:auto}._logEntry_hxuk5_31{display:flex}._logEntry_hxuk5_31._INFO_hxuk5_34{color:#b1b1b1}._logEntry_hxuk5_31._WARN_hxuk5_37{color:#ffbc56}._logEntry_hxuk5_31._ERROR_hxuk5_40{color:#fa5656}._logEntry_hxuk5_31:hover{color:#f6f6f6}._logEntry_hxuk5_31 ._time_hxuk5_46{width:4.5em}._logEntry_hxuk5_31 ._origin_hxuk5_49{width:6em}._logEntry_hxuk5_31 ._msg_hxuk5_52{flex:1}._buttonBar_hxuk5_56{flex-wrap:wrap;padding-bottom:.5rem}._blink_vno17_1{animation:_blink_vno17_1 1s step-start infinite}@keyframes _blink_vno17_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_vno17_13{transform:rotate(45deg)}._mirror_vno17_17{transform:rotate(180deg)}._loader_vno17_21{display:grid;place-items:center;background-color:var(--background-color-override, #101010);height:100vh}._ellipsis_vno17_28{display:inline-block;position:relative;width:5rem}._ellipsis_vno17_28 div{position:absolute;width:.5rem;height:.5rem;border-radius:50%;background-color:var(--accent-color-override, #ff7597);animation-timing-function:cubic-bezier(0,1,1,0)}._ellipsis_vno17_28 div:nth-child(1){left:.5rem;animation:_lds-ellipsis1_vno17_1 .6s infinite}._ellipsis_vno17_28 div:nth-child(2){left:.5rem;animation:_lds-ellipsis2_vno17_1 .6s infinite}._ellipsis_vno17_28 div:nth-child(3){left:2rem;animation:_lds-ellipsis2_vno17_1 .6s infinite}._ellipsis_vno17_28 div:nth-child(4){left:3.5rem;animation:_lds-ellipsis3_vno17_1 .6s infinite}@keyframes _lds-ellipsis1_vno17_1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes _lds-ellipsis2_vno17_1{0%{transform:translate(0)}to{transform:translate(1.5rem)}}@keyframes _lds-ellipsis3_vno17_1{0%{transform:scale(1)}to{transform:scale(0)}}._blink_1d1tc_1{animation:_blink_1d1tc_1 1s step-start infinite}@keyframes _blink_1d1tc_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1d1tc_13{transform:rotate(45deg)}._mirror_1d1tc_17{transform:rotate(180deg)}._notFound_1d1tc_21{display:grid;height:100vh;padding-top:20vh;background-color:var(--background-color-override, #101010)}._content_1d1tc_28{display:flex;flex-direction:column;color:#f6f6f6;align-items:center;text-align:center}.blink{animation:blink 1s step-start infinite}@keyframes blink{0%{opacity:100%}50%{opacity:20%}}.fourtyfive{transform:rotate(45deg)}@font-face{font-family:Open Sans;font-style:normal;font-display:swap;font-weight:300;src:url(./open-sans-latin-300-normal-BuA4N9V4.woff2) format("woff2"),url(./open-sans-latin-300-normal-B9VvyOsd.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Open Sans;font-style:normal;font-display:swap;font-weight:400;src:url(./open-sans-latin-400-normal-D-erVzNr.woff2) format("woff2"),url(./open-sans-latin-400-normal-CvJMf42F.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Open Sans;font-style:normal;font-display:swap;font-weight:600;src:url(./open-sans-latin-600-normal-B_B0eGjx.woff2) format("woff2"),url(./open-sans-latin-600-normal-Bd29oOVF.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;scrollbar-color:rgba(255,255,255,.2) rgba(255,255,255,.01);scrollbar-width:thin}body,html{font-size:15px;font-family:Open Sans,Segoe UI,sans-serif;-webkit-font-smoothing:antialiased;line-height:1.5}body,html,.App{margin:0 auto;overflow:hidden;overflow:clip;height:100vh;-webkit-user-select:none;user-select:none;-webkit-app-region:drag;isolation:isolate}button{all:unset;box-sizing:border-box}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}table{word-break:break-word}ul,ol{list-style:none;margin:0;padding:0}li{margin:0;padding:0}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}@media (max-width: 1600px){body,html,.App{font-size:14px}}::-webkit-scrollbar{width:6px;height:6px;-ms-overflow-style:-ms-autohiding-scrollbar}::-webkit-scrollbar-track{background:#ffffff03;border-radius:2px}::-webkit-scrollbar-thumb{background:#fff3;border-radius:2px}::-webkit-scrollbar-thumb:hover{background:#fff9}
1
+ ._blink_35w9k_1{animation:_blink_35w9k_1 1s step-start infinite}@keyframes _blink_35w9k_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_35w9k_13{transform:rotate(45deg)}._errorContainer_35w9k_17{width:100%;height:100%;display:grid;place-content:center;background-color:#101010;color:#f6f6f6}._error_35w9k_17{color:#fa5656}._report_35w9k_30{color:#578af4;text-decoration:underline;text-underline-offset:2px;cursor:pointer}._report_35w9k_30:hover{color:#ff7597}._blink_9onby_1{animation:_blink_9onby_1 1s step-start infinite}@keyframes _blink_9onby_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_9onby_13{transform:rotate(45deg)}._overlay_9onby_17{position:absolute;top:0;left:0;margin:0;width:100vw;height:100vh;padding:0;box-sizing:border-box;border:10px solid #f6f6f6;background-color:#101010;color:#f6f6f6;display:grid;place-content:center;text-align:center;cursor:pointer}._name_9onby_35{font-weight:600;margin-top:-10vh;line-height:1em;font-size:12vw;text-transform:uppercase}._message_9onby_43{color:#8a8a8a;line-height:2em;font-size:3vw}._blink_bz8cs_1{animation:_blink_bz8cs_1 1s step-start infinite}@keyframes _blink_bz8cs_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_bz8cs_13{transform:rotate(45deg)}._mirror_bz8cs_17{transform:rotate(180deg)}._subtle_bz8cs_21{background:#303030;color:#779be7;line-height:1em}._subtle_bz8cs_21:hover:not(:disabled):not(:active){background:#404040;color:#578af4}._subtle_bz8cs_21:active:not(:disabled){background:#2d2d2d;border-color:#202020}._subtle-white_bz8cs_35{background:#303030;color:#f6f6f6}._subtle-white_bz8cs_35:hover:not(:disabled):not(:active){background:#404040;color:#f6f6f6}._subtle-white_bz8cs_35:active:not(:disabled){background:#2d2d2d;border-color:#202020}._subtle-white_bz8cs_35:disabled{background:#303030}._primary_bz8cs_51{background:#2b5abc;color:#f6f6f6}._primary_bz8cs_51:hover:not(:disabled):not(:active){background:#3e75e8}._primary_bz8cs_51:active:not(:disabled){background:#0a43b9;border-color:#0036a6}._primary_bz8cs_51:disabled{opacity:.6}._destructive_bz8cs_66{background:#d20300;color:#f6f6f6}._destructive_bz8cs_66:hover:not(:disabled):not(:active){background:#ed3333;color:#f6f6f6}._destructive_bz8cs_66:active:not(:disabled){background:#c10000;border-color:#b20000}._subtle-destructive_bz8cs_79{background:#303030;color:#ff7878}._subtle-destructive_bz8cs_79:hover:not(:disabled):not(:active){background:#404040;color:#fa5656}._subtle-destructive_bz8cs_79:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted_bz8cs_92{background:transparent;color:#578af4}._ghosted_bz8cs_92:hover:not(:disabled):not(:active){background:#404040;color:#578af4}._ghosted_bz8cs_92:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted_bz8cs_92:disabled{opacity:.4}._ghosted-white_bz8cs_108{background:transparent;color:#f6f6f6}._ghosted-white_bz8cs_108:hover:not(:disabled):not(:active){background:#404040;color:#f6f6f6}._ghosted-white_bz8cs_108:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted-white_bz8cs_108:disabled{opacity:.4}._ghosted-destructive_bz8cs_124{background:transparent;color:#fa5656}._ghosted-destructive_bz8cs_124:hover:not(:disabled):not(:active){background:#404040;color:#fa5656}._ghosted-destructive_bz8cs_124:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted-destructive_bz8cs_124:disabled{opacity:.4}._baseIconButton_bz8cs_140{aspect-ratio:1;display:grid;place-content:center;border:1px solid transparent;border-radius:3px;cursor:pointer}._baseIconButton_bz8cs_140:focus-visible{outline:2px solid #578AF4;outline-offset:2px}._baseIconButton_bz8cs_140:disabled{opacity:.4;cursor:not-allowed}._small_bz8cs_157{height:1.5rem;font-size:calc(1rem - 3px)}._medium_bz8cs_162{height:2rem;width:2rem}._large_bz8cs_167{height:2.5rem;width:2.5rem}._xlarge_bz8cs_172{height:3rem;font-size:1.5rem}._blink_1nsno_1{animation:_blink_1nsno_1 1s step-start infinite}@keyframes _blink_1nsno_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1nsno_13{transform:rotate(45deg)}._fadeable_1nsno_17{opacity:1;transition-property:opacity;transition-duration:.3s}._fadeable_1nsno_17._hidden_1nsno_22{opacity:0;pointer-events:none}._buttonContainer_1nsno_27{display:flex;flex-direction:column;row-gap:1rem;padding-top:.75rem;padding-left:.5em;position:fixed;left:0;top:0;z-index:200}._blink_1y6b8_1{animation:_blink_1y6b8_1 1s step-start infinite}@keyframes _blink_1y6b8_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1y6b8_13{transform:rotate(45deg)}._fadeable_1y6b8_17{opacity:1;transition-property:opacity;transition-duration:.3s}._fadeable_1y6b8_17._hidden_1y6b8_22{opacity:0;pointer-events:none}._lockIcon_1y6b8_27{font-size:1.5rem;color:#77c785;padding:.5em;position:fixed;left:0;top:0;z-index:200}._blink_1erat_1{animation:_blink_1erat_1 1s step-start infinite}@keyframes _blink_1erat_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1erat_13{transform:rotate(45deg)}._mirror_1erat_17{transform:rotate(180deg)}._subtle_1erat_21{background:#303030;color:#779be7;line-height:1em}._subtle_1erat_21:hover:not(:disabled):not(:active){background:#404040;color:#578af4}._subtle_1erat_21:active:not(:disabled){background:#2d2d2d;border-color:#202020}._subtle-white_1erat_35{background:#303030;color:#f6f6f6}._subtle-white_1erat_35:hover:not(:disabled):not(:active){background:#404040;color:#f6f6f6}._subtle-white_1erat_35:active:not(:disabled){background:#2d2d2d;border-color:#202020}._subtle-white_1erat_35:disabled{background:#303030}._primary_1erat_51{background:#2b5abc;color:#f6f6f6}._primary_1erat_51:hover:not(:disabled):not(:active){background:#3e75e8}._primary_1erat_51:active:not(:disabled){background:#0a43b9;border-color:#0036a6}._primary_1erat_51:disabled{opacity:.6}._destructive_1erat_66{background:#d20300;color:#f6f6f6}._destructive_1erat_66:hover:not(:disabled):not(:active){background:#ed3333;color:#f6f6f6}._destructive_1erat_66:active:not(:disabled){background:#c10000;border-color:#b20000}._subtle-destructive_1erat_79{background:#303030;color:#ff7878}._subtle-destructive_1erat_79:hover:not(:disabled):not(:active){background:#404040;color:#fa5656}._subtle-destructive_1erat_79:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted_1erat_92{background:transparent;color:#578af4}._ghosted_1erat_92:hover:not(:disabled):not(:active){background:#404040;color:#578af4}._ghosted_1erat_92:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted_1erat_92:disabled{opacity:.4}._ghosted-white_1erat_108{background:transparent;color:#f6f6f6}._ghosted-white_1erat_108:hover:not(:disabled):not(:active){background:#404040;color:#f6f6f6}._ghosted-white_1erat_108:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted-white_1erat_108:disabled{opacity:.4}._ghosted-destructive_1erat_124{background:transparent;color:#fa5656}._ghosted-destructive_1erat_124:hover:not(:disabled):not(:active){background:#404040;color:#fa5656}._ghosted-destructive_1erat_124:active:not(:disabled){background:#2d2d2d;border-color:#202020}._ghosted-destructive_1erat_124:disabled{opacity:.4}._baseButton_1erat_140{position:relative;display:flex;align-items:center;justify-content:center;gap:.5em;width:fit-content;padding-inline:1em;white-space:nowrap;border:1px solid transparent;border-radius:3px;cursor:pointer}._baseButton_1erat_140:disabled{opacity:.4;cursor:not-allowed}._baseButton_1erat_140:focus-visible{outline:2px solid #578AF4;outline-offset:2px}._baseButton_1erat_140._loading_1erat_161{cursor:wait}._baseButton_1erat_140._loading_1erat_161 ._content_1erat_164{opacity:0}._content_1erat_164{display:flex;align-items:center;gap:inherit}._loadingOverlay_1erat_174{position:absolute;display:grid;place-content:center}._spinner_1erat_180{animation:_spin_1erat_180 1s linear infinite;stroke-dasharray:8}@keyframes _spin_1erat_180{to{transform:rotate(360deg)}}._small_1erat_190{height:1.5rem;font-size:calc(1rem - 3px)}._medium_1erat_195{height:2rem;font-size:calc(1rem - 2px)}._large_1erat_200{height:2.5rem;font-weight:600}._xlarge_1erat_205{height:3rem;font-weight:600}._fluid_1erat_210{width:100%}._blink_fu4d0_1{animation:_blink_fu4d0_1 1s step-start infinite}@keyframes _blink_fu4d0_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_fu4d0_13{transform:rotate(45deg)}._dialog_fu4d0_17{position:fixed;top:10%;left:50%;transform:translate(-50%);padding-inline:1rem;min-width:min(420px,90vw);background-color:#202020;color:#f6f6f6;border-radius:3px;box-shadow:#00000026 0 3px 3px;border:1px solid #2d2d2d;outline:none}._backdrop_fu4d0_32{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000000b3;transition:opacity .3s cubic-bezier(.45,1.005,0,1.005)}._backdrop_fu4d0_32[data-starting-style],._backdrop_fu4d0_32[data-ending-style]{opacity:0}._title_fu4d0_42{font-size:1rem;font-weight:600;padding-block:1rem;display:flex;align-items:center;justify-content:space-between}._body_fu4d0_51{display:flex;flex-direction:column;gap:.5rem;max-height:min(80vh,600px);overflow-y:auto}._footer_fu4d0_59{padding-block:1rem;display:flex;align-items:center;justify-content:end;gap:1rem}._blink_1r8lg_1{animation:_blink_1r8lg_1 1s step-start infinite}@keyframes _blink_1r8lg_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1r8lg_13{transform:rotate(45deg)}._input_1r8lg_17{box-sizing:border-box;font-size:1rem;font-weight:inherit;color:#e2e2e2;border-radius:3px;border:1px solid transparent;padding-inline:.5em;outline:none}._input_1r8lg_17::placeholder{color:#8a8a8a;letter-spacing:0}._input_1r8lg_17:hover:not(:disabled):not(:read-only){background-color:#2d2d2d}._input_1r8lg_17:focus:not(:read-only){background-color:#404040;outline:2px solid #578AF4;outline-offset:2px}._input_1r8lg_17:disabled{opacity:.4;cursor:not-allowed}._input_1r8lg_17:read-only::placeholder{opacity:0}._subtle_1r8lg_47{background-color:#262626}._ghosted_1r8lg_51{background-color:transparent;padding:0}._medium_1r8lg_56{height:2rem}._large_1r8lg_60{height:2.5rem}._fluid_1r8lg_64{width:100%}._blink_pmy0j_1{animation:_blink_pmy0j_1 1s step-start infinite}@keyframes _blink_pmy0j_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_pmy0j_13{transform:rotate(45deg)}._link_pmy0j_17{display:flex;align-items:center;padding:.75rem 1.5rem;gap:.5rem;width:100%;border-left:4px solid transparent;color:#779be7;white-space:nowrap;cursor:pointer;transition-property:color;transition-duration:.1s}._link_pmy0j_17:hover{color:#ff7597;background-color:#101010}._link_pmy0j_17:active{background-color:#ffffff1a}._link_pmy0j_17:focus{outline:2px solid #578AF4;background-color:#101010}._link_pmy0j_17._current_pmy0j_41{background-color:#1a1a1a;border-left:4px solid #779BE7}._blink_1wpyp_1{animation:_blink_1wpyp_1 1s step-start infinite}@keyframes _blink_1wpyp_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1wpyp_13{transform:rotate(45deg)}._linkIcon_1wpyp_17{margin-left:auto;transform:rotate(45deg)}._blink_1pu1m_1{animation:_blink_1pu1m_1 1s step-start infinite}@keyframes _blink_1pu1m_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1pu1m_13{transform:rotate(45deg)}._copytag_1pu1m_17{display:flex;align-items:center}._action_1pu1m_22{border-top-right-radius:0;border-bottom-right-radius:0}._label_1pu1m_27{border-radius:3px 0 0 3px;border:1px solid #262626;background-color:#ffffff08;padding-inline:.5rem 1rem;line-height:1em;display:flex;align-items:center;color:#8a8a8a}._small_1pu1m_38{height:1.5rem;font-size:calc(1rem - 3px)}._medium_1pu1m_43{height:2rem;font-size:calc(1rem - 2px)}._large_1pu1m_48{height:2.5rem;font-weight:600}._copy_1pu1m_17{border-top-left-radius:0;border-bottom-left-radius:0}._blink_elv9y_1{animation:_blink_elv9y_1 1s step-start infinite}@keyframes _blink_elv9y_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_elv9y_13{transform:rotate(45deg)}._header_elv9y_17{font-size:calc(1rem - 2px);margin-left:1rem;color:#6c6c6c}._interfaces_elv9y_23{padding:.5rem;display:flex;flex-wrap:wrap;gap:.5rem}._interfaceCopy_elv9y_30{display:flex;align-items:center}._goIcon_elv9y_35{transform:rotate(45deg);margin-left:.25rem;margin-bottom:.25rem}._blink_1f3q6_1{animation:_blink_1f3q6_1 1s step-start infinite}@keyframes _blink_1f3q6_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1f3q6_13{transform:rotate(45deg)}._separator_1f3q6_17{border-color:#ffffff1a}._backdrop_1f3q6_21{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000000b3;transition:opacity .3s cubic-bezier(.45,1.005,0,1.005)}._backdrop_1f3q6_21[data-starting-style],._backdrop_1f3q6_21[data-ending-style]{opacity:0}._drawer_1f3q6_31{box-sizing:border-box;position:fixed;top:0;left:0;bottom:0;width:22rem;height:100vh;display:flex;flex-direction:column;padding-block:1rem;background-color:#202020;color:#f6f6f6;border-right:1px solid #2d2d2d}._drawer_1f3q6_31[data-open]{transform:translate(0);transition:transform .3s cubic-bezier(.45,1.005,0,1.005)}._drawer_1f3q6_31[data-starting-style],._drawer_1f3q6_31[data-ending-style]{transform:translate(-100%);transition:transform .5s cubic-bezier(.45,1.005,0,1.005)}@media (max-width: 500px){._drawer_1f3q6_31{width:100vw}}._header_1f3q6_60{display:flex;align-items:center;justify-content:space-between;height:3.5rem;padding-inline:1.5rem;font-weight:600;font-size:1.25rem}._body_1f3q6_70{flex:1;overflow-y:auto}._note_1f3q6_75{margin-left:auto;color:#fff3}._blink_ypiou_1{animation:_blink_ypiou_1 1s step-start infinite}@keyframes _blink_ypiou_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_ypiou_13{transform:rotate(45deg)}._header_ypiou_17{font-size:2rem;padding-bottom:.5rem;border-bottom:1px solid rgba(255,255,255,.1);font-weight:600}._subheader_ypiou_24{font-size:1.5rem;padding-bottom:.5rem;font-weight:600;display:flex;align-items:center;justify-content:space-between}._title_ypiou_33{font-size:1.375rem;padding:0 2rem;font-weight:600;display:flex;align-items:center;justify-content:space-between;color:#cfcfcf}._section_ypiou_43,._indent_ypiou_44{font-size:calc(1rem - 1px);display:flex;flex-direction:column;gap:1rem;color:#f6f6f6}._section_ypiou_43{position:relative;margin-top:2rem;max-width:850px}._indent_ypiou_44{padding:1rem;background-color:#101010}._paragraph_ypiou_63{padding:.5rem 0}._card_ypiou_67{position:relative;padding:2rem;background-color:#ffffff08;border:1px solid #2d2d2d;border-radius:3px}._highlight_ypiou_75{font-size:calc(1rem - 2px);color:#ffbc56;padding-inline:.25rem}._blockquote_ypiou_81{padding-left:.5rem;border-left:2px solid #ececec;background-color:#ffffff08}._error_ypiou_87{font-size:calc(1rem - 2px);display:block;color:#fa5656}._pad_ypiou_93{padding:0 2rem;max-height:550px;overflow-y:scroll}._table_ypiou_99{width:100%;border-collapse:collapse;font-size:calc(1rem - 2px);text-align:left;margin-bottom:2rem}._table_ypiou_99 thead{position:sticky;top:0;z-index:100;background-color:#101010}._table_ypiou_99 th{font-weight:400;color:#b1b1b1;white-space:nowrap;text-transform:capitalize}._table_ypiou_99 th,._table_ypiou_99 td{padding:.5rem}._table_ypiou_99 tr:nth-child(2n){background-color:#ffffff03}._table_ypiou_99 tr[data-warn=true],._table_ypiou_99 td[data-warn=true]{background-color:#3d2900}._listGroup_ypiou_130{padding:0 2rem}._listGroup_ypiou_130>li:not(:last-child){border-bottom:1px solid rgba(255,255,255,.1)}._listItem_ypiou_137{display:grid;grid-template-columns:1fr auto;align-items:center;gap:1rem;padding:.5rem 0}._fieldTitle_ypiou_145{color:#f6f6f6;font-size:1rem}._fieldDescription_ypiou_150{font-size:calc(1rem - 2px);color:#b1b1b1}._fieldError_ypiou_155{font-size:calc(1rem - 2px);color:#fa5656}._divider_ypiou_160{border:none;border-top:1px solid rgba(255,255,255,.1);margin:1rem -2rem}._overlay_ypiou_166{position:absolute;z-index:300;width:100%;height:100%;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:grid;place-content:center;background-color:#0000001a}._loader_ypiou_177{width:4rem;height:4rem;background:#578af4;display:inline-block;border-radius:50%;box-sizing:border-box;animation:_animloader_ypiou_1 1s ease-in infinite}._empty_ypiou_187{background-color:#0000001a;text-align:center;color:#8a8a8a}._empty_ypiou_187 td{padding-block:5rem}._empty_ypiou_187 button{margin-top:1rem;margin-inline:auto}._inlineElements_ypiou_200{display:flex;align-items:center}._inlineElements_ypiou_200._inner_ypiou_204{gap:.5rem}._inlineElements_ypiou_200._component_ypiou_207{gap:1rem}._inlineElements_ypiou_200._start_ypiou_210{justify-content:flex-start}._inlineElements_ypiou_200._end_ypiou_213{justify-content:flex-end}._inlineElements_ypiou_200._apart_ypiou_216{justify-content:space-between}@keyframes _animloader_ypiou_1{0%{transform:scale(0);opacity:.6}to{transform:scale(1);opacity:0}}._blink_hxuk5_1{animation:_blink_hxuk5_1 1s step-start infinite}@keyframes _blink_hxuk5_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_hxuk5_13{transform:rotate(45deg)}._log_hxuk5_17{font-size:calc(1rem - 2px);overflow-y:auto;-webkit-user-select:text;user-select:text;min-height:20vh;max-height:40vh;background-color:#101010;padding:.5rem}._apart_hxuk5_27{margin-left:auto}._logEntry_hxuk5_31{display:flex}._logEntry_hxuk5_31._INFO_hxuk5_34{color:#b1b1b1}._logEntry_hxuk5_31._WARN_hxuk5_37{color:#ffbc56}._logEntry_hxuk5_31._ERROR_hxuk5_40{color:#fa5656}._logEntry_hxuk5_31:hover{color:#f6f6f6}._logEntry_hxuk5_31 ._time_hxuk5_46{width:4.5em}._logEntry_hxuk5_31 ._origin_hxuk5_49{width:6em}._logEntry_hxuk5_31 ._msg_hxuk5_52{flex:1}._buttonBar_hxuk5_56{flex-wrap:wrap;padding-bottom:.5rem}._blink_vno17_1{animation:_blink_vno17_1 1s step-start infinite}@keyframes _blink_vno17_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_vno17_13{transform:rotate(45deg)}._mirror_vno17_17{transform:rotate(180deg)}._loader_vno17_21{display:grid;place-items:center;background-color:var(--background-color-override, #101010);height:100vh}._ellipsis_vno17_28{display:inline-block;position:relative;width:5rem}._ellipsis_vno17_28 div{position:absolute;width:.5rem;height:.5rem;border-radius:50%;background-color:var(--accent-color-override, #ff7597);animation-timing-function:cubic-bezier(0,1,1,0)}._ellipsis_vno17_28 div:nth-child(1){left:.5rem;animation:_lds-ellipsis1_vno17_1 .6s infinite}._ellipsis_vno17_28 div:nth-child(2){left:.5rem;animation:_lds-ellipsis2_vno17_1 .6s infinite}._ellipsis_vno17_28 div:nth-child(3){left:2rem;animation:_lds-ellipsis2_vno17_1 .6s infinite}._ellipsis_vno17_28 div:nth-child(4){left:3.5rem;animation:_lds-ellipsis3_vno17_1 .6s infinite}@keyframes _lds-ellipsis1_vno17_1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes _lds-ellipsis2_vno17_1{0%{transform:translate(0)}to{transform:translate(1.5rem)}}@keyframes _lds-ellipsis3_vno17_1{0%{transform:scale(1)}to{transform:scale(0)}}._blink_1d1tc_1{animation:_blink_1d1tc_1 1s step-start infinite}@keyframes _blink_1d1tc_1{0%{opacity:100%}50%{opacity:20%}}._fourtyfive_1d1tc_13{transform:rotate(45deg)}._mirror_1d1tc_17{transform:rotate(180deg)}._notFound_1d1tc_21{display:grid;height:100vh;padding-top:20vh;background-color:var(--background-color-override, #101010)}._content_1d1tc_28{display:flex;flex-direction:column;color:#f6f6f6;align-items:center;text-align:center}.blink{animation:blink 1s step-start infinite}@keyframes blink{0%{opacity:100%}50%{opacity:20%}}.fourtyfive{transform:rotate(45deg)}@font-face{font-family:Open Sans;font-style:normal;font-display:swap;font-weight:300;src:url(./open-sans-latin-300-normal-BuA4N9V4.woff2) format("woff2"),url(./open-sans-latin-300-normal-B9VvyOsd.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Open Sans;font-style:normal;font-display:swap;font-weight:400;src:url(./open-sans-latin-400-normal-D-erVzNr.woff2) format("woff2"),url(./open-sans-latin-400-normal-CvJMf42F.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Open Sans;font-style:normal;font-display:swap;font-weight:600;src:url(./open-sans-latin-600-normal-B_B0eGjx.woff2) format("woff2"),url(./open-sans-latin-600-normal-Bd29oOVF.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;scrollbar-color:rgba(255,255,255,.2) rgba(255,255,255,.01);scrollbar-width:thin}body,html{font-size:15px;font-family:Open Sans,Segoe UI,sans-serif;-webkit-font-smoothing:antialiased;line-height:1.5}body,html,.App{margin:0 auto;overflow:hidden;overflow:clip;height:100vh;-webkit-user-select:none;user-select:none;-webkit-app-region:drag;isolation:isolate}button{all:unset;box-sizing:border-box}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}table{word-break:break-word}ul,ol{list-style:none;margin:0;padding:0}li{margin:0;padding:0}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}@media (max-width: 1600px){body,html,.App{font-size:14px}}::-webkit-scrollbar{width:6px;height:6px;-ms-overflow-style:-ms-autohiding-scrollbar}::-webkit-scrollbar-track{background:#ffffff03;border-radius:2px}::-webkit-scrollbar-thumb{background:#fff3;border-radius:2px}::-webkit-scrollbar-thumb:hover{background:#fff9}