agent-relay-server 0.123.0 → 0.123.2

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 (152) hide show
  1. package/README.md +3 -1
  2. package/docs/openapi.json +1 -1
  3. package/package.json +3 -2
  4. package/public/assets/MessageBubble-NCggGKTA.js +2 -0
  5. package/public/assets/{MessageBubble-BTeFExjj.js.map → MessageBubble-NCggGKTA.js.map} +1 -1
  6. package/public/assets/{PlanGraphPanel-jU1DXg7w.js → PlanGraphPanel-CSdszmGk.js} +2 -2
  7. package/public/assets/{PlanGraphPanel-jU1DXg7w.js.map → PlanGraphPanel-CSdszmGk.js.map} +1 -1
  8. package/public/assets/{activity-DUig2iYW.js → activity-Cyp2nolX.js} +2 -2
  9. package/public/assets/{activity-DUig2iYW.js.map → activity-Cyp2nolX.js.map} +1 -1
  10. package/public/assets/{agent-profiles-D-oFmb6S.js → agent-profiles-D5Izg0Vn.js} +2 -2
  11. package/public/assets/{agent-profiles-D-oFmb6S.js.map → agent-profiles-D5Izg0Vn.js.map} +1 -1
  12. package/public/assets/{agent-type-icon-Dan2l3Tm.js → agent-type-icon-BxUopALO.js} +2 -2
  13. package/public/assets/{agent-type-icon-Dan2l3Tm.js.map → agent-type-icon-BxUopALO.js.map} +1 -1
  14. package/public/assets/agents-DIOxuJ6M.js +2 -0
  15. package/public/assets/{agents-BkC6mcTh.js.map → agents-DIOxuJ6M.js.map} +1 -1
  16. package/public/assets/{analytics-C3Dlmqe9.js → analytics-DqAuUAwX.js} +3 -3
  17. package/public/assets/{analytics-C3Dlmqe9.js.map → analytics-DqAuUAwX.js.map} +1 -1
  18. package/public/assets/{automation-AeMZ70WQ.js → automation-Bn6mOLAR.js} +2 -2
  19. package/public/assets/{automation-AeMZ70WQ.js.map → automation-Bn6mOLAR.js.map} +1 -1
  20. package/public/assets/{badge-DCIT3Irj.js → badge-XEru6wto.js} +2 -2
  21. package/public/assets/{badge-DCIT3Irj.js.map → badge-XEru6wto.js.map} +1 -1
  22. package/public/assets/branch-state-badge-Mf0Ow77K.js +2 -0
  23. package/public/assets/{branch-state-badge-CNW10MTC.js.map → branch-state-badge-Mf0Ow77K.js.map} +1 -1
  24. package/public/assets/{button-CzdTkRIf.js → button-C3CQSr4p.js} +2 -2
  25. package/public/assets/{button-CzdTkRIf.js.map → button-C3CQSr4p.js.map} +1 -1
  26. package/public/assets/card-C5XTIPvq.js +2 -0
  27. package/public/assets/{card-C3BGuVC6.js.map → card-C5XTIPvq.js.map} +1 -1
  28. package/public/assets/{channels-Bc_mEd56.js → channels-DVRkVeky.js} +2 -2
  29. package/public/assets/{channels-Bc_mEd56.js.map → channels-DVRkVeky.js.map} +1 -1
  30. package/public/assets/chat-eUaPz399.js +2 -0
  31. package/public/assets/{chat-BCNCuTgw.js.map → chat-eUaPz399.js.map} +1 -1
  32. package/public/assets/{connectors-h0d5Mc6e.js → connectors-Cqubkw9C.js} +2 -2
  33. package/public/assets/{connectors-h0d5Mc6e.js.map → connectors-Cqubkw9C.js.map} +1 -1
  34. package/public/assets/copy-button-Bil2CjzT.js +2 -0
  35. package/public/assets/{copy-button-B3o1jpLu.js.map → copy-button-Bil2CjzT.js.map} +1 -1
  36. package/public/assets/{dist-OUPTEP6q.js → dist-4VwhnLtj.js} +2 -2
  37. package/public/assets/{dist-OUPTEP6q.js.map → dist-4VwhnLtj.js.map} +1 -1
  38. package/public/assets/{dist-BIjlN-xB.js → dist-B8tD9ZcR.js} +2 -2
  39. package/public/assets/{dist-BIjlN-xB.js.map → dist-B8tD9ZcR.js.map} +1 -1
  40. package/public/assets/{dist-BInckSJC.js → dist-BJaV2BD4.js} +2 -2
  41. package/public/assets/{dist-BInckSJC.js.map → dist-BJaV2BD4.js.map} +1 -1
  42. package/public/assets/{dist-B-T7lg0a.js → dist-C5z05Vkz.js} +2 -2
  43. package/public/assets/{dist-B-T7lg0a.js.map → dist-C5z05Vkz.js.map} +1 -1
  44. package/public/assets/dist-CFtFIhu3.js +2 -0
  45. package/public/assets/{dist-DT-OV6sQ.js.map → dist-CFtFIhu3.js.map} +1 -1
  46. package/public/assets/{dist-C7aTlosb.js → dist-CGaHpxnN.js} +2 -2
  47. package/public/assets/{dist-C7aTlosb.js.map → dist-CGaHpxnN.js.map} +1 -1
  48. package/public/assets/dist-CjyfQThq.js +2 -0
  49. package/public/assets/{dist-DGfp5dLz.js.map → dist-CjyfQThq.js.map} +1 -1
  50. package/public/assets/dist-CrUl2aQp.js +2 -0
  51. package/public/assets/{dist-B6woQ9Tb.js.map → dist-CrUl2aQp.js.map} +1 -1
  52. package/public/assets/{dist-B3e4B9pg.js → dist-DKmTXfpP.js} +2 -2
  53. package/public/assets/{dist-B3e4B9pg.js.map → dist-DKmTXfpP.js.map} +1 -1
  54. package/public/assets/{dist-B9G83DXv.js → dist-V3wu3BHw.js} +2 -2
  55. package/public/assets/{dist-B9G83DXv.js.map → dist-V3wu3BHw.js.map} +1 -1
  56. package/public/assets/{dist-BlzVGRhh.js → dist-r8wyUTkK.js} +2 -2
  57. package/public/assets/{dist-BlzVGRhh.js.map → dist-r8wyUTkK.js.map} +1 -1
  58. package/public/assets/{es2015-CnKXYKpf.js → es2015-5DTJe35n.js} +2 -2
  59. package/public/assets/{es2015-CnKXYKpf.js.map → es2015-5DTJe35n.js.map} +1 -1
  60. package/public/assets/formatted-body-CvrQ2D1J.js +3 -0
  61. package/public/assets/{formatted-body-CVr3Iev9.js.map → formatted-body-CvrQ2D1J.js.map} +1 -1
  62. package/public/assets/{formatted-body-impl-Cq5SRGpm.js → formatted-body-impl-BJ7jdbpR.js} +2 -2
  63. package/public/assets/{formatted-body-impl-Cq5SRGpm.js.map → formatted-body-impl-BJ7jdbpR.js.map} +1 -1
  64. package/public/assets/index-DnUo0Zqg.js +25 -0
  65. package/public/assets/index-DnUo0Zqg.js.map +1 -0
  66. package/public/assets/{input-B6Q0NWCS.js → input-CXMbJ848.js} +2 -2
  67. package/public/assets/{input-B6Q0NWCS.js.map → input-CXMbJ848.js.map} +1 -1
  68. package/public/assets/{insights-C8lIBXg3.js → insights-CQGH5LhD.js} +2 -2
  69. package/public/assets/{insights-C8lIBXg3.js.map → insights-CQGH5LhD.js.map} +1 -1
  70. package/public/assets/{integrations-7OFsJtY7.js → integrations-9G5TJnnU.js} +2 -2
  71. package/public/assets/{integrations-7OFsJtY7.js.map → integrations-9G5TJnnU.js.map} +1 -1
  72. package/public/assets/{lib-BHsWPMKB.js → lib-BcUW1l-W.js} +2 -2
  73. package/public/assets/{lib-BHsWPMKB.js.map → lib-BcUW1l-W.js.map} +1 -1
  74. package/public/assets/lucide-react-CoU_Xts2.js +10 -0
  75. package/public/assets/{lucide-react-DuhlF2Sj.js.map → lucide-react-CoU_Xts2.js.map} +1 -1
  76. package/public/assets/maintenance-7c7UvpAt.js +2 -0
  77. package/public/assets/{maintenance-HDpg20OY.js.map → maintenance-7c7UvpAt.js.map} +1 -1
  78. package/public/assets/{managed-agents-muCIMxng.js → managed-agents-yh4HPO5a.js} +4 -4
  79. package/public/assets/{managed-agents-muCIMxng.js.map → managed-agents-yh4HPO5a.js.map} +1 -1
  80. package/public/assets/{markdown-preview-impl-Cx7pCfA6.js → markdown-preview-impl-BuOn5-Uc.js} +2 -2
  81. package/public/assets/{markdown-preview-impl-Cx7pCfA6.js.map → markdown-preview-impl-BuOn5-Uc.js.map} +1 -1
  82. package/public/assets/memory-Qv0JN8CE.js +2 -0
  83. package/public/assets/{memory-CTO1FfJ-.js.map → memory-Qv0JN8CE.js.map} +1 -1
  84. package/public/assets/messages-CgjHJmc2.js +2 -0
  85. package/public/assets/{messages-RWSXG2UM.js.map → messages-CgjHJmc2.js.map} +1 -1
  86. package/public/assets/{orchestrators-5aiYw3yx.js → orchestrators-CgL4CFzb.js} +2 -2
  87. package/public/assets/{orchestrators-5aiYw3yx.js.map → orchestrators-CgL4CFzb.js.map} +1 -1
  88. package/public/assets/{overview-Du6XLt5l.js → overview-Bri04eYE.js} +2 -2
  89. package/public/assets/{overview-Du6XLt5l.js.map → overview-Bri04eYE.js.map} +1 -1
  90. package/public/assets/{pairs-BDRnlEta.js → pairs-C78LwUH2.js} +2 -2
  91. package/public/assets/{pairs-BDRnlEta.js.map → pairs-C78LwUH2.js.map} +1 -1
  92. package/public/assets/{projects-DwsWE9es.js → projects-CquHTMo1.js} +2 -2
  93. package/public/assets/{projects-DwsWE9es.js.map → projects-CquHTMo1.js.map} +1 -1
  94. package/public/assets/prompt-settings-DDEkMqPZ.js +2 -0
  95. package/public/assets/{prompt-settings-CaJX_LbA.js.map → prompt-settings-DDEkMqPZ.js.map} +1 -1
  96. package/public/assets/{react-dom-DWBmcawP.js → react-dom-BQICbUuF.js} +2 -2
  97. package/public/assets/{react-dom-DWBmcawP.js.map → react-dom-BQICbUuF.js.map} +1 -1
  98. package/public/assets/registry-5KhP5FE5.js +2 -0
  99. package/public/assets/registry-5KhP5FE5.js.map +1 -0
  100. package/public/assets/{security-BpVrdYhJ.js → security-wvnRKFvm.js} +2 -2
  101. package/public/assets/{security-BpVrdYhJ.js.map → security-wvnRKFvm.js.map} +1 -1
  102. package/public/assets/{select-DallbU93.js → select-BIfbVmLf.js} +2 -2
  103. package/public/assets/{select-DallbU93.js.map → select-BIfbVmLf.js.map} +1 -1
  104. package/public/assets/settings-B6Ntahx7.js +6 -0
  105. package/public/assets/{settings-BUQirdyI.js.map → settings-B6Ntahx7.js.map} +1 -1
  106. package/public/assets/{store-DMZSTozC.js → store-zFLzd0Jd.js} +5 -5
  107. package/public/assets/{store-DMZSTozC.js.map → store-zFLzd0Jd.js.map} +1 -1
  108. package/public/assets/{task-chip-DXfvXBDx.js → task-chip-BHM-e3I8.js} +2 -2
  109. package/public/assets/{task-chip-DXfvXBDx.js.map → task-chip-BHM-e3I8.js.map} +1 -1
  110. package/public/assets/{tasks-k8mQDfKy.js → tasks-CUglafo5.js} +2 -2
  111. package/public/assets/{tasks-k8mQDfKy.js.map → tasks-CUglafo5.js.map} +1 -1
  112. package/public/assets/{teams-DI-Lhhbl.js → teams-EE8RHhHM.js} +2 -2
  113. package/public/assets/{teams-DI-Lhhbl.js.map → teams-EE8RHhHM.js.map} +1 -1
  114. package/public/assets/{terminal-viewer-impl-BL853Fpi.js → terminal-viewer-impl-DBRkdyag.js} +3 -3
  115. package/public/assets/{terminal-viewer-impl-BL853Fpi.js.map → terminal-viewer-impl-DBRkdyag.js.map} +1 -1
  116. package/public/assets/{use-keyboard-viewport-CP109w9y.js → use-keyboard-viewport-CAa7IQTm.js} +2 -2
  117. package/public/assets/{use-keyboard-viewport-CP109w9y.js.map → use-keyboard-viewport-CAa7IQTm.js.map} +1 -1
  118. package/public/assets/user-avatar-kYPfLgXp.js +2 -0
  119. package/public/assets/{user-avatar-D9xyGi3u.js.map → user-avatar-kYPfLgXp.js.map} +1 -1
  120. package/public/assets/{work-queue-DrLIdvxB.js → work-queue-BFQVVL4T.js} +2 -2
  121. package/public/assets/{work-queue-DrLIdvxB.js.map → work-queue-BFQVVL4T.js.map} +1 -1
  122. package/public/assets/workspaces-CR6f7G0R.js +3 -0
  123. package/public/assets/{workspaces-CnNL6T8Q.js.map → workspaces-CR6f7G0R.js.map} +1 -1
  124. package/public/index.html +23 -23
  125. package/runner/hooks/rg-r-guard/hooks.json +18 -0
  126. package/runner/hooks/rg-r-guard/rg-r-guard.cjs +144 -0
  127. package/runner/plugins/claude/.claude-plugin/plugin.json +1 -1
  128. package/runner/src/launch-assembly.ts +34 -1
  129. package/runner/src/provisioning.ts +15 -0
  130. package/src/services/spawn-chain-inspector.ts +134 -0
  131. package/public/assets/MessageBubble-BTeFExjj.js +0 -2
  132. package/public/assets/agents-BkC6mcTh.js +0 -2
  133. package/public/assets/branch-state-badge-CNW10MTC.js +0 -2
  134. package/public/assets/card-C3BGuVC6.js +0 -2
  135. package/public/assets/chat-BCNCuTgw.js +0 -2
  136. package/public/assets/copy-button-B3o1jpLu.js +0 -2
  137. package/public/assets/dist-B6woQ9Tb.js +0 -2
  138. package/public/assets/dist-DGfp5dLz.js +0 -2
  139. package/public/assets/dist-DT-OV6sQ.js +0 -2
  140. package/public/assets/formatted-body-CVr3Iev9.js +0 -3
  141. package/public/assets/index--9UMzCFf.js +0 -25
  142. package/public/assets/index--9UMzCFf.js.map +0 -1
  143. package/public/assets/lucide-react-DuhlF2Sj.js +0 -10
  144. package/public/assets/maintenance-HDpg20OY.js +0 -2
  145. package/public/assets/memory-CTO1FfJ-.js +0 -2
  146. package/public/assets/messages-RWSXG2UM.js +0 -2
  147. package/public/assets/prompt-settings-CaJX_LbA.js +0 -2
  148. package/public/assets/registry-C-uIL0Nl.js +0 -2
  149. package/public/assets/registry-C-uIL0Nl.js.map +0 -1
  150. package/public/assets/settings-BUQirdyI.js +0 -6
  151. package/public/assets/user-avatar-D9xyGi3u.js +0 -2
  152. package/public/assets/workspaces-CnNL6T8Q.js +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":";ozGAWA,SAAS,EAAK,EAAM,EAAM,CACxB,IAAI,EAAQ,EAAK,OACjB,EAAK,KAAK,EAAK,CACf,EAAG,KAAO,EAAI,GAAS,CACrB,IAAI,EAAe,EAAQ,IAAO,EAChC,EAAS,EAAK,GAChB,GAAI,EAAI,EAAQ,EAAQ,EAAK,CAC3B,EAAM,GAAe,EAAQ,EAAK,GAAS,EAAU,EAAQ,OAC1D,MAAM,GAGf,SAAS,EAAK,EAAM,CAClB,OAAa,EAAK,SAAX,EAAoB,KAAO,EAAK,GAEzC,SAAS,EAAI,EAAM,CACjB,GAAU,EAAK,SAAX,EAAmB,OAAO,KAC9B,IAAI,EAAQ,EAAK,GACf,EAAO,EAAK,KAAK,CACnB,GAAI,IAAS,EAAO,CAClB,EAAK,GAAK,EACV,EAAG,IACD,IAAI,EAAQ,EAAG,EAAS,EAAK,OAAQ,EAAa,IAAW,EAC7D,EAAQ,GAER,CACA,IAAI,EAAY,GAAK,EAAQ,GAAK,EAChC,EAAO,EAAK,GACZ,EAAa,EAAY,EACzB,EAAQ,EAAK,GACf,GAAI,EA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ACb,GACD,OACI,EAAO,CACd,EAAwB,EAAc,EAAa,OAAQ,EAAM,OAGnE,GACE,EACA,EACA,EACA,EACD,CACH,MACF,IAAK,IACH,GACE,EACA,EACA,EACA,EACD,CACD,MACF,IAAK,IACH,GACE,EACA,EACA,EACA,EACD,CACD,MACF,IAAK,IACH,MACF,IAAK,IACH,EAAyB,EAAa,UACtC,EAAK,EAAa,UACT,EAAa,gBAAtB,KASI,EAAuB,YAAc,EACnC,GACE,EACA,EACA,EACA,EACD,EACC,EAAuB,aAAe,EACxC,GACE,EACA,EACA,EACA,GACO,EAAa,aAAe,QAAnC,GAA6C,CAAC,EAC/C,EAtBH,EAAuB,YAAc,EACnC,GACE,EACA,EACA,EACA,EACD,CACD,GAAwC,EAAc,EAAa,CAgBzE,EAAQ,MAAQ,GAAmC,EAAI,EAAa,CACpE,MACF,IAAK,IACH,GACE,EACA,EACA,EACA,EACD,CACD,EAAQ,MACN,GAA8B,EAAa,UAAW,EAAa,CACrE,MACF,QACE,GACE,EACA,EACA,EACA,EACD,EAGP,SAAS,GACP,EACA,EACA,EACA,EACA,EACA,CAIA,IAHA,KAEU,EAAY,aAAe,QAAlC,GAA4C,CAAC,EAC3C,EAAc,EAAY,MAAgB,IAAT,MAAwB,CAC5D,IAAI,EAAe,EACjB,EAAe,EACf,EAAiB,EACjB,EAAuB,EACvB,EAAQ,EAAa,MACvB,OAAQ,EAAa,IAArB,CACE,IAAK,GACL,IAAK,IACL,IAAK,IACH,GACE,EACA,EACA,EACA,EACA,EACD,CACD,GAA0B,EAAG,EAAa,CAC1C,MACF,IAAK,IACH,MACF,IAAK,IACH,IAAI,EAAW,EAAa,UACnB,EAAa,gBAAtB,MAaM,EAAS,aAAe,EAC1B,GACE,EACA,EACA,EACA,EACA,EACD,EAnBD,EAAS,YAAc,EACrB,GACE,EACA,EACA,EACA,EACA,EACD,CACD,GACE,EACA,EACD,CASP,GACE,EAAQ,MACR,GACE,EAAa,UACb,EACD,CACH,MACF,IAAK,IACH,GACE,EACA,EACA,EACA,EACA,EACD,CACD,GACE,EAAQ,MACR,GAA8B,EAAa,UAAW,EAAa,CACrE,MACF,QACE,GACE,EACA,EACA,EACA,EACA,EACD,CAEL,EAAc,EAAY,SAG9B,SAAS,GACP,EACA,EACA,CACA,GAAI,EAAY,aAAe,MAC7B,IAAK,EAAc,EAAY,MAAgB,IAAT,MAAwB,CAC5D,IAAI,EAAe,EACjB,EAAe,EACf,EAAQ,EAAa,MACvB,OAAQ,EAAa,IAArB,CACE,IAAK,IACH,GAAwC,EAAc,EAAa,CACnE,EAAQ,MACN,GACE,EAAa,UACb,EACD,CACH,MACF,IAAK,IACH,GAAwC,EAAc,EAAa,CACnE,EAAQ,MACN,GAA8B,EAAa,UAAW,EAAa,CACrE,MACF,QACE,GAAwC,EAAc,EAAa,CAEvE,EAAc,EAAY,SAGhC,IAAI,GAAsB,KAC1B,SAAS,EACP,EACA,EACA,EACA,CACA,GAAI,EAAY,aAAe,GAC7B,IAAK,EAAc,EAAY,MAAgB,IAAT,MACpC,GACE,EACA,EACA,EACD,CACE,EAAc,EAAY,QAEnC,SAAS,GACP,EACA,EACA,EACA,CACA,OAAQ,EAAM,IAAd,CACE,IAAK,IACH,EACE,EACA,EACA,EACD,CACD,EAAM,MAAQ,IACH,EAAM,gBAAf,MACA,GACE,EACA,GACA,EAAM,cACN,EAAM,cACP,CACH,MACF,IAAK,GACH,EACE,EACA,EACA,EACD,CACD,MACF,IAAK,GACL,IAAK,GACH,IAAI,EAAwB,GAC5B,GAAuB,GAAiB,EAAM,UAAU,cAAc,CACtE,EACE,EACA,EACA,EACD,CACD,GAAuB,EACvB,MACF,IAAK,IACM,EAAM,gBAAf,OACI,EAAwB,EAAM,UACvB,IAAT,MACS,EAAsB,gBAA/B,MACM,EAAwB,GACzB,GAAsB,SACvB,EACE,EACA,EACA,EACD,CACA,GAAsB,GACvB,EACE,EACA,EACA,EACD,EACP,MACF,QACE,EACE,EACA,EACA,EACD,EAGP,SAAS,GAAwB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AC1C,IAAK,GACH,IAAK,EAAQ,WAAa,EAAO,MACnC,IAAK,GACH,GACE,EACA,EACA,GACA,CAAC,GACF,CACD,MAAM,EACR,IAAK,GACH,GAAsC,KACtC,MACF,IAAK,GACL,IAAK,GACH,MACF,QACE,MAAM,MAAM,EAAuB,IAAI,CAAC,CAE5C,IACG,EAAQ,YAAc,IACrB,EAAa,GAA+B,IAAM,IAAK,CACzD,GAAK,GACL,CAOA,GANA,GACE,EACA,EACA,GACA,CAAC,GACF,CACS,GAAa,EAAiB,EAAG,CAAC,EAAE,GAA1C,EAA4C,MAAM,EACtD,GAAsB,EACtB,EAAgB,cAAgB,GAC9B,GAAoB,KAClB,KACA,EACA,EACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,EACA,YACA,GACA,EACD,CACD,EACD,CACD,MAAM,EAER,GACE,EACA,EACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,EACA,KACA,GACA,EACD,EAGL,YACO,GACT,GAAsB,EAAc,CAEtC,SAAS,GACP,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CAGA,GAFA,EAAK,cAAgB,GACrB,EAAwB,EAAa,aAEnC,EAAwB,OACV,EAAwB,WAAtC,SACA,CACA,EAAwB,CACtB,YAAa,KACb,MAAO,EACP,SAAU,EACV,SAAU,EACV,gBAAiB,EAAE,CACnB,iBAAkB,CAAC,EACnB,yBAA0B,CAAC,EAC3B,UAAW,GACZ,CACD,GACE,EACA,EACA,EACD,CACD,IAAI,GACD,EAAQ,YAAc,EACnB,GAA+B,IAAK,EACnC,EAAQ,WAAa,EACpB,GAAiC,IAAK,CACtC,EAKR,GAJA,EAAgB,GACd,EACA,EACD,CACY,IAAT,KAAwB,CAC1B,GAAsB,EACtB,EAAK,oBAAsB,EACzB,GAAW,KACT,KACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,KACA,EACA,EACD,CACF,CACD,GAAkB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,IAAK,WACL,IAAK,UACL,IAAK,QACL,IAAK,WACL,IAAK,0BACL,IAAK,wBACL,IAAK,iBACL,IAAK,SACL,IAAK,OACL,IAAK,WACL,IAAK,aACL,IAAK,OACL,IAAK,cACL,IAAK,WACL,IAAK,WACL,IAAK,WACL,IAAK,SACL,IAAK,WACL,IAAK,YACH,GAAwB,OAAO,GAAtB,YAA4C,OAAO,GAApB,SACpC,EAAW,aAAa,EAAK,GAAG,CAChC,EAAW,gBAAgB,EAAI,CACnC,MACF,IAAK,UACL,IAAK,WACH,CAAC,IAAM,EACH,EAAW,aAAa,EAAK,GAAG,CAChC,CAAC,IAAM,GACG,GAAR,MACe,OAAO,GAAtB,YACa,OAAO,GAApB,SACA,EAAW,aAAa,EAAK,EAAM,CACnC,EAAW,gBAAgB,EAAI,CACrC,MACF,IAAK,OACL,IAAK,OACL,IAAK,OACL,IAAK,OACK,GAAR,MACe,OAAO,GAAtB,YACa,OAAO,GAApB,UACA,CAAC,MAAM,EAAM,EACb,GAAK,EACD,EAAW,aAAa,EAAK,EAAM,CACnC,EAAW,gBAAgB,EAAI,CACnC,MACF,IAAK,UACL,IAAK,QACK,GAAR,MACe,OAAO,GAAtB,YACa,OAAO,GAApB,UACA,MAAM,EAAM,CACR,EAAW,gBAAgB,EAAI,CAC/B,EAAW,aAAa,EAAK,EAAM,CACvC,MACF,IAAK,UACH,EAA0B,eAAgB,EAAW,CACrD,EAA0B,SAAU,EAAW,CAC/C,GAAqB,EAAY,UAAW,EAAM,CAClD,MACF,IAAK,eACH,GACE,EACA,+BACA,gBACA,EACD,CACD,MACF,IAAK,eACH,GACE,EACA,+BACA,gBACA,EACD,CACD,MACF,IAAK,YACH,GACE,EACA,+BACA,aACA,EACD,CACD,MACF,IAAK,YACH,GACE,EACA,+BACA,aACA,EACD,CACD,MACF,IAAK,aACH,GACE,EACA,+BACA,cACA,EACD,CACD,MACF,IAAK,YACH,GACE,EACA,+BACA,aACA,EACD,CACD,MACF,IAAK,UACH,GACE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O,SAAS,KAAK,CAC9C,EAAW,IAAI,IAAI,IAAK,EAAM,CAC9B,EAAkB,IAAI,IAAI,IAAK,OAAO,SAAS,OAAO,CACtD,EAAmB,IAAI,IAAI,QAAS,EAAgB,CAEtD,EAAS,OAAS,EAAgB,MACpC,UAAU,cAAc,gBAAgB,EAAgB,SAAS,CAC9D,KAAM,GAAiB,CAClB,GAAc,QAAU,EAAgB,MAAQ,EAAa,QAAQ,YAAc,EAAiB,MACtG,EAAkB,YAAY,EAEhC,CACD,UAAY,GAAG,CAGpB,UAAU,cAAc,SAAS,EAAM,UAAU,CAAE,CAAE,MAAO,EAAS,SAAU,CAAC,CAAC,UAAY,GAAG","names":["NAME","Root","Dialog","TRIGGER_NAME","getState","PORTAL_NAME","PortalProvider","usePortalContext","DialogPortal","PortalPrimitive","DialogOverlay","Slot","RemoveScroll","CONTENT_NAME","DialogContent","Fragment","DialogTitle","DialogDescription","createContext","Portal","Content","GROUP_NAME","Collection","useCollection","createCollectionScope","ITEM_NAME","wrapArray","focusFirst","usePopperScope","useRovingFocusGroupScope","PopperPrimitive.Root","PopperPrimitive.Anchor","RovingFocusGroup.Root","PopperPrimitive.Content","LABEL_NAME","RovingFocusGroup.Item","CHECKBOX_ITEM_NAME","RADIO_GROUP_NAME","RADIO_ITEM_NAME","SEPARATOR_NAME","ARROW_NAME","PopperPrimitive.Arrow","SUB_TRIGGER_NAME","SUB_CONTENT_NAME","isPointInPolygon","Root3","Content2","Label","Item2","Separator","Arrow2","DropdownMenu","MenuPrimitive.Root","DropdownMenuTrigger","MenuPrimitive.Anchor","MenuPrimitive.Portal","DropdownMenuContent","MenuPrimitive.Content","MenuPrimitive.Group","DropdownMenuLabel","MenuPrimitive.Label","DropdownMenuItem","MenuPrimitive.Item","MenuPrimitive.CheckboxItem","MenuPrimitive.RadioGroup","MenuPrimitive.RadioItem","MenuPrimitive.ItemIndicator","DropdownMenuSeparator","MenuPrimitive.Separator","MenuPrimitive.Arrow","MenuPrimitive.SubTrigger","MenuPrimitive.SubContent","Root2","Trigger","ScrollArea","THUMB_NAME","Switch","Tabs","TabsList","TabsTrigger","TabsContent","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","VisuallyHiddenPrimitive.Root"],"ignoreList":[0,1,2,3,5,6,7,8,9,10,11,12,13,14,15],"sources":["../../dashboard/node_modules/scheduler/cjs/scheduler.production.js","../../dashboard/node_modules/scheduler/index.js","../../dashboard/node_modules/react-dom/cjs/react-dom-client.production.js","../../dashboard/node_modules/react-dom/client.js","../../dashboard/src/lib/chunk-reload.ts","../../dashboard/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs","../../dashboard/node_modules/@radix-ui/react-dialog/dist/index.mjs","../../dashboard/node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../../dashboard/node_modules/@radix-ui/react-menu/dist/index.mjs","../../dashboard/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs","../../dashboard/node_modules/@radix-ui/react-label/dist/index.mjs","../../dashboard/node_modules/@radix-ui/react-scroll-area/dist/index.mjs","../../dashboard/node_modules/@radix-ui/react-separator/dist/index.mjs","../../dashboard/node_modules/@radix-ui/react-switch/dist/index.mjs","../../dashboard/node_modules/@radix-ui/react-tabs/dist/index.mjs","../../dashboard/node_modules/@radix-ui/react-tooltip/dist/index.mjs","../../dashboard/src/components/ui/tooltip.tsx","../../dashboard/src/hooks/use-selectors.ts","../../dashboard/src/components/ui/switch.tsx","../../dashboard/src/components/ui/separator.tsx","../../dashboard/src/components/ui/dropdown-menu.tsx","../../dashboard/src/components/layout/sidebar.tsx","../../dashboard/src/components/shared/code-preview.tsx","../../dashboard/src/components/shared/markdown-preview.tsx","../../dashboard/src/components/shared/zoomable-image.tsx","../../dashboard/src/components/views/files.tsx","../../dashboard/src/components/ui/sheet.tsx","../../dashboard/src/components/ui/tabs.tsx","../../dashboard/src/components/shared/status-dot.tsx","../../dashboard/src/components/shared/agent-runtime-summary.tsx","../../dashboard/src/components/shared/terminal-viewer.tsx","../../dashboard/src/components/shared/log-viewer.tsx","../../dashboard/src/lib/busy-health.ts","../../dashboard/src/components/shared/agent-diagnostics.tsx","../../dashboard/src/components/shared/agent-project-badge.tsx","../../dashboard/src/components/shared/provider-glyph.tsx","../../dashboard/src/components/shared/issue-ref-chip.tsx","../../dashboard/src/components/drawers/agent-issues-panel.tsx","../../dashboard/src/components/drawers/agent-terminal-helpers.ts","../../dashboard/src/components/drawers/stuck-busy-banner.tsx","../../dashboard/src/components/drawers/agent-resume.ts","../../dashboard/src/lib/agent-lineage.ts","../../dashboard/src/components/drawers/agent-detail-drawer.tsx","../../dashboard/src/components/ui/scroll-area.tsx","../../dashboard/src/components/drawers/channel-detail-drawer.tsx","../../dashboard/src/components/ui/textarea.tsx","../../dashboard/src/components/ui/label.tsx","../../dashboard/src/components/chat/helpers.ts","../../dashboard/src/components/chat/sessionTrace.ts","../../dashboard/src/components/chat/TraceView.tsx","../../dashboard/src/components/drawers/task-detail-drawer.tsx","../../dashboard/src/components/ui/dialog.tsx","../../dashboard/src/components/modals/compose-modal.tsx","../../dashboard/src/components/modals/confirm-modal.tsx","../../dashboard/src/components/modals/error-modal.tsx","../../dashboard/src/components/modals/rename-modal.tsx","../../dashboard/src/components/modals/pair-invite-modal.tsx","../../dashboard/src/components/modals/pair-message-modal.tsx","../../dashboard/src/components/modals/thread-modal.tsx","../../dashboard/src/components/modals/task-events-modal.tsx","../../dashboard/src/components/modals/task-create-modal.tsx","../../dashboard/src/components/shared/directory-browser-dialog.tsx","../../dashboard/src/components/shared/directory-picker.tsx","../../dashboard/src/components/shared/model-traits.tsx","../../dashboard/src/components/modals/orchestrator-spawn-modal.tsx","../../dashboard/src/components/modals/orchestrator-install-modal.tsx","../../dashboard/src/components/modals/managed-policy-modal.tsx","../../dashboard/src/components/modals/agent-profile-provisioning.tsx","../../dashboard/src/components/modals/agent-profile-modal.tsx","../../dashboard/src/components/command-palette.tsx","../../dashboard/src/components/layout/mobile-nav.tsx","../../dashboard/src/lib/quota.ts","../../dashboard/src/components/shared/provider-quota-widget.tsx","../../dashboard/src/App.tsx","../../dashboard/src/main.tsx"],"sourcesContent":["/**\n * @license React\n * scheduler.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nfunction push(heap, node) {\n var index = heap.length;\n heap.push(node);\n a: for (; 0 < index; ) {\n var parentIndex = (index - 1) >>> 1,\n parent = heap[parentIndex];\n if (0 < compare(parent, node))\n (heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);\n else break a;\n }\n}\nfunction peek(heap) {\n return 0 === heap.length ? null : heap[0];\n}\nfunction pop(heap) {\n if (0 === heap.length) return null;\n var first = heap[0],\n last = heap.pop();\n if (last !== first) {\n heap[0] = last;\n a: for (\n var index = 0, length = heap.length, halfLength = length >>> 1;\n index < halfLength;\n\n ) {\n var leftIndex = 2 * (index + 1) - 1,\n left = heap[leftIndex],\n rightIndex = leftIndex + 1,\n right = heap[rightIndex];\n if (0 > compare(left, last))\n rightIndex < length && 0 > compare(right, left)\n ? ((heap[index] = right),\n (heap[rightIndex] = last),\n (index = rightIndex))\n : ((heap[index] = left),\n (heap[leftIndex] = last),\n (index = leftIndex));\n else if (rightIndex < length && 0 > compare(right, last))\n (heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);\n else break a;\n }\n }\n return first;\n}\nfunction compare(a, b) {\n var diff = a.sortIndex - b.sortIndex;\n return 0 !== diff ? diff : a.id - b.id;\n}\nexports.unstable_now = void 0;\nif (\"object\" === typeof performance && \"function\" === typeof performance.now) {\n var localPerformance = performance;\n exports.unstable_now = function () {\n return localPerformance.now();\n };\n} else {\n var localDate = Date,\n initialTime = localDate.now();\n exports.unstable_now = function () {\n return localDate.now() - initialTime;\n };\n}\nvar taskQueue = [],\n timerQueue = [],\n taskIdCounter = 1,\n currentTask = null,\n currentPriorityLevel = 3,\n isPerformingWork = !1,\n isHostCallbackScheduled = !1,\n isHostTimeoutScheduled = !1,\n needsPaint = !1,\n localSetTimeout = \"function\" === typeof setTimeout ? setTimeout : null,\n localClearTimeout = \"function\" === typeof clearTimeout ? clearTimeout : null,\n localSetImmediate = \"undefined\" !== typeof setImmediate ? setImmediate : null;\nfunction advanceTimers(currentTime) {\n for (var timer = peek(timerQueue); null !== timer; ) {\n if (null === timer.callback) pop(timerQueue);\n else if (timer.startTime <= currentTime)\n pop(timerQueue),\n (timer.sortIndex = timer.expirationTime),\n push(taskQueue, timer);\n else break;\n timer = peek(timerQueue);\n }\n}\nfunction handleTimeout(currentTime) {\n isHostTimeoutScheduled = !1;\n advanceTimers(currentTime);\n if (!isHostCallbackScheduled)\n if (null !== peek(taskQueue))\n (isHostCallbackScheduled = !0),\n isMessageLoopRunning ||\n ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());\n else {\n var firstTimer = peek(timerQueue);\n null !== firstTimer &&\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n}\nvar isMessageLoopRunning = !1,\n taskTimeoutID = -1,\n frameInterval = 5,\n startTime = -1;\nfunction shouldYieldToHost() {\n return needsPaint\n ? !0\n : exports.unstable_now() - startTime < frameInterval\n ? !1\n : !0;\n}\nfunction performWorkUntilDeadline() {\n needsPaint = !1;\n if (isMessageLoopRunning) {\n var currentTime = exports.unstable_now();\n startTime = currentTime;\n var hasMoreWork = !0;\n try {\n a: {\n isHostCallbackScheduled = !1;\n isHostTimeoutScheduled &&\n ((isHostTimeoutScheduled = !1),\n localClearTimeout(taskTimeoutID),\n (taskTimeoutID = -1));\n isPerformingWork = !0;\n var previousPriorityLevel = currentPriorityLevel;\n try {\n b: {\n advanceTimers(currentTime);\n for (\n currentTask = peek(taskQueue);\n null !== currentTask &&\n !(\n currentTask.expirationTime > currentTime && shouldYieldToHost()\n );\n\n ) {\n var callback = currentTask.callback;\n if (\"function\" === typeof callback) {\n currentTask.callback = null;\n currentPriorityLevel = currentTask.priorityLevel;\n var continuationCallback = callback(\n currentTask.expirationTime <= currentTime\n );\n currentTime = exports.unstable_now();\n if (\"function\" === typeof continuationCallback) {\n currentTask.callback = continuationCallback;\n advanceTimers(currentTime);\n hasMoreWork = !0;\n break b;\n }\n currentTask === peek(taskQueue) && pop(taskQueue);\n advanceTimers(currentTime);\n } else pop(taskQueue);\n currentTask = peek(taskQueue);\n }\n if (null !== currentTask) hasMoreWork = !0;\n else {\n var firstTimer = peek(timerQueue);\n null !== firstTimer &&\n requestHostTimeout(\n handleTimeout,\n firstTimer.startTime - currentTime\n );\n hasMoreWork = !1;\n }\n }\n break a;\n } finally {\n (currentTask = null),\n (currentPriorityLevel = previousPriorityLevel),\n (isPerformingWork = !1);\n }\n hasMoreWork = void 0;\n }\n } finally {\n hasMoreWork\n ? schedulePerformWorkUntilDeadline()\n : (isMessageLoopRunning = !1);\n }\n }\n}\nvar schedulePerformWorkUntilDeadline;\nif (\"function\" === typeof localSetImmediate)\n schedulePerformWorkUntilDeadline = function () {\n localSetImmediate(performWorkUntilDeadline);\n };\nelse if (\"undefined\" !== typeof MessageChannel) {\n var channel = new MessageChannel(),\n port = channel.port2;\n channel.port1.onmessage = performWorkUntilDeadline;\n schedulePerformWorkUntilDeadline = function () {\n port.postMessage(null);\n };\n} else\n schedulePerformWorkUntilDeadline = function () {\n localSetTimeout(performWorkUntilDeadline, 0);\n };\nfunction requestHostTimeout(callback, ms) {\n taskTimeoutID = localSetTimeout(function () {\n callback(exports.unstable_now());\n }, ms);\n}\nexports.unstable_IdlePriority = 5;\nexports.unstable_ImmediatePriority = 1;\nexports.unstable_LowPriority = 4;\nexports.unstable_NormalPriority = 3;\nexports.unstable_Profiling = null;\nexports.unstable_UserBlockingPriority = 2;\nexports.unstable_cancelCallback = function (task) {\n task.callback = null;\n};\nexports.unstable_forceFrameRate = function (fps) {\n 0 > fps || 125 < fps\n ? console.error(\n \"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"\n )\n : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);\n};\nexports.unstable_getCurrentPriorityLevel = function () {\n return currentPriorityLevel;\n};\nexports.unstable_next = function (eventHandler) {\n switch (currentPriorityLevel) {\n case 1:\n case 2:\n case 3:\n var priorityLevel = 3;\n break;\n default:\n priorityLevel = currentPriorityLevel;\n }\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n};\nexports.unstable_requestPaint = function () {\n needsPaint = !0;\n};\nexports.unstable_runWithPriority = function (priorityLevel, eventHandler) {\n switch (priorityLevel) {\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n break;\n default:\n priorityLevel = 3;\n }\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n};\nexports.unstable_scheduleCallback = function (\n priorityLevel,\n callback,\n options\n) {\n var currentTime = exports.unstable_now();\n \"object\" === typeof options && null !== options\n ? ((options = options.delay),\n (options =\n \"number\" === typeof options && 0 < options\n ? currentTime + options\n : currentTime))\n : (options = currentTime);\n switch (priorityLevel) {\n case 1:\n var timeout = -1;\n break;\n case 2:\n timeout = 250;\n break;\n case 5:\n timeout = 1073741823;\n break;\n case 4:\n timeout = 1e4;\n break;\n default:\n timeout = 5e3;\n }\n timeout = options + timeout;\n priorityLevel = {\n id: taskIdCounter++,\n callback: callback,\n priorityLevel: priorityLevel,\n startTime: options,\n expirationTime: timeout,\n sortIndex: -1\n };\n options > currentTime\n ? ((priorityLevel.sortIndex = options),\n push(timerQueue, priorityLevel),\n null === peek(taskQueue) &&\n priorityLevel === peek(timerQueue) &&\n (isHostTimeoutScheduled\n ? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))\n : (isHostTimeoutScheduled = !0),\n requestHostTimeout(handleTimeout, options - currentTime)))\n : ((priorityLevel.sortIndex = timeout),\n push(taskQueue, priorityLevel),\n isHostCallbackScheduled ||\n isPerformingWork ||\n ((isHostCallbackScheduled = !0),\n isMessageLoopRunning ||\n ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline())));\n return priorityLevel;\n};\nexports.unstable_shouldYield = shouldYieldToHost;\nexports.unstable_wrapCallback = function (callback) {\n var parentPriorityLevel = currentPriorityLevel;\n return function () {\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = parentPriorityLevel;\n try {\n return callback.apply(this, arguments);\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n };\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * react-dom-client.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n\"use strict\";\nvar Scheduler = require(\"scheduler\"),\n React = require(\"react\"),\n ReactDOM = require(\"react-dom\");\nfunction formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nfunction isValidContainer(node) {\n return !(\n !node ||\n (1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType)\n );\n}\nfunction getNearestMountedFiber(fiber) {\n var node = fiber,\n nearestMounted = fiber;\n if (fiber.alternate) for (; node.return; ) node = node.return;\n else {\n fiber = node;\n do\n (node = fiber),\n 0 !== (node.flags & 4098) && (nearestMounted = node.return),\n (fiber = node.return);\n while (fiber);\n }\n return 3 === node.tag ? nearestMounted : null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n if (13 === fiber.tag) {\n var suspenseState = fiber.memoizedState;\n null === suspenseState &&\n ((fiber = fiber.alternate),\n null !== fiber && (suspenseState = fiber.memoizedState));\n if (null !== suspenseState) return suspenseState.dehydrated;\n }\n return null;\n}\nfunction getActivityInstanceFromFiber(fiber) {\n if (31 === fiber.tag) {\n var activityState = fiber.memoizedState;\n null === activityState &&\n ((fiber = fiber.alternate),\n null !== fiber && (activityState = fiber.memoizedState));\n if (null !== activityState) return activityState.dehydrated;\n }\n return null;\n}\nfunction assertIsMounted(fiber) {\n if (getNearestMountedFiber(fiber) !== fiber)\n throw Error(formatProdErrorMessage(188));\n}\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n if (!alternate) {\n alternate = getNearestMountedFiber(fiber);\n if (null === alternate) throw Error(formatProdErrorMessage(188));\n return alternate !== fiber ? null : fiber;\n }\n for (var a = fiber, b = alternate; ; ) {\n var parentA = a.return;\n if (null === parentA) break;\n var parentB = parentA.alternate;\n if (null === parentB) {\n b = parentA.return;\n if (null !== b) {\n a = b;\n continue;\n }\n break;\n }\n if (parentA.child === parentB.child) {\n for (parentB = parentA.child; parentB; ) {\n if (parentB === a) return assertIsMounted(parentA), fiber;\n if (parentB === b) return assertIsMounted(parentA), alternate;\n parentB = parentB.sibling;\n }\n throw Error(formatProdErrorMessage(188));\n }\n if (a.return !== b.return) (a = parentA), (b = parentB);\n else {\n for (var didFindChild = !1, child$0 = parentA.child; child$0; ) {\n if (child$0 === a) {\n didFindChild = !0;\n a = parentA;\n b = parentB;\n break;\n }\n if (child$0 === b) {\n didFindChild = !0;\n b = parentA;\n a = parentB;\n break;\n }\n child$0 = child$0.sibling;\n }\n if (!didFindChild) {\n for (child$0 = parentB.child; child$0; ) {\n if (child$0 === a) {\n didFindChild = !0;\n a = parentB;\n b = parentA;\n break;\n }\n if (child$0 === b) {\n didFindChild = !0;\n b = parentB;\n a = parentA;\n break;\n }\n child$0 = child$0.sibling;\n }\n if (!didFindChild) throw Error(formatProdErrorMessage(189));\n }\n }\n if (a.alternate !== b) throw Error(formatProdErrorMessage(190));\n }\n if (3 !== a.tag) throw Error(formatProdErrorMessage(188));\n return a.stateNode.current === a ? fiber : alternate;\n}\nfunction findCurrentHostFiberImpl(node) {\n var tag = node.tag;\n if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;\n for (node = node.child; null !== node; ) {\n tag = findCurrentHostFiberImpl(node);\n if (null !== tag) return tag;\n node = node.sibling;\n }\n return null;\n}\nvar assign = Object.assign,\n REACT_LEGACY_ELEMENT_TYPE = Symbol.for(\"react.element\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nSymbol.for(\"react.scope\");\nvar REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\");\nSymbol.for(\"react.legacy_hidden\");\nSymbol.for(\"react.tracing_marker\");\nvar REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\");\nSymbol.for(\"react.view_transition\");\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\nfunction getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (type.$$typeof) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n}\nvar isArrayImpl = Array.isArray,\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n ReactDOMSharedInternals =\n ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n sharedNotPendingObject = {\n pending: !1,\n data: null,\n method: null,\n action: null\n },\n valueStack = [],\n index = -1;\nfunction createCursor(defaultValue) {\n return { current: defaultValue };\n}\nfunction pop(cursor) {\n 0 > index ||\n ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);\n}\nfunction push(cursor, value) {\n index++;\n valueStack[index] = cursor.current;\n cursor.current = value;\n}\nvar contextStackCursor = createCursor(null),\n contextFiberStackCursor = createCursor(null),\n rootInstanceStackCursor = createCursor(null),\n hostTransitionProviderCursor = createCursor(null);\nfunction pushHostContainer(fiber, nextRootInstance) {\n push(rootInstanceStackCursor, nextRootInstance);\n push(contextFiberStackCursor, fiber);\n push(contextStackCursor, null);\n switch (nextRootInstance.nodeType) {\n case 9:\n case 11:\n fiber = (fiber = nextRootInstance.documentElement)\n ? (fiber = fiber.namespaceURI)\n ? getOwnHostContext(fiber)\n : 0\n : 0;\n break;\n default:\n if (\n ((fiber = nextRootInstance.tagName),\n (nextRootInstance = nextRootInstance.namespaceURI))\n )\n (nextRootInstance = getOwnHostContext(nextRootInstance)),\n (fiber = getChildHostContextProd(nextRootInstance, fiber));\n else\n switch (fiber) {\n case \"svg\":\n fiber = 1;\n break;\n case \"math\":\n fiber = 2;\n break;\n default:\n fiber = 0;\n }\n }\n pop(contextStackCursor);\n push(contextStackCursor, fiber);\n}\nfunction popHostContainer() {\n pop(contextStackCursor);\n pop(contextFiberStackCursor);\n pop(rootInstanceStackCursor);\n}\nfunction pushHostContext(fiber) {\n null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber);\n var context = contextStackCursor.current;\n var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type);\n context !== JSCompiler_inline_result &&\n (push(contextFiberStackCursor, fiber),\n push(contextStackCursor, JSCompiler_inline_result));\n}\nfunction popHostContext(fiber) {\n contextFiberStackCursor.current === fiber &&\n (pop(contextStackCursor), pop(contextFiberStackCursor));\n hostTransitionProviderCursor.current === fiber &&\n (pop(hostTransitionProviderCursor),\n (HostTransitionContext._currentValue = sharedNotPendingObject));\n}\nvar prefix, suffix;\nfunction describeBuiltInComponentFrame(name) {\n if (void 0 === prefix)\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = (match && match[1]) || \"\";\n suffix =\n -1 < x.stack.indexOf(\"\\n at\")\n ? \" (<anonymous>)\"\n : -1 < x.stack.indexOf(\"@\")\n ? \"@unknown:0:0\"\n : \"\";\n }\n return \"\\n\" + prefix + name + suffix;\n}\nvar reentry = !1;\nfunction describeNativeComponentFrame(fn, construct) {\n if (!fn || reentry) return \"\";\n reentry = !0;\n var previousPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = void 0;\n try {\n var RunInRootFrame = {\n DetermineComponentFrameRoot: function () {\n try {\n if (construct) {\n var Fake = function () {\n throw Error();\n };\n Object.defineProperty(Fake.prototype, \"props\", {\n set: function () {\n throw Error();\n }\n });\n if (\"object\" === typeof Reflect && Reflect.construct) {\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n var control = x;\n }\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x$1) {\n control = x$1;\n }\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x$2) {\n control = x$2;\n }\n (Fake = fn()) &&\n \"function\" === typeof Fake.catch &&\n Fake.catch(function () {});\n }\n } catch (sample) {\n if (sample && control && \"string\" === typeof sample.stack)\n return [sample.stack, control.stack];\n }\n return [null, null];\n }\n };\n RunInRootFrame.DetermineComponentFrameRoot.displayName =\n \"DetermineComponentFrameRoot\";\n var namePropDescriptor = Object.getOwnPropertyDescriptor(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\"\n );\n namePropDescriptor &&\n namePropDescriptor.configurable &&\n Object.defineProperty(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\",\n { value: \"DetermineComponentFrameRoot\" }\n );\n var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),\n sampleStack = _RunInRootFrame$Deter[0],\n controlStack = _RunInRootFrame$Deter[1];\n if (sampleStack && controlStack) {\n var sampleLines = sampleStack.split(\"\\n\"),\n controlLines = controlStack.split(\"\\n\");\n for (\n namePropDescriptor = RunInRootFrame = 0;\n RunInRootFrame < sampleLines.length &&\n !sampleLines[RunInRootFrame].includes(\"DetermineComponentFrameRoot\");\n\n )\n RunInRootFrame++;\n for (\n ;\n namePropDescriptor < controlLines.length &&\n !controlLines[namePropDescriptor].includes(\n \"DetermineComponentFrameRoot\"\n );\n\n )\n namePropDescriptor++;\n if (\n RunInRootFrame === sampleLines.length ||\n namePropDescriptor === controlLines.length\n )\n for (\n RunInRootFrame = sampleLines.length - 1,\n namePropDescriptor = controlLines.length - 1;\n 1 <= RunInRootFrame &&\n 0 <= namePropDescriptor &&\n sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];\n\n )\n namePropDescriptor--;\n for (\n ;\n 1 <= RunInRootFrame && 0 <= namePropDescriptor;\n RunInRootFrame--, namePropDescriptor--\n )\n if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {\n if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {\n do\n if (\n (RunInRootFrame--,\n namePropDescriptor--,\n 0 > namePropDescriptor ||\n sampleLines[RunInRootFrame] !==\n controlLines[namePropDescriptor])\n ) {\n var frame =\n \"\\n\" +\n sampleLines[RunInRootFrame].replace(\" at new \", \" at \");\n fn.displayName &&\n frame.includes(\"<anonymous>\") &&\n (frame = frame.replace(\"<anonymous>\", fn.displayName));\n return frame;\n }\n while (1 <= RunInRootFrame && 0 <= namePropDescriptor);\n }\n break;\n }\n }\n } finally {\n (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);\n }\n return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : \"\")\n ? describeBuiltInComponentFrame(previousPrepareStackTrace)\n : \"\";\n}\nfunction describeFiber(fiber, childFiber) {\n switch (fiber.tag) {\n case 26:\n case 27:\n case 5:\n return describeBuiltInComponentFrame(fiber.type);\n case 16:\n return describeBuiltInComponentFrame(\"Lazy\");\n case 13:\n return fiber.child !== childFiber && null !== childFiber\n ? describeBuiltInComponentFrame(\"Suspense Fallback\")\n : describeBuiltInComponentFrame(\"Suspense\");\n case 19:\n return describeBuiltInComponentFrame(\"SuspenseList\");\n case 0:\n case 15:\n return describeNativeComponentFrame(fiber.type, !1);\n case 11:\n return describeNativeComponentFrame(fiber.type.render, !1);\n case 1:\n return describeNativeComponentFrame(fiber.type, !0);\n case 31:\n return describeBuiltInComponentFrame(\"Activity\");\n default:\n return \"\";\n }\n}\nfunction getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = \"\",\n previous = null;\n do\n (info += describeFiber(workInProgress, previous)),\n (previous = workInProgress),\n (workInProgress = workInProgress.return);\n while (workInProgress);\n return info;\n } catch (x) {\n return \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n }\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty,\n scheduleCallback$3 = Scheduler.unstable_scheduleCallback,\n cancelCallback$1 = Scheduler.unstable_cancelCallback,\n shouldYield = Scheduler.unstable_shouldYield,\n requestPaint = Scheduler.unstable_requestPaint,\n now = Scheduler.unstable_now,\n getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,\n ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n NormalPriority$1 = Scheduler.unstable_NormalPriority,\n LowPriority = Scheduler.unstable_LowPriority,\n IdlePriority = Scheduler.unstable_IdlePriority,\n log$1 = Scheduler.log,\n unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,\n rendererID = null,\n injectedHook = null;\nfunction setIsStrictModeForDevtools(newIsStrictMode) {\n \"function\" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);\n if (injectedHook && \"function\" === typeof injectedHook.setStrictMode)\n try {\n injectedHook.setStrictMode(rendererID, newIsStrictMode);\n } catch (err) {}\n}\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,\n log = Math.log,\n LN2 = Math.LN2;\nfunction clz32Fallback(x) {\n x >>>= 0;\n return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;\n}\nvar nextTransitionUpdateLane = 256,\n nextTransitionDeferredLane = 262144,\n nextRetryLane = 4194304;\nfunction getHighestPriorityLanes(lanes) {\n var pendingSyncLanes = lanes & 42;\n if (0 !== pendingSyncLanes) return pendingSyncLanes;\n switch (lanes & -lanes) {\n case 1:\n return 1;\n case 2:\n return 2;\n case 4:\n return 4;\n case 8:\n return 8;\n case 16:\n return 16;\n case 32:\n return 32;\n case 64:\n return 64;\n case 128:\n return 128;\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n return lanes & 261888;\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return lanes & 3932160;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n return lanes & 62914560;\n case 67108864:\n return 67108864;\n case 134217728:\n return 134217728;\n case 268435456:\n return 268435456;\n case 536870912:\n return 536870912;\n case 1073741824:\n return 0;\n default:\n return lanes;\n }\n}\nfunction getNextLanes(root, wipLanes, rootHasPendingCommit) {\n var pendingLanes = root.pendingLanes;\n if (0 === pendingLanes) return 0;\n var nextLanes = 0,\n suspendedLanes = root.suspendedLanes,\n pingedLanes = root.pingedLanes;\n root = root.warmLanes;\n var nonIdlePendingLanes = pendingLanes & 134217727;\n 0 !== nonIdlePendingLanes\n ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),\n 0 !== pendingLanes\n ? (nextLanes = getHighestPriorityLanes(pendingLanes))\n : ((pingedLanes &= nonIdlePendingLanes),\n 0 !== pingedLanes\n ? (nextLanes = getHighestPriorityLanes(pingedLanes))\n : rootHasPendingCommit ||\n ((rootHasPendingCommit = nonIdlePendingLanes & ~root),\n 0 !== rootHasPendingCommit &&\n (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))\n : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),\n 0 !== nonIdlePendingLanes\n ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))\n : 0 !== pingedLanes\n ? (nextLanes = getHighestPriorityLanes(pingedLanes))\n : rootHasPendingCommit ||\n ((rootHasPendingCommit = pendingLanes & ~root),\n 0 !== rootHasPendingCommit &&\n (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));\n return 0 === nextLanes\n ? 0\n : 0 !== wipLanes &&\n wipLanes !== nextLanes &&\n 0 === (wipLanes & suspendedLanes) &&\n ((suspendedLanes = nextLanes & -nextLanes),\n (rootHasPendingCommit = wipLanes & -wipLanes),\n suspendedLanes >= rootHasPendingCommit ||\n (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))\n ? wipLanes\n : nextLanes;\n}\nfunction checkIfRootIsPrerendering(root, renderLanes) {\n return (\n 0 ===\n (root.pendingLanes &\n ~(root.suspendedLanes & ~root.pingedLanes) &\n renderLanes)\n );\n}\nfunction computeExpirationTime(lane, currentTime) {\n switch (lane) {\n case 1:\n case 2:\n case 4:\n case 8:\n case 64:\n return currentTime + 250;\n case 16:\n case 32:\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return currentTime + 5e3;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n return -1;\n case 67108864:\n case 134217728:\n case 268435456:\n case 536870912:\n case 1073741824:\n return -1;\n default:\n return -1;\n }\n}\nfunction claimNextRetryLane() {\n var lane = nextRetryLane;\n nextRetryLane <<= 1;\n 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);\n return lane;\n}\nfunction createLaneMap(initial) {\n for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);\n return laneMap;\n}\nfunction markRootUpdated$1(root, updateLane) {\n root.pendingLanes |= updateLane;\n 268435456 !== updateLane &&\n ((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0));\n}\nfunction markRootFinished(\n root,\n finishedLanes,\n remainingLanes,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n) {\n var previouslyPendingLanes = root.pendingLanes;\n root.pendingLanes = remainingLanes;\n root.suspendedLanes = 0;\n root.pingedLanes = 0;\n root.warmLanes = 0;\n root.expiredLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n root.errorRecoveryDisabledLanes &= remainingLanes;\n root.shellSuspendCounter = 0;\n var entanglements = root.entanglements,\n expirationTimes = root.expirationTimes,\n hiddenUpdates = root.hiddenUpdates;\n for (\n remainingLanes = previouslyPendingLanes & ~remainingLanes;\n 0 < remainingLanes;\n\n ) {\n var index$7 = 31 - clz32(remainingLanes),\n lane = 1 << index$7;\n entanglements[index$7] = 0;\n expirationTimes[index$7] = -1;\n var hiddenUpdatesForLane = hiddenUpdates[index$7];\n if (null !== hiddenUpdatesForLane)\n for (\n hiddenUpdates[index$7] = null, index$7 = 0;\n index$7 < hiddenUpdatesForLane.length;\n index$7++\n ) {\n var update = hiddenUpdatesForLane[index$7];\n null !== update && (update.lane &= -536870913);\n }\n remainingLanes &= ~lane;\n }\n 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);\n 0 !== suspendedRetryLanes &&\n 0 === updatedLanes &&\n 0 !== root.tag &&\n (root.suspendedLanes |=\n suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));\n}\nfunction markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {\n root.pendingLanes |= spawnedLane;\n root.suspendedLanes &= ~spawnedLane;\n var spawnedLaneIndex = 31 - clz32(spawnedLane);\n root.entangledLanes |= spawnedLane;\n root.entanglements[spawnedLaneIndex] =\n root.entanglements[spawnedLaneIndex] |\n 1073741824 |\n (entangledLanes & 261930);\n}\nfunction markRootEntangled(root, entangledLanes) {\n var rootEntangledLanes = (root.entangledLanes |= entangledLanes);\n for (root = root.entanglements; rootEntangledLanes; ) {\n var index$8 = 31 - clz32(rootEntangledLanes),\n lane = 1 << index$8;\n (lane & entangledLanes) | (root[index$8] & entangledLanes) &&\n (root[index$8] |= entangledLanes);\n rootEntangledLanes &= ~lane;\n }\n}\nfunction getBumpedLaneForHydration(root, renderLanes) {\n var renderLane = renderLanes & -renderLanes;\n renderLane =\n 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);\n return 0 !== (renderLane & (root.suspendedLanes | renderLanes))\n ? 0\n : renderLane;\n}\nfunction getBumpedLaneForHydrationByLane(lane) {\n switch (lane) {\n case 2:\n lane = 1;\n break;\n case 8:\n lane = 4;\n break;\n case 32:\n lane = 16;\n break;\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n lane = 128;\n break;\n case 268435456:\n lane = 134217728;\n break;\n default:\n lane = 0;\n }\n return lane;\n}\nfunction lanesToEventPriority(lanes) {\n lanes &= -lanes;\n return 2 < lanes\n ? 8 < lanes\n ? 0 !== (lanes & 134217727)\n ? 32\n : 268435456\n : 8\n : 2;\n}\nfunction resolveUpdatePriority() {\n var updatePriority = ReactDOMSharedInternals.p;\n if (0 !== updatePriority) return updatePriority;\n updatePriority = window.event;\n return void 0 === updatePriority ? 32 : getEventPriority(updatePriority.type);\n}\nfunction runWithPriority(priority, fn) {\n var previousPriority = ReactDOMSharedInternals.p;\n try {\n return (ReactDOMSharedInternals.p = priority), fn();\n } finally {\n ReactDOMSharedInternals.p = previousPriority;\n }\n}\nvar randomKey = Math.random().toString(36).slice(2),\n internalInstanceKey = \"__reactFiber$\" + randomKey,\n internalPropsKey = \"__reactProps$\" + randomKey,\n internalContainerInstanceKey = \"__reactContainer$\" + randomKey,\n internalEventHandlersKey = \"__reactEvents$\" + randomKey,\n internalEventHandlerListenersKey = \"__reactListeners$\" + randomKey,\n internalEventHandlesSetKey = \"__reactHandles$\" + randomKey,\n internalRootNodeResourcesKey = \"__reactResources$\" + randomKey,\n internalHoistableMarker = \"__reactMarker$\" + randomKey;\nfunction detachDeletedInstance(node) {\n delete node[internalInstanceKey];\n delete node[internalPropsKey];\n delete node[internalEventHandlersKey];\n delete node[internalEventHandlerListenersKey];\n delete node[internalEventHandlesSetKey];\n}\nfunction getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n if (targetInst) return targetInst;\n for (var parentNode = targetNode.parentNode; parentNode; ) {\n if (\n (targetInst =\n parentNode[internalContainerInstanceKey] ||\n parentNode[internalInstanceKey])\n ) {\n parentNode = targetInst.alternate;\n if (\n null !== targetInst.child ||\n (null !== parentNode && null !== parentNode.child)\n )\n for (\n targetNode = getParentHydrationBoundary(targetNode);\n null !== targetNode;\n\n ) {\n if ((parentNode = targetNode[internalInstanceKey])) return parentNode;\n targetNode = getParentHydrationBoundary(targetNode);\n }\n return targetInst;\n }\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n return null;\n}\nfunction getInstanceFromNode(node) {\n if (\n (node = node[internalInstanceKey] || node[internalContainerInstanceKey])\n ) {\n var tag = node.tag;\n if (\n 5 === tag ||\n 6 === tag ||\n 13 === tag ||\n 31 === tag ||\n 26 === tag ||\n 27 === tag ||\n 3 === tag\n )\n return node;\n }\n return null;\n}\nfunction getNodeFromInstance(inst) {\n var tag = inst.tag;\n if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return inst.stateNode;\n throw Error(formatProdErrorMessage(33));\n}\nfunction getResourcesFromRoot(root) {\n var resources = root[internalRootNodeResourcesKey];\n resources ||\n (resources = root[internalRootNodeResourcesKey] =\n { hoistableStyles: new Map(), hoistableScripts: new Map() });\n return resources;\n}\nfunction markNodeAsHoistable(node) {\n node[internalHoistableMarker] = !0;\n}\nvar allNativeEvents = new Set(),\n registrationNameDependencies = {};\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n registerDirectEvent(registrationName, dependencies);\n registerDirectEvent(registrationName + \"Capture\", dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n registrationNameDependencies[registrationName] = dependencies;\n for (\n registrationName = 0;\n registrationName < dependencies.length;\n registrationName++\n )\n allNativeEvents.add(dependencies[registrationName]);\n}\nvar VALID_ATTRIBUTE_NAME_REGEX = RegExp(\n \"^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n ),\n illegalAttributeNameCache = {},\n validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))\n return !0;\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))\n return (validatedAttributeNameCache[attributeName] = !0);\n illegalAttributeNameCache[attributeName] = !0;\n return !1;\n}\nfunction setValueForAttribute(node, name, value) {\n if (isAttributeNameSafe(name))\n if (null === value) node.removeAttribute(name);\n else {\n switch (typeof value) {\n case \"undefined\":\n case \"function\":\n case \"symbol\":\n node.removeAttribute(name);\n return;\n case \"boolean\":\n var prefix$10 = name.toLowerCase().slice(0, 5);\n if (\"data-\" !== prefix$10 && \"aria-\" !== prefix$10) {\n node.removeAttribute(name);\n return;\n }\n }\n node.setAttribute(name, \"\" + value);\n }\n}\nfunction setValueForKnownAttribute(node, name, value) {\n if (null === value) node.removeAttribute(name);\n else {\n switch (typeof value) {\n case \"undefined\":\n case \"function\":\n case \"symbol\":\n case \"boolean\":\n node.removeAttribute(name);\n return;\n }\n node.setAttribute(name, \"\" + value);\n }\n}\nfunction setValueForNamespacedAttribute(node, namespace, name, value) {\n if (null === value) node.removeAttribute(name);\n else {\n switch (typeof value) {\n case \"undefined\":\n case \"function\":\n case \"symbol\":\n case \"boolean\":\n node.removeAttribute(name);\n return;\n }\n node.setAttributeNS(namespace, name, \"\" + value);\n }\n}\nfunction getToStringValue(value) {\n switch (typeof value) {\n case \"bigint\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n case \"undefined\":\n return value;\n case \"object\":\n return value;\n default:\n return \"\";\n }\n}\nfunction isCheckable(elem) {\n var type = elem.type;\n return (\n (elem = elem.nodeName) &&\n \"input\" === elem.toLowerCase() &&\n (\"checkbox\" === type || \"radio\" === type)\n );\n}\nfunction trackValueOnNode(node, valueField, currentValue) {\n var descriptor = Object.getOwnPropertyDescriptor(\n node.constructor.prototype,\n valueField\n );\n if (\n !node.hasOwnProperty(valueField) &&\n \"undefined\" !== typeof descriptor &&\n \"function\" === typeof descriptor.get &&\n \"function\" === typeof descriptor.set\n ) {\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: !0,\n get: function () {\n return get.call(this);\n },\n set: function (value) {\n currentValue = \"\" + value;\n set.call(this, value);\n }\n });\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n return {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n currentValue = \"\" + value;\n },\n stopTracking: function () {\n node._valueTracker = null;\n delete node[valueField];\n }\n };\n }\n}\nfunction track(node) {\n if (!node._valueTracker) {\n var valueField = isCheckable(node) ? \"checked\" : \"value\";\n node._valueTracker = trackValueOnNode(\n node,\n valueField,\n \"\" + node[valueField]\n );\n }\n}\nfunction updateValueIfChanged(node) {\n if (!node) return !1;\n var tracker = node._valueTracker;\n if (!tracker) return !0;\n var lastValue = tracker.getValue();\n var value = \"\";\n node &&\n (value = isCheckable(node)\n ? node.checked\n ? \"true\"\n : \"false\"\n : node.value);\n node = value;\n return node !== lastValue ? (tracker.setValue(node), !0) : !1;\n}\nfunction getActiveElement(doc) {\n doc = doc || (\"undefined\" !== typeof document ? document : void 0);\n if (\"undefined\" === typeof doc) return null;\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\nvar escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\\n\"\\\\]/g;\nfunction escapeSelectorAttributeValueInsideDoubleQuotes(value) {\n return value.replace(\n escapeSelectorAttributeValueInsideDoubleQuotesRegex,\n function (ch) {\n return \"\\\\\" + ch.charCodeAt(0).toString(16) + \" \";\n }\n );\n}\nfunction updateInput(\n element,\n value,\n defaultValue,\n lastDefaultValue,\n checked,\n defaultChecked,\n type,\n name\n) {\n element.name = \"\";\n null != type &&\n \"function\" !== typeof type &&\n \"symbol\" !== typeof type &&\n \"boolean\" !== typeof type\n ? (element.type = type)\n : element.removeAttribute(\"type\");\n if (null != value)\n if (\"number\" === type) {\n if ((0 === value && \"\" === element.value) || element.value != value)\n element.value = \"\" + getToStringValue(value);\n } else\n element.value !== \"\" + getToStringValue(value) &&\n (element.value = \"\" + getToStringValue(value));\n else\n (\"submit\" !== type && \"reset\" !== type) || element.removeAttribute(\"value\");\n null != value\n ? setDefaultValue(element, type, getToStringValue(value))\n : null != defaultValue\n ? setDefaultValue(element, type, getToStringValue(defaultValue))\n : null != lastDefaultValue && element.removeAttribute(\"value\");\n null == checked &&\n null != defaultChecked &&\n (element.defaultChecked = !!defaultChecked);\n null != checked &&\n (element.checked =\n checked && \"function\" !== typeof checked && \"symbol\" !== typeof checked);\n null != name &&\n \"function\" !== typeof name &&\n \"symbol\" !== typeof name &&\n \"boolean\" !== typeof name\n ? (element.name = \"\" + getToStringValue(name))\n : element.removeAttribute(\"name\");\n}\nfunction initInput(\n element,\n value,\n defaultValue,\n checked,\n defaultChecked,\n type,\n name,\n isHydrating\n) {\n null != type &&\n \"function\" !== typeof type &&\n \"symbol\" !== typeof type &&\n \"boolean\" !== typeof type &&\n (element.type = type);\n if (null != value || null != defaultValue) {\n if (\n !(\n (\"submit\" !== type && \"reset\" !== type) ||\n (void 0 !== value && null !== value)\n )\n ) {\n track(element);\n return;\n }\n defaultValue =\n null != defaultValue ? \"\" + getToStringValue(defaultValue) : \"\";\n value = null != value ? \"\" + getToStringValue(value) : defaultValue;\n isHydrating || value === element.value || (element.value = value);\n element.defaultValue = value;\n }\n checked = null != checked ? checked : defaultChecked;\n checked =\n \"function\" !== typeof checked && \"symbol\" !== typeof checked && !!checked;\n element.checked = isHydrating ? element.checked : !!checked;\n element.defaultChecked = !!checked;\n null != name &&\n \"function\" !== typeof name &&\n \"symbol\" !== typeof name &&\n \"boolean\" !== typeof name &&\n (element.name = name);\n track(element);\n}\nfunction setDefaultValue(node, type, value) {\n (\"number\" === type && getActiveElement(node.ownerDocument) === node) ||\n node.defaultValue === \"\" + value ||\n (node.defaultValue = \"\" + value);\n}\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n node = node.options;\n if (multiple) {\n multiple = {};\n for (var i = 0; i < propValue.length; i++)\n multiple[\"$\" + propValue[i]] = !0;\n for (propValue = 0; propValue < node.length; propValue++)\n (i = multiple.hasOwnProperty(\"$\" + node[propValue].value)),\n node[propValue].selected !== i && (node[propValue].selected = i),\n i && setDefaultSelected && (node[propValue].defaultSelected = !0);\n } else {\n propValue = \"\" + getToStringValue(propValue);\n multiple = null;\n for (i = 0; i < node.length; i++) {\n if (node[i].value === propValue) {\n node[i].selected = !0;\n setDefaultSelected && (node[i].defaultSelected = !0);\n return;\n }\n null !== multiple || node[i].disabled || (multiple = node[i]);\n }\n null !== multiple && (multiple.selected = !0);\n }\n}\nfunction updateTextarea(element, value, defaultValue) {\n if (\n null != value &&\n ((value = \"\" + getToStringValue(value)),\n value !== element.value && (element.value = value),\n null == defaultValue)\n ) {\n element.defaultValue !== value && (element.defaultValue = value);\n return;\n }\n element.defaultValue =\n null != defaultValue ? \"\" + getToStringValue(defaultValue) : \"\";\n}\nfunction initTextarea(element, value, defaultValue, children) {\n if (null == value) {\n if (null != children) {\n if (null != defaultValue) throw Error(formatProdErrorMessage(92));\n if (isArrayImpl(children)) {\n if (1 < children.length) throw Error(formatProdErrorMessage(93));\n children = children[0];\n }\n defaultValue = children;\n }\n null == defaultValue && (defaultValue = \"\");\n value = defaultValue;\n }\n defaultValue = getToStringValue(value);\n element.defaultValue = defaultValue;\n children = element.textContent;\n children === defaultValue &&\n \"\" !== children &&\n null !== children &&\n (element.value = children);\n track(element);\n}\nfunction setTextContent(node, text) {\n if (text) {\n var firstChild = node.firstChild;\n if (\n firstChild &&\n firstChild === node.lastChild &&\n 3 === firstChild.nodeType\n ) {\n firstChild.nodeValue = text;\n return;\n }\n }\n node.textContent = text;\n}\nvar unitlessNumbers = new Set(\n \"animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp\".split(\n \" \"\n )\n);\nfunction setValueForStyle(style, styleName, value) {\n var isCustomProperty = 0 === styleName.indexOf(\"--\");\n null == value || \"boolean\" === typeof value || \"\" === value\n ? isCustomProperty\n ? style.setProperty(styleName, \"\")\n : \"float\" === styleName\n ? (style.cssFloat = \"\")\n : (style[styleName] = \"\")\n : isCustomProperty\n ? style.setProperty(styleName, value)\n : \"number\" !== typeof value ||\n 0 === value ||\n unitlessNumbers.has(styleName)\n ? \"float\" === styleName\n ? (style.cssFloat = value)\n : (style[styleName] = (\"\" + value).trim())\n : (style[styleName] = value + \"px\");\n}\nfunction setValueForStyles(node, styles, prevStyles) {\n if (null != styles && \"object\" !== typeof styles)\n throw Error(formatProdErrorMessage(62));\n node = node.style;\n if (null != prevStyles) {\n for (var styleName in prevStyles)\n !prevStyles.hasOwnProperty(styleName) ||\n (null != styles && styles.hasOwnProperty(styleName)) ||\n (0 === styleName.indexOf(\"--\")\n ? node.setProperty(styleName, \"\")\n : \"float\" === styleName\n ? (node.cssFloat = \"\")\n : (node[styleName] = \"\"));\n for (var styleName$16 in styles)\n (styleName = styles[styleName$16]),\n styles.hasOwnProperty(styleName$16) &&\n prevStyles[styleName$16] !== styleName &&\n setValueForStyle(node, styleName$16, styleName);\n } else\n for (var styleName$17 in styles)\n styles.hasOwnProperty(styleName$17) &&\n setValueForStyle(node, styleName$17, styles[styleName$17]);\n}\nfunction isCustomElement(tagName) {\n if (-1 === tagName.indexOf(\"-\")) return !1;\n switch (tagName) {\n case \"annotation-xml\":\n case \"color-profile\":\n case \"font-face\":\n case \"font-face-src\":\n case \"font-face-uri\":\n case \"font-face-format\":\n case \"font-face-name\":\n case \"missing-glyph\":\n return !1;\n default:\n return !0;\n }\n}\nvar aliases = new Map([\n [\"acceptCharset\", \"accept-charset\"],\n [\"htmlFor\", \"for\"],\n [\"httpEquiv\", \"http-equiv\"],\n [\"crossOrigin\", \"crossorigin\"],\n [\"accentHeight\", \"accent-height\"],\n [\"alignmentBaseline\", \"alignment-baseline\"],\n [\"arabicForm\", \"arabic-form\"],\n [\"baselineShift\", \"baseline-shift\"],\n [\"capHeight\", \"cap-height\"],\n [\"clipPath\", \"clip-path\"],\n [\"clipRule\", \"clip-rule\"],\n [\"colorInterpolation\", \"color-interpolation\"],\n [\"colorInterpolationFilters\", \"color-interpolation-filters\"],\n [\"colorProfile\", \"color-profile\"],\n [\"colorRendering\", \"color-rendering\"],\n [\"dominantBaseline\", \"dominant-baseline\"],\n [\"enableBackground\", \"enable-background\"],\n [\"fillOpacity\", \"fill-opacity\"],\n [\"fillRule\", \"fill-rule\"],\n [\"floodColor\", \"flood-color\"],\n [\"floodOpacity\", \"flood-opacity\"],\n [\"fontFamily\", \"font-family\"],\n [\"fontSize\", \"font-size\"],\n [\"fontSizeAdjust\", \"font-size-adjust\"],\n [\"fontStretch\", \"font-stretch\"],\n [\"fontStyle\", \"font-style\"],\n [\"fontVariant\", \"font-variant\"],\n [\"fontWeight\", \"font-weight\"],\n [\"glyphName\", \"glyph-name\"],\n [\"glyphOrientationHorizontal\", \"glyph-orientation-horizontal\"],\n [\"glyphOrientationVertical\", \"glyph-orientation-vertical\"],\n [\"horizAdvX\", \"horiz-adv-x\"],\n [\"horizOriginX\", \"horiz-origin-x\"],\n [\"imageRendering\", \"image-rendering\"],\n [\"letterSpacing\", \"letter-spacing\"],\n [\"lightingColor\", \"lighting-color\"],\n [\"markerEnd\", \"marker-end\"],\n [\"markerMid\", \"marker-mid\"],\n [\"markerStart\", \"marker-start\"],\n [\"overlinePosition\", \"overline-position\"],\n [\"overlineThickness\", \"overline-thickness\"],\n [\"paintOrder\", \"paint-order\"],\n [\"panose-1\", \"panose-1\"],\n [\"pointerEvents\", \"pointer-events\"],\n [\"renderingIntent\", \"rendering-intent\"],\n [\"shapeRendering\", \"shape-rendering\"],\n [\"stopColor\", \"stop-color\"],\n [\"stopOpacity\", \"stop-opacity\"],\n [\"strikethroughPosition\", \"strikethrough-position\"],\n [\"strikethroughThickness\", \"strikethrough-thickness\"],\n [\"strokeDasharray\", \"stroke-dasharray\"],\n [\"strokeDashoffset\", \"stroke-dashoffset\"],\n [\"strokeLinecap\", \"stroke-linecap\"],\n [\"strokeLinejoin\", \"stroke-linejoin\"],\n [\"strokeMiterlimit\", \"stroke-miterlimit\"],\n [\"strokeOpacity\", \"stroke-opacity\"],\n [\"strokeWidth\", \"stroke-width\"],\n [\"textAnchor\", \"text-anchor\"],\n [\"textDecoration\", \"text-decoration\"],\n [\"textRendering\", \"text-rendering\"],\n [\"transformOrigin\", \"transform-origin\"],\n [\"underlinePosition\", \"underline-position\"],\n [\"underlineThickness\", \"underline-thickness\"],\n [\"unicodeBidi\", \"unicode-bidi\"],\n [\"unicodeRange\", \"unicode-range\"],\n [\"unitsPerEm\", \"units-per-em\"],\n [\"vAlphabetic\", \"v-alphabetic\"],\n [\"vHanging\", \"v-hanging\"],\n [\"vIdeographic\", \"v-ideographic\"],\n [\"vMathematical\", \"v-mathematical\"],\n [\"vectorEffect\", \"vector-effect\"],\n [\"vertAdvY\", \"vert-adv-y\"],\n [\"vertOriginX\", \"vert-origin-x\"],\n [\"vertOriginY\", \"vert-origin-y\"],\n [\"wordSpacing\", \"word-spacing\"],\n [\"writingMode\", \"writing-mode\"],\n [\"xmlnsXlink\", \"xmlns:xlink\"],\n [\"xHeight\", \"x-height\"]\n ]),\n isJavaScriptProtocol =\n /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;\nfunction sanitizeURL(url) {\n return isJavaScriptProtocol.test(\"\" + url)\n ? \"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\"\n : url;\n}\nfunction noop$1() {}\nvar currentReplayingEvent = null;\nfunction getEventTarget(nativeEvent) {\n nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;\n nativeEvent.correspondingUseElement &&\n (nativeEvent = nativeEvent.correspondingUseElement);\n return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;\n}\nvar restoreTarget = null,\n restoreQueue = null;\nfunction restoreStateOfTarget(target) {\n var internalInstance = getInstanceFromNode(target);\n if (internalInstance && (target = internalInstance.stateNode)) {\n var props = target[internalPropsKey] || null;\n a: switch (((target = internalInstance.stateNode), internalInstance.type)) {\n case \"input\":\n updateInput(\n target,\n props.value,\n props.defaultValue,\n props.defaultValue,\n props.checked,\n props.defaultChecked,\n props.type,\n props.name\n );\n internalInstance = props.name;\n if (\"radio\" === props.type && null != internalInstance) {\n for (props = target; props.parentNode; ) props = props.parentNode;\n props = props.querySelectorAll(\n 'input[name=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(\n \"\" + internalInstance\n ) +\n '\"][type=\"radio\"]'\n );\n for (\n internalInstance = 0;\n internalInstance < props.length;\n internalInstance++\n ) {\n var otherNode = props[internalInstance];\n if (otherNode !== target && otherNode.form === target.form) {\n var otherProps = otherNode[internalPropsKey] || null;\n if (!otherProps) throw Error(formatProdErrorMessage(90));\n updateInput(\n otherNode,\n otherProps.value,\n otherProps.defaultValue,\n otherProps.defaultValue,\n otherProps.checked,\n otherProps.defaultChecked,\n otherProps.type,\n otherProps.name\n );\n }\n }\n for (\n internalInstance = 0;\n internalInstance < props.length;\n internalInstance++\n )\n (otherNode = props[internalInstance]),\n otherNode.form === target.form && updateValueIfChanged(otherNode);\n }\n break a;\n case \"textarea\":\n updateTextarea(target, props.value, props.defaultValue);\n break a;\n case \"select\":\n (internalInstance = props.value),\n null != internalInstance &&\n updateOptions(target, !!props.multiple, internalInstance, !1);\n }\n }\n}\nvar isInsideEventHandler = !1;\nfunction batchedUpdates$1(fn, a, b) {\n if (isInsideEventHandler) return fn(a, b);\n isInsideEventHandler = !0;\n try {\n var JSCompiler_inline_result = fn(a);\n return JSCompiler_inline_result;\n } finally {\n if (\n ((isInsideEventHandler = !1),\n null !== restoreTarget || null !== restoreQueue)\n )\n if (\n (flushSyncWork$1(),\n restoreTarget &&\n ((a = restoreTarget),\n (fn = restoreQueue),\n (restoreQueue = restoreTarget = null),\n restoreStateOfTarget(a),\n fn))\n )\n for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);\n }\n}\nfunction getListener(inst, registrationName) {\n var stateNode = inst.stateNode;\n if (null === stateNode) return null;\n var props = stateNode[internalPropsKey] || null;\n if (null === props) return null;\n stateNode = props[registrationName];\n a: switch (registrationName) {\n case \"onClick\":\n case \"onClickCapture\":\n case \"onDoubleClick\":\n case \"onDoubleClickCapture\":\n case \"onMouseDown\":\n case \"onMouseDownCapture\":\n case \"onMouseMove\":\n case \"onMouseMoveCapture\":\n case \"onMouseUp\":\n case \"onMouseUpCapture\":\n case \"onMouseEnter\":\n (props = !props.disabled) ||\n ((inst = inst.type),\n (props = !(\n \"button\" === inst ||\n \"input\" === inst ||\n \"select\" === inst ||\n \"textarea\" === inst\n )));\n inst = !props;\n break a;\n default:\n inst = !1;\n }\n if (inst) return null;\n if (stateNode && \"function\" !== typeof stateNode)\n throw Error(\n formatProdErrorMessage(231, registrationName, typeof stateNode)\n );\n return stateNode;\n}\nvar canUseDOM = !(\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ),\n passiveBrowserEventsSupported = !1;\nif (canUseDOM)\n try {\n var options = {};\n Object.defineProperty(options, \"passive\", {\n get: function () {\n passiveBrowserEventsSupported = !0;\n }\n });\n window.addEventListener(\"test\", options, options);\n window.removeEventListener(\"test\", options, options);\n } catch (e) {\n passiveBrowserEventsSupported = !1;\n }\nvar root = null,\n startText = null,\n fallbackText = null;\nfunction getData() {\n if (fallbackText) return fallbackText;\n var start,\n startValue = startText,\n startLength = startValue.length,\n end,\n endValue = \"value\" in root ? root.value : root.textContent,\n endLength = endValue.length;\n for (\n start = 0;\n start < startLength && startValue[start] === endValue[start];\n start++\n );\n var minEnd = startLength - start;\n for (\n end = 1;\n end <= minEnd &&\n startValue[startLength - end] === endValue[endLength - end];\n end++\n );\n return (fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0));\n}\nfunction getEventCharCode(nativeEvent) {\n var keyCode = nativeEvent.keyCode;\n \"charCode\" in nativeEvent\n ? ((nativeEvent = nativeEvent.charCode),\n 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13))\n : (nativeEvent = keyCode);\n 10 === nativeEvent && (nativeEvent = 13);\n return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;\n}\nfunction functionThatReturnsTrue() {\n return !0;\n}\nfunction functionThatReturnsFalse() {\n return !1;\n}\nfunction createSyntheticEvent(Interface) {\n function SyntheticBaseEvent(\n reactName,\n reactEventType,\n targetInst,\n nativeEvent,\n nativeEventTarget\n ) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n for (var propName in Interface)\n Interface.hasOwnProperty(propName) &&\n ((reactName = Interface[propName]),\n (this[propName] = reactName\n ? reactName(nativeEvent)\n : nativeEvent[propName]));\n this.isDefaultPrevented = (\n null != nativeEvent.defaultPrevented\n ? nativeEvent.defaultPrevented\n : !1 === nativeEvent.returnValue\n )\n ? functionThatReturnsTrue\n : functionThatReturnsFalse;\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n }\n assign(SyntheticBaseEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = !0;\n var event = this.nativeEvent;\n event &&\n (event.preventDefault\n ? event.preventDefault()\n : \"unknown\" !== typeof event.returnValue && (event.returnValue = !1),\n (this.isDefaultPrevented = functionThatReturnsTrue));\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n event &&\n (event.stopPropagation\n ? event.stopPropagation()\n : \"unknown\" !== typeof event.cancelBubble &&\n (event.cancelBubble = !0),\n (this.isPropagationStopped = functionThatReturnsTrue));\n },\n persist: function () {},\n isPersistent: functionThatReturnsTrue\n });\n return SyntheticBaseEvent;\n}\nvar EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n },\n SyntheticEvent = createSyntheticEvent(EventInterface),\n UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }),\n SyntheticUIEvent = createSyntheticEvent(UIEventInterface),\n lastMovementX,\n lastMovementY,\n lastMouseEvent,\n MouseEventInterface = assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n return void 0 === event.relatedTarget\n ? event.fromElement === event.srcElement\n ? event.toElement\n : event.fromElement\n : event.relatedTarget;\n },\n movementX: function (event) {\n if (\"movementX\" in event) return event.movementX;\n event !== lastMouseEvent &&\n (lastMouseEvent && \"mousemove\" === event.type\n ? ((lastMovementX = event.screenX - lastMouseEvent.screenX),\n (lastMovementY = event.screenY - lastMouseEvent.screenY))\n : (lastMovementY = lastMovementX = 0),\n (lastMouseEvent = event));\n return lastMovementX;\n },\n movementY: function (event) {\n return \"movementY\" in event ? event.movementY : lastMovementY;\n }\n }),\n SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface),\n DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }),\n SyntheticDragEvent = createSyntheticEvent(DragEventInterface),\n FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }),\n SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface),\n AnimationEventInterface = assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n }),\n SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface),\n ClipboardEventInterface = assign({}, EventInterface, {\n clipboardData: function (event) {\n return \"clipboardData\" in event\n ? event.clipboardData\n : window.clipboardData;\n }\n }),\n SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface),\n CompositionEventInterface = assign({}, EventInterface, { data: 0 }),\n SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface),\n normalizeKey = {\n Esc: \"Escape\",\n Spacebar: \" \",\n Left: \"ArrowLeft\",\n Up: \"ArrowUp\",\n Right: \"ArrowRight\",\n Down: \"ArrowDown\",\n Del: \"Delete\",\n Win: \"OS\",\n Menu: \"ContextMenu\",\n Apps: \"ContextMenu\",\n Scroll: \"ScrollLock\",\n MozPrintableKey: \"Unidentified\"\n },\n translateToKey = {\n 8: \"Backspace\",\n 9: \"Tab\",\n 12: \"Clear\",\n 13: \"Enter\",\n 16: \"Shift\",\n 17: \"Control\",\n 18: \"Alt\",\n 19: \"Pause\",\n 20: \"CapsLock\",\n 27: \"Escape\",\n 32: \" \",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"ArrowLeft\",\n 38: \"ArrowUp\",\n 39: \"ArrowRight\",\n 40: \"ArrowDown\",\n 45: \"Insert\",\n 46: \"Delete\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"NumLock\",\n 145: \"ScrollLock\",\n 224: \"Meta\"\n },\n modifierKeyToProp = {\n Alt: \"altKey\",\n Control: \"ctrlKey\",\n Meta: \"metaKey\",\n Shift: \"shiftKey\"\n };\nfunction modifierStateGetter(keyArg) {\n var nativeEvent = this.nativeEvent;\n return nativeEvent.getModifierState\n ? nativeEvent.getModifierState(keyArg)\n : (keyArg = modifierKeyToProp[keyArg])\n ? !!nativeEvent[keyArg]\n : !1;\n}\nfunction getEventModifierState() {\n return modifierStateGetter;\n}\nvar KeyboardEventInterface = assign({}, UIEventInterface, {\n key: function (nativeEvent) {\n if (nativeEvent.key) {\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n if (\"Unidentified\" !== key) return key;\n }\n return \"keypress\" === nativeEvent.type\n ? ((nativeEvent = getEventCharCode(nativeEvent)),\n 13 === nativeEvent ? \"Enter\" : String.fromCharCode(nativeEvent))\n : \"keydown\" === nativeEvent.type || \"keyup\" === nativeEvent.type\n ? translateToKey[nativeEvent.keyCode] || \"Unidentified\"\n : \"\";\n },\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\n getModifierState: getEventModifierState,\n charCode: function (event) {\n return \"keypress\" === event.type ? getEventCharCode(event) : 0;\n },\n keyCode: function (event) {\n return \"keydown\" === event.type || \"keyup\" === event.type\n ? event.keyCode\n : 0;\n },\n which: function (event) {\n return \"keypress\" === event.type\n ? getEventCharCode(event)\n : \"keydown\" === event.type || \"keyup\" === event.type\n ? event.keyCode\n : 0;\n }\n }),\n SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface),\n PointerEventInterface = assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n }),\n SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface),\n TouchEventInterface = assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n }),\n SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface),\n TransitionEventInterface = assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n }),\n SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface),\n WheelEventInterface = assign({}, MouseEventInterface, {\n deltaX: function (event) {\n return \"deltaX\" in event\n ? event.deltaX\n : \"wheelDeltaX\" in event\n ? -event.wheelDeltaX\n : 0;\n },\n deltaY: function (event) {\n return \"deltaY\" in event\n ? event.deltaY\n : \"wheelDeltaY\" in event\n ? -event.wheelDeltaY\n : \"wheelDelta\" in event\n ? -event.wheelDelta\n : 0;\n },\n deltaZ: 0,\n deltaMode: 0\n }),\n SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface),\n ToggleEventInterface = assign({}, EventInterface, {\n newState: 0,\n oldState: 0\n }),\n SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface),\n END_KEYCODES = [9, 13, 27, 32],\n canUseCompositionEvent = canUseDOM && \"CompositionEvent\" in window,\n documentMode = null;\ncanUseDOM &&\n \"documentMode\" in document &&\n (documentMode = document.documentMode);\nvar canUseTextInputEvent = canUseDOM && \"TextEvent\" in window && !documentMode,\n useFallbackCompositionData =\n canUseDOM &&\n (!canUseCompositionEvent ||\n (documentMode && 8 < documentMode && 11 >= documentMode)),\n SPACEBAR_CHAR = String.fromCharCode(32),\n hasSpaceKeypress = !1;\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n switch (domEventName) {\n case \"keyup\":\n return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);\n case \"keydown\":\n return 229 !== nativeEvent.keyCode;\n case \"keypress\":\n case \"mousedown\":\n case \"focusout\":\n return !0;\n default:\n return !1;\n }\n}\nfunction getDataFromCustomEvent(nativeEvent) {\n nativeEvent = nativeEvent.detail;\n return \"object\" === typeof nativeEvent && \"data\" in nativeEvent\n ? nativeEvent.data\n : null;\n}\nvar isComposing = !1;\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n switch (domEventName) {\n case \"compositionend\":\n return getDataFromCustomEvent(nativeEvent);\n case \"keypress\":\n if (32 !== nativeEvent.which) return null;\n hasSpaceKeypress = !0;\n return SPACEBAR_CHAR;\n case \"textInput\":\n return (\n (domEventName = nativeEvent.data),\n domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName\n );\n default:\n return null;\n }\n}\nfunction getFallbackBeforeInputChars(domEventName, nativeEvent) {\n if (isComposing)\n return \"compositionend\" === domEventName ||\n (!canUseCompositionEvent &&\n isFallbackCompositionEnd(domEventName, nativeEvent))\n ? ((domEventName = getData()),\n (fallbackText = startText = root = null),\n (isComposing = !1),\n domEventName)\n : null;\n switch (domEventName) {\n case \"paste\":\n return null;\n case \"keypress\":\n if (\n !(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) ||\n (nativeEvent.ctrlKey && nativeEvent.altKey)\n ) {\n if (nativeEvent.char && 1 < nativeEvent.char.length)\n return nativeEvent.char;\n if (nativeEvent.which) return String.fromCharCode(nativeEvent.which);\n }\n return null;\n case \"compositionend\":\n return useFallbackCompositionData && \"ko\" !== nativeEvent.locale\n ? null\n : nativeEvent.data;\n default:\n return null;\n }\n}\nvar supportedInputTypes = {\n color: !0,\n date: !0,\n datetime: !0,\n \"datetime-local\": !0,\n email: !0,\n month: !0,\n number: !0,\n password: !0,\n range: !0,\n search: !0,\n tel: !0,\n text: !0,\n time: !0,\n url: !0,\n week: !0\n};\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return \"input\" === nodeName\n ? !!supportedInputTypes[elem.type]\n : \"textarea\" === nodeName\n ? !0\n : !1;\n}\nfunction createAndAccumulateChangeEvent(\n dispatchQueue,\n inst,\n nativeEvent,\n target\n) {\n restoreTarget\n ? restoreQueue\n ? restoreQueue.push(target)\n : (restoreQueue = [target])\n : (restoreTarget = target);\n inst = accumulateTwoPhaseListeners(inst, \"onChange\");\n 0 < inst.length &&\n ((nativeEvent = new SyntheticEvent(\n \"onChange\",\n \"change\",\n null,\n nativeEvent,\n target\n )),\n dispatchQueue.push({ event: nativeEvent, listeners: inst }));\n}\nvar activeElement$1 = null,\n activeElementInst$1 = null;\nfunction runEventInBatch(dispatchQueue) {\n processDispatchQueue(dispatchQueue, 0);\n}\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance(targetInst);\n if (updateValueIfChanged(targetNode)) return targetInst;\n}\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n if (\"change\" === domEventName) return targetInst;\n}\nvar isInputEventSupported = !1;\nif (canUseDOM) {\n var JSCompiler_inline_result$jscomp$286;\n if (canUseDOM) {\n var isSupported$jscomp$inline_427 = \"oninput\" in document;\n if (!isSupported$jscomp$inline_427) {\n var element$jscomp$inline_428 = document.createElement(\"div\");\n element$jscomp$inline_428.setAttribute(\"oninput\", \"return;\");\n isSupported$jscomp$inline_427 =\n \"function\" === typeof element$jscomp$inline_428.oninput;\n }\n JSCompiler_inline_result$jscomp$286 = isSupported$jscomp$inline_427;\n } else JSCompiler_inline_result$jscomp$286 = !1;\n isInputEventSupported =\n JSCompiler_inline_result$jscomp$286 &&\n (!document.documentMode || 9 < document.documentMode);\n}\nfunction stopWatchingForValueChange() {\n activeElement$1 &&\n (activeElement$1.detachEvent(\"onpropertychange\", handlePropertyChange),\n (activeElementInst$1 = activeElement$1 = null));\n}\nfunction handlePropertyChange(nativeEvent) {\n if (\n \"value\" === nativeEvent.propertyName &&\n getInstIfValueChanged(activeElementInst$1)\n ) {\n var dispatchQueue = [];\n createAndAccumulateChangeEvent(\n dispatchQueue,\n activeElementInst$1,\n nativeEvent,\n getEventTarget(nativeEvent)\n );\n batchedUpdates$1(runEventInBatch, dispatchQueue);\n }\n}\nfunction handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n \"focusin\" === domEventName\n ? (stopWatchingForValueChange(),\n (activeElement$1 = target),\n (activeElementInst$1 = targetInst),\n activeElement$1.attachEvent(\"onpropertychange\", handlePropertyChange))\n : \"focusout\" === domEventName && stopWatchingForValueChange();\n}\nfunction getTargetInstForInputEventPolyfill(domEventName) {\n if (\n \"selectionchange\" === domEventName ||\n \"keyup\" === domEventName ||\n \"keydown\" === domEventName\n )\n return getInstIfValueChanged(activeElementInst$1);\n}\nfunction getTargetInstForClickEvent(domEventName, targetInst) {\n if (\"click\" === domEventName) return getInstIfValueChanged(targetInst);\n}\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n if (\"input\" === domEventName || \"change\" === domEventName)\n return getInstIfValueChanged(targetInst);\n}\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is;\nfunction shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) return !0;\n if (\n \"object\" !== typeof objA ||\n null === objA ||\n \"object\" !== typeof objB ||\n null === objB\n )\n return !1;\n var keysA = Object.keys(objA),\n keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return !1;\n for (keysB = 0; keysB < keysA.length; keysB++) {\n var currentKey = keysA[keysB];\n if (\n !hasOwnProperty.call(objB, currentKey) ||\n !objectIs(objA[currentKey], objB[currentKey])\n )\n return !1;\n }\n return !0;\n}\nfunction getLeafNode(node) {\n for (; node && node.firstChild; ) node = node.firstChild;\n return node;\n}\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n root = 0;\n for (var nodeEnd; node; ) {\n if (3 === node.nodeType) {\n nodeEnd = root + node.textContent.length;\n if (root <= offset && nodeEnd >= offset)\n return { node: node, offset: offset - root };\n root = nodeEnd;\n }\n a: {\n for (; node; ) {\n if (node.nextSibling) {\n node = node.nextSibling;\n break a;\n }\n node = node.parentNode;\n }\n node = void 0;\n }\n node = getLeafNode(node);\n }\n}\nfunction containsNode(outerNode, innerNode) {\n return outerNode && innerNode\n ? outerNode === innerNode\n ? !0\n : outerNode && 3 === outerNode.nodeType\n ? !1\n : innerNode && 3 === innerNode.nodeType\n ? containsNode(outerNode, innerNode.parentNode)\n : \"contains\" in outerNode\n ? outerNode.contains(innerNode)\n : outerNode.compareDocumentPosition\n ? !!(outerNode.compareDocumentPosition(innerNode) & 16)\n : !1\n : !1;\n}\nfunction getActiveElementDeep(containerInfo) {\n containerInfo =\n null != containerInfo &&\n null != containerInfo.ownerDocument &&\n null != containerInfo.ownerDocument.defaultView\n ? containerInfo.ownerDocument.defaultView\n : window;\n for (\n var element = getActiveElement(containerInfo.document);\n element instanceof containerInfo.HTMLIFrameElement;\n\n ) {\n try {\n var JSCompiler_inline_result =\n \"string\" === typeof element.contentWindow.location.href;\n } catch (err) {\n JSCompiler_inline_result = !1;\n }\n if (JSCompiler_inline_result) containerInfo = element.contentWindow;\n else break;\n element = getActiveElement(containerInfo.document);\n }\n return element;\n}\nfunction hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return (\n nodeName &&\n ((\"input\" === nodeName &&\n (\"text\" === elem.type ||\n \"search\" === elem.type ||\n \"tel\" === elem.type ||\n \"url\" === elem.type ||\n \"password\" === elem.type)) ||\n \"textarea\" === nodeName ||\n \"true\" === elem.contentEditable)\n );\n}\nvar skipSelectionChangeEvent =\n canUseDOM && \"documentMode\" in document && 11 >= document.documentMode,\n activeElement = null,\n activeElementInst = null,\n lastSelection = null,\n mouseDown = !1;\nfunction constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n var doc =\n nativeEventTarget.window === nativeEventTarget\n ? nativeEventTarget.document\n : 9 === nativeEventTarget.nodeType\n ? nativeEventTarget\n : nativeEventTarget.ownerDocument;\n mouseDown ||\n null == activeElement ||\n activeElement !== getActiveElement(doc) ||\n ((doc = activeElement),\n \"selectionStart\" in doc && hasSelectionCapabilities(doc)\n ? (doc = { start: doc.selectionStart, end: doc.selectionEnd })\n : ((doc = (\n (doc.ownerDocument && doc.ownerDocument.defaultView) ||\n window\n ).getSelection()),\n (doc = {\n anchorNode: doc.anchorNode,\n anchorOffset: doc.anchorOffset,\n focusNode: doc.focusNode,\n focusOffset: doc.focusOffset\n })),\n (lastSelection && shallowEqual(lastSelection, doc)) ||\n ((lastSelection = doc),\n (doc = accumulateTwoPhaseListeners(activeElementInst, \"onSelect\")),\n 0 < doc.length &&\n ((nativeEvent = new SyntheticEvent(\n \"onSelect\",\n \"select\",\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({ event: nativeEvent, listeners: doc }),\n (nativeEvent.target = activeElement))));\n}\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes[\"Webkit\" + styleProp] = \"webkit\" + eventName;\n prefixes[\"Moz\" + styleProp] = \"moz\" + eventName;\n return prefixes;\n}\nvar vendorPrefixes = {\n animationend: makePrefixMap(\"Animation\", \"AnimationEnd\"),\n animationiteration: makePrefixMap(\"Animation\", \"AnimationIteration\"),\n animationstart: makePrefixMap(\"Animation\", \"AnimationStart\"),\n transitionrun: makePrefixMap(\"Transition\", \"TransitionRun\"),\n transitionstart: makePrefixMap(\"Transition\", \"TransitionStart\"),\n transitioncancel: makePrefixMap(\"Transition\", \"TransitionCancel\"),\n transitionend: makePrefixMap(\"Transition\", \"TransitionEnd\")\n },\n prefixedEventNames = {},\n style = {};\ncanUseDOM &&\n ((style = document.createElement(\"div\").style),\n \"AnimationEvent\" in window ||\n (delete vendorPrefixes.animationend.animation,\n delete vendorPrefixes.animationiteration.animation,\n delete vendorPrefixes.animationstart.animation),\n \"TransitionEvent\" in window ||\n delete vendorPrefixes.transitionend.transition);\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];\n if (!vendorPrefixes[eventName]) return eventName;\n var prefixMap = vendorPrefixes[eventName],\n styleProp;\n for (styleProp in prefixMap)\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)\n return (prefixedEventNames[eventName] = prefixMap[styleProp]);\n return eventName;\n}\nvar ANIMATION_END = getVendorPrefixedEventName(\"animationend\"),\n ANIMATION_ITERATION = getVendorPrefixedEventName(\"animationiteration\"),\n ANIMATION_START = getVendorPrefixedEventName(\"animationstart\"),\n TRANSITION_RUN = getVendorPrefixedEventName(\"transitionrun\"),\n TRANSITION_START = getVendorPrefixedEventName(\"transitionstart\"),\n TRANSITION_CANCEL = getVendorPrefixedEventName(\"transitioncancel\"),\n TRANSITION_END = getVendorPrefixedEventName(\"transitionend\"),\n topLevelEventsToReactNames = new Map(),\n simpleEventPluginEvents =\n \"abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\n \" \"\n );\nsimpleEventPluginEvents.push(\"scrollEnd\");\nfunction registerSimpleEvent(domEventName, reactName) {\n topLevelEventsToReactNames.set(domEventName, reactName);\n registerTwoPhaseEvent(reactName, [domEventName]);\n}\nvar reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n concurrentQueues = [],\n concurrentQueuesIndex = 0,\n concurrentlyUpdatedLanes = 0;\nfunction finishQueueingConcurrentUpdates() {\n for (\n var endIndex = concurrentQueuesIndex,\n i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);\n i < endIndex;\n\n ) {\n var fiber = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var queue = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var update = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var lane = concurrentQueues[i];\n concurrentQueues[i++] = null;\n if (null !== queue && null !== update) {\n var pending = queue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n queue.pending = update;\n }\n 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);\n }\n}\nfunction enqueueUpdate$1(fiber, queue, update, lane) {\n concurrentQueues[concurrentQueuesIndex++] = fiber;\n concurrentQueues[concurrentQueuesIndex++] = queue;\n concurrentQueues[concurrentQueuesIndex++] = update;\n concurrentQueues[concurrentQueuesIndex++] = lane;\n concurrentlyUpdatedLanes |= lane;\n fiber.lanes |= lane;\n fiber = fiber.alternate;\n null !== fiber && (fiber.lanes |= lane);\n}\nfunction enqueueConcurrentHookUpdate(fiber, queue, update, lane) {\n enqueueUpdate$1(fiber, queue, update, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction enqueueConcurrentRenderForLane(fiber, lane) {\n enqueueUpdate$1(fiber, null, null, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {\n sourceFiber.lanes |= lane;\n var alternate = sourceFiber.alternate;\n null !== alternate && (alternate.lanes |= lane);\n for (var isHidden = !1, parent = sourceFiber.return; null !== parent; )\n (parent.childLanes |= lane),\n (alternate = parent.alternate),\n null !== alternate && (alternate.childLanes |= lane),\n 22 === parent.tag &&\n ((sourceFiber = parent.stateNode),\n null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)),\n (sourceFiber = parent),\n (parent = parent.return);\n return 3 === sourceFiber.tag\n ? ((parent = sourceFiber.stateNode),\n isHidden &&\n null !== update &&\n ((isHidden = 31 - clz32(lane)),\n (sourceFiber = parent.hiddenUpdates),\n (alternate = sourceFiber[isHidden]),\n null === alternate\n ? (sourceFiber[isHidden] = [update])\n : alternate.push(update),\n (update.lane = lane | 536870912)),\n parent)\n : null;\n}\nfunction getRootForUpdatedFiber(sourceFiber) {\n if (50 < nestedUpdateCount)\n throw (\n ((nestedUpdateCount = 0),\n (rootWithNestedUpdates = null),\n Error(formatProdErrorMessage(185)))\n );\n for (var parent = sourceFiber.return; null !== parent; )\n (sourceFiber = parent), (parent = sourceFiber.return);\n return 3 === sourceFiber.tag ? sourceFiber.stateNode : null;\n}\nvar emptyContextObject = {};\nfunction FiberNode(tag, pendingProps, key, mode) {\n this.tag = tag;\n this.key = key;\n this.sibling =\n this.child =\n this.return =\n this.stateNode =\n this.type =\n this.elementType =\n null;\n this.index = 0;\n this.refCleanup = this.ref = null;\n this.pendingProps = pendingProps;\n this.dependencies =\n this.memoizedState =\n this.updateQueue =\n this.memoizedProps =\n null;\n this.mode = mode;\n this.subtreeFlags = this.flags = 0;\n this.deletions = null;\n this.childLanes = this.lanes = 0;\n this.alternate = null;\n}\nfunction createFiberImplClass(tag, pendingProps, key, mode) {\n return new FiberNode(tag, pendingProps, key, mode);\n}\nfunction shouldConstruct(Component) {\n Component = Component.prototype;\n return !(!Component || !Component.isReactComponent);\n}\nfunction createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n null === workInProgress\n ? ((workInProgress = createFiberImplClass(\n current.tag,\n pendingProps,\n current.key,\n current.mode\n )),\n (workInProgress.elementType = current.elementType),\n (workInProgress.type = current.type),\n (workInProgress.stateNode = current.stateNode),\n (workInProgress.alternate = current),\n (current.alternate = workInProgress))\n : ((workInProgress.pendingProps = pendingProps),\n (workInProgress.type = current.type),\n (workInProgress.flags = 0),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.deletions = null));\n workInProgress.flags = current.flags & 65011712;\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n pendingProps = current.dependencies;\n workInProgress.dependencies =\n null === pendingProps\n ? null\n : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext };\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n workInProgress.refCleanup = current.refCleanup;\n return workInProgress;\n}\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n workInProgress.flags &= 65011714;\n var current = workInProgress.alternate;\n null === current\n ? ((workInProgress.childLanes = 0),\n (workInProgress.lanes = renderLanes),\n (workInProgress.child = null),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.memoizedProps = null),\n (workInProgress.memoizedState = null),\n (workInProgress.updateQueue = null),\n (workInProgress.dependencies = null),\n (workInProgress.stateNode = null))\n : ((workInProgress.childLanes = current.childLanes),\n (workInProgress.lanes = current.lanes),\n (workInProgress.child = current.child),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.deletions = null),\n (workInProgress.memoizedProps = current.memoizedProps),\n (workInProgress.memoizedState = current.memoizedState),\n (workInProgress.updateQueue = current.updateQueue),\n (workInProgress.type = current.type),\n (renderLanes = current.dependencies),\n (workInProgress.dependencies =\n null === renderLanes\n ? null\n : {\n lanes: renderLanes.lanes,\n firstContext: renderLanes.firstContext\n }));\n return workInProgress;\n}\nfunction createFiberFromTypeAndProps(\n type,\n key,\n pendingProps,\n owner,\n mode,\n lanes\n) {\n var fiberTag = 0;\n owner = type;\n if (\"function\" === typeof type) shouldConstruct(type) && (fiberTag = 1);\n else if (\"string\" === typeof type)\n fiberTag = isHostHoistableType(\n type,\n pendingProps,\n contextStackCursor.current\n )\n ? 26\n : \"html\" === type || \"head\" === type || \"body\" === type\n ? 27\n : 5;\n else\n a: switch (type) {\n case REACT_ACTIVITY_TYPE:\n return (\n (type = createFiberImplClass(31, pendingProps, key, mode)),\n (type.elementType = REACT_ACTIVITY_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n case REACT_STRICT_MODE_TYPE:\n fiberTag = 8;\n mode |= 24;\n break;\n case REACT_PROFILER_TYPE:\n return (\n (type = createFiberImplClass(12, pendingProps, key, mode | 2)),\n (type.elementType = REACT_PROFILER_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_SUSPENSE_TYPE:\n return (\n (type = createFiberImplClass(13, pendingProps, key, mode)),\n (type.elementType = REACT_SUSPENSE_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_SUSPENSE_LIST_TYPE:\n return (\n (type = createFiberImplClass(19, pendingProps, key, mode)),\n (type.elementType = REACT_SUSPENSE_LIST_TYPE),\n (type.lanes = lanes),\n type\n );\n default:\n if (\"object\" === typeof type && null !== type)\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n fiberTag = 10;\n break a;\n case REACT_CONSUMER_TYPE:\n fiberTag = 9;\n break a;\n case REACT_FORWARD_REF_TYPE:\n fiberTag = 11;\n break a;\n case REACT_MEMO_TYPE:\n fiberTag = 14;\n break a;\n case REACT_LAZY_TYPE:\n fiberTag = 16;\n owner = null;\n break a;\n }\n fiberTag = 29;\n pendingProps = Error(\n formatProdErrorMessage(130, null === type ? \"null\" : typeof type, \"\")\n );\n owner = null;\n }\n key = createFiberImplClass(fiberTag, pendingProps, key, mode);\n key.elementType = type;\n key.type = owner;\n key.lanes = lanes;\n return key;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n elements = createFiberImplClass(7, elements, key, mode);\n elements.lanes = lanes;\n return elements;\n}\nfunction createFiberFromText(content, mode, lanes) {\n content = createFiberImplClass(6, content, null, mode);\n content.lanes = lanes;\n return content;\n}\nfunction createFiberFromDehydratedFragment(dehydratedNode) {\n var fiber = createFiberImplClass(18, null, null, 0);\n fiber.stateNode = dehydratedNode;\n return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n mode = createFiberImplClass(\n 4,\n null !== portal.children ? portal.children : [],\n portal.key,\n mode\n );\n mode.lanes = lanes;\n mode.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n implementation: portal.implementation\n };\n return mode;\n}\nvar CapturedStacks = new WeakMap();\nfunction createCapturedValueAtFiber(value, source) {\n if (\"object\" === typeof value && null !== value) {\n var existing = CapturedStacks.get(value);\n if (void 0 !== existing) return existing;\n source = {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source)\n };\n CapturedStacks.set(value, source);\n return source;\n }\n return {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source)\n };\n}\nvar forkStack = [],\n forkStackIndex = 0,\n treeForkProvider = null,\n treeForkCount = 0,\n idStack = [],\n idStackIndex = 0,\n treeContextProvider = null,\n treeContextId = 1,\n treeContextOverflow = \"\";\nfunction pushTreeFork(workInProgress, totalChildren) {\n forkStack[forkStackIndex++] = treeForkCount;\n forkStack[forkStackIndex++] = treeForkProvider;\n treeForkProvider = workInProgress;\n treeForkCount = totalChildren;\n}\nfunction pushTreeId(workInProgress, totalChildren, index) {\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextProvider = workInProgress;\n var baseIdWithLeadingBit = treeContextId;\n workInProgress = treeContextOverflow;\n var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;\n baseIdWithLeadingBit &= ~(1 << baseLength);\n index += 1;\n var length = 32 - clz32(totalChildren) + baseLength;\n if (30 < length) {\n var numberOfOverflowBits = baseLength - (baseLength % 5);\n length = (\n baseIdWithLeadingBit &\n ((1 << numberOfOverflowBits) - 1)\n ).toString(32);\n baseIdWithLeadingBit >>= numberOfOverflowBits;\n baseLength -= numberOfOverflowBits;\n treeContextId =\n (1 << (32 - clz32(totalChildren) + baseLength)) |\n (index << baseLength) |\n baseIdWithLeadingBit;\n treeContextOverflow = length + workInProgress;\n } else\n (treeContextId =\n (1 << length) | (index << baseLength) | baseIdWithLeadingBit),\n (treeContextOverflow = workInProgress);\n}\nfunction pushMaterializedTreeId(workInProgress) {\n null !== workInProgress.return &&\n (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0));\n}\nfunction popTreeContext(workInProgress) {\n for (; workInProgress === treeForkProvider; )\n (treeForkProvider = forkStack[--forkStackIndex]),\n (forkStack[forkStackIndex] = null),\n (treeForkCount = forkStack[--forkStackIndex]),\n (forkStack[forkStackIndex] = null);\n for (; workInProgress === treeContextProvider; )\n (treeContextProvider = idStack[--idStackIndex]),\n (idStack[idStackIndex] = null),\n (treeContextOverflow = idStack[--idStackIndex]),\n (idStack[idStackIndex] = null),\n (treeContextId = idStack[--idStackIndex]),\n (idStack[idStackIndex] = null);\n}\nfunction restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextId = suspendedContext.id;\n treeContextOverflow = suspendedContext.overflow;\n treeContextProvider = workInProgress;\n}\nvar hydrationParentFiber = null,\n nextHydratableInstance = null,\n isHydrating = !1,\n hydrationErrors = null,\n rootOrSingletonContext = !1,\n HydrationMismatchException = Error(formatProdErrorMessage(519));\nfunction throwOnHydrationMismatch(fiber) {\n var error = Error(\n formatProdErrorMessage(\n 418,\n 1 < arguments.length && void 0 !== arguments[1] && arguments[1]\n ? \"text\"\n : \"HTML\",\n \"\"\n )\n );\n queueHydrationError(createCapturedValueAtFiber(error, fiber));\n throw HydrationMismatchException;\n}\nfunction prepareToHydrateHostInstance(fiber) {\n var instance = fiber.stateNode,\n type = fiber.type,\n props = fiber.memoizedProps;\n instance[internalInstanceKey] = fiber;\n instance[internalPropsKey] = props;\n switch (type) {\n case \"dialog\":\n listenToNonDelegatedEvent(\"cancel\", instance);\n listenToNonDelegatedEvent(\"close\", instance);\n break;\n case \"iframe\":\n case \"object\":\n case \"embed\":\n listenToNonDelegatedEvent(\"load\", instance);\n break;\n case \"video\":\n case \"audio\":\n for (type = 0; type < mediaEventTypes.length; type++)\n listenToNonDelegatedEvent(mediaEventTypes[type], instance);\n break;\n case \"source\":\n listenToNonDelegatedEvent(\"error\", instance);\n break;\n case \"img\":\n case \"image\":\n case \"link\":\n listenToNonDelegatedEvent(\"error\", instance);\n listenToNonDelegatedEvent(\"load\", instance);\n break;\n case \"details\":\n listenToNonDelegatedEvent(\"toggle\", instance);\n break;\n case \"input\":\n listenToNonDelegatedEvent(\"invalid\", instance);\n initInput(\n instance,\n props.value,\n props.defaultValue,\n props.checked,\n props.defaultChecked,\n props.type,\n props.name,\n !0\n );\n break;\n case \"select\":\n listenToNonDelegatedEvent(\"invalid\", instance);\n break;\n case \"textarea\":\n listenToNonDelegatedEvent(\"invalid\", instance),\n initTextarea(instance, props.value, props.defaultValue, props.children);\n }\n type = props.children;\n (\"string\" !== typeof type &&\n \"number\" !== typeof type &&\n \"bigint\" !== typeof type) ||\n instance.textContent === \"\" + type ||\n !0 === props.suppressHydrationWarning ||\n checkForUnmatchedText(instance.textContent, type)\n ? (null != props.popover &&\n (listenToNonDelegatedEvent(\"beforetoggle\", instance),\n listenToNonDelegatedEvent(\"toggle\", instance)),\n null != props.onScroll && listenToNonDelegatedEvent(\"scroll\", instance),\n null != props.onScrollEnd &&\n listenToNonDelegatedEvent(\"scrollend\", instance),\n null != props.onClick && (instance.onclick = noop$1),\n (instance = !0))\n : (instance = !1);\n instance || throwOnHydrationMismatch(fiber, !0);\n}\nfunction popToNextHostParent(fiber) {\n for (hydrationParentFiber = fiber.return; hydrationParentFiber; )\n switch (hydrationParentFiber.tag) {\n case 5:\n case 31:\n case 13:\n rootOrSingletonContext = !1;\n return;\n case 27:\n case 3:\n rootOrSingletonContext = !0;\n return;\n default:\n hydrationParentFiber = hydrationParentFiber.return;\n }\n}\nfunction popHydrationState(fiber) {\n if (fiber !== hydrationParentFiber) return !1;\n if (!isHydrating) return popToNextHostParent(fiber), (isHydrating = !0), !1;\n var tag = fiber.tag,\n JSCompiler_temp;\n if ((JSCompiler_temp = 3 !== tag && 27 !== tag)) {\n if ((JSCompiler_temp = 5 === tag))\n (JSCompiler_temp = fiber.type),\n (JSCompiler_temp =\n !(\"form\" !== JSCompiler_temp && \"button\" !== JSCompiler_temp) ||\n shouldSetTextContent(fiber.type, fiber.memoizedProps));\n JSCompiler_temp = !JSCompiler_temp;\n }\n JSCompiler_temp && nextHydratableInstance && throwOnHydrationMismatch(fiber);\n popToNextHostParent(fiber);\n if (13 === tag) {\n fiber = fiber.memoizedState;\n fiber = null !== fiber ? fiber.dehydrated : null;\n if (!fiber) throw Error(formatProdErrorMessage(317));\n nextHydratableInstance =\n getNextHydratableInstanceAfterHydrationBoundary(fiber);\n } else if (31 === tag) {\n fiber = fiber.memoizedState;\n fiber = null !== fiber ? fiber.dehydrated : null;\n if (!fiber) throw Error(formatProdErrorMessage(317));\n nextHydratableInstance =\n getNextHydratableInstanceAfterHydrationBoundary(fiber);\n } else\n 27 === tag\n ? ((tag = nextHydratableInstance),\n isSingletonScope(fiber.type)\n ? ((fiber = previousHydratableOnEnteringScopedSingleton),\n (previousHydratableOnEnteringScopedSingleton = null),\n (nextHydratableInstance = fiber))\n : (nextHydratableInstance = tag))\n : (nextHydratableInstance = hydrationParentFiber\n ? getNextHydratable(fiber.stateNode.nextSibling)\n : null);\n return !0;\n}\nfunction resetHydrationState() {\n nextHydratableInstance = hydrationParentFiber = null;\n isHydrating = !1;\n}\nfunction upgradeHydrationErrorsToRecoverable() {\n var queuedErrors = hydrationErrors;\n null !== queuedErrors &&\n (null === workInProgressRootRecoverableErrors\n ? (workInProgressRootRecoverableErrors = queuedErrors)\n : workInProgressRootRecoverableErrors.push.apply(\n workInProgressRootRecoverableErrors,\n queuedErrors\n ),\n (hydrationErrors = null));\n return queuedErrors;\n}\nfunction queueHydrationError(error) {\n null === hydrationErrors\n ? (hydrationErrors = [error])\n : hydrationErrors.push(error);\n}\nvar valueCursor = createCursor(null),\n currentlyRenderingFiber$1 = null,\n lastContextDependency = null;\nfunction pushProvider(providerFiber, context, nextValue) {\n push(valueCursor, context._currentValue);\n context._currentValue = nextValue;\n}\nfunction popProvider(context) {\n context._currentValue = valueCursor.current;\n pop(valueCursor);\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n for (; null !== parent; ) {\n var alternate = parent.alternate;\n (parent.childLanes & renderLanes) !== renderLanes\n ? ((parent.childLanes |= renderLanes),\n null !== alternate && (alternate.childLanes |= renderLanes))\n : null !== alternate &&\n (alternate.childLanes & renderLanes) !== renderLanes &&\n (alternate.childLanes |= renderLanes);\n if (parent === propagationRoot) break;\n parent = parent.return;\n }\n}\nfunction propagateContextChanges(\n workInProgress,\n contexts,\n renderLanes,\n forcePropagateEntireTree\n) {\n var fiber = workInProgress.child;\n null !== fiber && (fiber.return = workInProgress);\n for (; null !== fiber; ) {\n var list = fiber.dependencies;\n if (null !== list) {\n var nextFiber = fiber.child;\n list = list.firstContext;\n a: for (; null !== list; ) {\n var dependency = list;\n list = fiber;\n for (var i = 0; i < contexts.length; i++)\n if (dependency.context === contexts[i]) {\n list.lanes |= renderLanes;\n dependency = list.alternate;\n null !== dependency && (dependency.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(\n list.return,\n renderLanes,\n workInProgress\n );\n forcePropagateEntireTree || (nextFiber = null);\n break a;\n }\n list = dependency.next;\n }\n } else if (18 === fiber.tag) {\n nextFiber = fiber.return;\n if (null === nextFiber) throw Error(formatProdErrorMessage(341));\n nextFiber.lanes |= renderLanes;\n list = nextFiber.alternate;\n null !== list && (list.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress);\n nextFiber = null;\n } else nextFiber = fiber.child;\n if (null !== nextFiber) nextFiber.return = fiber;\n else\n for (nextFiber = fiber; null !== nextFiber; ) {\n if (nextFiber === workInProgress) {\n nextFiber = null;\n break;\n }\n fiber = nextFiber.sibling;\n if (null !== fiber) {\n fiber.return = nextFiber.return;\n nextFiber = fiber;\n break;\n }\n nextFiber = nextFiber.return;\n }\n fiber = nextFiber;\n }\n}\nfunction propagateParentContextChanges(\n current,\n workInProgress,\n renderLanes,\n forcePropagateEntireTree\n) {\n current = null;\n for (\n var parent = workInProgress, isInsidePropagationBailout = !1;\n null !== parent;\n\n ) {\n if (!isInsidePropagationBailout)\n if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0;\n else if (0 !== (parent.flags & 262144)) break;\n if (10 === parent.tag) {\n var currentParent = parent.alternate;\n if (null === currentParent) throw Error(formatProdErrorMessage(387));\n currentParent = currentParent.memoizedProps;\n if (null !== currentParent) {\n var context = parent.type;\n objectIs(parent.pendingProps.value, currentParent.value) ||\n (null !== current ? current.push(context) : (current = [context]));\n }\n } else if (parent === hostTransitionProviderCursor.current) {\n currentParent = parent.alternate;\n if (null === currentParent) throw Error(formatProdErrorMessage(387));\n currentParent.memoizedState.memoizedState !==\n parent.memoizedState.memoizedState &&\n (null !== current\n ? current.push(HostTransitionContext)\n : (current = [HostTransitionContext]));\n }\n parent = parent.return;\n }\n null !== current &&\n propagateContextChanges(\n workInProgress,\n current,\n renderLanes,\n forcePropagateEntireTree\n );\n workInProgress.flags |= 262144;\n}\nfunction checkIfContextChanged(currentDependencies) {\n for (\n currentDependencies = currentDependencies.firstContext;\n null !== currentDependencies;\n\n ) {\n if (\n !objectIs(\n currentDependencies.context._currentValue,\n currentDependencies.memoizedValue\n )\n )\n return !0;\n currentDependencies = currentDependencies.next;\n }\n return !1;\n}\nfunction prepareToReadContext(workInProgress) {\n currentlyRenderingFiber$1 = workInProgress;\n lastContextDependency = null;\n workInProgress = workInProgress.dependencies;\n null !== workInProgress && (workInProgress.firstContext = null);\n}\nfunction readContext(context) {\n return readContextForConsumer(currentlyRenderingFiber$1, context);\n}\nfunction readContextDuringReconciliation(consumer, context) {\n null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);\n return readContextForConsumer(consumer, context);\n}\nfunction readContextForConsumer(consumer, context) {\n var value = context._currentValue;\n context = { context: context, memoizedValue: value, next: null };\n if (null === lastContextDependency) {\n if (null === consumer) throw Error(formatProdErrorMessage(308));\n lastContextDependency = context;\n consumer.dependencies = { lanes: 0, firstContext: context };\n consumer.flags |= 524288;\n } else lastContextDependency = lastContextDependency.next = context;\n return value;\n}\nvar AbortControllerLocal =\n \"undefined\" !== typeof AbortController\n ? AbortController\n : function () {\n var listeners = [],\n signal = (this.signal = {\n aborted: !1,\n addEventListener: function (type, listener) {\n listeners.push(listener);\n }\n });\n this.abort = function () {\n signal.aborted = !0;\n listeners.forEach(function (listener) {\n return listener();\n });\n };\n },\n scheduleCallback$2 = Scheduler.unstable_scheduleCallback,\n NormalPriority = Scheduler.unstable_NormalPriority,\n CacheContext = {\n $$typeof: REACT_CONTEXT_TYPE,\n Consumer: null,\n Provider: null,\n _currentValue: null,\n _currentValue2: null,\n _threadCount: 0\n };\nfunction createCache() {\n return {\n controller: new AbortControllerLocal(),\n data: new Map(),\n refCount: 0\n };\n}\nfunction releaseCache(cache) {\n cache.refCount--;\n 0 === cache.refCount &&\n scheduleCallback$2(NormalPriority, function () {\n cache.controller.abort();\n });\n}\nvar currentEntangledListeners = null,\n currentEntangledPendingCount = 0,\n currentEntangledLane = 0,\n currentEntangledActionThenable = null;\nfunction entangleAsyncAction(transition, thenable) {\n if (null === currentEntangledListeners) {\n var entangledListeners = (currentEntangledListeners = []);\n currentEntangledPendingCount = 0;\n currentEntangledLane = requestTransitionLane();\n currentEntangledActionThenable = {\n status: \"pending\",\n value: void 0,\n then: function (resolve) {\n entangledListeners.push(resolve);\n }\n };\n }\n currentEntangledPendingCount++;\n thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);\n return thenable;\n}\nfunction pingEngtangledActionScope() {\n if (\n 0 === --currentEntangledPendingCount &&\n null !== currentEntangledListeners\n ) {\n null !== currentEntangledActionThenable &&\n (currentEntangledActionThenable.status = \"fulfilled\");\n var listeners = currentEntangledListeners;\n currentEntangledListeners = null;\n currentEntangledLane = 0;\n currentEntangledActionThenable = null;\n for (var i = 0; i < listeners.length; i++) (0, listeners[i])();\n }\n}\nfunction chainThenableValue(thenable, result) {\n var listeners = [],\n thenableWithOverride = {\n status: \"pending\",\n value: null,\n reason: null,\n then: function (resolve) {\n listeners.push(resolve);\n }\n };\n thenable.then(\n function () {\n thenableWithOverride.status = \"fulfilled\";\n thenableWithOverride.value = result;\n for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);\n },\n function (error) {\n thenableWithOverride.status = \"rejected\";\n thenableWithOverride.reason = error;\n for (error = 0; error < listeners.length; error++)\n (0, listeners[error])(void 0);\n }\n );\n return thenableWithOverride;\n}\nvar prevOnStartTransitionFinish = ReactSharedInternals.S;\nReactSharedInternals.S = function (transition, returnValue) {\n globalMostRecentTransitionTime = now();\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n entangleAsyncAction(transition, returnValue);\n null !== prevOnStartTransitionFinish &&\n prevOnStartTransitionFinish(transition, returnValue);\n};\nvar resumedCache = createCursor(null);\nfunction peekCacheFromPool() {\n var cacheResumedFromPreviousRender = resumedCache.current;\n return null !== cacheResumedFromPreviousRender\n ? cacheResumedFromPreviousRender\n : workInProgressRoot.pooledCache;\n}\nfunction pushTransition(offscreenWorkInProgress, prevCachePool) {\n null === prevCachePool\n ? push(resumedCache, resumedCache.current)\n : push(resumedCache, prevCachePool.pool);\n}\nfunction getSuspendedCache() {\n var cacheFromPool = peekCacheFromPool();\n return null === cacheFromPool\n ? null\n : { parent: CacheContext._currentValue, pool: cacheFromPool };\n}\nvar SuspenseException = Error(formatProdErrorMessage(460)),\n SuspenseyCommitException = Error(formatProdErrorMessage(474)),\n SuspenseActionException = Error(formatProdErrorMessage(542)),\n noopSuspenseyCommitThenable = { then: function () {} };\nfunction isThenableResolved(thenable) {\n thenable = thenable.status;\n return \"fulfilled\" === thenable || \"rejected\" === thenable;\n}\nfunction trackUsedThenable(thenableState, thenable, index) {\n index = thenableState[index];\n void 0 === index\n ? thenableState.push(thenable)\n : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index));\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw (\n ((thenableState = thenable.reason),\n checkIfUseWrappedInAsyncCatch(thenableState),\n thenableState)\n );\n default:\n if (\"string\" === typeof thenable.status) thenable.then(noop$1, noop$1);\n else {\n thenableState = workInProgressRoot;\n if (null !== thenableState && 100 < thenableState.shellSuspendCounter)\n throw Error(formatProdErrorMessage(482));\n thenableState = thenable;\n thenableState.status = \"pending\";\n thenableState.then(\n function (fulfilledValue) {\n if (\"pending\" === thenable.status) {\n var fulfilledThenable = thenable;\n fulfilledThenable.status = \"fulfilled\";\n fulfilledThenable.value = fulfilledValue;\n }\n },\n function (error) {\n if (\"pending\" === thenable.status) {\n var rejectedThenable = thenable;\n rejectedThenable.status = \"rejected\";\n rejectedThenable.reason = error;\n }\n }\n );\n }\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw (\n ((thenableState = thenable.reason),\n checkIfUseWrappedInAsyncCatch(thenableState),\n thenableState)\n );\n }\n suspendedThenable = thenable;\n throw SuspenseException;\n }\n}\nfunction resolveLazy(lazyType) {\n try {\n var init = lazyType._init;\n return init(lazyType._payload);\n } catch (x) {\n if (null !== x && \"object\" === typeof x && \"function\" === typeof x.then)\n throw ((suspendedThenable = x), SuspenseException);\n throw x;\n }\n}\nvar suspendedThenable = null;\nfunction getSuspendedThenable() {\n if (null === suspendedThenable) throw Error(formatProdErrorMessage(459));\n var thenable = suspendedThenable;\n suspendedThenable = null;\n return thenable;\n}\nfunction checkIfUseWrappedInAsyncCatch(rejectedReason) {\n if (\n rejectedReason === SuspenseException ||\n rejectedReason === SuspenseActionException\n )\n throw Error(formatProdErrorMessage(483));\n}\nvar thenableState$1 = null,\n thenableIndexCounter$1 = 0;\nfunction unwrapThenable(thenable) {\n var index = thenableIndexCounter$1;\n thenableIndexCounter$1 += 1;\n null === thenableState$1 && (thenableState$1 = []);\n return trackUsedThenable(thenableState$1, thenable, index);\n}\nfunction coerceRef(workInProgress, element) {\n element = element.props.ref;\n workInProgress.ref = void 0 !== element ? element : null;\n}\nfunction throwOnInvalidObjectTypeImpl(returnFiber, newChild) {\n if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)\n throw Error(formatProdErrorMessage(525));\n returnFiber = Object.prototype.toString.call(newChild);\n throw Error(\n formatProdErrorMessage(\n 31,\n \"[object Object]\" === returnFiber\n ? \"object with keys {\" + Object.keys(newChild).join(\", \") + \"}\"\n : returnFiber\n )\n );\n}\nfunction createChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (shouldTrackSideEffects) {\n var deletions = returnFiber.deletions;\n null === deletions\n ? ((returnFiber.deletions = [childToDelete]), (returnFiber.flags |= 16))\n : deletions.push(childToDelete);\n }\n }\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) return null;\n for (; null !== currentFirstChild; )\n deleteChild(returnFiber, currentFirstChild),\n (currentFirstChild = currentFirstChild.sibling);\n return null;\n }\n function mapRemainingChildren(currentFirstChild) {\n for (var existingChildren = new Map(); null !== currentFirstChild; )\n null !== currentFirstChild.key\n ? existingChildren.set(currentFirstChild.key, currentFirstChild)\n : existingChildren.set(currentFirstChild.index, currentFirstChild),\n (currentFirstChild = currentFirstChild.sibling);\n return existingChildren;\n }\n function useFiber(fiber, pendingProps) {\n fiber = createWorkInProgress(fiber, pendingProps);\n fiber.index = 0;\n fiber.sibling = null;\n return fiber;\n }\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects)\n return (newFiber.flags |= 1048576), lastPlacedIndex;\n newIndex = newFiber.alternate;\n if (null !== newIndex)\n return (\n (newIndex = newIndex.index),\n newIndex < lastPlacedIndex\n ? ((newFiber.flags |= 67108866), lastPlacedIndex)\n : newIndex\n );\n newFiber.flags |= 67108866;\n return lastPlacedIndex;\n }\n function placeSingleChild(newFiber) {\n shouldTrackSideEffects &&\n null === newFiber.alternate &&\n (newFiber.flags |= 67108866);\n return newFiber;\n }\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (null === current || 6 !== current.tag)\n return (\n (current = createFiberFromText(textContent, returnFiber.mode, lanes)),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, textContent);\n current.return = returnFiber;\n return current;\n }\n function updateElement(returnFiber, current, element, lanes) {\n var elementType = element.type;\n if (elementType === REACT_FRAGMENT_TYPE)\n return updateFragment(\n returnFiber,\n current,\n element.props.children,\n lanes,\n element.key\n );\n if (\n null !== current &&\n (current.elementType === elementType ||\n (\"object\" === typeof elementType &&\n null !== elementType &&\n elementType.$$typeof === REACT_LAZY_TYPE &&\n resolveLazy(elementType) === current.type))\n )\n return (\n (current = useFiber(current, element.props)),\n coerceRef(current, element),\n (current.return = returnFiber),\n current\n );\n current = createFiberFromTypeAndProps(\n element.type,\n element.key,\n element.props,\n null,\n returnFiber.mode,\n lanes\n );\n coerceRef(current, element);\n current.return = returnFiber;\n return current;\n }\n function updatePortal(returnFiber, current, portal, lanes) {\n if (\n null === current ||\n 4 !== current.tag ||\n current.stateNode.containerInfo !== portal.containerInfo ||\n current.stateNode.implementation !== portal.implementation\n )\n return (\n (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, portal.children || []);\n current.return = returnFiber;\n return current;\n }\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (null === current || 7 !== current.tag)\n return (\n (current = createFiberFromFragment(\n fragment,\n returnFiber.mode,\n lanes,\n key\n )),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, fragment);\n current.return = returnFiber;\n return current;\n }\n function createChild(returnFiber, newChild, lanes) {\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n )\n return (\n (newChild = createFiberFromText(\n \"\" + newChild,\n returnFiber.mode,\n lanes\n )),\n (newChild.return = returnFiber),\n newChild\n );\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return (\n (lanes = createFiberFromTypeAndProps(\n newChild.type,\n newChild.key,\n newChild.props,\n null,\n returnFiber.mode,\n lanes\n )),\n coerceRef(lanes, newChild),\n (lanes.return = returnFiber),\n lanes\n );\n case REACT_PORTAL_TYPE:\n return (\n (newChild = createFiberFromPortal(\n newChild,\n returnFiber.mode,\n lanes\n )),\n (newChild.return = returnFiber),\n newChild\n );\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n createChild(returnFiber, newChild, lanes)\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return (\n (newChild = createFiberFromFragment(\n newChild,\n returnFiber.mode,\n lanes,\n null\n )),\n (newChild.return = returnFiber),\n newChild\n );\n if (\"function\" === typeof newChild.then)\n return createChild(returnFiber, unwrapThenable(newChild), lanes);\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return createChild(\n returnFiber,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n var key = null !== oldFiber ? oldFiber.key : null;\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n )\n return null !== key\n ? null\n : updateTextNode(returnFiber, oldFiber, \"\" + newChild, lanes);\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return newChild.key === key\n ? updateElement(returnFiber, oldFiber, newChild, lanes)\n : null;\n case REACT_PORTAL_TYPE:\n return newChild.key === key\n ? updatePortal(returnFiber, oldFiber, newChild, lanes)\n : null;\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n updateSlot(returnFiber, oldFiber, newChild, lanes)\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return null !== key\n ? null\n : updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n if (\"function\" === typeof newChild.then)\n return updateSlot(\n returnFiber,\n oldFiber,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return updateSlot(\n returnFiber,\n oldFiber,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return null;\n }\n function updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChild,\n lanes\n ) {\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n )\n return (\n (existingChildren = existingChildren.get(newIdx) || null),\n updateTextNode(returnFiber, existingChildren, \"\" + newChild, lanes)\n );\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return (\n (existingChildren =\n existingChildren.get(\n null === newChild.key ? newIdx : newChild.key\n ) || null),\n updateElement(returnFiber, existingChildren, newChild, lanes)\n );\n case REACT_PORTAL_TYPE:\n return (\n (existingChildren =\n existingChildren.get(\n null === newChild.key ? newIdx : newChild.key\n ) || null),\n updatePortal(returnFiber, existingChildren, newChild, lanes)\n );\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChild,\n lanes\n )\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return (\n (existingChildren = existingChildren.get(newIdx) || null),\n updateFragment(returnFiber, existingChildren, newChild, lanes, null)\n );\n if (\"function\" === typeof newChild.then)\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return null;\n }\n function reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChildren,\n lanes\n ) {\n for (\n var resultingFirstChild = null,\n previousNewFiber = null,\n oldFiber = currentFirstChild,\n newIdx = (currentFirstChild = 0),\n nextOldFiber = null;\n null !== oldFiber && newIdx < newChildren.length;\n newIdx++\n ) {\n oldFiber.index > newIdx\n ? ((nextOldFiber = oldFiber), (oldFiber = null))\n : (nextOldFiber = oldFiber.sibling);\n var newFiber = updateSlot(\n returnFiber,\n oldFiber,\n newChildren[newIdx],\n lanes\n );\n if (null === newFiber) {\n null === oldFiber && (oldFiber = nextOldFiber);\n break;\n }\n shouldTrackSideEffects &&\n oldFiber &&\n null === newFiber.alternate &&\n deleteChild(returnFiber, oldFiber);\n currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n null === previousNewFiber\n ? (resultingFirstChild = newFiber)\n : (previousNewFiber.sibling = newFiber);\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (newIdx === newChildren.length)\n return (\n deleteRemainingChildren(returnFiber, oldFiber),\n isHydrating && pushTreeFork(returnFiber, newIdx),\n resultingFirstChild\n );\n if (null === oldFiber) {\n for (; newIdx < newChildren.length; newIdx++)\n (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),\n null !== oldFiber &&\n ((currentFirstChild = placeChild(\n oldFiber,\n currentFirstChild,\n newIdx\n )),\n null === previousNewFiber\n ? (resultingFirstChild = oldFiber)\n : (previousNewFiber.sibling = oldFiber),\n (previousNewFiber = oldFiber));\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n for (\n oldFiber = mapRemainingChildren(oldFiber);\n newIdx < newChildren.length;\n newIdx++\n )\n (nextOldFiber = updateFromMap(\n oldFiber,\n returnFiber,\n newIdx,\n newChildren[newIdx],\n lanes\n )),\n null !== nextOldFiber &&\n (shouldTrackSideEffects &&\n null !== nextOldFiber.alternate &&\n oldFiber.delete(\n null === nextOldFiber.key ? newIdx : nextOldFiber.key\n ),\n (currentFirstChild = placeChild(\n nextOldFiber,\n currentFirstChild,\n newIdx\n )),\n null === previousNewFiber\n ? (resultingFirstChild = nextOldFiber)\n : (previousNewFiber.sibling = nextOldFiber),\n (previousNewFiber = nextOldFiber));\n shouldTrackSideEffects &&\n oldFiber.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChildren,\n lanes\n ) {\n if (null == newChildren) throw Error(formatProdErrorMessage(151));\n for (\n var resultingFirstChild = null,\n previousNewFiber = null,\n oldFiber = currentFirstChild,\n newIdx = (currentFirstChild = 0),\n nextOldFiber = null,\n step = newChildren.next();\n null !== oldFiber && !step.done;\n newIdx++, step = newChildren.next()\n ) {\n oldFiber.index > newIdx\n ? ((nextOldFiber = oldFiber), (oldFiber = null))\n : (nextOldFiber = oldFiber.sibling);\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n if (null === newFiber) {\n null === oldFiber && (oldFiber = nextOldFiber);\n break;\n }\n shouldTrackSideEffects &&\n oldFiber &&\n null === newFiber.alternate &&\n deleteChild(returnFiber, oldFiber);\n currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n null === previousNewFiber\n ? (resultingFirstChild = newFiber)\n : (previousNewFiber.sibling = newFiber);\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (step.done)\n return (\n deleteRemainingChildren(returnFiber, oldFiber),\n isHydrating && pushTreeFork(returnFiber, newIdx),\n resultingFirstChild\n );\n if (null === oldFiber) {\n for (; !step.done; newIdx++, step = newChildren.next())\n (step = createChild(returnFiber, step.value, lanes)),\n null !== step &&\n ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n null === previousNewFiber\n ? (resultingFirstChild = step)\n : (previousNewFiber.sibling = step),\n (previousNewFiber = step));\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n for (\n oldFiber = mapRemainingChildren(oldFiber);\n !step.done;\n newIdx++, step = newChildren.next()\n )\n (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)),\n null !== step &&\n (shouldTrackSideEffects &&\n null !== step.alternate &&\n oldFiber.delete(null === step.key ? newIdx : step.key),\n (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n null === previousNewFiber\n ? (resultingFirstChild = step)\n : (previousNewFiber.sibling = step),\n (previousNewFiber = step));\n shouldTrackSideEffects &&\n oldFiber.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n function reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n ) {\n \"object\" === typeof newChild &&\n null !== newChild &&\n newChild.type === REACT_FRAGMENT_TYPE &&\n null === newChild.key &&\n (newChild = newChild.props.children);\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n a: {\n for (var key = newChild.key; null !== currentFirstChild; ) {\n if (currentFirstChild.key === key) {\n key = newChild.type;\n if (key === REACT_FRAGMENT_TYPE) {\n if (7 === currentFirstChild.tag) {\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling\n );\n lanes = useFiber(\n currentFirstChild,\n newChild.props.children\n );\n lanes.return = returnFiber;\n returnFiber = lanes;\n break a;\n }\n } else if (\n currentFirstChild.elementType === key ||\n (\"object\" === typeof key &&\n null !== key &&\n key.$$typeof === REACT_LAZY_TYPE &&\n resolveLazy(key) === currentFirstChild.type)\n ) {\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling\n );\n lanes = useFiber(currentFirstChild, newChild.props);\n coerceRef(lanes, newChild);\n lanes.return = returnFiber;\n returnFiber = lanes;\n break a;\n }\n deleteRemainingChildren(returnFiber, currentFirstChild);\n break;\n } else deleteChild(returnFiber, currentFirstChild);\n currentFirstChild = currentFirstChild.sibling;\n }\n newChild.type === REACT_FRAGMENT_TYPE\n ? ((lanes = createFiberFromFragment(\n newChild.props.children,\n returnFiber.mode,\n lanes,\n newChild.key\n )),\n (lanes.return = returnFiber),\n (returnFiber = lanes))\n : ((lanes = createFiberFromTypeAndProps(\n newChild.type,\n newChild.key,\n newChild.props,\n null,\n returnFiber.mode,\n lanes\n )),\n coerceRef(lanes, newChild),\n (lanes.return = returnFiber),\n (returnFiber = lanes));\n }\n return placeSingleChild(returnFiber);\n case REACT_PORTAL_TYPE:\n a: {\n for (key = newChild.key; null !== currentFirstChild; ) {\n if (currentFirstChild.key === key)\n if (\n 4 === currentFirstChild.tag &&\n currentFirstChild.stateNode.containerInfo ===\n newChild.containerInfo &&\n currentFirstChild.stateNode.implementation ===\n newChild.implementation\n ) {\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling\n );\n lanes = useFiber(currentFirstChild, newChild.children || []);\n lanes.return = returnFiber;\n returnFiber = lanes;\n break a;\n } else {\n deleteRemainingChildren(returnFiber, currentFirstChild);\n break;\n }\n else deleteChild(returnFiber, currentFirstChild);\n currentFirstChild = currentFirstChild.sibling;\n }\n lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n lanes.return = returnFiber;\n returnFiber = lanes;\n }\n return placeSingleChild(returnFiber);\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n )\n );\n }\n if (isArrayImpl(newChild))\n return reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n if (getIteratorFn(newChild)) {\n key = getIteratorFn(newChild);\n if (\"function\" !== typeof key) throw Error(formatProdErrorMessage(150));\n newChild = key.call(newChild);\n return reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n }\n if (\"function\" === typeof newChild.then)\n return reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n ? ((newChild = \"\" + newChild),\n null !== currentFirstChild && 6 === currentFirstChild.tag\n ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),\n (lanes = useFiber(currentFirstChild, newChild)),\n (lanes.return = returnFiber),\n (returnFiber = lanes))\n : (deleteRemainingChildren(returnFiber, currentFirstChild),\n (lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),\n (lanes.return = returnFiber),\n (returnFiber = lanes)),\n placeSingleChild(returnFiber))\n : deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return function (returnFiber, currentFirstChild, newChild, lanes) {\n try {\n thenableIndexCounter$1 = 0;\n var firstChildFiber = reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n thenableState$1 = null;\n return firstChildFiber;\n } catch (x) {\n if (x === SuspenseException || x === SuspenseActionException) throw x;\n var fiber = createFiberImplClass(29, x, null, returnFiber.mode);\n fiber.lanes = lanes;\n fiber.return = returnFiber;\n return fiber;\n } finally {\n }\n };\n}\nvar reconcileChildFibers = createChildReconciler(!0),\n mountChildFibers = createChildReconciler(!1),\n hasForceUpdate = !1;\nfunction initializeUpdateQueue(fiber) {\n fiber.updateQueue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: { pending: null, lanes: 0, hiddenCallbacks: null },\n callbacks: null\n };\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n current = current.updateQueue;\n workInProgress.updateQueue === current &&\n (workInProgress.updateQueue = {\n baseState: current.baseState,\n firstBaseUpdate: current.firstBaseUpdate,\n lastBaseUpdate: current.lastBaseUpdate,\n shared: current.shared,\n callbacks: null\n });\n}\nfunction createUpdate(lane) {\n return { lane: lane, tag: 0, payload: null, callback: null, next: null };\n}\nfunction enqueueUpdate(fiber, update, lane) {\n var updateQueue = fiber.updateQueue;\n if (null === updateQueue) return null;\n updateQueue = updateQueue.shared;\n if (0 !== (executionContext & 2)) {\n var pending = updateQueue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n updateQueue.pending = update;\n update = getRootForUpdatedFiber(fiber);\n markUpdateLaneFromFiberToRoot(fiber, null, lane);\n return update;\n }\n enqueueUpdate$1(fiber, updateQueue, update, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction entangleTransitions(root, fiber, lane) {\n fiber = fiber.updateQueue;\n if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194048))) {\n var queueLanes = fiber.lanes;\n queueLanes &= root.pendingLanes;\n lane |= queueLanes;\n fiber.lanes = lane;\n markRootEntangled(root, lane);\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n var queue = workInProgress.updateQueue,\n current = workInProgress.alternate;\n if (\n null !== current &&\n ((current = current.updateQueue), queue === current)\n ) {\n var newFirst = null,\n newLast = null;\n queue = queue.firstBaseUpdate;\n if (null !== queue) {\n do {\n var clone = {\n lane: queue.lane,\n tag: queue.tag,\n payload: queue.payload,\n callback: null,\n next: null\n };\n null === newLast\n ? (newFirst = newLast = clone)\n : (newLast = newLast.next = clone);\n queue = queue.next;\n } while (null !== queue);\n null === newLast\n ? (newFirst = newLast = capturedUpdate)\n : (newLast = newLast.next = capturedUpdate);\n } else newFirst = newLast = capturedUpdate;\n queue = {\n baseState: current.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: current.shared,\n callbacks: current.callbacks\n };\n workInProgress.updateQueue = queue;\n return;\n }\n workInProgress = queue.lastBaseUpdate;\n null === workInProgress\n ? (queue.firstBaseUpdate = capturedUpdate)\n : (workInProgress.next = capturedUpdate);\n queue.lastBaseUpdate = capturedUpdate;\n}\nvar didReadFromEntangledAsyncAction = !1;\nfunction suspendIfUpdateReadFromEntangledAsyncAction() {\n if (didReadFromEntangledAsyncAction) {\n var entangledActionThenable = currentEntangledActionThenable;\n if (null !== entangledActionThenable) throw entangledActionThenable;\n }\n}\nfunction processUpdateQueue(\n workInProgress$jscomp$0,\n props,\n instance$jscomp$0,\n renderLanes\n) {\n didReadFromEntangledAsyncAction = !1;\n var queue = workInProgress$jscomp$0.updateQueue;\n hasForceUpdate = !1;\n var firstBaseUpdate = queue.firstBaseUpdate,\n lastBaseUpdate = queue.lastBaseUpdate,\n pendingQueue = queue.shared.pending;\n if (null !== pendingQueue) {\n queue.shared.pending = null;\n var lastPendingUpdate = pendingQueue,\n firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null;\n null === lastBaseUpdate\n ? (firstBaseUpdate = firstPendingUpdate)\n : (lastBaseUpdate.next = firstPendingUpdate);\n lastBaseUpdate = lastPendingUpdate;\n var current = workInProgress$jscomp$0.alternate;\n null !== current &&\n ((current = current.updateQueue),\n (pendingQueue = current.lastBaseUpdate),\n pendingQueue !== lastBaseUpdate &&\n (null === pendingQueue\n ? (current.firstBaseUpdate = firstPendingUpdate)\n : (pendingQueue.next = firstPendingUpdate),\n (current.lastBaseUpdate = lastPendingUpdate)));\n }\n if (null !== firstBaseUpdate) {\n var newState = queue.baseState;\n lastBaseUpdate = 0;\n current = firstPendingUpdate = lastPendingUpdate = null;\n pendingQueue = firstBaseUpdate;\n do {\n var updateLane = pendingQueue.lane & -536870913,\n isHiddenUpdate = updateLane !== pendingQueue.lane;\n if (\n isHiddenUpdate\n ? (workInProgressRootRenderLanes & updateLane) === updateLane\n : (renderLanes & updateLane) === updateLane\n ) {\n 0 !== updateLane &&\n updateLane === currentEntangledLane &&\n (didReadFromEntangledAsyncAction = !0);\n null !== current &&\n (current = current.next =\n {\n lane: 0,\n tag: pendingQueue.tag,\n payload: pendingQueue.payload,\n callback: null,\n next: null\n });\n a: {\n var workInProgress = workInProgress$jscomp$0,\n update = pendingQueue;\n updateLane = props;\n var instance = instance$jscomp$0;\n switch (update.tag) {\n case 1:\n workInProgress = update.payload;\n if (\"function\" === typeof workInProgress) {\n newState = workInProgress.call(instance, newState, updateLane);\n break a;\n }\n newState = workInProgress;\n break a;\n case 3:\n workInProgress.flags = (workInProgress.flags & -65537) | 128;\n case 0:\n workInProgress = update.payload;\n updateLane =\n \"function\" === typeof workInProgress\n ? workInProgress.call(instance, newState, updateLane)\n : workInProgress;\n if (null === updateLane || void 0 === updateLane) break a;\n newState = assign({}, newState, updateLane);\n break a;\n case 2:\n hasForceUpdate = !0;\n }\n }\n updateLane = pendingQueue.callback;\n null !== updateLane &&\n ((workInProgress$jscomp$0.flags |= 64),\n isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192),\n (isHiddenUpdate = queue.callbacks),\n null === isHiddenUpdate\n ? (queue.callbacks = [updateLane])\n : isHiddenUpdate.push(updateLane));\n } else\n (isHiddenUpdate = {\n lane: updateLane,\n tag: pendingQueue.tag,\n payload: pendingQueue.payload,\n callback: pendingQueue.callback,\n next: null\n }),\n null === current\n ? ((firstPendingUpdate = current = isHiddenUpdate),\n (lastPendingUpdate = newState))\n : (current = current.next = isHiddenUpdate),\n (lastBaseUpdate |= updateLane);\n pendingQueue = pendingQueue.next;\n if (null === pendingQueue)\n if (((pendingQueue = queue.shared.pending), null === pendingQueue))\n break;\n else\n (isHiddenUpdate = pendingQueue),\n (pendingQueue = isHiddenUpdate.next),\n (isHiddenUpdate.next = null),\n (queue.lastBaseUpdate = isHiddenUpdate),\n (queue.shared.pending = null);\n } while (1);\n null === current && (lastPendingUpdate = newState);\n queue.baseState = lastPendingUpdate;\n queue.firstBaseUpdate = firstPendingUpdate;\n queue.lastBaseUpdate = current;\n null === firstBaseUpdate && (queue.shared.lanes = 0);\n workInProgressRootSkippedLanes |= lastBaseUpdate;\n workInProgress$jscomp$0.lanes = lastBaseUpdate;\n workInProgress$jscomp$0.memoizedState = newState;\n }\n}\nfunction callCallback(callback, context) {\n if (\"function\" !== typeof callback)\n throw Error(formatProdErrorMessage(191, callback));\n callback.call(context);\n}\nfunction commitCallbacks(updateQueue, context) {\n var callbacks = updateQueue.callbacks;\n if (null !== callbacks)\n for (\n updateQueue.callbacks = null, updateQueue = 0;\n updateQueue < callbacks.length;\n updateQueue++\n )\n callCallback(callbacks[updateQueue], context);\n}\nvar currentTreeHiddenStackCursor = createCursor(null),\n prevEntangledRenderLanesCursor = createCursor(0);\nfunction pushHiddenContext(fiber, context) {\n fiber = entangledRenderLanes;\n push(prevEntangledRenderLanesCursor, fiber);\n push(currentTreeHiddenStackCursor, context);\n entangledRenderLanes = fiber | context.baseLanes;\n}\nfunction reuseHiddenContextOnStack() {\n push(prevEntangledRenderLanesCursor, entangledRenderLanes);\n push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);\n}\nfunction popHiddenContext() {\n entangledRenderLanes = prevEntangledRenderLanesCursor.current;\n pop(currentTreeHiddenStackCursor);\n pop(prevEntangledRenderLanesCursor);\n}\nvar suspenseHandlerStackCursor = createCursor(null),\n shellBoundary = null;\nfunction pushPrimaryTreeSuspenseHandler(handler) {\n var current = handler.alternate;\n push(suspenseStackCursor, suspenseStackCursor.current & 1);\n push(suspenseHandlerStackCursor, handler);\n null === shellBoundary &&\n (null === current || null !== currentTreeHiddenStackCursor.current\n ? (shellBoundary = handler)\n : null !== current.memoizedState && (shellBoundary = handler));\n}\nfunction pushDehydratedActivitySuspenseHandler(fiber) {\n push(suspenseStackCursor, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, fiber);\n null === shellBoundary && (shellBoundary = fiber);\n}\nfunction pushOffscreenSuspenseHandler(fiber) {\n 22 === fiber.tag\n ? (push(suspenseStackCursor, suspenseStackCursor.current),\n push(suspenseHandlerStackCursor, fiber),\n null === shellBoundary && (shellBoundary = fiber))\n : reuseSuspenseHandlerOnStack(fiber);\n}\nfunction reuseSuspenseHandlerOnStack() {\n push(suspenseStackCursor, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);\n}\nfunction popSuspenseHandler(fiber) {\n pop(suspenseHandlerStackCursor);\n shellBoundary === fiber && (shellBoundary = null);\n pop(suspenseStackCursor);\n}\nvar suspenseStackCursor = createCursor(0);\nfunction findFirstSuspended(row) {\n for (var node = row; null !== node; ) {\n if (13 === node.tag) {\n var state = node.memoizedState;\n if (\n null !== state &&\n ((state = state.dehydrated),\n null === state ||\n isSuspenseInstancePending(state) ||\n isSuspenseInstanceFallback(state))\n )\n return node;\n } else if (\n 19 === node.tag &&\n (\"forwards\" === node.memoizedProps.revealOrder ||\n \"backwards\" === node.memoizedProps.revealOrder ||\n \"unstable_legacy-backwards\" === node.memoizedProps.revealOrder ||\n \"together\" === node.memoizedProps.revealOrder)\n ) {\n if (0 !== (node.flags & 128)) return node;\n } else if (null !== node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === row) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === row) return null;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n return null;\n}\nvar renderLanes = 0,\n currentlyRenderingFiber = null,\n currentHook = null,\n workInProgressHook = null,\n didScheduleRenderPhaseUpdate = !1,\n didScheduleRenderPhaseUpdateDuringThisPass = !1,\n shouldDoubleInvokeUserFnsInHooksDEV = !1,\n localIdCounter = 0,\n thenableIndexCounter = 0,\n thenableState = null,\n globalClientIdCounter = 0;\nfunction throwInvalidHookError() {\n throw Error(formatProdErrorMessage(321));\n}\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n if (null === prevDeps) return !1;\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)\n if (!objectIs(nextDeps[i], prevDeps[i])) return !1;\n return !0;\n}\nfunction renderWithHooks(\n current,\n workInProgress,\n Component,\n props,\n secondArg,\n nextRenderLanes\n) {\n renderLanes = nextRenderLanes;\n currentlyRenderingFiber = workInProgress;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.lanes = 0;\n ReactSharedInternals.H =\n null === current || null === current.memoizedState\n ? HooksDispatcherOnMount\n : HooksDispatcherOnUpdate;\n shouldDoubleInvokeUserFnsInHooksDEV = !1;\n nextRenderLanes = Component(props, secondArg);\n shouldDoubleInvokeUserFnsInHooksDEV = !1;\n didScheduleRenderPhaseUpdateDuringThisPass &&\n (nextRenderLanes = renderWithHooksAgain(\n workInProgress,\n Component,\n props,\n secondArg\n ));\n finishRenderingHooks(current);\n return nextRenderLanes;\n}\nfunction finishRenderingHooks(current) {\n ReactSharedInternals.H = ContextOnlyDispatcher;\n var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;\n renderLanes = 0;\n workInProgressHook = currentHook = currentlyRenderingFiber = null;\n didScheduleRenderPhaseUpdate = !1;\n thenableIndexCounter = 0;\n thenableState = null;\n if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300));\n null === current ||\n didReceiveUpdate ||\n ((current = current.dependencies),\n null !== current &&\n checkIfContextChanged(current) &&\n (didReceiveUpdate = !0));\n}\nfunction renderWithHooksAgain(workInProgress, Component, props, secondArg) {\n currentlyRenderingFiber = workInProgress;\n var numberOfReRenders = 0;\n do {\n didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);\n thenableIndexCounter = 0;\n didScheduleRenderPhaseUpdateDuringThisPass = !1;\n if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301));\n numberOfReRenders += 1;\n workInProgressHook = currentHook = null;\n if (null != workInProgress.updateQueue) {\n var children = workInProgress.updateQueue;\n children.lastEffect = null;\n children.events = null;\n children.stores = null;\n null != children.memoCache && (children.memoCache.index = 0);\n }\n ReactSharedInternals.H = HooksDispatcherOnRerender;\n children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\n return children;\n}\nfunction TransitionAwareHostComponent() {\n var dispatcher = ReactSharedInternals.H,\n maybeThenable = dispatcher.useState()[0];\n maybeThenable =\n \"function\" === typeof maybeThenable.then\n ? useThenable(maybeThenable)\n : maybeThenable;\n dispatcher = dispatcher.useState()[0];\n (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&\n (currentlyRenderingFiber.flags |= 1024);\n return maybeThenable;\n}\nfunction checkDidRenderIdHook() {\n var didRenderIdHook = 0 !== localIdCounter;\n localIdCounter = 0;\n return didRenderIdHook;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.flags &= -2053;\n current.lanes &= ~lanes;\n}\nfunction resetHooksOnUnwind(workInProgress) {\n if (didScheduleRenderPhaseUpdate) {\n for (\n workInProgress = workInProgress.memoizedState;\n null !== workInProgress;\n\n ) {\n var queue = workInProgress.queue;\n null !== queue && (queue.pending = null);\n workInProgress = workInProgress.next;\n }\n didScheduleRenderPhaseUpdate = !1;\n }\n renderLanes = 0;\n workInProgressHook = currentHook = currentlyRenderingFiber = null;\n didScheduleRenderPhaseUpdateDuringThisPass = !1;\n thenableIndexCounter = localIdCounter = 0;\n thenableState = null;\n}\nfunction mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n null === workInProgressHook\n ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook)\n : (workInProgressHook = workInProgressHook.next = hook);\n return workInProgressHook;\n}\nfunction updateWorkInProgressHook() {\n if (null === currentHook) {\n var nextCurrentHook = currentlyRenderingFiber.alternate;\n nextCurrentHook =\n null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;\n } else nextCurrentHook = currentHook.next;\n var nextWorkInProgressHook =\n null === workInProgressHook\n ? currentlyRenderingFiber.memoizedState\n : workInProgressHook.next;\n if (null !== nextWorkInProgressHook)\n (workInProgressHook = nextWorkInProgressHook),\n (currentHook = nextCurrentHook);\n else {\n if (null === nextCurrentHook) {\n if (null === currentlyRenderingFiber.alternate)\n throw Error(formatProdErrorMessage(467));\n throw Error(formatProdErrorMessage(310));\n }\n currentHook = nextCurrentHook;\n nextCurrentHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n null === workInProgressHook\n ? (currentlyRenderingFiber.memoizedState = workInProgressHook =\n nextCurrentHook)\n : (workInProgressHook = workInProgressHook.next = nextCurrentHook);\n }\n return workInProgressHook;\n}\nfunction createFunctionComponentUpdateQueue() {\n return { lastEffect: null, events: null, stores: null, memoCache: null };\n}\nfunction useThenable(thenable) {\n var index = thenableIndexCounter;\n thenableIndexCounter += 1;\n null === thenableState && (thenableState = []);\n thenable = trackUsedThenable(thenableState, thenable, index);\n index = currentlyRenderingFiber;\n null ===\n (null === workInProgressHook\n ? index.memoizedState\n : workInProgressHook.next) &&\n ((index = index.alternate),\n (ReactSharedInternals.H =\n null === index || null === index.memoizedState\n ? HooksDispatcherOnMount\n : HooksDispatcherOnUpdate));\n return thenable;\n}\nfunction use(usable) {\n if (null !== usable && \"object\" === typeof usable) {\n if (\"function\" === typeof usable.then) return useThenable(usable);\n if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);\n }\n throw Error(formatProdErrorMessage(438, String(usable)));\n}\nfunction useMemoCache(size) {\n var memoCache = null,\n updateQueue = currentlyRenderingFiber.updateQueue;\n null !== updateQueue && (memoCache = updateQueue.memoCache);\n if (null == memoCache) {\n var current = currentlyRenderingFiber.alternate;\n null !== current &&\n ((current = current.updateQueue),\n null !== current &&\n ((current = current.memoCache),\n null != current &&\n (memoCache = {\n data: current.data.map(function (array) {\n return array.slice();\n }),\n index: 0\n })));\n }\n null == memoCache && (memoCache = { data: [], index: 0 });\n null === updateQueue &&\n ((updateQueue = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = updateQueue));\n updateQueue.memoCache = memoCache;\n updateQueue = memoCache.data[memoCache.index];\n if (void 0 === updateQueue)\n for (\n updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0;\n current < size;\n current++\n )\n updateQueue[current] = REACT_MEMO_CACHE_SENTINEL;\n memoCache.index++;\n return updateQueue;\n}\nfunction basicStateReducer(state, action) {\n return \"function\" === typeof action ? action(state) : action;\n}\nfunction updateReducer(reducer) {\n var hook = updateWorkInProgressHook();\n return updateReducerImpl(hook, currentHook, reducer);\n}\nfunction updateReducerImpl(hook, current, reducer) {\n var queue = hook.queue;\n if (null === queue) throw Error(formatProdErrorMessage(311));\n queue.lastRenderedReducer = reducer;\n var baseQueue = hook.baseQueue,\n pendingQueue = queue.pending;\n if (null !== pendingQueue) {\n if (null !== baseQueue) {\n var baseFirst = baseQueue.next;\n baseQueue.next = pendingQueue.next;\n pendingQueue.next = baseFirst;\n }\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n pendingQueue = hook.baseState;\n if (null === baseQueue) hook.memoizedState = pendingQueue;\n else {\n current = baseQueue.next;\n var newBaseQueueFirst = (baseFirst = null),\n newBaseQueueLast = null,\n update = current,\n didReadFromEntangledAsyncAction$60 = !1;\n do {\n var updateLane = update.lane & -536870913;\n if (\n updateLane !== update.lane\n ? (workInProgressRootRenderLanes & updateLane) === updateLane\n : (renderLanes & updateLane) === updateLane\n ) {\n var revertLane = update.revertLane;\n if (0 === revertLane)\n null !== newBaseQueueLast &&\n (newBaseQueueLast = newBaseQueueLast.next =\n {\n lane: 0,\n revertLane: 0,\n gesture: null,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n }),\n updateLane === currentEntangledLane &&\n (didReadFromEntangledAsyncAction$60 = !0);\n else if ((renderLanes & revertLane) === revertLane) {\n update = update.next;\n revertLane === currentEntangledLane &&\n (didReadFromEntangledAsyncAction$60 = !0);\n continue;\n } else\n (updateLane = {\n lane: 0,\n revertLane: update.revertLane,\n gesture: null,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n }),\n null === newBaseQueueLast\n ? ((newBaseQueueFirst = newBaseQueueLast = updateLane),\n (baseFirst = pendingQueue))\n : (newBaseQueueLast = newBaseQueueLast.next = updateLane),\n (currentlyRenderingFiber.lanes |= revertLane),\n (workInProgressRootSkippedLanes |= revertLane);\n updateLane = update.action;\n shouldDoubleInvokeUserFnsInHooksDEV &&\n reducer(pendingQueue, updateLane);\n pendingQueue = update.hasEagerState\n ? update.eagerState\n : reducer(pendingQueue, updateLane);\n } else\n (revertLane = {\n lane: updateLane,\n revertLane: update.revertLane,\n gesture: update.gesture,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n }),\n null === newBaseQueueLast\n ? ((newBaseQueueFirst = newBaseQueueLast = revertLane),\n (baseFirst = pendingQueue))\n : (newBaseQueueLast = newBaseQueueLast.next = revertLane),\n (currentlyRenderingFiber.lanes |= updateLane),\n (workInProgressRootSkippedLanes |= updateLane);\n update = update.next;\n } while (null !== update && update !== current);\n null === newBaseQueueLast\n ? (baseFirst = pendingQueue)\n : (newBaseQueueLast.next = newBaseQueueFirst);\n if (\n !objectIs(pendingQueue, hook.memoizedState) &&\n ((didReceiveUpdate = !0),\n didReadFromEntangledAsyncAction$60 &&\n ((reducer = currentEntangledActionThenable), null !== reducer))\n )\n throw reducer;\n hook.memoizedState = pendingQueue;\n hook.baseState = baseFirst;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = pendingQueue;\n }\n null === baseQueue && (queue.lanes = 0);\n return [hook.memoizedState, queue.dispatch];\n}\nfunction rerenderReducer(reducer) {\n var hook = updateWorkInProgressHook(),\n queue = hook.queue;\n if (null === queue) throw Error(formatProdErrorMessage(311));\n queue.lastRenderedReducer = reducer;\n var dispatch = queue.dispatch,\n lastRenderPhaseUpdate = queue.pending,\n newState = hook.memoizedState;\n if (null !== lastRenderPhaseUpdate) {\n queue.pending = null;\n var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);\n do (newState = reducer(newState, update.action)), (update = update.next);\n while (update !== lastRenderPhaseUpdate);\n objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);\n hook.memoizedState = newState;\n null === hook.baseQueue && (hook.baseState = newState);\n queue.lastRenderedState = newState;\n }\n return [newState, dispatch];\n}\nfunction updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber,\n hook = updateWorkInProgressHook(),\n isHydrating$jscomp$0 = isHydrating;\n if (isHydrating$jscomp$0) {\n if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407));\n getServerSnapshot = getServerSnapshot();\n } else getServerSnapshot = getSnapshot();\n var snapshotChanged = !objectIs(\n (currentHook || hook).memoizedState,\n getServerSnapshot\n );\n snapshotChanged &&\n ((hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0));\n hook = hook.queue;\n updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [\n subscribe\n ]);\n if (\n hook.getSnapshot !== getSnapshot ||\n snapshotChanged ||\n (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1)\n ) {\n fiber.flags |= 2048;\n pushSimpleEffect(\n 9,\n { destroy: void 0 },\n updateStoreInstance.bind(\n null,\n fiber,\n hook,\n getServerSnapshot,\n getSnapshot\n ),\n null\n );\n if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));\n isHydrating$jscomp$0 ||\n 0 !== (renderLanes & 127) ||\n pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);\n }\n return getServerSnapshot;\n}\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n fiber.flags |= 16384;\n fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };\n getSnapshot = currentlyRenderingFiber.updateQueue;\n null === getSnapshot\n ? ((getSnapshot = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = getSnapshot),\n (getSnapshot.stores = [fiber]))\n : ((renderedSnapshot = getSnapshot.stores),\n null === renderedSnapshot\n ? (getSnapshot.stores = [fiber])\n : renderedSnapshot.push(fiber));\n}\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n inst.value = nextSnapshot;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n}\nfunction subscribeToStore(fiber, inst, subscribe) {\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n });\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction forceStoreRerender(fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, 2);\n null !== root && scheduleUpdateOnFiber(root, fiber, 2);\n}\nfunction mountStateImpl(initialState) {\n var hook = mountWorkInProgressHook();\n if (\"function\" === typeof initialState) {\n var initialStateInitializer = initialState;\n initialState = initialStateInitializer();\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n initialStateInitializer();\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n }\n hook.memoizedState = hook.baseState = initialState;\n hook.queue = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n return hook;\n}\nfunction updateOptimisticImpl(hook, current, passthrough, reducer) {\n hook.baseState = passthrough;\n return updateReducerImpl(\n hook,\n currentHook,\n \"function\" === typeof reducer ? reducer : basicStateReducer\n );\n}\nfunction dispatchActionState(\n fiber,\n actionQueue,\n setPendingState,\n setState,\n payload\n) {\n if (isRenderPhaseUpdate(fiber)) throw Error(formatProdErrorMessage(485));\n fiber = actionQueue.action;\n if (null !== fiber) {\n var actionNode = {\n payload: payload,\n action: fiber,\n next: null,\n isTransition: !0,\n status: \"pending\",\n value: null,\n reason: null,\n listeners: [],\n then: function (listener) {\n actionNode.listeners.push(listener);\n }\n };\n null !== ReactSharedInternals.T\n ? setPendingState(!0)\n : (actionNode.isTransition = !1);\n setState(actionNode);\n setPendingState = actionQueue.pending;\n null === setPendingState\n ? ((actionNode.next = actionQueue.pending = actionNode),\n runActionStateAction(actionQueue, actionNode))\n : ((actionNode.next = setPendingState.next),\n (actionQueue.pending = setPendingState.next = actionNode));\n }\n}\nfunction runActionStateAction(actionQueue, node) {\n var action = node.action,\n payload = node.payload,\n prevState = actionQueue.state;\n if (node.isTransition) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = action(prevState, payload),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n handleActionReturnValue(actionQueue, node, returnValue);\n } catch (error) {\n onActionError(actionQueue, node, error);\n } finally {\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n } else\n try {\n (prevTransition = action(prevState, payload)),\n handleActionReturnValue(actionQueue, node, prevTransition);\n } catch (error$66) {\n onActionError(actionQueue, node, error$66);\n }\n}\nfunction handleActionReturnValue(actionQueue, node, returnValue) {\n null !== returnValue &&\n \"object\" === typeof returnValue &&\n \"function\" === typeof returnValue.then\n ? returnValue.then(\n function (nextState) {\n onActionSuccess(actionQueue, node, nextState);\n },\n function (error) {\n return onActionError(actionQueue, node, error);\n }\n )\n : onActionSuccess(actionQueue, node, returnValue);\n}\nfunction onActionSuccess(actionQueue, actionNode, nextState) {\n actionNode.status = \"fulfilled\";\n actionNode.value = nextState;\n notifyActionListeners(actionNode);\n actionQueue.state = nextState;\n actionNode = actionQueue.pending;\n null !== actionNode &&\n ((nextState = actionNode.next),\n nextState === actionNode\n ? (actionQueue.pending = null)\n : ((nextState = nextState.next),\n (actionNode.next = nextState),\n runActionStateAction(actionQueue, nextState)));\n}\nfunction onActionError(actionQueue, actionNode, error) {\n var last = actionQueue.pending;\n actionQueue.pending = null;\n if (null !== last) {\n last = last.next;\n do\n (actionNode.status = \"rejected\"),\n (actionNode.reason = error),\n notifyActionListeners(actionNode),\n (actionNode = actionNode.next);\n while (actionNode !== last);\n }\n actionQueue.action = null;\n}\nfunction notifyActionListeners(actionNode) {\n actionNode = actionNode.listeners;\n for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();\n}\nfunction actionStateReducer(oldState, newState) {\n return newState;\n}\nfunction mountActionState(action, initialStateProp) {\n if (isHydrating) {\n var ssrFormState = workInProgressRoot.formState;\n if (null !== ssrFormState) {\n a: {\n var JSCompiler_inline_result = currentlyRenderingFiber;\n if (isHydrating) {\n if (nextHydratableInstance) {\n b: {\n var JSCompiler_inline_result$jscomp$0 = nextHydratableInstance;\n for (\n var inRootOrSingleton = rootOrSingletonContext;\n 8 !== JSCompiler_inline_result$jscomp$0.nodeType;\n\n ) {\n if (!inRootOrSingleton) {\n JSCompiler_inline_result$jscomp$0 = null;\n break b;\n }\n JSCompiler_inline_result$jscomp$0 = getNextHydratable(\n JSCompiler_inline_result$jscomp$0.nextSibling\n );\n if (null === JSCompiler_inline_result$jscomp$0) {\n JSCompiler_inline_result$jscomp$0 = null;\n break b;\n }\n }\n inRootOrSingleton = JSCompiler_inline_result$jscomp$0.data;\n JSCompiler_inline_result$jscomp$0 =\n \"F!\" === inRootOrSingleton || \"F\" === inRootOrSingleton\n ? JSCompiler_inline_result$jscomp$0\n : null;\n }\n if (JSCompiler_inline_result$jscomp$0) {\n nextHydratableInstance = getNextHydratable(\n JSCompiler_inline_result$jscomp$0.nextSibling\n );\n JSCompiler_inline_result =\n \"F!\" === JSCompiler_inline_result$jscomp$0.data;\n break a;\n }\n }\n throwOnHydrationMismatch(JSCompiler_inline_result);\n }\n JSCompiler_inline_result = !1;\n }\n JSCompiler_inline_result && (initialStateProp = ssrFormState[0]);\n }\n }\n ssrFormState = mountWorkInProgressHook();\n ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;\n JSCompiler_inline_result = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: actionStateReducer,\n lastRenderedState: initialStateProp\n };\n ssrFormState.queue = JSCompiler_inline_result;\n ssrFormState = dispatchSetState.bind(\n null,\n currentlyRenderingFiber,\n JSCompiler_inline_result\n );\n JSCompiler_inline_result.dispatch = ssrFormState;\n JSCompiler_inline_result = mountStateImpl(!1);\n inRootOrSingleton = dispatchOptimisticSetState.bind(\n null,\n currentlyRenderingFiber,\n !1,\n JSCompiler_inline_result.queue\n );\n JSCompiler_inline_result = mountWorkInProgressHook();\n JSCompiler_inline_result$jscomp$0 = {\n state: initialStateProp,\n dispatch: null,\n action: action,\n pending: null\n };\n JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0;\n ssrFormState = dispatchActionState.bind(\n null,\n currentlyRenderingFiber,\n JSCompiler_inline_result$jscomp$0,\n inRootOrSingleton,\n ssrFormState\n );\n JSCompiler_inline_result$jscomp$0.dispatch = ssrFormState;\n JSCompiler_inline_result.memoizedState = action;\n return [initialStateProp, ssrFormState, !1];\n}\nfunction updateActionState(action) {\n var stateHook = updateWorkInProgressHook();\n return updateActionStateImpl(stateHook, currentHook, action);\n}\nfunction updateActionStateImpl(stateHook, currentStateHook, action) {\n currentStateHook = updateReducerImpl(\n stateHook,\n currentStateHook,\n actionStateReducer\n )[0];\n stateHook = updateReducer(basicStateReducer)[0];\n if (\n \"object\" === typeof currentStateHook &&\n null !== currentStateHook &&\n \"function\" === typeof currentStateHook.then\n )\n try {\n var state = useThenable(currentStateHook);\n } catch (x) {\n if (x === SuspenseException) throw SuspenseActionException;\n throw x;\n }\n else state = currentStateHook;\n currentStateHook = updateWorkInProgressHook();\n var actionQueue = currentStateHook.queue,\n dispatch = actionQueue.dispatch;\n action !== currentStateHook.memoizedState &&\n ((currentlyRenderingFiber.flags |= 2048),\n pushSimpleEffect(\n 9,\n { destroy: void 0 },\n actionStateActionEffect.bind(null, actionQueue, action),\n null\n ));\n return [state, dispatch, stateHook];\n}\nfunction actionStateActionEffect(actionQueue, action) {\n actionQueue.action = action;\n}\nfunction rerenderActionState(action) {\n var stateHook = updateWorkInProgressHook(),\n currentStateHook = currentHook;\n if (null !== currentStateHook)\n return updateActionStateImpl(stateHook, currentStateHook, action);\n updateWorkInProgressHook();\n stateHook = stateHook.memoizedState;\n currentStateHook = updateWorkInProgressHook();\n var dispatch = currentStateHook.queue.dispatch;\n currentStateHook.memoizedState = action;\n return [stateHook, dispatch, !1];\n}\nfunction pushSimpleEffect(tag, inst, create, deps) {\n tag = { tag: tag, create: create, deps: deps, inst: inst, next: null };\n inst = currentlyRenderingFiber.updateQueue;\n null === inst &&\n ((inst = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = inst));\n create = inst.lastEffect;\n null === create\n ? (inst.lastEffect = tag.next = tag)\n : ((deps = create.next),\n (create.next = tag),\n (tag.next = deps),\n (inst.lastEffect = tag));\n return tag;\n}\nfunction updateRef() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n currentlyRenderingFiber.flags |= fiberFlags;\n hook.memoizedState = pushSimpleEffect(\n 1 | hookFlags,\n { destroy: void 0 },\n create,\n void 0 === deps ? null : deps\n );\n}\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var inst = hook.memoizedState.inst;\n null !== currentHook &&\n null !== deps &&\n areHookInputsEqual(deps, currentHook.memoizedState.deps)\n ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps))\n : ((currentlyRenderingFiber.flags |= fiberFlags),\n (hook.memoizedState = pushSimpleEffect(\n 1 | hookFlags,\n inst,\n create,\n deps\n )));\n}\nfunction mountEffect(create, deps) {\n mountEffectImpl(8390656, 8, create, deps);\n}\nfunction updateEffect(create, deps) {\n updateEffectImpl(2048, 8, create, deps);\n}\nfunction useEffectEventImpl(payload) {\n currentlyRenderingFiber.flags |= 4;\n var componentUpdateQueue = currentlyRenderingFiber.updateQueue;\n if (null === componentUpdateQueue)\n (componentUpdateQueue = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = componentUpdateQueue),\n (componentUpdateQueue.events = [payload]);\n else {\n var events = componentUpdateQueue.events;\n null === events\n ? (componentUpdateQueue.events = [payload])\n : events.push(payload);\n }\n}\nfunction updateEvent(callback) {\n var ref = updateWorkInProgressHook().memoizedState;\n useEffectEventImpl({ ref: ref, nextImpl: callback });\n return function () {\n if (0 !== (executionContext & 2)) throw Error(formatProdErrorMessage(440));\n return ref.impl.apply(void 0, arguments);\n };\n}\nfunction updateInsertionEffect(create, deps) {\n return updateEffectImpl(4, 2, create, deps);\n}\nfunction updateLayoutEffect(create, deps) {\n return updateEffectImpl(4, 4, create, deps);\n}\nfunction imperativeHandleEffect(create, ref) {\n if (\"function\" === typeof ref) {\n create = create();\n var refCleanup = ref(create);\n return function () {\n \"function\" === typeof refCleanup ? refCleanup() : ref(null);\n };\n }\n if (null !== ref && void 0 !== ref)\n return (\n (create = create()),\n (ref.current = create),\n function () {\n ref.current = null;\n }\n );\n}\nfunction updateImperativeHandle(ref, create, deps) {\n deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);\n}\nfunction mountDebugValue() {}\nfunction updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var prevState = hook.memoizedState;\n if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n return prevState[0];\n hook.memoizedState = [callback, deps];\n return callback;\n}\nfunction updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var prevState = hook.memoizedState;\n if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n return prevState[0];\n prevState = nextCreate();\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n nextCreate();\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n hook.memoizedState = [prevState, deps];\n return prevState;\n}\nfunction mountDeferredValueImpl(hook, value, initialValue) {\n if (\n void 0 === initialValue ||\n (0 !== (renderLanes & 1073741824) &&\n 0 === (workInProgressRootRenderLanes & 261930))\n )\n return (hook.memoizedState = value);\n hook.memoizedState = initialValue;\n hook = requestDeferredLane();\n currentlyRenderingFiber.lanes |= hook;\n workInProgressRootSkippedLanes |= hook;\n return initialValue;\n}\nfunction updateDeferredValueImpl(hook, prevValue, value, initialValue) {\n if (objectIs(value, prevValue)) return value;\n if (null !== currentTreeHiddenStackCursor.current)\n return (\n (hook = mountDeferredValueImpl(hook, value, initialValue)),\n objectIs(hook, prevValue) || (didReceiveUpdate = !0),\n hook\n );\n if (\n 0 === (renderLanes & 42) ||\n (0 !== (renderLanes & 1073741824) &&\n 0 === (workInProgressRootRenderLanes & 261930))\n )\n return (didReceiveUpdate = !0), (hook.memoizedState = value);\n hook = requestDeferredLane();\n currentlyRenderingFiber.lanes |= hook;\n workInProgressRootSkippedLanes |= hook;\n return prevValue;\n}\nfunction startTransition(fiber, queue, pendingState, finishedState, callback) {\n var previousPriority = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p =\n 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n dispatchOptimisticSetState(fiber, !1, queue, pendingState);\n try {\n var returnValue = callback(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n if (\n null !== returnValue &&\n \"object\" === typeof returnValue &&\n \"function\" === typeof returnValue.then\n ) {\n var thenableForFinishedState = chainThenableValue(\n returnValue,\n finishedState\n );\n dispatchSetStateInternal(\n fiber,\n queue,\n thenableForFinishedState,\n requestUpdateLane(fiber)\n );\n } else\n dispatchSetStateInternal(\n fiber,\n queue,\n finishedState,\n requestUpdateLane(fiber)\n );\n } catch (error) {\n dispatchSetStateInternal(\n fiber,\n queue,\n { then: function () {}, status: \"rejected\", reason: error },\n requestUpdateLane()\n );\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n}\nfunction noop() {}\nfunction startHostTransition(formFiber, pendingState, action, formData) {\n if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476));\n var queue = ensureFormComponentIsStateful(formFiber).queue;\n startTransition(\n formFiber,\n queue,\n pendingState,\n sharedNotPendingObject,\n null === action\n ? noop\n : function () {\n requestFormReset$1(formFiber);\n return action(formData);\n }\n );\n}\nfunction ensureFormComponentIsStateful(formFiber) {\n var existingStateHook = formFiber.memoizedState;\n if (null !== existingStateHook) return existingStateHook;\n existingStateHook = {\n memoizedState: sharedNotPendingObject,\n baseState: sharedNotPendingObject,\n baseQueue: null,\n queue: {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: sharedNotPendingObject\n },\n next: null\n };\n var initialResetState = {};\n existingStateHook.next = {\n memoizedState: initialResetState,\n baseState: initialResetState,\n baseQueue: null,\n queue: {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialResetState\n },\n next: null\n };\n formFiber.memoizedState = existingStateHook;\n formFiber = formFiber.alternate;\n null !== formFiber && (formFiber.memoizedState = existingStateHook);\n return existingStateHook;\n}\nfunction requestFormReset$1(formFiber) {\n var stateHook = ensureFormComponentIsStateful(formFiber);\n null === stateHook.next && (stateHook = formFiber.alternate.memoizedState);\n dispatchSetStateInternal(\n formFiber,\n stateHook.next.queue,\n {},\n requestUpdateLane()\n );\n}\nfunction useHostTransitionStatus() {\n return readContext(HostTransitionContext);\n}\nfunction updateId() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction updateRefresh() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction refreshCache(fiber) {\n for (var provider = fiber.return; null !== provider; ) {\n switch (provider.tag) {\n case 24:\n case 3:\n var lane = requestUpdateLane();\n fiber = createUpdate(lane);\n var root$69 = enqueueUpdate(provider, fiber, lane);\n null !== root$69 &&\n (scheduleUpdateOnFiber(root$69, provider, lane),\n entangleTransitions(root$69, provider, lane));\n provider = { cache: createCache() };\n fiber.payload = provider;\n return;\n }\n provider = provider.return;\n }\n}\nfunction dispatchReducerAction(fiber, queue, action) {\n var lane = requestUpdateLane();\n action = {\n lane: lane,\n revertLane: 0,\n gesture: null,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n isRenderPhaseUpdate(fiber)\n ? enqueueRenderPhaseUpdate(queue, action)\n : ((action = enqueueConcurrentHookUpdate(fiber, queue, action, lane)),\n null !== action &&\n (scheduleUpdateOnFiber(action, fiber, lane),\n entangleTransitionUpdate(action, queue, lane)));\n}\nfunction dispatchSetState(fiber, queue, action) {\n var lane = requestUpdateLane();\n dispatchSetStateInternal(fiber, queue, action, lane);\n}\nfunction dispatchSetStateInternal(fiber, queue, action, lane) {\n var update = {\n lane: lane,\n revertLane: 0,\n gesture: null,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);\n else {\n var alternate = fiber.alternate;\n if (\n 0 === fiber.lanes &&\n (null === alternate || 0 === alternate.lanes) &&\n ((alternate = queue.lastRenderedReducer), null !== alternate)\n )\n try {\n var currentState = queue.lastRenderedState,\n eagerState = alternate(currentState, action);\n update.hasEagerState = !0;\n update.eagerState = eagerState;\n if (objectIs(eagerState, currentState))\n return (\n enqueueUpdate$1(fiber, queue, update, 0),\n null === workInProgressRoot && finishQueueingConcurrentUpdates(),\n !1\n );\n } catch (error) {\n } finally {\n }\n action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n if (null !== action)\n return (\n scheduleUpdateOnFiber(action, fiber, lane),\n entangleTransitionUpdate(action, queue, lane),\n !0\n );\n }\n return !1;\n}\nfunction dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {\n action = {\n lane: 2,\n revertLane: requestTransitionLane(),\n gesture: null,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n if (isRenderPhaseUpdate(fiber)) {\n if (throwIfDuringRender) throw Error(formatProdErrorMessage(479));\n } else\n (throwIfDuringRender = enqueueConcurrentHookUpdate(\n fiber,\n queue,\n action,\n 2\n )),\n null !== throwIfDuringRender &&\n scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);\n}\nfunction isRenderPhaseUpdate(fiber) {\n var alternate = fiber.alternate;\n return (\n fiber === currentlyRenderingFiber ||\n (null !== alternate && alternate === currentlyRenderingFiber)\n );\n}\nfunction enqueueRenderPhaseUpdate(queue, update) {\n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate =\n !0;\n var pending = queue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n queue.pending = update;\n}\nfunction entangleTransitionUpdate(root, queue, lane) {\n if (0 !== (lane & 4194048)) {\n var queueLanes = queue.lanes;\n queueLanes &= root.pendingLanes;\n lane |= queueLanes;\n queue.lanes = lane;\n markRootEntangled(root, lane);\n }\n}\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n use: use,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useInsertionEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useSyncExternalStore: throwInvalidHookError,\n useId: throwInvalidHookError,\n useHostTransitionStatus: throwInvalidHookError,\n useFormState: throwInvalidHookError,\n useActionState: throwInvalidHookError,\n useOptimistic: throwInvalidHookError,\n useMemoCache: throwInvalidHookError,\n useCacheRefresh: throwInvalidHookError\n};\nContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;\nvar HooksDispatcherOnMount = {\n readContext: readContext,\n use: use,\n useCallback: function (callback, deps) {\n mountWorkInProgressHook().memoizedState = [\n callback,\n void 0 === deps ? null : deps\n ];\n return callback;\n },\n useContext: readContext,\n useEffect: mountEffect,\n useImperativeHandle: function (ref, create, deps) {\n deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n mountEffectImpl(\n 4194308,\n 4,\n imperativeHandleEffect.bind(null, create, ref),\n deps\n );\n },\n useLayoutEffect: function (create, deps) {\n return mountEffectImpl(4194308, 4, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n mountEffectImpl(4, 2, create, deps);\n },\n useMemo: function (nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var nextValue = nextCreate();\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n nextCreate();\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n hook.memoizedState = [nextValue, deps];\n return nextValue;\n },\n useReducer: function (reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n if (void 0 !== init) {\n var initialState = init(initialArg);\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n init(initialArg);\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n } else initialState = initialArg;\n hook.memoizedState = hook.baseState = initialState;\n reducer = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n hook.queue = reducer;\n reducer = reducer.dispatch = dispatchReducerAction.bind(\n null,\n currentlyRenderingFiber,\n reducer\n );\n return [hook.memoizedState, reducer];\n },\n useRef: function (initialValue) {\n var hook = mountWorkInProgressHook();\n initialValue = { current: initialValue };\n return (hook.memoizedState = initialValue);\n },\n useState: function (initialState) {\n initialState = mountStateImpl(initialState);\n var queue = initialState.queue,\n dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);\n queue.dispatch = dispatch;\n return [initialState.memoizedState, dispatch];\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = mountWorkInProgressHook();\n return mountDeferredValueImpl(hook, value, initialValue);\n },\n useTransition: function () {\n var stateHook = mountStateImpl(!1);\n stateHook = startTransition.bind(\n null,\n currentlyRenderingFiber,\n stateHook.queue,\n !0,\n !1\n );\n mountWorkInProgressHook().memoizedState = stateHook;\n return [!1, stateHook];\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber,\n hook = mountWorkInProgressHook();\n if (isHydrating) {\n if (void 0 === getServerSnapshot)\n throw Error(formatProdErrorMessage(407));\n getServerSnapshot = getServerSnapshot();\n } else {\n getServerSnapshot = getSnapshot();\n if (null === workInProgressRoot)\n throw Error(formatProdErrorMessage(349));\n 0 !== (workInProgressRootRenderLanes & 127) ||\n pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);\n }\n hook.memoizedState = getServerSnapshot;\n var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };\n hook.queue = inst;\n mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [\n subscribe\n ]);\n fiber.flags |= 2048;\n pushSimpleEffect(\n 9,\n { destroy: void 0 },\n updateStoreInstance.bind(\n null,\n fiber,\n inst,\n getServerSnapshot,\n getSnapshot\n ),\n null\n );\n return getServerSnapshot;\n },\n useId: function () {\n var hook = mountWorkInProgressHook(),\n identifierPrefix = workInProgressRoot.identifierPrefix;\n if (isHydrating) {\n var JSCompiler_inline_result = treeContextOverflow;\n var idWithLeadingBit = treeContextId;\n JSCompiler_inline_result =\n (\n idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1))\n ).toString(32) + JSCompiler_inline_result;\n identifierPrefix =\n \"_\" + identifierPrefix + \"R_\" + JSCompiler_inline_result;\n JSCompiler_inline_result = localIdCounter++;\n 0 < JSCompiler_inline_result &&\n (identifierPrefix += \"H\" + JSCompiler_inline_result.toString(32));\n identifierPrefix += \"_\";\n } else\n (JSCompiler_inline_result = globalClientIdCounter++),\n (identifierPrefix =\n \"_\" +\n identifierPrefix +\n \"r_\" +\n JSCompiler_inline_result.toString(32) +\n \"_\");\n return (hook.memoizedState = identifierPrefix);\n },\n useHostTransitionStatus: useHostTransitionStatus,\n useFormState: mountActionState,\n useActionState: mountActionState,\n useOptimistic: function (passthrough) {\n var hook = mountWorkInProgressHook();\n hook.memoizedState = hook.baseState = passthrough;\n var queue = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: null,\n lastRenderedState: null\n };\n hook.queue = queue;\n hook = dispatchOptimisticSetState.bind(\n null,\n currentlyRenderingFiber,\n !0,\n queue\n );\n queue.dispatch = hook;\n return [passthrough, hook];\n },\n useMemoCache: useMemoCache,\n useCacheRefresh: function () {\n return (mountWorkInProgressHook().memoizedState = refreshCache.bind(\n null,\n currentlyRenderingFiber\n ));\n },\n useEffectEvent: function (callback) {\n var hook = mountWorkInProgressHook(),\n ref = { impl: callback };\n hook.memoizedState = ref;\n return function () {\n if (0 !== (executionContext & 2))\n throw Error(formatProdErrorMessage(440));\n return ref.impl.apply(void 0, arguments);\n };\n }\n },\n HooksDispatcherOnUpdate = {\n readContext: readContext,\n use: use,\n useCallback: updateCallback,\n useContext: readContext,\n useEffect: updateEffect,\n useImperativeHandle: updateImperativeHandle,\n useInsertionEffect: updateInsertionEffect,\n useLayoutEffect: updateLayoutEffect,\n useMemo: updateMemo,\n useReducer: updateReducer,\n useRef: updateRef,\n useState: function () {\n return updateReducer(basicStateReducer);\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = updateWorkInProgressHook();\n return updateDeferredValueImpl(\n hook,\n currentHook.memoizedState,\n value,\n initialValue\n );\n },\n useTransition: function () {\n var booleanOrThenable = updateReducer(basicStateReducer)[0],\n start = updateWorkInProgressHook().memoizedState;\n return [\n \"boolean\" === typeof booleanOrThenable\n ? booleanOrThenable\n : useThenable(booleanOrThenable),\n start\n ];\n },\n useSyncExternalStore: updateSyncExternalStore,\n useId: updateId,\n useHostTransitionStatus: useHostTransitionStatus,\n useFormState: updateActionState,\n useActionState: updateActionState,\n useOptimistic: function (passthrough, reducer) {\n var hook = updateWorkInProgressHook();\n return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n },\n useMemoCache: useMemoCache,\n useCacheRefresh: updateRefresh\n };\nHooksDispatcherOnUpdate.useEffectEvent = updateEvent;\nvar HooksDispatcherOnRerender = {\n readContext: readContext,\n use: use,\n useCallback: updateCallback,\n useContext: readContext,\n useEffect: updateEffect,\n useImperativeHandle: updateImperativeHandle,\n useInsertionEffect: updateInsertionEffect,\n useLayoutEffect: updateLayoutEffect,\n useMemo: updateMemo,\n useReducer: rerenderReducer,\n useRef: updateRef,\n useState: function () {\n return rerenderReducer(basicStateReducer);\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = updateWorkInProgressHook();\n return null === currentHook\n ? mountDeferredValueImpl(hook, value, initialValue)\n : updateDeferredValueImpl(\n hook,\n currentHook.memoizedState,\n value,\n initialValue\n );\n },\n useTransition: function () {\n var booleanOrThenable = rerenderReducer(basicStateReducer)[0],\n start = updateWorkInProgressHook().memoizedState;\n return [\n \"boolean\" === typeof booleanOrThenable\n ? booleanOrThenable\n : useThenable(booleanOrThenable),\n start\n ];\n },\n useSyncExternalStore: updateSyncExternalStore,\n useId: updateId,\n useHostTransitionStatus: useHostTransitionStatus,\n useFormState: rerenderActionState,\n useActionState: rerenderActionState,\n useOptimistic: function (passthrough, reducer) {\n var hook = updateWorkInProgressHook();\n if (null !== currentHook)\n return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n hook.baseState = passthrough;\n return [passthrough, hook.queue.dispatch];\n },\n useMemoCache: useMemoCache,\n useCacheRefresh: updateRefresh\n};\nHooksDispatcherOnRerender.useEffectEvent = updateEvent;\nfunction applyDerivedStateFromProps(\n workInProgress,\n ctor,\n getDerivedStateFromProps,\n nextProps\n) {\n ctor = workInProgress.memoizedState;\n getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);\n getDerivedStateFromProps =\n null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps\n ? ctor\n : assign({}, ctor, getDerivedStateFromProps);\n workInProgress.memoizedState = getDerivedStateFromProps;\n 0 === workInProgress.lanes &&\n (workInProgress.updateQueue.baseState = getDerivedStateFromProps);\n}\nvar classComponentUpdater = {\n enqueueSetState: function (inst, payload, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(),\n update = createUpdate(lane);\n update.payload = payload;\n void 0 !== callback && null !== callback && (update.callback = callback);\n payload = enqueueUpdate(inst, update, lane);\n null !== payload &&\n (scheduleUpdateOnFiber(payload, inst, lane),\n entangleTransitions(payload, inst, lane));\n },\n enqueueReplaceState: function (inst, payload, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(),\n update = createUpdate(lane);\n update.tag = 1;\n update.payload = payload;\n void 0 !== callback && null !== callback && (update.callback = callback);\n payload = enqueueUpdate(inst, update, lane);\n null !== payload &&\n (scheduleUpdateOnFiber(payload, inst, lane),\n entangleTransitions(payload, inst, lane));\n },\n enqueueForceUpdate: function (inst, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(),\n update = createUpdate(lane);\n update.tag = 2;\n void 0 !== callback && null !== callback && (update.callback = callback);\n callback = enqueueUpdate(inst, update, lane);\n null !== callback &&\n (scheduleUpdateOnFiber(callback, inst, lane),\n entangleTransitions(callback, inst, lane));\n }\n};\nfunction checkShouldComponentUpdate(\n workInProgress,\n ctor,\n oldProps,\n newProps,\n oldState,\n newState,\n nextContext\n) {\n workInProgress = workInProgress.stateNode;\n return \"function\" === typeof workInProgress.shouldComponentUpdate\n ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)\n : ctor.prototype && ctor.prototype.isPureReactComponent\n ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)\n : !0;\n}\nfunction callComponentWillReceiveProps(\n workInProgress,\n instance,\n newProps,\n nextContext\n) {\n workInProgress = instance.state;\n \"function\" === typeof instance.componentWillReceiveProps &&\n instance.componentWillReceiveProps(newProps, nextContext);\n \"function\" === typeof instance.UNSAFE_componentWillReceiveProps &&\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n instance.state !== workInProgress &&\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n}\nfunction resolveClassComponentProps(Component, baseProps) {\n var newProps = baseProps;\n if (\"ref\" in baseProps) {\n newProps = {};\n for (var propName in baseProps)\n \"ref\" !== propName && (newProps[propName] = baseProps[propName]);\n }\n if ((Component = Component.defaultProps)) {\n newProps === baseProps && (newProps = assign({}, newProps));\n for (var propName$73 in Component)\n void 0 === newProps[propName$73] &&\n (newProps[propName$73] = Component[propName$73]);\n }\n return newProps;\n}\nfunction defaultOnUncaughtError(error) {\n reportGlobalError(error);\n}\nfunction defaultOnCaughtError(error) {\n console.error(error);\n}\nfunction defaultOnRecoverableError(error) {\n reportGlobalError(error);\n}\nfunction logUncaughtError(root, errorInfo) {\n try {\n var onUncaughtError = root.onUncaughtError;\n onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack });\n } catch (e$74) {\n setTimeout(function () {\n throw e$74;\n });\n }\n}\nfunction logCaughtError(root, boundary, errorInfo) {\n try {\n var onCaughtError = root.onCaughtError;\n onCaughtError(errorInfo.value, {\n componentStack: errorInfo.stack,\n errorBoundary: 1 === boundary.tag ? boundary.stateNode : null\n });\n } catch (e$75) {\n setTimeout(function () {\n throw e$75;\n });\n }\n}\nfunction createRootErrorUpdate(root, errorInfo, lane) {\n lane = createUpdate(lane);\n lane.tag = 3;\n lane.payload = { element: null };\n lane.callback = function () {\n logUncaughtError(root, errorInfo);\n };\n return lane;\n}\nfunction createClassErrorUpdate(lane) {\n lane = createUpdate(lane);\n lane.tag = 3;\n return lane;\n}\nfunction initializeClassErrorUpdate(update, root, fiber, errorInfo) {\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n if (\"function\" === typeof getDerivedStateFromError) {\n var error = errorInfo.value;\n update.payload = function () {\n return getDerivedStateFromError(error);\n };\n update.callback = function () {\n logCaughtError(root, fiber, errorInfo);\n };\n }\n var inst = fiber.stateNode;\n null !== inst &&\n \"function\" === typeof inst.componentDidCatch &&\n (update.callback = function () {\n logCaughtError(root, fiber, errorInfo);\n \"function\" !== typeof getDerivedStateFromError &&\n (null === legacyErrorBoundariesThatAlreadyFailed\n ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))\n : legacyErrorBoundariesThatAlreadyFailed.add(this));\n var stack = errorInfo.stack;\n this.componentDidCatch(errorInfo.value, {\n componentStack: null !== stack ? stack : \"\"\n });\n });\n}\nfunction throwException(\n root,\n returnFiber,\n sourceFiber,\n value,\n rootRenderLanes\n) {\n sourceFiber.flags |= 32768;\n if (\n null !== value &&\n \"object\" === typeof value &&\n \"function\" === typeof value.then\n ) {\n returnFiber = sourceFiber.alternate;\n null !== returnFiber &&\n propagateParentContextChanges(\n returnFiber,\n sourceFiber,\n rootRenderLanes,\n !0\n );\n sourceFiber = suspenseHandlerStackCursor.current;\n if (null !== sourceFiber) {\n switch (sourceFiber.tag) {\n case 31:\n case 13:\n return (\n null === shellBoundary\n ? renderDidSuspendDelayIfPossible()\n : null === sourceFiber.alternate &&\n 0 === workInProgressRootExitStatus &&\n (workInProgressRootExitStatus = 3),\n (sourceFiber.flags &= -257),\n (sourceFiber.flags |= 65536),\n (sourceFiber.lanes = rootRenderLanes),\n value === noopSuspenseyCommitThenable\n ? (sourceFiber.flags |= 16384)\n : ((returnFiber = sourceFiber.updateQueue),\n null === returnFiber\n ? (sourceFiber.updateQueue = new Set([value]))\n : returnFiber.add(value),\n attachPingListener(root, value, rootRenderLanes)),\n !1\n );\n case 22:\n return (\n (sourceFiber.flags |= 65536),\n value === noopSuspenseyCommitThenable\n ? (sourceFiber.flags |= 16384)\n : ((returnFiber = sourceFiber.updateQueue),\n null === returnFiber\n ? ((returnFiber = {\n transitions: null,\n markerInstances: null,\n retryQueue: new Set([value])\n }),\n (sourceFiber.updateQueue = returnFiber))\n : ((sourceFiber = returnFiber.retryQueue),\n null === sourceFiber\n ? (returnFiber.retryQueue = new Set([value]))\n : sourceFiber.add(value)),\n attachPingListener(root, value, rootRenderLanes)),\n !1\n );\n }\n throw Error(formatProdErrorMessage(435, sourceFiber.tag));\n }\n attachPingListener(root, value, rootRenderLanes);\n renderDidSuspendDelayIfPossible();\n return !1;\n }\n if (isHydrating)\n return (\n (returnFiber = suspenseHandlerStackCursor.current),\n null !== returnFiber\n ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256),\n (returnFiber.flags |= 65536),\n (returnFiber.lanes = rootRenderLanes),\n value !== HydrationMismatchException &&\n ((root = Error(formatProdErrorMessage(422), { cause: value })),\n queueHydrationError(createCapturedValueAtFiber(root, sourceFiber))))\n : (value !== HydrationMismatchException &&\n ((returnFiber = Error(formatProdErrorMessage(423), {\n cause: value\n })),\n queueHydrationError(\n createCapturedValueAtFiber(returnFiber, sourceFiber)\n )),\n (root = root.current.alternate),\n (root.flags |= 65536),\n (rootRenderLanes &= -rootRenderLanes),\n (root.lanes |= rootRenderLanes),\n (value = createCapturedValueAtFiber(value, sourceFiber)),\n (rootRenderLanes = createRootErrorUpdate(\n root.stateNode,\n value,\n rootRenderLanes\n )),\n enqueueCapturedUpdate(root, rootRenderLanes),\n 4 !== workInProgressRootExitStatus &&\n (workInProgressRootExitStatus = 2)),\n !1\n );\n var wrapperError = Error(formatProdErrorMessage(520), { cause: value });\n wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber);\n null === workInProgressRootConcurrentErrors\n ? (workInProgressRootConcurrentErrors = [wrapperError])\n : workInProgressRootConcurrentErrors.push(wrapperError);\n 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2);\n if (null === returnFiber) return !0;\n value = createCapturedValueAtFiber(value, sourceFiber);\n sourceFiber = returnFiber;\n do {\n switch (sourceFiber.tag) {\n case 3:\n return (\n (sourceFiber.flags |= 65536),\n (root = rootRenderLanes & -rootRenderLanes),\n (sourceFiber.lanes |= root),\n (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)),\n enqueueCapturedUpdate(sourceFiber, root),\n !1\n );\n case 1:\n if (\n ((returnFiber = sourceFiber.type),\n (wrapperError = sourceFiber.stateNode),\n 0 === (sourceFiber.flags & 128) &&\n (\"function\" === typeof returnFiber.getDerivedStateFromError ||\n (null !== wrapperError &&\n \"function\" === typeof wrapperError.componentDidCatch &&\n (null === legacyErrorBoundariesThatAlreadyFailed ||\n !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError)))))\n )\n return (\n (sourceFiber.flags |= 65536),\n (rootRenderLanes &= -rootRenderLanes),\n (sourceFiber.lanes |= rootRenderLanes),\n (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)),\n initializeClassErrorUpdate(\n rootRenderLanes,\n root,\n sourceFiber,\n value\n ),\n enqueueCapturedUpdate(sourceFiber, rootRenderLanes),\n !1\n );\n }\n sourceFiber = sourceFiber.return;\n } while (null !== sourceFiber);\n return !1;\n}\nvar SelectiveHydrationException = Error(formatProdErrorMessage(461)),\n didReceiveUpdate = !1;\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n workInProgress.child =\n null === current\n ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)\n : reconcileChildFibers(\n workInProgress,\n current.child,\n nextChildren,\n renderLanes\n );\n}\nfunction updateForwardRef(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n Component = Component.render;\n var ref = workInProgress.ref;\n if (\"ref\" in nextProps) {\n var propsWithoutRef = {};\n for (var key in nextProps)\n \"ref\" !== key && (propsWithoutRef[key] = nextProps[key]);\n } else propsWithoutRef = nextProps;\n prepareToReadContext(workInProgress);\n nextProps = renderWithHooks(\n current,\n workInProgress,\n Component,\n propsWithoutRef,\n ref,\n renderLanes\n );\n key = checkDidRenderIdHook();\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n isHydrating && key && pushMaterializedTreeId(workInProgress);\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n return workInProgress.child;\n}\nfunction updateMemoComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n if (null === current) {\n var type = Component.type;\n if (\n \"function\" === typeof type &&\n !shouldConstruct(type) &&\n void 0 === type.defaultProps &&\n null === Component.compare\n )\n return (\n (workInProgress.tag = 15),\n (workInProgress.type = type),\n updateSimpleMemoComponent(\n current,\n workInProgress,\n type,\n nextProps,\n renderLanes\n )\n );\n current = createFiberFromTypeAndProps(\n Component.type,\n null,\n nextProps,\n workInProgress,\n workInProgress.mode,\n renderLanes\n );\n current.ref = workInProgress.ref;\n current.return = workInProgress;\n return (workInProgress.child = current);\n }\n type = current.child;\n if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n var prevProps = type.memoizedProps;\n Component = Component.compare;\n Component = null !== Component ? Component : shallowEqual;\n if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n workInProgress.flags |= 1;\n current = createWorkInProgress(type, nextProps);\n current.ref = workInProgress.ref;\n current.return = workInProgress;\n return (workInProgress.child = current);\n}\nfunction updateSimpleMemoComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n if (null !== current) {\n var prevProps = current.memoizedProps;\n if (\n shallowEqual(prevProps, nextProps) &&\n current.ref === workInProgress.ref\n )\n if (\n ((didReceiveUpdate = !1),\n (workInProgress.pendingProps = nextProps = prevProps),\n checkScheduledUpdateOrContext(current, renderLanes))\n )\n 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);\n else\n return (\n (workInProgress.lanes = current.lanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n }\n return updateFunctionComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n );\n}\nfunction updateOffscreenComponent(\n current,\n workInProgress,\n renderLanes,\n nextProps\n) {\n var nextChildren = nextProps.children,\n prevState = null !== current ? current.memoizedState : null;\n null === current &&\n null === workInProgress.stateNode &&\n (workInProgress.stateNode = {\n _visibility: 1,\n _pendingMarkers: null,\n _retryCache: null,\n _transitions: null\n });\n if (\"hidden\" === nextProps.mode) {\n if (0 !== (workInProgress.flags & 128)) {\n prevState =\n null !== prevState ? prevState.baseLanes | renderLanes : renderLanes;\n if (null !== current) {\n nextProps = workInProgress.child = current.child;\n for (nextChildren = 0; null !== nextProps; )\n (nextChildren =\n nextChildren | nextProps.lanes | nextProps.childLanes),\n (nextProps = nextProps.sibling);\n nextProps = nextChildren & ~prevState;\n } else (nextProps = 0), (workInProgress.child = null);\n return deferHiddenOffscreenComponent(\n current,\n workInProgress,\n prevState,\n renderLanes,\n nextProps\n );\n }\n if (0 !== (renderLanes & 536870912))\n (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),\n null !== current &&\n pushTransition(\n workInProgress,\n null !== prevState ? prevState.cachePool : null\n ),\n null !== prevState\n ? pushHiddenContext(workInProgress, prevState)\n : reuseHiddenContextOnStack(),\n pushOffscreenSuspenseHandler(workInProgress);\n else\n return (\n (nextProps = workInProgress.lanes = 536870912),\n deferHiddenOffscreenComponent(\n current,\n workInProgress,\n null !== prevState ? prevState.baseLanes | renderLanes : renderLanes,\n renderLanes,\n nextProps\n )\n );\n } else\n null !== prevState\n ? (pushTransition(workInProgress, prevState.cachePool),\n pushHiddenContext(workInProgress, prevState),\n reuseSuspenseHandlerOnStack(workInProgress),\n (workInProgress.memoizedState = null))\n : (null !== current && pushTransition(workInProgress, null),\n reuseHiddenContextOnStack(),\n reuseSuspenseHandlerOnStack(workInProgress));\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\nfunction bailoutOffscreenComponent(current, workInProgress) {\n (null !== current && 22 === current.tag) ||\n null !== workInProgress.stateNode ||\n (workInProgress.stateNode = {\n _visibility: 1,\n _pendingMarkers: null,\n _retryCache: null,\n _transitions: null\n });\n return workInProgress.sibling;\n}\nfunction deferHiddenOffscreenComponent(\n current,\n workInProgress,\n nextBaseLanes,\n renderLanes,\n remainingChildLanes\n) {\n var JSCompiler_inline_result = peekCacheFromPool();\n JSCompiler_inline_result =\n null === JSCompiler_inline_result\n ? null\n : { parent: CacheContext._currentValue, pool: JSCompiler_inline_result };\n workInProgress.memoizedState = {\n baseLanes: nextBaseLanes,\n cachePool: JSCompiler_inline_result\n };\n null !== current && pushTransition(workInProgress, null);\n reuseHiddenContextOnStack();\n pushOffscreenSuspenseHandler(workInProgress);\n null !== current &&\n propagateParentContextChanges(current, workInProgress, renderLanes, !0);\n workInProgress.childLanes = remainingChildLanes;\n return null;\n}\nfunction mountActivityChildren(workInProgress, nextProps) {\n nextProps = mountWorkInProgressOffscreenFiber(\n { mode: nextProps.mode, children: nextProps.children },\n workInProgress.mode\n );\n nextProps.ref = workInProgress.ref;\n workInProgress.child = nextProps;\n nextProps.return = workInProgress;\n return nextProps;\n}\nfunction retryActivityComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n) {\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n current = mountActivityChildren(workInProgress, workInProgress.pendingProps);\n current.flags |= 2;\n popSuspenseHandler(workInProgress);\n workInProgress.memoizedState = null;\n return current;\n}\nfunction updateActivityComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n didSuspend = 0 !== (workInProgress.flags & 128);\n workInProgress.flags &= -129;\n if (null === current) {\n if (isHydrating) {\n if (\"hidden\" === nextProps.mode)\n return (\n (current = mountActivityChildren(workInProgress, nextProps)),\n (workInProgress.lanes = 536870912),\n bailoutOffscreenComponent(null, current)\n );\n pushDehydratedActivitySuspenseHandler(workInProgress);\n (current = nextHydratableInstance)\n ? ((current = canHydrateHydrationBoundary(\n current,\n rootOrSingletonContext\n )),\n (current = null !== current && \"&\" === current.data ? current : null),\n null !== current &&\n ((workInProgress.memoizedState = {\n dehydrated: current,\n treeContext:\n null !== treeContextProvider\n ? { id: treeContextId, overflow: treeContextOverflow }\n : null,\n retryLane: 536870912,\n hydrationErrors: null\n }),\n (renderLanes = createFiberFromDehydratedFragment(current)),\n (renderLanes.return = workInProgress),\n (workInProgress.child = renderLanes),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = null)))\n : (current = null);\n if (null === current) throw throwOnHydrationMismatch(workInProgress);\n workInProgress.lanes = 536870912;\n return null;\n }\n return mountActivityChildren(workInProgress, nextProps);\n }\n var prevState = current.memoizedState;\n if (null !== prevState) {\n var dehydrated = prevState.dehydrated;\n pushDehydratedActivitySuspenseHandler(workInProgress);\n if (didSuspend)\n if (workInProgress.flags & 256)\n (workInProgress.flags &= -257),\n (workInProgress = retryActivityComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n ));\n else if (null !== workInProgress.memoizedState)\n (workInProgress.child = current.child),\n (workInProgress.flags |= 128),\n (workInProgress = null);\n else throw Error(formatProdErrorMessage(558));\n else if (\n (didReceiveUpdate ||\n propagateParentContextChanges(current, workInProgress, renderLanes, !1),\n (didSuspend = 0 !== (renderLanes & current.childLanes)),\n didReceiveUpdate || didSuspend)\n ) {\n nextProps = workInProgressRoot;\n if (\n null !== nextProps &&\n ((dehydrated = getBumpedLaneForHydration(nextProps, renderLanes)),\n 0 !== dehydrated && dehydrated !== prevState.retryLane)\n )\n throw (\n ((prevState.retryLane = dehydrated),\n enqueueConcurrentRenderForLane(current, dehydrated),\n scheduleUpdateOnFiber(nextProps, current, dehydrated),\n SelectiveHydrationException)\n );\n renderDidSuspendDelayIfPossible();\n workInProgress = retryActivityComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n );\n } else\n (current = prevState.treeContext),\n (nextHydratableInstance = getNextHydratable(dehydrated.nextSibling)),\n (hydrationParentFiber = workInProgress),\n (isHydrating = !0),\n (hydrationErrors = null),\n (rootOrSingletonContext = !1),\n null !== current &&\n restoreSuspendedTreeContext(workInProgress, current),\n (workInProgress = mountActivityChildren(workInProgress, nextProps)),\n (workInProgress.flags |= 4096);\n return workInProgress;\n }\n current = createWorkInProgress(current.child, {\n mode: nextProps.mode,\n children: nextProps.children\n });\n current.ref = workInProgress.ref;\n workInProgress.child = current;\n current.return = workInProgress;\n return current;\n}\nfunction markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n if (null === ref)\n null !== current &&\n null !== current.ref &&\n (workInProgress.flags |= 4194816);\n else {\n if (\"function\" !== typeof ref && \"object\" !== typeof ref)\n throw Error(formatProdErrorMessage(284));\n if (null === current || current.ref !== ref)\n workInProgress.flags |= 4194816;\n }\n}\nfunction updateFunctionComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n prepareToReadContext(workInProgress);\n Component = renderWithHooks(\n current,\n workInProgress,\n Component,\n nextProps,\n void 0,\n renderLanes\n );\n nextProps = checkDidRenderIdHook();\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n isHydrating && nextProps && pushMaterializedTreeId(workInProgress);\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, Component, renderLanes);\n return workInProgress.child;\n}\nfunction replayFunctionComponent(\n current,\n workInProgress,\n nextProps,\n Component,\n secondArg,\n renderLanes\n) {\n prepareToReadContext(workInProgress);\n workInProgress.updateQueue = null;\n nextProps = renderWithHooksAgain(\n workInProgress,\n Component,\n nextProps,\n secondArg\n );\n finishRenderingHooks(current);\n Component = checkDidRenderIdHook();\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n isHydrating && Component && pushMaterializedTreeId(workInProgress);\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n return workInProgress.child;\n}\nfunction updateClassComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n prepareToReadContext(workInProgress);\n if (null === workInProgress.stateNode) {\n var context = emptyContextObject,\n contextType = Component.contextType;\n \"object\" === typeof contextType &&\n null !== contextType &&\n (context = readContext(contextType));\n context = new Component(nextProps, context);\n workInProgress.memoizedState =\n null !== context.state && void 0 !== context.state ? context.state : null;\n context.updater = classComponentUpdater;\n workInProgress.stateNode = context;\n context._reactInternals = workInProgress;\n context = workInProgress.stateNode;\n context.props = nextProps;\n context.state = workInProgress.memoizedState;\n context.refs = {};\n initializeUpdateQueue(workInProgress);\n contextType = Component.contextType;\n context.context =\n \"object\" === typeof contextType && null !== contextType\n ? readContext(contextType)\n : emptyContextObject;\n context.state = workInProgress.memoizedState;\n contextType = Component.getDerivedStateFromProps;\n \"function\" === typeof contextType &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n contextType,\n nextProps\n ),\n (context.state = workInProgress.memoizedState));\n \"function\" === typeof Component.getDerivedStateFromProps ||\n \"function\" === typeof context.getSnapshotBeforeUpdate ||\n (\"function\" !== typeof context.UNSAFE_componentWillMount &&\n \"function\" !== typeof context.componentWillMount) ||\n ((contextType = context.state),\n \"function\" === typeof context.componentWillMount &&\n context.componentWillMount(),\n \"function\" === typeof context.UNSAFE_componentWillMount &&\n context.UNSAFE_componentWillMount(),\n contextType !== context.state &&\n classComponentUpdater.enqueueReplaceState(context, context.state, null),\n processUpdateQueue(workInProgress, nextProps, context, renderLanes),\n suspendIfUpdateReadFromEntangledAsyncAction(),\n (context.state = workInProgress.memoizedState));\n \"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308);\n nextProps = !0;\n } else if (null === current) {\n context = workInProgress.stateNode;\n var unresolvedOldProps = workInProgress.memoizedProps,\n oldProps = resolveClassComponentProps(Component, unresolvedOldProps);\n context.props = oldProps;\n var oldContext = context.context,\n contextType$jscomp$0 = Component.contextType;\n contextType = emptyContextObject;\n \"object\" === typeof contextType$jscomp$0 &&\n null !== contextType$jscomp$0 &&\n (contextType = readContext(contextType$jscomp$0));\n var getDerivedStateFromProps = Component.getDerivedStateFromProps;\n contextType$jscomp$0 =\n \"function\" === typeof getDerivedStateFromProps ||\n \"function\" === typeof context.getSnapshotBeforeUpdate;\n unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps;\n contextType$jscomp$0 ||\n (\"function\" !== typeof context.UNSAFE_componentWillReceiveProps &&\n \"function\" !== typeof context.componentWillReceiveProps) ||\n ((unresolvedOldProps || oldContext !== contextType) &&\n callComponentWillReceiveProps(\n workInProgress,\n context,\n nextProps,\n contextType\n ));\n hasForceUpdate = !1;\n var oldState = workInProgress.memoizedState;\n context.state = oldState;\n processUpdateQueue(workInProgress, nextProps, context, renderLanes);\n suspendIfUpdateReadFromEntangledAsyncAction();\n oldContext = workInProgress.memoizedState;\n unresolvedOldProps || oldState !== oldContext || hasForceUpdate\n ? (\"function\" === typeof getDerivedStateFromProps &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n getDerivedStateFromProps,\n nextProps\n ),\n (oldContext = workInProgress.memoizedState)),\n (oldProps =\n hasForceUpdate ||\n checkShouldComponentUpdate(\n workInProgress,\n Component,\n oldProps,\n nextProps,\n oldState,\n oldContext,\n contextType\n ))\n ? (contextType$jscomp$0 ||\n (\"function\" !== typeof context.UNSAFE_componentWillMount &&\n \"function\" !== typeof context.componentWillMount) ||\n (\"function\" === typeof context.componentWillMount &&\n context.componentWillMount(),\n \"function\" === typeof context.UNSAFE_componentWillMount &&\n context.UNSAFE_componentWillMount()),\n \"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308))\n : (\"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308),\n (workInProgress.memoizedProps = nextProps),\n (workInProgress.memoizedState = oldContext)),\n (context.props = nextProps),\n (context.state = oldContext),\n (context.context = contextType),\n (nextProps = oldProps))\n : (\"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308),\n (nextProps = !1));\n } else {\n context = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n contextType = workInProgress.memoizedProps;\n contextType$jscomp$0 = resolveClassComponentProps(Component, contextType);\n context.props = contextType$jscomp$0;\n getDerivedStateFromProps = workInProgress.pendingProps;\n oldState = context.context;\n oldContext = Component.contextType;\n oldProps = emptyContextObject;\n \"object\" === typeof oldContext &&\n null !== oldContext &&\n (oldProps = readContext(oldContext));\n unresolvedOldProps = Component.getDerivedStateFromProps;\n (oldContext =\n \"function\" === typeof unresolvedOldProps ||\n \"function\" === typeof context.getSnapshotBeforeUpdate) ||\n (\"function\" !== typeof context.UNSAFE_componentWillReceiveProps &&\n \"function\" !== typeof context.componentWillReceiveProps) ||\n ((contextType !== getDerivedStateFromProps || oldState !== oldProps) &&\n callComponentWillReceiveProps(\n workInProgress,\n context,\n nextProps,\n oldProps\n ));\n hasForceUpdate = !1;\n oldState = workInProgress.memoizedState;\n context.state = oldState;\n processUpdateQueue(workInProgress, nextProps, context, renderLanes);\n suspendIfUpdateReadFromEntangledAsyncAction();\n var newState = workInProgress.memoizedState;\n contextType !== getDerivedStateFromProps ||\n oldState !== newState ||\n hasForceUpdate ||\n (null !== current &&\n null !== current.dependencies &&\n checkIfContextChanged(current.dependencies))\n ? (\"function\" === typeof unresolvedOldProps &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n unresolvedOldProps,\n nextProps\n ),\n (newState = workInProgress.memoizedState)),\n (contextType$jscomp$0 =\n hasForceUpdate ||\n checkShouldComponentUpdate(\n workInProgress,\n Component,\n contextType$jscomp$0,\n nextProps,\n oldState,\n newState,\n oldProps\n ) ||\n (null !== current &&\n null !== current.dependencies &&\n checkIfContextChanged(current.dependencies)))\n ? (oldContext ||\n (\"function\" !== typeof context.UNSAFE_componentWillUpdate &&\n \"function\" !== typeof context.componentWillUpdate) ||\n (\"function\" === typeof context.componentWillUpdate &&\n context.componentWillUpdate(nextProps, newState, oldProps),\n \"function\" === typeof context.UNSAFE_componentWillUpdate &&\n context.UNSAFE_componentWillUpdate(\n nextProps,\n newState,\n oldProps\n )),\n \"function\" === typeof context.componentDidUpdate &&\n (workInProgress.flags |= 4),\n \"function\" === typeof context.getSnapshotBeforeUpdate &&\n (workInProgress.flags |= 1024))\n : (\"function\" !== typeof context.componentDidUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 4),\n \"function\" !== typeof context.getSnapshotBeforeUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 1024),\n (workInProgress.memoizedProps = nextProps),\n (workInProgress.memoizedState = newState)),\n (context.props = nextProps),\n (context.state = newState),\n (context.context = oldProps),\n (nextProps = contextType$jscomp$0))\n : (\"function\" !== typeof context.componentDidUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 4),\n \"function\" !== typeof context.getSnapshotBeforeUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 1024),\n (nextProps = !1));\n }\n context = nextProps;\n markRef(current, workInProgress);\n nextProps = 0 !== (workInProgress.flags & 128);\n context || nextProps\n ? ((context = workInProgress.stateNode),\n (Component =\n nextProps && \"function\" !== typeof Component.getDerivedStateFromError\n ? null\n : context.render()),\n (workInProgress.flags |= 1),\n null !== current && nextProps\n ? ((workInProgress.child = reconcileChildFibers(\n workInProgress,\n current.child,\n null,\n renderLanes\n )),\n (workInProgress.child = reconcileChildFibers(\n workInProgress,\n null,\n Component,\n renderLanes\n )))\n : reconcileChildren(current, workInProgress, Component, renderLanes),\n (workInProgress.memoizedState = context.state),\n (current = workInProgress.child))\n : (current = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n ));\n return current;\n}\nfunction mountHostRootWithoutHydrating(\n current,\n workInProgress,\n nextChildren,\n renderLanes\n) {\n resetHydrationState();\n workInProgress.flags |= 256;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\nvar SUSPENDED_MARKER = {\n dehydrated: null,\n treeContext: null,\n retryLane: 0,\n hydrationErrors: null\n};\nfunction mountSuspenseOffscreenState(renderLanes) {\n return { baseLanes: renderLanes, cachePool: getSuspendedCache() };\n}\nfunction getRemainingWorkInPrimaryTree(\n current,\n primaryTreeDidDefer,\n renderLanes\n) {\n current = null !== current ? current.childLanes & ~renderLanes : 0;\n primaryTreeDidDefer && (current |= workInProgressDeferredLane);\n return current;\n}\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n showFallback = !1,\n didSuspend = 0 !== (workInProgress.flags & 128),\n JSCompiler_temp;\n (JSCompiler_temp = didSuspend) ||\n (JSCompiler_temp =\n null !== current && null === current.memoizedState\n ? !1\n : 0 !== (suspenseStackCursor.current & 2));\n JSCompiler_temp && ((showFallback = !0), (workInProgress.flags &= -129));\n JSCompiler_temp = 0 !== (workInProgress.flags & 32);\n workInProgress.flags &= -33;\n if (null === current) {\n if (isHydrating) {\n showFallback\n ? pushPrimaryTreeSuspenseHandler(workInProgress)\n : reuseSuspenseHandlerOnStack(workInProgress);\n (current = nextHydratableInstance)\n ? ((current = canHydrateHydrationBoundary(\n current,\n rootOrSingletonContext\n )),\n (current = null !== current && \"&\" !== current.data ? current : null),\n null !== current &&\n ((workInProgress.memoizedState = {\n dehydrated: current,\n treeContext:\n null !== treeContextProvider\n ? { id: treeContextId, overflow: treeContextOverflow }\n : null,\n retryLane: 536870912,\n hydrationErrors: null\n }),\n (renderLanes = createFiberFromDehydratedFragment(current)),\n (renderLanes.return = workInProgress),\n (workInProgress.child = renderLanes),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = null)))\n : (current = null);\n if (null === current) throw throwOnHydrationMismatch(workInProgress);\n isSuspenseInstanceFallback(current)\n ? (workInProgress.lanes = 32)\n : (workInProgress.lanes = 536870912);\n return null;\n }\n var nextPrimaryChildren = nextProps.children;\n nextProps = nextProps.fallback;\n if (showFallback)\n return (\n reuseSuspenseHandlerOnStack(workInProgress),\n (showFallback = workInProgress.mode),\n (nextPrimaryChildren = mountWorkInProgressOffscreenFiber(\n { mode: \"hidden\", children: nextPrimaryChildren },\n showFallback\n )),\n (nextProps = createFiberFromFragment(\n nextProps,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.return = workInProgress),\n (nextPrimaryChildren.sibling = nextProps),\n (workInProgress.child = nextPrimaryChildren),\n (nextProps = workInProgress.child),\n (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)),\n (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n )),\n (workInProgress.memoizedState = SUSPENDED_MARKER),\n bailoutOffscreenComponent(null, nextProps)\n );\n pushPrimaryTreeSuspenseHandler(workInProgress);\n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);\n }\n var prevState = current.memoizedState;\n if (\n null !== prevState &&\n ((nextPrimaryChildren = prevState.dehydrated), null !== nextPrimaryChildren)\n ) {\n if (didSuspend)\n workInProgress.flags & 256\n ? (pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags &= -257),\n (workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n )))\n : null !== workInProgress.memoizedState\n ? (reuseSuspenseHandlerOnStack(workInProgress),\n (workInProgress.child = current.child),\n (workInProgress.flags |= 128),\n (workInProgress = null))\n : (reuseSuspenseHandlerOnStack(workInProgress),\n (nextPrimaryChildren = nextProps.fallback),\n (showFallback = workInProgress.mode),\n (nextProps = mountWorkInProgressOffscreenFiber(\n { mode: \"visible\", children: nextProps.children },\n showFallback\n )),\n (nextPrimaryChildren = createFiberFromFragment(\n nextPrimaryChildren,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.flags |= 2),\n (nextProps.return = workInProgress),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.sibling = nextPrimaryChildren),\n (workInProgress.child = nextProps),\n reconcileChildFibers(\n workInProgress,\n current.child,\n null,\n renderLanes\n ),\n (nextProps = workInProgress.child),\n (nextProps.memoizedState =\n mountSuspenseOffscreenState(renderLanes)),\n (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n )),\n (workInProgress.memoizedState = SUSPENDED_MARKER),\n (workInProgress = bailoutOffscreenComponent(null, nextProps)));\n else if (\n (pushPrimaryTreeSuspenseHandler(workInProgress),\n isSuspenseInstanceFallback(nextPrimaryChildren))\n ) {\n JSCompiler_temp =\n nextPrimaryChildren.nextSibling &&\n nextPrimaryChildren.nextSibling.dataset;\n if (JSCompiler_temp) var digest = JSCompiler_temp.dgst;\n JSCompiler_temp = digest;\n nextProps = Error(formatProdErrorMessage(419));\n nextProps.stack = \"\";\n nextProps.digest = JSCompiler_temp;\n queueHydrationError({ value: nextProps, source: null, stack: null });\n workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n );\n } else if (\n (didReceiveUpdate ||\n propagateParentContextChanges(current, workInProgress, renderLanes, !1),\n (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)),\n didReceiveUpdate || JSCompiler_temp)\n ) {\n JSCompiler_temp = workInProgressRoot;\n if (\n null !== JSCompiler_temp &&\n ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)),\n 0 !== nextProps && nextProps !== prevState.retryLane)\n )\n throw (\n ((prevState.retryLane = nextProps),\n enqueueConcurrentRenderForLane(current, nextProps),\n scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),\n SelectiveHydrationException)\n );\n isSuspenseInstancePending(nextPrimaryChildren) ||\n renderDidSuspendDelayIfPossible();\n workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n );\n } else\n isSuspenseInstancePending(nextPrimaryChildren)\n ? ((workInProgress.flags |= 192),\n (workInProgress.child = current.child),\n (workInProgress = null))\n : ((current = prevState.treeContext),\n (nextHydratableInstance = getNextHydratable(\n nextPrimaryChildren.nextSibling\n )),\n (hydrationParentFiber = workInProgress),\n (isHydrating = !0),\n (hydrationErrors = null),\n (rootOrSingletonContext = !1),\n null !== current &&\n restoreSuspendedTreeContext(workInProgress, current),\n (workInProgress = mountSuspensePrimaryChildren(\n workInProgress,\n nextProps.children\n )),\n (workInProgress.flags |= 4096));\n return workInProgress;\n }\n if (showFallback)\n return (\n reuseSuspenseHandlerOnStack(workInProgress),\n (nextPrimaryChildren = nextProps.fallback),\n (showFallback = workInProgress.mode),\n (prevState = current.child),\n (digest = prevState.sibling),\n (nextProps = createWorkInProgress(prevState, {\n mode: \"hidden\",\n children: nextProps.children\n })),\n (nextProps.subtreeFlags = prevState.subtreeFlags & 65011712),\n null !== digest\n ? (nextPrimaryChildren = createWorkInProgress(\n digest,\n nextPrimaryChildren\n ))\n : ((nextPrimaryChildren = createFiberFromFragment(\n nextPrimaryChildren,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.flags |= 2)),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.return = workInProgress),\n (nextProps.sibling = nextPrimaryChildren),\n (workInProgress.child = nextProps),\n bailoutOffscreenComponent(null, nextProps),\n (nextProps = workInProgress.child),\n (nextPrimaryChildren = current.child.memoizedState),\n null === nextPrimaryChildren\n ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))\n : ((showFallback = nextPrimaryChildren.cachePool),\n null !== showFallback\n ? ((prevState = CacheContext._currentValue),\n (showFallback =\n showFallback.parent !== prevState\n ? { parent: prevState, pool: prevState }\n : showFallback))\n : (showFallback = getSuspendedCache()),\n (nextPrimaryChildren = {\n baseLanes: nextPrimaryChildren.baseLanes | renderLanes,\n cachePool: showFallback\n })),\n (nextProps.memoizedState = nextPrimaryChildren),\n (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n )),\n (workInProgress.memoizedState = SUSPENDED_MARKER),\n bailoutOffscreenComponent(current.child, nextProps)\n );\n pushPrimaryTreeSuspenseHandler(workInProgress);\n renderLanes = current.child;\n current = renderLanes.sibling;\n renderLanes = createWorkInProgress(renderLanes, {\n mode: \"visible\",\n children: nextProps.children\n });\n renderLanes.return = workInProgress;\n renderLanes.sibling = null;\n null !== current &&\n ((JSCompiler_temp = workInProgress.deletions),\n null === JSCompiler_temp\n ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))\n : JSCompiler_temp.push(current));\n workInProgress.child = renderLanes;\n workInProgress.memoizedState = null;\n return renderLanes;\n}\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren) {\n primaryChildren = mountWorkInProgressOffscreenFiber(\n { mode: \"visible\", children: primaryChildren },\n workInProgress.mode\n );\n primaryChildren.return = workInProgress;\n return (workInProgress.child = primaryChildren);\n}\nfunction mountWorkInProgressOffscreenFiber(offscreenProps, mode) {\n offscreenProps = createFiberImplClass(22, offscreenProps, null, mode);\n offscreenProps.lanes = 0;\n return offscreenProps;\n}\nfunction retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n) {\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n current = mountSuspensePrimaryChildren(\n workInProgress,\n workInProgress.pendingProps.children\n );\n current.flags |= 2;\n workInProgress.memoizedState = null;\n return current;\n}\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n fiber.lanes |= renderLanes;\n var alternate = fiber.alternate;\n null !== alternate && (alternate.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\nfunction initSuspenseListRenderState(\n workInProgress,\n isBackwards,\n tail,\n lastContentRow,\n tailMode,\n treeForkCount\n) {\n var renderState = workInProgress.memoizedState;\n null === renderState\n ? (workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode,\n treeForkCount: treeForkCount\n })\n : ((renderState.isBackwards = isBackwards),\n (renderState.rendering = null),\n (renderState.renderingStartTime = 0),\n (renderState.last = lastContentRow),\n (renderState.tail = tail),\n (renderState.tailMode = tailMode),\n (renderState.treeForkCount = treeForkCount));\n}\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n revealOrder = nextProps.revealOrder,\n tailMode = nextProps.tail;\n nextProps = nextProps.children;\n var suspenseContext = suspenseStackCursor.current,\n shouldForceFallback = 0 !== (suspenseContext & 2);\n shouldForceFallback\n ? ((suspenseContext = (suspenseContext & 1) | 2),\n (workInProgress.flags |= 128))\n : (suspenseContext &= 1);\n push(suspenseStackCursor, suspenseContext);\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n nextProps = isHydrating ? treeForkCount : 0;\n if (!shouldForceFallback && null !== current && 0 !== (current.flags & 128))\n a: for (current = workInProgress.child; null !== current; ) {\n if (13 === current.tag)\n null !== current.memoizedState &&\n scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n else if (19 === current.tag)\n scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n else if (null !== current.child) {\n current.child.return = current;\n current = current.child;\n continue;\n }\n if (current === workInProgress) break a;\n for (; null === current.sibling; ) {\n if (null === current.return || current.return === workInProgress)\n break a;\n current = current.return;\n }\n current.sibling.return = current.return;\n current = current.sibling;\n }\n switch (revealOrder) {\n case \"forwards\":\n renderLanes = workInProgress.child;\n for (revealOrder = null; null !== renderLanes; )\n (current = renderLanes.alternate),\n null !== current &&\n null === findFirstSuspended(current) &&\n (revealOrder = renderLanes),\n (renderLanes = renderLanes.sibling);\n renderLanes = revealOrder;\n null === renderLanes\n ? ((revealOrder = workInProgress.child), (workInProgress.child = null))\n : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null));\n initSuspenseListRenderState(\n workInProgress,\n !1,\n revealOrder,\n renderLanes,\n tailMode,\n nextProps\n );\n break;\n case \"backwards\":\n case \"unstable_legacy-backwards\":\n renderLanes = null;\n revealOrder = workInProgress.child;\n for (workInProgress.child = null; null !== revealOrder; ) {\n current = revealOrder.alternate;\n if (null !== current && null === findFirstSuspended(current)) {\n workInProgress.child = revealOrder;\n break;\n }\n current = revealOrder.sibling;\n revealOrder.sibling = renderLanes;\n renderLanes = revealOrder;\n revealOrder = current;\n }\n initSuspenseListRenderState(\n workInProgress,\n !0,\n renderLanes,\n null,\n tailMode,\n nextProps\n );\n break;\n case \"together\":\n initSuspenseListRenderState(\n workInProgress,\n !1,\n null,\n null,\n void 0,\n nextProps\n );\n break;\n default:\n workInProgress.memoizedState = null;\n }\n return workInProgress.child;\n}\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n null !== current && (workInProgress.dependencies = current.dependencies);\n workInProgressRootSkippedLanes |= workInProgress.lanes;\n if (0 === (renderLanes & workInProgress.childLanes))\n if (null !== current) {\n if (\n (propagateParentContextChanges(\n current,\n workInProgress,\n renderLanes,\n !1\n ),\n 0 === (renderLanes & workInProgress.childLanes))\n )\n return null;\n } else return null;\n if (null !== current && workInProgress.child !== current.child)\n throw Error(formatProdErrorMessage(153));\n if (null !== workInProgress.child) {\n current = workInProgress.child;\n renderLanes = createWorkInProgress(current, current.pendingProps);\n workInProgress.child = renderLanes;\n for (renderLanes.return = workInProgress; null !== current.sibling; )\n (current = current.sibling),\n (renderLanes = renderLanes.sibling =\n createWorkInProgress(current, current.pendingProps)),\n (renderLanes.return = workInProgress);\n renderLanes.sibling = null;\n }\n return workInProgress.child;\n}\nfunction checkScheduledUpdateOrContext(current, renderLanes) {\n if (0 !== (current.lanes & renderLanes)) return !0;\n current = current.dependencies;\n return null !== current && checkIfContextChanged(current) ? !0 : !1;\n}\nfunction attemptEarlyBailoutIfNoScheduledUpdate(\n current,\n workInProgress,\n renderLanes\n) {\n switch (workInProgress.tag) {\n case 3:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n pushProvider(workInProgress, CacheContext, current.memoizedState.cache);\n resetHydrationState();\n break;\n case 27:\n case 5:\n pushHostContext(workInProgress);\n break;\n case 4:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n case 10:\n pushProvider(\n workInProgress,\n workInProgress.type,\n workInProgress.memoizedProps.value\n );\n break;\n case 31:\n if (null !== workInProgress.memoizedState)\n return (\n (workInProgress.flags |= 128),\n pushDehydratedActivitySuspenseHandler(workInProgress),\n null\n );\n break;\n case 13:\n var state$102 = workInProgress.memoizedState;\n if (null !== state$102) {\n if (null !== state$102.dehydrated)\n return (\n pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags |= 128),\n null\n );\n if (0 !== (renderLanes & workInProgress.child.childLanes))\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n pushPrimaryTreeSuspenseHandler(workInProgress);\n current = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n );\n return null !== current ? current.sibling : null;\n }\n pushPrimaryTreeSuspenseHandler(workInProgress);\n break;\n case 19:\n var didSuspendBefore = 0 !== (current.flags & 128);\n state$102 = 0 !== (renderLanes & workInProgress.childLanes);\n state$102 ||\n (propagateParentContextChanges(\n current,\n workInProgress,\n renderLanes,\n !1\n ),\n (state$102 = 0 !== (renderLanes & workInProgress.childLanes)));\n if (didSuspendBefore) {\n if (state$102)\n return updateSuspenseListComponent(\n current,\n workInProgress,\n renderLanes\n );\n workInProgress.flags |= 128;\n }\n didSuspendBefore = workInProgress.memoizedState;\n null !== didSuspendBefore &&\n ((didSuspendBefore.rendering = null),\n (didSuspendBefore.tail = null),\n (didSuspendBefore.lastEffect = null));\n push(suspenseStackCursor, suspenseStackCursor.current);\n if (state$102) break;\n else return null;\n case 22:\n return (\n (workInProgress.lanes = 0),\n updateOffscreenComponent(\n current,\n workInProgress,\n renderLanes,\n workInProgress.pendingProps\n )\n );\n case 24:\n pushProvider(workInProgress, CacheContext, current.memoizedState.cache);\n }\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\nfunction beginWork(current, workInProgress, renderLanes) {\n if (null !== current)\n if (current.memoizedProps !== workInProgress.pendingProps)\n didReceiveUpdate = !0;\n else {\n if (\n !checkScheduledUpdateOrContext(current, renderLanes) &&\n 0 === (workInProgress.flags & 128)\n )\n return (\n (didReceiveUpdate = !1),\n attemptEarlyBailoutIfNoScheduledUpdate(\n current,\n workInProgress,\n renderLanes\n )\n );\n didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;\n }\n else\n (didReceiveUpdate = !1),\n isHydrating &&\n 0 !== (workInProgress.flags & 1048576) &&\n pushTreeId(workInProgress, treeForkCount, workInProgress.index);\n workInProgress.lanes = 0;\n switch (workInProgress.tag) {\n case 16:\n a: {\n var props = workInProgress.pendingProps;\n current = resolveLazy(workInProgress.elementType);\n workInProgress.type = current;\n if (\"function\" === typeof current)\n shouldConstruct(current)\n ? ((props = resolveClassComponentProps(current, props)),\n (workInProgress.tag = 1),\n (workInProgress = updateClassComponent(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n )))\n : ((workInProgress.tag = 0),\n (workInProgress = updateFunctionComponent(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n )));\n else {\n if (void 0 !== current && null !== current) {\n var $$typeof = current.$$typeof;\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n workInProgress.tag = 11;\n workInProgress = updateForwardRef(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n );\n break a;\n } else if ($$typeof === REACT_MEMO_TYPE) {\n workInProgress.tag = 14;\n workInProgress = updateMemoComponent(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n );\n break a;\n }\n }\n workInProgress = getComponentNameFromType(current) || current;\n throw Error(formatProdErrorMessage(306, workInProgress, \"\"));\n }\n }\n return workInProgress;\n case 0:\n return updateFunctionComponent(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 1:\n return (\n (props = workInProgress.type),\n ($$typeof = resolveClassComponentProps(\n props,\n workInProgress.pendingProps\n )),\n updateClassComponent(\n current,\n workInProgress,\n props,\n $$typeof,\n renderLanes\n )\n );\n case 3:\n a: {\n pushHostContainer(\n workInProgress,\n workInProgress.stateNode.containerInfo\n );\n if (null === current) throw Error(formatProdErrorMessage(387));\n props = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n $$typeof = prevState.element;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, props, null, renderLanes);\n var nextState = workInProgress.memoizedState;\n props = nextState.cache;\n pushProvider(workInProgress, CacheContext, props);\n props !== prevState.cache &&\n propagateContextChanges(\n workInProgress,\n [CacheContext],\n renderLanes,\n !0\n );\n suspendIfUpdateReadFromEntangledAsyncAction();\n props = nextState.element;\n if (prevState.isDehydrated)\n if (\n ((prevState = {\n element: props,\n isDehydrated: !1,\n cache: nextState.cache\n }),\n (workInProgress.updateQueue.baseState = prevState),\n (workInProgress.memoizedState = prevState),\n workInProgress.flags & 256)\n ) {\n workInProgress = mountHostRootWithoutHydrating(\n current,\n workInProgress,\n props,\n renderLanes\n );\n break a;\n } else if (props !== $$typeof) {\n $$typeof = createCapturedValueAtFiber(\n Error(formatProdErrorMessage(424)),\n workInProgress\n );\n queueHydrationError($$typeof);\n workInProgress = mountHostRootWithoutHydrating(\n current,\n workInProgress,\n props,\n renderLanes\n );\n break a;\n } else {\n current = workInProgress.stateNode.containerInfo;\n switch (current.nodeType) {\n case 9:\n current = current.body;\n break;\n default:\n current =\n \"HTML\" === current.nodeName\n ? current.ownerDocument.body\n : current;\n }\n nextHydratableInstance = getNextHydratable(current.firstChild);\n hydrationParentFiber = workInProgress;\n isHydrating = !0;\n hydrationErrors = null;\n rootOrSingletonContext = !0;\n renderLanes = mountChildFibers(\n workInProgress,\n null,\n props,\n renderLanes\n );\n for (workInProgress.child = renderLanes; renderLanes; )\n (renderLanes.flags = (renderLanes.flags & -3) | 4096),\n (renderLanes = renderLanes.sibling);\n }\n else {\n resetHydrationState();\n if (props === $$typeof) {\n workInProgress = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n );\n break a;\n }\n reconcileChildren(current, workInProgress, props, renderLanes);\n }\n workInProgress = workInProgress.child;\n }\n return workInProgress;\n case 26:\n return (\n markRef(current, workInProgress),\n null === current\n ? (renderLanes = getResource(\n workInProgress.type,\n null,\n workInProgress.pendingProps,\n null\n ))\n ? (workInProgress.memoizedState = renderLanes)\n : isHydrating ||\n ((renderLanes = workInProgress.type),\n (current = workInProgress.pendingProps),\n (props = getOwnerDocumentFromRootContainer(\n rootInstanceStackCursor.current\n ).createElement(renderLanes)),\n (props[internalInstanceKey] = workInProgress),\n (props[internalPropsKey] = current),\n setInitialProperties(props, renderLanes, current),\n markNodeAsHoistable(props),\n (workInProgress.stateNode = props))\n : (workInProgress.memoizedState = getResource(\n workInProgress.type,\n current.memoizedProps,\n workInProgress.pendingProps,\n current.memoizedState\n )),\n null\n );\n case 27:\n return (\n pushHostContext(workInProgress),\n null === current &&\n isHydrating &&\n ((props = workInProgress.stateNode =\n resolveSingletonInstance(\n workInProgress.type,\n workInProgress.pendingProps,\n rootInstanceStackCursor.current\n )),\n (hydrationParentFiber = workInProgress),\n (rootOrSingletonContext = !0),\n ($$typeof = nextHydratableInstance),\n isSingletonScope(workInProgress.type)\n ? ((previousHydratableOnEnteringScopedSingleton = $$typeof),\n (nextHydratableInstance = getNextHydratable(props.firstChild)))\n : (nextHydratableInstance = $$typeof)),\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n markRef(current, workInProgress),\n null === current && (workInProgress.flags |= 4194304),\n workInProgress.child\n );\n case 5:\n if (null === current && isHydrating) {\n if (($$typeof = props = nextHydratableInstance))\n (props = canHydrateInstance(\n props,\n workInProgress.type,\n workInProgress.pendingProps,\n rootOrSingletonContext\n )),\n null !== props\n ? ((workInProgress.stateNode = props),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = getNextHydratable(props.firstChild)),\n (rootOrSingletonContext = !1),\n ($$typeof = !0))\n : ($$typeof = !1);\n $$typeof || throwOnHydrationMismatch(workInProgress);\n }\n pushHostContext(workInProgress);\n $$typeof = workInProgress.type;\n prevState = workInProgress.pendingProps;\n nextState = null !== current ? current.memoizedProps : null;\n props = prevState.children;\n shouldSetTextContent($$typeof, prevState)\n ? (props = null)\n : null !== nextState &&\n shouldSetTextContent($$typeof, nextState) &&\n (workInProgress.flags |= 32);\n null !== workInProgress.memoizedState &&\n (($$typeof = renderWithHooks(\n current,\n workInProgress,\n TransitionAwareHostComponent,\n null,\n null,\n renderLanes\n )),\n (HostTransitionContext._currentValue = $$typeof));\n markRef(current, workInProgress);\n reconcileChildren(current, workInProgress, props, renderLanes);\n return workInProgress.child;\n case 6:\n if (null === current && isHydrating) {\n if ((current = renderLanes = nextHydratableInstance))\n (renderLanes = canHydrateTextInstance(\n renderLanes,\n workInProgress.pendingProps,\n rootOrSingletonContext\n )),\n null !== renderLanes\n ? ((workInProgress.stateNode = renderLanes),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = null),\n (current = !0))\n : (current = !1);\n current || throwOnHydrationMismatch(workInProgress);\n }\n return null;\n case 13:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n case 4:\n return (\n pushHostContainer(\n workInProgress,\n workInProgress.stateNode.containerInfo\n ),\n (props = workInProgress.pendingProps),\n null === current\n ? (workInProgress.child = reconcileChildFibers(\n workInProgress,\n null,\n props,\n renderLanes\n ))\n : reconcileChildren(current, workInProgress, props, renderLanes),\n workInProgress.child\n );\n case 11:\n return updateForwardRef(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 7:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps,\n renderLanes\n ),\n workInProgress.child\n );\n case 8:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 12:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 10:\n return (\n (props = workInProgress.pendingProps),\n pushProvider(workInProgress, workInProgress.type, props.value),\n reconcileChildren(current, workInProgress, props.children, renderLanes),\n workInProgress.child\n );\n case 9:\n return (\n ($$typeof = workInProgress.type._context),\n (props = workInProgress.pendingProps.children),\n prepareToReadContext(workInProgress),\n ($$typeof = readContext($$typeof)),\n (props = props($$typeof)),\n (workInProgress.flags |= 1),\n reconcileChildren(current, workInProgress, props, renderLanes),\n workInProgress.child\n );\n case 14:\n return updateMemoComponent(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 15:\n return updateSimpleMemoComponent(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 19:\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n case 31:\n return updateActivityComponent(current, workInProgress, renderLanes);\n case 22:\n return updateOffscreenComponent(\n current,\n workInProgress,\n renderLanes,\n workInProgress.pendingProps\n );\n case 24:\n return (\n prepareToReadContext(workInProgress),\n (props = readContext(CacheContext)),\n null === current\n ? (($$typeof = peekCacheFromPool()),\n null === $$typeof &&\n (($$typeof = workInProgressRoot),\n (prevState = createCache()),\n ($$typeof.pooledCache = prevState),\n prevState.refCount++,\n null !== prevState && ($$typeof.pooledCacheLanes |= renderLanes),\n ($$typeof = prevState)),\n (workInProgress.memoizedState = { parent: props, cache: $$typeof }),\n initializeUpdateQueue(workInProgress),\n pushProvider(workInProgress, CacheContext, $$typeof))\n : (0 !== (current.lanes & renderLanes) &&\n (cloneUpdateQueue(current, workInProgress),\n processUpdateQueue(workInProgress, null, null, renderLanes),\n suspendIfUpdateReadFromEntangledAsyncAction()),\n ($$typeof = current.memoizedState),\n (prevState = workInProgress.memoizedState),\n $$typeof.parent !== props\n ? (($$typeof = { parent: props, cache: props }),\n (workInProgress.memoizedState = $$typeof),\n 0 === workInProgress.lanes &&\n (workInProgress.memoizedState =\n workInProgress.updateQueue.baseState =\n $$typeof),\n pushProvider(workInProgress, CacheContext, props))\n : ((props = prevState.cache),\n pushProvider(workInProgress, CacheContext, props),\n props !== $$typeof.cache &&\n propagateContextChanges(\n workInProgress,\n [CacheContext],\n renderLanes,\n !0\n ))),\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 29:\n throw workInProgress.pendingProps;\n }\n throw Error(formatProdErrorMessage(156, workInProgress.tag));\n}\nfunction markUpdate(workInProgress) {\n workInProgress.flags |= 4;\n}\nfunction preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n type,\n oldProps,\n newProps,\n renderLanes\n) {\n if ((type = 0 !== (workInProgress.mode & 32))) type = !1;\n if (type) {\n if (\n ((workInProgress.flags |= 16777216),\n (renderLanes & 335544128) === renderLanes)\n )\n if (workInProgress.stateNode.complete) workInProgress.flags |= 8192;\n else if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;\n else\n throw (\n ((suspendedThenable = noopSuspenseyCommitThenable),\n SuspenseyCommitException)\n );\n } else workInProgress.flags &= -16777217;\n}\nfunction preloadResourceAndSuspendIfNeeded(workInProgress, resource) {\n if (\"stylesheet\" !== resource.type || 0 !== (resource.state.loading & 4))\n workInProgress.flags &= -16777217;\n else if (((workInProgress.flags |= 16777216), !preloadResource(resource)))\n if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;\n else\n throw (\n ((suspendedThenable = noopSuspenseyCommitThenable),\n SuspenseyCommitException)\n );\n}\nfunction scheduleRetryEffect(workInProgress, retryQueue) {\n null !== retryQueue && (workInProgress.flags |= 4);\n workInProgress.flags & 16384 &&\n ((retryQueue =\n 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),\n (workInProgress.lanes |= retryQueue),\n (workInProgressSuspendedRetryLanes |= retryQueue));\n}\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n if (!isHydrating)\n switch (renderState.tailMode) {\n case \"hidden\":\n hasRenderedATailFallback = renderState.tail;\n for (var lastTailNode = null; null !== hasRenderedATailFallback; )\n null !== hasRenderedATailFallback.alternate &&\n (lastTailNode = hasRenderedATailFallback),\n (hasRenderedATailFallback = hasRenderedATailFallback.sibling);\n null === lastTailNode\n ? (renderState.tail = null)\n : (lastTailNode.sibling = null);\n break;\n case \"collapsed\":\n lastTailNode = renderState.tail;\n for (var lastTailNode$106 = null; null !== lastTailNode; )\n null !== lastTailNode.alternate && (lastTailNode$106 = lastTailNode),\n (lastTailNode = lastTailNode.sibling);\n null === lastTailNode$106\n ? hasRenderedATailFallback || null === renderState.tail\n ? (renderState.tail = null)\n : (renderState.tail.sibling = null)\n : (lastTailNode$106.sibling = null);\n }\n}\nfunction bubbleProperties(completedWork) {\n var didBailout =\n null !== completedWork.alternate &&\n completedWork.alternate.child === completedWork.child,\n newChildLanes = 0,\n subtreeFlags = 0;\n if (didBailout)\n for (var child$107 = completedWork.child; null !== child$107; )\n (newChildLanes |= child$107.lanes | child$107.childLanes),\n (subtreeFlags |= child$107.subtreeFlags & 65011712),\n (subtreeFlags |= child$107.flags & 65011712),\n (child$107.return = completedWork),\n (child$107 = child$107.sibling);\n else\n for (child$107 = completedWork.child; null !== child$107; )\n (newChildLanes |= child$107.lanes | child$107.childLanes),\n (subtreeFlags |= child$107.subtreeFlags),\n (subtreeFlags |= child$107.flags),\n (child$107.return = completedWork),\n (child$107 = child$107.sibling);\n completedWork.subtreeFlags |= subtreeFlags;\n completedWork.childLanes = newChildLanes;\n return didBailout;\n}\nfunction completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps;\n popTreeContext(workInProgress);\n switch (workInProgress.tag) {\n case 16:\n case 15:\n case 0:\n case 11:\n case 7:\n case 8:\n case 12:\n case 9:\n case 14:\n return bubbleProperties(workInProgress), null;\n case 1:\n return bubbleProperties(workInProgress), null;\n case 3:\n renderLanes = workInProgress.stateNode;\n newProps = null;\n null !== current && (newProps = current.memoizedState.cache);\n workInProgress.memoizedState.cache !== newProps &&\n (workInProgress.flags |= 2048);\n popProvider(CacheContext);\n popHostContainer();\n renderLanes.pendingContext &&\n ((renderLanes.context = renderLanes.pendingContext),\n (renderLanes.pendingContext = null));\n if (null === current || null === current.child)\n popHydrationState(workInProgress)\n ? markUpdate(workInProgress)\n : null === current ||\n (current.memoizedState.isDehydrated &&\n 0 === (workInProgress.flags & 256)) ||\n ((workInProgress.flags |= 1024),\n upgradeHydrationErrorsToRecoverable());\n bubbleProperties(workInProgress);\n return null;\n case 26:\n var type = workInProgress.type,\n nextResource = workInProgress.memoizedState;\n null === current\n ? (markUpdate(workInProgress),\n null !== nextResource\n ? (bubbleProperties(workInProgress),\n preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))\n : (bubbleProperties(workInProgress),\n preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n type,\n null,\n newProps,\n renderLanes\n )))\n : nextResource\n ? nextResource !== current.memoizedState\n ? (markUpdate(workInProgress),\n bubbleProperties(workInProgress),\n preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))\n : (bubbleProperties(workInProgress),\n (workInProgress.flags &= -16777217))\n : ((current = current.memoizedProps),\n current !== newProps && markUpdate(workInProgress),\n bubbleProperties(workInProgress),\n preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n type,\n current,\n newProps,\n renderLanes\n ));\n return null;\n case 27:\n popHostContext(workInProgress);\n renderLanes = rootInstanceStackCursor.current;\n type = workInProgress.type;\n if (null !== current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps && markUpdate(workInProgress);\n else {\n if (!newProps) {\n if (null === workInProgress.stateNode)\n throw Error(formatProdErrorMessage(166));\n bubbleProperties(workInProgress);\n return null;\n }\n current = contextStackCursor.current;\n popHydrationState(workInProgress)\n ? prepareToHydrateHostInstance(workInProgress, current)\n : ((current = resolveSingletonInstance(type, newProps, renderLanes)),\n (workInProgress.stateNode = current),\n markUpdate(workInProgress));\n }\n bubbleProperties(workInProgress);\n return null;\n case 5:\n popHostContext(workInProgress);\n type = workInProgress.type;\n if (null !== current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps && markUpdate(workInProgress);\n else {\n if (!newProps) {\n if (null === workInProgress.stateNode)\n throw Error(formatProdErrorMessage(166));\n bubbleProperties(workInProgress);\n return null;\n }\n nextResource = contextStackCursor.current;\n if (popHydrationState(workInProgress))\n prepareToHydrateHostInstance(workInProgress, nextResource);\n else {\n var ownerDocument = getOwnerDocumentFromRootContainer(\n rootInstanceStackCursor.current\n );\n switch (nextResource) {\n case 1:\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/2000/svg\",\n type\n );\n break;\n case 2:\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/1998/Math/MathML\",\n type\n );\n break;\n default:\n switch (type) {\n case \"svg\":\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/2000/svg\",\n type\n );\n break;\n case \"math\":\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/1998/Math/MathML\",\n type\n );\n break;\n case \"script\":\n nextResource = ownerDocument.createElement(\"div\");\n nextResource.innerHTML = \"<script>\\x3c/script>\";\n nextResource = nextResource.removeChild(\n nextResource.firstChild\n );\n break;\n case \"select\":\n nextResource =\n \"string\" === typeof newProps.is\n ? ownerDocument.createElement(\"select\", {\n is: newProps.is\n })\n : ownerDocument.createElement(\"select\");\n newProps.multiple\n ? (nextResource.multiple = !0)\n : newProps.size && (nextResource.size = newProps.size);\n break;\n default:\n nextResource =\n \"string\" === typeof newProps.is\n ? ownerDocument.createElement(type, { is: newProps.is })\n : ownerDocument.createElement(type);\n }\n }\n nextResource[internalInstanceKey] = workInProgress;\n nextResource[internalPropsKey] = newProps;\n a: for (\n ownerDocument = workInProgress.child;\n null !== ownerDocument;\n\n ) {\n if (5 === ownerDocument.tag || 6 === ownerDocument.tag)\n nextResource.appendChild(ownerDocument.stateNode);\n else if (\n 4 !== ownerDocument.tag &&\n 27 !== ownerDocument.tag &&\n null !== ownerDocument.child\n ) {\n ownerDocument.child.return = ownerDocument;\n ownerDocument = ownerDocument.child;\n continue;\n }\n if (ownerDocument === workInProgress) break a;\n for (; null === ownerDocument.sibling; ) {\n if (\n null === ownerDocument.return ||\n ownerDocument.return === workInProgress\n )\n break a;\n ownerDocument = ownerDocument.return;\n }\n ownerDocument.sibling.return = ownerDocument.return;\n ownerDocument = ownerDocument.sibling;\n }\n workInProgress.stateNode = nextResource;\n a: switch (\n (setInitialProperties(nextResource, type, newProps), type)\n ) {\n case \"button\":\n case \"input\":\n case \"select\":\n case \"textarea\":\n newProps = !!newProps.autoFocus;\n break a;\n case \"img\":\n newProps = !0;\n break a;\n default:\n newProps = !1;\n }\n newProps && markUpdate(workInProgress);\n }\n }\n bubbleProperties(workInProgress);\n preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n workInProgress.type,\n null === current ? null : current.memoizedProps,\n workInProgress.pendingProps,\n renderLanes\n );\n return null;\n case 6:\n if (current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps && markUpdate(workInProgress);\n else {\n if (\"string\" !== typeof newProps && null === workInProgress.stateNode)\n throw Error(formatProdErrorMessage(166));\n current = rootInstanceStackCursor.current;\n if (popHydrationState(workInProgress)) {\n current = workInProgress.stateNode;\n renderLanes = workInProgress.memoizedProps;\n newProps = null;\n type = hydrationParentFiber;\n if (null !== type)\n switch (type.tag) {\n case 27:\n case 5:\n newProps = type.memoizedProps;\n }\n current[internalInstanceKey] = workInProgress;\n current =\n current.nodeValue === renderLanes ||\n (null !== newProps && !0 === newProps.suppressHydrationWarning) ||\n checkForUnmatchedText(current.nodeValue, renderLanes)\n ? !0\n : !1;\n current || throwOnHydrationMismatch(workInProgress, !0);\n } else\n (current =\n getOwnerDocumentFromRootContainer(current).createTextNode(\n newProps\n )),\n (current[internalInstanceKey] = workInProgress),\n (workInProgress.stateNode = current);\n }\n bubbleProperties(workInProgress);\n return null;\n case 31:\n renderLanes = workInProgress.memoizedState;\n if (null === current || null !== current.memoizedState) {\n newProps = popHydrationState(workInProgress);\n if (null !== renderLanes) {\n if (null === current) {\n if (!newProps) throw Error(formatProdErrorMessage(318));\n current = workInProgress.memoizedState;\n current = null !== current ? current.dehydrated : null;\n if (!current) throw Error(formatProdErrorMessage(557));\n current[internalInstanceKey] = workInProgress;\n } else\n resetHydrationState(),\n 0 === (workInProgress.flags & 128) &&\n (workInProgress.memoizedState = null),\n (workInProgress.flags |= 4);\n bubbleProperties(workInProgress);\n current = !1;\n } else\n (renderLanes = upgradeHydrationErrorsToRecoverable()),\n null !== current &&\n null !== current.memoizedState &&\n (current.memoizedState.hydrationErrors = renderLanes),\n (current = !0);\n if (!current) {\n if (workInProgress.flags & 256)\n return popSuspenseHandler(workInProgress), workInProgress;\n popSuspenseHandler(workInProgress);\n return null;\n }\n if (0 !== (workInProgress.flags & 128))\n throw Error(formatProdErrorMessage(558));\n }\n bubbleProperties(workInProgress);\n return null;\n case 13:\n newProps = workInProgress.memoizedState;\n if (\n null === current ||\n (null !== current.memoizedState &&\n null !== current.memoizedState.dehydrated)\n ) {\n type = popHydrationState(workInProgress);\n if (null !== newProps && null !== newProps.dehydrated) {\n if (null === current) {\n if (!type) throw Error(formatProdErrorMessage(318));\n type = workInProgress.memoizedState;\n type = null !== type ? type.dehydrated : null;\n if (!type) throw Error(formatProdErrorMessage(317));\n type[internalInstanceKey] = workInProgress;\n } else\n resetHydrationState(),\n 0 === (workInProgress.flags & 128) &&\n (workInProgress.memoizedState = null),\n (workInProgress.flags |= 4);\n bubbleProperties(workInProgress);\n type = !1;\n } else\n (type = upgradeHydrationErrorsToRecoverable()),\n null !== current &&\n null !== current.memoizedState &&\n (current.memoizedState.hydrationErrors = type),\n (type = !0);\n if (!type) {\n if (workInProgress.flags & 256)\n return popSuspenseHandler(workInProgress), workInProgress;\n popSuspenseHandler(workInProgress);\n return null;\n }\n }\n popSuspenseHandler(workInProgress);\n if (0 !== (workInProgress.flags & 128))\n return (workInProgress.lanes = renderLanes), workInProgress;\n renderLanes = null !== newProps;\n current = null !== current && null !== current.memoizedState;\n renderLanes &&\n ((newProps = workInProgress.child),\n (type = null),\n null !== newProps.alternate &&\n null !== newProps.alternate.memoizedState &&\n null !== newProps.alternate.memoizedState.cachePool &&\n (type = newProps.alternate.memoizedState.cachePool.pool),\n (nextResource = null),\n null !== newProps.memoizedState &&\n null !== newProps.memoizedState.cachePool &&\n (nextResource = newProps.memoizedState.cachePool.pool),\n nextResource !== type && (newProps.flags |= 2048));\n renderLanes !== current &&\n renderLanes &&\n (workInProgress.child.flags |= 8192);\n scheduleRetryEffect(workInProgress, workInProgress.updateQueue);\n bubbleProperties(workInProgress);\n return null;\n case 4:\n return (\n popHostContainer(),\n null === current &&\n listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),\n bubbleProperties(workInProgress),\n null\n );\n case 10:\n return (\n popProvider(workInProgress.type), bubbleProperties(workInProgress), null\n );\n case 19:\n pop(suspenseStackCursor);\n newProps = workInProgress.memoizedState;\n if (null === newProps) return bubbleProperties(workInProgress), null;\n type = 0 !== (workInProgress.flags & 128);\n nextResource = newProps.rendering;\n if (null === nextResource)\n if (type) cutOffTailIfNeeded(newProps, !1);\n else {\n if (\n 0 !== workInProgressRootExitStatus ||\n (null !== current && 0 !== (current.flags & 128))\n )\n for (current = workInProgress.child; null !== current; ) {\n nextResource = findFirstSuspended(current);\n if (null !== nextResource) {\n workInProgress.flags |= 128;\n cutOffTailIfNeeded(newProps, !1);\n current = nextResource.updateQueue;\n workInProgress.updateQueue = current;\n scheduleRetryEffect(workInProgress, current);\n workInProgress.subtreeFlags = 0;\n current = renderLanes;\n for (renderLanes = workInProgress.child; null !== renderLanes; )\n resetWorkInProgress(renderLanes, current),\n (renderLanes = renderLanes.sibling);\n push(\n suspenseStackCursor,\n (suspenseStackCursor.current & 1) | 2\n );\n isHydrating &&\n pushTreeFork(workInProgress, newProps.treeForkCount);\n return workInProgress.child;\n }\n current = current.sibling;\n }\n null !== newProps.tail &&\n now() > workInProgressRootRenderTargetTime &&\n ((workInProgress.flags |= 128),\n (type = !0),\n cutOffTailIfNeeded(newProps, !1),\n (workInProgress.lanes = 4194304));\n }\n else {\n if (!type)\n if (\n ((current = findFirstSuspended(nextResource)), null !== current)\n ) {\n if (\n ((workInProgress.flags |= 128),\n (type = !0),\n (current = current.updateQueue),\n (workInProgress.updateQueue = current),\n scheduleRetryEffect(workInProgress, current),\n cutOffTailIfNeeded(newProps, !0),\n null === newProps.tail &&\n \"hidden\" === newProps.tailMode &&\n !nextResource.alternate &&\n !isHydrating)\n )\n return bubbleProperties(workInProgress), null;\n } else\n 2 * now() - newProps.renderingStartTime >\n workInProgressRootRenderTargetTime &&\n 536870912 !== renderLanes &&\n ((workInProgress.flags |= 128),\n (type = !0),\n cutOffTailIfNeeded(newProps, !1),\n (workInProgress.lanes = 4194304));\n newProps.isBackwards\n ? ((nextResource.sibling = workInProgress.child),\n (workInProgress.child = nextResource))\n : ((current = newProps.last),\n null !== current\n ? (current.sibling = nextResource)\n : (workInProgress.child = nextResource),\n (newProps.last = nextResource));\n }\n if (null !== newProps.tail)\n return (\n (current = newProps.tail),\n (newProps.rendering = current),\n (newProps.tail = current.sibling),\n (newProps.renderingStartTime = now()),\n (current.sibling = null),\n (renderLanes = suspenseStackCursor.current),\n push(\n suspenseStackCursor,\n type ? (renderLanes & 1) | 2 : renderLanes & 1\n ),\n isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount),\n current\n );\n bubbleProperties(workInProgress);\n return null;\n case 22:\n case 23:\n return (\n popSuspenseHandler(workInProgress),\n popHiddenContext(),\n (newProps = null !== workInProgress.memoizedState),\n null !== current\n ? (null !== current.memoizedState) !== newProps &&\n (workInProgress.flags |= 8192)\n : newProps && (workInProgress.flags |= 8192),\n newProps\n ? 0 !== (renderLanes & 536870912) &&\n 0 === (workInProgress.flags & 128) &&\n (bubbleProperties(workInProgress),\n workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))\n : bubbleProperties(workInProgress),\n (renderLanes = workInProgress.updateQueue),\n null !== renderLanes &&\n scheduleRetryEffect(workInProgress, renderLanes.retryQueue),\n (renderLanes = null),\n null !== current &&\n null !== current.memoizedState &&\n null !== current.memoizedState.cachePool &&\n (renderLanes = current.memoizedState.cachePool.pool),\n (newProps = null),\n null !== workInProgress.memoizedState &&\n null !== workInProgress.memoizedState.cachePool &&\n (newProps = workInProgress.memoizedState.cachePool.pool),\n newProps !== renderLanes && (workInProgress.flags |= 2048),\n null !== current && pop(resumedCache),\n null\n );\n case 24:\n return (\n (renderLanes = null),\n null !== current && (renderLanes = current.memoizedState.cache),\n workInProgress.memoizedState.cache !== renderLanes &&\n (workInProgress.flags |= 2048),\n popProvider(CacheContext),\n bubbleProperties(workInProgress),\n null\n );\n case 25:\n return null;\n case 30:\n return null;\n }\n throw Error(formatProdErrorMessage(156, workInProgress.tag));\n}\nfunction unwindWork(current, workInProgress) {\n popTreeContext(workInProgress);\n switch (workInProgress.tag) {\n case 1:\n return (\n (current = workInProgress.flags),\n current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 3:\n return (\n popProvider(CacheContext),\n popHostContainer(),\n (current = workInProgress.flags),\n 0 !== (current & 65536) && 0 === (current & 128)\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 26:\n case 27:\n case 5:\n return popHostContext(workInProgress), null;\n case 31:\n if (null !== workInProgress.memoizedState) {\n popSuspenseHandler(workInProgress);\n if (null === workInProgress.alternate)\n throw Error(formatProdErrorMessage(340));\n resetHydrationState();\n }\n current = workInProgress.flags;\n return current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null;\n case 13:\n popSuspenseHandler(workInProgress);\n current = workInProgress.memoizedState;\n if (null !== current && null !== current.dehydrated) {\n if (null === workInProgress.alternate)\n throw Error(formatProdErrorMessage(340));\n resetHydrationState();\n }\n current = workInProgress.flags;\n return current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null;\n case 19:\n return pop(suspenseStackCursor), null;\n case 4:\n return popHostContainer(), null;\n case 10:\n return popProvider(workInProgress.type), null;\n case 22:\n case 23:\n return (\n popSuspenseHandler(workInProgress),\n popHiddenContext(),\n null !== current && pop(resumedCache),\n (current = workInProgress.flags),\n current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 24:\n return popProvider(CacheContext), null;\n case 25:\n return null;\n default:\n return null;\n }\n}\nfunction unwindInterruptedWork(current, interruptedWork) {\n popTreeContext(interruptedWork);\n switch (interruptedWork.tag) {\n case 3:\n popProvider(CacheContext);\n popHostContainer();\n break;\n case 26:\n case 27:\n case 5:\n popHostContext(interruptedWork);\n break;\n case 4:\n popHostContainer();\n break;\n case 31:\n null !== interruptedWork.memoizedState &&\n popSuspenseHandler(interruptedWork);\n break;\n case 13:\n popSuspenseHandler(interruptedWork);\n break;\n case 19:\n pop(suspenseStackCursor);\n break;\n case 10:\n popProvider(interruptedWork.type);\n break;\n case 22:\n case 23:\n popSuspenseHandler(interruptedWork);\n popHiddenContext();\n null !== current && pop(resumedCache);\n break;\n case 24:\n popProvider(CacheContext);\n }\n}\nfunction commitHookEffectListMount(flags, finishedWork) {\n try {\n var updateQueue = finishedWork.updateQueue,\n lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;\n if (null !== lastEffect) {\n var firstEffect = lastEffect.next;\n updateQueue = firstEffect;\n do {\n if ((updateQueue.tag & flags) === flags) {\n lastEffect = void 0;\n var create = updateQueue.create,\n inst = updateQueue.inst;\n lastEffect = create();\n inst.destroy = lastEffect;\n }\n updateQueue = updateQueue.next;\n } while (updateQueue !== firstEffect);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitHookEffectListUnmount(\n flags,\n finishedWork,\n nearestMountedAncestor$jscomp$0\n) {\n try {\n var updateQueue = finishedWork.updateQueue,\n lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;\n if (null !== lastEffect) {\n var firstEffect = lastEffect.next;\n updateQueue = firstEffect;\n do {\n if ((updateQueue.tag & flags) === flags) {\n var inst = updateQueue.inst,\n destroy = inst.destroy;\n if (void 0 !== destroy) {\n inst.destroy = void 0;\n lastEffect = finishedWork;\n var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,\n destroy_ = destroy;\n try {\n destroy_();\n } catch (error) {\n captureCommitPhaseError(\n lastEffect,\n nearestMountedAncestor,\n error\n );\n }\n }\n }\n updateQueue = updateQueue.next;\n } while (updateQueue !== firstEffect);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitClassCallbacks(finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n if (null !== updateQueue) {\n var instance = finishedWork.stateNode;\n try {\n commitCallbacks(updateQueue, instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\nfunction safelyCallComponentWillUnmount(\n current,\n nearestMountedAncestor,\n instance\n) {\n instance.props = resolveClassComponentProps(\n current.type,\n current.memoizedProps\n );\n instance.state = current.memoizedState;\n try {\n instance.componentWillUnmount();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n try {\n var ref = current.ref;\n if (null !== ref) {\n switch (current.tag) {\n case 26:\n case 27:\n case 5:\n var instanceToUse = current.stateNode;\n break;\n case 30:\n instanceToUse = current.stateNode;\n break;\n default:\n instanceToUse = current.stateNode;\n }\n \"function\" === typeof ref\n ? (current.refCleanup = ref(instanceToUse))\n : (ref.current = instanceToUse);\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n var ref = current.ref,\n refCleanup = current.refCleanup;\n if (null !== ref)\n if (\"function\" === typeof refCleanup)\n try {\n refCleanup();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n } finally {\n (current.refCleanup = null),\n (current = current.alternate),\n null != current && (current.refCleanup = null);\n }\n else if (\"function\" === typeof ref)\n try {\n ref(null);\n } catch (error$140) {\n captureCommitPhaseError(current, nearestMountedAncestor, error$140);\n }\n else ref.current = null;\n}\nfunction commitHostMount(finishedWork) {\n var type = finishedWork.type,\n props = finishedWork.memoizedProps,\n instance = finishedWork.stateNode;\n try {\n a: switch (type) {\n case \"button\":\n case \"input\":\n case \"select\":\n case \"textarea\":\n props.autoFocus && instance.focus();\n break a;\n case \"img\":\n props.src\n ? (instance.src = props.src)\n : props.srcSet && (instance.srcset = props.srcSet);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitHostUpdate(finishedWork, newProps, oldProps) {\n try {\n var domElement = finishedWork.stateNode;\n updateProperties(domElement, finishedWork.type, oldProps, newProps);\n domElement[internalPropsKey] = newProps;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction isHostParent(fiber) {\n return (\n 5 === fiber.tag ||\n 3 === fiber.tag ||\n 26 === fiber.tag ||\n (27 === fiber.tag && isSingletonScope(fiber.type)) ||\n 4 === fiber.tag\n );\n}\nfunction getHostSibling(fiber) {\n a: for (;;) {\n for (; null === fiber.sibling; ) {\n if (null === fiber.return || isHostParent(fiber.return)) return null;\n fiber = fiber.return;\n }\n fiber.sibling.return = fiber.return;\n for (\n fiber = fiber.sibling;\n 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag;\n\n ) {\n if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;\n if (fiber.flags & 2) continue a;\n if (null === fiber.child || 4 === fiber.tag) continue a;\n else (fiber.child.return = fiber), (fiber = fiber.child);\n }\n if (!(fiber.flags & 2)) return fiber.stateNode;\n }\n}\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n if (5 === tag || 6 === tag)\n (node = node.stateNode),\n before\n ? (9 === parent.nodeType\n ? parent.body\n : \"HTML\" === parent.nodeName\n ? parent.ownerDocument.body\n : parent\n ).insertBefore(node, before)\n : ((before =\n 9 === parent.nodeType\n ? parent.body\n : \"HTML\" === parent.nodeName\n ? parent.ownerDocument.body\n : parent),\n before.appendChild(node),\n (parent = parent._reactRootContainer),\n (null !== parent && void 0 !== parent) ||\n null !== before.onclick ||\n (before.onclick = noop$1));\n else if (\n 4 !== tag &&\n (27 === tag &&\n isSingletonScope(node.type) &&\n ((parent = node.stateNode), (before = null)),\n (node = node.child),\n null !== node)\n )\n for (\n insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n node = node.sibling;\n null !== node;\n\n )\n insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n (node = node.sibling);\n}\nfunction insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n if (5 === tag || 6 === tag)\n (node = node.stateNode),\n before ? parent.insertBefore(node, before) : parent.appendChild(node);\n else if (\n 4 !== tag &&\n (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode),\n (node = node.child),\n null !== node)\n )\n for (\n insertOrAppendPlacementNode(node, before, parent), node = node.sibling;\n null !== node;\n\n )\n insertOrAppendPlacementNode(node, before, parent), (node = node.sibling);\n}\nfunction commitHostSingletonAcquisition(finishedWork) {\n var singleton = finishedWork.stateNode,\n props = finishedWork.memoizedProps;\n try {\n for (\n var type = finishedWork.type, attributes = singleton.attributes;\n attributes.length;\n\n )\n singleton.removeAttributeNode(attributes[0]);\n setInitialProperties(singleton, type, props);\n singleton[internalInstanceKey] = finishedWork;\n singleton[internalPropsKey] = props;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nvar offscreenSubtreeIsHidden = !1,\n offscreenSubtreeWasHidden = !1,\n needsFormReset = !1,\n PossiblyWeakSet = \"function\" === typeof WeakSet ? WeakSet : Set,\n nextEffect = null;\nfunction commitBeforeMutationEffects(root, firstChild) {\n root = root.containerInfo;\n eventsEnabled = _enabled;\n root = getActiveElementDeep(root);\n if (hasSelectionCapabilities(root)) {\n if (\"selectionStart\" in root)\n var JSCompiler_temp = {\n start: root.selectionStart,\n end: root.selectionEnd\n };\n else\n a: {\n JSCompiler_temp =\n ((JSCompiler_temp = root.ownerDocument) &&\n JSCompiler_temp.defaultView) ||\n window;\n var selection =\n JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();\n if (selection && 0 !== selection.rangeCount) {\n JSCompiler_temp = selection.anchorNode;\n var anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode;\n selection = selection.focusOffset;\n try {\n JSCompiler_temp.nodeType, focusNode.nodeType;\n } catch (e$20) {\n JSCompiler_temp = null;\n break a;\n }\n var length = 0,\n start = -1,\n end = -1,\n indexWithinAnchor = 0,\n indexWithinFocus = 0,\n node = root,\n parentNode = null;\n b: for (;;) {\n for (var next; ; ) {\n node !== JSCompiler_temp ||\n (0 !== anchorOffset && 3 !== node.nodeType) ||\n (start = length + anchorOffset);\n node !== focusNode ||\n (0 !== selection && 3 !== node.nodeType) ||\n (end = length + selection);\n 3 === node.nodeType && (length += node.nodeValue.length);\n if (null === (next = node.firstChild)) break;\n parentNode = node;\n node = next;\n }\n for (;;) {\n if (node === root) break b;\n parentNode === JSCompiler_temp &&\n ++indexWithinAnchor === anchorOffset &&\n (start = length);\n parentNode === focusNode &&\n ++indexWithinFocus === selection &&\n (end = length);\n if (null !== (next = node.nextSibling)) break;\n node = parentNode;\n parentNode = node.parentNode;\n }\n node = next;\n }\n JSCompiler_temp =\n -1 === start || -1 === end ? null : { start: start, end: end };\n } else JSCompiler_temp = null;\n }\n JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };\n } else JSCompiler_temp = null;\n selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp };\n _enabled = !1;\n for (nextEffect = firstChild; null !== nextEffect; )\n if (\n ((firstChild = nextEffect),\n (root = firstChild.child),\n 0 !== (firstChild.subtreeFlags & 1028) && null !== root)\n )\n (root.return = firstChild), (nextEffect = root);\n else\n for (; null !== nextEffect; ) {\n firstChild = nextEffect;\n focusNode = firstChild.alternate;\n root = firstChild.flags;\n switch (firstChild.tag) {\n case 0:\n if (\n 0 !== (root & 4) &&\n ((root = firstChild.updateQueue),\n (root = null !== root ? root.events : null),\n null !== root)\n )\n for (\n JSCompiler_temp = 0;\n JSCompiler_temp < root.length;\n JSCompiler_temp++\n )\n (anchorOffset = root[JSCompiler_temp]),\n (anchorOffset.ref.impl = anchorOffset.nextImpl);\n break;\n case 11:\n case 15:\n break;\n case 1:\n if (0 !== (root & 1024) && null !== focusNode) {\n root = void 0;\n JSCompiler_temp = firstChild;\n anchorOffset = focusNode.memoizedProps;\n focusNode = focusNode.memoizedState;\n selection = JSCompiler_temp.stateNode;\n try {\n var resolvedPrevProps = resolveClassComponentProps(\n JSCompiler_temp.type,\n anchorOffset\n );\n root = selection.getSnapshotBeforeUpdate(\n resolvedPrevProps,\n focusNode\n );\n selection.__reactInternalSnapshotBeforeUpdate = root;\n } catch (error) {\n captureCommitPhaseError(\n JSCompiler_temp,\n JSCompiler_temp.return,\n error\n );\n }\n }\n break;\n case 3:\n if (0 !== (root & 1024))\n if (\n ((root = firstChild.stateNode.containerInfo),\n (JSCompiler_temp = root.nodeType),\n 9 === JSCompiler_temp)\n )\n clearContainerSparingly(root);\n else if (1 === JSCompiler_temp)\n switch (root.nodeName) {\n case \"HEAD\":\n case \"HTML\":\n case \"BODY\":\n clearContainerSparingly(root);\n break;\n default:\n root.textContent = \"\";\n }\n break;\n case 5:\n case 26:\n case 27:\n case 6:\n case 4:\n case 17:\n break;\n default:\n if (0 !== (root & 1024)) throw Error(formatProdErrorMessage(163));\n }\n root = firstChild.sibling;\n if (null !== root) {\n root.return = firstChild.return;\n nextEffect = root;\n break;\n }\n nextEffect = firstChild.return;\n }\n}\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {\n var flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 4 && commitHookEffectListMount(5, finishedWork);\n break;\n case 1:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n if (flags & 4)\n if (((finishedRoot = finishedWork.stateNode), null === current))\n try {\n finishedRoot.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n else {\n var prevProps = resolveClassComponentProps(\n finishedWork.type,\n current.memoizedProps\n );\n current = current.memoizedState;\n try {\n finishedRoot.componentDidUpdate(\n prevProps,\n current,\n finishedRoot.__reactInternalSnapshotBeforeUpdate\n );\n } catch (error$139) {\n captureCommitPhaseError(\n finishedWork,\n finishedWork.return,\n error$139\n );\n }\n }\n flags & 64 && commitClassCallbacks(finishedWork);\n flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 3:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n if (\n flags & 64 &&\n ((finishedRoot = finishedWork.updateQueue), null !== finishedRoot)\n ) {\n current = null;\n if (null !== finishedWork.child)\n switch (finishedWork.child.tag) {\n case 27:\n case 5:\n current = finishedWork.child.stateNode;\n break;\n case 1:\n current = finishedWork.child.stateNode;\n }\n try {\n commitCallbacks(finishedRoot, current);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n break;\n case 27:\n null === current &&\n flags & 4 &&\n commitHostSingletonAcquisition(finishedWork);\n case 26:\n case 5:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n null === current && flags & 4 && commitHostMount(finishedWork);\n flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 12:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n break;\n case 31:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);\n break;\n case 13:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n flags & 64 &&\n ((finishedRoot = finishedWork.memoizedState),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.dehydrated),\n null !== finishedRoot &&\n ((finishedWork = retryDehydratedSuspenseBoundary.bind(\n null,\n finishedWork\n )),\n registerSuspenseInstanceRetry(finishedRoot, finishedWork))));\n break;\n case 22:\n flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;\n if (!flags) {\n current =\n (null !== current && null !== current.memoizedState) ||\n offscreenSubtreeWasHidden;\n prevProps = offscreenSubtreeIsHidden;\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = flags;\n (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden\n ? recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n 0 !== (finishedWork.subtreeFlags & 8772)\n )\n : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n offscreenSubtreeIsHidden = prevProps;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n }\n break;\n case 30:\n break;\n default:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n }\n}\nfunction detachFiberAfterEffects(fiber) {\n var alternate = fiber.alternate;\n null !== alternate &&\n ((fiber.alternate = null), detachFiberAfterEffects(alternate));\n fiber.child = null;\n fiber.deletions = null;\n fiber.sibling = null;\n 5 === fiber.tag &&\n ((alternate = fiber.stateNode),\n null !== alternate && detachDeletedInstance(alternate));\n fiber.stateNode = null;\n fiber.return = null;\n fiber.dependencies = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.stateNode = null;\n fiber.updateQueue = null;\n}\nvar hostParent = null,\n hostParentIsContainer = !1;\nfunction recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n parent\n) {\n for (parent = parent.child; null !== parent; )\n commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),\n (parent = parent.sibling);\n}\nfunction commitDeletionEffectsOnFiber(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n) {\n if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberUnmount)\n try {\n injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);\n } catch (err) {}\n switch (deletedFiber.tag) {\n case 26:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n deletedFiber.memoizedState\n ? deletedFiber.memoizedState.count--\n : deletedFiber.stateNode &&\n ((deletedFiber = deletedFiber.stateNode),\n deletedFiber.parentNode.removeChild(deletedFiber));\n break;\n case 27:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n var prevHostParent = hostParent,\n prevHostParentIsContainer = hostParentIsContainer;\n isSingletonScope(deletedFiber.type) &&\n ((hostParent = deletedFiber.stateNode), (hostParentIsContainer = !1));\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n releaseSingletonInstance(deletedFiber.stateNode);\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n break;\n case 5:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n case 6:\n prevHostParent = hostParent;\n prevHostParentIsContainer = hostParentIsContainer;\n hostParent = null;\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n if (null !== hostParent)\n if (hostParentIsContainer)\n try {\n (9 === hostParent.nodeType\n ? hostParent.body\n : \"HTML\" === hostParent.nodeName\n ? hostParent.ownerDocument.body\n : hostParent\n ).removeChild(deletedFiber.stateNode);\n } catch (error) {\n captureCommitPhaseError(\n deletedFiber,\n nearestMountedAncestor,\n error\n );\n }\n else\n try {\n hostParent.removeChild(deletedFiber.stateNode);\n } catch (error) {\n captureCommitPhaseError(\n deletedFiber,\n nearestMountedAncestor,\n error\n );\n }\n break;\n case 18:\n null !== hostParent &&\n (hostParentIsContainer\n ? ((finishedRoot = hostParent),\n clearHydrationBoundary(\n 9 === finishedRoot.nodeType\n ? finishedRoot.body\n : \"HTML\" === finishedRoot.nodeName\n ? finishedRoot.ownerDocument.body\n : finishedRoot,\n deletedFiber.stateNode\n ),\n retryIfBlockedOn(finishedRoot))\n : clearHydrationBoundary(hostParent, deletedFiber.stateNode));\n break;\n case 4:\n prevHostParent = hostParent;\n prevHostParentIsContainer = hostParentIsContainer;\n hostParent = deletedFiber.stateNode.containerInfo;\n hostParentIsContainer = !0;\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n break;\n case 0:\n case 11:\n case 14:\n case 15:\n commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor);\n offscreenSubtreeWasHidden ||\n commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor);\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 1:\n offscreenSubtreeWasHidden ||\n (safelyDetachRef(deletedFiber, nearestMountedAncestor),\n (prevHostParent = deletedFiber.stateNode),\n \"function\" === typeof prevHostParent.componentWillUnmount &&\n safelyCallComponentWillUnmount(\n deletedFiber,\n nearestMountedAncestor,\n prevHostParent\n ));\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 21:\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 22:\n offscreenSubtreeWasHidden =\n (prevHostParent = offscreenSubtreeWasHidden) ||\n null !== deletedFiber.memoizedState;\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n offscreenSubtreeWasHidden = prevHostParent;\n break;\n default:\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n }\n}\nfunction commitActivityHydrationCallbacks(finishedRoot, finishedWork) {\n if (\n null === finishedWork.memoizedState &&\n ((finishedRoot = finishedWork.alternate),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot))\n ) {\n finishedRoot = finishedRoot.dehydrated;\n try {\n retryIfBlockedOn(finishedRoot);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n if (\n null === finishedWork.memoizedState &&\n ((finishedRoot = finishedWork.alternate),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.memoizedState),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.dehydrated), null !== finishedRoot)))\n )\n try {\n retryIfBlockedOn(finishedRoot);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction getRetryCache(finishedWork) {\n switch (finishedWork.tag) {\n case 31:\n case 13:\n case 19:\n var retryCache = finishedWork.stateNode;\n null === retryCache &&\n (retryCache = finishedWork.stateNode = new PossiblyWeakSet());\n return retryCache;\n case 22:\n return (\n (finishedWork = finishedWork.stateNode),\n (retryCache = finishedWork._retryCache),\n null === retryCache &&\n (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),\n retryCache\n );\n default:\n throw Error(formatProdErrorMessage(435, finishedWork.tag));\n }\n}\nfunction attachSuspenseRetryListeners(finishedWork, wakeables) {\n var retryCache = getRetryCache(finishedWork);\n wakeables.forEach(function (wakeable) {\n if (!retryCache.has(wakeable)) {\n retryCache.add(wakeable);\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n wakeable.then(retry, retry);\n }\n });\n}\nfunction recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {\n var deletions = parentFiber.deletions;\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i],\n root = root$jscomp$0,\n returnFiber = parentFiber,\n parent = returnFiber;\n a: for (; null !== parent; ) {\n switch (parent.tag) {\n case 27:\n if (isSingletonScope(parent.type)) {\n hostParent = parent.stateNode;\n hostParentIsContainer = !1;\n break a;\n }\n break;\n case 5:\n hostParent = parent.stateNode;\n hostParentIsContainer = !1;\n break a;\n case 3:\n case 4:\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = !0;\n break a;\n }\n parent = parent.return;\n }\n if (null === hostParent) throw Error(formatProdErrorMessage(160));\n commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);\n hostParent = null;\n hostParentIsContainer = !1;\n root = childToDelete.alternate;\n null !== root && (root.return = null);\n childToDelete.return = null;\n }\n if (parentFiber.subtreeFlags & 13886)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),\n (parentFiber = parentFiber.sibling);\n}\nvar currentHoistableRoot = null;\nfunction commitMutationEffectsOnFiber(finishedWork, root) {\n var current = finishedWork.alternate,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n (commitHookEffectListUnmount(3, finishedWork, finishedWork.return),\n commitHookEffectListMount(3, finishedWork),\n commitHookEffectListUnmount(5, finishedWork, finishedWork.return));\n break;\n case 1:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n flags & 64 &&\n offscreenSubtreeIsHidden &&\n ((finishedWork = finishedWork.updateQueue),\n null !== finishedWork &&\n ((flags = finishedWork.callbacks),\n null !== flags &&\n ((current = finishedWork.shared.hiddenCallbacks),\n (finishedWork.shared.hiddenCallbacks =\n null === current ? flags : current.concat(flags)))));\n break;\n case 26:\n var hoistableRoot = currentHoistableRoot;\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n if (flags & 4) {\n var currentResource = null !== current ? current.memoizedState : null;\n flags = finishedWork.memoizedState;\n if (null === current)\n if (null === flags)\n if (null === finishedWork.stateNode) {\n a: {\n flags = finishedWork.type;\n current = finishedWork.memoizedProps;\n hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n b: switch (flags) {\n case \"title\":\n currentResource =\n hoistableRoot.getElementsByTagName(\"title\")[0];\n if (\n !currentResource ||\n currentResource[internalHoistableMarker] ||\n currentResource[internalInstanceKey] ||\n \"http://www.w3.org/2000/svg\" ===\n currentResource.namespaceURI ||\n currentResource.hasAttribute(\"itemprop\")\n )\n (currentResource = hoistableRoot.createElement(flags)),\n hoistableRoot.head.insertBefore(\n currentResource,\n hoistableRoot.querySelector(\"head > title\")\n );\n setInitialProperties(currentResource, flags, current);\n currentResource[internalInstanceKey] = finishedWork;\n markNodeAsHoistable(currentResource);\n flags = currentResource;\n break a;\n case \"link\":\n var maybeNodes = getHydratableHoistableCache(\n \"link\",\n \"href\",\n hoistableRoot\n ).get(flags + (current.href || \"\"));\n if (maybeNodes)\n for (var i = 0; i < maybeNodes.length; i++)\n if (\n ((currentResource = maybeNodes[i]),\n currentResource.getAttribute(\"href\") ===\n (null == current.href || \"\" === current.href\n ? null\n : current.href) &&\n currentResource.getAttribute(\"rel\") ===\n (null == current.rel ? null : current.rel) &&\n currentResource.getAttribute(\"title\") ===\n (null == current.title ? null : current.title) &&\n currentResource.getAttribute(\"crossorigin\") ===\n (null == current.crossOrigin\n ? null\n : current.crossOrigin))\n ) {\n maybeNodes.splice(i, 1);\n break b;\n }\n currentResource = hoistableRoot.createElement(flags);\n setInitialProperties(currentResource, flags, current);\n hoistableRoot.head.appendChild(currentResource);\n break;\n case \"meta\":\n if (\n (maybeNodes = getHydratableHoistableCache(\n \"meta\",\n \"content\",\n hoistableRoot\n ).get(flags + (current.content || \"\")))\n )\n for (i = 0; i < maybeNodes.length; i++)\n if (\n ((currentResource = maybeNodes[i]),\n currentResource.getAttribute(\"content\") ===\n (null == current.content\n ? null\n : \"\" + current.content) &&\n currentResource.getAttribute(\"name\") ===\n (null == current.name ? null : current.name) &&\n currentResource.getAttribute(\"property\") ===\n (null == current.property\n ? null\n : current.property) &&\n currentResource.getAttribute(\"http-equiv\") ===\n (null == current.httpEquiv\n ? null\n : current.httpEquiv) &&\n currentResource.getAttribute(\"charset\") ===\n (null == current.charSet\n ? null\n : current.charSet))\n ) {\n maybeNodes.splice(i, 1);\n break b;\n }\n currentResource = hoistableRoot.createElement(flags);\n setInitialProperties(currentResource, flags, current);\n hoistableRoot.head.appendChild(currentResource);\n break;\n default:\n throw Error(formatProdErrorMessage(468, flags));\n }\n currentResource[internalInstanceKey] = finishedWork;\n markNodeAsHoistable(currentResource);\n flags = currentResource;\n }\n finishedWork.stateNode = flags;\n } else\n mountHoistable(\n hoistableRoot,\n finishedWork.type,\n finishedWork.stateNode\n );\n else\n finishedWork.stateNode = acquireResource(\n hoistableRoot,\n flags,\n finishedWork.memoizedProps\n );\n else\n currentResource !== flags\n ? (null === currentResource\n ? null !== current.stateNode &&\n ((current = current.stateNode),\n current.parentNode.removeChild(current))\n : currentResource.count--,\n null === flags\n ? mountHoistable(\n hoistableRoot,\n finishedWork.type,\n finishedWork.stateNode\n )\n : acquireResource(\n hoistableRoot,\n flags,\n finishedWork.memoizedProps\n ))\n : null === flags &&\n null !== finishedWork.stateNode &&\n commitHostUpdate(\n finishedWork,\n finishedWork.memoizedProps,\n current.memoizedProps\n );\n }\n break;\n case 27:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n null !== current &&\n flags & 4 &&\n commitHostUpdate(\n finishedWork,\n finishedWork.memoizedProps,\n current.memoizedProps\n );\n break;\n case 5:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n if (finishedWork.flags & 32) {\n hoistableRoot = finishedWork.stateNode;\n try {\n setTextContent(hoistableRoot, \"\");\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n flags & 4 &&\n null != finishedWork.stateNode &&\n ((hoistableRoot = finishedWork.memoizedProps),\n commitHostUpdate(\n finishedWork,\n hoistableRoot,\n null !== current ? current.memoizedProps : hoistableRoot\n ));\n flags & 1024 && (needsFormReset = !0);\n break;\n case 6:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & 4) {\n if (null === finishedWork.stateNode)\n throw Error(formatProdErrorMessage(162));\n flags = finishedWork.memoizedProps;\n current = finishedWork.stateNode;\n try {\n current.nodeValue = flags;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n break;\n case 3:\n tagCaches = null;\n hoistableRoot = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(root.containerInfo);\n recursivelyTraverseMutationEffects(root, finishedWork);\n currentHoistableRoot = hoistableRoot;\n commitReconciliationEffects(finishedWork);\n if (flags & 4 && null !== current && current.memoizedState.isDehydrated)\n try {\n retryIfBlockedOn(root.containerInfo);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n needsFormReset &&\n ((needsFormReset = !1), recursivelyResetForms(finishedWork));\n break;\n case 4:\n flags = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(\n finishedWork.stateNode.containerInfo\n );\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n currentHoistableRoot = flags;\n break;\n case 12:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n break;\n case 31:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 13:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n finishedWork.child.flags & 8192 &&\n (null !== finishedWork.memoizedState) !==\n (null !== current && null !== current.memoizedState) &&\n (globalMostRecentFallbackTime = now());\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 22:\n hoistableRoot = null !== finishedWork.memoizedState;\n var wasHidden = null !== current && null !== current.memoizedState,\n prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,\n prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;\n recursivelyTraverseMutationEffects(root, finishedWork);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n commitReconciliationEffects(finishedWork);\n if (flags & 8192)\n a: for (\n root = finishedWork.stateNode,\n root._visibility = hoistableRoot\n ? root._visibility & -2\n : root._visibility | 1,\n hoistableRoot &&\n (null === current ||\n wasHidden ||\n offscreenSubtreeIsHidden ||\n offscreenSubtreeWasHidden ||\n recursivelyTraverseDisappearLayoutEffects(finishedWork)),\n current = null,\n root = finishedWork;\n ;\n\n ) {\n if (5 === root.tag || 26 === root.tag) {\n if (null === current) {\n wasHidden = current = root;\n try {\n if (((currentResource = wasHidden.stateNode), hoistableRoot))\n (maybeNodes = currentResource.style),\n \"function\" === typeof maybeNodes.setProperty\n ? maybeNodes.setProperty(\"display\", \"none\", \"important\")\n : (maybeNodes.display = \"none\");\n else {\n i = wasHidden.stateNode;\n var styleProp = wasHidden.memoizedProps.style,\n display =\n void 0 !== styleProp &&\n null !== styleProp &&\n styleProp.hasOwnProperty(\"display\")\n ? styleProp.display\n : null;\n i.style.display =\n null == display || \"boolean\" === typeof display\n ? \"\"\n : (\"\" + display).trim();\n }\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (6 === root.tag) {\n if (null === current) {\n wasHidden = root;\n try {\n wasHidden.stateNode.nodeValue = hoistableRoot\n ? \"\"\n : wasHidden.memoizedProps;\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (18 === root.tag) {\n if (null === current) {\n wasHidden = root;\n try {\n var instance = wasHidden.stateNode;\n hoistableRoot\n ? hideOrUnhideDehydratedBoundary(instance, !0)\n : hideOrUnhideDehydratedBoundary(wasHidden.stateNode, !1);\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (\n ((22 !== root.tag && 23 !== root.tag) ||\n null === root.memoizedState ||\n root === finishedWork) &&\n null !== root.child\n ) {\n root.child.return = root;\n root = root.child;\n continue;\n }\n if (root === finishedWork) break a;\n for (; null === root.sibling; ) {\n if (null === root.return || root.return === finishedWork) break a;\n current === root && (current = null);\n root = root.return;\n }\n current === root && (current = null);\n root.sibling.return = root.return;\n root = root.sibling;\n }\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((current = flags.retryQueue),\n null !== current &&\n ((flags.retryQueue = null),\n attachSuspenseRetryListeners(finishedWork, current))));\n break;\n case 19:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 30:\n break;\n case 21:\n break;\n default:\n recursivelyTraverseMutationEffects(root, finishedWork),\n commitReconciliationEffects(finishedWork);\n }\n}\nfunction commitReconciliationEffects(finishedWork) {\n var flags = finishedWork.flags;\n if (flags & 2) {\n try {\n for (\n var hostParentFiber, parentFiber = finishedWork.return;\n null !== parentFiber;\n\n ) {\n if (isHostParent(parentFiber)) {\n hostParentFiber = parentFiber;\n break;\n }\n parentFiber = parentFiber.return;\n }\n if (null == hostParentFiber) throw Error(formatProdErrorMessage(160));\n switch (hostParentFiber.tag) {\n case 27:\n var parent = hostParentFiber.stateNode,\n before = getHostSibling(finishedWork);\n insertOrAppendPlacementNode(finishedWork, before, parent);\n break;\n case 5:\n var parent$141 = hostParentFiber.stateNode;\n hostParentFiber.flags & 32 &&\n (setTextContent(parent$141, \"\"), (hostParentFiber.flags &= -33));\n var before$142 = getHostSibling(finishedWork);\n insertOrAppendPlacementNode(finishedWork, before$142, parent$141);\n break;\n case 3:\n case 4:\n var parent$143 = hostParentFiber.stateNode.containerInfo,\n before$144 = getHostSibling(finishedWork);\n insertOrAppendPlacementNodeIntoContainer(\n finishedWork,\n before$144,\n parent$143\n );\n break;\n default:\n throw Error(formatProdErrorMessage(161));\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n finishedWork.flags &= -3;\n }\n flags & 4096 && (finishedWork.flags &= -4097);\n}\nfunction recursivelyResetForms(parentFiber) {\n if (parentFiber.subtreeFlags & 1024)\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var fiber = parentFiber;\n recursivelyResetForms(fiber);\n 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseLayoutEffects(root, parentFiber) {\n if (parentFiber.subtreeFlags & 8772)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction recursivelyTraverseDisappearLayoutEffects(parentFiber) {\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedWork = parentFiber;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n commitHookEffectListUnmount(4, finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 1:\n safelyDetachRef(finishedWork, finishedWork.return);\n var instance = finishedWork.stateNode;\n \"function\" === typeof instance.componentWillUnmount &&\n safelyCallComponentWillUnmount(\n finishedWork,\n finishedWork.return,\n instance\n );\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 27:\n releaseSingletonInstance(finishedWork.stateNode);\n case 26:\n case 5:\n safelyDetachRef(finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 22:\n null === finishedWork.memoizedState &&\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 30:\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n default:\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseReappearLayoutEffects(\n finishedRoot$jscomp$0,\n parentFiber,\n includeWorkInProgressEffects\n) {\n includeWorkInProgressEffects =\n includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var current = parentFiber.alternate,\n finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n commitHookEffectListMount(4, finishedWork);\n break;\n case 1:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n current = finishedWork;\n finishedRoot = current.stateNode;\n if (\"function\" === typeof finishedRoot.componentDidMount)\n try {\n finishedRoot.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(current, current.return, error);\n }\n current = finishedWork;\n finishedRoot = current.updateQueue;\n if (null !== finishedRoot) {\n var instance = current.stateNode;\n try {\n var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks;\n if (null !== hiddenCallbacks)\n for (\n finishedRoot.shared.hiddenCallbacks = null, finishedRoot = 0;\n finishedRoot < hiddenCallbacks.length;\n finishedRoot++\n )\n callCallback(hiddenCallbacks[finishedRoot], instance);\n } catch (error) {\n captureCommitPhaseError(current, current.return, error);\n }\n }\n includeWorkInProgressEffects &&\n flags & 64 &&\n commitClassCallbacks(finishedWork);\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 27:\n commitHostSingletonAcquisition(finishedWork);\n case 26:\n case 5:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n null === current &&\n flags & 4 &&\n commitHostMount(finishedWork);\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 12:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n break;\n case 31:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n flags & 4 &&\n commitActivityHydrationCallbacks(finishedRoot, finishedWork);\n break;\n case 13:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n flags & 4 &&\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n break;\n case 22:\n null === finishedWork.memoizedState &&\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 30:\n break;\n default:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction commitOffscreenPassiveMountEffects(current, finishedWork) {\n var previousCache = null;\n null !== current &&\n null !== current.memoizedState &&\n null !== current.memoizedState.cachePool &&\n (previousCache = current.memoizedState.cachePool.pool);\n current = null;\n null !== finishedWork.memoizedState &&\n null !== finishedWork.memoizedState.cachePool &&\n (current = finishedWork.memoizedState.cachePool.pool);\n current !== previousCache &&\n (null != current && current.refCount++,\n null != previousCache && releaseCache(previousCache));\n}\nfunction commitCachePassiveMountEffect(current, finishedWork) {\n current = null;\n null !== finishedWork.alternate &&\n (current = finishedWork.alternate.memoizedState.cache);\n finishedWork = finishedWork.memoizedState.cache;\n finishedWork !== current &&\n (finishedWork.refCount++, null != current && releaseCache(current));\n}\nfunction recursivelyTraversePassiveMountEffects(\n root,\n parentFiber,\n committedLanes,\n committedTransitions\n) {\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitPassiveMountOnFiber(\n root,\n parentFiber,\n committedLanes,\n committedTransitions\n ),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveMountOnFiber(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n) {\n var flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n flags & 2048 && commitHookEffectListMount(9, finishedWork);\n break;\n case 1:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 3:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n flags & 2048 &&\n ((finishedRoot = null),\n null !== finishedWork.alternate &&\n (finishedRoot = finishedWork.alternate.memoizedState.cache),\n (finishedWork = finishedWork.memoizedState.cache),\n finishedWork !== finishedRoot &&\n (finishedWork.refCount++,\n null != finishedRoot && releaseCache(finishedRoot)));\n break;\n case 12:\n if (flags & 2048) {\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n finishedRoot = finishedWork.stateNode;\n try {\n var _finishedWork$memoize2 = finishedWork.memoizedProps,\n id = _finishedWork$memoize2.id,\n onPostCommit = _finishedWork$memoize2.onPostCommit;\n \"function\" === typeof onPostCommit &&\n onPostCommit(\n id,\n null === finishedWork.alternate ? \"mount\" : \"update\",\n finishedRoot.passiveEffectDuration,\n -0\n );\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n } else\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 31:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 13:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 23:\n break;\n case 22:\n _finishedWork$memoize2 = finishedWork.stateNode;\n id = finishedWork.alternate;\n null !== finishedWork.memoizedState\n ? _finishedWork$memoize2._visibility & 2\n ? recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n )\n : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork)\n : _finishedWork$memoize2._visibility & 2\n ? recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n )\n : ((_finishedWork$memoize2._visibility |= 2),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n 0 !== (finishedWork.subtreeFlags & 10256) || !1\n ));\n flags & 2048 && commitOffscreenPassiveMountEffects(id, finishedWork);\n break;\n case 24:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n flags & 2048 &&\n commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n break;\n default:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n }\n}\nfunction recursivelyTraverseReconnectPassiveEffects(\n finishedRoot$jscomp$0,\n parentFiber,\n committedLanes$jscomp$0,\n committedTransitions$jscomp$0,\n includeWorkInProgressEffects\n) {\n includeWorkInProgressEffects =\n includeWorkInProgressEffects &&\n (0 !== (parentFiber.subtreeFlags & 10256) || !1);\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber,\n committedLanes = committedLanes$jscomp$0,\n committedTransitions = committedTransitions$jscomp$0,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n );\n commitHookEffectListMount(8, finishedWork);\n break;\n case 23:\n break;\n case 22:\n var instance = finishedWork.stateNode;\n null !== finishedWork.memoizedState\n ? instance._visibility & 2\n ? recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n )\n : recursivelyTraverseAtomicPassiveEffects(\n finishedRoot,\n finishedWork\n )\n : ((instance._visibility |= 2),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n ));\n includeWorkInProgressEffects &&\n flags & 2048 &&\n commitOffscreenPassiveMountEffects(\n finishedWork.alternate,\n finishedWork\n );\n break;\n case 24:\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n flags & 2048 &&\n commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n break;\n default:\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n );\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseAtomicPassiveEffects(\n finishedRoot$jscomp$0,\n parentFiber\n) {\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 22:\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n flags & 2048 &&\n commitOffscreenPassiveMountEffects(\n finishedWork.alternate,\n finishedWork\n );\n break;\n case 24:\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n flags & 2048 &&\n commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n break;\n default:\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nvar suspenseyCommitFlag = 8192;\nfunction recursivelyAccumulateSuspenseyCommit(\n parentFiber,\n committedLanes,\n suspendedState\n) {\n if (parentFiber.subtreeFlags & suspenseyCommitFlag)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n accumulateSuspenseyCommitOnFiber(\n parentFiber,\n committedLanes,\n suspendedState\n ),\n (parentFiber = parentFiber.sibling);\n}\nfunction accumulateSuspenseyCommitOnFiber(\n fiber,\n committedLanes,\n suspendedState\n) {\n switch (fiber.tag) {\n case 26:\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n fiber.flags & suspenseyCommitFlag &&\n null !== fiber.memoizedState &&\n suspendResource(\n suspendedState,\n currentHoistableRoot,\n fiber.memoizedState,\n fiber.memoizedProps\n );\n break;\n case 5:\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n break;\n case 3:\n case 4:\n var previousHoistableRoot = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(fiber.stateNode.containerInfo);\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n currentHoistableRoot = previousHoistableRoot;\n break;\n case 22:\n null === fiber.memoizedState &&\n ((previousHoistableRoot = fiber.alternate),\n null !== previousHoistableRoot &&\n null !== previousHoistableRoot.memoizedState\n ? ((previousHoistableRoot = suspenseyCommitFlag),\n (suspenseyCommitFlag = 16777216),\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n ),\n (suspenseyCommitFlag = previousHoistableRoot))\n : recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n ));\n break;\n default:\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n }\n}\nfunction detachAlternateSiblings(parentFiber) {\n var previousFiber = parentFiber.alternate;\n if (\n null !== previousFiber &&\n ((parentFiber = previousFiber.child), null !== parentFiber)\n ) {\n previousFiber.child = null;\n do\n (previousFiber = parentFiber.sibling),\n (parentFiber.sibling = null),\n (parentFiber = previousFiber);\n while (null !== parentFiber);\n }\n}\nfunction recursivelyTraversePassiveUnmountEffects(parentFiber) {\n var deletions = parentFiber.deletions;\n if (0 !== (parentFiber.flags & 16)) {\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n childToDelete,\n parentFiber\n );\n }\n detachAlternateSiblings(parentFiber);\n }\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitPassiveUnmountOnFiber(parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n finishedWork.flags & 2048 &&\n commitHookEffectListUnmount(9, finishedWork, finishedWork.return);\n break;\n case 3:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n case 12:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n case 22:\n var instance = finishedWork.stateNode;\n null !== finishedWork.memoizedState &&\n instance._visibility & 2 &&\n (null === finishedWork.return || 13 !== finishedWork.return.tag)\n ? ((instance._visibility &= -3),\n recursivelyTraverseDisconnectPassiveEffects(finishedWork))\n : recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n default:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n }\n}\nfunction recursivelyTraverseDisconnectPassiveEffects(parentFiber) {\n var deletions = parentFiber.deletions;\n if (0 !== (parentFiber.flags & 16)) {\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n childToDelete,\n parentFiber\n );\n }\n detachAlternateSiblings(parentFiber);\n }\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n deletions = parentFiber;\n switch (deletions.tag) {\n case 0:\n case 11:\n case 15:\n commitHookEffectListUnmount(8, deletions, deletions.return);\n recursivelyTraverseDisconnectPassiveEffects(deletions);\n break;\n case 22:\n i = deletions.stateNode;\n i._visibility & 2 &&\n ((i._visibility &= -3),\n recursivelyTraverseDisconnectPassiveEffects(deletions));\n break;\n default:\n recursivelyTraverseDisconnectPassiveEffects(deletions);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n deletedSubtreeRoot,\n nearestMountedAncestor\n) {\n for (; null !== nextEffect; ) {\n var fiber = nextEffect;\n switch (fiber.tag) {\n case 0:\n case 11:\n case 15:\n commitHookEffectListUnmount(8, fiber, nearestMountedAncestor);\n break;\n case 23:\n case 22:\n if (\n null !== fiber.memoizedState &&\n null !== fiber.memoizedState.cachePool\n ) {\n var cache = fiber.memoizedState.cachePool.pool;\n null != cache && cache.refCount++;\n }\n break;\n case 24:\n releaseCache(fiber.memoizedState.cache);\n }\n cache = fiber.child;\n if (null !== cache) (cache.return = fiber), (nextEffect = cache);\n else\n a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {\n cache = nextEffect;\n var sibling = cache.sibling,\n returnFiber = cache.return;\n detachFiberAfterEffects(cache);\n if (cache === fiber) {\n nextEffect = null;\n break a;\n }\n if (null !== sibling) {\n sibling.return = returnFiber;\n nextEffect = sibling;\n break a;\n }\n nextEffect = returnFiber;\n }\n }\n}\nvar DefaultAsyncDispatcher = {\n getCacheForType: function (resourceType) {\n var cache = readContext(CacheContext),\n cacheForType = cache.data.get(resourceType);\n void 0 === cacheForType &&\n ((cacheForType = resourceType()),\n cache.data.set(resourceType, cacheForType));\n return cacheForType;\n },\n cacheSignal: function () {\n return readContext(CacheContext).controller.signal;\n }\n },\n PossiblyWeakMap = \"function\" === typeof WeakMap ? WeakMap : Map,\n executionContext = 0,\n workInProgressRoot = null,\n workInProgress = null,\n workInProgressRootRenderLanes = 0,\n workInProgressSuspendedReason = 0,\n workInProgressThrownValue = null,\n workInProgressRootDidSkipSuspendedSiblings = !1,\n workInProgressRootIsPrerendering = !1,\n workInProgressRootDidAttachPingListener = !1,\n entangledRenderLanes = 0,\n workInProgressRootExitStatus = 0,\n workInProgressRootSkippedLanes = 0,\n workInProgressRootInterleavedUpdatedLanes = 0,\n workInProgressRootPingedLanes = 0,\n workInProgressDeferredLane = 0,\n workInProgressSuspendedRetryLanes = 0,\n workInProgressRootConcurrentErrors = null,\n workInProgressRootRecoverableErrors = null,\n workInProgressRootDidIncludeRecursiveRenderUpdate = !1,\n globalMostRecentFallbackTime = 0,\n globalMostRecentTransitionTime = 0,\n workInProgressRootRenderTargetTime = Infinity,\n workInProgressTransitions = null,\n legacyErrorBoundariesThatAlreadyFailed = null,\n pendingEffectsStatus = 0,\n pendingEffectsRoot = null,\n pendingFinishedWork = null,\n pendingEffectsLanes = 0,\n pendingEffectsRemainingLanes = 0,\n pendingPassiveTransitions = null,\n pendingRecoverableErrors = null,\n nestedUpdateCount = 0,\n rootWithNestedUpdates = null;\nfunction requestUpdateLane() {\n return 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes\n ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes\n : null !== ReactSharedInternals.T\n ? requestTransitionLane()\n : resolveUpdatePriority();\n}\nfunction requestDeferredLane() {\n if (0 === workInProgressDeferredLane)\n if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {\n var lane = nextTransitionDeferredLane;\n nextTransitionDeferredLane <<= 1;\n 0 === (nextTransitionDeferredLane & 3932160) &&\n (nextTransitionDeferredLane = 262144);\n workInProgressDeferredLane = lane;\n } else workInProgressDeferredLane = 536870912;\n lane = suspenseHandlerStackCursor.current;\n null !== lane && (lane.flags |= 32);\n return workInProgressDeferredLane;\n}\nfunction scheduleUpdateOnFiber(root, fiber, lane) {\n if (\n (root === workInProgressRoot &&\n (2 === workInProgressSuspendedReason ||\n 9 === workInProgressSuspendedReason)) ||\n null !== root.cancelPendingCommit\n )\n prepareFreshStack(root, 0),\n markRootSuspended(\n root,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane,\n !1\n );\n markRootUpdated$1(root, lane);\n if (0 === (executionContext & 2) || root !== workInProgressRoot)\n root === workInProgressRoot &&\n (0 === (executionContext & 2) &&\n (workInProgressRootInterleavedUpdatedLanes |= lane),\n 4 === workInProgressRootExitStatus &&\n markRootSuspended(\n root,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane,\n !1\n )),\n ensureRootIsScheduled(root);\n}\nfunction performWorkOnRoot(root$jscomp$0, lanes, forceSync) {\n if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));\n var shouldTimeSlice =\n (!forceSync &&\n 0 === (lanes & 127) &&\n 0 === (lanes & root$jscomp$0.expiredLanes)) ||\n checkIfRootIsPrerendering(root$jscomp$0, lanes),\n exitStatus = shouldTimeSlice\n ? renderRootConcurrent(root$jscomp$0, lanes)\n : renderRootSync(root$jscomp$0, lanes, !0),\n renderWasConcurrent = shouldTimeSlice;\n do {\n if (0 === exitStatus) {\n workInProgressRootIsPrerendering &&\n !shouldTimeSlice &&\n markRootSuspended(root$jscomp$0, lanes, 0, !1);\n break;\n } else {\n forceSync = root$jscomp$0.current.alternate;\n if (\n renderWasConcurrent &&\n !isRenderConsistentWithExternalStores(forceSync)\n ) {\n exitStatus = renderRootSync(root$jscomp$0, lanes, !1);\n renderWasConcurrent = !1;\n continue;\n }\n if (2 === exitStatus) {\n renderWasConcurrent = lanes;\n if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent)\n var JSCompiler_inline_result = 0;\n else\n (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913),\n (JSCompiler_inline_result =\n 0 !== JSCompiler_inline_result\n ? JSCompiler_inline_result\n : JSCompiler_inline_result & 536870912\n ? 536870912\n : 0);\n if (0 !== JSCompiler_inline_result) {\n lanes = JSCompiler_inline_result;\n a: {\n var root = root$jscomp$0;\n exitStatus = workInProgressRootConcurrentErrors;\n var wasRootDehydrated = root.current.memoizedState.isDehydrated;\n wasRootDehydrated &&\n (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256);\n JSCompiler_inline_result = renderRootSync(\n root,\n JSCompiler_inline_result,\n !1\n );\n if (2 !== JSCompiler_inline_result) {\n if (\n workInProgressRootDidAttachPingListener &&\n !wasRootDehydrated\n ) {\n root.errorRecoveryDisabledLanes |= renderWasConcurrent;\n workInProgressRootInterleavedUpdatedLanes |=\n renderWasConcurrent;\n exitStatus = 4;\n break a;\n }\n renderWasConcurrent = workInProgressRootRecoverableErrors;\n workInProgressRootRecoverableErrors = exitStatus;\n null !== renderWasConcurrent &&\n (null === workInProgressRootRecoverableErrors\n ? (workInProgressRootRecoverableErrors = renderWasConcurrent)\n : workInProgressRootRecoverableErrors.push.apply(\n workInProgressRootRecoverableErrors,\n renderWasConcurrent\n ));\n }\n exitStatus = JSCompiler_inline_result;\n }\n renderWasConcurrent = !1;\n if (2 !== exitStatus) continue;\n }\n }\n if (1 === exitStatus) {\n prepareFreshStack(root$jscomp$0, 0);\n markRootSuspended(root$jscomp$0, lanes, 0, !0);\n break;\n }\n a: {\n shouldTimeSlice = root$jscomp$0;\n renderWasConcurrent = exitStatus;\n switch (renderWasConcurrent) {\n case 0:\n case 1:\n throw Error(formatProdErrorMessage(345));\n case 4:\n if ((lanes & 4194048) !== lanes) break;\n case 6:\n markRootSuspended(\n shouldTimeSlice,\n lanes,\n workInProgressDeferredLane,\n !workInProgressRootDidSkipSuspendedSiblings\n );\n break a;\n case 2:\n workInProgressRootRecoverableErrors = null;\n break;\n case 3:\n case 5:\n break;\n default:\n throw Error(formatProdErrorMessage(329));\n }\n if (\n (lanes & 62914560) === lanes &&\n ((exitStatus = globalMostRecentFallbackTime + 300 - now()),\n 10 < exitStatus)\n ) {\n markRootSuspended(\n shouldTimeSlice,\n lanes,\n workInProgressDeferredLane,\n !workInProgressRootDidSkipSuspendedSiblings\n );\n if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;\n pendingEffectsLanes = lanes;\n shouldTimeSlice.timeoutHandle = scheduleTimeout(\n commitRootWhenReady.bind(\n null,\n shouldTimeSlice,\n forceSync,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n lanes,\n workInProgressDeferredLane,\n workInProgressRootInterleavedUpdatedLanes,\n workInProgressSuspendedRetryLanes,\n workInProgressRootDidSkipSuspendedSiblings,\n renderWasConcurrent,\n \"Throttled\",\n -0,\n 0\n ),\n exitStatus\n );\n break a;\n }\n commitRootWhenReady(\n shouldTimeSlice,\n forceSync,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n lanes,\n workInProgressDeferredLane,\n workInProgressRootInterleavedUpdatedLanes,\n workInProgressSuspendedRetryLanes,\n workInProgressRootDidSkipSuspendedSiblings,\n renderWasConcurrent,\n null,\n -0,\n 0\n );\n }\n }\n break;\n } while (1);\n ensureRootIsScheduled(root$jscomp$0);\n}\nfunction commitRootWhenReady(\n root,\n finishedWork,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n lanes,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes,\n didSkipSuspendedSiblings,\n exitStatus,\n suspendedCommitReason,\n completedRenderStartTime,\n completedRenderEndTime\n) {\n root.timeoutHandle = -1;\n suspendedCommitReason = finishedWork.subtreeFlags;\n if (\n suspendedCommitReason & 8192 ||\n 16785408 === (suspendedCommitReason & 16785408)\n ) {\n suspendedCommitReason = {\n stylesheets: null,\n count: 0,\n imgCount: 0,\n imgBytes: 0,\n suspenseyImages: [],\n waitingForImages: !0,\n waitingForViewTransition: !1,\n unsuspend: noop$1\n };\n accumulateSuspenseyCommitOnFiber(\n finishedWork,\n lanes,\n suspendedCommitReason\n );\n var timeoutOffset =\n (lanes & 62914560) === lanes\n ? globalMostRecentFallbackTime - now()\n : (lanes & 4194048) === lanes\n ? globalMostRecentTransitionTime - now()\n : 0;\n timeoutOffset = waitForCommitToBeReady(\n suspendedCommitReason,\n timeoutOffset\n );\n if (null !== timeoutOffset) {\n pendingEffectsLanes = lanes;\n root.cancelPendingCommit = timeoutOffset(\n commitRoot.bind(\n null,\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes,\n exitStatus,\n suspendedCommitReason,\n null,\n completedRenderStartTime,\n completedRenderEndTime\n )\n );\n markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings);\n return;\n }\n }\n commitRoot(\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n );\n}\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n for (var node = finishedWork; ; ) {\n var tag = node.tag;\n if (\n (0 === tag || 11 === tag || 15 === tag) &&\n node.flags & 16384 &&\n ((tag = node.updateQueue),\n null !== tag && ((tag = tag.stores), null !== tag))\n )\n for (var i = 0; i < tag.length; i++) {\n var check = tag[i],\n getSnapshot = check.getSnapshot;\n check = check.value;\n try {\n if (!objectIs(getSnapshot(), check)) return !1;\n } catch (error) {\n return !1;\n }\n }\n tag = node.child;\n if (node.subtreeFlags & 16384 && null !== tag)\n (tag.return = node), (node = tag);\n else {\n if (node === finishedWork) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === finishedWork) return !0;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n return !0;\n}\nfunction markRootSuspended(\n root,\n suspendedLanes,\n spawnedLane,\n didAttemptEntireTree\n) {\n suspendedLanes &= ~workInProgressRootPingedLanes;\n suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes;\n didAttemptEntireTree && (root.warmLanes |= suspendedLanes);\n didAttemptEntireTree = root.expirationTimes;\n for (var lanes = suspendedLanes; 0 < lanes; ) {\n var index$6 = 31 - clz32(lanes),\n lane = 1 << index$6;\n didAttemptEntireTree[index$6] = -1;\n lanes &= ~lane;\n }\n 0 !== spawnedLane &&\n markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);\n}\nfunction flushSyncWork$1() {\n return 0 === (executionContext & 6)\n ? (flushSyncWorkAcrossRoots_impl(0, !1), !1)\n : !0;\n}\nfunction resetWorkInProgressStack() {\n if (null !== workInProgress) {\n if (0 === workInProgressSuspendedReason)\n var interruptedWork = workInProgress.return;\n else\n (interruptedWork = workInProgress),\n (lastContextDependency = currentlyRenderingFiber$1 = null),\n resetHooksOnUnwind(interruptedWork),\n (thenableState$1 = null),\n (thenableIndexCounter$1 = 0),\n (interruptedWork = workInProgress);\n for (; null !== interruptedWork; )\n unwindInterruptedWork(interruptedWork.alternate, interruptedWork),\n (interruptedWork = interruptedWork.return);\n workInProgress = null;\n }\n}\nfunction prepareFreshStack(root, lanes) {\n var timeoutHandle = root.timeoutHandle;\n -1 !== timeoutHandle &&\n ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));\n timeoutHandle = root.cancelPendingCommit;\n null !== timeoutHandle &&\n ((root.cancelPendingCommit = null), timeoutHandle());\n pendingEffectsLanes = 0;\n resetWorkInProgressStack();\n workInProgressRoot = root;\n workInProgress = timeoutHandle = createWorkInProgress(root.current, null);\n workInProgressRootRenderLanes = lanes;\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n workInProgressRootDidSkipSuspendedSiblings = !1;\n workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);\n workInProgressRootDidAttachPingListener = !1;\n workInProgressSuspendedRetryLanes =\n workInProgressDeferredLane =\n workInProgressRootPingedLanes =\n workInProgressRootInterleavedUpdatedLanes =\n workInProgressRootSkippedLanes =\n workInProgressRootExitStatus =\n 0;\n workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =\n null;\n workInProgressRootDidIncludeRecursiveRenderUpdate = !1;\n 0 !== (lanes & 8) && (lanes |= lanes & 32);\n var allEntangledLanes = root.entangledLanes;\n if (0 !== allEntangledLanes)\n for (\n root = root.entanglements, allEntangledLanes &= lanes;\n 0 < allEntangledLanes;\n\n ) {\n var index$4 = 31 - clz32(allEntangledLanes),\n lane = 1 << index$4;\n lanes |= root[index$4];\n allEntangledLanes &= ~lane;\n }\n entangledRenderLanes = lanes;\n finishQueueingConcurrentUpdates();\n return timeoutHandle;\n}\nfunction handleThrow(root, thrownValue) {\n currentlyRenderingFiber = null;\n ReactSharedInternals.H = ContextOnlyDispatcher;\n thrownValue === SuspenseException || thrownValue === SuspenseActionException\n ? ((thrownValue = getSuspendedThenable()),\n (workInProgressSuspendedReason = 3))\n : thrownValue === SuspenseyCommitException\n ? ((thrownValue = getSuspendedThenable()),\n (workInProgressSuspendedReason = 4))\n : (workInProgressSuspendedReason =\n thrownValue === SelectiveHydrationException\n ? 8\n : null !== thrownValue &&\n \"object\" === typeof thrownValue &&\n \"function\" === typeof thrownValue.then\n ? 6\n : 1);\n workInProgressThrownValue = thrownValue;\n null === workInProgress &&\n ((workInProgressRootExitStatus = 1),\n logUncaughtError(\n root,\n createCapturedValueAtFiber(thrownValue, root.current)\n ));\n}\nfunction shouldRemainOnPreviousScreen() {\n var handler = suspenseHandlerStackCursor.current;\n return null === handler\n ? !0\n : (workInProgressRootRenderLanes & 4194048) ===\n workInProgressRootRenderLanes\n ? null === shellBoundary\n ? !0\n : !1\n : (workInProgressRootRenderLanes & 62914560) ===\n workInProgressRootRenderLanes ||\n 0 !== (workInProgressRootRenderLanes & 536870912)\n ? handler === shellBoundary\n : !1;\n}\nfunction pushDispatcher() {\n var prevDispatcher = ReactSharedInternals.H;\n ReactSharedInternals.H = ContextOnlyDispatcher;\n return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;\n}\nfunction pushAsyncDispatcher() {\n var prevAsyncDispatcher = ReactSharedInternals.A;\n ReactSharedInternals.A = DefaultAsyncDispatcher;\n return prevAsyncDispatcher;\n}\nfunction renderDidSuspendDelayIfPossible() {\n workInProgressRootExitStatus = 4;\n workInProgressRootDidSkipSuspendedSiblings ||\n ((workInProgressRootRenderLanes & 4194048) !==\n workInProgressRootRenderLanes &&\n null !== suspenseHandlerStackCursor.current) ||\n (workInProgressRootIsPrerendering = !0);\n (0 === (workInProgressRootSkippedLanes & 134217727) &&\n 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||\n null === workInProgressRoot ||\n markRootSuspended(\n workInProgressRoot,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane,\n !1\n );\n}\nfunction renderRootSync(root, lanes, shouldYieldForPrerendering) {\n var prevExecutionContext = executionContext;\n executionContext |= 2;\n var prevDispatcher = pushDispatcher(),\n prevAsyncDispatcher = pushAsyncDispatcher();\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)\n (workInProgressTransitions = null), prepareFreshStack(root, lanes);\n lanes = !1;\n var exitStatus = workInProgressRootExitStatus;\n a: do\n try {\n if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n var unitOfWork = workInProgress,\n thrownValue = workInProgressThrownValue;\n switch (workInProgressSuspendedReason) {\n case 8:\n resetWorkInProgressStack();\n exitStatus = 6;\n break a;\n case 3:\n case 2:\n case 9:\n case 6:\n null === suspenseHandlerStackCursor.current && (lanes = !0);\n var reason = workInProgressSuspendedReason;\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);\n if (\n shouldYieldForPrerendering &&\n workInProgressRootIsPrerendering\n ) {\n exitStatus = 0;\n break a;\n }\n break;\n default:\n (reason = workInProgressSuspendedReason),\n (workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);\n }\n }\n workLoopSync();\n exitStatus = workInProgressRootExitStatus;\n break;\n } catch (thrownValue$165) {\n handleThrow(root, thrownValue$165);\n }\n while (1);\n lanes && root.shellSuspendCounter++;\n lastContextDependency = currentlyRenderingFiber$1 = null;\n executionContext = prevExecutionContext;\n ReactSharedInternals.H = prevDispatcher;\n ReactSharedInternals.A = prevAsyncDispatcher;\n null === workInProgress &&\n ((workInProgressRoot = null),\n (workInProgressRootRenderLanes = 0),\n finishQueueingConcurrentUpdates());\n return exitStatus;\n}\nfunction workLoopSync() {\n for (; null !== workInProgress; ) performUnitOfWork(workInProgress);\n}\nfunction renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= 2;\n var prevDispatcher = pushDispatcher(),\n prevAsyncDispatcher = pushAsyncDispatcher();\n workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes\n ? ((workInProgressTransitions = null),\n (workInProgressRootRenderTargetTime = now() + 500),\n prepareFreshStack(root, lanes))\n : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering(\n root,\n lanes\n ));\n a: do\n try {\n if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n lanes = workInProgress;\n var thrownValue = workInProgressThrownValue;\n b: switch (workInProgressSuspendedReason) {\n case 1:\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 1);\n break;\n case 2:\n case 9:\n if (isThenableResolved(thrownValue)) {\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n replaySuspendedUnitOfWork(lanes);\n break;\n }\n lanes = function () {\n (2 !== workInProgressSuspendedReason &&\n 9 !== workInProgressSuspendedReason) ||\n workInProgressRoot !== root ||\n (workInProgressSuspendedReason = 7);\n ensureRootIsScheduled(root);\n };\n thrownValue.then(lanes, lanes);\n break a;\n case 3:\n workInProgressSuspendedReason = 7;\n break a;\n case 4:\n workInProgressSuspendedReason = 5;\n break a;\n case 7:\n isThenableResolved(thrownValue)\n ? ((workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n replaySuspendedUnitOfWork(lanes))\n : ((workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 7));\n break;\n case 5:\n var resource = null;\n switch (workInProgress.tag) {\n case 26:\n resource = workInProgress.memoizedState;\n case 5:\n case 27:\n var hostFiber = workInProgress;\n if (\n resource\n ? preloadResource(resource)\n : hostFiber.stateNode.complete\n ) {\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n var sibling = hostFiber.sibling;\n if (null !== sibling) workInProgress = sibling;\n else {\n var returnFiber = hostFiber.return;\n null !== returnFiber\n ? ((workInProgress = returnFiber),\n completeUnitOfWork(returnFiber))\n : (workInProgress = null);\n }\n break b;\n }\n }\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 5);\n break;\n case 6:\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 6);\n break;\n case 8:\n resetWorkInProgressStack();\n workInProgressRootExitStatus = 6;\n break a;\n default:\n throw Error(formatProdErrorMessage(462));\n }\n }\n workLoopConcurrentByScheduler();\n break;\n } catch (thrownValue$167) {\n handleThrow(root, thrownValue$167);\n }\n while (1);\n lastContextDependency = currentlyRenderingFiber$1 = null;\n ReactSharedInternals.H = prevDispatcher;\n ReactSharedInternals.A = prevAsyncDispatcher;\n executionContext = prevExecutionContext;\n if (null !== workInProgress) return 0;\n workInProgressRoot = null;\n workInProgressRootRenderLanes = 0;\n finishQueueingConcurrentUpdates();\n return workInProgressRootExitStatus;\n}\nfunction workLoopConcurrentByScheduler() {\n for (; null !== workInProgress && !shouldYield(); )\n performUnitOfWork(workInProgress);\n}\nfunction performUnitOfWork(unitOfWork) {\n var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);\n}\nfunction replaySuspendedUnitOfWork(unitOfWork) {\n var next = unitOfWork;\n var current = next.alternate;\n switch (next.tag) {\n case 15:\n case 0:\n next = replayFunctionComponent(\n current,\n next,\n next.pendingProps,\n next.type,\n void 0,\n workInProgressRootRenderLanes\n );\n break;\n case 11:\n next = replayFunctionComponent(\n current,\n next,\n next.pendingProps,\n next.type.render,\n next.ref,\n workInProgressRootRenderLanes\n );\n break;\n case 5:\n resetHooksOnUnwind(next);\n default:\n unwindInterruptedWork(current, next),\n (next = workInProgress =\n resetWorkInProgress(next, entangledRenderLanes)),\n (next = beginWork(current, next, entangledRenderLanes));\n }\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);\n}\nfunction throwAndUnwindWorkLoop(\n root,\n unitOfWork,\n thrownValue,\n suspendedReason\n) {\n lastContextDependency = currentlyRenderingFiber$1 = null;\n resetHooksOnUnwind(unitOfWork);\n thenableState$1 = null;\n thenableIndexCounter$1 = 0;\n var returnFiber = unitOfWork.return;\n try {\n if (\n throwException(\n root,\n returnFiber,\n unitOfWork,\n thrownValue,\n workInProgressRootRenderLanes\n )\n ) {\n workInProgressRootExitStatus = 1;\n logUncaughtError(\n root,\n createCapturedValueAtFiber(thrownValue, root.current)\n );\n workInProgress = null;\n return;\n }\n } catch (error) {\n if (null !== returnFiber) throw ((workInProgress = returnFiber), error);\n workInProgressRootExitStatus = 1;\n logUncaughtError(\n root,\n createCapturedValueAtFiber(thrownValue, root.current)\n );\n workInProgress = null;\n return;\n }\n if (unitOfWork.flags & 32768) {\n if (isHydrating || 1 === suspendedReason) root = !0;\n else if (\n workInProgressRootIsPrerendering ||\n 0 !== (workInProgressRootRenderLanes & 536870912)\n )\n root = !1;\n else if (\n ((workInProgressRootDidSkipSuspendedSiblings = root = !0),\n 2 === suspendedReason ||\n 9 === suspendedReason ||\n 3 === suspendedReason ||\n 6 === suspendedReason)\n )\n (suspendedReason = suspenseHandlerStackCursor.current),\n null !== suspendedReason &&\n 13 === suspendedReason.tag &&\n (suspendedReason.flags |= 16384);\n unwindUnitOfWork(unitOfWork, root);\n } else completeUnitOfWork(unitOfWork);\n}\nfunction completeUnitOfWork(unitOfWork) {\n var completedWork = unitOfWork;\n do {\n if (0 !== (completedWork.flags & 32768)) {\n unwindUnitOfWork(\n completedWork,\n workInProgressRootDidSkipSuspendedSiblings\n );\n return;\n }\n unitOfWork = completedWork.return;\n var next = completeWork(\n completedWork.alternate,\n completedWork,\n entangledRenderLanes\n );\n if (null !== next) {\n workInProgress = next;\n return;\n }\n completedWork = completedWork.sibling;\n if (null !== completedWork) {\n workInProgress = completedWork;\n return;\n }\n workInProgress = completedWork = unitOfWork;\n } while (null !== completedWork);\n 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);\n}\nfunction unwindUnitOfWork(unitOfWork, skipSiblings) {\n do {\n var next = unwindWork(unitOfWork.alternate, unitOfWork);\n if (null !== next) {\n next.flags &= 32767;\n workInProgress = next;\n return;\n }\n next = unitOfWork.return;\n null !== next &&\n ((next.flags |= 32768), (next.subtreeFlags = 0), (next.deletions = null));\n if (\n !skipSiblings &&\n ((unitOfWork = unitOfWork.sibling), null !== unitOfWork)\n ) {\n workInProgress = unitOfWork;\n return;\n }\n workInProgress = unitOfWork = next;\n } while (null !== unitOfWork);\n workInProgressRootExitStatus = 6;\n workInProgress = null;\n}\nfunction commitRoot(\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n) {\n root.cancelPendingCommit = null;\n do flushPendingEffects();\n while (0 !== pendingEffectsStatus);\n if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));\n if (null !== finishedWork) {\n if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));\n didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;\n didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;\n markRootFinished(\n root,\n lanes,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n );\n root === workInProgressRoot &&\n ((workInProgress = workInProgressRoot = null),\n (workInProgressRootRenderLanes = 0));\n pendingFinishedWork = finishedWork;\n pendingEffectsRoot = root;\n pendingEffectsLanes = lanes;\n pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;\n pendingPassiveTransitions = transitions;\n pendingRecoverableErrors = recoverableErrors;\n 0 !== (finishedWork.subtreeFlags & 10256) ||\n 0 !== (finishedWork.flags & 10256)\n ? ((root.callbackNode = null),\n (root.callbackPriority = 0),\n scheduleCallback$1(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n }))\n : ((root.callbackNode = null), (root.callbackPriority = 0));\n recoverableErrors = 0 !== (finishedWork.flags & 13878);\n if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {\n recoverableErrors = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n transitions = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n spawnedLane = executionContext;\n executionContext |= 4;\n try {\n commitBeforeMutationEffects(root, finishedWork, lanes);\n } finally {\n (executionContext = spawnedLane),\n (ReactDOMSharedInternals.p = transitions),\n (ReactSharedInternals.T = recoverableErrors);\n }\n }\n pendingEffectsStatus = 1;\n flushMutationEffects();\n flushLayoutEffects();\n flushSpawnedWork();\n }\n}\nfunction flushMutationEffects() {\n if (1 === pendingEffectsStatus) {\n pendingEffectsStatus = 0;\n var root = pendingEffectsRoot,\n finishedWork = pendingFinishedWork,\n rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);\n if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {\n rootMutationHasEffect = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n try {\n commitMutationEffectsOnFiber(finishedWork, root);\n var priorSelectionInformation = selectionInformation,\n curFocusedElem = getActiveElementDeep(root.containerInfo),\n priorFocusedElem = priorSelectionInformation.focusedElem,\n priorSelectionRange = priorSelectionInformation.selectionRange;\n if (\n curFocusedElem !== priorFocusedElem &&\n priorFocusedElem &&\n priorFocusedElem.ownerDocument &&\n containsNode(\n priorFocusedElem.ownerDocument.documentElement,\n priorFocusedElem\n )\n ) {\n if (\n null !== priorSelectionRange &&\n hasSelectionCapabilities(priorFocusedElem)\n ) {\n var start = priorSelectionRange.start,\n end = priorSelectionRange.end;\n void 0 === end && (end = start);\n if (\"selectionStart\" in priorFocusedElem)\n (priorFocusedElem.selectionStart = start),\n (priorFocusedElem.selectionEnd = Math.min(\n end,\n priorFocusedElem.value.length\n ));\n else {\n var doc = priorFocusedElem.ownerDocument || document,\n win = (doc && doc.defaultView) || window;\n if (win.getSelection) {\n var selection = win.getSelection(),\n length = priorFocusedElem.textContent.length,\n start$jscomp$0 = Math.min(priorSelectionRange.start, length),\n end$jscomp$0 =\n void 0 === priorSelectionRange.end\n ? start$jscomp$0\n : Math.min(priorSelectionRange.end, length);\n !selection.extend &&\n start$jscomp$0 > end$jscomp$0 &&\n ((curFocusedElem = end$jscomp$0),\n (end$jscomp$0 = start$jscomp$0),\n (start$jscomp$0 = curFocusedElem));\n var startMarker = getNodeForCharacterOffset(\n priorFocusedElem,\n start$jscomp$0\n ),\n endMarker = getNodeForCharacterOffset(\n priorFocusedElem,\n end$jscomp$0\n );\n if (\n startMarker &&\n endMarker &&\n (1 !== selection.rangeCount ||\n selection.anchorNode !== startMarker.node ||\n selection.anchorOffset !== startMarker.offset ||\n selection.focusNode !== endMarker.node ||\n selection.focusOffset !== endMarker.offset)\n ) {\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n start$jscomp$0 > end$jscomp$0\n ? (selection.addRange(range),\n selection.extend(endMarker.node, endMarker.offset))\n : (range.setEnd(endMarker.node, endMarker.offset),\n selection.addRange(range));\n }\n }\n }\n }\n doc = [];\n for (\n selection = priorFocusedElem;\n (selection = selection.parentNode);\n\n )\n 1 === selection.nodeType &&\n doc.push({\n element: selection,\n left: selection.scrollLeft,\n top: selection.scrollTop\n });\n \"function\" === typeof priorFocusedElem.focus &&\n priorFocusedElem.focus();\n for (\n priorFocusedElem = 0;\n priorFocusedElem < doc.length;\n priorFocusedElem++\n ) {\n var info = doc[priorFocusedElem];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n _enabled = !!eventsEnabled;\n selectionInformation = eventsEnabled = null;\n } finally {\n (executionContext = prevExecutionContext),\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = rootMutationHasEffect);\n }\n }\n root.current = finishedWork;\n pendingEffectsStatus = 2;\n }\n}\nfunction flushLayoutEffects() {\n if (2 === pendingEffectsStatus) {\n pendingEffectsStatus = 0;\n var root = pendingEffectsRoot,\n finishedWork = pendingFinishedWork,\n rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);\n if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {\n rootHasLayoutEffect = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n try {\n commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);\n } finally {\n (executionContext = prevExecutionContext),\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = rootHasLayoutEffect);\n }\n }\n pendingEffectsStatus = 3;\n }\n}\nfunction flushSpawnedWork() {\n if (4 === pendingEffectsStatus || 3 === pendingEffectsStatus) {\n pendingEffectsStatus = 0;\n requestPaint();\n var root = pendingEffectsRoot,\n finishedWork = pendingFinishedWork,\n lanes = pendingEffectsLanes,\n recoverableErrors = pendingRecoverableErrors;\n 0 !== (finishedWork.subtreeFlags & 10256) ||\n 0 !== (finishedWork.flags & 10256)\n ? (pendingEffectsStatus = 5)\n : ((pendingEffectsStatus = 0),\n (pendingFinishedWork = pendingEffectsRoot = null),\n releaseRootPooledCache(root, root.pendingLanes));\n var remainingLanes = root.pendingLanes;\n 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);\n lanesToEventPriority(lanes);\n finishedWork = finishedWork.stateNode;\n if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberRoot)\n try {\n injectedHook.onCommitFiberRoot(\n rendererID,\n finishedWork,\n void 0,\n 128 === (finishedWork.current.flags & 128)\n );\n } catch (err) {}\n if (null !== recoverableErrors) {\n finishedWork = ReactSharedInternals.T;\n remainingLanes = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n ReactSharedInternals.T = null;\n try {\n for (\n var onRecoverableError = root.onRecoverableError, i = 0;\n i < recoverableErrors.length;\n i++\n ) {\n var recoverableError = recoverableErrors[i];\n onRecoverableError(recoverableError.value, {\n componentStack: recoverableError.stack\n });\n }\n } finally {\n (ReactSharedInternals.T = finishedWork),\n (ReactDOMSharedInternals.p = remainingLanes);\n }\n }\n 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();\n ensureRootIsScheduled(root);\n remainingLanes = root.pendingLanes;\n 0 !== (lanes & 261930) && 0 !== (remainingLanes & 42)\n ? root === rootWithNestedUpdates\n ? nestedUpdateCount++\n : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))\n : (nestedUpdateCount = 0);\n flushSyncWorkAcrossRoots_impl(0, !1);\n }\n}\nfunction releaseRootPooledCache(root, remainingLanes) {\n 0 === (root.pooledCacheLanes &= remainingLanes) &&\n ((remainingLanes = root.pooledCache),\n null != remainingLanes &&\n ((root.pooledCache = null), releaseCache(remainingLanes)));\n}\nfunction flushPendingEffects() {\n flushMutationEffects();\n flushLayoutEffects();\n flushSpawnedWork();\n return flushPassiveEffects();\n}\nfunction flushPassiveEffects() {\n if (5 !== pendingEffectsStatus) return !1;\n var root = pendingEffectsRoot,\n remainingLanes = pendingEffectsRemainingLanes;\n pendingEffectsRemainingLanes = 0;\n var renderPriority = lanesToEventPriority(pendingEffectsLanes),\n prevTransition = ReactSharedInternals.T,\n previousPriority = ReactDOMSharedInternals.p;\n try {\n ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;\n ReactSharedInternals.T = null;\n renderPriority = pendingPassiveTransitions;\n pendingPassiveTransitions = null;\n var root$jscomp$0 = pendingEffectsRoot,\n lanes = pendingEffectsLanes;\n pendingEffectsStatus = 0;\n pendingFinishedWork = pendingEffectsRoot = null;\n pendingEffectsLanes = 0;\n if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(331));\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n commitPassiveUnmountOnFiber(root$jscomp$0.current);\n commitPassiveMountOnFiber(\n root$jscomp$0,\n root$jscomp$0.current,\n lanes,\n renderPriority\n );\n executionContext = prevExecutionContext;\n flushSyncWorkAcrossRoots_impl(0, !1);\n if (\n injectedHook &&\n \"function\" === typeof injectedHook.onPostCommitFiberRoot\n )\n try {\n injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);\n } catch (err) {}\n return !0;\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = prevTransition),\n releaseRootPooledCache(root, remainingLanes);\n }\n}\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);\n rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);\n null !== rootFiber &&\n (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));\n}\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {\n if (3 === sourceFiber.tag)\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n else\n for (; null !== nearestMountedAncestor; ) {\n if (3 === nearestMountedAncestor.tag) {\n captureCommitPhaseErrorOnRoot(\n nearestMountedAncestor,\n sourceFiber,\n error\n );\n break;\n } else if (1 === nearestMountedAncestor.tag) {\n var instance = nearestMountedAncestor.stateNode;\n if (\n \"function\" ===\n typeof nearestMountedAncestor.type.getDerivedStateFromError ||\n (\"function\" === typeof instance.componentDidCatch &&\n (null === legacyErrorBoundariesThatAlreadyFailed ||\n !legacyErrorBoundariesThatAlreadyFailed.has(instance)))\n ) {\n sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n error = createClassErrorUpdate(2);\n instance = enqueueUpdate(nearestMountedAncestor, error, 2);\n null !== instance &&\n (initializeClassErrorUpdate(\n error,\n instance,\n nearestMountedAncestor,\n sourceFiber\n ),\n markRootUpdated$1(instance, 2),\n ensureRootIsScheduled(instance));\n break;\n }\n }\n nearestMountedAncestor = nearestMountedAncestor.return;\n }\n}\nfunction attachPingListener(root, wakeable, lanes) {\n var pingCache = root.pingCache;\n if (null === pingCache) {\n pingCache = root.pingCache = new PossiblyWeakMap();\n var threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else\n (threadIDs = pingCache.get(wakeable)),\n void 0 === threadIDs &&\n ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));\n threadIDs.has(lanes) ||\n ((workInProgressRootDidAttachPingListener = !0),\n threadIDs.add(lanes),\n (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)),\n wakeable.then(root, root));\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n null !== pingCache && pingCache.delete(wakeable);\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n root.warmLanes &= ~pingedLanes;\n workInProgressRoot === root &&\n (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&\n (4 === workInProgressRootExitStatus ||\n (3 === workInProgressRootExitStatus &&\n (workInProgressRootRenderLanes & 62914560) ===\n workInProgressRootRenderLanes &&\n 300 > now() - globalMostRecentFallbackTime)\n ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)\n : (workInProgressRootPingedLanes |= pingedLanes),\n workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&\n (workInProgressSuspendedRetryLanes = 0));\n ensureRootIsScheduled(root);\n}\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n 0 === retryLane && (retryLane = claimNextRetryLane());\n boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n null !== boundaryFiber &&\n (markRootUpdated$1(boundaryFiber, retryLane),\n ensureRootIsScheduled(boundaryFiber));\n}\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n var suspenseState = boundaryFiber.memoizedState,\n retryLane = 0;\n null !== suspenseState && (retryLane = suspenseState.retryLane);\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = 0;\n switch (boundaryFiber.tag) {\n case 31:\n case 13:\n var retryCache = boundaryFiber.stateNode;\n var suspenseState = boundaryFiber.memoizedState;\n null !== suspenseState && (retryLane = suspenseState.retryLane);\n break;\n case 19:\n retryCache = boundaryFiber.stateNode;\n break;\n case 22:\n retryCache = boundaryFiber.stateNode._retryCache;\n break;\n default:\n throw Error(formatProdErrorMessage(314));\n }\n null !== retryCache && retryCache.delete(wakeable);\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction scheduleCallback$1(priorityLevel, callback) {\n return scheduleCallback$3(priorityLevel, callback);\n}\nvar firstScheduledRoot = null,\n lastScheduledRoot = null,\n didScheduleMicrotask = !1,\n mightHavePendingSyncWork = !1,\n isFlushingWork = !1,\n currentEventTransitionLane = 0;\nfunction ensureRootIsScheduled(root) {\n root !== lastScheduledRoot &&\n null === root.next &&\n (null === lastScheduledRoot\n ? (firstScheduledRoot = lastScheduledRoot = root)\n : (lastScheduledRoot = lastScheduledRoot.next = root));\n mightHavePendingSyncWork = !0;\n didScheduleMicrotask ||\n ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());\n}\nfunction flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {\n if (!isFlushingWork && mightHavePendingSyncWork) {\n isFlushingWork = !0;\n do {\n var didPerformSomeWork = !1;\n for (var root$170 = firstScheduledRoot; null !== root$170; ) {\n if (!onlyLegacy)\n if (0 !== syncTransitionLanes) {\n var pendingLanes = root$170.pendingLanes;\n if (0 === pendingLanes) var JSCompiler_inline_result = 0;\n else {\n var suspendedLanes = root$170.suspendedLanes,\n pingedLanes = root$170.pingedLanes;\n JSCompiler_inline_result =\n (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1;\n JSCompiler_inline_result &=\n pendingLanes & ~(suspendedLanes & ~pingedLanes);\n JSCompiler_inline_result =\n JSCompiler_inline_result & 201326741\n ? (JSCompiler_inline_result & 201326741) | 1\n : JSCompiler_inline_result\n ? JSCompiler_inline_result | 2\n : 0;\n }\n 0 !== JSCompiler_inline_result &&\n ((didPerformSomeWork = !0),\n performSyncWorkOnRoot(root$170, JSCompiler_inline_result));\n } else\n (JSCompiler_inline_result = workInProgressRootRenderLanes),\n (JSCompiler_inline_result = getNextLanes(\n root$170,\n root$170 === workInProgressRoot ? JSCompiler_inline_result : 0,\n null !== root$170.cancelPendingCommit ||\n -1 !== root$170.timeoutHandle\n )),\n 0 === (JSCompiler_inline_result & 3) ||\n checkIfRootIsPrerendering(root$170, JSCompiler_inline_result) ||\n ((didPerformSomeWork = !0),\n performSyncWorkOnRoot(root$170, JSCompiler_inline_result));\n root$170 = root$170.next;\n }\n } while (didPerformSomeWork);\n isFlushingWork = !1;\n }\n}\nfunction processRootScheduleInImmediateTask() {\n processRootScheduleInMicrotask();\n}\nfunction processRootScheduleInMicrotask() {\n mightHavePendingSyncWork = didScheduleMicrotask = !1;\n var syncTransitionLanes = 0;\n 0 !== currentEventTransitionLane &&\n shouldAttemptEagerTransition() &&\n (syncTransitionLanes = currentEventTransitionLane);\n for (\n var currentTime = now(), prev = null, root = firstScheduledRoot;\n null !== root;\n\n ) {\n var next = root.next,\n nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);\n if (0 === nextLanes)\n (root.next = null),\n null === prev ? (firstScheduledRoot = next) : (prev.next = next),\n null === next && (lastScheduledRoot = prev);\n else if (\n ((prev = root), 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))\n )\n mightHavePendingSyncWork = !0;\n root = next;\n }\n (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus) ||\n flushSyncWorkAcrossRoots_impl(syncTransitionLanes, !1);\n 0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);\n}\nfunction scheduleTaskForRootDuringMicrotask(root, currentTime) {\n for (\n var suspendedLanes = root.suspendedLanes,\n pingedLanes = root.pingedLanes,\n expirationTimes = root.expirationTimes,\n lanes = root.pendingLanes & -62914561;\n 0 < lanes;\n\n ) {\n var index$5 = 31 - clz32(lanes),\n lane = 1 << index$5,\n expirationTime = expirationTimes[index$5];\n if (-1 === expirationTime) {\n if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))\n expirationTimes[index$5] = computeExpirationTime(lane, currentTime);\n } else expirationTime <= currentTime && (root.expiredLanes |= lane);\n lanes &= ~lane;\n }\n currentTime = workInProgressRoot;\n suspendedLanes = workInProgressRootRenderLanes;\n suspendedLanes = getNextLanes(\n root,\n root === currentTime ? suspendedLanes : 0,\n null !== root.cancelPendingCommit || -1 !== root.timeoutHandle\n );\n pingedLanes = root.callbackNode;\n if (\n 0 === suspendedLanes ||\n (root === currentTime &&\n (2 === workInProgressSuspendedReason ||\n 9 === workInProgressSuspendedReason)) ||\n null !== root.cancelPendingCommit\n )\n return (\n null !== pingedLanes &&\n null !== pingedLanes &&\n cancelCallback$1(pingedLanes),\n (root.callbackNode = null),\n (root.callbackPriority = 0)\n );\n if (\n 0 === (suspendedLanes & 3) ||\n checkIfRootIsPrerendering(root, suspendedLanes)\n ) {\n currentTime = suspendedLanes & -suspendedLanes;\n if (currentTime === root.callbackPriority) return currentTime;\n null !== pingedLanes && cancelCallback$1(pingedLanes);\n switch (lanesToEventPriority(suspendedLanes)) {\n case 2:\n case 8:\n suspendedLanes = UserBlockingPriority;\n break;\n case 32:\n suspendedLanes = NormalPriority$1;\n break;\n case 268435456:\n suspendedLanes = IdlePriority;\n break;\n default:\n suspendedLanes = NormalPriority$1;\n }\n pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);\n suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);\n root.callbackPriority = currentTime;\n root.callbackNode = suspendedLanes;\n return currentTime;\n }\n null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes);\n root.callbackPriority = 2;\n root.callbackNode = null;\n return 2;\n}\nfunction performWorkOnRootViaSchedulerTask(root, didTimeout) {\n if (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus)\n return (root.callbackNode = null), (root.callbackPriority = 0), null;\n var originalCallbackNode = root.callbackNode;\n if (flushPendingEffects() && root.callbackNode !== originalCallbackNode)\n return null;\n var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;\n workInProgressRootRenderLanes$jscomp$0 = getNextLanes(\n root,\n root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,\n null !== root.cancelPendingCommit || -1 !== root.timeoutHandle\n );\n if (0 === workInProgressRootRenderLanes$jscomp$0) return null;\n performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);\n scheduleTaskForRootDuringMicrotask(root, now());\n return null != root.callbackNode && root.callbackNode === originalCallbackNode\n ? performWorkOnRootViaSchedulerTask.bind(null, root)\n : null;\n}\nfunction performSyncWorkOnRoot(root, lanes) {\n if (flushPendingEffects()) return null;\n performWorkOnRoot(root, lanes, !0);\n}\nfunction scheduleImmediateRootScheduleTask() {\n scheduleMicrotask(function () {\n 0 !== (executionContext & 6)\n ? scheduleCallback$3(\n ImmediatePriority,\n processRootScheduleInImmediateTask\n )\n : processRootScheduleInMicrotask();\n });\n}\nfunction requestTransitionLane() {\n if (0 === currentEventTransitionLane) {\n var actionScopeLane = currentEntangledLane;\n 0 === actionScopeLane &&\n ((actionScopeLane = nextTransitionUpdateLane),\n (nextTransitionUpdateLane <<= 1),\n 0 === (nextTransitionUpdateLane & 261888) &&\n (nextTransitionUpdateLane = 256));\n currentEventTransitionLane = actionScopeLane;\n }\n return currentEventTransitionLane;\n}\nfunction coerceFormActionProp(actionProp) {\n return null == actionProp ||\n \"symbol\" === typeof actionProp ||\n \"boolean\" === typeof actionProp\n ? null\n : \"function\" === typeof actionProp\n ? actionProp\n : sanitizeURL(\"\" + actionProp);\n}\nfunction createFormDataWithSubmitter(form, submitter) {\n var temp = submitter.ownerDocument.createElement(\"input\");\n temp.name = submitter.name;\n temp.value = submitter.value;\n form.id && temp.setAttribute(\"form\", form.id);\n submitter.parentNode.insertBefore(temp, submitter);\n form = new FormData(form);\n temp.parentNode.removeChild(temp);\n return form;\n}\nfunction extractEvents$1(\n dispatchQueue,\n domEventName,\n maybeTargetInst,\n nativeEvent,\n nativeEventTarget\n) {\n if (\n \"submit\" === domEventName &&\n maybeTargetInst &&\n maybeTargetInst.stateNode === nativeEventTarget\n ) {\n var action = coerceFormActionProp(\n (nativeEventTarget[internalPropsKey] || null).action\n ),\n submitter = nativeEvent.submitter;\n submitter &&\n ((domEventName = (domEventName = submitter[internalPropsKey] || null)\n ? coerceFormActionProp(domEventName.formAction)\n : submitter.getAttribute(\"formAction\")),\n null !== domEventName && ((action = domEventName), (submitter = null)));\n var event = new SyntheticEvent(\n \"action\",\n \"action\",\n null,\n nativeEvent,\n nativeEventTarget\n );\n dispatchQueue.push({\n event: event,\n listeners: [\n {\n instance: null,\n listener: function () {\n if (nativeEvent.defaultPrevented) {\n if (0 !== currentEventTransitionLane) {\n var formData = submitter\n ? createFormDataWithSubmitter(nativeEventTarget, submitter)\n : new FormData(nativeEventTarget);\n startHostTransition(\n maybeTargetInst,\n {\n pending: !0,\n data: formData,\n method: nativeEventTarget.method,\n action: action\n },\n null,\n formData\n );\n }\n } else\n \"function\" === typeof action &&\n (event.preventDefault(),\n (formData = submitter\n ? createFormDataWithSubmitter(nativeEventTarget, submitter)\n : new FormData(nativeEventTarget)),\n startHostTransition(\n maybeTargetInst,\n {\n pending: !0,\n data: formData,\n method: nativeEventTarget.method,\n action: action\n },\n action,\n formData\n ));\n },\n currentTarget: nativeEventTarget\n }\n ]\n });\n }\n}\nfor (\n var i$jscomp$inline_1577 = 0;\n i$jscomp$inline_1577 < simpleEventPluginEvents.length;\n i$jscomp$inline_1577++\n) {\n var eventName$jscomp$inline_1578 =\n simpleEventPluginEvents[i$jscomp$inline_1577],\n domEventName$jscomp$inline_1579 =\n eventName$jscomp$inline_1578.toLowerCase(),\n capitalizedEvent$jscomp$inline_1580 =\n eventName$jscomp$inline_1578[0].toUpperCase() +\n eventName$jscomp$inline_1578.slice(1);\n registerSimpleEvent(\n domEventName$jscomp$inline_1579,\n \"on\" + capitalizedEvent$jscomp$inline_1580\n );\n}\nregisterSimpleEvent(ANIMATION_END, \"onAnimationEnd\");\nregisterSimpleEvent(ANIMATION_ITERATION, \"onAnimationIteration\");\nregisterSimpleEvent(ANIMATION_START, \"onAnimationStart\");\nregisterSimpleEvent(\"dblclick\", \"onDoubleClick\");\nregisterSimpleEvent(\"focusin\", \"onFocus\");\nregisterSimpleEvent(\"focusout\", \"onBlur\");\nregisterSimpleEvent(TRANSITION_RUN, \"onTransitionRun\");\nregisterSimpleEvent(TRANSITION_START, \"onTransitionStart\");\nregisterSimpleEvent(TRANSITION_CANCEL, \"onTransitionCancel\");\nregisterSimpleEvent(TRANSITION_END, \"onTransitionEnd\");\nregisterDirectEvent(\"onMouseEnter\", [\"mouseout\", \"mouseover\"]);\nregisterDirectEvent(\"onMouseLeave\", [\"mouseout\", \"mouseover\"]);\nregisterDirectEvent(\"onPointerEnter\", [\"pointerout\", \"pointerover\"]);\nregisterDirectEvent(\"onPointerLeave\", [\"pointerout\", \"pointerover\"]);\nregisterTwoPhaseEvent(\n \"onChange\",\n \"change click focusin focusout input keydown keyup selectionchange\".split(\" \")\n);\nregisterTwoPhaseEvent(\n \"onSelect\",\n \"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\n \" \"\n )\n);\nregisterTwoPhaseEvent(\"onBeforeInput\", [\n \"compositionend\",\n \"keypress\",\n \"textInput\",\n \"paste\"\n]);\nregisterTwoPhaseEvent(\n \"onCompositionEnd\",\n \"compositionend focusout keydown keypress keyup mousedown\".split(\" \")\n);\nregisterTwoPhaseEvent(\n \"onCompositionStart\",\n \"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")\n);\nregisterTwoPhaseEvent(\n \"onCompositionUpdate\",\n \"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \")\n);\nvar mediaEventTypes =\n \"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\n \" \"\n ),\n nonDelegatedEvents = new Set(\n \"beforetoggle cancel close invalid load scroll scrollend toggle\"\n .split(\" \")\n .concat(mediaEventTypes)\n );\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n eventSystemFlags = 0 !== (eventSystemFlags & 4);\n for (var i = 0; i < dispatchQueue.length; i++) {\n var _dispatchQueue$i = dispatchQueue[i],\n event = _dispatchQueue$i.event;\n _dispatchQueue$i = _dispatchQueue$i.listeners;\n a: {\n var previousInstance = void 0;\n if (eventSystemFlags)\n for (\n var i$jscomp$0 = _dispatchQueue$i.length - 1;\n 0 <= i$jscomp$0;\n i$jscomp$0--\n ) {\n var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0],\n instance = _dispatchListeners$i.instance,\n currentTarget = _dispatchListeners$i.currentTarget;\n _dispatchListeners$i = _dispatchListeners$i.listener;\n if (instance !== previousInstance && event.isPropagationStopped())\n break a;\n previousInstance = _dispatchListeners$i;\n event.currentTarget = currentTarget;\n try {\n previousInstance(event);\n } catch (error) {\n reportGlobalError(error);\n }\n event.currentTarget = null;\n previousInstance = instance;\n }\n else\n for (\n i$jscomp$0 = 0;\n i$jscomp$0 < _dispatchQueue$i.length;\n i$jscomp$0++\n ) {\n _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];\n instance = _dispatchListeners$i.instance;\n currentTarget = _dispatchListeners$i.currentTarget;\n _dispatchListeners$i = _dispatchListeners$i.listener;\n if (instance !== previousInstance && event.isPropagationStopped())\n break a;\n previousInstance = _dispatchListeners$i;\n event.currentTarget = currentTarget;\n try {\n previousInstance(event);\n } catch (error) {\n reportGlobalError(error);\n }\n event.currentTarget = null;\n previousInstance = instance;\n }\n }\n }\n}\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n var JSCompiler_inline_result = targetElement[internalEventHandlersKey];\n void 0 === JSCompiler_inline_result &&\n (JSCompiler_inline_result = targetElement[internalEventHandlersKey] =\n new Set());\n var listenerSetKey = domEventName + \"__bubble\";\n JSCompiler_inline_result.has(listenerSetKey) ||\n (addTrappedEventListener(targetElement, domEventName, 2, !1),\n JSCompiler_inline_result.add(listenerSetKey));\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n var eventSystemFlags = 0;\n isCapturePhaseListener && (eventSystemFlags |= 4);\n addTrappedEventListener(\n target,\n domEventName,\n eventSystemFlags,\n isCapturePhaseListener\n );\n}\nvar listeningMarker = \"_reactListening\" + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n if (!rootContainerElement[listeningMarker]) {\n rootContainerElement[listeningMarker] = !0;\n allNativeEvents.forEach(function (domEventName) {\n \"selectionchange\" !== domEventName &&\n (nonDelegatedEvents.has(domEventName) ||\n listenToNativeEvent(domEventName, !1, rootContainerElement),\n listenToNativeEvent(domEventName, !0, rootContainerElement));\n });\n var ownerDocument =\n 9 === rootContainerElement.nodeType\n ? rootContainerElement\n : rootContainerElement.ownerDocument;\n null === ownerDocument ||\n ownerDocument[listeningMarker] ||\n ((ownerDocument[listeningMarker] = !0),\n listenToNativeEvent(\"selectionchange\", !1, ownerDocument));\n }\n}\nfunction addTrappedEventListener(\n targetContainer,\n domEventName,\n eventSystemFlags,\n isCapturePhaseListener\n) {\n switch (getEventPriority(domEventName)) {\n case 2:\n var listenerWrapper = dispatchDiscreteEvent;\n break;\n case 8:\n listenerWrapper = dispatchContinuousEvent;\n break;\n default:\n listenerWrapper = dispatchEvent;\n }\n eventSystemFlags = listenerWrapper.bind(\n null,\n domEventName,\n eventSystemFlags,\n targetContainer\n );\n listenerWrapper = void 0;\n !passiveBrowserEventsSupported ||\n (\"touchstart\" !== domEventName &&\n \"touchmove\" !== domEventName &&\n \"wheel\" !== domEventName) ||\n (listenerWrapper = !0);\n isCapturePhaseListener\n ? void 0 !== listenerWrapper\n ? targetContainer.addEventListener(domEventName, eventSystemFlags, {\n capture: !0,\n passive: listenerWrapper\n })\n : targetContainer.addEventListener(domEventName, eventSystemFlags, !0)\n : void 0 !== listenerWrapper\n ? targetContainer.addEventListener(domEventName, eventSystemFlags, {\n passive: listenerWrapper\n })\n : targetContainer.addEventListener(domEventName, eventSystemFlags, !1);\n}\nfunction dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n targetInst$jscomp$0,\n targetContainer\n) {\n var ancestorInst = targetInst$jscomp$0;\n if (\n 0 === (eventSystemFlags & 1) &&\n 0 === (eventSystemFlags & 2) &&\n null !== targetInst$jscomp$0\n )\n a: for (;;) {\n if (null === targetInst$jscomp$0) return;\n var nodeTag = targetInst$jscomp$0.tag;\n if (3 === nodeTag || 4 === nodeTag) {\n var container = targetInst$jscomp$0.stateNode.containerInfo;\n if (container === targetContainer) break;\n if (4 === nodeTag)\n for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {\n var grandTag = nodeTag.tag;\n if (\n (3 === grandTag || 4 === grandTag) &&\n nodeTag.stateNode.containerInfo === targetContainer\n )\n return;\n nodeTag = nodeTag.return;\n }\n for (; null !== container; ) {\n nodeTag = getClosestInstanceFromNode(container);\n if (null === nodeTag) return;\n grandTag = nodeTag.tag;\n if (\n 5 === grandTag ||\n 6 === grandTag ||\n 26 === grandTag ||\n 27 === grandTag\n ) {\n targetInst$jscomp$0 = ancestorInst = nodeTag;\n continue a;\n }\n container = container.parentNode;\n }\n }\n targetInst$jscomp$0 = targetInst$jscomp$0.return;\n }\n batchedUpdates$1(function () {\n var targetInst = ancestorInst,\n nativeEventTarget = getEventTarget(nativeEvent),\n dispatchQueue = [];\n a: {\n var reactName = topLevelEventsToReactNames.get(domEventName);\n if (void 0 !== reactName) {\n var SyntheticEventCtor = SyntheticEvent,\n reactEventType = domEventName;\n switch (domEventName) {\n case \"keypress\":\n if (0 === getEventCharCode(nativeEvent)) break a;\n case \"keydown\":\n case \"keyup\":\n SyntheticEventCtor = SyntheticKeyboardEvent;\n break;\n case \"focusin\":\n reactEventType = \"focus\";\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case \"focusout\":\n reactEventType = \"blur\";\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case \"beforeblur\":\n case \"afterblur\":\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case \"click\":\n if (2 === nativeEvent.button) break a;\n case \"auxclick\":\n case \"dblclick\":\n case \"mousedown\":\n case \"mousemove\":\n case \"mouseup\":\n case \"mouseout\":\n case \"mouseover\":\n case \"contextmenu\":\n SyntheticEventCtor = SyntheticMouseEvent;\n break;\n case \"drag\":\n case \"dragend\":\n case \"dragenter\":\n case \"dragexit\":\n case \"dragleave\":\n case \"dragover\":\n case \"dragstart\":\n case \"drop\":\n SyntheticEventCtor = SyntheticDragEvent;\n break;\n case \"touchcancel\":\n case \"touchend\":\n case \"touchmove\":\n case \"touchstart\":\n SyntheticEventCtor = SyntheticTouchEvent;\n break;\n case ANIMATION_END:\n case ANIMATION_ITERATION:\n case ANIMATION_START:\n SyntheticEventCtor = SyntheticAnimationEvent;\n break;\n case TRANSITION_END:\n SyntheticEventCtor = SyntheticTransitionEvent;\n break;\n case \"scroll\":\n case \"scrollend\":\n SyntheticEventCtor = SyntheticUIEvent;\n break;\n case \"wheel\":\n SyntheticEventCtor = SyntheticWheelEvent;\n break;\n case \"copy\":\n case \"cut\":\n case \"paste\":\n SyntheticEventCtor = SyntheticClipboardEvent;\n break;\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n case \"pointercancel\":\n case \"pointerdown\":\n case \"pointermove\":\n case \"pointerout\":\n case \"pointerover\":\n case \"pointerup\":\n SyntheticEventCtor = SyntheticPointerEvent;\n break;\n case \"toggle\":\n case \"beforetoggle\":\n SyntheticEventCtor = SyntheticToggleEvent;\n }\n var inCapturePhase = 0 !== (eventSystemFlags & 4),\n accumulateTargetOnly =\n !inCapturePhase &&\n (\"scroll\" === domEventName || \"scrollend\" === domEventName),\n reactEventName = inCapturePhase\n ? null !== reactName\n ? reactName + \"Capture\"\n : null\n : reactName;\n inCapturePhase = [];\n for (\n var instance = targetInst, lastHostComponent;\n null !== instance;\n\n ) {\n var _instance = instance;\n lastHostComponent = _instance.stateNode;\n _instance = _instance.tag;\n (5 !== _instance && 26 !== _instance && 27 !== _instance) ||\n null === lastHostComponent ||\n null === reactEventName ||\n ((_instance = getListener(instance, reactEventName)),\n null != _instance &&\n inCapturePhase.push(\n createDispatchListener(instance, _instance, lastHostComponent)\n ));\n if (accumulateTargetOnly) break;\n instance = instance.return;\n }\n 0 < inCapturePhase.length &&\n ((reactName = new SyntheticEventCtor(\n reactName,\n reactEventType,\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({ event: reactName, listeners: inCapturePhase }));\n }\n }\n if (0 === (eventSystemFlags & 7)) {\n a: {\n reactName =\n \"mouseover\" === domEventName || \"pointerover\" === domEventName;\n SyntheticEventCtor =\n \"mouseout\" === domEventName || \"pointerout\" === domEventName;\n if (\n reactName &&\n nativeEvent !== currentReplayingEvent &&\n (reactEventType =\n nativeEvent.relatedTarget || nativeEvent.fromElement) &&\n (getClosestInstanceFromNode(reactEventType) ||\n reactEventType[internalContainerInstanceKey])\n )\n break a;\n if (SyntheticEventCtor || reactName) {\n reactName =\n nativeEventTarget.window === nativeEventTarget\n ? nativeEventTarget\n : (reactName = nativeEventTarget.ownerDocument)\n ? reactName.defaultView || reactName.parentWindow\n : window;\n if (SyntheticEventCtor) {\n if (\n ((reactEventType =\n nativeEvent.relatedTarget || nativeEvent.toElement),\n (SyntheticEventCtor = targetInst),\n (reactEventType = reactEventType\n ? getClosestInstanceFromNode(reactEventType)\n : null),\n null !== reactEventType &&\n ((accumulateTargetOnly =\n getNearestMountedFiber(reactEventType)),\n (inCapturePhase = reactEventType.tag),\n reactEventType !== accumulateTargetOnly ||\n (5 !== inCapturePhase &&\n 27 !== inCapturePhase &&\n 6 !== inCapturePhase)))\n )\n reactEventType = null;\n } else (SyntheticEventCtor = null), (reactEventType = targetInst);\n if (SyntheticEventCtor !== reactEventType) {\n inCapturePhase = SyntheticMouseEvent;\n _instance = \"onMouseLeave\";\n reactEventName = \"onMouseEnter\";\n instance = \"mouse\";\n if (\"pointerout\" === domEventName || \"pointerover\" === domEventName)\n (inCapturePhase = SyntheticPointerEvent),\n (_instance = \"onPointerLeave\"),\n (reactEventName = \"onPointerEnter\"),\n (instance = \"pointer\");\n accumulateTargetOnly =\n null == SyntheticEventCtor\n ? reactName\n : getNodeFromInstance(SyntheticEventCtor);\n lastHostComponent =\n null == reactEventType\n ? reactName\n : getNodeFromInstance(reactEventType);\n reactName = new inCapturePhase(\n _instance,\n instance + \"leave\",\n SyntheticEventCtor,\n nativeEvent,\n nativeEventTarget\n );\n reactName.target = accumulateTargetOnly;\n reactName.relatedTarget = lastHostComponent;\n _instance = null;\n getClosestInstanceFromNode(nativeEventTarget) === targetInst &&\n ((inCapturePhase = new inCapturePhase(\n reactEventName,\n instance + \"enter\",\n reactEventType,\n nativeEvent,\n nativeEventTarget\n )),\n (inCapturePhase.target = lastHostComponent),\n (inCapturePhase.relatedTarget = accumulateTargetOnly),\n (_instance = inCapturePhase));\n accumulateTargetOnly = _instance;\n if (SyntheticEventCtor && reactEventType)\n b: {\n inCapturePhase = getParent;\n reactEventName = SyntheticEventCtor;\n instance = reactEventType;\n lastHostComponent = 0;\n for (\n _instance = reactEventName;\n _instance;\n _instance = inCapturePhase(_instance)\n )\n lastHostComponent++;\n _instance = 0;\n for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))\n _instance++;\n for (; 0 < lastHostComponent - _instance; )\n (reactEventName = inCapturePhase(reactEventName)),\n lastHostComponent--;\n for (; 0 < _instance - lastHostComponent; )\n (instance = inCapturePhase(instance)), _instance--;\n for (; lastHostComponent--; ) {\n if (\n reactEventName === instance ||\n (null !== instance && reactEventName === instance.alternate)\n ) {\n inCapturePhase = reactEventName;\n break b;\n }\n reactEventName = inCapturePhase(reactEventName);\n instance = inCapturePhase(instance);\n }\n inCapturePhase = null;\n }\n else inCapturePhase = null;\n null !== SyntheticEventCtor &&\n accumulateEnterLeaveListenersForEvent(\n dispatchQueue,\n reactName,\n SyntheticEventCtor,\n inCapturePhase,\n !1\n );\n null !== reactEventType &&\n null !== accumulateTargetOnly &&\n accumulateEnterLeaveListenersForEvent(\n dispatchQueue,\n accumulateTargetOnly,\n reactEventType,\n inCapturePhase,\n !0\n );\n }\n }\n }\n a: {\n reactName = targetInst ? getNodeFromInstance(targetInst) : window;\n SyntheticEventCtor =\n reactName.nodeName && reactName.nodeName.toLowerCase();\n if (\n \"select\" === SyntheticEventCtor ||\n (\"input\" === SyntheticEventCtor && \"file\" === reactName.type)\n )\n var getTargetInstFunc = getTargetInstForChangeEvent;\n else if (isTextInputElement(reactName))\n if (isInputEventSupported)\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n var handleEventFunc = handleEventsForInputEventPolyfill;\n }\n else\n (SyntheticEventCtor = reactName.nodeName),\n !SyntheticEventCtor ||\n \"input\" !== SyntheticEventCtor.toLowerCase() ||\n (\"checkbox\" !== reactName.type && \"radio\" !== reactName.type)\n ? targetInst &&\n isCustomElement(targetInst.elementType) &&\n (getTargetInstFunc = getTargetInstForChangeEvent)\n : (getTargetInstFunc = getTargetInstForClickEvent);\n if (\n getTargetInstFunc &&\n (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))\n ) {\n createAndAccumulateChangeEvent(\n dispatchQueue,\n getTargetInstFunc,\n nativeEvent,\n nativeEventTarget\n );\n break a;\n }\n handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);\n \"focusout\" === domEventName &&\n targetInst &&\n \"number\" === reactName.type &&\n null != targetInst.memoizedProps.value &&\n setDefaultValue(reactName, \"number\", reactName.value);\n }\n handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;\n switch (domEventName) {\n case \"focusin\":\n if (\n isTextInputElement(handleEventFunc) ||\n \"true\" === handleEventFunc.contentEditable\n )\n (activeElement = handleEventFunc),\n (activeElementInst = targetInst),\n (lastSelection = null);\n break;\n case \"focusout\":\n lastSelection = activeElementInst = activeElement = null;\n break;\n case \"mousedown\":\n mouseDown = !0;\n break;\n case \"contextmenu\":\n case \"mouseup\":\n case \"dragend\":\n mouseDown = !1;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\n case \"selectionchange\":\n if (skipSelectionChangeEvent) break;\n case \"keydown\":\n case \"keyup\":\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\n var fallbackData;\n if (canUseCompositionEvent)\n b: {\n switch (domEventName) {\n case \"compositionstart\":\n var eventType = \"onCompositionStart\";\n break b;\n case \"compositionend\":\n eventType = \"onCompositionEnd\";\n break b;\n case \"compositionupdate\":\n eventType = \"onCompositionUpdate\";\n break b;\n }\n eventType = void 0;\n }\n else\n isComposing\n ? isFallbackCompositionEnd(domEventName, nativeEvent) &&\n (eventType = \"onCompositionEnd\")\n : \"keydown\" === domEventName &&\n 229 === nativeEvent.keyCode &&\n (eventType = \"onCompositionStart\");\n eventType &&\n (useFallbackCompositionData &&\n \"ko\" !== nativeEvent.locale &&\n (isComposing || \"onCompositionStart\" !== eventType\n ? \"onCompositionEnd\" === eventType &&\n isComposing &&\n (fallbackData = getData())\n : ((root = nativeEventTarget),\n (startText = \"value\" in root ? root.value : root.textContent),\n (isComposing = !0))),\n (handleEventFunc = accumulateTwoPhaseListeners(targetInst, eventType)),\n 0 < handleEventFunc.length &&\n ((eventType = new SyntheticCompositionEvent(\n eventType,\n domEventName,\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({ event: eventType, listeners: handleEventFunc }),\n fallbackData\n ? (eventType.data = fallbackData)\n : ((fallbackData = getDataFromCustomEvent(nativeEvent)),\n null !== fallbackData && (eventType.data = fallbackData))));\n if (\n (fallbackData = canUseTextInputEvent\n ? getNativeBeforeInputChars(domEventName, nativeEvent)\n : getFallbackBeforeInputChars(domEventName, nativeEvent))\n )\n (eventType = accumulateTwoPhaseListeners(targetInst, \"onBeforeInput\")),\n 0 < eventType.length &&\n ((handleEventFunc = new SyntheticCompositionEvent(\n \"onBeforeInput\",\n \"beforeinput\",\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({\n event: handleEventFunc,\n listeners: eventType\n }),\n (handleEventFunc.data = fallbackData));\n extractEvents$1(\n dispatchQueue,\n domEventName,\n targetInst,\n nativeEvent,\n nativeEventTarget\n );\n }\n processDispatchQueue(dispatchQueue, eventSystemFlags);\n });\n}\nfunction createDispatchListener(instance, listener, currentTarget) {\n return {\n instance: instance,\n listener: listener,\n currentTarget: currentTarget\n };\n}\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n for (\n var captureName = reactName + \"Capture\", listeners = [];\n null !== targetFiber;\n\n ) {\n var _instance2 = targetFiber,\n stateNode = _instance2.stateNode;\n _instance2 = _instance2.tag;\n (5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2) ||\n null === stateNode ||\n ((_instance2 = getListener(targetFiber, captureName)),\n null != _instance2 &&\n listeners.unshift(\n createDispatchListener(targetFiber, _instance2, stateNode)\n ),\n (_instance2 = getListener(targetFiber, reactName)),\n null != _instance2 &&\n listeners.push(\n createDispatchListener(targetFiber, _instance2, stateNode)\n ));\n if (3 === targetFiber.tag) return listeners;\n targetFiber = targetFiber.return;\n }\n return [];\n}\nfunction getParent(inst) {\n if (null === inst) return null;\n do inst = inst.return;\n while (inst && 5 !== inst.tag && 27 !== inst.tag);\n return inst ? inst : null;\n}\nfunction accumulateEnterLeaveListenersForEvent(\n dispatchQueue,\n event,\n target,\n common,\n inCapturePhase\n) {\n for (\n var registrationName = event._reactName, listeners = [];\n null !== target && target !== common;\n\n ) {\n var _instance3 = target,\n alternate = _instance3.alternate,\n stateNode = _instance3.stateNode;\n _instance3 = _instance3.tag;\n if (null !== alternate && alternate === common) break;\n (5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3) ||\n null === stateNode ||\n ((alternate = stateNode),\n inCapturePhase\n ? ((stateNode = getListener(target, registrationName)),\n null != stateNode &&\n listeners.unshift(\n createDispatchListener(target, stateNode, alternate)\n ))\n : inCapturePhase ||\n ((stateNode = getListener(target, registrationName)),\n null != stateNode &&\n listeners.push(\n createDispatchListener(target, stateNode, alternate)\n )));\n target = target.return;\n }\n 0 !== listeners.length &&\n dispatchQueue.push({ event: event, listeners: listeners });\n}\nvar NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g,\n NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\nfunction normalizeMarkupForTextOrAttribute(markup) {\n return (\"string\" === typeof markup ? markup : \"\" + markup)\n .replace(NORMALIZE_NEWLINES_REGEX, \"\\n\")\n .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, \"\");\n}\nfunction checkForUnmatchedText(serverText, clientText) {\n clientText = normalizeMarkupForTextOrAttribute(clientText);\n return normalizeMarkupForTextOrAttribute(serverText) === clientText ? !0 : !1;\n}\nfunction setProp(domElement, tag, key, value, props, prevValue) {\n switch (key) {\n case \"children\":\n \"string\" === typeof value\n ? \"body\" === tag ||\n (\"textarea\" === tag && \"\" === value) ||\n setTextContent(domElement, value)\n : (\"number\" === typeof value || \"bigint\" === typeof value) &&\n \"body\" !== tag &&\n setTextContent(domElement, \"\" + value);\n break;\n case \"className\":\n setValueForKnownAttribute(domElement, \"class\", value);\n break;\n case \"tabIndex\":\n setValueForKnownAttribute(domElement, \"tabindex\", value);\n break;\n case \"dir\":\n case \"role\":\n case \"viewBox\":\n case \"width\":\n case \"height\":\n setValueForKnownAttribute(domElement, key, value);\n break;\n case \"style\":\n setValueForStyles(domElement, value, prevValue);\n break;\n case \"data\":\n if (\"object\" !== tag) {\n setValueForKnownAttribute(domElement, \"data\", value);\n break;\n }\n case \"src\":\n case \"href\":\n if (\"\" === value && (\"a\" !== tag || \"href\" !== key)) {\n domElement.removeAttribute(key);\n break;\n }\n if (\n null == value ||\n \"function\" === typeof value ||\n \"symbol\" === typeof value ||\n \"boolean\" === typeof value\n ) {\n domElement.removeAttribute(key);\n break;\n }\n value = sanitizeURL(\"\" + value);\n domElement.setAttribute(key, value);\n break;\n case \"action\":\n case \"formAction\":\n if (\"function\" === typeof value) {\n domElement.setAttribute(\n key,\n \"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')\"\n );\n break;\n } else\n \"function\" === typeof prevValue &&\n (\"formAction\" === key\n ? (\"input\" !== tag &&\n setProp(domElement, tag, \"name\", props.name, props, null),\n setProp(\n domElement,\n tag,\n \"formEncType\",\n props.formEncType,\n props,\n null\n ),\n setProp(\n domElement,\n tag,\n \"formMethod\",\n props.formMethod,\n props,\n null\n ),\n setProp(\n domElement,\n tag,\n \"formTarget\",\n props.formTarget,\n props,\n null\n ))\n : (setProp(domElement, tag, \"encType\", props.encType, props, null),\n setProp(domElement, tag, \"method\", props.method, props, null),\n setProp(domElement, tag, \"target\", props.target, props, null)));\n if (\n null == value ||\n \"symbol\" === typeof value ||\n \"boolean\" === typeof value\n ) {\n domElement.removeAttribute(key);\n break;\n }\n value = sanitizeURL(\"\" + value);\n domElement.setAttribute(key, value);\n break;\n case \"onClick\":\n null != value && (domElement.onclick = noop$1);\n break;\n case \"onScroll\":\n null != value && listenToNonDelegatedEvent(\"scroll\", domElement);\n break;\n case \"onScrollEnd\":\n null != value && listenToNonDelegatedEvent(\"scrollend\", domElement);\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != value) {\n if (\"object\" !== typeof value || !(\"__html\" in value))\n throw Error(formatProdErrorMessage(61));\n key = value.__html;\n if (null != key) {\n if (null != props.children) throw Error(formatProdErrorMessage(60));\n domElement.innerHTML = key;\n }\n }\n break;\n case \"multiple\":\n domElement.multiple =\n value && \"function\" !== typeof value && \"symbol\" !== typeof value;\n break;\n case \"muted\":\n domElement.muted =\n value && \"function\" !== typeof value && \"symbol\" !== typeof value;\n break;\n case \"suppressContentEditableWarning\":\n case \"suppressHydrationWarning\":\n case \"defaultValue\":\n case \"defaultChecked\":\n case \"innerHTML\":\n case \"ref\":\n break;\n case \"autoFocus\":\n break;\n case \"xlinkHref\":\n if (\n null == value ||\n \"function\" === typeof value ||\n \"boolean\" === typeof value ||\n \"symbol\" === typeof value\n ) {\n domElement.removeAttribute(\"xlink:href\");\n break;\n }\n key = sanitizeURL(\"\" + value);\n domElement.setAttributeNS(\n \"http://www.w3.org/1999/xlink\",\n \"xlink:href\",\n key\n );\n break;\n case \"contentEditable\":\n case \"spellCheck\":\n case \"draggable\":\n case \"value\":\n case \"autoReverse\":\n case \"externalResourcesRequired\":\n case \"focusable\":\n case \"preserveAlpha\":\n null != value && \"function\" !== typeof value && \"symbol\" !== typeof value\n ? domElement.setAttribute(key, \"\" + value)\n : domElement.removeAttribute(key);\n break;\n case \"inert\":\n case \"allowFullScreen\":\n case \"async\":\n case \"autoPlay\":\n case \"controls\":\n case \"default\":\n case \"defer\":\n case \"disabled\":\n case \"disablePictureInPicture\":\n case \"disableRemotePlayback\":\n case \"formNoValidate\":\n case \"hidden\":\n case \"loop\":\n case \"noModule\":\n case \"noValidate\":\n case \"open\":\n case \"playsInline\":\n case \"readOnly\":\n case \"required\":\n case \"reversed\":\n case \"scoped\":\n case \"seamless\":\n case \"itemScope\":\n value && \"function\" !== typeof value && \"symbol\" !== typeof value\n ? domElement.setAttribute(key, \"\")\n : domElement.removeAttribute(key);\n break;\n case \"capture\":\n case \"download\":\n !0 === value\n ? domElement.setAttribute(key, \"\")\n : !1 !== value &&\n null != value &&\n \"function\" !== typeof value &&\n \"symbol\" !== typeof value\n ? domElement.setAttribute(key, value)\n : domElement.removeAttribute(key);\n break;\n case \"cols\":\n case \"rows\":\n case \"size\":\n case \"span\":\n null != value &&\n \"function\" !== typeof value &&\n \"symbol\" !== typeof value &&\n !isNaN(value) &&\n 1 <= value\n ? domElement.setAttribute(key, value)\n : domElement.removeAttribute(key);\n break;\n case \"rowSpan\":\n case \"start\":\n null == value ||\n \"function\" === typeof value ||\n \"symbol\" === typeof value ||\n isNaN(value)\n ? domElement.removeAttribute(key)\n : domElement.setAttribute(key, value);\n break;\n case \"popover\":\n listenToNonDelegatedEvent(\"beforetoggle\", domElement);\n listenToNonDelegatedEvent(\"toggle\", domElement);\n setValueForAttribute(domElement, \"popover\", value);\n break;\n case \"xlinkActuate\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:actuate\",\n value\n );\n break;\n case \"xlinkArcrole\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:arcrole\",\n value\n );\n break;\n case \"xlinkRole\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:role\",\n value\n );\n break;\n case \"xlinkShow\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:show\",\n value\n );\n break;\n case \"xlinkTitle\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:title\",\n value\n );\n break;\n case \"xlinkType\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:type\",\n value\n );\n break;\n case \"xmlBase\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/XML/1998/namespace\",\n \"xml:base\",\n value\n );\n break;\n case \"xmlLang\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/XML/1998/namespace\",\n \"xml:lang\",\n value\n );\n break;\n case \"xmlSpace\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/XML/1998/namespace\",\n \"xml:space\",\n value\n );\n break;\n case \"is\":\n setValueForAttribute(domElement, \"is\", value);\n break;\n case \"innerText\":\n case \"textContent\":\n break;\n default:\n if (\n !(2 < key.length) ||\n (\"o\" !== key[0] && \"O\" !== key[0]) ||\n (\"n\" !== key[1] && \"N\" !== key[1])\n )\n (key = aliases.get(key) || key),\n setValueForAttribute(domElement, key, value);\n }\n}\nfunction setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {\n switch (key) {\n case \"style\":\n setValueForStyles(domElement, value, prevValue);\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != value) {\n if (\"object\" !== typeof value || !(\"__html\" in value))\n throw Error(formatProdErrorMessage(61));\n key = value.__html;\n if (null != key) {\n if (null != props.children) throw Error(formatProdErrorMessage(60));\n domElement.innerHTML = key;\n }\n }\n break;\n case \"children\":\n \"string\" === typeof value\n ? setTextContent(domElement, value)\n : (\"number\" === typeof value || \"bigint\" === typeof value) &&\n setTextContent(domElement, \"\" + value);\n break;\n case \"onScroll\":\n null != value && listenToNonDelegatedEvent(\"scroll\", domElement);\n break;\n case \"onScrollEnd\":\n null != value && listenToNonDelegatedEvent(\"scrollend\", domElement);\n break;\n case \"onClick\":\n null != value && (domElement.onclick = noop$1);\n break;\n case \"suppressContentEditableWarning\":\n case \"suppressHydrationWarning\":\n case \"innerHTML\":\n case \"ref\":\n break;\n case \"innerText\":\n case \"textContent\":\n break;\n default:\n if (!registrationNameDependencies.hasOwnProperty(key))\n a: {\n if (\n \"o\" === key[0] &&\n \"n\" === key[1] &&\n ((props = key.endsWith(\"Capture\")),\n (tag = key.slice(2, props ? key.length - 7 : void 0)),\n (prevValue = domElement[internalPropsKey] || null),\n (prevValue = null != prevValue ? prevValue[key] : null),\n \"function\" === typeof prevValue &&\n domElement.removeEventListener(tag, prevValue, props),\n \"function\" === typeof value)\n ) {\n \"function\" !== typeof prevValue &&\n null !== prevValue &&\n (key in domElement\n ? (domElement[key] = null)\n : domElement.hasAttribute(key) &&\n domElement.removeAttribute(key));\n domElement.addEventListener(tag, value, props);\n break a;\n }\n key in domElement\n ? (domElement[key] = value)\n : !0 === value\n ? domElement.setAttribute(key, \"\")\n : setValueForAttribute(domElement, key, value);\n }\n }\n}\nfunction setInitialProperties(domElement, tag, props) {\n switch (tag) {\n case \"div\":\n case \"span\":\n case \"svg\":\n case \"path\":\n case \"a\":\n case \"g\":\n case \"p\":\n case \"li\":\n break;\n case \"img\":\n listenToNonDelegatedEvent(\"error\", domElement);\n listenToNonDelegatedEvent(\"load\", domElement);\n var hasSrc = !1,\n hasSrcSet = !1,\n propKey;\n for (propKey in props)\n if (props.hasOwnProperty(propKey)) {\n var propValue = props[propKey];\n if (null != propValue)\n switch (propKey) {\n case \"src\":\n hasSrc = !0;\n break;\n case \"srcSet\":\n hasSrcSet = !0;\n break;\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n throw Error(formatProdErrorMessage(137, tag));\n default:\n setProp(domElement, tag, propKey, propValue, props, null);\n }\n }\n hasSrcSet &&\n setProp(domElement, tag, \"srcSet\", props.srcSet, props, null);\n hasSrc && setProp(domElement, tag, \"src\", props.src, props, null);\n return;\n case \"input\":\n listenToNonDelegatedEvent(\"invalid\", domElement);\n var defaultValue = (propKey = propValue = hasSrcSet = null),\n checked = null,\n defaultChecked = null;\n for (hasSrc in props)\n if (props.hasOwnProperty(hasSrc)) {\n var propValue$184 = props[hasSrc];\n if (null != propValue$184)\n switch (hasSrc) {\n case \"name\":\n hasSrcSet = propValue$184;\n break;\n case \"type\":\n propValue = propValue$184;\n break;\n case \"checked\":\n checked = propValue$184;\n break;\n case \"defaultChecked\":\n defaultChecked = propValue$184;\n break;\n case \"value\":\n propKey = propValue$184;\n break;\n case \"defaultValue\":\n defaultValue = propValue$184;\n break;\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n if (null != propValue$184)\n throw Error(formatProdErrorMessage(137, tag));\n break;\n default:\n setProp(domElement, tag, hasSrc, propValue$184, props, null);\n }\n }\n initInput(\n domElement,\n propKey,\n defaultValue,\n checked,\n defaultChecked,\n propValue,\n hasSrcSet,\n !1\n );\n return;\n case \"select\":\n listenToNonDelegatedEvent(\"invalid\", domElement);\n hasSrc = propValue = propKey = null;\n for (hasSrcSet in props)\n if (\n props.hasOwnProperty(hasSrcSet) &&\n ((defaultValue = props[hasSrcSet]), null != defaultValue)\n )\n switch (hasSrcSet) {\n case \"value\":\n propKey = defaultValue;\n break;\n case \"defaultValue\":\n propValue = defaultValue;\n break;\n case \"multiple\":\n hasSrc = defaultValue;\n default:\n setProp(domElement, tag, hasSrcSet, defaultValue, props, null);\n }\n tag = propKey;\n props = propValue;\n domElement.multiple = !!hasSrc;\n null != tag\n ? updateOptions(domElement, !!hasSrc, tag, !1)\n : null != props && updateOptions(domElement, !!hasSrc, props, !0);\n return;\n case \"textarea\":\n listenToNonDelegatedEvent(\"invalid\", domElement);\n propKey = hasSrcSet = hasSrc = null;\n for (propValue in props)\n if (\n props.hasOwnProperty(propValue) &&\n ((defaultValue = props[propValue]), null != defaultValue)\n )\n switch (propValue) {\n case \"value\":\n hasSrc = defaultValue;\n break;\n case \"defaultValue\":\n hasSrcSet = defaultValue;\n break;\n case \"children\":\n propKey = defaultValue;\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != defaultValue) throw Error(formatProdErrorMessage(91));\n break;\n default:\n setProp(domElement, tag, propValue, defaultValue, props, null);\n }\n initTextarea(domElement, hasSrc, hasSrcSet, propKey);\n return;\n case \"option\":\n for (checked in props)\n if (\n props.hasOwnProperty(checked) &&\n ((hasSrc = props[checked]), null != hasSrc)\n )\n switch (checked) {\n case \"selected\":\n domElement.selected =\n hasSrc &&\n \"function\" !== typeof hasSrc &&\n \"symbol\" !== typeof hasSrc;\n break;\n default:\n setProp(domElement, tag, checked, hasSrc, props, null);\n }\n return;\n case \"dialog\":\n listenToNonDelegatedEvent(\"beforetoggle\", domElement);\n listenToNonDelegatedEvent(\"toggle\", domElement);\n listenToNonDelegatedEvent(\"cancel\", domElement);\n listenToNonDelegatedEvent(\"close\", domElement);\n break;\n case \"iframe\":\n case \"object\":\n listenToNonDelegatedEvent(\"load\", domElement);\n break;\n case \"video\":\n case \"audio\":\n for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)\n listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);\n break;\n case \"image\":\n listenToNonDelegatedEvent(\"error\", domElement);\n listenToNonDelegatedEvent(\"load\", domElement);\n break;\n case \"details\":\n listenToNonDelegatedEvent(\"toggle\", domElement);\n break;\n case \"embed\":\n case \"source\":\n case \"link\":\n listenToNonDelegatedEvent(\"error\", domElement),\n listenToNonDelegatedEvent(\"load\", domElement);\n case \"area\":\n case \"base\":\n case \"br\":\n case \"col\":\n case \"hr\":\n case \"keygen\":\n case \"meta\":\n case \"param\":\n case \"track\":\n case \"wbr\":\n case \"menuitem\":\n for (defaultChecked in props)\n if (\n props.hasOwnProperty(defaultChecked) &&\n ((hasSrc = props[defaultChecked]), null != hasSrc)\n )\n switch (defaultChecked) {\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n throw Error(formatProdErrorMessage(137, tag));\n default:\n setProp(domElement, tag, defaultChecked, hasSrc, props, null);\n }\n return;\n default:\n if (isCustomElement(tag)) {\n for (propValue$184 in props)\n props.hasOwnProperty(propValue$184) &&\n ((hasSrc = props[propValue$184]),\n void 0 !== hasSrc &&\n setPropOnCustomElement(\n domElement,\n tag,\n propValue$184,\n hasSrc,\n props,\n void 0\n ));\n return;\n }\n }\n for (defaultValue in props)\n props.hasOwnProperty(defaultValue) &&\n ((hasSrc = props[defaultValue]),\n null != hasSrc &&\n setProp(domElement, tag, defaultValue, hasSrc, props, null));\n}\nfunction updateProperties(domElement, tag, lastProps, nextProps) {\n switch (tag) {\n case \"div\":\n case \"span\":\n case \"svg\":\n case \"path\":\n case \"a\":\n case \"g\":\n case \"p\":\n case \"li\":\n break;\n case \"input\":\n var name = null,\n type = null,\n value = null,\n defaultValue = null,\n lastDefaultValue = null,\n checked = null,\n defaultChecked = null;\n for (propKey in lastProps) {\n var lastProp = lastProps[propKey];\n if (lastProps.hasOwnProperty(propKey) && null != lastProp)\n switch (propKey) {\n case \"checked\":\n break;\n case \"value\":\n break;\n case \"defaultValue\":\n lastDefaultValue = lastProp;\n default:\n nextProps.hasOwnProperty(propKey) ||\n setProp(domElement, tag, propKey, null, nextProps, lastProp);\n }\n }\n for (var propKey$201 in nextProps) {\n var propKey = nextProps[propKey$201];\n lastProp = lastProps[propKey$201];\n if (\n nextProps.hasOwnProperty(propKey$201) &&\n (null != propKey || null != lastProp)\n )\n switch (propKey$201) {\n case \"type\":\n type = propKey;\n break;\n case \"name\":\n name = propKey;\n break;\n case \"checked\":\n checked = propKey;\n break;\n case \"defaultChecked\":\n defaultChecked = propKey;\n break;\n case \"value\":\n value = propKey;\n break;\n case \"defaultValue\":\n defaultValue = propKey;\n break;\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n if (null != propKey)\n throw Error(formatProdErrorMessage(137, tag));\n break;\n default:\n propKey !== lastProp &&\n setProp(\n domElement,\n tag,\n propKey$201,\n propKey,\n nextProps,\n lastProp\n );\n }\n }\n updateInput(\n domElement,\n value,\n defaultValue,\n lastDefaultValue,\n checked,\n defaultChecked,\n type,\n name\n );\n return;\n case \"select\":\n propKey = value = defaultValue = propKey$201 = null;\n for (type in lastProps)\n if (\n ((lastDefaultValue = lastProps[type]),\n lastProps.hasOwnProperty(type) && null != lastDefaultValue)\n )\n switch (type) {\n case \"value\":\n break;\n case \"multiple\":\n propKey = lastDefaultValue;\n default:\n nextProps.hasOwnProperty(type) ||\n setProp(\n domElement,\n tag,\n type,\n null,\n nextProps,\n lastDefaultValue\n );\n }\n for (name in nextProps)\n if (\n ((type = nextProps[name]),\n (lastDefaultValue = lastProps[name]),\n nextProps.hasOwnProperty(name) &&\n (null != type || null != lastDefaultValue))\n )\n switch (name) {\n case \"value\":\n propKey$201 = type;\n break;\n case \"defaultValue\":\n defaultValue = type;\n break;\n case \"multiple\":\n value = type;\n default:\n type !== lastDefaultValue &&\n setProp(\n domElement,\n tag,\n name,\n type,\n nextProps,\n lastDefaultValue\n );\n }\n tag = defaultValue;\n lastProps = value;\n nextProps = propKey;\n null != propKey$201\n ? updateOptions(domElement, !!lastProps, propKey$201, !1)\n : !!nextProps !== !!lastProps &&\n (null != tag\n ? updateOptions(domElement, !!lastProps, tag, !0)\n : updateOptions(domElement, !!lastProps, lastProps ? [] : \"\", !1));\n return;\n case \"textarea\":\n propKey = propKey$201 = null;\n for (defaultValue in lastProps)\n if (\n ((name = lastProps[defaultValue]),\n lastProps.hasOwnProperty(defaultValue) &&\n null != name &&\n !nextProps.hasOwnProperty(defaultValue))\n )\n switch (defaultValue) {\n case \"value\":\n break;\n case \"children\":\n break;\n default:\n setProp(domElement, tag, defaultValue, null, nextProps, name);\n }\n for (value in nextProps)\n if (\n ((name = nextProps[value]),\n (type = lastProps[value]),\n nextProps.hasOwnProperty(value) && (null != name || null != type))\n )\n switch (value) {\n case \"value\":\n propKey$201 = name;\n break;\n case \"defaultValue\":\n propKey = name;\n break;\n case \"children\":\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != name) throw Error(formatProdErrorMessage(91));\n break;\n default:\n name !== type &&\n setProp(domElement, tag, value, name, nextProps, type);\n }\n updateTextarea(domElement, propKey$201, propKey);\n return;\n case \"option\":\n for (var propKey$217 in lastProps)\n if (\n ((propKey$201 = lastProps[propKey$217]),\n lastProps.hasOwnProperty(propKey$217) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$217))\n )\n switch (propKey$217) {\n case \"selected\":\n domElement.selected = !1;\n break;\n default:\n setProp(\n domElement,\n tag,\n propKey$217,\n null,\n nextProps,\n propKey$201\n );\n }\n for (lastDefaultValue in nextProps)\n if (\n ((propKey$201 = nextProps[lastDefaultValue]),\n (propKey = lastProps[lastDefaultValue]),\n nextProps.hasOwnProperty(lastDefaultValue) &&\n propKey$201 !== propKey &&\n (null != propKey$201 || null != propKey))\n )\n switch (lastDefaultValue) {\n case \"selected\":\n domElement.selected =\n propKey$201 &&\n \"function\" !== typeof propKey$201 &&\n \"symbol\" !== typeof propKey$201;\n break;\n default:\n setProp(\n domElement,\n tag,\n lastDefaultValue,\n propKey$201,\n nextProps,\n propKey\n );\n }\n return;\n case \"img\":\n case \"link\":\n case \"area\":\n case \"base\":\n case \"br\":\n case \"col\":\n case \"embed\":\n case \"hr\":\n case \"keygen\":\n case \"meta\":\n case \"param\":\n case \"source\":\n case \"track\":\n case \"wbr\":\n case \"menuitem\":\n for (var propKey$222 in lastProps)\n (propKey$201 = lastProps[propKey$222]),\n lastProps.hasOwnProperty(propKey$222) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$222) &&\n setProp(domElement, tag, propKey$222, null, nextProps, propKey$201);\n for (checked in nextProps)\n if (\n ((propKey$201 = nextProps[checked]),\n (propKey = lastProps[checked]),\n nextProps.hasOwnProperty(checked) &&\n propKey$201 !== propKey &&\n (null != propKey$201 || null != propKey))\n )\n switch (checked) {\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n if (null != propKey$201)\n throw Error(formatProdErrorMessage(137, tag));\n break;\n default:\n setProp(\n domElement,\n tag,\n checked,\n propKey$201,\n nextProps,\n propKey\n );\n }\n return;\n default:\n if (isCustomElement(tag)) {\n for (var propKey$227 in lastProps)\n (propKey$201 = lastProps[propKey$227]),\n lastProps.hasOwnProperty(propKey$227) &&\n void 0 !== propKey$201 &&\n !nextProps.hasOwnProperty(propKey$227) &&\n setPropOnCustomElement(\n domElement,\n tag,\n propKey$227,\n void 0,\n nextProps,\n propKey$201\n );\n for (defaultChecked in nextProps)\n (propKey$201 = nextProps[defaultChecked]),\n (propKey = lastProps[defaultChecked]),\n !nextProps.hasOwnProperty(defaultChecked) ||\n propKey$201 === propKey ||\n (void 0 === propKey$201 && void 0 === propKey) ||\n setPropOnCustomElement(\n domElement,\n tag,\n defaultChecked,\n propKey$201,\n nextProps,\n propKey\n );\n return;\n }\n }\n for (var propKey$232 in lastProps)\n (propKey$201 = lastProps[propKey$232]),\n lastProps.hasOwnProperty(propKey$232) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$232) &&\n setProp(domElement, tag, propKey$232, null, nextProps, propKey$201);\n for (lastProp in nextProps)\n (propKey$201 = nextProps[lastProp]),\n (propKey = lastProps[lastProp]),\n !nextProps.hasOwnProperty(lastProp) ||\n propKey$201 === propKey ||\n (null == propKey$201 && null == propKey) ||\n setProp(domElement, tag, lastProp, propKey$201, nextProps, propKey);\n}\nfunction isLikelyStaticResource(initiatorType) {\n switch (initiatorType) {\n case \"css\":\n case \"script\":\n case \"font\":\n case \"img\":\n case \"image\":\n case \"input\":\n case \"link\":\n return !0;\n default:\n return !1;\n }\n}\nfunction estimateBandwidth() {\n if (\"function\" === typeof performance.getEntriesByType) {\n for (\n var count = 0,\n bits = 0,\n resourceEntries = performance.getEntriesByType(\"resource\"),\n i = 0;\n i < resourceEntries.length;\n i++\n ) {\n var entry = resourceEntries[i],\n transferSize = entry.transferSize,\n initiatorType = entry.initiatorType,\n duration = entry.duration;\n if (transferSize && duration && isLikelyStaticResource(initiatorType)) {\n initiatorType = 0;\n duration = entry.responseEnd;\n for (i += 1; i < resourceEntries.length; i++) {\n var overlapEntry = resourceEntries[i],\n overlapStartTime = overlapEntry.startTime;\n if (overlapStartTime > duration) break;\n var overlapTransferSize = overlapEntry.transferSize,\n overlapInitiatorType = overlapEntry.initiatorType;\n overlapTransferSize &&\n isLikelyStaticResource(overlapInitiatorType) &&\n ((overlapEntry = overlapEntry.responseEnd),\n (initiatorType +=\n overlapTransferSize *\n (overlapEntry < duration\n ? 1\n : (duration - overlapStartTime) /\n (overlapEntry - overlapStartTime))));\n }\n --i;\n bits += (8 * (transferSize + initiatorType)) / (entry.duration / 1e3);\n count++;\n if (10 < count) break;\n }\n }\n if (0 < count) return bits / count / 1e6;\n }\n return navigator.connection &&\n ((count = navigator.connection.downlink), \"number\" === typeof count)\n ? count\n : 5;\n}\nvar eventsEnabled = null,\n selectionInformation = null;\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n return 9 === rootContainerElement.nodeType\n ? rootContainerElement\n : rootContainerElement.ownerDocument;\n}\nfunction getOwnHostContext(namespaceURI) {\n switch (namespaceURI) {\n case \"http://www.w3.org/2000/svg\":\n return 1;\n case \"http://www.w3.org/1998/Math/MathML\":\n return 2;\n default:\n return 0;\n }\n}\nfunction getChildHostContextProd(parentNamespace, type) {\n if (0 === parentNamespace)\n switch (type) {\n case \"svg\":\n return 1;\n case \"math\":\n return 2;\n default:\n return 0;\n }\n return 1 === parentNamespace && \"foreignObject\" === type\n ? 0\n : parentNamespace;\n}\nfunction shouldSetTextContent(type, props) {\n return (\n \"textarea\" === type ||\n \"noscript\" === type ||\n \"string\" === typeof props.children ||\n \"number\" === typeof props.children ||\n \"bigint\" === typeof props.children ||\n (\"object\" === typeof props.dangerouslySetInnerHTML &&\n null !== props.dangerouslySetInnerHTML &&\n null != props.dangerouslySetInnerHTML.__html)\n );\n}\nvar currentPopstateTransitionEvent = null;\nfunction shouldAttemptEagerTransition() {\n var event = window.event;\n if (event && \"popstate\" === event.type) {\n if (event === currentPopstateTransitionEvent) return !1;\n currentPopstateTransitionEvent = event;\n return !0;\n }\n currentPopstateTransitionEvent = null;\n return !1;\n}\nvar scheduleTimeout = \"function\" === typeof setTimeout ? setTimeout : void 0,\n cancelTimeout = \"function\" === typeof clearTimeout ? clearTimeout : void 0,\n localPromise = \"function\" === typeof Promise ? Promise : void 0,\n scheduleMicrotask =\n \"function\" === typeof queueMicrotask\n ? queueMicrotask\n : \"undefined\" !== typeof localPromise\n ? function (callback) {\n return localPromise\n .resolve(null)\n .then(callback)\n .catch(handleErrorInNextTick);\n }\n : scheduleTimeout;\nfunction handleErrorInNextTick(error) {\n setTimeout(function () {\n throw error;\n });\n}\nfunction isSingletonScope(type) {\n return \"head\" === type;\n}\nfunction clearHydrationBoundary(parentInstance, hydrationInstance) {\n var node = hydrationInstance,\n depth = 0;\n do {\n var nextNode = node.nextSibling;\n parentInstance.removeChild(node);\n if (nextNode && 8 === nextNode.nodeType)\n if (((node = nextNode.data), \"/$\" === node || \"/&\" === node)) {\n if (0 === depth) {\n parentInstance.removeChild(nextNode);\n retryIfBlockedOn(hydrationInstance);\n return;\n }\n depth--;\n } else if (\n \"$\" === node ||\n \"$?\" === node ||\n \"$~\" === node ||\n \"$!\" === node ||\n \"&\" === node\n )\n depth++;\n else if (\"html\" === node)\n releaseSingletonInstance(parentInstance.ownerDocument.documentElement);\n else if (\"head\" === node) {\n node = parentInstance.ownerDocument.head;\n releaseSingletonInstance(node);\n for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {\n var nextNode$jscomp$0 = node$jscomp$0.nextSibling,\n nodeName = node$jscomp$0.nodeName;\n node$jscomp$0[internalHoistableMarker] ||\n \"SCRIPT\" === nodeName ||\n \"STYLE\" === nodeName ||\n (\"LINK\" === nodeName &&\n \"stylesheet\" === node$jscomp$0.rel.toLowerCase()) ||\n node.removeChild(node$jscomp$0);\n node$jscomp$0 = nextNode$jscomp$0;\n }\n } else\n \"body\" === node &&\n releaseSingletonInstance(parentInstance.ownerDocument.body);\n node = nextNode;\n } while (node);\n retryIfBlockedOn(hydrationInstance);\n}\nfunction hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {\n var node = suspenseInstance;\n suspenseInstance = 0;\n do {\n var nextNode = node.nextSibling;\n 1 === node.nodeType\n ? isHidden\n ? ((node._stashedDisplay = node.style.display),\n (node.style.display = \"none\"))\n : ((node.style.display = node._stashedDisplay || \"\"),\n \"\" === node.getAttribute(\"style\") && node.removeAttribute(\"style\"))\n : 3 === node.nodeType &&\n (isHidden\n ? ((node._stashedText = node.nodeValue), (node.nodeValue = \"\"))\n : (node.nodeValue = node._stashedText || \"\"));\n if (nextNode && 8 === nextNode.nodeType)\n if (((node = nextNode.data), \"/$\" === node))\n if (0 === suspenseInstance) break;\n else suspenseInstance--;\n else\n (\"$\" !== node && \"$?\" !== node && \"$~\" !== node && \"$!\" !== node) ||\n suspenseInstance++;\n node = nextNode;\n } while (node);\n}\nfunction clearContainerSparingly(container) {\n var nextNode = container.firstChild;\n nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);\n for (; nextNode; ) {\n var node = nextNode;\n nextNode = nextNode.nextSibling;\n switch (node.nodeName) {\n case \"HTML\":\n case \"HEAD\":\n case \"BODY\":\n clearContainerSparingly(node);\n detachDeletedInstance(node);\n continue;\n case \"SCRIPT\":\n case \"STYLE\":\n continue;\n case \"LINK\":\n if (\"stylesheet\" === node.rel.toLowerCase()) continue;\n }\n container.removeChild(node);\n }\n}\nfunction canHydrateInstance(instance, type, props, inRootOrSingleton) {\n for (; 1 === instance.nodeType; ) {\n var anyProps = props;\n if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {\n if (\n !inRootOrSingleton &&\n (\"INPUT\" !== instance.nodeName || \"hidden\" !== instance.type)\n )\n break;\n } else if (!inRootOrSingleton)\n if (\"input\" === type && \"hidden\" === instance.type) {\n var name = null == anyProps.name ? null : \"\" + anyProps.name;\n if (\n \"hidden\" === anyProps.type &&\n instance.getAttribute(\"name\") === name\n )\n return instance;\n } else return instance;\n else if (!instance[internalHoistableMarker])\n switch (type) {\n case \"meta\":\n if (!instance.hasAttribute(\"itemprop\")) break;\n return instance;\n case \"link\":\n name = instance.getAttribute(\"rel\");\n if (\"stylesheet\" === name && instance.hasAttribute(\"data-precedence\"))\n break;\n else if (\n name !== anyProps.rel ||\n instance.getAttribute(\"href\") !==\n (null == anyProps.href || \"\" === anyProps.href\n ? null\n : anyProps.href) ||\n instance.getAttribute(\"crossorigin\") !==\n (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||\n instance.getAttribute(\"title\") !==\n (null == anyProps.title ? null : anyProps.title)\n )\n break;\n return instance;\n case \"style\":\n if (instance.hasAttribute(\"data-precedence\")) break;\n return instance;\n case \"script\":\n name = instance.getAttribute(\"src\");\n if (\n (name !== (null == anyProps.src ? null : anyProps.src) ||\n instance.getAttribute(\"type\") !==\n (null == anyProps.type ? null : anyProps.type) ||\n instance.getAttribute(\"crossorigin\") !==\n (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) &&\n name &&\n instance.hasAttribute(\"async\") &&\n !instance.hasAttribute(\"itemprop\")\n )\n break;\n return instance;\n default:\n return instance;\n }\n instance = getNextHydratable(instance.nextSibling);\n if (null === instance) break;\n }\n return null;\n}\nfunction canHydrateTextInstance(instance, text, inRootOrSingleton) {\n if (\"\" === text) return null;\n for (; 3 !== instance.nodeType; ) {\n if (\n (1 !== instance.nodeType ||\n \"INPUT\" !== instance.nodeName ||\n \"hidden\" !== instance.type) &&\n !inRootOrSingleton\n )\n return null;\n instance = getNextHydratable(instance.nextSibling);\n if (null === instance) return null;\n }\n return instance;\n}\nfunction canHydrateHydrationBoundary(instance, inRootOrSingleton) {\n for (; 8 !== instance.nodeType; ) {\n if (\n (1 !== instance.nodeType ||\n \"INPUT\" !== instance.nodeName ||\n \"hidden\" !== instance.type) &&\n !inRootOrSingleton\n )\n return null;\n instance = getNextHydratable(instance.nextSibling);\n if (null === instance) return null;\n }\n return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n return \"$?\" === instance.data || \"$~\" === instance.data;\n}\nfunction isSuspenseInstanceFallback(instance) {\n return (\n \"$!\" === instance.data ||\n (\"$?\" === instance.data && \"loading\" !== instance.ownerDocument.readyState)\n );\n}\nfunction registerSuspenseInstanceRetry(instance, callback) {\n var ownerDocument = instance.ownerDocument;\n if (\"$~\" === instance.data) instance._reactRetry = callback;\n else if (\"$?\" !== instance.data || \"loading\" !== ownerDocument.readyState)\n callback();\n else {\n var listener = function () {\n callback();\n ownerDocument.removeEventListener(\"DOMContentLoaded\", listener);\n };\n ownerDocument.addEventListener(\"DOMContentLoaded\", listener);\n instance._reactRetry = listener;\n }\n}\nfunction getNextHydratable(node) {\n for (; null != node; node = node.nextSibling) {\n var nodeType = node.nodeType;\n if (1 === nodeType || 3 === nodeType) break;\n if (8 === nodeType) {\n nodeType = node.data;\n if (\n \"$\" === nodeType ||\n \"$!\" === nodeType ||\n \"$?\" === nodeType ||\n \"$~\" === nodeType ||\n \"&\" === nodeType ||\n \"F!\" === nodeType ||\n \"F\" === nodeType\n )\n break;\n if (\"/$\" === nodeType || \"/&\" === nodeType) return null;\n }\n }\n return node;\n}\nvar previousHydratableOnEnteringScopedSingleton = null;\nfunction getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) {\n hydrationInstance = hydrationInstance.nextSibling;\n for (var depth = 0; hydrationInstance; ) {\n if (8 === hydrationInstance.nodeType) {\n var data = hydrationInstance.data;\n if (\"/$\" === data || \"/&\" === data) {\n if (0 === depth)\n return getNextHydratable(hydrationInstance.nextSibling);\n depth--;\n } else\n (\"$\" !== data &&\n \"$!\" !== data &&\n \"$?\" !== data &&\n \"$~\" !== data &&\n \"&\" !== data) ||\n depth++;\n }\n hydrationInstance = hydrationInstance.nextSibling;\n }\n return null;\n}\nfunction getParentHydrationBoundary(targetInstance) {\n targetInstance = targetInstance.previousSibling;\n for (var depth = 0; targetInstance; ) {\n if (8 === targetInstance.nodeType) {\n var data = targetInstance.data;\n if (\n \"$\" === data ||\n \"$!\" === data ||\n \"$?\" === data ||\n \"$~\" === data ||\n \"&\" === data\n ) {\n if (0 === depth) return targetInstance;\n depth--;\n } else (\"/$\" !== data && \"/&\" !== data) || depth++;\n }\n targetInstance = targetInstance.previousSibling;\n }\n return null;\n}\nfunction resolveSingletonInstance(type, props, rootContainerInstance) {\n props = getOwnerDocumentFromRootContainer(rootContainerInstance);\n switch (type) {\n case \"html\":\n type = props.documentElement;\n if (!type) throw Error(formatProdErrorMessage(452));\n return type;\n case \"head\":\n type = props.head;\n if (!type) throw Error(formatProdErrorMessage(453));\n return type;\n case \"body\":\n type = props.body;\n if (!type) throw Error(formatProdErrorMessage(454));\n return type;\n default:\n throw Error(formatProdErrorMessage(451));\n }\n}\nfunction releaseSingletonInstance(instance) {\n for (var attributes = instance.attributes; attributes.length; )\n instance.removeAttributeNode(attributes[0]);\n detachDeletedInstance(instance);\n}\nvar preloadPropsMap = new Map(),\n preconnectsSet = new Set();\nfunction getHoistableRoot(container) {\n return \"function\" === typeof container.getRootNode\n ? container.getRootNode()\n : 9 === container.nodeType\n ? container\n : container.ownerDocument;\n}\nvar previousDispatcher = ReactDOMSharedInternals.d;\nReactDOMSharedInternals.d = {\n f: flushSyncWork,\n r: requestFormReset,\n D: prefetchDNS,\n C: preconnect,\n L: preload,\n m: preloadModule,\n X: preinitScript,\n S: preinitStyle,\n M: preinitModuleScript\n};\nfunction flushSyncWork() {\n var previousWasRendering = previousDispatcher.f(),\n wasRendering = flushSyncWork$1();\n return previousWasRendering || wasRendering;\n}\nfunction requestFormReset(form) {\n var formInst = getInstanceFromNode(form);\n null !== formInst && 5 === formInst.tag && \"form\" === formInst.type\n ? requestFormReset$1(formInst)\n : previousDispatcher.r(form);\n}\nvar globalDocument = \"undefined\" === typeof document ? null : document;\nfunction preconnectAs(rel, href, crossOrigin) {\n var ownerDocument = globalDocument;\n if (ownerDocument && \"string\" === typeof href && href) {\n var limitedEscapedHref =\n escapeSelectorAttributeValueInsideDoubleQuotes(href);\n limitedEscapedHref =\n 'link[rel=\"' + rel + '\"][href=\"' + limitedEscapedHref + '\"]';\n \"string\" === typeof crossOrigin &&\n (limitedEscapedHref += '[crossorigin=\"' + crossOrigin + '\"]');\n preconnectsSet.has(limitedEscapedHref) ||\n (preconnectsSet.add(limitedEscapedHref),\n (rel = { rel: rel, crossOrigin: crossOrigin, href: href }),\n null === ownerDocument.querySelector(limitedEscapedHref) &&\n ((href = ownerDocument.createElement(\"link\")),\n setInitialProperties(href, \"link\", rel),\n markNodeAsHoistable(href),\n ownerDocument.head.appendChild(href)));\n }\n}\nfunction prefetchDNS(href) {\n previousDispatcher.D(href);\n preconnectAs(\"dns-prefetch\", href, null);\n}\nfunction preconnect(href, crossOrigin) {\n previousDispatcher.C(href, crossOrigin);\n preconnectAs(\"preconnect\", href, crossOrigin);\n}\nfunction preload(href, as, options) {\n previousDispatcher.L(href, as, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && href && as) {\n var preloadSelector =\n 'link[rel=\"preload\"][as=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(as) +\n '\"]';\n \"image\" === as\n ? options && options.imageSrcSet\n ? ((preloadSelector +=\n '[imagesrcset=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(\n options.imageSrcSet\n ) +\n '\"]'),\n \"string\" === typeof options.imageSizes &&\n (preloadSelector +=\n '[imagesizes=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(\n options.imageSizes\n ) +\n '\"]'))\n : (preloadSelector +=\n '[href=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n '\"]')\n : (preloadSelector +=\n '[href=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n '\"]');\n var key = preloadSelector;\n switch (as) {\n case \"style\":\n key = getStyleKey(href);\n break;\n case \"script\":\n key = getScriptKey(href);\n }\n preloadPropsMap.has(key) ||\n ((href = assign(\n {\n rel: \"preload\",\n href:\n \"image\" === as && options && options.imageSrcSet ? void 0 : href,\n as: as\n },\n options\n )),\n preloadPropsMap.set(key, href),\n null !== ownerDocument.querySelector(preloadSelector) ||\n (\"style\" === as &&\n ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) ||\n (\"script\" === as &&\n ownerDocument.querySelector(getScriptSelectorFromKey(key))) ||\n ((as = ownerDocument.createElement(\"link\")),\n setInitialProperties(as, \"link\", href),\n markNodeAsHoistable(as),\n ownerDocument.head.appendChild(as)));\n }\n}\nfunction preloadModule(href, options) {\n previousDispatcher.m(href, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && href) {\n var as = options && \"string\" === typeof options.as ? options.as : \"script\",\n preloadSelector =\n 'link[rel=\"modulepreload\"][as=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(as) +\n '\"][href=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n '\"]',\n key = preloadSelector;\n switch (as) {\n case \"audioworklet\":\n case \"paintworklet\":\n case \"serviceworker\":\n case \"sharedworker\":\n case \"worker\":\n case \"script\":\n key = getScriptKey(href);\n }\n if (\n !preloadPropsMap.has(key) &&\n ((href = assign({ rel: \"modulepreload\", href: href }, options)),\n preloadPropsMap.set(key, href),\n null === ownerDocument.querySelector(preloadSelector))\n ) {\n switch (as) {\n case \"audioworklet\":\n case \"paintworklet\":\n case \"serviceworker\":\n case \"sharedworker\":\n case \"worker\":\n case \"script\":\n if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))\n return;\n }\n as = ownerDocument.createElement(\"link\");\n setInitialProperties(as, \"link\", href);\n markNodeAsHoistable(as);\n ownerDocument.head.appendChild(as);\n }\n }\n}\nfunction preinitStyle(href, precedence, options) {\n previousDispatcher.S(href, precedence, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && href) {\n var styles = getResourcesFromRoot(ownerDocument).hoistableStyles,\n key = getStyleKey(href);\n precedence = precedence || \"default\";\n var resource = styles.get(key);\n if (!resource) {\n var state = { loading: 0, preload: null };\n if (\n (resource = ownerDocument.querySelector(\n getStylesheetSelectorFromKey(key)\n ))\n )\n state.loading = 5;\n else {\n href = assign(\n { rel: \"stylesheet\", href: href, \"data-precedence\": precedence },\n options\n );\n (options = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForStylesheet(href, options);\n var link = (resource = ownerDocument.createElement(\"link\"));\n markNodeAsHoistable(link);\n setInitialProperties(link, \"link\", href);\n link._p = new Promise(function (resolve, reject) {\n link.onload = resolve;\n link.onerror = reject;\n });\n link.addEventListener(\"load\", function () {\n state.loading |= 1;\n });\n link.addEventListener(\"error\", function () {\n state.loading |= 2;\n });\n state.loading |= 4;\n insertStylesheet(resource, precedence, ownerDocument);\n }\n resource = {\n type: \"stylesheet\",\n instance: resource,\n count: 1,\n state: state\n };\n styles.set(key, resource);\n }\n }\n}\nfunction preinitScript(src, options) {\n previousDispatcher.X(src, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && src) {\n var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,\n key = getScriptKey(src),\n resource = scripts.get(key);\n resource ||\n ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),\n resource ||\n ((src = assign({ src: src, async: !0 }, options)),\n (options = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForScript(src, options),\n (resource = ownerDocument.createElement(\"script\")),\n markNodeAsHoistable(resource),\n setInitialProperties(resource, \"link\", src),\n ownerDocument.head.appendChild(resource)),\n (resource = {\n type: \"script\",\n instance: resource,\n count: 1,\n state: null\n }),\n scripts.set(key, resource));\n }\n}\nfunction preinitModuleScript(src, options) {\n previousDispatcher.M(src, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && src) {\n var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,\n key = getScriptKey(src),\n resource = scripts.get(key);\n resource ||\n ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),\n resource ||\n ((src = assign({ src: src, async: !0, type: \"module\" }, options)),\n (options = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForScript(src, options),\n (resource = ownerDocument.createElement(\"script\")),\n markNodeAsHoistable(resource),\n setInitialProperties(resource, \"link\", src),\n ownerDocument.head.appendChild(resource)),\n (resource = {\n type: \"script\",\n instance: resource,\n count: 1,\n state: null\n }),\n scripts.set(key, resource));\n }\n}\nfunction getResource(type, currentProps, pendingProps, currentResource) {\n var JSCompiler_inline_result = (JSCompiler_inline_result =\n rootInstanceStackCursor.current)\n ? getHoistableRoot(JSCompiler_inline_result)\n : null;\n if (!JSCompiler_inline_result) throw Error(formatProdErrorMessage(446));\n switch (type) {\n case \"meta\":\n case \"title\":\n return null;\n case \"style\":\n return \"string\" === typeof pendingProps.precedence &&\n \"string\" === typeof pendingProps.href\n ? ((currentProps = getStyleKey(pendingProps.href)),\n (pendingProps = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableStyles),\n (currentResource = pendingProps.get(currentProps)),\n currentResource ||\n ((currentResource = {\n type: \"style\",\n instance: null,\n count: 0,\n state: null\n }),\n pendingProps.set(currentProps, currentResource)),\n currentResource)\n : { type: \"void\", instance: null, count: 0, state: null };\n case \"link\":\n if (\n \"stylesheet\" === pendingProps.rel &&\n \"string\" === typeof pendingProps.href &&\n \"string\" === typeof pendingProps.precedence\n ) {\n type = getStyleKey(pendingProps.href);\n var styles$243 = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableStyles,\n resource$244 = styles$243.get(type);\n resource$244 ||\n ((JSCompiler_inline_result =\n JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result),\n (resource$244 = {\n type: \"stylesheet\",\n instance: null,\n count: 0,\n state: { loading: 0, preload: null }\n }),\n styles$243.set(type, resource$244),\n (styles$243 = JSCompiler_inline_result.querySelector(\n getStylesheetSelectorFromKey(type)\n )) &&\n !styles$243._p &&\n ((resource$244.instance = styles$243),\n (resource$244.state.loading = 5)),\n preloadPropsMap.has(type) ||\n ((pendingProps = {\n rel: \"preload\",\n as: \"style\",\n href: pendingProps.href,\n crossOrigin: pendingProps.crossOrigin,\n integrity: pendingProps.integrity,\n media: pendingProps.media,\n hrefLang: pendingProps.hrefLang,\n referrerPolicy: pendingProps.referrerPolicy\n }),\n preloadPropsMap.set(type, pendingProps),\n styles$243 ||\n preloadStylesheet(\n JSCompiler_inline_result,\n type,\n pendingProps,\n resource$244.state\n )));\n if (currentProps && null === currentResource)\n throw Error(formatProdErrorMessage(528, \"\"));\n return resource$244;\n }\n if (currentProps && null !== currentResource)\n throw Error(formatProdErrorMessage(529, \"\"));\n return null;\n case \"script\":\n return (\n (currentProps = pendingProps.async),\n (pendingProps = pendingProps.src),\n \"string\" === typeof pendingProps &&\n currentProps &&\n \"function\" !== typeof currentProps &&\n \"symbol\" !== typeof currentProps\n ? ((currentProps = getScriptKey(pendingProps)),\n (pendingProps = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableScripts),\n (currentResource = pendingProps.get(currentProps)),\n currentResource ||\n ((currentResource = {\n type: \"script\",\n instance: null,\n count: 0,\n state: null\n }),\n pendingProps.set(currentProps, currentResource)),\n currentResource)\n : { type: \"void\", instance: null, count: 0, state: null }\n );\n default:\n throw Error(formatProdErrorMessage(444, type));\n }\n}\nfunction getStyleKey(href) {\n return 'href=\"' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '\"';\n}\nfunction getStylesheetSelectorFromKey(key) {\n return 'link[rel=\"stylesheet\"][' + key + \"]\";\n}\nfunction stylesheetPropsFromRawProps(rawProps) {\n return assign({}, rawProps, {\n \"data-precedence\": rawProps.precedence,\n precedence: null\n });\n}\nfunction preloadStylesheet(ownerDocument, key, preloadProps, state) {\n ownerDocument.querySelector('link[rel=\"preload\"][as=\"style\"][' + key + \"]\")\n ? (state.loading = 1)\n : ((key = ownerDocument.createElement(\"link\")),\n (state.preload = key),\n key.addEventListener(\"load\", function () {\n return (state.loading |= 1);\n }),\n key.addEventListener(\"error\", function () {\n return (state.loading |= 2);\n }),\n setInitialProperties(key, \"link\", preloadProps),\n markNodeAsHoistable(key),\n ownerDocument.head.appendChild(key));\n}\nfunction getScriptKey(src) {\n return '[src=\"' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '\"]';\n}\nfunction getScriptSelectorFromKey(key) {\n return \"script[async]\" + key;\n}\nfunction acquireResource(hoistableRoot, resource, props) {\n resource.count++;\n if (null === resource.instance)\n switch (resource.type) {\n case \"style\":\n var instance = hoistableRoot.querySelector(\n 'style[data-href~=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(props.href) +\n '\"]'\n );\n if (instance)\n return (\n (resource.instance = instance),\n markNodeAsHoistable(instance),\n instance\n );\n var styleProps = assign({}, props, {\n \"data-href\": props.href,\n \"data-precedence\": props.precedence,\n href: null,\n precedence: null\n });\n instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement(\n \"style\"\n );\n markNodeAsHoistable(instance);\n setInitialProperties(instance, \"style\", styleProps);\n insertStylesheet(instance, props.precedence, hoistableRoot);\n return (resource.instance = instance);\n case \"stylesheet\":\n styleProps = getStyleKey(props.href);\n var instance$249 = hoistableRoot.querySelector(\n getStylesheetSelectorFromKey(styleProps)\n );\n if (instance$249)\n return (\n (resource.state.loading |= 4),\n (resource.instance = instance$249),\n markNodeAsHoistable(instance$249),\n instance$249\n );\n instance = stylesheetPropsFromRawProps(props);\n (styleProps = preloadPropsMap.get(styleProps)) &&\n adoptPreloadPropsForStylesheet(instance, styleProps);\n instance$249 = (\n hoistableRoot.ownerDocument || hoistableRoot\n ).createElement(\"link\");\n markNodeAsHoistable(instance$249);\n var linkInstance = instance$249;\n linkInstance._p = new Promise(function (resolve, reject) {\n linkInstance.onload = resolve;\n linkInstance.onerror = reject;\n });\n setInitialProperties(instance$249, \"link\", instance);\n resource.state.loading |= 4;\n insertStylesheet(instance$249, props.precedence, hoistableRoot);\n return (resource.instance = instance$249);\n case \"script\":\n instance$249 = getScriptKey(props.src);\n if (\n (styleProps = hoistableRoot.querySelector(\n getScriptSelectorFromKey(instance$249)\n ))\n )\n return (\n (resource.instance = styleProps),\n markNodeAsHoistable(styleProps),\n styleProps\n );\n instance = props;\n if ((styleProps = preloadPropsMap.get(instance$249)))\n (instance = assign({}, props)),\n adoptPreloadPropsForScript(instance, styleProps);\n hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n styleProps = hoistableRoot.createElement(\"script\");\n markNodeAsHoistable(styleProps);\n setInitialProperties(styleProps, \"link\", instance);\n hoistableRoot.head.appendChild(styleProps);\n return (resource.instance = styleProps);\n case \"void\":\n return null;\n default:\n throw Error(formatProdErrorMessage(443, resource.type));\n }\n else\n \"stylesheet\" === resource.type &&\n 0 === (resource.state.loading & 4) &&\n ((instance = resource.instance),\n (resource.state.loading |= 4),\n insertStylesheet(instance, props.precedence, hoistableRoot));\n return resource.instance;\n}\nfunction insertStylesheet(instance, precedence, root) {\n for (\n var nodes = root.querySelectorAll(\n 'link[rel=\"stylesheet\"][data-precedence],style[data-precedence]'\n ),\n last = nodes.length ? nodes[nodes.length - 1] : null,\n prior = last,\n i = 0;\n i < nodes.length;\n i++\n ) {\n var node = nodes[i];\n if (node.dataset.precedence === precedence) prior = node;\n else if (prior !== last) break;\n }\n prior\n ? prior.parentNode.insertBefore(instance, prior.nextSibling)\n : ((precedence = 9 === root.nodeType ? root.head : root),\n precedence.insertBefore(instance, precedence.firstChild));\n}\nfunction adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {\n null == stylesheetProps.crossOrigin &&\n (stylesheetProps.crossOrigin = preloadProps.crossOrigin);\n null == stylesheetProps.referrerPolicy &&\n (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);\n null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);\n}\nfunction adoptPreloadPropsForScript(scriptProps, preloadProps) {\n null == scriptProps.crossOrigin &&\n (scriptProps.crossOrigin = preloadProps.crossOrigin);\n null == scriptProps.referrerPolicy &&\n (scriptProps.referrerPolicy = preloadProps.referrerPolicy);\n null == scriptProps.integrity &&\n (scriptProps.integrity = preloadProps.integrity);\n}\nvar tagCaches = null;\nfunction getHydratableHoistableCache(type, keyAttribute, ownerDocument) {\n if (null === tagCaches) {\n var cache = new Map();\n var caches = (tagCaches = new Map());\n caches.set(ownerDocument, cache);\n } else\n (caches = tagCaches),\n (cache = caches.get(ownerDocument)),\n cache || ((cache = new Map()), caches.set(ownerDocument, cache));\n if (cache.has(type)) return cache;\n cache.set(type, null);\n ownerDocument = ownerDocument.getElementsByTagName(type);\n for (caches = 0; caches < ownerDocument.length; caches++) {\n var node = ownerDocument[caches];\n if (\n !(\n node[internalHoistableMarker] ||\n node[internalInstanceKey] ||\n (\"link\" === type && \"stylesheet\" === node.getAttribute(\"rel\"))\n ) &&\n \"http://www.w3.org/2000/svg\" !== node.namespaceURI\n ) {\n var nodeKey = node.getAttribute(keyAttribute) || \"\";\n nodeKey = type + nodeKey;\n var existing = cache.get(nodeKey);\n existing ? existing.push(node) : cache.set(nodeKey, [node]);\n }\n }\n return cache;\n}\nfunction mountHoistable(hoistableRoot, type, instance) {\n hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n hoistableRoot.head.insertBefore(\n instance,\n \"title\" === type ? hoistableRoot.querySelector(\"head > title\") : null\n );\n}\nfunction isHostHoistableType(type, props, hostContext) {\n if (1 === hostContext || null != props.itemProp) return !1;\n switch (type) {\n case \"meta\":\n case \"title\":\n return !0;\n case \"style\":\n if (\n \"string\" !== typeof props.precedence ||\n \"string\" !== typeof props.href ||\n \"\" === props.href\n )\n break;\n return !0;\n case \"link\":\n if (\n \"string\" !== typeof props.rel ||\n \"string\" !== typeof props.href ||\n \"\" === props.href ||\n props.onLoad ||\n props.onError\n )\n break;\n switch (props.rel) {\n case \"stylesheet\":\n return (\n (type = props.disabled),\n \"string\" === typeof props.precedence && null == type\n );\n default:\n return !0;\n }\n case \"script\":\n if (\n props.async &&\n \"function\" !== typeof props.async &&\n \"symbol\" !== typeof props.async &&\n !props.onLoad &&\n !props.onError &&\n props.src &&\n \"string\" === typeof props.src\n )\n return !0;\n }\n return !1;\n}\nfunction preloadResource(resource) {\n return \"stylesheet\" === resource.type && 0 === (resource.state.loading & 3)\n ? !1\n : !0;\n}\nfunction suspendResource(state, hoistableRoot, resource, props) {\n if (\n \"stylesheet\" === resource.type &&\n (\"string\" !== typeof props.media ||\n !1 !== matchMedia(props.media).matches) &&\n 0 === (resource.state.loading & 4)\n ) {\n if (null === resource.instance) {\n var key = getStyleKey(props.href),\n instance = hoistableRoot.querySelector(\n getStylesheetSelectorFromKey(key)\n );\n if (instance) {\n hoistableRoot = instance._p;\n null !== hoistableRoot &&\n \"object\" === typeof hoistableRoot &&\n \"function\" === typeof hoistableRoot.then &&\n (state.count++,\n (state = onUnsuspend.bind(state)),\n hoistableRoot.then(state, state));\n resource.state.loading |= 4;\n resource.instance = instance;\n markNodeAsHoistable(instance);\n return;\n }\n instance = hoistableRoot.ownerDocument || hoistableRoot;\n props = stylesheetPropsFromRawProps(props);\n (key = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForStylesheet(props, key);\n instance = instance.createElement(\"link\");\n markNodeAsHoistable(instance);\n var linkInstance = instance;\n linkInstance._p = new Promise(function (resolve, reject) {\n linkInstance.onload = resolve;\n linkInstance.onerror = reject;\n });\n setInitialProperties(instance, \"link\", props);\n resource.instance = instance;\n }\n null === state.stylesheets && (state.stylesheets = new Map());\n state.stylesheets.set(resource, hoistableRoot);\n (hoistableRoot = resource.state.preload) &&\n 0 === (resource.state.loading & 3) &&\n (state.count++,\n (resource = onUnsuspend.bind(state)),\n hoistableRoot.addEventListener(\"load\", resource),\n hoistableRoot.addEventListener(\"error\", resource));\n }\n}\nvar estimatedBytesWithinLimit = 0;\nfunction waitForCommitToBeReady(state, timeoutOffset) {\n state.stylesheets &&\n 0 === state.count &&\n insertSuspendedStylesheets(state, state.stylesheets);\n return 0 < state.count || 0 < state.imgCount\n ? function (commit) {\n var stylesheetTimer = setTimeout(function () {\n state.stylesheets &&\n insertSuspendedStylesheets(state, state.stylesheets);\n if (state.unsuspend) {\n var unsuspend = state.unsuspend;\n state.unsuspend = null;\n unsuspend();\n }\n }, 6e4 + timeoutOffset);\n 0 < state.imgBytes &&\n 0 === estimatedBytesWithinLimit &&\n (estimatedBytesWithinLimit = 62500 * estimateBandwidth());\n var imgTimer = setTimeout(\n function () {\n state.waitingForImages = !1;\n if (\n 0 === state.count &&\n (state.stylesheets &&\n insertSuspendedStylesheets(state, state.stylesheets),\n state.unsuspend)\n ) {\n var unsuspend = state.unsuspend;\n state.unsuspend = null;\n unsuspend();\n }\n },\n (state.imgBytes > estimatedBytesWithinLimit ? 50 : 800) +\n timeoutOffset\n );\n state.unsuspend = commit;\n return function () {\n state.unsuspend = null;\n clearTimeout(stylesheetTimer);\n clearTimeout(imgTimer);\n };\n }\n : null;\n}\nfunction onUnsuspend() {\n this.count--;\n if (0 === this.count && (0 === this.imgCount || !this.waitingForImages))\n if (this.stylesheets) insertSuspendedStylesheets(this, this.stylesheets);\n else if (this.unsuspend) {\n var unsuspend = this.unsuspend;\n this.unsuspend = null;\n unsuspend();\n }\n}\nvar precedencesByRoot = null;\nfunction insertSuspendedStylesheets(state, resources) {\n state.stylesheets = null;\n null !== state.unsuspend &&\n (state.count++,\n (precedencesByRoot = new Map()),\n resources.forEach(insertStylesheetIntoRoot, state),\n (precedencesByRoot = null),\n onUnsuspend.call(state));\n}\nfunction insertStylesheetIntoRoot(root, resource) {\n if (!(resource.state.loading & 4)) {\n var precedences = precedencesByRoot.get(root);\n if (precedences) var last = precedences.get(null);\n else {\n precedences = new Map();\n precedencesByRoot.set(root, precedences);\n for (\n var nodes = root.querySelectorAll(\n \"link[data-precedence],style[data-precedence]\"\n ),\n i = 0;\n i < nodes.length;\n i++\n ) {\n var node = nodes[i];\n if (\n \"LINK\" === node.nodeName ||\n \"not all\" !== node.getAttribute(\"media\")\n )\n precedences.set(node.dataset.precedence, node), (last = node);\n }\n last && precedences.set(null, last);\n }\n nodes = resource.instance;\n node = nodes.getAttribute(\"data-precedence\");\n i = precedences.get(node) || last;\n i === last && precedences.set(null, nodes);\n precedences.set(node, nodes);\n this.count++;\n last = onUnsuspend.bind(this);\n nodes.addEventListener(\"load\", last);\n nodes.addEventListener(\"error\", last);\n i\n ? i.parentNode.insertBefore(nodes, i.nextSibling)\n : ((root = 9 === root.nodeType ? root.head : root),\n root.insertBefore(nodes, root.firstChild));\n resource.state.loading |= 4;\n }\n}\nvar HostTransitionContext = {\n $$typeof: REACT_CONTEXT_TYPE,\n Provider: null,\n Consumer: null,\n _currentValue: sharedNotPendingObject,\n _currentValue2: sharedNotPendingObject,\n _threadCount: 0\n};\nfunction FiberRootNode(\n containerInfo,\n tag,\n hydrate,\n identifierPrefix,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n onDefaultTransitionIndicator,\n formState\n) {\n this.tag = 1;\n this.containerInfo = containerInfo;\n this.pingCache = this.current = this.pendingChildren = null;\n this.timeoutHandle = -1;\n this.callbackNode =\n this.next =\n this.pendingContext =\n this.context =\n this.cancelPendingCommit =\n null;\n this.callbackPriority = 0;\n this.expirationTimes = createLaneMap(-1);\n this.entangledLanes =\n this.shellSuspendCounter =\n this.errorRecoveryDisabledLanes =\n this.expiredLanes =\n this.warmLanes =\n this.pingedLanes =\n this.suspendedLanes =\n this.pendingLanes =\n 0;\n this.entanglements = createLaneMap(0);\n this.hiddenUpdates = createLaneMap(null);\n this.identifierPrefix = identifierPrefix;\n this.onUncaughtError = onUncaughtError;\n this.onCaughtError = onCaughtError;\n this.onRecoverableError = onRecoverableError;\n this.pooledCache = null;\n this.pooledCacheLanes = 0;\n this.formState = formState;\n this.incompleteTransitions = new Map();\n}\nfunction createFiberRoot(\n containerInfo,\n tag,\n hydrate,\n initialChildren,\n hydrationCallbacks,\n isStrictMode,\n identifierPrefix,\n formState,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n onDefaultTransitionIndicator\n) {\n containerInfo = new FiberRootNode(\n containerInfo,\n tag,\n hydrate,\n identifierPrefix,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n onDefaultTransitionIndicator,\n formState\n );\n tag = 1;\n !0 === isStrictMode && (tag |= 24);\n isStrictMode = createFiberImplClass(3, null, null, tag);\n containerInfo.current = isStrictMode;\n isStrictMode.stateNode = containerInfo;\n tag = createCache();\n tag.refCount++;\n containerInfo.pooledCache = tag;\n tag.refCount++;\n isStrictMode.memoizedState = {\n element: initialChildren,\n isDehydrated: hydrate,\n cache: tag\n };\n initializeUpdateQueue(isStrictMode);\n return containerInfo;\n}\nfunction getContextForSubtree(parentComponent) {\n if (!parentComponent) return emptyContextObject;\n parentComponent = emptyContextObject;\n return parentComponent;\n}\nfunction updateContainerImpl(\n rootFiber,\n lane,\n element,\n container,\n parentComponent,\n callback\n) {\n parentComponent = getContextForSubtree(parentComponent);\n null === container.context\n ? (container.context = parentComponent)\n : (container.pendingContext = parentComponent);\n container = createUpdate(lane);\n container.payload = { element: element };\n callback = void 0 === callback ? null : callback;\n null !== callback && (container.callback = callback);\n element = enqueueUpdate(rootFiber, container, lane);\n null !== element &&\n (scheduleUpdateOnFiber(element, rootFiber, lane),\n entangleTransitions(element, rootFiber, lane));\n}\nfunction markRetryLaneImpl(fiber, retryLane) {\n fiber = fiber.memoizedState;\n if (null !== fiber && null !== fiber.dehydrated) {\n var a = fiber.retryLane;\n fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;\n }\n}\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n markRetryLaneImpl(fiber, retryLane);\n (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);\n}\nfunction attemptContinuousHydration(fiber) {\n if (13 === fiber.tag || 31 === fiber.tag) {\n var root = enqueueConcurrentRenderForLane(fiber, 67108864);\n null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);\n markRetryLaneIfNotHydrated(fiber, 67108864);\n }\n}\nfunction attemptHydrationAtCurrentPriority(fiber) {\n if (13 === fiber.tag || 31 === fiber.tag) {\n var lane = requestUpdateLane();\n lane = getBumpedLaneForHydrationByLane(lane);\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n null !== root && scheduleUpdateOnFiber(root, fiber, lane);\n markRetryLaneIfNotHydrated(fiber, lane);\n }\n}\nvar _enabled = !0;\nfunction dispatchDiscreteEvent(\n domEventName,\n eventSystemFlags,\n container,\n nativeEvent\n) {\n var prevTransition = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n try {\n (ReactDOMSharedInternals.p = 2),\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = prevTransition);\n }\n}\nfunction dispatchContinuousEvent(\n domEventName,\n eventSystemFlags,\n container,\n nativeEvent\n) {\n var prevTransition = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n try {\n (ReactDOMSharedInternals.p = 8),\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = prevTransition);\n }\n}\nfunction dispatchEvent(\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n) {\n if (_enabled) {\n var blockedOn = findInstanceBlockingEvent(nativeEvent);\n if (null === blockedOn)\n dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n return_targetInst,\n targetContainer\n ),\n clearIfContinuousEvent(domEventName, nativeEvent);\n else if (\n queueIfContinuousEvent(\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )\n )\n nativeEvent.stopPropagation();\n else if (\n (clearIfContinuousEvent(domEventName, nativeEvent),\n eventSystemFlags & 4 &&\n -1 < discreteReplayableEvents.indexOf(domEventName))\n ) {\n for (; null !== blockedOn; ) {\n var fiber = getInstanceFromNode(blockedOn);\n if (null !== fiber)\n switch (fiber.tag) {\n case 3:\n fiber = fiber.stateNode;\n if (fiber.current.memoizedState.isDehydrated) {\n var lanes = getHighestPriorityLanes(fiber.pendingLanes);\n if (0 !== lanes) {\n var root = fiber;\n root.pendingLanes |= 2;\n for (root.entangledLanes |= 2; lanes; ) {\n var lane = 1 << (31 - clz32(lanes));\n root.entanglements[1] |= lane;\n lanes &= ~lane;\n }\n ensureRootIsScheduled(fiber);\n 0 === (executionContext & 6) &&\n ((workInProgressRootRenderTargetTime = now() + 500),\n flushSyncWorkAcrossRoots_impl(0, !1));\n }\n }\n break;\n case 31:\n case 13:\n (root = enqueueConcurrentRenderForLane(fiber, 2)),\n null !== root && scheduleUpdateOnFiber(root, fiber, 2),\n flushSyncWork$1(),\n markRetryLaneIfNotHydrated(fiber, 2);\n }\n fiber = findInstanceBlockingEvent(nativeEvent);\n null === fiber &&\n dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n return_targetInst,\n targetContainer\n );\n if (fiber === blockedOn) break;\n blockedOn = fiber;\n }\n null !== blockedOn && nativeEvent.stopPropagation();\n } else\n dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n null,\n targetContainer\n );\n }\n}\nfunction findInstanceBlockingEvent(nativeEvent) {\n nativeEvent = getEventTarget(nativeEvent);\n return findInstanceBlockingTarget(nativeEvent);\n}\nvar return_targetInst = null;\nfunction findInstanceBlockingTarget(targetNode) {\n return_targetInst = null;\n targetNode = getClosestInstanceFromNode(targetNode);\n if (null !== targetNode) {\n var nearestMounted = getNearestMountedFiber(targetNode);\n if (null === nearestMounted) targetNode = null;\n else {\n var tag = nearestMounted.tag;\n if (13 === tag) {\n targetNode = getSuspenseInstanceFromFiber(nearestMounted);\n if (null !== targetNode) return targetNode;\n targetNode = null;\n } else if (31 === tag) {\n targetNode = getActivityInstanceFromFiber(nearestMounted);\n if (null !== targetNode) return targetNode;\n targetNode = null;\n } else if (3 === tag) {\n if (nearestMounted.stateNode.current.memoizedState.isDehydrated)\n return 3 === nearestMounted.tag\n ? nearestMounted.stateNode.containerInfo\n : null;\n targetNode = null;\n } else nearestMounted !== targetNode && (targetNode = null);\n }\n }\n return_targetInst = targetNode;\n return null;\n}\nfunction getEventPriority(domEventName) {\n switch (domEventName) {\n case \"beforetoggle\":\n case \"cancel\":\n case \"click\":\n case \"close\":\n case \"contextmenu\":\n case \"copy\":\n case \"cut\":\n case \"auxclick\":\n case \"dblclick\":\n case \"dragend\":\n case \"dragstart\":\n case \"drop\":\n case \"focusin\":\n case \"focusout\":\n case \"input\":\n case \"invalid\":\n case \"keydown\":\n case \"keypress\":\n case \"keyup\":\n case \"mousedown\":\n case \"mouseup\":\n case \"paste\":\n case \"pause\":\n case \"play\":\n case \"pointercancel\":\n case \"pointerdown\":\n case \"pointerup\":\n case \"ratechange\":\n case \"reset\":\n case \"resize\":\n case \"seeked\":\n case \"submit\":\n case \"toggle\":\n case \"touchcancel\":\n case \"touchend\":\n case \"touchstart\":\n case \"volumechange\":\n case \"change\":\n case \"selectionchange\":\n case \"textInput\":\n case \"compositionstart\":\n case \"compositionend\":\n case \"compositionupdate\":\n case \"beforeblur\":\n case \"afterblur\":\n case \"beforeinput\":\n case \"blur\":\n case \"fullscreenchange\":\n case \"focus\":\n case \"hashchange\":\n case \"popstate\":\n case \"select\":\n case \"selectstart\":\n return 2;\n case \"drag\":\n case \"dragenter\":\n case \"dragexit\":\n case \"dragleave\":\n case \"dragover\":\n case \"mousemove\":\n case \"mouseout\":\n case \"mouseover\":\n case \"pointermove\":\n case \"pointerout\":\n case \"pointerover\":\n case \"scroll\":\n case \"touchmove\":\n case \"wheel\":\n case \"mouseenter\":\n case \"mouseleave\":\n case \"pointerenter\":\n case \"pointerleave\":\n return 8;\n case \"message\":\n switch (getCurrentPriorityLevel()) {\n case ImmediatePriority:\n return 2;\n case UserBlockingPriority:\n return 8;\n case NormalPriority$1:\n case LowPriority:\n return 32;\n case IdlePriority:\n return 268435456;\n default:\n return 32;\n }\n default:\n return 32;\n }\n}\nvar hasScheduledReplayAttempt = !1,\n queuedFocus = null,\n queuedDrag = null,\n queuedMouse = null,\n queuedPointers = new Map(),\n queuedPointerCaptures = new Map(),\n queuedExplicitHydrationTargets = [],\n discreteReplayableEvents =\n \"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset\".split(\n \" \"\n );\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n switch (domEventName) {\n case \"focusin\":\n case \"focusout\":\n queuedFocus = null;\n break;\n case \"dragenter\":\n case \"dragleave\":\n queuedDrag = null;\n break;\n case \"mouseover\":\n case \"mouseout\":\n queuedMouse = null;\n break;\n case \"pointerover\":\n case \"pointerout\":\n queuedPointers.delete(nativeEvent.pointerId);\n break;\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n queuedPointerCaptures.delete(nativeEvent.pointerId);\n }\n}\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(\n existingQueuedEvent,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n) {\n if (\n null === existingQueuedEvent ||\n existingQueuedEvent.nativeEvent !== nativeEvent\n )\n return (\n (existingQueuedEvent = {\n blockedOn: blockedOn,\n domEventName: domEventName,\n eventSystemFlags: eventSystemFlags,\n nativeEvent: nativeEvent,\n targetContainers: [targetContainer]\n }),\n null !== blockedOn &&\n ((blockedOn = getInstanceFromNode(blockedOn)),\n null !== blockedOn && attemptContinuousHydration(blockedOn)),\n existingQueuedEvent\n );\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n blockedOn = existingQueuedEvent.targetContainers;\n null !== targetContainer &&\n -1 === blockedOn.indexOf(targetContainer) &&\n blockedOn.push(targetContainer);\n return existingQueuedEvent;\n}\nfunction queueIfContinuousEvent(\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n) {\n switch (domEventName) {\n case \"focusin\":\n return (\n (queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedFocus,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )),\n !0\n );\n case \"dragenter\":\n return (\n (queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedDrag,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )),\n !0\n );\n case \"mouseover\":\n return (\n (queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedMouse,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )),\n !0\n );\n case \"pointerover\":\n var pointerId = nativeEvent.pointerId;\n queuedPointers.set(\n pointerId,\n accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedPointers.get(pointerId) || null,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )\n );\n return !0;\n case \"gotpointercapture\":\n return (\n (pointerId = nativeEvent.pointerId),\n queuedPointerCaptures.set(\n pointerId,\n accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedPointerCaptures.get(pointerId) || null,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )\n ),\n !0\n );\n }\n return !1;\n}\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n if (null !== targetInst) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n if (null !== nearestMounted)\n if (((targetInst = nearestMounted.tag), 13 === targetInst)) {\n if (\n ((targetInst = getSuspenseInstanceFromFiber(nearestMounted)),\n null !== targetInst)\n ) {\n queuedTarget.blockedOn = targetInst;\n runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (31 === targetInst) {\n if (\n ((targetInst = getActivityInstanceFromFiber(nearestMounted)),\n null !== targetInst)\n ) {\n queuedTarget.blockedOn = targetInst;\n runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (\n 3 === targetInst &&\n nearestMounted.stateNode.current.memoizedState.isDehydrated\n ) {\n queuedTarget.blockedOn =\n 3 === nearestMounted.tag\n ? nearestMounted.stateNode.containerInfo\n : null;\n return;\n }\n }\n queuedTarget.blockedOn = null;\n}\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (null !== queuedEvent.blockedOn) return !1;\n for (\n var targetContainers = queuedEvent.targetContainers;\n 0 < targetContainers.length;\n\n ) {\n var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);\n if (null === nextBlockedOn) {\n nextBlockedOn = queuedEvent.nativeEvent;\n var nativeEventClone = new nextBlockedOn.constructor(\n nextBlockedOn.type,\n nextBlockedOn\n );\n currentReplayingEvent = nativeEventClone;\n nextBlockedOn.target.dispatchEvent(nativeEventClone);\n currentReplayingEvent = null;\n } else\n return (\n (targetContainers = getInstanceFromNode(nextBlockedOn)),\n null !== targetContainers &&\n attemptContinuousHydration(targetContainers),\n (queuedEvent.blockedOn = nextBlockedOn),\n !1\n );\n targetContainers.shift();\n }\n return !0;\n}\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);\n}\nfunction replayUnblockedEvents() {\n hasScheduledReplayAttempt = !1;\n null !== queuedFocus &&\n attemptReplayContinuousQueuedEvent(queuedFocus) &&\n (queuedFocus = null);\n null !== queuedDrag &&\n attemptReplayContinuousQueuedEvent(queuedDrag) &&\n (queuedDrag = null);\n null !== queuedMouse &&\n attemptReplayContinuousQueuedEvent(queuedMouse) &&\n (queuedMouse = null);\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n queuedEvent.blockedOn === unblocked &&\n ((queuedEvent.blockedOn = null),\n hasScheduledReplayAttempt ||\n ((hasScheduledReplayAttempt = !0),\n Scheduler.unstable_scheduleCallback(\n Scheduler.unstable_NormalPriority,\n replayUnblockedEvents\n )));\n}\nvar lastScheduledReplayQueue = null;\nfunction scheduleReplayQueueIfNeeded(formReplayingQueue) {\n lastScheduledReplayQueue !== formReplayingQueue &&\n ((lastScheduledReplayQueue = formReplayingQueue),\n Scheduler.unstable_scheduleCallback(\n Scheduler.unstable_NormalPriority,\n function () {\n lastScheduledReplayQueue === formReplayingQueue &&\n (lastScheduledReplayQueue = null);\n for (var i = 0; i < formReplayingQueue.length; i += 3) {\n var form = formReplayingQueue[i],\n submitterOrAction = formReplayingQueue[i + 1],\n formData = formReplayingQueue[i + 2];\n if (\"function\" !== typeof submitterOrAction)\n if (null === findInstanceBlockingTarget(submitterOrAction || form))\n continue;\n else break;\n var formInst = getInstanceFromNode(form);\n null !== formInst &&\n (formReplayingQueue.splice(i, 3),\n (i -= 3),\n startHostTransition(\n formInst,\n {\n pending: !0,\n data: formData,\n method: form.method,\n action: submitterOrAction\n },\n submitterOrAction,\n formData\n ));\n }\n }\n ));\n}\nfunction retryIfBlockedOn(unblocked) {\n function unblock(queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n }\n null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {\n var queuedTarget = queuedExplicitHydrationTargets[i];\n queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);\n }\n for (\n ;\n 0 < queuedExplicitHydrationTargets.length &&\n ((i = queuedExplicitHydrationTargets[0]), null === i.blockedOn);\n\n )\n attemptExplicitHydrationTarget(i),\n null === i.blockedOn && queuedExplicitHydrationTargets.shift();\n i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;\n if (null != i)\n for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {\n var form = i[queuedTarget],\n submitterOrAction = i[queuedTarget + 1],\n formProps = form[internalPropsKey] || null;\n if (\"function\" === typeof submitterOrAction)\n formProps || scheduleReplayQueueIfNeeded(i);\n else if (formProps) {\n var action = null;\n if (submitterOrAction && submitterOrAction.hasAttribute(\"formAction\"))\n if (\n ((form = submitterOrAction),\n (formProps = submitterOrAction[internalPropsKey] || null))\n )\n action = formProps.formAction;\n else {\n if (null !== findInstanceBlockingTarget(form)) continue;\n }\n else action = formProps.action;\n \"function\" === typeof action\n ? (i[queuedTarget + 1] = action)\n : (i.splice(queuedTarget, 3), (queuedTarget -= 3));\n scheduleReplayQueueIfNeeded(i);\n }\n }\n}\nfunction defaultOnDefaultTransitionIndicator() {\n function handleNavigate(event) {\n event.canIntercept &&\n \"react-transition\" === event.info &&\n event.intercept({\n handler: function () {\n return new Promise(function (resolve) {\n return (pendingResolve = resolve);\n });\n },\n focusReset: \"manual\",\n scroll: \"manual\"\n });\n }\n function handleNavigateComplete() {\n null !== pendingResolve && (pendingResolve(), (pendingResolve = null));\n isCancelled || setTimeout(startFakeNavigation, 20);\n }\n function startFakeNavigation() {\n if (!isCancelled && !navigation.transition) {\n var currentEntry = navigation.currentEntry;\n currentEntry &&\n null != currentEntry.url &&\n navigation.navigate(currentEntry.url, {\n state: currentEntry.getState(),\n info: \"react-transition\",\n history: \"replace\"\n });\n }\n }\n if (\"object\" === typeof navigation) {\n var isCancelled = !1,\n pendingResolve = null;\n navigation.addEventListener(\"navigate\", handleNavigate);\n navigation.addEventListener(\"navigatesuccess\", handleNavigateComplete);\n navigation.addEventListener(\"navigateerror\", handleNavigateComplete);\n setTimeout(startFakeNavigation, 100);\n return function () {\n isCancelled = !0;\n navigation.removeEventListener(\"navigate\", handleNavigate);\n navigation.removeEventListener(\"navigatesuccess\", handleNavigateComplete);\n navigation.removeEventListener(\"navigateerror\", handleNavigateComplete);\n null !== pendingResolve && (pendingResolve(), (pendingResolve = null));\n };\n }\n}\nfunction ReactDOMRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\nReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =\n function (children) {\n var root = this._internalRoot;\n if (null === root) throw Error(formatProdErrorMessage(409));\n var current = root.current,\n lane = requestUpdateLane();\n updateContainerImpl(current, lane, children, root, null, null);\n };\nReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =\n function () {\n var root = this._internalRoot;\n if (null !== root) {\n this._internalRoot = null;\n var container = root.containerInfo;\n updateContainerImpl(root.current, 2, null, root, null, null);\n flushSyncWork$1();\n container[internalContainerInstanceKey] = null;\n }\n };\nfunction ReactDOMHydrationRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\nReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {\n if (target) {\n var updatePriority = resolveUpdatePriority();\n target = { blockedOn: null, target: target, priority: updatePriority };\n for (\n var i = 0;\n i < queuedExplicitHydrationTargets.length &&\n 0 !== updatePriority &&\n updatePriority < queuedExplicitHydrationTargets[i].priority;\n i++\n );\n queuedExplicitHydrationTargets.splice(i, 0, target);\n 0 === i && attemptExplicitHydrationTarget(target);\n }\n};\nvar isomorphicReactPackageVersion$jscomp$inline_1840 = React.version;\nif (\n \"19.2.6\" !==\n isomorphicReactPackageVersion$jscomp$inline_1840\n)\n throw Error(\n formatProdErrorMessage(\n 527,\n isomorphicReactPackageVersion$jscomp$inline_1840,\n \"19.2.6\"\n )\n );\nReactDOMSharedInternals.findDOMNode = function (componentOrElement) {\n var fiber = componentOrElement._reactInternals;\n if (void 0 === fiber) {\n if (\"function\" === typeof componentOrElement.render)\n throw Error(formatProdErrorMessage(188));\n componentOrElement = Object.keys(componentOrElement).join(\",\");\n throw Error(formatProdErrorMessage(268, componentOrElement));\n }\n componentOrElement = findCurrentFiberUsingSlowPath(fiber);\n componentOrElement =\n null !== componentOrElement\n ? findCurrentHostFiberImpl(componentOrElement)\n : null;\n componentOrElement =\n null === componentOrElement ? null : componentOrElement.stateNode;\n return componentOrElement;\n};\nvar internals$jscomp$inline_2347 = {\n bundleType: 0,\n version: \"19.2.6\",\n rendererPackageName: \"react-dom\",\n currentDispatcherRef: ReactSharedInternals,\n reconcilerVersion: \"19.2.6\"\n};\nif (\"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {\n var hook$jscomp$inline_2348 = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n if (\n !hook$jscomp$inline_2348.isDisabled &&\n hook$jscomp$inline_2348.supportsFiber\n )\n try {\n (rendererID = hook$jscomp$inline_2348.inject(\n internals$jscomp$inline_2347\n )),\n (injectedHook = hook$jscomp$inline_2348);\n } catch (err) {}\n}\nexports.createRoot = function (container, options) {\n if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));\n var isStrictMode = !1,\n identifierPrefix = \"\",\n onUncaughtError = defaultOnUncaughtError,\n onCaughtError = defaultOnCaughtError,\n onRecoverableError = defaultOnRecoverableError;\n null !== options &&\n void 0 !== options &&\n (!0 === options.unstable_strictMode && (isStrictMode = !0),\n void 0 !== options.identifierPrefix &&\n (identifierPrefix = options.identifierPrefix),\n void 0 !== options.onUncaughtError &&\n (onUncaughtError = options.onUncaughtError),\n void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),\n void 0 !== options.onRecoverableError &&\n (onRecoverableError = options.onRecoverableError));\n options = createFiberRoot(\n container,\n 1,\n !1,\n null,\n null,\n isStrictMode,\n identifierPrefix,\n null,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n defaultOnDefaultTransitionIndicator\n );\n container[internalContainerInstanceKey] = options.current;\n listenToAllSupportedEvents(container);\n return new ReactDOMRoot(options);\n};\nexports.hydrateRoot = function (container, initialChildren, options) {\n if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));\n var isStrictMode = !1,\n identifierPrefix = \"\",\n onUncaughtError = defaultOnUncaughtError,\n onCaughtError = defaultOnCaughtError,\n onRecoverableError = defaultOnRecoverableError,\n formState = null;\n null !== options &&\n void 0 !== options &&\n (!0 === options.unstable_strictMode && (isStrictMode = !0),\n void 0 !== options.identifierPrefix &&\n (identifierPrefix = options.identifierPrefix),\n void 0 !== options.onUncaughtError &&\n (onUncaughtError = options.onUncaughtError),\n void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),\n void 0 !== options.onRecoverableError &&\n (onRecoverableError = options.onRecoverableError),\n void 0 !== options.formState && (formState = options.formState));\n initialChildren = createFiberRoot(\n container,\n 1,\n !0,\n initialChildren,\n null != options ? options : null,\n isStrictMode,\n identifierPrefix,\n formState,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n defaultOnDefaultTransitionIndicator\n );\n initialChildren.context = getContextForSubtree(null);\n options = initialChildren.current;\n isStrictMode = requestUpdateLane();\n isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);\n identifierPrefix = createUpdate(isStrictMode);\n identifierPrefix.callback = null;\n enqueueUpdate(options, identifierPrefix, isStrictMode);\n options = isStrictMode;\n initialChildren.current.lanes = options;\n markRootUpdated$1(initialChildren, options);\n ensureRootIsScheduled(initialChildren);\n container[internalContainerInstanceKey] = initialChildren.current;\n listenToAllSupportedEvents(container);\n return new ReactDOMHydrationRoot(initialChildren);\n};\nexports.version = \"19.2.6\";\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom-client.production.js');\n} else {\n module.exports = require('./cjs/react-dom-client.development.js');\n}\n","// Stale code-split chunk recovery.\n//\n// Views are lazy-loaded as hashed chunks (App.tsx, #201). Every deploy rebuilds\n// with new hashes and `cleanAssets` (vite.config) deletes the old chunk files,\n// so a document still referencing an old hash 404s the moment it lazy-loads a\n// not-yet-fetched view → \"Failed to fetch dynamically imported module\". Two ways\n// a document ends up stale: (a) a long-lived tab — this SPA switches views by\n// state and never reloads index.html, so a tab opened before a deploy keeps the\n// old chunk map in memory forever; (b) a fresh load served a stale cached shell.\n// The only cure for (a) is a full reload to re-bootstrap with the current shell.\n//\n// importWithRetry wraps the dynamic import: on a chunk-load failure it forces ONE\n// full reload (the new network-first service worker then serves a fresh shell\n// whose chunk refs match the deployed assets). A sessionStorage timestamp guards\n// against reload loops — if the chunk is still missing right after a reload\n// (genuinely broken deploy), we surface the error instead of looping forever.\n\nimport { errMessage } from \"agent-relay-sdk/types\";\n\nconst RELOAD_GUARD_KEY = \"arChunkReloadAt\";\nconst RELOAD_WINDOW_MS = 10_000;\n\n/** Matches the various browser phrasings for a failed dynamic import / chunk fetch. */\nexport function isChunkLoadError(err: unknown): boolean {\n return /dynamically imported module|importing a module script failed|error loading dynamically imported|module script failed|failed to fetch/i.test(errMessage(err));\n}\n\nexport interface ChunkReloadDeps {\n now: () => number;\n getGuard: () => number;\n setGuard: (t: number) => void;\n reload: () => void;\n}\n\nfunction defaultDeps(): ChunkReloadDeps {\n return {\n now: () => Date.now(),\n getGuard: () => {\n try { return Number(sessionStorage.getItem(RELOAD_GUARD_KEY)) || 0; } catch { return 0; }\n },\n setGuard: (t) => {\n try { sessionStorage.setItem(RELOAD_GUARD_KEY, String(t)); } catch { /* private mode / blocked storage */ }\n },\n reload: () => { window.location.reload(); },\n };\n}\n\n/**\n * Trigger a one-shot recovery reload, guarded against loops. Returns true if a\n * reload was dispatched (caller should stop and wait for navigation), false if\n * the guard blocked it because we already reloaded within RELOAD_WINDOW_MS\n * (caller should surface the error). The guard timestamp survives the reload via\n * sessionStorage, then expires by time so a later deploy can reload again.\n */\nexport function recoverFromChunkError(deps: ChunkReloadDeps = defaultDeps()): boolean {\n const now = deps.now();\n const last = deps.getGuard();\n if (now - last > RELOAD_WINDOW_MS) {\n deps.setGuard(now);\n deps.reload();\n return true;\n }\n return false;\n}\n\n/**\n * Run a dynamic-import factory; on a stale-chunk failure, reload once to pick up\n * the current shell. The returned promise never rejects for a chunk error that\n * triggered a reload (it hangs until navigation), so React's lazy() shows the\n * Suspense fallback rather than flashing an error boundary mid-reload. Non-chunk\n * errors, and chunk errors blocked by the reload guard, reject normally.\n */\nexport async function importWithRetry<T>(factory: () => Promise<T>, deps: ChunkReloadDeps = defaultDeps()): Promise<T> {\n try {\n return await factory();\n } catch (err) {\n if (!isChunkLoadError(err)) throw err;\n if (recoverFromChunkError(deps)) {\n return await new Promise<T>(() => { /* reload in flight — never resolve */ });\n }\n throw err;\n }\n}\n","// src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n});\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VISUALLY_HIDDEN_STYLES,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__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 }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\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 DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__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 role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\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);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs, composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection } from \"@radix-ui/react-direction\";\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, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SELECTION_KEYS = [\"Enter\", \" \"];\nvar FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nvar LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nvar FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nvar SUB_OPEN_KEYS = {\n ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nvar SUB_CLOSE_KEYS = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n};\nvar MENU_NAME = \"Menu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);\nvar [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope\n]);\nvar usePopperScope = createPopperScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\nvar [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\nvar Menu = (props) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n React.useEffect(() => {\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener(\"pointerdown\", handlePointer, { capture: true, once: true });\n document.addEventListener(\"pointermove\", handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => isUsingKeyboardRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n document.removeEventListener(\"pointerdown\", handlePointer, { capture: true });\n document.removeEventListener(\"pointermove\", handlePointer, { capture: true });\n };\n }, []);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuRootProvider,\n {\n scope: __scopeMenu,\n onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),\n isUsingKeyboardRef,\n dir: direction,\n modal,\n children\n }\n )\n }\n ) });\n};\nMenu.displayName = MENU_NAME;\nvar ANCHOR_NAME = \"MenuAnchor\";\nvar MenuAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nMenuAnchor.displayName = ANCHOR_NAME;\nvar PORTAL_NAME = \"MenuPortal\";\nvar [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar MenuPortal = (props) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenuContent\";\nvar [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME);\nvar MenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });\n }\n);\nvar MenuRootContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: context.open,\n disableOutsideScroll: true,\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n ),\n onDismiss: () => context.onOpenChange(false)\n }\n );\n }\n);\nvar MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n onDismiss: () => context.onOpenChange(false)\n }\n );\n});\nvar Slot = createSlot(\"MenuContent.ScrollLock\");\nvar MenuContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState(null);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef(\"\");\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef(null);\n const pointerDirRef = React.useRef(\"right\");\n const lastPointerXRef = React.useRef(0);\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;\n const handleTypeaheadSearch = (key) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n if (newItem) {\n setTimeout(() => newItem.focus());\n }\n };\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n useFocusGuards();\n const isPointerMovingToSubmenu = React.useCallback((event) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentProvider,\n {\n scope: __scopeMenu,\n searchRef,\n onItemEnter: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n onItemLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n ),\n onTriggerLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n pointerGraceTimerRef,\n onPointerGraceIntentChange: React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, []),\n children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n trapped: trapFocus,\n onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n }),\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n dir: rootContext.dir,\n orientation: \"vertical\",\n loop,\n currentTabStopId: currentItemId,\n onCurrentTabStopIdChange: setCurrentItemId,\n onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n }),\n preventScrollOnEntryFocus: true,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n role: \"menu\",\n \"aria-orientation\": \"vertical\",\n \"data-state\": getOpenState(context.open),\n \"data-radix-menu-content\": \"\",\n dir: rootContext.dir,\n ...popperScope,\n ...contentProps,\n ref: composedRefs,\n style: { outline: \"none\", ...contentProps.style },\n onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n const target = event.target;\n const isKeyDownInside = target.closest(\"[data-radix-menu-content]\") === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n }),\n onBlur: composeEventHandlers(props.onBlur, (event) => {\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = \"\";\n }\n }),\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? \"right\" : \"left\";\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )\n }\n )\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenuGroup\";\nvar MenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", ...groupProps, ref: forwardedRef });\n }\n);\nMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenuLabel\";\nvar MenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });\n }\n);\nMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenuItem\";\nvar ITEM_SELECT = \"menu.itemSelect\";\nvar MenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n return /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n ...itemProps,\n ref: composedRefs,\n disabled,\n onClick: composeEventHandlers(props.onClick, handleSelect),\n onPointerDown: (event) => {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n },\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n if (!isPointerDownRef.current) event.currentTarget?.click();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (disabled || isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n event.preventDefault();\n }\n })\n }\n );\n }\n);\nMenuItem.displayName = ITEM_NAME;\nvar MenuItemImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n const [textContent, setTextContent] = React.useState(\"\");\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? \"\").trim());\n }\n }, [itemProps.children]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeMenu,\n disabled,\n textValue: textValue ?? textContent,\n children: /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"menuitem\",\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n ...itemProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n ),\n onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n );\n }\n);\nvar CHECKBOX_ITEM_NAME = \"MenuCheckboxItem\";\nvar MenuCheckboxItem = React.forwardRef(\n (props, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemcheckbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n ...checkboxItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n checkboxItemProps.onSelect,\n () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenuRadioGroup\";\nvar [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: void 0, onValueChange: () => {\n } }\n);\nvar MenuRadioGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });\n }\n);\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenuRadioItem\";\nvar MenuRadioItem = React.forwardRef(\n (props, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemradio\",\n \"aria-checked\": checked,\n ...radioItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n radioItemProps.onSelect,\n () => context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar ITEM_INDICATOR_NAME = \"MenuItemIndicator\";\nvar [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\nvar MenuItemIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...itemIndicatorProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(indicatorContext.checked)\n }\n )\n }\n );\n }\n);\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenuSeparator\";\nvar MenuSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n ...separatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenuArrow\";\nvar MenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenuArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenuSub\";\nvar [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\nvar MenuSub = (props) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuSubProvider,\n {\n scope: __scopeMenu,\n contentId: useId(),\n triggerId: useId(),\n trigger,\n onTriggerChange: setTrigger,\n children\n }\n )\n }\n ) });\n};\nMenuSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenuSubTrigger\";\nvar MenuSubTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n id: subContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": subContext.contentId,\n \"data-state\": getOpenState(context.open),\n ...props,\n ref: composeRefs(forwardedRef, subContext.onTriggerChange),\n onClick: (event) => {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n },\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n const side = context.content?.dataset.side;\n const rightSide = side === \"right\";\n const bleed = rightSide ? -5 : 5;\n const contentNearEdge = contentRect[rightSide ? \"left\" : \"right\"];\n const contentFarEdge = contentRect[rightSide ? \"right\" : \"left\"];\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom }\n ],\n side\n });\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n ),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (props.disabled || isTypingAhead && event.key === \" \") return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n context.content?.focus();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenuSubContent\";\nvar MenuSubContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n id: subContext.contentId,\n \"aria-labelledby\": subContext.triggerId,\n ...subContentProps,\n ref: composedRefs,\n align: \"start\",\n side: rootContext.dir === \"rtl\" ? \"left\" : \"right\",\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n trapFocus: false,\n onOpenAutoFocus: (event) => {\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n },\n onCloseAutoFocus: (event) => event.preventDefault(),\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n }),\n onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n event.preventDefault();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isKeyDownInside = event.currentTarget.contains(event.target);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n subContext.trigger?.focus();\n event.preventDefault();\n }\n })\n }\n ) }) }) });\n }\n);\nMenuSubContent.displayName = SUB_CONTENT_NAME;\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getCheckedState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nfunction focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nfunction getNextMatch(values, search, currentMatch) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find(\n (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : void 0;\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i];\n const jj = polygon[j];\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction isPointerInGraceArea(event, area) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root3 = Menu;\nvar Anchor2 = MenuAnchor;\nvar Portal = MenuPortal;\nvar Content2 = MenuContent;\nvar Group = MenuGroup;\nvar Label = MenuLabel;\nvar Item2 = MenuItem;\nvar CheckboxItem = MenuCheckboxItem;\nvar RadioGroup = MenuRadioGroup;\nvar RadioItem = MenuRadioItem;\nvar ItemIndicator = MenuItemIndicator;\nvar Separator = MenuSeparator;\nvar Arrow2 = MenuArrow;\nvar Sub = MenuSub;\nvar SubTrigger = MenuSubTrigger;\nvar SubContent = MenuSubContent;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n CheckboxItem,\n Content2 as Content,\n Group,\n Item2 as Item,\n ItemIndicator,\n Label,\n Menu,\n MenuAnchor,\n MenuArrow,\n MenuCheckboxItem,\n MenuContent,\n MenuGroup,\n MenuItem,\n MenuItemIndicator,\n MenuLabel,\n MenuPortal,\n MenuRadioGroup,\n MenuRadioItem,\n MenuSeparator,\n MenuSub,\n MenuSubContent,\n MenuSubTrigger,\n Portal,\n RadioGroup,\n RadioItem,\n Root3 as Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n createMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dropdown-menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\nimport { createMenuScope } from \"@radix-ui/react-menu\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DROPDOWN_MENU_NAME = \"DropdownMenu\";\nvar [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nvar useMenuScope = createMenuScope();\nvar [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);\nvar DropdownMenu = (props) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DROPDOWN_MENU_NAME\n });\n return /* @__PURE__ */ jsx(\n DropdownMenuProvider,\n {\n scope: __scopeDropdownMenu,\n triggerId: useId(),\n triggerRef,\n contentId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children: /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })\n }\n );\n};\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\nvar TRIGGER_NAME = \"DropdownMenuTrigger\";\nvar DropdownMenuTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n id: context.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": context.open ? \"open\" : \"closed\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n ...triggerProps,\n ref: composeRefs(forwardedRef, context.triggerRef),\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n if (!context.open) event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) context.onOpenToggle();\n if (event.key === \"ArrowDown\") context.onOpenChange(true);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) event.preventDefault();\n })\n }\n ) });\n }\n);\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DropdownMenuPortal\";\nvar DropdownMenuPortal = (props) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps });\n};\nDropdownMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"DropdownMenuContent\";\nvar DropdownMenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.Content,\n {\n id: context.contentId,\n \"aria-labelledby\": context.triggerId,\n ...menuScope,\n ...contentProps,\n ref: forwardedRef,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n event.preventDefault();\n }),\n onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n }),\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nDropdownMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"DropdownMenuGroup\";\nvar DropdownMenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n }\n);\nDropdownMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"DropdownMenuLabel\";\nvar DropdownMenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n }\n);\nDropdownMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"DropdownMenuItem\";\nvar DropdownMenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n }\n);\nDropdownMenuItem.displayName = ITEM_NAME;\nvar CHECKBOX_ITEM_NAME = \"DropdownMenuCheckboxItem\";\nvar DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n});\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"DropdownMenuRadioGroup\";\nvar DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n});\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"DropdownMenuRadioItem\";\nvar DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n});\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar INDICATOR_NAME = \"DropdownMenuItemIndicator\";\nvar DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n});\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\nvar SEPARATOR_NAME = \"DropdownMenuSeparator\";\nvar DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n});\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"DropdownMenuArrow\";\nvar DropdownMenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n }\n);\nDropdownMenuArrow.displayName = ARROW_NAME;\nvar DropdownMenuSub = (props) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: \"DropdownMenuSub\"\n });\n return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n};\nvar SUB_TRIGGER_NAME = \"DropdownMenuSubTrigger\";\nvar DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });\n});\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"DropdownMenuSubContent\";\nvar DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubContent,\n {\n ...menuScope,\n ...subContentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n});\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\nvar Root2 = DropdownMenu;\nvar Trigger = DropdownMenuTrigger;\nvar Portal2 = DropdownMenuPortal;\nvar Content2 = DropdownMenuContent;\nvar Group2 = DropdownMenuGroup;\nvar Label2 = DropdownMenuLabel;\nvar Item2 = DropdownMenuItem;\nvar CheckboxItem2 = DropdownMenuCheckboxItem;\nvar RadioGroup2 = DropdownMenuRadioGroup;\nvar RadioItem2 = DropdownMenuRadioItem;\nvar ItemIndicator2 = DropdownMenuItemIndicator;\nvar Separator2 = DropdownMenuSeparator;\nvar Arrow2 = DropdownMenuArrow;\nvar Sub2 = DropdownMenuSub;\nvar SubTrigger2 = DropdownMenuSubTrigger;\nvar SubContent2 = DropdownMenuSubContent;\nexport {\n Arrow2 as Arrow,\n CheckboxItem2 as CheckboxItem,\n Content2 as Content,\n DropdownMenu,\n DropdownMenuArrow,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuItemIndicator,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n Group2 as Group,\n Item2 as Item,\n ItemIndicator2 as ItemIndicator,\n Label2 as Label,\n Portal2 as Portal,\n RadioGroup2 as RadioGroup,\n RadioItem2 as RadioItem,\n Root2 as Root,\n Separator2 as Separator,\n Sub2 as Sub,\n SubContent2 as SubContent,\n SubTrigger2 as SubTrigger,\n Trigger,\n createDropdownMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/scroll-area.tsx\nimport * as React2 from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { clamp } from \"@radix-ui/number\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\n\n// src/use-state-machine.ts\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/scroll-area.tsx\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar SCROLL_AREA_NAME = \"ScrollArea\";\nvar [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);\nvar [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);\nvar ScrollArea = React2.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeScrollArea,\n type = \"hover\",\n dir,\n scrollHideDelay = 600,\n ...scrollAreaProps\n } = props;\n const [scrollArea, setScrollArea] = React2.useState(null);\n const [viewport, setViewport] = React2.useState(null);\n const [content, setContent] = React2.useState(null);\n const [scrollbarX, setScrollbarX] = React2.useState(null);\n const [scrollbarY, setScrollbarY] = React2.useState(null);\n const [cornerWidth, setCornerWidth] = React2.useState(0);\n const [cornerHeight, setCornerHeight] = React2.useState(0);\n const [scrollbarXEnabled, setScrollbarXEnabled] = React2.useState(false);\n const [scrollbarYEnabled, setScrollbarYEnabled] = React2.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));\n const direction = useDirection(dir);\n return /* @__PURE__ */ jsx(\n ScrollAreaProvider,\n {\n scope: __scopeScrollArea,\n type,\n dir: direction,\n scrollHideDelay,\n scrollArea,\n viewport,\n onViewportChange: setViewport,\n content,\n onContentChange: setContent,\n scrollbarX,\n onScrollbarXChange: setScrollbarX,\n scrollbarXEnabled,\n onScrollbarXEnabledChange: setScrollbarXEnabled,\n scrollbarY,\n onScrollbarYChange: setScrollbarY,\n scrollbarYEnabled,\n onScrollbarYEnabledChange: setScrollbarYEnabled,\n onCornerWidthChange: setCornerWidth,\n onCornerHeightChange: setCornerHeight,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n ...scrollAreaProps,\n ref: composedRefs,\n style: {\n position: \"relative\",\n // Pass corner sizes as CSS vars to reduce re-renders of context consumers\n [\"--radix-scroll-area-corner-width\"]: cornerWidth + \"px\",\n [\"--radix-scroll-area-corner-height\"]: cornerHeight + \"px\",\n ...props.style\n }\n }\n )\n }\n );\n }\n);\nScrollArea.displayName = SCROLL_AREA_NAME;\nvar VIEWPORT_NAME = \"ScrollAreaViewport\";\nvar ScrollAreaViewport = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, children, nonce, ...viewportProps } = props;\n const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);\n const ref = React2.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n \"style\",\n {\n dangerouslySetInnerHTML: {\n __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`\n },\n nonce\n }\n ),\n /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-scroll-area-viewport\": \"\",\n ...viewportProps,\n ref: composedRefs,\n style: {\n /**\n * We don't support `visible` because the intention is to have at least one scrollbar\n * if this component is used and `visible` will behave like `auto` in that case\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description\n *\n * We don't handle `auto` because the intention is for the native implementation\n * to be hidden if using this component. We just want to ensure the node is scrollable\n * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent\n * the browser from having to work out whether to render native scrollbars or not,\n * we tell it to with the intention of hiding them in CSS.\n */\n overflowX: context.scrollbarXEnabled ? \"scroll\" : \"hidden\",\n overflowY: context.scrollbarYEnabled ? \"scroll\" : \"hidden\",\n ...props.style\n },\n children: /* @__PURE__ */ jsx(\"div\", { ref: context.onContentChange, style: { minWidth: \"100%\", display: \"table\" }, children })\n }\n )\n ] });\n }\n);\nScrollAreaViewport.displayName = VIEWPORT_NAME;\nvar SCROLLBAR_NAME = \"ScrollAreaScrollbar\";\nvar ScrollAreaScrollbar = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;\n const isHorizontal = props.orientation === \"horizontal\";\n React2.useEffect(() => {\n isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);\n return () => {\n isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);\n };\n }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);\n return context.type === \"hover\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"scroll\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"auto\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"always\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;\n }\n);\nScrollAreaScrollbar.displayName = SCROLLBAR_NAME;\nvar ScrollAreaScrollbarHover = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [visible, setVisible] = React2.useState(false);\n React2.useEffect(() => {\n const scrollArea = context.scrollArea;\n let hideTimer = 0;\n if (scrollArea) {\n const handlePointerEnter = () => {\n window.clearTimeout(hideTimer);\n setVisible(true);\n };\n const handlePointerLeave = () => {\n hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);\n };\n scrollArea.addEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.addEventListener(\"pointerleave\", handlePointerLeave);\n return () => {\n window.clearTimeout(hideTimer);\n scrollArea.removeEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.removeEventListener(\"pointerleave\", handlePointerLeave);\n };\n }\n }, [context.scrollArea, context.scrollHideDelay]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarAuto,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarScroll = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const isHorizontal = props.orientation === \"horizontal\";\n const debounceScrollEnd = useDebounceCallback(() => send(\"SCROLL_END\"), 100);\n const [state, send] = useStateMachine(\"hidden\", {\n hidden: {\n SCROLL: \"scrolling\"\n },\n scrolling: {\n SCROLL_END: \"idle\",\n POINTER_ENTER: \"interacting\"\n },\n interacting: {\n SCROLL: \"interacting\",\n POINTER_LEAVE: \"idle\"\n },\n idle: {\n HIDE: \"hidden\",\n SCROLL: \"scrolling\",\n POINTER_ENTER: \"interacting\"\n }\n });\n React2.useEffect(() => {\n if (state === \"idle\") {\n const hideTimer = window.setTimeout(() => send(\"HIDE\"), context.scrollHideDelay);\n return () => window.clearTimeout(hideTimer);\n }\n }, [state, context.scrollHideDelay, send]);\n React2.useEffect(() => {\n const viewport = context.viewport;\n const scrollDirection = isHorizontal ? \"scrollLeft\" : \"scrollTop\";\n if (viewport) {\n let prevScrollPos = viewport[scrollDirection];\n const handleScroll = () => {\n const scrollPos = viewport[scrollDirection];\n const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;\n if (hasScrollInDirectionChanged) {\n send(\"SCROLL\");\n debounceScrollEnd();\n }\n prevScrollPos = scrollPos;\n };\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [context.viewport, isHorizontal, send, debounceScrollEnd]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || state !== \"hidden\", children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": state === \"hidden\" ? \"hidden\" : \"visible\",\n ...scrollbarProps,\n ref: forwardedRef,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send(\"POINTER_ENTER\")),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send(\"POINTER_LEAVE\"))\n }\n ) });\n});\nvar ScrollAreaScrollbarAuto = React2.forwardRef((props, forwardedRef) => {\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { forceMount, ...scrollbarProps } = props;\n const [visible, setVisible] = React2.useState(false);\n const isHorizontal = props.orientation === \"horizontal\";\n const handleResize = useDebounceCallback(() => {\n if (context.viewport) {\n const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;\n const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;\n setVisible(isHorizontal ? isOverflowX : isOverflowY);\n }\n }, 10);\n useResizeObserver(context.viewport, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarVisible = React2.forwardRef((props, forwardedRef) => {\n const { orientation = \"vertical\", ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const thumbRef = React2.useRef(null);\n const pointerOffsetRef = React2.useRef(0);\n const [sizes, setSizes] = React2.useState({\n content: 0,\n viewport: 0,\n scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }\n });\n const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);\n const commonProps = {\n ...scrollbarProps,\n sizes,\n onSizesChange: setSizes,\n hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),\n onThumbChange: (thumb) => thumbRef.current = thumb,\n onThumbPointerUp: () => pointerOffsetRef.current = 0,\n onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos\n };\n function getScrollPosition(pointerPos, dir) {\n return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);\n }\n if (orientation === \"horizontal\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarX,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollLeft;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);\n thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollLeft = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) {\n context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);\n }\n }\n }\n );\n }\n if (orientation === \"vertical\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarY,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollTop;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes);\n thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollTop = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);\n }\n }\n );\n }\n return null;\n});\nvar ScrollAreaScrollbarX = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"horizontal\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n bottom: 0,\n left: context.dir === \"rtl\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n right: context.dir === \"ltr\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n [\"--radix-scroll-area-thumb-width\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollLeft + event.deltaX;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollWidth,\n viewport: context.viewport.offsetWidth,\n scrollbar: {\n size: ref.current.clientWidth,\n paddingStart: toInt(computedStyle.paddingLeft),\n paddingEnd: toInt(computedStyle.paddingRight)\n }\n });\n }\n }\n }\n );\n});\nvar ScrollAreaScrollbarY = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"vertical\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n top: 0,\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: \"var(--radix-scroll-area-corner-height)\",\n [\"--radix-scroll-area-thumb-height\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollTop + event.deltaY;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollHeight,\n viewport: context.viewport.offsetHeight,\n scrollbar: {\n size: ref.current.clientHeight,\n paddingStart: toInt(computedStyle.paddingTop),\n paddingEnd: toInt(computedStyle.paddingBottom)\n }\n });\n }\n }\n }\n );\n});\nvar [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);\nvar ScrollAreaScrollbarImpl = React2.forwardRef((props, forwardedRef) => {\n const {\n __scopeScrollArea,\n sizes,\n hasThumb,\n onThumbChange,\n onThumbPointerUp,\n onThumbPointerDown,\n onThumbPositionChange,\n onDragScroll,\n onWheelScroll,\n onResize,\n ...scrollbarProps\n } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);\n const [scrollbar, setScrollbar] = React2.useState(null);\n const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));\n const rectRef = React2.useRef(null);\n const prevWebkitUserSelectRef = React2.useRef(\"\");\n const viewport = context.viewport;\n const maxScrollPos = sizes.content - sizes.viewport;\n const handleWheelScroll = useCallbackRef(onWheelScroll);\n const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);\n const handleResize = useDebounceCallback(onResize, 10);\n function handleDragScroll(event) {\n if (rectRef.current) {\n const x = event.clientX - rectRef.current.left;\n const y = event.clientY - rectRef.current.top;\n onDragScroll({ x, y });\n }\n }\n React2.useEffect(() => {\n const handleWheel = (event) => {\n const element = event.target;\n const isScrollbarWheel = scrollbar?.contains(element);\n if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);\n };\n document.addEventListener(\"wheel\", handleWheel, { passive: false });\n return () => document.removeEventListener(\"wheel\", handleWheel, { passive: false });\n }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);\n React2.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);\n useResizeObserver(scrollbar, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(\n ScrollbarProvider,\n {\n scope: __scopeScrollArea,\n scrollbar,\n hasThumb,\n onThumbChange: useCallbackRef(onThumbChange),\n onThumbPointerUp: useCallbackRef(onThumbPointerUp),\n onThumbPositionChange: handleThumbPositionChange,\n onThumbPointerDown: useCallbackRef(onThumbPointerDown),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...scrollbarProps,\n ref: composeRefs,\n style: { position: \"absolute\", ...scrollbarProps.style },\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n const mainPointer = 0;\n if (event.button === mainPointer) {\n const element = event.target;\n element.setPointerCapture(event.pointerId);\n rectRef.current = scrollbar.getBoundingClientRect();\n prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;\n document.body.style.webkitUserSelect = \"none\";\n if (context.viewport) context.viewport.style.scrollBehavior = \"auto\";\n handleDragScroll(event);\n }\n }),\n onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n const element = event.target;\n if (element.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId);\n }\n document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;\n if (context.viewport) context.viewport.style.scrollBehavior = \"\";\n rectRef.current = null;\n })\n }\n )\n }\n );\n});\nvar THUMB_NAME = \"ScrollAreaThumb\";\nvar ScrollAreaThumb = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...thumbProps } = props;\n const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });\n }\n);\nvar ScrollAreaThumbImpl = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, style, ...thumbProps } = props;\n const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);\n const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);\n const { onThumbPositionChange } = scrollbarContext;\n const composedRef = useComposedRefs(\n forwardedRef,\n (node) => scrollbarContext.onThumbChange(node)\n );\n const removeUnlinkedScrollListenerRef = React2.useRef(void 0);\n const debounceScrollEnd = useDebounceCallback(() => {\n if (removeUnlinkedScrollListenerRef.current) {\n removeUnlinkedScrollListenerRef.current();\n removeUnlinkedScrollListenerRef.current = void 0;\n }\n }, 100);\n React2.useEffect(() => {\n const viewport = scrollAreaContext.viewport;\n if (viewport) {\n const handleScroll = () => {\n debounceScrollEnd();\n if (!removeUnlinkedScrollListenerRef.current) {\n const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);\n removeUnlinkedScrollListenerRef.current = listener;\n onThumbPositionChange();\n }\n };\n onThumbPositionChange();\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": scrollbarContext.hasThumb ? \"visible\" : \"hidden\",\n ...thumbProps,\n ref: composedRef,\n style: {\n width: \"var(--radix-scroll-area-thumb-width)\",\n height: \"var(--radix-scroll-area-thumb-height)\",\n ...style\n },\n onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {\n const thumb = event.target;\n const thumbRect = thumb.getBoundingClientRect();\n const x = event.clientX - thumbRect.left;\n const y = event.clientY - thumbRect.top;\n scrollbarContext.onThumbPointerDown({ x, y });\n }),\n onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)\n }\n );\n }\n);\nScrollAreaThumb.displayName = THUMB_NAME;\nvar CORNER_NAME = \"ScrollAreaCorner\";\nvar ScrollAreaCorner = React2.forwardRef(\n (props, forwardedRef) => {\n const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);\n const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);\n const hasCorner = context.type !== \"scroll\" && hasBothScrollbarsVisible;\n return hasCorner ? /* @__PURE__ */ jsx(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;\n }\n);\nScrollAreaCorner.displayName = CORNER_NAME;\nvar ScrollAreaCornerImpl = React2.forwardRef((props, forwardedRef) => {\n const { __scopeScrollArea, ...cornerProps } = props;\n const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);\n const [width, setWidth] = React2.useState(0);\n const [height, setHeight] = React2.useState(0);\n const hasSize = Boolean(width && height);\n useResizeObserver(context.scrollbarX, () => {\n const height2 = context.scrollbarX?.offsetHeight || 0;\n context.onCornerHeightChange(height2);\n setHeight(height2);\n });\n useResizeObserver(context.scrollbarY, () => {\n const width2 = context.scrollbarY?.offsetWidth || 0;\n context.onCornerWidthChange(width2);\n setWidth(width2);\n });\n return hasSize ? /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...cornerProps,\n ref: forwardedRef,\n style: {\n width,\n height,\n position: \"absolute\",\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: 0,\n ...props.style\n }\n }\n ) : null;\n});\nfunction toInt(value) {\n return value ? parseInt(value, 10) : 0;\n}\nfunction getThumbRatio(viewportSize, contentSize) {\n const ratio = viewportSize / contentSize;\n return isNaN(ratio) ? 0 : ratio;\n}\nfunction getThumbSize(sizes) {\n const ratio = getThumbRatio(sizes.viewport, sizes.content);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;\n return Math.max(thumbSize, 18);\n}\nfunction getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const thumbCenter = thumbSizePx / 2;\n const offset = pointerOffset || thumbCenter;\n const thumbOffsetFromEnd = thumbSizePx - offset;\n const minPointerPos = sizes.scrollbar.paddingStart + offset;\n const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;\n const maxScrollPos = sizes.content - sizes.viewport;\n const scrollRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange);\n return interpolate(pointerPos);\n}\nfunction getThumbOffsetFromScroll(scrollPos, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const scrollbar = sizes.scrollbar.size - scrollbarPadding;\n const maxScrollPos = sizes.content - sizes.viewport;\n const maxThumbPos = scrollbar - thumbSizePx;\n const scrollClampRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange);\n const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);\n return interpolate(scrollWithoutMomentum);\n}\nfunction linearScale(input, output) {\n return (value) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\nfunction isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {\n return scrollPos > 0 && scrollPos < maxScrollPos;\n}\nvar addUnlinkedScrollListener = (node, handler = () => {\n}) => {\n let prevPosition = { left: node.scrollLeft, top: node.scrollTop };\n let rAF = 0;\n (function loop() {\n const position = { left: node.scrollLeft, top: node.scrollTop };\n const isHorizontalScroll = prevPosition.left !== position.left;\n const isVerticalScroll = prevPosition.top !== position.top;\n if (isHorizontalScroll || isVerticalScroll) handler();\n prevPosition = position;\n rAF = window.requestAnimationFrame(loop);\n })();\n return () => window.cancelAnimationFrame(rAF);\n};\nfunction useDebounceCallback(callback, delay) {\n const handleCallback = useCallbackRef(callback);\n const debounceTimerRef = React2.useRef(0);\n React2.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);\n return React2.useCallback(() => {\n window.clearTimeout(debounceTimerRef.current);\n debounceTimerRef.current = window.setTimeout(handleCallback, delay);\n }, [handleCallback, delay]);\n}\nfunction useResizeObserver(element, onResize) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\nvar Root = ScrollArea;\nvar Viewport = ScrollAreaViewport;\nvar Scrollbar = ScrollAreaScrollbar;\nvar Thumb = ScrollAreaThumb;\nvar Corner = ScrollAreaCorner;\nexport {\n Corner,\n Root,\n ScrollArea,\n ScrollAreaCorner,\n ScrollAreaScrollbar,\n ScrollAreaThumb,\n ScrollAreaViewport,\n Scrollbar,\n Thumb,\n Viewport,\n createScrollAreaScope\n};\n//# sourceMappingURL=index.mjs.map\n","// src/separator.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Separator\";\nvar DEFAULT_ORIENTATION = \"horizontal\";\nvar ORIENTATIONS = [\"horizontal\", \"vertical\"];\nvar Separator = React.forwardRef((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n const ariaOrientation = orientation === \"vertical\" ? orientation : void 0;\n const semanticProps = decorative ? { role: \"none\" } : { \"aria-orientation\": ariaOrientation, role: \"separator\" };\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-orientation\": orientation,\n ...semanticProps,\n ...domProps,\n ref: forwardedRef\n }\n );\n});\nSeparator.displayName = NAME;\nfunction isValidOrientation(orientation) {\n return ORIENTATIONS.includes(orientation);\n}\nvar Root = Separator;\nexport {\n Root,\n Separator\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/switch.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 { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar SWITCH_NAME = \"Switch\";\nvar [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\nvar [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);\nvar Switch = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSwitch,\n name,\n checked: checkedProp,\n defaultChecked,\n required,\n disabled,\n value = \"on\",\n onCheckedChange,\n form,\n ...switchProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = button ? form || !!button.closest(\"form\") : true;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: SWITCH_NAME\n });\n return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [\n /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"switch\",\n \"aria-checked\": checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...switchProps,\n ref: composedRefs,\n onClick: composeEventHandlers(props.onClick, (event) => {\n setChecked((prevChecked) => !prevChecked);\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n SwitchBubbleInput,\n {\n control: button,\n bubbles: !hasConsumerStoppedPropagationRef.current,\n name,\n value,\n checked,\n required,\n disabled,\n form,\n style: { transform: \"translateX(-100%)\" }\n }\n )\n ] });\n }\n);\nSwitch.displayName = SWITCH_NAME;\nvar THUMB_NAME = \"SwitchThumb\";\nvar SwitchThumb = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...thumbProps,\n ref: forwardedRef\n }\n );\n }\n);\nSwitchThumb.displayName = THUMB_NAME;\nvar BUBBLE_INPUT_NAME = \"SwitchBubbleInput\";\nvar SwitchBubbleInput = React.forwardRef(\n ({\n __scopeSwitch,\n control,\n checked,\n bubbles = true,\n ...props\n }, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n return /* @__PURE__ */ jsx(\n \"input\",\n {\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: checked,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0\n }\n }\n );\n }\n);\nSwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\nvar Root = Switch;\nvar Thumb = SwitchThumb;\nexport {\n Root,\n Switch,\n SwitchThumb,\n Thumb,\n createSwitchScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/tabs.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TABS_NAME = \"Tabs\";\nvar [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [\n createRovingFocusGroupScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);\nvar Tabs = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeTabs,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = \"horizontal\",\n dir,\n activationMode = \"automatic\",\n ...tabsProps\n } = props;\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? \"\",\n caller: TABS_NAME\n });\n return /* @__PURE__ */ jsx(\n TabsProvider,\n {\n scope: __scopeTabs,\n baseId: useId(),\n value,\n onValueChange: setValue,\n orientation,\n dir: direction,\n activationMode,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n \"data-orientation\": orientation,\n ...tabsProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabs.displayName = TABS_NAME;\nvar TAB_LIST_NAME = \"TabsList\";\nvar TabsList = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, loop = true, ...listProps } = props;\n const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation: context.orientation,\n dir: context.dir,\n loop,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"tablist\",\n \"aria-orientation\": context.orientation,\n ...listProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabsList.displayName = TAB_LIST_NAME;\nvar TRIGGER_NAME = \"TabsTrigger\";\nvar TabsTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, disabled = false, ...triggerProps } = props;\n const context = useTabsContext(TRIGGER_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !disabled,\n active: isSelected,\n children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"tab\",\n \"aria-selected\": isSelected,\n \"aria-controls\": contentId,\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n id: triggerId,\n ...triggerProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onValueChange(value);\n } else {\n event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if ([\" \", \"Enter\"].includes(event.key)) context.onValueChange(value);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => {\n const isAutomaticActivation = context.activationMode !== \"manual\";\n if (!isSelected && !disabled && isAutomaticActivation) {\n context.onValueChange(value);\n }\n })\n }\n )\n }\n );\n }\n);\nTabsTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"TabsContent\";\nvar TabsContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, forceMount, children, ...contentProps } = props;\n const context = useTabsContext(CONTENT_NAME, __scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n const isMountAnimationPreventedRef = React.useRef(isSelected);\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-orientation\": context.orientation,\n role: \"tabpanel\",\n \"aria-labelledby\": triggerId,\n hidden: !present,\n id: contentId,\n tabIndex: 0,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n animationDuration: isMountAnimationPreventedRef.current ? \"0s\" : void 0\n },\n children: present && children\n }\n ) });\n }\n);\nTabsContent.displayName = CONTENT_NAME;\nfunction makeTriggerId(baseId, value) {\n return `${baseId}-trigger-${value}`;\n}\nfunction makeContentId(baseId, value) {\n return `${baseId}-content-${value}`;\n}\nvar Root2 = Tabs;\nvar List = TabsList;\nvar Trigger = TabsTrigger;\nvar Content = TabsContent;\nexport {\n Content,\n List,\n Root2 as Root,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n Trigger,\n createTabsScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/tooltip.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 { 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 { createSlottable } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport * as VisuallyHiddenPrimitive from \"@radix-ui/react-visually-hidden\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar [createTooltipContext, createTooltipScope] = createContextScope(\"Tooltip\", [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar PROVIDER_NAME = \"TooltipProvider\";\nvar DEFAULT_DELAY_DURATION = 700;\nvar TOOLTIP_OPEN = \"tooltip.open\";\nvar [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME);\nvar TooltipProvider = (props) => {\n const {\n __scopeTooltip,\n delayDuration = DEFAULT_DELAY_DURATION,\n skipDelayDuration = 300,\n disableHoverableContent = false,\n children\n } = props;\n const isOpenDelayedRef = React.useRef(true);\n const isPointerInTransitRef = React.useRef(false);\n const skipDelayTimerRef = React.useRef(0);\n React.useEffect(() => {\n const skipDelayTimer = skipDelayTimerRef.current;\n return () => window.clearTimeout(skipDelayTimer);\n }, []);\n return /* @__PURE__ */ jsx(\n TooltipProviderContextProvider,\n {\n scope: __scopeTooltip,\n isOpenDelayedRef,\n delayDuration,\n onOpen: React.useCallback(() => {\n window.clearTimeout(skipDelayTimerRef.current);\n isOpenDelayedRef.current = false;\n }, []),\n onClose: React.useCallback(() => {\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(\n () => isOpenDelayedRef.current = true,\n skipDelayDuration\n );\n }, [skipDelayDuration]),\n isPointerInTransitRef,\n onPointerInTransitChange: React.useCallback((inTransit) => {\n isPointerInTransitRef.current = inTransit;\n }, []),\n disableHoverableContent,\n children\n }\n );\n};\nTooltipProvider.displayName = PROVIDER_NAME;\nvar TOOLTIP_NAME = \"Tooltip\";\nvar [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME);\nvar Tooltip = (props) => {\n const {\n __scopeTooltip,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n disableHoverableContent: disableHoverableContentProp,\n delayDuration: delayDurationProp\n } = props;\n const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const [trigger, setTrigger] = React.useState(null);\n const contentId = useId();\n const openTimerRef = React.useRef(0);\n const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;\n const delayDuration = delayDurationProp ?? providerContext.delayDuration;\n const wasOpenDelayedRef = React.useRef(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: (open2) => {\n if (open2) {\n providerContext.onOpen();\n document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));\n } else {\n providerContext.onClose();\n }\n onOpenChange?.(open2);\n },\n caller: TOOLTIP_NAME\n });\n const stateAttribute = React.useMemo(() => {\n return open ? wasOpenDelayedRef.current ? \"delayed-open\" : \"instant-open\" : \"closed\";\n }, [open]);\n const handleOpen = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n wasOpenDelayedRef.current = false;\n setOpen(true);\n }, [setOpen]);\n const handleClose = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n setOpen(false);\n }, [setOpen]);\n const handleDelayedOpen = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = window.setTimeout(() => {\n wasOpenDelayedRef.current = true;\n setOpen(true);\n openTimerRef.current = 0;\n }, delayDuration);\n }, [delayDuration, setOpen]);\n React.useEffect(() => {\n return () => {\n if (openTimerRef.current) {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n };\n }, []);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n TooltipContextProvider,\n {\n scope: __scopeTooltip,\n contentId,\n open,\n stateAttribute,\n trigger,\n onTriggerChange: setTrigger,\n onTriggerEnter: React.useCallback(() => {\n if (providerContext.isOpenDelayedRef.current) handleDelayedOpen();\n else handleOpen();\n }, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen]),\n onTriggerLeave: React.useCallback(() => {\n if (disableHoverableContent) {\n handleClose();\n } else {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n }, [handleClose, disableHoverableContent]),\n onOpen: handleOpen,\n onClose: handleClose,\n disableHoverableContent,\n children\n }\n ) });\n};\nTooltip.displayName = TOOLTIP_NAME;\nvar TRIGGER_NAME = \"TooltipTrigger\";\nvar TooltipTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTooltip, ...triggerProps } = props;\n const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip);\n const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange);\n const isPointerDownRef = React.useRef(false);\n const hasPointerMoveOpenedRef = React.useRef(false);\n const handlePointerUp = React.useCallback(() => isPointerDownRef.current = false, []);\n React.useEffect(() => {\n return () => document.removeEventListener(\"pointerup\", handlePointerUp);\n }, [handlePointerUp]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n \"aria-describedby\": context.open ? context.contentId : void 0,\n \"data-state\": context.stateAttribute,\n ...triggerProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(props.onPointerMove, (event) => {\n if (event.pointerType === \"touch\") return;\n if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {\n context.onTriggerEnter();\n hasPointerMoveOpenedRef.current = true;\n }\n }),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, () => {\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n }),\n onPointerDown: composeEventHandlers(props.onPointerDown, () => {\n if (context.open) {\n context.onClose();\n }\n isPointerDownRef.current = true;\n document.addEventListener(\"pointerup\", handlePointerUp, { once: true });\n }),\n onFocus: composeEventHandlers(props.onFocus, () => {\n if (!isPointerDownRef.current) context.onOpen();\n }),\n onBlur: composeEventHandlers(props.onBlur, context.onClose),\n onClick: composeEventHandlers(props.onClick, context.onClose)\n }\n ) });\n }\n);\nTooltipTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"TooltipPortal\";\nvar [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar TooltipPortal = (props) => {\n const { __scopeTooltip, forceMount, children, container } = props;\n const context = useTooltipContext(PORTAL_NAME, __scopeTooltip);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nTooltipPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"TooltipContent\";\nvar TooltipContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip);\n const { forceMount = portalContext.forceMount, side = \"top\", ...contentProps } = props;\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsx(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });\n }\n);\nvar TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [pointerGraceArea, setPointerGraceArea] = React.useState(null);\n const { trigger, onClose } = context;\n const content = ref.current;\n const { onPointerInTransitChange } = providerContext;\n const handleRemoveGraceArea = React.useCallback(() => {\n setPointerGraceArea(null);\n onPointerInTransitChange(false);\n }, [onPointerInTransitChange]);\n const handleCreateGraceArea = React.useCallback(\n (event, hoverTarget) => {\n const currentTarget = event.currentTarget;\n const exitPoint = { x: event.clientX, y: event.clientY };\n const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());\n const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide);\n const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());\n const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]);\n setPointerGraceArea(graceArea);\n onPointerInTransitChange(true);\n },\n [onPointerInTransitChange]\n );\n React.useEffect(() => {\n return () => handleRemoveGraceArea();\n }, [handleRemoveGraceArea]);\n React.useEffect(() => {\n if (trigger && content) {\n const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);\n const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);\n trigger.addEventListener(\"pointerleave\", handleTriggerLeave);\n content.addEventListener(\"pointerleave\", handleContentLeave);\n return () => {\n trigger.removeEventListener(\"pointerleave\", handleTriggerLeave);\n content.removeEventListener(\"pointerleave\", handleContentLeave);\n };\n }\n }, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);\n React.useEffect(() => {\n if (pointerGraceArea) {\n const handleTrackPointerGrace = (event) => {\n const target = event.target;\n const pointerPosition = { x: event.clientX, y: event.clientY };\n const hasEnteredTarget = trigger?.contains(target) || content?.contains(target);\n const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea);\n if (hasEnteredTarget) {\n handleRemoveGraceArea();\n } else if (isPointerOutsideGraceArea) {\n handleRemoveGraceArea();\n onClose();\n }\n };\n document.addEventListener(\"pointermove\", handleTrackPointerGrace);\n return () => document.removeEventListener(\"pointermove\", handleTrackPointerGrace);\n }\n }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);\n return /* @__PURE__ */ jsx(TooltipContentImpl, { ...props, ref: composedRefs });\n});\nvar [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });\nvar Slottable = createSlottable(\"TooltipContent\");\nvar TooltipContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeTooltip,\n children,\n \"aria-label\": ariaLabel,\n onEscapeKeyDown,\n onPointerDownOutside,\n ...contentProps\n } = props;\n const context = useTooltipContext(CONTENT_NAME, __scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const { onClose } = context;\n React.useEffect(() => {\n document.addEventListener(TOOLTIP_OPEN, onClose);\n return () => document.removeEventListener(TOOLTIP_OPEN, onClose);\n }, [onClose]);\n React.useEffect(() => {\n if (context.trigger) {\n const handleScroll = (event) => {\n const target = event.target;\n if (target?.contains(context.trigger)) onClose();\n };\n window.addEventListener(\"scroll\", handleScroll, { capture: true });\n return () => window.removeEventListener(\"scroll\", handleScroll, { capture: true });\n }\n }, [context.trigger, onClose]);\n return /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents: false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside: (event) => event.preventDefault(),\n onDismiss: onClose,\n children: /* @__PURE__ */ jsxs(\n PopperPrimitive.Content,\n {\n \"data-state\": context.stateAttribute,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-tooltip-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-tooltip-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-tooltip-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-tooltip-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-tooltip-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n },\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx(VisuallyHiddenPrimitive.Root, { id: context.contentId, role: \"tooltip\", children: ariaLabel || children }) })\n ]\n }\n )\n }\n );\n }\n);\nTooltipContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"TooltipArrow\";\nvar TooltipArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTooltip, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeTooltip);\n const visuallyHiddenContentContext = useVisuallyHiddenContentContext(\n ARROW_NAME,\n __scopeTooltip\n );\n return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nTooltipArrow.displayName = ARROW_NAME;\nfunction getExitSideFromRect(point, rect) {\n const top = Math.abs(rect.top - point.y);\n const bottom = Math.abs(rect.bottom - point.y);\n const right = Math.abs(rect.right - point.x);\n const left = Math.abs(rect.left - point.x);\n switch (Math.min(top, bottom, right, left)) {\n case left:\n return \"left\";\n case right:\n return \"right\";\n case top:\n return \"top\";\n case bottom:\n return \"bottom\";\n default:\n throw new Error(\"unreachable\");\n }\n}\nfunction getPaddedExitPoints(exitPoint, exitSide, padding = 5) {\n const paddedExitPoints = [];\n switch (exitSide) {\n case \"top\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y + padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case \"bottom\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y - padding }\n );\n break;\n case \"left\":\n paddedExitPoints.push(\n { x: exitPoint.x + padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case \"right\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x - padding, y: exitPoint.y + padding }\n );\n break;\n }\n return paddedExitPoints;\n}\nfunction getPointsFromRect(rect) {\n const { top, right, bottom, left } = rect;\n return [\n { x: left, y: top },\n { x: right, y: top },\n { x: right, y: bottom },\n { x: left, y: bottom }\n ];\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i];\n const jj = polygon[j];\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction getHull(points) {\n const newPoints = points.slice();\n newPoints.sort((a, b) => {\n if (a.x < b.x) return -1;\n else if (a.x > b.x) return 1;\n else if (a.y < b.y) return -1;\n else if (a.y > b.y) return 1;\n else return 0;\n });\n return getHullPresorted(newPoints);\n}\nfunction getHullPresorted(points) {\n if (points.length <= 1) return points.slice();\n const upperHull = [];\n for (let i = 0; i < points.length; i++) {\n const p = points[i];\n while (upperHull.length >= 2) {\n const q = upperHull[upperHull.length - 1];\n const r = upperHull[upperHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop();\n else break;\n }\n upperHull.push(p);\n }\n upperHull.pop();\n const lowerHull = [];\n for (let i = points.length - 1; i >= 0; i--) {\n const p = points[i];\n while (lowerHull.length >= 2) {\n const q = lowerHull[lowerHull.length - 1];\n const r = lowerHull[lowerHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop();\n else break;\n }\n lowerHull.push(p);\n }\n lowerHull.pop();\n if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) {\n return upperHull;\n } else {\n return upperHull.concat(lowerHull);\n }\n}\nvar Provider = TooltipProvider;\nvar Root3 = Tooltip;\nvar Trigger = TooltipTrigger;\nvar Portal = TooltipPortal;\nvar Content2 = TooltipContent;\nvar Arrow2 = TooltipArrow;\nexport {\n Arrow2 as Arrow,\n Content2 as Content,\n Portal,\n Provider,\n Root3 as Root,\n Tooltip,\n TooltipArrow,\n TooltipContent,\n TooltipPortal,\n TooltipProvider,\n TooltipTrigger,\n Trigger,\n createTooltipScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Tooltip as TooltipPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n )\n}\n\nfunction Tooltip({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n \"z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","import { useMemo } from 'react'\nimport { useRelayStore, type RelayStore } from '@/store'\nimport { useClock, useNowBucket } from '@/store/clock'\nimport type {\n Agent, Message, PairSession, InboxThread, AttentionSummary, WorkQueueItem,\n ChatTimelineItem, CommandItem,\n} from '@/types'\nimport {\n STATUS_SORT_ORDER, CHAT_STATUS_SORT_ORDER,\n CLOSED_TASK_STATUSES, WAITING_TASK_STATUSES,\n} from '@/lib/constants'\nimport {\n agentType, isAgentStale, visibleAgents,\n displayName, displayTarget, messageBody,\n inboxPeer, isHumanInboundMessage, isClaimableTaskWaiting,\n isClaimableMessageWaiting, dashboardTargetMatchesAgent, toTimestamp,\n userFacingCapabilities, isReactionEventMessage, isSessionActivityStep,\n isBadgeWorthy, isUnreadHumanMessage, agentNeedsHumanResponse,\n} from '@/lib/display'\nimport { getBaseUrl } from '@/lib/api'\nimport { getKnownProviderIds } from '@/lib/provider-display'\n\nfunction useStore<T>(selector: (s: RelayStore) => T): T {\n return useRelayStore(selector)\n}\n\nexport function usePairsByAgentId(): Record<string, PairSession> {\n const pairs = useStore((s) => s.pairs)\n return useMemo(() => {\n const byAgent: Record<string, PairSession> = {}\n for (const pair of pairs) {\n if (pair.status === 'active' || pair.status === 'pending') {\n if (pair.requesterId) byAgent[pair.requesterId] = pair\n if (pair.targetId) byAgent[pair.targetId] = pair\n }\n }\n return byAgent\n }, [pairs])\n}\n\nexport function useAgentAttention(agent: Agent | null): { unread: number; needsHumanResponse: boolean; pendingPairInvite: boolean; claimableTasks: number; total: number; score: number } {\n const messages = useStore((s) => s.messages)\n const tasks = useStore((s) => s.tasks)\n const pairs = useStore((s) => s.pairs)\n const readCursors = useStore((s) => s.inboxReadCursors)\n const archivedThreads = useStore((s) => s.inboxArchivedThreads)\n\n return useMemo(() => {\n if (!agent) return { unread: 0, needsHumanResponse: false, pendingPairInvite: false, claimableTasks: 0, total: 0, score: 0 }\n\n const peerMessages = messages.filter((m) => inboxPeer(m) === agent.id && !isReactionEventMessage(m))\n const archivedAt = Number(archivedThreads[agent.id] || 0)\n const lastInboundId = peerMessages.filter((m) => isHumanInboundMessage(m) && isBadgeWorthy(m)).reduce((max, m) => Math.max(max, m.id), 0)\n const isArchived = archivedAt >= lastInboundId && archivedAt > 0\n\n const unread = isArchived ? 0 : peerMessages.filter((m) => isUnreadHumanMessage(readCursors, agent.id, m)).length\n const needsHumanResponse = agentNeedsHumanResponse(agent)\n const pair = pairs.find((p) => (p.status === 'active' || p.status === 'pending') && (p.requesterId === agent.id || p.targetId === agent.id))\n const pendingPairInvite = pair?.status === 'pending'\n\n const taskCount = tasks.filter((t) => isClaimableTaskWaiting(t) && dashboardTargetMatchesAgent(t.target, agent)).length\n const msgCount = messages.filter((m) => isClaimableMessageWaiting(m) && dashboardTargetMatchesAgent(m.to, agent)).length\n const claimableTasks = taskCount + msgCount\n\n const total = unread + (needsHumanResponse ? 1 : 0) + (pendingPairInvite ? 1 : 0) + claimableTasks\n const score = unread * 10 + (needsHumanResponse ? 8 : 0) + (pendingPairInvite ? 4 : 0) + claimableTasks * 2\n\n return { unread, needsHumanResponse, pendingPairInvite, claimableTasks, total, score }\n }, [agent, messages, tasks, pairs, readCursors, archivedThreads])\n}\n\nexport function useSortedAgents(): Agent[] {\n const agents = useStore((s) => s.agents)\n const showBuiltIns = useStore((s) => s.showBuiltIns)\n const showOffline = useStore((s) => s.showOffline)\n const agentSort = useStore((s) => s.agentSort)\n const agentSortDir = useStore((s) => s.agentSortDir)\n const agentPresetFilter = useStore((s) => s.agentPresetFilter)\n const agentStatusFilter = useStore((s) => s.agentStatusFilter)\n const agentTagFilter = useStore((s) => s.agentTagFilter)\n const agentHostFilter = useStore((s) => s.agentHostFilter)\n const managedPolicies = useStore((s) => s.managedPolicies)\n const pairs = useStore((s) => s.pairs)\n // Coarse 30s tick: staleness-aware sorting must react to time passing, but\n // re-sorting the whole list every second (the old `s.now` dep) was wasteful.\n const nowBucket = useNowBucket()\n\n return useMemo(() => {\n let list = visibleAgents(agents, showBuiltIns, managedPolicies)\n\n if (agentPresetFilter) {\n const pairsByAgent = buildPairsMap(pairs)\n list = applyPreset(list, agentPresetFilter, useClock.getState().now, pairsByAgent)\n }\n\n if (!showOffline) list = list.filter((a) => a.status !== 'offline')\n if (agentStatusFilter === 'starting') list = list.filter((a) => a.status !== 'offline' && !a.ready)\n else if (agentStatusFilter) list = list.filter((a) => a.status === agentStatusFilter)\n if (agentTagFilter) list = list.filter((a) => (a.tags || []).includes(agentTagFilter))\n if (agentHostFilter) list = list.filter((a) => (a.machine || '') === agentHostFilter)\n\n const dir = agentSortDir === 'desc' ? -1 : 1\n return [...list].sort((a, b) => {\n if (agentSort === 'name') return displayName(a).localeCompare(displayName(b)) * dir\n if (agentSort === 'lastSeen') return (new Date(b.lastSeen as string).getTime() - new Date(a.lastSeen as string).getTime()) * dir || displayName(a).localeCompare(displayName(b))\n if (agentSort === 'created') return (new Date(b.createdAt as string).getTime() - new Date(a.createdAt as string).getTime()) * dir || displayName(a).localeCompare(displayName(b))\n const s = ((STATUS_SORT_ORDER[a.status] ?? 9) - (STATUS_SORT_ORDER[b.status] ?? 9)) * dir\n return s || displayName(a).localeCompare(displayName(b))\n })\n }, [agents, showBuiltIns, showOffline, managedPolicies, agentSort, agentSortDir, agentPresetFilter, agentStatusFilter, agentTagFilter, agentHostFilter, pairs, nowBucket])\n}\n\nfunction buildPairsMap(pairs: PairSession[]): Record<string, PairSession> {\n const m: Record<string, PairSession> = {}\n for (const p of pairs) {\n if (p.status === 'active' || p.status === 'pending') {\n if (p.requesterId) m[p.requesterId] = p\n if (p.targetId) m[p.targetId] = p\n }\n }\n return m\n}\n\nfunction applyPreset(list: Agent[], preset: string, now: number, pairsMap: Record<string, PairSession>): Agent[] {\n switch (preset) {\n case 'active': return list.filter((a) => a.status !== 'offline')\n case 'offline_stale': return list.filter((a) => a.status === 'offline' || isAgentStale(now, a))\n case 'paired': return list.filter((a) => Boolean(pairsMap[a.id]))\n case 'unpaired': return list.filter((a) => !pairsMap[a.id])\n default:\n if (getKnownProviderIds().includes(preset)) return list.filter((a) => agentType(a) === preset)\n return list\n }\n}\n\nexport function useAllInboxThreads(): InboxThread[] {\n const messages = useStore((s) => s.messages)\n const readCursors = useStore((s) => s.inboxReadCursors)\n const archivedThreads = useStore((s) => s.inboxArchivedThreads)\n const drafts = useStore((s) => s.inboxDrafts)\n const agentsById = useStore((s) => s.agentsById)\n const coordinatorMutes = useStore((s) => s.coordinatorMutes)\n\n return useMemo(() => {\n const threads = new Map<string, InboxThread>()\n for (const msg of messages) {\n if (isReactionEventMessage(msg)) continue\n const peer = inboxPeer(msg)\n if (!peer) continue\n if (!threads.has(peer)) threads.set(peer, { id: peer, peer, messages: [], lastMessage: null, previewMessage: null, attention: { unread: 0, needsHumanResponse: false, score: 0 }, archived: false, draft: '' })\n threads.get(peer)!.messages.push(msg)\n }\n for (const thread of threads.values()) {\n thread.messages.sort((a, b) => a.id - b.id)\n thread.lastMessage = thread.messages[thread.messages.length - 1] || null\n let preview: Message | null = null\n for (let i = thread.messages.length - 1; i >= 0; i--) {\n const m = thread.messages[i]\n if (m && !isSessionActivityStep(m)) { preview = m; break }\n }\n thread.previewMessage = preview || thread.lastMessage\n\n // Muted agents: zero out unread so they never drive a badge even if there are messages.\n const muted = coordinatorMutes.includes(thread.peer)\n const unread = muted ? 0 : thread.messages.filter((m) => isUnreadHumanMessage(readCursors, thread.peer, m)).length\n const needsHumanResponse = muted ? false : agentNeedsHumanResponse(agentsById[thread.peer])\n thread.attention = { unread, needsHumanResponse, score: unread * 10 + (needsHumanResponse ? 8 : 0) }\n\n const archivedAt = Number(archivedThreads[thread.peer] || 0)\n thread.archived = Boolean(thread.lastMessage?.id && archivedAt >= thread.lastMessage.id)\n thread.draft = drafts[thread.peer] || ''\n }\n return [...threads.values()].sort((a, b) => {\n const scoreDelta = (b.attention.score || 0) - (a.attention.score || 0)\n if (scoreDelta !== 0) return scoreDelta\n return (b.lastMessage?.id || 0) - (a.lastMessage?.id || 0)\n })\n }, [messages, readCursors, archivedThreads, drafts, agentsById, coordinatorMutes])\n}\n\nexport function useAttentionSummary(): AttentionSummary {\n const threads = useAllInboxThreads()\n const agents = useStore((s) => s.agents)\n const showBuiltIns = useStore((s) => s.showBuiltIns)\n const showOffline = useStore((s) => s.showOffline)\n const managedPolicies = useStore((s) => s.managedPolicies)\n const pairs = useStore((s) => s.pairs)\n const tasks = useStore((s) => s.tasks)\n const messages = useStore((s) => s.messages)\n\n const visibleInboxPeers = useMemo(() => new Set(\n visibleAgents(agents, showBuiltIns, managedPolicies)\n .filter((agent) => showOffline || agent.status !== 'offline')\n .map((agent) => agent.id)\n ), [agents, showBuiltIns, showOffline, managedPolicies])\n\n return useMemo(() => {\n const active = threads.filter((t) => !t.archived && visibleInboxPeers.has(t.peer))\n const unreadInbox = active.reduce((sum, t) => sum + (t.attention.unread || 0), 0)\n const needsHumanResponse = visibleAgents(agents, showBuiltIns, managedPolicies)\n .filter((agent) => (showOffline || agent.status !== 'offline') && agentNeedsHumanResponse(agent))\n .length\n const pendingPairInvites = pairs.filter((p) => p.status === 'pending').length\n const taskCount = tasks.filter(isClaimableTaskWaiting).length\n const msgCount = messages.filter(isClaimableMessageWaiting).length\n const claimableTasks = taskCount + msgCount\n return {\n unreadInbox,\n needsHumanResponse,\n pendingPairInvites,\n claimableTasks,\n total: unreadInbox + needsHumanResponse + pendingPairInvites + claimableTasks,\n }\n }, [threads, visibleInboxPeers, agents, showBuiltIns, showOffline, managedPolicies, pairs, tasks, messages])\n}\n\nexport function useOnlineCount(): number {\n const agents = useStore((s) => s.agents)\n const showBuiltIns = useStore((s) => s.showBuiltIns)\n const managedPolicies = useStore((s) => s.managedPolicies)\n return useMemo(() => visibleAgents(agents, showBuiltIns, managedPolicies).filter((a) => a.status !== 'offline').length, [agents, showBuiltIns, managedPolicies])\n}\n\nexport function useBusyCount(): number {\n const agents = useStore((s) => s.agents)\n return useMemo(() => agents.filter((a) => a.status === 'busy').length, [agents])\n}\n\nexport function useComposeAgents(): Agent[] {\n const agents = useStore((s) => s.agents)\n const showBuiltIns = useStore((s) => s.showBuiltIns)\n const showOffline = useStore((s) => s.showOffline)\n const managedPolicies = useStore((s) => s.managedPolicies)\n return useMemo(() => {\n const list = visibleAgents(agents, showBuiltIns, managedPolicies)\n return showOffline ? list : list.filter((a) => a.status !== 'offline')\n }, [agents, showBuiltIns, showOffline, managedPolicies])\n}\n\nexport function useUniqueHosts(): string[] {\n const agents = useStore((s) => s.agents)\n const showBuiltIns = useStore((s) => s.showBuiltIns)\n const managedPolicies = useStore((s) => s.managedPolicies)\n return useMemo(() => [...new Set(visibleAgents(agents, showBuiltIns, managedPolicies).map((a) => a.machine).filter(Boolean) as string[])].sort(), [agents, showBuiltIns, managedPolicies])\n}\n\nexport function useUniqueTags(): string[] {\n const agents = useStore((s) => s.agents)\n const showBuiltIns = useStore((s) => s.showBuiltIns)\n const managedPolicies = useStore((s) => s.managedPolicies)\n return useMemo(() => [...new Set(visibleAgents(agents, showBuiltIns, managedPolicies).flatMap((a) => a.tags || []))], [agents, showBuiltIns, managedPolicies])\n}\n\nfunction useUniqueCaps(): string[] {\n const agents = useStore((s) => s.agents)\n const showBuiltIns = useStore((s) => s.showBuiltIns)\n const managedPolicies = useStore((s) => s.managedPolicies)\n return useMemo(() => [...new Set(visibleAgents(agents, showBuiltIns, managedPolicies).flatMap((a) => userFacingCapabilities(a.capabilities || [])))], [agents, showBuiltIns, managedPolicies])\n}\n\nexport function useWorkQueueItems(): WorkQueueItem[] {\n const tasks = useStore((s) => s.tasks)\n const messages = useStore((s) => s.messages)\n\n return useMemo(() => {\n const taskItems: WorkQueueItem[] = tasks\n // #834 — the work queue is the claim lane only; durable deliverable Tasks never pollute it.\n .filter((t) => (t.kind ?? 'claim') === 'claim')\n .filter((t) => !CLOSED_TASK_STATUSES.has(t.status))\n .map((t) => ({\n id: 'task-' + t.id, sourceType: 'task', title: t.title, body: t.body,\n severity: t.severity || 'info', status: t.status, owner: t.claimedBy || '',\n target: t.target, source: t.source, channel: t.channel || '',\n updatedAt: t.updatedAt || t.createdAt, createdAt: t.createdAt,\n claimable: isClaimableTaskWaiting(t), task: t,\n }))\n\n const msgItems: WorkQueueItem[] = messages\n .filter(isClaimableMessageWaiting)\n .map((m) => ({\n id: 'message-' + m.id, sourceType: 'message', title: m.subject || 'Claimable message #' + m.id,\n body: messageBody(m), severity: 'warning', status: m.claimedBy ? 'claimed' : 'open',\n owner: m.claimedBy || '', target: m.to, source: 'message', channel: m.channel || '',\n updatedAt: m.claimedAt || m.createdAt, createdAt: m.createdAt,\n claimable: isClaimableMessageWaiting(m), message: m,\n }))\n\n return [...taskItems, ...msgItems].sort((a, b) => {\n const cd = Number(b.claimable) - Number(a.claimable)\n if (cd !== 0) return cd\n const so: Record<string, number> = { critical: 0, warning: 1, info: 2 }\n const sd = (so[a.severity] ?? 9) - (so[b.severity] ?? 9)\n if (sd !== 0) return sd\n return toTimestamp(a.updatedAt) - toTimestamp(b.updatedAt)\n })\n }, [tasks, messages])\n}\n\nexport function useCommandPaletteItems(): CommandItem[] {\n const query = useStore((s) => s.commandQuery)\n const agents = useStore((s) => s.agents)\n const agentsById = useStore((s) => s.agentsById)\n const showBuiltIns = useStore((s) => s.showBuiltIns)\n const showOffline = useStore((s) => s.showOffline)\n const managedPolicies = useStore((s) => s.managedPolicies)\n\n return useMemo(() => {\n const composeList = visibleAgents(agents, showBuiltIns, managedPolicies).filter((a) => showOffline || a.status !== 'offline')\n const tags = [...new Set(composeList.flatMap((a) => a.tags || []))]\n const base = getBaseUrl()\n\n const commands: CommandItem[] = [\n ci('open-chat', 'Open chat', 'Human console', 'MessageCircle', 'openView', { view: 'chat' }),\n ci('open-work', 'Open work queue', 'Claimable messages and tasks', 'ListChecks', 'openView', { view: 'work' }),\n ci('open-workspaces', 'Open workspaces', 'Agent worktrees and merge state', 'GitBranch', 'openView', { view: 'workspaces' }),\n ci('show-stale', 'Show stale agents', 'Filter agents to offline or stale', 'Filter', 'agentPreset', { preset: 'offline_stale' }),\n ci('copy-url', 'Copy relay URL', base, 'Copy', 'copy', { value: base }),\n ci('export-md', 'Export timeline as Markdown', 'Activity audit trace', 'FileDown', 'exportActivity', { format: 'markdown' }),\n ci('export-json', 'Export timeline as JSON', 'Activity audit trace', 'Braces', 'exportActivity', { format: 'json' }),\n ...composeList.slice(0, 12).map((a) =>\n ci('msg-' + a.id, 'Message agent: ' + displayName(a), a.id, 'Send', 'messageAgent', { agentId: a.id })\n ),\n ...composeList.filter((a) => a.providerCapabilities?.liveSession?.inject === true).slice(0, 8).map((a) =>\n ci('pair-' + a.id, 'Pair: ' + displayName(a), a.id, 'Link', 'pairAgent', { agentId: a.id })\n ),\n ...tags.map((t) => ci('tag-' + t, 'Filter tag: ' + t, '#' + t, 'Tag', 'filterTag', { tag: t })),\n ]\n\n const q = query.trim().toLowerCase()\n const filtered = q ? commands.filter((c) => c.search.includes(q)) : commands\n return filtered.slice(0, 24)\n }, [query, agents, agentsById, showBuiltIns, showOffline, managedPolicies])\n}\n\nfunction ci(id: string, title: string, subtitle: string, icon: string, action: string, payload: Record<string, unknown>): CommandItem {\n return { id, title, subtitle, icon, action, payload, search: `${title}\\n${subtitle}\\n${action}`.toLowerCase() }\n}\n","import * as React from \"react\"\nimport { Switch as SwitchPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Switch({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n \"peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className=\"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground\"\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Separator as SeparatorPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n","import * as React from \"react\"\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\nimport { CheckIcon, ChevronRightIcon } from \"lucide-react\"\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n )\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuContent({\n className,\n align = \"start\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n align={align}\n className={cn(\"z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n data-slot=\"dropdown-menu-checkbox-item-indicator\"\n >\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon\n />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n data-inset={inset}\n className={cn(\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n data-slot=\"dropdown-menu-radio-item-indicator\"\n >\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon\n />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\"z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n","import { useEffect } from 'react'\nimport { cn } from '@/lib/utils'\nimport { useRelayStore } from '@/store'\nimport { useAttentionSummary, useOnlineCount } from '@/hooks/use-selectors'\nimport { NAV_ITEMS } from '@/lib/constants'\nimport { THEMES } from '@/lib/themes'\nimport { Switch } from '@/components/ui/switch'\nimport { Badge } from '@/components/ui/badge'\nimport { Separator } from '@/components/ui/separator'\nimport {\n DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel,\n DropdownMenuSeparator, DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu'\nimport {\n LayoutDashboard, MessageCircle, Bot, Server, MessagesSquare, Plug, PlugZap,\n Activity, Link, Mail, ListChecks, ClipboardList, CalendarClock, AreaChart, Command, Radio, Settings, Workflow, X, BrainCircuit, FolderTree, Shield, Wrench, UserCog,\n Bell, BellRing, CheckCheck, Trash2, Palette, Check, Lightbulb, Users, Boxes, PackagePlus, FileText,\n} from 'lucide-react'\nimport type { RelayNotification, ThemeId, ViewName } from '@/types'\n\nconst iconMap: Record<string, typeof LayoutDashboard> = {\n LayoutDashboard, MessageCircle, Bot, Server, MessagesSquare, Plug, PlugZap,\n Activity, Link, Mail, ListChecks, ClipboardList, CalendarClock, AreaChart, Settings, Workflow, BrainCircuit, FolderTree, Shield, Wrench, UserCog, Lightbulb, Users, Boxes, PackagePlus, FileText,\n}\n\nfunction notificationTime(notification: RelayNotification): string {\n return new Date(notification.createdAt).toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit' })\n}\n\nconst notificationCategories = [\n ['messages', 'Messages'],\n ['replies', 'Replies'],\n ['errors', 'Errors'],\n] as const\n\nfunction NotificationBell() {\n const notifications = useRelayStore((s) => s.notifications)\n const unread = useRelayStore((s) => s.notificationUnread)\n const settings = useRelayStore((s) => s.notificationSettings)\n const permission = useRelayStore((s) => s.notificationPermission)\n const set = useRelayStore((s) => s.set)\n const openNotification = useRelayStore((s) => s.openNotification)\n const markNotificationsRead = useRelayStore((s) => s.markNotificationsRead)\n const clearNotifications = useRelayStore((s) => s.clearNotifications)\n const requestBrowserNotifications = useRelayStore((s) => s.requestBrowserNotifications)\n\n const Icon = unread > 0 ? BellRing : Bell\n\n function updateSettings(patch: Partial<typeof settings>) {\n set({ notificationSettings: { ...settings, ...patch } })\n }\n\n return (\n <DropdownMenu onOpenChange={(open) => { if (open) markNotificationsRead() }}>\n <DropdownMenuTrigger asChild>\n <button className=\"relative flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors w-full\">\n <Icon className=\"w-3.5 h-3.5\" />\n <span>Notifications</span>\n {unread > 0 && (\n <Badge variant=\"destructive\" className=\"ml-auto text-[10px] px-1.5 py-0\">{unread}</Badge>\n )}\n </button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\" side=\"right\" className=\"w-80 p-2\">\n <div className=\"flex items-center justify-between gap-2 px-1.5 py-1\">\n <DropdownMenuLabel className=\"p-0\">Notifications</DropdownMenuLabel>\n <div className=\"flex items-center gap-1\">\n <button type=\"button\" title=\"Mark read\" onClick={markNotificationsRead} className=\"rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground\">\n <CheckCheck className=\"h-3.5 w-3.5\" />\n </button>\n <button type=\"button\" title=\"Clear\" onClick={clearNotifications} className=\"rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground\">\n <Trash2 className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n </div>\n\n <div className=\"px-1.5 py-1.5 space-y-2\">\n <label className=\"flex items-center justify-between gap-3 text-xs\">\n <span className=\"text-muted-foreground\">In-app notifications</span>\n <Switch size=\"sm\" checked={settings.enabled} onCheckedChange={(v) => updateSettings({ enabled: v })} />\n </label>\n <label className=\"flex items-center justify-between gap-3 text-xs\">\n <span className=\"text-muted-foreground\">Browser notifications</span>\n <Switch\n size=\"sm\"\n checked={settings.browserEnabled && permission === 'granted'}\n disabled={permission === 'unsupported'}\n onCheckedChange={(v) => {\n if (v && permission !== 'granted') void requestBrowserNotifications()\n else updateSettings({ browserEnabled: v })\n }}\n />\n </label>\n <div className=\"grid grid-cols-3 gap-1\">\n {notificationCategories.map(([key, label]) => (\n <button\n key={key}\n type=\"button\"\n onClick={() => updateSettings({ [key]: !settings[key] })}\n className={cn(\n 'rounded border px-2 py-1 text-[11px] transition-colors',\n settings[key] ? 'border-primary/40 bg-primary/10 text-primary' : 'border-border text-muted-foreground hover:bg-accent'\n )}\n >\n {label}\n </button>\n ))}\n </div>\n </div>\n\n <DropdownMenuSeparator />\n\n <div className=\"max-h-80 overflow-y-auto\">\n {notifications.length === 0 ? (\n <div className=\"px-1.5 py-8 text-center text-xs text-muted-foreground\">No notifications</div>\n ) : notifications.slice(0, 20).map((notification) => (\n <DropdownMenuItem\n key={notification.id}\n onSelect={(e) => {\n e.preventDefault()\n void openNotification(notification)\n }}\n className=\"flex flex-col items-start gap-0.5 px-2 py-2\"\n >\n <div className=\"flex w-full items-center gap-2\">\n <span className={cn(\n 'h-1.5 w-1.5 rounded-full',\n notification.severity === 'error' ? 'bg-red-400' : notification.severity === 'warning' ? 'bg-yellow-400' : 'bg-blue-400'\n )} />\n <span className=\"min-w-0 flex-1 truncate text-xs font-medium\">{notification.title}</span>\n <span className=\"text-[10px] text-muted-foreground\">{notificationTime(notification)}</span>\n </div>\n <span className=\"line-clamp-2 text-xs text-muted-foreground\">{notification.body}</span>\n {notification.routing?.reason && (\n <span className=\"line-clamp-1 text-[10px] text-muted-foreground/80\">\n routed because {notification.routing.reason}\n </span>\n )}\n </DropdownMenuItem>\n ))}\n </div>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n\nfunction ThemePicker() {\n const theme = useRelayStore((s) => s.theme)\n const set = useRelayStore((s) => s.set)\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <button className=\"flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors w-full\">\n <Palette className=\"w-3.5 h-3.5\" />\n <span>Theme</span>\n <span className=\"ml-auto text-[10px] text-muted-foreground\">{THEMES.find((t) => t.id === theme)?.label}</span>\n </button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\" side=\"right\" className=\"w-40\">\n {THEMES.map((t) => (\n <DropdownMenuItem key={t.id} onSelect={() => set({ theme: t.id as ThemeId })}>\n <span className=\"flex-1\">{t.label}</span>\n {theme === t.id && <Check className=\"w-3.5 h-3.5 text-primary\" />}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n\nfunction SidebarContent() {\n const view = useRelayStore((s) => s.view)\n const switchView = useRelayStore((s) => s.switchView)\n const connected = useRelayStore((s) => s.connected)\n const showOffline = useRelayStore((s) => s.showOffline)\n const showBuiltIns = useRelayStore((s) => s.showBuiltIns)\n const autoRefresh = useRelayStore((s) => s.autoRefresh)\n const stats = useRelayStore((s) => s.stats)\n const openCommandPalette = useRelayStore((s) => s.openCommandPalette)\n const set = useRelayStore((s) => s.set)\n const startAutoRefresh = useRelayStore((s) => s.startAutoRefresh)\n const stopAutoRefresh = useRelayStore((s) => s.stopAutoRefresh)\n\n const attention = useAttentionSummary()\n const onlineCount = useOnlineCount()\n\n function navBadge(key: ViewName) {\n if (key === 'overview' && attention.total > 0) return <Badge variant=\"destructive\" className=\"ml-auto text-[10px] px-1.5 py-0\">{attention.total}</Badge>\n if (key === 'chat' && attention.unreadInbox > 0) return <Badge variant=\"destructive\" className=\"ml-auto text-[10px] px-1.5 py-0\">{attention.unreadInbox}</Badge>\n if (key === 'agents') return <Badge variant=\"secondary\" className=\"ml-auto text-[10px] px-1.5 py-0\">{onlineCount}</Badge>\n if (key === 'pairs' && attention.pendingPairInvites > 0) return <Badge className=\"ml-auto text-[10px] px-1.5 py-0 bg-yellow-500/20 text-yellow-400\">{attention.pendingPairInvites}</Badge>\n if (key === 'work' && attention.claimableTasks > 0) return <Badge className=\"ml-auto text-[10px] px-1.5 py-0 bg-yellow-500/20 text-yellow-400\">{attention.claimableTasks}</Badge>\n return null\n }\n\n return (\n <>\n <nav className=\"flex-1 overflow-y-auto py-2 px-2\">\n {NAV_ITEMS.map((item) => {\n const Icon = iconMap[item.icon] || Bot\n return (\n <button\n key={item.key}\n onClick={() => switchView(item.key)}\n className={cn(\n 'w-full flex items-center gap-2 px-3 py-2 rounded-md text-sm transition-colors my-0.5',\n view === item.key\n ? 'bg-primary text-primary-foreground'\n : 'text-foreground hover:bg-accent'\n )}\n >\n <Icon className=\"w-4 h-4 shrink-0\" />\n {item.label}\n {navBadge(item.key)}\n </button>\n )\n })}\n </nav>\n\n <div className=\"mt-auto border-t border-border p-4 space-y-3 text-xs\">\n <div className=\"flex items-center gap-2\">\n <span className={cn('w-2 h-2 rounded-full', connected ? 'bg-emerald-500' : 'bg-red-500 animate-pulse')} />\n <span className=\"text-muted-foreground\">{connected ? 'Live' : 'Reconnecting...'}</span>\n </div>\n\n <button onClick={openCommandPalette} className=\"flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors w-full\">\n <Command className=\"w-3.5 h-3.5\" />\n <span>Command palette</span>\n <kbd className=\"ml-auto text-[10px] bg-muted px-1.5 py-0.5 rounded\">⌘K</kbd>\n </button>\n\n <NotificationBell />\n <ThemePicker />\n\n <Separator />\n\n <label className=\"flex items-center justify-between cursor-pointer\">\n <span className=\"text-muted-foreground\">Show offline</span>\n <Switch checked={showOffline} onCheckedChange={(v) => set({ showOffline: v })} />\n </label>\n <label className=\"flex items-center justify-between cursor-pointer\">\n <span className=\"text-muted-foreground\">System agents</span>\n <Switch checked={showBuiltIns} onCheckedChange={(v) => set({ showBuiltIns: v })} />\n </label>\n <label className=\"flex items-center justify-between cursor-pointer\">\n <span className=\"text-muted-foreground\">Auto refresh</span>\n <Switch checked={autoRefresh} onCheckedChange={(v) => { set({ autoRefresh: v }); if (v) startAutoRefresh(); else stopAutoRefresh() }} />\n </label>\n\n {stats.version && <div className=\"text-muted-foreground pt-1\">v{stats.version}</div>}\n </div>\n </>\n )\n}\n\nexport function Sidebar() {\n return (\n <aside className=\"hidden xl:flex w-[250px] min-w-[250px] h-[calc(100dvh-var(--sat))] sticky top-[var(--sat)] flex-col border-r border-border bg-card\">\n <div className=\"px-5 py-4 font-bold text-base border-b border-border flex items-center gap-2\">\n <Radio className=\"w-4 h-4 text-primary\" />\n Agent Relay\n </div>\n <SidebarContent />\n </aside>\n )\n}\n\nexport function MobileDrawer() {\n const open = useRelayStore((s) => s.mobileMenuOpen)\n const set = useRelayStore((s) => s.set)\n\n useEffect(() => {\n if (!open) return\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') set({ mobileMenuOpen: false })\n }\n window.addEventListener('keydown', onKey)\n return () => window.removeEventListener('keydown', onKey)\n }, [open])\n\n return (\n <>\n {/* Backdrop */}\n <div\n className={cn(\n 'xl:hidden fixed inset-0 z-40 bg-black/50 transition-opacity duration-200',\n open ? 'opacity-100' : 'opacity-0 pointer-events-none'\n )}\n onClick={() => set({ mobileMenuOpen: false })}\n />\n\n {/* Drawer */}\n <aside\n inert={!open}\n className={cn(\n 'xl:hidden fixed inset-y-0 left-0 z-50 w-[280px] flex flex-col pt-[var(--sat)] bg-card border-r border-border transition-transform duration-200 ease-out',\n open ? 'translate-x-0' : '-translate-x-full'\n )}\n >\n <div className=\"px-5 py-4 font-bold text-base border-b border-border flex items-center gap-2\">\n <Radio className=\"w-4 h-4 text-primary\" />\n Agent Relay\n <button\n onClick={() => set({ mobileMenuOpen: false })}\n className=\"ml-auto p-1 text-muted-foreground hover:text-foreground transition-colors\"\n aria-label=\"Close menu\"\n >\n <X className=\"w-4 h-4\" />\n </button>\n </div>\n <SidebarContent />\n </aside>\n </>\n )\n}\n","import { memo, useEffect, useMemo, useState } from 'react'\nimport { Loader2 } from 'lucide-react'\nimport { useRelayStore } from '@/store'\nimport { THEMES } from '@/lib/themes'\nimport { CopyButton } from '@/components/shared/copy-button'\n\nconst MAX_HIGHLIGHT_BYTES = 500 * 1024\n\nconst EXTENSION_LANGUAGES: Record<string, string> = {\n bash: 'bash',\n c: 'c',\n conf: 'properties',\n cpp: 'cpp',\n cs: 'csharp',\n css: 'css',\n csv: 'csv',\n cts: 'typescript',\n diff: 'diff',\n dockerfile: 'dockerfile',\n env: 'dotenv',\n gemspec: 'ruby',\n go: 'go',\n graphql: 'graphql',\n h: 'c',\n hcl: 'hcl',\n hpp: 'cpp',\n html: 'html',\n ini: 'ini',\n java: 'java',\n js: 'javascript',\n json: 'json',\n jsonc: 'jsonc',\n jsx: 'jsx',\n kt: 'kotlin',\n less: 'less',\n log: 'log',\n lua: 'lua',\n mjs: 'javascript',\n mts: 'typescript',\n patch: 'diff',\n php: 'php',\n plist: 'xml',\n podspec: 'ruby',\n properties: 'properties',\n py: 'python',\n rake: 'ruby',\n rb: 'ruby',\n rs: 'rust',\n scss: 'scss',\n sh: 'bash',\n sql: 'sql',\n svelte: 'svelte',\n swift: 'swift',\n toml: 'toml',\n ts: 'typescript',\n tsx: 'tsx',\n txt: 'text',\n vue: 'vue',\n webmanifest: 'json',\n xml: 'xml',\n yaml: 'yaml',\n yml: 'yaml',\n zsh: 'bash',\n}\n\nconst BASENAME_LANGUAGES: Record<string, string> = {\n '.bashrc': 'bash',\n '.env': 'dotenv',\n '.eslintrc': 'json',\n '.gitignore': 'gitignore',\n '.npmrc': 'properties',\n '.prettierrc': 'json',\n '.swiftformat': 'properties',\n '.swiftlint.yml': 'yaml',\n '.watchmanconfig': 'json',\n 'app.config': 'json',\n 'app.webmanifest': 'json',\n 'berksfile': 'ruby',\n 'brewfile': 'ruby',\n 'bun.lock': 'json',\n 'capfile': 'ruby',\n 'cartfile': 'ruby',\n 'composer.lock': 'json',\n 'dangerfile': 'ruby',\n 'deno.lock': 'json',\n 'fastfile': 'ruby',\n 'flake.lock': 'json',\n 'gemfile': 'ruby',\n 'guardfile': 'ruby',\n 'podfile': 'ruby',\n 'rakefile': 'ruby',\n dockerfile: 'dockerfile',\n makefile: 'make',\n}\n\ntype ShikiModule = typeof import('shiki/bundle/web')\n\nlet shikiPromise: Promise<ShikiModule> | null = null\n\nfunction getShiki() {\n shikiPromise ??= import('shiki/bundle/web')\n return shikiPromise\n}\n\nfunction byteLength(value: string): number {\n return new TextEncoder().encode(value).length\n}\n\nfunction basename(path: string): string {\n return path.split('/').filter(Boolean).pop() || path\n}\n\nfunction detectShebangLanguage(content?: string): string | null {\n const firstLine = content?.slice(0, 240).split(/\\r?\\n/, 1)[0]?.toLowerCase() || ''\n if (!firstLine.startsWith('#!')) return null\n if (/\\b(bash|dash|ksh|sh|zsh)\\b/.test(firstLine)) return 'bash'\n if (/\\bfish\\b/.test(firstLine)) return 'fish'\n if (/\\b(ts-node|tsx)\\b/.test(firstLine)) return 'typescript'\n if (/\\b(node|bun|deno)\\b/.test(firstLine)) return 'javascript'\n if (/\\bpython[0-9.]*\\b/.test(firstLine)) return 'python'\n if (/\\bruby\\b/.test(firstLine)) return 'ruby'\n if (/\\bswift\\b/.test(firstLine)) return 'swift'\n if (/\\bperl\\b/.test(firstLine)) return 'perl'\n if (/\\bphp\\b/.test(firstLine)) return 'php'\n return null\n}\n\nfunction detectCodeLanguage(path: string, mediaType?: string, languageHint?: string, content?: string): string | null {\n if (languageHint) return languageHint\n const name = basename(path).toLowerCase()\n if (BASENAME_LANGUAGES[name]) return BASENAME_LANGUAGES[name]\n if (name.endsWith('.d.ts')) return 'typescript'\n\n const shebangLanguage = detectShebangLanguage(content)\n if (shebangLanguage) return shebangLanguage\n\n const ext = name.includes('.') ? name.slice(name.lastIndexOf('.') + 1) : ''\n if (ext && EXTENSION_LANGUAGES[ext]) return EXTENSION_LANGUAGES[ext]\n\n if (mediaType?.includes('json')) return 'json'\n if (mediaType?.includes('javascript')) return 'javascript'\n if (mediaType?.includes('typescript')) return 'typescript'\n if (mediaType?.includes('xml')) return 'xml'\n if (mediaType?.includes('yaml') || mediaType?.includes('yml')) return 'yaml'\n if (mediaType?.includes('shellscript')) return 'bash'\n\n return null\n}\n\nexport function canHighlightCode(path: string, mediaType?: string, languageHint?: string, content?: string): boolean {\n const language = detectCodeLanguage(path, mediaType, languageHint, content)\n return Boolean(language && language !== 'text' && language !== 'log')\n}\n\nexport const CodePreview = memo(function CodePreview({\n content,\n path,\n mediaType,\n languageHint,\n compact = false,\n}: {\n content: string\n path: string\n mediaType?: string\n languageHint?: string\n compact?: boolean\n}) {\n const theme = useRelayStore((s) => s.theme)\n const isDark = THEMES.find((t) => t.id === theme)?.dark ?? true\n const language = useMemo(() => detectCodeLanguage(path, mediaType, languageHint, content) || 'text', [content, languageHint, mediaType, path])\n const tooLarge = byteLength(content) > MAX_HIGHLIGHT_BYTES\n const [html, setHtml] = useState('')\n const [loading, setLoading] = useState(false)\n const [failed, setFailed] = useState(false)\n\n function copyButton() {\n return (\n <CopyButton\n value={content}\n label=\"Copy code\"\n copiedLabel=\"Copied code\"\n size=\"icon\"\n variant=\"ghost\"\n className=\"absolute right-2 top-2 h-7 w-7 bg-background/80 opacity-0 shadow-sm backdrop-blur transition-opacity hover:bg-muted group-hover/code:opacity-100 focus-visible:opacity-100\"\n />\n )\n }\n\n useEffect(() => {\n if (tooLarge || language === 'text' || language === 'log') {\n setHtml('')\n setLoading(false)\n setFailed(false)\n return\n }\n\n let cancelled = false\n setLoading(true)\n setFailed(false)\n getShiki()\n .then(({ codeToHtml }) => codeToHtml(content, {\n lang: language,\n theme: isDark ? 'github-dark-default' : 'github-light-default',\n } as Parameters<typeof codeToHtml>[1]))\n .then((result) => {\n if (!cancelled) setHtml(result)\n })\n .catch(() => {\n if (!cancelled) {\n setHtml('')\n setFailed(true)\n }\n })\n .finally(() => {\n if (!cancelled) setLoading(false)\n })\n\n return () => { cancelled = true }\n }, [content, isDark, language, tooLarge])\n\n if (loading) {\n return (\n <div className=\"flex items-center gap-2 p-4 text-sm text-muted-foreground\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n Highlighting\n </div>\n )\n }\n\n if (tooLarge || failed || !html) {\n return (\n <div className=\"group/code relative\">\n {copyButton()}\n <pre className={`overflow-auto whitespace-pre-wrap break-words font-mono text-xs leading-5 ${compact ? 'p-3' : 'p-4'}`}>\n {content || ' '}\n </pre>\n </div>\n )\n }\n\n return (\n <div className=\"group/code relative\">\n {copyButton()}\n <div\n className={`code-preview overflow-auto font-mono text-xs leading-5 ${compact ? 'p-3' : 'p-4'}`}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n </div>\n )\n})\n","import { lazy, Suspense } from 'react'\nimport type { MarkdownPreviewProps } from './markdown-preview-impl'\n\n// Lazy boundary for react-markdown (#201). MarkdownPreview is reached via the\n// always-mounted FileOverlay (file preview), so a static import would pull\n// react-markdown + plugins into the initial bundle. Behind this boundary the\n// markdown chunk loads only when a markdown file is actually previewed.\nconst LazyMarkdownPreview = lazy(() =>\n import('./markdown-preview-impl').then((m) => ({ default: m.MarkdownPreview })),\n)\n\nexport type { MarkdownPreviewProps }\n\nexport function MarkdownPreview(props: MarkdownPreviewProps) {\n return (\n <Suspense fallback={<div className=\"p-4 text-sm text-muted-foreground\">Loading preview…</div>}>\n <LazyMarkdownPreview {...props} />\n </Suspense>\n )\n}\n","import { useEffect, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport { X, ZoomIn, ZoomOut } from 'lucide-react'\n\nfunction ImageLightbox({ src, alt, onClose }: { src: string; alt: string; onClose: () => void }) {\n const [zoomed, setZoomed] = useState(false)\n\n useEffect(() => {\n const prev = document.body.style.overflow\n document.body.style.overflow = 'hidden'\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') onClose()\n }\n document.addEventListener('keydown', onKey)\n return () => {\n document.body.style.overflow = prev\n document.removeEventListener('keydown', onKey)\n }\n }, [onClose])\n\n return (\n <div className=\"fixed inset-0 z-[100] flex flex-col bg-black/95\">\n <div className=\"flex shrink-0 items-center justify-end gap-2 p-2\">\n <button\n type=\"button\"\n className=\"rounded-full bg-white/10 p-2 text-white/70 hover:bg-white/20 hover:text-white\"\n onClick={() => setZoomed(!zoomed)}\n title={zoomed ? 'Fit to screen' : 'Actual size'}\n >\n {zoomed ? <ZoomOut className=\"h-4 w-4\" /> : <ZoomIn className=\"h-4 w-4\" />}\n </button>\n <button\n type=\"button\"\n className=\"rounded-full bg-white/10 p-2 text-white/70 hover:bg-white/20 hover:text-white\"\n onClick={onClose}\n title=\"Close\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n </div>\n <div\n className={`min-h-0 flex-1 ${zoomed ? 'overflow-auto' : 'flex items-center justify-center overflow-hidden p-4'}`}\n onClick={zoomed ? undefined : onClose}\n >\n <img\n src={src}\n alt={alt}\n className={zoomed ? 'max-w-none' : 'max-h-full max-w-full cursor-zoom-in object-contain'}\n onClick={(e) => { e.stopPropagation(); setZoomed(!zoomed) }}\n />\n </div>\n </div>\n )\n}\n\nexport function ZoomableImage({\n src,\n alt = '',\n className,\n style,\n}: {\n src: string\n alt?: string\n className?: string\n style?: React.CSSProperties\n}) {\n const [open, setOpen] = useState(false)\n\n return (\n <>\n <img\n src={src}\n alt={alt}\n className={`${className || ''} cursor-zoom-in`}\n style={style}\n onClick={() => setOpen(true)}\n />\n {open && createPortal(\n <ImageLightbox src={src} alt={alt} onClose={() => setOpen(false)} />,\n document.body,\n )}\n </>\n )\n}\n","import { useEffect, useMemo, useRef, useState, type RefObject } from 'react'\nimport { errMessage } from 'agent-relay-sdk/types'\nimport { CornerUpLeft, File, Folder, FolderTree, GitBranch, Link2, Loader2, Plus, RefreshCw, X } from 'lucide-react'\nimport { useRelayStore } from '@/store'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Badge } from '@/components/ui/badge'\nimport { Switch } from '@/components/ui/switch'\nimport { CodePreview, canHighlightCode } from '@/components/shared/code-preview'\nimport { MarkdownPreview } from '@/components/shared/markdown-preview'\nimport { ZoomableImage } from '@/components/shared/zoomable-image'\nimport { CopyButton } from '@/components/shared/copy-button'\nimport type { FileEntry, FileListing, FileReadResult, GitFileStatus, Orchestrator } from '@/types'\n\nconst GIT_PREF_KEY = 'agent-relay:file-git-status'\n\nfunction readGitPref(): boolean {\n try {\n return window.localStorage.getItem(GIT_PREF_KEY) !== 'off'\n } catch {\n return true\n }\n}\n\nfunction writeGitPref(enabled: boolean) {\n try {\n window.localStorage.setItem(GIT_PREF_KEY, enabled ? 'on' : 'off')\n } catch {}\n}\n\nfunction gitStatusMeta(status?: GitFileStatus): { dot: string; text: string; label: string } | null {\n switch (status) {\n case 'staged': return { dot: 'bg-green-500', text: 'text-green-400', label: 'Staged' }\n case 'unstaged': return { dot: 'bg-amber-500', text: 'text-amber-400', label: 'Modified (unstaged)' }\n case 'staged-unstaged': return { dot: 'bg-amber-500', text: 'text-green-400', label: 'Staged + unstaged changes' }\n case 'untracked': return { dot: 'bg-sky-500', text: 'text-sky-400', label: 'Untracked' }\n default: return null\n }\n}\n\nfunction listUrl(orchestratorId: string, path: string, git: boolean): string {\n const base = `/orchestrators/${encodeURIComponent(orchestratorId)}/files/list?path=${encodeURIComponent(path)}`\n return git ? `${base}&git=1` : base\n}\n\nfunction GitDot({ status }: { status?: GitFileStatus }) {\n const meta = gitStatusMeta(status)\n if (!meta) return null\n return <span className={`h-1.5 w-1.5 shrink-0 rounded-full ${meta.dot}`} title={meta.label} />\n}\n\nfunction formatBytes(bytes?: number): string {\n if (bytes === undefined) return ''\n if (bytes < 1024) return `${bytes} B`\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`\n return `${(bytes / 1024 / 1024).toFixed(1)} MB`\n}\n\nfunction relativePath(path: string, baseDir: string): string {\n const base = baseDir.replace(/\\/+$/, '')\n return path === base ? '/' : path.startsWith(base + '/') ? path.slice(base.length + 1) : path\n}\n\nfunction isMarkdownPath(path: string, mediaType?: string): boolean {\n const lower = path.toLowerCase()\n return lower.endsWith('.md') || lower.endsWith('.mdx') || lower.endsWith('.markdown') || mediaType === 'text/markdown'\n}\n\nfunction modePreferenceKind(path: string, mediaType?: string, content?: string): 'markdown' | 'code' | null {\n if (isMarkdownPath(path, mediaType)) return 'markdown'\n if (canHighlightCode(path, mediaType, undefined, content)) return 'code'\n return null\n}\n\nfunction modePreferenceKey(kind: 'markdown' | 'code'): string {\n return `agent-relay:file-view-mode:${kind}`\n}\n\nfunction readModePreference(kind: 'markdown' | 'code'): 'raw' | 'rendered' {\n try {\n const value = window.localStorage.getItem(modePreferenceKey(kind))\n return value === 'raw' || value === 'rendered' ? value : 'rendered'\n } catch {\n return 'rendered'\n }\n}\n\nfunction writeModePreference(kind: 'markdown' | 'code', mode: 'raw' | 'rendered') {\n try {\n window.localStorage.setItem(modePreferenceKey(kind), mode)\n } catch {}\n}\n\nfunction pathSegments(path: string, baseDir: string): Array<{ label: string; path: string }> {\n const rel = relativePath(path, baseDir)\n if (rel === '/') return [{ label: '/', path: baseDir }]\n const parts = rel.split('/').filter(Boolean)\n const segments = [{ label: '/', path: baseDir }]\n for (let i = 0; i < parts.length; i++) {\n segments.push({ label: parts[i]!, path: `${baseDir.replace(/\\/+$/, '')}/${parts.slice(0, i + 1).join('/')}` })\n }\n return segments\n}\n\nfunction useFileRead(orchestratorId: string, selectedPath: string) {\n const apiCall = useRelayStore((s) => s.apiCall)\n const [file, setFile] = useState<FileReadResult | null>(null)\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState('')\n\n useEffect(() => {\n if (!orchestratorId || !selectedPath) {\n setFile(null)\n setError('')\n return\n }\n let cancelled = false\n setLoading(true)\n setError('')\n apiCall<FileReadResult>('GET', `/orchestrators/${encodeURIComponent(orchestratorId)}/files/read?path=${encodeURIComponent(selectedPath)}`)\n .then((result) => { if (!cancelled) setFile(result) })\n .catch((e) => { if (!cancelled) { setFile(null); setError(errMessage(e)) } })\n .finally(() => { if (!cancelled) setLoading(false) })\n return () => { cancelled = true }\n }, [apiCall, orchestratorId, selectedPath])\n\n return { file, loading, error }\n}\n\nfunction useFileListing(orchestratorId: string, selectedPath: string, git = false) {\n const apiCall = useRelayStore((s) => s.apiCall)\n const [listing, setListing] = useState<FileListing | null>(null)\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState('')\n\n useEffect(() => {\n if (!orchestratorId || !selectedPath) {\n setListing(null)\n setError('')\n return\n }\n let cancelled = false\n setLoading(true)\n setError('')\n apiCall<FileListing>('GET', listUrl(orchestratorId, selectedPath, git))\n .then((result) => { if (!cancelled) setListing(result) })\n .catch((e) => { if (!cancelled) { setListing(null); setError(errMessage(e)) } })\n .finally(() => { if (!cancelled) setLoading(false) })\n return () => { cancelled = true }\n }, [apiCall, orchestratorId, selectedPath, git])\n\n return { listing, loading, error }\n}\n\nfunction RawTextContent({ content, line, lineRef }: { content: string; line: number; lineRef: RefObject<HTMLDivElement | null> }) {\n const lines = content.split('\\n')\n\n return (\n <div className=\"w-full py-2 font-mono text-xs leading-5\">\n {lines.map((text, index) => {\n const lineNumber = index + 1\n const active = lineNumber === line\n return (\n <div\n key={lineNumber}\n ref={active ? lineRef : undefined}\n className={`grid grid-cols-[2.5rem_minmax(0,1fr)] px-1 sm:grid-cols-[4rem_minmax(0,1fr)] sm:px-2 ${active ? 'bg-primary/15' : ''}`}\n >\n <div className=\"select-none pr-2 text-right text-muted-foreground sm:pr-3\">{lineNumber}</div>\n <pre className=\"overflow-hidden whitespace-pre-wrap break-words\">{text || ' '}</pre>\n </div>\n )\n })}\n </div>\n )\n}\n\nexport function DirectoryContent({\n orchestratorId,\n selectedPath,\n onReadError,\n git = false,\n}: {\n orchestratorId: string\n selectedPath: string\n onReadError: (error: string) => void\n git?: boolean\n}) {\n const { listing, loading, error } = useFileListing(orchestratorId, selectedPath, git)\n\n useEffect(() => {\n onReadError(error)\n }, [error, onReadError])\n\n if (!selectedPath) {\n return (\n <div className=\"flex h-full items-center justify-center text-sm text-muted-foreground\">\n Select a directory to preview\n </div>\n )\n }\n if (loading) {\n return (\n <div className=\"flex h-full items-center justify-center gap-2 text-sm text-muted-foreground\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n Loading directory\n </div>\n )\n }\n if (error) {\n return <div className=\"h-full bg-muted/20\" />\n }\n if (!listing) return null\n\n return (\n <div className=\"h-full overflow-auto bg-muted/20\">\n <div className=\"sticky top-0 z-10 flex items-center gap-2 border-b border-border bg-background px-3 py-2 text-xs\">\n <Folder className=\"h-3.5 w-3.5 text-blue-400\" />\n <span className=\"min-w-0 flex-1 truncate font-mono\">{listing.path}</span>\n <Badge variant=\"outline\" className=\"text-[10px]\">{listing.entries.length} items</Badge>\n </div>\n <div className=\"divide-y divide-border/60\">\n {listing.entries.map((entry) => {\n const Icon = entry.type === 'directory' ? Folder : File\n const gitMeta = gitStatusMeta(entry.gitStatus)\n return (\n <div key={entry.path} className=\"flex items-center gap-2 px-3 py-2 text-sm\">\n <Icon className={`h-4 w-4 shrink-0 ${entry.type === 'directory' ? 'text-blue-400' : 'text-muted-foreground'}`} />\n <span className={`min-w-0 flex-1 truncate font-mono text-xs ${gitMeta?.text ?? ''}`}>{entry.name}</span>\n {entry.symlink && <Link2 className=\"h-3 w-3 shrink-0 text-muted-foreground/60\" />}\n <GitDot status={entry.gitStatus} />\n {entry.type !== 'directory' && <span className=\"text-[10px] text-muted-foreground\">{formatBytes(entry.size)}</span>}\n </div>\n )\n })}\n {listing.entries.length === 0 && <div className=\"px-3 py-8 text-center text-sm text-muted-foreground\">No files</div>}\n </div>\n </div>\n )\n}\n\nexport function FileContent({\n orchestratorId,\n selectedPath,\n line,\n onReadError,\n}: {\n orchestratorId: string\n selectedPath: string\n line: number\n onReadError: (error: string) => void\n}) {\n const { file, loading, error } = useFileRead(orchestratorId, selectedPath)\n const lineRef = useRef<HTMLDivElement | null>(null)\n const [mode, setMode] = useState<'raw' | 'rendered'>('raw')\n\n useEffect(() => {\n onReadError(error)\n }, [error, onReadError])\n\n useEffect(() => {\n if (line > 0) lineRef.current?.scrollIntoView({ block: 'center' })\n }, [file, line])\n\n useEffect(() => {\n if (!file || file.encoding === 'binary') return\n if (line > 0) {\n setMode('raw')\n return\n }\n const kind = modePreferenceKind(file.path, file.mediaType, file.content)\n setMode(kind ? readModePreference(kind) : 'raw')\n }, [file?.path, file?.encoding, file?.mediaType, file?.content, line])\n\n function selectMode(nextMode: 'raw' | 'rendered', kind: 'markdown' | 'code' | null) {\n setMode(nextMode)\n if (kind) writeModePreference(kind, nextMode)\n }\n\n if (!selectedPath) {\n return (\n <div className=\"flex h-full items-center justify-center text-sm text-muted-foreground\">\n Select a file to preview\n </div>\n )\n }\n if (loading) {\n return (\n <div className=\"flex h-full items-center justify-center gap-2 text-sm text-muted-foreground\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n Loading file\n </div>\n )\n }\n if (error) {\n return <div className=\"h-full bg-muted/20\" />\n }\n if (!file) return null\n if (file.encoding === 'base64') {\n return (\n <div className=\"flex h-full flex-col bg-muted/20\">\n <div className=\"sticky top-0 z-10 flex items-center gap-2 border-b border-border bg-background px-3 py-2 text-xs\">\n <File className=\"h-3.5 w-3.5 text-muted-foreground\" />\n <span className=\"min-w-0 flex-1 truncate font-mono\">{file.path}</span>\n <CopyButton value={file.path} label=\"Copy path\" copiedLabel=\"Copied path\" size=\"icon\" variant=\"ghost\" className=\"h-7 w-7 shrink-0\" />\n <Badge variant=\"outline\" className=\"text-[10px]\">{formatBytes(file.size)}</Badge>\n </div>\n <div className=\"flex min-h-0 flex-1 items-center justify-center overflow-auto p-4\">\n <ZoomableImage\n src={`data:${file.mediaType};base64,${file.content ?? ''}`}\n alt={file.name}\n className=\"max-h-full max-w-full object-contain\"\n style={{ imageRendering: file.mediaType === 'image/svg+xml' ? 'auto' : undefined }}\n />\n </div>\n </div>\n )\n }\n if (file.encoding === 'binary') {\n return (\n <div className=\"p-4 text-sm\">\n <div className=\"font-medium\">{file.name}</div>\n <div className=\"mt-1 text-muted-foreground\">{file.truncated ? 'File too large to preview.' : 'Binary file preview is not available.'}</div>\n <div className=\"mt-3 flex gap-2\">\n <Badge variant=\"secondary\">{file.mediaType}</Badge>\n <Badge variant=\"outline\">{formatBytes(file.size)}</Badge>\n </div>\n </div>\n )\n }\n\n const content = file.content ?? ''\n const markdown = isMarkdownPath(file.path, file.mediaType)\n const highlightable = !markdown && canHighlightCode(file.path, file.mediaType, undefined, content)\n const canRender = markdown || highlightable\n const preferenceKind = markdown ? 'markdown' : highlightable ? 'code' : null\n\n return (\n <div className=\"h-full overflow-auto bg-muted/20\">\n <div className=\"sticky top-0 z-10 flex items-center gap-2 border-b border-border bg-background px-3 py-2 text-xs\">\n <File className=\"h-3.5 w-3.5 text-muted-foreground\" />\n <span className=\"min-w-0 flex-1 truncate font-mono\">{file.path}</span>\n <CopyButton value={file.path} label=\"Copy path\" copiedLabel=\"Copied path\" size=\"icon\" variant=\"ghost\" className=\"h-7 w-7 shrink-0\" />\n {file.truncated && <Badge variant=\"secondary\" className=\"text-[10px]\">truncated</Badge>}\n <Badge variant=\"outline\" className=\"text-[10px]\">{formatBytes(file.size)}</Badge>\n {canRender && (\n <div className=\"flex shrink-0 rounded-md border border-border bg-muted/40 p-0.5\">\n <button\n type=\"button\"\n className={`rounded px-2 py-1 text-[10px] font-medium ${mode === 'raw' ? 'bg-background text-foreground shadow-sm' : 'text-muted-foreground hover:text-foreground'}`}\n onClick={() => selectMode('raw', preferenceKind)}\n >\n Raw\n </button>\n <button\n type=\"button\"\n className={`rounded px-2 py-1 text-[10px] font-medium ${mode === 'rendered' ? 'bg-background text-foreground shadow-sm' : 'text-muted-foreground hover:text-foreground'}`}\n onClick={() => selectMode('rendered', preferenceKind)}\n >\n {markdown ? 'Rendered' : 'Highlighted'}\n </button>\n </div>\n )}\n </div>\n {mode === 'rendered' && markdown && <MarkdownPreview content={content} path={file.path} />}\n {mode === 'rendered' && highlightable && <CodePreview content={content} path={file.path} mediaType={file.mediaType} />}\n {mode === 'raw' && <RawTextContent content={content} line={line} lineRef={lineRef} />}\n </div>\n )\n}\n\nfunction FileBrowser({ overlay = false }: { overlay?: boolean }) {\n const apiCall = useRelayStore((s) => s.apiCall)\n const orchestrators = useRelayStore((s) => s.orchestrators)\n const orchestratorId = useRelayStore((s) => s.fileOrchestratorId)\n const path = useRelayStore((s) => s.filePath)\n const selectedPath = useRelayStore((s) => s.fileSelectedPath)\n const selectedLine = useRelayStore((s) => s.fileSelectedLine)\n const set = useRelayStore((s) => s.set)\n const closeFileOverlay = useRelayStore((s) => s.closeFileOverlay)\n const openOrchestratorSpawnAt = useRelayStore((s) => s.openOrchestratorSpawnAt)\n const [listing, setListing] = useState<FileListing | null>(null)\n const [pathDraft, setPathDraft] = useState(path)\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState('')\n const [readError, setReadError] = useState('')\n const [gitEnabled, setGitEnabled] = useState(readGitPref)\n\n const onlineOrchestrators = useMemo(() => orchestrators.filter((orch) => orch.status === 'online'), [orchestrators])\n const selectedOrchestrator = orchestrators.find((orch) => orch.id === orchestratorId) || onlineOrchestrators[0]\n\n useEffect(() => {\n if (!selectedOrchestrator) return\n const patch: { fileOrchestratorId?: string; filePath?: string } = {}\n if (!orchestratorId) patch.fileOrchestratorId = selectedOrchestrator.id\n if (!path) patch.filePath = selectedOrchestrator.baseDir\n if (Object.keys(patch).length) set(patch)\n }, [orchestratorId, path, selectedOrchestrator, set])\n\n useEffect(() => setPathDraft(path), [path])\n\n async function load(nextPath = path) {\n if (!selectedOrchestrator || !nextPath) return\n setLoading(true)\n setError('')\n try {\n const result = await apiCall<FileListing>('GET', listUrl(selectedOrchestrator.id, nextPath, gitEnabled))\n setListing(result)\n set({ filePath: result.path })\n setPathDraft(result.path)\n setReadError('')\n } catch (e) {\n setError(errMessage(e))\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n void load(path)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedOrchestrator?.id, path, gitEnabled])\n\n function toggleGit(enabled: boolean) {\n setGitEnabled(enabled)\n writeGitPref(enabled)\n }\n\n function changeOrchestrator(nextId: string) {\n const next = orchestrators.find((orch) => orch.id === nextId)\n set({\n fileOrchestratorId: nextId,\n filePath: next?.baseDir || '',\n fileSelectedPath: '',\n fileSelectedLine: 0,\n })\n }\n\n function openEntry(entry: FileEntry) {\n setReadError('')\n if (entry.type === 'directory') set({ filePath: entry.path, fileSelectedPath: '', fileSelectedLine: 0 })\n else set({ fileSelectedPath: entry.path, fileSelectedLine: 0 })\n }\n\n function spawnFromHere() {\n if (!selectedOrchestrator) return\n const cwd = pathDraft.trim() || path || selectedOrchestrator.baseDir\n if (overlay) closeFileOverlay()\n openOrchestratorSpawnAt({ orchestratorId: selectedOrchestrator.id, cwd })\n }\n\n const segments = listing ? pathSegments(listing.path, listing.baseDir) : []\n const visibleError = error || readError\n\n return (\n <div className={overlay ? 'flex h-full flex-col' : 'flex h-[calc(100dvh-5rem)] flex-col gap-3 md:gap-4'}>\n <div className={`flex flex-wrap items-center gap-2 ${selectedPath ? 'hidden md:flex' : ''}`}>\n <div className=\"flex items-center gap-2 text-lg font-semibold\">\n <FolderTree className=\"h-5 w-5 text-primary\" />\n Files\n </div>\n <select\n value={selectedOrchestrator?.id || ''}\n onChange={(e) => changeOrchestrator(e.target.value)}\n className=\"h-9 rounded-md border border-input bg-background px-3 text-sm\"\n >\n {onlineOrchestrators.length === 0 && <option value=\"\">No online orchestrators</option>}\n {onlineOrchestrators.map((orch) => <option key={orch.id} value={orch.id}>{orch.hostname || orch.id}</option>)}\n </select>\n {overlay && (\n <Button size=\"icon\" variant=\"ghost\" className=\"ml-auto h-8 w-8\" onClick={closeFileOverlay} title=\"Close\">\n <X className=\"h-4 w-4\" />\n </Button>\n )}\n </div>\n\n <div className={`flex flex-wrap items-center gap-2 ${selectedPath ? 'hidden md:flex' : ''}`}>\n <Input\n value={pathDraft}\n onChange={(e) => setPathDraft(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') set({ filePath: pathDraft, fileSelectedPath: '', fileSelectedLine: 0 })\n }}\n className=\"min-w-0 flex-1 basis-full font-mono text-xs sm:basis-auto\"\n placeholder={selectedOrchestrator?.baseDir || 'Path'}\n />\n <Button size=\"sm\" variant=\"outline\" className=\"gap-1\" onClick={() => load(pathDraft)} disabled={loading || !selectedOrchestrator}>\n {loading ? <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> : <RefreshCw className=\"h-3.5 w-3.5\" />}\n Open\n </Button>\n <Button size=\"sm\" className=\"gap-1\" onClick={spawnFromHere} disabled={!selectedOrchestrator}>\n <Plus className=\"h-3.5 w-3.5\" />\n <span className=\"sm:hidden\">Spawn</span>\n <span className=\"hidden sm:inline\">Spawn from here</span>\n </Button>\n <label className=\"flex items-center gap-1.5 text-xs text-muted-foreground\" title=\"Show git status colors\">\n <GitBranch className=\"h-3.5 w-3.5\" />\n <span className=\"hidden sm:inline\">Git</span>\n <Switch checked={gitEnabled} onCheckedChange={toggleGit} />\n </label>\n </div>\n\n {segments.length > 0 && (\n <div className={`flex flex-wrap items-center gap-1 text-xs text-muted-foreground ${selectedPath ? 'hidden md:flex' : ''}`}>\n {segments.map((segment, index) => (\n <button\n key={`${segment.path}-${index}`}\n type=\"button\"\n className=\"rounded px-1.5 py-0.5 font-mono hover:bg-accent hover:text-foreground\"\n onClick={() => set({ filePath: segment.path, fileSelectedPath: '', fileSelectedLine: 0 })}\n >\n {segment.label}{index < segments.length - 1 && segment.label !== '/' ? ' /' : ''}\n </button>\n ))}\n </div>\n )}\n\n {visibleError && <div className=\"rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive\">{visibleError}</div>}\n\n <div className={`grid min-h-0 flex-1 overflow-hidden md:rounded-md md:border md:border-border md:grid-cols-[22rem_minmax(0,1fr)] ${selectedPath ? '' : 'rounded-md border border-border'}`}>\n <div className={`min-h-0 overflow-auto border-b border-border bg-card md:border-b-0 md:border-r ${selectedPath ? 'hidden md:block' : ''}`}>\n {listing?.parent && (\n <button type=\"button\" className=\"flex w-full items-center gap-2 px-3 py-2 text-left text-sm hover:bg-accent\" onClick={() => set({ filePath: listing.parent!, fileSelectedPath: '', fileSelectedLine: 0 })}>\n <CornerUpLeft className=\"h-4 w-4 text-muted-foreground\" />\n <span>Parent directory</span>\n </button>\n )}\n {listing?.entries.map((entry) => {\n const active = selectedPath === entry.path || path === entry.path\n const Icon = entry.type === 'directory' ? Folder : File\n const gitMeta = gitStatusMeta(entry.gitStatus)\n return (\n <button\n type=\"button\"\n key={entry.path}\n className={`flex w-full items-center gap-2 px-3 py-2 text-left text-sm hover:bg-accent ${active ? 'bg-accent' : ''}`}\n onClick={() => openEntry(entry)}\n >\n <Icon className={`h-4 w-4 shrink-0 ${entry.type === 'directory' ? 'text-blue-400' : 'text-muted-foreground'}`} />\n <span className={`min-w-0 flex-1 truncate font-mono text-xs ${gitMeta?.text ?? ''}`}>{entry.name}</span>\n {entry.symlink && <Link2 className=\"h-3 w-3 shrink-0 text-muted-foreground/60\" />}\n <GitDot status={entry.gitStatus} />\n {entry.type !== 'directory' && <span className=\"text-[10px] text-muted-foreground\">{formatBytes(entry.size)}</span>}\n </button>\n )\n })}\n {!loading && listing && listing.entries.length === 0 && <div className=\"px-3 py-8 text-center text-sm text-muted-foreground\">No files</div>}\n </div>\n <div className={`flex min-h-0 flex-col overflow-hidden ${selectedPath ? '' : 'hidden md:flex'}`}>\n <button\n type=\"button\"\n className=\"flex items-center gap-1.5 border-b border-border px-3 py-2 text-xs text-muted-foreground hover:text-foreground md:hidden\"\n onClick={() => set({ fileSelectedPath: '', fileSelectedLine: 0 })}\n >\n <CornerUpLeft className=\"h-3.5 w-3.5\" />\n Back to files\n </button>\n <div className=\"min-h-0 flex-1\">\n <FileContent orchestratorId={selectedOrchestrator?.id || ''} selectedPath={selectedPath} line={selectedLine} onReadError={setReadError} />\n </div>\n </div>\n </div>\n </div>\n )\n}\n\nexport function FilesView() {\n return <FileBrowser />\n}\n\nexport function FileOverlay() {\n const open = useRelayStore((s) => s.fileOverlayOpen)\n if (!open) return null\n return (\n <div className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\">\n <div className=\"absolute inset-4 overflow-hidden rounded-md border border-border bg-background p-4 shadow-xl\">\n <FileBrowser overlay />\n </div>\n </div>\n )\n}\n","import * as React from \"react\"\nimport { Dialog as SheetPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { XIcon } from \"lucide-react\"\n\n// Mirrors the suppressGuardPop pattern in dialog.tsx: when a sheet closes\n// programmatically its cleanup calls back(), which fires popstate. A parent\n// sheet's listener would mistake that for a real back press and close itself\n// too. This flag lets the synthetic pop pass untouched. Reset on every open\n// so a stale value can't swallow a genuine back press.\nlet suppressGuardPop = false\n\nfunction useBackClose(open: boolean | undefined, onOpenChange?: (open: boolean) => void) {\n const pushedRef = React.useRef(false)\n const cbRef = React.useRef(onOpenChange)\n cbRef.current = onOpenChange\n\n React.useEffect(() => {\n if (!open || !cbRef.current) { return }\n suppressGuardPop = false\n window.history.pushState({ sheetGuard: true }, '')\n pushedRef.current = true\n function onPop() {\n if (suppressGuardPop) { suppressGuardPop = false; return }\n if (pushedRef.current) { pushedRef.current = false; cbRef.current?.(false) }\n }\n window.addEventListener('popstate', onPop)\n return () => {\n window.removeEventListener('popstate', onPop)\n if (pushedRef.current) { pushedRef.current = false; suppressGuardPop = true; window.history.back() }\n }\n }, [open])\n}\n\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n useBackClose(props.open, props.onOpenChange)\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n}\n\nfunction SheetTrigger({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n}\n\nfunction SheetClose({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n}\n\nfunction SheetPortal({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />\n}\n\nfunction SheetOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n showCloseButton?: boolean\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n \"fixed z-50 flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out overflow-hidden max-w-[100dvw] data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-full data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-full data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close data-slot=\"sheet-close\" asChild>\n <Button\n variant=\"ghost\"\n className=\"absolute top-3 right-3\"\n size=\"icon-sm\"\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </Button>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Content>\n </SheetPortal>\n )\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\"flex flex-col gap-0.5 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetTitle({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\n \"font-heading text-base font-medium text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Tabs as TabsPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Tabs({\n className,\n orientation = \"horizontal\",\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-orientation={orientation}\n className={cn(\n \"group/tabs flex gap-2 data-horizontal:flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst tabsListVariants = cva(\n \"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none\",\n {\n variants: {\n variant: {\n default: \"bg-muted\",\n line: \"gap-1 bg-transparent\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction TabsList({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List> &\n VariantProps<typeof tabsListVariants>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n data-variant={variant}\n className={cn(tabsListVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n \"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent\",\n \"data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground\",\n \"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsContent({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn(\"flex-1 text-sm outline-none\", className)}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n","import { cn } from '@/lib/utils'\nimport { statusDotColor } from '@/lib/display'\nimport type { Agent } from '@/types'\n\nexport function StatusDot({ agent, now, className }: { agent: Agent | null; now?: number; className?: string }) {\n return <span className={cn('inline-block w-2.5 h-2.5 rounded-full shrink-0', statusDotColor(agent, now), className)} />\n}\n","import { stringValue } from 'agent-relay-sdk/types'\nimport { Badge } from '@/components/ui/badge'\nimport { activeSubagents, shortPath } from '@/lib/display'\nimport type { Agent, ContextState } from '@/types'\nimport { Cable, Eye, GitBranch, Layers, Lock, LockOpen, Rocket, Share2 } from 'lucide-react'\n\nexport function AgentRuntimeBadges({ agent, compact = false }: { agent: Agent; compact?: boolean }) {\n const badges = runtimeBadges(agent)\n if (badges.length === 0) return null\n return (\n <div className=\"flex flex-wrap gap-1\">\n {badges.slice(0, compact ? 4 : undefined).map((badge) => (\n <Badge key={badge} variant=\"outline\" className=\"text-[9px] px-1 py-0 h-4\">{badge}</Badge>\n ))}\n </div>\n )\n}\n\nexport function AgentRuntimeChips({ agent, compact = false, className = '' }: { agent: Agent; compact?: boolean; className?: string }) {\n const chips = runtimeChips(agent)\n return (\n <div className={`flex flex-wrap items-center gap-1 ${className}`}>\n {chips.map((chip) => {\n const Icon = chip.Icon\n return (\n <span\n key={chip.key}\n title={chip.title}\n className={`inline-flex h-5 min-w-5 items-center justify-center gap-1 rounded-md border px-1.5 text-[10px] leading-none ${chip.className}`}\n >\n <Icon className=\"h-3 w-3 shrink-0\" />\n {!compact && <span>{chip.label}</span>}\n </span>\n )\n })}\n </div>\n )\n}\n\nexport function ContextMeter({ agent }: { agent: Agent }) {\n const context = agent.context\n if (!context) return null\n const utilization = contextUtilization(context)\n if (utilization === null) {\n return (\n <div className=\"space-y-1\" title={contextTitle(context)}>\n <div className=\"flex justify-between text-[10px] text-muted-foreground\">\n <span>collecting</span>\n <span>--</span>\n </div>\n <div className=\"h-1.5 rounded-full bg-muted overflow-hidden\">\n <div className=\"h-full w-0 bg-muted-foreground/30\" />\n </div>\n </div>\n )\n }\n const percent = Math.round(utilization * 100)\n const tone = percent >= 80 ? 'bg-red-500' : percent >= 60 ? 'bg-yellow-500' : 'bg-emerald-500'\n return (\n <div className=\"space-y-1\" title={contextTitle(context)}>\n <div className=\"flex justify-between text-[10px] text-muted-foreground\">\n <span>{context.lifecycleState}</span>\n <span>{percent}%</span>\n </div>\n <div className=\"h-1.5 rounded-full bg-muted overflow-hidden\">\n <div className={`h-full ${tone}`} style={{ width: `${Math.max(0, Math.min(100, percent))}%` }} />\n </div>\n </div>\n )\n}\n\nfunction runtimeChips(agent: Agent) {\n const spawned = isRelaySpawned(agent)\n const approval = approvalMode(agent)\n const workspace = agentWorkspaceMeta(agent)\n return [\n {\n key: 'origin',\n label: spawned ? 'Relay' : 'External',\n title: spawned ? 'Agent Relay spawned this agent' : 'Externally started agent registered with Agent Relay',\n Icon: spawned ? Rocket : Cable,\n className: spawned ? 'border-sky-500/30 bg-sky-500/10 text-sky-300' : 'border-zinc-500/30 bg-zinc-500/10 text-zinc-300',\n },\n approval,\n workspace,\n ]\n}\n\nfunction isRelaySpawned(agent: Agent): boolean {\n return typeof agent.meta?.spawnRequestId === 'string' ||\n typeof agent.meta?.policyName === 'string' ||\n typeof agent.meta?.automationRunId === 'string'\n}\n\nfunction approvalMode(agent: Agent) {\n const value = String(agent.providerCapabilities?.session?.approvalMode || agent.meta?.approvalMode || 'guarded').toLowerCase()\n if (value === 'open') {\n return {\n key: 'approval',\n label: 'Open',\n title: 'Approval mode: open',\n Icon: LockOpen,\n className: 'border-emerald-500/30 bg-emerald-500/10 text-emerald-300',\n }\n }\n if (value === 'read-only') {\n return {\n key: 'approval',\n label: 'Read-only',\n title: 'Approval mode: read-only',\n Icon: Eye,\n className: 'border-blue-500/30 bg-blue-500/10 text-blue-300',\n }\n }\n return {\n key: 'approval',\n label: 'Guarded',\n title: 'Approval mode: guarded',\n Icon: Lock,\n className: 'border-amber-500/30 bg-amber-500/10 text-amber-300',\n }\n}\n\n// Resolved workspace mode + the chip presentation (icon/label/title/colors).\n// Exported so the chat agent list can render just the icon next to a project name.\nexport function agentWorkspaceMeta(agent: Agent) {\n const workspace = recordValue(agent.meta?.workspace)\n const requested = stringValue(workspace.requestedMode) || stringValue(agent.meta?.workspaceMode)\n const effective = stringValue(workspace.mode)\n const mode = requested && requested !== 'inherit' ? requested : effective && requested !== 'inherit' ? effective : 'default'\n if (mode === 'isolated') {\n return {\n key: 'workspace',\n label: 'Isolated',\n title: 'Workspace: isolated worktree',\n Icon: GitBranch,\n iconColor: 'text-violet-300',\n className: 'border-violet-500/30 bg-violet-500/10 text-violet-300',\n }\n }\n if (mode === 'shared') {\n return {\n key: 'workspace',\n label: 'Shared',\n title: 'Workspace: shared repo checkout',\n Icon: Share2,\n iconColor: 'text-cyan-300',\n className: 'border-cyan-500/30 bg-cyan-500/10 text-cyan-300',\n }\n }\n return {\n key: 'workspace',\n label: 'Default',\n title: effective ? `Workspace: default/inherit, resolved to ${effective}` : 'Workspace: default/inherit',\n Icon: Layers,\n iconColor: 'text-zinc-400',\n className: 'border-zinc-500/30 bg-zinc-500/10 text-zinc-300',\n }\n}\n\nfunction recordValue(value: unknown): Record<string, unknown> {\n return value && typeof value === 'object' && !Array.isArray(value) ? value as Record<string, unknown> : {}\n}\n\n// A short, human project name for an agent. Prefers the workspace repo root /\n// source cwd (so an isolated agent shows its *project*, not its long worktree\n// branch dir), falling back to the agent's cwd. '' when nothing is known.\nexport function agentProjectName(agent: Agent): string {\n const workspace = recordValue(agent.meta?.workspace)\n const root = stringValue(workspace.repoRoot) || stringValue(workspace.sourceCwd) || stringValue(agent.meta?.cwd)\n return root ? shortPath(root, 2) : ''\n}\n\nexport function agentHasContextTelemetry(agent: Agent): boolean {\n return Boolean(agent.context || agent.providerCapabilities?.context)\n}\n\nfunction runtimeBadges(agent: Agent): string[] {\n const caps = agent.providerCapabilities\n const context = agent.context\n const badges: string[] = []\n if (caps?.lifecycle.managed) badges.push('managed')\n else if (caps) badges.push('bridge')\n if (caps?.session?.approvalMode === 'read-only') badges.push('read-only')\n else if (caps?.session?.fileWrite) badges.push('write')\n if (caps?.session?.shell) badges.push('shell')\n if (caps?.model?.alias || caps?.model?.id) badges.push(String(caps.model.alias || caps.model.id))\n const subagentCount = activeSubagents(agent).length\n if (subagentCount) badges.push(subagentCount === 1 ? '1 subagent' : `${subagentCount} subagents`)\n if (context) {\n const utilization = contextUtilization(context)\n badges.push(utilization === null ? 'ctx collecting' : `${Math.round(utilization * 100)}% ctx`)\n }\n return badges\n}\n\nexport function ContextRing({ context, expected = Boolean(context), size = 26, className }: { context?: ContextState | null; expected?: boolean; size?: number; className?: string }) {\n const utilization = contextUtilization(context)\n if (utilization === null && !expected) return null\n const stroke = size >= 24 ? 3 : 2.5\n const c = size / 2\n const r = c - stroke\n const circumference = 2 * Math.PI * r\n const offset = utilization === null ? circumference : circumference * (1 - utilization)\n const unknown = utilization === null\n const color = unknown ? 'text-muted-foreground' : utilization > 0.8 ? 'text-red-400' : utilization > 0.5 ? 'text-yellow-400' : 'text-emerald-400'\n const pct = unknown ? null : Math.round(utilization * 100)\n return (\n <div className={`relative shrink-0 ${unknown ? 'opacity-70' : ''} ${className ?? ''}`} style={{ width: size, height: size }} title={contextTitle(context)}>\n <svg width={size} height={size} viewBox={`0 0 ${size} ${size}`} className=\"rotate-[-90deg]\">\n <circle cx={c} cy={c} r={r} fill=\"none\" strokeWidth={stroke} className=\"stroke-muted-foreground/20\" />\n <circle cx={c} cy={c} r={r} fill=\"none\" strokeWidth={stroke} strokeDasharray={circumference} strokeDashoffset={offset} strokeLinecap=\"round\" className={`${color} stroke-current transition-all duration-500`} />\n </svg>\n <span className={`absolute inset-0 flex items-center justify-center font-semibold leading-none ${unknown ? 'text-muted-foreground' : color}`} style={{ fontSize: size >= 24 ? 8 : 7 }}>{unknown ? '?' : pct}</span>\n </div>\n )\n}\n\nexport function contextTokenText(agent: Agent): string | null {\n const context = agent.context\n if (!context?.tokensUsed && !context?.tokensMax) return null\n if (context.tokensUsed && context.tokensMax) return `${formatTokenCount(context.tokensUsed)} / ${formatTokenCount(context.tokensMax)}`\n if (context.tokensUsed) return formatTokenCount(context.tokensUsed)\n return context.tokensMax ? formatTokenCount(context.tokensMax) : null\n}\n\nfunction contextUtilization(context: ContextState | null | undefined): number | null {\n if (!context || typeof context.utilization !== 'number' || !Number.isFinite(context.utilization)) return null\n return Math.min(1, Math.max(0, context.utilization))\n}\n\nfunction contextTitle(context: ContextState | null | undefined): string {\n if (!context) return 'Context: collecting; provider has not reported usage yet'\n const utilization = contextUtilization(context)\n const source = `${context.source}/${context.confidence}`\n const updated = Number.isFinite(context.lastUpdatedAt) ? new Date(context.lastUpdatedAt).toLocaleString() : 'unknown'\n if (utilization === null) return `Context: unknown; ${source}; updated ${updated}`\n return `Context: ${Math.round(utilization * 100)}%; ${source}; updated ${updated}`\n}\n\nfunction formatTokenCount(tokens: number): string {\n if (tokens >= 1_000_000) return `${(tokens / 1_000_000).toFixed(tokens % 1_000_000 === 0 ? 0 : 1)}M`\n if (tokens >= 1_000) return `${Math.round(tokens / 1_000)}K`\n return String(tokens)\n}\n\n","import { lazy, Suspense } from 'react'\nimport type { TerminalDialogProps } from './terminal-viewer-impl'\n\n// Lazy boundary for the xterm.js terminal (#201). The impl pulls in @xterm/* +\n// its stylesheet (~heavy); keeping it behind a dynamic import keeps xterm out of\n// the initial bundle. Consumers import { TerminalDialog } from here unchanged.\n//\n// The `if (!open) return null` gate matters: TerminalDialog is rendered (closed)\n// by always-mounted consumers like the agent detail drawer. Returning null while\n// closed means the dynamic import only fires when a terminal is actually opened,\n// so xterm loads on demand rather than eagerly on mount.\nconst LazyTerminalDialog = lazy(() =>\n import('./terminal-viewer-impl').then((m) => ({ default: m.TerminalDialog })),\n)\n\nexport function TerminalDialog(props: TerminalDialogProps) {\n if (!props.open) return null\n return (\n <Suspense fallback={null}>\n <LazyTerminalDialog {...props} />\n </Suspense>\n )\n}\n","import { useEffect, useState } from 'react'\nimport { errMessage } from 'agent-relay-sdk/types'\nimport { Download, Pause, Play, Search, Brain, Terminal } from 'lucide-react'\nimport { useRelayStore } from '@/store'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { cn } from '@/lib/utils'\nimport { downloadText } from '@/lib/display'\n\ninterface LogViewerProps {\n orchestratorId: string\n session: string\n lines?: number\n}\n\nexport function LogViewer({ orchestratorId, session, lines = 200 }: LogViewerProps) {\n const apiCall = useRelayStore((s) => s.apiCall)\n const [logLines, setLogLines] = useState<string[]>([])\n const [query, setQuery] = useState('')\n const [paused, setPaused] = useState(false)\n // 'provider' = raw TUI output; 'mirror' = clean session-mirror diagnostics.\n const [stream, setStream] = useState<'provider' | 'mirror'>('provider')\n const [error, setError] = useState<string | null>(null)\n\n async function load() {\n if (paused) return\n try {\n const streamQuery = stream === 'mirror' ? '&stream=mirror' : ''\n const result = await apiCall<{ lines: string[] }>('GET', `/orchestrators/${encodeURIComponent(orchestratorId)}/logs/${encodeURIComponent(session)}?lines=${lines}${streamQuery}`)\n setLogLines(result.lines || [])\n setError(null)\n } catch (e) {\n setError(errMessage(e))\n }\n }\n\n useEffect(() => {\n void load()\n const timer = setInterval(() => void load(), 1500)\n return () => clearInterval(timer)\n }, [orchestratorId, session, paused, stream])\n\n const visible = query ? logLines.filter((line) => line.toLowerCase().includes(query.toLowerCase())) : logLines\n\n return (\n <div className=\"space-y-2\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <div className=\"relative min-w-48 flex-1\">\n <Search className=\"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground\" />\n <Input className=\"pl-8\" value={query} onChange={(e) => setQuery(e.target.value)} placeholder=\"Search logs\" />\n </div>\n <div className=\"flex rounded-md border border-border overflow-hidden\">\n <button\n type=\"button\"\n onClick={() => setStream('provider')}\n title=\"Provider output\"\n className={cn('flex items-center gap-1 px-2 py-1.5 text-xs', stream === 'provider' ? 'bg-accent text-accent-foreground' : 'text-muted-foreground hover:bg-accent/50')}\n >\n <Terminal className=\"h-3.5 w-3.5\" /> Output\n </button>\n <button\n type=\"button\"\n onClick={() => setStream('mirror')}\n title=\"Session-mirror diagnostics (clean)\"\n className={cn('flex items-center gap-1 px-2 py-1.5 text-xs border-l border-border', stream === 'mirror' ? 'bg-accent text-accent-foreground' : 'text-muted-foreground hover:bg-accent/50')}\n >\n <Brain className=\"h-3.5 w-3.5\" /> Mirror\n </button>\n </div>\n <Button type=\"button\" variant=\"outline\" size=\"icon\" onClick={() => setPaused((v) => !v)} title={paused ? 'Resume logs' : 'Pause logs'}>\n {paused ? <Play className=\"h-4 w-4\" /> : <Pause className=\"h-4 w-4\" />}\n </Button>\n <Button type=\"button\" variant=\"outline\" size=\"icon\" onClick={() => downloadText(`${session}.log`, logLines.join('\\n'), 'text/plain')} title=\"Download logs\">\n <Download className=\"h-4 w-4\" />\n </Button>\n </div>\n {error && <div className=\"text-sm text-destructive\">{error}</div>}\n <pre className=\"max-h-96 overflow-auto rounded-md border border-border bg-zinc-950 p-3 text-xs leading-5 text-zinc-100\">\n {visible.join('\\n') || 'No log output'}\n </pre>\n </div>\n )\n}\n","import { isRecord } from 'agent-relay-sdk/types'\nimport type { Agent } from '@/types'\n\nexport interface StuckBusyHealth {\n kind: string\n thresholdMs: number\n activeWorkId?: string\n activeWorkLabel?: string\n activeWorkStartedAt: number\n activeWorkAgeMs: number\n /** Most recent forward-progress timestamp (contract LivenessSignal, server-folded). */\n lastProgressAt: number\n staleForMs: number\n}\n\n// Single source of truth for the stuck-busy verdict (#746). The SERVER already folded the\n// normalized LivenessSignal (transport heartbeat veto #713/#724 + progress + live-work) into\n// `meta.busyHealth.status` before it ever reaches the dashboard — so here we ONLY trust that\n// verdict and recompute display ages live from the normalized timestamps it carries. We do\n// NOT re-derive stuck-ness from raw provider signals (`lastProviderEventAt`, transport, work\n// kinds): that client-side re-implementation was the literal 'patched twice' DRY leak — it\n// drifted from the server and re-introduced false stuck-busy by missing the heartbeat veto.\nexport function agentStuckBusyHealth(now: number, agent: Agent | null | undefined): StuckBusyHealth | null {\n const raw = agent?.meta?.busyHealth\n if (!agent || agent.status !== 'busy' || !isRecord(raw)) return null\n if (raw.status !== 'stuck-busy') return null\n const activeWorkStartedAt = typeof raw.activeWorkStartedAt === 'number' ? raw.activeWorkStartedAt : 0\n if (!activeWorkStartedAt) return null\n const lastProgressAt = typeof raw.lastProgressAt === 'number' ? raw.lastProgressAt : activeWorkStartedAt\n return {\n kind: typeof raw.kind === 'string' ? raw.kind : 'provider-turn',\n thresholdMs: typeof raw.thresholdMs === 'number' && raw.thresholdMs > 0 ? raw.thresholdMs : 0,\n activeWorkId: typeof raw.activeWorkId === 'string' ? raw.activeWorkId : undefined,\n activeWorkLabel: typeof raw.activeWorkLabel === 'string' ? raw.activeWorkLabel : undefined,\n activeWorkStartedAt,\n activeWorkAgeMs: Math.max(0, now - activeWorkStartedAt),\n lastProgressAt,\n staleForMs: Math.max(0, now - lastProgressAt),\n }\n}\n","import { useEffect, useState } from 'react'\nimport { api } from '@/lib/api'\nimport { useRelayStore, useNow } from '@/store'\nimport { Badge } from '@/components/ui/badge'\nimport { CopyButton } from '@/components/shared/copy-button'\nimport { timeAgo, fmtTime } from '@/lib/display'\nimport { Stethoscope, ChevronDown, ChevronRight } from 'lucide-react'\nimport type { Agent, ManagedPolicyHealth, ActivityEvent, Orchestrator, AgentProfileProjectionReport } from '@/types'\nimport { isRecord } from 'agent-relay-sdk/types'\n\ninterface AgentDiagnosticsProps {\n agent: Agent\n orchestrators: Orchestrator[]\n}\n\nconst LIFECYCLE_STATUS_COLORS: Record<string, string> = {\n running: 'bg-emerald-500/20 text-emerald-400',\n starting: 'bg-blue-500/20 text-blue-400',\n stopping: 'bg-yellow-500/20 text-yellow-400',\n stopped: 'bg-zinc-500/20 text-zinc-400',\n backoff: 'bg-red-500/20 text-red-400',\n}\n\nexport function AgentDiagnostics({ agent, orchestrators }: AgentDiagnosticsProps) {\n const now = useNow()\n const [policyHealth, setPolicyHealth] = useState<ManagedPolicyHealth | null>(null)\n const [agentEvents, setAgentEvents] = useState<ActivityEvent[]>([])\n const [expandedSections, setExpandedSections] = useState({ spawn: true, workspace: true, runtime: true, profile: true, lifecycle: true, activity: false } as Record<string, boolean>)\n\n const policyName = typeof agent.meta?.policyName === 'string' ? agent.meta.policyName : null\n const profileName = typeof agent.meta?.profile === 'string' ? agent.meta.profile : null\n const agentProfile = isRecord(agent.meta?.agentProfile) ? agent.meta.agentProfile : null\n const profileProjection = isProfileProjectionReport(agentProfile?.projection) ? agentProfile.projection : null\n const managedOrch = orchestrators.find((o) => o.managedAgents.some((m) => m.agentId === agent.id))\n const managedAgent = managedOrch?.managedAgents.find((m) => m.agentId === agent.id)\n\n useEffect(() => {\n if (!policyName) return\n let cancelled = false\n api<ManagedPolicyHealth>('GET', '/spawn-policies/' + encodeURIComponent(policyName) + '/status')\n .then((health) => { if (!cancelled) setPolicyHealth(health) })\n .catch(() => { if (!cancelled) setPolicyHealth(null) })\n return () => { cancelled = true }\n }, [policyName, agent.lastSeen])\n\n useEffect(() => {\n let cancelled = false\n api<ActivityEvent[]>('GET', '/activity?agentId=' + encodeURIComponent(agent.id) + '&limit=20')\n .then((events) => { if (!cancelled) setAgentEvents(events) })\n .catch(() => { if (!cancelled) setAgentEvents([]) })\n return () => { cancelled = true }\n }, [agent.id, agent.lastSeen])\n\n function toggleSection(key: string) {\n setExpandedSections((s) => ({ ...s, [key]: !s[key] }))\n }\n\n function buildDiagnosticBundle(): string {\n const policy = policyHealth?.policy\n const state = policyHealth?.state\n const lines: string[] = [\n '# Agent Diagnostics',\n `Agent: ${agent.id}`,\n `Status: ${agent.status}`,\n `Provider: ${agent.meta?.provider || 'unknown'}`,\n `Machine: ${agent.machine || 'unknown'}`,\n ]\n if (policyName) lines.push(`Policy: ${policyName}`)\n if (profileName) lines.push(`Agent Profile: ${profileName}`)\n if (policy) {\n lines.push('', '## Spawn Config')\n lines.push(`Provider: ${policy.provider}`)\n if (policy.model) lines.push(`Model: ${policy.model}`)\n if (policy.effort) lines.push(`Effort: ${policy.effort}`)\n lines.push(`CWD: ${policy.cwd}`)\n lines.push(`Permission: ${policy.permissionMode}`)\n lines.push(`Mode: ${policy.mode}`)\n if (policy.rig) lines.push(`Rig: ${policy.rig}`)\n if (policy.tags.length) lines.push(`Tags: ${policy.tags.join(', ')}`)\n if (policy.capabilities.length) lines.push(`Caps: ${policy.capabilities.join(', ')}`)\n }\n if (profileProjection) {\n lines.push('', '## Agent Profile Projection')\n lines.push(`Profile: ${profileProjection.profileName}`)\n lines.push(`Provider: ${profileProjection.provider}`)\n lines.push(`Base: ${profileProjection.base}`)\n if (profileProjection.warnings.length) lines.push(`Warnings: ${profileProjection.warnings.length}`)\n for (const entry of profileProjection.entries) {\n lines.push(`- ${entry.capability}: requested=${entry.requested} result=${entry.result} detail=${entry.detail}`)\n }\n }\n if (managedAgent) {\n lines.push('', '## Runtime')\n if (managedAgent.pid) lines.push(`PID: ${managedAgent.pid}`)\n if (managedAgent.sessionName) lines.push(`Session: ${managedAgent.sessionName}`)\n if (managedAgent.supervisor) lines.push(`Supervisor: ${managedAgent.supervisor}`)\n if (managedAgent.systemdUnit) lines.push(`Systemd: ${managedAgent.systemdUnit}`)\n if (managedAgent.terminalSession) lines.push(`Terminal: ${managedAgent.terminalSession} (${managedAgent.terminalAvailable ? 'available' : 'unavailable'})`)\n if (managedAgent.tmuxSession && managedAgent.tmuxSession !== managedAgent.sessionName) lines.push(`Legacy tmux: ${managedAgent.tmuxSession}`)\n if (managedAgent.spawnRequestId) lines.push(`Spawn Request: ${managedAgent.spawnRequestId}`)\n if (managedAgent.startedAt) lines.push(`Started: ${new Date(managedAgent.startedAt).toISOString()}`)\n if (managedOrch) lines.push(`Orchestrator: ${managedOrch.hostname} (${managedOrch.id.slice(-8)})`)\n }\n if (managedAgent?.workspace) {\n lines.push('', '## Workspace')\n lines.push(`Mode: ${managedAgent.workspace.mode}`)\n if (managedAgent.workspace.status) lines.push(`Status: ${managedAgent.workspace.status}`)\n if (managedAgent.workspace.worktreePath) lines.push(`Worktree: ${managedAgent.workspace.worktreePath}`)\n if (managedAgent.workspace.repoRoot) lines.push(`Repo: ${managedAgent.workspace.repoRoot}`)\n if (managedAgent.workspace.branch) lines.push(`Branch: ${managedAgent.workspace.branch}`)\n if (managedAgent.workspace.baseRef) lines.push(`Base: ${managedAgent.workspace.baseRef}`)\n if (managedAgent.workspace.baseSha) lines.push(`Base SHA: ${managedAgent.workspace.baseSha}`)\n if (managedAgent.workspace.stewardAgentId) lines.push(`Steward: ${managedAgent.workspace.stewardAgentId}`)\n }\n if (state) {\n lines.push('', '## Lifecycle')\n lines.push(`Status: ${state.status}`)\n lines.push(`Restarts: ${state.restartCount}`)\n lines.push(`Consecutive failures: ${state.consecutiveFailures}`)\n if (state.lastSpawnAt) lines.push(`Last spawn: ${new Date(state.lastSpawnAt).toISOString()}`)\n if (state.lastStopAt) lines.push(`Last stop: ${new Date(state.lastStopAt).toISOString()}`)\n if (state.healthySince) lines.push(`Healthy since: ${new Date(state.healthySince).toISOString()}`)\n if (state.backoffUntil) lines.push(`Backoff until: ${new Date(state.backoffUntil).toISOString()}`)\n if (state.lastError) lines.push(`Last error: ${state.lastError}`)\n }\n if (agentEvents.length > 0) {\n lines.push('', '## Recent Activity')\n for (const ev of agentEvents.slice(0, 10)) {\n lines.push(`- [${new Date(typeof ev.createdAt === 'number' ? ev.createdAt : Date.parse(String(ev.createdAt))).toISOString()}] ${ev.title}${ev.body ? ': ' + ev.body.slice(0, 100) : ''}`)\n }\n }\n const runtimePkg = agent.meta?.package as Record<string, unknown> | undefined\n if (runtimePkg?.name && runtimePkg?.version) {\n lines.push('', '## Versions')\n lines.push(`Runner: ${runtimePkg.name}@${runtimePkg.version}`)\n }\n const contracts = agent.meta?.contracts as Record<string, unknown> | undefined\n if (contracts) {\n for (const [k, v] of Object.entries(contracts)) {\n lines.push(`Contract ${k}: ${v}`)\n }\n }\n return lines.join('\\n')\n }\n\n const policy = policyHealth?.policy\n const state = policyHealth?.state\n\n return (\n <div className=\"space-y-2\">\n <div className=\"flex items-center justify-between gap-2\">\n <h3 className=\"text-sm font-medium flex items-center gap-1.5\">\n <Stethoscope className=\"w-3.5 h-3.5 text-muted-foreground\" />\n Diagnostics\n </h3>\n <CopyButton value={buildDiagnosticBundle} label=\"Copy Bundle\" showText size=\"sm\" variant=\"outline\" className=\"h-7 text-xs gap-1\" iconClassName=\"w-3 h-3\" />\n </div>\n\n {/* Spawn Config */}\n {policy && (\n <CollapsibleSection title=\"Spawn Config\" expanded={!!expandedSections.spawn} onToggle={() => toggleSection('spawn')}>\n <div className=\"grid grid-cols-2 gap-x-3 gap-y-1 text-xs\">\n <KV label=\"Provider\" value={policy.provider} />\n {policy.model && <KV label=\"Model\" value={policy.model} />}\n {policy.effort && <KV label=\"Effort\" value={policy.effort} />}\n <KV label=\"Permission\" value={policy.permissionMode} />\n <KV label=\"Mode\" value={policy.mode} />\n {policy.rig && <KV label=\"Rig\" value={policy.rig} />}\n <KV label=\"CWD\" value={policy.cwd} className=\"col-span-2\" mono />\n {policy.tags.length > 0 && (\n <div className=\"col-span-2\">\n <span className=\"text-muted-foreground\">Tags</span>\n <div className=\"flex flex-wrap gap-1 mt-0.5\">{policy.tags.map((t) => <Badge key={t} variant=\"outline\" className=\"text-[10px]\">{t}</Badge>)}</div>\n </div>\n )}\n {policy.capabilities.length > 0 && (\n <div className=\"col-span-2\">\n <span className=\"text-muted-foreground\">Capabilities</span>\n <div className=\"flex flex-wrap gap-1 mt-0.5\">{policy.capabilities.map((c) => <Badge key={c} variant=\"secondary\" className=\"text-[10px]\">{c}</Badge>)}</div>\n </div>\n )}\n {policy.providerArgs.length > 0 && <KV label=\"Provider Args\" value={policy.providerArgs.join(' ')} className=\"col-span-2\" mono />}\n {policy.binding && <KV label=\"Channel\" value={`${policy.binding.type}:${policy.binding.channelId}`} className=\"col-span-2\" />}\n </div>\n </CollapsibleSection>\n )}\n\n {(profileName || profileProjection) && (\n <CollapsibleSection title=\"Agent Profile\" expanded={!!expandedSections.profile} onToggle={() => toggleSection('profile')}>\n <div className=\"space-y-2 text-xs\">\n <div className=\"grid grid-cols-2 gap-x-3 gap-y-1\">\n {profileName && <KV label=\"Profile\" value={profileName} />}\n {profileProjection?.base && <KV label=\"Base\" value={profileProjection.base} />}\n {profileProjection?.provider && <KV label=\"Provider\" value={profileProjection.provider} />}\n {profileProjection && <KV label=\"Unsupported\" value={String(profileProjection.unsupported.length)} />}\n </div>\n {profileProjection?.warnings.length ? (\n <div className=\"rounded border border-yellow-500/20 bg-yellow-500/5 px-2 py-1.5\">\n <span className=\"text-muted-foreground\">Projection warnings</span>\n <div className=\"mt-1 space-y-1\">\n {profileProjection.warnings.slice(0, 4).map((warning) => <div key={warning} className=\"break-words text-yellow-200/80\">{warning}</div>)}\n </div>\n </div>\n ) : null}\n {profileProjection && (\n <div className=\"space-y-1\">\n {profileProjection.entries.map((entry) => (\n <div key={entry.capability} className=\"grid grid-cols-[1fr_auto] gap-2 rounded border border-border/60 px-2 py-1\">\n <div className=\"min-w-0\">\n <div className=\"font-mono text-[11px]\">{entry.capability}</div>\n <div className=\"break-words text-muted-foreground\">{entry.detail}</div>\n </div>\n <Badge variant={entry.result === 'unsupported' ? 'destructive' : entry.result === 'partial' ? 'outline' : 'secondary'} className=\"h-5 text-[10px]\">\n {entry.result}\n </Badge>\n </div>\n ))}\n </div>\n )}\n </div>\n </CollapsibleSection>\n )}\n\n {managedAgent?.workspace && (\n <CollapsibleSection title=\"Workspace\" expanded={!!expandedSections.workspace} onToggle={() => toggleSection('workspace')}>\n <div className=\"grid grid-cols-2 gap-x-3 gap-y-1 text-xs\">\n <KV label=\"Mode\" value={managedAgent.workspace.mode} />\n {managedAgent.workspace.status && <KV label=\"Status\" value={managedAgent.workspace.status} />}\n {managedAgent.workspace.worktreePath && <KV label=\"Worktree\" value={managedAgent.workspace.worktreePath} className=\"col-span-2\" mono />}\n {managedAgent.workspace.repoRoot && <KV label=\"Repo\" value={managedAgent.workspace.repoRoot} className=\"col-span-2\" mono />}\n {managedAgent.workspace.branch && <KV label=\"Branch\" value={managedAgent.workspace.branch} className=\"col-span-2\" mono />}\n {managedAgent.workspace.baseRef && <KV label=\"Base\" value={managedAgent.workspace.baseRef} />}\n {managedAgent.workspace.baseSha && <KV label=\"Base SHA\" value={managedAgent.workspace.baseSha.slice(0, 12)} mono />}\n {managedAgent.workspace.stewardAgentId && <KV label=\"Steward\" value={managedAgent.workspace.stewardAgentId} className=\"col-span-2\" mono />}\n </div>\n </CollapsibleSection>\n )}\n\n {/* Runtime Attachments */}\n {managedAgent && (\n <CollapsibleSection title=\"Runtime\" expanded={!!expandedSections.runtime} onToggle={() => toggleSection('runtime')}>\n <div className=\"grid grid-cols-2 gap-x-3 gap-y-1 text-xs\">\n {managedAgent.pid && <KV label=\"PID\" value={String(managedAgent.pid)} mono />}\n {managedAgent.sessionName && <KV label=\"Session\" value={managedAgent.sessionName} mono />}\n {managedAgent.supervisor && <KV label=\"Supervisor\" value={managedAgent.supervisor} />}\n {managedAgent.systemdUnit && <KV label=\"Systemd\" value={managedAgent.systemdUnit} mono />}\n {managedAgent.terminalSession && <KV label=\"Terminal\" value={`${managedAgent.terminalSession} (${managedAgent.terminalAvailable ? 'available' : 'unavailable'})`} mono />}\n {managedAgent.tmuxSession && managedAgent.tmuxSession !== managedAgent.sessionName && <KV label=\"Legacy tmux\" value={managedAgent.tmuxSession} mono />}\n {managedAgent.spawnRequestId && <KV label=\"Spawn ID\" value={managedAgent.spawnRequestId.slice(0, 12)} mono />}\n {managedAgent.startedAt && <KV label=\"Started\" value={fmtTime(managedAgent.startedAt)} />}\n {managedOrch && <KV label=\"Orchestrator\" value={`${managedOrch.hostname} (${managedOrch.id.slice(-8)})`} />}\n {managedOrch && <KV label=\"Orch Status\" value={managedOrch.status} />}\n </div>\n </CollapsibleSection>\n )}\n\n {/* Lifecycle State */}\n {state && (\n <CollapsibleSection title=\"Lifecycle\" expanded={!!expandedSections.lifecycle} onToggle={() => toggleSection('lifecycle')}>\n <div className=\"space-y-2 text-xs\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-muted-foreground\">Status</span>\n <Badge className={LIFECYCLE_STATUS_COLORS[state.status] || 'bg-zinc-500/20 text-zinc-400'}>{state.status}</Badge>\n </div>\n <div className=\"grid grid-cols-2 gap-x-3 gap-y-1\">\n <KV label=\"Restarts\" value={String(state.restartCount)} />\n <KV label=\"Failures\" value={String(state.consecutiveFailures)} />\n {state.lastSpawnAt && <KV label=\"Last spawn\" value={timeAgo(now, state.lastSpawnAt)} />}\n {state.lastStopAt && <KV label=\"Last stop\" value={timeAgo(now, state.lastStopAt)} />}\n {state.healthySince && <KV label=\"Healthy since\" value={timeAgo(now, state.healthySince)} />}\n {state.backoffUntil && (\n <KV label=\"Backoff until\" value={state.backoffUntil > now ? timeAgo(now, state.backoffUntil) : 'expired'} />\n )}\n </div>\n {state.lastError && (\n <div className=\"rounded border border-red-500/20 bg-red-500/5 px-2 py-1.5\">\n <span className=\"text-muted-foreground\">Last error</span>\n <div className=\"mt-0.5 break-words text-red-300/80\">{state.lastError}</div>\n </div>\n )}\n </div>\n </CollapsibleSection>\n )}\n\n {/* Recent Activity */}\n <CollapsibleSection title={`Activity (${agentEvents.length})`} expanded={!!expandedSections.activity} onToggle={() => toggleSection('activity')}>\n {agentEvents.length === 0 ? (\n <div className=\"text-xs text-muted-foreground\">No recent events</div>\n ) : (\n <div className=\"space-y-1\">\n {agentEvents.slice(0, 15).map((ev) => (\n <div key={ev.id} className=\"flex items-start gap-2 text-xs\">\n <span className=\"shrink-0 text-[10px] text-muted-foreground tabular-nums w-14\">\n {timeAgo(now, typeof ev.createdAt === 'number' ? ev.createdAt : Date.parse(String(ev.createdAt)))}\n </span>\n <div className=\"min-w-0\">\n <span className=\"font-medium\">{ev.title}</span>\n {ev.body && <span className=\"text-muted-foreground ml-1 break-words\">{ev.body.length > 80 ? ev.body.slice(0, 80) + '...' : ev.body}</span>}\n </div>\n </div>\n ))}\n </div>\n )}\n </CollapsibleSection>\n\n {!policy && !managedAgent && !state && agentEvents.length === 0 && (\n <div className=\"text-xs text-muted-foreground\">No managed-agent diagnostics available for this agent.</div>\n )}\n </div>\n )\n}\n\nfunction CollapsibleSection({ title, expanded, onToggle, children }: { title: string; expanded: boolean; onToggle: () => void; children: React.ReactNode }) {\n return (\n <div className=\"rounded-md border border-border\">\n <button type=\"button\" className=\"flex w-full items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium hover:bg-muted/50\" onClick={onToggle}>\n {expanded ? <ChevronDown className=\"w-3 h-3\" /> : <ChevronRight className=\"w-3 h-3\" />}\n {title}\n </button>\n {expanded && <div className=\"px-2.5 pb-2.5\">{children}</div>}\n </div>\n )\n}\n\nfunction isProfileProjectionReport(value: unknown): value is AgentProfileProjectionReport {\n return isRecord(value) &&\n typeof value.profileName === 'string' &&\n typeof value.provider === 'string' &&\n typeof value.base === 'string' &&\n Array.isArray(value.entries) &&\n Array.isArray(value.warnings) &&\n Array.isArray(value.unsupported)\n}\n\nfunction KV({ label, value, className = '', mono = false }: { label: string; value: string; className?: string; mono?: boolean }) {\n return (\n <div className={`min-w-0 ${className}`}>\n <span className=\"text-muted-foreground\">{label}</span>\n <div className={`truncate ${mono ? 'font-mono' : ''}`} title={value}>{value}</div>\n </div>\n )\n}\n","import { useEffect } from 'react'\nimport { useRelayStore } from '@/store'\nimport { Boxes } from 'lucide-react'\nimport type { Agent } from '@/types'\n\n// Per-agent current-project chip (#488). Resolves the agent's cwd → project through\n// the SERVER (GET /api/projects/resolve, longest-root-match lives in #405) — never\n// reimplements matching client-side. Clicking deep-links into the Projects view with\n// that project selected. Renders nothing when the agent has no cwd or no project owns it.\nexport function AgentProjectBadge({ agent, className = '', onNavigate }: { agent: Agent; className?: string; onNavigate?: () => void }) {\n const cwd = typeof agent.meta?.cwd === 'string' ? agent.meta.cwd : ''\n const project = useRelayStore((s) => (cwd ? s.projectByCwd[cwd] : null))\n const fetchProjectForCwd = useRelayStore((s) => s.fetchProjectForCwd)\n const openProjectFocus = useRelayStore((s) => s.openProjectFocus)\n\n // Resolve once per cwd (the store caches by cwd, including resolved-but-no-match).\n useEffect(() => {\n if (cwd) void fetchProjectForCwd(cwd)\n }, [cwd, fetchProjectForCwd])\n\n if (!project) return null\n return (\n <button\n type=\"button\"\n title={`Project: ${project.title || project.slug} — open in Projects`}\n onClick={(e) => { e.stopPropagation(); onNavigate?.(); void openProjectFocus(project.id) }}\n className={`inline-flex h-5 max-w-full items-center gap-1 rounded-full border border-indigo-500/30 bg-indigo-500/10 px-1.5 text-[10px] font-medium text-indigo-300 transition-colors hover:bg-indigo-500/20 ${className}`}\n >\n <Boxes className=\"h-3 w-3 shrink-0\" />\n <span className=\"truncate\">{project.title || project.slug}</span>\n </button>\n )\n}\n","import type { ComponentType } from 'react'\nimport { CircleDot } from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport type { IssueProvider } from '@/lib/issue-types'\n\n// Provider brand mark. lucide ships no brand icons, so the recognizable marks\n// (GitHub today; GitLab/Jira/Linear/YouTrack as they're inlined) live here as\n// small inline SVGs. The chip is tracker-agnostic: it never assumes GitHub —\n// it just asks this map for a glyph and falls back to a neutral issue mark.\n\nfunction GithubMark({ className }: { className?: string }) {\n return (\n <svg viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" className={className}>\n <path d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.65 7.65 0 0 1 2-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z\" />\n </svg>\n )\n}\n\ntype GlyphComponent = ComponentType<{ className?: string }>\n\n// provider → brand mark. Absent providers fall back to the neutral issue glyph\n// below; add an entry here to light up a new tracker (no other change needed).\nconst PROVIDER_GLYPH: Partial<Record<IssueProvider, GlyphComponent>> = {\n github: GithubMark,\n}\n\n// Neutral, tracker-agnostic fallback: a generic \"issue\" mark for providers\n// without a dedicated brand glyph yet (and for unknown providers).\nconst NeutralGlyph: GlyphComponent = CircleDot\n\nexport function ProviderGlyph({ provider, className }: { provider: IssueProvider; className?: string }) {\n const Glyph = PROVIDER_GLYPH[provider] ?? NeutralGlyph\n return <Glyph className={cn('shrink-0', className)} />\n}\n","import { ExternalLink } from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { fmtTime, timeAgo } from '@/lib/display'\nimport { ProviderGlyph } from '@/components/shared/provider-glyph'\nimport type { IssueRef, IssueRefStatus } from '@/lib/issue-types'\n\n// Status tokens mirror the dashboard's established state palette (teams.tsx,\n// agent-type-icon.tsx): emerald = live/open, zinc = terminal/closed, amber =\n// warning/unknown. Don't invent new colors — these read consistently elsewhere.\nconst STATUS_CLASS: Record<IssueRefStatus, string> = {\n open: 'border-emerald-500/25 bg-emerald-500/10 text-emerald-300',\n closed: 'border-zinc-500/25 bg-zinc-500/10 text-zinc-300',\n unknown: 'border-amber-500/25 bg-amber-500/10 text-amber-300',\n}\n\n// How long a synced status stays \"fresh\" before the chip flags it as stale.\nconst STALE_AFTER_MS = 24 * 60 * 60 * 1000\n\nfunction issueLabel(issueRef: IssueRef): string {\n return `${issueRef.repo}#${issueRef.externalKey}`\n}\n\nfunction syncHint(issueRef: IssueRef, now: number): string {\n if (!issueRef.statusSyncedAt) return 'Status not yet synced'\n return `Status synced ${timeAgo(now, issueRef.statusSyncedAt)} (${fmtTime(issueRef.statusSyncedAt)})`\n}\n\nexport function IssueRefChip({ issueRef, now = Date.now(), compact = false, showSync = false, className }: {\n issueRef: IssueRef\n now?: number\n /** Compact/inline variant: smaller pill, no status word, flows inside prose. */\n compact?: boolean\n /** Surface the status-freshness hint inline (card contexts with room to breathe). */\n showSync?: boolean\n className?: string\n}) {\n const label = issueLabel(issueRef)\n const stale = !issueRef.statusSyncedAt || now - issueRef.statusSyncedAt > STALE_AFTER_MS\n const title = [\n issueRef.title ? `${label}: ${issueRef.title}` : label,\n `Status: ${issueRef.status}`,\n syncHint(issueRef, now),\n ].join('\\n')\n\n return (\n <a\n href={issueRef.url}\n target=\"_blank\"\n rel=\"noreferrer\"\n title={title}\n aria-label={`Open ${label}`}\n onClick={(event) => event.stopPropagation()}\n className={cn(\n 'inline-flex max-w-full items-center rounded-full border font-medium leading-none transition-colors hover:brightness-125 focus:outline-none focus-visible:ring-1 focus-visible:ring-current',\n compact ? 'h-4 gap-1 pl-1 pr-1.5 text-[9px]' : 'h-5 gap-1.5 pl-1.5 pr-2 text-[10px]',\n STATUS_CLASS[issueRef.status],\n className,\n )}\n >\n <ProviderGlyph provider={issueRef.provider} className={cn('opacity-90', compact ? 'h-2.5 w-2.5' : 'h-3 w-3')} />\n <span className=\"truncate font-mono tracking-tight\">{label}</span>\n {!compact && <span className=\"shrink-0 opacity-70\">{issueRef.status}</span>}\n {showSync && !compact && (\n <span className={cn('shrink-0 tabular-nums', stale ? 'opacity-45' : 'opacity-65')}>\n <span aria-hidden className=\"mr-1 opacity-60\">·</span>\n {issueRef.statusSyncedAt ? timeAgo(now, issueRef.statusSyncedAt) : 'unsynced'}\n </span>\n )}\n <ExternalLink className={cn('shrink-0 opacity-60', compact ? 'h-2 w-2' : 'ml-0.5 h-2.5 w-2.5')} />\n </a>\n )\n}\n","import { useEffect, useMemo } from 'react'\nimport { useRelayStore } from '@/store'\nimport { Badge } from '@/components/ui/badge'\nimport { Separator } from '@/components/ui/separator'\nimport { IssueRefChip } from '@/components/shared/issue-ref-chip'\nimport { cn } from '@/lib/utils'\nimport { fmtTime, timeAgo } from '@/lib/display'\nimport type { AgentIssueActivitySummary, IssueActivityAction, IssueRef } from '@/lib/issue-types'\n\nconst ISSUE_ACTION_LABEL: Record<IssueActivityAction, string> = {\n read: 'read',\n edit: 'edited',\n done: 'completed',\n}\n\n// 'completed' is the meaningful terminal action — tint it with the success token\n// so it pops at a glance; read/edit stay neutral outline. Same emerald used for\n// open status and live teams (no new colors).\nconst ISSUE_ACTION_CLASS: Partial<Record<IssueActivityAction, string>> = {\n done: 'border-emerald-500/30 bg-emerald-500/10 text-emerald-300',\n}\n\n// Stable reference for the empty case: a selector that returns a fresh `[]`\n// each render breaks Zustand v5's useSyncExternalStore snapshot equality and\n// loops (\"Maximum update depth exceeded\"). Same pattern as EMPTY_AGENT_CHAT_WINDOW.\nconst EMPTY_ISSUE_ACTIVITY: AgentIssueActivitySummary[] = []\n\ninterface GroupedIssueActivity {\n issueRef: IssueRef\n actions: Array<{ action: IssueActivityAction; count: number; firstAt: number; lastAt: number }>\n lastAt: number\n}\n\nfunction groupIssueActivity(items: AgentIssueActivitySummary[]): GroupedIssueActivity[] {\n const byIssue = new Map<string, GroupedIssueActivity>()\n for (const item of items) {\n const current = byIssue.get(item.issueRef.id)\n const action = { action: item.action, count: item.count, firstAt: item.firstAt, lastAt: item.lastAt }\n if (current) {\n current.actions.push(action)\n current.lastAt = Math.max(current.lastAt, item.lastAt)\n } else {\n byIssue.set(item.issueRef.id, { issueRef: item.issueRef, actions: [action], lastAt: item.lastAt })\n }\n }\n return [...byIssue.values()].sort((a, b) => b.lastAt - a.lastAt || a.issueRef.id.localeCompare(b.issueRef.id))\n}\n\nexport function AgentIssuesPanel({ agentId, now }: { agentId: string; now: number }) {\n const fetchAgentIssueActivity = useRelayStore((s) => s.fetchAgentIssueActivity)\n const issueActivity = useRelayStore((s) => s.issueActivityByAgent[agentId] ?? EMPTY_ISSUE_ACTIVITY)\n const issueRefsById = useRelayStore((s) => s.issueRefsById)\n const loading = useRelayStore((s) => Boolean(s.issueLoading[`agent:${agentId}`]))\n const error = useRelayStore((s) => s.issueErrors[`agent:${agentId}`] ?? null)\n const grouped = useMemo(() => groupIssueActivity(issueActivity.map((item) => ({\n ...item,\n issueRef: issueRefsById[item.issueRef.id] ?? item.issueRef,\n }))), [issueActivity, issueRefsById])\n\n useEffect(() => {\n void fetchAgentIssueActivity(agentId)\n }, [agentId, fetchAgentIssueActivity])\n\n return (\n <>\n <Separator />\n <div>\n <div className=\"mb-2 flex items-center justify-between gap-2\">\n <h3 className=\"text-sm font-medium\">Issues</h3>\n {loading ? <Badge variant=\"secondary\" className=\"text-[10px]\">loading</Badge> : <Badge variant=\"secondary\" className=\"text-[10px]\">{grouped.length}</Badge>}\n </div>\n {error ? (\n <div className=\"text-xs text-destructive\">{error}</div>\n ) : grouped.length === 0 ? (\n <div className=\"text-xs text-muted-foreground\">No issue activity recorded for this agent.</div>\n ) : (\n <div className=\"space-y-2\">\n {grouped.map((item) => (\n <div key={item.issueRef.id} className=\"rounded-md border border-border px-2.5 py-2 text-xs\">\n <div className=\"flex min-w-0 flex-wrap items-center justify-between gap-2\">\n <IssueRefChip issueRef={item.issueRef} now={now} />\n <span className=\"shrink-0 text-[10px] text-muted-foreground\" title={fmtTime(item.lastAt)}>{timeAgo(now, item.lastAt)}</span>\n </div>\n <div className=\"mt-1.5 flex flex-wrap gap-1\">\n {item.actions.map((action) => (\n <Badge key={action.action} variant=\"outline\" className={cn('text-[10px]', ISSUE_ACTION_CLASS[action.action])} title={`${action.count} event${action.count === 1 ? '' : 's'} since ${fmtTime(action.firstAt)}`}>\n {ISSUE_ACTION_LABEL[action.action]}{action.count > 1 ? ` ${action.count}` : ''}\n </Badge>\n ))}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n </>\n )\n}\n","export function terminalSessionForAgent(agent: { meta?: Record<string, unknown> } | null): string | null {\n const session = agent?.meta?.tmuxSession\n return typeof session === 'string' && session.trim() ? session : null\n}\n\nexport function orchestratorForAgentTerminal(\n agent: { id: string } | null,\n session: string,\n orchestrators: Array<{\n id: string\n status: 'online' | 'offline'\n managedAgents: Array<{ agentId: string; tmuxSession: string }>\n }>,\n) {\n if (!agent) return null\n return orchestrators.find((orchestrator) =>\n orchestrator.managedAgents.some((managed) =>\n managed.agentId === agent.id || managed.tmuxSession === session\n )\n ) ?? null\n}\n","import { AlertTriangle, CircleStop, FileText, Power, RotateCw } from 'lucide-react'\nimport { Button } from '@/components/ui/button'\nimport { displayName, agentSupportsControlAction } from '@/lib/display'\nimport type { StuckBusyHealth } from '@/lib/busy-health'\nimport type { Agent } from '@/types'\n\ninterface StuckBusyBannerProps {\n agent: Agent\n health: StuckBusyHealth\n showLogs: boolean\n setTab: (tab: 'overview' | 'timeline' | 'logs') => void\n openConfirm: (title: string, message: string, action: () => void | Promise<void>) => void\n doAgentAction: (agent: Agent, action: 'interrupt' | 'restart' | 'shutdown', component: string) => void | Promise<void>\n}\n\nexport function StuckBusyBanner({ agent, health, showLogs, setTab, openConfirm, doAgentAction }: StuckBusyBannerProps) {\n const canInterrupt = agentSupportsControlAction(agent, 'interrupt')\n const canRestart = agentSupportsControlAction(agent, 'restart')\n const canShutdown = agentSupportsControlAction(agent, 'shutdown')\n const work = health.activeWorkLabel || health.kind\n return (\n <div className=\"shrink-0 mx-4 mt-3 rounded-md border border-red-500/35 bg-red-500/10 px-3 py-2 text-xs text-red-100\">\n <div className=\"flex items-center gap-1.5 font-medium\"><AlertTriangle className=\"w-3.5 h-3.5\" />Stuck busy</div>\n <div className=\"mt-1 text-red-50/85\">\n No provider progress for {Math.max(1, Math.floor(health.staleForMs / 60_000))} min while {work} is active.\n </div>\n <div className=\"mt-2 flex flex-wrap gap-1.5\">\n {canInterrupt && <Button size=\"sm\" variant=\"outline\" className=\"h-7 text-xs\" onClick={() => doAgentAction(agent, 'interrupt', 'agent-detail-drawer')}><CircleStop className=\"w-3 h-3 mr-1\" />Interrupt</Button>}\n {canRestart && <Button size=\"sm\" variant=\"outline\" className=\"h-7 text-xs\" onClick={() => openConfirm('Restart Agent', `Restart ${displayName(agent)}?`, () => doAgentAction(agent, 'restart', 'agent-detail-drawer'))}><RotateCw className=\"w-3 h-3 mr-1\" />Restart</Button>}\n {canShutdown && <Button size=\"sm\" variant=\"outline\" className=\"h-7 text-xs\" onClick={() => openConfirm('Shutdown Agent', `Shutdown ${displayName(agent)}?`, () => doAgentAction(agent, 'shutdown', 'agent-detail-drawer'))}><Power className=\"w-3 h-3 mr-1\" />Shutdown</Button>}\n <Button size=\"sm\" variant=\"outline\" className=\"h-7 text-xs\" onClick={() => setTab(showLogs ? 'logs' : 'timeline')}><FileText className=\"w-3 h-3 mr-1\" />Diagnostics</Button>\n </div>\n </div>\n )\n}\n","import type { Agent, AgentTimelineEntry } from '@/types'\n\nexport interface ResumeCandidate {\n resumeId: string\n timestamp: number\n}\n\nexport function agentCanResume(agent: Agent | null | undefined): boolean {\n if (!agent || (agent.status !== 'offline' && agent.status !== 'stale')) return false\n const provider = typeof agent.meta?.provider === 'string' ? agent.meta.provider : agent.providerCapabilities?.model?.provider\n return Boolean(provider)\n}\n\nexport function latestResumeCandidate(entries: AgentTimelineEntry[]): ResumeCandidate | null {\n for (const entry of entries) {\n const metadata = entry.metadata\n const resumeId = typeof metadata?.claudeResumeId === 'string' ? metadata.claudeResumeId : ''\n if (resumeId) return { resumeId, timestamp: entry.ts }\n }\n return null\n}\n","import type { Agent } from '@/types'\nimport { displayName, isAgentStale } from './display'\n\nexport interface AgentLineageRow {\n agent: Agent\n depth: 0 | 1\n parent: Agent | null\n children: Agent[]\n}\n\nfunction isLiveChild(agent: Agent, now: number): boolean {\n return Boolean(agent.spawnedBy) && agent.status !== 'offline' && !isAgentStale(now, agent)\n}\n\nexport function liveChildrenByParent(agents: Agent[], now: number): Map<string, Agent[]> {\n const childrenByParent = new Map<string, Agent[]>()\n for (const agent of agents) {\n if (!agent.spawnedBy || !isLiveChild(agent, now)) continue\n const bucket = childrenByParent.get(agent.spawnedBy)\n if (bucket) bucket.push(agent)\n else childrenByParent.set(agent.spawnedBy, [agent])\n }\n return childrenByParent\n}\n\nexport function agentLineageRows(agents: Agent[], agentsById: Record<string, Agent>, now: number): AgentLineageRow[] {\n const visibleIds = new Set(agents.map((agent) => agent.id))\n const childrenByParent = liveChildrenByParent(agents, now)\n const rows: AgentLineageRow[] = []\n const emitted = new Set<string>()\n\n for (const agent of agents) {\n if (emitted.has(agent.id)) continue\n if (agent.spawnedBy && !isLiveChild(agent, now)) continue\n\n const parentVisible = Boolean(agent.spawnedBy && visibleIds.has(agent.spawnedBy))\n if (isLiveChild(agent, now) && parentVisible) continue\n\n const children = childrenByParent.get(agent.id) ?? []\n rows.push({\n agent,\n depth: 0,\n parent: agent.spawnedBy ? agentsById[agent.spawnedBy] ?? null : null,\n children,\n })\n emitted.add(agent.id)\n\n for (const child of children) {\n if (emitted.has(child.id)) continue\n rows.push({ agent: child, depth: 1, parent: agent, children: [] })\n emitted.add(child.id)\n }\n }\n\n return rows\n}\n\nexport function topLevelAgentsForTeamView(agents: Agent[], now: number): Agent[] {\n const visibleIds = new Set(agents.map((agent) => agent.id))\n return agents.filter((agent) => {\n if (agent.spawnedBy && !isLiveChild(agent, now)) return false\n return !isLiveChild(agent, now) || !agent.spawnedBy || !visibleIds.has(agent.spawnedBy)\n })\n}\n\nexport function sortedLiveChildren(children: Agent[]): Agent[] {\n return [...children].sort((a, b) => displayName(a).localeCompare(displayName(b)))\n}\n","import { useCallback, useEffect, useMemo, useState } from 'react'\nimport { isRecord } from 'agent-relay-sdk/types'\nimport type { CrashReport } from 'agent-relay-sdk/types'\nimport { useRelayStore, useNow } from '@/store'\nimport { api } from '@/lib/api'\nimport type { Agent, AgentActiveMemories, AgentTimelineEntry, ContextSnapshot, ContextState, Memory, Task } from '@/types'\nimport { usePairsByAgentId } from '@/hooks/use-selectors'\nimport { Sheet, SheetContent, SheetHeader, SheetTitle } from '@/components/ui/sheet'\nimport { Button } from '@/components/ui/button'\nimport { Badge } from '@/components/ui/badge'\nimport { Separator } from '@/components/ui/separator'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs'\nimport { StatusDot } from '@/components/shared/status-dot'\nimport { AgentTypeIcon } from '@/components/shared/agent-type-icon'\nimport { AgentRuntimeChips, ContextRing, agentHasContextTelemetry, contextTokenText } from '@/components/shared/agent-runtime-summary'\nimport { TerminalDialog } from '@/components/shared/terminal-viewer'\nimport { LogViewer } from '@/components/shared/log-viewer'\nimport { activeSubagents, displayName, displayTarget, timeAgo, fmtTime, messageBody, agentPresence, agentSupportsControlAction, agentCanBeForgotten, emptyAttention, toneToColor, userFacingCapabilities, providerRuntimeState, shortPath } from '@/lib/display'\nimport { agentStuckBusyHealth } from '@/lib/busy-health'\nimport { AgentDiagnostics } from '@/components/shared/agent-diagnostics'\nimport { CopyButton } from '@/components/shared/copy-button'\nimport { AgentProjectBadge } from '@/components/shared/agent-project-badge'\nimport { AgentIssuesPanel } from '@/components/drawers/agent-issues-panel'\nimport { orchestratorForAgentTerminal, terminalSessionForAgent } from '@/components/drawers/agent-terminal-helpers'\nimport { StuckBusyBanner } from '@/components/drawers/stuck-busy-banner'\nimport { agentCanResume, latestResumeCandidate, type ResumeCandidate } from '@/components/drawers/agent-resume'\nimport { liveChildrenByParent, sortedLiveChildren } from '@/lib/agent-lineage'\nimport { Send, Link, Edit3, Power, RotateCw, RefreshCw, MessageSquare, Trash2, Minimize2, Eraser, BrainCircuit, Terminal, FileText, AlertCircle, AlertTriangle, Activity, ArrowLeftRight, History, MoreHorizontal, PlayCircle, Users } from 'lucide-react'\nimport { TaskChip } from '@/components/shared/task-chip'\nimport { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/ui/dropdown-menu'\n\ninterface AgentTerminalSession {\n mode: 'live' | 'guest'\n orchestratorId: string\n session: string\n interactive: boolean\n expiresAt?: number\n}\n\ninterface ManagedSessionExitDiagnostics {\n lastError: string\n detectedAt?: number\n runtimeMs?: number\n logFile?: string\n logBytes?: number\n logEmpty?: boolean\n logTail?: string[]\n systemd?: {\n unit?: string\n activeState?: string\n subState?: string\n result?: string\n execMainCode?: string\n execMainStatus?: string\n }\n unavailable?: string[]\n}\n\nexport function AgentDetailDrawer() {\n const open = useRelayStore((s) => s.agentDetailOpen)\n const agentId = useRelayStore((s) => s.agentDetailId)\n const agentsById = useRelayStore((s) => s.agentsById)\n const messages = useRelayStore((s) => s.messages)\n const orchestrators = useRelayStore((s) => s.orchestrators)\n const fetchOrchestrators = useRelayStore((s) => s.fetchOrchestrators)\n const now = useNow()\n const set = useRelayStore((s) => s.set)\n const closeAgentDetail = useRelayStore((s) => s.closeAgentDetail)\n const openAgentDetail = useRelayStore((s) => s.openAgentDetail)\n const openComposeToAgent = useRelayStore((s) => s.openComposeToAgent)\n const openInboxThread = useRelayStore((s) => s.openInboxThread)\n const openRename = useRelayStore((s) => s.openRename)\n const openPairInvite = useRelayStore((s) => s.openPairInvite)\n const switchView = useRelayStore((s) => s.switchView)\n const openConfirm = useRelayStore((s) => s.openConfirm)\n const showError = useRelayStore((s) => s.showError)\n const showNotification = useRelayStore((s) => s.showNotification)\n const doAgentAction = useRelayStore((s) => s.doAgentAction)\n const doDeleteAgent = useRelayStore((s) => s.doDeleteAgent)\n const openFilesForAgent = useRelayStore((s) => s.openFilesForAgent)\n const openTaskDetail = useRelayStore((s) => s.openTaskDetail)\n const openTaskDetailById = useRelayStore((s) => s.openTaskDetailById)\n const [contextHistory, setContextHistory] = useState<ContextSnapshot[]>([])\n const [activeMemoryState, setActiveMemoryState] = useState<AgentActiveMemories | null>(null)\n const [crashReport, setCrashReport] = useState<CrashReport | null>(null)\n const [agentOwnedTasks, setAgentOwnedTasks] = useState<Task[]>([])\n const [tab, setTab] = useState<'overview' | 'timeline' | 'logs'>('overview')\n const [terminalOpen, setTerminalOpen] = useState(false)\n const [terminalTarget, setTerminalTarget] = useState<AgentTerminalSession | null>(null)\n const [terminalOpening, setTerminalOpening] = useState(false)\n const [resumeCandidate, setResumeCandidate] = useState<ResumeCandidate | null>(null)\n\n const livenessMismatches = useRelayStore((s) => s.livenessMismatches)\n const commandStalls = useRelayStore((s) => s.commandStalls)\n const agent = agentsById[agentId] || null\n const pairsMap = usePairsByAgentId()\n const pair = agent ? pairsMap[agent.id] ?? null : null\n const allAgents = useMemo(() => Object.values(agentsById), [agentsById])\n\n const detailMessages = useMemo(() => {\n if (!agentId) return []\n return messages.filter((m) => m.from === agentId || m.to === agentId).sort((a, b) => b.id - a.id).slice(0, 8)\n }, [messages, agentId])\n useEffect(() => {\n if (!open || !agent?.context) {\n setContextHistory([])\n return\n }\n let cancelled = false\n api<ContextSnapshot[]>('GET', '/agents/' + encodeURIComponent(agent.id) + '/context-snapshots?limit=24')\n .then((items) => { if (!cancelled) setContextHistory(items) })\n .catch(() => { if (!cancelled) setContextHistory([]) })\n return () => { cancelled = true }\n }, [open, agent?.id, agent?.context?.lastUpdatedAt])\n\n useEffect(() => {\n setResumeCandidate(null)\n if (!open || !agent || !agentCanResume(agent)) return\n let cancelled = false\n api<AgentTimelineEntry[]>('GET', '/agents/' + encodeURIComponent(agent.id) + '/timeline?limit=50')\n .then((entries) => {\n if (!cancelled) setResumeCandidate(latestResumeCandidate(entries))\n })\n .catch(() => { if (!cancelled) setResumeCandidate(null) })\n return () => { cancelled = true }\n }, [open, agent?.id, agent?.status, agent?.meta?.provider])\n\n useEffect(() => {\n if (!open || !agent) {\n setActiveMemoryState(null)\n return\n }\n let cancelled = false\n api<AgentActiveMemories>('GET', '/agents/' + encodeURIComponent(agent.id) + '/active-memories')\n .then((state) => { if (!cancelled) setActiveMemoryState(state) })\n .catch(() => { if (!cancelled) setActiveMemoryState(null) })\n return () => { cancelled = true }\n }, [open, agent?.id])\n\n useEffect(() => {\n if (!open || !agent) {\n setCrashReport(null)\n return\n }\n let cancelled = false\n api<{ agentId: string; report: CrashReport | null }>('GET', '/agents/' + encodeURIComponent(agent.id) + '/crash-report')\n .then((res) => { if (!cancelled) setCrashReport(res.report) })\n .catch(() => { if (!cancelled) setCrashReport(null) })\n return () => { cancelled = true }\n }, [open, agent?.id])\n\n useEffect(() => {\n if (!open || !agent) {\n setAgentOwnedTasks([])\n return\n }\n let cancelled = false\n api<Task[]>('GET', '/tasks?kind=deliverable&ownerAgentId=' + encodeURIComponent(agent.id) + '&limit=50')\n .then((tasks) => { if (!cancelled) setAgentOwnedTasks(tasks) })\n .catch(() => { if (!cancelled) setAgentOwnedTasks([]) })\n return () => { cancelled = true }\n }, [open, agent?.id])\n\n useEffect(() => {\n setTab('overview')\n setTerminalOpen(false)\n setTerminalTarget(null)\n }, [agentId])\n\n useEffect(() => {\n if (open && agent?.meta?.tmuxSession && orchestrators.length === 0) void fetchOrchestrators()\n }, [open, agent?.id, agent?.meta?.tmuxSession, orchestrators.length])\n\n async function clearActiveMemories() {\n if (!agent) return\n try {\n const result = await api<{ supported: boolean; cleared: boolean }>('DELETE', '/agents/' + encodeURIComponent(agent.id) + '/active-memories')\n if (!result.supported) {\n showError('Memory Clear Unavailable', 'The active memory broker does not support clearing active memories.')\n return\n }\n setActiveMemoryState({ agentId: agent.id, supported: true, memories: [], total: 0 })\n showNotification('Active memories cleared')\n } catch (e) { showError('Memory Clear Failed', (e as Error).message) }\n }\n\n async function openTerminalSession() {\n if (!agent || terminalOpening) return\n setTerminalOpening(true)\n try {\n const session = await api<AgentTerminalSession>('POST', '/agents/' + encodeURIComponent(agent.id) + '/terminal-session')\n setTerminalTarget(session)\n setTerminalOpen(true)\n } catch (e) {\n showError('Terminal Failed', (e as Error).message)\n } finally {\n setTerminalOpening(false)\n }\n }\n\n async function closeTerminalSession(open: boolean) {\n if (open) {\n setTerminalOpen(true)\n return\n }\n setTerminalOpen(false)\n const target = terminalTarget\n setTerminalTarget(null)\n if (agent && target?.mode === 'guest') {\n try {\n await api('DELETE', '/agents/' + encodeURIComponent(agent.id) + '/terminal-session/' + encodeURIComponent(target.session))\n } catch {}\n }\n }\n\n if (!agent) return (\n <Sheet open={open} onOpenChange={(o) => !o && closeAgentDetail()}>\n <SheetContent className=\"w-full max-w-[100dvw] sm:max-w-md lg:max-w-lg\"><SheetHeader><SheetTitle>Agent</SheetTitle></SheetHeader></SheetContent>\n </Sheet>\n )\n\n const presence = agentPresence(now, agent, emptyAttention(), pair)\n const canRestart = agentSupportsControlAction(agent, 'restart')\n const canShutdown = agentSupportsControlAction(agent, 'shutdown')\n const canReconnect = agentSupportsControlAction(agent, 'reconnect')\n const canCompact = agentSupportsControlAction(agent, 'compact')\n const canClearContext = agentSupportsControlAction(agent, 'clearContext')\n const canResume = Boolean(resumeCandidate && agentCanResume(agent))\n const canForget = agentCanBeForgotten(agent)\n const runtimePackage = runtimePackageMetadata(agent.meta?.package)\n const runtimeContracts = runtimeContractEntries(agent.meta?.contracts)\n const runtime = agent.providerCapabilities\n const providerState = providerRuntimeState(agent)\n const contextTokens = contextTokenText(agent)\n const subagents = activeSubagents(agent)\n const terminalSession = terminalSessionForAgent(agent)\n const terminalOrchestrator = terminalSession ? orchestratorForAgentTerminal(agent, terminalSession, orchestrators) : null\n const canReadTerminal = Boolean(terminalSession && terminalOrchestrator?.status === 'online' && agent.providerCapabilities?.terminal?.live?.read)\n const canWriteTerminal = Boolean(canReadTerminal && agent.providerCapabilities?.terminal?.live?.write)\n const canAttachTerminal = agent.providerCapabilities?.terminal?.attach?.create === true\n const canOpenTerminal = canReadTerminal || canAttachTerminal\n const lastExit = lastExitDiagnostics(agent.meta?.lastExit)\n const lastError = typeof agent.meta?.lastError === 'string' ? agent.meta.lastError : lastExit?.lastError\n const parentAgent = agent.spawnedBy ? agentsById[agent.spawnedBy] ?? null : null\n const childAgents = sortedLiveChildren(liveChildrenByParent(allAgents, now).get(agent.id) ?? [])\n\n // Liveness reconciliation: the SSE-driven mismatch (server saw a process running\n // while the relay said offline) OR the client-derivable symptom — relay marks the\n // agent offline yet a live terminal session is still reachable. Either way the two\n // truths disagree and the user should be told rather than shown a stale status.\n const livenessMismatch = livenessMismatches[agent.id] ?? null\n const offlineButReachable = (presence.tone === 'offline' || presence.tone === 'stale') && canReadTerminal\n const showLiveness = Boolean(livenessMismatch) || offlineButReachable\n // A /compact or /clear whose keystrokes were delivered but never produced a\n // real provider hook — likely landed in a menu instead of the prompt.\n const commandStall = commandStalls[agent.id] ?? null\n const stuckBusy = agentStuckBusyHealth(now, agent)\n const DONE_STATUSES = new Set(['done', 'failed', 'canceled'])\n const activeAgentTask = agentOwnedTasks.find((t) => !DONE_STATUSES.has(t.status)) ?? null\n const sortedAgentTasks = [\n ...agentOwnedTasks.filter((t) => !DONE_STATUSES.has(t.status)),\n ...agentOwnedTasks.filter((t) => DONE_STATUSES.has(t.status)),\n ]\n\n return (\n <>\n <Sheet open={open} onOpenChange={(o) => !o && closeAgentDetail()}>\n <SheetContent className=\"w-full max-w-[100dvw] sm:max-w-md lg:max-w-lg p-0\">\n <SheetHeader className=\"shrink-0 p-4 border-b border-border\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <StatusDot agent={agent} now={now} />\n <AgentTypeIcon agent={agent} />\n <SheetTitle className=\"text-base truncate\">{displayName(agent)}</SheetTitle>\n {agentHasContextTelemetry(agent) && <ContextRing context={agent.context} expected />}\n </div>\n <AgentRuntimeChips agent={agent} className=\"mt-2\" />\n </SheetHeader>\n\n <div className=\"shrink-0 flex flex-wrap items-center gap-2 p-4 border-b border-border\">\n <Button size=\"sm\" variant=\"outline\" onClick={() => { openComposeToAgent(agent); closeAgentDetail() }}><Send className=\"w-3 h-3 mr-1\" />Message</Button>\n <Button size=\"sm\" variant=\"outline\" onClick={() => { openInboxThread(agent.id); switchView('chat'); closeAgentDetail() }}><MessageSquare className=\"w-3 h-3 mr-1\" />Chat</Button>\n <Button size=\"sm\" variant=\"outline\" onClick={() => { openPairInvite(agent.id); closeAgentDetail() }}><Link className=\"w-3 h-3 mr-1\" />Pair</Button>\n {canOpenTerminal && <Button size=\"sm\" variant=\"outline\" className=\"hidden sm:inline-flex px-2\" disabled={terminalOpening} title={canAttachTerminal ? 'Open guest terminal' : 'Open live terminal'} onClick={() => void openTerminalSession()}><Terminal className=\"w-3.5 h-3.5\" /></Button>}\n {canResume && <Button size=\"sm\" variant=\"outline\" className=\"hidden sm:inline-flex px-2\" title=\"Resume session\" onClick={() => openConfirm('Resume Session', `Resume ${displayName(agent)} from session ${resumeCandidate?.resumeId}? This can reload a large prior context and consume tokens.`, () => doAgentAction(agent, 'resume', 'agent-detail-drawer'))}><PlayCircle className=\"w-3.5 h-3.5\" /></Button>}\n {canCompact && <Button size=\"sm\" variant=\"outline\" className=\"hidden sm:inline-flex px-2\" title=\"Compact context\" onClick={() => openConfirm('Compact Agent', `Compact context for ${displayName(agent)}?`, () => doAgentAction(agent, 'compact', 'agent-detail-drawer'))}><Minimize2 className=\"w-3.5 h-3.5\" /></Button>}\n {canRestart && <Button size=\"sm\" variant=\"outline\" className=\"hidden sm:inline-flex px-2\" title=\"Restart\" onClick={() => openConfirm('Restart Agent', `Restart ${displayName(agent)}?`, () => doAgentAction(agent, 'restart', 'agent-detail-drawer'))}><RotateCw className=\"w-3.5 h-3.5\" /></Button>}\n {canShutdown && <Button size=\"sm\" variant=\"outline\" className=\"hidden sm:inline-flex px-2\" title=\"Shutdown\" onClick={() => openConfirm('Shutdown Agent', `Shutdown ${displayName(agent)}?`, () => doAgentAction(agent, 'shutdown', 'agent-detail-drawer'))}><Power className=\"w-3.5 h-3.5\" /></Button>}\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button size=\"sm\" variant=\"outline\" className=\"px-2\"><MoreHorizontal className=\"w-3.5 h-3.5\" /></Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n {canOpenTerminal && <DropdownMenuItem className=\"sm:hidden\" disabled={terminalOpening} onClick={() => void openTerminalSession()}><Terminal className=\"w-3.5 h-3.5\" />Terminal</DropdownMenuItem>}\n {canResume && <DropdownMenuItem className=\"sm:hidden\" onClick={() => openConfirm('Resume Session', `Resume ${displayName(agent)} from session ${resumeCandidate?.resumeId}? This can reload a large prior context and consume tokens.`, () => doAgentAction(agent, 'resume', 'agent-detail-drawer'))}><PlayCircle className=\"w-3.5 h-3.5\" />Resume</DropdownMenuItem>}\n {canCompact && <DropdownMenuItem className=\"sm:hidden\" onClick={() => openConfirm('Compact Agent', `Compact context for ${displayName(agent)}?`, () => doAgentAction(agent, 'compact', 'agent-detail-drawer'))}><Minimize2 className=\"w-3.5 h-3.5\" />Compact</DropdownMenuItem>}\n {canRestart && <DropdownMenuItem className=\"sm:hidden\" onClick={() => openConfirm('Restart Agent', `Restart ${displayName(agent)}?`, () => doAgentAction(agent, 'restart', 'agent-detail-drawer'))}><RotateCw className=\"w-3.5 h-3.5\" />Restart</DropdownMenuItem>}\n {canShutdown && <DropdownMenuItem className=\"sm:hidden\" onClick={() => openConfirm('Shutdown Agent', `Shutdown ${displayName(agent)}?`, () => doAgentAction(agent, 'shutdown', 'agent-detail-drawer'))}><Power className=\"w-3.5 h-3.5\" />Shutdown</DropdownMenuItem>}\n {(canOpenTerminal || canResume || canCompact || canRestart || canShutdown) && <DropdownMenuSeparator className=\"sm:hidden\" />}\n <DropdownMenuItem onClick={() => openRename(agent)}><Edit3 className=\"w-3.5 h-3.5\" />Rename</DropdownMenuItem>\n {canReconnect && <DropdownMenuItem onClick={() => openConfirm('Reconnect Agent', `Reconnect ${displayName(agent)}?`, () => doAgentAction(agent, 'reconnect', 'agent-detail-drawer'))}><RefreshCw className=\"w-3.5 h-3.5\" />Reconnect</DropdownMenuItem>}\n {canClearContext && <DropdownMenuItem onClick={() => openConfirm('Clear Context', `Clear context for ${displayName(agent)}?`, () => doAgentAction(agent, 'clearContext', 'agent-detail-drawer'))}><Eraser className=\"w-3.5 h-3.5\" />Clear Context</DropdownMenuItem>}\n {canForget && <><DropdownMenuSeparator /><DropdownMenuItem variant=\"destructive\" onClick={() => openConfirm('Forget Agent', `Forget ${displayName(agent)}?`, () => doDeleteAgent(agent.id))}><Trash2 className=\"w-3.5 h-3.5\" />Forget</DropdownMenuItem></>}\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n\n {showLiveness && (\n <div className=\"shrink-0 mx-4 mt-3 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-100\">\n <div className=\"flex items-center gap-1.5 font-medium\"><AlertTriangle className=\"w-3.5 h-3.5\" />Liveness mismatch</div>\n <div className=\"mt-1 text-amber-50/85\">\n {livenessMismatch?.detail ?? 'Relay marks this agent offline, but a live terminal session is still reachable — the process may still be running.'}\n </div>\n {canOpenTerminal && (\n <Button size=\"sm\" variant=\"outline\" className=\"mt-2 h-7 text-xs\" disabled={terminalOpening} onClick={() => void openTerminalSession()}><Terminal className=\"w-3 h-3 mr-1\" />Open terminal</Button>\n )}\n </div>\n )}\n\n {commandStall && (\n <div className=\"shrink-0 mx-4 mt-3 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-100\">\n <div className=\"flex items-center gap-1.5 font-medium\"><AlertTriangle className=\"w-3.5 h-3.5\" />{commandStall.kind === 'clear' ? 'Context clear stalled' : 'Compaction stalled'}</div>\n <div className=\"mt-1 text-amber-50/85\">\n {commandStall.detail}\n </div>\n {canOpenTerminal && (\n <Button size=\"sm\" variant=\"outline\" className=\"mt-2 h-7 text-xs\" disabled={terminalOpening} onClick={() => void openTerminalSession()}><Terminal className=\"w-3 h-3 mr-1\" />Open terminal</Button>\n )}\n </div>\n )}\n\n {stuckBusy && <StuckBusyBanner agent={agent} health={stuckBusy} showLogs={Boolean(terminalSession)} setTab={setTab} openConfirm={openConfirm} doAgentAction={doAgentAction} />}\n\n <Tabs value={tab} onValueChange={(v) => setTab(v as 'overview' | 'timeline' | 'logs')} className=\"flex-1 min-h-0 gap-0\">\n <TabsList variant=\"line\" className=\"w-full shrink-0 px-4 pt-2\">\n <TabsTrigger value=\"overview\">Overview</TabsTrigger>\n <TabsTrigger value=\"timeline\"><History className=\"w-3.5 h-3.5\" />Timeline</TabsTrigger>\n <TabsTrigger value=\"logs\"><FileText className=\"w-3.5 h-3.5\" />Logs</TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"overview\" className=\"min-h-0 overflow-y-auto overflow-x-hidden\">\n <div className=\"p-4 space-y-4 min-w-0\">\n\n <div>\n <h3 className=\"text-sm font-medium mb-2\">Status</h3>\n <div className=\"space-y-1 text-sm min-w-0\">\n <div className=\"flex justify-between gap-2 min-w-0\"><span className=\"text-muted-foreground shrink-0\">State</span><Badge className={toneToColor(presence.tone)}>{presence.label}</Badge></div>\n {activeAgentTask && (\n <div className=\"flex items-center justify-between gap-2 min-w-0\">\n <span className=\"text-muted-foreground shrink-0\">Working on</span>\n <TaskChip id={activeAgentTask.id} title={activeAgentTask.title} status={activeAgentTask.status} onClick={() => openTaskDetail(activeAgentTask)} />\n </div>\n )}\n {providerState?.recommendedAction && (\n <div className=\"rounded-md border border-red-500/20 bg-red-500/10 px-2.5 py-2 text-xs text-red-200\">\n <div className=\"flex items-center gap-1.5 font-medium\"><AlertCircle className=\"w-3.5 h-3.5\" />Recommended action</div>\n <div className=\"mt-1 text-red-100/80\">{providerState.recommendedAction}</div>\n </div>\n )}\n {lastError && (\n <div className=\"rounded-md border border-amber-500/25 bg-amber-500/10 px-2.5 py-2 text-xs text-amber-100\">\n <div className=\"flex items-center gap-1.5 font-medium\"><AlertCircle className=\"w-3.5 h-3.5\" />Last launch error</div>\n <div className=\"mt-1 break-words text-amber-50/85\">{lastError}</div>\n {lastExit && (\n <div className=\"mt-2 grid grid-cols-2 gap-x-3 gap-y-1 text-amber-50/70\">\n {lastExit.detectedAt && <div><span className=\"text-amber-100/55\">Detected</span><div>{timeAgo(now, lastExit.detectedAt)}</div></div>}\n {typeof lastExit.runtimeMs === 'number' && <div><span className=\"text-amber-100/55\">Runtime</span><div>{Math.max(0, Math.round(lastExit.runtimeMs / 1000))}s</div></div>}\n {lastExit.systemd?.unit && <div className=\"col-span-2 min-w-0\"><span className=\"text-amber-100/55\">Unit</span><div className=\"truncate font-mono\">{lastExit.systemd.unit}</div></div>}\n {lastExit.systemd && <div><span className=\"text-amber-100/55\">Systemd</span><div>{[lastExit.systemd.activeState, lastExit.systemd.subState].filter(Boolean).join('/') || 'unknown'}</div></div>}\n {lastExit.systemd?.result && <div><span className=\"text-amber-100/55\">Result</span><div>{lastExit.systemd.result}</div></div>}\n {lastExit.logFile && <div className=\"col-span-2 min-w-0\"><span className=\"text-amber-100/55\">Log</span><div className=\"truncate font-mono\">{lastExit.logFile} ({lastExit.logBytes ?? 'unknown'} bytes{lastExit.logEmpty ? ', empty' : ''})</div></div>}\n </div>\n )}\n {lastExit?.logTail?.length ? (\n <pre className=\"mt-2 max-h-28 overflow-auto whitespace-pre-wrap break-words rounded border border-amber-500/15 bg-black/20 p-2 text-[11px] text-amber-50/75\">{lastExit.logTail.slice(-5).join('\\n')}</pre>\n ) : null}\n {lastExit?.unavailable?.length ? <div className=\"mt-1 text-amber-50/55\">{lastExit.unavailable.join('; ')}</div> : null}\n </div>\n )}\n <div className=\"grid grid-cols-2 gap-x-3 gap-y-1 pt-0.5 text-xs\">\n <div><span className=\"text-muted-foreground\">Last seen</span><div>{timeAgo(now, agent.lastSeen)}</div></div>\n <div><span className=\"text-muted-foreground\">Created</span><div title={fmtTime(agent.createdAt)}>{timeAgo(now, agent.createdAt)}</div></div>\n </div>\n </div>\n </div>\n\n {sortedAgentTasks.length > 0 && (\n <>\n <Separator />\n <div>\n <h3 className=\"text-sm font-medium mb-2\">Tasks</h3>\n <div className=\"flex flex-wrap gap-1.5\">\n {sortedAgentTasks.map((task) => (\n <TaskChip key={task.id} id={task.id} title={task.title} status={task.status} compact onClick={() => openTaskDetailById(task.id)} />\n ))}\n </div>\n </div>\n </>\n )}\n\n {crashReport && (\n <>\n <Separator />\n <CrashReportPanel report={crashReport} now={now} />\n </>\n )}\n\n {agent.context && (\n <>\n <Separator />\n <ContextCard context={agent.context} tokens={contextTokens} history={contextHistory} now={now} />\n </>\n )}\n\n <AgentIssuesPanel agentId={agent.id} now={now} />\n\n {(agent.spawnedBy || childAgents.length > 0 || pair) && (\n <>\n <Separator />\n <div>\n <h3 className=\"text-sm font-medium mb-2\">Relationships</h3>\n <div className=\"space-y-2\">\n {agent.spawnedBy && (\n <div className=\"rounded-md border border-border p-2 text-xs\">\n <div className=\"mb-1 text-muted-foreground\">Spawned by</div>\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-2 rounded px-1 py-1 text-left hover:bg-muted/50 disabled:pointer-events-none disabled:opacity-60\"\n disabled={!parentAgent}\n onClick={() => parentAgent && openAgentDetail(parentAgent)}\n >\n {parentAgent ? <><StatusDot agent={parentAgent} now={now} /><AgentTypeIcon agent={parentAgent} /><span className=\"truncate font-medium\">{displayName(parentAgent)}</span></> : <span className=\"truncate font-mono\">{agent.spawnedBy}</span>}\n </button>\n </div>\n )}\n {childAgents.length > 0 && (\n <div className=\"rounded-md border border-border p-2 text-xs\">\n <div className=\"mb-1 flex items-center justify-between gap-2\">\n <span className=\"text-muted-foreground\">Children</span>\n <Badge variant=\"secondary\" className=\"h-4 px-1.5 text-[9px]\">{childAgents.length}</Badge>\n </div>\n <div className=\"space-y-1\">\n {childAgents.map((child) => (\n <button\n key={child.id}\n type=\"button\"\n className=\"flex w-full items-center gap-2 rounded px-1 py-1 text-left hover:bg-muted/50\"\n onClick={() => openAgentDetail(child)}\n >\n <StatusDot agent={child} now={now} />\n <AgentTypeIcon agent={child} />\n <span className=\"min-w-0 flex-1 truncate font-medium\">{displayName(child)}</span>\n <span className=\"shrink-0 text-muted-foreground\">{child.status}</span>\n </button>\n ))}\n </div>\n </div>\n )}\n {agent.spawnedBy && childAgents.length === 0 && (\n <div className=\"flex items-center gap-1.5 text-[11px] text-muted-foreground\">\n <Users className=\"h-3.5 w-3.5\" />\n No live child agents\n </div>\n )}\n {pair && (\n <div className=\"rounded-md border border-border p-2 text-xs\">\n <div className=\"mb-1 flex items-center justify-between gap-2\">\n <span className=\"text-muted-foreground\">Pair</span>\n <Badge className={pair.status === 'active' ? 'bg-emerald-500/20 text-emerald-400' : 'bg-yellow-500/20 text-yellow-400'}>{pair.status}</Badge>\n </div>\n {pair.objective && <p className=\"text-muted-foreground\">{pair.objective}</p>}\n </div>\n )}\n </div>\n </div>\n </>\n )}\n\n {(runtime || subagents.length > 0) && (\n <>\n <Separator />\n <div>\n <h3 className=\"text-sm font-medium mb-2\">Runtime</h3>\n <div className=\"space-y-2 text-sm\">\n {providerState && (\n <div className=\"grid grid-cols-2 gap-x-3 gap-y-1\">\n <div><span className=\"text-muted-foreground\">Provider state</span><div>{providerState.state}</div></div>\n {providerState.reason && <div><span className=\"text-muted-foreground\">Reason</span><div>{providerState.reason}</div></div>}\n {providerState.source && <div><span className=\"text-muted-foreground\">Source</span><div>{providerState.source}</div></div>}\n {providerState.updatedAt && <div><span className=\"text-muted-foreground\">Updated</span><div>{timeAgo(now, providerState.updatedAt)}</div></div>}\n </div>\n )}\n {runtime?.model && (\n <div className=\"space-y-1\">\n {runtime.model.provider && <div className=\"flex justify-between gap-2 min-w-0\"><span className=\"text-muted-foreground shrink-0\">Provider</span><span className=\"truncate\">{runtime.model.provider}</span></div>}\n {(runtime.model.alias || runtime.model.id) && <div className=\"flex justify-between gap-2 min-w-0\"><span className=\"text-muted-foreground shrink-0\">Model</span><span className=\"truncate\">{runtime.model.alias || runtime.model.id}</span></div>}\n {runtime.model.effort && <div className=\"flex justify-between gap-2 min-w-0\"><span className=\"text-muted-foreground shrink-0\">Effort</span><span className=\"truncate\">{runtime.model.effort}</span></div>}\n </div>\n )}\n {runtime?.session && (\n <div className=\"grid grid-cols-2 gap-x-3 gap-y-1\">\n {runtime.session.approvalMode && <div><span className=\"text-muted-foreground\">Mode</span><div>{runtime.session.approvalMode}</div></div>}\n <div><span className=\"text-muted-foreground\">Files</span><div>{runtime.session.fileWrite ? 'read/write' : runtime.session.fileRead ? 'read-only' : 'none'}</div></div>\n <div><span className=\"text-muted-foreground\">Shell</span><div>{runtime.session.shell ? 'yes' : 'no'}</div></div>\n <div><span className=\"text-muted-foreground\">Confidence</span><div>{runtime.confidence}</div></div>\n </div>\n )}\n {runtime?.lifecycle && (\n <div>\n <span className=\"text-muted-foreground\">Lifecycle</span>\n <div className=\"flex flex-wrap gap-1 mt-1\">\n <Badge variant={runtime.lifecycle.managed ? 'secondary' : 'outline'} className=\"text-[10px]\">{runtime.lifecycle.managed ? 'managed' : 'bridge'}</Badge>\n {runtime.lifecycle.shutdownHard && <Badge variant=\"outline\" className=\"text-[10px]\">shutdown</Badge>}\n {runtime.lifecycle.restartHard && <Badge variant=\"outline\" className=\"text-[10px]\">restart</Badge>}\n {runtime.lifecycle.reconnect && <Badge variant=\"outline\" className=\"text-[10px]\">reconnect</Badge>}\n </div>\n </div>\n )}\n {subagents.length > 0 && (\n <div>\n <span className=\"text-muted-foreground\">Subagents</span>\n <div className=\"space-y-1 mt-1\">\n {subagents.map((subagent) => (\n <div key={subagent.id} className=\"flex justify-between gap-2 text-xs rounded border border-border px-2 py-1\">\n <span className=\"truncate\">{subagent.label}</span>\n {subagent.role && <span className=\"text-muted-foreground shrink-0\">{subagent.role}</span>}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n </div>\n </>\n )}\n\n {activeMemoryState && (\n <>\n <Separator />\n <div>\n <div className=\"flex items-center justify-between gap-2 mb-2\">\n <h3 className=\"text-sm font-medium flex items-center gap-1.5\">\n <BrainCircuit className=\"w-3.5 h-3.5 text-muted-foreground\" />\n Memory\n </h3>\n <div className=\"flex items-center gap-1.5\">\n {activeMemoryState.supported && <Badge variant=\"secondary\" className=\"text-[10px]\">{activeMemoryState.memories.length}</Badge>}\n {activeMemoryState.supported && activeMemoryState.memories.length > 0 && (\n <Button size=\"sm\" variant=\"outline\" className=\"h-7 text-xs gap-1\" onClick={() => openConfirm('Clear Active Memories', `Clear active memories for ${displayName(agent)}?`, clearActiveMemories)}>\n <Eraser className=\"w-3 h-3\" />\n Clear\n </Button>\n )}\n </div>\n </div>\n {!activeMemoryState.supported ? (\n <div className=\"text-xs text-muted-foreground\">Active memory list unavailable</div>\n ) : activeMemoryState.memories.length === 0 ? (\n <div className=\"text-xs text-muted-foreground\">No active memories</div>\n ) : (\n <div className=\"space-y-2\">\n {activeMemoryState.memories.map((memory) => (\n <ActiveMemoryRow key={memory.id} memory={memory} now={now} onOpen={() => { set({ selectedMemoryId: memory.id }); switchView('memory'); closeAgentDetail() }} />\n ))}\n </div>\n )}\n </div>\n </>\n )}\n\n {agent.meta?.runnerManaged === true && (\n <>\n <Separator />\n <AgentDiagnostics agent={agent} orchestrators={orchestrators} />\n </>\n )}\n\n <Separator />\n <div>\n <h3 className=\"text-sm font-medium mb-2\">Identity</h3>\n <div className=\"space-y-2.5 text-sm min-w-0\">\n <MonoRow label=\"Agent ID\" value={agent.id} copyLabel=\"Copy agent ID\" />\n {typeof agent.meta?.cwd === 'string' && agent.meta.cwd && (\n <MonoRow\n label=\"Working dir\"\n value={agent.meta.cwd}\n copyLabel=\"Copy working dir\"\n title={`Open ${agent.meta.cwd} in Files`}\n onClick={() => { closeAgentDetail(); void openFilesForAgent(agent) }}\n />\n )}\n <AgentProjectBadge agent={agent} onNavigate={closeAgentDetail} />\n {(agent.machine || agent.rig || runtimePackage) && (\n <div className=\"grid grid-cols-2 gap-x-3 gap-y-1.5 text-xs\">\n {agent.machine && <div className=\"min-w-0\"><span className=\"text-muted-foreground\">Machine</span><div className=\"truncate\" title={agent.machine}>{agent.machine}</div></div>}\n {agent.rig && <div className=\"min-w-0\"><span className=\"text-muted-foreground\">Rig</span><div className=\"truncate\" title={agent.rig}>{agent.rig}</div></div>}\n {runtimePackage && <div className=\"col-span-2 min-w-0\"><span className=\"text-muted-foreground\">Package</span><div className=\"break-all font-mono\">{runtimePackage.name} v{runtimePackage.version}</div></div>}\n </div>\n )}\n {runtimeContracts.length > 0 && <div><span className=\"text-[11px] text-muted-foreground\">Contracts</span><div className=\"flex flex-wrap gap-1 mt-1\">{runtimeContracts.map(([name, version]) => <Badge key={name} variant=\"secondary\" className=\"text-[10px]\">{name}={version}</Badge>)}</div></div>}\n {agent.tags.length > 0 && <div><span className=\"text-[11px] text-muted-foreground\">Tags</span><div className=\"flex flex-wrap gap-1 mt-1\">{agent.tags.map((t) => <Badge key={t} variant=\"outline\" className=\"text-[10px]\">{t}</Badge>)}</div></div>}\n {userFacingCapabilities(agent.capabilities).length > 0 && <div><span className=\"text-[11px] text-muted-foreground\">Capabilities</span><div className=\"flex flex-wrap gap-1 mt-1\">{userFacingCapabilities(agent.capabilities).map((c) => <Badge key={c} variant=\"secondary\" className=\"text-[10px]\">{c}</Badge>)}</div></div>}\n </div>\n </div>\n\n {detailMessages.length > 0 && (\n <>\n <Separator />\n <details className=\"group\">\n <summary className=\"flex cursor-pointer list-none items-center justify-between gap-2 text-sm font-medium\">\n <span>Recent messages</span>\n <span className=\"text-[11px] font-normal text-muted-foreground\">{detailMessages.length} <span className=\"group-open:hidden\">· show</span><span className=\"hidden group-open:inline\">· hide</span></span>\n </summary>\n <div className=\"mt-2 space-y-2\">\n {detailMessages.map((msg) => (\n <div key={msg.id} className=\"rounded border border-border p-2 text-xs space-y-0.5 min-w-0\">\n <div className=\"flex items-center gap-1 text-muted-foreground min-w-0\">\n <span className=\"font-medium text-foreground truncate shrink-0 max-w-[40%]\">{displayTarget(msg.from, agentsById)}</span>\n <span className=\"shrink-0\">→</span>\n <span className=\"truncate max-w-[40%]\">{displayTarget(msg.to, agentsById)}</span>\n <span className=\"ml-auto shrink-0 text-[10px]\"><span className=\"opacity-40 mr-1\">#{msg.id}</span>{timeAgo(now, msg.createdAt)}</span>\n </div>\n <div className=\"text-foreground whitespace-pre-wrap break-words line-clamp-3\">{messageBody(msg)}</div>\n </div>\n ))}\n </div>\n </details>\n </>\n )}\n </div>\n </TabsContent>\n\n <TabsContent value=\"timeline\" className=\"min-h-0 overflow-y-auto overflow-x-hidden\">\n <AgentTimeline agentId={agent.id} open={open && tab === 'timeline'} now={now} />\n </TabsContent>\n\n <TabsContent value=\"logs\" className=\"min-h-0 overflow-y-auto overflow-x-hidden\">\n {terminalSession && terminalOrchestrator ? (\n <div className=\"p-4\">\n <LogViewer orchestratorId={terminalOrchestrator.id} session={terminalSession} />\n </div>\n ) : (\n <div className=\"p-4 text-sm text-muted-foreground\">No session logs available for this agent.</div>\n )}\n </TabsContent>\n </Tabs>\n </SheetContent>\n </Sheet>\n {terminalTarget && (\n <TerminalDialog open={terminalOpen} onOpenChange={(next) => void closeTerminalSession(next)} orchestratorId={terminalTarget.orchestratorId} session={terminalTarget.session} interactive={terminalTarget.interactive || canWriteTerminal} canWrite={canWriteTerminal} />\n )}\n </>\n )\n}\n\nfunction ActiveMemoryRow({ memory, now, onOpen }: { memory: Memory; now: number; onOpen: () => void }) {\n const sensitivityClass = memory.sensitivity === 'secret'\n ? 'bg-red-500/10 text-red-400 border-red-500/30'\n : memory.sensitivity === 'sensitive'\n ? 'bg-yellow-500/10 text-yellow-400 border-yellow-500/30'\n : 'bg-zinc-500/10 text-zinc-400 border-zinc-500/30'\n return (\n <button onClick={onOpen} className=\"w-full rounded-md border border-border p-2 text-left text-xs hover:border-zinc-600 transition-colors\">\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"min-w-0\">\n <div className=\"flex flex-wrap gap-1 mb-1\">\n <Badge variant=\"secondary\" className=\"text-[10px]\">{memory.type}</Badge>\n <Badge variant=\"outline\" className=\"text-[10px] font-mono\">{memory.scope}</Badge>\n <Badge className={`text-[10px] ${sensitivityClass}`}>{memory.sensitivity}</Badge>\n </div>\n <div className=\"font-medium truncate\">{memory.title}</div>\n <div className=\"text-muted-foreground line-clamp-2 mt-0.5\">{memory.content}</div>\n </div>\n <div className=\"shrink-0 text-right text-[10px] text-muted-foreground\" title={fmtTime(memory.lastAccessedAt ?? memory.updatedAt)}>\n {timeAgo(now, memory.lastAccessedAt ?? memory.updatedAt)}\n </div>\n </div>\n </button>\n )\n}\n\nfunction contextTone(util: number): string {\n return util >= 0.8 ? 'text-red-400' : util >= 0.6 ? 'text-yellow-400' : 'text-emerald-400'\n}\n\n// A label/value row that stays readable on a narrow drawer: the label sits above\n// its value so long mono values (agent ids, cwd paths) wrap with break-all\n// instead of truncating to a handful of characters. Optional copy + click-through.\nfunction MonoRow({ label, value, onClick, title, copyLabel }: { label: string; value: string; onClick?: () => void; title?: string; copyLabel?: string }) {\n const valueClass = `block w-full break-all text-left font-mono text-xs leading-snug ${onClick ? 'text-muted-foreground transition-colors hover:text-foreground' : 'text-foreground'}`\n return (\n <div className=\"min-w-0 space-y-0.5\">\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"text-[11px] uppercase tracking-wide text-muted-foreground\">{label}</span>\n <CopyButton value={value} label={copyLabel ?? `Copy ${label.toLowerCase()}`} size=\"icon-xs\" className=\"-my-1 shrink-0 text-muted-foreground\" />\n </div>\n {onClick\n ? <button type=\"button\" className={valueClass} title={title} onClick={onClick}>{value}</button>\n : <div className={valueClass} title={title}>{value}</div>}\n </div>\n )\n}\n\n// One consolidated context panel: the current utilization headline, optional\n// token count, and a labeled trend below — replacing the former four competing\n// context views (ring + meter + grid + bare bars).\nfunction ContextCard({ context, tokens, history, now }: { context: ContextState; tokens: string | null; history: ContextSnapshot[]; now: number }) {\n const util = Number.isFinite(context.utilization) ? Math.max(0, Math.min(1, context.utilization)) : null\n const pct = util === null ? null : Math.round(util * 100)\n const tone = util === null ? 'text-muted-foreground' : contextTone(util)\n return (\n <div>\n <div className=\"mb-2 flex items-center justify-between gap-2 min-w-0\">\n <h3 className=\"shrink-0 text-sm font-medium\">Context</h3>\n <span className=\"truncate text-[11px] text-muted-foreground\" title={`source ${context.source}, confidence ${context.confidence}`}>{context.lifecycleState} · {context.source}/{context.confidence}</span>\n </div>\n <div className=\"flex items-baseline gap-2\">\n <span className={`text-2xl font-semibold leading-none ${tone}`}>{pct === null ? '—' : `${pct}%`}</span>\n {tokens && <span className=\"text-xs text-muted-foreground\">{tokens} tokens</span>}\n </div>\n {history.length > 1 && <ContextSparkline snapshots={history} now={now} />}\n {context.warmTopics.length > 0 && (\n <div className=\"mt-2\">\n <span className=\"text-[11px] text-muted-foreground\">Warm topics</span>\n <div className=\"mt-1 flex flex-wrap gap-1\">{context.warmTopics.map((topic) => <Badge key={topic} variant=\"outline\" className=\"text-[10px]\">{topic}</Badge>)}</div>\n </div>\n )}\n </div>\n )\n}\n\n// Context-utilization trend as a labeled sparkline. Unlike the old bare bars it\n// carries a 0–100% scale, a caption with sample count + span, and tap-to-read\n// points (the only way to inspect values on touch, where there is no hover).\nfunction ContextSparkline({ snapshots, now }: { snapshots: ContextSnapshot[]; now: number }) {\n const items = snapshots.slice(-24)\n const [sel, setSel] = useState<number | null>(null)\n if (items.length < 2) return null\n const n = items.length\n const clamp = (u: number) => Math.max(0, Math.min(1, u))\n const pointAt = (i: number) => ({ x: (i / (n - 1)) * 100, y: 40 - clamp(items[i]!.utilization) * 40 })\n const line = items.map((_, i) => { const p = pointAt(i); return `${p.x.toFixed(2)},${p.y.toFixed(2)}` }).join(' ')\n const latestTone = contextTone(clamp(items[n - 1]!.utilization))\n const active = (sel != null ? items[sel] : items[n - 1])!\n const marker = pointAt(sel != null ? sel : n - 1)\n return (\n <div className=\"mt-2\">\n <div className=\"relative\">\n <svg viewBox=\"0 0 100 40\" preserveAspectRatio=\"none\" className=\"h-12 w-full\" aria-label=\"Context utilization history\">\n <line x1=\"0\" y1=\"20\" x2=\"100\" y2=\"20\" className=\"stroke-muted-foreground/15\" strokeWidth=\"0.5\" strokeDasharray=\"2 2\" />\n <polygon points={`0,40 ${line} 100,40`} className=\"fill-current text-primary/10\" />\n <polyline points={line} fill=\"none\" className={`stroke-current ${latestTone}`} strokeWidth=\"1.25\" strokeLinejoin=\"round\" strokeLinecap=\"round\" vectorEffect=\"non-scaling-stroke\" />\n <circle cx={marker.x} cy={marker.y} r=\"1.6\" className={`fill-current ${latestTone}`} vectorEffect=\"non-scaling-stroke\" />\n </svg>\n <div className=\"absolute inset-0 flex\">\n {items.map((s, i) => (\n <button key={s.id} type=\"button\" aria-label={`${Math.round(clamp(s.utilization) * 100)}% utilization`} className=\"h-full flex-1\" onClick={() => setSel(i === sel ? null : i)} />\n ))}\n </div>\n </div>\n <div className=\"mt-1 flex items-center justify-between text-[10px] text-muted-foreground\">\n <span>\n {sel != null\n ? <><span className={latestTone}>{Math.round(clamp(active.utilization) * 100)}%</span> · {new Date(active.capturedAt).toLocaleTimeString()}</>\n : <>{n} samples · since {timeAgo(now, items[0]!.capturedAt)}</>}\n </span>\n <span>0–100%</span>\n </div>\n </div>\n )\n}\n\nfunction AgentTimeline({ agentId, open, now }: { agentId: string; open: boolean; now: number }) {\n const [entries, setEntries] = useState<AgentTimelineEntry[]>([])\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const [limit, setLimit] = useState(50)\n\n const load = useCallback((nextLimit: number) => {\n setLoading(true)\n setError(null)\n let cancelled = false\n api<AgentTimelineEntry[]>('GET', '/agents/' + encodeURIComponent(agentId) + '/timeline?limit=' + nextLimit)\n .then((items) => { if (!cancelled) { setEntries(items); setLimit(nextLimit) } })\n .catch((e) => { if (!cancelled) setError((e as Error).message) })\n .finally(() => { if (!cancelled) setLoading(false) })\n return () => { cancelled = true }\n }, [agentId])\n\n // On-open fetch: pull a fresh page each time the timeline tab becomes visible or\n // the agent changes. Manual refresh and \"load full\" re-run load() explicitly.\n useEffect(() => {\n if (!open) return\n return load(50)\n }, [open, agentId, load])\n\n return (\n <div className=\"p-4 space-y-3 min-w-0\">\n <div className=\"flex items-center justify-between gap-2\">\n <h3 className=\"text-sm font-medium\">Timeline</h3>\n <Button size=\"sm\" variant=\"outline\" className=\"h-7 text-xs\" disabled={loading} onClick={() => load(limit)}><RefreshCw className=\"w-3 h-3 mr-1\" />Refresh</Button>\n </div>\n {error && <div className=\"text-xs text-red-300\">{error}</div>}\n {!error && entries.length === 0 && !loading && <div className=\"text-xs text-muted-foreground\">No timeline activity recorded for this agent.</div>}\n <div className=\"space-y-1.5\">\n {entries.map((entry, i) => <TimelineRow key={`${entry.ts}:${entry.source}:${i}`} entry={entry} now={now} />)}\n </div>\n {entries.length >= limit && limit < 200 && (\n <Button size=\"sm\" variant=\"outline\" className=\"w-full h-7 text-xs\" disabled={loading} onClick={() => load(200)}>Load full timeline</Button>\n )}\n </div>\n )\n}\n\nfunction timelineIcon(entry: AgentTimelineEntry) {\n if (entry.metadata?.mismatch === true || entry.metadata?.stalled === true) return <AlertTriangle className=\"w-3.5 h-3.5 text-amber-400\" />\n if (entry.source === 'command') return <Terminal className=\"w-3.5 h-3.5 text-sky-400\" />\n if (entry.source === 'delivery') return <Send className=\"w-3.5 h-3.5 text-violet-400\" />\n if (entry.kind === 'state') return <ArrowLeftRight className=\"w-3.5 h-3.5 text-emerald-400\" />\n return <Activity className=\"w-3.5 h-3.5 text-muted-foreground\" />\n}\n\nfunction TimelineRow({ entry, now }: { entry: AgentTimelineEntry; now: number }) {\n const status = typeof entry.metadata?.status === 'string' ? entry.metadata.status : ''\n const failed = /fail|error|poison|dead/i.test(status)\n const fromState = entry.metadata?.fromState\n const toState = entry.metadata?.toState\n const transition = typeof fromState === 'string' && typeof toState === 'string' ? `${fromState} → ${toState}` : null\n return (\n <div className=\"flex gap-2 rounded border border-border px-2 py-1.5 text-xs min-w-0\">\n <div className=\"shrink-0 mt-0.5\">{timelineIcon(entry)}</div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <span className={`font-medium truncate ${failed ? 'text-red-300' : 'text-foreground'}`}>{entry.title}</span>\n <span className=\"ml-auto shrink-0 text-[10px] text-muted-foreground\" title={fmtTime(entry.ts)}>{timeAgo(now, entry.ts)}</span>\n </div>\n {transition && <div className=\"text-muted-foreground font-mono text-[11px]\">{transition}</div>}\n {entry.detail && <div className=\"text-muted-foreground whitespace-pre-wrap break-words line-clamp-3\">{entry.detail}</div>}\n </div>\n </div>\n )\n}\n\nfunction runtimePackageMetadata(value: unknown): { name: string; version: string } | null {\n if (!isRecord(value)) return null\n return typeof value.name === 'string' && typeof value.version === 'string'\n ? { name: value.name, version: value.version }\n : null\n}\n\nfunction runtimeContractEntries(value: unknown): Array<[string, number]> {\n if (!isRecord(value)) return []\n return Object.entries(value).filter((entry): entry is [string, number] => typeof entry[1] === 'number')\n}\n\n// Cause → tailwind badge classes (bg + text)\nconst CRASH_CAUSE_COLOR: Record<string, string> = {\n oom: 'bg-red-500/20 text-red-400',\n killed: 'bg-red-500/20 text-red-400',\n 'provider-crash': 'bg-orange-500/20 text-orange-400',\n 'token-401': 'bg-amber-500/20 text-amber-400',\n 'onboarding-gate': 'bg-amber-500/20 text-amber-400',\n 'transport-loss': 'bg-sky-500/20 text-sky-400',\n 'clean-exit': 'bg-emerald-500/20 text-emerald-400',\n unknown: 'bg-zinc-500/20 text-zinc-400',\n}\n\nfunction CrashReportPanel({ report, now }: { report: CrashReport; now: number }) {\n const d = report.diagnosis\n const causeColor = CRASH_CAUSE_COLOR[d.cause] ?? 'bg-zinc-500/20 text-zinc-400'\n return (\n <div>\n <h3 className=\"text-sm font-medium mb-2 flex items-center gap-1.5\">\n <AlertCircle className=\"w-3.5 h-3.5 text-muted-foreground\" />\n Why it died\n </h3>\n <div className=\"rounded-md border border-border bg-muted/30 px-3 py-2.5 text-xs space-y-2\">\n <div className=\"flex items-center gap-2 flex-wrap\">\n <Badge className={causeColor}>{d.cause}</Badge>\n <span className=\"text-muted-foreground\">{d.confidence} confidence</span>\n <span className=\"ml-auto text-[10px] text-muted-foreground\" title={fmtTime(d.detectedAt)}>{timeAgo(now, d.detectedAt)}</span>\n </div>\n <div className=\"font-medium text-foreground\">{d.summary}</div>\n {d.evidence.length > 0 && (\n <ul className=\"space-y-0.5 text-muted-foreground\">\n {d.evidence.map((e, i) => <li key={i} className=\"flex gap-1.5\"><span className=\"shrink-0 text-muted-foreground/50\">·</span><span>{e}</span></li>)}\n </ul>\n )}\n {(d.signal != null || d.exitCode != null || d.oom === true || d.heartbeatGapMs != null || (d.activeWork?.length ?? 0) > 0) && (\n <div className=\"grid grid-cols-2 gap-x-3 gap-y-1 text-[11px] pt-0.5\">\n {d.signal != null && <div><span className=\"text-muted-foreground\">Signal</span><div className=\"font-mono\">{d.signal}</div></div>}\n {d.exitCode != null && <div><span className=\"text-muted-foreground\">Exit code</span><div className=\"font-mono\">{d.exitCode}</div></div>}\n {d.oom === true && <div><span className=\"text-muted-foreground\">OOM</span><div>yes</div></div>}\n {d.heartbeatGapMs != null && <div><span className=\"text-muted-foreground\">Heartbeat gap</span><div>{Math.round(d.heartbeatGapMs / 1000)}s</div></div>}\n {(d.activeWork?.length ?? 0) > 0 && <div className=\"col-span-2 min-w-0\"><span className=\"text-muted-foreground\">Active work</span><div className=\"truncate\">{d.activeWork!.join(', ')}</div></div>}\n </div>\n )}\n {d.logTail && d.logTail.length > 0 && (\n <pre className=\"mt-1 max-h-28 overflow-auto whitespace-pre-wrap break-words rounded border border-border bg-black/20 p-2 text-[11px] text-muted-foreground\">{d.logTail.slice(-5).join('\\n')}</pre>\n )}\n </div>\n </div>\n )\n}\n\nfunction lastExitDiagnostics(value: unknown): ManagedSessionExitDiagnostics | null {\n if (!isRecord(value) || typeof value.lastError !== 'string') return null\n const systemd = isRecord(value.systemd)\n ? {\n unit: typeof value.systemd.unit === 'string' ? value.systemd.unit : undefined,\n activeState: typeof value.systemd.activeState === 'string' ? value.systemd.activeState : undefined,\n subState: typeof value.systemd.subState === 'string' ? value.systemd.subState : undefined,\n result: typeof value.systemd.result === 'string' ? value.systemd.result : undefined,\n execMainCode: typeof value.systemd.execMainCode === 'string' ? value.systemd.execMainCode : undefined,\n execMainStatus: typeof value.systemd.execMainStatus === 'string' ? value.systemd.execMainStatus : undefined,\n }\n : undefined\n return {\n lastError: value.lastError,\n detectedAt: typeof value.detectedAt === 'number' ? value.detectedAt : undefined,\n runtimeMs: typeof value.runtimeMs === 'number' ? value.runtimeMs : undefined,\n logFile: typeof value.logFile === 'string' ? value.logFile : undefined,\n logBytes: typeof value.logBytes === 'number' ? value.logBytes : undefined,\n logEmpty: typeof value.logEmpty === 'boolean' ? value.logEmpty : undefined,\n logTail: Array.isArray(value.logTail) ? value.logTail.filter((line): line is string => typeof line === 'string') : undefined,\n systemd,\n unavailable: Array.isArray(value.unavailable) ? value.unavailable.filter((item): item is string => typeof item === 'string') : undefined,\n }\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\nfunction ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n \"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent\",\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n )\n}\n\nexport { ScrollArea }\n","import { useMemo } from 'react'\nimport { useRelayStore, useNow } from '@/store'\nimport { Sheet, SheetContent, SheetHeader, SheetTitle } from '@/components/ui/sheet'\nimport { Badge } from '@/components/ui/badge'\nimport { ScrollArea } from '@/components/ui/scroll-area'\nimport { Separator } from '@/components/ui/separator'\nimport { channelPresence, displayTarget, timeAgo, messageBody, messageMatchesChannel, toneToColor, userFacingCapabilities } from '@/lib/display'\n\nexport function ChannelDetailDrawer() {\n const open = useRelayStore((s) => s.channelDetailOpen)\n const channelId = useRelayStore((s) => s.channelDetailId)\n const channels = useRelayStore((s) => s.channels)\n const messages = useRelayStore((s) => s.messages)\n const agentsById = useRelayStore((s) => s.agentsById)\n const now = useNow()\n const closeChannelDetail = useRelayStore((s) => s.closeChannelDetail)\n\n const channel = channels.find((c) => c.id === channelId) || null\n const presence = channelPresence(channel)\n\n const channelMessages = useMemo(() => {\n if (!channel) return []\n return messages.filter((m) => messageMatchesChannel(m, channel)).sort((a, b) => b.id - a.id).slice(0, 8)\n }, [messages, channel])\n\n return (\n <Sheet open={open} onOpenChange={(o) => !o && closeChannelDetail()}>\n <SheetContent className=\"w-full max-w-[100dvw] sm:max-w-md lg:max-w-lg p-0\">\n <SheetHeader className=\"shrink-0 p-4 border-b border-border\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <Badge className={toneToColor(presence.tone)}>{presence.label}</Badge>\n <SheetTitle className=\"text-base truncate\">{channel?.name || 'Channel'}</SheetTitle>\n </div>\n </SheetHeader>\n\n <ScrollArea className=\"flex-1 min-h-0\">\n <div className=\"p-4 space-y-4\">\n {channel && (\n <>\n <div>\n <h3 className=\"text-sm font-medium mb-2\">Route</h3>\n <div className=\"space-y-1 text-sm\">\n <div className=\"flex justify-between gap-2\"><span className=\"text-muted-foreground shrink-0\">Type</span><span className=\"truncate\">{channel.type}</span></div>\n <div className=\"flex justify-between gap-2\"><span className=\"text-muted-foreground shrink-0\">Direction</span><span className=\"truncate\">{channel.direction}</span></div>\n {channel.target && <div className=\"flex justify-between gap-2\"><span className=\"text-muted-foreground shrink-0\">Target</span><span className=\"truncate\">{channel.target}</span></div>}\n <div className=\"flex justify-between gap-2\"><span className=\"text-muted-foreground shrink-0\">Agent</span><span className=\"truncate\">{channel.agentId}</span></div>\n <div className=\"flex justify-between gap-2\"><span className=\"text-muted-foreground shrink-0\">Transport</span><span className=\"truncate\">{channel.transport}</span></div>\n <div className=\"flex justify-between gap-2\"><span className=\"text-muted-foreground shrink-0\">Last seen</span><span className=\"shrink-0\">{timeAgo(now, channel.lastSeen)}</span></div>\n </div>\n </div>\n\n {userFacingCapabilities(channel.capabilities).length > 0 && (\n <>\n <Separator />\n <div>\n <h3 className=\"text-sm font-medium mb-2\">Capabilities</h3>\n <div className=\"flex flex-wrap gap-1\">{userFacingCapabilities(channel.capabilities).map((c) => <Badge key={c} variant=\"secondary\" className=\"text-[10px]\">{c}</Badge>)}</div>\n </div>\n </>\n )}\n\n {channel.meta && Object.keys(channel.meta).length > 0 && (\n <>\n <Separator />\n <div>\n <h3 className=\"text-sm font-medium mb-2\">Metadata</h3>\n <div className=\"space-y-1 text-sm\">\n {Object.entries(channel.meta).map(([k, v]) => (\n <div key={k} className=\"flex justify-between gap-2 min-w-0\"><span className=\"text-muted-foreground shrink-0\">{k}</span><span className=\"truncate\">{String(v)}</span></div>\n ))}\n </div>\n </div>\n </>\n )}\n </>\n )}\n\n {channelMessages.length > 0 && (\n <>\n <Separator />\n <div>\n <h3 className=\"text-sm font-medium mb-2\">Recent Messages</h3>\n <div className=\"space-y-2\">\n {channelMessages.map((msg) => (\n <div key={msg.id} className=\"rounded border border-border p-2 text-xs space-y-0.5 min-w-0\">\n <div className=\"flex items-center gap-1 text-muted-foreground min-w-0\">\n <span className=\"font-medium text-foreground truncate shrink-0 max-w-[40%]\">{displayTarget(msg.from, agentsById)}</span>\n <span className=\"shrink-0\">→</span>\n <span className=\"truncate max-w-[40%]\">{displayTarget(msg.to, agentsById)}</span>\n <span className=\"ml-auto shrink-0 text-[10px]\"><span className=\"opacity-40 mr-1\">#{msg.id}</span>{timeAgo(now, msg.createdAt)}</span>\n </div>\n <div className=\"text-foreground whitespace-pre-wrap break-words line-clamp-3\">{messageBody(msg)}</div>\n </div>\n ))}\n </div>\n </div>\n </>\n )}\n </div>\n </ScrollArea>\n </SheetContent>\n </Sheet>\n )\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n","import * as React from \"react\"\nimport { Label as LabelPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n","\nimport { AlertCircle, Check, CheckCheck, Clock } from 'lucide-react'\nimport { HUMAN_AGENT_ID } from '@/lib/constants'\nimport {\n isBadgeWorthy,\n isReactionEventMessage,\n normalizePathForCompare,\n normalizeReactionEmoji,\n pathWithinBase,\n toTimestamp,\n} from '@/lib/display'\nimport { planLookupKey } from '@/store/slices/plans'\nimport type { Agent, AttachmentRef, InboxThread, Message, Orchestrator, Plan } from '@/types'\nimport type { PendingAttachment } from './types'\n\nexport function formatBytes(size: number): string {\n if (size < 1024) return `${size} B`\n if (size < 1024 * 1024) return `${(size / 1024).toFixed(1)} KB`\n return `${(size / 1024 / 1024).toFixed(1)} MB`\n}\n\nexport function resolveRelativePath(cwd: string, path: string): string {\n if (path.startsWith('/')) return path\n const parts = `${cwd.replace(/\\/+$/, '')}/${path}`.split('/')\n const stack: string[] = []\n for (const part of parts) {\n if (!part || part === '.') continue\n if (part === '..') stack.pop()\n else stack.push(part)\n }\n return '/' + stack.join('/')\n}\n\nexport function parentPath(path: string): string {\n const trimmed = path.replace(/\\/+$/, '')\n const index = trimmed.lastIndexOf('/')\n return index > 0 ? trimmed.slice(0, index) : '/'\n}\n\nexport function orchestratorForFilePreview(orchestrators: Orchestrator[], path: string): Orchestrator | undefined {\n return orchestrators\n .filter((orch) => orch.status === 'online' && pathWithinBase(path, orch.baseDir))\n .sort((a, b) => normalizePathForCompare(b.baseDir).length - normalizePathForCompare(a.baseDir).length)[0] ||\n orchestrators.find((orch) => orch.status === 'online')\n}\n\nexport function supportsSideFilePreview(): boolean {\n return typeof window !== 'undefined' && window.matchMedia('(min-width: 1280px)').matches\n}\n\nexport function hasActiveTextSelection(): boolean {\n return typeof window !== 'undefined' && Boolean(window.getSelection()?.toString())\n}\n\nexport function messageAttachments(msg: Message): AttachmentRef[] {\n const attachments = msg.payload?.attachments\n if (!Array.isArray(attachments)) return []\n return attachments.filter((item): item is AttachmentRef => Boolean(item && typeof item === 'object' && typeof (item as AttachmentRef).artifactId === 'string'))\n}\n\nexport const QUICK_REACTIONS = ['👍', '❤️', '✅', '👀'] as const\n\nexport function groupedReactions(msg: Message): Array<{ emoji: string; count: number; mine: boolean; actors: string[] }> {\n const groups = new Map<string, { emoji: string; count: number; mine: boolean; actors: string[] }>()\n for (const reaction of msg.reactions || []) {\n const emoji = normalizeReactionEmoji(reaction.emoji)\n const current = groups.get(emoji) ?? { emoji, count: 0, mine: false, actors: [] }\n current.count += 1\n current.mine = current.mine || reaction.actorId === HUMAN_AGENT_ID\n current.actors.push(reaction.actorId)\n groups.set(emoji, current)\n }\n return [...groups.values()].sort((a, b) => b.count - a.count || a.emoji.localeCompare(b.emoji))\n}\n\nexport function isReactionEvent(msg: Message): boolean {\n return isReactionEventMessage(msg)\n}\n\nexport function outboundReceipt(msg: Message, peer: string): { label: string; title: string; tone: 'muted' | 'ok' | 'warn' | 'danger'; icon: typeof Check } {\n const readBy = msg.readBy || []\n const expectedReader = msg.resolvedToAgent || peer || msg.to\n const readByExpected = expectedReader ? readBy.includes(expectedReader) : false\n const readBySomeone = readBy.some((id) => id !== HUMAN_AGENT_ID)\n if (readByExpected || readBySomeone) {\n const reader = readByExpected ? expectedReader : readBy.find((id) => id !== HUMAN_AGENT_ID)\n return { label: 'read', title: reader ? `Read by ${reader}` : 'Read by agent', tone: 'ok', icon: CheckCheck }\n }\n if (msg.deliveryStatus === 'delivered') {\n return { label: 'delivered', title: 'Delivered to agent inbox', tone: 'ok', icon: CheckCheck }\n }\n if (msg.deliveryStatus === 'queued') {\n return { label: 'queued', title: 'Queued until the target agent is available', tone: 'warn', icon: Clock }\n }\n if (msg.deliveryStatus === 'failed' || msg.deliveryStatus === 'dead') {\n const detail = msg.deliveryPoisonReason || msg.deliveryLastError || msg.deliveryStatus\n return { label: msg.deliveryStatus, title: detail, tone: 'danger', icon: AlertCircle }\n }\n return { label: 'sent', title: 'Accepted by Relay', tone: 'muted', icon: Check }\n}\n\nfunction messageActivityTimestamp(msg: Message): number {\n const messageAt = toTimestamp(msg.createdAt)\n return (msg.reactions || []).reduce((latest, reaction) => {\n return Math.max(latest, toTimestamp(reaction.updatedAt || reaction.createdAt))\n }, messageAt)\n}\n\nexport function threadActivityTimestamp(thread: InboxThread | undefined): number {\n if (!thread) return 0\n return thread.messages.reduce((latest, msg) => Math.max(latest, messageActivityTimestamp(msg)), 0)\n}\n\n// Ascending-by-time comparator for the conversations-list sorts (last activity, last seen).\n// Older timestamp sorts first, so 'asc' (the default, SortAsc icon) reads oldest→newest and a\n// conversation whose agent just finished a turn appends at the bottom instead of being yanked\n// to the top on every turn-completion (#541). dir=-1 ('desc') flips it to newest-first.\nexport function compareConversationActivity(ta: number, tb: number, dir: number): number {\n return (ta - tb) * dir\n}\n\n// Time of the agent's last work-final response (`payload.finality`, with legacy `session.final`\n// fallback) — what the conversations list shows instead of a heartbeat/last-seen or any-message activity.\n// 0 when the agent hasn't produced a response yet (caller falls back to thread activity).\nexport function lastFinalResponseTimestamp(thread: InboxThread | undefined): number {\n if (!thread) return 0\n let latest = 0\n for (const msg of thread.messages) {\n if (isBadgeWorthy(msg)) latest = Math.max(latest, toTimestamp(msg.createdAt))\n }\n return latest\n}\n\nexport function chatTimestamp(iso: string | number): string {\n const d = new Date(iso as string)\n return d.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })\n}\n\nexport function revokePendingAttachmentUrls(items: PendingAttachment[]): void {\n for (const item of items) if (item.previewUrl) URL.revokeObjectURL(item.previewUrl)\n}\n\ntype ChatPlanContext = { threadId: string | number; channel?: string } | { teamId: string; channel?: string }\n\nexport function resolveChatPlanContext(\n agent: Agent | null,\n messages: Message[],\n lastMessage: Message | null | undefined,\n plansByThread: Record<string, Plan | null>,\n): ChatPlanContext | null {\n if (agent?.teamId) return { teamId: agent.teamId }\n const ordered = [...messages]\n if (lastMessage && !ordered.some((message) => message.id === lastMessage.id)) ordered.push(lastMessage)\n const threaded = ordered.filter((message) => message.threadId).reverse()\n const knownPlanMessage = threaded.find((message) => Boolean(plansByThread[planLookupKey(message.threadId!, message.channel)]))\n const selected = knownPlanMessage ?? threaded[0]\n if (!selected?.threadId) return null\n return {\n threadId: selected.threadId,\n ...(selected.channel ? { channel: selected.channel } : {}),\n }\n}\n","\nimport { isReactionEventMessage, messageBody, toTimestamp, responseBodyContainsBlock } from '@/lib/display'\nimport { HUMAN_AGENT_ID } from '@/lib/constants'\nimport type { ChatStatusEvent as StatusEvent } from '@/store'\nimport type { ChatHistoryImport, ChatHistoryImportEntry, Message } from '@/types'\n\nexport interface ActivityStep { id: number; kind: 'narration' | 'reasoning' | 'tool'; label?: string; text: string; ts: number; turnId?: string }\nexport type RelayInjectionCategory = 'memory' | 'instructions' | 'tools' | 'comms' | 'knowledge' | 'context'\nexport interface PromptResolutionDetail {\n provider?: string\n kind?: 'questions' | 'plan' | 'command' | 'tool'\n title?: string\n body?: string\n promptBody?: string\n toolName?: string\n decision?: string\n decisionLabel?: string\n questions?: unknown[]\n answers?: Record<string, string>\n}\nexport interface PromptResolutionEvent {\n id: number\n title: string\n kind: 'questions' | 'plan' | 'command' | 'tool'\n body: string\n toolName: string\n decisionLabel: string\n questions: Array<{ question: string; answer: string }>\n timestamp: number\n}\ninterface RelayInjectionTimelineEvent {\n id: number\n category: RelayInjectionCategory\n summary: string\n detail: Record<string, unknown>\n agentId: string\n timestamp: number\n}\n\nexport type TimelineEntry =\n | { type: 'message'; msg: Message }\n | { type: 'initial-prompt'; msg: Message }\n | { type: 'notice'; msg: Message }\n | { type: 'relay-injection'; event: RelayInjectionTimelineEvent }\n | { type: 'prompt-resolution'; event: PromptResolutionEvent }\n | { type: 'agent-action'; direction: 'spawned-child' | 'spawned-by'; agentId: string; provider?: string; status: 'ready' | 'exited' | 'failed'; reason?: string; timestamp: number }\n | { type: 'activity'; steps: ActivityStep[]; timestamp: number }\n | { type: 'import-boundary'; history: ChatHistoryImport; timestamp: number }\n | { type: 'imported-message'; history: ChatHistoryImport; entry: ChatHistoryImportEntry }\n | { type: 'status'; event: StatusEvent }\n | { type: 'date'; date: string; timestamp: number }\n | { type: 'created'; timestamp: number }\n\nexport interface TimelineEntryAnchor {\n messageId: number\n endMessageId: number\n}\n\nexport interface TimelineAnchorLocator {\n topKey?: string | null\n messageId?: number | null\n endMessageId?: number | null\n}\n\nexport const TIMELINE_STATUS_LABELS: Record<string, string> = {\n online: 'came online',\n offline: 'went offline',\n shutdown: 'shut down',\n restarted: 'restarted',\n 'compaction-requested': 'compaction requested',\n compacting: 'compaction started',\n compacted: 'context compacted',\n 'compaction-stalled': 'compaction stalled — may need manual intervention',\n 'clear-requested': 'clear requested',\n 'clearing-context': 'clear started',\n 'context-cleared': 'context cleared',\n 'clear-stalled': 'context clear stalled — may need manual intervention',\n 'shutting-down': 'shutting down',\n}\n\nconst TIMELINE_STATUSES = new Set(Object.keys(TIMELINE_STATUS_LABELS))\nconst STATUS_DEDUPE_WINDOW_MS = 3000\n\n// True event time of a message: occurredAt (set when a Runner backfilled a message it had\n// queued during an outage, #196) falling back to the server receive time. Used for chat\n// timeline ordering + display so a backfilled turn lands where it actually happened in the\n// conversation, not at the bottom. Display-only — DB poll cursors still use created_at.\nfunction messageEventTime(msg: Message): number {\n return new Date(msg.occurredAt ?? msg.createdAt).getTime()\n}\n\n// Narration/reasoning/tool session events are mirrored as `kind:\"session\"` messages\n// but must not become chat bubbles — they render inline in the turn's activity trace.\n// (`narration` = the agent's intermediate spoken text; `reasoning` = its thinking.)\nexport function sessionActivityStep(msg: Message): ActivityStep | null {\n if (msg.kind !== 'session') return null\n const s = msg.payload?.session as { type?: string; label?: string; turnId?: string } | undefined\n if (!s || (s.type !== 'narration' && s.type !== 'reasoning' && s.type !== 'tool')) return null\n return {\n id: msg.id,\n kind: s.type,\n label: typeof s.label === 'string' ? s.label : undefined,\n text: msg.body,\n ts: messageEventTime(msg),\n turnId: typeof s.turnId === 'string' ? s.turnId : undefined,\n }\n}\n\n// A `notice` session event (e.g. the runner's durable \"context compacted\" marker) renders\n// as a discreet timeline marker, reusing the StatusMarker path. Its `label` carries a\n// timeline-status key (e.g. \"compacted\"); we surface it as a StatusEvent so it dedupes with\n// the ephemeral live timeline-status decoration and survives a reload (the ephemeral one does\n// not). Returns null for non-notice messages or labels we don't render.\nexport function sessionNoticeStatusEvent(msg: Message): StatusEvent | null {\n if (msg.kind !== 'session') return null\n const s = msg.payload?.session as { type?: string; label?: string } | undefined\n if (s?.type !== 'notice') return null\n const status = typeof s.label === 'string' && s.label ? s.label : 'compacted'\n return { id: `notice-${msg.id}`, status, timestamp: messageEventTime(msg) }\n}\n\nexport function sessionRelayInjectionEvent(msg: Message): RelayInjectionTimelineEvent | null {\n if (msg.kind !== 'session') return null\n const s = msg.payload?.session as { type?: string; relayInjection?: Record<string, unknown> } | undefined\n if (s?.type !== 'relay-injection') return null\n const raw = s.relayInjection && typeof s.relayInjection === 'object' && !Array.isArray(s.relayInjection) ? s.relayInjection : {}\n const category = typeof raw.category === 'string' && ['memory', 'instructions', 'tools', 'comms', 'knowledge', 'context'].includes(raw.category)\n ? raw.category as RelayInjectionCategory\n : 'context'\n const timestamp = typeof raw.timestamp === 'number' && Number.isFinite(raw.timestamp) ? raw.timestamp : messageEventTime(msg)\n const detail = raw.detail && typeof raw.detail === 'object' && !Array.isArray(raw.detail) ? raw.detail as Record<string, unknown> : {}\n return {\n id: msg.id,\n category,\n summary: typeof raw.summary === 'string' && raw.summary.trim() ? raw.summary : msg.body,\n detail,\n agentId: typeof raw.agentId === 'string' && raw.agentId ? raw.agentId : msg.from,\n timestamp,\n }\n}\n\nexport function sessionPromptResolutionEvent(msg: Message): PromptResolutionEvent | null {\n if (msg.kind !== 'session') return null\n const s = msg.payload?.session as { type?: string; promptResolution?: PromptResolutionDetail; label?: string } | undefined\n if (s?.type !== 'prompt-resolution') return null\n const raw = s.promptResolution && typeof s.promptResolution === 'object' && !Array.isArray(s.promptResolution) ? s.promptResolution : {}\n const kind = raw.kind === 'questions' || raw.kind === 'plan' || raw.kind === 'command' || raw.kind === 'tool' ? raw.kind : 'tool'\n const title = typeof raw.title === 'string' && raw.title.trim() ? raw.title : 'Prompt resolved'\n const decisionLabel = typeof raw.decisionLabel === 'string' && raw.decisionLabel.trim()\n ? raw.decisionLabel\n : typeof s.label === 'string' && s.label.trim() ? s.label : 'Resolved'\n const answers = raw.answers && typeof raw.answers === 'object' && !Array.isArray(raw.answers) ? raw.answers : {}\n return {\n id: msg.id,\n title,\n kind,\n body: typeof raw.promptBody === 'string' ? raw.promptBody : typeof raw.body === 'string' ? raw.body : msg.body,\n toolName: typeof raw.toolName === 'string' && raw.toolName.trim() ? raw.toolName : title,\n decisionLabel,\n questions: promptResolutionQuestions(raw.questions, answers, decisionLabel),\n timestamp: messageEventTime(msg),\n }\n}\n\nfunction promptResolutionQuestions(questions: unknown, answers: Record<string, string>, fallback: string): Array<{ question: string; answer: string }> {\n const rawQuestions = Array.isArray(questions) ? questions : []\n const rows = rawQuestions.map((item, index) => {\n const record = item && typeof item === 'object' && !Array.isArray(item) ? item as Record<string, unknown> : {}\n const question = typeof record.question === 'string' && record.question.trim()\n ? record.question.trim()\n : typeof record.header === 'string' && record.header.trim() ? record.header.trim() : `Question ${index + 1}`\n const answer = answers[question] ?? answers[String(record.question ?? '')] ?? answers[String(record.header ?? '')]\n return { question, answer: typeof answer === 'string' && answer.trim() ? answer.trim() : fallback }\n })\n if (rows.length) return rows\n return Object.entries(answers).map(([question, answer]) => ({ question, answer }))\n}\n\nfunction stripLeadingResponseBlocks(body: string, blocks: string[]): string {\n let remaining = body.trim()\n for (const raw of blocks) {\n const block = raw.trim()\n if (!block) continue\n if (remaining === block) break\n if (remaining.startsWith(`${block}\\n\\n`)) {\n remaining = remaining.slice(block.length + 2).trimStart()\n }\n }\n return remaining.trim() || body.trim()\n}\n\n// Bus-level system signals (kind:\"system\", from:\"system\") — e.g. branch.landed,\n// agent.context_threshold, workspace.* events. Rendered as notice pills (NoticePill\n// labels/humanizes the kind, #507), NOT chat bubbles or session status markers.\nexport function isBusSignalMessage(msg: Message): boolean {\n return msg.kind === 'system' && msg.from === 'system'\n}\n\n// Spawn lifecycle signals routed to the parent: agent.ready / agent.exited / agent.spawn_failed.\n// These are richer than generic bus signals and get their own agent-action timeline entry.\nconst LIFECYCLE_KINDS = new Set(['agent.ready', 'agent.exited', 'agent.spawn_failed'])\n\nexport function dateKey(ts: number): string {\n const d = new Date(ts)\n return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`\n}\n\nexport function dedupeStatusEvents(statusEvents: StatusEvent[]): StatusEvent[] {\n const events = statusEvents\n .filter((event) => TIMELINE_STATUSES.has(event.status))\n .slice()\n .sort((a, b) => a.timestamp - b.timestamp)\n const result: StatusEvent[] = []\n for (const event of events) {\n if (result.some((existing) => existing.id === event.id)) continue\n if (result.some((existing) => existing.status === event.status && Math.abs(existing.timestamp - event.timestamp) <= STATUS_DEDUPE_WINDOW_MS)) continue\n result.push(event)\n }\n return result\n}\n\nexport function buildTimeline(\n messages: Message[],\n statusEvents: StatusEvent[],\n createdAt?: string | number | null,\n importedHistory: ChatHistoryImport[] = [],\n options?: { spawnedBy?: { agentId: string; provider?: string }; initialPromptComplete?: boolean },\n): TimelineEntry[] {\n const raw: Array<{ ts: number; entry: TimelineEntry }> = []\n\n for (const history of importedHistory) {\n const firstImportedAt = history.entries.reduce((min, entry) => Math.min(min, toTimestamp(entry.originalCreatedAt)), Number.POSITIVE_INFINITY)\n const boundaryAt = Number.isFinite(firstImportedAt) ? firstImportedAt - 1 : history.importedAt\n raw.push({ ts: boundaryAt, entry: { type: 'import-boundary', history, timestamp: boundaryAt } })\n for (const entry of history.entries) {\n raw.push({ ts: toTimestamp(entry.originalCreatedAt), entry: { type: 'imported-message', history, entry } })\n }\n }\n\n if (createdAt) {\n const ts = new Date(createdAt as string).getTime()\n if (Number.isFinite(ts)) raw.push({ ts, entry: { type: 'created', timestamp: ts } })\n }\n\n // Synthetic \"spawned by\" lead entry for child agents — derives from the agent's spawnedBy\n // metadata (no inbound system message exists for this direction). Placed at createdAt so it\n // sorts as the first real entry after the created/date markers.\n if (options?.spawnedBy) {\n const ts = createdAt ? new Date(createdAt as string).getTime() : 0\n const spawnedByTs = Number.isFinite(ts) ? ts : 0\n raw.push({ ts: spawnedByTs, entry: { type: 'agent-action', direction: 'spawned-by', agentId: options.spawnedBy.agentId, provider: options.spawnedBy.provider, status: 'ready', timestamp: spawnedByTs } })\n }\n\n // The initial/spawn prompt (#513): the earliest real prompt that kicked off the\n // session — a human prompt, or (for a spawned agent) the first message from the spawn\n // parent. Tagged so it renders with a distinct title instead of as a normal bubble or\n // a folded peer one-liner. Skip session events, bus signals, reactions, and empty bodies.\n const spawnParentId = options?.spawnedBy?.agentId\n let initialPromptId: number | null = null\n let initialPromptTs = Number.POSITIVE_INFINITY\n if (options?.initialPromptComplete !== false) {\n for (const msg of messages) {\n if (msg.id < 0 || msg.kind === 'session' || isBusSignalMessage(msg) || isReactionEventMessage(msg)) continue\n const fromInitiator = msg.from === HUMAN_AGENT_ID || (spawnParentId !== undefined && msg.from === spawnParentId)\n if (!fromInitiator || !messageBody(msg).trim()) continue\n const ts = messageEventTime(msg)\n if (ts < initialPromptTs) { initialPromptTs = ts; initialPromptId = msg.id }\n }\n }\n\n // A full-capture response stores the turn's narration blocks plus the final\n // answer. Keep the stored message intact, but derive what the response bubble\n // should show: strip leading narration blocks and leave the final visible block.\n // Narration suppression then compares against that visible block only, preserving\n // the live chronological trace after the turn completes.\n const responseBodiesByTurn = new Map<string, string[]>()\n const narrationByTurn = new Map<string, Array<{ id: number; body: string }>>()\n const responseDisplayBodyByMessageId = new Map<number, string>()\n for (const msg of messages) {\n if (msg.kind !== 'session') continue\n const s = msg.payload?.session as { type?: string; turnId?: string } | undefined\n if (s?.type === 'narration' && typeof s.turnId === 'string') {\n const list = narrationByTurn.get(s.turnId) ?? []\n list.push({ id: msg.id, body: msg.body.trim() })\n narrationByTurn.set(s.turnId, list)\n } else if (s?.type === 'response' && typeof s.turnId === 'string') {\n const list = responseBodiesByTurn.get(s.turnId) ?? []\n list.push(msg.body.trim())\n responseBodiesByTurn.set(s.turnId, list)\n }\n }\n const responseDisplayBodiesByTurn = new Map<string, string[]>()\n for (const [turnId, bodies] of responseBodiesByTurn) {\n const narrationBodies = (narrationByTurn.get(turnId) ?? []).map((item) => item.body)\n responseDisplayBodiesByTurn.set(turnId, bodies.map((body) => stripLeadingResponseBlocks(body, narrationBodies)))\n }\n for (const msg of messages) {\n if (msg.kind !== 'session') continue\n const s = msg.payload?.session as { type?: string; turnId?: string } | undefined\n if (s?.type !== 'response' || typeof s.turnId !== 'string') continue\n const displayBody = stripLeadingResponseBlocks(msg.body, (narrationByTurn.get(s.turnId) ?? []).map((item) => item.body))\n if (displayBody && displayBody !== msg.body) responseDisplayBodyByMessageId.set(msg.id, displayBody)\n }\n const suppressedNarrationIds = new Set<number>()\n for (const [turnId, bodies] of responseDisplayBodiesByTurn) {\n const narrations = narrationByTurn.get(turnId) ?? []\n for (const body of bodies) {\n for (let i = narrations.length - 1; i >= 0; i--) {\n const narration = narrations[i]!\n if (suppressedNarrationIds.has(narration.id)) continue\n if (!responseBodyContainsBlock(body, narration.body)) continue\n suppressedNarrationIds.add(narration.id)\n break\n }\n }\n }\n\n // Tracks in-progress agent-action entries by child id so ready→exited coalesces into one entry.\n type RawAgentAction = { ts: number; entry: Extract<TimelineEntry, { type: 'agent-action' }> }\n const agentActionByChild = new Map<string, RawAgentAction>()\n\n const noticeStatusEvents: StatusEvent[] = []\n for (const msg of messages) {\n if (isBusSignalMessage(msg)) {\n const kind = typeof msg.payload?.kind === 'string' ? msg.payload.kind : ''\n if (LIFECYCLE_KINDS.has(kind)) {\n const p = msg.payload as { kind: string; agentId?: string; provider?: string; reason?: string }\n const childId = typeof p.agentId === 'string' ? p.agentId : ''\n const ts = messageEventTime(msg)\n if (!childId) {\n // agent.spawn_failed without a child id (command-level failure): fall through to notice\n raw.push({ ts, entry: { type: 'notice', msg } })\n continue\n }\n const status: 'ready' | 'exited' | 'failed' = kind === 'agent.ready' ? 'ready' : kind === 'agent.exited' ? 'exited' : 'failed'\n const existing = agentActionByChild.get(childId)\n if (existing) {\n // Coalesce: evolve the same entry to the final status in place\n existing.entry.status = status\n if (typeof p.reason === 'string') existing.entry.reason = p.reason\n existing.entry.timestamp = ts\n existing.ts = ts\n } else {\n const item: RawAgentAction = {\n ts,\n entry: {\n type: 'agent-action',\n direction: 'spawned-child',\n agentId: childId,\n provider: typeof p.provider === 'string' ? p.provider : undefined,\n status,\n reason: typeof p.reason === 'string' ? p.reason : undefined,\n timestamp: ts,\n },\n }\n agentActionByChild.set(childId, item)\n raw.push(item)\n }\n continue\n }\n raw.push({ ts: messageEventTime(msg), entry: { type: 'notice', msg } })\n continue\n }\n const notice = sessionNoticeStatusEvent(msg)\n if (notice) {\n noticeStatusEvents.push(notice)\n continue\n }\n const step = sessionActivityStep(msg)\n if (step) {\n if (step.kind === 'narration' && suppressedNarrationIds.has(step.id)) continue\n raw.push({ ts: step.ts, entry: { type: 'activity', steps: [step], timestamp: step.ts } })\n continue\n }\n const relayInjection = sessionRelayInjectionEvent(msg)\n if (relayInjection) {\n raw.push({ ts: relayInjection.timestamp, entry: { type: 'relay-injection', event: relayInjection } })\n continue\n }\n const promptResolution = sessionPromptResolutionEvent(msg)\n if (promptResolution) {\n raw.push({ ts: promptResolution.timestamp, entry: { type: 'prompt-resolution', event: promptResolution } })\n continue\n }\n if (msg.kind === 'session') {\n const s = msg.payload?.session as { type?: string; turnId?: string } | undefined\n if (s?.type === 'response' && typeof s.turnId === 'string') {\n const body = responseDisplayBodyByMessageId.get(msg.id)\n if (body && body !== msg.body) {\n raw.push({ ts: messageEventTime(msg), entry: { type: 'message', msg: { ...msg, body } } })\n continue\n }\n }\n }\n const entryType = msg.id === initialPromptId ? 'initial-prompt' : 'message'\n raw.push({ ts: messageEventTime(msg), entry: { type: entryType, msg } })\n }\n for (const event of dedupeStatusEvents([...statusEvents, ...noticeStatusEvents])) {\n raw.push({ ts: event.timestamp, entry: { type: 'status', event } })\n }\n\n const typeOrder = { created: 0, date: 1, 'import-boundary': 2, 'imported-message': 3, 'initial-prompt': 4, message: 4, activity: 4, notice: 4, 'agent-action': 4, 'relay-injection': 4, 'prompt-resolution': 4, status: 5 } as const\n raw.sort((a, b) => {\n const dt = a.ts - b.ts\n if (Math.abs(dt) < 3000) return typeOrder[a.entry.type] - typeOrder[b.entry.type] || dt\n return dt\n })\n\n const entries: TimelineEntry[] = []\n let lastDate = ''\n for (const { ts, entry } of raw) {\n if (entry.type === 'created') {\n entries.push(entry)\n continue\n }\n const dk = dateKey(ts)\n if (dk !== lastDate) {\n entries.push({ type: 'date', date: dk, timestamp: ts })\n lastDate = dk\n }\n // Coalesce consecutive activity steps from the same turn into one trace.\n if (entry.type === 'activity') {\n const prev = entries[entries.length - 1]\n if (prev && prev.type === 'activity' && sameActivityTurn(prev, entry)) {\n prev.steps.push(...entry.steps)\n continue\n }\n }\n entries.push(entry)\n }\n\n return entries\n}\n\n// Stable per-entry key — used by Virtuoso for reconciliation AND by chat search to\n// address a match back to its timeline row. Lives here (pure logic) rather than in\n// VirtualTimeline so the search layer can reuse it without pulling in react-virtuoso.\nexport function timelineEntryKey(entry: TimelineEntry): string {\n if (entry.type === 'message') return `msg-${entry.msg.id}`\n if (entry.type === 'initial-prompt') return `msg-${entry.msg.id}`\n if (entry.type === 'notice') return `notice-${entry.msg.id}`\n if (entry.type === 'relay-injection') return `relay-injection-${entry.event.id}`\n if (entry.type === 'prompt-resolution') return `prompt-resolution-${entry.event.id}`\n if (entry.type === 'agent-action') return `agent-action-${entry.direction}-${entry.agentId}`\n // Key by the FIRST step only — stable as the turn streams. Including the last\n // step's id rekeyed the entry on every appended step, so virtuoso treated the\n // in-place-growing turn as a replaced item and lost its resize anchoring: the\n // viewport jumped down by the added height while scrolled up reading history.\n if (entry.type === 'activity') return `act-${entry.steps[0]?.id ?? entry.timestamp}`\n if (entry.type === 'import-boundary') return `import-${entry.history.id}`\n if (entry.type === 'imported-message') return `import-msg-${entry.history.id}-${entry.entry.originalMessageId}-${entry.entry.position}`\n if (entry.type === 'status') return `status-${entry.event.id}`\n if (entry.type === 'date') return `date-${entry.date}`\n return `created-${entry.timestamp}`\n}\n\nfunction timelineEntryLegacyKeys(entry: TimelineEntry): string[] {\n if (entry.type === 'initial-prompt') return [`initprompt-${entry.msg.id}`]\n return []\n}\n\nfunction finiteMessageId(id: unknown): number | null {\n return typeof id === 'number' && Number.isFinite(id) ? id : null\n}\n\nfunction timelineEntryMessageIds(entry: TimelineEntry): number[] {\n if (entry.type === 'message' || entry.type === 'initial-prompt' || entry.type === 'notice') {\n const id = finiteMessageId(entry.msg.id)\n return id === null ? [] : [id]\n }\n if (entry.type === 'relay-injection') return [entry.event.id]\n if (entry.type === 'prompt-resolution') return [entry.event.id]\n if (entry.type === 'activity') return entry.steps.map((step) => step.id).filter(Number.isFinite)\n if (entry.type === 'imported-message') {\n const id = finiteMessageId(entry.entry.message?.id)\n return id === null ? [] : [id]\n }\n return []\n}\n\nexport function timelineEntryAnchor(entry: TimelineEntry): TimelineEntryAnchor | null {\n const ids = timelineEntryMessageIds(entry)\n if (!ids.length) return null\n return { messageId: Math.min(...ids), endMessageId: Math.max(...ids) }\n}\n\nexport function resolveTimelineAnchorIndex(timeline: TimelineEntry[], anchor: TimelineAnchorLocator): number {\n const targetId = finiteMessageId(anchor.messageId)\n if (targetId !== null) {\n const rawEnd = finiteMessageId(anchor.endMessageId)\n const endId = rawEnd !== null && rawEnd >= targetId ? rawEnd : targetId\n let fallbackIndex = -1\n let fallbackId = Number.NEGATIVE_INFINITY\n for (let index = 0; index < timeline.length; index += 1) {\n const ids = timelineEntryMessageIds(timeline[index]!)\n if (ids.some((id) => id >= targetId && id <= endId)) return index\n const nearestBefore = ids.filter((id) => id <= targetId).sort((a, b) => b - a)[0]\n if (nearestBefore !== undefined && nearestBefore > fallbackId) {\n fallbackId = nearestBefore\n fallbackIndex = index\n }\n }\n if (fallbackIndex >= 0) return fallbackIndex\n }\n\n if (anchor.topKey) {\n const index = timeline.findIndex((entry) => timelineEntryKey(entry) === anchor.topKey || timelineEntryLegacyKeys(entry).includes(anchor.topKey!))\n if (index >= 0) return index\n }\n return -1\n}\n\n// Searchable plain text for an entry — what chat search matches against. Only entries\n// that carry human-readable content contribute; structural rows (date/status/created/\n// agent-action/import-boundary) return '' so they're never search targets.\nexport function timelineEntryText(entry: TimelineEntry): string {\n if (entry.type === 'message' || entry.type === 'initial-prompt' || entry.type === 'notice') {\n const subject = entry.msg.subject ? `${entry.msg.subject} ` : ''\n return subject + messageBody(entry.msg)\n }\n if (entry.type === 'imported-message') return messageBody(entry.entry.message)\n if (entry.type === 'activity') {\n return entry.steps.map((step) => [step.label, step.text].filter(Boolean).join(' ')).join('\\n')\n }\n if (entry.type === 'relay-injection') return `${entry.event.category} ${entry.event.summary}\\n${JSON.stringify(entry.event.detail)}`\n if (entry.type === 'prompt-resolution') return [\n entry.event.title,\n entry.event.decisionLabel,\n entry.event.body,\n ...entry.event.questions.map((q) => `${q.question} ${q.answer}`),\n ].filter(Boolean).join('\\n')\n return ''\n}\n\nexport function sameActivityTurn(a: Extract<TimelineEntry, { type: 'activity' }>, b: Extract<TimelineEntry, { type: 'activity' }>): boolean {\n const at = a.steps[a.steps.length - 1]?.turnId\n const bt = b.steps[0]?.turnId\n if (at && bt) return at === bt\n // No turn id on either side: group adjacent steps regardless.\n return !at && !bt\n}\n","\nimport { useEffect, useMemo, useState, useSyncExternalStore } from 'react'\nimport type React from 'react'\nimport { AlertCircle, AlertTriangle, ArrowLeft, BookOpen, Brain, CheckCircle2, ChevronDown, ChevronRight, ChevronUp, Circle, CircleStop, Database, FileText, GitFork, GitMerge, LogOut, PlugZap, Plus, Radio, Sparkles, Terminal, Wrench } from 'lucide-react'\nimport type { LucideIcon } from 'lucide-react'\nimport { FormattedBody } from '@/components/shared/formatted-body'\nimport { HUMAN_AGENT_ID } from '@/lib/constants'\nimport { displayName, messageBody } from '@/lib/display'\nimport type { ChatHistoryImport, ChatHistoryImportEntry } from '@/types'\nimport { cn } from '@/lib/utils'\nimport { chatTimestamp } from './helpers'\nimport { dateKey, TIMELINE_STATUS_LABELS, type ActivityStep, type RelayInjectionCategory, type TimelineEntry } from './sessionTrace'\nimport type { Message } from '@/types'\nimport type { ChatStatusEvent as StatusEvent } from '@/store'\nimport { useRelayStore } from '@/store'\nimport { AgentTypeIcon } from '@/components/shared/agent-type-icon'\nimport { TaskChip } from '@/components/shared/task-chip'\n\nconst TIMELINE_STATUS_COLORS: Record<string, string> = {\n online: 'text-emerald-400',\n offline: 'text-zinc-400',\n shutdown: 'text-zinc-400',\n restarted: 'text-blue-400',\n 'compaction-requested': 'text-zinc-400',\n compacting: 'text-amber-400',\n compacted: 'text-amber-400',\n 'compaction-stalled': 'text-red-400',\n 'clear-requested': 'text-zinc-400',\n 'clearing-context': 'text-amber-400',\n 'context-cleared': 'text-amber-400',\n 'clear-stalled': 'text-red-400',\n 'shutting-down': 'text-zinc-400',\n}\n\nfunction dateSeparatorLabel(dateStr: string): string {\n const today = new Date()\n const [y, m, d] = dateStr.split('-').map(Number)\n const target = new Date(y!, m! - 1, d)\n const todayKey = dateKey(today.getTime())\n if (dateStr === todayKey) return 'Today'\n const yesterday = new Date(today)\n yesterday.setDate(yesterday.getDate() - 1)\n if (dateStr === dateKey(yesterday.getTime())) return 'Yesterday'\n return target.toLocaleDateString(undefined, { weekday: 'short', month: 'short', day: 'numeric', year: target.getFullYear() !== today.getFullYear() ? 'numeric' : undefined })\n}\n\nexport function StatusMarker({ event }: { event: StatusEvent }) {\n return (\n <div className=\"flex items-center justify-center gap-2 py-2 my-1\">\n <div className=\"h-px flex-1 bg-border\" />\n <div className=\"flex items-center gap-1.5 text-xs text-muted-foreground\">\n <Circle className={cn('w-2 h-2 fill-current', TIMELINE_STATUS_COLORS[event.status] || 'text-zinc-400')} />\n <span>{TIMELINE_STATUS_LABELS[event.status] || event.status}</span>\n <span className=\"text-muted-foreground/60\">{chatTimestamp(event.timestamp)}</span>\n </div>\n <div className=\"h-px flex-1 bg-border\" />\n </div>\n )\n}\n\nconst BUS_SIGNAL_ICON: Record<string, LucideIcon> = {\n 'branch.landed': GitMerge,\n 'context.warning': AlertTriangle,\n 'agent.context_threshold': AlertTriangle,\n 'agent.resume_budget_exhausted': AlertTriangle,\n 'agent.rate_limit_resume': PlugZap,\n}\n\n// Explicit overrides for kinds that read better with custom wording; every other bus\n// signal is humanized from its kind (see humanizeSignalKind) so no event renders as a\n// raw dotted identifier and nothing is silently dropped (#507).\nconst BUS_SIGNAL_LABEL: Record<string, string> = {\n 'branch.landed': 'branch landed',\n 'context.warning': 'context warning',\n 'agent.context_threshold': 'context threshold reached',\n}\n\n// Turn an unmapped bus-signal kind into a readable label: drop the leading namespace\n// segment and normalize separators. e.g. `agent.rate_limit_resume` → \"rate limit resume\",\n// `workspace.review-request` → \"review request\". Falls back to \"system signal\" if empty.\nfunction humanizeSignalKind(kind: string): string {\n if (!kind) return 'system signal'\n const withoutNamespace = kind.includes('.') ? kind.slice(kind.indexOf('.') + 1) : kind\n const words = withoutNamespace.replace(/[._-]+/g, ' ').trim()\n return words || 'system signal'\n}\n\n// Inline, clickable agent reference — the ONE place chat resolves an agent id to a\n// label (#522: prefer label everywhere) and links it to that agent's chat (#522: every\n// reference links). Falls back to the raw id only when the agent is unknown and no\n// fallback label was supplied. Reused by NoticePill, AgentActionEntry, and MessageBubble.\nexport function AgentLink({ agentId, fallbackLabel, className, noIcon }: { agentId: string; fallbackLabel?: string; className?: string; noIcon?: boolean }) {\n const agent = useRelayStore((s) => s.agentsById[agentId]) || null\n const openInboxThread = useRelayStore((s) => s.openInboxThread)\n const switchView = useRelayStore((s) => s.switchView)\n const label = agent ? displayName(agent) : (fallbackLabel || agentId)\n return (\n <button\n type=\"button\"\n className={cn('inline-flex max-w-full items-center gap-1 rounded px-1 text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground', className)}\n onClick={(e) => { e.stopPropagation(); openInboxThread(agentId); void switchView('chat') }}\n title={`Open chat for ${label}`}\n >\n {!noIcon && <AgentTypeIcon agent={agent} className=\"w-4 h-4 text-[10px]\" />}\n <span className=\"max-w-[160px] truncate\">{label}</span>\n </button>\n )\n}\n\n// Branch-landed gets a richer pill than the generic notice: the short merge SHA plus a\n// linked \"by {agent}\" attribution (#509). The payload (src/branch-landed.ts) carries\n// sha (mergedSha), author (ownerAgentId), branch, base — all previously dropped.\nfunction BranchLandedPill({ msg }: { msg: Message }) {\n const payload = (msg.payload ?? {}) as Record<string, unknown>\n const routing = routingReason(msg)\n const sha = typeof payload.sha === 'string' ? payload.sha : ''\n const shortSha = sha ? sha.slice(0, 7) : ''\n const author = typeof payload.author === 'string' ? payload.author : ''\n const branch = typeof payload.branch === 'string' ? payload.branch : ''\n const base = typeof payload.base === 'string' ? payload.base : ''\n const pushed = payload.pushed\n const taskId = typeof payload.taskId === 'number' && Number.isSafeInteger(payload.taskId) ? payload.taskId : undefined\n const taskLabel = typeof payload.taskLabel === 'string' ? payload.taskLabel : undefined\n const openTaskDetailById = useRelayStore((s) => s.openTaskDetailById)\n return (\n <div className=\"flex items-center justify-center gap-2 py-2 my-1\">\n <div className=\"h-px flex-1 bg-border\" />\n {/* Emerald shades flip per theme (#612): darker text/border on light themes for\n contrast, the lighter dark-mode shades under `dark:`. The transparent green\n fill stays the same so the look is preserved in both. */}\n <div className=\"flex max-w-full flex-wrap items-center justify-center gap-x-1.5 gap-y-0.5 rounded-full border border-emerald-600/35 bg-emerald-500/10 px-2.5 py-1 text-xs text-emerald-700 dark:border-emerald-500/25 dark:text-emerald-300/90\">\n <GitMerge className=\"h-3 w-3 shrink-0 text-emerald-600 dark:text-emerald-400\" />\n <span className=\"text-emerald-700 dark:text-emerald-300\">branch landed</span>\n {branch && base && (\n <span className=\"font-mono text-emerald-700/80 dark:text-emerald-200/70\" title={`${branch} → ${base}`}>\n {branch}<span className=\"opacity-50\"> → </span>{base}\n </span>\n )}\n {shortSha && (\n <span className=\"rounded bg-emerald-500/15 px-1 font-mono text-emerald-800 dark:text-emerald-200\" title={sha}>{shortSha}</span>\n )}\n {author && (\n <span className=\"inline-flex items-center gap-1 text-emerald-700/80 dark:text-emerald-300/80\">\n <span className=\"opacity-70\">by</span>\n <AgentLink agentId={author} className=\"text-emerald-700 hover:text-emerald-900 dark:text-emerald-300/90 dark:hover:text-emerald-100\" />\n </span>\n )}\n {taskId != null && <TaskChip id={taskId} title={taskLabel} compact onClick={() => openTaskDetailById(taskId)} />}\n {pushed === false && <span className=\"text-amber-600 dark:text-amber-300/80\" title=\"Local-only land — not pushed to origin\">· local only</span>}\n {routing && <span className=\"max-w-[220px] truncate text-emerald-700/70 dark:text-emerald-300/70\" title={routing}>· because {routing}</span>}\n <span className=\"text-emerald-700/60 dark:text-emerald-300/50\">{chatTimestamp(msg.occurredAt ?? (msg.createdAt as string))}</span>\n </div>\n <div className=\"h-px flex-1 bg-border\" />\n </div>\n )\n}\n\nexport function NoticePill({ msg }: { msg: Message }) {\n const signalKind = typeof msg.payload?.kind === 'string' ? msg.payload.kind : ''\n if (signalKind === 'branch.landed') return <BranchLandedPill msg={msg} />\n const Icon: LucideIcon = BUS_SIGNAL_ICON[signalKind] ?? Radio\n const label = BUS_SIGNAL_LABEL[signalKind] ?? humanizeSignalKind(signalKind)\n const routing = routingReason(msg)\n return (\n <div className=\"flex items-center justify-center gap-2 py-2 my-1\">\n <div className=\"h-px flex-1 bg-border\" />\n <div className=\"flex items-center gap-1.5 rounded-full border border-border bg-muted/30 px-2.5 py-1 text-xs text-muted-foreground\">\n <Icon className=\"h-3 w-3\" />\n <span>{label}</span>\n {routing && <span className=\"max-w-[220px] truncate text-muted-foreground/80\" title={routing}>· because {routing}</span>}\n <span className=\"text-muted-foreground/60\">{chatTimestamp(msg.occurredAt ?? (msg.createdAt as string))}</span>\n </div>\n <div className=\"h-px flex-1 bg-border\" />\n </div>\n )\n}\n\nfunction routingReason(msg: Message): string {\n const routing = msg.payload?.routing\n if (!routing || typeof routing !== 'object' || Array.isArray(routing)) return ''\n const reason = (routing as Record<string, unknown>).reason\n return typeof reason === 'string' ? reason : ''\n}\n\nconst AGENT_ACTION_VERB: Record<string, Record<string, string>> = {\n 'spawned-child': { ready: 'spawned', exited: 'spawned · exited', failed: 'spawn failed' },\n 'spawned-by': { ready: 'spawned by', exited: 'spawned by', failed: 'spawned by' },\n}\n\nconst AGENT_ACTION_ICON: Record<string, LucideIcon> = {\n 'spawned-child-ready': Plus,\n 'spawned-child-exited': LogOut,\n 'spawned-child-failed': AlertCircle,\n 'spawned-by-ready': ArrowLeft,\n 'spawned-by-exited': ArrowLeft,\n 'spawned-by-failed': ArrowLeft,\n}\n\nconst AGENT_ACTION_COLOR: Record<string, string> = {\n 'spawned-child-ready': 'text-emerald-400',\n 'spawned-child-exited': 'text-zinc-400',\n 'spawned-child-failed': 'text-red-400',\n 'spawned-by-ready': 'text-blue-400',\n 'spawned-by-exited': 'text-blue-400',\n 'spawned-by-failed': 'text-blue-400',\n}\n\nexport function AgentActionEntry({ entry }: { entry: Extract<TimelineEntry, { type: 'agent-action' }> }) {\n const key = `${entry.direction}-${entry.status}`\n const verb = AGENT_ACTION_VERB[entry.direction]?.[entry.status] ?? entry.direction\n const Icon: LucideIcon = AGENT_ACTION_ICON[key] ?? Radio\n const color = AGENT_ACTION_COLOR[key] ?? 'text-muted-foreground'\n const isError = entry.status === 'failed'\n\n return (\n <div className=\"flex items-center justify-center gap-2 py-2 my-1\">\n <div className=\"h-px flex-1 bg-border\" />\n <div className={cn('flex items-center gap-1.5 rounded-full border bg-muted/30 px-2.5 py-1 text-xs', isError ? 'border-red-500/30' : 'border-border')}>\n <Icon className={cn('h-3 w-3 shrink-0', color)} />\n <span className=\"text-muted-foreground\">{verb}</span>\n <AgentLink agentId={entry.agentId} />\n {entry.reason && isError && (\n <span className=\"text-red-400/80 max-w-[120px] truncate\" title={entry.reason}>— {entry.reason}</span>\n )}\n <span className=\"text-muted-foreground/60 shrink-0\">{chatTimestamp(entry.timestamp)}</span>\n </div>\n <div className=\"h-px flex-1 bg-border\" />\n </div>\n )\n}\n\nconst RELAY_INJECTION_ICON: Record<RelayInjectionCategory, LucideIcon> = {\n memory: Brain,\n instructions: FileText,\n tools: Wrench,\n comms: Radio,\n knowledge: BookOpen,\n context: Database,\n}\n\nconst RELAY_INJECTION_TONE: Record<RelayInjectionCategory, string> = {\n memory: 'border-emerald-500/25 bg-emerald-500/10 text-emerald-300',\n instructions: 'border-sky-500/25 bg-sky-500/10 text-sky-300',\n tools: 'border-amber-500/25 bg-amber-500/10 text-amber-300',\n comms: 'border-violet-500/25 bg-violet-500/10 text-violet-300',\n knowledge: 'border-cyan-500/25 bg-cyan-500/10 text-cyan-300',\n context: 'border-zinc-500/25 bg-zinc-500/10 text-zinc-300',\n}\n\nfunction detailJson(detail: Record<string, unknown>): string {\n try {\n return JSON.stringify(detail, null, 2)\n } catch {\n return String(detail)\n }\n}\n\nexport function RelayInjectionRow({ entry }: { entry: Extract<TimelineEntry, { type: 'relay-injection' }> }) {\n const [expanded, setExpanded] = useState(false)\n const event = entry.event\n const Icon = RELAY_INJECTION_ICON[event.category] ?? Sparkles\n const tone = RELAY_INJECTION_TONE[event.category] ?? RELAY_INJECTION_TONE.context\n return (\n <div className=\"flex justify-center py-2 my-1\">\n <div className={cn('w-full max-w-[85%] md:max-w-[75%] rounded-lg border px-2.5 py-1.5 text-xs shadow-sm', tone)}>\n <button\n type=\"button\"\n className=\"flex w-full min-w-0 items-center gap-1.5 text-left\"\n onClick={() => setExpanded((value) => !value)}\n >\n <Icon className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"shrink-0 font-medium\">{event.category}</span>\n <span className=\"min-w-0 flex-1 truncate text-foreground/80\">{event.summary}</span>\n <span className=\"shrink-0 text-muted-foreground/60\">{chatTimestamp(event.timestamp)}</span>\n <ChevronRight className={cn('h-3.5 w-3.5 shrink-0 transition-transform', expanded && 'rotate-90')} />\n </button>\n {expanded && (\n <pre className=\"mt-2 max-h-72 overflow-auto rounded-md border border-border/60 bg-background/75 p-2 font-mono text-[11px] leading-relaxed text-muted-foreground whitespace-pre-wrap break-words\">\n {detailJson(event.detail)}\n </pre>\n )}\n </div>\n </div>\n )\n}\n\nexport function BusyIndicator({ blockedLabel, onInterrupt }: { blockedLabel?: string; onInterrupt?: () => void }) {\n if (blockedLabel) {\n return (\n <div className=\"flex justify-start mb-3 animate-in fade-in slide-in-from-bottom-1 duration-150\">\n <div className=\"flex h-9 items-center gap-2 rounded-2xl rounded-bl-sm bg-card ring-1 ring-red-500/30 px-4\">\n <AlertCircle className=\"w-3.5 h-3.5 text-red-400\" />\n <span className=\"text-xs text-red-300\">blocked: {blockedLabel}</span>\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"flex justify-start mb-3 animate-in fade-in slide-in-from-bottom-1 duration-150\">\n <div className=\"flex h-9 items-center gap-2 rounded-2xl rounded-bl-sm bg-card ring-1 ring-foreground/10 px-4\">\n <div className=\"flex items-center gap-1\">\n <span className=\"w-1.5 h-1.5 rounded-full bg-yellow-400 animate-[pulse_1.4s_ease-in-out_infinite]\" />\n <span className=\"w-1.5 h-1.5 rounded-full bg-yellow-400 animate-[pulse_1.4s_ease-in-out_0.2s_infinite]\" />\n <span className=\"w-1.5 h-1.5 rounded-full bg-yellow-400 animate-[pulse_1.4s_ease-in-out_0.4s_infinite]\" />\n </div>\n <span className=\"text-xs text-muted-foreground\">working</span>\n {onInterrupt && (\n <button\n onClick={onInterrupt}\n title=\"Interrupt\"\n className=\"ml-1 flex items-center gap-1 rounded-full px-1.5 py-0.5 text-xs text-muted-foreground hover:text-red-300 hover:bg-red-500/10 transition-colors\"\n >\n <CircleStop className=\"w-3.5 h-3.5\" />\n Stop\n </button>\n )}\n </div>\n </div>\n )\n}\n\nconst HIDE_TOOLS_KEY = 'agent-relay:chat-hide-tools'\nconst hideToolsStore = (() => {\n const listeners = new Set<() => void>()\n let value = (() => {\n try {\n return window.localStorage.getItem(HIDE_TOOLS_KEY) === 'on'\n } catch {\n return false\n }\n })()\n const emit = () => listeners.forEach((l) => l())\n if (typeof window !== 'undefined') {\n window.addEventListener('storage', (e) => {\n if (e.key !== HIDE_TOOLS_KEY) return\n value = e.newValue === 'on'\n emit()\n })\n }\n return {\n subscribe(cb: () => void) {\n listeners.add(cb)\n return () => listeners.delete(cb)\n },\n get: () => value,\n toggle() {\n value = !value\n try {\n window.localStorage.setItem(HIDE_TOOLS_KEY, value ? 'on' : 'off')\n } catch {}\n emit()\n },\n }\n})()\n\nfunction useHideTools(): [boolean, () => void] {\n const hideTools = useSyncExternalStore(hideToolsStore.subscribe, hideToolsStore.get, () => false)\n return [hideTools, hideToolsStore.toggle]\n}\n\nexport function ActivityTrace({ steps, showReasoning, issueRepo }: { steps: ActivityStep[]; showReasoning: boolean; issueRepo?: string }) {\n const [hideTools, toggleHideTools] = useHideTools()\n const visible = showReasoning ? steps : steps.filter((s) => s.kind !== 'reasoning')\n if (!visible.length) return null\n const toolCount = visible.filter((s) => s.kind === 'tool').length\n return (\n <div className=\"flex justify-start mb-2\">\n <div className=\"max-w-[85%] md:max-w-[75%] min-w-0 space-y-1.5\">\n {visible.map((step) => {\n if (step.kind === 'narration') {\n return (\n <FormattedBody\n key={step.id}\n text={step.text}\n issueRepo={issueRepo}\n className=\"text-sm leading-relaxed break-words text-foreground/90 min-w-0\"\n />\n )\n }\n if (step.kind === 'reasoning') {\n return (\n <div key={step.id} className=\"flex items-start gap-1.5 text-xs leading-relaxed text-muted-foreground/80\">\n <Brain className=\"w-3.5 h-3.5 mt-0.5 shrink-0 opacity-70\" />\n <FormattedBody text={step.text} issueRepo={issueRepo} className=\"italic break-words min-w-0\" />\n </div>\n )\n }\n if (hideTools) return null\n return (\n <div key={step.id} className=\"flex items-start gap-1.5 text-xs leading-relaxed text-muted-foreground\">\n <Terminal className=\"w-3 h-3 mt-0.5 shrink-0 opacity-70\" />\n <span className=\"min-w-0 break-words\">\n <span className=\"font-medium\">{step.label || 'tool'}</span>\n {step.text && step.text.trim() && step.text.trim() !== (step.label ?? '').trim() ? <span className=\"opacity-70\"> — {step.text}</span> : null}\n </span>\n </div>\n )\n })}\n {toolCount > 0 && (\n <button\n onClick={toggleHideTools}\n className=\"flex items-center gap-1 text-[11px] text-muted-foreground/50 hover:text-muted-foreground transition-colors text-left\"\n >\n <ChevronRight className={cn('w-3 h-3 shrink-0 transition-transform', !hideTools && 'rotate-90')} />\n <span>{hideTools ? `show ${toolCount} tool step${toolCount === 1 ? '' : 's'}` : 'hide tool steps'}</span>\n </button>\n )}\n </div>\n </div>\n )\n}\n\nexport function PromptResolutionRow({ entry }: { entry: Extract<TimelineEntry, { type: 'prompt-resolution' }> }) {\n const { event } = entry\n const isQuestions = event.kind === 'questions'\n const heading = isQuestions ? event.title : event.kind === 'plan' ? 'Plan prompt' : `${event.toolName} permission`\n return (\n <div className=\"flex justify-center py-1.5\">\n <div className=\"w-full max-w-2xl rounded-md border border-border bg-muted/20 px-3 py-2 text-sm\">\n <div className=\"flex items-center gap-2 text-xs text-muted-foreground\">\n <CheckCircle2 className=\"h-3.5 w-3.5 text-emerald-500\" />\n <span className=\"font-medium text-foreground\">{heading}</span>\n <span>{event.decisionLabel}</span>\n <span className=\"ml-auto shrink-0 text-muted-foreground/60\">{chatTimestamp(event.timestamp)}</span>\n </div>\n {isQuestions && event.questions.length > 0 ? (\n <div className=\"mt-2 space-y-1.5\">\n {event.questions.map((row, index) => (\n <div key={`${row.question}-${index}`} className=\"grid gap-0.5\">\n <div className=\"text-xs text-muted-foreground\">{row.question}</div>\n <div className=\"text-sm text-foreground\">{row.answer}</div>\n </div>\n ))}\n </div>\n ) : event.body.trim() ? (\n <div className=\"mt-2 max-h-48 overflow-auto rounded border border-border/70 bg-background/40 px-2 py-1.5 text-sm\">\n <FormattedBody text={event.body} />\n </div>\n ) : null}\n </div>\n </div>\n )\n}\n\nexport function DateSeparator({ date }: { date: string }) {\n return (\n <div className=\"flex items-center justify-center gap-3 py-3 my-1\">\n <div className=\"h-px flex-1 bg-border\" />\n <span className=\"text-xs font-medium text-muted-foreground\">{dateSeparatorLabel(date)}</span>\n <div className=\"h-px flex-1 bg-border\" />\n </div>\n )\n}\n\nexport function CreatedMarker({ timestamp }: { timestamp: number }) {\n const d = new Date(timestamp)\n const label = d.toLocaleString(undefined, { month: 'short', day: 'numeric', year: 'numeric', hour: '2-digit', minute: '2-digit' })\n return (\n <div className=\"flex items-center justify-center gap-2 py-2 my-1\">\n <div className=\"h-px flex-1 bg-border\" />\n <span className=\"text-xs text-muted-foreground/60\">created {label}</span>\n <div className=\"h-px flex-1 bg-border\" />\n </div>\n )\n}\n\nexport function ImportedHistoryMarker({ history }: { history: ChatHistoryImport }) {\n const source = history.sourceAgentLabel || history.sourcePeerId\n const count = history.entries.length\n return (\n <div className=\"flex items-center justify-center gap-2 py-2 my-1\">\n <div className=\"h-px flex-1 bg-border\" />\n <div className=\"flex items-center gap-1.5 rounded-full border border-dashed border-border bg-muted/30 px-2 py-1 text-[11px] text-muted-foreground\">\n <GitFork className=\"h-3 w-3\" />\n <span>forked history from {source}</span>\n <span className=\"text-muted-foreground/60\">{count} {count === 1 ? 'entry' : 'entries'}</span>\n </div>\n <div className=\"h-px flex-1 bg-border\" />\n </div>\n )\n}\n\nexport function ImportedMessageBubble({ entry, sourceLabel, issueRepo }: { entry: ChatHistoryImportEntry; sourceLabel?: string; issueRepo?: string }) {\n const msg = entry.message\n const body = messageBody(msg)\n const isOriginalHuman = entry.originalFrom === HUMAN_AGENT_ID\n return (\n <div className={cn('flex mb-3 opacity-80', isOriginalHuman ? 'justify-end' : 'justify-start')}>\n <div className=\"max-w-[85%] md:max-w-[75%]\">\n <div\n className={cn(\n 'rounded-2xl border border-dashed px-3.5 py-2 text-sm select-text',\n isOriginalHuman\n ? 'border-primary/25 bg-primary/10 text-foreground rounded-br-sm'\n : 'border-border bg-card/70 rounded-bl-sm'\n )}\n >\n <div className={cn('mb-1 text-[10px] uppercase tracking-normal', isOriginalHuman ? 'text-primary/70' : 'text-muted-foreground')}>\n forked history · {isOriginalHuman ? 'you' : (sourceLabel || entry.originalFrom)}\n </div>\n <FormattedBody text={body} rawBody={msg.body} issueRepo={issueRepo} className=\"leading-relaxed\" />\n <p className={cn('mt-1 flex items-center justify-end gap-1.5 text-xs', isOriginalHuman ? 'text-primary/60' : 'text-muted-foreground')}>\n <span className=\"opacity-40\">#{entry.originalMessageId}</span>\n <span>{chatTimestamp(entry.originalCreatedAt)}</span>\n </p>\n </div>\n </div>\n </div>\n )\n}\n\n// The initial/spawn prompt (#513) — the message that kicked off the session — gets a\n// distinct titled panel instead of a plain user bubble, so it reads as the brief at the\n// top of the conversation. data-msg-id is preserved for the scroll/measurement logic.\nexport function InitialPromptBubble({ msg, issueRepo }: { msg: Message; issueRepo?: string }) {\n const body = messageBody(msg)\n const time = chatTimestamp(msg.occurredAt ?? (msg.createdAt as string))\n return (\n <div data-msg-id={msg.id} className=\"mb-3\">\n <div className=\"rounded-xl border border-primary/30 bg-primary/[0.06] px-3.5 py-2.5 shadow-sm\">\n <div className=\"mb-1.5 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wide text-primary/80\">\n <Sparkles className=\"h-3.5 w-3.5\" />\n <span>Initial prompt</span>\n <span className=\"ml-auto text-[10px] font-normal normal-case text-muted-foreground/60\">{time}</span>\n </div>\n <FormattedBody text={body} rawBody={msg.body} issueRepo={issueRepo} className=\"text-sm leading-relaxed text-foreground\" />\n </div>\n </div>\n )\n}\n\n// Pinned \"Last prompt\" reminder. Rendered as a shrink-0 flex sibling ABOVE the timeline in\n// ChatPanel — the SAME mechanism as the chat search bar (ChatSearchBar) — so it stays put\n// above the conversation instead of scrolling away (#545). It previously lived inside the\n// scroll container as a position:sticky child, which broke when the timeline was virtualized\n// (b0ef5c5): a Virtuoso Header item scrolls/unmounts, so sticky no longer pinned it and it was\n// only glimpsed at the very top. `scrollEl` is the Virtuoso scroller (lifted up from\n// VirtualTimeline), used to observe whether the original prompt is on-screen and to scroll to it.\nexport function StickyPromptBanner({ scrollEl, timeline }: { scrollEl: HTMLElement | null; timeline: TimelineEntry[] }) {\n const [hidden, setHidden] = useState(true)\n const [expandedByPrompt, setExpandedByPrompt] = useState<{ id: number; value: boolean } | null>(null)\n const [collapsedByPrompt, setCollapsedByPrompt] = useState<{ id: number; value: boolean } | null>(null)\n const [promptAbove, setPromptAbove] = useState(false)\n\n const lastOutbound = useMemo(() => {\n for (let i = timeline.length - 1; i >= 0; i--) {\n const entry = timeline[i]\n if (!entry || (entry.type !== 'message' && entry.type !== 'initial-prompt')) continue\n if (entry.msg.from === HUMAN_AGENT_ID) {\n return { id: entry.msg.id, body: messageBody(entry.msg) }\n }\n }\n return null\n }, [timeline])\n\n // Auto-hide while the original prompt is on-screen (no reminder needed), show it once the\n // prompt scrolls out of view. The timeline is virtualized, so the prompt row mounts/unmounts\n // as you scroll — re-resolve the target on every scroll and re-attach the observer when the\n // row swaps. When the row is unmounted entirely it's definitely off-screen, so show the banner.\n useEffect(() => {\n if (!lastOutbound || !scrollEl) { setHidden(true); return }\n let observer: IntersectionObserver | null = null\n let observed: Element | null = null\n const sync = () => {\n const target = scrollEl.querySelector(`[data-msg-id=\"${lastOutbound.id}\"]`)\n if (!target) {\n observer?.disconnect()\n observer = null\n observed = null\n setHidden(false) // prompt row virtualized away → off-screen → show the reminder\n return\n }\n const r = target.getBoundingClientRect()\n const sr = scrollEl.getBoundingClientRect()\n setPromptAbove(r.top < sr.top)\n if (target === observed) return\n observer?.disconnect()\n observed = target\n observer = new IntersectionObserver(\n ([e]) => { if (e) setHidden(e.isIntersecting) },\n { root: scrollEl, threshold: 0 }\n )\n observer.observe(target)\n }\n sync()\n scrollEl.addEventListener('scroll', sync, { passive: true })\n return () => { observer?.disconnect(); scrollEl.removeEventListener('scroll', sync) }\n }, [lastOutbound?.id, scrollEl])\n\n if (hidden || !lastOutbound || !lastOutbound.body.trim()) return null\n\n const expanded = expandedByPrompt?.id === lastOutbound.id ? expandedByPrompt.value : false\n const collapsed = collapsedByPrompt?.id === lastOutbound.id ? collapsedByPrompt.value : false\n\n function scrollToPrompt() {\n if (!scrollEl || !lastOutbound) return\n const target = scrollEl.querySelector(`[data-msg-id=\"${lastOutbound.id}\"]`)\n target?.scrollIntoView({ behavior: 'smooth', block: 'center' })\n }\n\n const arrow = promptAbove ? '↑' : '↓'\n\n if (collapsed) {\n return (\n <div className=\"flex shrink-0 bg-card/45 border-b border-border\">\n <button\n type=\"button\"\n className=\"w-full flex items-center justify-center gap-1.5 py-1 text-[11px] text-primary/60 hover:text-primary transition-colors\"\n onClick={() => setCollapsedByPrompt({ id: lastOutbound.id, value: false })}\n >\n <span>Your prompt</span>\n <ChevronDown className=\"w-3 h-3\" />\n </button>\n </div>\n )\n }\n\n return (\n <section className=\"flex shrink-0 flex-col border-b border-border bg-card/45 px-3 py-2\">\n <div className=\"flex items-center gap-2 text-[11px] text-muted-foreground mb-0.5\">\n <span className=\"font-medium text-primary/70\">Your prompt</span>\n <button\n type=\"button\"\n className=\"ml-auto hover:text-foreground transition-colors\"\n onClick={scrollToPrompt}\n >\n {arrow} scroll to original\n </button>\n <button\n type=\"button\"\n className=\"hover:text-foreground transition-colors\"\n onClick={() => setCollapsedByPrompt({ id: lastOutbound.id, value: true })}\n title=\"Minimize\"\n >\n <ChevronUp className=\"w-3 h-3\" />\n </button>\n </div>\n <p\n className={cn('text-sm text-foreground leading-snug cursor-pointer', !expanded && 'line-clamp-2')}\n onClick={() => setExpandedByPrompt({ id: lastOutbound.id, value: !expanded })}\n >\n {lastOutbound.body}\n </p>\n </section>\n )\n}\n","import { useState } from 'react'\nimport { useRelayStore, useNow } from '@/store'\nimport { Sheet, SheetClose, SheetContent, SheetHeader, SheetTitle } from '@/components/ui/sheet'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Textarea } from '@/components/ui/textarea'\nimport { Label } from '@/components/ui/label'\nimport { ScrollArea } from '@/components/ui/scroll-area'\nimport { Separator } from '@/components/ui/separator'\nimport { ExternalLink, CheckCircle2, XCircle, GitBranch, GitCommit, Clock, Pencil, XIcon, Zap, AlertTriangle } from 'lucide-react'\nimport { timeAgo, fmtTime } from '@/lib/display'\nimport { AgentLink } from '@/components/chat/TraceView'\nimport { TASK_DISPATCH_COMPLEXITIES, TASK_DISPATCH_TYPES, TASK_DISPATCH_FOOTPRINTS, TASK_DISPATCH_CRITICALITIES } from 'agent-relay-sdk/types'\nimport type { TaskDetail, TaskGateState, TaskIssueLink, TaskEvent, TaskMemory, TaskDispatch, TaskDispatchWorkShapeProjection, TaskDispatchDecisionProjection, TaskBoundWorkerModelProjection } from '@/types'\nimport { FormattedBody } from '@/components/shared/formatted-body'\n\nconst STAGE_LABELS: Record<string, string> = {\n none: 'None',\n uncommitted: 'Uncommitted',\n 'committed-on-branch': 'On Branch',\n 'landed-on-main': 'Landed',\n deploying: 'Deploying',\n deployed: 'Deployed',\n}\n\nconst STATUS_COLORS: Record<string, string> = {\n open: 'bg-blue-500/10 text-blue-400 border-blue-500/20',\n claimed: 'bg-purple-500/10 text-purple-300 border-purple-500/20',\n in_progress: 'bg-purple-500/10 text-purple-400 border-purple-500/20',\n blocked: 'bg-yellow-500/10 text-yellow-400 border-yellow-500/20',\n orphaned: 'bg-zinc-500/10 text-zinc-400 border-zinc-500/20',\n done: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/20',\n failed: 'bg-red-500/10 text-red-400 border-red-500/20',\n canceled: 'bg-zinc-500/10 text-zinc-400 border-zinc-500/20',\n}\n\nconst STAGE_COLORS: Record<string, string> = {\n none: 'bg-zinc-500/10 text-zinc-400',\n uncommitted: 'bg-yellow-500/10 text-yellow-400',\n 'committed-on-branch': 'bg-blue-500/10 text-blue-400',\n 'landed-on-main': 'bg-emerald-500/10 text-emerald-400',\n deploying: 'bg-purple-500/10 text-purple-400',\n deployed: 'bg-teal-500/10 text-teal-400',\n}\n\ninterface EditForm {\n title: string\n intent: string\n latestSteer: string\n doneWhen: string\n teamId: string\n dispatchComplexity: string\n dispatchType: string\n dispatchFootprint: string\n dispatchCriticality: string\n}\n\nfunction detailToEditForm(detail: TaskDetail): EditForm {\n const d = detail.dispatch as TaskDispatch | undefined\n return {\n title: detail.title ?? '',\n intent: detail.intent ?? '',\n latestSteer: detail.latestSteer ?? '',\n doneWhen: detail.doneWhen ?? '',\n teamId: detail.teamId ?? '',\n dispatchComplexity: d?.complexity ?? '',\n dispatchType: d?.type ?? '',\n dispatchFootprint: d?.contextFootprint ?? '',\n dispatchCriticality: d?.criticality ?? '',\n }\n}\n\nexport function TaskDetailDrawer() {\n const now = useNow()\n const open = useRelayStore((s) => s.taskDetailOpen)\n const taskDetailId = useRelayStore((s) => s.taskDetailId)\n const taskDetailById = useRelayStore((s) => s.taskDetailById)\n const taskMemoryById = useRelayStore((s) => s.taskMemoryById)\n const taskHistoryById = useRelayStore((s) => s.taskHistoryById)\n const taskDispatchResultById = useRelayStore((s) => s.taskDispatchResultById)\n const taskDispatchLoadingId = useRelayStore((s) => s.taskDispatchLoadingId)\n const providerCatalog = useRelayStore((s) => s.providerCatalog)\n const closeTaskDetail = useRelayStore((s) => s.closeTaskDetail)\n const doEditTask = useRelayStore((s) => s.doEditTask)\n const doDispatchTask = useRelayStore((s) => s.doDispatchTask)\n const doSpawnWithTask = useRelayStore((s) => s.doSpawnWithTask)\n const providers = providerCatalog.map((e) => e.provider)\n\n const [editMode, setEditMode] = useState(false)\n const [editForm, setEditForm] = useState<EditForm | null>(null)\n const [pinProvider, setPinProvider] = useState('')\n const [pinModel, setPinModel] = useState('')\n const [pinEffort, setPinEffort] = useState('')\n\n const detail: TaskDetail | null = taskDetailId != null ? (taskDetailById[taskDetailId] ?? null) : null\n const memory: TaskMemory | null = taskDetailId != null ? (taskMemoryById[taskDetailId] ?? null) : null\n const history: TaskEvent[] = taskDetailId != null ? (taskHistoryById[taskDetailId] ?? []) : []\n const dispatchResult = taskDetailId != null ? (taskDispatchResultById[taskDetailId] ?? null) : null\n const isDispatchLoading = taskDetailId != null && taskDispatchLoadingId === taskDetailId\n\n const statusClass = detail ? (STATUS_COLORS[detail.status] ?? 'bg-zinc-500/10 text-zinc-400') : ''\n const stageClass = detail?.deliverableStage ? (STAGE_COLORS[detail.deliverableStage] ?? 'bg-zinc-500/10 text-zinc-400') : ''\n\n function handleOpenChange(o: boolean) {\n if (!o) {\n closeTaskDetail()\n setEditMode(false)\n setEditForm(null)\n }\n }\n\n function startEdit() {\n if (!detail) return\n setEditForm(detailToEditForm(detail))\n setEditMode(true)\n }\n\n function cancelEdit() {\n setEditMode(false)\n setEditForm(null)\n }\n\n async function saveEdit() {\n if (!detail || !editForm) return\n const dispatch: Record<string, string> = {}\n if (editForm.dispatchComplexity) dispatch.complexity = editForm.dispatchComplexity\n if (editForm.dispatchType) dispatch.type = editForm.dispatchType\n if (editForm.dispatchFootprint) dispatch.contextFootprint = editForm.dispatchFootprint\n if (editForm.dispatchCriticality) dispatch.criticality = editForm.dispatchCriticality\n const patch: Record<string, unknown> = {\n ...(editForm.title !== detail.title ? { title: editForm.title } : {}),\n ...(editForm.intent !== (detail.intent ?? '') ? { intent: editForm.intent } : {}),\n ...(editForm.latestSteer !== (detail.latestSteer ?? '') ? { latestSteer: editForm.latestSteer } : {}),\n ...(editForm.doneWhen !== (detail.doneWhen ?? '') ? { doneWhen: editForm.doneWhen } : {}),\n ...(editForm.teamId !== (detail.teamId ?? '') ? { teamId: editForm.teamId } : {}),\n ...(Object.keys(dispatch).length || detail.dispatch ? { dispatch: Object.keys(dispatch).length ? dispatch : null } : {}),\n }\n if (!Object.keys(patch).length) { cancelEdit(); return }\n await doEditTask(detail.id, patch)\n setEditMode(false)\n setEditForm(null)\n }\n\n function handleDispatch() {\n if (!detail) return\n const pin: Record<string, string> = {}\n if (pinProvider) pin.provider = pinProvider\n if (pinModel) pin.model = pinModel\n if (pinEffort) pin.effort = pinEffort\n void doDispatchTask(detail.id, Object.keys(pin).length ? pin : undefined)\n }\n\n return (\n <Sheet open={open} onOpenChange={handleOpenChange}>\n <SheetContent className=\"w-full max-w-[100dvw] sm:max-w-lg lg:max-w-xl p-0 flex flex-col\" showCloseButton={false}>\n <SheetHeader className=\"shrink-0 p-4 border-b border-border\">\n <div className=\"flex items-start gap-2 min-w-0\">\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 flex-wrap mb-1\">\n {detail && (\n <>\n <Badge variant=\"outline\" className={`text-xs border ${statusClass}`}>{detail.status}</Badge>\n {detail.deliverableStage && (\n <Badge variant=\"secondary\" className={`text-xs ${stageClass}`}>\n {STAGE_LABELS[detail.deliverableStage] ?? detail.deliverableStage}\n </Badge>\n )}\n <span className=\"text-xs text-muted-foreground\">T{detail.id}</span>\n </>\n )}\n </div>\n <SheetTitle className=\"text-base leading-snug\">{detail?.title ?? 'Task'}</SheetTitle>\n </div>\n <div className=\"flex items-center gap-1 shrink-0\">\n {detail && !editMode && (\n <Button size=\"sm\" variant=\"ghost\" className=\"h-7 px-2\" onClick={startEdit} title=\"Edit task\">\n <Pencil className=\"w-3.5 h-3.5\" />\n </Button>\n )}\n <SheetClose asChild>\n <Button size=\"icon-sm\" variant=\"ghost\" title=\"Close\">\n <XIcon className=\"w-4 h-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n </SheetClose>\n </div>\n </div>\n </SheetHeader>\n\n <ScrollArea className=\"flex-1 min-h-0 overflow-x-hidden\">\n <div className=\"p-4 space-y-5 min-w-0\">\n {!detail && (\n <div className=\"text-sm text-muted-foreground text-center py-8\">Loading…</div>\n )}\n\n {detail && editMode && editForm && (\n <EditPanel\n form={editForm}\n onChange={(p) => setEditForm((f) => f ? { ...f, ...p } : f)}\n onSave={() => void saveEdit()}\n onCancel={cancelEdit}\n />\n )}\n\n {detail && !editMode && (\n <>\n {/* Two-axis status */}\n <section>\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2\">Status</h3>\n <div className=\"grid grid-cols-2 gap-2 text-sm\">\n <div>\n <div className=\"text-xs text-muted-foreground mb-0.5\">Execution</div>\n <Badge variant=\"outline\" className={`text-xs border ${statusClass}`}>{detail.status}</Badge>\n </div>\n <div>\n <div className=\"text-xs text-muted-foreground mb-0.5\">Deliverable stage</div>\n <Badge variant=\"secondary\" className={`text-xs ${stageClass}`}>\n {STAGE_LABELS[detail.deliverableStage ?? 'none'] ?? (detail.deliverableStage ?? 'none')}\n </Badge>\n </div>\n </div>\n {detail.blockedBy && detail.blockedBy.length > 0 && (\n <div className=\"mt-2 space-y-1\">\n {detail.blockedBy.map((b, i) => (\n <div key={i} className=\"flex items-center gap-1 text-xs text-yellow-400 min-w-0\">\n <span className=\"font-medium capitalize shrink-0\">{b.type}</span>\n {b.ref && <span className=\"text-muted-foreground truncate min-w-0\">→ {b.ref}</span>}\n {b.note && <span className=\"text-muted-foreground truncate min-w-0\">{b.note}</span>}\n </div>\n ))}\n </div>\n )}\n </section>\n\n <Separator />\n\n {/* Intent / goal — rendered as markdown so headings/code blocks display correctly (#872) */}\n {(detail.intent || detail.doneWhen) && (\n <>\n <section className=\"space-y-2\">\n {detail.intent && (\n <div>\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-1\">Intent</h3>\n <FormattedBody text={detail.intent} className=\"text-sm min-w-0 break-words [overflow-wrap:anywhere]\" />\n </div>\n )}\n {detail.doneWhen && (\n <div>\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-1\">Done when</h3>\n <FormattedBody text={detail.doneWhen} className=\"text-sm min-w-0 break-words [overflow-wrap:anywhere]\" />\n </div>\n )}\n </section>\n <Separator />\n </>\n )}\n\n {/* Owner agent + attribution */}\n <section>\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2\">Ownership</h3>\n <div className=\"space-y-1 text-sm\">\n {detail.ownerAgentId && (\n <div className=\"flex gap-2 min-w-0\">\n <span className=\"text-muted-foreground shrink-0 w-20\">Owner</span>\n <AgentLink agentId={detail.ownerAgentId} fallbackLabel={detail.ownerAgentLabel} className=\"min-w-0 text-sm\" />\n </div>\n )}\n {detail.createdBy && (\n <div className=\"flex gap-2 min-w-0\">\n <span className=\"text-muted-foreground shrink-0 w-20\">Created by</span>\n <span className=\"min-w-0 break-words [overflow-wrap:anywhere]\" title={detail.createdBy}>{detail.createdBy}</span>\n </div>\n )}\n {detail.teamId && (\n <div className=\"flex gap-2 min-w-0\">\n <span className=\"text-muted-foreground shrink-0 w-20\">Team</span>\n <span className=\"min-w-0 break-words [overflow-wrap:anywhere] font-mono text-xs\" title={detail.teamId}>{detail.teamId}</span>\n </div>\n )}\n <div className=\"flex gap-2\">\n <span className=\"text-muted-foreground shrink-0 w-20\">Created</span>\n <span title={fmtTime(detail.createdAt)}>{timeAgo(now, detail.createdAt)}</span>\n </div>\n <div className=\"flex gap-2\">\n <span className=\"text-muted-foreground shrink-0 w-20\">Updated</span>\n <span title={fmtTime(detail.updatedAt)}>{timeAgo(now, detail.updatedAt)}</span>\n </div>\n </div>\n </section>\n\n {/* Dispatch work-shape + decision + bound worker (#855) */}\n {((detail.dispatchWorkShape?.specified) || detail.dispatchDecision || detail.boundWorkerModel) && (\n <>\n <Separator />\n <DispatchSection detail={detail} />\n </>\n )}\n\n {/* Branch + commits */}\n {(detail.branch || (detail.commits && detail.commits.length > 0)) && (\n <>\n <Separator />\n <section className=\"min-w-0 overflow-hidden\">\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2\">Code</h3>\n {detail.branch && (\n <div className=\"flex items-center gap-1.5 text-sm mb-1 min-w-0\">\n <GitBranch className=\"w-3.5 h-3.5 text-muted-foreground shrink-0\" />\n <span className=\"font-mono text-xs min-w-0 break-words [overflow-wrap:anywhere]\" title={detail.branch}>{detail.branch}</span>\n </div>\n )}\n {detail.commits?.map((c) => (\n <div key={c.sha} className=\"flex items-center gap-1.5 text-sm ml-1 min-w-0\">\n <GitCommit className=\"w-3.5 h-3.5 text-muted-foreground shrink-0\" />\n <span className=\"font-mono text-xs text-muted-foreground shrink-0\">{c.sha.slice(0, 8)}</span>\n {c.subject && <span className=\"text-xs min-w-0 break-words [overflow-wrap:anywhere]\">{c.subject}</span>}\n </div>\n ))}\n </section>\n </>\n )}\n\n {/* Linked issues */}\n {detail.issues && detail.issues.length > 0 && (\n <>\n <Separator />\n <IssuesPanel issues={detail.issues} />\n </>\n )}\n\n {/* Dependency edges */}\n {((detail.dependsOn && detail.dependsOn.length > 0) || (detail.dependents && detail.dependents.length > 0)) && (\n <>\n <Separator />\n <DepsPanel dependsOn={detail.dependsOn ?? []} dependents={detail.dependents ?? []} />\n </>\n )}\n\n {/* Gate ledger timeline */}\n {detail.gates && detail.gates.length > 0 && (\n <>\n <Separator />\n <GateTimeline gates={detail.gates} now={now} />\n </>\n )}\n\n {/* Spawn-with-task (#838 / #845) */}\n <>\n <Separator />\n <SpawnPanel\n taskId={detail.id}\n taskStatus={detail.status}\n pinProvider={pinProvider}\n pinModel={pinModel}\n pinEffort={pinEffort}\n onPinProvider={setPinProvider}\n onPinModel={setPinModel}\n onPinEffort={setPinEffort}\n onDispatch={handleDispatch}\n onSpawn={(target) => void doSpawnWithTask(detail.id, target)}\n loading={isDispatchLoading}\n result={dispatchResult}\n providers={providers}\n />\n </>\n\n {/* Task memory */}\n {memory && (\n <>\n <Separator />\n <MemoryPanel memory={memory} now={now} />\n </>\n )}\n\n {/* History */}\n {history.length > 0 && (\n <>\n <Separator />\n <HistoryPanel history={history} now={now} />\n </>\n )}\n </>\n )}\n </div>\n </ScrollArea>\n </SheetContent>\n </Sheet>\n )\n}\n\nfunction EditPanel({\n form, onChange, onSave, onCancel,\n}: {\n form: EditForm\n onChange: (p: Partial<EditForm>) => void\n onSave: () => void\n onCancel: () => void\n}) {\n return (\n <section className=\"space-y-4\">\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider\">Edit Task fields</h3>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"edit-title\">Title</Label>\n <Input id=\"edit-title\" value={form.title} onChange={(e) => onChange({ title: e.target.value })} />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"edit-intent\">Intent</Label>\n <Textarea id=\"edit-intent\" value={form.intent} onChange={(e) => onChange({ intent: e.target.value })} rows={3} />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"edit-steer\">Latest steer</Label>\n <Textarea id=\"edit-steer\" value={form.latestSteer} onChange={(e) => onChange({ latestSteer: e.target.value })} rows={2} placeholder=\"Redirect or re-scope in-flight work\" />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"edit-done-when\">Done when</Label>\n <Textarea id=\"edit-done-when\" value={form.doneWhen} onChange={(e) => onChange({ doneWhen: e.target.value })} rows={2} />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"edit-team\">Team ID</Label>\n <Input id=\"edit-team\" value={form.teamId} onChange={(e) => onChange({ teamId: e.target.value })} />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider\">Dispatch work-shape</Label>\n <div className=\"grid grid-cols-2 gap-2\">\n <div>\n <Label htmlFor=\"edit-complexity\" className=\"text-xs\">Complexity</Label>\n <select id=\"edit-complexity\" className=\"w-full mt-1 rounded-md border border-input bg-background px-2 py-1.5 text-sm\" value={form.dispatchComplexity} onChange={(e) => onChange({ dispatchComplexity: e.target.value })}>\n <option value=\"\">—</option>\n {TASK_DISPATCH_COMPLEXITIES.map((v) => <option key={v} value={v}>{v}</option>)}\n </select>\n </div>\n <div>\n <Label htmlFor=\"edit-type\" className=\"text-xs\">Type</Label>\n <select id=\"edit-type\" className=\"w-full mt-1 rounded-md border border-input bg-background px-2 py-1.5 text-sm\" value={form.dispatchType} onChange={(e) => onChange({ dispatchType: e.target.value })}>\n <option value=\"\">—</option>\n {TASK_DISPATCH_TYPES.map((v) => <option key={v} value={v}>{v}</option>)}\n </select>\n </div>\n <div>\n <Label htmlFor=\"edit-footprint\" className=\"text-xs\">Context footprint</Label>\n <select id=\"edit-footprint\" className=\"w-full mt-1 rounded-md border border-input bg-background px-2 py-1.5 text-sm\" value={form.dispatchFootprint} onChange={(e) => onChange({ dispatchFootprint: e.target.value })}>\n <option value=\"\">—</option>\n {TASK_DISPATCH_FOOTPRINTS.map((v) => <option key={v} value={v}>{v}</option>)}\n </select>\n </div>\n <div>\n <Label htmlFor=\"edit-criticality\" className=\"text-xs\">Criticality</Label>\n <select id=\"edit-criticality\" className=\"w-full mt-1 rounded-md border border-input bg-background px-2 py-1.5 text-sm\" value={form.dispatchCriticality} onChange={(e) => onChange({ dispatchCriticality: e.target.value })}>\n <option value=\"\">—</option>\n {TASK_DISPATCH_CRITICALITIES.map((v) => <option key={v} value={v}>{v}</option>)}\n </select>\n </div>\n </div>\n </div>\n\n <div className=\"flex gap-2 pt-1\">\n <Button size=\"sm\" onClick={onSave}>Save</Button>\n <Button size=\"sm\" variant=\"outline\" onClick={onCancel}>Cancel</Button>\n </div>\n </section>\n )\n}\n\nfunction DispatchSection({ detail }: { detail: TaskDetail }) {\n const shape = detail.dispatchWorkShape as TaskDispatchWorkShapeProjection | undefined\n const decision = detail.dispatchDecision as TaskDispatchDecisionProjection | undefined\n const worker = detail.boundWorkerModel as TaskBoundWorkerModelProjection | undefined\n return (\n <section className=\"space-y-3\">\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider\">Dispatch</h3>\n {shape && (\n <div>\n <div className=\"text-xs text-muted-foreground mb-1\">Work shape</div>\n {!shape.specified ? (\n <span className=\"text-xs italic text-muted-foreground\">Not specified</span>\n ) : (\n <div className=\"flex flex-wrap gap-1\">\n {shape.complexity && <Badge variant=\"secondary\" className=\"text-xs\">{shape.complexity}</Badge>}\n {shape.type && <Badge variant=\"secondary\" className=\"text-xs\">{shape.type}</Badge>}\n {shape.contextFootprint && <Badge variant=\"secondary\" className=\"text-xs\">{shape.contextFootprint}</Badge>}\n {shape.criticality && <Badge variant=\"secondary\" className=\"text-xs\">{shape.criticality}</Badge>}\n </div>\n )}\n </div>\n )}\n {decision && (\n <div>\n <div className=\"text-xs text-muted-foreground mb-1\">Decision</div>\n <div className=\"flex flex-wrap gap-1 mb-1\">\n {decision.target.provider && <Badge variant=\"secondary\" className=\"text-xs font-mono\">{decision.target.provider}</Badge>}\n {decision.target.model && <Badge variant=\"outline\" className=\"text-xs font-mono\">{decision.target.model}</Badge>}\n {decision.target.effort && <Badge variant=\"outline\" className=\"text-xs\">{decision.target.effort}</Badge>}\n {decision.pinned && <Badge variant=\"outline\" className=\"text-xs text-yellow-400 border-yellow-500/30\">pinned</Badge>}\n </div>\n {decision.rationale && <p className=\"text-xs text-muted-foreground\">{decision.rationale}</p>}\n {decision.warnings?.map((w, i) => (\n <div key={i} className=\"flex items-start gap-1 text-xs text-yellow-400 mt-0.5\">\n <AlertTriangle className=\"w-3 h-3 shrink-0 mt-0.5\" />\n <span>{w}</span>\n </div>\n ))}\n </div>\n )}\n {worker && (\n <div className=\"min-w-0\">\n <div className=\"text-xs text-muted-foreground mb-1\">Bound worker</div>\n <div className=\"flex flex-wrap gap-1 mb-1\">\n {worker.provider && <Badge variant=\"secondary\" className=\"text-xs font-mono\">{worker.provider}</Badge>}\n {worker.model && <Badge variant=\"outline\" className=\"text-xs font-mono\">{worker.model}</Badge>}\n {worker.effort && <Badge variant=\"outline\" className=\"text-xs\">{worker.effort}</Badge>}\n </div>\n <AgentLink agentId={worker.agentId} fallbackLabel={detail.ownerAgentLabel} className=\"text-xs text-muted-foreground\" />\n </div>\n )}\n </section>\n )\n}\n\nconst TERMINAL_STATUSES = new Set(['done', 'canceled', 'failed'])\n\nfunction SpawnPanel({\n taskId, taskStatus, pinProvider, pinModel, pinEffort,\n onPinProvider, onPinModel, onPinEffort,\n onDispatch, onSpawn, loading, result, providers,\n}: {\n taskId: number\n taskStatus: string\n pinProvider: string\n pinModel: string\n pinEffort: string\n onPinProvider: (v: string) => void\n onPinModel: (v: string) => void\n onPinEffort: (v: string) => void\n onDispatch: () => void\n onSpawn: (target: { provider: string; model?: string; effort?: string }) => void\n loading: boolean\n result: import('@/store/types').TaskDispatchResult | null\n providers: string[]\n}) {\n return (\n <section>\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-3\">Spawn with task</h3>\n\n {/* Pin override — the #839 guard: never a black box */}\n <div className=\"grid grid-cols-3 gap-2 mb-3\">\n <div>\n <Label htmlFor={`spawn-provider-${taskId}`} className=\"text-xs\">Provider pin</Label>\n <select\n id={`spawn-provider-${taskId}`}\n className=\"w-full mt-1 rounded-md border border-input bg-background px-2 py-1.5 text-xs\"\n value={pinProvider}\n onChange={(e) => onPinProvider(e.target.value)}\n >\n <option value=\"\">auto</option>\n {providers.map((p) => <option key={p} value={p}>{p}</option>)}\n </select>\n </div>\n <div>\n <Label htmlFor={`spawn-model-${taskId}`} className=\"text-xs\">Model pin</Label>\n <Input\n id={`spawn-model-${taskId}`}\n className=\"mt-1 h-8 text-xs\"\n value={pinModel}\n onChange={(e) => onPinModel(e.target.value)}\n placeholder=\"auto\"\n />\n </div>\n <div>\n <Label htmlFor={`spawn-effort-${taskId}`} className=\"text-xs\">Effort pin</Label>\n <Input\n id={`spawn-effort-${taskId}`}\n className=\"mt-1 h-8 text-xs\"\n value={pinEffort}\n onChange={(e) => onPinEffort(e.target.value)}\n placeholder=\"auto\"\n />\n </div>\n </div>\n\n <Button size=\"sm\" onClick={onDispatch} disabled={loading || TERMINAL_STATUSES.has(taskStatus)} className=\"gap-1.5\">\n <Zap className=\"w-3.5 h-3.5\" />\n {loading ? 'Planning…' : 'Plan dispatch'}\n </Button>\n\n {result && (\n <div className=\"mt-3 rounded-md border border-border bg-muted/20 p-3 space-y-2\">\n <div className=\"flex items-start gap-2\">\n <Zap className=\"w-3.5 h-3.5 text-muted-foreground shrink-0 mt-0.5\" />\n <div className=\"flex-1 min-w-0 space-y-1\">\n <div className=\"flex flex-wrap gap-1.5\">\n <Badge variant=\"secondary\" className=\"text-xs font-mono\">{result.decision.target.provider}</Badge>\n {result.decision.target.model && <Badge variant=\"outline\" className=\"text-xs font-mono\">{result.decision.target.model}</Badge>}\n {result.decision.target.effort && <Badge variant=\"outline\" className=\"text-xs\">{result.decision.target.effort}</Badge>}\n {result.decision.pinned && <Badge variant=\"outline\" className=\"text-xs text-yellow-400 border-yellow-500/30\">pinned</Badge>}\n </div>\n <p className=\"text-xs text-muted-foreground\">{result.decision.rationale}</p>\n {result.decision.factors.band && (\n <p className=\"text-xs text-muted-foreground\">Band: {result.decision.factors.band}{result.decision.factors.contextWindowTokens ? ` · ${(result.decision.factors.contextWindowTokens / 1000).toFixed(0)}k ctx` : ''}</p>\n )}\n {result.decision.warnings.length > 0 && (\n <div className=\"space-y-0.5\">\n {result.decision.warnings.map((w, i) => (\n <div key={i} className=\"flex items-start gap-1 text-xs text-yellow-400\">\n <AlertTriangle className=\"w-3 h-3 shrink-0 mt-0.5\" />\n <span>{w}</span>\n </div>\n ))}\n </div>\n )}\n {result.decision.review && (\n <div className=\"text-xs text-muted-foreground\">\n Auto-review: {result.decision.review.reason} → {result.decision.review.target.provider}/{result.decision.review.target.model ?? 'default'}\n {result.reviewTaskId && <span className=\"ml-1\">(task T{result.reviewTaskId})</span>}\n </div>\n )}\n </div>\n </div>\n {/* Step 2: confirm spawn — boots a hydrated worker via POST /api/agents/spawn with taskId (#838) */}\n <div className=\"pt-1 border-t border-border/50\">\n <Button\n size=\"sm\"\n className=\"gap-1.5 w-full\"\n onClick={() => onSpawn(result.decision.target)}\n >\n <Zap className=\"w-3.5 h-3.5\" />\n Spawn worker with task T{taskId}\n </Button>\n </div>\n </div>\n )}\n </section>\n )\n}\n\nfunction IssuesPanel({ issues }: { issues: TaskIssueLink[] }) {\n return (\n <section>\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2\">Linked Issues</h3>\n <div className=\"space-y-1.5\">\n {issues.map((issue) => (\n <div key={issue.issueRefId} className=\"flex items-center gap-2 text-sm min-w-0\">\n <span className=\"font-mono text-xs text-muted-foreground shrink-0\">{issue.provider}/{issue.externalKey}</span>\n {issue.title && <span className=\"truncate flex-1 min-w-0\">{issue.title}</span>}\n <Badge variant=\"secondary\" className=\"text-xs shrink-0\">{issue.status}</Badge>\n {issue.url && (\n <a href={issue.url} target=\"_blank\" rel=\"noopener noreferrer\" className=\"shrink-0 text-muted-foreground hover:text-foreground\">\n <ExternalLink className=\"w-3.5 h-3.5\" />\n </a>\n )}\n </div>\n ))}\n </div>\n </section>\n )\n}\n\nfunction DepsPanel({ dependsOn, dependents }: { dependsOn: number[]; dependents: number[] }) {\n return (\n <section>\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2\">Dependencies</h3>\n <div className=\"space-y-1 text-sm\">\n {dependsOn.length > 0 && (\n <div>\n <span className=\"text-xs text-muted-foreground\">Depends on: </span>\n {dependsOn.map((id, i) => (\n <span key={id} className=\"font-mono text-xs\">T{id}{i < dependsOn.length - 1 ? ', ' : ''}</span>\n ))}\n </div>\n )}\n {dependents.length > 0 && (\n <div>\n <span className=\"text-xs text-muted-foreground\">Blocks: </span>\n {dependents.map((id, i) => (\n <span key={id} className=\"font-mono text-xs\">T{id}{i < dependents.length - 1 ? ', ' : ''}</span>\n ))}\n </div>\n )}\n </div>\n </section>\n )\n}\n\nfunction GateTimeline({ gates, now }: { gates: TaskGateState[]; now: number }) {\n return (\n <section>\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2\">Gate Ledger</h3>\n <div className=\"space-y-2\">\n {[...gates].sort((a, b) => b.ranAt - a.ranAt).map((g) => (\n <div key={g.gate + g.ranAt} className=\"flex items-start gap-2 text-sm\">\n {g.status === 'pass'\n ? <CheckCircle2 className=\"w-4 h-4 text-emerald-400 shrink-0 mt-0.5\" />\n : <XCircle className=\"w-4 h-4 text-red-400 shrink-0 mt-0.5\" />}\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <span className=\"font-mono text-xs font-medium truncate min-w-0\">{g.gate}</span>\n <span className=\"text-xs text-muted-foreground ml-auto shrink-0\" title={fmtTime(g.ranAt)}>{timeAgo(now, g.ranAt)}</span>\n </div>\n {g.detail && <p className=\"text-xs text-muted-foreground mt-0.5 truncate\">{g.detail}</p>}\n {g.commitSha && <span className=\"font-mono text-[10px] text-muted-foreground\">{g.commitSha.slice(0, 8)}</span>}\n </div>\n </div>\n ))}\n </div>\n </section>\n )\n}\n\nfunction MemoryPanel({ memory, now }: { memory: TaskMemory; now: number }) {\n return (\n <section>\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2\">Task Memory</h3>\n <div className=\"space-y-3\">\n {memory.workingState && (\n <div>\n <div className=\"text-xs text-muted-foreground mb-1\">Working state</div>\n <p className=\"text-xs whitespace-pre-wrap [overflow-wrap:anywhere] bg-muted/30 rounded p-2\">{memory.workingState}</p>\n </div>\n )}\n {memory.ledger.length > 0 && (\n <div>\n <div className=\"text-xs text-muted-foreground mb-1\">Ruled out ({memory.ledger.length})</div>\n <div className=\"space-y-1\">\n {memory.ledger.map((entry, i) => (\n <div key={i} className=\"text-xs bg-muted/20 rounded p-1.5\">\n <span className=\"font-medium\">{entry.ruledOut}</span>\n {entry.why && <span className=\"text-muted-foreground\"> — {entry.why}</span>}\n </div>\n ))}\n </div>\n </div>\n )}\n {memory.decisions.length > 0 && (\n <div>\n <div className=\"text-xs text-muted-foreground mb-1\">Decisions ({memory.decisions.length})</div>\n <div className=\"space-y-1.5\">\n {memory.decisions.map((d, i) => (\n <div key={i} className=\"text-xs\">\n <div className=\"flex items-center gap-1 min-w-0\">\n <span className=\"font-medium truncate min-w-0\">{d.decision}</span>\n <span className=\"text-muted-foreground ml-auto shrink-0\" title={fmtTime(d.at)}>{timeAgo(now, d.at)}</span>\n </div>\n {d.rationale && <p className=\"text-muted-foreground mt-0.5\">{d.rationale}</p>}\n {d.by && <span className=\"text-muted-foreground/60\">by {d.by}</span>}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n </section>\n )\n}\n\nfunction HistoryPanel({ history, now }: { history: TaskEvent[]; now: number }) {\n return (\n <section>\n <h3 className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2\">History</h3>\n <div className=\"space-y-2\">\n {[...history].reverse().slice(0, 30).map((e) => (\n <div key={e.id} className=\"flex items-start gap-2 text-xs\">\n <Clock className=\"w-3.5 h-3.5 text-muted-foreground shrink-0 mt-0.5\" />\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-1\">\n <span className=\"font-mono text-muted-foreground shrink-0\">{e.type}</span>\n <span className=\"ml-auto text-muted-foreground shrink-0\" title={fmtTime(e.createdAt)}>{timeAgo(now, e.createdAt)}</span>\n </div>\n {e.title && e.title !== e.type && <p className=\"text-foreground mt-0.5 truncate\">{e.title}</p>}\n </div>\n </div>\n ))}\n </div>\n </section>\n )\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Dialog as DialogPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { XIcon } from \"lucide-react\"\n\n// Closing a dialog programmatically (app-driven, not via the Back button) pops\n// the history guard it pushed. That pop fires `popstate`, which a still-mounted\n// parent dialog's listener would otherwise mistake for a real Back press and\n// close itself too — so opening + closing a nested dialog silently dismisses its\n// parent. This module-level flag lets a synthetic guard-pop pass through\n// untouched. It is reset whenever any dialog opens, so a stale value can never\n// swallow a genuine Back press (a real Back only matters while a dialog is open).\nlet suppressGuardPop = false\n\nfunction useBackClose(open: boolean | undefined, onOpenChange?: (open: boolean) => void) {\n const pushedRef = React.useRef(false)\n const cbRef = React.useRef(onOpenChange)\n cbRef.current = onOpenChange\n\n React.useEffect(() => {\n if (!open || !cbRef.current) { return }\n suppressGuardPop = false\n window.history.pushState({ dialogGuard: true }, '')\n pushedRef.current = true\n function onPop() {\n if (suppressGuardPop) { suppressGuardPop = false; return }\n if (pushedRef.current) { pushedRef.current = false; cbRef.current?.(false) }\n }\n window.addEventListener('popstate', onPop)\n return () => {\n window.removeEventListener('popstate', onPop)\n if (pushedRef.current) { pushedRef.current = false; suppressGuardPop = true; window.history.back() }\n }\n }, [open])\n}\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n useBackClose(props.open, props.onOpenChange)\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n blur = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay> & { blur?: boolean }) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n // Full-viewport backdrop-filter blur is GPU-expensive and keeps the\n // compositor hot. Let heavy dialogs (e.g. the streaming terminal) opt out.\n blur && \"supports-backdrop-filter:backdrop-blur-xs\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n blurOverlay = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n blurOverlay?: boolean\n}) {\n return (\n <DialogPortal>\n <DialogOverlay blur={blurOverlay} />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" asChild>\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\n \"font-heading text-base leading-none font-medium\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","import { useRelayStore } from '@/store'\nimport { useComposeAgents } from '@/hooks/use-selectors'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Textarea } from '@/components/ui/textarea'\nimport { Label } from '@/components/ui/label'\nimport { Switch } from '@/components/ui/switch'\nimport { displayName } from '@/lib/display'\n\nexport function ComposeModal() {\n const open = useRelayStore((s) => s.composeOpen)\n const compose = useRelayStore((s) => s.compose)\n const replyTo = useRelayStore((s) => s.replyTo)\n const set = useRelayStore((s) => s.set)\n const doSend = useRelayStore((s) => s.doSend)\n const cancelReply = useRelayStore((s) => s.cancelReply)\n const composeAgents = useComposeAgents()\n\n function close() {\n set({ composeOpen: false })\n cancelReply()\n }\n\n function update(partial: Partial<typeof compose>) {\n set({ compose: { ...compose, ...partial } })\n }\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o && close()}>\n <DialogContent className=\"max-w-lg\">\n <DialogHeader>\n <DialogTitle>{replyTo ? `Reply to #${replyTo.id}` : 'Compose Message'}</DialogTitle>\n </DialogHeader>\n <div className=\"space-y-3\">\n <div>\n <Label>From</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={compose.from} onChange={(e) => update({ from: e.target.value })}>\n <option value=\"\">Select agent...</option>\n {composeAgents.map((a) => <option key={a.id} value={a.id}>{displayName(a)}</option>)}\n </select>\n </div>\n <div>\n <Label>To</Label>\n <Input value={compose.to} onChange={(e) => update({ to: e.target.value })} placeholder=\"agent-id, tag:name, cap:name, or broadcast\" />\n </div>\n <div>\n <Label>Subject</Label>\n <Input value={compose.subject} onChange={(e) => update({ subject: e.target.value })} placeholder=\"Optional subject...\" />\n </div>\n <div>\n <Label>Channel</Label>\n <Input value={compose.channel} onChange={(e) => update({ channel: e.target.value })} placeholder=\"Optional channel...\" />\n </div>\n <div>\n <Label>Message</Label>\n <Textarea value={compose.body} onChange={(e) => update({ body: e.target.value })} rows={4} placeholder=\"Message body...\" autoFocus />\n </div>\n <label className=\"flex items-center gap-2\">\n <Switch checked={compose.claimable} onCheckedChange={(v) => update({ claimable: v })} />\n <span className=\"text-sm text-muted-foreground\">Claimable task</span>\n </label>\n </div>\n <DialogFooter>\n <Button variant=\"outline\" onClick={close}>Cancel</Button>\n <Button onClick={doSend}>Send</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n )\n}\n","import { useRelayStore } from '@/store'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, DialogDescription } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\n\nexport function ConfirmModal() {\n const modal = useRelayStore((s) => s.confirmModal)\n const set = useRelayStore((s) => s.set)\n\n function close() {\n set({ confirmModal: { show: false, title: '', message: '', action: null } })\n }\n\n return (\n <Dialog open={modal.show} onOpenChange={(open) => !open && close()}>\n <DialogContent className=\"sm:max-w-sm\">\n <DialogHeader>\n <DialogTitle>{modal.title}</DialogTitle>\n <DialogDescription>{modal.message}</DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <Button variant=\"outline\" onClick={close}>Cancel</Button>\n <Button variant=\"destructive\" onClick={() => { modal.action?.(); close() }}>Confirm</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n )\n}\n","import { useRelayStore } from '@/store'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, DialogDescription } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\n\nexport function ErrorModal() {\n const modal = useRelayStore((s) => s.errorModal)\n const set = useRelayStore((s) => s.set)\n\n function close() {\n set({ errorModal: { show: false, title: '', message: '' } })\n }\n\n return (\n <Dialog open={modal.show} onOpenChange={(open) => !open && close()}>\n <DialogContent className=\"sm:max-w-sm\">\n <DialogHeader>\n <DialogTitle>{modal.title}</DialogTitle>\n <DialogDescription>{modal.message}</DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <Button onClick={close}>OK</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n )\n}\n","import { useRelayStore } from '@/store'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Label } from '@/components/ui/label'\n\nexport function RenameModal() {\n const modal = useRelayStore((s) => s.renameModal)\n const set = useRelayStore((s) => s.set)\n const doRename = useRelayStore((s) => s.doRename)\n\n function close() {\n set({ renameModal: { show: false, agentId: '', label: '' } })\n }\n\n return (\n <Dialog open={modal.show} onOpenChange={(open) => !open && close()}>\n <DialogContent className=\"sm:max-w-sm\">\n <DialogHeader>\n <DialogTitle>Rename Agent</DialogTitle>\n </DialogHeader>\n <div className=\"space-y-3\">\n <Label>Label</Label>\n <Input\n value={modal.label}\n onChange={(e) => set({ renameModal: { ...modal, label: e.target.value } })}\n onKeyDown={(e) => e.key === 'Enter' && doRename()}\n placeholder=\"Human-friendly name...\"\n autoFocus\n />\n <p className=\"text-xs text-muted-foreground\">Leave empty to clear the label.</p>\n </div>\n <DialogFooter>\n <Button variant=\"outline\" onClick={close}>Cancel</Button>\n <Button onClick={doRename}>Save</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n )\n}\n","import { useRelayStore } from '@/store'\nimport { useComposeAgents } from '@/hooks/use-selectors'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Label } from '@/components/ui/label'\nimport { displayName } from '@/lib/display'\n\nexport function PairInviteModal() {\n const open = useRelayStore((s) => s.pairInviteOpen)\n const invite = useRelayStore((s) => s.pairInvite)\n const set = useRelayStore((s) => s.set)\n const closePairInvite = useRelayStore((s) => s.closePairInvite)\n const doCreatePair = useRelayStore((s) => s.doCreatePair)\n const agents = useComposeAgents()\n\n function update(partial: Partial<typeof invite>) {\n set({ pairInvite: { ...invite, ...partial } })\n }\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o && closePairInvite()}>\n <DialogContent className=\"sm:max-w-sm\">\n <DialogHeader>\n <DialogTitle>Pair Agents</DialogTitle>\n </DialogHeader>\n <div className=\"space-y-3\">\n <div>\n <Label>Requester</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={invite.requesterId} onChange={(e) => update({ requesterId: e.target.value })}>\n <option value=\"\">Select agent...</option>\n {agents.map((a) => <option key={a.id} value={a.id}>{displayName(a)}</option>)}\n </select>\n </div>\n <div>\n <Label>Target</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={invite.targetId} onChange={(e) => update({ targetId: e.target.value })}>\n <option value=\"\">Select agent...</option>\n {agents.map((a) => <option key={a.id} value={a.id}>{displayName(a)}</option>)}\n </select>\n </div>\n <div>\n <Label>Objective</Label>\n <Input value={invite.objective} onChange={(e) => update({ objective: e.target.value })} placeholder=\"What should they work on?\" />\n </div>\n </div>\n <DialogFooter>\n <Button variant=\"outline\" onClick={closePairInvite}>Cancel</Button>\n <Button onClick={doCreatePair}>Create Pair</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n )\n}\n","import { useRelayStore } from '@/store'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\nimport { Textarea } from '@/components/ui/textarea'\nimport { Input } from '@/components/ui/input'\nimport { Label } from '@/components/ui/label'\n\nexport function PairMessageModal() {\n const open = useRelayStore((s) => s.pairMessageOpen)\n const msg = useRelayStore((s) => s.pairMessage)\n const set = useRelayStore((s) => s.set)\n const closePairMessage = useRelayStore((s) => s.closePairMessage)\n const doSendPairMessage = useRelayStore((s) => s.doSendPairMessage)\n\n function update(partial: Partial<typeof msg>) {\n set({ pairMessage: { ...msg, ...partial } })\n }\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o && closePairMessage()}>\n <DialogContent className=\"sm:max-w-sm\">\n <DialogHeader>\n <DialogTitle>Pair Message</DialogTitle>\n </DialogHeader>\n <div className=\"space-y-3\">\n <div>\n <Label>Subject</Label>\n <Input value={msg.subject} onChange={(e) => update({ subject: e.target.value })} placeholder=\"Optional subject...\" />\n </div>\n <div>\n <Label>Message</Label>\n <Textarea value={msg.body} onChange={(e) => update({ body: e.target.value })} rows={4} placeholder=\"Message body...\" autoFocus />\n </div>\n </div>\n <DialogFooter>\n <Button variant=\"outline\" onClick={closePairMessage}>Cancel</Button>\n <Button onClick={doSendPairMessage}>Send</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n )\n}\n","import { useRelayStore, useNow } from '@/store'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'\nimport { Badge } from '@/components/ui/badge'\nimport { ScrollArea } from '@/components/ui/scroll-area'\nimport { displayTarget, messageBody, timeAgo } from '@/lib/display'\nimport { FormattedBody } from '@/components/shared/formatted-body'\n\nexport function ThreadModal() {\n const open = useRelayStore((s) => s.threadOpen)\n const messages = useRelayStore((s) => s.threadMessages)\n const agentsById = useRelayStore((s) => s.agentsById)\n const now = useNow()\n const set = useRelayStore((s) => s.set)\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o && set({ threadOpen: false })}>\n <DialogContent className=\"max-w-2xl max-h-[80vh]\">\n <DialogHeader>\n <DialogTitle>Thread ({messages.length} messages)</DialogTitle>\n </DialogHeader>\n <ScrollArea className=\"max-h-[60vh]\">\n <div className=\"space-y-3 pr-4\">\n {messages.map((msg) => (\n <div key={msg.id} className=\"rounded-lg border border-border p-3 space-y-1\">\n <div className=\"flex items-center gap-2 text-sm\">\n <span className=\"font-medium\">{displayTarget(msg.from, agentsById)}</span>\n <span className=\"text-muted-foreground\">→</span>\n <span className=\"text-muted-foreground\">{displayTarget(msg.to, agentsById)}</span>\n <span className=\"ml-auto text-xs text-muted-foreground\">{timeAgo(now, msg.createdAt)}</span>\n </div>\n {msg.subject && <div className=\"text-sm font-medium\">{msg.subject}</div>}\n <FormattedBody text={messageBody(msg)} rawBody={msg.body} issueRepo={agentsById[msg.from === 'user' ? msg.to : msg.from]?.issueRepo} className=\"text-sm text-muted-foreground\" />\n <div className=\"flex gap-1.5 flex-wrap\">\n {msg.channel && <Badge variant=\"secondary\" className=\"text-[10px]\">{msg.channel}</Badge>}\n {msg.claimedBy && <Badge variant=\"secondary\" className=\"text-[10px]\">claimed by {displayTarget(msg.claimedBy, agentsById)}</Badge>}\n </div>\n </div>\n ))}\n </div>\n </ScrollArea>\n </DialogContent>\n </Dialog>\n )\n}\n","import { useRelayStore } from '@/store'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { ScrollArea } from '@/components/ui/scroll-area'\nimport { fmtTime } from '@/lib/display'\nimport { SEVERITY_COLORS } from '@/lib/constants'\nimport { BrainCircuit } from 'lucide-react'\nimport type { TaskEvent } from '@/types'\n\nexport function TaskEventsModal() {\n const open = useRelayStore((s) => s.taskEventsOpen)\n const events = useRelayStore((s) => s.taskEvents)\n const set = useRelayStore((s) => s.set)\n const switchView = useRelayStore((s) => s.switchView)\n\n function openMemory(memoryId: string) {\n set({ selectedMemoryId: memoryId, taskEventsOpen: false })\n switchView('memory')\n }\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o && set({ taskEventsOpen: false })}>\n <DialogContent className=\"max-w-2xl max-h-[80vh]\">\n <DialogHeader>\n <DialogTitle>Task Events ({events.length})</DialogTitle>\n </DialogHeader>\n <ScrollArea className=\"max-h-[60vh]\">\n <div className=\"space-y-2 pr-4\">\n {events.map((evt) => (\n <div key={evt.id} className=\"flex items-start gap-3 rounded-lg border border-border p-3\">\n <Badge className={SEVERITY_COLORS[evt.severity] || SEVERITY_COLORS.info}>{evt.severity}</Badge>\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-medium\">{evt.title}</span>\n <Badge variant=\"outline\" className=\"text-[10px]\">{evt.type}</Badge>\n </div>\n {evt.body && <p className=\"text-sm text-muted-foreground mt-1 whitespace-pre-wrap\">{evt.body}</p>}\n <MemoryCapture event={evt} onOpen={openMemory} />\n <div className=\"text-xs text-muted-foreground mt-1\">{fmtTime(evt.createdAt)} · {evt.source}</div>\n </div>\n </div>\n ))}\n {events.length === 0 && <p className=\"text-sm text-muted-foreground text-center py-8\">No events recorded.</p>}\n </div>\n </ScrollArea>\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction MemoryCapture({ event, onOpen }: { event: TaskEvent; onOpen: (memoryId: string) => void }) {\n if (event.type !== 'memory.captured') return null\n const memoryId = typeof event.metadata?.memoryId === 'string' ? event.metadata.memoryId : ''\n const memory = event.metadata?.memory && typeof event.metadata.memory === 'object' && !Array.isArray(event.metadata.memory)\n ? event.metadata.memory as Record<string, unknown>\n : {}\n const title = typeof memory.title === 'string' ? memory.title : event.body || memoryId\n const scope = typeof memory.scope === 'string' ? memory.scope : ''\n const type = typeof memory.type === 'string' ? memory.type : 'memory'\n const sensitivity = typeof memory.sensitivity === 'string' ? memory.sensitivity : ''\n\n return (\n <div className=\"mt-2 rounded-md border border-border bg-muted/20 p-2 text-xs\">\n <div className=\"flex items-start gap-2\">\n <BrainCircuit className=\"w-3.5 h-3.5 mt-0.5 text-muted-foreground shrink-0\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex flex-wrap gap-1 mb-1\">\n <Badge variant=\"secondary\" className=\"text-[10px]\">{type}</Badge>\n {scope && <Badge variant=\"outline\" className=\"text-[10px] font-mono\">{scope}</Badge>}\n {sensitivity && <Badge variant=\"outline\" className=\"text-[10px]\">{sensitivity}</Badge>}\n </div>\n <div className=\"font-medium truncate\">{title}</div>\n {memoryId && <div className=\"font-mono text-[10px] text-muted-foreground truncate\">{memoryId}</div>}\n </div>\n {memoryId && (\n <Button size=\"sm\" variant=\"outline\" className=\"h-7 text-xs shrink-0\" onClick={() => onOpen(memoryId)}>\n Open\n </Button>\n )}\n </div>\n </div>\n )\n}\n","import { useRelayStore } from '@/store'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Textarea } from '@/components/ui/textarea'\nimport { Label } from '@/components/ui/label'\nimport { TASK_DISPATCH_COMPLEXITIES, TASK_DISPATCH_TYPES, TASK_DISPATCH_FOOTPRINTS, TASK_DISPATCH_CRITICALITIES } from 'agent-relay-sdk/types'\n\nexport function TaskCreateModal() {\n const open = useRelayStore((s) => s.taskCreateOpen)\n const form = useRelayStore((s) => s.taskCreateForm)\n const closeTaskCreate = useRelayStore((s) => s.closeTaskCreate)\n const setTaskCreateForm = useRelayStore((s) => s.setTaskCreateForm)\n const doCreateTask = useRelayStore((s) => s.doCreateTask)\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o && closeTaskCreate()}>\n <DialogContent className=\"max-w-lg\">\n <DialogHeader>\n <DialogTitle>New Task</DialogTitle>\n </DialogHeader>\n\n <div className=\"space-y-4\">\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"task-title\">Title <span className=\"text-destructive\">*</span></Label>\n <Input\n id=\"task-title\"\n value={form.title}\n onChange={(e) => setTaskCreateForm({ title: e.target.value })}\n placeholder=\"Short description of the work\"\n autoFocus\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"task-intent\">Intent</Label>\n <Textarea\n id=\"task-intent\"\n value={form.intent}\n onChange={(e) => setTaskCreateForm({ intent: e.target.value })}\n placeholder=\"What is this task trying to accomplish?\"\n rows={3}\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"task-done-when\">Done when</Label>\n <Textarea\n id=\"task-done-when\"\n value={form.doneWhen}\n onChange={(e) => setTaskCreateForm({ doneWhen: e.target.value })}\n placeholder=\"Acceptance criteria\"\n rows={2}\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"task-issue-refs\">Issue refs <span className=\"text-xs text-muted-foreground\">(comma-separated, e.g. owner/repo#123)</span></Label>\n <Input\n id=\"task-issue-refs\"\n value={form.issueRefs}\n onChange={(e) => setTaskCreateForm({ issueRefs: e.target.value })}\n placeholder=\"owner/repo#123, owner/repo#456\"\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"task-depends-on\">Depends on <span className=\"text-xs text-muted-foreground\">(comma-separated task IDs)</span></Label>\n <Input\n id=\"task-depends-on\"\n value={form.dependsOn}\n onChange={(e) => setTaskCreateForm({ dependsOn: e.target.value })}\n placeholder=\"42, 43\"\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label className=\"text-xs font-semibold text-muted-foreground uppercase tracking-wider\">Dispatch work-shape (optional)</Label>\n <div className=\"grid grid-cols-2 gap-2\">\n <div>\n <Label htmlFor=\"dispatch-complexity\" className=\"text-xs\">Complexity</Label>\n <select\n id=\"dispatch-complexity\"\n className=\"w-full mt-1 rounded-md border border-input bg-background px-2 py-1.5 text-sm\"\n value={form.dispatchComplexity}\n onChange={(e) => setTaskCreateForm({ dispatchComplexity: e.target.value })}\n >\n <option value=\"\">—</option>\n {TASK_DISPATCH_COMPLEXITIES.map((v) => <option key={v} value={v}>{v}</option>)}\n </select>\n </div>\n <div>\n <Label htmlFor=\"dispatch-type\" className=\"text-xs\">Type</Label>\n <select\n id=\"dispatch-type\"\n className=\"w-full mt-1 rounded-md border border-input bg-background px-2 py-1.5 text-sm\"\n value={form.dispatchType}\n onChange={(e) => setTaskCreateForm({ dispatchType: e.target.value })}\n >\n <option value=\"\">—</option>\n {TASK_DISPATCH_TYPES.map((v) => <option key={v} value={v}>{v}</option>)}\n </select>\n </div>\n <div>\n <Label htmlFor=\"dispatch-footprint\" className=\"text-xs\">Context footprint</Label>\n <select\n id=\"dispatch-footprint\"\n className=\"w-full mt-1 rounded-md border border-input bg-background px-2 py-1.5 text-sm\"\n value={form.dispatchFootprint}\n onChange={(e) => setTaskCreateForm({ dispatchFootprint: e.target.value })}\n >\n <option value=\"\">—</option>\n {TASK_DISPATCH_FOOTPRINTS.map((v) => <option key={v} value={v}>{v}</option>)}\n </select>\n </div>\n <div>\n <Label htmlFor=\"dispatch-criticality\" className=\"text-xs\">Criticality</Label>\n <select\n id=\"dispatch-criticality\"\n className=\"w-full mt-1 rounded-md border border-input bg-background px-2 py-1.5 text-sm\"\n value={form.dispatchCriticality}\n onChange={(e) => setTaskCreateForm({ dispatchCriticality: e.target.value })}\n >\n <option value=\"\">—</option>\n {TASK_DISPATCH_CRITICALITIES.map((v) => <option key={v} value={v}>{v}</option>)}\n </select>\n </div>\n </div>\n </div>\n </div>\n\n <DialogFooter>\n <Button variant=\"outline\" onClick={closeTaskCreate}>Cancel</Button>\n <Button onClick={() => void doCreateTask()} disabled={!form.title.trim()}>Create</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n )\n}\n","import { useCallback, useEffect, useMemo, useState } from 'react'\nimport { errMessage } from 'agent-relay-sdk/types'\nimport { CornerUpLeft, Folder, FolderOpen, FolderPlus, Loader2, Check, X } from 'lucide-react'\nimport { useRelayStore } from '@/store'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\n\ninterface DirectoryEntry {\n name: string\n path: string\n}\n\ninterface DirectoryListing {\n path: string\n parent?: string\n baseDir: string\n entries: DirectoryEntry[]\n}\n\ninterface DirectoryBrowserDialogProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n onSelect: (path: string) => void\n orchestratorId: string\n initialPath?: string\n title?: string\n}\n\nexport function DirectoryBrowserDialog({ open, onOpenChange, onSelect, orchestratorId, initialPath, title = 'Select Directory' }: DirectoryBrowserDialogProps) {\n const apiCall = useRelayStore((s) => s.apiCall)\n const [loading, setLoading] = useState(false)\n const [listing, setListing] = useState<DirectoryListing | null>(null)\n const [error, setError] = useState<string | null>(null)\n const [creating, setCreating] = useState(false)\n const [newDirName, setNewDirName] = useState('')\n const [createError, setCreateError] = useState<string | null>(null)\n\n const currentPath = listing?.path || initialPath || ''\n const segments = useMemo(() => currentPath.split('/').filter(Boolean), [currentPath])\n\n const browse = useCallback(async (path?: string) => {\n if (!orchestratorId) return\n setLoading(true)\n setError(null)\n setCreating(false)\n try {\n const query = path ? `?path=${encodeURIComponent(path)}` : ''\n const result = await apiCall<DirectoryListing>('GET', `/orchestrators/${encodeURIComponent(orchestratorId)}/directories${query}`)\n setListing(result)\n } catch (e) {\n setError(errMessage(e))\n } finally {\n setLoading(false)\n }\n }, [orchestratorId, apiCall])\n\n useEffect(() => {\n if (open && orchestratorId) {\n setListing(null)\n setError(null)\n setCreating(false)\n browse(initialPath || undefined)\n }\n }, [open, orchestratorId])\n\n async function handleCreate() {\n if (!newDirName.trim() || !listing) return\n setCreateError(null)\n try {\n const result = await apiCall<DirectoryListing>('POST', `/orchestrators/${encodeURIComponent(orchestratorId)}/directories`, { path: listing.path, name: newDirName.trim() })\n setListing(result)\n setCreating(false)\n setNewDirName('')\n } catch (e) {\n setCreateError(errMessage(e))\n }\n }\n\n function handleSelect() {\n if (currentPath) {\n onSelect(currentPath)\n onOpenChange(false)\n }\n }\n\n function handleBreadcrumbClick(index: number) {\n const path = '/' + segments.slice(0, index + 1).join('/')\n browse(path)\n }\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className=\"max-w-lg max-h-[85dvh] flex flex-col\">\n <DialogHeader>\n <DialogTitle className=\"flex items-center gap-2\">\n <FolderOpen className=\"h-4 w-4\" />\n {title}\n </DialogTitle>\n </DialogHeader>\n\n <div className=\"flex items-center gap-1 rounded-md border border-border bg-muted/50 px-2 py-1.5 text-xs overflow-x-auto\">\n <button type=\"button\" className=\"font-mono text-muted-foreground hover:text-foreground shrink-0\" onClick={() => listing?.baseDir && browse(listing.baseDir)}>/</button>\n {segments.map((segment, index) => (\n <span key={`${segment}-${index}`} className=\"shrink-0\">\n <button type=\"button\" className=\"font-mono text-muted-foreground hover:text-foreground\" onClick={() => handleBreadcrumbClick(index)}>{segment}</button>\n {index < segments.length - 1 && <span className=\"text-muted-foreground/50 mx-0.5\">/</span>}\n </span>\n ))}\n </div>\n\n <div className=\"flex-1 min-h-0 rounded-md border border-border bg-background overflow-y-auto\" style={{ maxHeight: '40dvh' }}>\n {loading && (\n <div className=\"flex items-center justify-center py-8\">\n <Loader2 className=\"h-5 w-5 animate-spin text-muted-foreground\" />\n </div>\n )}\n {!loading && error && (\n <div className=\"px-3 py-4 text-sm text-destructive\">{error}</div>\n )}\n {!loading && listing && (\n <div className=\"p-1\">\n {listing.parent && (\n <button type=\"button\" className=\"flex h-9 w-full items-center gap-2 rounded-md px-2 text-left text-sm hover:bg-muted\" onClick={() => browse(listing.parent)}>\n <CornerUpLeft className=\"h-4 w-4 text-muted-foreground\" />\n <span className=\"text-muted-foreground\">..</span>\n </button>\n )}\n {listing.entries.map((entry) => (\n <button type=\"button\" key={entry.path} className=\"flex h-9 w-full items-center gap-2 rounded-md px-2 text-left text-sm hover:bg-muted\" onClick={() => browse(entry.path)}>\n <Folder className=\"h-4 w-4 text-muted-foreground\" />\n <span className=\"truncate\">{entry.name}</span>\n </button>\n ))}\n {listing.entries.length === 0 && !listing.parent && (\n <div className=\"px-2 py-4 text-sm text-muted-foreground text-center\">Empty directory</div>\n )}\n {listing.entries.length === 0 && listing.parent && (\n <div className=\"px-2 py-4 text-sm text-muted-foreground text-center\">No subdirectories</div>\n )}\n </div>\n )}\n </div>\n\n {creating ? (\n <div className=\"flex gap-2\">\n <Input\n autoFocus\n value={newDirName}\n onChange={(e) => { setNewDirName(e.target.value); setCreateError(null) }}\n onKeyDown={(e) => { if (e.key === 'Enter') handleCreate(); if (e.key === 'Escape') { setCreating(false); setNewDirName('') } }}\n placeholder=\"New directory name...\"\n className=\"flex-1 font-mono text-sm\"\n />\n <Button type=\"button\" size=\"icon\" variant=\"outline\" onClick={handleCreate} disabled={!newDirName.trim()}>\n <Check className=\"h-4 w-4\" />\n </Button>\n <Button type=\"button\" size=\"icon\" variant=\"ghost\" onClick={() => { setCreating(false); setNewDirName(''); setCreateError(null) }}>\n <X className=\"h-4 w-4\" />\n </Button>\n </div>\n ) : (\n <Button type=\"button\" variant=\"outline\" size=\"sm\" onClick={() => setCreating(true)} disabled={!listing || loading}>\n <FolderPlus className=\"h-4 w-4 mr-1.5\" />\n New Directory\n </Button>\n )}\n {createError && <p className=\"text-xs text-destructive\">{createError}</p>}\n\n <DialogFooter>\n <Button variant=\"outline\" onClick={() => onOpenChange(false)}>Cancel</Button>\n <Button onClick={handleSelect} disabled={!currentPath}>Select</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n )\n}\n","import { useState } from 'react'\nimport { FolderOpen, Loader2 } from 'lucide-react'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { DirectoryBrowserDialog } from '@/components/shared/directory-browser-dialog'\n\ninterface DirectoryPickerProps {\n value: string\n onChange: (path: string) => void\n orchestratorId?: string\n placeholder?: string\n disabled?: boolean\n}\n\nexport function DirectoryPicker({ value, onChange, orchestratorId, placeholder, disabled }: DirectoryPickerProps) {\n const [dialogOpen, setDialogOpen] = useState(false)\n\n return (\n <div className=\"flex gap-2\">\n <Input value={value} onChange={(e) => onChange(e.target.value)} placeholder={placeholder} disabled={disabled} className=\"flex-1 font-mono text-sm\" />\n <Button type=\"button\" variant=\"outline\" size=\"icon\" onClick={() => setDialogOpen(true)} disabled={disabled || !orchestratorId} title=\"Browse directories\">\n <FolderOpen className=\"h-4 w-4\" />\n </Button>\n {orchestratorId && (\n <DirectoryBrowserDialog\n open={dialogOpen}\n onOpenChange={setDialogOpen}\n onSelect={onChange}\n orchestratorId={orchestratorId}\n initialPath={value || undefined}\n />\n )}\n </div>\n )\n}\n","import { Badge } from '@/components/ui/badge'\nimport { Code2, Eye, Image as ImageIcon } from 'lucide-react'\nimport type { ProviderModelCatalogEntry } from 'agent-relay-sdk/provider-catalog'\n\nexport function ModelTraits({ model }: { model?: ProviderModelCatalogEntry }) {\n if (!model) return null\n const traits = modelTraitLabels(model)\n if (traits.length === 0) return null\n\n return (\n <div className=\"flex flex-wrap gap-1.5\">\n {traits.map((trait) => (\n <Badge key={trait.label} variant=\"outline\" className=\"gap-1 text-[10px]\">\n <trait.Icon className=\"h-3 w-3\" />\n {trait.label}\n </Badge>\n ))}\n </div>\n )\n}\n\nfunction modelTraitLabels(model: ProviderModelCatalogEntry) {\n const traits: Array<{ label: string; Icon: typeof Code2 }> = []\n const contextWindow = model.limits?.contextWindowTokens?.value\n if (contextWindow) traits.push({ label: formatTokenLimit(contextWindow), Icon: Eye })\n if (model.capabilities?.modalities.input.image) traits.push({ label: 'Image input', Icon: ImageIcon })\n if (model.capabilities?.modalities.output.image || model.capabilities?.tools?.imageGeneration) traits.push({ label: 'Image output', Icon: ImageIcon })\n if (model.capabilities?.tools?.code) traits.push({ label: 'Code', Icon: Code2 })\n return traits\n}\n\nfunction formatTokenLimit(tokens: number): string {\n if (tokens >= 1_000_000) return `${tokens / 1_000_000}M ctx`\n if (tokens >= 1_000) return `${Math.round(tokens / 1_000)}K ctx`\n return `${tokens} ctx`\n}\n","import { useRelayStore } from '@/store'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Textarea } from '@/components/ui/textarea'\nimport { Label } from '@/components/ui/label'\nimport { DirectoryPicker } from '@/components/shared/directory-picker'\nimport { ModelTraits } from '@/components/shared/model-traits'\nimport { availableModelsFor, defaultModelFor } from '@/store/helpers'\n\nexport function OrchestratorSpawnModal() {\n const open = useRelayStore((s) => s.orchestratorSpawnOpen)\n const orchestrators = useRelayStore((s) => s.orchestrators)\n const orchId = useRelayStore((s) => s.spawnOrchId)\n const provider = useRelayStore((s) => s.spawnProvider)\n const model = useRelayStore((s) => s.spawnModel)\n const effort = useRelayStore((s) => s.spawnEffort)\n const profile = useRelayStore((s) => s.spawnProfile)\n const cwd = useRelayStore((s) => s.spawnCwd)\n const label = useRelayStore((s) => s.spawnLabel)\n const approval = useRelayStore((s) => s.spawnApproval)\n const workspaceMode = useRelayStore((s) => s.spawnWorkspaceMode)\n const prompt = useRelayStore((s) => s.spawnPrompt)\n const systemPromptAppend = useRelayStore((s) => s.spawnSystemPromptAppend)\n const count = useRelayStore((s) => s.spawnCount)\n const cwdHistory = useRelayStore((s) => s.spawnCwdHistory)\n const isSpawning = useRelayStore((s) => s.isSpawning)\n const isFork = useRelayStore((s) => Boolean(s.pendingForkImport))\n const set = useRelayStore((s) => s.set)\n const submitOrchestratorSpawn = useRelayStore((s) => s.submitOrchestratorSpawn)\n const selectSpawnHistory = useRelayStore((s) => s.selectSpawnHistory)\n const agentProfiles = useRelayStore((s) => s.agentProfiles)\n const providerCatalog = useRelayStore((s) => s.providerCatalog)\n\n const orch = orchestrators.find((o) => o.id === orchId)\n const providers = orch?.providers || []\n const models = availableModelsFor(provider, providerCatalog)\n const selectedModel = models.find((m) => m.alias === model)\n const efforts = selectedModel?.efforts || []\n const canSpawn = Boolean(orch && providers.length > 0 && cwd.trim()) && !isSpawning\n\n const onlineOrchs = orchestrators.filter((o) => o.status === 'online')\n const multiOrch = onlineOrchs.length > 1\n const recentDirs = cwdHistory.filter((h) => onlineOrchs.some((o) => o.id === h.orchId)).slice(0, 5)\n\n function selectOrchestrator(nextId: string) {\n const nextOrch = orchestrators.find((o) => o.id === nextId)\n const nextProvider = nextOrch?.providers[0] || ''\n const nextModel = nextProvider ? defaultModelFor(nextProvider, providerCatalog) : ''\n set({ spawnOrchId: nextId, spawnProvider: nextProvider, spawnModel: nextModel, spawnEffort: '', spawnCwd: nextOrch?.baseDir || '' })\n }\n\n function selectProvider(nextProvider: string) {\n set({ spawnProvider: nextProvider, spawnModel: defaultModelFor(nextProvider, providerCatalog), spawnEffort: '' })\n }\n\n function selectModel(nextModel: string) {\n set({ spawnModel: nextModel, spawnEffort: '' })\n }\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o && set({ orchestratorSpawnOpen: false })}>\n <DialogContent className=\"max-w-lg max-h-[90dvh] flex flex-col\" onOpenAutoFocus={(e) => e.preventDefault()}>\n <DialogHeader>\n <DialogTitle>Spawn Agent</DialogTitle>\n </DialogHeader>\n <div className=\"space-y-3 overflow-y-auto flex-1 min-h-0 -mx-4 px-4\">\n <div>\n <Label>Orchestrator</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={orchId} onChange={(e) => selectOrchestrator(e.target.value)}>\n {orchestrators.filter((o) => o.status === 'online').map((o) => <option key={o.id} value={o.id}>{o.hostname} ({o.id.slice(-8)})</option>)}\n </select>\n </div>\n <div>\n <Label>Provider</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={provider} onChange={(e) => selectProvider(e.target.value)} disabled={!providers.length}>\n {!providers.length && <option value={provider}>No providers available</option>}\n {providers.map((p) => <option key={p} value={p}>{p}</option>)}\n </select>\n </div>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <Label>Model</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={model} onChange={(e) => selectModel(e.target.value)} disabled={!models.length}>\n {models.map((m) => <option key={m.alias} value={m.alias}>{m.label}</option>)}\n </select>\n </div>\n <div>\n <Label>Effort</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={effort} onChange={(e) => set({ spawnEffort: e.target.value })} disabled={!efforts.length}>\n <option value=\"\">Default</option>\n {efforts.map((level) => <option key={level} value={level}>{level}</option>)}\n </select>\n </div>\n </div>\n <ModelTraits model={selectedModel} />\n <div>\n <Label>Agent Profile</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={profile || 'default-relay'} onChange={(e) => set({ spawnProfile: e.target.value })}>\n {!agentProfiles.length && <option value=\"default-relay\">default-relay</option>}\n {agentProfiles.map((item) => <option key={item.name} value={item.name}>{item.name}</option>)}\n </select>\n </div>\n <div>\n <Label>Approval Mode</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={approval} onChange={(e) => set({ spawnApproval: e.target.value })}>\n <option value=\"open\">Open</option>\n <option value=\"guarded\">Guarded</option>\n <option value=\"read-only\">Read-only</option>\n </select>\n </div>\n <div>\n <Label>Workspace</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={workspaceMode} onChange={(e) => set({ spawnWorkspaceMode: e.target.value })}>\n <option value=\"inherit\">Default</option>\n <option value=\"isolated\">Isolated worktree</option>\n <option value=\"shared\">Shared cwd</option>\n </select>\n </div>\n <div>\n <Label>Working Directory</Label>\n <div className=\"mt-1\">\n <DirectoryPicker value={cwd} onChange={(path) => set({ spawnCwd: path })} orchestratorId={orchId} placeholder=\"Select a project directory\" />\n </div>\n {recentDirs.length > 0 && (\n <div className=\"mt-2\">\n <p className=\"text-xs text-muted-foreground mb-1\">Recent</p>\n <div className=\"flex gap-1.5 overflow-x-auto pb-1 sm:flex-wrap sm:overflow-x-visible sm:pb-0\">\n {recentDirs.map((h) => {\n const base = h.cwd.replace(/\\/+$/, '').split('/').pop() || h.cwd\n const host = onlineOrchs.find((o) => o.id === h.orchId)?.hostname\n const active = h.orchId === orchId && h.cwd === cwd\n return (\n <button\n key={`${h.orchId}:${h.cwd}`}\n type=\"button\"\n title={multiOrch && host ? `${host}: ${h.cwd}` : h.cwd}\n onClick={() => selectSpawnHistory(h.orchId, h.cwd)}\n className={`shrink-0 rounded-full border px-2.5 py-1 text-xs font-mono transition-colors ${active ? 'border-primary bg-primary/10 text-foreground' : 'border-input bg-background text-muted-foreground hover:bg-accent hover:text-foreground'}`}\n >\n {multiOrch && host ? `${host}: ${base}` : base}\n </button>\n )\n })}\n </div>\n </div>\n )}\n </div>\n <div>\n <Label>Label</Label>\n <Input value={label} onChange={(e) => set({ spawnLabel: e.target.value })} placeholder=\"Optional label...\" />\n </div>\n <div>\n <Label>Initial Prompt</Label>\n <Textarea value={prompt} onChange={(e) => set({ spawnPrompt: e.target.value })} rows={3} placeholder=\"Optional initial task...\" />\n <p className=\"text-xs text-muted-foreground mt-1\">Codex starts this as the first App Server turn; Claude receives it as a launch prompt.</p>\n </div>\n <div>\n <Label>System Prompt Append</Label>\n <Textarea value={systemPromptAppend} onChange={(e) => set({ spawnSystemPromptAppend: e.target.value })} rows={5} placeholder=\"Optional launch context...\" />\n <p className=\"text-xs text-muted-foreground mt-1\">Use for fork history or launch context. It informs the session but does not start work by itself.</p>\n </div>\n {!isFork && (\n <div>\n <div className=\"flex items-center justify-between\">\n <Label>Number of Agents</Label>\n <span className=\"text-sm font-mono tabular-nums text-muted-foreground\">{count}</span>\n </div>\n <input\n type=\"range\"\n min={1}\n max={10}\n step={1}\n value={count}\n onChange={(e) => set({ spawnCount: Number(e.target.value) })}\n className=\"w-full mt-2 accent-primary\"\n aria-label=\"Number of agents to spawn\"\n />\n {count > 1 && <p className=\"text-xs text-muted-foreground mt-1\">Spawns {count} identical agents{label.trim() ? `, labelled \"${label.trim()} 1\"…\"${label.trim()} ${count}\"` : ''}.</p>}\n </div>\n )}\n </div>\n <DialogFooter>\n <Button variant=\"outline\" onClick={() => set({ orchestratorSpawnOpen: false })} disabled={isSpawning}>Cancel</Button>\n <Button onClick={submitOrchestratorSpawn} disabled={!canSpawn}>{isSpawning ? 'Spawning…' : providers.length ? (count > 1 ? `Spawn ${count}` : 'Spawn') : 'No providers'}</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n )\n}\n","import { useMemo, useState } from 'react'\nimport { useRelayStore } from '@/store'\nimport { api, getBaseUrl } from '@/lib/api'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Label } from '@/components/ui/label'\nimport { CopyButton } from '@/components/shared/copy-button'\nimport { Server, Terminal } from 'lucide-react'\nimport type { SpawnProvider } from '@/types'\nimport { getKnownProviderIds, getProviderLabel } from '@/lib/provider-display'\n\ninterface BootstrapResponse {\n command: string\n expiresAt?: number\n}\n\nfunction defaultId(): string {\n return `host-${Math.random().toString(36).slice(2, 8)}`\n}\n\nfunction toggleProvider(providers: SpawnProvider[], provider: SpawnProvider): SpawnProvider[] {\n return providers.includes(provider)\n ? providers.filter((p) => p !== provider)\n : [...providers, provider]\n}\n\nexport function OrchestratorInstallModal() {\n const open = useRelayStore((s) => s.orchestratorInstallOpen)\n const set = useRelayStore((s) => s.set)\n const showError = useRelayStore((s) => s.showError)\n const showNotification = useRelayStore((s) => s.showNotification)\n const relayUrl = useMemo(() => new URL(getBaseUrl()).origin, [])\n const [id, setId] = useState(defaultId)\n const [baseDir, setBaseDir] = useState('$HOME/projects')\n const [providers, setProviders] = useState<SpawnProvider[]>(getKnownProviderIds())\n const [apiPort, setApiPort] = useState('4860')\n const [pathPrefix, setPathPrefix] = useState('')\n const [command, setCommand] = useState('')\n const [expiresAt, setExpiresAt] = useState<number | undefined>()\n const [loading, setLoading] = useState(false)\n\n async function generate() {\n if (!id.trim()) { showError('Validation', 'Orchestrator id is required'); return }\n if (!baseDir.trim()) { showError('Validation', 'Base directory is required'); return }\n if (!providers.length) { showError('Validation', 'Select at least one provider'); return }\n setLoading(true)\n try {\n const result = await api<BootstrapResponse>('POST', '/orchestrators/bootstrap', {\n id: id.trim(),\n relayUrl,\n baseDir: baseDir.trim(),\n providers,\n apiPort: Number(apiPort) || 4860,\n pathPrefix: pathPrefix.split(':').map((p) => p.trim()).filter(Boolean),\n })\n setCommand(result.command)\n setExpiresAt(result.expiresAt)\n } catch (e) {\n showError('Install Command Failed', (e as Error).message)\n } finally {\n setLoading(false)\n }\n }\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o && set({ orchestratorInstallOpen: false })}>\n <DialogContent className=\"max-w-2xl overflow-hidden\">\n <DialogHeader>\n <DialogTitle className=\"flex items-center gap-2\">\n <Server className=\"w-4 h-4\" />\n Add Orchestrator\n </DialogTitle>\n </DialogHeader>\n <div className=\"space-y-4\">\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-3\">\n <div>\n <Label>Orchestrator ID</Label>\n <Input value={id} onChange={(e) => setId(e.target.value)} />\n </div>\n <div>\n <Label>Relay URL</Label>\n <Input value={relayUrl} readOnly />\n </div>\n <div>\n <Label>Base Directory</Label>\n <Input value={baseDir} onChange={(e) => setBaseDir(e.target.value)} />\n </div>\n <div>\n <Label>API Port</Label>\n <Input value={apiPort} onChange={(e) => setApiPort(e.target.value)} inputMode=\"numeric\" />\n </div>\n </div>\n\n <div>\n <Label>Providers</Label>\n <div className=\"mt-1 flex flex-wrap gap-2\">\n {getKnownProviderIds().map((provider) => (\n <Button\n key={provider}\n type=\"button\"\n size=\"sm\"\n variant={providers.includes(provider) ? 'default' : 'outline'}\n onClick={() => setProviders(toggleProvider(providers, provider))}\n >\n {getProviderLabel(provider)}\n </Button>\n ))}\n </div>\n </div>\n\n <div>\n <Label>Extra PATH Prefix</Label>\n <Input value={pathPrefix} onChange={(e) => setPathPrefix(e.target.value)} placeholder=\"/opt/homebrew/bin:/custom/bin\" />\n </div>\n\n {command && (\n <div>\n <div className=\"flex items-center justify-between gap-2 mb-1\">\n <Label>Install Command</Label>\n {expiresAt && <span className=\"text-[11px] text-muted-foreground\">Install token expires {new Date(expiresAt * 1000).toLocaleString()}</span>}\n </div>\n <pre className=\"max-h-40 w-full overflow-y-auto whitespace-pre-wrap break-all rounded-md border border-input bg-muted/40 p-3 font-mono text-xs leading-relaxed\">\n {command}\n </pre>\n </div>\n )}\n </div>\n <DialogFooter>\n <Button variant=\"outline\" onClick={() => set({ orchestratorInstallOpen: false })}>Close</Button>\n {command && (\n <CopyButton value={command} label=\"Copy\" showText size=\"default\" variant=\"outline\" className=\"gap-1\" onCopied={() => showNotification('Install command copied')} />\n )}\n <Button className=\"gap-1\" onClick={generate} disabled={loading}>\n <Terminal className=\"w-3.5 h-3.5\" />\n {loading ? 'Generating...' : 'Generate Command'}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n )\n}\n","import { useRelayStore } from '@/store'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Textarea } from '@/components/ui/textarea'\nimport { Label } from '@/components/ui/label'\nimport { Switch } from '@/components/ui/switch'\nimport { DirectoryPicker } from '@/components/shared/directory-picker'\nimport { ModelTraits } from '@/components/shared/model-traits'\nimport { availableModelsFor, defaultModelFor } from '@/store/helpers'\nimport type { SpawnProvider } from '@/types'\n\nexport function ManagedPolicyModal() {\n const m = useRelayStore((s) => s.policyModal)\n const orchestrators = useRelayStore((s) => s.orchestrators)\n const agentProfiles = useRelayStore((s) => s.agentProfiles)\n const set = useRelayStore((s) => s.set)\n const submitPolicy = useRelayStore((s) => s.submitPolicy)\n const providerCatalog = useRelayStore((s) => s.providerCatalog)\n\n const orch = orchestrators.find((o) => o.id === m.orchestratorId)\n const providers = orch?.providers || []\n const models = availableModelsFor(m.provider, providerCatalog)\n const selectedModel = models.find((model) => model.alias === m.model)\n const efforts = selectedModel?.efforts || []\n const isEditing = Boolean(m.editing)\n const rigAvailable = orch?.providerStatus?.find((p) => p.name === m.provider)?.features?.rig === true\n\n function update(partial: Partial<typeof m>) {\n set({ policyModal: { ...m, ...partial } })\n }\n\n function selectOrchestrator(orchestratorId: string) {\n const nextOrch = orchestrators.find((o) => o.id === orchestratorId)\n const provider = nextOrch?.providers[0] || m.provider\n update({ orchestratorId, provider, model: defaultModelFor(provider, providerCatalog), effort: '' })\n }\n\n function selectProvider(provider: SpawnProvider) {\n update({ provider, rig: '', model: defaultModelFor(provider, providerCatalog), effort: '' })\n }\n\n return (\n <Dialog open={m.open} onOpenChange={(o) => !o && update({ open: false })}>\n <DialogContent className=\"max-w-lg max-h-[90vh] overflow-y-auto\">\n <DialogHeader>\n <DialogTitle>{isEditing ? 'Edit Policy' : 'Create Managed Agent'}</DialogTitle>\n </DialogHeader>\n <div className=\"space-y-3\">\n <div>\n <Label>Policy Name</Label>\n <Input value={m.name} onChange={(e) => update({ name: e.target.value })} placeholder=\"my-agent\" disabled={isEditing} />\n </div>\n <div>\n <Label>Label</Label>\n <Input value={m.label} onChange={(e) => update({ label: e.target.value })} placeholder=\"Human-friendly name...\" />\n </div>\n <div>\n <Label>Description</Label>\n <Input value={m.description} onChange={(e) => update({ description: e.target.value })} placeholder=\"What does this agent do?\" />\n </div>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <Label>Orchestrator</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={m.orchestratorId} onChange={(e) => selectOrchestrator(e.target.value)}>\n {orchestrators.filter((o) => o.status === 'online').map((o) => <option key={o.id} value={o.id}>{o.hostname} ({o.id.slice(-8)})</option>)}\n </select>\n </div>\n <div>\n <Label>Provider</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={m.provider} onChange={(e) => selectProvider(e.target.value as SpawnProvider)} disabled={!providers.length}>\n {!providers.length && <option value={m.provider}>No providers available</option>}\n {providers.map((p) => <option key={p} value={p}>{p}</option>)}\n </select>\n </div>\n </div>\n {rigAvailable && (\n <div>\n <Label>Rig</Label>\n <Input value={m.rig} onChange={(e) => update({ rig: e.target.value })} placeholder=\"Leave empty to auto-detect from .claude-rig\" />\n <p className=\"text-xs text-muted-foreground mt-1\">claude-rig profile name. Auto-detects from project's .claude-rig file if empty.</p>\n </div>\n )}\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <Label>Model</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={m.model} onChange={(e) => update({ model: e.target.value, effort: '' })}>\n {models.map((model) => <option key={model.alias} value={model.alias}>{model.label}</option>)}\n </select>\n </div>\n <div>\n <Label>Effort</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={m.effort} onChange={(e) => update({ effort: e.target.value })} disabled={!efforts.length}>\n <option value=\"\">Default</option>\n {efforts.map((level) => <option key={level} value={level}>{level}</option>)}\n </select>\n </div>\n </div>\n <ModelTraits model={selectedModel} />\n <div>\n <Label>Agent Profile</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={m.profile || 'default-relay'} onChange={(e) => update({ profile: e.target.value })}>\n {!agentProfiles.length && <option value=\"default-relay\">default-relay</option>}\n {agentProfiles.map((profile) => <option key={profile.name} value={profile.name}>{profile.name}</option>)}\n </select>\n </div>\n <div>\n <Label>Working Directory</Label>\n <div className=\"mt-1\">\n <DirectoryPicker value={m.cwd} onChange={(path) => update({ cwd: path })} orchestratorId={m.orchestratorId} placeholder={orch?.baseDir || '/path/to/project'} />\n </div>\n </div>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <Label>Mode</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={m.mode} onChange={(e) => update({ mode: e.target.value as 'always-on' | 'on-demand' })}>\n <option value=\"always-on\">Always On</option>\n <option value=\"on-demand\">On Demand</option>\n </select>\n </div>\n <div>\n <Label>Permission Mode</Label>\n <select className=\"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm\" value={m.permissionMode} onChange={(e) => update({ permissionMode: e.target.value as 'open' | 'guarded' | 'read-only' })}>\n <option value=\"open\">Open</option>\n <option value=\"guarded\">Guarded</option>\n <option value=\"read-only\">Read-only</option>\n </select>\n </div>\n </div>\n {m.mode === 'on-demand' && (\n <div>\n <Label>Keepalive (seconds)</Label>\n <Input type=\"number\" value={m.keepaliveSeconds} onChange={(e) => update({ keepaliveSeconds: e.target.value })} placeholder=\"300\" />\n <p className=\"text-xs text-muted-foreground mt-1\">Seconds to keep agent alive after last activity.</p>\n </div>\n )}\n <div>\n <Label>Initial Prompt</Label>\n <Textarea value={m.prompt} onChange={(e) => update({ prompt: e.target.value })} rows={3} placeholder=\"Optional initial task or instructions...\" />\n <p className=\"text-xs text-muted-foreground mt-1\">Codex starts this as the first App Server turn; Claude receives it as a launch prompt.</p>\n </div>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <Label>Tags</Label>\n <Input value={m.tags} onChange={(e) => update({ tags: e.target.value })} placeholder=\"tag1, tag2\" />\n </div>\n <div>\n <Label>Capabilities</Label>\n <Input value={m.capabilities} onChange={(e) => update({ capabilities: e.target.value })} placeholder=\"chat, review\" />\n </div>\n </div>\n <div>\n <Label>Provider Args</Label>\n <Input value={m.providerArgs} onChange={(e) => update({ providerArgs: e.target.value })} placeholder=\"--flag value\" />\n <p className=\"text-xs text-muted-foreground mt-1\">Space-separated args passed to the provider CLI.</p>\n </div>\n <div>\n <Label>Channel Binding</Label>\n <Input value={m.channelId} onChange={(e) => update({ channelId: e.target.value })} placeholder=\"Channel ID (optional)\" />\n </div>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <Label>Backoff Schedule (seconds)</Label>\n <Input value={m.backoffSchedule} onChange={(e) => update({ backoffSchedule: e.target.value })} placeholder=\"5, 15, 60, 300\" />\n </div>\n <div>\n <Label>Backoff Reset After (s)</Label>\n <Input type=\"number\" value={m.backoffResetAfterSeconds} onChange={(e) => update({ backoffResetAfterSeconds: e.target.value })} placeholder=\"600\" />\n </div>\n </div>\n <div className=\"flex items-center justify-between\">\n <Label htmlFor=\"restartOnUpdate\">Restart on policy update</Label>\n <Switch id=\"restartOnUpdate\" checked={m.restartOnUpdate} onCheckedChange={(v) => update({ restartOnUpdate: v })} />\n </div>\n <div className=\"flex items-center justify-between\">\n <Label htmlFor=\"dailyRestart\">Scheduled daily restart</Label>\n <Switch id=\"dailyRestart\" checked={m.scheduledDailyRestart} onCheckedChange={(v) => update({ scheduledDailyRestart: v })} />\n </div>\n </div>\n <DialogFooter>\n <Button variant=\"outline\" onClick={() => update({ open: false })}>Cancel</Button>\n <Button onClick={submitPolicy}>{isEditing ? 'Save' : 'Create'}</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n )\n}\n","import { type ReactNode, useState } from 'react'\nimport { errMessage } from 'agent-relay-sdk/types'\nimport { api } from '@/lib/api'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Label } from '@/components/ui/label'\nimport { Switch } from '@/components/ui/switch'\nimport { Badge } from '@/components/ui/badge'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'\nimport { Info, Plus, ShieldCheck, Trash2 } from 'lucide-react'\nimport type {\n AgentProfile,\n AgentProfileAssetRef,\n AgentProfileCategoryMode,\n AgentProfileProvider,\n ProvisioningAssetKind,\n ProvisioningCapabilityWithVariants,\n SpawnProvider,\n} from '@/types'\n\ntype SelectOption = { value: string; label: string }\n\ntype ResolvedProvisioning = {\n skills: Array<{ name: string }>\n plugins: Array<{ name: string }>\n hooks?: Array<{ name: string; tier?: 'baseline' | 'profile' }>\n mcpServers: Record<string, unknown>\n skipped?: Array<{ kind: ProvisioningAssetKind; ref: string; provider: SpawnProvider; reason: string; detail: string }>\n}\n\n/** Asset-kind badge colors, kept in sync with the Registry view (#1096): skill=blue,\n * plugin=violet, hook=amber, mcp=emerald. */\nfunction assetKindBadgeClass(kind: 'skill' | 'plugin' | 'hook'): string {\n if (kind === 'skill') return 'bg-blue-500/10 text-blue-400 border-blue-500/30'\n if (kind === 'plugin') return 'bg-violet-500/10 text-violet-400 border-violet-500/30'\n return 'bg-amber-500/10 text-amber-400 border-amber-500/30'\n}\n\ntype ResolvedAgentProfile = AgentProfile & { provisioning?: ResolvedProvisioning }\n\n/** Small info affordance — hover the icon to reveal the tooltip. Reuses ui/tooltip. */\nexport function InfoTip({ children }: { children: ReactNode }) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <button type=\"button\" tabIndex={-1} aria-label=\"More info\" className=\"inline-flex shrink-0 text-muted-foreground transition-colors hover:text-foreground\">\n <Info className=\"h-3 w-3\" />\n </button>\n </TooltipTrigger>\n <TooltipContent className=\"max-w-xs leading-relaxed\">{children}</TooltipContent>\n </Tooltip>\n )\n}\n\n/** A field label with a trailing info tooltip. */\nexport function LabelWithTip({ children, tip, className }: { children: ReactNode; tip: ReactNode; className?: string }) {\n return (\n <div className=\"flex items-center gap-1.5\">\n <Label className={className}>{children}</Label>\n <InfoTip>{tip}</InfoTip>\n </div>\n )\n}\n\nexport const POLICY_OPTIONS: SelectOption[] = [\n { value: '', label: 'Off' },\n { value: 'all', label: 'All' },\n]\n\nexport const PROJECT_SETTINGS_POLICY_OPTIONS: SelectOption[] = [\n { value: '', label: 'Off' },\n { value: 'all', label: 'All safe settings' },\n]\n\nexport const LANDING_STRATEGY_OPTIONS: SelectOption[] = [\n { value: '', label: 'Instance default' },\n { value: 'direct', label: 'Direct' },\n { value: 'pr', label: 'Pull request' },\n]\n\nimport { getKnownProviderIds, getProviderLabel } from '@/lib/provider-display'\n\nconst PROVIDER_OPTIONS: Array<{ value: AgentProfileProvider; label: string }> = [\n { value: 'any', label: 'Any provider' },\n ...getKnownProviderIds().map((id) => ({ value: id, label: getProviderLabel(id) })),\n]\n\nconst SOURCE_BADGE_CLASS: Record<AgentProfileAssetRef['source'] | 'profile', string> = {\n relay: 'bg-blue-500/10 text-blue-400 border-blue-500/30',\n repo: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/30',\n inline: 'bg-amber-500/10 text-amber-400 border-amber-500/30',\n provider: 'bg-fuchsia-500/10 text-fuchsia-400 border-fuchsia-500/30',\n profile: 'bg-slate-500/10 text-slate-400 border-slate-500/30',\n}\n\nexport function policyValue(value: { policy?: string } | undefined): string {\n return value ? value.policy ?? 'all' : ''\n}\n\nexport function policyObject(value: string): { policy?: 'all' } | undefined {\n if (!value) return undefined\n return value === 'all' ? { policy: 'all' } : {}\n}\n\nfunction SimpleSelect({ value, onChange, options, disabled }: { value: string; onChange: (v: string) => void; options: SelectOption[]; disabled?: boolean }) {\n return (\n <select className=\"w-full rounded-md border border-input bg-background px-3 py-2 text-sm\" value={value} onChange={(e) => onChange(e.target.value)} disabled={disabled}>\n {options.map((o) => <option key={o.value} value={o.value}>{o.label}</option>)}\n </select>\n )\n}\n\nfunction assetKey(ref: AgentProfileAssetRef, index: number): string {\n return `${ref.source}:${ref.provider ?? 'any'}:${ref.ref}:${index}`\n}\n\nfunction SourceBadge({ source }: { source: AgentProfileAssetRef['source'] | 'profile' }) {\n return <Badge variant=\"outline\" className={`text-[10px] ${SOURCE_BADGE_CLASS[source]}`}>{source}</Badge>\n}\n\nexport function RegistryCapabilitiesSection({\n skills,\n plugins,\n hooks,\n mcp,\n onChangeSkills,\n onChangePlugins,\n onChangeHooks,\n onChangeMcp,\n projectMcp,\n projectSkills,\n projectSettings,\n sharedMcp,\n readOnly,\n}: {\n skills: AgentProfileAssetRef[]\n plugins: AgentProfileAssetRef[]\n hooks: AgentProfileAssetRef[]\n mcp: { mode: AgentProfileCategoryMode; servers?: Record<string, unknown> }\n onChangeSkills: (v: AgentProfileAssetRef[]) => void\n onChangePlugins: (v: AgentProfileAssetRef[]) => void\n onChangeHooks: (v: AgentProfileAssetRef[]) => void\n onChangeMcp: (v: { mode: AgentProfileCategoryMode; servers?: Record<string, unknown> }) => void\n projectMcp?: AgentProfile['projectMcp']\n projectSkills?: AgentProfile['projectSkills']\n projectSettings?: AgentProfile['projectSettings']\n sharedMcp?: AgentProfile['sharedMcp']\n readOnly: boolean\n}) {\n const [capabilities, setCapabilities] = useState<ProvisioningCapabilityWithVariants[]>([])\n const [fetched, setFetched] = useState(false)\n const [loading, setLoading] = useState(false)\n const [fetchError, setFetchError] = useState<string | null>(null)\n const [addingKind, setAddingKind] = useState<ProvisioningAssetKind | null>(null)\n const [manualSource, setManualSource] = useState<AgentProfileAssetRef['source']>('repo')\n const [manualRef, setManualRef] = useState('')\n const [manualProvider, setManualProvider] = useState<AgentProfileProvider>('any')\n\n async function fetchCapabilities(kind: ProvisioningAssetKind) {\n setAddingKind(kind)\n if (fetched) return\n setLoading(true)\n setFetchError(null)\n try {\n const res = await api<{ capabilities: ProvisioningCapabilityWithVariants[] }>('GET', '/provisioning/capabilities')\n setCapabilities(res.capabilities)\n setFetched(true)\n } catch (e) {\n setFetchError(errMessage(e))\n } finally {\n setLoading(false)\n }\n }\n\n const refsFor = (kind: 'skill' | 'plugin' | 'hook') => (kind === 'skill' ? skills : kind === 'plugin' ? plugins : hooks)\n const onChangeFor = (kind: 'skill' | 'plugin' | 'hook') =>\n kind === 'skill' ? onChangeSkills : kind === 'plugin' ? onChangePlugins : onChangeHooks\n\n function addManualRef(kind: 'skill' | 'plugin' | 'hook') {\n const ref = manualRef.trim()\n if (!ref) return\n const item: AgentProfileAssetRef = {\n source: manualSource,\n ref,\n enabled: true,\n ...(manualProvider === 'any' ? {} : { provider: manualProvider }),\n }\n onChangeFor(kind)([...refsFor(kind), item])\n setManualRef('')\n setAddingKind(null)\n }\n\n function addRelayRef(kind: 'skill' | 'plugin' | 'hook', slug: string) {\n const refs = refsFor(kind)\n if (refs.some((ref) => ref.source === 'relay' && ref.ref === slug)) return\n onChangeFor(kind)([...refs, { source: 'relay' as const, ref: slug, enabled: true }])\n setAddingKind(null)\n }\n\n function addMcp(cap: ProvisioningCapabilityWithVariants) {\n const variant = cap.variants.find((v) => v.enabled)\n if (!variant) return\n const def = variant.definition as { kind: string; server?: Record<string, unknown> } | null\n onChangeMcp({ ...mcp, servers: { ...(mcp.servers ?? {}), [cap.capability.slug]: def?.server ?? {} } })\n setAddingKind(null)\n }\n\n function updateSkill(index: number, partial: Partial<AgentProfileAssetRef>) {\n onChangeSkills(skills.map((item, i) => i === index ? { ...item, ...partial } : item))\n }\n\n function updatePlugin(index: number, partial: Partial<AgentProfileAssetRef>) {\n onChangePlugins(plugins.map((item, i) => i === index ? { ...item, ...partial } : item))\n }\n\n function updateHook(index: number, partial: Partial<AgentProfileAssetRef>) {\n onChangeHooks(hooks.map((item, i) => i === index ? { ...item, ...partial } : item))\n }\n\n function removeMcp(key: string) {\n const servers = { ...(mcp.servers ?? {}) }\n delete servers[key]\n onChangeMcp({ ...mcp, servers })\n }\n\n const skillCaps = capabilities.filter((c) => c.capability.kind === 'skill')\n const pluginCaps = capabilities.filter((c) => c.capability.kind === 'plugin')\n const hookCaps = capabilities.filter((c) => c.capability.kind === 'hook')\n const mcpCaps = capabilities.filter((c) => c.capability.kind === 'mcp')\n\n // Baseline hook slugs (tier: \"baseline\") are always applied by the runner regardless of\n // these refs (#1096 — a safety guard must never be silently absent). Surface them as such.\n const baselineHookSlugs = new Set(\n hookCaps\n .filter((c) => c.variants.some((v) => (v.definition as { tier?: string } | null)?.tier === 'baseline'))\n .map((c) => c.capability.slug),\n )\n\n return (\n <div className=\"space-y-3\">\n <InjectionState projectMcp={projectMcp} projectSkills={projectSkills} projectSettings={projectSettings} sharedMcp={sharedMcp} />\n <AssetRefList\n title=\"Skills from registry\"\n kind=\"skill\"\n refs={skills}\n readOnly={readOnly}\n adding={addingKind === 'skill'}\n caps={skillCaps}\n loading={loading}\n fetchError={fetchError}\n empty=\"No skills assigned\"\n manualRef={manualRef}\n manualSource={manualSource}\n manualProvider={manualProvider}\n onAddClick={() => void fetchCapabilities('skill')}\n onCancel={() => setAddingKind(null)}\n onManualRef={setManualRef}\n onManualSource={setManualSource}\n onManualProvider={setManualProvider}\n onAddManual={() => addManualRef('skill')}\n onAddRelay={(slug) => addRelayRef('skill', slug)}\n onUpdate={updateSkill}\n onRemove={(index) => onChangeSkills(skills.filter((_, i) => i !== index))}\n />\n <AssetRefList\n title=\"Plugins from registry\"\n kind=\"plugin\"\n refs={plugins}\n readOnly={readOnly}\n adding={addingKind === 'plugin'}\n caps={pluginCaps}\n loading={loading}\n fetchError={fetchError}\n empty=\"No plugins assigned\"\n manualRef={manualRef}\n manualSource={manualSource}\n manualProvider={manualProvider}\n onAddClick={() => void fetchCapabilities('plugin')}\n onCancel={() => setAddingKind(null)}\n onManualRef={setManualRef}\n onManualSource={setManualSource}\n onManualProvider={setManualProvider}\n onAddManual={() => addManualRef('plugin')}\n onAddRelay={(slug) => addRelayRef('plugin', slug)}\n onUpdate={updatePlugin}\n onRemove={(index) => onChangePlugins(plugins.filter((_, i) => i !== index))}\n />\n <AssetRefList\n title=\"Hooks from registry\"\n kind=\"hook\"\n refs={hooks}\n readOnly={readOnly}\n adding={addingKind === 'hook'}\n caps={hookCaps}\n loading={loading}\n fetchError={fetchError}\n empty=\"No hooks assigned\"\n note=\"Baseline safety hooks (e.g. the rg -r footgun guard) are always applied to every spawned agent regardless of these refs.\"\n baselineSlugs={baselineHookSlugs}\n manualRef={manualRef}\n manualSource={manualSource}\n manualProvider={manualProvider}\n onAddClick={() => void fetchCapabilities('hook')}\n onCancel={() => setAddingKind(null)}\n onManualRef={setManualRef}\n onManualSource={setManualSource}\n onManualProvider={setManualProvider}\n onAddManual={() => addManualRef('hook')}\n onAddRelay={(slug) => addRelayRef('hook', slug)}\n onUpdate={updateHook}\n onRemove={(index) => onChangeHooks(hooks.filter((_, i) => i !== index))}\n />\n <McpRegistryList\n mcpKeys={Object.keys(mcp.servers ?? {})}\n caps={mcpCaps}\n adding={addingKind === 'mcp'}\n loading={loading}\n fetchError={fetchError}\n readOnly={readOnly}\n onAddClick={() => void fetchCapabilities('mcp')}\n onAddMcp={addMcp}\n onCancel={() => setAddingKind(null)}\n onRemove={removeMcp}\n />\n </div>\n )\n}\n\nfunction InjectionState(props: {\n projectMcp?: AgentProfile['projectMcp']\n projectSkills?: AgentProfile['projectSkills']\n projectSettings?: AgentProfile['projectSettings']\n sharedMcp?: AgentProfile['sharedMcp']\n}) {\n return (\n <div className=\"rounded border border-border bg-muted/20 p-2\">\n <div className=\"mb-1 flex items-center gap-1.5 text-xs font-medium text-muted-foreground\">\n Project and shared injection\n <InfoTip>Read-only mirror of the Provisioning Policies above — what this profile injects from the project's <code>.mcp.json</code>/<code>.claude</code> and how its MCP is routed.</InfoTip>\n </div>\n <div className=\"flex flex-wrap gap-1.5\">\n <Badge variant={props.projectMcp ? 'default' : 'outline'} className=\"text-[10px]\">project MCP: {policyValue(props.projectMcp) || 'off'}</Badge>\n <Badge variant={props.projectSkills ? 'default' : 'outline'} className=\"text-[10px]\">project skills: {policyValue(props.projectSkills) || 'off'}</Badge>\n <Badge variant={props.projectSettings ? 'default' : 'outline'} className=\"text-[10px]\">project settings: {policyValue(props.projectSettings) || 'off'}</Badge>\n <Badge variant={props.sharedMcp ? 'default' : 'outline'} className=\"text-[10px]\">shared MCP: {policyValue(props.sharedMcp) || 'off'}</Badge>\n </div>\n </div>\n )\n}\n\nfunction variantSources(cap: ProvisioningCapabilityWithVariants): string {\n return [...new Set(cap.variants.map((v) => v.sourceType || 'relay'))].join(', ')\n}\n\nfunction AssetRefList(props: {\n title: string\n kind: 'skill' | 'plugin' | 'hook'\n refs: AgentProfileAssetRef[]\n readOnly: boolean\n adding: boolean\n caps: ProvisioningCapabilityWithVariants[]\n loading: boolean\n fetchError: string | null\n empty: string\n note?: string\n baselineSlugs?: Set<string>\n manualRef: string\n manualSource: AgentProfileAssetRef['source']\n manualProvider: AgentProfileProvider\n onAddClick: () => void\n onCancel: () => void\n onManualRef: (value: string) => void\n onManualSource: (value: AgentProfileAssetRef['source']) => void\n onManualProvider: (value: AgentProfileProvider) => void\n onAddManual: () => void\n onAddRelay: (slug: string) => void\n onUpdate: (index: number, partial: Partial<AgentProfileAssetRef>) => void\n onRemove: (index: number) => void\n}) {\n return (\n <div>\n <div className=\"mb-1.5 flex items-center justify-between\">\n <span className=\"text-xs font-medium text-muted-foreground\">{props.title}</span>\n {!props.readOnly && (\n <Button type=\"button\" variant=\"outline\" size=\"sm\" className=\"h-6 gap-1 text-xs\" onClick={props.onAddClick}>\n <Plus className=\"h-3 w-3\" />\n Add {props.kind}\n </Button>\n )}\n </div>\n {props.note && (\n <div className=\"mb-1.5 flex items-start gap-1.5 rounded border border-amber-500/30 bg-amber-500/10 px-2 py-1 text-[10px] leading-relaxed text-amber-300\">\n <ShieldCheck className=\"mt-0.5 h-3 w-3 shrink-0\" />\n <span>{props.note}</span>\n </div>\n )}\n {props.refs.length === 0 && !props.adding && <div className=\"text-xs text-muted-foreground\">{props.empty}</div>}\n {props.refs.map((ref, index) => {\n const isBaseline = ref.source === 'relay' && (props.baselineSlugs?.has(ref.ref) ?? false)\n return (\n <div key={assetKey(ref, index)} className=\"mb-1 flex items-center gap-2 rounded border border-border bg-card/60 px-2 py-1\">\n <Badge variant=\"outline\" className={`text-[10px] ${assetKindBadgeClass(props.kind)}`}>{props.kind}</Badge>\n <SourceBadge source={ref.source} />\n <span className=\"min-w-0 flex-1 truncate font-mono text-xs\">{ref.ref}</span>\n {isBaseline && (\n <Tooltip>\n <TooltipTrigger asChild>\n <Badge variant=\"outline\" className=\"gap-0.5 border-amber-500/30 bg-amber-500/10 text-[10px] text-amber-400\"><ShieldCheck className=\"h-2.5 w-2.5\" />baseline</Badge>\n </TooltipTrigger>\n <TooltipContent className=\"max-w-xs leading-relaxed\">Baseline safety hook — always applied by the runner even if removed or disabled here.</TooltipContent>\n </Tooltip>\n )}\n {ref.provider && ref.provider !== 'any' && <Badge variant=\"secondary\" className=\"text-[10px]\">{ref.provider}</Badge>}\n <Switch checked={ref.enabled} onCheckedChange={(enabled) => props.onUpdate(index, { enabled })} disabled={props.readOnly} size=\"sm\" />\n {!props.readOnly && (\n <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" className=\"h-5 w-5\" onClick={() => props.onRemove(index)}>\n <Trash2 className=\"h-3 w-3\" />\n </Button>\n )}\n </div>\n )\n })}\n {props.adding && (\n <div className=\"mt-1.5 space-y-2 rounded border border-border bg-card/60 p-2\">\n {props.loading && <div className=\"text-xs text-muted-foreground\">Loading...</div>}\n {props.fetchError && <div className=\"text-xs text-destructive\">{props.fetchError}</div>}\n {!props.loading && props.caps.length === 0 && !props.fetchError && <div className=\"text-xs text-muted-foreground\">No {props.kind} capabilities in registry</div>}\n {props.caps.length > 0 && (\n <div className=\"max-h-44 space-y-0.5 overflow-y-auto rounded border border-border/60 bg-background/40 p-1\">\n {props.caps.map((cap) => (\n <button key={cap.capability.id} type=\"button\" onClick={() => props.onAddRelay(cap.capability.slug)} className=\"w-full rounded px-2 py-1 text-left font-mono text-xs hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\">\n {cap.capability.slug}{cap.capability.title ? ` - ${cap.capability.title}` : ''}\n {cap.variants.length > 0 && <span className=\"ml-2 text-muted-foreground\">({variantSources(cap)})</span>}\n </button>\n ))}\n </div>\n )}\n <ManualSeparator />\n <ManualRefForm {...props} />\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" className=\"mt-1 h-6 text-xs\" onClick={props.onCancel}>Cancel</Button>\n </div>\n )}\n </div>\n )\n}\n\nfunction ManualSeparator() {\n return (\n <div className=\"flex items-center gap-2 pt-0.5\">\n <div className=\"h-px flex-1 bg-border\" />\n <span className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">or add manually</span>\n <div className=\"h-px flex-1 bg-border\" />\n </div>\n )\n}\n\nfunction ManualRefForm(props: Pick<Parameters<typeof AssetRefList>[0], 'manualRef' | 'manualSource' | 'manualProvider' | 'kind' | 'onManualRef' | 'onManualSource' | 'onManualProvider' | 'onAddManual'>) {\n return (\n <>\n <div className=\"grid grid-cols-[1fr_1fr] gap-1.5\">\n <SimpleSelect value={props.manualSource} onChange={(v) => props.onManualSource(v as AgentProfileAssetRef['source'])} options={[\n { value: 'repo', label: 'Repo ref' },\n { value: 'inline', label: 'Inline ref' },\n { value: 'provider', label: 'Provider ref' },\n { value: 'relay', label: 'Relay ref' },\n ]} />\n <SimpleSelect value={props.manualProvider} onChange={(v) => props.onManualProvider(v as AgentProfileProvider)} options={PROVIDER_OPTIONS} />\n </div>\n <div className=\"flex items-center gap-1.5\">\n <Input value={props.manualRef} onChange={(e) => props.onManualRef(e.target.value)} placeholder={props.kind === 'skill' ? '.claude/skills/name or registry slug' : props.kind === 'hook' ? '.claude/hooks/name or registry slug' : '.relay/plugins/name or registry slug'} className=\"font-mono text-xs\" />\n <Button type=\"button\" variant=\"outline\" size=\"sm\" className=\"h-8 text-xs\" onClick={props.onAddManual}>Add ref</Button>\n </div>\n </>\n )\n}\n\nfunction McpRegistryList(props: {\n mcpKeys: string[]\n caps: ProvisioningCapabilityWithVariants[]\n adding: boolean\n loading: boolean\n fetchError: string | null\n readOnly: boolean\n onAddClick: () => void\n onAddMcp: (cap: ProvisioningCapabilityWithVariants) => void\n onCancel: () => void\n onRemove: (key: string) => void\n}) {\n return (\n <div>\n <div className=\"mb-1.5 flex items-center justify-between\">\n <span className=\"text-xs font-medium text-muted-foreground\">MCP from registry</span>\n {!props.readOnly && (\n <Button type=\"button\" variant=\"outline\" size=\"sm\" className=\"h-6 gap-1 text-xs\" onClick={props.onAddClick}>\n <Plus className=\"h-3 w-3\" />\n Add MCP\n </Button>\n )}\n </div>\n {props.mcpKeys.length === 0 && !props.adding && <div className=\"text-xs text-muted-foreground\">No MCP servers from registry</div>}\n {props.mcpKeys.map((key) => (\n <div key={key} className=\"mb-1 flex items-center gap-2 rounded border border-border bg-card/60 px-2 py-1\">\n <Badge variant=\"outline\" className=\"border-emerald-500/30 bg-emerald-500/10 text-[10px] text-emerald-400\">mcp</Badge>\n <SourceBadge source=\"profile\" />\n <span className=\"min-w-0 flex-1 truncate font-mono text-xs\">{key}</span>\n {!props.readOnly && (\n <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" className=\"h-5 w-5\" onClick={() => props.onRemove(key)}>\n <Trash2 className=\"h-3 w-3\" />\n </Button>\n )}\n </div>\n ))}\n {props.adding && (\n <div className=\"mt-1.5 space-y-2 rounded border border-border bg-card/60 p-2\">\n {props.loading && <div className=\"text-xs text-muted-foreground\">Loading...</div>}\n {props.fetchError && <div className=\"text-xs text-destructive\">{props.fetchError}</div>}\n {!props.loading && props.caps.length === 0 && !props.fetchError && <div className=\"text-xs text-muted-foreground\">No MCP capabilities in registry</div>}\n {props.caps.length > 0 && (\n <div className=\"max-h-44 space-y-0.5 overflow-y-auto rounded border border-border/60 bg-background/40 p-1\">\n {props.caps.map((cap) => (\n <button key={cap.capability.id} type=\"button\" onClick={() => props.onAddMcp(cap)} className=\"w-full rounded px-2 py-1 text-left font-mono text-xs hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\">\n {cap.capability.slug}{cap.capability.title ? ` - ${cap.capability.title}` : ''}\n {cap.variants.length > 0 && <span className=\"ml-2 text-muted-foreground\">({variantSources(cap)})</span>}\n </button>\n ))}\n </div>\n )}\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" className=\"mt-1 h-6 text-xs\" onClick={props.onCancel}>Cancel</Button>\n </div>\n )}\n </div>\n )\n}\n\nfunction resolveDefaultProvider(profileProvider: string | undefined): string {\n const ids = getKnownProviderIds()\n if (profileProvider && profileProvider !== 'any' && ids.includes(profileProvider)) return profileProvider\n return ids[0] ?? ''\n}\n\nexport function ResolvedProvisioningPanel({ profile }: { profile: AgentProfile }) {\n const [provider, setProvider] = useState<string>(() => resolveDefaultProvider(profile.provider))\n const [resolved, setResolved] = useState<ResolvedProvisioning | null>(null)\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState<string | null>(null)\n\n async function load(nextProvider = provider) {\n if (!profile.name.trim()) return\n setLoading(true)\n setError(null)\n try {\n const res = await api<{ provider: string; profile: ResolvedAgentProfile }>('GET', `/agent-profiles/${encodeURIComponent(profile.name)}/resolved?provider=${encodeURIComponent(nextProvider)}`)\n setProvider(res.provider)\n setResolved(res.profile.provisioning ?? { skills: [], plugins: [], mcpServers: {} })\n } catch (e) {\n setError(errMessage(e))\n setResolved(null)\n } finally {\n setLoading(false)\n }\n }\n\n const relayGroups = profile.relay.tools?.groups ?? []\n const relayToolSummary = relayGroups.length ? `custom: ${relayGroups.join(', ')}` : 'full access (all groups)'\n const mcpKeys = Object.keys(resolved?.mcpServers ?? {})\n\n return (\n <div className=\"space-y-3\">\n <div className=\"flex items-end gap-2\">\n <div className=\"min-w-0 flex-1\">\n <Label>Provider</Label>\n <SimpleSelect value={provider} onChange={(v) => { setProvider(v); void load(v) }} options={\n getKnownProviderIds().map((id) => ({ value: id, label: getProviderLabel(id) }))\n } />\n </div>\n <Button type=\"button\" variant=\"outline\" size=\"sm\" onClick={() => void load()} disabled={loading || !profile.name.trim()}>\n {loading ? 'Resolving...' : 'Resolve'}\n </Button>\n </div>\n {error && <div className=\"rounded border border-destructive/40 bg-destructive/10 px-2 py-1 text-xs text-destructive\">{error}</div>}\n <div className=\"rounded border border-border bg-muted/20 p-2\">\n <div className=\"text-xs font-medium text-muted-foreground\">Relay tool surface</div>\n <div className=\"mt-1 font-mono text-xs\">{relayToolSummary}</div>\n </div>\n {!resolved && !error && <div className=\"text-xs text-muted-foreground\">Resolve this profile to inspect materialized provisioning.</div>}\n {resolved && (\n <div className=\"grid gap-2\">\n <ResolvedList title=\"Skills\" values={resolved.skills.map((item) => item.name)} empty=\"No resolved skills\" />\n <ResolvedList title=\"Plugins\" values={resolved.plugins.map((item) => item.name)} empty=\"No resolved plugins\" />\n <ResolvedList\n title=\"Hooks\"\n values={(resolved.hooks ?? []).map((item) => (item.tier === 'baseline' ? `${item.name} (baseline)` : item.name))}\n empty=\"No resolved hooks\"\n />\n <ResolvedList title=\"MCP Servers\" values={mcpKeys} empty=\"No resolved MCP servers\" />\n {(resolved.skipped?.length ?? 0) > 0 && (\n <div className=\"rounded border border-amber-500/30 bg-amber-500/10 p-2\">\n <div className=\"text-xs font-medium text-amber-300\">Skipped</div>\n <div className=\"mt-1 space-y-1\">\n {resolved.skipped!.map((item) => (\n <div key={`${item.kind}:${item.ref}:${item.reason}`} className=\"text-xs\">\n <span className=\"font-mono\">{item.kind}:{item.ref}</span>\n <span className=\"text-muted-foreground\"> - {item.detail}</span>\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n )\n}\n\nfunction ResolvedList({ title, values, empty }: { title: string; values: string[]; empty: string }) {\n return (\n <div className=\"rounded border border-border bg-card/60 p-2\">\n <div className=\"mb-1 text-xs font-medium text-muted-foreground\">{title}</div>\n {values.length === 0 ? (\n <div className=\"text-xs text-muted-foreground\">{empty}</div>\n ) : (\n <div className=\"flex flex-wrap gap-1\">\n {values.map((value, index) => <Badge key={`${value}:${index}`} variant=\"outline\" className=\"font-mono text-[10px]\">{value}</Badge>)}\n </div>\n )}\n </div>\n )\n}\n","import { useState } from 'react'\nimport { useRelayStore } from '@/store'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Textarea } from '@/components/ui/textarea'\nimport { Label } from '@/components/ui/label'\nimport { Switch } from '@/components/ui/switch'\nimport { Badge } from '@/components/ui/badge'\nimport { ChevronDown, ChevronRight, Plus, RefreshCw, Trash2 } from 'lucide-react'\nimport {\n InfoTip,\n LabelWithTip,\n LANDING_STRATEGY_OPTIONS,\n POLICY_OPTIONS,\n PROJECT_SETTINGS_POLICY_OPTIONS,\n RegistryCapabilitiesSection,\n ResolvedProvisioningPanel,\n policyObject,\n policyValue,\n} from './agent-profile-provisioning'\nimport type {\n AgentProfileBase, AgentProfileProvider, AgentProfileCategoryMode,\n AgentProfileFilesystemScope, AgentProfileInstructionPolicy,\n} from '@/types'\n\nfunction Section({ title, children, defaultOpen = true }: { title: string; children: React.ReactNode; defaultOpen?: boolean }) {\n const [open, setOpen] = useState(defaultOpen)\n return (\n <div className=\"border border-border rounded-md\">\n <button type=\"button\" className=\"flex w-full items-center gap-2 px-3 py-2 text-sm font-medium hover:bg-accent\" onClick={() => setOpen(!open)}>\n {open ? <ChevronDown className=\"h-3.5 w-3.5\" /> : <ChevronRight className=\"h-3.5 w-3.5\" />}\n {title}\n </button>\n {open && <div className=\"space-y-3 border-t border-border px-3 py-3\">{children}</div>}\n </div>\n )\n}\n\nfunction Select({ value, onChange, options, disabled }: { value: string; onChange: (v: string) => void; options: Array<{ value: string; label: string }>; disabled?: boolean }) {\n return (\n <select className=\"w-full rounded-md border border-input bg-background px-3 py-2 text-sm\" value={value} onChange={(e) => onChange(e.target.value)} disabled={disabled}>\n {options.map((o) => <option key={o.value} value={o.value}>{o.label}</option>)}\n </select>\n )\n}\n\nfunction EnvEditor({ env, onChange, disabled }: { env: Record<string, string>; onChange: (env: Record<string, string>) => void; disabled?: boolean }) {\n const entries = Object.entries(env)\n const [newKey, setNewKey] = useState('')\n const [newVal, setNewVal] = useState('')\n\n function add() {\n if (!newKey.trim()) return\n onChange({ ...env, [newKey.trim()]: newVal })\n setNewKey('')\n setNewVal('')\n }\n\n function remove(key: string) {\n const next = { ...env }\n delete next[key]\n onChange(next)\n }\n\n return (\n <div className=\"space-y-1.5\">\n {entries.map(([k, v]) => (\n <div key={k} className=\"flex items-center gap-1.5\">\n <code className=\"min-w-0 flex-1 truncate rounded bg-muted px-2 py-1 text-xs\">{k}={v}</code>\n {!disabled && (\n <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" className=\"h-6 w-6 shrink-0\" onClick={() => remove(k)}>\n <Trash2 className=\"h-3 w-3\" />\n </Button>\n )}\n </div>\n ))}\n {!disabled && (\n <div className=\"flex items-center gap-1.5\">\n <Input value={newKey} onChange={(e) => setNewKey(e.target.value)} placeholder=\"KEY\" className=\"flex-1 text-xs font-mono\" />\n <Input value={newVal} onChange={(e) => setNewVal(e.target.value)} placeholder=\"value\" className=\"flex-1 text-xs font-mono\" onKeyDown={(e) => e.key === 'Enter' && add()} />\n <Button type=\"button\" variant=\"outline\" size=\"icon-sm\" className=\"h-8 w-8 shrink-0\" onClick={add}>\n <Plus className=\"h-3 w-3\" />\n </Button>\n </div>\n )}\n {entries.length === 0 && disabled && <div className=\"text-xs text-muted-foreground\">No environment variables</div>}\n </div>\n )\n}\n\nconst BASE_OPTIONS: Array<{ value: AgentProfileBase; label: string }> = [\n { value: 'host', label: 'Host — full access, relay-aware' },\n { value: 'minimal', label: 'Minimal — relay disabled, repo-scoped' },\n { value: 'isolated', label: 'Isolated — strict isolation' },\n { value: 'vanilla', label: 'Vanilla — zero host bleed (plugins/skills/hooks/MCP/CLAUDE.md off)' },\n]\n\nimport { getKnownProviderIds, getProviderLabel } from '@/lib/provider-display'\n\nconst PROVIDER_OPTIONS: Array<{ value: AgentProfileProvider; label: string }> = [\n { value: 'any', label: 'Any provider' },\n ...getKnownProviderIds().map((id) => ({ value: id, label: getProviderLabel(id) })),\n]\n\nconst CATEGORY_MODE_OPTIONS: Array<{ value: AgentProfileCategoryMode; label: string }> = [\n { value: 'host', label: 'Host — use host config' },\n { value: 'profile', label: 'Profile — use profile config' },\n { value: 'repo', label: 'Repo — use repo config only' },\n { value: 'none', label: 'None — disabled' },\n]\n\nconst FILESYSTEM_OPTIONS: Array<{ value: AgentProfileFilesystemScope; label: string }> = [\n { value: 'host', label: 'Host — full filesystem' },\n { value: 'workspace', label: 'Workspace — working directory tree' },\n { value: 'repo', label: 'Repo — repository root only' },\n]\n\nconst INSTRUCTION_POLICY_OPTIONS: Array<{ value: AgentProfileInstructionPolicy; label: string }> = [\n { value: 'allow', label: 'Allow' },\n { value: 'ignore', label: 'Ignore' },\n]\n\nconst APPROVAL_OPTIONS = [\n { value: '', label: 'Default' },\n { value: 'open', label: 'Open — allow all' },\n { value: 'guarded', label: 'Guarded — prompt for risky' },\n { value: 'read-only', label: 'Read-only' },\n]\n\nconst RELAY_TIPS: Record<'context' | 'skills' | 'plugins' | 'statusLine' | 'mcp', string> = {\n context: \"Injects relay's context preamble each turn (memory + situational awareness).\",\n skills: 'Makes the bundled Agent Relay skills available to the agent.',\n plugins: 'Loads the bundled Agent Relay Claude plugin (session registration, approval hooks).',\n statusLine: 'Enables the relay status-line probe (quota + context-window reporting).',\n mcp: \"Master switch for relay's own MCP tools (relay_* — messaging, memory, spawn, etc.). One of three independent MCP sources, alongside Project MCP (the project's .mcp.json) and MCP Mode (the host's ambient MCP).\",\n}\n\nconst RELAY_LABELS: Record<keyof typeof RELAY_TIPS, string> = {\n context: 'Context',\n skills: 'Skills',\n plugins: 'Plugins',\n statusLine: 'Status Line',\n mcp: 'MCP Tools',\n}\n\nfunction StringListEditor({\n values,\n onChange,\n disabled,\n placeholder,\n}: {\n values: string[]\n onChange: (values: string[]) => void\n disabled?: boolean\n placeholder: string\n}) {\n const [draft, setDraft] = useState('')\n\n function add() {\n const value = draft.trim()\n if (!value) return\n onChange([...values, value])\n setDraft('')\n }\n\n function update(index: number, value: string) {\n onChange(values.map((item, i) => i === index ? value : item))\n }\n\n function remove(index: number) {\n onChange(values.filter((_, i) => i !== index))\n }\n\n return (\n <div className=\"space-y-1.5\">\n {values.map((value, index) => (\n <div key={`${value}-${index}`} className=\"flex items-center gap-1.5\">\n <Input value={value} onChange={(e) => update(index, e.target.value)} disabled={disabled} className=\"flex-1 text-xs\" />\n {!disabled && (\n <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" className=\"h-6 w-6 shrink-0\" onClick={() => remove(index)}>\n <Trash2 className=\"h-3 w-3\" />\n </Button>\n )}\n </div>\n ))}\n {!disabled && (\n <div className=\"flex items-center gap-1.5\">\n <Input value={draft} onChange={(e) => setDraft(e.target.value)} placeholder={placeholder} className=\"flex-1 text-xs\" onKeyDown={(e) => e.key === 'Enter' && add()} />\n <Button type=\"button\" variant=\"outline\" size=\"icon-sm\" className=\"h-8 w-8 shrink-0\" onClick={add}>\n <Plus className=\"h-3 w-3\" />\n </Button>\n </div>\n )}\n {values.length === 0 && disabled && <div className=\"text-xs text-muted-foreground\">None</div>}\n </div>\n )\n}\n\nexport function AgentProfileModal() {\n const { open, mode, profile, relayToolsMode } = useRelayStore((s) => s.profileModal)\n const closeProfileModal = useRelayStore((s) => s.closeProfileModal)\n const updateProfileModal = useRelayStore((s) => s.updateProfileModal)\n const setRelayToolsMode = useRelayStore((s) => s.setRelayToolsMode)\n const toolGroupCatalog = useRelayStore((s) => s.toolGroupCatalog)\n const toolGroupCatalogStatus = useRelayStore((s) => s.toolGroupCatalogStatus)\n const fetchToolGroupCatalog = useRelayStore((s) => s.fetchToolGroupCatalog)\n const saveProfile = useRelayStore((s) => s.saveProfile)\n\n const readOnly = mode === 'view'\n const isCreate = mode === 'create' || mode === 'duplicate'\n\n const title = mode === 'view' ? `Profile: ${profile.name}`\n : mode === 'edit' ? `Edit: ${profile.name}`\n : mode === 'duplicate' ? 'Duplicate Profile'\n : 'Create Profile'\n\n function updateInstructions(partial: Partial<typeof profile.instructions>) {\n updateProfileModal({ instructions: { ...profile.instructions, ...partial } })\n }\n\n function updateRelay(partial: Partial<typeof profile.relay>) {\n updateProfileModal({ relay: { ...profile.relay, ...partial } })\n }\n\n function updateRelayToolGroup(group: string, enabled: boolean) {\n const current = profile.relay.tools?.groups ?? []\n const nextGroups = enabled ? [...new Set([...current, group])] : current.filter((item) => item !== group)\n updateRelay({ tools: nextGroups.length ? { groups: nextGroups } : undefined })\n }\n\n const selectedToolGroups = profile.relay.tools?.groups ?? []\n const totalCatalogTools = toolGroupCatalog.reduce((sum, g) => sum + g.tools.length, 0)\n const showToolGroupsLoading = toolGroupCatalogStatus.loading || (!toolGroupCatalogStatus.loaded && toolGroupCatalog.length === 0)\n const showToolGroupsUnavailable = !showToolGroupsLoading && (Boolean(toolGroupCatalogStatus.error) || toolGroupCatalog.length === 0)\n\n function updateProjectMcp(value: string) {\n updateProfileModal({ projectMcp: policyObject(value) })\n }\n\n function updateProjectSkills(value: string) {\n updateProfileModal({ projectSkills: policyObject(value) })\n }\n\n function updateProjectSettings(value: string) {\n updateProfileModal({ projectSettings: policyObject(value) })\n }\n\n function updateSharedMcp(value: string) {\n updateProfileModal({ sharedMcp: policyObject(value) })\n }\n\n function updatePermissions(partial: Partial<typeof profile.permissions>) {\n updateProfileModal({ permissions: { ...profile.permissions, ...partial } })\n }\n\n function updateCodexToolOutputTokenLimit(value: string) {\n const providerOptions = profile.providerOptions || {}\n const currentCodex = providerOptions.codex && typeof providerOptions.codex === 'object' && !Array.isArray(providerOptions.codex)\n ? providerOptions.codex\n : {}\n const codex = { ...currentCodex }\n if (!value.trim()) delete codex.toolOutputTokenLimit\n else {\n const limit = Number(value)\n if (!Number.isSafeInteger(limit)) return\n codex.toolOutputTokenLimit = limit\n }\n updateProfileModal({ providerOptions: { ...providerOptions, codex } })\n }\n\n function updateMaxSpawnedAgents(value: string) {\n if (!value.trim()) {\n updateProfileModal({ maxSpawnedAgents: undefined })\n return\n }\n const n = Number(value)\n if (!Number.isInteger(n) || n < 0) return\n updateProfileModal({ maxSpawnedAgents: Math.min(n, 100) })\n }\n\n function selectBase(base: AgentProfileBase) {\n const isHost = base === 'host'\n updateProfileModal({\n base,\n relay: { context: isHost, skills: isHost, plugins: isHost, statusLine: isHost, mcp: isHost },\n mcp: { ...profile.mcp, mode: isHost ? 'host' : 'none' },\n hooks: { mode: isHost ? 'host' : 'none' },\n permissions: { ...profile.permissions, filesystem: isHost ? 'host' : 'repo' },\n instructions: { ...profile.instructions, globalInstructions: isHost ? 'allow' : 'ignore' },\n })\n }\n\n const codexOptions = profile.providerOptions?.codex && typeof profile.providerOptions.codex === 'object' && !Array.isArray(profile.providerOptions.codex)\n ? profile.providerOptions.codex\n : {}\n const codexToolOutputTokenLimit = Number.isSafeInteger(codexOptions.toolOutputTokenLimit) ? String(codexOptions.toolOutputTokenLimit) : ''\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o && closeProfileModal()}>\n <DialogContent className=\"max-w-2xl max-h-[90vh] overflow-y-auto\">\n <DialogHeader>\n <DialogTitle className=\"flex items-center gap-2\">\n {title}\n {profile.builtIn && <Badge variant=\"secondary\" className=\"text-[10px]\">Built-in</Badge>}\n </DialogTitle>\n </DialogHeader>\n <div className=\"space-y-3\">\n <Section title=\"General\" defaultOpen>\n <div>\n <Label>Name</Label>\n <Input value={profile.name} onChange={(e) => updateProfileModal({ name: e.target.value })} placeholder=\"my-profile\" disabled={readOnly || mode === 'edit'} />\n </div>\n <div>\n <Label>Description</Label>\n <Input value={profile.description || ''} onChange={(e) => updateProfileModal({ description: e.target.value })} placeholder=\"What this profile configures\" disabled={readOnly} />\n </div>\n <div>\n <LabelWithTip tip=\"Emoji shown across the dashboard wherever an agent on this profile appears (conversation rows, agent cards, chat header). A single emoji; leave blank for a neutral marker.\">Icon</LabelWithTip>\n <div className=\"flex items-center gap-2\">\n <Input value={profile.icon || ''} onChange={(e) => updateProfileModal({ icon: e.target.value })} placeholder=\"🤖\" maxLength={8} disabled={readOnly} className=\"w-24 text-center text-base\" />\n <span className=\"text-2xl leading-none\" aria-hidden>{profile.icon?.trim() || '•'}</span>\n </div>\n </div>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <Label>Base</Label>\n <Select value={profile.base} onChange={(v) => selectBase(v as AgentProfileBase)} options={BASE_OPTIONS} disabled={readOnly} />\n </div>\n <div>\n <Label>Provider</Label>\n <Select value={profile.provider || 'any'} onChange={(v) => updateProfileModal({ provider: v as AgentProfileProvider })} options={PROVIDER_OPTIONS} disabled={readOnly} />\n </div>\n </div>\n </Section>\n\n <Section title=\"Instructions\" defaultOpen={false}>\n <div>\n <Label>System Prompt</Label>\n <Textarea value={profile.instructions.system || ''} onChange={(e) => updateInstructions({ system: e.target.value })} placeholder=\"Custom system prompt...\" rows={3} disabled={readOnly} className=\"font-mono text-xs\" />\n </div>\n <div>\n <Label>Append Instructions</Label>\n <StringListEditor\n values={profile.instructions.append ?? []}\n onChange={(append) => updateInstructions({ append })}\n disabled={readOnly}\n placeholder=\"Append instruction fragment\"\n />\n </div>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <Label>Repo Instructions</Label>\n <Select value={profile.instructions.repoInstructions} onChange={(v) => updateInstructions({ repoInstructions: v as AgentProfileInstructionPolicy })} options={INSTRUCTION_POLICY_OPTIONS} disabled={readOnly} />\n </div>\n <div>\n <Label>Global Instructions</Label>\n <Select value={profile.instructions.globalInstructions} onChange={(v) => updateInstructions({ globalInstructions: v as AgentProfileInstructionPolicy })} options={INSTRUCTION_POLICY_OPTIONS} disabled={readOnly} />\n </div>\n </div>\n </Section>\n\n <Section title=\"Relay Integration\" defaultOpen={false}>\n <p className=\"rounded border border-border bg-muted/20 px-2 py-1.5 text-xs text-muted-foreground\">\n MCP comes from three independent sources — relay (<span className=\"font-medium text-foreground\">MCP Tools</span> below), the project (<span className=\"font-medium text-foreground\">Project MCP</span> in Provisioning Policies), and the host (<span className=\"font-medium text-foreground\">MCP Mode</span> in MCP &amp; Hooks). Toggle each separately and mix freely.\n </p>\n <div className=\"grid grid-cols-2 gap-3\">\n {(['context', 'skills', 'plugins', 'statusLine', 'mcp'] as const).map((key) => (\n <div key={key} className=\"flex items-center justify-between gap-2\">\n <LabelWithTip tip={RELAY_TIPS[key]}>{RELAY_LABELS[key]}</LabelWithTip>\n <Switch checked={profile.relay[key] ?? true} onCheckedChange={(v) => updateRelay({ [key]: v })} disabled={readOnly} />\n </div>\n ))}\n </div>\n <div>\n <LabelWithTip tip=\"Which relay MCP tools this agent can call. Full access grants every tool relay exposes; Custom restricts the agent to only the selected groups. Sourced live from the server's tool-group registry, so it can't drift out of date.\">Relay Tool Groups</LabelWithTip>\n <div className=\"mt-1 flex overflow-hidden rounded-md border border-input text-xs\">\n <button\n type=\"button\"\n className={`flex-1 px-2 py-1.5 font-medium transition-colors ${relayToolsMode === 'full' ? 'bg-primary text-primary-foreground' : 'bg-background hover:bg-accent'}`}\n onClick={() => setRelayToolsMode('full')}\n disabled={readOnly}\n >\n Full access — all tools\n </button>\n <button\n type=\"button\"\n className={`flex-1 border-l border-input px-2 py-1.5 font-medium transition-colors ${relayToolsMode === 'custom' ? 'bg-primary text-primary-foreground' : 'bg-background hover:bg-accent'}`}\n onClick={() => setRelayToolsMode('custom')}\n disabled={readOnly}\n >\n Custom — selected groups\n </button>\n </div>\n {relayToolsMode === 'full' && (\n <p className=\"mt-1.5 text-xs text-muted-foreground\">\n Every relay MCP tool is available — {totalCatalogTools} tools across {toolGroupCatalog.length} groups.\n </p>\n )}\n {relayToolsMode === 'custom' && (\n <>\n {showToolGroupsLoading ? (\n <div className=\"mt-1.5 rounded border border-border bg-muted/20 px-2 py-2 text-xs text-muted-foreground\">\n Loading tool groups…\n </div>\n ) : showToolGroupsUnavailable ? (\n <div className=\"mt-1.5 flex items-center justify-between gap-2 rounded border border-destructive/40 bg-destructive/10 px-2 py-2 text-xs text-destructive\">\n <span>Couldn't load tool groups (is the server up to date?)</span>\n <Button type=\"button\" variant=\"outline\" size=\"sm\" className=\"h-7 gap-1 px-2 text-xs\" onClick={() => void fetchToolGroupCatalog()} disabled={toolGroupCatalogStatus.loading}>\n <RefreshCw className={`h-3 w-3 ${toolGroupCatalogStatus.loading ? 'animate-spin' : ''}`} />\n Retry\n </Button>\n </div>\n ) : (\n <div className=\"mt-1.5 grid grid-cols-2 gap-1.5\">\n {toolGroupCatalog.map((group) => (\n <label key={group.name} className=\"flex items-center gap-1.5 rounded border border-border px-2 py-1 text-xs\">\n <input\n type=\"checkbox\"\n className=\"rounded\"\n checked={selectedToolGroups.includes(group.name)}\n onChange={(e) => updateRelayToolGroup(group.name, e.target.checked)}\n disabled={readOnly}\n />\n <span className=\"flex-1 truncate font-mono\">{group.name}</span>\n <InfoTip>\n <div className=\"font-mono text-[11px] leading-relaxed\">{group.tools.join(', ')}</div>\n </InfoTip>\n </label>\n ))}\n </div>\n )}\n {!showToolGroupsLoading && !showToolGroupsUnavailable && (selectedToolGroups.length === 0 ? (\n <p className=\"mt-1.5 text-xs text-amber-400\">\n No groups selected yet — until you pick at least one, this profile keeps full tool access.\n </p>\n ) : (\n <p className=\"mt-1.5 text-xs text-muted-foreground\">\n {selectedToolGroups.length} of {toolGroupCatalog.length} groups selected.\n </p>\n ))}\n </>\n )}\n </div>\n </Section>\n\n <Section title=\"MCP & Hooks\" defaultOpen={false}>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <LabelWithTip tip=\"The host's ambient MCP servers (your rig's configured MCP). Host = inherit them; None = no host MCP (clean, no bleed). Separate from relay's own MCP and the project's MCP.\">MCP Mode</LabelWithTip>\n <Select value={profile.mcp.mode} onChange={(v) => updateProfileModal({ mcp: { ...profile.mcp, mode: v as AgentProfileCategoryMode } })} options={CATEGORY_MODE_OPTIONS} disabled={readOnly} />\n </div>\n <div>\n <LabelWithTip tip=\"The host's hook configuration. Host = inherit it; None = no host hooks.\">Hooks Mode</LabelWithTip>\n <Select value={profile.hooks.mode} onChange={(v) => updateProfileModal({ hooks: { ...profile.hooks, mode: v as AgentProfileCategoryMode } })} options={CATEGORY_MODE_OPTIONS} disabled={readOnly} />\n </div>\n </div>\n </Section>\n\n <Section title=\"Provisioning Policies\" defaultOpen={false}>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <LabelWithTip tip=\"Injects the MCP servers declared in the spawn directory's project .mcp.json, via relay's controlled config path (survives --strict-mcp-config, no trust modal). All = every declared server. This is the project's MCP source — distinct from relay's MCP Tools and the host's MCP Mode.\">Project MCP</LabelWithTip>\n <Select value={policyValue(profile.projectMcp)} onChange={updateProjectMcp} options={POLICY_OPTIONS} disabled={readOnly} />\n </div>\n <div>\n <LabelWithTip tip=\"Injects skills committed under the project's .claude/skills.\">Project Skills</LabelWithTip>\n <Select value={policyValue(profile.projectSkills)} onChange={updateProjectSkills} options={POLICY_OPTIONS} disabled={readOnly} />\n </div>\n <div>\n <LabelWithTip tip=\"Injects the project's .claude/settings.json (permission/security keys stripped).\">Project Settings</LabelWithTip>\n <Select value={policyValue(profile.projectSettings)} onChange={updateProjectSettings} options={PROJECT_SETTINGS_POLICY_OPTIONS} disabled={readOnly} />\n </div>\n <div>\n <LabelWithTip tip=\"Routes the agent's non-identity MCP through one shared orchestrator listener so the MCP session survives restarts and keeps correct worktree-cwd routing. A transport choice, not a source selector.\">Shared MCP</LabelWithTip>\n <Select value={policyValue(profile.sharedMcp)} onChange={updateSharedMcp} options={POLICY_OPTIONS} disabled={readOnly} />\n </div>\n <div className=\"col-span-2\">\n <LabelWithTip tip=\"How the agent's isolated branch lands: Direct (rebase/FF), Pull request, or the instance default.\">Landing Strategy</LabelWithTip>\n <Select\n value={profile.landingStrategy ?? ''}\n onChange={(v) => updateProfileModal({ landingStrategy: v ? v as 'direct' | 'pr' : undefined })}\n options={LANDING_STRATEGY_OPTIONS}\n disabled={readOnly}\n />\n </div>\n </div>\n </Section>\n\n <Section title=\"Permissions\" defaultOpen={false}>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <Label>Approval Mode</Label>\n <Select value={profile.permissions.mode || ''} onChange={(v) => updatePermissions({ mode: v as any || undefined })} options={APPROVAL_OPTIONS} disabled={readOnly} />\n </div>\n <div>\n <Label>Filesystem Scope</Label>\n <Select value={profile.permissions.filesystem} onChange={(v) => updatePermissions({ filesystem: v as AgentProfileFilesystemScope })} options={FILESYSTEM_OPTIONS} disabled={readOnly} />\n </div>\n </div>\n </Section>\n\n <Section title=\"Spawning\" defaultOpen={false}>\n <div>\n <Label>Spawn Quota</Label>\n <Input\n type=\"number\"\n min={0}\n max={100}\n step={1}\n value={profile.maxSpawnedAgents === undefined ? '' : String(profile.maxSpawnedAgents)}\n onChange={(e) => updateMaxSpawnedAgents(e.target.value)}\n placeholder=\"0\"\n disabled={readOnly}\n />\n <p className=\"mt-1 text-xs text-muted-foreground\">\n Max concurrent live child agents this profile may spawn. Empty or 0 = cannot spawn (default). Children never inherit it (no grandchildren).\n </p>\n </div>\n </Section>\n\n <Section title=\"Environment Variables\" defaultOpen={false}>\n <EnvEditor env={profile.env || {}} onChange={(env) => updateProfileModal({ env })} disabled={readOnly} />\n </Section>\n\n <Section title=\"Registry Capabilities\" defaultOpen={false}>\n <RegistryCapabilitiesSection\n skills={profile.skills ?? []}\n plugins={profile.plugins ?? []}\n hooks={profile.hooks.refs ?? []}\n mcp={profile.mcp}\n onChangeSkills={(skills) => updateProfileModal({ skills })}\n onChangePlugins={(plugins) => updateProfileModal({ plugins })}\n onChangeHooks={(refs) => updateProfileModal({ hooks: { ...profile.hooks, refs } })}\n onChangeMcp={(mcp) => updateProfileModal({ mcp })}\n projectMcp={profile.projectMcp}\n projectSkills={profile.projectSkills}\n projectSettings={profile.projectSettings}\n sharedMcp={profile.sharedMcp}\n readOnly={readOnly}\n />\n </Section>\n\n <Section title=\"Resolved Provisioning\" defaultOpen={mode === 'view'}>\n <ResolvedProvisioningPanel profile={profile} />\n </Section>\n\n <Section title=\"Provider Options\" defaultOpen={false}>\n <div>\n <Label>Codex Tool Output Limit</Label>\n <Input\n type=\"number\"\n min={1000}\n max={200000}\n value={codexToolOutputTokenLimit}\n onChange={(e) => updateCodexToolOutputTokenLimit(e.target.value)}\n placeholder=\"12000\"\n disabled={readOnly}\n />\n </div>\n <Textarea\n value={JSON.stringify(profile.providerOptions || {}, null, 2)}\n onChange={(e) => {\n try { updateProfileModal({ providerOptions: JSON.parse(e.target.value) }) } catch {}\n }}\n rows={3} disabled={readOnly} className=\"font-mono text-xs\"\n placeholder=\"{}\"\n />\n </Section>\n </div>\n {!readOnly && (\n <DialogFooter>\n <Button variant=\"outline\" onClick={closeProfileModal}>Cancel</Button>\n <Button onClick={saveProfile}>{isCreate ? 'Create' : 'Save'}</Button>\n </DialogFooter>\n )}\n </DialogContent>\n </Dialog>\n )\n}\n","import { useEffect, useRef } from 'react'\nimport { useRelayStore } from '@/store'\nimport { useCommandPaletteItems } from '@/hooks/use-selectors'\nimport { Input } from '@/components/ui/input'\nimport * as Icons from 'lucide-react'\n\nexport function CommandPalette() {\n const open = useRelayStore((s) => s.commandPaletteOpen)\n const query = useRelayStore((s) => s.commandQuery)\n const set = useRelayStore((s) => s.set)\n const closeCommandPalette = useRelayStore((s) => s.closeCommandPalette)\n const runCommand = useRelayStore((s) => s.runCommand)\n const items = useCommandPaletteItems()\n const inputRef = useRef<HTMLInputElement>(null)\n\n useEffect(() => {\n if (open) setTimeout(() => inputRef.current?.focus(), 50)\n }, [open])\n\n if (!open) return null\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-start justify-center pt-[15vh]\" onClick={(e) => { if (e.target === e.currentTarget) closeCommandPalette() }}>\n <div className=\"fixed inset-0 bg-black/60\" />\n <div className=\"relative w-full max-w-lg bg-card border border-border rounded-xl shadow-2xl overflow-hidden\">\n <div className=\"p-3 border-b border-border\">\n <Input\n ref={inputRef}\n value={query}\n onChange={(e) => set({ commandQuery: e.target.value })}\n placeholder=\"Type a command...\"\n className=\"border-0 bg-transparent focus-visible:ring-0 text-base\"\n />\n </div>\n <div className=\"max-h-80 overflow-y-auto p-2\">\n {items.map((item) => {\n const Icon = (Icons as unknown as Record<string, typeof Icons.Bot>)[item.icon] || Icons.ChevronRight\n return (\n <button\n key={item.id}\n onClick={() => runCommand(item)}\n className=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg hover:bg-accent text-left transition-colors\"\n >\n <Icon className=\"w-4 h-4 text-muted-foreground shrink-0\" />\n <div className=\"flex-1 min-w-0\">\n <div className=\"text-sm\">{item.title}</div>\n {item.subtitle && <div className=\"text-xs text-muted-foreground truncate\">{item.subtitle}</div>}\n </div>\n </button>\n )\n })}\n {items.length === 0 && <p className=\"text-sm text-muted-foreground text-center py-4\">No matching commands.</p>}\n </div>\n </div>\n </div>\n )\n}\n","import { useRelayStore } from '@/store'\nimport { Menu, Radio } from 'lucide-react'\n\nexport function MobileNav() {\n const set = useRelayStore((s) => s.set)\n const connected = useRelayStore((s) => s.connected)\n\n return (\n <div className=\"xl:hidden shrink-0 sticky top-0 z-30 bg-card border-b border-border px-4 h-[var(--header-h)] flex items-center gap-3\">\n <button\n onClick={() => set({ mobileMenuOpen: true })}\n className=\"p-1 -ml-1 text-muted-foreground hover:text-foreground transition-colors\"\n aria-label=\"Open menu\"\n >\n <Menu className=\"w-5 h-5\" />\n </button>\n <Radio className=\"w-4 h-4 text-primary\" />\n <span className=\"font-bold text-sm\">Agent Relay</span>\n <span className={`ml-auto w-2 h-2 rounded-full ${connected ? 'bg-emerald-500' : 'bg-red-500 animate-pulse'}`} />\n </div>\n )\n}\n","import type { QuotaWindowName } from 'agent-relay-sdk/types'\n\nexport function quotaWindowLabel(name: QuotaWindowName | string): string {\n if (name === 'five_hour') return '5h burst'\n if (name === 'seven_day') return '7-day'\n if (name === 'seven_day_sonnet') return '7-day Sonnet'\n if (name === 'seven_day_opus') return '7-day Opus'\n if (name === 'primary') return 'Primary'\n if (name === 'secondary') return 'Secondary'\n return name\n}\n\nexport function timeUntil(now: number, ts: number | undefined): string {\n if (!ts) return ''\n const diff = Math.max(0, (ts - now) / 1000)\n if (diff < 60) return `${Math.floor(diff)}s`\n if (diff < 3600) return `${Math.floor(diff / 60)}m`\n if (diff < 86400) {\n const h = Math.floor(diff / 3600)\n const m = Math.round((diff % 3600) / 60)\n if (m === 60) return `${h + 1}h`\n return m > 0 ? `${h}h ${m}m` : `${h}h`\n }\n const d = Math.floor(diff / 86400)\n const h = Math.round((diff % 86400) / 3600)\n if (h === 24) return `${d + 1}d`\n return h > 0 ? `${d}d ${h}h` : `${d}d`\n}\n\n// Compact relative \"reset in\" for the mini summary: minutes, rounded hours, then rounded days.\nexport function quotaResetShort(now: number, ts: number | undefined): string {\n if (!ts) return ''\n const secs = Math.max(0, (ts - now) / 1000)\n if (secs < 3600) return `${Math.floor(secs / 60)}m`\n if (secs < 86400) return `${Math.round(secs / 3600)}h`\n return `${(secs / 86400).toFixed(1).replace(/\\.0$/, '')}d`\n}\n","import { useEffect, useMemo, useState } from 'react'\nimport type { ProviderQuotaAdvisory, ProviderQuotaAdvisoryMap, ProviderQuotaBurnWindow, ProviderQuotaConfig, ProviderQuotaConfigMap, ProviderQuotaMatrix, ProviderQuotaRecord, ProviderQuotaSnapshot } from 'agent-relay-sdk/types'\nimport { AlertTriangle, ChevronRight, Clock, Flame, Loader2, Pin, Sparkles } from 'lucide-react'\nimport { ProviderBrandIcon } from './provider-brand-icon'\nimport { api } from '@/lib/api'\nimport { timeAgo } from '@/lib/display'\nimport { quotaResetShort, quotaWindowLabel, timeUntil } from '@/lib/quota'\nimport { useNow, useRelayStore } from '@/store'\n\nconst LS_KEY = 'agent-relay:quota-widget'\nconst POLL_MS = 5 * 60 * 1000\nconst SPARKLINE_DEFAULT_HOURS = 8\n\ntype FetchStatus = 'loading' | 'error' | 'ok'\n\ninterface WidgetState {\n open: boolean\n pinned: boolean\n}\n\n// A provider the orchestrator reports as configured-but-uncollectable (no readable\n// credentials on the host) arrives as a lastError-only record of type 'unavailable'.\n// It's an intentional muted state, not a transient failure — render it quietly and\n// keep it out of the alarming stale/error header badges.\nfunction isUnavailableRecord(record: ProviderQuotaRecord): boolean {\n return !record.quota && record.lastError?.type === 'unavailable'\n}\n\n// The two quota windows surfaced in the collapsed mini summary. Codex names them\n// primary/secondary; Claude names them five_hour/seven_day — same 5h / 7d roles.\nfunction quotaWindowByRole(record: ProviderQuotaRecord, role: '5h' | '7d') {\n const names = role === '5h' ? ['five_hour', 'primary'] : ['seven_day', 'secondary']\n return record.quota?.windows.find((w) => names.includes(w.name))\n}\n\n// Per-provider at-a-glance summary shown inline on the collapsed header (#604):\n// `Provider 23%/2h 17%/2.5d`, or attempt time for error/stale rows (#613).\nfunction ProviderMiniSummary({ record, now, advisory }: { record: ProviderQuotaRecord; now: number; advisory?: ProviderQuotaAdvisory }) {\n const provider = <ProviderBrandIcon provider={record.provider} className=\"w-3.5 h-3.5\" />\n\n\n if (isUnavailableRecord(record)) {\n return (\n <span className=\"flex items-center gap-1 shrink-0 text-muted-foreground\">\n {provider}\n <span className=\"italic\">unavailable</span>\n </span>\n )\n }\n\n if (!record.quota) {\n // Error/rate-limited row with no data yet — attempt time is far more useful than \"unavailable\"\n const attemptLabel = record.lastAttemptAt ? timeAgo(now, record.lastAttemptAt) : ''\n const retryAfterMs = record.lastError?.retryAfterMs\n const retryInSec = retryAfterMs != null\n ? Math.ceil(Math.max(0, (record.lastAttemptAt + retryAfterMs - now) / 1000))\n : null\n return (\n <span className=\"flex items-center gap-1 shrink-0 text-muted-foreground\">\n {provider}\n {attemptLabel && <span>{attemptLabel}</span>}\n {retryInSec != null && retryInSec > 0 && (\n <span className=\"text-amber-400/70\">~{retryInSec}s</span>\n )}\n </span>\n )\n }\n\n const w5 = quotaWindowByRole(record, '5h')\n const w7 = quotaWindowByRole(record, '7d')\n function part(w: typeof w5) {\n if (!w) return null\n const pct = Math.round(w.utilization * 100)\n const reset = quotaResetShort(now, w.resetsAt)\n return <span className=\"tabular-nums\">{pct}%{reset ? `/${reset}` : ''}</span>\n }\n\n // Show attempt time for stale/error rows that have quota data (so retrying is visible)\n const attemptAgo = (record.stale || record.lastError) && record.lastAttemptAt\n ? timeAgo(now, record.lastAttemptAt)\n : ''\n\n return (\n <span className=\"flex items-center gap-1.5 shrink-0 text-foreground/70\">\n {provider}\n <BurnBandDot advisory={advisory} />\n {part(w5)}\n {part(w7)}\n {attemptAgo && <span className=\"text-muted-foreground/70\">{attemptAgo}</span>}\n </span>\n )\n}\n\nfunction loadWidgetState(): WidgetState {\n try {\n const raw = localStorage.getItem(LS_KEY)\n return { open: true, pinned: false, ...(raw ? (JSON.parse(raw) as Partial<WidgetState>) : {}) }\n } catch {\n return { open: true, pinned: false }\n }\n}\n\nfunction saveWidgetState(s: WidgetState) {\n try { localStorage.setItem(LS_KEY, JSON.stringify(s)) } catch {}\n}\n\nexport function ProviderQuotaWidget() {\n const [{ open, pinned }, setWidgetState] = useState<WidgetState>(loadWidgetState)\n const [matrix, setMatrix] = useState<ProviderQuotaMatrix | null>(null)\n const [config, setConfig] = useState<ProviderQuotaConfigMap | null>(null)\n const [advisory, setAdvisory] = useState<ProviderQuotaAdvisoryMap | null>(null)\n const [fetchStatus, setFetchStatus] = useState<FetchStatus>('loading')\n const now = useNow()\n // Gate polling on the live relay connection. /provider-quotas requires auth\n // (agent:read); polling on naked mount races the store's token attachment\n // (setAuthToken runs in init()/saveTokenAndRefresh() before connectSSE()), so an\n // early fetch goes out token-less → 401 → \"unavailable\" until the 5-min retry.\n // `connected` flips true only after the token is attached and the SSE stream is\n // live, so it's a precise \"safe to fetch\" signal that also re-polls on reconnect.\n // `quotaSeq` increments on each `provider-quota.updated` SSE push so the widget\n // picks up server-side changes immediately without waiting for the next interval.\n const connected = useRelayStore((s) => s.connected)\n const quotaSeq = useRelayStore((s) => s.quotaSeq)\n\n useEffect(() => {\n if (!connected) return\n let cancelled = false\n\n async function poll() {\n try {\n // Quota config (#605) drives showInWidget filtering. Fetched alongside the\n // matrix; a config-fetch failure is non-fatal — null means \"show all\".\n // Advisory (#737) is also non-fatal — null means no band badge rendered.\n const [data, cfg, adv] = await Promise.all([\n api<ProviderQuotaMatrix>('GET', '/provider-quotas'),\n api<ProviderQuotaConfigMap>('GET', '/providers/quota-config').catch(() => null),\n api<ProviderQuotaAdvisoryMap>('GET', '/provider-quotas/advisory').catch(() => null),\n ])\n if (!cancelled) {\n setMatrix(data)\n setConfig(cfg)\n setAdvisory(adv)\n setFetchStatus('ok')\n }\n } catch {\n if (!cancelled) setFetchStatus('error')\n }\n }\n\n void poll()\n const timer = setInterval(() => void poll(), POLL_MS)\n return () => { cancelled = true; clearInterval(timer) }\n }, [connected, quotaSeq])\n\n const isExpanded = open || pinned\n // showInWidget=false hides a provider from the widget (#605) while collection\n // continues. Unset/unknown providers default to shown (config null → show all).\n const visibleQuotas = (matrix?.quotas ?? []).filter((r) => config?.[r.provider]?.showInWidget !== false)\n const hasAnyStale = visibleQuotas.some((r) => r.stale && !isUnavailableRecord(r))\n const hasAnyError = visibleQuotas.some((r) => r.lastError && !isUnavailableRecord(r))\n\n function toggle() {\n if (pinned) return\n const next = { open: !open, pinned }\n setWidgetState(next)\n saveWidgetState(next)\n }\n\n function handlePinClick() {\n const next: WidgetState = pinned ? { open, pinned: false } : { open: true, pinned: true }\n setWidgetState(next)\n saveWidgetState(next)\n }\n\n return (\n <div className=\"shrink-0 border-b border-border\">\n <div className=\"w-full flex items-center gap-2 px-4 py-2 text-xs hover:bg-muted/30 transition-colors\">\n <button\n type=\"button\"\n onClick={toggle}\n aria-expanded={isExpanded}\n className=\"min-w-0 flex flex-1 items-center gap-2 text-left\"\n >\n <ChevronRight className={`w-3.5 h-3.5 shrink-0 text-muted-foreground transition-transform ${isExpanded ? 'rotate-90' : ''}`} />\n {/* Minimized on mobile, the title hogs horizontal room the quotas need (#632) —\n hide it below `sm` when collapsed; always show it when expanded. */}\n <span className={`font-semibold text-foreground/80 shrink-0 ${isExpanded ? '' : 'hidden sm:inline'}`}>Provider Quotas</span>\n {fetchStatus === 'loading' && (\n <Loader2 className=\"w-3 h-3 text-muted-foreground animate-spin\" />\n )}\n {fetchStatus === 'error' && (\n <span className=\"text-amber-400 text-[10px]\">● unavailable</span>\n )}\n {/* Collapsed: inline per-provider mini summary fills the empty header space (#604).\n Wraps instead of clipping so both providers stay readable on a ~375px phone (#632). */}\n {!isExpanded && fetchStatus === 'ok' && visibleQuotas.length > 0 && (\n <div className=\"flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-0.5 text-[10px]\">\n {visibleQuotas.map((record) => (\n <ProviderMiniSummary\n key={`${record.provider}:${record.accountKey}`}\n record={record}\n now={now}\n advisory={advisory?.advisories[record.provider]}\n />\n ))}\n </div>\n )}\n {/* Expanded: aggregate badges (per-provider state is visible in the body / mini). */}\n {isExpanded && hasAnyStale && <span className=\"text-amber-400 text-[10px]\">● stale</span>}\n {isExpanded && hasAnyError && <span className=\"text-red-400 text-[10px]\">● error</span>}\n </button>\n <button\n type=\"button\"\n onClick={handlePinClick}\n aria-pressed={pinned}\n title={pinned ? 'Unpin' : 'Pin always-on'}\n className={`p-0.5 rounded hover:bg-muted transition-colors ${pinned ? 'text-primary' : 'text-muted-foreground/50 hover:text-muted-foreground'}`}\n >\n <Pin className=\"w-3 h-3\" />\n </button>\n </div>\n\n {isExpanded && (\n <div className=\"px-4 py-3\">\n {fetchStatus === 'loading' && (\n <p className=\"text-xs text-muted-foreground flex items-center gap-1.5\">\n <Loader2 className=\"w-3 h-3 animate-spin\" />\n Loading quota data…\n </p>\n )}\n {fetchStatus === 'error' && (\n <p className=\"text-xs text-muted-foreground\">\n Quota data unavailable — check that you are authenticated and the server is reachable.\n </p>\n )}\n {fetchStatus === 'ok' && matrix !== null && visibleQuotas.length === 0 && (\n <p className=\"text-xs text-muted-foreground\">No quota data yet — waiting for runner to report.</p>\n )}\n {fetchStatus === 'ok' && matrix !== null && visibleQuotas.length > 0 && (\n <div className=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\n {visibleQuotas.map((record) => {\n const provCfg = config?.[record.provider]\n const sparklineCfg = {\n enabled: provCfg?.sparklineEnabled ?? true,\n rangeHours: provCfg?.sparklineRangeHours ?? SPARKLINE_DEFAULT_HOURS,\n }\n return (\n <QuotaRecordCard\n key={`${record.provider}:${record.accountKey}`}\n record={record}\n now={now}\n advisory={advisory?.advisories[record.provider]}\n sparklineCfg={sparklineCfg}\n />\n )\n })}\n </div>\n )}\n </div>\n )}\n </div>\n )\n}\n\n// #737 — shared visual vocabulary for the escalating burn bands. Each band maps\n// to a colour, a badge treatment, a leading icon, and a dot colour so the badge,\n// the mini-summary dot, and the burn line all speak the same language. The icon\n// is what makes a band badge read as a *quota* signal rather than the plain-text\n// fetch-error badge ('err'/'429') it can sit beside (#737 polish point 2).\nconst BURN_BAND_STYLE = {\n // #760 — \"prefer\" is the underburn (good) band: green, route large/deferrable work here.\n prefer: { icon: Sparkles, badge: 'text-emerald-400 bg-emerald-500/10 border-emerald-500/20', dot: 'bg-emerald-400' },\n caution: { icon: Flame, badge: 'text-amber-400 bg-amber-500/10 border-amber-500/20', dot: 'bg-amber-400' },\n 'avoid-large': { icon: Flame, badge: 'text-orange-400 bg-orange-500/10 border-orange-500/20', dot: 'bg-orange-400' },\n 'hard-avoid': { icon: AlertTriangle, badge: 'text-red-400 bg-red-500/10 border-red-500/20', dot: 'bg-red-400' },\n} as const\n\n// #737 — band badge for the burn advisory. \"normal\" renders nothing to avoid\n// cluttering healthy cards; the badge only appears when action may be warranted.\n// A leading icon (Flame → AlertTriangle) types it as a quota signal, distinct from\n// the icon-less error badge beside it. #827 — util-based routing-avoid uses\n// \"at capacity\" (AlertTriangle), not \"blocked\", to distinguish it from an\n// evidence-based rate-limit hold (HTTP 429).\nfunction BurnBandBadge({ advisory }: { advisory: ProviderQuotaAdvisory | undefined }) {\n if (!advisory) return null\n if (advisory.blockedNow) {\n return (\n <span className=\"inline-flex items-center gap-0.5 text-[9px] font-medium text-red-400 bg-red-500/10 border border-red-500/20 rounded px-1 py-0.5 shrink-0\">\n <AlertTriangle className=\"w-2.5 h-2.5\" />\n at capacity\n </span>\n )\n }\n const band = advisory.quotaPenaltyBand\n if (band === 'normal') return null\n const style = BURN_BAND_STYLE[band]\n const Icon = style.icon\n return (\n <span className={`inline-flex items-center gap-0.5 text-[9px] font-medium ${style.badge} border rounded px-1 py-0.5 shrink-0`}>\n <Icon className=\"w-2.5 h-2.5\" />\n {band}\n </span>\n )\n}\n\n// #737 — tiny band dot for the collapsed mini-summary (polish point 5): a single\n// burn signal in the otherwise number-only header row. Nothing for normal/no data.\nfunction BurnBandDot({ advisory }: { advisory: ProviderQuotaAdvisory | undefined }) {\n if (!advisory) return null\n if (advisory.blockedNow) {\n return <span className=\"inline-block w-1.5 h-1.5 rounded-full bg-red-500 shrink-0\" title=\"at capacity\" />\n }\n const band = advisory.quotaPenaltyBand\n if (band === 'normal') return null\n return <span className={`inline-block w-1.5 h-1.5 rounded-full ${BURN_BAND_STYLE[band].dot} shrink-0`} title={band} />\n}\n\n// #737 — one-line burn summary for a single quota window. Returns null when there\n// is no high-confidence ratio to show; the low-confidence \"still building history\"\n// state is rendered separately by <BurnLine> with its own monitoring affordance.\nfunction burnWindowSummary(burnWindow: ProviderQuotaBurnWindow | undefined, now: number): string | null {\n if (!burnWindow || burnWindow.confidence === 'low' || burnWindow.burnRatio === null) return null\n const ratio = burnWindow.burnRatio.toFixed(1)\n if (!burnWindow.earlyWallMs || burnWindow.earlyWallMs <= 0) return `${ratio}× rate`\n return `${ratio}× · ~${timeUntil(now, now + burnWindow.earlyWallMs)} before reset`\n}\n\n// #737 — the per-window burn line under the progress bar. A leading Flame anchors\n// the burn-rate text so it's scannable on otherwise-healthy cards (polish point 1).\n// Low confidence reads as an active \"monitoring, no history yet\" state (Clock),\n// not a hard \"data unavailable\" (polish point 4).\nfunction BurnLine({ burnWindow, now }: { burnWindow: ProviderQuotaBurnWindow | undefined; now: number }) {\n if (!burnWindow) return null\n if (burnWindow.confidence === 'low' || burnWindow.burnRatio === null) {\n return (\n <div className=\"flex items-center gap-1 text-[9px] text-muted-foreground/50\">\n <Clock className=\"w-2.5 h-2.5 shrink-0\" />\n <span className=\"italic\">building burn history…</span>\n </div>\n )\n }\n const summary = burnWindowSummary(burnWindow, now)\n if (!summary) return null\n return (\n <div className=\"flex items-center gap-1 text-[9px] text-muted-foreground/70 tabular-nums\">\n <Flame className=\"w-2.5 h-2.5 shrink-0\" />\n <span>{summary}</span>\n </div>\n )\n}\n\n// #608 — minimal per-provider sparkline showing utilization over the configured lookback\n// window. Renders as an inline SVG polyline — no chart library dependency for this glanceable\n// indicator. The component fetches its own history from the quota history API on mount.\nfunction QuotaSparkline({ provider, windowName, rangeHours }: { provider: string; windowName: string; rangeHours: number }) {\n const [points, setPoints] = useState<Array<{ t: number; v: number }>>([])\n const now = useNow()\n\n useEffect(() => {\n let cancelled = false\n const sinceMs = Date.now() - rangeHours * 3_600_000\n void api<ProviderQuotaSnapshot[]>('GET', `/provider-quotas/history?provider=${encodeURIComponent(provider)}&sinceMs=${sinceMs}&limit=500`)\n .then((snapshots) => {\n if (cancelled) return\n const series = snapshots\n .filter((s): s is ProviderQuotaSnapshot & { quota: NonNullable<ProviderQuotaSnapshot['quota']> } => Boolean(s.quota))\n .map((s) => {\n const w = s.quota.windows.find((w) => w.name === windowName)\n return w ? { t: s.capturedAt, v: w.utilization } : null\n })\n .filter(Boolean) as Array<{ t: number; v: number }>\n setPoints(series)\n })\n .catch(() => {})\n return () => { cancelled = true }\n }, [provider, windowName, rangeHours])\n\n const svgPoints = useMemo(() => {\n if (points.length < 2) return null\n const W = 120\n const H = 24\n const PAD = 1\n const minT = points[0]!.t\n const maxT = points[points.length - 1]!.t\n const spanT = maxT - minT || 1\n const coords = points.map((p) => {\n const x = PAD + ((p.t - minT) / spanT) * (W - 2 * PAD)\n const y = PAD + (1 - p.v) * (H - 2 * PAD)\n return `${x.toFixed(1)},${y.toFixed(1)}`\n })\n return coords.join(' ')\n }, [points])\n\n if (!svgPoints) return null\n\n const lastUtil = points.length > 0 ? Math.round(points[points.length - 1]!.v * 100) : 0\n const color = lastUtil >= 90 ? '#ef4444' : lastUtil >= 70 ? '#f59e0b' : '#10b981'\n\n return (\n <div className=\"flex items-center gap-1.5\">\n <svg width={120} height={24} viewBox=\"0 0 120 24\" className=\"shrink-0\">\n <polyline\n points={svgPoints}\n fill=\"none\"\n stroke={color}\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n opacity={0.8}\n />\n </svg>\n <span className=\"text-[9px] text-muted-foreground tabular-nums\">{rangeHours}h</span>\n </div>\n )\n}\n\nfunction QuotaRecordCard({ record, now, advisory, sparklineCfg }: { record: ProviderQuotaRecord; now: number; advisory?: ProviderQuotaAdvisory; sparklineCfg?: { enabled: boolean; rangeHours: number } }) {\n const { provider, accountKey, quota, stale, lastError, lastUpdatedAt, lastAttemptAt } = record\n\n // Configured-but-uncollectable provider: a muted, non-alarming \"unavailable\" row\n // that keeps the provider visible with its reason instead of dropping it.\n if (isUnavailableRecord(record)) {\n return (\n <div className=\"rounded border border-border bg-muted/20 p-3 space-y-1.5 opacity-70\">\n <div className=\"flex items-center gap-1.5 min-w-0\">\n <ProviderBrandIcon provider={provider} className=\"w-3.5 h-3.5 text-muted-foreground\" />\n <span className=\"text-[9px] font-medium text-muted-foreground bg-muted border border-border rounded px-1 py-0.5 shrink-0\">\n unavailable\n </span>\n </div>\n <p className=\"text-[10px] text-muted-foreground\">\n Quota unavailable — {lastError?.message ?? 'no readable credentials'}\n </p>\n </div>\n )\n }\n\n // Retry-after countdown for 429 rows (#613)\n const retryAfterMs = lastError?.retryAfterMs\n const retryInMs = retryAfterMs != null ? Math.max(0, lastAttemptAt + retryAfterMs - now) : null\n const retryInSec = retryInMs != null ? Math.ceil(retryInMs / 1000) : null\n const showAttempt = (stale || !!lastError) && lastAttemptAt > 0\n\n const borderColor = lastError\n ? 'border-red-500/30'\n : stale\n ? 'border-amber-500/30'\n : 'border-border'\n\n return (\n <div className={`rounded border ${borderColor} bg-card p-3 space-y-2`}>\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex items-center gap-1.5 min-w-0\">\n <ProviderBrandIcon provider={provider} className=\"w-3.5 h-3.5\" />\n <span className=\"text-[10px] text-muted-foreground font-mono truncate\">{accountKey}</span>\n </div>\n <div className=\"flex items-center gap-1 shrink-0\">\n <BurnBandBadge advisory={advisory} />\n {stale && (\n <span className=\"text-[9px] font-medium text-amber-400 bg-amber-500/10 border border-amber-500/20 rounded px-1 py-0.5\">\n stale\n </span>\n )}\n {lastError && (\n <span\n className=\"text-[9px] font-medium text-red-400 bg-red-500/10 border border-red-500/20 rounded px-1 py-0.5\"\n title={lastError.message}\n >\n {lastError.type === 'rate_limited' ? '429' : 'err'}\n </span>\n )}\n </div>\n </div>\n\n {quota ? (\n <div className=\"space-y-1.5\">\n {quota.windows.map((w) => {\n const pct = Math.round(w.utilization * 100)\n const tone = pct >= 90 ? 'bg-red-500' : pct >= 70 ? 'bg-amber-500' : 'bg-emerald-500'\n const resetLabel = w.resetsAt ? timeUntil(now, w.resetsAt) : ''\n const burnWindow = record.burn?.windows.find((bw) => bw.name === w.name)\n return (\n <div key={w.name} className=\"space-y-0.5\">\n <div className=\"flex justify-between text-[10px] text-muted-foreground\">\n <span>{quotaWindowLabel(w.name)}</span>\n <span>\n {pct}%\n {resetLabel ? ` · resets in ${resetLabel}` : ''}\n </span>\n </div>\n <div className=\"h-1.5 rounded-full bg-muted overflow-hidden\">\n <div\n className={`h-full ${tone} transition-all duration-500`}\n style={{ width: `${Math.max(0, Math.min(100, pct))}%` }}\n />\n </div>\n <BurnLine burnWindow={burnWindow} now={now} />\n {sparklineCfg?.enabled && (\n <QuotaSparkline\n provider={record.provider}\n windowName={w.name}\n rangeHours={sparklineCfg.rangeHours}\n />\n )}\n </div>\n )\n })}\n </div>\n ) : (\n <p className=\"text-[10px] text-muted-foreground italic\">\n {lastError ? lastError.message : 'No quota data'}\n </p>\n )}\n\n {/* Timeline footer (#613): attempt time on failing rows makes retrying vs stalled obvious */}\n <div className=\"flex items-start justify-between gap-2 text-[10px] text-muted-foreground/60\">\n <div className=\"space-y-0.5 min-w-0\">\n {showAttempt && <div>Attempted {timeAgo(now, lastAttemptAt)}</div>}\n <div>{lastUpdatedAt ? `Updated ${timeAgo(now, lastUpdatedAt)}` : 'Never updated'}</div>\n </div>\n {retryInSec != null && (\n <span className=\"text-amber-400/70 shrink-0 mt-0.5\">\n {retryInSec > 0\n ? `retry in ~${retryInSec > 60 ? `${Math.ceil(retryInSec / 60)}m` : `${retryInSec}s`}`\n : 'retrying…'}\n </span>\n )}\n </div>\n </div>\n )\n}\n","import { Component, Suspense, lazy, useEffect, type ComponentType, type ReactNode, type ErrorInfo } from 'react'\nimport { useRelayStore } from './store'\nimport { applyTheme } from '@/lib/themes'\nimport { importWithRetry, isChunkLoadError } from '@/lib/chunk-reload'\nimport { TooltipProvider } from '@/components/ui/tooltip'\nimport { Sidebar, MobileDrawer } from '@/components/layout/sidebar'\n// FilesView + FileOverlay stay static: FileOverlay is always mounted (not\n// view-gated), so a lazy() would fire its import on app load anyway. Its heavy\n// deps still split out of the initial bundle — shiki via its own dynamic import,\n// react-markdown via the markdown-preview wrapper.\nimport { FilesView, FileOverlay } from '@/components/views/files'\n// Views are code-split (#201): each loads as its own hashed chunk on first\n// navigation, keeping the initial bundle small. Heavy deps ride their view's\n// chunk — ApexCharts with analytics, react-markdown with chat/messages, etc.\n// lazyRetry wraps the import so a stale chunk (deploy deleted the old hash while\n// this tab still references it) self-heals with a one-shot reload instead of a\n// dead \"Failed to fetch dynamically imported module\" page — see lib/chunk-reload.\nfunction lazyRetry<T extends ComponentType<unknown>>(factory: () => Promise<{ default: T }>) {\n return lazy(() => importWithRetry(factory))\n}\nconst OverviewView = lazyRetry(() => import('@/components/views/overview').then((m) => ({ default: m.OverviewView })))\nconst ChatView = lazyRetry(() => import('@/components/views/chat').then((m) => ({ default: m.ChatView })))\nconst AgentsView = lazyRetry(() => import('@/components/views/agents').then((m) => ({ default: m.AgentsView })))\nconst ManagedAgentsView = lazyRetry(() => import('@/components/views/managed-agents').then((m) => ({ default: m.ManagedAgentsView })))\nconst TeamsView = lazyRetry(() => import('@/components/views/teams').then((m) => ({ default: m.TeamsView })))\nconst AgentProfilesView = lazyRetry(() => import('@/components/views/agent-profiles').then((m) => ({ default: m.AgentProfilesView })))\nconst OrchestratorsView = lazyRetry(() => import('@/components/views/orchestrators').then((m) => ({ default: m.OrchestratorsView })))\nconst WorkspacesView = lazyRetry(() => import('@/components/views/workspaces').then((m) => ({ default: m.WorkspacesView })))\nconst ChannelsView = lazyRetry(() => import('@/components/views/channels').then((m) => ({ default: m.ChannelsView })))\nconst ConnectorsView = lazyRetry(() => import('@/components/views/connectors').then((m) => ({ default: m.ConnectorsView })))\nconst IntegrationsView = lazyRetry(() => import('@/components/views/integrations').then((m) => ({ default: m.IntegrationsView })))\nconst SecurityView = lazyRetry(() => import('@/components/views/security').then((m) => ({ default: m.SecurityView })))\nconst MemoryView = lazyRetry(() => import('@/components/views/memory').then((m) => ({ default: m.MemoryView })))\nconst ActivityView = lazyRetry(() => import('@/components/views/activity').then((m) => ({ default: m.ActivityView })))\nconst PairsView = lazyRetry(() => import('@/components/views/pairs').then((m) => ({ default: m.PairsView })))\nconst MessagesView = lazyRetry(() => import('@/components/views/messages').then((m) => ({ default: m.MessagesView })))\nconst WorkQueueView = lazyRetry(() => import('@/components/views/work-queue').then((m) => ({ default: m.WorkQueueView })))\nconst TasksView = lazyRetry(() => import('@/components/views/tasks').then((m) => ({ default: m.TasksView })))\nconst AutomationView = lazyRetry(() => import('@/components/views/automation').then((m) => ({ default: m.AutomationView })))\nconst AnalyticsView = lazyRetry(() => import('@/components/views/analytics').then((m) => ({ default: m.AnalyticsView })))\nconst InsightsView = lazyRetry(() => import('@/components/views/insights').then((m) => ({ default: m.InsightsView })))\nconst ProjectsView = lazyRetry(() => import('@/components/views/projects').then((m) => ({ default: m.ProjectsView })))\nconst PromptSettingsView = lazyRetry(() => import('@/components/views/prompt-settings').then((m) => ({ default: m.PromptSettingsView })))\nconst RegistryView = lazyRetry(() => import('@/components/views/registry').then((m) => ({ default: m.RegistryView })))\nconst MaintenanceView = lazyRetry(() => import('@/components/views/maintenance').then((m) => ({ default: m.MaintenanceView })))\nconst SettingsView = lazyRetry(() => import('@/components/views/settings').then((m) => ({ default: m.SettingsView })))\nimport { AgentDetailDrawer } from '@/components/drawers/agent-detail-drawer'\nimport { ChannelDetailDrawer } from '@/components/drawers/channel-detail-drawer'\nimport { TaskDetailDrawer } from '@/components/drawers/task-detail-drawer'\nimport { ComposeModal } from '@/components/modals/compose-modal'\nimport { ConfirmModal } from '@/components/modals/confirm-modal'\nimport { ErrorModal } from '@/components/modals/error-modal'\nimport { RenameModal } from '@/components/modals/rename-modal'\nimport { PairInviteModal } from '@/components/modals/pair-invite-modal'\nimport { PairMessageModal } from '@/components/modals/pair-message-modal'\nimport { ThreadModal } from '@/components/modals/thread-modal'\nimport { TaskEventsModal } from '@/components/modals/task-events-modal'\nimport { TaskCreateModal } from '@/components/modals/task-create-modal'\nimport { OrchestratorSpawnModal } from '@/components/modals/orchestrator-spawn-modal'\nimport { OrchestratorInstallModal } from '@/components/modals/orchestrator-install-modal'\nimport { ManagedPolicyModal } from '@/components/modals/managed-policy-modal'\nimport { AgentProfileModal } from '@/components/modals/agent-profile-modal'\nimport { CommandPalette } from '@/components/command-palette'\nimport { MobileNav } from '@/components/layout/mobile-nav'\nimport { ProviderQuotaWidget } from '@/components/shared/provider-quota-widget'\nimport { Input } from '@/components/ui/input'\nimport { Button } from '@/components/ui/button'\nimport { Lock } from 'lucide-react'\nimport type { ViewName } from '@/types'\n\nclass ErrorBoundary extends Component<{ children: ReactNode }, { error: Error | null }> {\n override state: { error: Error | null } = { error: null }\n static getDerivedStateFromError(error: Error) { return { error } }\n override componentDidCatch(error: Error, info: ErrorInfo) {\n console.error('[ErrorBoundary]', error.message, '\\n', info.componentStack)\n }\n override render() {\n if (this.state.error) {\n // A stale code-split chunk (a deploy deleted the hash this tab still holds)\n // can't be cleared by re-rendering the same dead lazy ref — only a full\n // reload re-bootstraps with the current shell. lib/chunk-reload normally\n // auto-reloads; if its guard blocked a loop the error lands here, so offer\n // a real reload rather than the no-op setState retry.\n if (isChunkLoadError(this.state.error)) {\n return (\n <div className=\"p-6 text-sm\">\n <h2 className=\"text-foreground text-lg mb-2\">A new version was deployed</h2>\n <p className=\"text-muted-foreground mb-4\">Reload to pick up the latest dashboard.</p>\n <button className=\"px-3 py-1 bg-primary text-primary-foreground rounded text-sm\" onClick={() => window.location.reload()}>Reload</button>\n </div>\n )\n }\n return (\n <div className=\"p-6 text-sm font-mono whitespace-pre-wrap\">\n <h2 className=\"text-red-400 text-lg mb-2\">Dashboard Error</h2>\n <p className=\"text-foreground mb-4\">{this.state.error.message}</p>\n <pre className=\"text-muted-foreground text-xs overflow-auto\">{this.state.error.stack}</pre>\n <button className=\"mt-4 px-3 py-1 bg-zinc-700 rounded text-sm\" onClick={() => this.setState({ error: null })}>Retry</button>\n </div>\n )\n }\n return this.props.children\n }\n}\n\nconst views: Record<ViewName, React.ComponentType> = {\n overview: OverviewView,\n chat: ChatView,\n agents: AgentsView,\n managed: ManagedAgentsView,\n teams: TeamsView,\n profiles: AgentProfilesView,\n orchestrators: OrchestratorsView,\n workspaces: WorkspacesView,\n files: FilesView,\n channels: ChannelsView,\n connectors: ConnectorsView,\n integrations: IntegrationsView,\n security: SecurityView,\n memory: MemoryView,\n activity: ActivityView,\n pairs: PairsView,\n messages: MessagesView,\n work: WorkQueueView,\n tasks: TasksView,\n automation: AutomationView,\n analytics: AnalyticsView,\n insights: InsightsView,\n projects: ProjectsView,\n prompts: PromptSettingsView,\n registry: RegistryView,\n maintenance: MaintenanceView,\n settings: SettingsView,\n}\n\n// Mobile: top of screen (below the sticky header) so it never covers the chat\n// input box. Desktop (xl): bottom-right as before.\nconst TOAST_POS = 'fixed z-50 top-[calc(var(--header-h,3rem)+0.5rem)] inset-x-3 xl:inset-x-auto xl:top-auto xl:bottom-4 xl:right-4 xl:max-w-sm animate-in fade-in slide-in-from-top-2 xl:slide-in-from-bottom-2 duration-200'\n\n// Shown while a code-split view chunk loads on first navigation. Deliberately\n// minimal — most chunks resolve in a frame or two on a warm connection.\nfunction ViewLoading() {\n return (\n <div className=\"flex items-center justify-center py-16 text-muted-foreground text-sm\">\n <span className=\"inline-block w-3 h-3 mr-2 rounded-full bg-muted-foreground/60 animate-pulse\" />\n Loading…\n </div>\n )\n}\n\nfunction Toast() {\n const notification = useRelayStore((s) => s.notification)\n const toastNotification = useRelayStore((s) => s.toastNotification)\n const openNotification = useRelayStore((s) => s.openNotification)\n const dismissToast = useRelayStore((s) => s.dismissToast)\n\n // Actionable relay notification (chat message, reply, approval): tap routes to\n // the chat thread / agent it refers to via openNotification.\n if (toastNotification) {\n const n = toastNotification\n return (\n <div className={`${TOAST_POS} flex items-start gap-2 px-4 py-3 bg-zinc-800 text-zinc-100 text-sm rounded-md shadow-lg border border-zinc-700`}>\n <button type=\"button\" onClick={() => { void openNotification(n); dismissToast() }} className=\"flex-1 min-w-0 text-left cursor-pointer\">\n <div className=\"font-medium truncate\">{n.title}</div>\n <div className=\"text-xs text-zinc-300 line-clamp-2 mt-0.5\">{n.body}</div>\n <div className=\"text-[10px] uppercase tracking-wide text-zinc-400 mt-1\">Tap to open</div>\n </button>\n <button type=\"button\" onClick={dismissToast} aria-label=\"Dismiss\" className=\"shrink-0 -mr-1 -mt-1 px-1 text-lg leading-none text-zinc-400 hover:text-zinc-100\">×</button>\n </div>\n )\n }\n if (!notification) return null\n return (\n <div className={`${TOAST_POS} px-4 py-2 bg-zinc-800 text-zinc-100 text-sm rounded-md shadow-lg border border-zinc-700`}>\n {notification}\n </div>\n )\n}\n\nexport function App() {\n const init = useRelayStore((s) => s.init)\n const destroy = useRelayStore((s) => s.destroy)\n const theme = useRelayStore((s) => s.theme)\n const view = useRelayStore((s) => s.view)\n const authNeeded = useRelayStore((s) => s.authNeeded)\n const connectionError = useRelayStore((s) => s.connectionError)\n const authToken = useRelayStore((s) => s.authToken)\n const set = useRelayStore((s) => s.set)\n const saveTokenAndRefresh = useRelayStore((s) => s.saveTokenAndRefresh)\n const openCommandPalette = useRelayStore((s) => s.openCommandPalette)\n const commandPaletteOpen = useRelayStore((s) => s.commandPaletteOpen)\n const closeCommandPalette = useRelayStore((s) => s.closeCommandPalette)\n\n useEffect(() => {\n applyTheme(theme)\n }, [theme])\n\n useEffect(() => {\n init()\n return () => destroy()\n }, [])\n\n useEffect(() => {\n function handleKeyDown(e: KeyboardEvent) {\n if ((e.metaKey || e.ctrlKey) && e.key?.toLowerCase() === 'k') {\n e.preventDefault()\n openCommandPalette()\n } else if (e.key === 'Escape' && commandPaletteOpen) {\n e.preventDefault()\n closeCommandPalette()\n }\n }\n window.addEventListener('keydown', handleKeyDown)\n return () => window.removeEventListener('keydown', handleKeyDown)\n }, [commandPaletteOpen])\n\n const ViewComponent = views[view] || OverviewView\n\n return (\n <ErrorBoundary>\n <TooltipProvider>\n <div className=\"flex min-h-[calc(100dvh-var(--sat))] mt-[var(--sat)]\">\n <Sidebar />\n <MobileDrawer />\n\n {/* min-w-0: without it a flex item defaults to min-width:auto, so wide view content\n (e.g. the Insights observations table) pushes main past the viewport instead of\n scrolling inside its own overflow-x container — horizontal page overflow on iPad. */}\n {/* flex-col so the view region can flex-fill the height left after the\n (variable-height) Provider Quotas widget and auth bars. Non-chat views keep\n their own viewport-calc scroll and just sit in an auto-height wrapper that\n main scrolls; the chat view alone opts into flex-fill (it has a bottom-pinned\n composer that must never be pushed off-screen — #602). */}\n <main className=\"flex-1 min-w-0 h-[calc(100dvh-var(--sat))] flex flex-col overflow-y-auto\">\n <MobileNav />\n\n {!authNeeded && connectionError && (\n <div className=\"shrink-0 flex items-center gap-2 p-3 bg-amber-950/40 border-b border-amber-800/60 text-amber-200 text-sm\">\n <span className=\"inline-block w-2 h-2 rounded-full bg-amber-400 animate-pulse\" />\n Relay unreachable — showing last known data. Reconnecting…\n </div>\n )}\n\n {authNeeded && (\n <div className=\"shrink-0 flex items-center gap-2 p-3 bg-card border-b border-border\">\n <Lock className=\"w-4 h-4 text-muted-foreground\" />\n <Input\n type=\"password\"\n placeholder=\"Relay token...\"\n value={authToken}\n onChange={(e) => set({ authToken: e.target.value })}\n onKeyDown={(e) => e.key === 'Enter' && saveTokenAndRefresh()}\n className=\"max-w-xs h-8\"\n />\n <Button size=\"sm\" onClick={saveTokenAndRefresh}>Connect</Button>\n </div>\n )}\n\n <ProviderQuotaWidget />\n\n <div className={view === 'chat' ? 'flex min-h-0 flex-1 flex-col' : 'p-4 md:p-6'}>\n <Suspense fallback={<ViewLoading />}>\n <ViewComponent />\n </Suspense>\n </div>\n </main>\n\n <AgentDetailDrawer />\n <ChannelDetailDrawer />\n <TaskDetailDrawer />\n <ComposeModal />\n <ConfirmModal />\n <ErrorModal />\n <RenameModal />\n <PairInviteModal />\n <PairMessageModal />\n <ThreadModal />\n <TaskEventsModal />\n <TaskCreateModal />\n <OrchestratorSpawnModal />\n <OrchestratorInstallModal />\n <ManagedPolicyModal />\n <AgentProfileModal />\n <FileOverlay />\n <CommandPalette />\n <Toast />\n </div>\n </TooltipProvider>\n </ErrorBoundary>\n )\n}\n","import { StrictMode } from 'react'\nimport { createRoot } from 'react-dom/client'\nimport { App } from './App'\nimport './app.css'\n\ncreateRoot(document.getElementById('root')!).render(\n <StrictMode>\n <App />\n </StrictMode>,\n)\n\nif ('serviceWorker' in navigator) {\n const swUrl = new URL('sw.js', window.location.href)\n const scopeUrl = new URL('.', swUrl)\n const legacyRootScope = new URL('/', window.location.origin)\n const legacyRootScript = new URL('sw.js', legacyRootScope)\n\n if (scopeUrl.href !== legacyRootScope.href) {\n navigator.serviceWorker.getRegistration(legacyRootScope.pathname)\n .then((registration) => {\n if (registration?.scope === legacyRootScope.href && registration.active?.scriptURL === legacyRootScript.href) {\n void registration.unregister()\n }\n })\n .catch(() => {})\n }\n\n navigator.serviceWorker.register(swUrl.toString(), { scope: scopeUrl.pathname }).catch(() => {})\n}\n"],"file":"index-DnUo0Zqg.js"}