@epic-web/workshop-app 6.7.0 → 6.8.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 (332) hide show
  1. package/build/client/assets/{_-RA5UCV6Y.js → _-CpCrf6jN.js} +2 -2
  2. package/build/client/assets/{_-RA5UCV6Y.js.map → _-CpCrf6jN.js.map} +1 -1
  3. package/build/client/assets/{_-G-R-Viwe.js → _-xwArvaaj.js} +2 -2
  4. package/build/client/assets/_-xwArvaaj.js.map +1 -0
  5. package/build/client/assets/{_basePickBy-BKcF0-AW.js → _basePickBy-B7DcKtP0.js} +2 -2
  6. package/build/client/assets/{_basePickBy-BKcF0-AW.js.map → _basePickBy-B7DcKtP0.js.map} +1 -1
  7. package/build/client/assets/{_baseUniq-BvklAPEW.js → _baseUniq-BkC-o_0f.js} +2 -2
  8. package/build/client/assets/{_baseUniq-BvklAPEW.js.map → _baseUniq-BkC-o_0f.js.map} +1 -1
  9. package/build/client/assets/{_exerciseNumber-CdjhOUH0.js → _exerciseNumber-Bb9Gd98i.js} +2 -2
  10. package/build/client/assets/{_exerciseNumber-CdjhOUH0.js.map → _exerciseNumber-Bb9Gd98i.js.map} +1 -1
  11. package/build/client/assets/{_exerciseNumber_._stepNumber-BdGagxnW.js → _exerciseNumber_._stepNumber-BsUtSwuL.js} +2 -2
  12. package/build/client/assets/{_exerciseNumber_._stepNumber-BdGagxnW.js.map → _exerciseNumber_._stepNumber-BsUtSwuL.js.map} +1 -1
  13. package/build/client/assets/_exerciseNumber_._stepNumber.index-D24AMDiw.js +2 -0
  14. package/build/client/assets/_exerciseNumber_._stepNumber.index-D24AMDiw.js.map +1 -0
  15. package/build/client/assets/{_exerciseNumber_.finished-DxKy11J1.js → _exerciseNumber_.finished-CU6TMubi.js} +2 -2
  16. package/build/client/assets/{_exerciseNumber_.finished-DxKy11J1.js.map → _exerciseNumber_.finished-CU6TMubi.js.map} +1 -1
  17. package/build/client/assets/{_layout-CJRZmnum.js → _layout-3e-ZYabs.js} +2 -2
  18. package/build/client/assets/{_layout-CJRZmnum.js.map → _layout-3e-ZYabs.js.map} +1 -1
  19. package/build/client/assets/{_layout-B8Gia3Nl.js → _layout-BC22zIgv.js} +2 -2
  20. package/build/client/assets/{_layout-B8Gia3Nl.js.map → _layout-BC22zIgv.js.map} +1 -1
  21. package/build/client/assets/_layout-DmtIXA1L.js +2 -0
  22. package/build/client/assets/{_layout-BcnIEBgy.js.map → _layout-DmtIXA1L.js.map} +1 -1
  23. package/build/client/assets/{_layout-DfZK3Orq.js → _layout-jWJDG9vA.js} +2 -2
  24. package/build/client/assets/{_layout-DfZK3Orq.js.map → _layout-jWJDG9vA.js.map} +1 -1
  25. package/build/client/assets/{accordion-BH7gGkbR.js → accordion-p0CQ5vm6.js} +2 -2
  26. package/build/client/assets/{accordion-BH7gGkbR.js.map → accordion-p0CQ5vm6.js.map} +1 -1
  27. package/build/client/assets/{account-CiGyCMzg.js → account-Bb1DvXib.js} +2 -2
  28. package/build/client/assets/{account-CiGyCMzg.js.map → account-Bb1DvXib.js.map} +1 -1
  29. package/build/client/assets/api._-D24AMDiw.js +2 -0
  30. package/build/client/assets/api._-D24AMDiw.js.map +1 -0
  31. package/build/client/assets/app-8oRDKBXF.js +2 -0
  32. package/build/client/assets/{app-CyTiXW7M.js.map → app-8oRDKBXF.js.map} +1 -1
  33. package/build/client/assets/app.epic_ws_.js_-D24AMDiw.js +2 -0
  34. package/build/client/assets/app.epic_ws_.js_-D24AMDiw.js.map +1 -0
  35. package/build/client/assets/apps-Bnfc6_HV.js +2 -0
  36. package/build/client/assets/apps-Bnfc6_HV.js.map +1 -0
  37. package/build/client/assets/apps-D24AMDiw.js +2 -0
  38. package/build/client/assets/apps-D24AMDiw.js.map +1 -0
  39. package/build/client/assets/{arc-DAs-semv.js → arc-C79k_FRJ.js} +2 -2
  40. package/build/client/assets/{arc-DAs-semv.js.map → arc-C79k_FRJ.js.map} +1 -1
  41. package/build/client/assets/{architectureDiagram-NQ2NVSRB-BR5U6n0X.js → architectureDiagram-NQ2NVSRB-DFqdtQx5.js} +2 -2
  42. package/build/client/assets/{architectureDiagram-NQ2NVSRB-BR5U6n0X.js.map → architectureDiagram-NQ2NVSRB-DFqdtQx5.js.map} +1 -1
  43. package/build/client/assets/{blockDiagram-PHRCVELO-BwrQ8LT8.js → blockDiagram-PHRCVELO-CLDGwP3s.js} +2 -2
  44. package/build/client/assets/{blockDiagram-PHRCVELO-BwrQ8LT8.js.map → blockDiagram-PHRCVELO-CLDGwP3s.js.map} +1 -1
  45. package/build/client/assets/{button-Cd-BxHRD.js → button-Ch7Uop3u.js} +2 -2
  46. package/build/client/assets/{button-Cd-BxHRD.js.map → button-Ch7Uop3u.js.map} +1 -1
  47. package/build/client/assets/{c4Diagram-6F6E4RAY-BrsPZoIx.js → c4Diagram-6F6E4RAY-BBQCk9TU.js} +2 -2
  48. package/build/client/assets/{c4Diagram-6F6E4RAY-BrsPZoIx.js.map → c4Diagram-6F6E4RAY-BBQCk9TU.js.map} +1 -1
  49. package/build/client/assets/cache-D24AMDiw.js +2 -0
  50. package/build/client/assets/cache-D24AMDiw.js.map +1 -0
  51. package/build/client/assets/channel-DG6YfMAU.js +2 -0
  52. package/build/client/assets/{channel-CMZAdn9l.js.map → channel-DG6YfMAU.js.map} +1 -1
  53. package/build/client/assets/{chunk-353BL4L5-BVlvTrcL.js → chunk-353BL4L5-DbswLswh.js} +2 -2
  54. package/build/client/assets/{chunk-353BL4L5-BVlvTrcL.js.map → chunk-353BL4L5-DbswLswh.js.map} +1 -1
  55. package/build/client/assets/{chunk-67H74DCK-CacQOfzi.js → chunk-67H74DCK-ClAoZs1x.js} +2 -2
  56. package/build/client/assets/{chunk-67H74DCK-CacQOfzi.js.map → chunk-67H74DCK-ClAoZs1x.js.map} +1 -1
  57. package/build/client/assets/{chunk-6OLS64BW-B-F2XJNy.js → chunk-6OLS64BW-DvnZyBw-.js} +2 -2
  58. package/build/client/assets/{chunk-6OLS64BW-B-F2XJNy.js.map → chunk-6OLS64BW-DvnZyBw-.js.map} +1 -1
  59. package/build/client/assets/{chunk-AACKK3MU-B8RHGQsd.js → chunk-AACKK3MU-CJR9qwY4.js} +2 -2
  60. package/build/client/assets/{chunk-AACKK3MU-B8RHGQsd.js.map → chunk-AACKK3MU-CJR9qwY4.js.map} +1 -1
  61. package/build/client/assets/{chunk-BFAMUDN2-Bcqf7zB7.js → chunk-BFAMUDN2-CbeFS58Y.js} +2 -2
  62. package/build/client/assets/{chunk-BFAMUDN2-Bcqf7zB7.js.map → chunk-BFAMUDN2-CbeFS58Y.js.map} +1 -1
  63. package/build/client/assets/{chunk-E2GYISFI-By4dq5cZ.js → chunk-E2GYISFI-BJqsMg78.js} +2 -2
  64. package/build/client/assets/{chunk-E2GYISFI-By4dq5cZ.js.map → chunk-E2GYISFI-BJqsMg78.js.map} +1 -1
  65. package/build/client/assets/{chunk-QEP2MXWD-D_ha-vhV.js → chunk-QEP2MXWD-23t0J6EI.js} +2 -2
  66. package/build/client/assets/{chunk-QEP2MXWD-D_ha-vhV.js.map → chunk-QEP2MXWD-23t0J6EI.js.map} +1 -1
  67. package/build/client/assets/{chunk-QMGIS6GS-BqoFcGjf.js → chunk-QMGIS6GS-BuHkd1At.js} +2 -2
  68. package/build/client/assets/{chunk-QMGIS6GS-BqoFcGjf.js.map → chunk-QMGIS6GS-BuHkd1At.js.map} +1 -1
  69. package/build/client/assets/{chunk-SKB7J2MH-DCg2gmVH.js → chunk-SKB7J2MH-CKQSqbrc.js} +2 -2
  70. package/build/client/assets/{chunk-SKB7J2MH-DCg2gmVH.js.map → chunk-SKB7J2MH-CKQSqbrc.js.map} +1 -1
  71. package/build/client/assets/classDiagram-BGRH5UQR-DiAn8p5L.js +2 -0
  72. package/build/client/assets/{classDiagram-BGRH5UQR-Duht50N4.js.map → classDiagram-BGRH5UQR-DiAn8p5L.js.map} +1 -1
  73. package/build/client/assets/classDiagram-v2-O24JOBDK-DiAn8p5L.js +2 -0
  74. package/build/client/assets/{classDiagram-v2-O24JOBDK-Duht50N4.js.map → classDiagram-v2-O24JOBDK-DiAn8p5L.js.map} +1 -1
  75. package/build/client/assets/clone-YGwK7Wtx.js +2 -0
  76. package/build/client/assets/{clone-SIOB8anM.js.map → clone-YGwK7Wtx.js.map} +1 -1
  77. package/build/client/assets/{dagre-FFZHY6LT-Bb4rJLl5.js → dagre-FFZHY6LT-B8nDZnfR.js} +2 -2
  78. package/build/client/assets/{dagre-FFZHY6LT-Bb4rJLl5.js.map → dagre-FFZHY6LT-B8nDZnfR.js.map} +1 -1
  79. package/build/client/assets/{diagram-3EMPZRKU-Fu_J2nFi.js → diagram-3EMPZRKU-JJhQJJTe.js} +2 -2
  80. package/build/client/assets/{diagram-3EMPZRKU-Fu_J2nFi.js.map → diagram-3EMPZRKU-JJhQJJTe.js.map} +1 -1
  81. package/build/client/assets/{diagram-5UYTHUR4-DpN_D4Sp.js → diagram-5UYTHUR4-Bih2JB8a.js} +2 -2
  82. package/build/client/assets/{diagram-5UYTHUR4-DpN_D4Sp.js.map → diagram-5UYTHUR4-Bih2JB8a.js.map} +1 -1
  83. package/build/client/assets/{diagram-ZTM2IBQH-Btvn1JQN.js → diagram-ZTM2IBQH-OAysI3zq.js} +2 -2
  84. package/build/client/assets/{diagram-ZTM2IBQH-Btvn1JQN.js.map → diagram-ZTM2IBQH-OAysI3zq.js.map} +1 -1
  85. package/build/client/assets/{diff-CX9e6Tpo.js → diff-B4KLvJ8D.js} +2 -2
  86. package/build/client/assets/{diff-CX9e6Tpo.js.map → diff-B4KLvJ8D.js.map} +1 -1
  87. package/build/client/assets/diff-CazioZHu.js +2 -0
  88. package/build/client/assets/{diff-DlLAFLkx.js.map → diff-CazioZHu.js.map} +1 -1
  89. package/build/client/assets/discord-D6XANWj9.js +2 -0
  90. package/build/client/assets/discord-D6XANWj9.js.map +1 -0
  91. package/build/client/assets/{discord-Cm-rJhHt.js → discord-bx0FMRpb.js} +2 -2
  92. package/build/client/assets/{discord-Cm-rJhHt.js.map → discord-bx0FMRpb.js.map} +1 -1
  93. package/build/client/assets/{entry.client-DS-phTbK.js → entry.client-CWoOCekw.js} +2 -2
  94. package/build/client/assets/{entry.client-DS-phTbK.js.map → entry.client-CWoOCekw.js.map} +1 -1
  95. package/build/client/assets/{epic-video-B4JXxTHF.js → epic-video-wBXopVA9.js} +2 -2
  96. package/build/client/assets/{epic-video-B4JXxTHF.js.map → epic-video-wBXopVA9.js.map} +1 -1
  97. package/build/client/assets/epic_ws_.js_-D24AMDiw.js +2 -0
  98. package/build/client/assets/epic_ws_.js_-D24AMDiw.js.map +1 -0
  99. package/build/client/assets/{erDiagram-R3QVA2FD-ClvAyR7i.js → erDiagram-R3QVA2FD-B-Rgwgig.js} +2 -2
  100. package/build/client/assets/{erDiagram-R3QVA2FD-ClvAyR7i.js.map → erDiagram-R3QVA2FD-B-Rgwgig.js.map} +1 -1
  101. package/build/client/assets/{error-boundary-D_qLhpVo.js → error-boundary-Ya2xPEcG.js} +2 -2
  102. package/build/client/assets/{error-boundary-D_qLhpVo.js.map → error-boundary-Ya2xPEcG.js.map} +1 -1
  103. package/build/client/assets/exercises-D24AMDiw.js +2 -0
  104. package/build/client/assets/exercises-D24AMDiw.js.map +1 -0
  105. package/build/client/assets/{finished-CLqNCCNl.js → finished-DoQsRrQR.js} +2 -2
  106. package/build/client/assets/{finished-CLqNCCNl.js.map → finished-DoQsRrQR.js.map} +1 -1
  107. package/build/client/assets/{flowDiagram-PKI6S5ZS-BnSj5Mt5.js → flowDiagram-PKI6S5ZS-mTM9LaGi.js} +2 -2
  108. package/build/client/assets/{flowDiagram-PKI6S5ZS-BnSj5Mt5.js.map → flowDiagram-PKI6S5ZS-mTM9LaGi.js.map} +1 -1
  109. package/build/client/assets/{ganttDiagram-EK5VF46D-D_8KA0sL.js → ganttDiagram-EK5VF46D-CwuB084N.js} +2 -2
  110. package/build/client/assets/{ganttDiagram-EK5VF46D-D_8KA0sL.js.map → ganttDiagram-EK5VF46D-CwuB084N.js.map} +1 -1
  111. package/build/client/assets/{gitGraphDiagram-GW3U2K7C-BCDstkZh.js → gitGraphDiagram-GW3U2K7C-oon-ITXK.js} +2 -2
  112. package/build/client/assets/{gitGraphDiagram-GW3U2K7C-BCDstkZh.js.map → gitGraphDiagram-GW3U2K7C-oon-ITXK.js.map} +1 -1
  113. package/build/client/assets/{graph-B7uq4GCd.js → graph-nHnZ25qN.js} +2 -2
  114. package/build/client/assets/{graph-B7uq4GCd.js.map → graph-nHnZ25qN.js.map} +1 -1
  115. package/build/client/assets/healthcheck-D24AMDiw.js +2 -0
  116. package/build/client/assets/healthcheck-D24AMDiw.js.map +1 -0
  117. package/build/client/assets/{index-C4iAiEH3.js → index-BDjKpcj7.js} +2 -2
  118. package/build/client/assets/{index-C4iAiEH3.js.map → index-BDjKpcj7.js.map} +1 -1
  119. package/build/client/assets/{index-DR_34ZYa.js → index-BgoVp_dk.js} +2 -2
  120. package/build/client/assets/{index-DR_34ZYa.js.map → index-BgoVp_dk.js.map} +1 -1
  121. package/build/client/assets/index-Bnfc6_HV.js +2 -0
  122. package/build/client/assets/index-Bnfc6_HV.js.map +1 -0
  123. package/build/client/assets/{index-D7ZeZY2i.js → index-C2HHQicP.js} +2 -2
  124. package/build/client/assets/{index-D7ZeZY2i.js.map → index-C2HHQicP.js.map} +1 -1
  125. package/build/client/assets/index-C8CsVerV.js +2 -0
  126. package/build/client/assets/index-C8CsVerV.js.map +1 -0
  127. package/build/client/assets/{index-BB83dTUq.js → index-CI0WtQhq.js} +2 -2
  128. package/build/client/assets/{index-BB83dTUq.js.map → index-CI0WtQhq.js.map} +1 -1
  129. package/build/client/assets/index-D24AMDiw.js +2 -0
  130. package/build/client/assets/index-D24AMDiw.js.map +1 -0
  131. package/build/client/assets/{index-pxOSLlr-.js → index-DS_T1Pig.js} +2 -2
  132. package/build/client/assets/{index-pxOSLlr-.js.map → index-DS_T1Pig.js.map} +1 -1
  133. package/build/client/assets/{index-BSBvQmto.js → index-DU9y1pxC.js} +2 -2
  134. package/build/client/assets/{index-BSBvQmto.js.map → index-DU9y1pxC.js.map} +1 -1
  135. package/build/client/assets/{index-BThnqlh8.js → index-DxAxGW-O.js} +2 -2
  136. package/build/client/assets/{index-BThnqlh8.js.map → index-DxAxGW-O.js.map} +1 -1
  137. package/build/client/assets/{index-Cl_eeQ7o.js → index-Ha5nb6JW.js} +2 -2
  138. package/build/client/assets/{index-Cl_eeQ7o.js.map → index-Ha5nb6JW.js.map} +1 -1
  139. package/build/client/assets/{index-JuycBjpd.js → index-KzNJpW8p.js} +2 -2
  140. package/build/client/assets/{index-JuycBjpd.js.map → index-KzNJpW8p.js.map} +1 -1
  141. package/build/client/assets/infoDiagram-RLU2ROGC-CjNzsoEo.js +3 -0
  142. package/build/client/assets/{infoDiagram-RLU2ROGC-BPYvA0_W.js.map → infoDiagram-RLU2ROGC-CjNzsoEo.js.map} +1 -1
  143. package/build/client/assets/{journeyDiagram-EWQZEKCU-ChjoTddJ.js → journeyDiagram-EWQZEKCU-_W2YT3Wm.js} +2 -2
  144. package/build/client/assets/{journeyDiagram-EWQZEKCU-ChjoTddJ.js.map → journeyDiagram-EWQZEKCU-_W2YT3Wm.js.map} +1 -1
  145. package/build/client/assets/{jsx-runtime-DopJAmxb.js → jsx-runtime-DwNMUGRi.js} +2 -2
  146. package/build/client/assets/{jsx-runtime-DopJAmxb.js.map → jsx-runtime-DwNMUGRi.js.map} +1 -1
  147. package/build/client/assets/{kanban-definition-ILFWEQ3N-COlCITk3.js → kanban-definition-ILFWEQ3N-Ct1wI-Sd.js} +2 -2
  148. package/build/client/assets/{kanban-definition-ILFWEQ3N-COlCITk3.js.map → kanban-definition-ILFWEQ3N-Ct1wI-Sd.js.map} +1 -1
  149. package/build/client/assets/l-BrJpKyG9.js +2 -0
  150. package/build/client/assets/{l-DWxOr6mJ.js.map → l-BrJpKyG9.js.map} +1 -1
  151. package/build/client/assets/launch-editor-D24AMDiw.js +2 -0
  152. package/build/client/assets/launch-editor-D24AMDiw.js.map +1 -0
  153. package/build/client/assets/{layout-icKzOCsu.js → layout-CsRL3Svs.js} +2 -2
  154. package/build/client/assets/{layout-icKzOCsu.js.map → layout-CsRL3Svs.js.map} +1 -1
  155. package/build/client/assets/{linear-Bt2Z5LIl.js → linear-DCioa5HU.js} +2 -2
  156. package/build/client/assets/{linear-Bt2Z5LIl.js.map → linear-DCioa5HU.js.map} +1 -1
  157. package/build/client/assets/{loading-DzyW6U9J.js → loading-D4LMH5BS.js} +2 -2
  158. package/build/client/assets/{loading-DzyW6U9J.js.map → loading-D4LMH5BS.js.map} +1 -1
  159. package/build/client/assets/{login-8bQZjgAP.js → login-CEGeaUXh.js} +2 -2
  160. package/build/client/assets/{login-8bQZjgAP.js.map → login-CEGeaUXh.js.map} +1 -1
  161. package/build/client/assets/login-sse-D24AMDiw.js +2 -0
  162. package/build/client/assets/login-sse-D24AMDiw.js.map +1 -0
  163. package/build/client/assets/lookout-D24AMDiw.js +2 -0
  164. package/build/client/assets/lookout-D24AMDiw.js.map +1 -0
  165. package/build/client/assets/manifest-c3af6a7e.js +1 -0
  166. package/build/client/assets/{mdx-DXkB3-D7.js → mdx-B12CHovS.js} +3 -3
  167. package/build/client/assets/{mdx-DXkB3-D7.js.map → mdx-B12CHovS.js.map} +1 -1
  168. package/build/client/assets/{mermaid.core-CrizYspT.js → mermaid.core-b_OJ0H-L.js} +5 -5
  169. package/build/client/assets/{mermaid.core-CrizYspT.js.map → mermaid.core-b_OJ0H-L.js.map} +1 -1
  170. package/build/client/assets/{mindmap-definition-CZNETY7S-DBN8X_3u.js → mindmap-definition-CZNETY7S-CU0a40h5.js} +2 -2
  171. package/build/client/assets/{mindmap-definition-CZNETY7S-DBN8X_3u.js.map → mindmap-definition-CZNETY7S-CU0a40h5.js.map} +1 -1
  172. package/build/client/assets/{misc-CsXWl7t3.js → misc-BSfaml-C.js} +2 -2
  173. package/build/client/assets/{misc-CsXWl7t3.js.map → misc-BSfaml-C.js.map} +1 -1
  174. package/build/client/assets/{nav-chevrons-0RRCRP4K.js → nav-chevrons-ByNU2Qnp.js} +2 -2
  175. package/build/client/assets/{nav-chevrons-0RRCRP4K.js.map → nav-chevrons-ByNU2Qnp.js.map} +1 -1
  176. package/build/client/assets/notifications-D24AMDiw.js +2 -0
  177. package/build/client/assets/notifications-D24AMDiw.js.map +1 -0
  178. package/build/client/assets/og-D24AMDiw.js +2 -0
  179. package/build/client/assets/og-D24AMDiw.js.map +1 -0
  180. package/build/client/assets/{onboarding-ConhwKVl.js → onboarding-Dsiwf8Jp.js} +2 -2
  181. package/build/client/assets/{onboarding-ConhwKVl.js.map → onboarding-Dsiwf8Jp.js.map} +1 -1
  182. package/build/client/assets/{online-DjmMmyzh.js → online-DjW0DI_3.js} +2 -2
  183. package/build/client/assets/{online-DjmMmyzh.js.map → online-DjW0DI_3.js.map} +1 -1
  184. package/build/client/assets/{pe-BxKs4avg.js → pe-B8wMI5OT.js} +2 -2
  185. package/build/client/assets/{pe-BxKs4avg.js.map → pe-B8wMI5OT.js.map} +1 -1
  186. package/build/client/assets/{pieDiagram-NIOCPIFQ-DlL2hpNr.js → pieDiagram-NIOCPIFQ-mbsQZmdh.js} +2 -2
  187. package/build/client/assets/{pieDiagram-NIOCPIFQ-DlL2hpNr.js.map → pieDiagram-NIOCPIFQ-mbsQZmdh.js.map} +1 -1
  188. package/build/client/assets/{preferences-CjP53W7A.js → preferences-DTuNadT-.js} +2 -2
  189. package/build/client/assets/{preferences-CjP53W7A.js.map → preferences-DTuNadT-.js.map} +1 -1
  190. package/build/client/assets/{presence-DoNqcvqY.js → presence-u1hS2acR.js} +2 -2
  191. package/build/client/assets/{presence-DoNqcvqY.js.map → presence-u1hS2acR.js.map} +1 -1
  192. package/build/client/assets/{preview-Ck0XwJvb.js → preview-BOAFmc1F.js} +2 -2
  193. package/build/client/assets/{preview-Ck0XwJvb.js.map → preview-BOAFmc1F.js.map} +1 -1
  194. package/build/client/assets/processes-D24AMDiw.js +2 -0
  195. package/build/client/assets/processes-D24AMDiw.js.map +1 -0
  196. package/build/client/assets/{product-CQ9A9ZrK.js → product-B06zPnGr.js} +2 -2
  197. package/build/client/assets/{product-CQ9A9ZrK.js.map → product-B06zPnGr.js.map} +1 -1
  198. package/build/client/assets/progress-D24AMDiw.js +2 -0
  199. package/build/client/assets/progress-D24AMDiw.js.map +1 -0
  200. package/build/client/assets/{progress-bar-t9g4gI_5.js → progress-bar-CUlGRzhp.js} +2 -2
  201. package/build/client/assets/{progress-bar-t9g4gI_5.js.map → progress-bar-CUlGRzhp.js.map} +1 -1
  202. package/build/client/assets/{progress-C8g3Uhn9.js → progress-v5BhNo4r.js} +2 -2
  203. package/build/client/assets/{progress-C8g3Uhn9.js.map → progress-v5BhNo4r.js.map} +1 -1
  204. package/build/client/assets/{quadrantDiagram-2OG54O6I-BlqbHNID.js → quadrantDiagram-2OG54O6I-Z9drpjLX.js} +2 -2
  205. package/build/client/assets/{quadrantDiagram-2OG54O6I-BlqbHNID.js.map → quadrantDiagram-2OG54O6I-Z9drpjLX.js.map} +1 -1
  206. package/build/client/assets/{requirementDiagram-SO3GGRV7-DuQJ8uHQ.js → requirementDiagram-SO3GGRV7-CjNOZ055.js} +2 -2
  207. package/build/client/assets/{requirementDiagram-SO3GGRV7-DuQJ8uHQ.js.map → requirementDiagram-SO3GGRV7-CjNOZ055.js.map} +1 -1
  208. package/build/client/assets/{revalidation-ws-CD9vOUzQ.js → revalidation-ws-DtsnySpI.js} +2 -2
  209. package/build/client/assets/{revalidation-ws-CD9vOUzQ.js.map → revalidation-ws-DtsnySpI.js.map} +1 -1
  210. package/build/client/assets/robots_._txt-D24AMDiw.js +2 -0
  211. package/build/client/assets/robots_._txt-D24AMDiw.js.map +1 -0
  212. package/build/client/assets/{root-D0ZUIMQK.js → root-DENf0ni6.js} +2 -2
  213. package/build/client/assets/{root-D0ZUIMQK.js.map → root-DENf0ni6.js.map} +1 -1
  214. package/build/client/assets/{sankeyDiagram-4UZDY2LN-GW08zCDc.js → sankeyDiagram-4UZDY2LN-JgaeEi3J.js} +2 -2
  215. package/build/client/assets/{sankeyDiagram-4UZDY2LN-GW08zCDc.js.map → sankeyDiagram-4UZDY2LN-JgaeEi3J.js.map} +1 -1
  216. package/build/client/assets/{seo-BzJSnhSb.js → seo-8jioTbYg.js} +2 -2
  217. package/build/client/assets/{seo-BzJSnhSb.js.map → seo-8jioTbYg.js.map} +1 -1
  218. package/build/client/assets/{sequenceDiagram-ZIKVLSP4-CRl46gQx.js → sequenceDiagram-ZIKVLSP4-B5e9Pj6g.js} +2 -2
  219. package/build/client/assets/{sequenceDiagram-ZIKVLSP4-CRl46gQx.js.map → sequenceDiagram-ZIKVLSP4-B5e9Pj6g.js.map} +1 -1
  220. package/build/client/assets/{set-playground-Dd3h4x5X.js → set-playground-CVNElLx0.js} +2 -2
  221. package/build/client/assets/{set-playground-Dd3h4x5X.js.map → set-playground-CVNElLx0.js.map} +1 -1
  222. package/build/client/assets/set-playground-D24AMDiw.js +2 -0
  223. package/build/client/assets/set-playground-D24AMDiw.js.map +1 -0
  224. package/build/client/assets/sitemap_._xml-D24AMDiw.js +2 -0
  225. package/build/client/assets/sitemap_._xml-D24AMDiw.js.map +1 -0
  226. package/build/client/assets/start-D24AMDiw.js +2 -0
  227. package/build/client/assets/start-D24AMDiw.js.map +1 -0
  228. package/build/client/assets/{stateDiagram-XX37X6EN-MD55OQF0.js → stateDiagram-XX37X6EN-BfCPZCSK.js} +2 -2
  229. package/build/client/assets/{stateDiagram-XX37X6EN-MD55OQF0.js.map → stateDiagram-XX37X6EN-BfCPZCSK.js.map} +1 -1
  230. package/build/client/assets/stateDiagram-v2-GD6S3NHB-DpZ_t4Jt.js +2 -0
  231. package/build/client/assets/{stateDiagram-v2-GD6S3NHB-D-xgcWLB.js.map → stateDiagram-v2-GD6S3NHB-DpZ_t4Jt.js.map} +1 -1
  232. package/build/client/assets/{support-B6duAdc4.js → support-B0OAsn6o.js} +2 -2
  233. package/build/client/assets/{support-B6duAdc4.js.map → support-B0OAsn6o.js.map} +1 -1
  234. package/build/client/assets/test-D24AMDiw.js +2 -0
  235. package/build/client/assets/test-D24AMDiw.js.map +1 -0
  236. package/build/client/assets/test-DG9-l1OH.js +2 -0
  237. package/build/client/assets/{test-BzeWdf7l.js.map → test-DG9-l1OH.js.map} +1 -1
  238. package/build/client/assets/test._testName-D24AMDiw.js +2 -0
  239. package/build/client/assets/test._testName-D24AMDiw.js.map +1 -0
  240. package/build/client/assets/test.epic_ws_.js_-D24AMDiw.js +2 -0
  241. package/build/client/assets/test.epic_ws_.js_-D24AMDiw.js.map +1 -0
  242. package/build/client/assets/{tests-BhixzMby.js → tests-BybHkW5g.js} +2 -2
  243. package/build/client/assets/{tests-BhixzMby.js.map → tests-BybHkW5g.js.map} +1 -1
  244. package/build/client/assets/{timeline-definition-RI47OAVP-BMHXH48c.js → timeline-definition-RI47OAVP-CBGT_FJT.js} +2 -2
  245. package/build/client/assets/{timeline-definition-RI47OAVP-BMHXH48c.js.map → timeline-definition-RI47OAVP-CBGT_FJT.js.map} +1 -1
  246. package/build/client/assets/{tooltip-qn6hWSiF.js → tooltip-Czb6Ovbu.js} +2 -2
  247. package/build/client/assets/{tooltip-qn6hWSiF.js.map → tooltip-Czb6Ovbu.js.map} +1 -1
  248. package/build/client/assets/{treemap-FKARHQ26-C_NdmlNe.js → treemap-FKARHQ26-BIgVs0_z.js} +2 -2
  249. package/build/client/assets/{treemap-FKARHQ26-C_NdmlNe.js.map → treemap-FKARHQ26-BIgVs0_z.js.map} +1 -1
  250. package/build/client/assets/{use-event-source-CRTTb6CH.js → use-event-source-C6fRKOfs.js} +2 -2
  251. package/build/client/assets/{use-event-source-CRTTb6CH.js.map → use-event-source-C6fRKOfs.js.map} +1 -1
  252. package/build/client/assets/{user-BKgwXxoQ.js → user-C0q7xoFQ.js} +2 -2
  253. package/build/client/assets/{user-BKgwXxoQ.js.map → user-C0q7xoFQ.js.map} +1 -1
  254. package/build/client/assets/{version-CPNwjxHp.js → version-Bjkp1RyG.js} +2 -2
  255. package/build/client/assets/{version-CPNwjxHp.js.map → version-Bjkp1RyG.js.map} +1 -1
  256. package/build/client/assets/workshop-config-B8s2UB74.js +2 -0
  257. package/build/client/assets/{workshop-config-DJEL9dz_.js.map → workshop-config-B8s2UB74.js.map} +1 -1
  258. package/build/client/assets/{workspace-structure-CSRqlwXn.js → workspace-structure-BvwUIWnY.js} +2 -2
  259. package/build/client/assets/{workspace-structure-CSRqlwXn.js.map → workspace-structure-BvwUIWnY.js.map} +1 -1
  260. package/build/client/assets/{xychartDiagram-H2YORKM3-BTq3Izkz.js → xychartDiagram-H2YORKM3-Yt0ZA7uK.js} +2 -2
  261. package/build/client/assets/{xychartDiagram-H2YORKM3-BTq3Izkz.js.map → xychartDiagram-H2YORKM3-Yt0ZA7uK.js.map} +1 -1
  262. package/build/server/index.js +2 -2
  263. package/dist/server/index.js +2 -0
  264. package/package.json +1 -1
  265. package/build/client/assets/_-G-R-Viwe.js.map +0 -1
  266. package/build/client/assets/_exerciseNumber_._stepNumber.index-BTlRid8y.js +0 -2
  267. package/build/client/assets/_exerciseNumber_._stepNumber.index-BTlRid8y.js.map +0 -1
  268. package/build/client/assets/_layout-BcnIEBgy.js +0 -2
  269. package/build/client/assets/api._-BTlRid8y.js +0 -2
  270. package/build/client/assets/api._-BTlRid8y.js.map +0 -1
  271. package/build/client/assets/app-CyTiXW7M.js +0 -2
  272. package/build/client/assets/app.epic_ws_.js_-BTlRid8y.js +0 -2
  273. package/build/client/assets/app.epic_ws_.js_-BTlRid8y.js.map +0 -1
  274. package/build/client/assets/apps-BTlRid8y.js +0 -2
  275. package/build/client/assets/apps-BTlRid8y.js.map +0 -1
  276. package/build/client/assets/apps-BVIn0kAJ.js +0 -2
  277. package/build/client/assets/apps-BVIn0kAJ.js.map +0 -1
  278. package/build/client/assets/cache-BTlRid8y.js +0 -2
  279. package/build/client/assets/cache-BTlRid8y.js.map +0 -1
  280. package/build/client/assets/channel-CMZAdn9l.js +0 -2
  281. package/build/client/assets/classDiagram-BGRH5UQR-Duht50N4.js +0 -2
  282. package/build/client/assets/classDiagram-v2-O24JOBDK-Duht50N4.js +0 -2
  283. package/build/client/assets/clone-SIOB8anM.js +0 -2
  284. package/build/client/assets/diff-DlLAFLkx.js +0 -2
  285. package/build/client/assets/discord-DaIQFRAU.js +0 -2
  286. package/build/client/assets/discord-DaIQFRAU.js.map +0 -1
  287. package/build/client/assets/epic_ws_.js_-BTlRid8y.js +0 -2
  288. package/build/client/assets/epic_ws_.js_-BTlRid8y.js.map +0 -1
  289. package/build/client/assets/exercises-BTlRid8y.js +0 -2
  290. package/build/client/assets/exercises-BTlRid8y.js.map +0 -1
  291. package/build/client/assets/healthcheck-BTlRid8y.js +0 -2
  292. package/build/client/assets/healthcheck-BTlRid8y.js.map +0 -1
  293. package/build/client/assets/index-B5df6GWU.js +0 -2
  294. package/build/client/assets/index-B5df6GWU.js.map +0 -1
  295. package/build/client/assets/index-BTlRid8y.js +0 -2
  296. package/build/client/assets/index-BTlRid8y.js.map +0 -1
  297. package/build/client/assets/index-BVIn0kAJ.js +0 -2
  298. package/build/client/assets/index-BVIn0kAJ.js.map +0 -1
  299. package/build/client/assets/infoDiagram-RLU2ROGC-BPYvA0_W.js +0 -3
  300. package/build/client/assets/l-DWxOr6mJ.js +0 -2
  301. package/build/client/assets/launch-editor-BTlRid8y.js +0 -2
  302. package/build/client/assets/launch-editor-BTlRid8y.js.map +0 -1
  303. package/build/client/assets/login-sse-BTlRid8y.js +0 -2
  304. package/build/client/assets/login-sse-BTlRid8y.js.map +0 -1
  305. package/build/client/assets/lookout-BTlRid8y.js +0 -2
  306. package/build/client/assets/lookout-BTlRid8y.js.map +0 -1
  307. package/build/client/assets/manifest-8ebc8512.js +0 -1
  308. package/build/client/assets/notifications-BTlRid8y.js +0 -2
  309. package/build/client/assets/notifications-BTlRid8y.js.map +0 -1
  310. package/build/client/assets/og-BTlRid8y.js +0 -2
  311. package/build/client/assets/og-BTlRid8y.js.map +0 -1
  312. package/build/client/assets/processes-BTlRid8y.js +0 -2
  313. package/build/client/assets/processes-BTlRid8y.js.map +0 -1
  314. package/build/client/assets/progress-BTlRid8y.js +0 -2
  315. package/build/client/assets/progress-BTlRid8y.js.map +0 -1
  316. package/build/client/assets/robots_._txt-BTlRid8y.js +0 -2
  317. package/build/client/assets/robots_._txt-BTlRid8y.js.map +0 -1
  318. package/build/client/assets/set-playground-BTlRid8y.js +0 -2
  319. package/build/client/assets/set-playground-BTlRid8y.js.map +0 -1
  320. package/build/client/assets/sitemap_._xml-BTlRid8y.js +0 -2
  321. package/build/client/assets/sitemap_._xml-BTlRid8y.js.map +0 -1
  322. package/build/client/assets/start-BTlRid8y.js +0 -2
  323. package/build/client/assets/start-BTlRid8y.js.map +0 -1
  324. package/build/client/assets/stateDiagram-v2-GD6S3NHB-D-xgcWLB.js +0 -2
  325. package/build/client/assets/test-BTlRid8y.js +0 -2
  326. package/build/client/assets/test-BTlRid8y.js.map +0 -1
  327. package/build/client/assets/test-BzeWdf7l.js +0 -2
  328. package/build/client/assets/test._testName-BTlRid8y.js +0 -2
  329. package/build/client/assets/test._testName-BTlRid8y.js.map +0 -1
  330. package/build/client/assets/test.epic_ws_.js_-BTlRid8y.js +0 -2
  331. package/build/client/assets/test.epic_ws_.js_-BTlRid8y.js.map +0 -1
  332. package/build/client/assets/workshop-config-DJEL9dz_.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"_layout-B8Gia3Nl.js","sources":["../../../app/routes/admin+/_layout.tsx"],"sourcesContent":["import { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport { Link, Outlet } from 'react-router'\nimport { type RootLoaderData } from '#app/root.tsx'\nimport { type Route } from './+types/_layout.tsx'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => null,\n}\n\nexport const meta: Route.MetaFunction = ({ matches }) => {\n\tconst rootData = matches.find((m) => m?.id === 'root')?.data as RootLoaderData\n\treturn [{ title: `👷 | ${rootData?.workshopTitle}` }]\n}\n\nexport default function AdminLayout() {\n\treturn (\n\t\t<main className=\"container mx-auto mt-8\">\n\t\t\t<h1 className=\"text-4xl font-bold\">Admin</h1>\n\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t<nav>\n\t\t\t\t\t<ul className=\"flex gap-3\">\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/\">\n\t\t\t\t\t\t\t\tHome\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/admin\">\n\t\t\t\t\t\t\t\tAdmin\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/diff\">\n\t\t\t\t\t\t\t\tDiff Viewer\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"version\">\n\t\t\t\t\t\t\t\tVersion\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\t\t\t\t<Outlet />\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n"],"names":["handle","getSitemapEntries","meta","matches","title","find","m","id","data","workshopTitle","_layout","_UNSAFE_withComponentProps","jsxs","className","children","jsx","Link","to","Outlet"],"mappings":"qIAKO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,IAC1B,EAEaC,EAA2BA,CAAC,CAAEC,QAAAA,CAAQ,IAE3C,CAAC,CAAEC,MAAO,QADAD,EAAQE,KAAMC,GAAMA,GAAGC,KAAO,MAAM,GAAGC,MACrBC,aAAa,EAAG,CAAC,EAGrDC,EAAAC,EAAA,UAAsC,CACrC,OACCC,EAAAA,KAAC,OAAA,CAAKC,UAAU,yBACfC,SAAA,CAAAC,EAAAA,IAAC,KAAA,CAAGF,UAAU,qBAAqBC,SAAA,OAAA,CAAK,EACxCF,EAAAA,KAAC,MAAA,CAAIC,UAAU,sBACdC,SAAA,CAAAC,EAAAA,IAAC,MAAA,CACAD,SAAAF,EAAAA,KAAC,KAAA,CAAGC,UAAU,aACbC,SAAA,CAAAC,EAAAA,IAAC,KAAA,CACAD,eAACE,EAAA,CAAKH,UAAU,YAAYI,GAAG,IAAIH,gBAEnC,CAAA,CACD,EACAC,EAAAA,IAAC,MACAD,SAAAC,EAAAA,IAACC,EAAA,CAAKH,UAAU,YAAYI,GAAG,SAASH,SAAA,QAExC,CAAA,CACD,EACAC,EAAAA,IAAC,MACAD,SAAAC,EAAAA,IAACC,EAAA,CAAKH,UAAU,YAAYI,GAAG,QAAQH,SAAA,cAEvC,CAAA,CACD,EACAC,EAAAA,IAAC,MACAD,SAAAC,EAAAA,IAACC,EAAA,CAAKH,UAAU,YAAYI,GAAG,UAAUH,SAAA,UAEzC,CAAA,CACD,CAAA,EACD,EACD,QACCI,EAAA,EAAO,CAAA,CAAA,CACT,CAAA,CAAA,CACD,CAEF,CAAA"}
1
+ {"version":3,"file":"_layout-BC22zIgv.js","sources":["../../../app/routes/admin+/_layout.tsx"],"sourcesContent":["import { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport { Link, Outlet } from 'react-router'\nimport { type RootLoaderData } from '#app/root.tsx'\nimport { type Route } from './+types/_layout.tsx'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => null,\n}\n\nexport const meta: Route.MetaFunction = ({ matches }) => {\n\tconst rootData = matches.find((m) => m?.id === 'root')?.data as RootLoaderData\n\treturn [{ title: `👷 | ${rootData?.workshopTitle}` }]\n}\n\nexport default function AdminLayout() {\n\treturn (\n\t\t<main className=\"container mx-auto mt-8\">\n\t\t\t<h1 className=\"text-4xl font-bold\">Admin</h1>\n\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t<nav>\n\t\t\t\t\t<ul className=\"flex gap-3\">\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/\">\n\t\t\t\t\t\t\t\tHome\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/admin\">\n\t\t\t\t\t\t\t\tAdmin\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/diff\">\n\t\t\t\t\t\t\t\tDiff Viewer\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"version\">\n\t\t\t\t\t\t\t\tVersion\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\t\t\t\t<Outlet />\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n"],"names":["handle","getSitemapEntries","meta","matches","title","find","m","id","data","workshopTitle","_layout","_UNSAFE_withComponentProps","jsxs","className","children","jsx","Link","to","Outlet"],"mappings":"qIAKO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,IAC1B,EAEaC,EAA2BA,CAAC,CAAEC,QAAAA,CAAQ,IAE3C,CAAC,CAAEC,MAAO,QADAD,EAAQE,KAAMC,GAAMA,GAAGC,KAAO,MAAM,GAAGC,MACrBC,aAAa,EAAG,CAAC,EAGrDC,EAAAC,EAAA,UAAsC,CACrC,OACCC,EAAAA,KAAC,OAAA,CAAKC,UAAU,yBACfC,SAAA,CAAAC,EAAAA,IAAC,KAAA,CAAGF,UAAU,qBAAqBC,SAAA,OAAA,CAAK,EACxCF,EAAAA,KAAC,MAAA,CAAIC,UAAU,sBACdC,SAAA,CAAAC,EAAAA,IAAC,MAAA,CACAD,SAAAF,EAAAA,KAAC,KAAA,CAAGC,UAAU,aACbC,SAAA,CAAAC,EAAAA,IAAC,KAAA,CACAD,eAACE,EAAA,CAAKH,UAAU,YAAYI,GAAG,IAAIH,gBAEnC,CAAA,CACD,EACAC,EAAAA,IAAC,MACAD,SAAAC,EAAAA,IAACC,EAAA,CAAKH,UAAU,YAAYI,GAAG,SAASH,SAAA,QAExC,CAAA,CACD,EACAC,EAAAA,IAAC,MACAD,SAAAC,EAAAA,IAACC,EAAA,CAAKH,UAAU,YAAYI,GAAG,QAAQH,SAAA,cAEvC,CAAA,CACD,EACAC,EAAAA,IAAC,MACAD,SAAAC,EAAAA,IAACC,EAAA,CAAKH,UAAU,YAAYI,GAAG,UAAUH,SAAA,UAEzC,CAAA,CACD,CAAA,EACD,EACD,QACCI,EAAA,EAAO,CAAA,CAAA,CACT,CAAA,CAAA,CACD,CAEF,CAAA"}
@@ -0,0 +1,2 @@
1
+ import{w as e,O as o}from"./chunk-QMGIS6GS-BuHkd1At.js";import{j as t}from"./jsx-runtime-DwNMUGRi.js";import"./_-xwArvaaj.js";const a={getSitemapEntries:void 0},l=e(function(){return t.jsx("div",{className:"flex h-full flex-grow",children:t.jsx(o,{})})});export{l as default,a as handle};
2
+ //# sourceMappingURL=_layout-DmtIXA1L.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_layout-BcnIEBgy.js","sources":["../../../app/routes/_app+/exercise+/_layout.tsx"],"sourcesContent":["import { getExercises } from '@epic-web/workshop-utils/apps.server'\nimport { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport { Outlet } from 'react-router'\nimport { serverOnly$ } from 'vite-env-only/macros'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: serverOnly$(async (request) => {\n\t\tconst exercises = await getExercises({ request })\n\t\treturn exercises.flatMap((e) => [\n\t\t\t{ route: `/exercise/${e.exerciseNumber.toString().padStart(2, '0')}` },\n\t\t\t...e.steps.flatMap((s) =>\n\t\t\t\t['problem', 'solution'].map((type) => ({\n\t\t\t\t\troute: `/exercise/${e.exerciseNumber.toString().padStart(2, '0')}/${s.stepNumber.toString().padStart(2, '0')}/${type}`,\n\t\t\t\t})),\n\t\t\t),\n\t\t\t{\n\t\t\t\troute: `/exercise/${e.exerciseNumber.toString().padStart(2, '0')}/finished`,\n\t\t\t},\n\t\t])\n\t}),\n}\n\nexport default function ExercisesLayout() {\n\treturn (\n\t\t<div className=\"flex h-full flex-grow\">\n\t\t\t<Outlet />\n\t\t</div>\n\t)\n}\n"],"names":["handle","getSitemapEntries","undefined","_layout","_UNSAFE_withComponentProps","className","children","jsx","Outlet"],"mappings":"8HAKO,MAAMA,EAAoB,CAChCC,kBAAAC,MAcD,EAEAC,EAAAC,EAAA,UAA0C,CACzC,aACE,MAAA,CAAIC,UAAU,wBACdC,SAAAC,EAAAA,IAACC,IAAO,CAAA,CACT,CAEF,CAAA"}
1
+ {"version":3,"file":"_layout-DmtIXA1L.js","sources":["../../../app/routes/_app+/exercise+/_layout.tsx"],"sourcesContent":["import { getExercises } from '@epic-web/workshop-utils/apps.server'\nimport { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport { Outlet } from 'react-router'\nimport { serverOnly$ } from 'vite-env-only/macros'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: serverOnly$(async (request) => {\n\t\tconst exercises = await getExercises({ request })\n\t\treturn exercises.flatMap((e) => [\n\t\t\t{ route: `/exercise/${e.exerciseNumber.toString().padStart(2, '0')}` },\n\t\t\t...e.steps.flatMap((s) =>\n\t\t\t\t['problem', 'solution'].map((type) => ({\n\t\t\t\t\troute: `/exercise/${e.exerciseNumber.toString().padStart(2, '0')}/${s.stepNumber.toString().padStart(2, '0')}/${type}`,\n\t\t\t\t})),\n\t\t\t),\n\t\t\t{\n\t\t\t\troute: `/exercise/${e.exerciseNumber.toString().padStart(2, '0')}/finished`,\n\t\t\t},\n\t\t])\n\t}),\n}\n\nexport default function ExercisesLayout() {\n\treturn (\n\t\t<div className=\"flex h-full flex-grow\">\n\t\t\t<Outlet />\n\t\t</div>\n\t)\n}\n"],"names":["handle","getSitemapEntries","undefined","_layout","_UNSAFE_withComponentProps","className","children","jsx","Outlet"],"mappings":"8HAKO,MAAMA,EAAoB,CAChCC,kBAAAC,MAcD,EAEAC,EAAAC,EAAA,UAA0C,CACzC,aACE,MAAA,CAAIC,UAAU,wBACdC,SAAAC,EAAAA,IAACC,IAAO,CAAA,CACT,CAEF,CAAA"}
@@ -1,2 +1,2 @@
1
- import{c as P,r as c,l as W,L as h,A as z,w as Q,a as Z,O as J}from"./chunk-QMGIS6GS-BqoFcGjf.js";import{j as e}from"./jsx-runtime-DopJAmxb.js";import{E as X}from"./index-JuycBjpd.js";import{G as ee}from"./error-boundary-D_qLhpVo.js";import{N as re}from"./nav-chevrons-0RRCRP4K.js";import{u as te}from"./revalidation-ws-CD9vOUzQ.js";import{M as oe,L as N,E as ne}from"./mdx-DXkB3-D7.js";import{P as se}from"./progress-C8g3Uhn9.js";import{S as O}from"./set-playground-Dd3h4x5X.js";import{a as ie,c as R,I as C,i as ae,b as le}from"./misc-CsXWl7t3.js";import{g as ce}from"./seo-BzJSnhSb.js";import{E as pe}from"./epic-video-B4JXxTHF.js";import{S as E,j as A,u as ue,R as de,d as me,e as fe,h as D,P as k,f as g,A as _,g as I,k as xe,D as he,C as ve,l as ge}from"./tooltip-qn6hWSiF.js";import{a as Pe}from"./index-DR_34ZYa.js";import"./_-G-R-Viwe.js";import{P as je,h as Ne,R as be,u as Se,F as Ce}from"./index-Cl_eeQ7o.js";import"./debug-build-Dr14ShW9.js";import"./clsx-B-dksMZM.js";import"./index-C4iAiEH3.js";import"./progress-bar-t9g4gI_5.js";import"./pe-BxKs4avg.js";import"./index-D7ZeZY2i.js";import"./online-DjmMmyzh.js";import"./loading-DzyW6U9J.js";import"./user-BKgwXxoQ.js";import"./workshop-config-DJEL9dz_.js";const L=c.createContext(null);function Ee(){const t=c.useContext(L);if(!t)throw new Error("useStepContext must be used within a StepContext.Provider");return t}function we({children:t,inBrowserBrowserRef:r}){return e.jsx(L.Provider,{value:{inBrowserBrowserRef:r},children:t})}const ye={DiffLink:w,PrevDiffLink:Ae,NextDiffLink:Oe,InlineFile:De,LinkToApp:_e};function Re({inBrowserBrowserRef:t}){const r=P();return r.exerciseStepApp.instructionsCode?e.jsx(we,{inBrowserBrowserRef:t,children:e.jsx(pe,{epicVideoInfosPromise:r.epicVideoInfosPromise,children:e.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:e.jsx(oe,{code:r.exerciseStepApp.instructionsCode,components:ye})})})}):null}function F(t,r,n){const o=new URLSearchParams(t);return n===null?o.delete(r):o.set(r,n),o}function Oe({app:t=0,fullPage:r=!1,children:n}){return e.jsx(w,{app1:t,app2:t+1,fullPage:r,children:n})}function Ae({app:t=-1,fullPage:r=!1,children:n}){return e.jsx(w,{app1:t,app2:t+1,fullPage:r,children:n})}function w({app1:t=0,app2:r=1,children:n,fullPage:o=!1,to:i}){const s=P();if(!i&&!t&&!r)return e.jsx("callout-danger",{className:"notification",children:e.jsx("div",{className:"title",children:"DiffLink Error: invalid input"})});function a(d){if(typeof d=="number"){const f=s.exerciseIndex+d;return s.allApps[f]?.name}if(!d)return null;for(const{name:f,stepName:m}of s.allApps)if(d===f||d===m)return f;return null}if(i){const d=new URLSearchParams(i);t=d.get("app1"),r=d.get("app2")}const l=a(t),u=a(r);if(!l||!u)return e.jsxs("callout-danger",{className:"notification",children:[e.jsx("div",{className:"title",children:"DiffLink Error: invalid input"}),!l&&e.jsxs("div",{children:['app1: "',t,'" is not a valid app name']}),!u&&e.jsxs("div",{children:['app2: "',r,'" is not a valid app name']})]});i||(i=`app1=${l}&app2=${u}`);const p=o?`/diff?${i}`:`?${decodeURIComponent(F(new URLSearchParams,"preview",`diff&${i}`).toString())}`;return n||(n=e.jsxs("span",{children:["Go to Diff ",o?"":"Preview"," from: ",e.jsx("code",{children:l})," to:"," ",e.jsx("code",{children:u})]})),e.jsx(h,{to:p,children:n})}function De({file:t,type:r="playground",children:n=e.jsx("code",{children:t}),...o}){const i=P(),s=i[r]||i[i.type],a=e.jsxs("div",{className:"launch-editor-button-wrapper flex underline underline-offset-4",children:[n," ",e.jsx("svg",{height:24,width:24,children:e.jsx("use",{href:`${ae}#Keyboard`})})]});return ENV.EPICSHOP_DEPLOYED&&s?e.jsx("div",{className:"inline-block grow",children:e.jsx(N,{appFile:t,appName:s.name,...o,children:a})}):s?e.jsx("div",{className:"inline-block grow",children:e.jsx(N,{appFile:t,appName:s.name,...o,children:a})}):r==="playground"?e.jsx(E,{content:"You must 'Set to Playground' before opening a file",children:e.jsx("div",{className:"inline-block grow cursor-not-allowed",children:a})}):e.jsx(e.Fragment,{children:"children"})}function ke(t){return t==="problem"?"problem":t==="solution"?"solution":"playground"}function _e({to:t,children:r=e.jsx("code",{children:t.toString()}),...n}){const[o]=W(),i=`?${F(o,"pathname",t.toString()).toString()}`,s=P(),a=ke(o.get("preview")),l=Pe(),u=s[a],p=u?.dev.type==="script"?ie({domain:l.domain,port:u.dev.portNumber}):s.playground?.dev.type==="browser"?s.playground.dev.pathname:null,{inBrowserBrowserRef:d}=Ee(),f=p?p.slice(0,-1)+t.toString():null;return e.jsxs("div",{className:"inline-flex items-center justify-between gap-1",children:[e.jsx(h,{to:i,...n,className:R(n.className,{"cursor-not-allowed":ENV.EPICSHOP_DEPLOYED}),title:ENV.EPICSHOP_DEPLOYED?"Cannot link to app in deployed version":void 0,onClick:m=>{ENV.EPICSHOP_DEPLOYED&&m.preventDefault(),n.onClick?.(m),d.current?.handleExtrnalNavigation(t.toString())},children:r}),f?e.jsx(E,{content:"Open in new tab",children:e.jsx("a",{href:f,target:"_blank",rel:"noreferrer",className:R("flex aspect-square items-center justify-center",{"cursor-not-allowed":ENV.EPICSHOP_DEPLOYED}),title:ENV.EPICSHOP_DEPLOYED?"Cannot link to app in deployed version":"Open in new tab",onClick:m=>{ENV.EPICSHOP_DEPLOYED&&m.preventDefault()},children:e.jsx(C,{name:"ExternalLink"})})}):null]})}var b="Popover",[$,Nr]=me(b,[A]),j=A(),[Ie,x]=$(b),T=t=>{const{__scopePopover:r,children:n,open:o,defaultOpen:i,onOpenChange:s,modal:a=!1}=t,l=j(r),u=c.useRef(null),[p,d]=c.useState(!1),[f,m]=ue({prop:o,defaultProp:i??!1,onChange:s,caller:b});return e.jsx(de,{...l,children:e.jsx(Ie,{scope:r,contentId:fe(),triggerRef:u,open:f,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(S=>!S),[m]),hasCustomAnchor:p,onCustomAnchorAdd:c.useCallback(()=>d(!0),[]),onCustomAnchorRemove:c.useCallback(()=>d(!1),[]),modal:a,children:n})})};T.displayName=b;var M="PopoverAnchor",Le=c.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=x(M,n),s=j(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=i;return c.useEffect(()=>(a(),()=>l()),[a,l]),e.jsx(_,{...s,...o,ref:r})});Le.displayName=M;var H="PopoverTrigger",U=c.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=x(H,n),s=j(n),a=D(r,i.triggerRef),l=e.jsx(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":q(i.open),...o,ref:a,onClick:g(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:e.jsx(_,{asChild:!0,...s,children:l})});U.displayName=H;var y="PopoverPortal",[Fe,$e]=$(y,{forceMount:void 0}),V=t=>{const{__scopePopover:r,forceMount:n,children:o,container:i}=t,s=x(y,r);return e.jsx(Fe,{scope:r,forceMount:n,children:e.jsx(I,{present:n||s.open,children:e.jsx(je,{asChild:!0,container:i,children:o})})})};V.displayName=y;var v="PopoverContent",B=c.forwardRef((t,r)=>{const n=$e(v,t.__scopePopover),{forceMount:o=n.forceMount,...i}=t,s=x(v,t.__scopePopover);return e.jsx(I,{present:o||s.open,children:s.modal?e.jsx(Me,{...i,ref:r}):e.jsx(He,{...i,ref:r})})});B.displayName=v;var Te=xe("PopoverContent.RemoveScroll"),Me=c.forwardRef((t,r)=>{const n=x(v,t.__scopePopover),o=c.useRef(null),i=D(r,o),s=c.useRef(!1);return c.useEffect(()=>{const a=o.current;if(a)return Ne(a)},[]),e.jsx(be,{as:Te,allowPinchZoom:!0,children:e.jsx(Y,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,p=l.button===2||u;s.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),He=c.forwardRef((t,r)=>{const n=x(v,t.__scopePopover),o=c.useRef(!1),i=c.useRef(!1);return e.jsx(Y,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),Y=c.forwardRef((t,r)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:d,...f}=t,m=x(v,n),S=j(n);return Se(),e.jsx(Ce,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:e.jsx(he,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:p,onDismiss:()=>m.onOpenChange(!1),children:e.jsx(ve,{"data-state":q(m.open),role:"dialog",id:m.contentId,...S,...f,ref:r,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),G="PopoverClose",Ue=c.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=x(G,n);return e.jsx(k.button,{type:"button",...o,ref:r,onClick:g(t.onClick,()=>i.onOpenChange(!1))})});Ue.displayName=G;var Ve="PopoverArrow",Be=c.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=j(n);return e.jsx(ge,{...i,...o,ref:r})});Be.displayName=Ve;function q(t){return t?"open":"closed"}var Ye=T,Ge=U,qe=V,Ke=B;function We({diffFilesPromise:t}){const r=P(),[n,o]=c.useState(!1),i=c.useRef(null);function s(){o(!1)}const a=r.playground?.appName;return e.jsx(e.Fragment,{children:e.jsxs(Ye,{open:n,onOpenChange:o,children:[e.jsx(Ge,{asChild:!0,children:e.jsxs("button",{className:"flex h-full items-center gap-1 border-r px-6 py-3 font-mono text-sm uppercase","aria-label":"Relevant Files",children:[e.jsx(C,{name:"Files"}),"Files"]})}),e.jsx(qe,{children:e.jsx(Ke,{ref:i,className:"slideRightContent lg:slideUpContent invert-theme z-10 select-none rounded bg-background px-9 py-8 text-foreground",align:"start",sideOffset:5,children:e.jsxs("div",{className:"launch-editor-wrapper",children:[e.jsx("strong",{className:"inline-block px-2 pb-4 font-semibold uppercase",children:"Relevant Files"}),r.problem&&r.playground?.appName!==r.problem.name?e.jsx("div",{className:"mb-2 rounded p-1 font-mono font-medium",children:e.jsx(O,{appName:r.problem.name})}):null,e.jsx("div",{id:"files",children:e.jsx(c.Suspense,{fallback:e.jsx(E,{content:"Loading diff",children:e.jsx("div",{className:"flex justify-center",children:e.jsx(C,{name:"Refresh",className:"h-8 w-8 animate-spin"})})}),children:e.jsx(z,{resolve:t,errorElement:e.jsx("div",{className:"text-foreground-destructive",children:"Something went wrong."}),children:l=>{if(!l)return e.jsx("p",{className:"text-foreground-destructive",children:"Unable to determine diff"});if(typeof l=="string")return e.jsx("p",{className:"text-foreground-destructive",children:l});if(!l.length)return e.jsx("p",{children:"No files changed"});const u=a||ENV.EPICSHOP_GITHUB_ROOT?{}:{title:"You must 'Set to Playground' before opening a file",className:"not-allowed"};return e.jsxs("ul",{...u,children:[l.length>1&&!ENV.EPICSHOP_DEPLOYED?e.jsx("div",{className:"mb-2 border-b border-b-gray-50 border-opacity-50 pb-2 font-sans",children:e.jsx(N,{appFile:l.map(p=>`${p.path},${p.line},1`),appName:"playground",onUpdate:s,children:e.jsx("p",{children:"Open All Files"})})}):null,l.map(p=>e.jsx("li",{"data-state":p.status,children:e.jsx(N,{appFile:`${p.path},${p.line},1`,appName:ENV.EPICSHOP_DEPLOYED?r.problem?.name??"playground":"playground",onUpdate:s,children:e.jsx("code",{children:p.path})})},p.path))]})}})})})]})})})]})})}function K(t,r){const n=t?.exerciseStepApp.exerciseNumber.toString().padStart(2,"0")??"00",o=t?.exerciseStepApp.stepNumber.toString().padStart(2,"0")??"00",i={problem:"💪",solution:"🏁"}[t?.type??"problem"],s=t?.[t.type]?.title??"N/A";return{emoji:i,stepNumber:o,title:s,exerciseNumber:n,exerciseTitle:t?.exerciseTitle??"Unknown exercise",workshopTitle:r,type:t?.type??"problem"}}const br=({data:t,matches:r,params:n})=>{const o=r.find(p=>p?.id==="root")?.data;if(!t||!o)return[{title:"🦉 | Error"}];const{emoji:i,stepNumber:s,title:a,exerciseNumber:l,exerciseTitle:u}=K(t);return ce({title:`${i} | ${s}. ${a} | ${l}. ${u} | ${o.workshopTitle}`,description:`${n.type} step for exercise ${l}. ${u}`,ogTitle:a,ogDescription:`${u} step ${Number(s)} ${n.type}`,instructor:o.instructor,requestInfo:o.requestInfo})},Sr=Q(function({loaderData:r}){const n=c.useRef(null),o=K(r);return te({watchPaths:[`${r.exerciseStepApp.relativePath}/README.mdx`]}),e.jsx("div",{className:"flex max-w-full flex-grow flex-col",children:e.jsxs("main",{className:"flex flex-grow flex-col sm:grid sm:h-full sm:min-h-[800px] sm:grid-cols-1 sm:grid-rows-2 md:min-h-[unset] lg:grid-cols-2 lg:grid-rows-1",children:[e.jsxs("div",{className:"relative flex flex-col sm:col-span-1 sm:row-span-1 sm:h-full lg:border-r",children:[e.jsx("h1",{className:"h-14 border-b pl-10 pr-5 text-sm font-medium leading-tight",children:e.jsxs("div",{className:"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2",children:[e.jsxs("div",{className:"flex items-center justify-start gap-x-2 uppercase",children:[e.jsxs(h,{to:le(r.exerciseStepApp.exerciseNumber),className:"hover:underline",children:[o.exerciseNumber,". ",o.exerciseTitle]}),"/",e.jsxs(h,{to:".",className:"hover:underline",children:[o.stepNumber,". ",o.title," (",o.emoji," ",o.type,")"]})]}),r.problem&&r.playground?.appName!==r.problem.name?e.jsx("div",{className:"hidden md:block",children:e.jsx(O,{appName:r.problem.name})}):null]})}),e.jsxs("article",{id:r.articleId,className:"shadow-on-scrollbox flex h-full w-full max-w-none flex-1 scroll-pt-6 flex-col justify-between space-y-6 overflow-y-auto p-2 scrollbar-thin scrollbar-thumb-scrollbar sm:p-10 sm:pt-8",children:[r.exerciseStepApp.instructionsCode?e.jsx(Re,{inBrowserBrowserRef:n}):e.jsx("div",{className:"flex h-full items-center justify-center text-lg",children:e.jsx("p",{children:"No instructions yet..."})}),e.jsxs("div",{className:"mt-auto flex justify-between",children:[r.prevStepLink?e.jsx(h,{to:r.prevStepLink.to,"aria-label":"Previous Step",prefetch:"intent",children:"← Previous"}):e.jsx("span",{}),r.nextStepLink?e.jsx(h,{to:r.nextStepLink.to,"aria-label":"Next Step",prefetch:"intent",children:"Next →"}):e.jsx("span",{})]})]},r.articleId),e.jsx(X,{elementQuery:`#${r.articleId}`},`scroll-${r.articleId}`),r.type==="solution"?e.jsx(se,{type:"step",exerciseNumber:r.exerciseStepApp.exerciseNumber,stepNumber:r.exerciseStepApp.stepNumber,className:"h-14 border-t px-6"}):null,e.jsxs("div",{className:"flex h-16 justify-between border-b-4 border-t lg:border-b-0",children:[e.jsx("div",{children:e.jsx("div",{className:"h-full",children:e.jsx(We,{diffFilesPromise:r.diffFiles})})}),e.jsx(ne,{appName:r.exerciseStepApp.name,relativePath:r.exerciseStepApp.relativePath}),e.jsx(re,{prev:r.prevStepLink?{to:r.prevStepLink.to,"aria-label":"Previous Step"}:null,next:r.nextStepLink?{to:r.nextStepLink.to,"aria-label":"Next Step"}:null})]})]}),e.jsx(J,{})]})})}),Cr=Z(function(){return e.jsx(ee,{statusHandlers:{404:()=>e.jsx("p",{children:"Sorry, we couldn't find an app here."}),503:()=>e.jsxs("div",{children:[e.jsx("h1",{children:"Service Unavailable"}),e.jsx("p",{children:"Sorry, we're having a temporary problem. Please try again later."}),e.jsx("button",{onClick:()=>window.location.reload(),children:"Refresh"})]})}})});export{Cr as ErrorBoundary,Sr as default,br as meta};
2
- //# sourceMappingURL=_layout-DfZK3Orq.js.map
1
+ import{c as P,r as c,l as W,L as h,A as z,w as Q,a as Z,O as J}from"./chunk-QMGIS6GS-BuHkd1At.js";import{j as e}from"./jsx-runtime-DwNMUGRi.js";import{E as X}from"./index-KzNJpW8p.js";import{G as ee}from"./error-boundary-Ya2xPEcG.js";import{N as re}from"./nav-chevrons-ByNU2Qnp.js";import{u as te}from"./revalidation-ws-DtsnySpI.js";import{M as oe,L as N,E as ne}from"./mdx-B12CHovS.js";import{P as se}from"./progress-v5BhNo4r.js";import{S as O}from"./set-playground-CVNElLx0.js";import{a as ie,c as R,I as C,i as ae,b as le}from"./misc-BSfaml-C.js";import{g as ce}from"./seo-8jioTbYg.js";import{E as pe}from"./epic-video-wBXopVA9.js";import{S as E,j as A,u as ue,R as de,d as me,e as fe,h as D,P as k,f as g,A as _,g as I,k as xe,D as he,C as ve,l as ge}from"./tooltip-Czb6Ovbu.js";import{a as Pe}from"./index-BgoVp_dk.js";import"./_-xwArvaaj.js";import{P as je,h as Ne,R as be,u as Se,F as Ce}from"./index-Ha5nb6JW.js";import"./debug-build-Dr14ShW9.js";import"./clsx-B-dksMZM.js";import"./index-BDjKpcj7.js";import"./progress-bar-CUlGRzhp.js";import"./pe-B8wMI5OT.js";import"./index-C2HHQicP.js";import"./online-DjW0DI_3.js";import"./loading-D4LMH5BS.js";import"./user-C0q7xoFQ.js";import"./workshop-config-B8s2UB74.js";const L=c.createContext(null);function Ee(){const t=c.useContext(L);if(!t)throw new Error("useStepContext must be used within a StepContext.Provider");return t}function we({children:t,inBrowserBrowserRef:r}){return e.jsx(L.Provider,{value:{inBrowserBrowserRef:r},children:t})}const ye={DiffLink:w,PrevDiffLink:Ae,NextDiffLink:Oe,InlineFile:De,LinkToApp:_e};function Re({inBrowserBrowserRef:t}){const r=P();return r.exerciseStepApp.instructionsCode?e.jsx(we,{inBrowserBrowserRef:t,children:e.jsx(pe,{epicVideoInfosPromise:r.epicVideoInfosPromise,children:e.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:e.jsx(oe,{code:r.exerciseStepApp.instructionsCode,components:ye})})})}):null}function F(t,r,n){const o=new URLSearchParams(t);return n===null?o.delete(r):o.set(r,n),o}function Oe({app:t=0,fullPage:r=!1,children:n}){return e.jsx(w,{app1:t,app2:t+1,fullPage:r,children:n})}function Ae({app:t=-1,fullPage:r=!1,children:n}){return e.jsx(w,{app1:t,app2:t+1,fullPage:r,children:n})}function w({app1:t=0,app2:r=1,children:n,fullPage:o=!1,to:i}){const s=P();if(!i&&!t&&!r)return e.jsx("callout-danger",{className:"notification",children:e.jsx("div",{className:"title",children:"DiffLink Error: invalid input"})});function a(d){if(typeof d=="number"){const f=s.exerciseIndex+d;return s.allApps[f]?.name}if(!d)return null;for(const{name:f,stepName:m}of s.allApps)if(d===f||d===m)return f;return null}if(i){const d=new URLSearchParams(i);t=d.get("app1"),r=d.get("app2")}const l=a(t),u=a(r);if(!l||!u)return e.jsxs("callout-danger",{className:"notification",children:[e.jsx("div",{className:"title",children:"DiffLink Error: invalid input"}),!l&&e.jsxs("div",{children:['app1: "',t,'" is not a valid app name']}),!u&&e.jsxs("div",{children:['app2: "',r,'" is not a valid app name']})]});i||(i=`app1=${l}&app2=${u}`);const p=o?`/diff?${i}`:`?${decodeURIComponent(F(new URLSearchParams,"preview",`diff&${i}`).toString())}`;return n||(n=e.jsxs("span",{children:["Go to Diff ",o?"":"Preview"," from: ",e.jsx("code",{children:l})," to:"," ",e.jsx("code",{children:u})]})),e.jsx(h,{to:p,children:n})}function De({file:t,type:r="playground",children:n=e.jsx("code",{children:t}),...o}){const i=P(),s=i[r]||i[i.type],a=e.jsxs("div",{className:"launch-editor-button-wrapper flex underline underline-offset-4",children:[n," ",e.jsx("svg",{height:24,width:24,children:e.jsx("use",{href:`${ae}#Keyboard`})})]});return ENV.EPICSHOP_DEPLOYED&&s?e.jsx("div",{className:"inline-block grow",children:e.jsx(N,{appFile:t,appName:s.name,...o,children:a})}):s?e.jsx("div",{className:"inline-block grow",children:e.jsx(N,{appFile:t,appName:s.name,...o,children:a})}):r==="playground"?e.jsx(E,{content:"You must 'Set to Playground' before opening a file",children:e.jsx("div",{className:"inline-block grow cursor-not-allowed",children:a})}):e.jsx(e.Fragment,{children:"children"})}function ke(t){return t==="problem"?"problem":t==="solution"?"solution":"playground"}function _e({to:t,children:r=e.jsx("code",{children:t.toString()}),...n}){const[o]=W(),i=`?${F(o,"pathname",t.toString()).toString()}`,s=P(),a=ke(o.get("preview")),l=Pe(),u=s[a],p=u?.dev.type==="script"?ie({domain:l.domain,port:u.dev.portNumber}):s.playground?.dev.type==="browser"?s.playground.dev.pathname:null,{inBrowserBrowserRef:d}=Ee(),f=p?p.slice(0,-1)+t.toString():null;return e.jsxs("div",{className:"inline-flex items-center justify-between gap-1",children:[e.jsx(h,{to:i,...n,className:R(n.className,{"cursor-not-allowed":ENV.EPICSHOP_DEPLOYED}),title:ENV.EPICSHOP_DEPLOYED?"Cannot link to app in deployed version":void 0,onClick:m=>{ENV.EPICSHOP_DEPLOYED&&m.preventDefault(),n.onClick?.(m),d.current?.handleExtrnalNavigation(t.toString())},children:r}),f?e.jsx(E,{content:"Open in new tab",children:e.jsx("a",{href:f,target:"_blank",rel:"noreferrer",className:R("flex aspect-square items-center justify-center",{"cursor-not-allowed":ENV.EPICSHOP_DEPLOYED}),title:ENV.EPICSHOP_DEPLOYED?"Cannot link to app in deployed version":"Open in new tab",onClick:m=>{ENV.EPICSHOP_DEPLOYED&&m.preventDefault()},children:e.jsx(C,{name:"ExternalLink"})})}):null]})}var b="Popover",[$,Nr]=me(b,[A]),j=A(),[Ie,x]=$(b),T=t=>{const{__scopePopover:r,children:n,open:o,defaultOpen:i,onOpenChange:s,modal:a=!1}=t,l=j(r),u=c.useRef(null),[p,d]=c.useState(!1),[f,m]=ue({prop:o,defaultProp:i??!1,onChange:s,caller:b});return e.jsx(de,{...l,children:e.jsx(Ie,{scope:r,contentId:fe(),triggerRef:u,open:f,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(S=>!S),[m]),hasCustomAnchor:p,onCustomAnchorAdd:c.useCallback(()=>d(!0),[]),onCustomAnchorRemove:c.useCallback(()=>d(!1),[]),modal:a,children:n})})};T.displayName=b;var M="PopoverAnchor",Le=c.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=x(M,n),s=j(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=i;return c.useEffect(()=>(a(),()=>l()),[a,l]),e.jsx(_,{...s,...o,ref:r})});Le.displayName=M;var H="PopoverTrigger",U=c.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=x(H,n),s=j(n),a=D(r,i.triggerRef),l=e.jsx(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":q(i.open),...o,ref:a,onClick:g(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:e.jsx(_,{asChild:!0,...s,children:l})});U.displayName=H;var y="PopoverPortal",[Fe,$e]=$(y,{forceMount:void 0}),V=t=>{const{__scopePopover:r,forceMount:n,children:o,container:i}=t,s=x(y,r);return e.jsx(Fe,{scope:r,forceMount:n,children:e.jsx(I,{present:n||s.open,children:e.jsx(je,{asChild:!0,container:i,children:o})})})};V.displayName=y;var v="PopoverContent",B=c.forwardRef((t,r)=>{const n=$e(v,t.__scopePopover),{forceMount:o=n.forceMount,...i}=t,s=x(v,t.__scopePopover);return e.jsx(I,{present:o||s.open,children:s.modal?e.jsx(Me,{...i,ref:r}):e.jsx(He,{...i,ref:r})})});B.displayName=v;var Te=xe("PopoverContent.RemoveScroll"),Me=c.forwardRef((t,r)=>{const n=x(v,t.__scopePopover),o=c.useRef(null),i=D(r,o),s=c.useRef(!1);return c.useEffect(()=>{const a=o.current;if(a)return Ne(a)},[]),e.jsx(be,{as:Te,allowPinchZoom:!0,children:e.jsx(Y,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,p=l.button===2||u;s.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),He=c.forwardRef((t,r)=>{const n=x(v,t.__scopePopover),o=c.useRef(!1),i=c.useRef(!1);return e.jsx(Y,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),Y=c.forwardRef((t,r)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:d,...f}=t,m=x(v,n),S=j(n);return Se(),e.jsx(Ce,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:e.jsx(he,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:p,onDismiss:()=>m.onOpenChange(!1),children:e.jsx(ve,{"data-state":q(m.open),role:"dialog",id:m.contentId,...S,...f,ref:r,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),G="PopoverClose",Ue=c.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=x(G,n);return e.jsx(k.button,{type:"button",...o,ref:r,onClick:g(t.onClick,()=>i.onOpenChange(!1))})});Ue.displayName=G;var Ve="PopoverArrow",Be=c.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=j(n);return e.jsx(ge,{...i,...o,ref:r})});Be.displayName=Ve;function q(t){return t?"open":"closed"}var Ye=T,Ge=U,qe=V,Ke=B;function We({diffFilesPromise:t}){const r=P(),[n,o]=c.useState(!1),i=c.useRef(null);function s(){o(!1)}const a=r.playground?.appName;return e.jsx(e.Fragment,{children:e.jsxs(Ye,{open:n,onOpenChange:o,children:[e.jsx(Ge,{asChild:!0,children:e.jsxs("button",{className:"flex h-full items-center gap-1 border-r px-6 py-3 font-mono text-sm uppercase","aria-label":"Relevant Files",children:[e.jsx(C,{name:"Files"}),"Files"]})}),e.jsx(qe,{children:e.jsx(Ke,{ref:i,className:"slideRightContent lg:slideUpContent invert-theme z-10 select-none rounded bg-background px-9 py-8 text-foreground",align:"start",sideOffset:5,children:e.jsxs("div",{className:"launch-editor-wrapper",children:[e.jsx("strong",{className:"inline-block px-2 pb-4 font-semibold uppercase",children:"Relevant Files"}),r.problem&&r.playground?.appName!==r.problem.name?e.jsx("div",{className:"mb-2 rounded p-1 font-mono font-medium",children:e.jsx(O,{appName:r.problem.name})}):null,e.jsx("div",{id:"files",children:e.jsx(c.Suspense,{fallback:e.jsx(E,{content:"Loading diff",children:e.jsx("div",{className:"flex justify-center",children:e.jsx(C,{name:"Refresh",className:"h-8 w-8 animate-spin"})})}),children:e.jsx(z,{resolve:t,errorElement:e.jsx("div",{className:"text-foreground-destructive",children:"Something went wrong."}),children:l=>{if(!l)return e.jsx("p",{className:"text-foreground-destructive",children:"Unable to determine diff"});if(typeof l=="string")return e.jsx("p",{className:"text-foreground-destructive",children:l});if(!l.length)return e.jsx("p",{children:"No files changed"});const u=a||ENV.EPICSHOP_GITHUB_ROOT?{}:{title:"You must 'Set to Playground' before opening a file",className:"not-allowed"};return e.jsxs("ul",{...u,children:[l.length>1&&!ENV.EPICSHOP_DEPLOYED?e.jsx("div",{className:"mb-2 border-b border-b-gray-50 border-opacity-50 pb-2 font-sans",children:e.jsx(N,{appFile:l.map(p=>`${p.path},${p.line},1`),appName:"playground",onUpdate:s,children:e.jsx("p",{children:"Open All Files"})})}):null,l.map(p=>e.jsx("li",{"data-state":p.status,children:e.jsx(N,{appFile:`${p.path},${p.line},1`,appName:ENV.EPICSHOP_DEPLOYED?r.problem?.name??"playground":"playground",onUpdate:s,children:e.jsx("code",{children:p.path})})},p.path))]})}})})})]})})})]})})}function K(t,r){const n=t?.exerciseStepApp.exerciseNumber.toString().padStart(2,"0")??"00",o=t?.exerciseStepApp.stepNumber.toString().padStart(2,"0")??"00",i={problem:"💪",solution:"🏁"}[t?.type??"problem"],s=t?.[t.type]?.title??"N/A";return{emoji:i,stepNumber:o,title:s,exerciseNumber:n,exerciseTitle:t?.exerciseTitle??"Unknown exercise",workshopTitle:r,type:t?.type??"problem"}}const br=({data:t,matches:r,params:n})=>{const o=r.find(p=>p?.id==="root")?.data;if(!t||!o)return[{title:"🦉 | Error"}];const{emoji:i,stepNumber:s,title:a,exerciseNumber:l,exerciseTitle:u}=K(t);return ce({title:`${i} | ${s}. ${a} | ${l}. ${u} | ${o.workshopTitle}`,description:`${n.type} step for exercise ${l}. ${u}`,ogTitle:a,ogDescription:`${u} step ${Number(s)} ${n.type}`,instructor:o.instructor,requestInfo:o.requestInfo})},Sr=Q(function({loaderData:r}){const n=c.useRef(null),o=K(r);return te({watchPaths:[`${r.exerciseStepApp.relativePath}/README.mdx`]}),e.jsx("div",{className:"flex max-w-full flex-grow flex-col",children:e.jsxs("main",{className:"flex flex-grow flex-col sm:grid sm:h-full sm:min-h-[800px] sm:grid-cols-1 sm:grid-rows-2 md:min-h-[unset] lg:grid-cols-2 lg:grid-rows-1",children:[e.jsxs("div",{className:"relative flex flex-col sm:col-span-1 sm:row-span-1 sm:h-full lg:border-r",children:[e.jsx("h1",{className:"h-14 border-b pl-10 pr-5 text-sm font-medium leading-tight",children:e.jsxs("div",{className:"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2",children:[e.jsxs("div",{className:"flex items-center justify-start gap-x-2 uppercase",children:[e.jsxs(h,{to:le(r.exerciseStepApp.exerciseNumber),className:"hover:underline",children:[o.exerciseNumber,". ",o.exerciseTitle]}),"/",e.jsxs(h,{to:".",className:"hover:underline",children:[o.stepNumber,". ",o.title," (",o.emoji," ",o.type,")"]})]}),r.problem&&r.playground?.appName!==r.problem.name?e.jsx("div",{className:"hidden md:block",children:e.jsx(O,{appName:r.problem.name})}):null]})}),e.jsxs("article",{id:r.articleId,className:"shadow-on-scrollbox flex h-full w-full max-w-none flex-1 scroll-pt-6 flex-col justify-between space-y-6 overflow-y-auto p-2 scrollbar-thin scrollbar-thumb-scrollbar sm:p-10 sm:pt-8",children:[r.exerciseStepApp.instructionsCode?e.jsx(Re,{inBrowserBrowserRef:n}):e.jsx("div",{className:"flex h-full items-center justify-center text-lg",children:e.jsx("p",{children:"No instructions yet..."})}),e.jsxs("div",{className:"mt-auto flex justify-between",children:[r.prevStepLink?e.jsx(h,{to:r.prevStepLink.to,"aria-label":"Previous Step",prefetch:"intent",children:"← Previous"}):e.jsx("span",{}),r.nextStepLink?e.jsx(h,{to:r.nextStepLink.to,"aria-label":"Next Step",prefetch:"intent",children:"Next →"}):e.jsx("span",{})]})]},r.articleId),e.jsx(X,{elementQuery:`#${r.articleId}`},`scroll-${r.articleId}`),r.type==="solution"?e.jsx(se,{type:"step",exerciseNumber:r.exerciseStepApp.exerciseNumber,stepNumber:r.exerciseStepApp.stepNumber,className:"h-14 border-t px-6"}):null,e.jsxs("div",{className:"flex h-16 justify-between border-b-4 border-t lg:border-b-0",children:[e.jsx("div",{children:e.jsx("div",{className:"h-full",children:e.jsx(We,{diffFilesPromise:r.diffFiles})})}),e.jsx(ne,{appName:r.exerciseStepApp.name,relativePath:r.exerciseStepApp.relativePath}),e.jsx(re,{prev:r.prevStepLink?{to:r.prevStepLink.to,"aria-label":"Previous Step"}:null,next:r.nextStepLink?{to:r.nextStepLink.to,"aria-label":"Next Step"}:null})]})]}),e.jsx(J,{})]})})}),Cr=Z(function(){return e.jsx(ee,{statusHandlers:{404:()=>e.jsx("p",{children:"Sorry, we couldn't find an app here."}),503:()=>e.jsxs("div",{children:[e.jsx("h1",{children:"Service Unavailable"}),e.jsx("p",{children:"Sorry, we're having a temporary problem. Please try again later."}),e.jsx("button",{onClick:()=>window.location.reload(),children:"Refresh"})]})}})});export{Cr as ErrorBoundary,Sr as default,br as meta};
2
+ //# sourceMappingURL=_layout-jWJDG9vA.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_layout-DfZK3Orq.js","sources":["../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/step-mdx.tsx","../../../../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/touched-files.tsx","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout.tsx"],"sourcesContent":["import * as React from 'react'\nimport { type PropsWithChildren } from 'react'\nimport {\n\tLink,\n\tuseLoaderData,\n\tuseSearchParams,\n\ttype LinkProps,\n} from 'react-router'\nimport iconsSvg from '#app/assets/icons.svg'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { Icon } from '#app/components/icons.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { LaunchEditor } from '#app/routes/launch-editor.tsx'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn, getBaseUrl } from '#app/utils/misc.tsx'\nimport { useRequestInfo } from '#app/utils/request-info.ts'\nimport { type loader } from '../_layout.tsx'\n\ntype StepContextType = {\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}\nconst StepContext = React.createContext<StepContextType | null>(null)\n\nfunction useStepContext() {\n\tconst context = React.useContext(StepContext)\n\tif (!context) {\n\t\tthrow new Error('useStepContext must be used within a StepContext.Provider')\n\t}\n\treturn context\n}\n\nfunction StepContextProvider({\n\tchildren,\n\tinBrowserBrowserRef,\n}: {\n\tchildren: React.ReactNode\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\treturn (\n\t\t<StepContext.Provider value={{ inBrowserBrowserRef }}>\n\t\t\t{children}\n\t\t</StepContext.Provider>\n\t)\n}\n\nconst stepMdxComponents = {\n\tDiffLink,\n\tPrevDiffLink,\n\tNextDiffLink,\n\tInlineFile,\n\tLinkToApp,\n}\n\nexport function StepMdx({\n\tinBrowserBrowserRef,\n}: {\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tif (!data.exerciseStepApp.instructionsCode) return null\n\treturn (\n\t\t<StepContextProvider inBrowserBrowserRef={inBrowserBrowserRef}>\n\t\t\t<EpicVideoInfoProvider epicVideoInfosPromise={data.epicVideoInfosPromise}>\n\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t<Mdx\n\t\t\t\t\t\tcode={data.exerciseStepApp.instructionsCode}\n\t\t\t\t\t\tcomponents={stepMdxComponents}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</EpicVideoInfoProvider>\n\t\t</StepContextProvider>\n\t)\n}\n\nfunction withParam(\n\tsearchParams: URLSearchParams,\n\tkey: string,\n\tvalue: string | null,\n) {\n\tconst newSearchParams = new URLSearchParams(searchParams)\n\tif (value === null) {\n\t\tnewSearchParams.delete(key)\n\t} else {\n\t\tnewSearchParams.set(key, value)\n\t}\n\treturn newSearchParams\n}\n\nfunction NextDiffLink({\n\tapp = 0,\n\tfullPage = false,\n\tchildren,\n}: {\n\tapp: number\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\treturn (\n\t\t<DiffLink app1={app} app2={app + 1} fullPage={fullPage}>\n\t\t\t{children}\n\t\t</DiffLink>\n\t)\n}\n\nfunction PrevDiffLink({\n\tapp = -1,\n\tfullPage = false,\n\tchildren,\n}: {\n\tapp: number\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\treturn (\n\t\t<DiffLink app1={app} app2={app + 1} fullPage={fullPage}>\n\t\t\t{children}\n\t\t</DiffLink>\n\t)\n}\n\nfunction DiffLink({\n\tapp1 = 0,\n\tapp2 = 1,\n\tchildren,\n\tfullPage = false,\n\tto,\n}: {\n\tapp1?: string | number | null\n\tapp2?: string | number | null\n\tto?: string\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tif (!to && !app1 && !app2) {\n\t\treturn (\n\t\t\t// @ts-expect-error 🤷‍♂️\n\t\t\t<callout-danger className=\"notification\">\n\t\t\t\t<div className=\"title\">DiffLink Error: invalid input</div>\n\t\t\t\t{/* @ts-expect-error 🤷‍♂️ */}\n\t\t\t</callout-danger>\n\t\t)\n\t}\n\n\tfunction getAppName(input: typeof app1) {\n\t\tif (typeof input === 'number') {\n\t\t\tconst stepIndex = data.exerciseIndex + input\n\t\t\treturn data.allApps[stepIndex]?.name\n\t\t}\n\t\tif (!input) return null\n\t\tfor (const { name, stepName } of data.allApps) {\n\t\t\tif (input === name || input === stepName) {\n\t\t\t\treturn name\n\t\t\t}\n\t\t}\n\t\treturn null\n\t}\n\n\tif (to) {\n\t\tconst params = new URLSearchParams(to)\n\t\tapp1 = params.get('app1')\n\t\tapp2 = params.get('app2')\n\t}\n\tconst app1Name = getAppName(app1)\n\tconst app2Name = getAppName(app2)\n\tif (!app1Name || !app2Name) {\n\t\treturn (\n\t\t\t// @ts-expect-error 🤷‍♂️\n\t\t\t<callout-danger className=\"notification\">\n\t\t\t\t<div className=\"title\">DiffLink Error: invalid input</div>\n\t\t\t\t{!app1Name && <div>app1: \"{app1}\" is not a valid app name</div>}\n\t\t\t\t{!app2Name && <div>app2: \"{app2}\" is not a valid app name</div>}\n\t\t\t\t{/* @ts-expect-error 🤷‍♂️ */}\n\t\t\t</callout-danger>\n\t\t)\n\t}\n\n\tif (!to) {\n\t\tto = `app1=${app1Name}&app2=${app2Name}`\n\t}\n\tconst pathToDiff = fullPage\n\t\t? `/diff?${to}`\n\t\t: `?${decodeURIComponent(\n\t\t\t\twithParam(new URLSearchParams(), 'preview', `diff&${to}`).toString(),\n\t\t\t)}`\n\n\tif (!children) {\n\t\tchildren = (\n\t\t\t<span>\n\t\t\t\tGo to Diff {fullPage ? '' : 'Preview'} from: <code>{app1Name}</code> to:{' '}\n\t\t\t\t<code>{app2Name}</code>\n\t\t\t</span>\n\t\t)\n\t}\n\n\treturn <Link to={pathToDiff}>{children}</Link>\n}\n\nfunction InlineFile({\n\tfile,\n\ttype = 'playground',\n\tchildren = <code>{file}</code>,\n\t...props\n}: Omit<PropsWithChildren<typeof LaunchEditor>, 'appName'> & {\n\tfile: string\n\ttype?: 'playground' | 'solution' | 'problem'\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tconst app = data[type] || data[data.type]\n\n\tconst info = (\n\t\t<div className=\"launch-editor-button-wrapper flex underline underline-offset-4\">\n\t\t\t{children}{' '}\n\t\t\t<svg height={24} width={24}>\n\t\t\t\t<use href={`${iconsSvg}#Keyboard`} />\n\t\t\t</svg>\n\t\t</div>\n\t)\n\n\treturn ENV.EPICSHOP_DEPLOYED && app ? (\n\t\t<div className=\"inline-block grow\">\n\t\t\t<LaunchEditor appFile={file} appName={app.name} {...props}>\n\t\t\t\t{info}\n\t\t\t</LaunchEditor>\n\t\t</div>\n\t) : app ? (\n\t\t<div className=\"inline-block grow\">\n\t\t\t<LaunchEditor appFile={file} appName={app.name} {...props}>\n\t\t\t\t{info}\n\t\t\t</LaunchEditor>\n\t\t</div>\n\t) : type === 'playground' ? (\n\t\t// playground does not exist yet\n\t\t<SimpleTooltip content=\"You must 'Set to Playground' before opening a file\">\n\t\t\t<div className=\"inline-block grow cursor-not-allowed\">{info}</div>\n\t\t</SimpleTooltip>\n\t) : (\n\t\t<>children</>\n\t)\n}\n\nfunction getPreviewType(\n\tpreview: string | null,\n): 'playground' | 'problem' | 'solution' {\n\tif (preview === 'problem') return 'problem'\n\tif (preview === 'solution') return 'solution'\n\treturn 'playground'\n}\n\nfunction LinkToApp({\n\tto: appTo,\n\tchildren = <code>{appTo.toString()}</code>,\n\t...props\n}: LinkProps) {\n\tconst [searchParams] = useSearchParams()\n\tconst to = `?${withParam(\n\t\tsearchParams,\n\t\t'pathname',\n\t\tappTo.toString(),\n\t).toString()}`\n\tconst data = useLoaderData<typeof loader>()\n\tconst type = getPreviewType(searchParams.get('preview'))\n\tconst requestInfo = useRequestInfo()\n\tconst app = data[type]\n\tconst previewAppUrl =\n\t\tapp?.dev.type === 'script'\n\t\t\t? getBaseUrl({\n\t\t\t\t\tdomain: requestInfo.domain,\n\t\t\t\t\tport: app.dev.portNumber,\n\t\t\t\t})\n\t\t\t: data.playground?.dev.type === 'browser'\n\t\t\t\t? data.playground.dev.pathname\n\t\t\t\t: null\n\tconst { inBrowserBrowserRef } = useStepContext()\n\tconst href = previewAppUrl\n\t\t? previewAppUrl.slice(0, -1) + appTo.toString()\n\t\t: null\n\treturn (\n\t\t<div className=\"inline-flex items-center justify-between gap-1\">\n\t\t\t<Link\n\t\t\t\tto={to}\n\t\t\t\t{...props}\n\t\t\t\tclassName={cn(props.className, {\n\t\t\t\t\t'cursor-not-allowed': ENV.EPICSHOP_DEPLOYED,\n\t\t\t\t})}\n\t\t\t\ttitle={\n\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t? 'Cannot link to app in deployed version'\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tif (ENV.EPICSHOP_DEPLOYED) event.preventDefault()\n\n\t\t\t\t\tprops.onClick?.(event)\n\t\t\t\t\tinBrowserBrowserRef.current?.handleExtrnalNavigation(appTo.toString())\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Link>\n\t\t\t{href ? (\n\t\t\t\t<SimpleTooltip content=\"Open in new tab\">\n\t\t\t\t\t<a\n\t\t\t\t\t\thref={href}\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\tclassName={cn('flex aspect-square items-center justify-center', {\n\t\t\t\t\t\t\t'cursor-not-allowed': ENV.EPICSHOP_DEPLOYED,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t\t\t? 'Cannot link to app in deployed version'\n\t\t\t\t\t\t\t\t: 'Open in new tab'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\tif (ENV.EPICSHOP_DEPLOYED) event.preventDefault()\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name=\"ExternalLink\" />\n\t\t\t\t\t</a>\n\t\t\t\t</SimpleTooltip>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n","\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as Popover from '@radix-ui/react-popover'\nimport * as React from 'react'\nimport { Await, useLoaderData } from 'react-router'\nimport { Icon } from '#app/components/icons.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { LaunchEditor } from '#app/routes/launch-editor.tsx'\nimport { SetAppToPlayground } from '#app/routes/set-playground.tsx'\nimport { type Route as LayoutRoute } from '../+types/_layout.tsx'\n\nfunction TouchedFiles({\n\tdiffFilesPromise,\n}: {\n\tdiffFilesPromise: LayoutRoute.ComponentProps['loaderData']['diffFiles']\n}) {\n\tconst data = useLoaderData<LayoutRoute.ComponentProps['loaderData']>()\n\n\tconst [open, setOpen] = React.useState(false)\n\tconst contentRef = React.useRef<HTMLDivElement>(null)\n\n\tfunction handleLaunchUpdate() {\n\t\tsetOpen(false)\n\t}\n\n\tconst appName = data.playground?.appName\n\n\treturn (\n\t\t<>\n\t\t\t<Popover.Root open={open} onOpenChange={setOpen}>\n\t\t\t\t<Popover.Trigger asChild>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName=\"flex h-full items-center gap-1 border-r px-6 py-3 font-mono text-sm uppercase\"\n\t\t\t\t\t\taria-label=\"Relevant Files\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name=\"Files\" />\n\t\t\t\t\t\tFiles\n\t\t\t\t\t</button>\n\t\t\t\t</Popover.Trigger>\n\t\t\t\t<Popover.Portal>\n\t\t\t\t\t<Popover.Content\n\t\t\t\t\t\tref={contentRef}\n\t\t\t\t\t\tclassName=\"slideRightContent lg:slideUpContent invert-theme z-10 select-none rounded bg-background px-9 py-8 text-foreground\"\n\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"launch-editor-wrapper\">\n\t\t\t\t\t\t\t<strong className=\"inline-block px-2 pb-4 font-semibold uppercase\">\n\t\t\t\t\t\t\t\tRelevant Files\n\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t{data.problem &&\n\t\t\t\t\t\t\tdata.playground?.appName !== data.problem.name ? (\n\t\t\t\t\t\t\t\t<div className=\"mb-2 rounded p-1 font-mono font-medium\">\n\t\t\t\t\t\t\t\t\t<SetAppToPlayground appName={data.problem.name} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t<div id=\"files\">\n\t\t\t\t\t\t\t\t<React.Suspense\n\t\t\t\t\t\t\t\t\tfallback={\n\t\t\t\t\t\t\t\t\t\t<SimpleTooltip content=\"Loading diff\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" className=\"h-8 w-8 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Await\n\t\t\t\t\t\t\t\t\t\tresolve={diffFilesPromise}\n\t\t\t\t\t\t\t\t\t\terrorElement={\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-foreground-destructive\">\n\t\t\t\t\t\t\t\t\t\t\t\tSomething went wrong.\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{(diffFiles) => {\n\t\t\t\t\t\t\t\t\t\t\tif (!diffFiles) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-foreground-destructive\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUnable to determine diff\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (typeof diffFiles === 'string') {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-foreground-destructive\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (!diffFiles.length) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn <p>No files changed</p>\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tconst props =\n\t\t\t\t\t\t\t\t\t\t\t\tappName || ENV.EPICSHOP_GITHUB_ROOT\n\t\t\t\t\t\t\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"You must 'Set to Playground' before opening a file\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName: 'not-allowed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<ul {...props}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles.length > 1 && !ENV.EPICSHOP_DEPLOYED ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"mb-2 border-b border-b-gray-50 border-opacity-50 pb-2 font-sans\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<LaunchEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappFile={diffFiles.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(file) => `${file.path},${file.line},1`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName=\"playground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate={handleLaunchUpdate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Open All Files</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</LaunchEditor>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles.map((file) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li key={file.path} data-state={file.status}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<LaunchEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappFile={`${file.path},${file.line},1`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? (data.problem?.name ?? 'playground')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'playground'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate={handleLaunchUpdate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<code>{file.path}</code>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</LaunchEditor>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t</Await>\n\t\t\t\t\t\t\t\t</React.Suspense>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Popover.Content>\n\t\t\t\t</Popover.Portal>\n\t\t\t</Popover.Root>\n\t\t</>\n\t)\n}\n\nexport default TouchedFiles\n","import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetAppDisplayName,\n\tgetAppPageRoute,\n\tgetApps,\n\tgetExerciseApp,\n\tgetNextExerciseApp,\n\tgetPrevExerciseApp,\n\tisExerciseStepApp,\n\tisPlaygroundApp,\n\trequireExercise,\n\trequireExerciseApp,\n\ttype App,\n\ttype ExerciseStepApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport { getDiffFiles } from '@epic-web/workshop-utils/diff.server'\nimport { getEpicVideoInfos } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n} from '@epic-web/workshop-utils/timing.server'\nimport slugify from '@sindresorhus/slugify'\nimport { useRef } from 'react'\nimport {\n\tdata,\n\tredirect,\n\ttype HeadersFunction,\n\tLink,\n\tOutlet,\n} from 'react-router'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport { NavChevrons } from '#app/components/nav-chevrons.tsx'\nimport { useRevalidationWS } from '#app/components/revalidation-ws.js'\nimport { type RootLoaderData } from '#app/root.tsx'\nimport { EditFileOnGitHub } from '#app/routes/launch-editor.tsx'\nimport { ProgressToggle } from '#app/routes/progress.tsx'\nimport { SetAppToPlayground } from '#app/routes/set-playground.tsx'\nimport { getExercisePath } from '#app/utils/misc.tsx'\nimport { getSeoMetaTags } from '#app/utils/seo.js'\nimport { type Route } from './+types/_layout.tsx'\nimport { StepMdx } from './__shared/step-mdx.tsx'\nimport TouchedFiles from './__shared/touched-files.tsx'\n\nfunction pageTitle(\n\tdata: Awaited<Route.ComponentProps['loaderData']> | undefined,\n\tworkshopTitle?: string,\n) {\n\tconst exerciseNumber =\n\t\tdata?.exerciseStepApp.exerciseNumber.toString().padStart(2, '0') ?? '00'\n\tconst stepNumber =\n\t\tdata?.exerciseStepApp.stepNumber.toString().padStart(2, '0') ?? '00'\n\tconst emoji = (\n\t\t{\n\t\t\tproblem: '💪',\n\t\t\tsolution: '🏁',\n\t\t} as const\n\t)[data?.type ?? 'problem']\n\tconst title = data?.[data.type]?.title ?? 'N/A'\n\treturn {\n\t\temoji,\n\t\tstepNumber,\n\t\ttitle,\n\t\texerciseNumber,\n\t\texerciseTitle: data?.exerciseTitle ?? 'Unknown exercise',\n\t\tworkshopTitle,\n\t\ttype: data?.type ?? 'problem',\n\t}\n}\n\nexport const meta: Route.MetaFunction = ({ data, matches, params }) => {\n\tconst rootData = matches.find((m) => m?.id === 'root')?.data as RootLoaderData\n\tif (!data || !rootData) return [{ title: '🦉 | Error' }]\n\tconst { emoji, stepNumber, title, exerciseNumber, exerciseTitle } =\n\t\tpageTitle(data)\n\n\treturn getSeoMetaTags({\n\t\ttitle: `${emoji} | ${stepNumber}. ${title} | ${exerciseNumber}. ${exerciseTitle} | ${rootData.workshopTitle}`,\n\t\tdescription: `${params.type} step for exercise ${exerciseNumber}. ${exerciseTitle}`,\n\t\togTitle: title,\n\t\togDescription: `${exerciseTitle} step ${Number(stepNumber)} ${params.type}`,\n\t\tinstructor: rootData.instructor,\n\t\trequestInfo: rootData.requestInfo,\n\t})\n}\n\nexport async function loader({ request, params }: Route.LoaderArgs) {\n\tconst timings = makeTimings('exerciseStepTypeLayoutLoader')\n\tconst url = new URL(request.url)\n\tconst { title: workshopTitle } = getWorkshopConfig()\n\tconst cacheOptions = { request, timings }\n\tconst exerciseStepApp = await requireExerciseApp(params, cacheOptions)\n\tconst exercise = await requireExercise(\n\t\texerciseStepApp.exerciseNumber,\n\t\tcacheOptions,\n\t)\n\tconst reqUrl = new URL(request.url)\n\n\tconst pathnameParam = reqUrl.searchParams.get('pathname')\n\tif (pathnameParam === '' || pathnameParam === '/') {\n\t\treqUrl.searchParams.delete('pathname')\n\t\tthrow redirect(reqUrl.toString())\n\t}\n\n\tconst problemApp = await getExerciseApp(\n\t\t{ ...params, type: 'problem' },\n\t\tcacheOptions,\n\t)\n\tconst solutionApp = await getExerciseApp(\n\t\t{ ...params, type: 'solution' },\n\t\tcacheOptions,\n\t)\n\n\tif (!problemApp && !solutionApp) {\n\t\tthrow new Response('Not found', { status: 404 })\n\t}\n\n\tconst allAppsFull = await getApps(cacheOptions)\n\tconst playgroundApp = allAppsFull.find(isPlaygroundApp)\n\n\tfunction getStepId(a: ExerciseStepApp) {\n\t\treturn (\n\t\t\ta.exerciseNumber * 1000 +\n\t\t\ta.stepNumber * 10 +\n\t\t\t(a.type === 'problem' ? 0 : 1)\n\t\t)\n\t}\n\n\tfunction getStepNameAndId(a: App) {\n\t\tif (isExerciseStepApp(a)) {\n\t\t\tconst exerciseNumberStr = String(a.exerciseNumber).padStart(2, '0')\n\t\t\tconst stepNumberStr = String(a.stepNumber).padStart(2, '0')\n\n\t\t\treturn {\n\t\t\t\tstepName: `${exerciseNumberStr}/${stepNumberStr}.${a.type}`,\n\t\t\t\tstepId: getStepId(a),\n\t\t\t}\n\t\t}\n\t\treturn { stepName: '', stepId: -1 }\n\t}\n\n\tconst allApps = allAppsFull\n\t\t.filter((a, i, ar) => ar.findIndex((b) => a.name === b.name) === i)\n\t\t.map((a) => ({\n\t\t\tdisplayName: getAppDisplayName(a, allAppsFull),\n\t\t\tname: a.name,\n\t\t\ttitle: a.title,\n\t\t\ttype: a.type,\n\t\t\t...getStepNameAndId(a),\n\t\t}))\n\n\tallApps.sort((a, b) => {\n\t\t// order them by their stepId\n\t\tif (a.stepId > 0 && b.stepId > 0) return a.stepId - b.stepId\n\n\t\t// non-step apps should come after step apps\n\t\tif (a.stepId > 0) return -1\n\t\tif (b.stepId > 0) return 1\n\n\t\treturn 0\n\t})\n\tconst exerciseId = getStepId(exerciseStepApp)\n\tconst exerciseIndex = allApps.findIndex((step) => step.stepId === exerciseId)\n\n\tconst exerciseApps = allAppsFull\n\t\t.filter(isExerciseStepApp)\n\t\t.filter((app) => app.exerciseNumber === exerciseStepApp.exerciseNumber)\n\tconst isLastStep =\n\t\texerciseApps[exerciseApps.length - 1]?.name === exerciseStepApp.name\n\tconst isFirstStep = exerciseApps[0]?.name === exerciseStepApp.name\n\n\tconst nextApp = await getNextExerciseApp(exerciseStepApp, cacheOptions)\n\tconst prevApp = await getPrevExerciseApp(exerciseStepApp, cacheOptions)\n\n\tconst articleId = `workshop-${slugify(workshopTitle)}-${\n\t\texercise.exerciseNumber\n\t}-${exerciseStepApp.stepNumber}-${exerciseStepApp.type}`\n\n\tconst subroute = url.pathname.split(\n\t\t`/exercise/${params.exerciseNumber}/${params.stepNumber}/${params.type}/`,\n\t)[1]\n\treturn data(\n\t\t{\n\t\t\tarticleId,\n\t\t\ttype: params.type as 'problem' | 'solution',\n\t\t\texerciseStepApp,\n\t\t\texerciseTitle: exercise.title,\n\t\t\tepicVideoInfosPromise: getEpicVideoInfos(exerciseStepApp.epicVideoEmbeds),\n\t\t\texerciseIndex,\n\t\t\tallApps,\n\t\t\tprevStepLink: isFirstStep\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/exercise/${exerciseStepApp.exerciseNumber\n\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t.padStart(2, '0')}`,\n\t\t\t\t\t}\n\t\t\t\t: prevApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tto: getAppPageRoute(prevApp, {\n\t\t\t\t\t\t\t\tsubroute,\n\t\t\t\t\t\t\t\tsearchParams: url.searchParams,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t}\n\t\t\t\t\t: null,\n\t\t\tnextStepLink: isLastStep\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/exercise/${exerciseStepApp.exerciseNumber\n\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t.padStart(2, '0')}/finished`,\n\t\t\t\t\t}\n\t\t\t\t: nextApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tto: getAppPageRoute(nextApp, {\n\t\t\t\t\t\t\t\tsubroute,\n\t\t\t\t\t\t\t\tsearchParams: url.searchParams,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t}\n\t\t\t\t\t: null,\n\t\t\tplayground: playgroundApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'playground',\n\t\t\t\t\t\tappName: playgroundApp.appName,\n\t\t\t\t\t\tname: playgroundApp.name,\n\t\t\t\t\t\tfullPath: playgroundApp.fullPath,\n\t\t\t\t\t\tdev: playgroundApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tproblem: problemApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'problem',\n\t\t\t\t\t\ttitle: problemApp.title,\n\t\t\t\t\t\tname: problemApp.name,\n\t\t\t\t\t\tfullPath: problemApp.fullPath,\n\t\t\t\t\t\tdev: problemApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tsolution: solutionApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'solution',\n\t\t\t\t\t\ttitle: solutionApp.title,\n\t\t\t\t\t\tname: solutionApp.name,\n\t\t\t\t\t\tfullPath: solutionApp.fullPath,\n\t\t\t\t\t\tdev: solutionApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tdiffFiles:\n\t\t\t\tproblemApp && solutionApp\n\t\t\t\t\t? getDiffFiles(problemApp, solutionApp, {\n\t\t\t\t\t\t\t...cacheOptions,\n\t\t\t\t\t\t\tforceFresh: url.searchParams.get('forceFresh') === 'diff',\n\t\t\t\t\t\t}).catch((e) => {\n\t\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t\t\treturn 'There was a problem generating the diff (check the terminal output)'\n\t\t\t\t\t\t})\n\t\t\t\t\t: 'No diff available',\n\t\t} as const,\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nexport default function ExercisePartRoute({\n\tloaderData: data,\n}: Route.ComponentProps) {\n\tconst inBrowserBrowserRef = useRef<InBrowserBrowserRef>(null)\n\n\tconst titleBits = pageTitle(data)\n\n\tuseRevalidationWS({\n\t\twatchPaths: [`${data.exerciseStepApp.relativePath}/README.mdx`],\n\t})\n\n\treturn (\n\t\t<div className=\"flex max-w-full flex-grow flex-col\">\n\t\t\t<main className=\"flex flex-grow flex-col sm:grid sm:h-full sm:min-h-[800px] sm:grid-cols-1 sm:grid-rows-2 md:min-h-[unset] lg:grid-cols-2 lg:grid-rows-1\">\n\t\t\t\t<div className=\"relative flex flex-col sm:col-span-1 sm:row-span-1 sm:h-full lg:border-r\">\n\t\t\t\t\t<h1 className=\"h-14 border-b pl-10 pr-5 text-sm font-medium leading-tight\">\n\t\t\t\t\t\t<div className=\"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-start gap-x-2 uppercase\">\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={getExercisePath(data.exerciseStepApp.exerciseNumber)}\n\t\t\t\t\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{titleBits.exerciseNumber}. {titleBits.exerciseTitle}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t{'/'}\n\t\t\t\t\t\t\t\t<Link to=\".\" className=\"hover:underline\">\n\t\t\t\t\t\t\t\t\t{titleBits.stepNumber}. {titleBits.title}\n\t\t\t\t\t\t\t\t\t{' ('}\n\t\t\t\t\t\t\t\t\t{titleBits.emoji} {titleBits.type}\n\t\t\t\t\t\t\t\t\t{')'}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{data.problem &&\n\t\t\t\t\t\t\tdata.playground?.appName !== data.problem.name ? (\n\t\t\t\t\t\t\t\t<div className=\"hidden md:block\">\n\t\t\t\t\t\t\t\t\t<SetAppToPlayground appName={data.problem.name} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<article\n\t\t\t\t\t\tid={data.articleId}\n\t\t\t\t\t\tkey={data.articleId}\n\t\t\t\t\t\tclassName=\"shadow-on-scrollbox flex h-full w-full max-w-none flex-1 scroll-pt-6 flex-col justify-between space-y-6 overflow-y-auto p-2 scrollbar-thin scrollbar-thumb-scrollbar sm:p-10 sm:pt-8\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{data.exerciseStepApp.instructionsCode ? (\n\t\t\t\t\t\t\t<StepMdx inBrowserBrowserRef={inBrowserBrowserRef} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex h-full items-center justify-center text-lg\">\n\t\t\t\t\t\t\t\t<p>No instructions yet...</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<div className=\"mt-auto flex justify-between\">\n\t\t\t\t\t\t\t{data.prevStepLink ? (\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={data.prevStepLink.to}\n\t\t\t\t\t\t\t\t\taria-label=\"Previous Step\"\n\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t← Previous\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{data.nextStepLink ? (\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={data.nextStepLink.to}\n\t\t\t\t\t\t\t\t\taria-label=\"Next Step\"\n\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tNext →\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</article>\n\t\t\t\t\t<ElementScrollRestoration\n\t\t\t\t\t\telementQuery={`#${data.articleId}`}\n\t\t\t\t\t\tkey={`scroll-${data.articleId}`}\n\t\t\t\t\t/>\n\t\t\t\t\t{data.type === 'solution' ? (\n\t\t\t\t\t\t<ProgressToggle\n\t\t\t\t\t\t\ttype=\"step\"\n\t\t\t\t\t\t\texerciseNumber={data.exerciseStepApp.exerciseNumber}\n\t\t\t\t\t\t\tstepNumber={data.exerciseStepApp.stepNumber}\n\t\t\t\t\t\t\tclassName=\"h-14 border-t px-6\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null}\n\t\t\t\t\t<div className=\"flex h-16 justify-between border-b-4 border-t lg:border-b-0\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div className=\"h-full\">\n\t\t\t\t\t\t\t\t<TouchedFiles diffFilesPromise={data.diffFiles} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\t\t\tappName={data.exerciseStepApp.name}\n\t\t\t\t\t\t\trelativePath={data.exerciseStepApp.relativePath}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<NavChevrons\n\t\t\t\t\t\t\tprev={\n\t\t\t\t\t\t\t\tdata.prevStepLink\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tto: data.prevStepLink.to,\n\t\t\t\t\t\t\t\t\t\t\t'aria-label': 'Previous Step',\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnext={\n\t\t\t\t\t\t\t\tdata.nextStepLink\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tto: data.nextStepLink.to,\n\t\t\t\t\t\t\t\t\t\t\t'aria-label': 'Next Step',\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Outlet />\n\t\t\t</main>\n\t\t</div>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn (\n\t\t<GeneralErrorBoundary\n\t\t\tstatusHandlers={{\n\t\t\t\t404: () => <p>Sorry, we couldn't find an app here.</p>,\n\t\t\t\t503: () => (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h1>Service Unavailable</h1>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\tSorry, we're having a temporary problem. Please try again later.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<button onClick={() => window.location.reload()}>Refresh</button>\n\t\t\t\t\t</div>\n\t\t\t\t),\n\t\t\t}}\n\t\t/>\n\t)\n}\n"],"names":["StepContext","React.createContext","useStepContext","context","React.useContext","StepContextProvider","children","inBrowserBrowserRef","jsx","stepMdxComponents","DiffLink","PrevDiffLink","NextDiffLink","InlineFile","LinkToApp","StepMdx","data","useLoaderData","EpicVideoInfoProvider","Mdx","withParam","searchParams","key","value","newSearchParams","app","fullPage","app1","app2","to","getAppName","input","stepIndex","name","stepName","params","app1Name","app2Name","jsxs","pathToDiff","Link","file","type","props","info","iconsSvg","LaunchEditor","SimpleTooltip","getPreviewType","preview","appTo","useSearchParams","requestInfo","useRequestInfo","previewAppUrl","getBaseUrl","href","cn","event","Icon","POPOVER_NAME","createPopoverContext","createPopoverScope","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","__scopePopover","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","React.useRef","hasCustomAnchor","setHasCustomAnchor","React.useState","open","setOpen","useControllableState","PopperPrimitive.Root","useId","React.useCallback","prevOpen","ANCHOR_NAME","PopoverAnchor","React.forwardRef","forwardedRef","anchorProps","onCustomAnchorAdd","onCustomAnchorRemove","React.useEffect","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","createSlot","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","PopoverContentImpl","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Trigger","Portal","Content2","TouchedFiles","diffFilesPromise","handleLaunchUpdate","appName","Popover.Root","Popover.Trigger","Popover.Portal","Popover.Content","SetAppToPlayground","React.Suspense","Await","diffFiles","pageTitle","workshopTitle","exerciseNumber","exerciseStepApp","toString","padStart","stepNumber","emoji","problem","solution","title","exerciseTitle","meta","matches","rootData","find","m","id","getSeoMetaTags","description","ogTitle","ogDescription","Number","instructor","_layout","_UNSAFE_withComponentProps","loaderData","useRef","titleBits","useRevalidationWS","watchPaths","relativePath","className","getExercisePath","playground","articleId","instructionsCode","prevStepLink","prefetch","nextStepLink","ElementScrollRestoration","elementQuery","ProgressToggle","EditFileOnGitHub","NavChevrons","prev","next","Outlet","ErrorBoundary","_UNSAFE_withErrorBoundaryProps","GeneralErrorBoundary","statusHandlers","onClick","window","location","reload"],"mappings":"ssCAsBA,MAAMA,EAAcC,EAAAA,cAA4C,IAAI,EAEpE,SAASC,IAAiB,CACzB,MAAMC,EAAUC,EAAAA,WAAiBJ,CAAW,EAC5C,GAAI,CAACG,EACJ,MAAM,IAAI,MAAM,2DAA2D,EAE5E,OAAOA,CACR,CAEA,SAASE,GAAoB,CAC5B,SAAAC,EACA,oBAAAC,CACD,EAGG,CACF,OACCC,EAAAA,IAACR,EAAY,SAAZ,CAAqB,MAAO,CAAE,oBAAAO,CAAA,EAC7B,SAAAD,EACF,CAEF,CAEA,MAAMG,GAAoB,CACzB,SAAAC,EACA,aAAAC,GACA,aAAAC,GACA,WAAAC,GACA,UAAAC,EACD,EAEO,SAASC,GAAQ,CACvB,oBAAAR,CACD,EAEG,CACF,MAAMS,EAAOC,EAAA,EACb,OAAKD,EAAK,gBAAgB,iBAEzBR,EAAAA,IAACH,GAAA,CAAoB,oBAAAE,EACpB,SAAAC,EAAAA,IAACU,GAAA,CAAsB,sBAAuBF,EAAK,sBAClD,SAAAR,MAAC,MAAA,CAAI,UAAU,sCACd,SAAAA,EAAAA,IAACW,GAAA,CACA,KAAMH,EAAK,gBAAgB,iBAC3B,WAAYP,EAAA,CAAA,CACb,CACD,EACD,EACD,EAXkD,IAapD,CAEA,SAASW,EACRC,EACAC,EACAC,EACC,CACD,MAAMC,EAA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AMC,OAAOC,SAASC,OAAA,EAAU1N,SAAA,SAAA,CAAO,CAAA,EACzD,CAEF,CAAA,CACD,CAEF,CAAA","x_google_ignoreList":[1]}
1
+ {"version":3,"file":"_layout-jWJDG9vA.js","sources":["../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/step-mdx.tsx","../../../../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/touched-files.tsx","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout.tsx"],"sourcesContent":["import * as React from 'react'\nimport { type PropsWithChildren } from 'react'\nimport {\n\tLink,\n\tuseLoaderData,\n\tuseSearchParams,\n\ttype LinkProps,\n} from 'react-router'\nimport iconsSvg from '#app/assets/icons.svg'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { Icon } from '#app/components/icons.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { LaunchEditor } from '#app/routes/launch-editor.tsx'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn, getBaseUrl } from '#app/utils/misc.tsx'\nimport { useRequestInfo } from '#app/utils/request-info.ts'\nimport { type loader } from '../_layout.tsx'\n\ntype StepContextType = {\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}\nconst StepContext = React.createContext<StepContextType | null>(null)\n\nfunction useStepContext() {\n\tconst context = React.useContext(StepContext)\n\tif (!context) {\n\t\tthrow new Error('useStepContext must be used within a StepContext.Provider')\n\t}\n\treturn context\n}\n\nfunction StepContextProvider({\n\tchildren,\n\tinBrowserBrowserRef,\n}: {\n\tchildren: React.ReactNode\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\treturn (\n\t\t<StepContext.Provider value={{ inBrowserBrowserRef }}>\n\t\t\t{children}\n\t\t</StepContext.Provider>\n\t)\n}\n\nconst stepMdxComponents = {\n\tDiffLink,\n\tPrevDiffLink,\n\tNextDiffLink,\n\tInlineFile,\n\tLinkToApp,\n}\n\nexport function StepMdx({\n\tinBrowserBrowserRef,\n}: {\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tif (!data.exerciseStepApp.instructionsCode) return null\n\treturn (\n\t\t<StepContextProvider inBrowserBrowserRef={inBrowserBrowserRef}>\n\t\t\t<EpicVideoInfoProvider epicVideoInfosPromise={data.epicVideoInfosPromise}>\n\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t<Mdx\n\t\t\t\t\t\tcode={data.exerciseStepApp.instructionsCode}\n\t\t\t\t\t\tcomponents={stepMdxComponents}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</EpicVideoInfoProvider>\n\t\t</StepContextProvider>\n\t)\n}\n\nfunction withParam(\n\tsearchParams: URLSearchParams,\n\tkey: string,\n\tvalue: string | null,\n) {\n\tconst newSearchParams = new URLSearchParams(searchParams)\n\tif (value === null) {\n\t\tnewSearchParams.delete(key)\n\t} else {\n\t\tnewSearchParams.set(key, value)\n\t}\n\treturn newSearchParams\n}\n\nfunction NextDiffLink({\n\tapp = 0,\n\tfullPage = false,\n\tchildren,\n}: {\n\tapp: number\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\treturn (\n\t\t<DiffLink app1={app} app2={app + 1} fullPage={fullPage}>\n\t\t\t{children}\n\t\t</DiffLink>\n\t)\n}\n\nfunction PrevDiffLink({\n\tapp = -1,\n\tfullPage = false,\n\tchildren,\n}: {\n\tapp: number\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\treturn (\n\t\t<DiffLink app1={app} app2={app + 1} fullPage={fullPage}>\n\t\t\t{children}\n\t\t</DiffLink>\n\t)\n}\n\nfunction DiffLink({\n\tapp1 = 0,\n\tapp2 = 1,\n\tchildren,\n\tfullPage = false,\n\tto,\n}: {\n\tapp1?: string | number | null\n\tapp2?: string | number | null\n\tto?: string\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tif (!to && !app1 && !app2) {\n\t\treturn (\n\t\t\t// @ts-expect-error 🤷‍♂️\n\t\t\t<callout-danger className=\"notification\">\n\t\t\t\t<div className=\"title\">DiffLink Error: invalid input</div>\n\t\t\t\t{/* @ts-expect-error 🤷‍♂️ */}\n\t\t\t</callout-danger>\n\t\t)\n\t}\n\n\tfunction getAppName(input: typeof app1) {\n\t\tif (typeof input === 'number') {\n\t\t\tconst stepIndex = data.exerciseIndex + input\n\t\t\treturn data.allApps[stepIndex]?.name\n\t\t}\n\t\tif (!input) return null\n\t\tfor (const { name, stepName } of data.allApps) {\n\t\t\tif (input === name || input === stepName) {\n\t\t\t\treturn name\n\t\t\t}\n\t\t}\n\t\treturn null\n\t}\n\n\tif (to) {\n\t\tconst params = new URLSearchParams(to)\n\t\tapp1 = params.get('app1')\n\t\tapp2 = params.get('app2')\n\t}\n\tconst app1Name = getAppName(app1)\n\tconst app2Name = getAppName(app2)\n\tif (!app1Name || !app2Name) {\n\t\treturn (\n\t\t\t// @ts-expect-error 🤷‍♂️\n\t\t\t<callout-danger className=\"notification\">\n\t\t\t\t<div className=\"title\">DiffLink Error: invalid input</div>\n\t\t\t\t{!app1Name && <div>app1: \"{app1}\" is not a valid app name</div>}\n\t\t\t\t{!app2Name && <div>app2: \"{app2}\" is not a valid app name</div>}\n\t\t\t\t{/* @ts-expect-error 🤷‍♂️ */}\n\t\t\t</callout-danger>\n\t\t)\n\t}\n\n\tif (!to) {\n\t\tto = `app1=${app1Name}&app2=${app2Name}`\n\t}\n\tconst pathToDiff = fullPage\n\t\t? `/diff?${to}`\n\t\t: `?${decodeURIComponent(\n\t\t\t\twithParam(new URLSearchParams(), 'preview', `diff&${to}`).toString(),\n\t\t\t)}`\n\n\tif (!children) {\n\t\tchildren = (\n\t\t\t<span>\n\t\t\t\tGo to Diff {fullPage ? '' : 'Preview'} from: <code>{app1Name}</code> to:{' '}\n\t\t\t\t<code>{app2Name}</code>\n\t\t\t</span>\n\t\t)\n\t}\n\n\treturn <Link to={pathToDiff}>{children}</Link>\n}\n\nfunction InlineFile({\n\tfile,\n\ttype = 'playground',\n\tchildren = <code>{file}</code>,\n\t...props\n}: Omit<PropsWithChildren<typeof LaunchEditor>, 'appName'> & {\n\tfile: string\n\ttype?: 'playground' | 'solution' | 'problem'\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tconst app = data[type] || data[data.type]\n\n\tconst info = (\n\t\t<div className=\"launch-editor-button-wrapper flex underline underline-offset-4\">\n\t\t\t{children}{' '}\n\t\t\t<svg height={24} width={24}>\n\t\t\t\t<use href={`${iconsSvg}#Keyboard`} />\n\t\t\t</svg>\n\t\t</div>\n\t)\n\n\treturn ENV.EPICSHOP_DEPLOYED && app ? (\n\t\t<div className=\"inline-block grow\">\n\t\t\t<LaunchEditor appFile={file} appName={app.name} {...props}>\n\t\t\t\t{info}\n\t\t\t</LaunchEditor>\n\t\t</div>\n\t) : app ? (\n\t\t<div className=\"inline-block grow\">\n\t\t\t<LaunchEditor appFile={file} appName={app.name} {...props}>\n\t\t\t\t{info}\n\t\t\t</LaunchEditor>\n\t\t</div>\n\t) : type === 'playground' ? (\n\t\t// playground does not exist yet\n\t\t<SimpleTooltip content=\"You must 'Set to Playground' before opening a file\">\n\t\t\t<div className=\"inline-block grow cursor-not-allowed\">{info}</div>\n\t\t</SimpleTooltip>\n\t) : (\n\t\t<>children</>\n\t)\n}\n\nfunction getPreviewType(\n\tpreview: string | null,\n): 'playground' | 'problem' | 'solution' {\n\tif (preview === 'problem') return 'problem'\n\tif (preview === 'solution') return 'solution'\n\treturn 'playground'\n}\n\nfunction LinkToApp({\n\tto: appTo,\n\tchildren = <code>{appTo.toString()}</code>,\n\t...props\n}: LinkProps) {\n\tconst [searchParams] = useSearchParams()\n\tconst to = `?${withParam(\n\t\tsearchParams,\n\t\t'pathname',\n\t\tappTo.toString(),\n\t).toString()}`\n\tconst data = useLoaderData<typeof loader>()\n\tconst type = getPreviewType(searchParams.get('preview'))\n\tconst requestInfo = useRequestInfo()\n\tconst app = data[type]\n\tconst previewAppUrl =\n\t\tapp?.dev.type === 'script'\n\t\t\t? getBaseUrl({\n\t\t\t\t\tdomain: requestInfo.domain,\n\t\t\t\t\tport: app.dev.portNumber,\n\t\t\t\t})\n\t\t\t: data.playground?.dev.type === 'browser'\n\t\t\t\t? data.playground.dev.pathname\n\t\t\t\t: null\n\tconst { inBrowserBrowserRef } = useStepContext()\n\tconst href = previewAppUrl\n\t\t? previewAppUrl.slice(0, -1) + appTo.toString()\n\t\t: null\n\treturn (\n\t\t<div className=\"inline-flex items-center justify-between gap-1\">\n\t\t\t<Link\n\t\t\t\tto={to}\n\t\t\t\t{...props}\n\t\t\t\tclassName={cn(props.className, {\n\t\t\t\t\t'cursor-not-allowed': ENV.EPICSHOP_DEPLOYED,\n\t\t\t\t})}\n\t\t\t\ttitle={\n\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t? 'Cannot link to app in deployed version'\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tif (ENV.EPICSHOP_DEPLOYED) event.preventDefault()\n\n\t\t\t\t\tprops.onClick?.(event)\n\t\t\t\t\tinBrowserBrowserRef.current?.handleExtrnalNavigation(appTo.toString())\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Link>\n\t\t\t{href ? (\n\t\t\t\t<SimpleTooltip content=\"Open in new tab\">\n\t\t\t\t\t<a\n\t\t\t\t\t\thref={href}\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\tclassName={cn('flex aspect-square items-center justify-center', {\n\t\t\t\t\t\t\t'cursor-not-allowed': ENV.EPICSHOP_DEPLOYED,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t\t\t? 'Cannot link to app in deployed version'\n\t\t\t\t\t\t\t\t: 'Open in new tab'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\tif (ENV.EPICSHOP_DEPLOYED) event.preventDefault()\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name=\"ExternalLink\" />\n\t\t\t\t\t</a>\n\t\t\t\t</SimpleTooltip>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n","\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as Popover from '@radix-ui/react-popover'\nimport * as React from 'react'\nimport { Await, useLoaderData } from 'react-router'\nimport { Icon } from '#app/components/icons.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { LaunchEditor } from '#app/routes/launch-editor.tsx'\nimport { SetAppToPlayground } from '#app/routes/set-playground.tsx'\nimport { type Route as LayoutRoute } from '../+types/_layout.tsx'\n\nfunction TouchedFiles({\n\tdiffFilesPromise,\n}: {\n\tdiffFilesPromise: LayoutRoute.ComponentProps['loaderData']['diffFiles']\n}) {\n\tconst data = useLoaderData<LayoutRoute.ComponentProps['loaderData']>()\n\n\tconst [open, setOpen] = React.useState(false)\n\tconst contentRef = React.useRef<HTMLDivElement>(null)\n\n\tfunction handleLaunchUpdate() {\n\t\tsetOpen(false)\n\t}\n\n\tconst appName = data.playground?.appName\n\n\treturn (\n\t\t<>\n\t\t\t<Popover.Root open={open} onOpenChange={setOpen}>\n\t\t\t\t<Popover.Trigger asChild>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName=\"flex h-full items-center gap-1 border-r px-6 py-3 font-mono text-sm uppercase\"\n\t\t\t\t\t\taria-label=\"Relevant Files\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name=\"Files\" />\n\t\t\t\t\t\tFiles\n\t\t\t\t\t</button>\n\t\t\t\t</Popover.Trigger>\n\t\t\t\t<Popover.Portal>\n\t\t\t\t\t<Popover.Content\n\t\t\t\t\t\tref={contentRef}\n\t\t\t\t\t\tclassName=\"slideRightContent lg:slideUpContent invert-theme z-10 select-none rounded bg-background px-9 py-8 text-foreground\"\n\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"launch-editor-wrapper\">\n\t\t\t\t\t\t\t<strong className=\"inline-block px-2 pb-4 font-semibold uppercase\">\n\t\t\t\t\t\t\t\tRelevant Files\n\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t{data.problem &&\n\t\t\t\t\t\t\tdata.playground?.appName !== data.problem.name ? (\n\t\t\t\t\t\t\t\t<div className=\"mb-2 rounded p-1 font-mono font-medium\">\n\t\t\t\t\t\t\t\t\t<SetAppToPlayground appName={data.problem.name} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t<div id=\"files\">\n\t\t\t\t\t\t\t\t<React.Suspense\n\t\t\t\t\t\t\t\t\tfallback={\n\t\t\t\t\t\t\t\t\t\t<SimpleTooltip content=\"Loading diff\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" className=\"h-8 w-8 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Await\n\t\t\t\t\t\t\t\t\t\tresolve={diffFilesPromise}\n\t\t\t\t\t\t\t\t\t\terrorElement={\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-foreground-destructive\">\n\t\t\t\t\t\t\t\t\t\t\t\tSomething went wrong.\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{(diffFiles) => {\n\t\t\t\t\t\t\t\t\t\t\tif (!diffFiles) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-foreground-destructive\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUnable to determine diff\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (typeof diffFiles === 'string') {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-foreground-destructive\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (!diffFiles.length) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn <p>No files changed</p>\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tconst props =\n\t\t\t\t\t\t\t\t\t\t\t\tappName || ENV.EPICSHOP_GITHUB_ROOT\n\t\t\t\t\t\t\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"You must 'Set to Playground' before opening a file\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName: 'not-allowed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<ul {...props}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles.length > 1 && !ENV.EPICSHOP_DEPLOYED ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"mb-2 border-b border-b-gray-50 border-opacity-50 pb-2 font-sans\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<LaunchEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappFile={diffFiles.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(file) => `${file.path},${file.line},1`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName=\"playground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate={handleLaunchUpdate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Open All Files</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</LaunchEditor>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles.map((file) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li key={file.path} data-state={file.status}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<LaunchEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappFile={`${file.path},${file.line},1`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? (data.problem?.name ?? 'playground')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'playground'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate={handleLaunchUpdate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<code>{file.path}</code>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</LaunchEditor>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t</Await>\n\t\t\t\t\t\t\t\t</React.Suspense>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Popover.Content>\n\t\t\t\t</Popover.Portal>\n\t\t\t</Popover.Root>\n\t\t</>\n\t)\n}\n\nexport default TouchedFiles\n","import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetAppDisplayName,\n\tgetAppPageRoute,\n\tgetApps,\n\tgetExerciseApp,\n\tgetNextExerciseApp,\n\tgetPrevExerciseApp,\n\tisExerciseStepApp,\n\tisPlaygroundApp,\n\trequireExercise,\n\trequireExerciseApp,\n\ttype App,\n\ttype ExerciseStepApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport { getDiffFiles } from '@epic-web/workshop-utils/diff.server'\nimport { getEpicVideoInfos } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n} from '@epic-web/workshop-utils/timing.server'\nimport slugify from '@sindresorhus/slugify'\nimport { useRef } from 'react'\nimport {\n\tdata,\n\tredirect,\n\ttype HeadersFunction,\n\tLink,\n\tOutlet,\n} from 'react-router'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport { NavChevrons } from '#app/components/nav-chevrons.tsx'\nimport { useRevalidationWS } from '#app/components/revalidation-ws.js'\nimport { type RootLoaderData } from '#app/root.tsx'\nimport { EditFileOnGitHub } from '#app/routes/launch-editor.tsx'\nimport { ProgressToggle } from '#app/routes/progress.tsx'\nimport { SetAppToPlayground } from '#app/routes/set-playground.tsx'\nimport { getExercisePath } from '#app/utils/misc.tsx'\nimport { getSeoMetaTags } from '#app/utils/seo.js'\nimport { type Route } from './+types/_layout.tsx'\nimport { StepMdx } from './__shared/step-mdx.tsx'\nimport TouchedFiles from './__shared/touched-files.tsx'\n\nfunction pageTitle(\n\tdata: Awaited<Route.ComponentProps['loaderData']> | undefined,\n\tworkshopTitle?: string,\n) {\n\tconst exerciseNumber =\n\t\tdata?.exerciseStepApp.exerciseNumber.toString().padStart(2, '0') ?? '00'\n\tconst stepNumber =\n\t\tdata?.exerciseStepApp.stepNumber.toString().padStart(2, '0') ?? '00'\n\tconst emoji = (\n\t\t{\n\t\t\tproblem: '💪',\n\t\t\tsolution: '🏁',\n\t\t} as const\n\t)[data?.type ?? 'problem']\n\tconst title = data?.[data.type]?.title ?? 'N/A'\n\treturn {\n\t\temoji,\n\t\tstepNumber,\n\t\ttitle,\n\t\texerciseNumber,\n\t\texerciseTitle: data?.exerciseTitle ?? 'Unknown exercise',\n\t\tworkshopTitle,\n\t\ttype: data?.type ?? 'problem',\n\t}\n}\n\nexport const meta: Route.MetaFunction = ({ data, matches, params }) => {\n\tconst rootData = matches.find((m) => m?.id === 'root')?.data as RootLoaderData\n\tif (!data || !rootData) return [{ title: '🦉 | Error' }]\n\tconst { emoji, stepNumber, title, exerciseNumber, exerciseTitle } =\n\t\tpageTitle(data)\n\n\treturn getSeoMetaTags({\n\t\ttitle: `${emoji} | ${stepNumber}. ${title} | ${exerciseNumber}. ${exerciseTitle} | ${rootData.workshopTitle}`,\n\t\tdescription: `${params.type} step for exercise ${exerciseNumber}. ${exerciseTitle}`,\n\t\togTitle: title,\n\t\togDescription: `${exerciseTitle} step ${Number(stepNumber)} ${params.type}`,\n\t\tinstructor: rootData.instructor,\n\t\trequestInfo: rootData.requestInfo,\n\t})\n}\n\nexport async function loader({ request, params }: Route.LoaderArgs) {\n\tconst timings = makeTimings('exerciseStepTypeLayoutLoader')\n\tconst url = new URL(request.url)\n\tconst { title: workshopTitle } = getWorkshopConfig()\n\tconst cacheOptions = { request, timings }\n\tconst exerciseStepApp = await requireExerciseApp(params, cacheOptions)\n\tconst exercise = await requireExercise(\n\t\texerciseStepApp.exerciseNumber,\n\t\tcacheOptions,\n\t)\n\tconst reqUrl = new URL(request.url)\n\n\tconst pathnameParam = reqUrl.searchParams.get('pathname')\n\tif (pathnameParam === '' || pathnameParam === '/') {\n\t\treqUrl.searchParams.delete('pathname')\n\t\tthrow redirect(reqUrl.toString())\n\t}\n\n\tconst problemApp = await getExerciseApp(\n\t\t{ ...params, type: 'problem' },\n\t\tcacheOptions,\n\t)\n\tconst solutionApp = await getExerciseApp(\n\t\t{ ...params, type: 'solution' },\n\t\tcacheOptions,\n\t)\n\n\tif (!problemApp && !solutionApp) {\n\t\tthrow new Response('Not found', { status: 404 })\n\t}\n\n\tconst allAppsFull = await getApps(cacheOptions)\n\tconst playgroundApp = allAppsFull.find(isPlaygroundApp)\n\n\tfunction getStepId(a: ExerciseStepApp) {\n\t\treturn (\n\t\t\ta.exerciseNumber * 1000 +\n\t\t\ta.stepNumber * 10 +\n\t\t\t(a.type === 'problem' ? 0 : 1)\n\t\t)\n\t}\n\n\tfunction getStepNameAndId(a: App) {\n\t\tif (isExerciseStepApp(a)) {\n\t\t\tconst exerciseNumberStr = String(a.exerciseNumber).padStart(2, '0')\n\t\t\tconst stepNumberStr = String(a.stepNumber).padStart(2, '0')\n\n\t\t\treturn {\n\t\t\t\tstepName: `${exerciseNumberStr}/${stepNumberStr}.${a.type}`,\n\t\t\t\tstepId: getStepId(a),\n\t\t\t}\n\t\t}\n\t\treturn { stepName: '', stepId: -1 }\n\t}\n\n\tconst allApps = allAppsFull\n\t\t.filter((a, i, ar) => ar.findIndex((b) => a.name === b.name) === i)\n\t\t.map((a) => ({\n\t\t\tdisplayName: getAppDisplayName(a, allAppsFull),\n\t\t\tname: a.name,\n\t\t\ttitle: a.title,\n\t\t\ttype: a.type,\n\t\t\t...getStepNameAndId(a),\n\t\t}))\n\n\tallApps.sort((a, b) => {\n\t\t// order them by their stepId\n\t\tif (a.stepId > 0 && b.stepId > 0) return a.stepId - b.stepId\n\n\t\t// non-step apps should come after step apps\n\t\tif (a.stepId > 0) return -1\n\t\tif (b.stepId > 0) return 1\n\n\t\treturn 0\n\t})\n\tconst exerciseId = getStepId(exerciseStepApp)\n\tconst exerciseIndex = allApps.findIndex((step) => step.stepId === exerciseId)\n\n\tconst exerciseApps = allAppsFull\n\t\t.filter(isExerciseStepApp)\n\t\t.filter((app) => app.exerciseNumber === exerciseStepApp.exerciseNumber)\n\tconst isLastStep =\n\t\texerciseApps[exerciseApps.length - 1]?.name === exerciseStepApp.name\n\tconst isFirstStep = exerciseApps[0]?.name === exerciseStepApp.name\n\n\tconst nextApp = await getNextExerciseApp(exerciseStepApp, cacheOptions)\n\tconst prevApp = await getPrevExerciseApp(exerciseStepApp, cacheOptions)\n\n\tconst articleId = `workshop-${slugify(workshopTitle)}-${\n\t\texercise.exerciseNumber\n\t}-${exerciseStepApp.stepNumber}-${exerciseStepApp.type}`\n\n\tconst subroute = url.pathname.split(\n\t\t`/exercise/${params.exerciseNumber}/${params.stepNumber}/${params.type}/`,\n\t)[1]\n\treturn data(\n\t\t{\n\t\t\tarticleId,\n\t\t\ttype: params.type as 'problem' | 'solution',\n\t\t\texerciseStepApp,\n\t\t\texerciseTitle: exercise.title,\n\t\t\tepicVideoInfosPromise: getEpicVideoInfos(exerciseStepApp.epicVideoEmbeds),\n\t\t\texerciseIndex,\n\t\t\tallApps,\n\t\t\tprevStepLink: isFirstStep\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/exercise/${exerciseStepApp.exerciseNumber\n\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t.padStart(2, '0')}`,\n\t\t\t\t\t}\n\t\t\t\t: prevApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tto: getAppPageRoute(prevApp, {\n\t\t\t\t\t\t\t\tsubroute,\n\t\t\t\t\t\t\t\tsearchParams: url.searchParams,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t}\n\t\t\t\t\t: null,\n\t\t\tnextStepLink: isLastStep\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/exercise/${exerciseStepApp.exerciseNumber\n\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t.padStart(2, '0')}/finished`,\n\t\t\t\t\t}\n\t\t\t\t: nextApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tto: getAppPageRoute(nextApp, {\n\t\t\t\t\t\t\t\tsubroute,\n\t\t\t\t\t\t\t\tsearchParams: url.searchParams,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t}\n\t\t\t\t\t: null,\n\t\t\tplayground: playgroundApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'playground',\n\t\t\t\t\t\tappName: playgroundApp.appName,\n\t\t\t\t\t\tname: playgroundApp.name,\n\t\t\t\t\t\tfullPath: playgroundApp.fullPath,\n\t\t\t\t\t\tdev: playgroundApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tproblem: problemApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'problem',\n\t\t\t\t\t\ttitle: problemApp.title,\n\t\t\t\t\t\tname: problemApp.name,\n\t\t\t\t\t\tfullPath: problemApp.fullPath,\n\t\t\t\t\t\tdev: problemApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tsolution: solutionApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'solution',\n\t\t\t\t\t\ttitle: solutionApp.title,\n\t\t\t\t\t\tname: solutionApp.name,\n\t\t\t\t\t\tfullPath: solutionApp.fullPath,\n\t\t\t\t\t\tdev: solutionApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tdiffFiles:\n\t\t\t\tproblemApp && solutionApp\n\t\t\t\t\t? getDiffFiles(problemApp, solutionApp, {\n\t\t\t\t\t\t\t...cacheOptions,\n\t\t\t\t\t\t\tforceFresh: url.searchParams.get('forceFresh') === 'diff',\n\t\t\t\t\t\t}).catch((e) => {\n\t\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t\t\treturn 'There was a problem generating the diff (check the terminal output)'\n\t\t\t\t\t\t})\n\t\t\t\t\t: 'No diff available',\n\t\t} as const,\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nexport default function ExercisePartRoute({\n\tloaderData: data,\n}: Route.ComponentProps) {\n\tconst inBrowserBrowserRef = useRef<InBrowserBrowserRef>(null)\n\n\tconst titleBits = pageTitle(data)\n\n\tuseRevalidationWS({\n\t\twatchPaths: [`${data.exerciseStepApp.relativePath}/README.mdx`],\n\t})\n\n\treturn (\n\t\t<div className=\"flex max-w-full flex-grow flex-col\">\n\t\t\t<main className=\"flex flex-grow flex-col sm:grid sm:h-full sm:min-h-[800px] sm:grid-cols-1 sm:grid-rows-2 md:min-h-[unset] lg:grid-cols-2 lg:grid-rows-1\">\n\t\t\t\t<div className=\"relative flex flex-col sm:col-span-1 sm:row-span-1 sm:h-full lg:border-r\">\n\t\t\t\t\t<h1 className=\"h-14 border-b pl-10 pr-5 text-sm font-medium leading-tight\">\n\t\t\t\t\t\t<div className=\"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-start gap-x-2 uppercase\">\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={getExercisePath(data.exerciseStepApp.exerciseNumber)}\n\t\t\t\t\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{titleBits.exerciseNumber}. {titleBits.exerciseTitle}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t{'/'}\n\t\t\t\t\t\t\t\t<Link to=\".\" className=\"hover:underline\">\n\t\t\t\t\t\t\t\t\t{titleBits.stepNumber}. {titleBits.title}\n\t\t\t\t\t\t\t\t\t{' ('}\n\t\t\t\t\t\t\t\t\t{titleBits.emoji} {titleBits.type}\n\t\t\t\t\t\t\t\t\t{')'}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{data.problem &&\n\t\t\t\t\t\t\tdata.playground?.appName !== data.problem.name ? (\n\t\t\t\t\t\t\t\t<div className=\"hidden md:block\">\n\t\t\t\t\t\t\t\t\t<SetAppToPlayground appName={data.problem.name} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<article\n\t\t\t\t\t\tid={data.articleId}\n\t\t\t\t\t\tkey={data.articleId}\n\t\t\t\t\t\tclassName=\"shadow-on-scrollbox flex h-full w-full max-w-none flex-1 scroll-pt-6 flex-col justify-between space-y-6 overflow-y-auto p-2 scrollbar-thin scrollbar-thumb-scrollbar sm:p-10 sm:pt-8\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{data.exerciseStepApp.instructionsCode ? (\n\t\t\t\t\t\t\t<StepMdx inBrowserBrowserRef={inBrowserBrowserRef} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex h-full items-center justify-center text-lg\">\n\t\t\t\t\t\t\t\t<p>No instructions yet...</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<div className=\"mt-auto flex justify-between\">\n\t\t\t\t\t\t\t{data.prevStepLink ? (\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={data.prevStepLink.to}\n\t\t\t\t\t\t\t\t\taria-label=\"Previous Step\"\n\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t← Previous\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{data.nextStepLink ? (\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={data.nextStepLink.to}\n\t\t\t\t\t\t\t\t\taria-label=\"Next Step\"\n\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tNext →\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</article>\n\t\t\t\t\t<ElementScrollRestoration\n\t\t\t\t\t\telementQuery={`#${data.articleId}`}\n\t\t\t\t\t\tkey={`scroll-${data.articleId}`}\n\t\t\t\t\t/>\n\t\t\t\t\t{data.type === 'solution' ? (\n\t\t\t\t\t\t<ProgressToggle\n\t\t\t\t\t\t\ttype=\"step\"\n\t\t\t\t\t\t\texerciseNumber={data.exerciseStepApp.exerciseNumber}\n\t\t\t\t\t\t\tstepNumber={data.exerciseStepApp.stepNumber}\n\t\t\t\t\t\t\tclassName=\"h-14 border-t px-6\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null}\n\t\t\t\t\t<div className=\"flex h-16 justify-between border-b-4 border-t lg:border-b-0\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div className=\"h-full\">\n\t\t\t\t\t\t\t\t<TouchedFiles diffFilesPromise={data.diffFiles} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\t\t\tappName={data.exerciseStepApp.name}\n\t\t\t\t\t\t\trelativePath={data.exerciseStepApp.relativePath}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<NavChevrons\n\t\t\t\t\t\t\tprev={\n\t\t\t\t\t\t\t\tdata.prevStepLink\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tto: data.prevStepLink.to,\n\t\t\t\t\t\t\t\t\t\t\t'aria-label': 'Previous Step',\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnext={\n\t\t\t\t\t\t\t\tdata.nextStepLink\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tto: data.nextStepLink.to,\n\t\t\t\t\t\t\t\t\t\t\t'aria-label': 'Next Step',\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Outlet />\n\t\t\t</main>\n\t\t</div>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn (\n\t\t<GeneralErrorBoundary\n\t\t\tstatusHandlers={{\n\t\t\t\t404: () => <p>Sorry, we couldn't find an app here.</p>,\n\t\t\t\t503: () => (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h1>Service Unavailable</h1>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\tSorry, we're having a temporary problem. Please try again later.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<button onClick={() => window.location.reload()}>Refresh</button>\n\t\t\t\t\t</div>\n\t\t\t\t),\n\t\t\t}}\n\t\t/>\n\t)\n}\n"],"names":["StepContext","React.createContext","useStepContext","context","React.useContext","StepContextProvider","children","inBrowserBrowserRef","jsx","stepMdxComponents","DiffLink","PrevDiffLink","NextDiffLink","InlineFile","LinkToApp","StepMdx","data","useLoaderData","EpicVideoInfoProvider","Mdx","withParam","searchParams","key","value","newSearchParams","app","fullPage","app1","app2","to","getAppName","input","stepIndex","name","stepName","params","app1Name","app2Name","jsxs","pathToDiff","Link","file","type","props","info","iconsSvg","LaunchEditor","SimpleTooltip","getPreviewType","preview","appTo","useSearchParams","requestInfo","useRequestInfo","previewAppUrl","getBaseUrl","href","cn","event","Icon","POPOVER_NAME","createPopoverContext","createPopoverScope","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","__scopePopover","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","React.useRef","hasCustomAnchor","setHasCustomAnchor","React.useState","open","setOpen","useControllableState","PopperPrimitive.Root","useId","React.useCallback","prevOpen","ANCHOR_NAME","PopoverAnchor","React.forwardRef","forwardedRef","anchorProps","onCustomAnchorAdd","onCustomAnchorRemove","React.useEffect","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","createSlot","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","PopoverContentImpl","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Trigger","Portal","Content2","TouchedFiles","diffFilesPromise","handleLaunchUpdate","appName","Popover.Root","Popover.Trigger","Popover.Portal","Popover.Content","SetAppToPlayground","React.Suspense","Await","diffFiles","pageTitle","workshopTitle","exerciseNumber","exerciseStepApp","toString","padStart","stepNumber","emoji","problem","solution","title","exerciseTitle","meta","matches","rootData","find","m","id","getSeoMetaTags","description","ogTitle","ogDescription","Number","instructor","_layout","_UNSAFE_withComponentProps","loaderData","useRef","titleBits","useRevalidationWS","watchPaths","relativePath","className","getExercisePath","playground","articleId","instructionsCode","prevStepLink","prefetch","nextStepLink","ElementScrollRestoration","elementQuery","ProgressToggle","EditFileOnGitHub","NavChevrons","prev","next","Outlet","ErrorBoundary","_UNSAFE_withErrorBoundaryProps","GeneralErrorBoundary","statusHandlers","onClick","window","location","reload"],"mappings":"ssCAsBA,MAAMA,EAAcC,EAAAA,cAA4C,IAAI,EAEpE,SAASC,IAAiB,CACzB,MAAMC,EAAUC,EAAAA,WAAiBJ,CAAW,EAC5C,GAAI,CAACG,EACJ,MAAM,IAAI,MAAM,2DAA2D,EAE5E,OAAOA,CACR,CAEA,SAASE,GAAoB,CAC5B,SAAAC,EACA,oBAAAC,CACD,EAGG,CACF,OACCC,EAAAA,IAACR,EAAY,SAAZ,CAAqB,MAAO,CAAE,oBAAAO,CAAA,EAC7B,SAAAD,EACF,CAEF,CAEA,MAAMG,GAAoB,CACzB,SAAAC,EACA,aAAAC,GACA,aAAAC,GACA,WAAAC,GACA,UAAAC,EACD,EAEO,SAASC,GAAQ,CACvB,oBAAAR,CACD,EAEG,CACF,MAAMS,EAAOC,EAAA,EACb,OAAKD,EAAK,gBAAgB,iBAEzBR,EAAAA,IAACH,GAAA,CAA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IAACmN,GAAA,CACAC,eAAgB,CACf,IAAK,IAAMpN,EAAAA,IAAC,IAAA,CAAEF,SAAA,sCAAA,CAAoC,EAClD,IAAK,IACJgC,EAAAA,KAAC,MAAA,CACAhC,SAAA,CAAAE,EAAAA,IAAC,MAAGF,SAAA,qBAAA,CAAmB,EACvBE,EAAAA,IAAC,KAAEF,SAAA,kEAAA,CAEH,EACAE,EAAAA,IAAC,UAAOqN,QAASA,IAAMC,OAAOC,SAASC,OAAA,EAAU1N,SAAA,SAAA,CAAO,CAAA,EACzD,CAEF,CAAA,CACD,CAEF,CAAA","x_google_ignoreList":[1]}
@@ -1,2 +1,2 @@
1
- import{j as t}from"./jsx-runtime-DopJAmxb.js";import{r as f,R as u}from"./chunk-QMGIS6GS-BqoFcGjf.js";import{d as F,u as M,e as z,P as j,f as B,g as de,h as U,i as pe}from"./tooltip-qn6hWSiF.js";import{f as ue,u as fe}from"./index-D7ZeZY2i.js";import{c as k}from"./clsx-B-dksMZM.js";import{I as R}from"./misc-CsXWl7t3.js";import"./_-G-R-Viwe.js";var _="Collapsible",[me,q]=F(_),[xe,V]=me(_),Y=f.forwardRef((e,s)=>{const{__scopeCollapsible:o,open:n,defaultOpen:r,disabled:a,onOpenChange:c,...i}=e,[d,p]=M({prop:n,defaultProp:r??!1,onChange:c,caller:_});return t.jsx(xe,{scope:o,disabled:a,contentId:z(),open:d,onOpenToggle:f.useCallback(()=>p(m=>!m),[p]),children:t.jsx(j.div,{"data-state":H(d),"data-disabled":a?"":void 0,...i,ref:s})})});Y.displayName=_;var J="CollapsibleTrigger",Q=f.forwardRef((e,s)=>{const{__scopeCollapsible:o,...n}=e,r=V(J,o);return t.jsx(j.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":H(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...n,ref:s,onClick:B(e.onClick,r.onOpenToggle)})});Q.displayName=J;var L="CollapsibleContent",W=f.forwardRef((e,s)=>{const{forceMount:o,...n}=e,r=V(L,e.__scopeCollapsible);return t.jsx(de,{present:o||r.open,children:({present:a})=>t.jsx(ve,{...n,ref:s,present:a})})});W.displayName=L;var ve=f.forwardRef((e,s)=>{const{__scopeCollapsible:o,present:n,children:r,...a}=e,c=V(L,o),[i,d]=f.useState(n),p=f.useRef(null),m=U(s,p),x=f.useRef(0),A=x.current,C=f.useRef(0),N=C.current,b=c.open||i,g=f.useRef(b),h=f.useRef(void 0);return f.useEffect(()=>{const l=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(l)},[]),pe(()=>{const l=p.current;if(l){h.current=h.current||{transitionDuration:l.style.transitionDuration,animationName:l.style.animationName},l.style.transitionDuration="0s",l.style.animationName="none";const I=l.getBoundingClientRect();x.current=I.height,C.current=I.width,g.current||(l.style.transitionDuration=h.current.transitionDuration,l.style.animationName=h.current.animationName),d(n)}},[c.open,n]),t.jsx(j.div,{"data-state":H(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!b,...a,ref:m,style:{"--radix-collapsible-content-height":A?`${A}px`:void 0,"--radix-collapsible-content-width":N?`${N}px`:void 0,...e.style},children:b&&r})});function H(e){return e?"open":"closed"}var Ce=Y,be=Q,ge=W,v="Accordion",he=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[$,Ae,Ie]=ue(v),[P,Ke]=F(v,[Ie,q]),G=q(),X=u.forwardRef((e,s)=>{const{type:o,...n}=e,r=n,a=n;return t.jsx($.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?t.jsx(we,{...a,ref:s}):t.jsx(Ne,{...r,ref:s})})});X.displayName=v;var[Z,Re]=P(v),[ee,je]=P(v,{collapsible:!1}),Ne=u.forwardRef((e,s)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},collapsible:a=!1,...c}=e,[i,d]=M({prop:o,defaultProp:n??"",onChange:r,caller:v});return t.jsx(Z,{scope:e.__scopeAccordion,value:u.useMemo(()=>i?[i]:[],[i]),onItemOpen:d,onItemClose:u.useCallback(()=>a&&d(""),[a,d]),children:t.jsx(ee,{scope:e.__scopeAccordion,collapsible:a,children:t.jsx(oe,{...c,ref:s})})})}),we=u.forwardRef((e,s)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},...a}=e,[c,i]=M({prop:o,defaultProp:n??[],onChange:r,caller:v}),d=u.useCallback(m=>i((x=[])=>[...x,m]),[i]),p=u.useCallback(m=>i((x=[])=>x.filter(A=>A!==m)),[i]);return t.jsx(Z,{scope:e.__scopeAccordion,value:c,onItemOpen:d,onItemClose:p,children:t.jsx(ee,{scope:e.__scopeAccordion,collapsible:!0,children:t.jsx(oe,{...a,ref:s})})})}),[_e,y]=P(v),oe=u.forwardRef((e,s)=>{const{__scopeAccordion:o,disabled:n,dir:r,orientation:a="vertical",...c}=e,i=u.useRef(null),d=U(i,s),p=Ae(o),x=fe(r)==="ltr",A=B(e.onKeyDown,C=>{if(!he.includes(C.key))return;const N=C.target,b=p().filter(T=>!T.ref.current?.disabled),g=b.findIndex(T=>T.ref.current===N),h=b.length;if(g===-1)return;C.preventDefault();let l=g;const I=0,E=h-1,S=()=>{l=g+1,l>E&&(l=I)},D=()=>{l=g-1,l<I&&(l=E)};switch(C.key){case"Home":l=I;break;case"End":l=E;break;case"ArrowRight":a==="horizontal"&&(x?S():D());break;case"ArrowDown":a==="vertical"&&S();break;case"ArrowLeft":a==="horizontal"&&(x?D():S());break;case"ArrowUp":a==="vertical"&&D();break}const le=l%h;b[le].ref.current?.focus()});return t.jsx(_e,{scope:o,disabled:n,direction:r,orientation:a,children:t.jsx($.Slot,{scope:o,children:t.jsx(j.div,{...c,"data-orientation":a,ref:d,onKeyDown:n?void 0:A})})})}),w="AccordionItem",[Pe,K]=P(w),te=u.forwardRef((e,s)=>{const{__scopeAccordion:o,value:n,...r}=e,a=y(w,o),c=Re(w,o),i=G(o),d=z(),p=n&&c.value.includes(n)||!1,m=a.disabled||e.disabled;return t.jsx(Pe,{scope:o,open:p,disabled:m,triggerId:d,children:t.jsx(Ce,{"data-orientation":a.orientation,"data-state":ie(p),...i,...r,ref:s,disabled:m,open:p,onOpenChange:x=>{x?c.onItemOpen(n):c.onItemClose(n)}})})});te.displayName=w;var ne="AccordionHeader",re=u.forwardRef((e,s)=>{const{__scopeAccordion:o,...n}=e,r=y(v,o),a=K(ne,o);return t.jsx(j.h3,{"data-orientation":r.orientation,"data-state":ie(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:s})});re.displayName=ne;var O="AccordionTrigger",ae=u.forwardRef((e,s)=>{const{__scopeAccordion:o,...n}=e,r=y(v,o),a=K(O,o),c=je(O,o),i=G(o);return t.jsx($.ItemSlot,{scope:o,children:t.jsx(be,{"aria-disabled":a.open&&!c.collapsible||void 0,"data-orientation":r.orientation,id:a.triggerId,...i,...n,ref:s})})});ae.displayName=O;var se="AccordionContent",ce=u.forwardRef((e,s)=>{const{__scopeAccordion:o,...n}=e,r=y(v,o),a=K(se,o),c=G(o);return t.jsx(ge,{role:"region","aria-labelledby":a.triggerId,"data-orientation":r.orientation,...c,...n,ref:s,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ce.displayName=se;function ie(e){return e?"open":"closed"}var Fe=X,ye=te,Ee=re,Se=ae,De=ce;const ze=({title:e,children:s,variant:o,icon:n,forceMount:r=!1})=>{const a=()=>{switch(o){case"changed":return t.jsx(R,{name:"Modified","aria-label":"Modified",className:"text-[#fb923c]"});case"renamed":return t.jsx(R,{name:"Renamed","aria-label":"Renamed",className:"text-[#fb923c]"});case"added":return t.jsx(R,{name:"Added","aria-label":"Added",className:"text-[#10b981]"});case"deleted":return t.jsx(R,{name:"Deleted","aria-label":"Deleted",className:"text-[#ef4444]"});default:return t.jsx(R,{name:"Modified","aria-label":"Modified",className:"text-[#fb923c]"})}},c=()=>{switch(o){case"changed":return"modified";default:return o}},i=e.replace(/\\\\/g,"\\");return t.jsxs(ye,{value:e,children:[t.jsxs(Te,{variant:c(),children:[n||a()," ",i]}),t.jsx(Oe,{forceMount:r,className:k("prose max-w-none whitespace-pre-wrap dark:prose-invert prose-pre:m-0 prose-pre:mb-1 prose-pre:rounded-none",{"radix-state-closed:hidden":r}),children:s})]})},Te=({ref:e,children:s,className:o,variant:n,...r})=>t.jsx(Ee,{className:"flex",asChild:!0,children:t.jsxs(Se,{className:k("group flex w-full items-center justify-between border-b p-4 pr-3 font-mono text-sm font-medium leading-none hover:bg-foreground/20",o),...r,ref:e,children:[t.jsx("div",{className:"flex items-center gap-1.5",children:s}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"font-mono text-xs font-normal uppercase text-muted-foreground",children:n}),t.jsx(R,{name:"TriangleDownSmall",className:"transition group-radix-state-open:rotate-180","aria-hidden":!0})]})]})}),Oe=({ref:e,children:s,className:o,...n})=>t.jsx(De,{className:k("",o),...n,ref:e,children:t.jsx("div",{children:s})});export{ze as A,Fe as R};
2
- //# sourceMappingURL=accordion-BH7gGkbR.js.map
1
+ import{j as t}from"./jsx-runtime-DwNMUGRi.js";import{r as f,R as u}from"./chunk-QMGIS6GS-BuHkd1At.js";import{d as F,u as M,e as z,P as j,f as B,g as de,h as U,i as pe}from"./tooltip-Czb6Ovbu.js";import{f as ue,u as fe}from"./index-C2HHQicP.js";import{c as k}from"./clsx-B-dksMZM.js";import{I as R}from"./misc-BSfaml-C.js";import"./_-xwArvaaj.js";var _="Collapsible",[me,q]=F(_),[xe,V]=me(_),Y=f.forwardRef((e,s)=>{const{__scopeCollapsible:o,open:n,defaultOpen:r,disabled:a,onOpenChange:c,...i}=e,[d,p]=M({prop:n,defaultProp:r??!1,onChange:c,caller:_});return t.jsx(xe,{scope:o,disabled:a,contentId:z(),open:d,onOpenToggle:f.useCallback(()=>p(m=>!m),[p]),children:t.jsx(j.div,{"data-state":H(d),"data-disabled":a?"":void 0,...i,ref:s})})});Y.displayName=_;var J="CollapsibleTrigger",Q=f.forwardRef((e,s)=>{const{__scopeCollapsible:o,...n}=e,r=V(J,o);return t.jsx(j.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":H(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...n,ref:s,onClick:B(e.onClick,r.onOpenToggle)})});Q.displayName=J;var L="CollapsibleContent",W=f.forwardRef((e,s)=>{const{forceMount:o,...n}=e,r=V(L,e.__scopeCollapsible);return t.jsx(de,{present:o||r.open,children:({present:a})=>t.jsx(ve,{...n,ref:s,present:a})})});W.displayName=L;var ve=f.forwardRef((e,s)=>{const{__scopeCollapsible:o,present:n,children:r,...a}=e,c=V(L,o),[i,d]=f.useState(n),p=f.useRef(null),m=U(s,p),x=f.useRef(0),A=x.current,C=f.useRef(0),N=C.current,b=c.open||i,g=f.useRef(b),h=f.useRef(void 0);return f.useEffect(()=>{const l=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(l)},[]),pe(()=>{const l=p.current;if(l){h.current=h.current||{transitionDuration:l.style.transitionDuration,animationName:l.style.animationName},l.style.transitionDuration="0s",l.style.animationName="none";const I=l.getBoundingClientRect();x.current=I.height,C.current=I.width,g.current||(l.style.transitionDuration=h.current.transitionDuration,l.style.animationName=h.current.animationName),d(n)}},[c.open,n]),t.jsx(j.div,{"data-state":H(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!b,...a,ref:m,style:{"--radix-collapsible-content-height":A?`${A}px`:void 0,"--radix-collapsible-content-width":N?`${N}px`:void 0,...e.style},children:b&&r})});function H(e){return e?"open":"closed"}var Ce=Y,be=Q,ge=W,v="Accordion",he=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[$,Ae,Ie]=ue(v),[P,Ke]=F(v,[Ie,q]),G=q(),X=u.forwardRef((e,s)=>{const{type:o,...n}=e,r=n,a=n;return t.jsx($.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?t.jsx(we,{...a,ref:s}):t.jsx(Ne,{...r,ref:s})})});X.displayName=v;var[Z,Re]=P(v),[ee,je]=P(v,{collapsible:!1}),Ne=u.forwardRef((e,s)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},collapsible:a=!1,...c}=e,[i,d]=M({prop:o,defaultProp:n??"",onChange:r,caller:v});return t.jsx(Z,{scope:e.__scopeAccordion,value:u.useMemo(()=>i?[i]:[],[i]),onItemOpen:d,onItemClose:u.useCallback(()=>a&&d(""),[a,d]),children:t.jsx(ee,{scope:e.__scopeAccordion,collapsible:a,children:t.jsx(oe,{...c,ref:s})})})}),we=u.forwardRef((e,s)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},...a}=e,[c,i]=M({prop:o,defaultProp:n??[],onChange:r,caller:v}),d=u.useCallback(m=>i((x=[])=>[...x,m]),[i]),p=u.useCallback(m=>i((x=[])=>x.filter(A=>A!==m)),[i]);return t.jsx(Z,{scope:e.__scopeAccordion,value:c,onItemOpen:d,onItemClose:p,children:t.jsx(ee,{scope:e.__scopeAccordion,collapsible:!0,children:t.jsx(oe,{...a,ref:s})})})}),[_e,y]=P(v),oe=u.forwardRef((e,s)=>{const{__scopeAccordion:o,disabled:n,dir:r,orientation:a="vertical",...c}=e,i=u.useRef(null),d=U(i,s),p=Ae(o),x=fe(r)==="ltr",A=B(e.onKeyDown,C=>{if(!he.includes(C.key))return;const N=C.target,b=p().filter(T=>!T.ref.current?.disabled),g=b.findIndex(T=>T.ref.current===N),h=b.length;if(g===-1)return;C.preventDefault();let l=g;const I=0,E=h-1,S=()=>{l=g+1,l>E&&(l=I)},D=()=>{l=g-1,l<I&&(l=E)};switch(C.key){case"Home":l=I;break;case"End":l=E;break;case"ArrowRight":a==="horizontal"&&(x?S():D());break;case"ArrowDown":a==="vertical"&&S();break;case"ArrowLeft":a==="horizontal"&&(x?D():S());break;case"ArrowUp":a==="vertical"&&D();break}const le=l%h;b[le].ref.current?.focus()});return t.jsx(_e,{scope:o,disabled:n,direction:r,orientation:a,children:t.jsx($.Slot,{scope:o,children:t.jsx(j.div,{...c,"data-orientation":a,ref:d,onKeyDown:n?void 0:A})})})}),w="AccordionItem",[Pe,K]=P(w),te=u.forwardRef((e,s)=>{const{__scopeAccordion:o,value:n,...r}=e,a=y(w,o),c=Re(w,o),i=G(o),d=z(),p=n&&c.value.includes(n)||!1,m=a.disabled||e.disabled;return t.jsx(Pe,{scope:o,open:p,disabled:m,triggerId:d,children:t.jsx(Ce,{"data-orientation":a.orientation,"data-state":ie(p),...i,...r,ref:s,disabled:m,open:p,onOpenChange:x=>{x?c.onItemOpen(n):c.onItemClose(n)}})})});te.displayName=w;var ne="AccordionHeader",re=u.forwardRef((e,s)=>{const{__scopeAccordion:o,...n}=e,r=y(v,o),a=K(ne,o);return t.jsx(j.h3,{"data-orientation":r.orientation,"data-state":ie(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:s})});re.displayName=ne;var O="AccordionTrigger",ae=u.forwardRef((e,s)=>{const{__scopeAccordion:o,...n}=e,r=y(v,o),a=K(O,o),c=je(O,o),i=G(o);return t.jsx($.ItemSlot,{scope:o,children:t.jsx(be,{"aria-disabled":a.open&&!c.collapsible||void 0,"data-orientation":r.orientation,id:a.triggerId,...i,...n,ref:s})})});ae.displayName=O;var se="AccordionContent",ce=u.forwardRef((e,s)=>{const{__scopeAccordion:o,...n}=e,r=y(v,o),a=K(se,o),c=G(o);return t.jsx(ge,{role:"region","aria-labelledby":a.triggerId,"data-orientation":r.orientation,...c,...n,ref:s,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ce.displayName=se;function ie(e){return e?"open":"closed"}var Fe=X,ye=te,Ee=re,Se=ae,De=ce;const ze=({title:e,children:s,variant:o,icon:n,forceMount:r=!1})=>{const a=()=>{switch(o){case"changed":return t.jsx(R,{name:"Modified","aria-label":"Modified",className:"text-[#fb923c]"});case"renamed":return t.jsx(R,{name:"Renamed","aria-label":"Renamed",className:"text-[#fb923c]"});case"added":return t.jsx(R,{name:"Added","aria-label":"Added",className:"text-[#10b981]"});case"deleted":return t.jsx(R,{name:"Deleted","aria-label":"Deleted",className:"text-[#ef4444]"});default:return t.jsx(R,{name:"Modified","aria-label":"Modified",className:"text-[#fb923c]"})}},c=()=>{switch(o){case"changed":return"modified";default:return o}},i=e.replace(/\\\\/g,"\\");return t.jsxs(ye,{value:e,children:[t.jsxs(Te,{variant:c(),children:[n||a()," ",i]}),t.jsx(Oe,{forceMount:r,className:k("prose max-w-none whitespace-pre-wrap dark:prose-invert prose-pre:m-0 prose-pre:mb-1 prose-pre:rounded-none",{"radix-state-closed:hidden":r}),children:s})]})},Te=({ref:e,children:s,className:o,variant:n,...r})=>t.jsx(Ee,{className:"flex",asChild:!0,children:t.jsxs(Se,{className:k("group flex w-full items-center justify-between border-b p-4 pr-3 font-mono text-sm font-medium leading-none hover:bg-foreground/20",o),...r,ref:e,children:[t.jsx("div",{className:"flex items-center gap-1.5",children:s}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"font-mono text-xs font-normal uppercase text-muted-foreground",children:n}),t.jsx(R,{name:"TriangleDownSmall",className:"transition group-radix-state-open:rotate-180","aria-hidden":!0})]})]})}),Oe=({ref:e,children:s,className:o,...n})=>t.jsx(De,{className:k("",o),...n,ref:e,children:t.jsx("div",{children:s})});export{ze as A,Fe as R};
2
+ //# sourceMappingURL=accordion-p0CQ5vm6.js.map