codexui-android 0.1.95 → 0.1.96

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 (696) hide show
  1. package/dist/assets/{ReviewPane-D1nOf7-W.js → ReviewPane-CUrlR8zS.js} +1 -1
  2. package/dist/assets/{SkillsHub-BpqR2Yu5.js → SkillsHub-BxltnLjE.js} +1 -1
  3. package/dist/assets/{ThreadConversation-DgJc2aJG.js → ThreadConversation-BNvqi1ws.js} +1 -1
  4. package/dist/assets/{ThreadTerminalPanel-Dy-oA46U.js → ThreadTerminalPanel-DjP4TSjB.js} +1 -1
  5. package/dist/assets/index-Bqk3qCGk.js +64 -0
  6. package/dist/assets/{index-Dj8HigAf.css → index-CfRa3ma1.css} +1 -1
  7. package/dist/index.html +2 -2
  8. package/dist-cli/index.js +52 -67
  9. package/dist-cli/index.js.map +1 -1
  10. package/package.json +2 -3
  11. package/dist/assets/index-HcEz2bUL.js +0 -64
  12. package/vendor/node_modules/nan/.github/workflows/ci.yml +0 -52
  13. package/vendor/node_modules/nan/.pre-commit-config.yaml +0 -8
  14. package/vendor/node_modules/nan/CHANGELOG.md +0 -599
  15. package/vendor/node_modules/nan/CMakeLists.txt +0 -138
  16. package/vendor/node_modules/nan/LICENSE.md +0 -9
  17. package/vendor/node_modules/nan/README.md +0 -456
  18. package/vendor/node_modules/nan/doc/asyncworker.md +0 -146
  19. package/vendor/node_modules/nan/doc/buffers.md +0 -54
  20. package/vendor/node_modules/nan/doc/callback.md +0 -76
  21. package/vendor/node_modules/nan/doc/converters.md +0 -41
  22. package/vendor/node_modules/nan/doc/errors.md +0 -226
  23. package/vendor/node_modules/nan/doc/json.md +0 -62
  24. package/vendor/node_modules/nan/doc/maybe_types.md +0 -583
  25. package/vendor/node_modules/nan/doc/methods.md +0 -689
  26. package/vendor/node_modules/nan/doc/new.md +0 -147
  27. package/vendor/node_modules/nan/doc/node_misc.md +0 -123
  28. package/vendor/node_modules/nan/doc/object_wrappers.md +0 -263
  29. package/vendor/node_modules/nan/doc/persistent.md +0 -296
  30. package/vendor/node_modules/nan/doc/scopes.md +0 -73
  31. package/vendor/node_modules/nan/doc/script.md +0 -58
  32. package/vendor/node_modules/nan/doc/string_bytes.md +0 -81
  33. package/vendor/node_modules/nan/doc/v8_internals.md +0 -199
  34. package/vendor/node_modules/nan/doc/v8_misc.md +0 -85
  35. package/vendor/node_modules/nan/include_dirs.js +0 -1
  36. package/vendor/node_modules/nan/nan.h +0 -3202
  37. package/vendor/node_modules/nan/nan_callbacks.h +0 -141
  38. package/vendor/node_modules/nan/nan_callbacks_12_inl.h +0 -690
  39. package/vendor/node_modules/nan/nan_callbacks_pre_12_inl.h +0 -524
  40. package/vendor/node_modules/nan/nan_converters.h +0 -72
  41. package/vendor/node_modules/nan/nan_converters_43_inl.h +0 -68
  42. package/vendor/node_modules/nan/nan_converters_pre_43_inl.h +0 -42
  43. package/vendor/node_modules/nan/nan_define_own_property_helper.h +0 -29
  44. package/vendor/node_modules/nan/nan_implementation_12_inl.h +0 -430
  45. package/vendor/node_modules/nan/nan_implementation_pre_12_inl.h +0 -263
  46. package/vendor/node_modules/nan/nan_json.h +0 -166
  47. package/vendor/node_modules/nan/nan_maybe_43_inl.h +0 -360
  48. package/vendor/node_modules/nan/nan_maybe_pre_43_inl.h +0 -268
  49. package/vendor/node_modules/nan/nan_new.h +0 -340
  50. package/vendor/node_modules/nan/nan_object_wrap.h +0 -156
  51. package/vendor/node_modules/nan/nan_persistent_12_inl.h +0 -132
  52. package/vendor/node_modules/nan/nan_persistent_pre_12_inl.h +0 -242
  53. package/vendor/node_modules/nan/nan_private.h +0 -73
  54. package/vendor/node_modules/nan/nan_scriptorigin.h +0 -97
  55. package/vendor/node_modules/nan/nan_string_bytes.h +0 -305
  56. package/vendor/node_modules/nan/nan_typedarray_contents.h +0 -96
  57. package/vendor/node_modules/nan/nan_weak.h +0 -453
  58. package/vendor/node_modules/nan/package.json +0 -38
  59. package/vendor/node_modules/nan/tools/1to2.js +0 -412
  60. package/vendor/node_modules/nan/tools/README.md +0 -14
  61. package/vendor/node_modules/nan/tools/package.json +0 -19
  62. package/vendor/node_modules/node-addon-api/LICENSE.md +0 -9
  63. package/vendor/node_modules/node-addon-api/README.md +0 -319
  64. package/vendor/node_modules/node-addon-api/common.gypi +0 -20
  65. package/vendor/node_modules/node-addon-api/except.gypi +0 -25
  66. package/vendor/node_modules/node-addon-api/index.js +0 -12
  67. package/vendor/node_modules/node-addon-api/napi-inl.deprecated.h +0 -186
  68. package/vendor/node_modules/node-addon-api/napi-inl.h +0 -6607
  69. package/vendor/node_modules/node-addon-api/napi.h +0 -3201
  70. package/vendor/node_modules/node-addon-api/node_addon_api.gyp +0 -32
  71. package/vendor/node_modules/node-addon-api/node_api.gyp +0 -9
  72. package/vendor/node_modules/node-addon-api/noexcept.gypi +0 -26
  73. package/vendor/node_modules/node-addon-api/nothing.c +0 -0
  74. package/vendor/node_modules/node-addon-api/package-support.json +0 -21
  75. package/vendor/node_modules/node-addon-api/package.json +0 -480
  76. package/vendor/node_modules/node-addon-api/tools/README.md +0 -73
  77. package/vendor/node_modules/node-addon-api/tools/check-napi.js +0 -99
  78. package/vendor/node_modules/node-addon-api/tools/clang-format.js +0 -71
  79. package/vendor/node_modules/node-addon-api/tools/conversion.js +0 -301
  80. package/vendor/node_modules/node-addon-api/tools/eslint-format.js +0 -79
  81. package/vendor/node_modules/node-pty/LICENSE +0 -69
  82. package/vendor/node_modules/node-pty/README.md +0 -165
  83. package/vendor/node_modules/node-pty/binding.gyp +0 -111
  84. package/vendor/node_modules/node-pty/deps/.editorconfig +0 -2
  85. package/vendor/node_modules/node-pty/deps/winpty/.drone.yml +0 -17
  86. package/vendor/node_modules/node-pty/deps/winpty/.gitattributes +0 -19
  87. package/vendor/node_modules/node-pty/deps/winpty/LICENSE +0 -21
  88. package/vendor/node_modules/node-pty/deps/winpty/Makefile +0 -166
  89. package/vendor/node_modules/node-pty/deps/winpty/README.md +0 -151
  90. package/vendor/node_modules/node-pty/deps/winpty/RELEASES.md +0 -280
  91. package/vendor/node_modules/node-pty/deps/winpty/VERSION.txt +0 -1
  92. package/vendor/node_modules/node-pty/deps/winpty/configure +0 -167
  93. package/vendor/node_modules/node-pty/deps/winpty/misc/BufferResizeTests.cc +0 -90
  94. package/vendor/node_modules/node-pty/deps/winpty/misc/ChangeScreenBuffer.cc +0 -53
  95. package/vendor/node_modules/node-pty/deps/winpty/misc/ClearConsole.cc +0 -72
  96. package/vendor/node_modules/node-pty/deps/winpty/misc/ConinMode.cc +0 -117
  97. package/vendor/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
  98. package/vendor/node_modules/node-pty/deps/winpty/misc/ConoutMode.cc +0 -113
  99. package/vendor/node_modules/node-pty/deps/winpty/misc/DebugClient.py +0 -42
  100. package/vendor/node_modules/node-pty/deps/winpty/misc/DebugServer.py +0 -63
  101. package/vendor/node_modules/node-pty/deps/winpty/misc/DumpLines.py +0 -5
  102. package/vendor/node_modules/node-pty/deps/winpty/misc/EnableExtendedFlags.txt +0 -46
  103. package/vendor/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +0 -528
  104. package/vendor/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +0 -633
  105. package/vendor/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP932.txt +0 -630
  106. package/vendor/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP936.txt +0 -630
  107. package/vendor/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP949.txt +0 -630
  108. package/vendor/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP950.txt +0 -630
  109. package/vendor/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +0 -16
  110. package/vendor/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt +0 -4
  111. package/vendor/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +0 -144
  112. package/vendor/node_modules/node-pty/deps/winpty/misc/FontSurvey.cc +0 -100
  113. package/vendor/node_modules/node-pty/deps/winpty/misc/FormatChar.h +0 -21
  114. package/vendor/node_modules/node-pty/deps/winpty/misc/FreezePerfTest.cc +0 -62
  115. package/vendor/node_modules/node-pty/deps/winpty/misc/GetCh.cc +0 -20
  116. package/vendor/node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc +0 -41
  117. package/vendor/node_modules/node-pty/deps/winpty/misc/GetFont.cc +0 -261
  118. package/vendor/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
  119. package/vendor/node_modules/node-pty/deps/winpty/misc/IsNewConsole.cc +0 -87
  120. package/vendor/node_modules/node-pty/deps/winpty/misc/MouseInputNotes.txt +0 -90
  121. package/vendor/node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc +0 -34
  122. package/vendor/node_modules/node-pty/deps/winpty/misc/Notes.txt +0 -219
  123. package/vendor/node_modules/node-pty/deps/winpty/misc/OSVersion.cc +0 -27
  124. package/vendor/node_modules/node-pty/deps/winpty/misc/ScreenBufferFreezeInactive.cc +0 -101
  125. package/vendor/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest.cc +0 -671
  126. package/vendor/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest2.cc +0 -151
  127. package/vendor/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +0 -45
  128. package/vendor/node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc +0 -32
  129. package/vendor/node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc +0 -10
  130. package/vendor/node_modules/node-pty/deps/winpty/misc/SetFont.cc +0 -145
  131. package/vendor/node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc +0 -36
  132. package/vendor/node_modules/node-pty/deps/winpty/misc/ShowArgv.cc +0 -12
  133. package/vendor/node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc +0 -40
  134. package/vendor/node_modules/node-pty/deps/winpty/misc/Spew.py +0 -5
  135. package/vendor/node_modules/node-pty/deps/winpty/misc/TestUtil.cc +0 -172
  136. package/vendor/node_modules/node-pty/deps/winpty/misc/UnicodeDoubleWidthTest.cc +0 -102
  137. package/vendor/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest1.cc +0 -246
  138. package/vendor/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest2.cc +0 -130
  139. package/vendor/node_modules/node-pty/deps/winpty/misc/UnixEcho.cc +0 -89
  140. package/vendor/node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc +0 -46
  141. package/vendor/node_modules/node-pty/deps/winpty/misc/VeryLargeRead.cc +0 -122
  142. package/vendor/node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc +0 -56
  143. package/vendor/node_modules/node-pty/deps/winpty/misc/Win10ResizeWhileFrozen.cc +0 -52
  144. package/vendor/node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc +0 -57
  145. package/vendor/node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc +0 -30
  146. package/vendor/node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc +0 -26
  147. package/vendor/node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc +0 -19
  148. package/vendor/node_modules/node-pty/deps/winpty/misc/Win32Test1.cc +0 -46
  149. package/vendor/node_modules/node-pty/deps/winpty/misc/Win32Test2.cc +0 -70
  150. package/vendor/node_modules/node-pty/deps/winpty/misc/Win32Test3.cc +0 -78
  151. package/vendor/node_modules/node-pty/deps/winpty/misc/Win32Write1.cc +0 -44
  152. package/vendor/node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc +0 -27
  153. package/vendor/node_modules/node-pty/deps/winpty/misc/WriteConsole.cc +0 -106
  154. package/vendor/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
  155. package/vendor/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
  156. package/vendor/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
  157. package/vendor/node_modules/node-pty/deps/winpty/misc/font-notes.txt +0 -300
  158. package/vendor/node_modules/node-pty/deps/winpty/misc/winbug-15048.cc +0 -201
  159. package/vendor/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
  160. package/vendor/node_modules/node-pty/deps/winpty/ship/common_ship.py +0 -53
  161. package/vendor/node_modules/node-pty/deps/winpty/ship/make_msvc_package.py +0 -165
  162. package/vendor/node_modules/node-pty/deps/winpty/ship/ship.py +0 -108
  163. package/vendor/node_modules/node-pty/deps/winpty/src/agent/Agent.cc +0 -613
  164. package/vendor/node_modules/node-pty/deps/winpty/src/agent/Agent.h +0 -103
  165. package/vendor/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.cc +0 -84
  166. package/vendor/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h +0 -28
  167. package/vendor/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.cc +0 -632
  168. package/vendor/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h +0 -28
  169. package/vendor/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.cc +0 -852
  170. package/vendor/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.h +0 -109
  171. package/vendor/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.cc +0 -121
  172. package/vendor/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h +0 -36
  173. package/vendor/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.cc +0 -152
  174. package/vendor/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h +0 -41
  175. package/vendor/node_modules/node-pty/deps/winpty/src/agent/Coord.h +0 -87
  176. package/vendor/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.cc +0 -239
  177. package/vendor/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h +0 -32
  178. package/vendor/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.cc +0 -422
  179. package/vendor/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h +0 -28
  180. package/vendor/node_modules/node-pty/deps/winpty/src/agent/DsrSender.h +0 -30
  181. package/vendor/node_modules/node-pty/deps/winpty/src/agent/EventLoop.cc +0 -99
  182. package/vendor/node_modules/node-pty/deps/winpty/src/agent/EventLoop.h +0 -47
  183. package/vendor/node_modules/node-pty/deps/winpty/src/agent/InputMap.cc +0 -246
  184. package/vendor/node_modules/node-pty/deps/winpty/src/agent/InputMap.h +0 -114
  185. package/vendor/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.cc +0 -71
  186. package/vendor/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.h +0 -68
  187. package/vendor/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.cc +0 -378
  188. package/vendor/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.h +0 -125
  189. package/vendor/node_modules/node-pty/deps/winpty/src/agent/Scraper.cc +0 -699
  190. package/vendor/node_modules/node-pty/deps/winpty/src/agent/Scraper.h +0 -103
  191. package/vendor/node_modules/node-pty/deps/winpty/src/agent/SimplePool.h +0 -75
  192. package/vendor/node_modules/node-pty/deps/winpty/src/agent/SmallRect.h +0 -143
  193. package/vendor/node_modules/node-pty/deps/winpty/src/agent/Terminal.cc +0 -535
  194. package/vendor/node_modules/node-pty/deps/winpty/src/agent/Terminal.h +0 -69
  195. package/vendor/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncoding.h +0 -157
  196. package/vendor/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncodingTest.cc +0 -189
  197. package/vendor/node_modules/node-pty/deps/winpty/src/agent/Win32Console.cc +0 -107
  198. package/vendor/node_modules/node-pty/deps/winpty/src/agent/Win32Console.h +0 -67
  199. package/vendor/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.cc +0 -193
  200. package/vendor/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.h +0 -99
  201. package/vendor/node_modules/node-pty/deps/winpty/src/agent/main.cc +0 -114
  202. package/vendor/node_modules/node-pty/deps/winpty/src/agent/subdir.mk +0 -61
  203. package/vendor/node_modules/node-pty/deps/winpty/src/configurations.gypi +0 -60
  204. package/vendor/node_modules/node-pty/deps/winpty/src/debugserver/DebugServer.cc +0 -117
  205. package/vendor/node_modules/node-pty/deps/winpty/src/debugserver/subdir.mk +0 -41
  206. package/vendor/node_modules/node-pty/deps/winpty/src/include/winpty.h +0 -242
  207. package/vendor/node_modules/node-pty/deps/winpty/src/include/winpty_constants.h +0 -131
  208. package/vendor/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.cc +0 -75
  209. package/vendor/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h +0 -28
  210. package/vendor/node_modules/node-pty/deps/winpty/src/libwinpty/LibWinptyException.h +0 -54
  211. package/vendor/node_modules/node-pty/deps/winpty/src/libwinpty/WinptyInternal.h +0 -72
  212. package/vendor/node_modules/node-pty/deps/winpty/src/libwinpty/subdir.mk +0 -46
  213. package/vendor/node_modules/node-pty/deps/winpty/src/libwinpty/winpty.cc +0 -970
  214. package/vendor/node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h +0 -38
  215. package/vendor/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.cc +0 -122
  216. package/vendor/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.h +0 -73
  217. package/vendor/node_modules/node-pty/deps/winpty/src/shared/Buffer.cc +0 -103
  218. package/vendor/node_modules/node-pty/deps/winpty/src/shared/Buffer.h +0 -102
  219. package/vendor/node_modules/node-pty/deps/winpty/src/shared/DebugClient.cc +0 -187
  220. package/vendor/node_modules/node-pty/deps/winpty/src/shared/DebugClient.h +0 -38
  221. package/vendor/node_modules/node-pty/deps/winpty/src/shared/GenRandom.cc +0 -138
  222. package/vendor/node_modules/node-pty/deps/winpty/src/shared/GenRandom.h +0 -55
  223. package/vendor/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
  224. package/vendor/node_modules/node-pty/deps/winpty/src/shared/Mutex.h +0 -54
  225. package/vendor/node_modules/node-pty/deps/winpty/src/shared/OsModule.h +0 -63
  226. package/vendor/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc +0 -36
  227. package/vendor/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.h +0 -45
  228. package/vendor/node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h +0 -43
  229. package/vendor/node_modules/node-pty/deps/winpty/src/shared/StringBuilder.h +0 -227
  230. package/vendor/node_modules/node-pty/deps/winpty/src/shared/StringBuilderTest.cc +0 -114
  231. package/vendor/node_modules/node-pty/deps/winpty/src/shared/StringUtil.cc +0 -55
  232. package/vendor/node_modules/node-pty/deps/winpty/src/shared/StringUtil.h +0 -80
  233. package/vendor/node_modules/node-pty/deps/winpty/src/shared/TimeMeasurement.h +0 -63
  234. package/vendor/node_modules/node-pty/deps/winpty/src/shared/UnixCtrlChars.h +0 -45
  235. package/vendor/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
  236. package/vendor/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.cc +0 -460
  237. package/vendor/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.h +0 -104
  238. package/vendor/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.cc +0 -252
  239. package/vendor/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h +0 -29
  240. package/vendor/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.cc +0 -55
  241. package/vendor/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.h +0 -64
  242. package/vendor/node_modules/node-pty/deps/winpty/src/shared/WinptyException.cc +0 -57
  243. package/vendor/node_modules/node-pty/deps/winpty/src/shared/WinptyException.h +0 -43
  244. package/vendor/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.cc +0 -42
  245. package/vendor/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h +0 -27
  246. package/vendor/node_modules/node-pty/deps/winpty/src/shared/winpty_snprintf.h +0 -99
  247. package/vendor/node_modules/node-pty/deps/winpty/src/subdir.mk +0 -5
  248. package/vendor/node_modules/node-pty/deps/winpty/src/tests/subdir.mk +0 -28
  249. package/vendor/node_modules/node-pty/deps/winpty/src/tests/trivial_test.cc +0 -158
  250. package/vendor/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.cc +0 -114
  251. package/vendor/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.h +0 -56
  252. package/vendor/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.cc +0 -80
  253. package/vendor/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.h +0 -53
  254. package/vendor/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.cc +0 -86
  255. package/vendor/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h +0 -31
  256. package/vendor/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.cc +0 -70
  257. package/vendor/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.h +0 -42
  258. package/vendor/node_modules/node-pty/deps/winpty/src/unix-adapter/main.cc +0 -729
  259. package/vendor/node_modules/node-pty/deps/winpty/src/unix-adapter/subdir.mk +0 -41
  260. package/vendor/node_modules/node-pty/deps/winpty/src/winpty.gyp +0 -234
  261. package/vendor/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
  262. package/vendor/node_modules/node-pty/lib/conpty_console_list_agent.js +0 -16
  263. package/vendor/node_modules/node-pty/lib/conpty_console_list_agent.js.map +0 -1
  264. package/vendor/node_modules/node-pty/lib/eventEmitter2.js +0 -47
  265. package/vendor/node_modules/node-pty/lib/eventEmitter2.js.map +0 -1
  266. package/vendor/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
  267. package/vendor/node_modules/node-pty/lib/eventEmitter2.test.js.map +0 -1
  268. package/vendor/node_modules/node-pty/lib/index.js +0 -52
  269. package/vendor/node_modules/node-pty/lib/index.js.map +0 -1
  270. package/vendor/node_modules/node-pty/lib/interfaces.js +0 -7
  271. package/vendor/node_modules/node-pty/lib/interfaces.js.map +0 -1
  272. package/vendor/node_modules/node-pty/lib/shared/conout.js +0 -11
  273. package/vendor/node_modules/node-pty/lib/shared/conout.js.map +0 -1
  274. package/vendor/node_modules/node-pty/lib/terminal.js +0 -190
  275. package/vendor/node_modules/node-pty/lib/terminal.js.map +0 -1
  276. package/vendor/node_modules/node-pty/lib/terminal.test.js +0 -139
  277. package/vendor/node_modules/node-pty/lib/terminal.test.js.map +0 -1
  278. package/vendor/node_modules/node-pty/lib/testUtils.test.js +0 -28
  279. package/vendor/node_modules/node-pty/lib/testUtils.test.js.map +0 -1
  280. package/vendor/node_modules/node-pty/lib/types.js +0 -7
  281. package/vendor/node_modules/node-pty/lib/types.js.map +0 -1
  282. package/vendor/node_modules/node-pty/lib/unixTerminal.js +0 -346
  283. package/vendor/node_modules/node-pty/lib/unixTerminal.js.map +0 -1
  284. package/vendor/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
  285. package/vendor/node_modules/node-pty/lib/unixTerminal.test.js.map +0 -1
  286. package/vendor/node_modules/node-pty/lib/utils.js +0 -39
  287. package/vendor/node_modules/node-pty/lib/utils.js.map +0 -1
  288. package/vendor/node_modules/node-pty/lib/windowsConoutConnection.js +0 -125
  289. package/vendor/node_modules/node-pty/lib/windowsConoutConnection.js.map +0 -1
  290. package/vendor/node_modules/node-pty/lib/windowsPtyAgent.js +0 -320
  291. package/vendor/node_modules/node-pty/lib/windowsPtyAgent.js.map +0 -1
  292. package/vendor/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
  293. package/vendor/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +0 -1
  294. package/vendor/node_modules/node-pty/lib/windowsTerminal.js +0 -199
  295. package/vendor/node_modules/node-pty/lib/windowsTerminal.js.map +0 -1
  296. package/vendor/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
  297. package/vendor/node_modules/node-pty/lib/windowsTerminal.test.js.map +0 -1
  298. package/vendor/node_modules/node-pty/lib/worker/conoutSocketWorker.js +0 -22
  299. package/vendor/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +0 -1
  300. package/vendor/node_modules/node-pty/package.json +0 -64
  301. package/vendor/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
  302. package/vendor/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
  303. package/vendor/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
  304. package/vendor/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
  305. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
  306. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
  307. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
  308. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
  309. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
  310. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
  311. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/pty.node +0 -0
  312. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/pty.pdb +0 -0
  313. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
  314. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.pdb +0 -0
  315. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
  316. package/vendor/node_modules/node-pty/prebuilds/win32-arm64/winpty.pdb +0 -0
  317. package/vendor/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
  318. package/vendor/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
  319. package/vendor/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
  320. package/vendor/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
  321. package/vendor/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
  322. package/vendor/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
  323. package/vendor/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
  324. package/vendor/node_modules/node-pty/prebuilds/win32-x64/pty.pdb +0 -0
  325. package/vendor/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
  326. package/vendor/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.pdb +0 -0
  327. package/vendor/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
  328. package/vendor/node_modules/node-pty/prebuilds/win32-x64/winpty.pdb +0 -0
  329. package/vendor/node_modules/node-pty/scripts/gen-compile-commands.js +0 -8
  330. package/vendor/node_modules/node-pty/scripts/increment-version.js +0 -54
  331. package/vendor/node_modules/node-pty/scripts/post-install.js +0 -80
  332. package/vendor/node_modules/node-pty/scripts/prebuild.js +0 -34
  333. package/vendor/node_modules/node-pty/src/conpty_console_list_agent.ts +0 -15
  334. package/vendor/node_modules/node-pty/src/eventEmitter2.test.ts +0 -30
  335. package/vendor/node_modules/node-pty/src/eventEmitter2.ts +0 -48
  336. package/vendor/node_modules/node-pty/src/index.ts +0 -52
  337. package/vendor/node_modules/node-pty/src/interfaces.ts +0 -130
  338. package/vendor/node_modules/node-pty/src/native.d.ts +0 -54
  339. package/vendor/node_modules/node-pty/src/shared/conout.ts +0 -15
  340. package/vendor/node_modules/node-pty/src/terminal.test.ts +0 -119
  341. package/vendor/node_modules/node-pty/src/terminal.ts +0 -211
  342. package/vendor/node_modules/node-pty/src/testUtils.test.ts +0 -23
  343. package/vendor/node_modules/node-pty/src/tsconfig.json +0 -22
  344. package/vendor/node_modules/node-pty/src/types.ts +0 -15
  345. package/vendor/node_modules/node-pty/src/unix/pty.cc +0 -799
  346. package/vendor/node_modules/node-pty/src/unix/spawn-helper.cc +0 -23
  347. package/vendor/node_modules/node-pty/src/unixTerminal.test.ts +0 -367
  348. package/vendor/node_modules/node-pty/src/unixTerminal.ts +0 -388
  349. package/vendor/node_modules/node-pty/src/utils.ts +0 -29
  350. package/vendor/node_modules/node-pty/src/win/conpty.cc +0 -583
  351. package/vendor/node_modules/node-pty/src/win/conpty.h +0 -41
  352. package/vendor/node_modules/node-pty/src/win/conpty_console_list.cc +0 -44
  353. package/vendor/node_modules/node-pty/src/win/path_util.cc +0 -95
  354. package/vendor/node_modules/node-pty/src/win/path_util.h +0 -26
  355. package/vendor/node_modules/node-pty/src/win/winpty.cc +0 -333
  356. package/vendor/node_modules/node-pty/src/windowsConoutConnection.ts +0 -82
  357. package/vendor/node_modules/node-pty/src/windowsPtyAgent.test.ts +0 -94
  358. package/vendor/node_modules/node-pty/src/windowsPtyAgent.ts +0 -321
  359. package/vendor/node_modules/node-pty/src/windowsTerminal.test.ts +0 -229
  360. package/vendor/node_modules/node-pty/src/windowsTerminal.ts +0 -203
  361. package/vendor/node_modules/node-pty/src/worker/conoutSocketWorker.ts +0 -22
  362. package/vendor/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
  363. package/vendor/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/conpty.dll +0 -0
  364. package/vendor/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
  365. package/vendor/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
  366. package/vendor/node_modules/node-pty/typings/node-pty.d.ts +0 -211
  367. package/vendor/node_modules/node-pty-prebuilt-multiarch/LICENSE +0 -69
  368. package/vendor/node_modules/node-pty-prebuilt-multiarch/README.md +0 -39
  369. package/vendor/node_modules/node-pty-prebuilt-multiarch/binding.gyp +0 -78
  370. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/.editorconfig +0 -2
  371. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/.drone.yml +0 -17
  372. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/.gitattributes +0 -19
  373. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/LICENSE +0 -21
  374. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/Makefile +0 -166
  375. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/README.md +0 -151
  376. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/RELEASES.md +0 -280
  377. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/VERSION.txt +0 -1
  378. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/configure +0 -167
  379. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/BufferResizeTests.cc +0 -90
  380. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/ChangeScreenBuffer.cc +0 -53
  381. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/ClearConsole.cc +0 -72
  382. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/ConinMode.cc +0 -117
  383. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/ConinMode.ps1 +0 -116
  384. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/ConoutMode.cc +0 -113
  385. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/DebugClient.py +0 -42
  386. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/DebugServer.py +0 -63
  387. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/DumpLines.py +0 -5
  388. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/EnableExtendedFlags.txt +0 -46
  389. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +0 -528
  390. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +0 -633
  391. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Font-Report-June2016/CP932.txt +0 -630
  392. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Font-Report-June2016/CP936.txt +0 -630
  393. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Font-Report-June2016/CP949.txt +0 -630
  394. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Font-Report-June2016/CP950.txt +0 -630
  395. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +0 -16
  396. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Font-Report-June2016/Results.txt +0 -4
  397. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +0 -144
  398. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/FontSurvey.cc +0 -100
  399. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/FormatChar.h +0 -21
  400. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/FreezePerfTest.cc +0 -62
  401. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/GetCh.cc +0 -20
  402. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/GetConsolePos.cc +0 -41
  403. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/GetFont.cc +0 -261
  404. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
  405. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/IsNewConsole.cc +0 -87
  406. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/MouseInputNotes.txt +0 -90
  407. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/MoveConsoleWindow.cc +0 -34
  408. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Notes.txt +0 -219
  409. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/OSVersion.cc +0 -27
  410. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/ScreenBufferFreezeInactive.cc +0 -101
  411. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/ScreenBufferTest.cc +0 -671
  412. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/ScreenBufferTest2.cc +0 -151
  413. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/SelectAllTest.cc +0 -45
  414. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/SetBufferSize.cc +0 -32
  415. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/SetCursorPos.cc +0 -10
  416. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/SetFont.cc +0 -145
  417. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/SetWindowRect.cc +0 -36
  418. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/ShowArgv.cc +0 -12
  419. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/ShowConsoleInput.cc +0 -40
  420. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Spew.py +0 -5
  421. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/TestUtil.cc +0 -172
  422. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/UnicodeDoubleWidthTest.cc +0 -102
  423. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/UnicodeWideTest1.cc +0 -246
  424. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/UnicodeWideTest2.cc +0 -130
  425. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/UnixEcho.cc +0 -89
  426. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Utf16Echo.cc +0 -46
  427. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/VeryLargeRead.cc +0 -122
  428. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/VkEscapeTest.cc +0 -56
  429. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Win10ResizeWhileFrozen.cc +0 -52
  430. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Win10WrapTest1.cc +0 -57
  431. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Win10WrapTest2.cc +0 -30
  432. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Win32Echo1.cc +0 -26
  433. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Win32Echo2.cc +0 -19
  434. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Win32Test1.cc +0 -46
  435. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Win32Test2.cc +0 -70
  436. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Win32Test3.cc +0 -78
  437. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/Win32Write1.cc +0 -44
  438. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/WindowsBugCrashReader.cc +0 -27
  439. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/WriteConsole.cc +0 -106
  440. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/build32.sh +0 -9
  441. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/build64.sh +0 -9
  442. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/color-test.sh +0 -212
  443. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/font-notes.txt +0 -300
  444. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/misc/winbug-15048.cc +0 -201
  445. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
  446. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/ship/common_ship.py +0 -53
  447. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/ship/make_msvc_package.py +0 -165
  448. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/ship/ship.py +0 -108
  449. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/Agent.cc +0 -605
  450. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/Agent.h +0 -103
  451. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/AgentCreateDesktop.cc +0 -84
  452. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/AgentCreateDesktop.h +0 -28
  453. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/ConsoleFont.cc +0 -632
  454. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/ConsoleFont.h +0 -28
  455. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/ConsoleInput.cc +0 -852
  456. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/ConsoleInput.h +0 -109
  457. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/ConsoleInputReencoding.cc +0 -121
  458. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/ConsoleInputReencoding.h +0 -36
  459. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/ConsoleLine.cc +0 -152
  460. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/ConsoleLine.h +0 -41
  461. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/Coord.h +0 -87
  462. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/DebugShowInput.cc +0 -239
  463. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/DebugShowInput.h +0 -32
  464. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/DefaultInputMap.cc +0 -422
  465. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/DefaultInputMap.h +0 -28
  466. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/DsrSender.h +0 -30
  467. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/EventLoop.cc +0 -99
  468. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/EventLoop.h +0 -47
  469. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/InputMap.cc +0 -246
  470. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/InputMap.h +0 -114
  471. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/LargeConsoleRead.cc +0 -71
  472. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/LargeConsoleRead.h +0 -68
  473. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/NamedPipe.cc +0 -378
  474. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/NamedPipe.h +0 -125
  475. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/Scraper.cc +0 -699
  476. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/Scraper.h +0 -103
  477. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/SimplePool.h +0 -75
  478. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/SmallRect.h +0 -143
  479. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/Terminal.cc +0 -535
  480. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/Terminal.h +0 -69
  481. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/UnicodeEncoding.h +0 -157
  482. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/UnicodeEncodingTest.cc +0 -189
  483. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/Win32Console.cc +0 -107
  484. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/Win32Console.h +0 -67
  485. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/Win32ConsoleBuffer.cc +0 -193
  486. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/Win32ConsoleBuffer.h +0 -99
  487. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/main.cc +0 -114
  488. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/agent/subdir.mk +0 -61
  489. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/configurations.gypi +0 -60
  490. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/debugserver/DebugServer.cc +0 -117
  491. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/debugserver/subdir.mk +0 -41
  492. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/include/winpty.h +0 -242
  493. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/include/winpty_constants.h +0 -131
  494. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/libwinpty/AgentLocation.cc +0 -75
  495. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/libwinpty/AgentLocation.h +0 -28
  496. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/libwinpty/LibWinptyException.h +0 -54
  497. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/libwinpty/WinptyInternal.h +0 -72
  498. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/libwinpty/subdir.mk +0 -46
  499. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/libwinpty/winpty.cc +0 -970
  500. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/AgentMsg.h +0 -38
  501. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/BackgroundDesktop.cc +0 -122
  502. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/BackgroundDesktop.h +0 -73
  503. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/Buffer.cc +0 -103
  504. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/Buffer.h +0 -102
  505. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/DebugClient.cc +0 -187
  506. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/DebugClient.h +0 -38
  507. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/GenRandom.cc +0 -138
  508. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/GenRandom.h +0 -55
  509. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/GetCommitHash.bat +0 -13
  510. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/Mutex.h +0 -54
  511. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/OsModule.h +0 -63
  512. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/OwnedHandle.cc +0 -36
  513. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/OwnedHandle.h +0 -45
  514. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/PrecompiledHeader.h +0 -43
  515. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/StringBuilder.h +0 -227
  516. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/StringBuilderTest.cc +0 -114
  517. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/StringUtil.cc +0 -55
  518. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/StringUtil.h +0 -80
  519. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/TimeMeasurement.h +0 -63
  520. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/UnixCtrlChars.h +0 -45
  521. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
  522. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/WindowsSecurity.cc +0 -460
  523. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/WindowsSecurity.h +0 -104
  524. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/WindowsVersion.cc +0 -252
  525. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/WindowsVersion.h +0 -29
  526. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/WinptyAssert.cc +0 -55
  527. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/WinptyAssert.h +0 -64
  528. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/WinptyException.cc +0 -57
  529. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/WinptyException.h +0 -43
  530. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/WinptyVersion.cc +0 -42
  531. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/WinptyVersion.h +0 -27
  532. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/shared/winpty_snprintf.h +0 -99
  533. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/subdir.mk +0 -5
  534. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/tests/subdir.mk +0 -28
  535. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/tests/trivial_test.cc +0 -158
  536. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/unix-adapter/InputHandler.cc +0 -114
  537. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/unix-adapter/InputHandler.h +0 -56
  538. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/unix-adapter/OutputHandler.cc +0 -80
  539. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/unix-adapter/OutputHandler.h +0 -53
  540. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/unix-adapter/Util.cc +0 -86
  541. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/unix-adapter/Util.h +0 -31
  542. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/unix-adapter/WakeupFd.cc +0 -70
  543. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/unix-adapter/WakeupFd.h +0 -42
  544. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/unix-adapter/main.cc +0 -729
  545. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/unix-adapter/subdir.mk +0 -41
  546. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/src/winpty.gyp +0 -206
  547. package/vendor/node_modules/node-pty-prebuilt-multiarch/deps/winpty/vcbuild.bat +0 -83
  548. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/conpty_console_list_agent.js +0 -20
  549. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/conpty_console_list_agent.js.map +0 -1
  550. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/eventEmitter2.js +0 -47
  551. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/eventEmitter2.js.map +0 -1
  552. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/eventEmitter2.test.js +0 -30
  553. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/eventEmitter2.test.js.map +0 -1
  554. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/index.js +0 -51
  555. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/index.js.map +0 -1
  556. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/interfaces.js +0 -7
  557. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/interfaces.js.map +0 -1
  558. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/prebuild-file-path.js +0 -18
  559. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/prebuild-file-path.js.map +0 -1
  560. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/prebuild-loader.js +0 -19
  561. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/prebuild-loader.js.map +0 -1
  562. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/terminal.js +0 -182
  563. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/terminal.js.map +0 -1
  564. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/terminal.test.js +0 -136
  565. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/terminal.test.js.map +0 -1
  566. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/testUtils.test.js +0 -28
  567. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/testUtils.test.js.map +0 -1
  568. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/types.js +0 -7
  569. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/types.js.map +0 -1
  570. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js +0 -265
  571. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js.map +0 -1
  572. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.test.js +0 -201
  573. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.test.js.map +0 -1
  574. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/utils.js +0 -17
  575. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/utils.js.map +0 -1
  576. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/windowsPtyAgent.js +0 -311
  577. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/windowsPtyAgent.js.map +0 -1
  578. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/windowsPtyAgent.test.js +0 -90
  579. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/windowsPtyAgent.test.js.map +0 -1
  580. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/windowsTerminal.js +0 -183
  581. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/windowsTerminal.js.map +0 -1
  582. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/windowsTerminal.test.js +0 -195
  583. package/vendor/node_modules/node-pty-prebuilt-multiarch/lib/windowsTerminal.test.js.map +0 -1
  584. package/vendor/node_modules/node-pty-prebuilt-multiarch/package.json +0 -69
  585. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-arm64/node.abi102.node +0 -0
  586. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-arm64/node.abi108.node +0 -0
  587. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-arm64/node.abi64.node +0 -0
  588. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-arm64/node.abi67.node +0 -0
  589. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-arm64/node.abi72.node +0 -0
  590. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-arm64/node.abi79.node +0 -0
  591. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-arm64/node.abi83.node +0 -0
  592. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-arm64/node.abi88.node +0 -0
  593. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-arm64/node.abi93.node +0 -0
  594. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-x64/node.abi102.node +0 -0
  595. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-x64/node.abi108.node +0 -0
  596. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-x64/node.abi64.node +0 -0
  597. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-x64/node.abi67.node +0 -0
  598. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-x64/node.abi72.node +0 -0
  599. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-x64/node.abi79.node +0 -0
  600. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-x64/node.abi83.node +0 -0
  601. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-x64/node.abi88.node +0 -0
  602. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/darwin-x64/node.abi93.node +0 -0
  603. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi102.musl.node +0 -0
  604. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi102.node +0 -0
  605. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi108.musl.node +0 -0
  606. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi108.node +0 -0
  607. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi64.musl.node +0 -0
  608. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi64.node +0 -0
  609. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi67.musl.node +0 -0
  610. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi67.node +0 -0
  611. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi72.musl.node +0 -0
  612. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi72.node +0 -0
  613. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi79.musl.node +0 -0
  614. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi79.node +0 -0
  615. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi83.musl.node +0 -0
  616. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi83.node +0 -0
  617. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi88.musl.node +0 -0
  618. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi88.node +0 -0
  619. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi93.musl.node +0 -0
  620. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm/node.abi93.node +0 -0
  621. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi102.musl.node +0 -0
  622. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi102.node +0 -0
  623. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi108.musl.node +0 -0
  624. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi108.node +0 -0
  625. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi64.musl.node +0 -0
  626. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi64.node +0 -0
  627. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi67.musl.node +0 -0
  628. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi67.node +0 -0
  629. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi72.musl.node +0 -0
  630. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi72.node +0 -0
  631. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi79.musl.node +0 -0
  632. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi79.node +0 -0
  633. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi83.musl.node +0 -0
  634. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi83.node +0 -0
  635. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi88.musl.node +0 -0
  636. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi88.node +0 -0
  637. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi93.musl.node +0 -0
  638. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-arm64/node.abi93.node +0 -0
  639. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-ia32/node.abi102.node +0 -0
  640. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-ia32/node.abi108.node +0 -0
  641. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-ia32/node.abi64.node +0 -0
  642. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-ia32/node.abi67.node +0 -0
  643. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-ia32/node.abi72.node +0 -0
  644. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-ia32/node.abi79.node +0 -0
  645. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-ia32/node.abi83.node +0 -0
  646. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-ia32/node.abi88.node +0 -0
  647. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-ia32/node.abi93.node +0 -0
  648. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi102.musl.node +0 -0
  649. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi102.node +0 -0
  650. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi108.musl.node +0 -0
  651. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi108.node +0 -0
  652. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi64.musl.node +0 -0
  653. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi64.node +0 -0
  654. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi67.musl.node +0 -0
  655. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi67.node +0 -0
  656. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi72.musl.node +0 -0
  657. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi72.node +0 -0
  658. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi79.musl.node +0 -0
  659. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi79.node +0 -0
  660. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi83.musl.node +0 -0
  661. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi83.node +0 -0
  662. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi88.musl.node +0 -0
  663. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi88.node +0 -0
  664. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi93.musl.node +0 -0
  665. package/vendor/node_modules/node-pty-prebuilt-multiarch/prebuilds/linux-x64/node.abi93.node +0 -0
  666. package/vendor/node_modules/node-pty-prebuilt-multiarch/scripts/check-prebuild.js +0 -15
  667. package/vendor/node_modules/node-pty-prebuilt-multiarch/scripts/install.js +0 -18
  668. package/vendor/node_modules/node-pty-prebuilt-multiarch/scripts/post-install.js +0 -41
  669. package/vendor/node_modules/node-pty-prebuilt-multiarch/scripts/publish.js +0 -62
  670. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/conpty_console_list_agent.ts +0 -19
  671. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/eventEmitter2.test.ts +0 -30
  672. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/eventEmitter2.ts +0 -48
  673. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/index.ts +0 -52
  674. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/interfaces.ts +0 -125
  675. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/native.d.ts +0 -54
  676. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/prebuild-file-path.ts +0 -21
  677. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/prebuild-loader.ts +0 -17
  678. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/terminal.test.ts +0 -116
  679. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/terminal.ts +0 -208
  680. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/testUtils.test.ts +0 -23
  681. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/tsconfig.json +0 -24
  682. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/types.ts +0 -15
  683. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/unix/pty.cc +0 -734
  684. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/unixTerminal.test.ts +0 -243
  685. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/unixTerminal.ts +0 -288
  686. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/utils.ts +0 -9
  687. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/win/conpty.cc +0 -455
  688. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/win/conpty_console_list.cc +0 -43
  689. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/win/path_util.cc +0 -73
  690. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/win/path_util.h +0 -22
  691. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/win/winpty.cc +0 -312
  692. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/windowsPtyAgent.test.ts +0 -94
  693. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/windowsPtyAgent.ts +0 -312
  694. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/windowsTerminal.test.ts +0 -205
  695. package/vendor/node_modules/node-pty-prebuilt-multiarch/src/windowsTerminal.ts +0 -189
  696. package/vendor/node_modules/node-pty-prebuilt-multiarch/typings/node-pty.d.ts +0 -212
@@ -1,64 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ThreadConversation-DgJc2aJG.js","assets/ThreadConversation-3WaRKicR.css","assets/ThreadTerminalPanel-Dy-oA46U.js","assets/ThreadTerminalPanel-CGTJQ1BI.css","assets/ReviewPane-D1nOf7-W.js","assets/ReviewPane-DuPX5OZA.css","assets/SkillsHub-BpqR2Yu5.js","assets/SkillsHub-CTnWejwn.css"])))=>i.map(i=>d[i]);
2
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();/**
3
- * @vue/shared v3.5.33
4
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
5
- * @license MIT
6
- **/function Du(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Et={},Ts=[],Gr=()=>{},kf=()=>!1,Ci=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ai=e=>e.startsWith("onUpdate:"),cn=Object.assign,Lu=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Zh=Object.prototype.hasOwnProperty,St=(e,t)=>Zh.call(e,t),ze=Array.isArray,_s=e=>Ta(e)==="[object Map]",Ps=e=>Ta(e)==="[object Set]",_c=e=>Ta(e)==="[object Date]",Xe=e=>typeof e=="function",Dt=e=>typeof e=="string",Rr=e=>typeof e=="symbol",kt=e=>e!==null&&typeof e=="object",xf=e=>(kt(e)||Xe(e))&&Xe(e.then)&&Xe(e.catch),Cf=Object.prototype.toString,Ta=e=>Cf.call(e),em=e=>Ta(e).slice(8,-1),Af=e=>Ta(e)==="[object Object]",Nu=e=>Dt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ra=Du(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ei=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},tm=/-\w/g,Xn=Ei(e=>e.replace(tm,t=>t.slice(1).toUpperCase())),nm=/\B([A-Z])/g,Po=Ei(e=>e.replace(nm,"-$1").toLowerCase()),Ii=Ei(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ml=Ei(e=>e?`on${Ii(e)}`:""),Wr=(e,t)=>!Object.is(e,t),fi=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Ef=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Mi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},rm=e=>{const t=Dt(e)?Number(e):NaN;return isNaN(t)?e:t};let Sc;const Ri=()=>Sc||(Sc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function oo(e){if(ze(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Dt(r)?im(r):oo(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Dt(e)||kt(e))return e}const om=/;(?![^(]*\))/g,sm=/:([^]+)/,am=/\/\*[^]*?\*\//g;function im(e){const t={};return e.replace(am,"").split(om).forEach(n=>{if(n){const r=n.split(sm);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function rt(e){let t="";if(Dt(e))t=e;else if(ze(e))for(let n=0;n<e.length;n++){const r=rt(e[n]);r&&(t+=r+" ")}else if(kt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const lm="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",um=Du(lm);function If(e){return!!e||e===""}function cm(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=$s(e[r],t[r]);return n}function $s(e,t){if(e===t)return!0;let n=_c(e),r=_c(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Rr(e),r=Rr(t),n||r)return e===t;if(n=ze(e),r=ze(t),n||r)return n&&r?cm(e,t):!1;if(n=kt(e),r=kt(t),n||r){if(!n||!r)return!1;const o=Object.keys(e).length,s=Object.keys(t).length;if(o!==s)return!1;for(const i in e){const l=e.hasOwnProperty(i),c=t.hasOwnProperty(i);if(l&&!c||!l&&c||!$s(e[i],t[i]))return!1}}return String(e)===String(t)}function ju(e,t){return e.findIndex(n=>$s(n,t))}const Mf=e=>!!(e&&e.__v_isRef===!0),ae=e=>Dt(e)?e:e==null?"":ze(e)||kt(e)&&(e.toString===Cf||!Xe(e.toString))?Mf(e)?ae(e.value):JSON.stringify(e,Rf,2):String(e),Rf=(e,t)=>Mf(t)?Rf(e,t.value):_s(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Rl(r,s)+" =>"]=o,n),{})}:Ps(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Rl(n))}:Rr(t)?Rl(t):kt(t)&&!ze(t)&&!Af(t)?String(t):t,Rl=(e,t="")=>{var n;return Rr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
7
- * @vue/reactivity v3.5.33
8
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
9
- * @license MIT
10
- **/let Dn;class dm{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Dn,!t&&Dn&&(this.index=(Dn.scopes||(Dn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Dn;try{return Dn=this,t()}finally{Dn=n}}}on(){++this._on===1&&(this.prevScope=Dn,Dn=this)}off(){if(this._on>0&&--this._on===0){if(Dn===this)Dn=this.prevScope;else{let t=Dn;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function fm(){return Dn}let Rt;const Pl=new WeakSet;class Pf{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Dn&&Dn.active&&Dn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Pl.has(this)&&(Pl.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Of(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,kc(this),Df(this);const t=Rt,n=Ir;Rt=this,Ir=!0;try{return this.fn()}finally{Lf(this),Rt=t,Ir=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Uu(t);this.deps=this.depsTail=void 0,kc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Pl.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){uu(this)&&this.run()}get dirty(){return uu(this)}}let $f=0,oa,sa;function Of(e,t=!1){if(e.flags|=8,t){e.next=sa,sa=e;return}e.next=oa,oa=e}function Fu(){$f++}function Bu(){if(--$f>0)return;if(sa){let t=sa;for(sa=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;oa;){let t=oa;for(oa=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function Df(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Lf(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),Uu(r),pm(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function uu(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Nf(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Nf(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===da)||(e.globalVersion=da,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!uu(e))))return;e.flags|=2;const t=e.dep,n=Rt,r=Ir;Rt=e,Ir=!0;try{Df(e);const o=e.fn(e._value);(t.version===0||Wr(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Rt=n,Ir=r,Lf(e),e.flags&=-3}}function Uu(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)Uu(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function pm(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ir=!0;const jf=[];function lo(){jf.push(Ir),Ir=!1}function uo(){const e=jf.pop();Ir=e===void 0?!0:e}function kc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Rt;Rt=void 0;try{t()}finally{Rt=n}}}let da=0;class hm{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class qu{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Rt||!Ir||Rt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Rt)n=this.activeLink=new hm(Rt,this),Rt.deps?(n.prevDep=Rt.depsTail,Rt.depsTail.nextDep=n,Rt.depsTail=n):Rt.deps=Rt.depsTail=n,Ff(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Rt.depsTail,n.nextDep=void 0,Rt.depsTail.nextDep=n,Rt.depsTail=n,Rt.deps===n&&(Rt.deps=r)}return n}trigger(t){this.version++,da++,this.notify(t)}notify(t){Fu();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Bu()}}}function Ff(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Ff(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const cu=new WeakMap,Jo=Symbol(""),du=Symbol(""),fa=Symbol("");function Ln(e,t,n){if(Ir&&Rt){let r=cu.get(e);r||cu.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new qu),o.map=r,o.key=n),o.track()}}function no(e,t,n,r,o,s){const i=cu.get(e);if(!i){da++;return}const l=c=>{c&&c.trigger()};if(Fu(),t==="clear")i.forEach(l);else{const c=ze(e),p=c&&Nu(n);if(c&&n==="length"){const f=Number(r);i.forEach((g,T)=>{(T==="length"||T===fa||!Rr(T)&&T>=f)&&l(g)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),p&&l(i.get(fa)),t){case"add":c?p&&l(i.get("length")):(l(i.get(Jo)),_s(e)&&l(i.get(du)));break;case"delete":c||(l(i.get(Jo)),_s(e)&&l(i.get(du)));break;case"set":_s(e)&&l(i.get(Jo));break}}Bu()}function ds(e){const t=gt(e);return t===e?t:(Ln(t,"iterate",fa),_r(e)?t:t.map(Pr))}function Pi(e){return Ln(e=gt(e),"iterate",fa),e}function Hr(e,t){return co(e)?Cs(Qo(e)?Pr(t):t):Pr(t)}const mm={__proto__:null,[Symbol.iterator](){return $l(this,Symbol.iterator,e=>Hr(this,e))},concat(...e){return ds(this).concat(...e.map(t=>ze(t)?ds(t):t))},entries(){return $l(this,"entries",e=>(e[1]=Hr(this,e[1]),e))},every(e,t){return Qr(this,"every",e,t,void 0,arguments)},filter(e,t){return Qr(this,"filter",e,t,n=>n.map(r=>Hr(this,r)),arguments)},find(e,t){return Qr(this,"find",e,t,n=>Hr(this,n),arguments)},findIndex(e,t){return Qr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Qr(this,"findLast",e,t,n=>Hr(this,n),arguments)},findLastIndex(e,t){return Qr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Qr(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ol(this,"includes",e)},indexOf(...e){return Ol(this,"indexOf",e)},join(e){return ds(this).join(e)},lastIndexOf(...e){return Ol(this,"lastIndexOf",e)},map(e,t){return Qr(this,"map",e,t,void 0,arguments)},pop(){return Ks(this,"pop")},push(...e){return Ks(this,"push",e)},reduce(e,...t){return xc(this,"reduce",e,t)},reduceRight(e,...t){return xc(this,"reduceRight",e,t)},shift(){return Ks(this,"shift")},some(e,t){return Qr(this,"some",e,t,void 0,arguments)},splice(...e){return Ks(this,"splice",e)},toReversed(){return ds(this).toReversed()},toSorted(e){return ds(this).toSorted(e)},toSpliced(...e){return ds(this).toSpliced(...e)},unshift(...e){return Ks(this,"unshift",e)},values(){return $l(this,"values",e=>Hr(this,e))}};function $l(e,t,n){const r=Pi(e),o=r[t]();return r!==e&&!_r(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.done||(s.value=n(s.value)),s}),o}const vm=Array.prototype;function Qr(e,t,n,r,o,s){const i=Pi(e),l=i!==e&&!_r(e),c=i[t];if(c!==vm[t]){const g=c.apply(e,s);return l?Pr(g):g}let p=n;i!==e&&(l?p=function(g,T){return n.call(this,Hr(e,g),T,e)}:n.length>2&&(p=function(g,T){return n.call(this,g,T,e)}));const f=c.call(i,p,r);return l&&o?o(f):f}function xc(e,t,n,r){const o=Pi(e),s=o!==e&&!_r(e);let i=n,l=!1;o!==e&&(s?(l=r.length===0,i=function(p,f,g){return l&&(l=!1,p=Hr(e,p)),n.call(this,p,Hr(e,f),g,e)}):n.length>3&&(i=function(p,f,g){return n.call(this,p,f,g,e)}));const c=o[t](i,...r);return l?Hr(e,c):c}function Ol(e,t,n){const r=gt(e);Ln(r,"iterate",fa);const o=r[t](...n);return(o===-1||o===!1)&&Wu(n[0])?(n[0]=gt(n[0]),r[t](...n)):o}function Ks(e,t,n=[]){lo(),Fu();const r=gt(e)[t].apply(e,n);return Bu(),uo(),r}const gm=Du("__proto__,__v_isRef,__isVue"),Bf=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Rr));function ym(e){Rr(e)||(e=String(e));const t=gt(this);return Ln(t,"has",e),t.hasOwnProperty(e)}class Uf{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(o?s?Em:Wf:s?Vf:Hf).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ze(t);if(!o){let c;if(i&&(c=mm[n]))return c;if(n==="hasOwnProperty")return ym}const l=Reflect.get(t,n,jn(t)?t:r);if((Rr(n)?Bf.has(n):gm(n))||(o||Ln(t,"get",n),s))return l;if(jn(l)){const c=i&&Nu(n)?l:l.value;return o&&kt(c)?pu(c):c}return kt(l)?o?pu(l):$i(l):l}}class qf extends Uf{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];const i=ze(t)&&Nu(n);if(!this._isShallow){const p=co(s);if(!_r(r)&&!co(r)&&(s=gt(s),r=gt(r)),!i&&jn(s)&&!jn(r))return p||(s.value=r),!0}const l=i?Number(n)<t.length:St(t,n),c=Reflect.set(t,n,r,jn(t)?t:o);return t===gt(o)&&(l?Wr(r,s)&&no(t,"set",n,r):no(t,"add",n,r)),c}deleteProperty(t,n){const r=St(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&r&&no(t,"delete",n,void 0),o}has(t,n){const r=Reflect.has(t,n);return(!Rr(n)||!Bf.has(n))&&Ln(t,"has",n),r}ownKeys(t){return Ln(t,"iterate",ze(t)?"length":Jo),Reflect.ownKeys(t)}}class wm extends Uf{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const bm=new qf,Tm=new wm,_m=new qf(!0);const fu=e=>e,Xa=e=>Reflect.getPrototypeOf(e);function Sm(e,t,n){return function(...r){const o=this.__v_raw,s=gt(o),i=_s(s),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,p=o[e](...r),f=n?fu:t?Cs:Pr;return!t&&Ln(s,"iterate",c?du:Jo),cn(Object.create(p),{next(){const{value:g,done:T}=p.next();return T?{value:g,done:T}:{value:l?[f(g[0]),f(g[1])]:f(g),done:T}}})}}function Za(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function km(e,t){const n={get(o){const s=this.__v_raw,i=gt(s),l=gt(o);e||(Wr(o,l)&&Ln(i,"get",o),Ln(i,"get",l));const{has:c}=Xa(i),p=t?fu:e?Cs:Pr;if(c.call(i,o))return p(s.get(o));if(c.call(i,l))return p(s.get(l));s!==i&&s.get(o)},get size(){const o=this.__v_raw;return!e&&Ln(gt(o),"iterate",Jo),o.size},has(o){const s=this.__v_raw,i=gt(s),l=gt(o);return e||(Wr(o,l)&&Ln(i,"has",o),Ln(i,"has",l)),o===l?s.has(o):s.has(o)||s.has(l)},forEach(o,s){const i=this,l=i.__v_raw,c=gt(l),p=t?fu:e?Cs:Pr;return!e&&Ln(c,"iterate",Jo),l.forEach((f,g)=>o.call(s,p(f),p(g),i))}};return cn(n,e?{add:Za("add"),set:Za("set"),delete:Za("delete"),clear:Za("clear")}:{add(o){const s=gt(this),i=Xa(s),l=gt(o),c=!t&&!_r(o)&&!co(o)?l:o;return i.has.call(s,c)||Wr(o,c)&&i.has.call(s,o)||Wr(l,c)&&i.has.call(s,l)||(s.add(c),no(s,"add",c,c)),this},set(o,s){!t&&!_r(s)&&!co(s)&&(s=gt(s));const i=gt(this),{has:l,get:c}=Xa(i);let p=l.call(i,o);p||(o=gt(o),p=l.call(i,o));const f=c.call(i,o);return i.set(o,s),p?Wr(s,f)&&no(i,"set",o,s):no(i,"add",o,s),this},delete(o){const s=gt(this),{has:i,get:l}=Xa(s);let c=i.call(s,o);c||(o=gt(o),c=i.call(s,o)),l&&l.call(s,o);const p=s.delete(o);return c&&no(s,"delete",o,void 0),p},clear(){const o=gt(this),s=o.size!==0,i=o.clear();return s&&no(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Sm(o,e,t)}),n}function Hu(e,t){const n=km(e,t);return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(St(n,o)&&o in r?n:r,o,s)}const xm={get:Hu(!1,!1)},Cm={get:Hu(!1,!0)},Am={get:Hu(!0,!1)};const Hf=new WeakMap,Vf=new WeakMap,Wf=new WeakMap,Em=new WeakMap;function Im(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mm(e){return e.__v_skip||!Object.isExtensible(e)?0:Im(em(e))}function $i(e){return co(e)?e:Vu(e,!1,bm,xm,Hf)}function zf(e){return Vu(e,!1,_m,Cm,Vf)}function pu(e){return Vu(e,!0,Tm,Am,Wf)}function Vu(e,t,n,r,o){if(!kt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=Mm(e);if(s===0)return e;const i=o.get(e);if(i)return i;const l=new Proxy(e,s===2?r:n);return o.set(e,l),l}function Qo(e){return co(e)?Qo(e.__v_raw):!!(e&&e.__v_isReactive)}function co(e){return!!(e&&e.__v_isReadonly)}function _r(e){return!!(e&&e.__v_isShallow)}function Wu(e){return e?!!e.__v_raw:!1}function gt(e){const t=e&&e.__v_raw;return t?gt(t):e}function Rm(e){return!St(e,"__v_skip")&&Object.isExtensible(e)&&Ef(e,"__v_skip",!0),e}const Pr=e=>kt(e)?$i(e):e,Cs=e=>kt(e)?pu(e):e;function jn(e){return e?e.__v_isRef===!0:!1}function M(e){return Gf(e,!1)}function Pm(e){return Gf(e,!0)}function Gf(e,t){return jn(e)?e:new $m(e,t)}class $m{constructor(t,n){this.dep=new qu,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:gt(t),this._value=n?t:Pr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||_r(t)||co(t);t=r?t:gt(t),Wr(t,n)&&(this._rawValue=t,this._value=r?t:Pr(t),this.dep.trigger())}}function Re(e){return jn(e)?e.value:e}const Om={get:(e,t,n)=>t==="__v_raw"?e:Re(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return jn(o)&&!jn(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Kf(e){return Qo(e)?e:new Proxy(e,Om)}class Dm{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new qu(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=da-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Rt!==this)return Of(this,!0),!0}get value(){const t=this.dep.track();return Nf(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Lm(e,t,n=!1){let r,o;return Xe(e)?r=e:(r=e.get,o=e.set),new Dm(r,o,n)}const ei={},vi=new WeakMap;let Vo;function Nm(e,t=!1,n=Vo){if(n){let r=vi.get(n);r||vi.set(n,r=[]),r.push(e)}}function jm(e,t,n=Et){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:l,call:c}=n,p=z=>o?z:_r(z)||o===!1||o===0?ro(z,1):ro(z);let f,g,T,k,U=!1,H=!1;if(jn(e)?(g=()=>e.value,U=_r(e)):Qo(e)?(g=()=>p(e),U=!0):ze(e)?(H=!0,U=e.some(z=>Qo(z)||_r(z)),g=()=>e.map(z=>{if(jn(z))return z.value;if(Qo(z))return p(z);if(Xe(z))return c?c(z,2):z()})):Xe(e)?t?g=c?()=>c(e,2):e:g=()=>{if(T){lo();try{T()}finally{uo()}}const z=Vo;Vo=f;try{return c?c(e,3,[k]):e(k)}finally{Vo=z}}:g=Gr,t&&o){const z=g,de=o===!0?1/0:o;g=()=>ro(z(),de)}const X=fm(),q=()=>{f.stop(),X&&X.active&&Lu(X.effects,f)};if(s&&t){const z=t;t=(...de)=>{z(...de),q()}}let P=H?new Array(e.length).fill(ei):ei;const F=z=>{if(!(!(f.flags&1)||!f.dirty&&!z))if(t){const de=f.run();if(o||U||(H?de.some((ue,we)=>Wr(ue,P[we])):Wr(de,P))){T&&T();const ue=Vo;Vo=f;try{const we=[de,P===ei?void 0:H&&P[0]===ei?[]:P,k];P=de,c?c(t,3,we):t(...we)}finally{Vo=ue}}}else f.run()};return l&&l(F),f=new Pf(g),f.scheduler=i?()=>i(F,!1):F,k=z=>Nm(z,!1,f),T=f.onStop=()=>{const z=vi.get(f);if(z){if(c)c(z,4);else for(const de of z)de();vi.delete(f)}},t?r?F(!0):P=f.run():i?i(F.bind(null,!0),!0):f.run(),q.pause=f.pause.bind(f),q.resume=f.resume.bind(f),q.stop=q,q}function ro(e,t=1/0,n){if(t<=0||!kt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,jn(e))ro(e.value,t,n);else if(ze(e))for(let r=0;r<e.length;r++)ro(e[r],t,n);else if(Ps(e)||_s(e))e.forEach(r=>{ro(r,t,n)});else if(Af(e)){for(const r in e)ro(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&ro(e[r],t,n)}return e}/**
11
- * @vue/runtime-core v3.5.33
12
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
13
- * @license MIT
14
- **/function _a(e,t,n,r){try{return r?e(...r):e()}catch(o){Sa(o,t,n)}}function $r(e,t,n,r){if(Xe(e)){const o=_a(e,t,n,r);return o&&xf(o)&&o.catch(s=>{Sa(s,t,n)}),o}if(ze(e)){const o=[];for(let s=0;s<e.length;s++)o.push($r(e[s],t,n,r));return o}}function Sa(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Et;if(t){let l=t.parent;const c=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const f=l.ec;if(f){for(let g=0;g<f.length;g++)if(f[g](e,c,p)===!1)return}l=l.parent}if(s){lo(),_a(s,null,10,[e,c,p]),uo();return}}Fm(e,n,o,r,i)}function Fm(e,t,n,r=!0,o=!1){if(o)throw e;console.error(e)}const Qn=[];let Ur=-1;const Ss=[];let Co=null,ms=0;const Yf=Promise.resolve();let gi=null;function Gt(e){const t=gi||Yf;return e?t.then(this?e.bind(this):e):t}function Bm(e){let t=Ur+1,n=Qn.length;for(;t<n;){const r=t+n>>>1,o=Qn[r],s=pa(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function zu(e){if(!(e.flags&1)){const t=pa(e),n=Qn[Qn.length-1];!n||!(e.flags&2)&&t>=pa(n)?Qn.push(e):Qn.splice(Bm(t),0,e),e.flags|=1,Jf()}}function Jf(){gi||(gi=Yf.then(Xf))}function Um(e){ze(e)?Ss.push(...e):Co&&e.id===-1?Co.splice(ms+1,0,e):e.flags&1||(Ss.push(e),e.flags|=1),Jf()}function Cc(e,t,n=Ur+1){for(;n<Qn.length;n++){const r=Qn[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;Qn.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Qf(e){if(Ss.length){const t=[...new Set(Ss)].sort((n,r)=>pa(n)-pa(r));if(Ss.length=0,Co){Co.push(...t);return}for(Co=t,ms=0;ms<Co.length;ms++){const n=Co[ms];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Co=null,ms=0}}const pa=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Xf(e){try{for(Ur=0;Ur<Qn.length;Ur++){const t=Qn[Ur];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),_a(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ur<Qn.length;Ur++){const t=Qn[Ur];t&&(t.flags&=-2)}Ur=-1,Qn.length=0,Qf(),gi=null,(Qn.length||Ss.length)&&Xf()}}let En=null,Zf=null;function yi(e){const t=En;return En=e,Zf=e&&e.type.__scopeId||null,t}function Tt(e,t=En,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Ti(-1);const s=yi(t);let i;try{i=e(...o)}finally{yi(s),r._d&&Ti(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function nn(e,t){if(En===null)return e;const n=ji(En),r=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[s,i,l,c=Et]=t[o];s&&(Xe(s)&&(s={mounted:s,updated:s}),s.deep&&ro(i),r.push({dir:s,instance:n,value:i,oldValue:void 0,arg:l,modifiers:c}))}return e}function Fo(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const l=o[i];s&&(l.oldValue=s[i].value);let c=l.dir[r];c&&(lo(),$r(c,n,8,[e.el,l,e,t]),uo())}}function pi(e,t){if(An){let n=An.provides;const r=An.parent&&An.parent.provides;r===n&&(n=An.provides=Object.create(r)),n[e]=t}}function Mr(e,t,n=!1){const r=Zu();if(r||xs){let o=xs?xs._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Xe(t)?t.call(r&&r.proxy):t}}const qm=Symbol.for("v-scx"),Hm=()=>Mr(qm);function it(e,t,n){return ep(e,t,n)}function ep(e,t,n=Et){const{immediate:r,deep:o,flush:s,once:i}=n,l=cn({},n),c=t&&r||!t&&s!=="post";let p;if(As){if(s==="sync"){const k=Hm();p=k.__watcherHandles||(k.__watcherHandles=[])}else if(!c){const k=()=>{};return k.stop=Gr,k.resume=Gr,k.pause=Gr,k}}const f=An;l.call=(k,U,H)=>$r(k,f,U,H);let g=!1;s==="post"?l.scheduler=k=>{Yn(k,f&&f.suspense)}:s!=="sync"&&(g=!0,l.scheduler=(k,U)=>{U?k():zu(k)}),l.augmentJob=k=>{t&&(k.flags|=4),g&&(k.flags|=2,f&&(k.id=f.uid,k.i=f))};const T=jm(e,t,l);return As&&(p?p.push(T):c&&T()),T}function Vm(e,t,n){const r=this.proxy,o=Dt(e)?e.includes(".")?tp(r,e):()=>r[e]:e.bind(r,r);let s;Xe(t)?s=t:(s=t.handler,n=t);const i=xa(this),l=ep(o,s.bind(r),n);return i(),l}function tp(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}const xo=new WeakMap,np=Symbol("_vte"),rp=e=>e.__isTeleport,zo=e=>e&&(e.disabled||e.disabled===""),Wm=e=>e&&(e.defer||e.defer===""),Ac=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Ec=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,hu=(e,t)=>{const n=e&&e.to;return Dt(n)?t?t(n):null:n},zm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,l,c,p){const{mc:f,pc:g,pbc:T,o:{insert:k,querySelector:U,createText:H,createComment:X,parentNode:q}}=p,P=zo(t.props);let{dynamicChildren:F}=t;const z=(we,ke,me)=>{we.shapeFlag&16&&f(we.children,ke,me,o,s,i,l,c)},de=(we=t)=>{const ke=zo(we.props),me=we.target=hu(we.props,U),Ie=mu(me,we,H,k);me&&(i!=="svg"&&Ac(me)?i="svg":i!=="mathml"&&Ec(me)&&(i="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(me),ke||(z(we,me,Ie),ea(we,!1)))},ue=we=>{const ke=()=>{if(xo.get(we)===ke){if(xo.delete(we),zo(we.props)){const me=q(we.el)||n;z(we,me,we.anchor),ea(we,!0)}de(we)}};xo.set(we,ke),Yn(ke,s)};if(e==null){const we=t.el=H(""),ke=t.anchor=H("");if(k(we,n,r),k(ke,n,r),Wm(t.props)||s&&s.pendingBranch){ue(t);return}P&&(z(t,n,ke),ea(t,!0)),de()}else{t.el=e.el;const we=t.anchor=e.anchor,ke=xo.get(e);if(ke){ke.flags|=8,xo.delete(e),ue(t);return}t.targetStart=e.targetStart;const me=t.target=e.target,Ie=t.targetAnchor=e.targetAnchor,Oe=zo(e.props),Y=Oe?n:me,ve=Oe?we:Ie;if(i==="svg"||Ac(me)?i="svg":(i==="mathml"||Ec(me))&&(i="mathml"),F?(T(e.dynamicChildren,F,Y,o,s,i,l),Qu(e,t,!0)):c||g(e,t,Y,ve,o,s,i,l,!1),P)Oe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ti(t,n,we,p,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Fe=t.target=hu(t.props,U);Fe&&ti(t,Fe,null,p,0)}else Oe&&ti(t,me,Ie,p,1);ea(t,P)}},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:l,anchor:c,targetStart:p,targetAnchor:f,target:g,props:T}=e;let k=s||!zo(T);const U=xo.get(e);if(U&&(U.flags|=8,xo.delete(e),k=!1),g&&(o(p),o(f)),s&&o(c),i&16)for(let H=0;H<l.length;H++){const X=l[H];r(X,t,n,k,!!X.dynamicChildren)}},move:ti,hydrate:Gm};function ti(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:p,props:f}=e,g=s===2;if(g&&r(i,t,n),!xo.has(e)&&(!g||zo(f))&&c&16)for(let T=0;T<p.length;T++)o(p[T],t,n,2);g&&r(l,t,n)}function Gm(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:l,querySelector:c,insert:p,createText:f}},g){function T(X,q){let P=q;for(;P;){if(P&&P.nodeType===8){if(P.data==="teleport start anchor")t.targetStart=P;else if(P.data==="teleport anchor"){t.targetAnchor=P,X._lpa=t.targetAnchor&&i(t.targetAnchor);break}}P=i(P)}}function k(X,q){q.anchor=g(i(X),q,l(X),n,r,o,s)}const U=t.target=hu(t.props,c),H=zo(t.props);if(U){const X=U._lpa||U.firstChild;t.shapeFlag&16&&(H?(k(e,t),T(U,X),t.targetAnchor||mu(U,t,f,p,l(e)===U?e:null)):(t.anchor=i(e),T(U,X),t.targetAnchor||mu(U,t,f,p),g(X&&i(X),t,U,n,r,o,s))),ea(t,H)}else H&&t.shapeFlag&16&&(k(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const ws=zm;function ea(e,t){const n=e.ctx;if(n&&n.ut){let r,o;for(t?(r=e.el,o=e.anchor):(r=e.targetStart,o=e.targetAnchor);r&&r!==o;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function mu(e,t,n,r,o=null){const s=t.targetStart=n(""),i=t.targetAnchor=n("");return s[np]=i,e&&(r(s,e,o),r(i,e,o)),i}const qr=Symbol("_leaveCb"),Ys=Symbol("_enterCb");function Km(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return $o(()=>{e.isMounted=!0}),Xo(()=>{e.isUnmounting=!0}),e}const Tr=[Function,Array],op={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Tr,onEnter:Tr,onAfterEnter:Tr,onEnterCancelled:Tr,onBeforeLeave:Tr,onLeave:Tr,onAfterLeave:Tr,onLeaveCancelled:Tr,onBeforeAppear:Tr,onAppear:Tr,onAfterAppear:Tr,onAppearCancelled:Tr},sp=e=>{const t=e.subTree;return t.component?sp(t.component):t},Ym={name:"BaseTransition",props:op,setup(e,{slots:t}){const n=Zu(),r=Km();return()=>{const o=t.default&&lp(t.default(),!0),s=o&&o.length?ap(o):n.subTree?ie():void 0;if(!s)return;const i=gt(e),{mode:l}=i;if(r.isLeaving)return Dl(s);const c=Ic(s);if(!c)return Dl(s);let p=vu(c,i,r,n,g=>p=g);c.type!==Nn&&ha(c,p);let f=n.subTree&&Ic(n.subTree);if(f&&f.type!==Nn&&!Go(f,c)&&sp(n).type!==Nn){let g=vu(f,i,r,n);if(ha(f,g),l==="out-in"&&c.type!==Nn)return r.isLeaving=!0,g.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete g.afterLeave,f=void 0},Dl(s);l==="in-out"&&c.type!==Nn?g.delayLeave=(T,k,U)=>{const H=ip(r,f);H[String(f.key)]=f,T[qr]=()=>{k(),T[qr]=void 0,delete p.delayedLeave,f=void 0},p.delayedLeave=()=>{U(),delete p.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return s}}};function ap(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Nn){t=n;break}}return t}const Jm=Ym;function ip(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function vu(e,t,n,r,o){const{appear:s,mode:i,persisted:l=!1,onBeforeEnter:c,onEnter:p,onAfterEnter:f,onEnterCancelled:g,onBeforeLeave:T,onLeave:k,onAfterLeave:U,onLeaveCancelled:H,onBeforeAppear:X,onAppear:q,onAfterAppear:P,onAppearCancelled:F}=t,z=String(e.key),de=ip(n,e),ue=(me,Ie)=>{me&&$r(me,r,9,Ie)},we=(me,Ie)=>{const Oe=Ie[1];ue(me,Ie),ze(me)?me.every(Y=>Y.length<=1)&&Oe():me.length<=1&&Oe()},ke={mode:i,persisted:l,beforeEnter(me){let Ie=c;if(!n.isMounted)if(s)Ie=X||c;else return;me[qr]&&me[qr](!0);const Oe=de[z];Oe&&Go(e,Oe)&&Oe.el[qr]&&Oe.el[qr](),ue(Ie,[me])},enter(me){if(de[z]===e)return;let Ie=p,Oe=f,Y=g;if(!n.isMounted)if(s)Ie=q||p,Oe=P||f,Y=F||g;else return;let ve=!1;me[Ys]=Le=>{ve||(ve=!0,Le?ue(Y,[me]):ue(Oe,[me]),ke.delayedLeave&&ke.delayedLeave(),me[Ys]=void 0)};const Fe=me[Ys].bind(null,!1);Ie?we(Ie,[me,Fe]):Fe()},leave(me,Ie){const Oe=String(e.key);if(me[Ys]&&me[Ys](!0),n.isUnmounting)return Ie();ue(T,[me]);let Y=!1;me[qr]=Fe=>{Y||(Y=!0,Ie(),Fe?ue(H,[me]):ue(U,[me]),me[qr]=void 0,de[Oe]===e&&delete de[Oe])};const ve=me[qr].bind(null,!1);de[Oe]=e,k?we(k,[me,ve]):ve()},clone(me){const Ie=vu(me,t,n,r,o);return o&&o(Ie),Ie}};return ke}function Dl(e){if(ka(e))return e=Ro(e),e.children=null,e}function Ic(e){if(!ka(e))return rp(e.type)&&e.children?ap(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Xe(n.default))return n.default()}}function ha(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ha(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function lp(e,t=!1,n){let r=[],o=0;for(let s=0;s<e.length;s++){let i=e[s];const l=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===qe?(i.patchFlag&128&&o++,r=r.concat(lp(i.children,t,l))):(t||i.type!==Nn)&&r.push(l!=null?Ro(i,{key:l}):i)}if(o>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}function In(e,t){return Xe(e)?cn({name:e.name},t,{setup:e}):e}function Gu(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Mc(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const wi=new WeakMap;function aa(e,t,n,r,o=!1){if(ze(e)){e.forEach((H,X)=>aa(H,t&&(ze(t)?t[X]:t),n,r,o));return}if(ks(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&aa(e,t,n,r.component.subTree);return}const s=r.shapeFlag&4?ji(r.component):r.el,i=o?null:s,{i:l,r:c}=e,p=t&&t.r,f=l.refs===Et?l.refs={}:l.refs,g=l.setupState,T=gt(g),k=g===Et?kf:H=>Mc(f,H)?!1:St(T,H),U=(H,X)=>!(X&&Mc(f,X));if(p!=null&&p!==c){if(Rc(t),Dt(p))f[p]=null,k(p)&&(g[p]=null);else if(jn(p)){const H=t;U(p,H.k)&&(p.value=null),H.k&&(f[H.k]=null)}}if(Xe(c))_a(c,l,12,[i,f]);else{const H=Dt(c),X=jn(c);if(H||X){const q=()=>{if(e.f){const P=H?k(c)?g[c]:f[c]:U()||!e.k?c.value:f[e.k];if(o)ze(P)&&Lu(P,s);else if(ze(P))P.includes(s)||P.push(s);else if(H)f[c]=[s],k(c)&&(g[c]=f[c]);else{const F=[s];U(c,e.k)&&(c.value=F),e.k&&(f[e.k]=F)}}else H?(f[c]=i,k(c)&&(g[c]=i)):X&&(U(c,e.k)&&(c.value=i),e.k&&(f[e.k]=i))};if(i){const P=()=>{q(),wi.delete(e)};P.id=-1,wi.set(e,P),Yn(P,n)}else Rc(e),q()}}}function Rc(e){const t=wi.get(e);t&&(t.flags|=8,wi.delete(e))}const Pc=e=>e.nodeType===8;Ri().requestIdleCallback;Ri().cancelIdleCallback;function Qm(e,t){if(Pc(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Pc(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const ks=e=>!!e.type.__asyncLoader;function ni(e){Xe(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,hydrate:s,timeout:i,suspensible:l=!0,onError:c}=e;let p=null,f,g=0;const T=()=>(g++,p=null,k()),k=()=>{let U;return p||(U=p=t().catch(H=>{if(H=H instanceof Error?H:new Error(String(H)),c)return new Promise((X,q)=>{c(H,()=>X(T()),()=>q(H),g+1)});throw H}).then(H=>U!==p&&p?p:(H&&(H.__esModule||H[Symbol.toStringTag]==="Module")&&(H=H.default),f=H,H)))};return In({name:"AsyncComponentWrapper",__asyncLoader:k,__asyncHydrate(U,H,X){let q=!1;(H.bu||(H.bu=[])).push(()=>q=!0);const P=()=>{q||X()},F=s?()=>{const z=s(P,de=>Qm(U,de));z&&(H.bum||(H.bum=[])).push(z)}:P;f?F():k().then(()=>!H.isUnmounted&&F())},get __asyncResolved(){return f},setup(){const U=An;if(Gu(U),f)return()=>ri(f,U);const H=F=>{p=null,Sa(F,U,13,!r)};if(l&&U.suspense||As)return k().then(F=>()=>ri(F,U)).catch(F=>(H(F),()=>r?Be(r,{error:F}):null));const X=M(!1),q=M(),P=M(!!o);return o&&setTimeout(()=>{P.value=!1},o),i!=null&&setTimeout(()=>{if(!X.value&&!q.value){const F=new Error(`Async component timed out after ${i}ms.`);H(F),q.value=F}},i),k().then(()=>{X.value=!0,U.parent&&ka(U.parent.vnode)&&U.parent.update()}).catch(F=>{H(F),q.value=F}),()=>{if(X.value&&f)return ri(f,U);if(q.value&&r)return Be(r,{error:q.value});if(n&&!P.value)return ri(n,U)}}})}function ri(e,t){const{ref:n,props:r,children:o,ce:s}=t.vnode,i=Be(e,r,o);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const ka=e=>e.type.__isKeepAlive;function Xm(e,t){up(e,"a",t)}function Zm(e,t){up(e,"da",t)}function up(e,t,n=An){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Oi(t,r,n),n){let o=n.parent;for(;o&&o.parent;)ka(o.parent.vnode)&&ev(r,t,n,o),o=o.parent}}function ev(e,t,n,r){const o=Oi(t,e,r,!0);Di(()=>{Lu(r[t],o)},n)}function Oi(e,t,n=An,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{lo();const l=xa(n),c=$r(t,n,e,i);return l(),uo(),c});return r?o.unshift(s):o.push(s),s}}const po=e=>(t,n=An)=>{(!As||e==="sp")&&Oi(e,(...r)=>t(...r),n)},tv=po("bm"),$o=po("m"),nv=po("bu"),rv=po("u"),Xo=po("bum"),Di=po("um"),ov=po("sp"),sv=po("rtg"),av=po("rtc");function iv(e,t=An){Oi("ec",e,t)}const lv="components",cp=Symbol.for("v-ndc");function Ku(e){return Dt(e)?uv(lv,e,!1)||e:e||cp}function uv(e,t,n=!0,r=!1){const o=En||An;if(o){const s=o.type;{const l=Gv(s,!1);if(l&&(l===t||l===Xn(t)||l===Ii(Xn(t))))return s}const i=$c(o[e]||s[e],t)||$c(o.appContext[e],t);return!i&&r?s:i}}function $c(e,t){return e&&(e[t]||e[Xn(t)]||e[Ii(Xn(t))])}function Ot(e,t,n,r){let o;const s=n,i=ze(e);if(i||Dt(e)){const l=i&&Qo(e);let c=!1,p=!1;l&&(c=!_r(e),p=co(e),e=Pi(e)),o=new Array(e.length);for(let f=0,g=e.length;f<g;f++)o[f]=t(c?p?Cs(Pr(e[f])):Pr(e[f]):e[f],f,void 0,s)}else if(typeof e=="number"){o=new Array(e);for(let l=0;l<e;l++)o[l]=t(l+1,l,void 0,s)}else if(kt(e))if(e[Symbol.iterator])o=Array.from(e,(l,c)=>t(l,c,void 0,s));else{const l=Object.keys(e);o=new Array(l.length);for(let c=0,p=l.length;c<p;c++){const f=l[c];o[c]=t(e[f],f,c,s)}}else o=[];return o}function zr(e,t,n={},r,o){if(En.ce||En.parent&&ks(En.parent)&&En.parent.ce){const p=Object.keys(n).length>0;return t!=="default"&&(n.name=t),S(),ot(qe,null,[Be("slot",n,r)],p?-2:64)}let s=e[t];s&&s._c&&(s._d=!1),S();const i=s&&dp(s(n)),l=n.key||i&&i.key,c=ot(qe,{key:(l&&!Rr(l)?l:`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return s&&s._c&&(s._d=!0),c}function dp(e){return e.some(t=>va(t)?!(t.type===Nn||t.type===qe&&!dp(t.children)):!0)?e:null}const gu=e=>e?Rp(e)?ji(e):gu(e.parent):null,ia=cn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>gu(e.parent),$root:e=>gu(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>pp(e),$forceUpdate:e=>e.f||(e.f=()=>{zu(e.update)}),$nextTick:e=>e.n||(e.n=Gt.bind(e.proxy)),$watch:e=>Vm.bind(e)}),Ll=(e,t)=>e!==Et&&!e.__isScriptSetup&&St(e,t),cv={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:l,appContext:c}=e;if(t[0]!=="$"){const T=i[t];if(T!==void 0)switch(T){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(Ll(r,t))return i[t]=1,r[t];if(o!==Et&&St(o,t))return i[t]=2,o[t];if(St(s,t))return i[t]=3,s[t];if(n!==Et&&St(n,t))return i[t]=4,n[t];yu&&(i[t]=0)}}const p=ia[t];let f,g;if(p)return t==="$attrs"&&Ln(e.attrs,"get",""),p(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==Et&&St(n,t))return i[t]=4,n[t];if(g=c.config.globalProperties,St(g,t))return g[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return Ll(o,t)?(o[t]=n,!0):r!==Et&&St(r,t)?(r[t]=n,!0):St(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,props:s,type:i}},l){let c;return!!(n[l]||e!==Et&&l[0]!=="$"&&St(e,l)||Ll(t,l)||St(s,l)||St(r,l)||St(ia,l)||St(o.config.globalProperties,l)||(c=i.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:St(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function dv(){return fv().slots}function fv(e){const t=Zu();return t.setupContext||(t.setupContext=$p(t))}function Oc(e){return ze(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let yu=!0;function pv(e){const t=pp(e),n=e.proxy,r=e.ctx;yu=!1,t.beforeCreate&&Dc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:l,provide:c,inject:p,created:f,beforeMount:g,mounted:T,beforeUpdate:k,updated:U,activated:H,deactivated:X,beforeDestroy:q,beforeUnmount:P,destroyed:F,unmounted:z,render:de,renderTracked:ue,renderTriggered:we,errorCaptured:ke,serverPrefetch:me,expose:Ie,inheritAttrs:Oe,components:Y,directives:ve,filters:Fe}=t;if(p&&hv(p,r,null),i)for(const Te in i){const _e=i[Te];Xe(_e)&&(r[Te]=_e.bind(n))}if(o){const Te=o.call(n,n);kt(Te)&&(e.data=$i(Te))}if(yu=!0,s)for(const Te in s){const _e=s[Te],He=Xe(_e)?_e.bind(n,n):Xe(_e.get)?_e.get.bind(n,n):Gr,Ke=!Xe(_e)&&Xe(_e.set)?_e.set.bind(n):Gr,Ve=re({get:He,set:Ke});Object.defineProperty(r,Te,{enumerable:!0,configurable:!0,get:()=>Ve.value,set:Ye=>Ve.value=Ye})}if(l)for(const Te in l)fp(l[Te],r,n,Te);if(c){const Te=Xe(c)?c.call(n):c;Reflect.ownKeys(Te).forEach(_e=>{pi(_e,Te[_e])})}f&&Dc(f,e,"c");function Me(Te,_e){ze(_e)?_e.forEach(He=>Te(He.bind(n))):_e&&Te(_e.bind(n))}if(Me(tv,g),Me($o,T),Me(nv,k),Me(rv,U),Me(Xm,H),Me(Zm,X),Me(iv,ke),Me(av,ue),Me(sv,we),Me(Xo,P),Me(Di,z),Me(ov,me),ze(Ie))if(Ie.length){const Te=e.exposed||(e.exposed={});Ie.forEach(_e=>{Object.defineProperty(Te,_e,{get:()=>n[_e],set:He=>n[_e]=He,enumerable:!0})})}else e.exposed||(e.exposed={});de&&e.render===Gr&&(e.render=de),Oe!=null&&(e.inheritAttrs=Oe),Y&&(e.components=Y),ve&&(e.directives=ve),me&&Gu(e)}function hv(e,t,n=Gr){ze(e)&&(e=wu(e));for(const r in e){const o=e[r];let s;kt(o)?"default"in o?s=Mr(o.from||r,o.default,!0):s=Mr(o.from||r):s=Mr(o),jn(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s}}function Dc(e,t,n){$r(ze(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function fp(e,t,n,r){let o=r.includes(".")?tp(n,r):()=>n[r];if(Dt(e)){const s=t[e];Xe(s)&&it(o,s)}else if(Xe(e))it(o,e.bind(n));else if(kt(e))if(ze(e))e.forEach(s=>fp(s,t,n,r));else{const s=Xe(e.handler)?e.handler.bind(n):t[e.handler];Xe(s)&&it(o,s,e)}}function pp(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:!o.length&&!n&&!r?c=t:(c={},o.length&&o.forEach(p=>bi(c,p,i,!0)),bi(c,t,i)),kt(t)&&s.set(t,c),c}function bi(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&bi(e,s,n,!0),o&&o.forEach(i=>bi(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const l=mv[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const mv={data:Lc,props:Nc,emits:Nc,methods:ta,computed:ta,beforeCreate:Kn,created:Kn,beforeMount:Kn,mounted:Kn,beforeUpdate:Kn,updated:Kn,beforeDestroy:Kn,beforeUnmount:Kn,destroyed:Kn,unmounted:Kn,activated:Kn,deactivated:Kn,errorCaptured:Kn,serverPrefetch:Kn,components:ta,directives:ta,watch:gv,provide:Lc,inject:vv};function Lc(e,t){return t?e?function(){return cn(Xe(e)?e.call(this,this):e,Xe(t)?t.call(this,this):t)}:t:e}function vv(e,t){return ta(wu(e),wu(t))}function wu(e){if(ze(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Kn(e,t){return e?[...new Set([].concat(e,t))]:t}function ta(e,t){return e?cn(Object.create(null),e,t):t}function Nc(e,t){return e?ze(e)&&ze(t)?[...new Set([...e,...t])]:cn(Object.create(null),Oc(e),Oc(t??{})):t}function gv(e,t){if(!e)return t;if(!t)return e;const n=cn(Object.create(null),e);for(const r in t)n[r]=Kn(e[r],t[r]);return n}function hp(){return{app:null,config:{isNativeTag:kf,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let yv=0;function wv(e,t){return function(r,o=null){Xe(r)||(r=cn({},r)),o!=null&&!kt(o)&&(o=null);const s=hp(),i=new WeakSet,l=[];let c=!1;const p=s.app={_uid:yv++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Yv,get config(){return s.config},set config(f){},use(f,...g){return i.has(f)||(f&&Xe(f.install)?(i.add(f),f.install(p,...g)):Xe(f)&&(i.add(f),f(p,...g))),p},mixin(f){return s.mixins.includes(f)||s.mixins.push(f),p},component(f,g){return g?(s.components[f]=g,p):s.components[f]},directive(f,g){return g?(s.directives[f]=g,p):s.directives[f]},mount(f,g,T){if(!c){const k=p._ceVNode||Be(r,o);return k.appContext=s,T===!0?T="svg":T===!1&&(T=void 0),e(k,f,T),c=!0,p._container=f,f.__vue_app__=p,ji(k.component)}},onUnmount(f){l.push(f)},unmount(){c&&($r(l,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(f,g){return s.provides[f]=g,p},runWithContext(f){const g=xs;xs=p;try{return f()}finally{xs=g}}};return p}}let xs=null;const bv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Xn(t)}Modifiers`]||e[`${Po(t)}Modifiers`];function Tv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Et;let o=n;const s=t.startsWith("update:"),i=s&&bv(r,t.slice(7));i&&(i.trim&&(o=n.map(f=>Dt(f)?f.trim():f)),i.number&&(o=n.map(Mi)));let l,c=r[l=Ml(t)]||r[l=Ml(Xn(t))];!c&&s&&(c=r[l=Ml(Po(t))]),c&&$r(c,e,6,o);const p=r[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,$r(p,e,6,o)}}const _v=new WeakMap;function mp(e,t,n=!1){const r=n?_v:t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},l=!1;if(!Xe(e)){const c=p=>{const f=mp(p,t,!0);f&&(l=!0,cn(i,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!s&&!l?(kt(e)&&r.set(e,null),null):(ze(s)?s.forEach(c=>i[c]=null):cn(i,s),kt(e)&&r.set(e,i),i)}function Li(e,t){return!e||!Ci(t)?!1:(t=t.slice(2).replace(/Once$/,""),St(e,t[0].toLowerCase()+t.slice(1))||St(e,Po(t))||St(e,t))}function jc(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:l,emit:c,render:p,renderCache:f,props:g,data:T,setupState:k,ctx:U,inheritAttrs:H}=e,X=yi(e);let q,P;try{if(n.shapeFlag&4){const z=o||r,de=z;q=Vr(p.call(de,z,f,g,k,T,U)),P=l}else{const z=t;q=Vr(z.length>1?z(g,{attrs:l,slots:i,emit:c}):z(g,null)),P=t.props?l:Sv(l)}}catch(z){la.length=0,Sa(z,e,1),q=Be(Nn)}let F=q;if(P&&H!==!1){const z=Object.keys(P),{shapeFlag:de}=F;z.length&&de&7&&(s&&z.some(Ai)&&(P=kv(P,s)),F=Ro(F,P,!1,!0))}return n.dirs&&(F=Ro(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(n.dirs):n.dirs),n.transition&&ha(F,n.transition),q=F,yi(X),q}const Sv=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ci(n))&&((t||(t={}))[n]=e[n]);return t},kv=(e,t)=>{const n={};for(const r in e)(!Ai(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function xv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:l,patchFlag:c}=t,p=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Fc(r,i,p):!!i;if(c&8){const f=t.dynamicProps;for(let g=0;g<f.length;g++){const T=f[g];if(vp(i,r,T)&&!Li(p,T))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:r===i?!1:r?i?Fc(r,i,p):!0:!!i;return!1}function Fc(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(vp(t,e,s)&&!Li(n,s))return!0}return!1}function vp(e,t,n){const r=e[n],o=t[n];return n==="style"&&kt(r)&&kt(o)?!$s(r,o):r!==o}function Cv({vnode:e,parent:t,suspense:n},r){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=r,e=o),o===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}const gp={},yp=()=>Object.create(gp),wp=e=>Object.getPrototypeOf(e)===gp;function Av(e,t,n,r=!1){const o={},s=yp();e.propsDefaults=Object.create(null),bp(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=r?o:zf(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function Ev(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,l=gt(o),[c]=e.propsOptions;let p=!1;if((r||i>0)&&!(i&16)){if(i&8){const f=e.vnode.dynamicProps;for(let g=0;g<f.length;g++){let T=f[g];if(Li(e.emitsOptions,T))continue;const k=t[T];if(c)if(St(s,T))k!==s[T]&&(s[T]=k,p=!0);else{const U=Xn(T);o[U]=bu(c,l,U,k,e,!1)}else k!==s[T]&&(s[T]=k,p=!0)}}}else{bp(e,t,o,s)&&(p=!0);let f;for(const g in l)(!t||!St(t,g)&&((f=Po(g))===g||!St(t,f)))&&(c?n&&(n[g]!==void 0||n[f]!==void 0)&&(o[g]=bu(c,l,g,void 0,e,!0)):delete o[g]);if(s!==l)for(const g in s)(!t||!St(t,g))&&(delete s[g],p=!0)}p&&no(e.attrs,"set","")}function bp(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,l;if(t)for(let c in t){if(ra(c))continue;const p=t[c];let f;o&&St(o,f=Xn(c))?!s||!s.includes(f)?n[f]=p:(l||(l={}))[f]=p:Li(e.emitsOptions,c)||(!(c in r)||p!==r[c])&&(r[c]=p,i=!0)}if(s){const c=gt(n),p=l||Et;for(let f=0;f<s.length;f++){const g=s[f];n[g]=bu(o,c,g,p[g],e,!St(p,g))}}return i}function bu(e,t,n,r,o,s){const i=e[n];if(i!=null){const l=St(i,"default");if(l&&r===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&Xe(c)){const{propsDefaults:p}=o;if(n in p)r=p[n];else{const f=xa(o);r=p[n]=c.call(null,t),f()}}else r=c;o.ce&&o.ce._setProp(n,r)}i[0]&&(s&&!l?r=!1:i[1]&&(r===""||r===Po(n))&&(r=!0))}return r}const Iv=new WeakMap;function Tp(e,t,n=!1){const r=n?Iv:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},l=[];let c=!1;if(!Xe(e)){const f=g=>{c=!0;const[T,k]=Tp(g,t,!0);cn(i,T),k&&l.push(...k)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!s&&!c)return kt(e)&&r.set(e,Ts),Ts;if(ze(s))for(let f=0;f<s.length;f++){const g=Xn(s[f]);Bc(g)&&(i[g]=Et)}else if(s)for(const f in s){const g=Xn(f);if(Bc(g)){const T=s[f],k=i[g]=ze(T)||Xe(T)?{type:T}:cn({},T),U=k.type;let H=!1,X=!0;if(ze(U))for(let q=0;q<U.length;++q){const P=U[q],F=Xe(P)&&P.name;if(F==="Boolean"){H=!0;break}else F==="String"&&(X=!1)}else H=Xe(U)&&U.name==="Boolean";k[0]=H,k[1]=X,(H||St(k,"default"))&&l.push(g)}}const p=[i,l];return kt(e)&&r.set(e,p),p}function Bc(e){return e[0]!=="$"&&!ra(e)}const Yu=e=>e==="_"||e==="_ctx"||e==="$stable",Ju=e=>ze(e)?e.map(Vr):[Vr(e)],Mv=(e,t,n)=>{if(t._n)return t;const r=Tt((...o)=>Ju(t(...o)),n);return r._c=!1,r},_p=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Yu(o))continue;const s=e[o];if(Xe(s))t[o]=Mv(o,s,r);else if(s!=null){const i=Ju(s);t[o]=()=>i}}},Sp=(e,t)=>{const n=Ju(t);e.slots.default=()=>n},kp=(e,t,n)=>{for(const r in t)(n||!Yu(r))&&(e[r]=t[r])},Rv=(e,t,n)=>{const r=e.slots=yp();if(e.vnode.shapeFlag&32){const o=t._;o?(kp(r,t,n),n&&Ef(r,"_",o,!0)):_p(t,r)}else t&&Sp(e,t)},Pv=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=Et;if(r.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:kp(o,t,n):(s=!t.$stable,_p(t,o)),i=t}else t&&(Sp(e,t),i={default:1});if(s)for(const l in o)!Yu(l)&&i[l]==null&&delete o[l]},Yn=Nv;function $v(e){return Ov(e)}function Ov(e,t){const n=Ri();n.__VUE__=!0;const{insert:r,remove:o,patchProp:s,createElement:i,createText:l,createComment:c,setText:p,setElementText:f,parentNode:g,nextSibling:T,setScopeId:k=Gr,insertStaticContent:U}=e,H=(_,A,B,G=null,ne=null,ee=null,le=void 0,fe=null,ce=!!A.dynamicChildren)=>{if(_===A)return;_&&!Go(_,A)&&(G=Q(_),Ye(_,ne,ee,!0),_=null),A.patchFlag===-2&&(ce=!1,A.dynamicChildren=null);const{type:oe,ref:Ee,shapeFlag:ye}=A;switch(oe){case Ni:X(_,A,B,G);break;case Nn:q(_,A,B,G);break;case jl:_==null&&P(A,B,G,le);break;case qe:Y(_,A,B,G,ne,ee,le,fe,ce);break;default:ye&1?de(_,A,B,G,ne,ee,le,fe,ce):ye&6?ve(_,A,B,G,ne,ee,le,fe,ce):(ye&64||ye&128)&&oe.process(_,A,B,G,ne,ee,le,fe,ce,Pe)}Ee!=null&&ne?aa(Ee,_&&_.ref,ee,A||_,!A):Ee==null&&_&&_.ref!=null&&aa(_.ref,null,ee,_,!0)},X=(_,A,B,G)=>{if(_==null)r(A.el=l(A.children),B,G);else{const ne=A.el=_.el;A.children!==_.children&&p(ne,A.children)}},q=(_,A,B,G)=>{_==null?r(A.el=c(A.children||""),B,G):A.el=_.el},P=(_,A,B,G)=>{[_.el,_.anchor]=U(_.children,A,B,G,_.el,_.anchor)},F=({el:_,anchor:A},B,G)=>{let ne;for(;_&&_!==A;)ne=T(_),r(_,B,G),_=ne;r(A,B,G)},z=({el:_,anchor:A})=>{let B;for(;_&&_!==A;)B=T(_),o(_),_=B;o(A)},de=(_,A,B,G,ne,ee,le,fe,ce)=>{if(A.type==="svg"?le="svg":A.type==="math"&&(le="mathml"),_==null)ue(A,B,G,ne,ee,le,fe,ce);else{const oe=_.el&&_.el._isVueCE?_.el:null;try{oe&&oe._beginPatch(),me(_,A,ne,ee,le,fe,ce)}finally{oe&&oe._endPatch()}}},ue=(_,A,B,G,ne,ee,le,fe)=>{let ce,oe;const{props:Ee,shapeFlag:ye,transition:he,dirs:De}=_;if(ce=_.el=i(_.type,ee,Ee&&Ee.is,Ee),ye&8?f(ce,_.children):ye&16&&ke(_.children,ce,null,G,ne,Nl(_,ee),le,fe),De&&Fo(_,null,G,"created"),we(ce,_,_.scopeId,le,G),Ee){for(const D in Ee)D!=="value"&&!ra(D)&&s(ce,D,null,Ee[D],ee,G);"value"in Ee&&s(ce,"value",null,Ee.value,ee),(oe=Ee.onVnodeBeforeMount)&&Br(oe,G,_)}De&&Fo(_,null,G,"beforeMount");const $=Dv(ne,he);$&&he.beforeEnter(ce),r(ce,A,B),((oe=Ee&&Ee.onVnodeMounted)||$||De)&&Yn(()=>{try{oe&&Br(oe,G,_),$&&he.enter(ce),De&&Fo(_,null,G,"mounted")}finally{}},ne)},we=(_,A,B,G,ne)=>{if(B&&k(_,B),G)for(let ee=0;ee<G.length;ee++)k(_,G[ee]);if(ne){let ee=ne.subTree;if(A===ee||Ap(ee.type)&&(ee.ssContent===A||ee.ssFallback===A)){const le=ne.vnode;we(_,le,le.scopeId,le.slotScopeIds,ne.parent)}}},ke=(_,A,B,G,ne,ee,le,fe,ce=0)=>{for(let oe=ce;oe<_.length;oe++){const Ee=_[oe]=fe?to(_[oe]):Vr(_[oe]);H(null,Ee,A,B,G,ne,ee,le,fe)}},me=(_,A,B,G,ne,ee,le)=>{const fe=A.el=_.el;let{patchFlag:ce,dynamicChildren:oe,dirs:Ee}=A;ce|=_.patchFlag&16;const ye=_.props||Et,he=A.props||Et;let De;if(B&&Bo(B,!1),(De=he.onVnodeBeforeUpdate)&&Br(De,B,A,_),Ee&&Fo(A,_,B,"beforeUpdate"),B&&Bo(B,!0),(ye.innerHTML&&he.innerHTML==null||ye.textContent&&he.textContent==null)&&f(fe,""),oe?Ie(_.dynamicChildren,oe,fe,B,G,Nl(A,ne),ee):le||_e(_,A,fe,null,B,G,Nl(A,ne),ee,!1),ce>0){if(ce&16)Oe(fe,ye,he,B,ne);else if(ce&2&&ye.class!==he.class&&s(fe,"class",null,he.class,ne),ce&4&&s(fe,"style",ye.style,he.style,ne),ce&8){const $=A.dynamicProps;for(let D=0;D<$.length;D++){const N=$[D],V=ye[N],te=he[N];(te!==V||N==="value")&&s(fe,N,V,te,ne,B)}}ce&1&&_.children!==A.children&&f(fe,A.children)}else!le&&oe==null&&Oe(fe,ye,he,B,ne);((De=he.onVnodeUpdated)||Ee)&&Yn(()=>{De&&Br(De,B,A,_),Ee&&Fo(A,_,B,"updated")},G)},Ie=(_,A,B,G,ne,ee,le)=>{for(let fe=0;fe<A.length;fe++){const ce=_[fe],oe=A[fe],Ee=ce.el&&(ce.type===qe||!Go(ce,oe)||ce.shapeFlag&198)?g(ce.el):B;H(ce,oe,Ee,null,G,ne,ee,le,!0)}},Oe=(_,A,B,G,ne)=>{if(A!==B){if(A!==Et)for(const ee in A)!ra(ee)&&!(ee in B)&&s(_,ee,A[ee],null,ne,G);for(const ee in B){if(ra(ee))continue;const le=B[ee],fe=A[ee];le!==fe&&ee!=="value"&&s(_,ee,fe,le,ne,G)}"value"in B&&s(_,"value",A.value,B.value,ne)}},Y=(_,A,B,G,ne,ee,le,fe,ce)=>{const oe=A.el=_?_.el:l(""),Ee=A.anchor=_?_.anchor:l("");let{patchFlag:ye,dynamicChildren:he,slotScopeIds:De}=A;De&&(fe=fe?fe.concat(De):De),_==null?(r(oe,B,G),r(Ee,B,G),ke(A.children||[],B,Ee,ne,ee,le,fe,ce)):ye>0&&ye&64&&he&&_.dynamicChildren&&_.dynamicChildren.length===he.length?(Ie(_.dynamicChildren,he,B,ne,ee,le,fe),(A.key!=null||ne&&A===ne.subTree)&&Qu(_,A,!0)):_e(_,A,B,Ee,ne,ee,le,fe,ce)},ve=(_,A,B,G,ne,ee,le,fe,ce)=>{A.slotScopeIds=fe,_==null?A.shapeFlag&512?ne.ctx.activate(A,B,G,le,ce):Fe(A,B,G,ne,ee,le,ce):Le(_,A,ce)},Fe=(_,A,B,G,ne,ee,le)=>{const fe=_.component=Hv(_,G,ne);if(ka(_)&&(fe.ctx.renderer=Pe),Vv(fe,!1,le),fe.asyncDep){if(ne&&ne.registerDep(fe,Me,le),!_.el){const ce=fe.subTree=Be(Nn);q(null,ce,A,B),_.placeholder=ce.el}}else Me(fe,_,A,B,ne,ee,le)},Le=(_,A,B)=>{const G=A.component=_.component;if(xv(_,A,B))if(G.asyncDep&&!G.asyncResolved){Te(G,A,B);return}else G.next=A,G.update();else A.el=_.el,G.vnode=A},Me=(_,A,B,G,ne,ee,le)=>{const fe=()=>{if(_.isMounted){let{next:ye,bu:he,u:De,parent:$,vnode:D}=_;{const $e=xp(_);if($e){ye&&(ye.el=D.el,Te(_,ye,le)),$e.asyncDep.then(()=>{Yn(()=>{_.isUnmounted||oe()},ne)});return}}let N=ye,V;Bo(_,!1),ye?(ye.el=D.el,Te(_,ye,le)):ye=D,he&&fi(he),(V=ye.props&&ye.props.onVnodeBeforeUpdate)&&Br(V,$,ye,D),Bo(_,!0);const te=jc(_),be=_.subTree;_.subTree=te,H(be,te,g(be.el),Q(be),_,ne,ee),ye.el=te.el,N===null&&Cv(_,te.el),De&&Yn(De,ne),(V=ye.props&&ye.props.onVnodeUpdated)&&Yn(()=>Br(V,$,ye,D),ne)}else{let ye;const{el:he,props:De}=A,{bm:$,m:D,parent:N,root:V,type:te}=_,be=ks(A);Bo(_,!1),$&&fi($),!be&&(ye=De&&De.onVnodeBeforeMount)&&Br(ye,N,A),Bo(_,!0);{V.ce&&V.ce._hasShadowRoot()&&V.ce._injectChildStyle(te,_.parent?_.parent.type:void 0);const $e=_.subTree=jc(_);H(null,$e,B,G,_,ne,ee),A.el=$e.el}if(D&&Yn(D,ne),!be&&(ye=De&&De.onVnodeMounted)){const $e=A;Yn(()=>Br(ye,N,$e),ne)}(A.shapeFlag&256||N&&ks(N.vnode)&&N.vnode.shapeFlag&256)&&_.a&&Yn(_.a,ne),_.isMounted=!0,A=B=G=null}};_.scope.on();const ce=_.effect=new Pf(fe);_.scope.off();const oe=_.update=ce.run.bind(ce),Ee=_.job=ce.runIfDirty.bind(ce);Ee.i=_,Ee.id=_.uid,ce.scheduler=()=>zu(Ee),Bo(_,!0),oe()},Te=(_,A,B)=>{A.component=_;const G=_.vnode.props;_.vnode=A,_.next=null,Ev(_,A.props,G,B),Pv(_,A.children,B),lo(),Cc(_),uo()},_e=(_,A,B,G,ne,ee,le,fe,ce=!1)=>{const oe=_&&_.children,Ee=_?_.shapeFlag:0,ye=A.children,{patchFlag:he,shapeFlag:De}=A;if(he>0){if(he&128){Ke(oe,ye,B,G,ne,ee,le,fe,ce);return}else if(he&256){He(oe,ye,B,G,ne,ee,le,fe,ce);return}}De&8?(Ee&16&&Ne(oe,ne,ee),ye!==oe&&f(B,ye)):Ee&16?De&16?Ke(oe,ye,B,G,ne,ee,le,fe,ce):Ne(oe,ne,ee,!0):(Ee&8&&f(B,""),De&16&&ke(ye,B,G,ne,ee,le,fe,ce))},He=(_,A,B,G,ne,ee,le,fe,ce)=>{_=_||Ts,A=A||Ts;const oe=_.length,Ee=A.length,ye=Math.min(oe,Ee);let he;for(he=0;he<ye;he++){const De=A[he]=ce?to(A[he]):Vr(A[he]);H(_[he],De,B,null,ne,ee,le,fe,ce)}oe>Ee?Ne(_,ne,ee,!0,!1,ye):ke(A,B,G,ne,ee,le,fe,ce,ye)},Ke=(_,A,B,G,ne,ee,le,fe,ce)=>{let oe=0;const Ee=A.length;let ye=_.length-1,he=Ee-1;for(;oe<=ye&&oe<=he;){const De=_[oe],$=A[oe]=ce?to(A[oe]):Vr(A[oe]);if(Go(De,$))H(De,$,B,null,ne,ee,le,fe,ce);else break;oe++}for(;oe<=ye&&oe<=he;){const De=_[ye],$=A[he]=ce?to(A[he]):Vr(A[he]);if(Go(De,$))H(De,$,B,null,ne,ee,le,fe,ce);else break;ye--,he--}if(oe>ye){if(oe<=he){const De=he+1,$=De<Ee?A[De].el:G;for(;oe<=he;)H(null,A[oe]=ce?to(A[oe]):Vr(A[oe]),B,$,ne,ee,le,fe,ce),oe++}}else if(oe>he)for(;oe<=ye;)Ye(_[oe],ne,ee,!0),oe++;else{const De=oe,$=oe,D=new Map;for(oe=$;oe<=he;oe++){const at=A[oe]=ce?to(A[oe]):Vr(A[oe]);at.key!=null&&D.set(at.key,oe)}let N,V=0;const te=he-$+1;let be=!1,$e=0;const st=new Array(te);for(oe=0;oe<te;oe++)st[oe]=0;for(oe=De;oe<=ye;oe++){const at=_[oe];if(V>=te){Ye(at,ne,ee,!0);continue}let Pt;if(at.key!=null)Pt=D.get(at.key);else for(N=$;N<=he;N++)if(st[N-$]===0&&Go(at,A[N])){Pt=N;break}Pt===void 0?Ye(at,ne,ee,!0):(st[Pt-$]=oe+1,Pt>=$e?$e=Pt:be=!0,H(at,A[Pt],B,null,ne,ee,le,fe,ce),V++)}const ut=be?Lv(st):Ts;for(N=ut.length-1,oe=te-1;oe>=0;oe--){const at=$+oe,Pt=A[at],Lt=A[at+1],bn=at+1<Ee?Lt.el||Cp(Lt):G;st[oe]===0?H(null,Pt,B,bn,ne,ee,le,fe,ce):be&&(N<0||oe!==ut[N]?Ve(Pt,B,bn,2):N--)}}},Ve=(_,A,B,G,ne=null)=>{const{el:ee,type:le,transition:fe,children:ce,shapeFlag:oe}=_;if(oe&6){Ve(_.component.subTree,A,B,G);return}if(oe&128){_.suspense.move(A,B,G);return}if(oe&64){le.move(_,A,B,Pe);return}if(le===qe){r(ee,A,B);for(let ye=0;ye<ce.length;ye++)Ve(ce[ye],A,B,G);r(_.anchor,A,B);return}if(le===jl){F(_,A,B);return}if(G!==2&&oe&1&&fe)if(G===0)fe.beforeEnter(ee),r(ee,A,B),Yn(()=>fe.enter(ee),ne);else{const{leave:ye,delayLeave:he,afterLeave:De}=fe,$=()=>{_.ctx.isUnmounted?o(ee):r(ee,A,B)},D=()=>{ee._isLeaving&&ee[qr](!0),ye(ee,()=>{$(),De&&De()})};he?he(ee,$,D):D()}else r(ee,A,B)},Ye=(_,A,B,G=!1,ne=!1)=>{const{type:ee,props:le,ref:fe,children:ce,dynamicChildren:oe,shapeFlag:Ee,patchFlag:ye,dirs:he,cacheIndex:De,memo:$}=_;if(ye===-2&&(ne=!1),fe!=null&&(lo(),aa(fe,null,B,_,!0),uo()),De!=null&&(A.renderCache[De]=void 0),Ee&256){A.ctx.deactivate(_);return}const D=Ee&1&&he,N=!ks(_);let V;if(N&&(V=le&&le.onVnodeBeforeUnmount)&&Br(V,A,_),Ee&6)xt(_.component,B,G);else{if(Ee&128){_.suspense.unmount(B,G);return}D&&Fo(_,null,A,"beforeUnmount"),Ee&64?_.type.remove(_,A,B,Pe,G):oe&&!oe.hasOnce&&(ee!==qe||ye>0&&ye&64)?Ne(oe,A,B,!1,!0):(ee===qe&&ye&384||!ne&&Ee&16)&&Ne(ce,A,B),G&&yt(_)}const te=$!=null&&De==null;(N&&(V=le&&le.onVnodeUnmounted)||D||te)&&Yn(()=>{V&&Br(V,A,_),D&&Fo(_,null,A,"unmounted"),te&&(_.el=null)},B)},yt=_=>{const{type:A,el:B,anchor:G,transition:ne}=_;if(A===qe){Qe(B,G);return}if(A===jl){z(_);return}const ee=()=>{o(B),ne&&!ne.persisted&&ne.afterLeave&&ne.afterLeave()};if(_.shapeFlag&1&&ne&&!ne.persisted){const{leave:le,delayLeave:fe}=ne,ce=()=>le(B,ee);fe?fe(_.el,ee,ce):ce()}else ee()},Qe=(_,A)=>{let B;for(;_!==A;)B=T(_),o(_),_=B;o(A)},xt=(_,A,B)=>{const{bum:G,scope:ne,job:ee,subTree:le,um:fe,m:ce,a:oe}=_;Uc(ce),Uc(oe),G&&fi(G),ne.stop(),ee&&(ee.flags|=8,Ye(le,_,A,B)),fe&&Yn(fe,A),Yn(()=>{_.isUnmounted=!0},A)},Ne=(_,A,B,G=!1,ne=!1,ee=0)=>{for(let le=ee;le<_.length;le++)Ye(_[le],A,B,G,ne)},Q=_=>{if(_.shapeFlag&6)return Q(_.component.subTree);if(_.shapeFlag&128)return _.suspense.next();const A=T(_.anchor||_.el),B=A&&A[np];return B?T(B):A};let pe=!1;const ge=(_,A,B)=>{let G;_==null?A._vnode&&(Ye(A._vnode,null,null,!0),G=A._vnode.component):H(A._vnode||null,_,A,null,null,null,B),A._vnode=_,pe||(pe=!0,Cc(G),Qf(),pe=!1)},Pe={p:H,um:Ye,m:Ve,r:yt,mt:Fe,mc:ke,pc:_e,pbc:Ie,n:Q,o:e};return{render:ge,hydrate:void 0,createApp:wv(ge)}}function Nl({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Bo({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Dv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Qu(e,t,n=!1){const r=e.children,o=t.children;if(ze(r)&&ze(o))for(let s=0;s<r.length;s++){const i=r[s];let l=o[s];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[s]=to(o[s]),l.el=i.el),!n&&l.patchFlag!==-2&&Qu(i,l)),l.type===Ni&&(l.patchFlag===-1&&(l=o[s]=to(l)),l.el=i.el),l.type===Nn&&!l.el&&(l.el=i.el)}}function Lv(e){const t=e.slice(),n=[0];let r,o,s,i,l;const c=e.length;for(r=0;r<c;r++){const p=e[r];if(p!==0){if(o=n[n.length-1],e[o]<p){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<p?s=l+1:i=l;p<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function xp(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:xp(t)}function Uc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Cp(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Cp(t.subTree):null}const Ap=e=>e.__isSuspense;function Nv(e,t){t&&t.pendingBranch?ze(e)?t.effects.push(...e):t.effects.push(e):Um(e)}const qe=Symbol.for("v-fgt"),Ni=Symbol.for("v-txt"),Nn=Symbol.for("v-cmt"),jl=Symbol.for("v-stc"),la=[];let pr=null;function S(e=!1){la.push(pr=e?null:[])}function jv(){la.pop(),pr=la[la.length-1]||null}let ma=1;function Ti(e,t=!1){ma+=e,e<0&&pr&&t&&(pr.hasOnce=!0)}function Ep(e){return e.dynamicChildren=ma>0?pr||Ts:null,jv(),ma>0&&pr&&pr.push(e),e}function O(e,t,n,r,o,s){return Ep(v(e,t,n,r,o,s,!0))}function ot(e,t,n,r,o){return Ep(Be(e,t,n,r,o,!0))}function va(e){return e?e.__v_isVNode===!0:!1}function Go(e,t){return e.type===t.type&&e.key===t.key}const Ip=({key:e})=>e??null,hi=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Dt(e)||jn(e)||Xe(e)?{i:En,r:e,k:t,f:!!n}:e:null);function v(e,t=null,n=null,r=0,o=null,s=e===qe?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ip(t),ref:t&&hi(t),scopeId:Zf,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:En};return l?(Xu(c,n),s&128&&e.normalize(c)):n&&(c.shapeFlag|=Dt(n)?8:16),ma>0&&!i&&pr&&(c.patchFlag>0||s&6)&&c.patchFlag!==32&&pr.push(c),c}const Be=Fv;function Fv(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===cp)&&(e=Nn),va(e)){const l=Ro(e,t,!0);return n&&Xu(l,n),ma>0&&!s&&pr&&(l.shapeFlag&6?pr[pr.indexOf(e)]=l:pr.push(l)),l.patchFlag=-2,l}if(Kv(e)&&(e=e.__vccOpts),t){t=Bv(t);let{class:l,style:c}=t;l&&!Dt(l)&&(t.class=rt(l)),kt(c)&&(Wu(c)&&!ze(c)&&(c=cn({},c)),t.style=oo(c))}const i=Dt(e)?1:Ap(e)?128:rp(e)?64:kt(e)?4:Xe(e)?2:0;return v(e,t,n,r,o,i,s,!0)}function Bv(e){return e?Wu(e)||wp(e)?cn({},e):e:null}function Ro(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:l,transition:c}=e,p=t?Mp(o||{},t):o,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&Ip(p),ref:t&&t.ref?n&&s?ze(s)?s.concat(hi(t)):[s,hi(t)]:hi(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==qe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ro(e.ssContent),ssFallback:e.ssFallback&&Ro(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&ha(f,c.clone(f)),f}function so(e=" ",t=0){return Be(Ni,null,e,t)}function ie(e="",t=!1){return t?(S(),ot(Nn,null,e)):Be(Nn,null,e)}function Vr(e){return e==null||typeof e=="boolean"?Be(Nn):ze(e)?Be(qe,null,e.slice()):va(e)?to(e):Be(Ni,null,String(e))}function to(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ro(e)}function Xu(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ze(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Xu(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!wp(t)?t._ctx=En:o===3&&En&&(En.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Xe(t)?(t={default:t,_ctx:En},n=32):(t=String(t),r&64?(n=16,t=[so(t)]):n=8);e.children=t,e.shapeFlag|=n}function Mp(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=rt([t.class,r.class]));else if(o==="style")t.style=oo([t.style,r.style]);else if(Ci(o)){const s=t[o],i=r[o];i&&s!==i&&!(ze(s)&&s.includes(i))?t[o]=s?[].concat(s,i):i:i==null&&s==null&&!Ai(o)&&(t[o]=i)}else o!==""&&(t[o]=r[o])}return t}function Br(e,t,n,r=null){$r(e,t,7,[n,r])}const Uv=hp();let qv=0;function Hv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Uv,s={uid:qv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new dm(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Tp(r,o),emitsOptions:mp(r,o),emit:null,emitted:null,propsDefaults:Et,inheritAttrs:r.inheritAttrs,ctx:Et,data:Et,props:Et,attrs:Et,slots:Et,refs:Et,setupState:Et,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=Tv.bind(null,s),e.ce&&e.ce(s),s}let An=null;const Zu=()=>An||En;let _i,Tu;{const e=Ri(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),s=>{o.length>1?o.forEach(i=>i(s)):o[0](s)}};_i=t("__VUE_INSTANCE_SETTERS__",n=>An=n),Tu=t("__VUE_SSR_SETTERS__",n=>As=n)}const xa=e=>{const t=An;return _i(e),e.scope.on(),()=>{e.scope.off(),_i(t)}},qc=()=>{An&&An.scope.off(),_i(null)};function Rp(e){return e.vnode.shapeFlag&4}let As=!1;function Vv(e,t=!1,n=!1){t&&Tu(t);const{props:r,children:o}=e.vnode,s=Rp(e);Av(e,r,s,t),Rv(e,o,n||t);const i=s?Wv(e,t):void 0;return t&&Tu(!1),i}function Wv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,cv);const{setup:r}=n;if(r){lo();const o=e.setupContext=r.length>1?$p(e):null,s=xa(e),i=_a(r,e,0,[e.props,o]),l=xf(i);if(uo(),s(),(l||e.sp)&&!ks(e)&&Gu(e),l){if(i.then(qc,qc),t)return i.then(c=>{Hc(e,c)}).catch(c=>{Sa(c,e,0)});e.asyncDep=i}else Hc(e,i)}else Pp(e)}function Hc(e,t,n){Xe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:kt(t)&&(e.setupState=Kf(t)),Pp(e)}function Pp(e,t,n){const r=e.type;e.render||(e.render=r.render||Gr);{const o=xa(e);lo();try{pv(e)}finally{uo(),o()}}}const zv={get(e,t){return Ln(e,"get",""),e[t]}};function $p(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,zv),slots:e.slots,emit:e.emit,expose:t}}function ji(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Kf(Rm(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ia)return ia[n](e)},has(t,n){return n in t||n in ia}})):e.proxy}function Gv(e,t=!0){return Xe(e)?e.displayName||e.name:e.name||t&&e.__name}function Kv(e){return Xe(e)&&"__vccOpts"in e}const re=(e,t)=>Lm(e,t,As);function ec(e,t,n){try{Ti(-1);const r=arguments.length;return r===2?kt(t)&&!ze(t)?va(t)?Be(e,null,[t]):Be(e,t):Be(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&va(n)&&(n=[n]),Be(e,t,n))}finally{Ti(1)}}const Yv="3.5.33";/**
15
- * @vue/runtime-dom v3.5.33
16
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
17
- * @license MIT
18
- **/let _u;const Vc=typeof window<"u"&&window.trustedTypes;if(Vc)try{_u=Vc.createPolicy("vue",{createHTML:e=>e})}catch{}const Op=_u?e=>_u.createHTML(e):e=>e,Jv="http://www.w3.org/2000/svg",Qv="http://www.w3.org/1998/Math/MathML",eo=typeof document<"u"?document:null,Wc=eo&&eo.createElement("template"),Xv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?eo.createElementNS(Jv,e):t==="mathml"?eo.createElementNS(Qv,e):n?eo.createElement(e,{is:n}):eo.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>eo.createTextNode(e),createComment:e=>eo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>eo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Wc.innerHTML=Op(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const l=Wc.content;if(r==="svg"||r==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},To="transition",Js="animation",ga=Symbol("_vtc"),Dp={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Zv=cn({},op,Dp),eg=e=>(e.displayName="Transition",e.props=Zv,e),Lp=eg((e,{slots:t})=>ec(Jm,tg(e),t)),Uo=(e,t=[])=>{ze(e)?e.forEach(n=>n(...t)):e&&e(...t)},zc=e=>e?ze(e)?e.some(t=>t.length>1):e.length>1:!1;function tg(e){const t={};for(const Y in e)Y in Dp||(t[Y]=e[Y]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:p=i,appearToClass:f=l,leaveFromClass:g=`${n}-leave-from`,leaveActiveClass:T=`${n}-leave-active`,leaveToClass:k=`${n}-leave-to`}=e,U=ng(o),H=U&&U[0],X=U&&U[1],{onBeforeEnter:q,onEnter:P,onEnterCancelled:F,onLeave:z,onLeaveCancelled:de,onBeforeAppear:ue=q,onAppear:we=P,onAppearCancelled:ke=F}=t,me=(Y,ve,Fe,Le)=>{Y._enterCancelled=Le,qo(Y,ve?f:l),qo(Y,ve?p:i),Fe&&Fe()},Ie=(Y,ve)=>{Y._isLeaving=!1,qo(Y,g),qo(Y,k),qo(Y,T),ve&&ve()},Oe=Y=>(ve,Fe)=>{const Le=Y?we:P,Me=()=>me(ve,Y,Fe);Uo(Le,[ve,Me]),Gc(()=>{qo(ve,Y?c:s),Xr(ve,Y?f:l),zc(Le)||Kc(ve,r,H,Me)})};return cn(t,{onBeforeEnter(Y){Uo(q,[Y]),Xr(Y,s),Xr(Y,i)},onBeforeAppear(Y){Uo(ue,[Y]),Xr(Y,c),Xr(Y,p)},onEnter:Oe(!1),onAppear:Oe(!0),onLeave(Y,ve){Y._isLeaving=!0;const Fe=()=>Ie(Y,ve);Xr(Y,g),Y._enterCancelled?(Xr(Y,T),Qc(Y)):(Qc(Y),Xr(Y,T)),Gc(()=>{Y._isLeaving&&(qo(Y,g),Xr(Y,k),zc(z)||Kc(Y,r,X,Fe))}),Uo(z,[Y,Fe])},onEnterCancelled(Y){me(Y,!1,void 0,!0),Uo(F,[Y])},onAppearCancelled(Y){me(Y,!0,void 0,!0),Uo(ke,[Y])},onLeaveCancelled(Y){Ie(Y),Uo(de,[Y])}})}function ng(e){if(e==null)return null;if(kt(e))return[Fl(e.enter),Fl(e.leave)];{const t=Fl(e);return[t,t]}}function Fl(e){return rm(e)}function Xr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ga]||(e[ga]=new Set)).add(t)}function qo(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[ga];n&&(n.delete(t),n.size||(e[ga]=void 0))}function Gc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let rg=0;function Kc(e,t,n,r){const o=e._endId=++rg,s=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=og(e,t);if(!i)return r();const p=i+"end";let f=0;const g=()=>{e.removeEventListener(p,T),s()},T=k=>{k.target===e&&++f>=c&&g()};setTimeout(()=>{f<c&&g()},l+1),e.addEventListener(p,T)}function og(e,t){const n=window.getComputedStyle(e),r=U=>(n[U]||"").split(", "),o=r(`${To}Delay`),s=r(`${To}Duration`),i=Yc(o,s),l=r(`${Js}Delay`),c=r(`${Js}Duration`),p=Yc(l,c);let f=null,g=0,T=0;t===To?i>0&&(f=To,g=i,T=s.length):t===Js?p>0&&(f=Js,g=p,T=c.length):(g=Math.max(i,p),f=g>0?i>p?To:Js:null,T=f?f===To?s.length:c.length:0);const k=f===To&&/\b(?:transform|all)(?:,|$)/.test(r(`${To}Property`).toString());return{type:f,timeout:g,propCount:T,hasTransform:k}}function Yc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Jc(n)+Jc(e[r])))}function Jc(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Qc(e){return(e?e.ownerDocument:document).body.offsetHeight}function sg(e,t,n){const r=e[ga];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Xc=Symbol("_vod"),ag=Symbol("_vsh"),ig=Symbol(""),lg=/(?:^|;)\s*display\s*:/;function ug(e,t,n){const r=e.style,o=Dt(n);let s=!1;if(n&&!o){if(t)if(Dt(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&na(r,l,"")}else for(const i in t)n[i]==null&&na(r,i,"");for(const i in n){i==="display"&&(s=!0);const l=n[i];l!=null?dg(e,i,!Dt(t)&&t?t[i]:void 0,l)||na(r,i,l):na(r,i,"")}}else if(o){if(t!==n){const i=r[ig];i&&(n+=";"+i),r.cssText=n,s=lg.test(n)}}else t&&e.removeAttribute("style");Xc in e&&(e[Xc]=s?r.display:"",e[ag]&&(r.display="none"))}const Zc=/\s*!important$/;function na(e,t,n){if(ze(n))n.forEach(r=>na(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=cg(e,t);Zc.test(n)?e.setProperty(Po(r),n.replace(Zc,""),"important"):e[r]=n}}const ed=["Webkit","Moz","ms"],Bl={};function cg(e,t){const n=Bl[t];if(n)return n;let r=Xn(t);if(r!=="filter"&&r in e)return Bl[t]=r;r=Ii(r);for(let o=0;o<ed.length;o++){const s=ed[o]+r;if(s in e)return Bl[t]=s}return t}function dg(e,t,n,r){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Dt(r)&&n===r}const td="http://www.w3.org/1999/xlink";function nd(e,t,n,r,o,s=um(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(td,t.slice(6,t.length)):e.setAttributeNS(td,t,n):n==null||s&&!If(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Rr(n)?String(n):n)}function rd(e,t,n,r,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Op(n):n);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const l=s==="OPTION"?e.getAttribute("value")||"":e.value,c=n==null?e.type==="checkbox"?"on":"":String(n);(l!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=If(n):n==null&&l==="string"?(n="",i=!0):l==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(o||t)}function Io(e,t,n,r){e.addEventListener(t,n,r)}function fg(e,t,n,r){e.removeEventListener(t,n,r)}const od=Symbol("_vei");function pg(e,t,n,r,o=null){const s=e[od]||(e[od]={}),i=s[t];if(r&&i)i.value=r;else{const[l,c]=hg(t);if(r){const p=s[t]=gg(r,o);Io(e,l,p,c)}else i&&(fg(e,l,i,c),s[t]=void 0)}}const sd=/(?:Once|Passive|Capture)$/;function hg(e){let t;if(sd.test(e)){t={};let r;for(;r=e.match(sd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Po(e.slice(2)),t]}let Ul=0;const mg=Promise.resolve(),vg=()=>Ul||(mg.then(()=>Ul=0),Ul=Date.now());function gg(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;$r(yg(r,n.value),t,5,[r])};return n.value=e,n.attached=vg(),n}function yg(e,t){if(ze(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const ad=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,wg=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?sg(e,r,i):t==="style"?ug(e,n,r):Ci(t)?Ai(t)||pg(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):bg(e,t,r,i))?(rd(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&nd(e,t,r,i,s,t!=="value")):e._isVueCE&&(Tg(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Dt(r)))?rd(e,Xn(t),r,s,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),nd(e,t,r,i))};function bg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&ad(t)&&Xe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return ad(t)&&Dt(n)?!1:t in e}function Tg(e,t){const n=e._def.props;if(!n)return!1;const r=Xn(t);return Array.isArray(n)?n.some(o=>Xn(o)===r):Object.keys(n).some(o=>Xn(o)===r)}const Es=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ze(t)?n=>fi(t,n):t};function _g(e){e.target.composing=!0}function id(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ao=Symbol("_assign");function ld(e,t,n){return t&&(e=e.trim()),n&&(e=Mi(e)),e}const wn={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[ao]=Es(o);const s=r||o.props&&o.props.type==="number";Io(e,t?"change":"input",i=>{i.target.composing||e[ao](ld(e.value,n,s))}),(n||s)&&Io(e,"change",()=>{e.value=ld(e.value,n,s)}),t||(Io(e,"compositionstart",_g),Io(e,"compositionend",id),Io(e,"change",id))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:o,number:s}},i){if(e[ao]=Es(i),e.composing)return;const l=(s||e.type==="number")&&!/^0\d/.test(e.value)?Mi(e.value):e.value,c=t??"";if(l===c)return;const p=e.getRootNode();(p instanceof Document||p instanceof ShadowRoot)&&p.activeElement===e&&e.type!=="range"&&(r&&t===n||o&&e.value.trim()===c)||(e.value=c)}},Sg={deep:!0,created(e,t,n){e[ao]=Es(n),Io(e,"change",()=>{const r=e._modelValue,o=ya(e),s=e.checked,i=e[ao];if(ze(r)){const l=ju(r,o),c=l!==-1;if(s&&!c)i(r.concat(o));else if(!s&&c){const p=[...r];p.splice(l,1),i(p)}}else if(Ps(r)){const l=new Set(r);s?l.add(o):l.delete(o),i(l)}else i(Np(e,s))})},mounted:ud,beforeUpdate(e,t,n){e[ao]=Es(n),ud(e,t,n)}};function ud(e,{value:t,oldValue:n},r){e._modelValue=t;let o;if(ze(t))o=ju(t,r.props.value)>-1;else if(Ps(t))o=t.has(r.props.value);else{if(t===n)return;o=$s(t,Np(e,!0))}e.checked!==o&&(e.checked=o)}const kg={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const o=Ps(t);Io(e,"change",()=>{const s=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?Mi(ya(i)):ya(i));e[ao](e.multiple?o?new Set(s):s:s[0]),e._assigning=!0,Gt(()=>{e._assigning=!1})}),e[ao]=Es(r)},mounted(e,{value:t}){cd(e,t)},beforeUpdate(e,t,n){e[ao]=Es(n)},updated(e,{value:t}){e._assigning||cd(e,t)}};function cd(e,t){const n=e.multiple,r=ze(t);if(!(n&&!r&&!Ps(t))){for(let o=0,s=e.options.length;o<s;o++){const i=e.options[o],l=ya(i);if(n)if(r){const c=typeof l;c==="string"||c==="number"?i.selected=t.some(p=>String(p)===String(l)):i.selected=ju(t,l)>-1}else i.selected=t.has(l);else if($s(ya(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ya(e){return"_value"in e?e._value:e.value}function Np(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const xg=["ctrl","shift","alt","meta"],Cg={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>xg.some(n=>e[`${n}Key`]&&!t.includes(n))},lt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=((o,...s)=>{for(let i=0;i<t.length;i++){const l=Cg[t[i]];if(l&&l(o,t))return}return e(o,...s)}))},Ag={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},zt=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=(o=>{if(!("key"in o))return;const s=Po(o.key);if(t.some(i=>i===s||Ag[i]===s))return e(o)}))},Eg=cn({patchProp:wg},Xv);let dd;function Ig(){return dd||(dd=$v(Eg))}const Mg=((...e)=>{const t=Ig().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=Pg(r);if(!o)return;const s=t._component;!Xe(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,Rg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function Rg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Pg(e){return Dt(e)?document.querySelector(e):e}const $g="modulepreload",Og=function(e){return"/"+e},fd={},oi=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let i=function(p){return Promise.all(p.map(f=>Promise.resolve(f).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));o=i(n.map(p=>{if(p=Og(p),p in fd)return;fd[p]=!0;const f=p.endsWith(".css"),g=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${g}`))return;const T=document.createElement("link");if(T.rel=f?"stylesheet":$g,f||(T.as="script"),T.crossOrigin="",T.href=p,c&&T.setAttribute("nonce",c),document.head.appendChild(T),f)return new Promise((k,U)=>{T.addEventListener("load",k),T.addEventListener("error",()=>U(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return o.then(i=>{for(const l of i||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})};/*!
19
- * vue-router v4.6.4
20
- * (c) 2025 Eduardo San Martin Morote
21
- * @license MIT
22
- */const vs=typeof document<"u";function jp(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Dg(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&jp(e.default)}const _t=Object.assign;function ql(e,t){const n={};for(const r in t){const o=t[r];n[r]=Or(o)?o.map(e):e(o)}return n}const ua=()=>{},Or=Array.isArray;function pd(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const Fp=/#/g,Lg=/&/g,Ng=/\//g,jg=/=/g,Fg=/\?/g,Bp=/\+/g,Bg=/%5B/g,Ug=/%5D/g,Up=/%5E/g,qg=/%60/g,qp=/%7B/g,Hg=/%7C/g,Hp=/%7D/g,Vg=/%20/g;function tc(e){return e==null?"":encodeURI(""+e).replace(Hg,"|").replace(Bg,"[").replace(Ug,"]")}function Wg(e){return tc(e).replace(qp,"{").replace(Hp,"}").replace(Up,"^")}function Su(e){return tc(e).replace(Bp,"%2B").replace(Vg,"+").replace(Fp,"%23").replace(Lg,"%26").replace(qg,"`").replace(qp,"{").replace(Hp,"}").replace(Up,"^")}function zg(e){return Su(e).replace(jg,"%3D")}function Gg(e){return tc(e).replace(Fp,"%23").replace(Fg,"%3F")}function Kg(e){return Gg(e).replace(Ng,"%2F")}function wa(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Yg=/\/$/,Jg=e=>e.replace(Yg,"");function Hl(e,t,n="/"){let r,o={},s="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(r=t.slice(0,c),s=t.slice(c,l>0?l:t.length),o=e(s.slice(1))),l>=0&&(r=r||t.slice(0,l),i=t.slice(l,t.length)),r=ey(r??t,n),{fullPath:r+s+i,path:r,query:o,hash:wa(i)}}function Qg(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function hd(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Xg(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&Is(t.matched[r],n.matched[o])&&Vp(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Is(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Vp(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Zg(e[n],t[n]))return!1;return!0}function Zg(e,t){return Or(e)?md(e,t):Or(t)?md(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function md(e,t){return Or(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function ey(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let s=n.length-1,i,l;for(i=0;i<r.length;i++)if(l=r[i],l!==".")if(l==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(i).join("/")}const _o={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let ku=(function(e){return e.pop="pop",e.push="push",e})({}),Vl=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function ty(e){if(!e)if(vs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Jg(e)}const ny=/^[^#]+#/;function ry(e,t){return e.replace(ny,"#")+t}function oy(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Fi=()=>({left:window.scrollX,top:window.scrollY});function sy(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=oy(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function vd(e,t){return(history.state?history.state.position-t:-1)+e}const xu=new Map;function ay(e,t){xu.set(e,t)}function iy(e){const t=xu.get(e);return xu.delete(e),t}function ly(e){return typeof e=="string"||e&&typeof e=="object"}function Wp(e){return typeof e=="string"||typeof e=="symbol"}let Wt=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const zp=Symbol("");Wt.MATCHER_NOT_FOUND+"",Wt.NAVIGATION_GUARD_REDIRECT+"",Wt.NAVIGATION_ABORTED+"",Wt.NAVIGATION_CANCELLED+"",Wt.NAVIGATION_DUPLICATED+"";function Ms(e,t){return _t(new Error,{type:e,[zp]:!0},t)}function Zr(e,t){return e instanceof Error&&zp in e&&(t==null||!!(e.type&t))}const uy=["params","query","hash"];function cy(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of uy)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function dy(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const o=n[r].replace(Bp," "),s=o.indexOf("="),i=wa(s<0?o:o.slice(0,s)),l=s<0?null:wa(o.slice(s+1));if(i in t){let c=t[i];Or(c)||(c=t[i]=[c]),c.push(l)}else t[i]=l}return t}function gd(e){let t="";for(let n in e){const r=e[n];if(n=zg(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Or(r)?r.map(o=>o&&Su(o)):[r&&Su(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function fy(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Or(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const py=Symbol(""),yd=Symbol(""),Bi=Symbol(""),nc=Symbol(""),Cu=Symbol("");function Qs(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ao(e,t,n,r,o,s=i=>i()){const i=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((l,c)=>{const p=T=>{T===!1?c(Ms(Wt.NAVIGATION_ABORTED,{from:n,to:t})):T instanceof Error?c(T):ly(T)?c(Ms(Wt.NAVIGATION_GUARD_REDIRECT,{from:t,to:T})):(i&&r.enterCallbacks[o]===i&&typeof T=="function"&&i.push(T),l())},f=s(()=>e.call(r&&r.instances[o],t,n,p));let g=Promise.resolve(f);e.length<3&&(g=g.then(p)),g.catch(T=>c(T))})}function Wl(e,t,n,r,o=s=>s()){const s=[];for(const i of e)for(const l in i.components){let c=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(jp(c)){const p=(c.__vccOpts||c)[t];p&&s.push(Ao(p,n,r,i,l,o))}else{let p=c();s.push(()=>p.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const g=Dg(f)?f.default:f;i.mods[l]=f,i.components[l]=g;const T=(g.__vccOpts||g)[t];return T&&Ao(T,n,r,i,l,o)()}))}}return s}function hy(e,t){const n=[],r=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const l=t.matched[i];l&&(e.matched.find(p=>Is(p,l))?r.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(p=>Is(p,c))||o.push(c))}return[n,r,o]}/*!
23
- * vue-router v4.6.4
24
- * (c) 2025 Eduardo San Martin Morote
25
- * @license MIT
26
- */let my=()=>location.protocol+"//"+location.host;function Gp(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){let i=o.includes(e.slice(s))?e.slice(s).length:1,l=o.slice(i);return l[0]!=="/"&&(l="/"+l),hd(l,"")}return hd(n,e)+r+o}function vy(e,t,n,r){let o=[],s=[],i=null;const l=({state:T})=>{const k=Gp(e,location),U=n.value,H=t.value;let X=0;if(T){if(n.value=k,t.value=T,i&&i===U){i=null;return}X=H?T.position-H.position:0}else r(k);o.forEach(q=>{q(n.value,U,{delta:X,type:ku.pop,direction:X?X>0?Vl.forward:Vl.back:Vl.unknown})})};function c(){i=n.value}function p(T){o.push(T);const k=()=>{const U=o.indexOf(T);U>-1&&o.splice(U,1)};return s.push(k),k}function f(){if(document.visibilityState==="hidden"){const{history:T}=window;if(!T.state)return;T.replaceState(_t({},T.state,{scroll:Fi()}),"")}}function g(){for(const T of s)T();s=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",f),document.removeEventListener("visibilitychange",f)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",f),document.addEventListener("visibilitychange",f),{pauseListeners:c,listen:p,destroy:g}}function wd(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?Fi():null}}function gy(e){const{history:t,location:n}=window,r={value:Gp(e,n)},o={value:t.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(c,p,f){const g=e.indexOf("#"),T=g>-1?(n.host&&document.querySelector("base")?e:e.slice(g))+c:my()+e+c;try{t[f?"replaceState":"pushState"](p,"",T),o.value=p}catch(k){console.error(k),n[f?"replace":"assign"](T)}}function i(c,p){s(c,_t({},t.state,wd(o.value.back,c,o.value.forward,!0),p,{position:o.value.position}),!0),r.value=c}function l(c,p){const f=_t({},o.value,t.state,{forward:c,scroll:Fi()});s(f.current,f,!0),s(c,_t({},wd(r.value,c,null),{position:f.position+1},p),!1),r.value=c}return{location:r,state:o,push:l,replace:i}}function yy(e){e=ty(e);const t=gy(e),n=vy(e,t.state,t.location,t.replace);function r(s,i=!0){i||n.pauseListeners(),history.go(s)}const o=_t({location:"",base:e,go:r,createHref:ry.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function wy(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),yy(e)}let Yo=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var ln=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(ln||{});const by={type:Yo.Static,value:""},Ty=/[a-zA-Z0-9_]/;function _y(e){if(!e)return[[]];if(e==="/")return[[by]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(k){throw new Error(`ERR (${n})/"${p}": ${k}`)}let n=ln.Static,r=n;const o=[];let s;function i(){s&&o.push(s),s=[]}let l=0,c,p="",f="";function g(){p&&(n===ln.Static?s.push({type:Yo.Static,value:p}):n===ln.Param||n===ln.ParamRegExp||n===ln.ParamRegExpEnd?(s.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${p}) must be alone in its segment. eg: '/:ids+.`),s.push({type:Yo.Param,value:p,regexp:f,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),p="")}function T(){p+=c}for(;l<e.length;){if(c=e[l++],c==="\\"&&n!==ln.ParamRegExp){r=n,n=ln.EscapeNext;continue}switch(n){case ln.Static:c==="/"?(p&&g(),i()):c===":"?(g(),n=ln.Param):T();break;case ln.EscapeNext:T(),n=r;break;case ln.Param:c==="("?n=ln.ParamRegExp:Ty.test(c)?T():(g(),n=ln.Static,c!=="*"&&c!=="?"&&c!=="+"&&l--);break;case ln.ParamRegExp:c===")"?f[f.length-1]=="\\"?f=f.slice(0,-1)+c:n=ln.ParamRegExpEnd:f+=c;break;case ln.ParamRegExpEnd:g(),n=ln.Static,c!=="*"&&c!=="?"&&c!=="+"&&l--,f="";break;default:t("Unknown state");break}}return n===ln.ParamRegExp&&t(`Unfinished custom RegExp for param "${p}"`),g(),i(),o}const bd="[^/]+?",Sy={sensitive:!1,strict:!1,start:!0,end:!0};var Jn=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(Jn||{});const ky=/[.+*?^${}()[\]/\\]/g;function xy(e,t){const n=_t({},Sy,t),r=[];let o=n.start?"^":"";const s=[];for(const p of e){const f=p.length?[]:[Jn.Root];n.strict&&!p.length&&(o+="/");for(let g=0;g<p.length;g++){const T=p[g];let k=Jn.Segment+(n.sensitive?Jn.BonusCaseSensitive:0);if(T.type===Yo.Static)g||(o+="/"),o+=T.value.replace(ky,"\\$&"),k+=Jn.Static;else if(T.type===Yo.Param){const{value:U,repeatable:H,optional:X,regexp:q}=T;s.push({name:U,repeatable:H,optional:X});const P=q||bd;if(P!==bd){k+=Jn.BonusCustomRegExp;try{`${P}`}catch(z){throw new Error(`Invalid custom RegExp for param "${U}" (${P}): `+z.message)}}let F=H?`((?:${P})(?:/(?:${P}))*)`:`(${P})`;g||(F=X&&p.length<2?`(?:/${F})`:"/"+F),X&&(F+="?"),o+=F,k+=Jn.Dynamic,X&&(k+=Jn.BonusOptional),H&&(k+=Jn.BonusRepeatable),P===".*"&&(k+=Jn.BonusWildcard)}f.push(k)}r.push(f)}if(n.strict&&n.end){const p=r.length-1;r[p][r[p].length-1]+=Jn.BonusStrict}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function l(p){const f=p.match(i),g={};if(!f)return null;for(let T=1;T<f.length;T++){const k=f[T]||"",U=s[T-1];g[U.name]=k&&U.repeatable?k.split("/"):k}return g}function c(p){let f="",g=!1;for(const T of e){(!g||!f.endsWith("/"))&&(f+="/"),g=!1;for(const k of T)if(k.type===Yo.Static)f+=k.value;else if(k.type===Yo.Param){const{value:U,repeatable:H,optional:X}=k,q=U in p?p[U]:"";if(Or(q)&&!H)throw new Error(`Provided param "${U}" is an array but it is not repeatable (* or + modifiers)`);const P=Or(q)?q.join("/"):q;if(!P)if(X)T.length<2&&(f.endsWith("/")?f=f.slice(0,-1):g=!0);else throw new Error(`Missing required param "${U}"`);f+=P}}return f||"/"}return{re:i,score:r,keys:s,parse:l,stringify:c}}function Cy(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===Jn.Static+Jn.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Jn.Static+Jn.Segment?1:-1:0}function Kp(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const s=Cy(r[n],o[n]);if(s)return s;n++}if(Math.abs(o.length-r.length)===1){if(Td(r))return 1;if(Td(o))return-1}return o.length-r.length}function Td(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Ay={strict:!1,end:!0,sensitive:!1};function Ey(e,t,n){const r=xy(_y(e.path),n),o=_t(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Iy(e,t){const n=[],r=new Map;t=pd(Ay,t);function o(g){return r.get(g)}function s(g,T,k){const U=!k,H=Sd(g);H.aliasOf=k&&k.record;const X=pd(t,g),q=[H];if("alias"in g){const z=typeof g.alias=="string"?[g.alias]:g.alias;for(const de of z)q.push(Sd(_t({},H,{components:k?k.record.components:H.components,path:de,aliasOf:k?k.record:H})))}let P,F;for(const z of q){const{path:de}=z;if(T&&de[0]!=="/"){const ue=T.record.path,we=ue[ue.length-1]==="/"?"":"/";z.path=T.record.path+(de&&we+de)}if(P=Ey(z,T,X),k?k.alias.push(P):(F=F||P,F!==P&&F.alias.push(P),U&&g.name&&!kd(P)&&i(g.name)),Yp(P)&&c(P),H.children){const ue=H.children;for(let we=0;we<ue.length;we++)s(ue[we],P,k&&k.children[we])}k=k||P}return F?()=>{i(F)}:ua}function i(g){if(Wp(g)){const T=r.get(g);T&&(r.delete(g),n.splice(n.indexOf(T),1),T.children.forEach(i),T.alias.forEach(i))}else{const T=n.indexOf(g);T>-1&&(n.splice(T,1),g.record.name&&r.delete(g.record.name),g.children.forEach(i),g.alias.forEach(i))}}function l(){return n}function c(g){const T=Py(g,n);n.splice(T,0,g),g.record.name&&!kd(g)&&r.set(g.record.name,g)}function p(g,T){let k,U={},H,X;if("name"in g&&g.name){if(k=r.get(g.name),!k)throw Ms(Wt.MATCHER_NOT_FOUND,{location:g});X=k.record.name,U=_t(_d(T.params,k.keys.filter(F=>!F.optional).concat(k.parent?k.parent.keys.filter(F=>F.optional):[]).map(F=>F.name)),g.params&&_d(g.params,k.keys.map(F=>F.name))),H=k.stringify(U)}else if(g.path!=null)H=g.path,k=n.find(F=>F.re.test(H)),k&&(U=k.parse(H),X=k.record.name);else{if(k=T.name?r.get(T.name):n.find(F=>F.re.test(T.path)),!k)throw Ms(Wt.MATCHER_NOT_FOUND,{location:g,currentLocation:T});X=k.record.name,U=_t({},T.params,g.params),H=k.stringify(U)}const q=[];let P=k;for(;P;)q.unshift(P.record),P=P.parent;return{name:X,path:H,params:U,matched:q,meta:Ry(q)}}e.forEach(g=>s(g));function f(){n.length=0,r.clear()}return{addRoute:s,resolve:p,removeRoute:i,clearRoutes:f,getRoutes:l,getRecordMatcher:o}}function _d(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Sd(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:My(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function My(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function kd(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ry(e){return e.reduce((t,n)=>_t(t,n.meta),{})}function Py(e,t){let n=0,r=t.length;for(;n!==r;){const s=n+r>>1;Kp(e,t[s])<0?r=s:n=s+1}const o=$y(e);return o&&(r=t.lastIndexOf(o,r-1)),r}function $y(e){let t=e;for(;t=t.parent;)if(Yp(t)&&Kp(e,t)===0)return t}function Yp({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function xd(e){const t=Mr(Bi),n=Mr(nc),r=re(()=>{const c=Re(e.to);return t.resolve(c)}),o=re(()=>{const{matched:c}=r.value,{length:p}=c,f=c[p-1],g=n.matched;if(!f||!g.length)return-1;const T=g.findIndex(Is.bind(null,f));if(T>-1)return T;const k=Cd(c[p-2]);return p>1&&Cd(f)===k&&g[g.length-1].path!==k?g.findIndex(Is.bind(null,c[p-2])):T}),s=re(()=>o.value>-1&&jy(n.params,r.value.params)),i=re(()=>o.value>-1&&o.value===n.matched.length-1&&Vp(n.params,r.value.params));function l(c={}){if(Ny(c)){const p=t[Re(e.replace)?"replace":"push"](Re(e.to)).catch(ua);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>p),p}return Promise.resolve()}return{route:r,href:re(()=>r.value.href),isActive:s,isExactActive:i,navigate:l}}function Oy(e){return e.length===1?e[0]:e}const Dy=In({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:xd,setup(e,{slots:t}){const n=$i(xd(e)),{options:r}=Mr(Bi),o=re(()=>({[Ad(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Ad(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&Oy(t.default(n));return e.custom?s:ec("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},s)}}}),Ly=Dy;function Ny(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function jy(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!Or(o)||o.length!==r.length||r.some((s,i)=>s.valueOf()!==o[i].valueOf()))return!1}return!0}function Cd(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ad=(e,t,n)=>e??t??n,Fy=In({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Mr(Cu),o=re(()=>e.route||r.value),s=Mr(yd,0),i=re(()=>{let p=Re(s);const{matched:f}=o.value;let g;for(;(g=f[p])&&!g.components;)p++;return p}),l=re(()=>o.value.matched[i.value]);pi(yd,re(()=>i.value+1)),pi(py,l),pi(Cu,o);const c=M();return it(()=>[c.value,l.value,e.name],([p,f,g],[T,k,U])=>{f&&(f.instances[g]=p,k&&k!==f&&p&&p===T&&(f.leaveGuards.size||(f.leaveGuards=k.leaveGuards),f.updateGuards.size||(f.updateGuards=k.updateGuards))),p&&f&&(!k||!Is(f,k)||!T)&&(f.enterCallbacks[g]||[]).forEach(H=>H(p))},{flush:"post"}),()=>{const p=o.value,f=e.name,g=l.value,T=g&&g.components[f];if(!T)return Ed(n.default,{Component:T,route:p});const k=g.props[f],U=k?k===!0?p.params:typeof k=="function"?k(p):k:null,X=ec(T,_t({},U,t,{onVnodeUnmounted:q=>{q.component.isUnmounted&&(g.instances[f]=null)},ref:c}));return Ed(n.default,{Component:X,route:p})||X}}});function Ed(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const By=Fy;function Uy(e){const t=Iy(e.routes,e),n=e.parseQuery||dy,r=e.stringifyQuery||gd,o=e.history,s=Qs(),i=Qs(),l=Qs(),c=Pm(_o);let p=_o;vs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=ql.bind(null,Q=>""+Q),g=ql.bind(null,Kg),T=ql.bind(null,wa);function k(Q,pe){let ge,Pe;return Wp(Q)?(ge=t.getRecordMatcher(Q),Pe=pe):Pe=Q,t.addRoute(Pe,ge)}function U(Q){const pe=t.getRecordMatcher(Q);pe&&t.removeRoute(pe)}function H(){return t.getRoutes().map(Q=>Q.record)}function X(Q){return!!t.getRecordMatcher(Q)}function q(Q,pe){if(pe=_t({},pe||c.value),typeof Q=="string"){const B=Hl(n,Q,pe.path),G=t.resolve({path:B.path},pe),ne=o.createHref(B.fullPath);return _t(B,G,{params:T(G.params),hash:wa(B.hash),redirectedFrom:void 0,href:ne})}let ge;if(Q.path!=null)ge=_t({},Q,{path:Hl(n,Q.path,pe.path).path});else{const B=_t({},Q.params);for(const G in B)B[G]==null&&delete B[G];ge=_t({},Q,{params:g(B)}),pe.params=g(pe.params)}const Pe=t.resolve(ge,pe),Ge=Q.hash||"";Pe.params=f(T(Pe.params));const _=Qg(r,_t({},Q,{hash:Wg(Ge),path:Pe.path})),A=o.createHref(_);return _t({fullPath:_,hash:Ge,query:r===gd?fy(Q.query):Q.query||{}},Pe,{redirectedFrom:void 0,href:A})}function P(Q){return typeof Q=="string"?Hl(n,Q,c.value.path):_t({},Q)}function F(Q,pe){if(p!==Q)return Ms(Wt.NAVIGATION_CANCELLED,{from:pe,to:Q})}function z(Q){return we(Q)}function de(Q){return z(_t(P(Q),{replace:!0}))}function ue(Q,pe){const ge=Q.matched[Q.matched.length-1];if(ge&&ge.redirect){const{redirect:Pe}=ge;let Ge=typeof Pe=="function"?Pe(Q,pe):Pe;return typeof Ge=="string"&&(Ge=Ge.includes("?")||Ge.includes("#")?Ge=P(Ge):{path:Ge},Ge.params={}),_t({query:Q.query,hash:Q.hash,params:Ge.path!=null?{}:Q.params},Ge)}}function we(Q,pe){const ge=p=q(Q),Pe=c.value,Ge=Q.state,_=Q.force,A=Q.replace===!0,B=ue(ge,Pe);if(B)return we(_t(P(B),{state:typeof B=="object"?_t({},Ge,B.state):Ge,force:_,replace:A}),pe||ge);const G=ge;G.redirectedFrom=pe;let ne;return!_&&Xg(r,Pe,ge)&&(ne=Ms(Wt.NAVIGATION_DUPLICATED,{to:G,from:Pe}),Ve(Pe,Pe,!0,!1)),(ne?Promise.resolve(ne):Ie(G,Pe)).catch(ee=>Zr(ee)?Zr(ee,Wt.NAVIGATION_GUARD_REDIRECT)?ee:Ke(ee):_e(ee,G,Pe)).then(ee=>{if(ee){if(Zr(ee,Wt.NAVIGATION_GUARD_REDIRECT))return we(_t({replace:A},P(ee.to),{state:typeof ee.to=="object"?_t({},Ge,ee.to.state):Ge,force:_}),pe||G)}else ee=Y(G,Pe,!0,A,Ge);return Oe(G,Pe,ee),ee})}function ke(Q,pe){const ge=F(Q,pe);return ge?Promise.reject(ge):Promise.resolve()}function me(Q){const pe=Qe.values().next().value;return pe&&typeof pe.runWithContext=="function"?pe.runWithContext(Q):Q()}function Ie(Q,pe){let ge;const[Pe,Ge,_]=hy(Q,pe);ge=Wl(Pe.reverse(),"beforeRouteLeave",Q,pe);for(const B of Pe)B.leaveGuards.forEach(G=>{ge.push(Ao(G,Q,pe))});const A=ke.bind(null,Q,pe);return ge.push(A),Ne(ge).then(()=>{ge=[];for(const B of s.list())ge.push(Ao(B,Q,pe));return ge.push(A),Ne(ge)}).then(()=>{ge=Wl(Ge,"beforeRouteUpdate",Q,pe);for(const B of Ge)B.updateGuards.forEach(G=>{ge.push(Ao(G,Q,pe))});return ge.push(A),Ne(ge)}).then(()=>{ge=[];for(const B of _)if(B.beforeEnter)if(Or(B.beforeEnter))for(const G of B.beforeEnter)ge.push(Ao(G,Q,pe));else ge.push(Ao(B.beforeEnter,Q,pe));return ge.push(A),Ne(ge)}).then(()=>(Q.matched.forEach(B=>B.enterCallbacks={}),ge=Wl(_,"beforeRouteEnter",Q,pe,me),ge.push(A),Ne(ge))).then(()=>{ge=[];for(const B of i.list())ge.push(Ao(B,Q,pe));return ge.push(A),Ne(ge)}).catch(B=>Zr(B,Wt.NAVIGATION_CANCELLED)?B:Promise.reject(B))}function Oe(Q,pe,ge){l.list().forEach(Pe=>me(()=>Pe(Q,pe,ge)))}function Y(Q,pe,ge,Pe,Ge){const _=F(Q,pe);if(_)return _;const A=pe===_o,B=vs?history.state:{};ge&&(Pe||A?o.replace(Q.fullPath,_t({scroll:A&&B&&B.scroll},Ge)):o.push(Q.fullPath,Ge)),c.value=Q,Ve(Q,pe,ge,A),Ke()}let ve;function Fe(){ve||(ve=o.listen((Q,pe,ge)=>{if(!xt.listening)return;const Pe=q(Q),Ge=ue(Pe,xt.currentRoute.value);if(Ge){we(_t(Ge,{replace:!0,force:!0}),Pe).catch(ua);return}p=Pe;const _=c.value;vs&&ay(vd(_.fullPath,ge.delta),Fi()),Ie(Pe,_).catch(A=>Zr(A,Wt.NAVIGATION_ABORTED|Wt.NAVIGATION_CANCELLED)?A:Zr(A,Wt.NAVIGATION_GUARD_REDIRECT)?(we(_t(P(A.to),{force:!0}),Pe).then(B=>{Zr(B,Wt.NAVIGATION_ABORTED|Wt.NAVIGATION_DUPLICATED)&&!ge.delta&&ge.type===ku.pop&&o.go(-1,!1)}).catch(ua),Promise.reject()):(ge.delta&&o.go(-ge.delta,!1),_e(A,Pe,_))).then(A=>{A=A||Y(Pe,_,!1),A&&(ge.delta&&!Zr(A,Wt.NAVIGATION_CANCELLED)?o.go(-ge.delta,!1):ge.type===ku.pop&&Zr(A,Wt.NAVIGATION_ABORTED|Wt.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),Oe(Pe,_,A)}).catch(ua)}))}let Le=Qs(),Me=Qs(),Te;function _e(Q,pe,ge){Ke(Q);const Pe=Me.list();return Pe.length?Pe.forEach(Ge=>Ge(Q,pe,ge)):console.error(Q),Promise.reject(Q)}function He(){return Te&&c.value!==_o?Promise.resolve():new Promise((Q,pe)=>{Le.add([Q,pe])})}function Ke(Q){return Te||(Te=!Q,Fe(),Le.list().forEach(([pe,ge])=>Q?ge(Q):pe()),Le.reset()),Q}function Ve(Q,pe,ge,Pe){const{scrollBehavior:Ge}=e;if(!vs||!Ge)return Promise.resolve();const _=!ge&&iy(vd(Q.fullPath,0))||(Pe||!ge)&&history.state&&history.state.scroll||null;return Gt().then(()=>Ge(Q,pe,_)).then(A=>A&&sy(A)).catch(A=>_e(A,Q,pe))}const Ye=Q=>o.go(Q);let yt;const Qe=new Set,xt={currentRoute:c,listening:!0,addRoute:k,removeRoute:U,clearRoutes:t.clearRoutes,hasRoute:X,getRoutes:H,resolve:q,options:e,push:z,replace:de,go:Ye,back:()=>Ye(-1),forward:()=>Ye(1),beforeEach:s.add,beforeResolve:i.add,afterEach:l.add,onError:Me.add,isReady:He,install(Q){Q.component("RouterLink",Ly),Q.component("RouterView",By),Q.config.globalProperties.$router=xt,Object.defineProperty(Q.config.globalProperties,"$route",{enumerable:!0,get:()=>Re(c)}),vs&&!yt&&c.value===_o&&(yt=!0,z(o.location).catch(Pe=>{}));const pe={};for(const Pe in _o)Object.defineProperty(pe,Pe,{get:()=>c.value[Pe],enumerable:!0});Q.provide(Bi,xt),Q.provide(nc,zf(pe)),Q.provide(Cu,c);const ge=Q.unmount;Qe.add(Q),Q.unmount=function(){Qe.delete(Q),Qe.size<1&&(p=_o,ve&&ve(),ve=null,c.value=_o,yt=!1,Te=!1),ge()}}};function Ne(Q){return Q.reduce((pe,ge)=>pe.then(()=>me(ge)),Promise.resolve())}return xt}function qy(){return Mr(Bi)}function Hy(e){return Mr(nc)}const Id=768;function rc(){const e=M(typeof window<"u"?window.innerWidth<Id:!1);let t=null;function n(r){e.value=r.matches}return $o(()=>{t=window.matchMedia(`(max-width: ${Id-1}px)`),e.value=t.matches,t.addEventListener("change",n)}),Di(()=>{t==null||t.removeEventListener("change",n)}),{isMobile:e}}const Vy={key:0,class:"desktop-sidebar"},Wy={class:"desktop-main"},Md="codex-web-local.sidebar-width.v1",zy=260,Gy=620,Rd=320,Ky=In({__name:"DesktopLayout",props:{isSidebarCollapsed:{type:Boolean,default:!1}},emits:["close-sidebar"],setup(e){const t=e,{isMobile:n}=rc();function r(p){return Math.min(Gy,Math.max(zy,p))}function o(){if(typeof window>"u")return Rd;const p=window.localStorage.getItem(Md),f=Number(p);return Number.isFinite(f)?r(f):Rd}const s=M(o()),i=re(()=>n.value||t.isSidebarCollapsed?{"--sidebar-width":"0px","--layout-columns":"minmax(0, 1fr)"}:{"--sidebar-width":`${s.value}px`,"--layout-columns":"var(--sidebar-width) 1px minmax(0, 1fr)"});function l(p){typeof window>"u"||window.localStorage.setItem(Md,String(p))}function c(p){p.preventDefault();const f=p.clientX,g=s.value,T=U=>{const H=U.clientX-f;s.value=r(g+H)},k=()=>{l(s.value),window.removeEventListener("mousemove",T),window.removeEventListener("mouseup",k)};window.addEventListener("mousemove",T),window.addEventListener("mouseup",k)}return(p,f)=>(S(),O("div",{class:rt(["desktop-layout",{"is-mobile":Re(n)}]),style:oo(i.value)},[Re(n)?(S(),ot(ws,{key:0,to:"body"},[Be(Lp,{name:"drawer"},{default:Tt(()=>[e.isSidebarCollapsed?ie("",!0):(S(),O("div",{key:0,class:"mobile-drawer-backdrop",onClick:f[1]||(f[1]=g=>p.$emit("close-sidebar"))},[v("aside",{class:"mobile-drawer",onClick:f[0]||(f[0]=lt(()=>{},["stop"]))},[zr(p.$slots,"sidebar",{},void 0,!0)])]))]),_:3})])):ie("",!0),Re(n)?ie("",!0):(S(),O(qe,{key:1},[e.isSidebarCollapsed?ie("",!0):(S(),O("aside",Vy,[zr(p.$slots,"sidebar",{},void 0)])),e.isSidebarCollapsed?ie("",!0):(S(),O("button",{key:1,class:"desktop-resize-handle",type:"button","aria-label":"Resize sidebar",onMousedown:c},null,32))],64)),v("section",Wy,[zr(p.$slots,"content",{},void 0)])],6))}}),mt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Yy=mt(Ky,[["__scopeId","data-v-4c6dbcd7"]]);function Pd(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}class io extends Error{constructor(t,n){super(t),this.name="CodexApiError",this.code=n.code,this.method=n.method,this.status=n.status}}function Zo(e,t){if(typeof e=="string"&&e.length>0)return e;const n=Pd(e);if(!n)return t;const r=n.error;if(typeof r=="string"&&r.length>0)return r;const o=Pd(r);return o&&typeof o.message=="string"&&o.message.length>0?o.message:typeof n.message=="string"&&n.message.length>0?n.message:typeof n.detail=="string"&&n.detail.length>0?n.detail:t}function fo(e,t,n){return e instanceof io?e:e instanceof Error?new io(e.message||t,{code:"unknown_error",method:n}):new io(t,{code:"unknown_error",method:n})}function Jp(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}async function Jy(e,t){const n={method:e,params:t??null};let r;try{r=await fetch("/codex-api/rpc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(l){throw new io(l instanceof Error?l.message:`RPC ${e} failed before request was sent`,{code:"network_error",method:e})}let o=null,s=null;try{s=await r.text(),o=JSON.parse(s)}catch{o=null}if(!r.ok){const l=Zo(o,"")||(s==null?void 0:s.slice(0,500))||"",c=`RPC ${e} failed with HTTP ${r.status}`;throw new io(l?`${c}: ${l}`:c,{code:"http_error",method:e,status:r.status})}const i=o;if(!i||typeof i!="object"||!("result"in i))throw new io(`RPC ${e} returned malformed envelope`,{code:"invalid_response",method:e,status:r.status});return i.result}function Qy(e){const t=Jp(e);if(!t||typeof t.method!="string"||t.method.length===0)return null;const n=typeof t.atIso=="string"&&t.atIso.length>0?t.atIso:new Date().toISOString();return{method:t.method,params:t.params??null,atIso:n}}function $d(e,t={ok:!0}){e({method:"ready",params:t,atIso:new Date().toISOString()})}function Xy(e){if(typeof window>"u")return()=>{};let t=null,n=!1,r=null;const o=()=>{r!==null&&(window.clearTimeout(r),r=null)},s=(p,f)=>{if(n||r!==null)return;const g=Math.min(1e3*2**f,1e4);r=window.setTimeout(()=>{r=null,!n&&p()},g)},i=p=>{const f=Qy(p);f&&e(f)},l=(p=0)=>{if(typeof EventSource>"u"||n)return;t==null||t();const f=new EventSource("/codex-api/events");let g=!1;f.onmessage=T=>{try{i(JSON.parse(T.data))}catch{}},f.addEventListener("ready",T=>{try{const k=T.data?JSON.parse(T.data):{ok:!0};$d(e,k)}catch{$d(e)}}),f.onerror=()=>{n||g||f.readyState===EventSource.CLOSED&&(g=!0,f.close(),s(()=>l(p+1),p))},t=()=>{g=!0,f.close()}},c=(p=0)=>{if(typeof WebSocket>"u"||n){l();return}t==null||t();const f=window.location.protocol==="https:"?"wss:":"ws:",g=new WebSocket(`${f}//${window.location.host}/codex-api/ws`);let T=!1,k=!1,U=window.setTimeout(()=>{T||n||k||(k=!0,g.close(),l())},2500);g.onopen=()=>{T=!0,o(),U!==null&&(window.clearTimeout(U),U=null)},g.onmessage=H=>{try{i(JSON.parse(String(H.data)))}catch{}},g.onerror=()=>{},g.onclose=()=>{if(U!==null&&(window.clearTimeout(U),U=null),!(n||k)){if(!T){l();return}s(()=>c(p+1),p)}},t=()=>{k=!0,U!==null&&(window.clearTimeout(U),U=null),g.close()}};return typeof WebSocket<"u"?c():l(),()=>{n=!0,o(),t==null||t()}}async function Zy(e){let t;try{t=await fetch("/codex-api/server-requests/respond",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(r){throw new io(r instanceof Error?r.message:"Failed to reply to server request",{code:"network_error",method:"server-requests/respond"})}let n=null;try{n=await t.json()}catch{n=null}if(!t.ok)throw new io(Zo(n,`Server request reply failed with HTTP ${t.status}`),{code:"http_error",method:"server-requests/respond",status:t.status})}async function ew(){const e=await fetch("/codex-api/server-requests/pending");let t=null;try{t=await e.json()}catch{t=null}if(!e.ok)throw new io(Zo(t,`Pending server requests failed with HTTP ${e.status}`),{code:"http_error",method:"server-requests/pending",status:e.status});const n=Jp(t),r=n==null?void 0:n.data;return Array.isArray(r)?r:[]}function tw(e){const t=e.trim();return t?t.startsWith("\\\\?\\UNC\\")?`\\\\${t.slice(8)}`:t.startsWith("\\\\?\\")?t.slice(4):t:""}function Jt(e){return tw(e)}function nw(e){return/^[a-z]:[\\/]/iu.test(e)||e.startsWith("\\\\")}function rw(e){const t=Jt(e).replace(/[\\/]+/gu,"/");return nw(t)?t.toLowerCase():t}function Wo(e){const t=Jt(e).replace(/[\\/]+$/u,"");if(!t)return"";const n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return n<0?t:t.slice(n+1)}function zl(e){const t=Jt(e).replace(/[\\/]+$/u,"");if(!t)return"";const n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return n<=0?"":t.slice(0,n)}function Ca(e){return Wo(e)||Jt(e)||"unknown-project"}function Od(e){return new Date(e*1e3).toISOString()}function ow(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}const sw=/^##\s+(.+?):\s+(.+?)\s*$/,aw=/^#\s*files mentioned by the user\s*:?\s*$/i;function iw(e){var o,s;const t=e.split(`
27
- `).findIndex(i=>aw.test(i.trim()));if(t<0)return[];const n=e.split(`
28
- `).slice(t+1),r=[];for(const i of n){const l=i.trim();if(!l)continue;const c=l.match(sw);if(!c)break;const p=(o=c[1])==null?void 0:o.trim(),f=(s=c[2])==null?void 0:s.trim().replace(/\s+\((?:lines?\s+\d+(?:-\d+)?)\)\s*$/,"");p&&f&&r.push({label:p,path:f})}return r}function lw(e){const t=/(?:^|\n)\s{0,3}#{0,6}\s*my request for codex\s*:?\s*/giu,n=Array.from(e.matchAll(t));if(n.length===0)return e.trim();const r=n.at(-1);if(!r||typeof r.index!="number")return e.trim();const o=r.index+r[0].length;return e.slice(o).trim()}function Qp(e){return`/codex-local-image?path=${encodeURIComponent(e)}`}function uw(e){const t=e.trim();if(!t)return"";if(t.startsWith("data:")||t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/codex-local-image?"))return t;const n=t.replace(/\s+/gu,"");return/^[A-Za-z0-9+/]+={0,2}$/u.test(n)?`data:image/png;base64,${n}`:""}function Dd(e,t){var r;const n=new RegExp(`<${t}>\\s*([\\s\\S]*?)\\s*</${t}>`,"iu").exec(e);return((r=n==null?void 0:n[1])==null?void 0:r.trim())??""}function cw(e){const t=e.trim();if(!t.startsWith("<heartbeat>")||!t.endsWith("</heartbeat>"))return null;const n=Dd(t,"instructions");return n?{automationId:Dd(t,"automation_id"),instructions:n}:null}function dw(e,t){if(!Array.isArray(t))return{text:"",images:[],fileAttachments:[],rawBlocks:[],isAutomationRun:!1,automationDisplayName:null};const n=[],r=[],o=[];for(const[c,p]of t.entries())p.type==="text"&&typeof p.text=="string"&&p.text.length>0&&n.push(p.text),p.type==="image"&&typeof p.url=="string"&&p.url.trim().length>0&&r.push(p.url.trim()),p.type==="localImage"&&typeof p.path=="string"&&p.path.trim().length>0&&r.push(Qp(p.path.trim())),p.type!=="text"&&p.type!=="image"&&p.type!=="localImage"&&o.push({id:`${e}:user-content:${c}`,role:"user",text:"",messageType:`userContent.${p.type}`,rawPayload:ow(p),isUnhandled:!0});const s=n.join(`
29
- `),i=iw(s),l=cw(s);return{text:(l==null?void 0:l.instructions)??lw(s),images:r,fileAttachments:i,rawBlocks:o,isAutomationRun:l!==null,automationDisplayName:(l==null?void 0:l.automationId)||null}}function fw(e){var s;const t=e.replace(/\r\n/g,`
30
- `).trim();if(!t)return null;const n=t.split(`
31
- `),r=[],o=[];for(const i of n){const l=i.trim();if(!l){r.length===0&&o.push("");continue}const c=l.match(/^[-*]\s+\[([ xX~>|-])\]\s+(.+)$/);if(c){const p=(c[1]??" ").toLowerCase(),f=(s=c[2])==null?void 0:s.trim();if(!f)continue;let g="pending";p==="x"&&(g="completed"),(p==="~"||p===">"||p==="-")&&(g="inProgress"),r.push({step:f,status:g});continue}o.push(l)}return r.length===0?null:{explanation:o.join(`
32
- `).trim()||void 0,steps:r}}function Ld(e){if(!e)return 0;const t=e.replace(/\r\n/g,`
33
- `),n=t.endsWith(`
34
- `)?t.slice(0,-1):t;return n?n.split(`
35
- `).length:0}function pw(e){let t=0,n=0;for(const r of e.replace(/\r\n/g,`
36
- `).split(`
37
- `))if(r&&!(r.startsWith("+++")||r.startsWith("---")||r.startsWith("@@"))){if(r.startsWith("+")){t+=1;continue}r.startsWith("-")&&(n+=1)}return{addedLineCount:t,removedLineCount:n}}function Xp(e){return e==="failed"||e==="declined"||e==="completed"?e:"inProgress"}function Zp(e){const t=Array.isArray(e)?e:[],n=[];for(const r of t){const o=r,s=typeof o.path=="string"?o.path:"",i=typeof o.diff=="string"?o.diff:"",l=o.kind,c=l==null?void 0:l.type;if(!s||c!=="add"&&c!=="delete"&&c!=="update")continue;const p=c==="update"&&typeof(l==null?void 0:l.move_path)=="string"?l.move_path:null,f=c==="update"?pw(i):c==="add"?{addedLineCount:Ld(i),removedLineCount:0}:{addedLineCount:0,removedLineCount:Ld(i)};n.push({path:s,operation:c,movedToPath:p,diff:i,...f})}return n}function hw(e){if(e.type==="agentMessage")return[{id:e.id,role:"assistant",text:e.text,messageType:e.type}];if(e.type==="userMessage"){const t=dw(e.id,e.content),n=[];return(t.text.length>0||t.images.length>0||t.fileAttachments.length>0)&&n.push({id:e.id,role:t.isAutomationRun?"system":"user",text:t.text,images:t.images,fileAttachments:t.fileAttachments.length>0?t.fileAttachments:void 0,messageType:e.type,isAutomationRun:t.isAutomationRun,automationDisplayName:t.automationDisplayName}),n.push(...t.rawBlocks),n.length===0?[]:n}if(e.type==="imageView"){const t=typeof e.path=="string"?e.path.trim():"";return t?[{id:e.id,role:"assistant",text:"",images:[Qp(t)],messageType:"imageView"}]:[]}{const t=e;if(t.type==="imageGeneration"||t.type==="image_generation"){const n=typeof t.result=="string"?uw(t.result):"";return n?[{id:e.id,role:"assistant",text:"",images:[n],messageType:"imageView"}]:[]}}if(e.type==="reasoning")return[];if(e.type==="plan"){const t=typeof e.text=="string"?e.text:"";return[{id:e.id,role:"assistant",text:t,messageType:"plan",plan:fw(t)??void 0}]}if(e.type==="commandExecution"){const t=e,n=mw(t.status),r=typeof t.command=="string"?t.command:"",o=typeof t.cwd=="string"?t.cwd:null,s=typeof t.aggregatedOutput=="string"?t.aggregatedOutput:"",i=typeof t.exitCode=="number"?t.exitCode:null;return[{id:e.id,role:"system",text:r,messageType:"commandExecution",commandExecution:{command:r,cwd:o,status:n,aggregatedOutput:s,exitCode:i}}]}if(e.type==="fileChange"){const t=Zp(e.changes),n=Xp(e.status);return t.length===0||n!=="completed"?[]:[{id:e.id,role:"system",text:"",messageType:"fileChange",fileChangeStatus:n,fileChanges:t}]}return[]}function mw(e){return e==="completed"||e==="failed"||e==="declined"||e==="interrupted"?e:e==="inProgress"||e==="in_progress"?"inProgress":"completed"}function vw(e){const t=e,n=[t.name,t.title,e.preview];for(const r of n)if(typeof r=="string"&&r.trim().length>0)return r.trim();return""}function gw(e){const t=vw(e);return t.length>0?t:"Untitled thread"}function oc(e){return(e==null?void 0:e.status)==="inProgress"}function yw(e){const t=e;if(t.inProgress===!0||t.status==="inProgress"||t.turnStatus==="inProgress")return!0;const r=(Array.isArray(e.turns)?e.turns:[]).at(-1);return oc(r)}function ww(e){const t=e,n=Jt(typeof t.cwd=="string"?t.cwd:e.cwd),r=rw(n),o=t.isWorktree===!0||t.worktree===!0||t.worktreeId!==void 0||t.worktreePath!==void 0||r.includes("/.codex/worktrees/")||r.includes("/.git/worktrees/");return{id:e.id,title:gw(e),projectName:Ca(n),cwd:n,hasWorktree:o,createdAtIso:Od(e.createdAt),updatedAtIso:Od(e.updatedAt),preview:e.preview,unread:!1,inProgress:yw(e)}}function bw(e){const t=new Map;for(const n of e){const r=t.get(n.projectName);r?r.push(n):t.set(n.projectName,[n])}return Array.from(t.entries()).map(([n,r])=>({projectName:n,threads:r.sort((o,s)=>new Date(s.updatedAtIso).getTime()-new Date(o.updatedAtIso).getTime())})).sort((n,r)=>{var i,l;const o=new Date(((i=n.threads[0])==null?void 0:i.updatedAtIso)??0).getTime();return new Date(((l=r.threads[0])==null?void 0:l.updatedAtIso)??0).getTime()-o})}function Tw(e){const t=e.data.map(ww);return bw(t)}function Ui(e){const t=Array.isArray(e.thread.turns)?e.thread.turns:[],n=[];for(let r=0;r<t.length;r++){const o=t[r],s=typeof(o==null?void 0:o.id)=="string"?o.id:void 0,i=Array.isArray(o.items)?o.items:[];for(const l of i)for(const c of hw(l))n.push({...c,turnId:s,turnIndex:r})}return n}function eh(e){const t=Array.isArray(e.thread.turns)?e.thread.turns:[];return oc(t.at(-1))}function th(e){const t=Array.isArray(e.thread.turns)?e.thread.turns:[];for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(oc(r)&&typeof r.id=="string"&&r.id.trim().length>0)return r.id.trim()}return""}const _w=5e3;function Gl(e){return e&&e.length>0?e:null}function Kl(e){return e&&e.length>0?e:null}const Nd=[{value:"default",label:"Default"},{value:"plan",label:"Plan"}];function jd(e,t){const n=t.trim();if(!n)return"";const r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),[o="",s=""]=e.split("/",2),i=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=o&&s?`${i}\\s*/\\s*${l}`:r;return n.replace(/^[★☆*\s:|\-]+/u,"").replace(/^(sponsor|star)\s+/i,"").replace(new RegExp(`^${r}\\s*[-:|]*\\s*`,"i"),"").replace(new RegExp(`^${c}\\s*[-:|]*\\s*`,"i"),"").replace(/^(sponsor|star)\s+/i,"").trim()}function Ft(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function Je(e){return typeof e=="string"&&e.length>0?e:null}function un(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function ba(e){return typeof e=="boolean"?e:null}function Sw(e){return e==="payment_required"?e:null}function kw(e){if(!e)return!1;const t=e.toLowerCase();return t.includes("payment required")||/\b402\b/.test(t)}function Fd(e){const t=Ft(e);if(!t)return null;const n=un(t.usedPercent??t.used_percent);if(n===null)return null;const r=un(t.windowDurationMins??t.window_minutes);return{usedPercent:n,windowDurationMins:r,windowMinutes:r,resetsAt:un(t.resetsAt??t.resets_at)}}function xw(e){const t=Ft(e);if(!t)return null;const n=ba(t.hasCredits??t.has_credits),r=ba(t.unlimited);return n===null||r===null?null:{hasCredits:n,unlimited:r,balance:Je(t.balance)}}function Au(e){const t=Ft(e);if(!t)return null;const n=Fd(t.primary),r=Fd(t.secondary),o=xw(t.credits);return!n&&!r&&!o?null:{limitId:Je(t.limitId??t.limit_id),limitName:Je(t.limitName??t.limit_name),primary:n,secondary:r,credits:o,planType:Je(t.planType??t.plan_type)}}function nh(e,t=null){const n=Ft(e);if(!n)return null;const r=Je(n.accountId),o=Je(n.quotaStatus),s=o==="loading"||o==="ready"||o==="error"?o:"idle";return r?{accountId:r,authMode:Je(n.authMode),email:Je(n.email),planType:Je(n.planType),lastRefreshedAtIso:Je(n.lastRefreshedAtIso)??"",lastActivatedAtIso:Je(n.lastActivatedAtIso),quotaSnapshot:Au(n.quotaSnapshot),quotaUpdatedAtIso:Je(n.quotaUpdatedAtIso),quotaStatus:s,quotaError:Je(n.quotaError),unavailableReason:Sw(n.unavailableReason)??(kw(Je(n.quotaError))?"payment_required":null),isActive:ba(n.isActive)??r===t}:null}function rh(e){const t=Ft(e);if(!t)return null;const n=Ft(t.rateLimitsByLimitId??t.rate_limits_by_limit_id),r=Au(n==null?void 0:n.codex);return r||Au(t.rateLimits??t.rate_limits)}async function rn(e,t){try{return await Jy(e,t)}catch(n){throw fo(n,`RPC ${e} failed`,e)}}function oh(e){const t=Array.isArray(e.thread.turns)?e.thread.turns:[],n={};for(let r=0;r<t.length;r+=1){const o=t[r];typeof(o==null?void 0:o.id)!="string"||o.id.length===0||(n[o.id]=r)}return n}function Cw(e){return typeof e=="string"&&["none","minimal","low","medium","high","xhigh"].includes(e)?e:""}function Aw(e){return typeof e=="string"&&e.trim().toLowerCase()==="fast"?"fast":"standard"}const Ew=50,Iw=100;async function Mw(e,t){const n=await rn("thread/list",{archived:!1,limit:t,sortKey:"updated_at",modelProviders:[],cursor:e});return{groups:Tw(n),nextCursor:typeof n.nextCursor=="string"&&n.nextCursor.length>0?n.nextCursor:null}}async function Rw(e){const t=await rn("thread/read",{threadId:e,includeTurns:!0});return{messages:Ui(t),inProgress:eh(t),activeTurnId:th(t),turnIndexByTurnId:oh(t)}}async function Bd(e=null,t=Ew){try{return await Mw(e,t)}catch(n){throw fo(n,"Failed to load thread groups","thread/list")}}function Pw(){return Iw}async function Ud(e){try{return await Rw(e)}catch(t){throw fo(t,`Failed to load thread ${e}`,"thread/read")}}function $w(e){const t=Ft(e);if(!t)return null;const n=Je(t.key),r=typeof t.text=="string"?t.text:"",o=Je(t.kind);return!n||!o||o!=="meta"&&o!=="hunk"&&o!=="add"&&o!=="remove"&&o!=="context"?null:{key:n,kind:o,text:r,oldLine:un(t.oldLine),newLine:un(t.newLine)}}function Ow(e){const t=Ft(e);if(!t)return null;const n=Je(t.id),r=typeof t.header=="string"?t.header:"",o=typeof t.patch=="string"?t.patch:"";return n?{id:n,header:r,patch:o,addedLineCount:un(t.addedLineCount)??0,removedLineCount:un(t.removedLineCount)??0,oldStart:un(t.oldStart),oldLineCount:un(t.oldLineCount)??0,newStart:un(t.newStart),newLineCount:un(t.newLineCount)??0,lines:Array.isArray(t.lines)?t.lines.map(s=>$w(s)).filter(s=>s!==null):[]}:null}function Dw(e){const t=Ft(e);if(!t)return null;const n=Je(t.id),r=Je(t.path),o=Je(t.absolutePath),s=Je(t.operation);return!n||!r||!o||!s||s!=="add"&&s!=="delete"&&s!=="update"&&s!=="rename"?null:{id:n,path:r,absolutePath:o,previousPath:Je(t.previousPath),previousAbsolutePath:Je(t.previousAbsolutePath),operation:s,addedLineCount:un(t.addedLineCount)??0,removedLineCount:un(t.removedLineCount)??0,diff:typeof t.diff=="string"?t.diff:"",hunks:Array.isArray(t.hunks)?t.hunks.map(i=>Ow(i)).filter(i=>i!==null):[]}}function sh(e){const t=Ft(e),n=Ft(t==null?void 0:t.data),r=Ft(n==null?void 0:n.summary),o=Je(n==null?void 0:n.scope)==="baseBranch"?"baseBranch":"workspace",s=Je(n==null?void 0:n.workspaceView)==="staged"?"staged":"unstaged";return{cwd:Je(n==null?void 0:n.cwd)??"",gitRoot:Je(n==null?void 0:n.gitRoot),isGitRepo:ba(n==null?void 0:n.isGitRepo)??!1,scope:o,workspaceView:s,baseBranch:Je(n==null?void 0:n.baseBranch),baseBranchOptions:Array.isArray(n==null?void 0:n.baseBranchOptions)?n.baseBranchOptions.map(i=>Je(i)).filter(i=>typeof i=="string"&&i.length>0):[],headBranch:Je(n==null?void 0:n.headBranch),mergeBaseSha:Je(n==null?void 0:n.mergeBaseSha),generatedAtIso:Je(n==null?void 0:n.generatedAtIso)??"",summary:{fileCount:un(r==null?void 0:r.fileCount)??0,addedLineCount:un(r==null?void 0:r.addedLineCount)??0,removedLineCount:un(r==null?void 0:r.removedLineCount)??0},files:Array.isArray(n==null?void 0:n.files)?n.files.map(i=>Dw(i)).filter(i=>i!==null):[]}}function Lw(e){var r;const t=e.trim();if(!t)return{absolutePath:null,startLine:null,endLine:null};const n=t.match(/^(.*?):(\d+)-(\d+)$/u);return n?{absolutePath:((r=n[1])==null?void 0:r.trim())||null,startLine:Number(n[2]),endLine:Number(n[3])}:{absolutePath:t||null,startLine:null,endLine:null}}function Nw(e){var i;const t=e.replace(/\r\n/g,`
38
- `).trim();if(!t)return{reviewText:"",summary:"",findings:[]};const n=t.search(/\n(?:Full review comments|Review comment):\n/iu),r=n>=0?t.slice(0,n).trim():t,o=n>=0?t.slice(n).trim():"",s=[];if(o){const c=o.replace(/^(?:Full review comments|Review comment):\n*/iu,"").trim().matchAll(/^- (.+?) — (.+)\n?((?: .*(?:\n|$))*)/gmu);let p=0;for(const f of c){const g=((i=f[1])==null?void 0:i.trim())??"",T=Lw(f[2]??""),k=(f[0]??"").trim(),U=(f[3]??"").split(`
39
- `).map(H=>H.replace(/^ /u,"")).join(`
40
- `).trim();s.push({id:`finding:${p}`,title:g||`Finding ${p+1}`,body:U,path:T.absolutePath?T.absolutePath.split("/").filter(Boolean).slice(-1)[0]??T.absolutePath:null,absolutePath:T.absolutePath,startLine:T.startLine,endLine:T.endLine,rawText:k}),p+=1}}return{reviewText:t,summary:r,findings:s}}function qd(e,t){const n=Array.isArray(e.thread.turns)?e.thread.turns:[];for(let r=n.length-1;r>=0;r-=1){const o=n[r],s=Array.isArray(o==null?void 0:o.items)?o.items:[];for(let i=s.length-1;i>=0;i-=1){const l=s[i];if((l==null?void 0:l.type)!==t)continue;const c=typeof l.review=="string"?l.review.trim():"";if(c)return c}}return null}async function gA(e){const t=await rn("thread/read",{threadId:e,includeTurns:!0}),n=qd(t,"exitedReviewMode");return{enteredReviewLabel:qd(t,"enteredReviewMode"),result:n?Nw(n):null}}function ah(e){const t=Ft(e);if(!t)return null;const n=Je(t.id),r=Je(t.kind),o=Je(t.name),s=Je(t.prompt),i=Je(t.rrule),l=Je(t.status);return!n||!o||!s||!i||r!=="heartbeat"&&r!=="cron"||l!=="ACTIVE"&&l!=="PAUSED"?null:{id:n,kind:r,name:o,prompt:s,rrule:i,status:l,targetThreadId:Je(t.targetThreadId),createdAtMs:un(t.createdAtMs),updatedAtMs:un(t.updatedAtMs),nextRunAtMs:un(t.nextRunAtMs)}}async function jw(){var o;const e=await fetch("/codex-api/thread-automations"),t=await e.json().catch(()=>null);if(!e.ok)throw new Error(Zo(t,"Failed to load thread automations"));const n=Ft((o=Ft(t))==null?void 0:o.data),r={};if(!n)return r;for(const[s,i]of Object.entries(n)){const l=ah(i);l&&(r[s]=l)}return r}async function Fw(e){var o;const t=await fetch("/codex-api/thread-automation",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json().catch(()=>null);if(!t.ok)throw new Error(Zo(n,"Failed to save thread automation"));const r=ah((o=Ft(n))==null?void 0:o.data);if(!r)throw new Error("Thread automation response was malformed");return r}async function Hd(e){const t=await fetch(`/codex-api/thread-automation?threadId=${encodeURIComponent(e)}`,{method:"DELETE"}),n=await t.json().catch(()=>null);if(!t.ok)throw new Error(Zo(n,"Failed to delete thread automation"))}function Bw(e){return Xy(e)}function Uw(e){const t=Ft(e);if(!t)return null;const n=Je(t.id),r=Je(t.threadId),o=Je(t.cwd),s=Je(t.shell);return!n||!r||!o||!s?null:{id:n,threadId:r,cwd:o,shell:s,buffer:typeof t.buffer=="string"?t.buffer:"",truncated:ba(t.truncated)??!1}}async function qi(e,t){const n=await fetch(e,t),r=await n.json().catch(()=>null);if(!n.ok)throw new Error(Zo(r,`Terminal request failed with HTTP ${n.status}`));return r}async function yA(e){var r;const t=await qi("/codex-api/thread-terminal/attach",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=Uw((r=Ft(t))==null?void 0:r.session);if(!n)throw new Error("Terminal attach response was malformed");return n}async function wA(e,t){await qi("/codex-api/thread-terminal/input",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e,data:t})})}async function bA(e,t,n){await qi("/codex-api/thread-terminal/resize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e,cols:t,rows:n})})}async function TA(e){await qi("/codex-api/thread-terminal/close",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})})}async function qw(e,t){await Zy({id:e,...t})}async function Hw(){return ew()}async function Vw(){try{const e=await rn("account/rateLimits/read");return rh(e)}catch(e){throw fo(e,"Failed to load account rate limits","account/rateLimits/read")}}function sc(e){const t=Ft(e),n=Je(t==null?void 0:t.activeAccountId),r=Array.isArray(t==null?void 0:t.accounts)?t==null?void 0:t.accounts:[];return{activeAccountId:n,importedAccountId:Je(t==null?void 0:t.importedAccountId)??void 0,accounts:r.map(o=>nh(o,n)).filter(o=>o!==null)}}async function Ww(){const e=await fetch("/codex-api/accounts"),t=await e.json();if(!e.ok)throw new Error(Fn(t,"Failed to load accounts"));const n=Ft(t);return sc(n==null?void 0:n.data)}async function zw(){const e=await fetch("/codex-api/accounts/refresh",{method:"POST"}),t=await e.json();if(!e.ok)throw new Error(Fn(t,"Failed to refresh accounts"));const n=Ft(t);return sc(n==null?void 0:n.data)}async function Gw(e){const t=await fetch("/codex-api/accounts/switch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accountId:e})}),n=await t.json();if(!t.ok)throw new Error(Fn(n,"Failed to switch account"));const r=Ft(n),o=Ft(r==null?void 0:r.data),s=nh(o==null?void 0:o.account,Je(o==null?void 0:o.activeAccountId));if(!s)throw new Error("Failed to switch account");return s}async function Kw(e){const t=await fetch("/codex-api/accounts/remove",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accountId:e})}),n=await t.json();if(!t.ok)throw new Error(Fn(n,"Failed to remove account"));const r=Ft(n);return sc(r==null?void 0:r.data)}async function Yl(e){const t=await rn("thread/resume",{threadId:e});return{model:Si(t),messages:Ui(t),inProgress:eh(t),activeTurnId:th(t),turnIndexByTurnId:oh(t)}}async function Yw(e){await rn("thread/archive",{threadId:e})}async function Jw(e,t){await rn("thread/name/set",{threadId:e,name:t})}async function Jl(e,t){const n=await rn("thread/rollback",{threadId:e,numTurns:t});return Ui(n)}async function Qw(e,t,n){try{const r=await fetch("/codex-api/thread/rollback-files",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:e,turnId:t,cwd:n})});return r.ok?await r.json():{reverted:0,errors:["Server error"]}}catch{return{reverted:0,errors:["Network error"]}}}function Eu(e){if(!e||typeof e!="object")return"";const n=e.thread;if(n&&typeof n=="object"){const r=n.id;if(typeof r=="string"&&r.length>0)return r}return""}function Xw(e){if(!e||typeof e!="object")return"";const n=e.thread;if(n&&typeof n=="object"){const r=n.cwd;if(typeof r=="string"&&r.length>0)return r}return""}function Si(e){if(!e||typeof e!="object")return"";const t=e.model;return typeof t=="string"?t.trim():""}async function Vd(e,t){try{const n={};typeof e=="string"&&e.trim().length>0&&(n.cwd=e.trim()),typeof t=="string"&&t.trim().length>0&&(n.model=t.trim());const r=await rn("thread/start",n),o=Eu(r);if(!o)throw new Error("thread/start did not return a thread id");return{threadId:o,model:Si(r)}}catch(n){throw fo(n,"Failed to start a new thread","thread/start")}}async function Wd(e,t,n){if(arguments.length<=1)try{const r=await rn("thread/fork",{threadId:e,persistExtendedHistory:!0}),o=Eu(r);if(!o)throw new Error("thread/fork did not return a thread id");return{threadId:o,cwd:Xw(r),model:Si(r),messages:Ui(r)}}catch(r){throw fo(r,`Failed to fork thread ${e}`,"thread/fork")}try{const r=e.trim();if(!r)throw new Error("thread/fork requires threadId");const o={threadId:r};typeof t=="string"&&t.trim().length>0&&(o.cwd=t.trim()),typeof n=="string"&&n.trim().length>0&&(o.model=n.trim());const s=await rn("thread/fork",o),i=Eu(s);if(!i)throw new Error("thread/fork did not return a thread id");return{threadId:i,model:Si(s)}}catch(r){throw fo(r,`Failed to fork thread ${e}`,"thread/fork")}}function zd(e){var t;if(!e)return null;try{const n=new URL(e,"http://localhost");if(n.pathname!=="/codex-local-image")return null;const r=((t=n.searchParams.get("path"))==null?void 0:t.trim())??"";return r.length>0?r:null}catch{return null}}function Zw(e,t){if(t.length===0)return e;let n=`# Files mentioned by the user:
41
- `;for(const r of t)n+=`
42
- ## ${r.label}: ${r.path}
43
- `;return`${n}
44
- ## My request for Codex:
45
-
46
- ${e}
47
- `}function eb(e){const t=e.replace(/\\/g,"/");return t.split("/").filter(Boolean).at(-1)??t}async function tb(e,t,n){var c;const r=(t==null?void 0:t.trim())??"";if(r)return{model:r,reasoningEffort:e==="plan"?Gl(n):Kl(n)};let o=null;try{o=await lh()}catch{o=null}const s=(o==null?void 0:o.model.trim())??"";if(s)return{model:s,reasoningEffort:e==="plan"?Gl(n??(o==null?void 0:o.reasoningEffort)):Kl(n??(o==null?void 0:o.reasoningEffort))};let i=[];try{i=await ih()}catch{i=[]}const l=((c=i.find(p=>p.trim().length>0))==null?void 0:c.trim())??"";if(l)return{model:l,reasoningEffort:e==="plan"?Gl(n??(o==null?void 0:o.reasoningEffort)):Kl(n??(o==null?void 0:o.reasoningEffort))};throw new Error(`${e==="plan"?"Plan":"Default"} mode requires an available model. Wait for models to load and try again.`)}async function Ql(e,t,n=[],r,o,s,i=[],l){var c;try{const p=(r==null?void 0:r.trim())??"",f=[];for(const P of n){const F=zd(P.trim());F&&f.push({label:eb(F),path:F,fsPath:F})}const g=[...i,...f],T=g.filter((P,F)=>g.findIndex(z=>z.fsPath===P.fsPath)===F),U=[{type:"text",text:Zw(t,T)}];for(const P of n){const F=P.trim();if(!F)continue;const z=zd(F);if(z){U.push({type:"localImage",path:z});continue}U.push({type:"image",url:F,image_url:F})}if(s)for(const P of s)U.push({type:"skill",name:P.name,path:P.path});const H=T.map(P=>({label:P.label,path:P.path,fsPath:P.fsPath})),X={threadId:e,input:U};if(H.length>0&&(X.attachments=H),p&&(X.model=p),typeof o=="string"&&o.length>0&&(X.effort=o),l&&l!=="default"){const P=await tb(l,p,o);X.collaborationMode={mode:l,settings:{model:P.model,reasoning_effort:P.reasoningEffort,developer_instructions:null}}}const q=await rn("turn/start",X);return typeof((c=q==null?void 0:q.turn)==null?void 0:c.id)=="string"?q.turn.id.trim():""}catch(p){throw fo(p,`Failed to start turn for thread ${e}`,"turn/start")}}async function nb(e,t){const n=e.trim(),r=(t==null?void 0:t.trim())||"";if(n)try{if(!r)throw new Error("turn/interrupt requires turnId");await rn("turn/interrupt",{threadId:n,turnId:r})}catch(o){throw fo(o,`Failed to interrupt turn for thread ${n}`,"turn/interrupt")}}async function rb(e){const t=e==="fast"?"fast":"standard";await rn("config/batchWrite",{edits:[{keyPath:"features.fast_mode",value:!0,mergeStrategy:"upsert"},{keyPath:"service_tier",value:t==="fast"?"fast":null,mergeStrategy:t==="fast"?"upsert":"replace"}],filePath:null,expectedVersion:null})}async function ob(){return await(await fetch("/codex-api/free-mode/status")).json()}async function Gd(e){return await(await fetch("/codex-api/free-mode",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enable:e})})).json()}async function Kd(e){return await(await fetch("/codex-api/free-mode/custom-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e})})).json()}async function fs(e,t,n){return await(await fetch("/codex-api/free-mode/custom-provider",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:e,apiKey:t,wireApi:n==null?void 0:n.wireApi,provider:n==null?void 0:n.provider})})).json()}async function ih(e={}){const t=await rn("model/list",{}),n=[];for(const r of t.data){const o=r.id||r.model;!o||n.includes(o)||n.push(o)}if(e.includeProviderModels===!1)return n;try{const r=await fetch("/codex-api/provider-models",{signal:AbortSignal.timeout(_w)});let o=null;try{o=await r.json()}catch{o=null}if(r.ok&&Array.isArray(o==null?void 0:o.data)){if(o.exclusive)return o.data.filter(s=>typeof s=="string"&&s.trim().length>0);for(const s of o.data){if(typeof s!="string")continue;const i=s.trim();!i||n.includes(i)||n.push(i)}}}catch{}return n}async function lh(){const e=await rn("config/read",{}),t=e.config.model??"",n=typeof e.config.model_provider=="string"?e.config.model_provider:"",r=Cw(e.config.model_reasoning_effort),o=Aw(e.config.service_tier);return{model:t,providerId:n,reasoningEffort:r,speedMode:o}}function sb(e){const t=e.trim();return t?t.replace(/[_-]+/g," ").replace(/\b\w/g,n=>n.toUpperCase()):""}async function ab(){try{const e=await rn("collaborationMode/list",{}),t=new Set,n=[];for(const r of e.data){const o=r.mode;o!=="default"&&o!=="plan"||t.has(o)||(t.add(o),n.push({value:o,label:sb(r.name||o)||(o==="plan"?"Plan":"Default")}))}if(n.length>0){for(const r of Nd)t.has(r.value)||n.push(r);return n.sort((r,o)=>r.value===o.value?0:r.value==="default"?-1:1)}}catch{}return Nd}function ib(e){const t=e&&typeof e=="object"&&!Array.isArray(e)?e:{},n=s=>{if(!Array.isArray(s))return[];const i=[];for(const l of s)typeof l=="string"&&l.length>0&&!i.includes(l)&&i.push(l);return i},r=t.labels,o={};if(r&&typeof r=="object"&&!Array.isArray(r))for(const[s,i]of Object.entries(r)){const l=typeof s=="string"?Jt(s):"";l.length>0&&typeof i=="string"&&(o[l]=i)}return{order:n(t.order).map(s=>Jt(s)),labels:o,active:n(t.active).map(s=>Jt(s))}}async function gs(){const e=await fetch("/codex-api/workspace-roots-state"),t=await e.json();if(!e.ok)throw new Error("Failed to load workspace roots state");const n=t&&typeof t=="object"&&!Array.isArray(t)?t:{};return ib(n.data)}async function lb(e,t){const n=(t??"").trim(),r=await fetch("/codex-api/worktree/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sourceCwd:e,baseBranch:n||void 0})}),o=await r.json();if(!r.ok||!o.data)throw new Error(o.error||"Failed to create worktree");return{...o.data,cwd:Jt(o.data.cwd),gitRoot:Jt(o.data.gitRoot)}}async function ub(e){const t=e.trim();if(!t)return[];const n=new URLSearchParams({sourceCwd:t}),r=await fetch(`/codex-api/worktree/branches?${n.toString()}`),o=await r.json();if(!r.ok)throw new Error(o.error||"Failed to load branches");const s=Array.isArray(o.data)?o.data:[],i=[],l=new Set;for(const c of s){if(!c||typeof c!="object"||Array.isArray(c))continue;const p=c,f=typeof p.value=="string"?p.value.trim():"",g=typeof p.label=="string"?p.label.trim():"";!f||l.has(f)||(l.add(f),i.push({value:f,label:g||f}))}return i}async function cb(e){const t=e.trim();if(!t)return{currentBranch:null,options:[]};const n=new URLSearchParams({cwd:t}),r=await fetch(`/codex-api/git/branches?${n.toString()}`),o=await r.json();if(!r.ok)throw new Error(o.error||"Failed to load Git branch state");const s=o.data&&typeof o.data=="object"&&!Array.isArray(o.data)?o.data:{},i=s.currentBranch,l=typeof i=="string"&&i.trim()?i.trim():null,c=Array.isArray(s.options)?s.options:[],p=[],f=new Set;for(const g of c){if(!g||typeof g!="object"||Array.isArray(g))continue;const T=g,k=typeof T.value=="string"?T.value.trim():"",U=typeof T.label=="string"?T.label.trim():"";!k||f.has(k)||(f.add(k),p.push({value:k,label:U||k}))}return l&&!f.has(l)&&p.unshift({value:l,label:l}),{currentBranch:l,options:p}}async function db(e,t){var s;const n=await fetch("/codex-api/git/checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:e.trim(),branch:t.trim()})}),r=await n.json();if(!n.ok)throw new Error(r.error||"Failed to switch branch");const o=(s=r.data)==null?void 0:s.currentBranch;return typeof o=="string"&&o.trim()?o.trim():null}async function _A(e,t,n,r){const o=new URLSearchParams({cwd:e,scope:t,workspaceView:n});r&&r.trim()&&o.set("baseBranch",r.trim());const s=await fetch(`/codex-api/review/snapshot?${o.toString()}`),i=await s.json();if(!s.ok)throw new Error(Fn(i,"Failed to load review snapshot"));return sh(i)}async function SA(e){const t=await fetch("/codex-api/review/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();if(!t.ok)throw new Error(Fn(n,"Failed to apply review action"));return sh(n)}async function kA(e){const t=await fetch("/codex-api/review/git/init",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:e})}),n=await t.json();if(!t.ok)throw new Error(Fn(n,"Failed to initialize Git"))}async function xA(e,t,n,r){const o=t==="baseBranch"?{type:"baseBranch",branch:(r??"").trim()}:{type:"uncommittedChanges"};if(o.type==="baseBranch"&&!o.branch)throw new Error("Base branch is unavailable");await rn("review/start",{threadId:e,target:o,delivery:"inline"})}async function Yd(){const e=await fetch("/codex-api/home-directory"),t=await e.json();if(!e.ok)throw new Error("Failed to load home directory");const n=t&&typeof t=="object"&&!Array.isArray(t)?t:{},r=n.data&&typeof n.data=="object"&&!Array.isArray(n.data)?n.data:{};return typeof r.path=="string"?r.path.trim():""}async function fb(e,t){const n=new URLSearchParams({path:e});(t==null?void 0:t.showHidden)===!0&&n.set("showHidden","1");const r=await fetch(`/codex-local-directories?${n.toString()}`),o=await uh(r);if(!r.ok){const c=Fn(o,"Failed to load local directories");throw new Error(c)}const s=o&&typeof o=="object"&&!Array.isArray(o)?o:{},i=s.data&&typeof s.data=="object"&&!Array.isArray(s.data)?s.data:{},l=Array.isArray(i.entries)?i.entries:[];return{path:typeof i.path=="string"?Jt(i.path):"",parentPath:typeof i.parentPath=="string"?Jt(i.parentPath):"",entries:l.flatMap(c=>{if(!c||typeof c!="object"||Array.isArray(c))return[];const p=c,f=typeof p.name=="string"?p.name.trim():"",g=typeof p.path=="string"?Jt(p.path):"";return f&&g?[{name:f,path:g}]:[]})}}async function uh(e){const t=await e.text();if(!t)return{};try{return JSON.parse(t)}catch{throw new Error(`Expected JSON response from ${e.url||"request"}`)}}async function Xl(e){if(!(await fetch("/codex-api/workspace-roots-state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw new Error("Failed to save workspace roots state")}async function Zl(e,t){const n=await fetch("/codex-api/project-root",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,createIfMissing:(t==null?void 0:t.createIfMissing)===!0,label:(t==null?void 0:t.label)??""})}),r=await n.json();if(!n.ok){const l=Fn(r,"Failed to open project root");throw new Error(l)}const o=r&&typeof r=="object"&&!Array.isArray(r)?r:{},s=o.data&&typeof o.data=="object"&&!Array.isArray(o.data)?o.data:{};return typeof s.path=="string"?Jt(s.path):""}async function pb(e){const t=await fetch("/codex-api/local-directory",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})}),n=await uh(t);if(!t.ok){const s=Fn(n,"Failed to create local directory");throw new Error(s)}const r=n&&typeof n=="object"&&!Array.isArray(n)?n:{},o=r.data&&typeof r.data=="object"&&!Array.isArray(r.data)?r.data:{};return typeof o.path=="string"?Jt(o.path):""}async function hb(e){const t=new URLSearchParams({basePath:e}),n=await fetch(`/codex-api/project-root-suggestion?${t.toString()}`),r=await n.json();if(!n.ok){const i=Fn(r,"Failed to suggest project name");throw new Error(i)}const o=r&&typeof r=="object"&&!Array.isArray(r)?r:{},s=o.data&&typeof o.data=="object"&&!Array.isArray(o.data)?o.data:{};return{name:typeof s.name=="string"?s.name.trim():"",path:typeof s.path=="string"?Jt(s.path):""}}async function mb(e,t,n=20){const r=e.trim();if(!r)return[];const o=await fetch("/codex-api/composer-file-search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:r,query:t.trim(),limit:n})}),s=await o.json();if(!o.ok){const p=Fn(s,"Failed to search files");throw new Error(p)}const i=s&&typeof s=="object"&&!Array.isArray(s)?s:{},l=Array.isArray(i.data)?i.data:[],c=[];for(const p of l){if(!p||typeof p!="object"||Array.isArray(p))continue;const g=p.path,T=typeof g=="string"?g.trim():"";T&&c.push({path:T})}return c}async function vb(e,t=200){const n=await fetch("/codex-api/thread-search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,limit:t})}),r=await n.json();if(!n.ok)throw new Error(r.error||"Failed to search threads");return r.data??{threadIds:[],indexedThreadCount:0}}async function gb(e,t){const n=await fetch("/codex-api/telegram/configure-bot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({botToken:e,allowedUserIds:t})}),r=await n.json();if(!n.ok){const o=Fn(r,"Failed to connect Telegram bot");throw new Error(o)}}async function yb(){const e=await fetch("/codex-api/telegram/config"),t=await e.json();if(!e.ok){const i=Fn(t,"Failed to load Telegram configuration");throw new Error(i)}const n=t&&typeof t=="object"&&!Array.isArray(t)?t:{},r=n.data&&typeof n.data=="object"&&!Array.isArray(n.data)?n.data:{},o=Array.isArray(r.allowedUserIds)?r.allowedUserIds:[],s=[];for(const i of o){if(i==="*"){s.push("*");continue}typeof i=="number"&&Number.isFinite(i)&&s.push(Math.trunc(i))}return{botToken:typeof r.botToken=="string"?r.botToken:"",allowedUserIds:s}}async function wb(){const e=await fetch("/codex-api/telegram/status"),t=await e.json();if(!e.ok){const o=Fn(t,"Failed to load Telegram status");throw new Error(o)}const n=t&&typeof t=="object"&&!Array.isArray(t)?t:{},r=n.data&&typeof n.data=="object"&&!Array.isArray(n.data)?n.data:{};return{configured:r.configured===!0,active:r.active===!0,mappedChats:typeof r.mappedChats=="number"?r.mappedChats:0,mappedThreads:typeof r.mappedThreads=="number"?r.mappedThreads:0,allowedUsers:typeof r.allowedUsers=="number"?r.allowedUsers:0,allowAllUsers:r.allowAllUsers===!0,lastError:typeof r.lastError=="string"?r.lastError:""}}function bb(e){const t=e.getUTCFullYear(),n=String(e.getUTCMonth()+1).padStart(2,"0"),r=String(e.getUTCDate()).padStart(2,"0");return`${t}-${n}-${r}`}async function Tb(e,t=6){const n=Math.min(10,Math.max(1,Math.floor(t)));if(e.startsWith("search-")){const f=new Date;e==="search-daily"?f.setUTCDate(f.getUTCDate()-1):e==="search-weekly"?f.setUTCDate(f.getUTCDate()-7):f.setUTCDate(f.getUTCDate()-30);const g=new URLSearchParams({q:`created:>=${bb(f)}`,sort:"stars",order:"desc",per_page:String(n)}),T=await fetch(`https://api.github.com/search/repositories?${g.toString()}`,{headers:{Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"}});if(!T.ok)throw new Error(`Failed to fetch GitHub search projects (${T.status})`);const k=await T.json(),U=k&&typeof k=="object"&&!Array.isArray(k)?k:{},H=Array.isArray(U.items)?U.items:[],X=[];for(const q of H){if(!q||typeof q!="object"||Array.isArray(q))continue;const P=q,F=typeof P.id=="number"?P.id:0,z=typeof P.full_name=="string"?P.full_name.trim():"",de=typeof P.html_url=="string"?P.html_url.trim():"";if(!F||!z||!de)continue;const[ue="",we=""]=z.split("/",2);X.push({id:F,fullName:z,owner:ue,repo:we,url:de,description:jd(z,typeof P.description=="string"?P.description:""),language:typeof P.language=="string"?P.language.trim():"",stars:typeof P.stargazers_count=="number"?P.stargazers_count:0})}return X}const r=e==="trending-daily"?"daily":e==="trending-weekly"?"weekly":"monthly",o=new URLSearchParams({since:r,limit:String(n)}),s=await fetch(`/codex-api/github-trending?${o.toString()}`),i=await s.json();if(!s.ok){const f=Fn(i,"Failed to fetch GitHub trending projects");throw new Error(f)}const l=i&&typeof i=="object"&&!Array.isArray(i)?i:{},c=Array.isArray(l.data)?l.data:[],p=[];for(const f of c){if(!f||typeof f!="object"||Array.isArray(f))continue;const g=f,T=typeof g.id=="number"?g.id:0,k=typeof g.fullName=="string"?g.fullName.trim():"",U=typeof g.url=="string"?g.url.trim():"";if(!T||!k||!U)continue;const[H="",X=""]=k.split("/",2);p.push({id:T,fullName:k,owner:H,repo:X,url:U,description:jd(k,typeof g.description=="string"?g.description:""),language:typeof g.language=="string"?g.language.trim():"",stars:typeof g.stars=="number"?g.stars:0})}return p}function Fn(e,t){const n=e&&typeof e=="object"&&!Array.isArray(e)?e:{},r=n.message;if(typeof r=="string"&&r.trim().length>0)return r;const o=n.error;return typeof o=="string"&&o.trim().length>0?o:t}async function _b(){try{const e=await fetch("/codex-api/thread-titles");return e.ok?(await e.json()).data??{titles:{},order:[]}:{titles:{},order:[]}}catch{return{titles:{},order:[]}}}async function eu(e,t){try{await fetch("/codex-api/thread-titles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,title:t})})}catch{}}async function Sb(){try{const e=await fetch("/codex-api/thread-pins");return e.ok?(await e.json()).data??{threadIds:[]}:{threadIds:[]}}catch{return{threadIds:[]}}}async function kb(e){try{await fetch("/codex-api/thread-pins",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadIds:e})})}catch{}}async function xb(e,t){var n;try{return((n=(await rn("generate-thread-title",{prompt:e,cwd:t})).title)==null?void 0:n.trim())??""}catch{return""}}async function Cb(e){try{const t={};e&&e.length>0&&(t.cwds=e);const n=await rn("skills/list",t),r=[],o=new Set;for(const s of n.data)for(const i of s.skills)!i.name||o.has(i.path)||(o.add(i.path),r.push({name:i.name,description:i.shortDescription||i.description||"",path:i.path,scope:i.scope,enabled:i.enabled}));return r}catch{return[]}}const Ab=6e4;async function tu(e){const t=new AbortController,n=setTimeout(()=>t.abort(),Ab);try{const r=new FormData;r.append("file",e);const o=await fetch("/codex-api/upload-file",{method:"POST",body:r,signal:t.signal});return o.ok?(await o.json()).path??null:null}catch{return null}finally{clearTimeout(n)}}const Eb={},Ib={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Mb(e,t){return S(),O("svg",Ib,[...t[0]||(t[0]=[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m6 9l6 6l6-6"},null,-1)])])}const ac=mt(Eb,[["render",Mb]]),Rb={},Pb={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function $b(e,t){return S(),O("svg",Pb,[...t[0]||(t[0]=[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 6l6 6l-6 6"},null,-1)])])}const Ob=mt(Rb,[["render",$b]]),Db={},Lb={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Nb(e,t){return S(),O("svg",Lb,[...t[0]||(t[0]=[v("path",{fill:"currentColor",d:"M6 12a2 2 0 1 0 0-4a2 2 0 0 0 0 4m6 0a2 2 0 1 0 0-4a2 2 0 0 0 0 4m6 0a2 2 0 1 0 0-4a2 2 0 0 0 0 4"},null,-1)])])}const Xs=mt(Db,[["render",Nb]]),jb={},Fb={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function Bb(e,t){return S(),O("svg",Fb,[...t[0]||(t[0]=[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 20h4L18.5 9.5a2.828 2.828 0 1 0-4-4L4 16zm9.5-13.5l4 4"},null,-1)])])}const ki=mt(jb,[["render",Bb]]),Ub={},qb={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Hb(e,t){return S(),O("svg",qb,[...t[0]||(t[0]=[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2"},null,-1)])])}const ic=mt(Ub,[["render",Hb]]),Vb={},Wb={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function zb(e,t){return S(),O("svg",Wb,[...t[0]||(t[0]=[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m5 19l2.757-7.351A1 1 0 0 1 8.693 11H21a1 1 0 0 1 .986 1.164l-.996 5.211A2 2 0 0 1 19.026 19za2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l3 3h7a2 2 0 0 1 2 2v2"},null,-1)])])}const Gb=mt(Vb,[["render",zb]]),Kb={},Yb={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Jb(e,t){return S(),O("svg",Yb,[...t[0]||(t[0]=[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 18v-6m0 0a4 4 0 0 1 4-4h2m-6 4a4 4 0 0 0-4-4H6m0-4a2 2 0 1 0 0 4a2 2 0 0 0 0-4m12 0a2 2 0 1 0 0 4a2 2 0 0 0 0-4m-6 14a2 2 0 1 0 0 4a2 2 0 0 0 0-4"},null,-1)])])}const mi=mt(Kb,[["render",Jb]]),Qb={},Xb={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Zb(e,t){return S(),O("svg",Xb,[...t[0]||(t[0]=[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 4.5l-4 4L7 10l-1.5 1.5l7 7L14 17l1.5-4l4-4M9 15l-4.5 4.5M14.5 4L20 9.5"},null,-1)])])}const nu=mt(Qb,[["render",Zb]]),e0={key:0,class:"sidebar-menu-row-left"},t0={class:"sidebar-menu-row-main"},n0={key:1,class:"sidebar-menu-row-right"},r0={key:0,class:"sidebar-menu-row-right-default"},o0={key:1,class:"sidebar-menu-row-right-hover"},s0=In({inheritAttrs:!1,__name:"SidebarMenuRow",props:{as:{default:"div"},forceRightHover:{type:Boolean,default:!1}},setup(e){const t=e,n=dv(),r=re(()=>!!n.left),o=re(()=>!!n.right),s=re(()=>!!n["right-hover"]),i=re(()=>o.value||s.value);return(l,c)=>(S(),ot(Ku(t.as),Mp({class:"sidebar-menu-row","data-has-left":r.value,"data-has-right":i.value,"data-has-right-hover":s.value,"data-force-right-hover":t.forceRightHover},l.$attrs),{default:Tt(()=>[r.value?(S(),O("span",e0,[zr(l.$slots,"left",{},void 0,!0)])):ie("",!0),v("span",t0,[zr(l.$slots,"default",{},void 0,!0)]),i.value?(S(),O("span",n0,[o.value?(S(),O("span",r0,[zr(l.$slots,"right",{},void 0,!0)])):ie("",!0),s.value?(S(),O("span",o0,[zr(l.$slots,"right-hover",{},void 0,!0)])):ie("",!0)])):ie("",!0)]),_:3},16,["data-has-left","data-has-right","data-has-right-hover","data-force-right-hover"]))}}),Ho=mt(s0,[["__scopeId","data-v-36239f39"]]),a0={class:"thread-tree-root"},i0={key:0,class:"pinned-section"},l0={class:"thread-list"},u0=["data-menu-open"],c0={class:"thread-left-stack"},d0=["data-state"],f0=["onClick"],p0=["onClick"],h0={class:"thread-row-title-wrap"},m0={class:"thread-row-title-line"},v0={class:"thread-row-title"},g0=["title"],y0=["data-state"],w0={class:"thread-row-time"},b0=["onClick"],T0=["aria-expanded"],_0=["data-active"],S0={key:0},k0=["data-active"],x0={key:0},C0={key:1,class:"thread-tree-no-results"},A0={key:2,class:"thread-tree-loading"},E0={key:3,class:"thread-list thread-list-global"},I0=["data-menu-open"],M0={class:"thread-left-stack"},R0=["data-state"],P0=["onClick"],$0=["onClick"],O0={class:"thread-row-title-wrap"},D0={class:"thread-row-title-line"},L0={class:"thread-row-title"},N0=["title"],j0=["data-state"],F0={class:"thread-row-time"},B0=["onClick"],U0=["data-project-name","data-expanded","data-dragging"],q0={class:"project-icon-stack"},H0={class:"project-icon-folder"},V0={class:"project-icon-chevron"},W0=["data-dragging-handle","onMousedown"],z0={class:"project-title"},G0={class:"project-hover-controls"},K0=["onClick"],Y0=["data-open-direction"],J0=["onClick"],Q0=["onClick"],X0=["onInput"],Z0=["aria-label","title","onClick"],eT={key:0,class:"thread-list"},tT=["data-menu-open"],nT={class:"thread-left-stack"},rT=["data-state"],oT=["onClick"],sT=["onClick"],aT={class:"thread-row-title-wrap"},iT={class:"thread-row-title-line"},lT={class:"thread-row-title"},uT=["title"],cT=["data-state"],dT={class:"thread-row-time"},fT=["onClick"],pT=["onClick"],hT=["data-open-direction"],mT={class:"rename-thread-panel",role:"dialog","aria-modal":"true","aria-label":"Thread title"},vT=["onKeydown"],gT={class:"rename-thread-panel",role:"dialog","aria-modal":"true","aria-label":"Delete thread"},yT={class:"rename-thread-title"},wT={class:"rename-thread-subtitle"},bT={class:"rename-thread-actions"},TT={class:"rename-thread-panel automation-thread-panel",role:"dialog","aria-modal":"true","aria-label":"Thread automation"},_T={class:"rename-thread-title"},ST={class:"automation-thread-field"},kT={class:"automation-thread-field"},xT={class:"automation-thread-field"},CT={class:"automation-thread-field"},AT={key:0,class:"rename-thread-subtitle automation-thread-error"},ET={class:"rename-thread-actions"},IT=["disabled"],MT=["disabled"],RT=["disabled"],PT=4,Jd=6,Qd="codex-web-local.thread-view-mode.v1",Xd="codex-web-local.collapsed-projects.v1",$T=In({__name:"SidebarThreadTree",props:{groups:{},projectDisplayNameById:{},selectedThreadId:{},isLoading:{type:Boolean},searchQuery:{},searchMatchedThreadIds:{}},emits:["select","archive","start-new-thread","browse-thread-files","rename-project","rename-thread","remove-project","reorder-project","export-thread","fork-thread"],setup(e,{emit:t}){const n=e,r=t,o=M({}),s=M({});let i=!1;const l=M([]),c=M(""),p=M(""),f=M({}),g=M({}),T=M({}),k=M("actions"),U=M(""),H=M(!1),X=M(""),q=M(""),P=M(null),F=M(!1),z=M(""),de=M(""),ue=M({}),we=M(!1),ke=M(""),me=M("create"),Ie=M(""),Oe=M(!1),Y=M({name:"",prompt:"",rrule:"FREQ=DAILY;BYHOUR=9;BYMINUTE=0",status:"ACTIVE"}),ve=M(null),Fe=M(null),Le=M(null);let Me=null,Te=null;const _e=M(""),He=M({}),Ke=new Map,Ve=new Map,Ye=new Map,yt=new WeakMap,Qe=M(null),xt=M(null),Ne=M(!1),Q=M(Pe()),pe=typeof window<"u"?new ResizeObserver(y=>{for(const w of y){const C=w.target,W=yt.get(C);W&&xn(W,C)}}):null;function ge(){if(typeof window>"u")return{};try{const y=window.localStorage.getItem(Xd);if(!y)return{};const w=JSON.parse(y);return!w||typeof w!="object"||Array.isArray(w)?{}:w}catch{return{}}}function Pe(){return typeof window>"u"?"project":window.localStorage.getItem(Qd)==="chronological"?"chronological":"project"}s.value=ge(),it(s,y=>{typeof window>"u"||window.localStorage.setItem(Xd,JSON.stringify(y))},{deep:!0}),it(Q,y=>{typeof window>"u"||window.localStorage.setItem(Qd,y)});const Ge=re(()=>n.searchQuery.trim().toLowerCase()),_=re(()=>Ge.value.length>0),A=re(()=>n.searchMatchedThreadIds?new Set(n.searchMatchedThreadIds):null),B=re(()=>new Set(l.value));function G(y){if(!_.value)return!0;if(A.value)return A.value.has(y.id);const w=Ge.value;return y.title.toLowerCase().includes(w)||y.preview.toLowerCase().includes(w)}const ne=re(()=>_.value?n.groups.map(y=>({...y,threads:y.threads.filter(G)})).filter(y=>y.threads.length>0):n.groups),ee=re(()=>Q.value==="chronological"),le=re(()=>{const y=ne.value,w=[];for(const C of y)for(const W of C.threads)B.value.has(W.id)||w.push(W);return w.sort((C,W)=>{const je=new Date(C.updatedAtIso||C.createdAtIso).getTime();return new Date(W.updatedAtIso||W.createdAtIso).getTime()-je})}),fe=re(()=>{const y=new Map;for(const w of n.groups)for(const C of w.threads)y.set(C.id,C);return y});it(l,y=>{i&&kb(y)}),it(fe,y=>{const w=l.value.filter(C=>y.has(C));w.length!==l.value.length&&(l.value=w)}),$o(async()=>{const{threadIds:y}=await Sb(),w=Array.isArray(y)?y.filter(C=>typeof C=="string").map(C=>C.trim()).filter((C,W,je)=>C.length>0&&je.indexOf(C)===W):[];w.length>0&&(l.value=w);try{ue.value=await jw()}catch{ue.value={}}i=!0});const ce=re(()=>at(z.value)),oe=re(()=>{const y=new Map;for(const w of n.groups)for(const C of w.threads)y.set(C.id,w.projectName);return y}),Ee=re(()=>{const y=new Map;for(const w of n.groups){const C=w.threads.filter(W=>!B.value.has(W.id));y.set(w.projectName,C)}return y}),ye=re(()=>{const y=new Map;for(const w of n.groups)for(const C of w.threads){const W=new Date(C.updatedAtIso||C.createdAtIso).getTime();y.set(C.id,W)}return y}),he=re(()=>{const y=p.value;return y?fe.value.get(y)??null:null}),De=re(()=>l.value.map(y=>fe.value.get(y)??null).filter(y=>y!==null).filter(G)),$=re(()=>{const y=Le.value;if(!y||y.dropTargetIndexFull===null||n.groups.length===0)return null;const w=Math.max(0,Math.min(y.dropTargetIndexFull,n.groups.length)),C=w>y.fromIndex?w-1:w,W=Math.max(0,Math.min(C,n.groups.length-1));return W===y.fromIndex?null:W}),D=re(()=>{const w=(_.value?ne.value:n.groups).map(vt=>vt.projectName),C=Le.value,W=$.value;if(!C||W===null)return w;const je=[...w],[wt]=je.splice(C.fromIndex,1);return wt?(je.splice(W,0,wt),je):w}),N=re(()=>{const y={};let w=0;for(const C of D.value)y[C]=w,w+=mn(C);return y}),V=re(()=>{let y=0;for(const w of D.value)y+=mn(w);return{height:`${Math.max(0,y)}px`}});function te(y){if(Number.isNaN(y))return"n/a";const w=Math.abs(Date.now()-y);if(w<6e4)return"now";const C=Math.floor(w/6e4);if(C<60)return`${C}m`;const W=Math.floor(C/60);return W<24?`${W}h`:`${Math.floor(W/24)}d`}function be(y){const w=ye.value.get(y.id);return te(typeof w=="number"?w:new Date(y.updatedAtIso||y.createdAtIso).getTime())}function $e(y){return B.value.has(y)}function st(y){if($e(y)){l.value=l.value.filter(w=>w!==y);return}l.value=[y,...l.value]}function ut(y){r("select",y)}function at(y){return!!ue.value[y]}function Pt(y){const w=ue.value[y];if(!w)return"";const C=w.status==="PAUSED"?"-":w.nextRunAtMs?new Date(w.nextRunAtMs).toLocaleString():"Not scheduled";return`${w.name} • Next run: ${C}`}function Lt(y){r("export-thread",y),$t()}function bn(y){r("fork-thread",y),$t()}function ir(y){return`start new thread ${fn(y)}`}function Dr(y){r("start-new-thread",y)}function Sr(y){r("browse-thread-files",y),$t()}function hr(y,w){if(p.value===y){if(w){const C=w.relatedTarget,W=xt.value;if(C instanceof Node&&W&&W.contains(C))return}$t()}}function et(y){return p.value===y}function $t(){p.value="",T.value={}}function Tn(y){if(p.value===y){$t();return}Kt(),Ne.value=!1,p.value=y,Gt(()=>{Yt(y)})}function mr(y,w){y.preventDefault(),p.value=w}function Qt(y,w){X.value=y,q.value=w,H.value=!0,$t(),Gt(()=>{var C,W;(C=P.value)==null||C.focus(),(W=P.value)==null||W.select()})}function lr(){H.value=!1,X.value="",q.value=""}function Xt(){const y=X.value,w=q.value.trim();!y||!w||(r("rename-thread",{threadId:y,title:w}),lr())}function ct(y,w){z.value=y,de.value=w,F.value=!0,$t()}function Bt(){F.value=!1,z.value="",de.value=""}async function dn(){const y=z.value;if(y){if(at(y)){try{await Hd(y)}catch{}ue.value=Object.fromEntries(Object.entries(ue.value).filter(([w])=>w!==y))}l.value=l.value.filter(w=>w!==y),r("archive",y),Bt()}}function Lr(y){const w=ue.value[y];ke.value=y,me.value=w?"edit":"create",Ie.value="",Y.value={name:(w==null?void 0:w.name)??"Thread automation",prompt:(w==null?void 0:w.prompt)??"",rrule:(w==null?void 0:w.rrule)??"FREQ=DAILY;BYHOUR=9;BYMINUTE=0",status:(w==null?void 0:w.status)??"ACTIVE"},we.value=!0,$t()}function _n(){we.value=!1,ke.value="",Ie.value="",Oe.value=!1}async function Bn(){const y=ke.value;if(y){Oe.value=!0,Ie.value="";try{const w=await Fw({threadId:y,name:Y.value.name,prompt:Y.value.prompt,rrule:Y.value.rrule,status:Y.value.status});ue.value={...ue.value,[y]:w},_n()}catch(w){Ie.value=w instanceof Error?w.message:"Failed to save automation",Oe.value=!1}}}async function Kr(){const y=ke.value;if(y){Oe.value=!0,Ie.value="";try{await Hd(y),ue.value=Object.fromEntries(Object.entries(ue.value).filter(([w])=>w!==y)),_n()}catch(w){Ie.value=w instanceof Error?w.message:"Failed to remove automation",Oe.value=!1}}}function fn(y){return n.projectDisplayNameById[y]??y}function Zn(y){return c.value===y}function Kt(){c.value="",k.value="actions",U.value=""}function ur(){const y=!Ne.value;y&&(Kt(),$t()),Ne.value=y}function on(y){Q.value=y,Ne.value=!1}function er(y){if(c.value===y){Kt();return}$t(),Ne.value=!1,c.value=y,k.value="actions",U.value=fn(y),Gt(()=>{qn(y)})}function sn(y){$t(),c.value=y,k.value="rename",U.value=fn(y),Gt(()=>{qn(y)})}function kr(y){r("rename-project",{projectName:y,displayName:U.value})}function tr(y){r("remove-project",y),Kt()}function vr(y,w){if(!y.altKey||y.key!=="ArrowUp"&&y.key!=="ArrowDown")return;const C=n.groups.findIndex(wt=>wt.projectName===w);if(C<0)return;const W=y.key==="ArrowUp"?-1:1,je=Math.max(0,Math.min(C+W,n.groups.length-1));je!==C&&(y.preventDefault(),r("reorder-project",{projectName:w,toIndex:je}))}function gr(y){return o.value[y]===!0}function pn(y){return s.value[y]===!0}function hn(y){o.value={...o.value,[y]:!gr(y)}}function Zt(y){if(_e.value===y){_e.value="";return}s.value={...s.value,[y]:!pn(y)}}function mn(y){const w=He.value[y]??0,C=Le.value,je=((C==null?void 0:C.projectName)===y?C.groupHeight:null)??w,wt=pn(y)?0:Jd;return Math.max(0,je+wt)}function Un(y,w){const C=w instanceof HTMLElement?w:w&&"$el"in w&&w.$el instanceof HTMLElement?w.$el:null;if(C){Ve.set(y,C);return}Ve.delete(y)}function vn(y,w){const C=w instanceof HTMLElement?w:w&&"$el"in w&&w.$el instanceof HTMLElement?w.$el:null;if(C){Ye.set(y,C);return}Ye.delete(y)}function Mn(y){let w=y.parentElement;for(;w;){const C=window.getComputedStyle(w),W=C.overflowY||C.overflow;if(W==="auto"||W==="scroll"||W==="hidden"||W==="clip")return w.getBoundingClientRect();w=w.parentElement}return new DOMRect(0,0,window.innerWidth,window.innerHeight)}function gn(y,w){const C=y.getBoundingClientRect(),W=Mn(y),je=6,wt=W.bottom-C.bottom,vt=C.top-W.top;return wt>=w+je?"down":vt>wt?"up":"down"}function Nt(y,w){const C=Ye.get(y);if(!C)return"down";const W=gn(C,w);return g.value={...g.value,[y]:W},W}function nr(y){return g.value[y]??"down"}function qn(y){const w=Ve.get(y);w&&(f.value={...f.value,[y]:gn(w,112)})}function rr(y,w,C){return Math.min(Math.max(y,w),C)}function Yt(y){const w=Ye.get(y);if(!w)return;const C=xt.value,W=C==null?void 0:C.getBoundingClientRect(),je=(W==null?void 0:W.height)||(C==null?void 0:C.offsetHeight)||112,wt=(W==null?void 0:W.width)||(C==null?void 0:C.offsetWidth)||160,vt=Nt(y,je),sr=w.getBoundingClientRect(),yn=8,Ut=4,yr=Math.max(yn,window.innerWidth-wt-yn),wr=rr(sr.right-wt,yn,yr),br=rr(vt==="up"?sr.top-je-Ut:sr.bottom+Ut,yn,Math.max(yn,window.innerHeight-je-yn));T.value={left:`${Math.round(wr)}px`,top:`${Math.round(br)}px`}}function Ct(){const y=p.value;y&&Yt(y)}function Sn(){window.addEventListener("resize",Ct),document.addEventListener("scroll",Ct,!0)}function ho(){window.removeEventListener("resize",Ct),document.removeEventListener("scroll",Ct,!0)}function kn(y){const w=c.value;if(!w)return!1;const C=Ve.get(w);if(!C)return!1;if((typeof y.composedPath=="function"?y.composedPath():[]).includes(C))return!0;const je=y.target;return je instanceof Node?C.contains(je):!1}function Hn(y){const w=p.value;if(!w)return!1;const C=Ye.get(w);if(!C)return!1;const W=typeof y.composedPath=="function"?y.composedPath():[];if(W.includes(C))return!0;const je=xt.value;if(je&&W.includes(je))return!0;const wt=y.target;return wt instanceof Node?!!(C.contains(wt)||je&&je.contains(wt)):!1}function Vn(y){if(Ne.value){const w=Qe.value,C=typeof y.composedPath=="function"?y.composedPath():[];!!w&&(C.includes(w)||y.target instanceof Node&&w.contains(y.target))||(Ne.value=!1)}c.value&&(kn(y)||Kt(),p.value&&(Hn(y)||$t()))}function qt(y){c.value&&!kn(y)&&Kt(),p.value&&!Hn(y)&&$t()}function At(){Ne.value&&(Ne.value=!1),c.value&&Kt(),p.value&&$t()}function It(){window.addEventListener("pointerdown",Vn,{capture:!0}),window.addEventListener("focusin",qt,{capture:!0}),window.addEventListener("blur",At)}function ht(){window.removeEventListener("pointerdown",Vn,{capture:!0}),window.removeEventListener("focusin",qt,{capture:!0}),window.removeEventListener("blur",At)}function xn(y,w){const C=w.getBoundingClientRect().height;if(!Number.isFinite(C)||C<=0)return;const W=He.value[y];W!==void 0&&Math.abs(W-C)<.5||(He.value={...He.value,[y]:C})}function an(y,w){const C=Ke.get(y);C&&C!==w&&pe&&pe.unobserve(C);const W=w instanceof HTMLElement?w:w&&"$el"in w&&w.$el instanceof HTMLElement?w.$el:null;if(W){Ke.set(y,W),yt.set(W,y),xn(y,W),pe==null||pe.observe(W);return}C&&(pe==null||pe.unobserve(C)),Ke.delete(y)}function Wn(y,w){if(y.button!==0||Fe.value||Le.value)return;const C=n.groups.findIndex(vt=>vt.projectName===w),W=Ke.get(w);if(C<0||!W)return;const je=W.getBoundingClientRect(),wt=pn(w)?0:Jd;Fe.value={projectName:w,fromIndex:C,startClientX:y.clientX,startClientY:y.clientY,pointerOffsetY:y.clientY-je.top,groupLeft:je.left,groupWidth:je.width,groupHeight:je.height,groupOuterHeight:je.height+wt},y.preventDefault(),cr()}function cr(){window.addEventListener("mousemove",en),window.addEventListener("mouseup",Rn),window.addEventListener("keydown",Nr)}function zn(){window.removeEventListener("mousemove",en),window.removeEventListener("mouseup",Rn),window.removeEventListener("keydown",Nr)}function en(y){Me={clientX:y.clientX,clientY:y.clientY},xr()}function Rn(y){Cn({clientX:y.clientX,clientY:y.clientY});const w=Le.value;if(w&&$.value!==null){const C=n.groups.findIndex(W=>W.projectName===w.projectName);if(C>=0){const W=$.value;W!==C&&r("reorder-project",{projectName:w.projectName,toIndex:W})}}dr()}function Nr(y){y.key==="Escape"&&(!Fe.value&&!Le.value||(y.preventDefault(),dr()))}function dr(){Te!==null&&(window.cancelAnimationFrame(Te),Te=null),Me=null,Fe.value=null,Le.value=null,_e.value="",zn()}function xr(){Te===null&&(Te=window.requestAnimationFrame(()=>{if(Te=null,!Me)return;const y=Me;Me=null,Cn(y)}))}function Cn(y){const w=Fe.value;if(!Le.value&&w){const C=y.clientX-w.startClientX,W=y.clientY-w.startClientY;if(Math.hypot(C,W)<PT)return;Kt(),_e.value=w.projectName,Le.value={projectName:w.projectName,fromIndex:w.fromIndex,pointerOffsetY:w.pointerOffsetY,groupLeft:w.groupLeft,groupWidth:w.groupWidth,groupHeight:w.groupHeight,groupOuterHeight:w.groupOuterHeight,ghostTop:y.clientY-w.pointerOffsetY,dropTargetIndexFull:null}}Le.value&&E(y)}function E(y){const w=Le.value;if(!w)return;if(w.ghostTop=y.clientY-w.pointerOffsetY,!j(y)){w.dropTargetIndexFull=null;return}const C=y.clientY,W=ve.value;if(!W){w.dropTargetIndexFull=null;return}const je=W.getBoundingClientRect(),wt=new Map(n.groups.map((Ut,yr)=>[Ut.projectName,yr])),vt=n.groups.map(Ut=>Ut.projectName).filter(Ut=>Ut!==w.projectName);let sr=0,yn=n.groups.length;for(const Ut of vt){const yr=wt.get(Ut);if(yr===void 0)continue;const wr=mn(Ut),br=je.top+sr+wr/2;if(C<br){yn=yr;break}sr+=wr}w.dropTargetIndexFull=yn}function j(y){const w=ve.value;if(!w)return!1;const C=w.getBoundingClientRect(),W=y.clientX>=C.left&&y.clientX<=C.right,je=y.clientY>=C.top-32&&y.clientY<=C.bottom+32;return W&&je}function Z(y){var w;return((w=Le.value)==null?void 0:w.projectName)===y}function Ce(y){const w=Le.value,C=N.value[y]??0,W=p.value?oe.value.get(p.value)??"":"",je=c.value===y||W===y;return!w||w.projectName!==y?{position:"absolute",top:"0",left:"0",right:"0",zIndex:je?"40":"1",transform:`translate3d(0, ${C}px, 0)`,willChange:"transform",transition:"transform 180ms ease"}:{position:"fixed",top:"0",left:`${w.groupLeft}px`,width:`${w.groupWidth}px`,height:`${w.groupHeight}px`,zIndex:"50",pointerEvents:"none",transform:`translate3d(0, ${w.ghostTop}px, 0)`,willChange:"transform",transition:"transform 0ms linear"}}function tt(y){return Ee.value.get(y.projectName)??[]}function jt(y){if(_.value)return tt(y);if(pn(y.projectName))return[];const w=tt(y);return gr(y.projectName)?w:w.slice(0,10)}function Pn(y){return _.value?!1:!pn(y.projectName)&&tt(y).length>10}function dt(y){return tt(y).length>0}function Ht(y){return!!y.pendingRequestState||y.inProgress||y.unread}function or(y){return y.pendingRequestState==="approval"?"Awaiting approval":"Awaiting response"}function Mt(y){return y.pendingRequestState==="approval"?"awaiting-approval":y.pendingRequestState==="response"?"awaiting-response":y.inProgress?"working":y.unread?"unread":"idle"}it(()=>n.groups.map(y=>y.projectName),y=>{var je,wt;const w=((je=Le.value)==null?void 0:je.projectName)??((wt=Fe.value)==null?void 0:wt.projectName)??"";w&&!n.groups.some(vt=>vt.projectName===w)&&dr();const C=new Set(y),W=Object.fromEntries(Object.entries(He.value).filter(([vt])=>C.has(vt)));Object.keys(W).length!==Object.keys(He.value).length&&(He.value=W)});const Gn=re(()=>Ne.value||c.value!==""||p.value!=="");return it(Gn,y=>{if(y){It();return}ht()}),it(p,y=>{if(!y){ho();return}Sn(),Gt(()=>{Yt(y)})}),Xo(()=>{for(const y of Ke.values())pe==null||pe.unobserve(y);Ke.clear(),Ve.clear(),ho(),ht(),dr()}),(y,w)=>(S(),O("section",a0,[De.value.length>0?(S(),O("section",i0,[v("ul",l0,[(S(!0),O(qe,null,Ot(De.value,C=>(S(),O("li",{key:C.id,class:"thread-row-item","data-menu-open":et(C.id)?"true":"false"},[Be(Ho,{class:"thread-row","data-active":C.id===e.selectedThreadId,"data-pinned":$e(C.id),"data-menu-open":et(C.id)?"true":"false","force-right-hover":et(C.id),onMouseleave:W=>hr(C.id,W),onContextmenu:W=>mr(W,C.id)},{left:Tt(()=>[v("span",c0,[Ht(C)?(S(),O("span",{key:0,class:"thread-status-indicator","data-state":Mt(C)},null,8,d0)):ie("",!0),v("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:W=>st(C.id)},[Be(nu,{class:"thread-icon"})],8,f0)])]),right:Tt(()=>[v("span",w0,ae(be(C)),1)]),"right-hover":Tt(()=>[v("div",{ref_for:!0,ref:W=>vn(C.id,W),class:"thread-menu-wrap"},[v("button",{class:"thread-menu-trigger",type:"button",title:"thread_menu",onClick:lt(W=>Tn(C.id),["stop"])},[Be(Xs,{class:"thread-icon"})],8,b0)],512)]),default:Tt(()=>[v("button",{class:"thread-main-button",type:"button",onClick:W=>ut(C.id)},[v("span",h0,[v("span",m0,[v("span",v0,ae(C.title),1),C.hasWorktree?(S(),ot(mi,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):ie("",!0),at(C.id)?(S(),O("span",{key:1,class:"thread-row-automation-chip",title:Pt(C.id)}," Auto ",8,g0)):ie("",!0),C.pendingRequestState?(S(),O("span",{key:2,class:"thread-row-request-chip","data-state":C.pendingRequestState},ae(or(C)),9,y0)):ie("",!0)])])],8,p0)]),_:2},1032,["data-active","data-pinned","data-menu-open","force-right-hover","onMouseleave","onContextmenu"])],8,u0))),128))])])):ie("",!0),Be(Ho,{as:"header",class:"thread-tree-header-row"},{right:Tt(()=>[v("div",{ref_key:"organizeMenuWrapRef",ref:Qe,class:"organize-menu-wrap"},[v("button",{class:"organize-menu-trigger",type:"button","aria-expanded":Ne.value,"aria-label":"Organize threads",title:"Organize threads",onClick:ur},[Be(Xs,{class:"thread-icon"})],8,T0),Ne.value?(S(),O("div",{key:0,class:"organize-menu-panel",onClick:w[2]||(w[2]=lt(()=>{},["stop"]))},[w[19]||(w[19]=v("p",{class:"organize-menu-title"},"Organize",-1)),v("button",{class:"organize-menu-item","data-active":Q.value==="project",type:"button",onClick:w[0]||(w[0]=C=>on("project"))},[w[17]||(w[17]=v("span",null,"By project",-1)),Q.value==="project"?(S(),O("span",S0,"✓")):ie("",!0)],8,_0),v("button",{class:"organize-menu-item","data-active":Q.value==="chronological",type:"button",onClick:w[1]||(w[1]=C=>on("chronological"))},[w[18]||(w[18]=v("span",null,"Chronological list",-1)),Q.value==="chronological"?(S(),O("span",x0,"✓")):ie("",!0)],8,k0)])):ie("",!0)],512)]),default:Tt(()=>[w[20]||(w[20]=v("span",{class:"thread-tree-header"},"Threads",-1))]),_:1}),_.value&&ne.value.length===0?(S(),O("p",C0,"No matching threads")):e.isLoading&&e.groups.length===0?(S(),O("p",A0,"Loading threads...")):ee.value?(S(),O("ul",E0,[(S(!0),O(qe,null,Ot(le.value,C=>(S(),O("li",{key:C.id,class:"thread-row-item","data-menu-open":et(C.id)?"true":"false"},[Be(Ho,{class:"thread-row","data-active":C.id===e.selectedThreadId,"data-pinned":$e(C.id),"data-menu-open":et(C.id)?"true":"false","force-right-hover":et(C.id),onMouseleave:W=>hr(C.id,W),onContextmenu:W=>mr(W,C.id)},{left:Tt(()=>[v("span",M0,[Ht(C)?(S(),O("span",{key:0,class:"thread-status-indicator","data-state":Mt(C)},null,8,R0)):ie("",!0),v("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:W=>st(C.id)},[Be(nu,{class:"thread-icon"})],8,P0)])]),right:Tt(()=>[v("span",F0,ae(be(C)),1)]),"right-hover":Tt(()=>[v("div",{ref_for:!0,ref:W=>vn(C.id,W),class:"thread-menu-wrap"},[v("button",{class:"thread-menu-trigger",type:"button",title:"thread_menu",onClick:lt(W=>Tn(C.id),["stop"])},[Be(Xs,{class:"thread-icon"})],8,B0)],512)]),default:Tt(()=>[v("button",{class:"thread-main-button",type:"button",onClick:W=>ut(C.id)},[v("span",O0,[v("span",D0,[v("span",L0,ae(C.title),1),C.hasWorktree?(S(),ot(mi,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):ie("",!0),at(C.id)?(S(),O("span",{key:1,class:"thread-row-automation-chip",title:Pt(C.id)}," Auto ",8,N0)):ie("",!0),C.pendingRequestState?(S(),O("span",{key:2,class:"thread-row-request-chip","data-state":C.pendingRequestState},ae(or(C)),9,j0)):ie("",!0)])])],8,$0)]),_:2},1032,["data-active","data-pinned","data-menu-open","force-right-hover","onMouseleave","onContextmenu"])],8,I0))),128))])):(S(),O("div",{key:4,ref_key:"groupsContainerRef",ref:ve,class:"thread-tree-groups",style:oo(V.value)},[(S(!0),O(qe,null,Ot(ne.value,C=>(S(),O("article",{key:C.projectName,ref_for:!0,ref:W=>an(C.projectName,W),class:"project-group","data-project-name":C.projectName,"data-expanded":!pn(C.projectName),"data-dragging":Z(C.projectName),style:oo(Ce(C.projectName))},[Be(Ho,{as:"div",class:"project-header-row",role:"button",tabindex:"0",onClick:W=>Zt(C.projectName),onKeydown:[W=>vr(W,C.projectName),zt(lt(W=>Zt(C.projectName),["prevent"]),["enter"]),zt(lt(W=>Zt(C.projectName),["prevent"]),["space"])]},{left:Tt(()=>[v("span",q0,[v("span",H0,[pn(C.projectName)?(S(),ot(ic,{key:0,class:"thread-icon"})):(S(),ot(Gb,{key:1,class:"thread-icon"}))]),v("span",V0,[pn(C.projectName)?(S(),ot(Ob,{key:0,class:"thread-icon"})):(S(),ot(ac,{key:1,class:"thread-icon"}))])])]),right:Tt(()=>[v("div",G0,[v("div",{ref_for:!0,ref:W=>Un(C.projectName,W),class:"project-menu-wrap"},[v("button",{class:"project-menu-trigger",type:"button",title:"project_menu",onClick:lt(W=>er(C.projectName),["stop"])},[Be(Xs,{class:"thread-icon"})],8,K0),Zn(C.projectName)?(S(),O("div",{key:0,class:"project-menu-panel","data-open-direction":f.value[C.projectName]??"down",onClick:w[4]||(w[4]=lt(()=>{},["stop"]))},[k.value==="actions"?(S(),O(qe,{key:0},[v("button",{class:"project-menu-item",type:"button",onClick:W=>sn(C.projectName)}," Edit name ",8,J0),v("button",{class:"project-menu-item project-menu-item-danger",type:"button",onClick:W=>tr(C.projectName)}," Remove ",8,Q0)],64)):(S(),O(qe,{key:1},[w[21]||(w[21]=v("label",{class:"project-menu-label"},"Project name",-1)),nn(v("input",{"onUpdate:modelValue":w[3]||(w[3]=W=>U.value=W),class:"project-menu-input",type:"text",onInput:W=>kr(C.projectName)},null,40,X0),[[wn,U.value]])],64))],8,Y0)):ie("",!0)],512),v("button",{class:"thread-start-button",type:"button","aria-label":ir(C.projectName),title:ir(C.projectName),onClick:lt(W=>Dr(C.projectName),["stop"])},[Be(ki,{class:"thread-icon"})],8,Z0)])]),default:Tt(()=>[v("span",{class:"project-main-button","data-dragging-handle":Z(C.projectName),onMousedown:lt(W=>Wn(W,C.projectName),["left"])},[v("span",z0,ae(fn(C.projectName)),1)],40,W0)]),_:2},1032,["onClick","onKeydown"]),dt(C)?(S(),O("ul",eT,[(S(!0),O(qe,null,Ot(jt(C),W=>(S(),O("li",{key:W.id,class:"thread-row-item","data-menu-open":et(W.id)?"true":"false"},[Be(Ho,{class:"thread-row","data-active":W.id===e.selectedThreadId,"data-pinned":$e(W.id),"data-menu-open":et(W.id)?"true":"false","force-right-hover":et(W.id),onMouseleave:je=>hr(W.id,je),onContextmenu:je=>mr(je,W.id)},{left:Tt(()=>[v("span",nT,[Ht(W)?(S(),O("span",{key:0,class:"thread-status-indicator","data-state":Mt(W)},null,8,rT)):ie("",!0),v("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:je=>st(W.id)},[Be(nu,{class:"thread-icon"})],8,oT)])]),right:Tt(()=>[v("span",dT,ae(be(W)),1)]),"right-hover":Tt(()=>[v("div",{ref_for:!0,ref:je=>vn(W.id,je),class:"thread-menu-wrap"},[v("button",{class:"thread-menu-trigger",type:"button",title:"thread_menu",onClick:lt(je=>Tn(W.id),["stop"])},[Be(Xs,{class:"thread-icon"})],8,fT)],512)]),default:Tt(()=>[v("button",{class:"thread-main-button",type:"button",onClick:je=>ut(W.id)},[v("span",aT,[v("span",iT,[v("span",lT,ae(W.title),1),W.hasWorktree?(S(),ot(mi,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):ie("",!0),at(W.id)?(S(),O("span",{key:1,class:"thread-row-automation-chip",title:Pt(W.id)}," Auto ",8,uT)):ie("",!0),W.pendingRequestState?(S(),O("span",{key:2,class:"thread-row-request-chip","data-state":W.pendingRequestState},ae(or(W)),9,cT)):ie("",!0)])])],8,sT)]),_:2},1032,["data-active","data-pinned","data-menu-open","force-right-hover","onMouseleave","onContextmenu"])],8,tT))),128))])):(S(),ot(Ho,{key:1,as:"p",class:"project-empty-row"},{left:Tt(()=>[...w[22]||(w[22]=[v("span",{class:"project-empty-spacer"},null,-1)])]),default:Tt(()=>[w[23]||(w[23]=v("span",{class:"project-empty"},"No threads",-1))]),_:1})),Pn(C)?(S(),ot(Ho,{key:2,class:"thread-show-more-row"},{left:Tt(()=>[...w[24]||(w[24]=[v("span",{class:"thread-show-more-spacer"},null,-1)])]),default:Tt(()=>[v("button",{class:"thread-show-more-button",type:"button",onClick:W=>hn(C.projectName)},ae(gr(C.projectName)?"Show less":"Show more"),9,pT)]),_:2},1024)):ie("",!0)],12,U0))),128))],4)),(S(),ot(ws,{to:"body"},[he.value?(S(),O("div",{key:0,ref_key:"openThreadMenuPanelRef",ref:xt,class:"thread-menu-panel thread-menu-panel-fixed",style:oo(T.value),"data-open-direction":nr(he.value.id),onClick:w[11]||(w[11]=lt(()=>{},["stop"]))},[v("button",{class:"thread-menu-item",type:"button",onClick:w[5]||(w[5]=C=>Lr(he.value.id))},ae(at(he.value.id)?"Edit automation…":"Add automation…"),1),v("button",{class:"thread-menu-item",type:"button",onClick:w[6]||(w[6]=C=>Sr(he.value.id))}," Browse files "),v("button",{class:"thread-menu-item",type:"button",onClick:w[7]||(w[7]=C=>Lt(he.value.id))}," Export chat "),v("button",{class:"thread-menu-item",type:"button",onClick:w[8]||(w[8]=C=>bn(he.value.id))}," Create chat fork "),v("button",{class:"thread-menu-item",type:"button",onClick:w[9]||(w[9]=C=>Qt(he.value.id,he.value.title))}," Rename thread "),v("button",{class:"thread-menu-item thread-menu-item-danger",type:"button",onClick:w[10]||(w[10]=C=>ct(he.value.id,he.value.title))}," Delete thread ")],12,hT)):ie("",!0)])),(S(),ot(ws,{to:"body"},[H.value?(S(),O("div",{key:0,class:"rename-thread-overlay",onClick:lt(lr,["self"])},[v("div",mT,[w[25]||(w[25]=v("h3",{class:"rename-thread-title"},"Rename thread",-1)),w[26]||(w[26]=v("p",{class:"rename-thread-subtitle"},"Make it short and recognizable.",-1)),nn(v("input",{ref_key:"renameThreadInputRef",ref:P,"onUpdate:modelValue":w[12]||(w[12]=C=>q.value=C),class:"rename-thread-input",type:"text",placeholder:"Add title...",onKeydown:[zt(lt(Xt,["prevent"]),["enter"]),zt(lt(lr,["prevent"]),["esc"])]},null,40,vT),[[wn,q.value]]),v("div",{class:"rename-thread-actions"},[v("button",{class:"rename-thread-button",type:"button",onClick:lr},"Cancel"),v("button",{class:"rename-thread-button rename-thread-button-primary",type:"button",onClick:Xt},"Save")])])])):ie("",!0)])),(S(),ot(ws,{to:"body"},[F.value?(S(),O("div",{key:0,class:"rename-thread-overlay",onClick:lt(Bt,["self"])},[v("div",gT,[v("h3",yT,ae(ce.value?"Archive chat and remove automation?":"Delete thread?"),1),v("p",wT,[ce.value?(S(),O(qe,{key:0},[so(' This will archive the thread "'+ae(de.value)+'" and remove the attached heartbeat automation. ',1)],64)):(S(),O(qe,{key:1},[so(' This will archive the thread "'+ae(de.value)+'". You can find it later in archived threads. ',1)],64))]),v("div",bT,[v("button",{class:"rename-thread-button",type:"button",onClick:Bt},"Cancel"),v("button",{class:"rename-thread-button rename-thread-button-danger",type:"button",onClick:dn},ae(ce.value?"Archive and remove":"Delete"),1)])])])):ie("",!0)])),(S(),ot(ws,{to:"body"},[we.value?(S(),O("div",{key:0,class:"rename-thread-overlay",onClick:lt(_n,["self"])},[v("div",TT,[v("h3",_T,ae(me.value==="edit"?"Edit automation":"Add automation"),1),w[32]||(w[32]=v("p",{class:"rename-thread-subtitle"},"This creates a heartbeat automation attached to the selected thread.",-1)),v("label",ST,[w[27]||(w[27]=v("span",{class:"automation-thread-label"},"Name",-1)),nn(v("input",{"onUpdate:modelValue":w[13]||(w[13]=C=>Y.value.name=C),class:"rename-thread-input",type:"text",placeholder:"Automation name"},null,512),[[wn,Y.value.name]])]),v("label",kT,[w[28]||(w[28]=v("span",{class:"automation-thread-label"},"Prompt",-1)),nn(v("textarea",{"onUpdate:modelValue":w[14]||(w[14]=C=>Y.value.prompt=C),class:"automation-thread-textarea",rows:"6",placeholder:"Describe what the automation should do"},null,512),[[wn,Y.value.prompt]])]),v("label",xT,[w[29]||(w[29]=v("span",{class:"automation-thread-label"},"Schedule (RRULE)",-1)),nn(v("input",{"onUpdate:modelValue":w[15]||(w[15]=C=>Y.value.rrule=C),class:"rename-thread-input",type:"text",placeholder:"FREQ=DAILY;BYHOUR=9;BYMINUTE=0"},null,512),[[wn,Y.value.rrule]])]),v("label",CT,[w[31]||(w[31]=v("span",{class:"automation-thread-label"},"Status",-1)),nn(v("select",{"onUpdate:modelValue":w[16]||(w[16]=C=>Y.value.status=C),class:"automation-thread-select"},[...w[30]||(w[30]=[v("option",{value:"ACTIVE"},"Active",-1),v("option",{value:"PAUSED"},"Paused",-1)])],512),[[kg,Y.value.status]])]),Ie.value?(S(),O("p",AT,ae(Ie.value),1)):ie("",!0),v("div",ET,[me.value==="edit"?(S(),O("button",{key:0,class:"rename-thread-button rename-thread-button-danger",type:"button",disabled:Oe.value,onClick:Kr}," Remove ",8,IT)):ie("",!0),v("button",{class:"rename-thread-button",type:"button",disabled:Oe.value,onClick:_n}," Cancel ",8,MT),v("button",{class:"rename-thread-button rename-thread-button-primary",type:"button",disabled:Oe.value,onClick:Bn},ae(Oe.value?"Saving…":"Save"),9,RT)])])])):ie("",!0)]))]))}}),OT=mt($T,[["__scopeId","data-v-cb33487e"]]),DT={class:"content-header"},LT={class:"content-leading"},NT={class:"content-title"},jT={class:"content-actions"},FT=In({__name:"ContentHeader",props:{title:{}},setup(e){return(t,n)=>(S(),O("header",DT,[v("div",LT,[zr(t.$slots,"leading",{},void 0)]),v("h1",NT,ae(e.title),1),v("div",jT,[zr(t.$slots,"actions",{},void 0)])]))}}),BT=mt(FT,[["__scopeId","data-v-66ee223c"]]),Zd=.0025,ru=3,ef=2,UT=256;function qT(e){var Oe;const t=M("idle"),n=M(typeof navigator<"u"&&!!((Oe=navigator.mediaDevices)!=null&&Oe.getUserMedia)),r=M(0),o=M(null);let s=null,i=null,l=[],c=null,p=null,f=null,g=null,T=[],k=!1,U=!1,H=null;function X(){H&&(H.abort(),H=null),t.value==="transcribing"&&(t.value="idle")}function q(){const Y=o.value;if(!Y||typeof window>"u")return;const ve=Y.getContext("2d");if(!ve)return;const Fe=Math.max(1,Math.floor(Y.clientWidth)),Le=Math.max(1,Math.floor(Y.clientHeight||36)),Me=window.devicePixelRatio||1,Te=Math.max(1,Math.floor(Fe*Me)),_e=Math.max(1,Math.floor(Le*Me));(Y.width!==Te||Y.height!==_e)&&(Y.width=Te,Y.height=_e),ve.setTransform(Me,0,0,Me,0,0),ve.clearRect(0,0,Fe,Le);const He=Math.max(12,Math.floor(Fe/(ru+ef))),Ke=T.slice(-He),Ve=Math.max(0,He-Ke.length),Ye=Le/2,yt=getComputedStyle(Y).color||"#000000";for(let Qe=0;Qe<He;Qe+=1){const xt=Ke[Qe-Ve]??0,Q=Math.max(.08,Math.min(1,xt*18))*Ye,pe=Qe*(ru+ef);ve.globalAlpha=xt<=Zd?.35:1,ve.fillStyle=yt,ve.fillRect(pe,Ye-Q,ru,Q*2)}ve.globalAlpha=1}function P(){T=[],r.value=0,q()}function F(){f&&(f.disconnect(),f.onaudioprocess=null,f=null),p&&(p.disconnect(),p=null),c&&(c.close(),c=null),g=null}function z(Y){if(typeof window>"u")return;const ve=window.webkitAudioContext,Fe=window.AudioContext??ve;Fe&&(F(),P(),c=new Fe,p=c.createMediaStreamSource(Y),f=c.createScriptProcessor(2048,1,1),g=performance.now(),f.onaudioprocess=Le=>{const Me=Le.inputBuffer.getChannelData(0);let Te=0;for(let _e=0;_e<Me.length;_e+=1){const He=Math.abs(Me[_e]??0);Te+=He<Zd?0:He}T.push(Te/Me.length),T.length>UT&&T.shift(),g!==null&&(r.value=Math.max(0,performance.now()-g)),q()},p.connect(f),f.connect(c.destination),q())}async function de(){var Y;if(t.value==="transcribing"&&X(),!(t.value!=="idle"||!n.value||k)){k=!0,U=!1;try{i=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1}}),l=[],s=new MediaRecorder(i),s.ondataavailable=ve=>{ve.data.size>0&&l.push(ve.data)},s.onstop=()=>{var Le;const ve=l,Fe=(s==null?void 0:s.mimeType)||((Le=ve[0])==null?void 0:Le.type)||"audio/webm";me(),ke(ve,Fe)},z(i),s.start(250),t.value="recording",U&&ue()}catch(ve){me(),t.value="idle",(Y=e.onError)==null||Y.call(e,ve)}finally{k=!1}}}function ue(){if(k&&t.value==="idle"){U=!0;return}if(!(t.value!=="recording"||!s)&&s.state!=="inactive"){t.value="transcribing";try{s.requestData()}catch{}s.stop()}}function we(){U=!1,X(),me(),t.value="idle"}async function ke(Y,ve){var Me,Te,_e,He,Ke;if(Y.length===0){(Me=e.onEmpty)==null||Me.call(e),t.value="idle";return}const Fe=new Blob(Y,{type:ve});t.value="transcribing";let Le=null;try{const Ve=ve.split(/[/;]/)[1]??"webm",Ye=new FormData;Ye.append("file",Fe,`codex.${Ve}`);const yt=((Te=e.getLanguage)==null?void 0:Te.call(e).trim())??"";yt&&yt.toLowerCase()!=="auto"&&Ye.append("language",yt),Le=new AbortController,H=Le;const Qe=await fetch("/codex-api/transcribe",{method:"POST",body:Ye,signal:Le.signal}),xt=await Qe.text();let Ne=null;try{Ne=xt.trim()?JSON.parse(xt):null}catch{Ne=null}if(!Qe.ok){const pe=(_e=Ne==null?void 0:Ne.error)==null?void 0:_e.trim(),ge=xt.trim();throw new Error(pe||ge||`Transcription failed: ${Qe.status}`)}const Q=((Ne==null?void 0:Ne.text)??"").trim();Q.length>0?e.onTranscript(Q):(He=e.onEmpty)==null||He.call(e)}catch(Ve){if(Ve instanceof DOMException&&Ve.name==="AbortError")return;(Ke=e.onError)==null||Ke.call(e,Ve)}finally{Le&&H===Le&&(H=null),t.value==="transcribing"&&(t.value="idle")}}function me(){F(),P(),s&&(s.ondataavailable=null,s.onstop=null,s=null),i&&(i.getTracks().forEach(Y=>Y.stop()),i=null),l=[]}Xo(()=>{we()});function Ie(){if(t.value==="recording"){ue();return}(t.value==="idle"||t.value==="transcribing")&&de()}return{state:t,isSupported:n,recordingDurationMs:r,waveformCanvasRef:o,startRecording:de,stopRecording:ue,toggleRecording:Ie,cancel:we}}const HT={},VT={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function WT(e,t){return S(),O("svg",VT,[...t[0]||(t[0]=[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m12 5l0 14m-6-8l6-6l6 6"},null,-1)])])}const zT=mt(HT,[["render",WT]]),GT={},KT={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function YT(e,t){return S(),O("svg",KT,[...t[0]||(t[0]=[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 3L4 14h6l-1 7l9-11h-6z"},null,-1)])])}const JT=mt(GT,[["render",YT]]),QT={},XT={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function ZT(e,t){return S(),O("svg",XT,[...t[0]||(t[0]=[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 2m0 3a3 3 0 0 1 3-3h0a3 3 0 0 1 3 3v5a3 3 0 0 1-3 3h0a3 3 0 0 1-3-3zM5 10a7 7 0 0 0 14 0M8 21h8M12 17v4"},null,-1)])])}const e_=mt(QT,[["render",ZT]]),t_={},n_={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function r_(e,t){return S(),O("svg",n_,[...t[0]||(t[0]=[v("path",{stroke:"none",fill:"none",d:"M0 0h24v24H0z"},null,-1),v("path",{fill:"currentColor",d:"M8 5a3 3 0 0 0 -3 3v8a3 3 0 0 0 3 3h8a3 3 0 0 0 3 -3v-8a3 3 0 0 0 -3 -3h-8z"},null,-1)])])}const tf=mt(t_,[["render",r_]]),o_=["disabled"],s_={class:"composer-dropdown-value"},a_={class:"composer-dropdown-menu"},i_={key:0,class:"composer-dropdown-search-wrap"},l_=["placeholder","onKeydown"],u_={class:"composer-dropdown-options",role:"listbox"},c_=["onClick"],d_={key:0,class:"composer-dropdown-empty"},f_=In({__name:"ComposerDropdown",props:{modelValue:{},options:{},placeholder:{},disabled:{type:Boolean},selectedPrefixIcon:{},openDirection:{},enableSearch:{type:Boolean},searchPlaceholder:{},emptyLabel:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=M(null),s=M(null),i=M(!1),l=M(""),c=re(()=>{var F;const P=n.options.find(z=>z.value===n.modelValue);return P?P.label:((F=n.placeholder)==null?void 0:F.trim())||""}),p=re(()=>n.openDirection??"down"),f=re(()=>n.enableSearch===!0),g=re(()=>{var P;return((P=n.searchPlaceholder)==null?void 0:P.trim())||"Quick search projects"}),T=re(()=>{var P;return((P=n.emptyLabel)==null?void 0:P.trim())||"No results"}),k=re(()=>{const P=l.value.trim().toLowerCase();return P?n.options.filter(F=>F.label.toLowerCase().includes(P)||F.value.toLowerCase().includes(P)):n.options});function U(){n.disabled||(i.value=!i.value)}function H(P){r("update:modelValue",P),i.value=!1,l.value=""}function X(){if(l.value.length>0){l.value="";return}i.value=!1}function q(P){if(!i.value)return;const F=o.value;if(!F)return;const z=P.target;z instanceof Node&&(F.contains(z)||(i.value=!1,l.value=""))}return it(i,P=>{P&&f.value&&Gt(()=>{var F;return(F=s.value)==null?void 0:F.focus()})}),$o(()=>{window.addEventListener("pointerdown",q)}),Xo(()=>{window.removeEventListener("pointerdown",q)}),(P,F)=>(S(),O("div",{ref_key:"rootRef",ref:o,class:"composer-dropdown"},[v("button",{class:"composer-dropdown-trigger",type:"button",disabled:e.disabled,onClick:U},[e.selectedPrefixIcon?(S(),ot(Ku(e.selectedPrefixIcon),{key:0,class:"composer-dropdown-prefix-icon"})):ie("",!0),v("span",s_,ae(c.value),1),Be(ac,{class:"composer-dropdown-chevron"})],8,o_),i.value?(S(),O("div",{key:0,class:rt(["composer-dropdown-menu-wrap",{"composer-dropdown-menu-wrap-up":p.value==="up","composer-dropdown-menu-wrap-down":p.value==="down"}])},[v("div",a_,[f.value?(S(),O("div",i_,[nn(v("input",{ref_key:"searchInputRef",ref:s,"onUpdate:modelValue":F[0]||(F[0]=z=>l.value=z),class:"composer-dropdown-search-input",type:"text",placeholder:g.value,onKeydown:zt(lt(X,["prevent"]),["esc"])},null,40,l_),[[wn,l.value]])])):ie("",!0),v("ul",u_,[(S(!0),O(qe,null,Ot(k.value,z=>(S(),O("li",{key:z.value},[v("button",{class:rt(["composer-dropdown-option",{"is-selected":z.value===e.modelValue}]),type:"button",onClick:de=>H(z.value)},ae(z.label),11,c_)]))),128)),k.value.length===0?(S(),O("li",d_,ae(T.value),1)):ie("",!0)])])],2)):ie("",!0)],512))}}),Ko=mt(f_,[["__scopeId","data-v-2527acc2"]]),p_=["disabled"],h_={class:"search-dropdown-value"},m_={class:"search-dropdown-search-wrap"},v_=["placeholder","onKeydown"],g_={key:0,class:"search-dropdown-list",role:"listbox"},y_=["onClick","onPointerenter"],w_={class:"search-dropdown-option-check"},b_={class:"search-dropdown-option-label"},T_={key:0,class:"search-dropdown-option-desc"},__={key:1,class:"search-dropdown-empty"},S_=In({__name:"ComposerSearchDropdown",props:{options:{},selectedValues:{},placeholder:{},searchPlaceholder:{},disabled:{type:Boolean},openDirection:{}},emits:["toggle"],setup(e,{emit:t}){const n=e,r=t,o=M(null),s=M(null),i=M(null),l=M(!1),c=M(""),p=M(0),f=re(()=>n.openDirection??"down"),g=re(()=>new Set(n.selectedValues)),T=re(()=>{if(n.selectedValues.length===0)return n.placeholder||"Select...";if(n.selectedValues.length===1){const z=n.options.find(de=>de.value===n.selectedValues[0]);return(z==null?void 0:z.label)||n.placeholder||"Select..."}return`${n.selectedValues.length} selected`}),k=re(()=>{const z=c.value.toLowerCase().trim();return z?n.options.filter(de=>{var ue;return de.label.toLowerCase().includes(z)||(((ue=de.description)==null?void 0:ue.toLowerCase().includes(z))??!1)}):n.options});function U(){const z=s.value,de=o.value;if(!z||!de||window.innerWidth>=640)return;const ue=de.getBoundingClientRect();f.value==="up"?(z.style.setProperty("bottom",`${window.innerHeight-ue.top+8}px`,"important"),z.style.setProperty("top","auto","important")):(z.style.setProperty("top",`${ue.bottom+8}px`,"important"),z.style.setProperty("bottom","auto","important"))}function H(){n.disabled||(l.value=!l.value,l.value&&(c.value="",p.value=0,Gt(()=>{var z;Gt(()=>{U()}),(z=i.value)==null||z.focus()})))}function X(z){r("toggle",z.value,!g.value.has(z.value)),l.value=!1}function q(z){k.value.length!==0&&(p.value=(p.value+z+k.value.length)%k.value.length)}function P(){const z=k.value[p.value];z&&X(z)}function F(z){if(!l.value)return;const de=o.value;if(!de)return;const ue=z.target;ue instanceof Node&&(de.contains(ue)||(l.value=!1))}return it(c,()=>{p.value=0}),$o(()=>window.addEventListener("pointerdown",F)),Xo(()=>window.removeEventListener("pointerdown",F)),(z,de)=>(S(),O("div",{ref_key:"rootRef",ref:o,class:"search-dropdown"},[v("button",{class:"search-dropdown-trigger",type:"button",disabled:e.disabled,onClick:H},[v("span",h_,ae(T.value),1),Be(ac,{class:"search-dropdown-chevron"})],8,p_),l.value?(S(),O("div",{key:0,ref_key:"menuRef",ref:s,class:rt(["search-dropdown-menu-wrap",{"search-dropdown-menu-wrap-up":f.value==="up","search-dropdown-menu-wrap-down":f.value==="down"}])},[v("div",m_,[nn(v("input",{ref_key:"searchRef",ref:i,"onUpdate:modelValue":de[0]||(de[0]=ue=>c.value=ue),class:"search-dropdown-search",type:"text",placeholder:e.searchPlaceholder,onKeydown:[de[1]||(de[1]=zt(lt(ue=>l.value=!1,["prevent"]),["escape"])),zt(lt(P,["prevent"]),["enter"]),de[2]||(de[2]=zt(lt(ue=>q(1),["prevent"]),["arrow-down"])),de[3]||(de[3]=zt(lt(ue=>q(-1),["prevent"]),["arrow-up"]))]},null,40,v_),[[wn,c.value]])]),k.value.length>0?(S(),O("ul",g_,[(S(!0),O(qe,null,Ot(k.value,(ue,we)=>(S(),O("li",{key:ue.value},[v("button",{class:rt(["search-dropdown-option",{"is-selected":g.value.has(ue.value),"is-highlighted":we===p.value}]),type:"button",onClick:ke=>X(ue),onPointerenter:ke=>p.value=we},[v("span",w_,ae(g.value.has(ue.value)?"✓":""),1),v("span",b_,ae(ue.label),1),ue.description?(S(),O("span",T_,ae(ue.description),1)):ie("",!0)],42,y_)]))),128))])):(S(),O("div",__,"No results"))],2)):ie("",!0)],512))}}),k_=mt(S_,[["__scopeId","data-v-3147b20f"]]),x_={class:"skill-picker-header"},C_=["onKeydown"],A_={key:0,class:"skill-picker-list",role:"listbox"},E_=["onClick","onPointerenter"],I_={class:"skill-picker-name"},M_={key:0,class:"skill-picker-desc"},R_={key:1,class:"skill-picker-empty"},P_=In({__name:"ComposerSkillPicker",props:{skills:{},visible:{type:Boolean},anchorBottom:{},anchorLeft:{}},emits:["select","close"],setup(e,{emit:t}){const n=e,r=t,o=M(null),s=M(null),i=M(""),l=M(0),c=re(()=>{const T=i.value.toLowerCase().trim();return T?n.skills.filter(k=>k.name.toLowerCase().includes(T)||k.description.toLowerCase().includes(T)):n.skills}),p=re(()=>{const T={};return n.anchorBottom!=null&&(T.bottom=`${n.anchorBottom}px`),n.anchorLeft!=null&&(T.left=`${n.anchorLeft}px`),T});function f(T){c.value.length!==0&&(l.value=(l.value+T+c.value.length)%c.value.length)}function g(){const T=c.value[l.value];T&&r("select",T)}return it(()=>n.visible,T=>{T&&(i.value="",l.value=0,Gt(()=>{var k;return(k=s.value)==null?void 0:k.focus()}))}),it(i,()=>{l.value=0}),(T,k)=>e.visible?(S(),O("div",{key:0,ref_key:"rootRef",ref:o,class:"skill-picker",style:oo(p.value)},[v("div",x_,[nn(v("input",{ref_key:"searchInputRef",ref:s,"onUpdate:modelValue":k[0]||(k[0]=U=>i.value=U),class:"skill-picker-search",type:"text",placeholder:"Search skills...",onKeydown:[k[1]||(k[1]=zt(lt(U=>T.$emit("close"),["prevent"]),["escape"])),zt(lt(g,["prevent"]),["enter"]),k[2]||(k[2]=zt(lt(U=>f(1),["prevent"]),["arrow-down"])),k[3]||(k[3]=zt(lt(U=>f(-1),["prevent"]),["arrow-up"]))]},null,40,C_),[[wn,i.value]])]),c.value.length>0?(S(),O("ul",A_,[(S(!0),O(qe,null,Ot(c.value,(U,H)=>(S(),O("li",{key:U.path},[v("button",{class:rt(["skill-picker-item",{"is-highlighted":H===l.value}]),type:"button",onClick:X=>T.$emit("select",U),onPointerenter:X=>l.value=H},[v("span",I_,ae(U.name),1),U.description?(S(),O("span",M_,ae(U.description),1)):ie("",!0)],42,E_)]))),128))])):(S(),O("div",R_,"No skills found"))],4)):ie("",!0)}}),$_=mt(P_,[["__scopeId","data-v-ff3fb7dc"]]),O_={key:0,class:"thread-composer-dictation-error"},D_={key:0,class:"thread-composer-attachments"},L_=["src","alt"],N_=["aria-label","disabled","onClick"],j_={key:1,class:"thread-composer-folder-chips"},F_=["title"],B_={class:"thread-composer-folder-chip-meta"},U_=["aria-label","disabled","onClick"],q_={key:2,class:"thread-composer-file-chips"},H_=["title"],V_=["aria-label","disabled","onClick"],W_={key:3,class:"thread-composer-skill-chips"},z_={class:"thread-composer-skill-chip-name"},G_=["aria-label","onClick"],K_={key:0,class:"thread-composer-drop-overlay","aria-hidden":"true"},Y_={key:1,class:"thread-composer-file-mentions"},J_=["onMousedown"],Q_={key:1,class:"thread-composer-file-mention-icon-markdown"},X_={class:"thread-composer-file-mention-text"},Z_={class:"thread-composer-file-mention-name"},eS={key:0,class:"thread-composer-file-mention-dir"},tS={key:1,class:"thread-composer-file-mention-empty"},nS=["placeholder","disabled"],rS=["disabled"],oS={key:0,class:"thread-composer-attach-menu"},sS=["disabled"],aS=["disabled"],iS=["disabled"],lS={class:"thread-composer-attach-mode"},uS={class:"thread-composer-attach-mode-buttons"},cS=["disabled"],dS=["disabled"],fS=["aria-checked","aria-label","disabled"],pS={class:"thread-composer-attach-setting-copy"},hS={class:"thread-composer-attach-setting-description"},mS=["aria-checked","aria-label","disabled"],vS={key:0,class:"thread-composer-dictation-waveform-wrap","aria-hidden":"true"},gS={key:1,class:"thread-composer-dictation-timer"},yS=["aria-label","title","disabled"],wS=["aria-label","title","disabled"],bS={key:0,class:"thread-composer-stop-spinner","aria-hidden":"true"},TS=["aria-label","title","disabled"],_S=["disabled"],SS=["disabled"],kS=["disabled"],xS=2e3,CS="codex-web-local.thread-draft.v1.",AS=In({__name:"ThreadComposer",props:{activeThreadId:{},cwd:{},collaborationModes:{},selectedCollaborationMode:{},models:{},selectedModel:{},selectedReasoningEffort:{},selectedSpeedMode:{},skills:{},threadTokenUsage:{},codexQuota:{},isTurnInProgress:{type:Boolean},isStopPending:{type:Boolean},isInterruptingTurn:{type:Boolean},isUpdatingSpeedMode:{type:Boolean},disabled:{type:Boolean},hasQueueAbove:{type:Boolean},sendWithEnter:{type:Boolean},inProgressSubmitMode:{},dictationClickToToggle:{type:Boolean},dictationAutoSend:{type:Boolean},dictationLanguage:{}},emits:["submit","interrupt","update:selected-collaboration-mode","update:selected-model","update:selected-reasoning-effort","update:selected-speed-mode"],setup(e,{expose:t,emit:n}){const r=e,o=n,s=M(""),i=M([]),l=M([]),c=M([]),p=M([]),f=M(""),g=M(0),T=M(null),k=M(!1),{state:U,isSupported:H,recordingDurationMs:X,waveformCanvasRef:q,startRecording:P,stopRecording:F,toggleRecording:z,cancel:de}=qT({getLanguage:()=>r.dictationLanguage??"auto",onTranscript:E=>{if(s.value=s.value?`${s.value}
48
- ${E}`:E,f.value="",r.dictationAutoSend!==!1){const j=r.isTurnInProgress?he.value:"steer";be(j);return}Gt(()=>{var j;return(j=Ie.value)==null?void 0:j.focus()})},onEmpty:()=>{f.value=r.dictationClickToToggle?"No speech detected. Click again after speaking.":"No speech detected. Hold the mic and speak."},onError:E=>{if(E instanceof DOMException&&E.name==="NotAllowedError"){f.value="Microphone access was denied.";return}f.value=E instanceof Error?E.message:"Dictation failed."}}),ue=M(null),we=M(null),ke=M(null),me=M(null),Ie=M(null),{isMobile:Oe}=rc(),Y=M(!1),ve=M(!1),Fe=M(null),Le=M(""),Me=M([]),Te=M(!1),_e=M(0),He=M(0);let Ke=0,Ve=null,Ye=!1,yt=0,Qe=0;const xt=typeof navigator<"u"&&/Android/i.test(navigator.userAgent);let Ne="";const Q=[{value:"none",label:"None"},{value:"minimal",label:"Minimal"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"Extra high"}];function pe(E){return E.trim().replace(/^gpt/i,"GPT")}const ge=re(()=>r.models.map(E=>({value:E,label:pe(E)}))),Pe=re(()=>r.selectedCollaborationMode==="plan"),Ge=re(()=>r.selectedCollaborationMode==="plan"&&r.selectedModel.trim().length===0),_=re(()=>r.skills??[]),A=re(()=>l.value.map(E=>E.path)),B=re(()=>(r.skills??[]).map(E=>({value:E.path,label:E.name,description:E.description}))),G=re(()=>r.disabled||r.isUpdatingSpeedMode||!r.activeThreadId||Ge.value||g.value>0?!1:s.value.trim().length>0||i.value.length>0||c.value.length>0),ne=re(()=>s.value.trim().length>0||i.value.length>0||l.value.length>0||c.value.length>0||p.value.length>0),ee=re(()=>{const E=new Set;for(const j of p.value)for(const Z of j.filePaths)E.add(Z);return c.value.filter(j=>!E.has(j.fsPath))}),le=re(()=>r.disabled||!r.activeThreadId),fe=re(()=>r.selectedModel.trim()==="gpt-5.4"),ce=re(()=>r.selectedSpeedMode==="fast"&&fe.value),oe=re(()=>le.value||r.isUpdatingSpeedMode===!0),Ee=re(()=>r.isUpdatingSpeedMode?"Saving speed setting...":r.selectedSpeedMode==="fast"?"About 1.5x faster, with credits used at 2x":"Default speed with normal credit usage"),ye=re(()=>r.inProgressSubmitMode==="steer"?"steer":"queue"),he=M(ye.value),De=re(()=>U.value==="recording"),$=re(()=>U.value==="recording"?"Stop dictation":r.dictationClickToToggle?"Click to dictate":"Hold to dictate"),D=re(()=>U.value==="idle"?f.value.trim():""),N=re(()=>{const E=Math.max(0,Math.floor(X.value/1e3)),j=Math.floor(E/60),Z=E%60;return`${j}:${String(Z).padStart(2,"0")}`}),V=re(()=>r.activeThreadId?Ge.value?"Loading models for plan mode...":"Type a message... (@ for files, / for skills)":"Select a thread to send a message"),te=re(()=>s.value.trim().length>0||i.value.length>0||c.value.length>0);function be(E="steer"){var Z;const j=s.value.trim();if(G.value){if(o("submit",{text:j,imageUrls:i.value.map(Ce=>Ce.url),fileAttachments:[...c.value],skills:l.value.map(Ce=>({name:Ce.name,path:Ce.path})),mode:E}),bn(r.activeThreadId),ut(),p.value=[],Y.value=!1,ve.value=!1,qt(),xt||Oe.value){(Z=Ie.value)==null||Z.blur();return}Gt(()=>{var Ce;return(Ce=Ie.value)==null?void 0:Ce.focus()})}}function $e(E){he.value=E}function st(E){He.value+=1,s.value=E.text,i.value=E.imageUrls.map((j,Z)=>({id:`queued-${Date.now()}-${Z}-${Math.random().toString(36).slice(2,8)}`,name:`Image ${Z+1}`,url:j})),l.value=E.skills.map(j=>(r.skills??[]).find(Z=>Z.path===j.path)??{name:j.name,description:"",path:j.path}),c.value=E.fileAttachments.map(j=>({...j})),p.value=[],f.value="",T.value=null,g.value=0,Y.value=!1,ve.value=!1,qt(),Qe+=1}function ut(){st({text:"",imageUrls:[],fileAttachments:[],skills:[]})}function at(E){return`${CS}${E}`}function Pt(E){if(typeof window>"u")return null;const j=E.trim();if(!j)return null;try{const Z=window.localStorage.getItem(at(j));if(!Z)return null;const Ce=JSON.parse(Z);return typeof Ce=="string"?{text:Ce,imageUrls:[],fileAttachments:[],skills:[]}:{text:typeof Ce.text=="string"?Ce.text:"",imageUrls:Array.isArray(Ce.imageUrls)?Ce.imageUrls.filter(tt=>typeof tt=="string"):[],fileAttachments:Array.isArray(Ce.fileAttachments)?Ce.fileAttachments.filter(tt=>!!tt&&typeof tt.label=="string"&&typeof tt.path=="string"&&typeof tt.fsPath=="string"):[],skills:Array.isArray(Ce.skills)?Ce.skills.filter(tt=>!!tt&&typeof tt.name=="string"&&typeof tt.path=="string"):[]}}catch{return null}}function Lt(E,j){if(typeof window>"u")return;const Z=E.trim();if(Z)try{if(j.text.trim().length>0||j.imageUrls.length>0||j.fileAttachments.length>0||j.skills.length>0){window.localStorage.setItem(at(Z),JSON.stringify(j));return}window.localStorage.removeItem(at(Z))}catch{}}function bn(E){Lt(E,{text:"",imageUrls:[],fileAttachments:[],skills:[]})}function ir(){return{text:s.value,imageUrls:i.value.map(E=>E.url),fileAttachments:c.value.map(E=>({...E})),skills:l.value.map(E=>({name:E.name,path:E.path}))}}function Dr(){o("interrupt")}function Sr(E){o("update:selected-model",E)}function hr(){o("update:selected-collaboration-mode",Pe.value?"default":"plan")}function et(E){o("update:selected-reasoning-effort",E)}function $t(){oe.value||o("update:selected-speed-mode",r.selectedSpeedMode==="fast"?"standard":"fast")}function Tn(){r.dictationClickToToggle&&(f.value&&(f.value=""),z())}function mr(E){if(r.dictationClickToToggle||(E.preventDefault(),Ye))return;Ye=!0;const j=E.currentTarget;if(j)try{j.setPointerCapture(E.pointerId)}catch{}f.value&&(f.value=""),window.addEventListener("pointerup",Qt),window.addEventListener("pointercancel",Qt),window.addEventListener("blur",Qt),P()}function Qt(){r.dictationClickToToggle||Ye&&(Ye=!1,window.removeEventListener("pointerup",Qt),window.removeEventListener("pointercancel",Qt),window.removeEventListener("blur",Qt),F())}function lr(){le.value||(Y.value=!Y.value)}function Xt(){var E;(E=we.value)==null||E.click()}function ct(){var E;(E=ke.value)==null||E.click()}function Bt(){var E;(E=me.value)==null||E.click()}function dn(E){i.value=i.value.filter(j=>j.id!==E)}function Lr(E){l.value=l.value.filter(j=>j.path!==E)}function _n(E){c.value=c.value.filter(j=>j.fsPath!==E)}function Bn(E){const j=p.value.find(Ce=>Ce.id===E);if(!j)return;const Z=new Set(j.filePaths);c.value=c.value.filter(Ce=>!Z.has(Ce.fsPath)),p.value=p.value.filter(Ce=>Ce.id!==E)}function Kr(E){return E.total<=0?0:Math.round(E.processed/E.total*100)}function fn(E,j){const Z=E.replace(/\\/g,"/");if(c.value.some(jt=>jt.fsPath===Z))return;const Ce=Z.split("/").filter(Boolean),tt=(j==null?void 0:j.trim())||Ce[Ce.length-1]||Z;c.value=[...c.value,{label:tt,path:Z,fsPath:Z}]}function Zn(E){return E.type.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp)$/i.test(E.name)}function Kt(E){return E?Array.from(E):[]}function ur(E){return E!==Qe?!1:(g.value+=1,!0)}function on(E){E===Qe&&(g.value=Math.max(0,g.value-1))}function er(E){if(E<=0)return;const j=T.value,Z=j?j.succeeded+j.failed:0;if(!j||Z>=j.total){T.value={total:E,succeeded:0,failed:0};return}T.value={...j,total:j.total+E}}function sn(E){const j=T.value;j&&(T.value={...j,succeeded:j.succeeded+(E==="success"?1:0),failed:j.failed+(E==="failure"?1:0)})}function kr(){return`${Date.now()}-${Math.random().toString(36).slice(2)}`}function tr(E){const j=new Date,Z=[j.getFullYear(),String(j.getMonth()+1).padStart(2,"0"),String(j.getDate()).padStart(2,"0"),String(j.getHours()).padStart(2,"0"),String(j.getMinutes()).padStart(2,"0"),String(j.getSeconds()).padStart(2,"0")].join("-"),Ce=E.type.startsWith("image/")&&E.type.slice(6).replace(/[^a-z0-9]+/gi,"")||"png";return`pasted-image-${Z}.${Ce}`}function vr(){const E=new Date;return`pasted-text-${[E.getFullYear(),String(E.getMonth()+1).padStart(2,"0"),String(E.getDate()).padStart(2,"0"),String(E.getHours()).padStart(2,"0"),String(E.getMinutes()).padStart(2,"0"),String(E.getSeconds()).padStart(2,"0")].join("-")}.txt`}function gr(E){return E.name.trim()?E:new File([E],tr(E),{type:E.type||"image/png",lastModified:Date.now()})}async function pn(E,j){if(ur(j))try{const Z=gr(E),Ce=await tu(Z);if(j!==Qe)return;if(!Ce){sn("failure");return}i.value=[...i.value,{id:kr(),name:Z.name,url:`/codex-local-image?path=${encodeURIComponent(Ce)}`}],sn("success")}catch{j===Qe&&sn("failure")}finally{on(j)}}async function hn(E,j){if(ur(j))try{const Z=await tu(E);if(j!==Qe)return;if(!Z){sn("failure");return}fn(Z),sn("success")}catch{j===Qe&&sn("failure")}finally{on(j)}}function Zt(E){const j=Kt(E);if(j.length===0)return;er(j.length),Y.value=!1,ve.value=!1,qt();const Z=Qe;for(const Ce of j)Zn(Ce)?pn(Ce,Z):hn(Ce,Z)}function mn(){yt=0,k.value=!1}function Un(E){return E?Array.from(E.types??[]).includes("Files"):!1}async function vn(E){if(!E||E.length===0)return;const j=He.value,Z=Array.from(E),tt=(Z[0].webkitRelativePath||Z[0].name).split("/").filter(Boolean)[0]||"Folder",jt=`${Date.now()}-${Math.random().toString(36).slice(2)}`;p.value=[...p.value,{id:jt,name:tt,total:Z.length,processed:0,filePaths:[],isUploading:!0}];const Pn=dt=>{j===He.value&&(p.value=p.value.map(Ht=>Ht.id===jt?dt(Ht):Ht))};for(const dt of Z)try{const Ht=await tu(dt);if(j!==He.value)return;if(Ht){const or=dt.webkitRelativePath||dt.name;fn(Ht,or),Pn(Mt=>({...Mt,processed:Mt.processed+1,filePaths:[...Mt.filePaths,Ht]}));continue}Pn(or=>({...or,processed:or.processed+1}))}catch{Pn(Ht=>({...Ht,processed:Ht.processed+1}))}Pn(dt=>({...dt,isUploading:!1}))}function Mn(E){E&&(E.value="")}function gn(E){const j=E.target;Zt((j==null?void 0:j.files)??null),Mn(j),Y.value=!1}function Nt(E){const j=E.target;Zt((j==null?void 0:j.files)??null),Mn(j),Y.value=!1}function nr(E){const j=E.target;vn((j==null?void 0:j.files)??null),Mn(j),Y.value=!1}function qn(E){le.value||!Un(E.dataTransfer)||(E.preventDefault(),yt+=1,k.value=!0)}function rr(E){le.value||!Un(E.dataTransfer)||(E.preventDefault(),E.dataTransfer&&(E.dataTransfer.dropEffect="copy"),k.value=!0)}function Yt(E){k.value&&(E.preventDefault(),yt=Math.max(0,yt-1),yt===0&&mn())}function Ct(E){var j;le.value||!Un(E.dataTransfer)||(E.preventDefault(),mn(),Zt(((j=E.dataTransfer)==null?void 0:j.files)??null))}function Sn(){!k.value&&yt===0||mn()}function ho(E){var jt,Pn;if(le.value)return;const j=((jt=E.clipboardData)==null?void 0:jt.getData("text/plain"))??"";if(j.length>=xS){E.preventDefault();const dt=new File([j],vr(),{type:"text/plain",lastModified:Date.now()});Zt([dt]);return}const Z=Array.from(((Pn=E.clipboardData)==null?void 0:Pn.items)??[]);if(Z.length===0)return;const Ce=j.length>0,tt=Z.filter(dt=>dt.kind==="file"&&dt.type.startsWith("image/")).map(dt=>dt.getAsFile()).filter(dt=>dt instanceof File);tt.length!==0&&(Ce||E.preventDefault(),Zt(tt))}function kn(){f.value&&(f.value="");const j=s.value.startsWith("/");j!==ve.value&&(ve.value=j),At()}function Hn(E){if(Te.value){if(E.key==="Escape"){E.preventDefault(),qt();return}if(E.key==="ArrowDown"){E.preventDefault(),Me.value.length>0&&(_e.value=(_e.value+1)%Me.value.length);return}if(E.key==="ArrowUp"){if(E.preventDefault(),Me.value.length>0){const Z=Me.value.length;_e.value=(_e.value+Z-1)%Z}return}if(E.key==="Enter"||E.key==="Tab"){E.preventDefault();const Z=Me.value[_e.value];Z?ht(Z):qt();return}}if(r.sendWithEnter!==!1?E.key==="Enter"&&!E.shiftKey:E.key==="Enter"&&(E.metaKey||E.ctrlKey)){E.preventDefault(),be(r.isTurnInProgress?he.value:"steer");return}if(ve.value){if(E.key==="Escape"){E.preventDefault(),Vn();return}if(E.key==="ArrowDown"||E.key==="ArrowUp"){E.preventDefault();return}}}function Vn(){var E;ve.value=!1,(E=Ie.value)==null||E.focus()}function qt(){Te.value=!1,Fe.value=null,Le.value="",Me.value=[],_e.value=0}function At(){const E=Ie.value;if(!E){qt();return}const j=E.selectionStart??s.value.length,Ce=s.value.slice(0,j).match(/(^|\s)(@[^\s@]*)$/);if(!Ce){qt();return}const tt=Ce[2]??"",jt=tt.length,Pn=j-jt;Fe.value=Pn,Le.value=tt.slice(1),Te.value=!0,It()}async function It(){if(!Te.value)return;const E=(r.cwd??"").trim();if(!E){Me.value=[];return}Ve&&clearTimeout(Ve);const j=++Ke;Ve=setTimeout(async()=>{try{const Z=await mb(E,Le.value,20);if(!Te.value||j!==Ke)return;Me.value=Z,_e.value=0}catch{if(!Te.value||j!==Ke)return;Me.value=[]}},120)}function ht(E){const j=Ie.value,Z=Fe.value;if(Z!==null&&j){const Ce=j.selectionStart??s.value.length;s.value=`${s.value.slice(0,Z)}${s.value.slice(Ce)}`.trimEnd()}fn(E.path),qt(),Gt(()=>j==null?void 0:j.focus())}function xn(E){de(),st(E),Gt(()=>{var j;return(j=Ie.value)==null?void 0:j.focus()})}function an(E){const j=E.trim();j&&(de(),s.value.trim().length>0?s.value=`${s.value.trimEnd()}
49
- ${j}`:s.value=j,Gt(()=>{var Z;return(Z=Ie.value)==null?void 0:Z.focus()}))}function Wn(E){const j=E.lastIndexOf("/");return j<0?E:E.slice(j+1)}function cr(E){const j=E.lastIndexOf("/");return j<=0?"":E.slice(0,j)}function zn(E){const j=Wn(E),Z=j.lastIndexOf(".");return Z<=0?"":j.slice(Z+1).toLowerCase()}function en(E){const j=zn(E);return j==="ts"?"TS":j==="tsx"?"TSX":j==="js"?"JS":j==="jsx"?"JSX":j==="json"?"{}":""}function Rn(E){const j=zn(E);return j.startsWith("ts")?"ts":j.startsWith("js")?"js":j==="json"?"json":"default"}function Nr(E){const j=zn(E);return j==="md"||j==="mdx"}function dr(E){var j;l.value.some(Z=>Z.path===E.path)||(l.value=[...l.value,E]),s.value=s.value.startsWith("/")?"":s.value,ve.value=!1,(j=Ie.value)==null||j.focus()}function xr(E,j){if(j){const Z=(r.skills??[]).find(Ce=>Ce.path===E);Z&&!l.value.some(Ce=>Ce.path===E)&&(l.value=[...l.value,Z])}else l.value=l.value.filter(Z=>Z.path!==E)}function Cn(E){if(!Y.value)return;const j=ue.value;if(!j)return;const Z=E.target;!Z||j.contains(Z)||(Y.value=!1)}return $o(()=>{document.addEventListener("click",Cn),window.addEventListener("drop",Sn),window.addEventListener("dragend",Sn),window.addEventListener("blur",Sn)}),t({hydrateDraft:xn,appendTextToDraft:an,hasUnsavedDraft:()=>ne.value}),Xo(()=>{document.removeEventListener("click",Cn),window.removeEventListener("drop",Sn),window.removeEventListener("dragend",Sn),window.removeEventListener("blur",Sn),window.removeEventListener("pointerup",Qt),window.removeEventListener("pointercancel",Qt),window.removeEventListener("blur",Qt),Ve&&clearTimeout(Ve)}),it(()=>r.activeThreadId,E=>{de(),Ne&&Lt(Ne,ir()),ut();const j=Pt(E);j&&(st(j),kn()),Ne=E.trim()},{immediate:!0}),it([s,i,c,l],()=>{Ne&&Lt(Ne,ir())},{deep:!0}),it(()=>r.cwd,()=>{Te.value&&It()}),it(ye,E=>{he.value=E}),(E,j)=>(S(),O("form",{class:"thread-composer",onSubmit:j[4]||(j[4]=lt(Z=>be(e.isTurnInProgress?he.value:"steer"),["prevent"]))},[D.value?(S(),O("p",O_,ae(D.value),1)):ie("",!0),v("div",{class:rt(["thread-composer-shell",{"thread-composer-shell--no-top-radius":e.hasQueueAbove,"thread-composer-shell--drag-active":k.value}])},[i.value.length>0?(S(),O("div",D_,[(S(!0),O(qe,null,Ot(i.value,Z=>(S(),O("div",{key:Z.id,class:"thread-composer-attachment"},[v("img",{class:"thread-composer-attachment-image",src:Z.url,alt:Z.name||"Selected image"},null,8,L_),v("button",{class:"thread-composer-attachment-remove",type:"button","aria-label":`Remove ${Z.name||"image"}`,disabled:le.value,onClick:Ce=>dn(Z.id)}," x ",8,N_)]))),128))])):ie("",!0),p.value.length>0?(S(),O("div",j_,[(S(!0),O(qe,null,Ot(p.value,Z=>(S(),O("span",{key:Z.id,class:"thread-composer-folder-chip"},[Be(ic,{class:"thread-composer-folder-chip-icon"}),v("span",{class:"thread-composer-folder-chip-name",title:Z.name},ae(Z.name),9,F_),v("span",B_,[Z.isUploading?(S(),O(qe,{key:0},[so(ae(Kr(Z))+"% uploading ("+ae(Z.processed)+"/"+ae(Z.total)+") ",1)],64)):(S(),O(qe,{key:1},[so(ae(Z.filePaths.length)+" file"+ae(Z.filePaths.length===1?"":"s"),1)],64))]),v("button",{class:"thread-composer-folder-chip-remove",type:"button","aria-label":`Remove folder ${Z.name}`,disabled:le.value,onClick:Ce=>Bn(Z.id)},"×",8,U_)]))),128))])):ie("",!0),ee.value.length>0?(S(),O("div",q_,[(S(!0),O(qe,null,Ot(ee.value,Z=>(S(),O("span",{key:Z.fsPath,class:"thread-composer-file-chip"},[Be(ki,{class:"thread-composer-file-chip-icon"}),v("span",{class:"thread-composer-file-chip-name",title:Z.fsPath},ae(Z.label),9,H_),v("button",{class:"thread-composer-file-chip-remove",type:"button","aria-label":`Remove ${Z.label}`,disabled:le.value,onClick:Ce=>_n(Z.fsPath)},"×",8,V_)]))),128))])):ie("",!0),l.value.length>0?(S(),O("div",W_,[(S(!0),O(qe,null,Ot(l.value,Z=>(S(),O("span",{key:Z.path,class:"thread-composer-skill-chip"},[v("span",z_,ae(Z.name),1),v("button",{class:"thread-composer-skill-chip-remove",type:"button","aria-label":`Remove skill ${Z.name}`,onClick:Ce=>Lr(Z.path)},"×",8,G_)]))),128))])):ie("",!0),v("div",{class:rt(["thread-composer-input-wrap",{"thread-composer-input-wrap--drag-active":k.value}]),onDragenter:qn,onDragover:rr,onDragleave:Yt,onDrop:Ct},[k.value?(S(),O("div",K_,[...j[5]||(j[5]=[v("span",{class:"thread-composer-drop-overlay-copy"},"Drop images or files",-1)])])):ie("",!0),Te.value?(S(),O("div",Y_,[Me.value.length>0?(S(!0),O(qe,{key:0},Ot(Me.value,(Z,Ce)=>(S(),O("button",{key:Z.path,class:rt(["thread-composer-file-mention-row",{"is-active":Ce===_e.value}]),type:"button",onMousedown:lt(tt=>ht(Z),["prevent"])},[en(Z.path)?(S(),O("span",{key:0,class:rt(["thread-composer-file-mention-icon-badge",`is-${Rn(Z.path)}`])},ae(en(Z.path)),3)):Nr(Z.path)?(S(),O("span",Q_,"↓")):(S(),ot(ki,{key:2,class:"thread-composer-file-mention-icon-file"})),v("span",X_,[v("span",Z_,ae(Wn(Z.path)),1),cr(Z.path)?(S(),O("span",eS,ae(cr(Z.path)),1)):ie("",!0)])],42,J_))),128)):(S(),O("div",tS,"No matching files"))])):ie("",!0),nn(v("textarea",{ref_key:"inputRef",ref:Ie,"onUpdate:modelValue":j[0]||(j[0]=Z=>s.value=Z),class:"thread-composer-input",placeholder:V.value,disabled:le.value,onInput:kn,onKeydown:Hn,onPaste:ho},null,40,nS),[[wn,s.value]]),Be($_,{skills:_.value,visible:ve.value,"anchor-bottom":44,"anchor-left":0,onSelect:dr,onClose:Vn},null,8,["skills","visible"])],34),v("div",{class:rt(["thread-composer-controls",{"thread-composer-controls--recording":De.value}])},[v("div",{ref_key:"attachMenuRootRef",ref:ue,class:"thread-composer-attach"},[v("button",{class:"thread-composer-attach-trigger",type:"button","aria-label":"Add photos & files",disabled:le.value,onClick:lr}," + ",8,rS),Y.value?(S(),O("div",oS,[v("button",{class:"thread-composer-attach-item",type:"button",disabled:le.value,onClick:Xt}," Add photos & files ",8,sS),v("button",{class:"thread-composer-attach-item",type:"button",disabled:le.value,onClick:Bt}," Add folder ",8,aS),v("button",{class:"thread-composer-attach-item",type:"button",disabled:le.value,onClick:ct}," Take photo ",8,iS),j[9]||(j[9]=v("div",{class:"thread-composer-attach-separator"},null,-1)),v("div",lS,[j[6]||(j[6]=v("span",{class:"thread-composer-attach-mode-label"},"In-progress send",-1)),v("div",uS,[v("button",{class:rt(["thread-composer-attach-mode-button",{"is-active":he.value==="steer"}]),type:"button",disabled:le.value,onClick:j[1]||(j[1]=Z=>$e("steer"))}," Steer ",10,cS),v("button",{class:rt(["thread-composer-attach-mode-button",{"is-active":he.value==="queue"}]),type:"button",disabled:le.value,onClick:j[2]||(j[2]=Z=>$e("queue"))}," Queue ",10,dS)])]),j[10]||(j[10]=v("div",{class:"thread-composer-attach-separator"},null,-1)),fe.value?(S(),O("button",{key:0,class:"thread-composer-attach-setting",type:"button",role:"switch","aria-checked":e.selectedSpeedMode==="fast","aria-label":`Fast mode ${e.selectedSpeedMode==="fast"?"enabled":"disabled"}`,disabled:oe.value,onClick:$t},[v("span",pS,[j[7]||(j[7]=v("span",{class:"thread-composer-attach-setting-label"},"Fast mode",-1)),v("span",hS,ae(Ee.value),1)]),v("span",{class:rt(["thread-composer-attach-switch",{"is-on":e.selectedSpeedMode==="fast","is-busy":e.isUpdatingSpeedMode,"is-disabled":oe.value}])},null,2)],8,fS)):ie("",!0),v("button",{class:"thread-composer-attach-setting",type:"button",role:"switch","aria-checked":Pe.value,"aria-label":Pe.value?"Disable plan mode":"Enable plan mode",disabled:e.disabled||!e.activeThreadId||e.isTurnInProgress,onClick:hr},[j[8]||(j[8]=v("span",{class:"thread-composer-attach-setting-copy"},[v("span",{class:"thread-composer-attach-setting-label"},"Plan mode"),v("span",{class:"thread-composer-attach-setting-description"},"Agent proposes a plan before acting")],-1)),v("span",{class:rt(["thread-composer-attach-switch",{"is-on":Pe.value}])},null,2)],8,mS)])):ie("",!0)],512),De.value?ie("",!0):(S(),O(qe,{key:0},[Be(Ko,{class:"thread-composer-control","model-value":e.selectedModel,options:ge.value,"selected-prefix-icon":ce.value?JT:null,placeholder:"Model","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.models.length===0||e.isTurnInProgress,"enable-search":"","search-placeholder":"Search models...","onUpdate:modelValue":Sr},null,8,["model-value","options","selected-prefix-icon","disabled"]),Be(k_,{class:"thread-composer-control",options:B.value,"selected-values":A.value,placeholder:"Skills","search-placeholder":"Search skills...","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.isTurnInProgress,onToggle:xr},null,8,["options","selected-values","disabled"]),Be(Ko,{class:"thread-composer-control","model-value":e.selectedReasoningEffort,options:Q,placeholder:"Thinking","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.isTurnInProgress,"onUpdate:modelValue":et},null,8,["model-value","disabled"])],64)),v("div",{class:rt(["thread-composer-actions",{"thread-composer-actions--recording":De.value}])},[Re(U)==="recording"?(S(),O("div",vS,[v("canvas",{ref_key:"dictationWaveformCanvasRef",ref:q,class:"thread-composer-dictation-waveform"},null,512)])):ie("",!0),Re(U)==="recording"?(S(),O("span",gS,ae(N.value),1)):ie("",!0),Re(H)?(S(),O("button",{key:2,class:rt(["thread-composer-mic",{"thread-composer-mic--active":Re(U)==="recording"}]),type:"button","aria-label":$.value,title:$.value,disabled:le.value,onClick:Tn,onPointerdown:mr,onPointerup:Qt,onPointercancel:Qt},[Re(U)==="recording"?(S(),ot(tf,{key:0,class:"thread-composer-mic-icon thread-composer-mic-icon--stop"})):(S(),ot(e_,{key:1,class:"thread-composer-mic-icon"}))],42,yS)):ie("",!0),e.isTurnInProgress&&!te.value?(S(),O("button",{key:3,class:"thread-composer-stop",type:"button","aria-label":e.isStopPending?"Saving thread before stop is available":"Stop",title:e.isStopPending?"Saving thread before stop is available":"Stop",disabled:e.disabled||!e.activeThreadId||e.isInterruptingTurn||e.isStopPending,onClick:Dr},[e.isStopPending?(S(),O("span",bS)):(S(),ot(tf,{key:1,class:"thread-composer-stop-icon"}))],8,wS)):(S(),O("button",{key:4,class:rt(["thread-composer-submit",{"thread-composer-submit--queue":e.isTurnInProgress&&he.value==="queue"}]),type:"button","aria-label":e.isTurnInProgress&&he.value==="queue"?"Queue message":"Send message",title:e.isTurnInProgress?`Send as ${he.value}`:"Send",disabled:!G.value,onClick:j[3]||(j[3]=Z=>be(e.isTurnInProgress?he.value:"steer"))},[Be(zT,{class:"thread-composer-submit-icon"})],10,TS))],2)],2)],2),v("input",{ref_key:"photoLibraryInputRef",ref:we,class:"thread-composer-hidden-input",type:"file",multiple:"",disabled:le.value,onChange:gn},null,40,_S),v("input",{ref_key:"cameraCaptureInputRef",ref:ke,class:"thread-composer-hidden-input",type:"file",accept:"image/*",capture:"environment",disabled:le.value,onChange:Nt},null,40,SS),v("input",{ref_key:"folderPickerInputRef",ref:me,class:"thread-composer-hidden-input",type:"file",multiple:"",webkitdirectory:"",directory:"",disabled:le.value,onChange:nr},null,40,kS)],32))}}),nf=mt(AS,[["__scopeId","data-v-bb083b71"]]),ES={key:0,class:"thread-pending-request"},IS={class:"thread-pending-request-title"},MS=["title"],RS={class:"thread-pending-request-approval"},PS={class:"thread-pending-request-options",role:"radiogroup","aria-label":"Approval choices"},$S=["aria-pressed","onClick"],OS={class:"thread-pending-request-option-index"},DS={class:"thread-pending-request-option-label"},LS={class:"thread-pending-request-footer thread-pending-request-footer--approval"},NS=["value"],jS={class:"thread-pending-request-header"},FS={class:"thread-pending-request-heading"},BS={class:"thread-pending-request-eyebrow"},US={class:"thread-pending-request-title"},qS={key:0,class:"thread-pending-request-counter"},HS={key:0,class:"thread-pending-request-preview"},VS={class:"thread-pending-request-preview-code"},WS={key:1,class:"thread-pending-request-user-input"},zS={key:0,class:"thread-pending-request-question-description"},GS=["href"],KS={class:"thread-pending-request-question-title"},YS={key:0},JS={key:0,class:"thread-pending-request-question-text"},QS={key:1,class:"thread-pending-request-input-wrap"},XS=["type","value","onInput"],ZS={key:2,class:"thread-pending-request-select-wrap"},ek=["value","onChange"],tk={key:0,value:""},nk={key:3,class:"thread-pending-request-select-wrap"},rk=["value","onChange"],ok={key:0,value:""},sk=["value"],ak={key:4,class:"thread-pending-request-question-options"},ik=["checked","onChange"],lk={class:"thread-pending-request-checkbox-label"},uk={key:2,class:"thread-pending-request-validation-error"},ck={class:"thread-pending-request-footer"},dk={key:2,class:"thread-pending-request-user-input"},fk={class:"thread-pending-request-question-title"},pk={key:0,class:"thread-pending-request-question-text"},hk={key:1,class:"thread-pending-request-question-options"},mk={class:"thread-pending-request-select-wrap"},vk=["value","onChange"],gk=["value"],yk={key:0,class:"thread-pending-request-question-description"},wk={key:2,class:"thread-pending-request-input-wrap"},bk=["value","onInput"],Tk={class:"thread-pending-request-footer"},_k={key:3,class:"thread-pending-request-actions"},Sk={key:4,class:"thread-pending-request-actions"},kk=In({__name:"ThreadPendingRequestPanel",props:{request:{},requestCount:{},hasQueueAbove:{type:Boolean}},emits:["respondServerRequest"],setup(e,{emit:t}){const n=e,r=t,o=M("accept"),s=M(""),i=M({}),l=M({}),c=M({}),p=M("");function f($){return $!==null&&typeof $=="object"&&!Array.isArray($)?$:null}function g($){return typeof $=="string"?$.trim():""}function T($){return typeof $=="string"?$:null}function k($){return/^[A-Za-z0-9_./:@%+=,-]+$/.test($)?$:JSON.stringify($)}function U($){const N=(Array.isArray($.commandActions)?$.commandActions:[]).map(V=>f(V)).map(V=>g(V==null?void 0:V.command)).find(V=>V.length>0);if(N)return N.replace(/\s+/g," ").trim();if(Array.isArray($.command)){const V=$.command.filter(te=>typeof te=="string").map(te=>te.trim()).filter(te=>te.length>0);if(V.length>0)return V.map(te=>k(te)).join(" ")}return we(g($.command))}function H($){return $.method==="item/commandExecution/requestApproval"||$.method==="execCommandApproval"}function X($){return $.method==="item/fileChange/requestApproval"||$.method==="applyPatchApproval"}function q($){return $.method==="item/permissions/requestApproval"}function P($){return H($)||X($)||q($)}function F($){return $.method==="mcpServer/elicitation/request"}function z($){const D=f($.params);return g(D==null?void 0:D.reason)||g(D==null?void 0:D.prompt)||g(D==null?void 0:D.message)}function de($){return P($)?"Awaiting approval":F($)?"MCP server input required":$.method==="item/tool/requestUserInput"?"Awaiting response":$.method==="item/tool/call"?"Tool call waiting for response":$.method}function ue($){const D=z($);return D||(H($)?"Do you want to run this command?":X($)?"Do you want to make these changes?":q($)?"Do you want to grant these permissions?":F($)?"An MCP server needs your input before Codex can continue.":$.method==="item/tool/requestUserInput"?"Codex needs your answer before it can continue.":"Codex is waiting for a response before it can continue.")}function we($){var be;const D=$.trim();if(!D)return"";const N=D.match(/-Command\s+(.+)$/i),V=((be=N==null?void 0:N[1])==null?void 0:be.trim())??D;return(V.startsWith('"')&&V.endsWith('"')?V.slice(1,-1):V).replace(/\\"/g,'"').replace(/`"/g,'"').replace(/""/g,'"').replace(/\s+/g," ").trim()}function ke($){const D=f($.params);if(!D)return"";if(H($))return U(D);if(X($)){const N=g(D.grantRoot)||g(D.grant_root);if(N)return N.replace(/\s+/g," ").trim();const V=f(D.fileChanges)??f(D.changes);if(!V)return"";const te=Object.keys(V).map(be=>be.trim()).filter(be=>be.length>0);return te.length===0?"":te.slice(0,3).join(", ")}return q($)?me(D.permissions):F($)?g(D.serverName)||g(D.url):""}function me($){const D=f($);if(!D)return"";const N=[],V=f(D.fileSystem),te=f(D.network),be=Array.isArray(V==null?void 0:V.read)?V.read.filter(st=>typeof st=="string"):[],$e=Array.isArray(V==null?void 0:V.write)?V.write.filter(st=>typeof st=="string"):[];return be.length>0&&N.push(`Read: ${be.join(", ")}`),$e.length>0&&N.push(`Write: ${$e.join(", ")}`),(te==null?void 0:te.enabled)===!0&&N.push("Network access"),N.join(" • ")}function Ie($){return!$||!P($)?[]:[{id:"accept",label:"Yes"},{id:"acceptForSession",label:"Yes for Session"}]}const Oe=re(()=>Ie(n.request));it(()=>{var $;return(($=n.request)==null?void 0:$.id)??0},()=>{var $;s.value="",i.value={},l.value={},c.value={},p.value="",o.value=(($=Oe.value[0])==null?void 0:$.id)??"accept"},{immediate:!0}),it(Oe,$=>{var D;o.value!=="decline"&&($.some(N=>N.id===o.value)||(o.value=((D=$[0])==null?void 0:D.id)??"accept"))},{immediate:!0});function Y($,D){return`${String($)}:${D}`}function ve($){const D=f($.params),N=Array.isArray(D==null?void 0:D.questions)?D.questions:[],V=[];for(const te of N){const be=f(te);if(!be)continue;const $e=g(be.id);if(!$e)continue;const st=Array.isArray(be.options)?be.options.map(ut=>f(ut)).map(ut=>({label:g(ut==null?void 0:ut.label),description:g(ut==null?void 0:ut.description)})).filter(ut=>ut.label.length>0):[];V.push({id:$e,header:g(be.header),question:g(be.question),isOther:be.isOther===!0,options:st})}return V}function Fe($,D,N){const V=Y($,D),te=i.value[V];return typeof te=="string"&&te.length>0?te:N}function Le($,D){return l.value[Y($,D)]??""}function Me($,D,N){const V=N.target;if(!(V instanceof HTMLSelectElement))return;const te=Y($,D);i.value={...i.value,[te]:V.value}}function Te($,D,N){const V=N.target;if(!(V instanceof HTMLInputElement))return;const te=Y($,D);l.value={...l.value,[te]:V.value}}function _e($,D,N){var te,be;const V=Fe($,D,((te=N[0])==null?void 0:te.label)||"");return((be=N.find($e=>$e.label===V))==null?void 0:be.description)??""}function He($,D){return`${String($)}:${D}`}function Ke($){var D;return g((D=f($.params))==null?void 0:D.serverName)}function Ve($){var N;const D=g((N=f($.params))==null?void 0:N.url);if(!D)return"";try{const V=new URL(D),te=V.protocol.toLowerCase();return te==="https:"||te==="http:"?V.toString():""}catch{return""}}function Ye($){const D=f($.params),N=f(D==null?void 0:D.requestedSchema),V=f(N==null?void 0:N.properties);if(!V)return[];const te=new Set(Array.isArray(N==null?void 0:N.required)?N.required.filter(be=>typeof be=="string"):[]);return Object.entries(V).map(([be,$e])=>yt(be,f($e),te.has(be))).filter(be=>be!==null)}function yt($,D,N){if(!D)return null;const V=g(D.title)||$,te=g(D.description),be=g(D.type);if(be==="boolean")return{key:$,label:V,description:te,required:N,kind:"boolean",inputType:"checkbox",options:[],defaultValue:typeof D.default=="boolean"?D.default:null,hasExplicitDefault:typeof D.default=="boolean"};if(be==="number"||be==="integer")return{key:$,label:V,description:te,required:N,kind:"number",inputType:"number",options:[],defaultValue:typeof D.default=="number"?D.default:null,hasExplicitDefault:typeof D.default=="number"};const $e=Qe(D);if(be==="array")return{key:$,label:V,description:te,required:N,kind:"multiEnum",inputType:"checkbox",options:$e,defaultValue:Array.isArray(D.default)?D.default.filter(ut=>typeof ut=="string"):[],hasExplicitDefault:Array.isArray(D.default)};const st=T(D.default);return $e.length>0?{key:$,label:V,description:te,required:N,kind:"singleEnum",inputType:"select",options:$e,defaultValue:st,hasExplicitDefault:st!==null}:{key:$,label:V,description:te,required:N,kind:"string",inputType:xt(D),options:[],defaultValue:st,hasExplicitDefault:st!==null}}function Qe($){const N=(Array.isArray($.oneOf)?$.oneOf:Array.isArray($.anyOf)?$.anyOf:[]).map($e=>f($e)).map($e=>({value:g($e==null?void 0:$e.const),label:g($e==null?void 0:$e.title)||g($e==null?void 0:$e.const)})).filter($e=>$e.value.length>0);if(N.length>0)return N;const V=f($.items);if(V){const $e=Qe(V);if($e.length>0)return $e}const te=Array.isArray($.enum)?$.enum.filter($e=>typeof $e=="string"):[],be=Array.isArray($.enumNames)?$.enumNames.filter($e=>typeof $e=="string"):[];return te.map(($e,st)=>({value:$e,label:be[st]||$e}))}function xt($){const D=g($.format);return D==="email"?"email":D==="uri"?"url":D==="date"?"date":D==="date-time"?"datetime-local":"text"}function Ne($,D){const N=c.value[He($,D.key)];return N!==void 0?N:D.defaultValue}function Q($,D){const N=Ne($,D);return Array.isArray(N)?N.filter(V=>typeof V=="string"):[]}function pe($,D,N){const V=N.target;if(!(V instanceof HTMLInputElement)&&!(V instanceof HTMLSelectElement))return;const te=V.value,be=(D.kind==="number",te);c.value={...c.value,[He($,D.key)]:te.length>0?be:null},p.value=""}function ge($,D,N){const V=N.target;if(!(V instanceof HTMLSelectElement))return;let te=null;V.value==="true"?te=!0:V.value==="false"&&(te=!1),c.value={...c.value,[He($,D.key)]:te},p.value=""}function Pe($,D,N,V){const te=V.target;if(!(te instanceof HTMLInputElement))return;const be=new Set(Q($,D));te.checked?be.add(N):be.delete(N),c.value={...c.value,[He($,D.key)]:Array.from(be)},p.value=""}function Ge($){return $===!0?"true":$===!1?"false":""}function _($,D){const N=Ne($,D);return D.kind==="multiEnum"?Array.isArray(N)&&N.length>0:D.kind==="boolean"?typeof N=="boolean":D.kind==="number"&&typeof N=="number"?!0:typeof N=="string"&&N.trim().length>0}function A($){const D=Ye($).filter(N=>N.required&&!_($.id,N)).map(N=>N.label);return D.length===0?"":D.length===1?`Answer the required field: ${D[0]}.`:`Answer the required fields: ${D.join(", ")}.`}function B($){const D={};for(const N of Ye($)){const V=Ne($.id,N);if(N.kind==="multiEnum"){const be=Array.isArray(V)?V:[];(be.length>0||N.required)&&(D[N.key]=be);continue}if(N.kind==="boolean"){typeof V=="boolean"&&(D[N.key]=V);continue}if(N.kind==="number"){const be=typeof V=="number"?V:Number(String(V).trim());Number.isNaN(be)||(D[N.key]=be);continue}const te=String(V??"").trim();(te.length>0||N.required)&&(D[N.key]=te)}return D}function G($){o.value=$}function ne(){o.value="decline"}function ee($){const D=$.target;D instanceof HTMLInputElement&&(s.value=D.value,o.value="decline")}function le($,D){var N;if(q($)){if(D==="decline"||D==="cancel"){r("respondServerRequest",{id:$.id,error:{code:-32e3,message:D==="cancel"?"Cancelled from CodexUI.":"Declined from CodexUI."}});return}const V=f((N=f($.params))==null?void 0:N.permissions)??{};r("respondServerRequest",{id:$.id,result:{permissions:V,scope:D==="acceptForSession"?"session":"turn"}});return}r("respondServerRequest",{id:$.id,result:{decision:D}})}function fe($){const D=s.value.trim(),N=D.length>0?"decline":o.value;if(q($)){le($,N);return}r("respondServerRequest",{id:$.id,result:{decision:N},followUpMessageText:D||void 0})}function ce($,D){const N=f($.params),V={action:D};if(D==="accept"&&g(N==null?void 0:N.mode)==="form"){const te=A($);if(te){p.value=te;return}V.content=B($)}r("respondServerRequest",{id:$.id,result:V})}function oe($){var V;const D=ve($),N={};for(const te of D){const be=Fe($.id,te.id,((V=te.options[0])==null?void 0:V.label)||""),$e=Le($.id,te.id).trim(),st=[be,$e].map(ut=>ut.trim()).filter(ut=>ut.length>0);N[te.id]={answers:st}}r("respondServerRequest",{id:$.id,result:{answers:N}})}function Ee($){r("respondServerRequest",{id:$.id,result:{success:!1,contentItems:[{type:"inputText",text:"Tool call rejected from CodexUI."}]}})}function ye($){r("respondServerRequest",{id:$.id,result:{success:!0,contentItems:[]}})}function he($){r("respondServerRequest",{id:$.id,result:{}})}function De($){r("respondServerRequest",{id:$.id,error:{code:-32e3,message:"Rejected from CodexUI."}})}return($,D)=>e.request?(S(),O("section",ES,[v("article",{class:rt(["thread-pending-request-shell",{"thread-pending-request-shell--no-top-radius":e.hasQueueAbove}])},[P(e.request)?(S(),O(qe,{key:0},[v("p",IS,ae(ue(e.request)),1),ke(e.request)?(S(),O("p",{key:0,class:"thread-pending-request-command-line",title:ke(e.request)},ae(ke(e.request)),9,MS)):ie("",!0),v("section",RS,[v("div",PS,[(S(!0),O(qe,null,Ot(Oe.value,(N,V)=>(S(),O("button",{key:N.id,type:"button",class:rt(["thread-pending-request-option",{"is-selected":o.value===N.id}]),"aria-pressed":o.value===N.id,onClick:te=>G(N.id)},[v("span",OS,ae(V+1)+".",1),v("span",DS,ae(N.label),1)],10,$S))),128))]),v("footer",LS,[v("label",{class:rt(["thread-pending-request-inline-input",{"is-active":o.value==="decline"||s.value.length>0}])},[D[11]||(D[11]=v("span",{class:"thread-pending-request-option-index"},"3.",-1)),v("input",{class:"thread-pending-request-inline-control",type:"text",value:s.value,placeholder:"No, and tell Codex what to do differently",onFocus:ne,onInput:ee,onKeydown:D[0]||(D[0]=zt(lt(N=>fe(e.request),["prevent"]),["enter"]))},null,40,NS)],2),v("button",{type:"button",class:"thread-pending-request-secondary",onClick:D[1]||(D[1]=N=>le(e.request,"cancel"))}," Skip "),v("button",{type:"button",class:"thread-pending-request-primary",onClick:D[2]||(D[2]=N=>fe(e.request))}," Send ")])])],64)):(S(),O(qe,{key:1},[v("header",jS,[v("div",FS,[v("p",BS,ae(de(e.request)),1),v("p",US,ae(ue(e.request)),1)]),(e.requestCount??0)>1?(S(),O("span",qS,ae(e.requestCount??0)+" pending",1)):ie("",!0)]),ke(e.request)?(S(),O("div",HS,[v("code",VS,ae(ke(e.request)),1)])):ie("",!0),e.request.method==="mcpServer/elicitation/request"?(S(),O("section",WS,[Ke(e.request)?(S(),O("p",zS," Server: "+ae(Ke(e.request)),1)):ie("",!0),Ve(e.request)?(S(),O("a",{key:1,class:"thread-pending-request-link",href:Ve(e.request),target:"_blank",rel:"noopener noreferrer"}," Open authorization link ",8,GS)):ie("",!0),(S(!0),O(qe,null,Ot(Ye(e.request),N=>(S(),O("div",{key:`${e.request.id}:${N.key}`,class:"thread-pending-request-question"},[v("p",KS,[so(ae(N.label),1),N.required?(S(),O("span",YS," *")):ie("",!0)]),N.description?(S(),O("p",JS,ae(N.description),1)):ie("",!0),N.kind==="string"||N.kind==="number"?(S(),O("label",QS,[D[12]||(D[12]=v("span",{class:"thread-pending-request-select-label"},"Value",-1)),v("input",{class:"thread-pending-request-input",type:N.inputType,value:String(Ne(e.request.id,N)??""),onInput:V=>pe(e.request.id,N,V)},null,40,XS)])):N.kind==="boolean"?(S(),O("label",ZS,[D[15]||(D[15]=v("span",{class:"thread-pending-request-select-label"},"Choice",-1)),v("select",{class:"thread-pending-request-select",value:Ge(Ne(e.request.id,N)),onChange:V=>ge(e.request.id,N,V)},[N.hasExplicitDefault?ie("",!0):(S(),O("option",tk,"Select true or false")),D[13]||(D[13]=v("option",{value:"true"},"True",-1)),D[14]||(D[14]=v("option",{value:"false"},"False",-1))],40,ek)])):N.kind==="singleEnum"?(S(),O("label",nk,[D[16]||(D[16]=v("span",{class:"thread-pending-request-select-label"},"Choice",-1)),v("select",{class:"thread-pending-request-select",value:String(Ne(e.request.id,N)??""),onChange:V=>pe(e.request.id,N,V)},[N.hasExplicitDefault?ie("",!0):(S(),O("option",ok,"Select an option")),(S(!0),O(qe,null,Ot(N.options,V=>(S(),O("option",{key:`${e.request.id}:${N.key}:${V.value}`,value:V.value},ae(V.label),9,sk))),128))],40,rk)])):(S(),O("div",ak,[(S(!0),O(qe,null,Ot(N.options,V=>(S(),O("label",{key:`${e.request.id}:${N.key}:${V.value}`,class:"thread-pending-request-checkbox-row"},[v("input",{class:"thread-pending-request-checkbox",type:"checkbox",checked:Q(e.request.id,N).includes(V.value),onChange:te=>Pe(e.request.id,N,V.value,te)},null,40,ik),v("span",lk,ae(V.label),1)]))),128))]))]))),128)),p.value?(S(),O("p",uk,ae(p.value),1)):ie("",!0),v("footer",ck,[v("button",{type:"button",class:"thread-pending-request-secondary",onClick:D[3]||(D[3]=N=>ce(e.request,"cancel"))}," Cancel "),v("button",{type:"button",class:"thread-pending-request-secondary",onClick:D[4]||(D[4]=N=>ce(e.request,"decline"))}," Decline "),v("button",{type:"button",class:"thread-pending-request-primary",onClick:D[5]||(D[5]=N=>ce(e.request,"accept"))}," Continue ")])])):e.request.method==="item/tool/requestUserInput"?(S(),O("section",dk,[(S(!0),O(qe,null,Ot(ve(e.request),N=>{var V;return S(),O("div",{key:`${e.request.id}:${N.id}`,class:"thread-pending-request-question"},[v("p",fk,ae(N.header||N.question),1),N.question?(S(),O("p",pk,ae(N.question),1)):ie("",!0),N.options.length>0?(S(),O("div",hk,[v("label",mk,[D[17]||(D[17]=v("span",{class:"thread-pending-request-select-label"},"Choice",-1)),v("select",{class:"thread-pending-request-select",value:Fe(e.request.id,N.id,((V=N.options[0])==null?void 0:V.label)||""),onChange:te=>Me(e.request.id,N.id,te)},[(S(!0),O(qe,null,Ot(N.options,te=>(S(),O("option",{key:`${e.request.id}:${N.id}:${te.label}`,value:te.label},ae(te.label),9,gk))),128))],40,vk)]),_e(e.request.id,N.id,N.options)?(S(),O("p",yk,ae(_e(e.request.id,N.id,N.options)),1)):ie("",!0)])):ie("",!0),N.isOther?(S(),O("label",wk,[D[18]||(D[18]=v("span",{class:"thread-pending-request-select-label"},"Other answer",-1)),v("input",{class:"thread-pending-request-input",type:"text",value:Le(e.request.id,N.id),placeholder:"Other answer",onInput:te=>Te(e.request.id,N.id,te)},null,40,bk)])):ie("",!0)])}),128)),v("footer",Tk,[v("button",{type:"button",class:"thread-pending-request-primary",onClick:D[6]||(D[6]=N=>oe(e.request))}," Send ")])])):e.request.method==="item/tool/call"?(S(),O("section",_k,[v("button",{type:"button",class:"thread-pending-request-primary",onClick:D[7]||(D[7]=N=>Ee(e.request))}," Fail Tool Call "),v("button",{type:"button",class:"thread-pending-request-secondary",onClick:D[8]||(D[8]=N=>ye(e.request))}," Success (Empty) ")])):(S(),O("section",Sk,[v("button",{type:"button",class:"thread-pending-request-primary",onClick:D[9]||(D[9]=N=>he(e.request))}," Return Empty Result "),v("button",{type:"button",class:"thread-pending-request-secondary",onClick:D[10]||(D[10]=N=>De(e.request))}," Reject Request ")]))],64))],2)])):ie("",!0)}}),xk=mt(kk,[["__scopeId","data-v-a033894d"]]),Ck={key:0,class:"queued-messages"},Ak={class:"queued-messages-inner"},Ek={class:"queued-row-text"},Ik={class:"queued-row-actions"},Mk=["onClick"],Rk=["onClick"],Pk=["onClick"],$k=In({__name:"QueuedMessages",props:{messages:{}},emits:["edit","steer","delete"],setup(e){function t(n){var c,p,f;const r=n.text.trim();if(r)return r;const o=[],s=((c=n.imageUrls)==null?void 0:c.length)??0,i=((p=n.fileAttachments)==null?void 0:p.length)??0,l=((f=n.skills)==null?void 0:f.length)??0;return s>0&&o.push(`${s} image${s===1?"":"s"}`),i>0&&o.push(`${i} file${i===1?"":"s"}`),l>0&&o.push(`${l} skill${l===1?"":"s"}`),o.join(", ")||"(empty queued message)"}return(n,r)=>e.messages.length>0?(S(),O("div",Ck,[v("div",Ak,[(S(!0),O(qe,null,Ot(e.messages,o=>(S(),O("div",{key:o.id,class:"queued-row"},[r[1]||(r[1]=v("svg",{class:"queued-row-icon",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"},[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})],-1)),v("span",Ek,ae(t(o)),1),v("div",Ik,[v("button",{class:"queued-row-edit",type:"button",title:"Edit queued message",onClick:s=>n.$emit("edit",o.id)},"Edit",8,Mk),v("button",{class:"queued-row-steer",type:"button",title:"Send now without interrupting work",onClick:s=>n.$emit("steer",o.id)},"Steer",8,Rk),v("button",{class:"queued-row-delete",type:"button","aria-label":"Delete queued message",title:"Delete queued message",onClick:s=>n.$emit("delete",o.id)},[...r[0]||(r[0]=[v("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"},[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 7h16M10 11v6M14 11v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3"})],-1)])],8,Pk)])]))),128))])])):ie("",!0)}}),Ok=mt($k,[["__scopeId","data-v-835c6739"]]),Dk={key:0,class:"rate-limit-status","aria-live":"polite"},Lk=["title"],Nk={class:"rate-limit-card-header"},jk={class:"rate-limit-card-title"},Fk={key:0,class:"rate-limit-card-plan"},Bk={class:"rate-limit-card-metrics"},Uk={key:0,class:"rate-limit-card-footer"},qk=In({__name:"RateLimitStatus",props:{snapshots:{}},setup(e){function t(q){var P,F;return((P=q.limitId)==null?void 0:P.trim())||((F=q.limitName)==null?void 0:F.trim())||"__default__"}function n(q){var P,F;return((P=q.limitName)==null?void 0:P.trim())||((F=q.limitId)==null?void 0:F.trim())||"Rate limits"}function r(q){const P=q.trim();return P?P.replace(/[_-]+/g," ").replace(/\b\w/g,F=>F.toUpperCase()):""}function o(q){return!q||q<=0?"Window":q%1440===0?`${q/1440}d`:q%60===0?`${q/60}h`:q<60?`${q}m`:`${Math.round(q/60*10)/10}h`}function s(q){const P=Math.max(0,Math.min(100,100-q));return`${Math.round(P)}% left`}function i(q){return`${Math.round(q)}%`}function l(q,P){return{key:P,label:`${o(q.windowDurationMins)} ${s(q.usedPercent)}`}}function c(q){const P=[];return q.primary&&P.push(l(q.primary,"primary")),q.secondary&&P.push(l(q.secondary,"secondary")),P}function p(q){if(!q)return"";const P=new Date(q*1e3),F=P.getMonth()+1,z=String(P.getDate()).padStart(2,"0"),de=String(P.getHours()).padStart(2,"0"),ue=String(P.getMinutes()).padStart(2,"0");return`${F}.${z} ${de}:${ue}`}function f(q){if(!(q!=null&&q.resetsAt))return"";const P=q.resetsAt*1e3-Date.now();if(P<=0)return"Resetting now";const F=Math.round(P/6e4);if(F<60)return`Resets in ${F}m`;const z=Math.round(F/60);return z<24?`Resets in ${z}h`:`Resets in ${Math.round(z/24)}d`}function g(q){return[q.primary,q.secondary].filter(P=>P!==null)}function T(q){const P=g(q);return P.length===0?null:[...P].sort((F,z)=>{const de=F.windowDurationMins??Number.MAX_SAFE_INTEGER,ue=z.windowDurationMins??Number.MAX_SAFE_INTEGER;return de!==ue?de-ue:(F.resetsAt??Number.MAX_SAFE_INTEGER)-(z.resetsAt??Number.MAX_SAFE_INTEGER)})[0]}function k(q){const P=g(q);if(P.length===0)return"";const F=[...P].sort((de,ue)=>{const we=de.windowDurationMins??-1,ke=ue.windowDurationMins??-1;return we!==ke?ke-we:(ue.resetsAt??-1)-(de.resetsAt??-1)})[0],z=p(F.resetsAt);return z||""}function U(q){const P=q.credits;return P?P.unlimited?"Unlimited credits":P.balance?`Credits ${P.balance}`:P.hasCredits?"Credits available":"":""}function H(q){return[f(T(q)),k(q),U(q)].filter(P=>P.length>0)}function X(q){const P=[n(q)];for(const F of c(q))P.push(F.label);for(const F of g(q))P.push(`${o(F.windowDurationMins)} used ${i(F.usedPercent)}`);for(const F of H(q))P.push(F);return P.join(`
50
- `)}return(q,P)=>e.snapshots.length>0?(S(),O("aside",Dk,[(S(!0),O(qe,null,Ot(e.snapshots,F=>(S(),O("div",{key:t(F),class:"rate-limit-card",title:X(F)},[v("div",Nk,[v("span",jk,ae(n(F)),1),F.planType?(S(),O("span",Fk,ae(r(F.planType)),1)):ie("",!0)]),v("div",Bk,[(S(!0),O(qe,null,Ot(c(F),z=>(S(),O("span",{key:z.key,class:"rate-limit-card-metric"},ae(z.label),1))),128))]),H(F).length>0?(S(),O("div",Uk,ae(H(F).join(" | ")),1)):ie("",!0)],8,Lk))),128))])):ie("",!0)}}),Hk=mt(qk,[["__scopeId","data-v-df88906b"]]),Vk={class:"runtime-toggle",role:"radiogroup","aria-label":"Continue in"},Wk=["aria-checked","onClick"],zk={class:"runtime-toggle-option-label"},Gk=In({__name:"ComposerRuntimeDropdown",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,r=[{value:"local",label:"Local project",icon:ic},{value:"worktree",label:"New worktree",icon:mi}];function o(s){n("update:modelValue",s)}return(s,i)=>(S(),O("div",Vk,[(S(),O(qe,null,Ot(r,l=>v("button",{key:l.value,class:rt(["runtime-toggle-option",{"is-selected":e.modelValue===l.value}]),type:"button",role:"radio","aria-checked":e.modelValue===l.value,onClick:c=>o(l.value)},[(S(),ot(Ku(l.icon),{class:"runtime-toggle-option-icon"})),v("span",zk,ae(l.label),1)],10,Wk)),64))]))}}),Kk=mt(Gk,[["__scopeId","data-v-e8b0d0ac"]]),Yk={},Jk={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function Qk(e,t){return S(),O("svg",Jk,[...t[0]||(t[0]=[v("path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12"},null,-1),v("path",{d:"M9 4l0 16"},null,-1)])])}const Xk=mt(Yk,[["render",Qk]]),Zk={},ex={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"};function tx(e,t){return S(),O("svg",ex,[...t[0]||(t[0]=[v("path",{d:"M6 21a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3zm12 -16h-8v14h8a1 1 0 0 0 1 -1v-12a1 1 0 0 0 -1 -1"},null,-1)])])}const nx=mt(Zk,[["render",tx]]),rx={class:"sidebar-thread-controls"},ox=["aria-label","title"],sx=In({__name:"SidebarThreadControls",props:{isSidebarCollapsed:{type:Boolean},showNewThreadButton:{type:Boolean}},emits:["toggle-sidebar","start-new-thread"],setup(e){return(t,n)=>(S(),O("div",rx,[v("button",{class:"sidebar-thread-controls-button",type:"button","aria-label":e.isSidebarCollapsed?"Expand sidebar":"Collapse sidebar",title:e.isSidebarCollapsed?"Expand sidebar":"Collapse sidebar",onClick:n[0]||(n[0]=r=>t.$emit("toggle-sidebar"))},[e.isSidebarCollapsed?(S(),ot(nx,{key:0,class:"sidebar-thread-controls-icon"})):(S(),ot(Xk,{key:1,class:"sidebar-thread-controls-icon"}))],8,ox),zr(t.$slots,"default",{},void 0),e.showNewThreadButton?(S(),O("button",{key:0,class:"sidebar-thread-controls-button",type:"button","aria-label":"Start new thread",title:"Start new thread",onClick:n[1]||(n[1]=r=>t.$emit("start-new-thread"))},[Be(ki,{class:"sidebar-thread-controls-icon"})])):ie("",!0)]))}}),rf=mt(sx,[["__scopeId","data-v-46a10052"]]),ax={},ix={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function lx(e,t){return S(),O("svg",ix,[...t[0]||(t[0]=[v("circle",{cx:"11",cy:"11",r:"8"},null,-1),v("path",{d:"m21 21-4.35-4.35"},null,-1)])])}const of=mt(ax,[["render",lx]]),ux={},cx={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function dx(e,t){return S(),O("svg",cx,[...t[0]||(t[0]=[v("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[v("path",{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c1 .608 2.296.07 2.572-1.065"}),v("path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0-6 0"})],-1)])])}const fx=mt(ux,[["render",dx]]),px={},hx={viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"};function mx(e,t){return S(),O("svg",hx,[...t[0]||(t[0]=[v("path",{d:"M5 7l5 5-5 5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),v("path",{d:"M12 17h7",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)])])}const vx=mt(px,[["render",mx]]),gx={},yx={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function wx(e,t){return S(),O("svg",yx,[...t[0]||(t[0]=[v("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"},null,-1)])])}const bx=mt(gx,[["render",wx]]);function fr(e){return e.flatMap(t=>t.threads)}const ch="codex-web-local.thread-read-state.v1",dh="codex-web-local.thread-scroll-state.v1",fh="codex-web-local.thread-token-usage.v1",ph="codex-web-local.thread-terminal-open.v1",Iu="codex-web-local.selected-thread-id.v1",Mu="codex-web-local.selected-model-by-context.v1",hh="codex-web-local.selected-model-id.v1",mh="codex-web-local.project-order.v1",vh="codex-web-local.project-display-name.v1",Ru="codex-web-local.collaboration-mode-by-context.v1",gh="codex-web-local.collaboration-mode.v1",Mo="__new-thread__",yh="__new-thread-provider__::",ou=220,Tx=500,_x=3e3,Sx=2e3,sf=["none","minimal","low","medium","high","xhigh"],ps="__global__",Ar="gpt-5.2-codex";function kx(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(ch);if(!e)return{};const t=JSON.parse(e);return!t||typeof t!="object"||Array.isArray(t)?{}:t}catch{return{}}}function af(e){typeof window>"u"||window.localStorage.setItem(ch,JSON.stringify(e))}function Pu(e){return e==="plan"?"plan":"default"}function Rs(e){return typeof e=="string"?e.trim():""}function Er(){return Object.create(null)}function Zs(e){const t=Er();for(const[n,r]of Object.entries(e))t[n]=r;return t}function si(e,t){if(!(t in e))return e;const n=Er();for(const[r,o]of Object.entries(e))r!==t&&(n[r]=o);return n}function lf(e,t){let n=!1;const r=Er();for(const[o,s]of Object.entries(e)){if(o===Mo||o.startsWith(yh)||t.has(o)){r[o]=s;continue}n=!0}return n?r:e}function wh(e){return e.trim().toLowerCase()||"codex"}function su(e){const t=wh(e);return`${yh}${t}`}function ca(e){return e.trim()||Mo}function xx(){if(typeof window>"u")return Er();try{const n=window.localStorage.getItem(Mu);if(n){const r=JSON.parse(n);if(!r||typeof r!="object"||Array.isArray(r))return Er();const o=Er();for(const[s,i]of Object.entries(r)){if(typeof s!="string"||s.length===0)continue;const l=Rs(i);l&&(o[s]=l)}return o}}catch{}const e=Rs(window.localStorage.getItem(hh)),t=Er();return e&&(t[Mo]=e),t}function uf(e,t){const n=ca(t),r=Rs(e[n]);return r||Rs(e[Mo])}function ai(e){if(!(typeof window>"u"))try{Object.keys(e).length===0?window.localStorage.removeItem(Mu):window.localStorage.setItem(Mu,JSON.stringify(e)),window.localStorage.removeItem(hh)}catch{}}function Cx(){if(typeof window>"u")return Er();try{const n=window.localStorage.getItem(Ru);if(n){const r=JSON.parse(n);if(!r||typeof r!="object"||Array.isArray(r))return Er();const o=Er();for(const[s,i]of Object.entries(r)){if(typeof s!="string"||s.length===0)continue;const l=Pu(i);l==="plan"&&(o[s]=l)}return o}}catch{}const e=Pu(window.localStorage.getItem(gh)),t=Er();return e==="plan"&&(t[Mo]="plan"),t}function ii(e,t){const n=ca(t);return Pu(e[n])}function cf(e){if(!(typeof window>"u"))try{Object.keys(e).length===0?window.localStorage.removeItem(Ru):window.localStorage.setItem(Ru,JSON.stringify(e)),window.localStorage.removeItem(gh)}catch{}}function xi(e,t,n){return Math.min(Math.max(e,t),n)}function Ax(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e;if(typeof t.scrollTop!="number"||!Number.isFinite(t.scrollTop)||typeof t.isAtBottom!="boolean")return null;const n={scrollTop:Math.max(0,t.scrollTop),isAtBottom:t.isAtBottom};return typeof t.scrollRatio=="number"&&Number.isFinite(t.scrollRatio)&&(n.scrollRatio=xi(t.scrollRatio,0,1)),n}function Ex(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(dh);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[r,o]of Object.entries(t)){if(!r)continue;const s=Ax(o);s&&(n[r]=s)}return n}catch{return{}}}function df(e){typeof window>"u"||window.localStorage.setItem(dh,JSON.stringify(e))}function ys(e){if(typeof e=="number"&&Number.isFinite(e))return Math.max(0,Math.trunc(e));if(typeof e=="string"&&e.trim().length>0){const t=Number(e);if(Number.isFinite(t))return Math.max(0,Math.trunc(t))}return null}function ff(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e;return{totalTokens:ys(t.totalTokens)??0,inputTokens:ys(t.inputTokens)??0,cachedInputTokens:ys(t.cachedInputTokens)??0,outputTokens:ys(t.outputTokens)??0,reasoningOutputTokens:ys(t.reasoningOutputTokens)??0}}function Ix(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e,n=ff(t.total),r=ff(t.last);if(!n||!r)return null;const o=ys(t.modelContextWindow),s=r.totalTokens,i=typeof o=="number"?Math.max(o-s,0):null,l=typeof o=="number"&&o>0?xi(Math.round((i??0)/o*100),0,100):null;return{total:n,last:r,modelContextWindow:o,currentContextTokens:s,remainingContextTokens:i,remainingContextPercent:l}}function Mx(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(fh);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[r,o]of Object.entries(t)){if(!r)continue;const s=Ix(o);s&&(n[r]=s)}return n}catch{return{}}}function pf(e){typeof window>"u"||window.localStorage.setItem(fh,JSON.stringify(e))}function Rx(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(ph);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[r,o]of Object.entries(t))r&&typeof o=="boolean"&&(n[r]=o);return n}catch{return{}}}function Px(e){typeof window>"u"||window.localStorage.setItem(ph,JSON.stringify(e))}function $x(){return typeof window>"u"?"":window.localStorage.getItem(Iu)??""}function Ox(e){if(!(typeof window>"u")){if(!e){window.localStorage.removeItem(Iu);return}window.localStorage.setItem(Iu,e)}}function Dx(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(mh);if(!e)return[];const t=JSON.parse(e);if(!Array.isArray(t))return[];const n=[];for(const r of t){if(typeof r!="string"||r.length===0)continue;const o=Ca(r);o.length>0&&!n.includes(o)&&n.push(o)}return n}catch{return[]}}function hs(e){typeof window>"u"||window.localStorage.setItem(mh,JSON.stringify(e))}function Lx(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(vh);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[r,o]of Object.entries(t)){const s=typeof r=="string"?Ca(r):"";s.length>0&&typeof o=="string"&&(n[s]=o)}return n}catch{return{}}}function au(e){typeof window>"u"||window.localStorage.setItem(vh,JSON.stringify(e))}function li(e,t){const n=[];for(const r of e)n.includes(r)||n.push(r);for(const r of t)n.includes(r.projectName)||n.push(r.projectName);return Eo(e,n)?e:n}function iu(e,t){const n=new Map(e.map(o=>[o.projectName,o])),r=t.map(o=>n.get(o)??null).filter(o=>o!==null&&o.threads.length>0);for(const o of e)t.includes(o.projectName)||r.push(o);return r}function Eo(e,t){const n=Array.isArray(e)?e:[],r=Array.isArray(t)?t:[];if(n.length!==r.length)return!1;for(let o=0;o<n.length;o+=1)if(n[o]!==r[o])return!1;return!0}function Nx(e,t,n){if(t<0||t>=e.length||n<0||n>=e.length||t===n)return e;const r=[...e],[o]=r.splice(t,1);return r.splice(n,0,o),r}function jx(e,t){return!e&&!t?!0:!e||!t?!1:e.status===t.status&&e.aggregatedOutput===t.aggregatedOutput&&e.exitCode===t.exitCode}function Fx(e=[],t=[]){var n,r,o,s;if(e.length!==t.length)return!1;for(let i=0;i<e.length;i+=1)if(((n=e[i])==null?void 0:n.step)!==((r=t[i])==null?void 0:r.step)||((o=e[i])==null?void 0:o.status)!==((s=t[i])==null?void 0:s.status))return!1;return!0}function Bx(e,t){return!e&&!t?!0:!e||!t?!1:e.explanation===t.explanation&&e.isStreaming===t.isStreaming&&Fx(e.steps,t.steps)}function ui(e){if(!(e instanceof Error))return!1;const t=e.message.toLowerCase();return t.includes("not supported when using codex with a chatgpt account")||t.includes("model is not supported")}function $u(e,t){return e.id===t.id&&e.role===t.role&&e.text===t.text&&Eo(e.images,t.images)&&qx(e.fileChanges,t.fileChanges)&&e.fileChangeStatus===t.fileChangeStatus&&e.messageType===t.messageType&&e.rawPayload===t.rawPayload&&e.isUnhandled===t.isUnhandled&&jx(e.commandExecution,t.commandExecution)&&Bx(e.plan,t.plan)&&e.turnId===t.turnId&&e.turnIndex===t.turnIndex&&e.isAutomationRun===t.isAutomationRun&&e.automationDisplayName===t.automationDisplayName}function bs(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Ux(e,t,n={}){const r=new Map(e.map(f=>[f.id,f])),o=new Map(t.map(f=>[f.id,f])),s=t.map(f=>{const g=r.get(f.id);return g&&$u(g,f)?g:f});if(n.preserveMissing!==!0)return bs(e,s)?e:s;const i=e.map(f=>{const g=o.get(f.id);return!g||$u(f,g)?f:g}),l=new Set(e.map(f=>f.id)),c=s.filter(f=>!l.has(f.id)),p=[...i,...c];return bs(e,p)?e:p}function qx(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){const r=e[n],o=t[n];if(r.path!==o.path||r.operation!==o.operation||r.movedToPath!==o.movedToPath||r.diff!==o.diff||r.addedLineCount!==o.addedLineCount||r.removedLineCount!==o.removedLineCount)return!1}return!0}function Ou(e){return e.replace(/\s+/gu," ").trim()}function Hx(e,t){const n=new Set(t.map(s=>s.id)),r=new Set(t.filter(s=>s.role==="assistant").map(s=>Ou(s.text)).filter(s=>s.length>0));if(r.size===0)return e;const o=e.filter(s=>{if(s.messageType!=="agentMessage.live")return!0;if(n.has(s.id))return!1;const i=Ou(s.text);return i.length===0?!1:!r.has(i)});return o.length===e.length?e:o}function ci(e,t){const n=e.findIndex(s=>s.id===t.id);if(n<0)return[...e,t];const r=e[n];if($u(r,t))return e;const o=[...e];return o.splice(n,1,t),o}const bh="worked";function So(e){if(!e)return null;const t=new Date(e).getTime();return Number.isNaN(t)?null:t}function Vx(e){if(!Number.isFinite(e)||e<=0)return"<1s";const t=Math.max(1,Math.round(e/1e3)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),o=t%60,s=[];n>0&&s.push(`${n}h`),(r>0||n>0)&&s.push(`${r}m`);const i=o>0||s.length===0?o:0;return s.push(`${i}s`),s.join(" ")}function Wx(e,t){return!e&&!t?!0:!e||!t?!1:e.turnId===t.turnId&&e.durationMs===t.durationMs}function zx(e,t){if(!e&&!t)return!0;if(!e||!t||e.label!==t.label||e.details.length!==t.details.length)return!1;for(let n=0;n<e.details.length;n+=1)if(e.details[n]!==t.details[n])return!1;return!0}function Gx(e){return{id:`turn-summary:${e.turnId}`,role:"system",text:`Worked for ${Vx(e.durationMs)}`,messageType:bh,turnId:e.turnId}}function Kx(e){for(let t=e.length-1;t>=0;t-=1)if(e[t].role==="assistant")return t;return-1}function Yx(e,t){const n=Gx(t),r=e.filter(i=>i.messageType!==bh),o=Kx(r);if(o<0)return[...r,n];const s=[...r];return s.splice(o,0,n),s}function pt(e,t){if(!(t in e))return e;const n={...e};return delete n[t],n}function Jx(e,t){if(t.size===0)return e;let n=!1;const r={};for(const[o,s]of Object.entries(e)){if(t.has(o)){n=!0;continue}r[o]=s}return n?r:e}function Qx(e,t){return e.id===t.id&&e.title===t.title&&e.projectName===t.projectName&&e.cwd===t.cwd&&e.createdAtIso===t.createdAtIso&&e.updatedAtIso===t.updatedAtIso&&e.preview===t.preview&&e.unread===t.unread&&e.inProgress===t.inProgress&&e.pendingRequestState===t.pendingRequestState}function Xx(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Zx(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Vt(e,t){const n=Object.entries(e).filter(([r])=>t.has(r));return n.length===Object.keys(e).length?e:Object.fromEntries(n)}function di(e,t){const n=new Map(e.map(o=>[o.projectName,o])),r=t.map(o=>{const s=n.get(o.projectName),i=new Map((s==null?void 0:s.threads.map(c=>[c.id,c]))??[]),l=o.threads.map(c=>{const p=i.get(c.id);return p&&Qx(p,c)?p:c});return s&&s.projectName===o.projectName&&Xx(s.threads,l)?s:{projectName:o.projectName,threads:l}});return Zx(e,r)?e:r}function e1(e,t,n){const r=new Set(fr(t).map(l=>l.id)),o=fr(e).filter(l=>n[l.id]===!0&&!r.has(l.id));if(o.length===0)return t;const s=new Map(t.map(l=>[l.projectName,l])),i=t.map(l=>({projectName:l.projectName,threads:[...l.threads]}));for(const l of o){if(s.get(l.projectName)){const p=i.findIndex(f=>f.projectName===l.projectName);p>=0&&(i[p]={projectName:i[p].projectName,threads:[l,...i[p].threads]});continue}i.push({projectName:l.projectName,threads:[l]})}return i}function ko(e){return Ca(e)}function t1(e){const t=e.split(`
51
- `).map(n=>n.trim()).find(n=>n.length>0);return t?t.slice(0,80):"Untitled thread"}function n1(e){const t=e.trim()||"Untitled thread";return/^fork:\s+/iu.test(t)?t:`Fork: ${t}`}function r1(){const e=M([]),t=M([]),n=M($x()),r=M({}),o=M({}),s=M({}),i=M({}),l=M({}),c=M({}),p=M({}),f=M({}),g=M({}),T=M({}),k=M([]),U=M([{value:"default",label:"Default"},{value:"plan",label:"Plan"}]),H=M(Cx()),X=M(xx()),q=M(ii(H.value,n.value)),P=M(uf(X.value,n.value)),F=M("medium"),z=M("standard"),de=M(""),ue=M(kx()),we=M(Ex()),ke=M(Dx()),me=M(Lx()),Ie=M({}),Oe=M({}),Y=M({}),ve=M({}),Fe=M({}),Le=M({}),Me=M({}),Te=M({}),_e=M({}),He=M({}),Ke=M({}),Ve=M({}),Ye=M({}),yt=M(null),Qe=M(Mx()),xt=M(Rx()),Ne=M({}),Q=M([]),pe=M([]),ge=M(!1),Pe=M(!1),Ge=M(!1),_=M(!1),A=M(!1),B=M(!1),G=M(""),ne=M(!1),ee=M(!1);function le(a){var u;try{const h=new URL(a,"http://localhost");return h.pathname!=="/codex-local-image"?"":((u=h.searchParams.get("path"))==null?void 0:u.trim())??""}catch{return""}}function fe(a){const u=a.trim().toLowerCase();return u?/\b(attached image|attached screenshot|save the attached|copy (the )?screenshot|save screenshot)\b/i.test(u):!1}function ce(a){var h;const u=r.value[a]??[];for(let b=u.length-1;b>=0;b-=1){const I=u[b];if(!(I.role!=="user"||!Array.isArray(I.images)||I.images.length===0))for(let R=I.images.length-1;R>=0;R-=1){const L=((h=I.images[R])==null?void 0:h.trim())??"";if(L&&le(L))return L}}return""}let oe=null,Ee=null,ye=null;const he=new Map;let De=null;const $=new Map;let D=null,N=null,V=!1;const te=new Set,be=new Map;let $e=null,st=!1,ut=!1,at=[],Pt=!1,Lt=!1;const bn=new Map,ir=new Set,Dr=re(()=>fr(e.value)),Sr=re(()=>Dr.value.find(a=>a.id===n.value)??null),hr=re(()=>we.value[n.value]??null),et=re(()=>{const a=n.value;return!!(a&&xt.value[a]===!0)}),$t=re(()=>{const a=n.value;return a?_e.value[a]===!0:!1}),Tn=re(()=>{const a=[],u=n.value;return u&&Array.isArray(Ve.value[u])&&a.push(...Ve.value[u]),Array.isArray(Ve.value[ps])&&a.push(...Ve.value[ps]),a.sort((h,b)=>h.receivedAtIso.localeCompare(b.receivedAtIso))}),mr=re(()=>{var R;const a=n.value;if(!a)return null;const u=p.value[a]===!0,h=u?Le.value[a]:void 0,b=u?(i.value[a]??"").trim():"",I=(((R=Me.value[a])==null?void 0:R.message)??"").trim();return!h&&!b&&!I?null:{activityLabel:(h==null?void 0:h.label)||"Thinking",activityDetails:(h==null?void 0:h.details)??[],reasoningText:b,errorText:I}}),Qt=re(()=>yt.value),lr=re(()=>{const a=n.value;return a?Qe.value[a]??null:null}),Xt=re(()=>{const a=n.value;if(!a)return[];const u=r.value[a]??[],h=o.value[a]??[],b=s.value[a]??[],I=l.value[a]??[],R=c.value[a]??[],L=[...u,...h,...I,...R,...b],K=Fe.value[a];return K?Yx(L,K):L});function ct(a){if(ca(a)===Mo){const h=su(de.value),b=h?Rs(X.value[h]):"";if(b)return b}return uf(X.value,a).trim()}function Bt(...a){const u=[...k.value];for(const h of a){const b=h.trim();b&&!u.includes(b)&&u.push(b)}Eo(k.value,u)||(k.value=u)}function dn(a){n.value!==a&&(n.value=a,Ox(a),P.value=ct(a),Bt(P.value),q.value=ii(H.value,a),Lt=!1)}function Lr(a,u){const h=u.trim(),b=ca(a);if(h){const I=Zs(X.value);I[b]=h,X.value=I}else X.value=si(X.value,b);if(a.trim()===n.value?(P.value=ct(n.value),Bt(P.value)):Bt(h),b===Mo){const I=su(de.value);if(I)if(h){const R=Zs(X.value);R[I]=h,X.value=R}else X.value=si(X.value,I)}ai(X.value)}function _n(a){Lr(n.value,a)}function Bn(a,u){const h=a.trim();if(!h)return;const b=u.trim();if(b){const I=Zs(X.value);I[h]=b,X.value=I}else X.value=si(X.value,h);Bt(b),n.value===h&&(P.value=ct(n.value)),ai(X.value)}function Kr(a,u){const h=a.trim();if(!h)return;if(!u){if(!(h in Qe.value))return;Qe.value=pt(Qe.value,h),pf(Qe.value);return}const b=Qe.value[h];b&&JSON.stringify(b)===JSON.stringify(u)||(Qe.value={...Qe.value,[h]:u},pf(Qe.value))}function fn(a){const u=a==="plan"?"plan":"default",h=ca(n.value);if(!(ii(H.value,n.value)===u&&q.value===u)){if(q.value=u,u==="plan"){const I=Zs(H.value);I[h]=u,H.value=I}else H.value=si(H.value,h);cf(H.value)}}function Zn(a){yt.value=a}async function Kt(a=n.value){a.trim()?Bn(a,Ar):_n(Ar),Bt(Ar)}function ur(a,u){Ye.value={...Ye.value,[a]:u}}function on(a){Ye.value[a]&&(Ye.value=pt(Ye.value,a))}async function er(a){if(ir.has(a))return;const u=Ye.value[a];if(!(!u||u.fallbackRetried)){ir.add(a),ur(a,{...u,fallbackRetried:!0});try{await Kt(a);try{const h=await Jl(a,1);en(a,h),jt(a),Rn(a,[]),tt(a),l.value[a]&&(l.value=pt(l.value,a))}catch{}It(a,null),G.value="",Yt(a,null),At(a,{label:"Thinking",details:vr(Ar,u.effort,u.collaborationMode)}),Ct(a,!0),Y.value[a]!==!0&&await Yl(a),await Ql(a,u.text,u.imageUrls,Ar,u.effort||void 0,u.skills.length>0?u.skills:void 0,u.fileAttachments,u.collaborationMode),Y.value={...Y.value,[a]:!0},hn(),te.add(a),V=!0,await Cr()}catch(h){const b=h instanceof Error?h.message:"Unknown application error";It(a,b),G.value=b,Ct(a,!1),At(a,null)}finally{ir.delete(a)}}}function sn(a){a&&!sf.includes(a)||(F.value=a)}async function kr(a){const u=a==="fast"?"fast":"standard";if(A.value||z.value===u)return;const h=z.value;z.value=u,A.value=!0,G.value="";try{await rb(u)}catch(b){z.value=h,G.value=b instanceof Error?b.message:"Failed to update Fast mode"}finally{A.value=!1}}async function tr(){try{const a=await ab();U.value=a,a.some(u=>u.value===q.value)||fn("default")}catch{}}function vr(a,u,h=q.value){const b=a.trim()||"default",I=u||"default",R=h==="plan"?"Plan":"Default",L=z.value==="fast"?"Fast":"Standard";return[`Mode: ${R}`,`Model: ${b}`,`Thinking: ${I}`,`Speed: ${L}`]}async function gr(a){try{const[u,h]=await Promise.all([ih({includeProviderModels:(a==null?void 0:a.includeProviderModels)!==!1}),lh()]),b=ct(n.value),I=h.model.trim(),R=wh(h.providerId);de.value=R;const L=su(R),K=L?Rs(X.value[L]):"",J=[...u];if(!(a!=null&&a.providerChanged))for(const Ue of[b,I])Ue&&!J.includes(Ue)&&J.push(Ue);k.value=J;const Ae=b&&u.includes(b);if((!b||!Ae||a!=null&&a.providerChanged)&&(a!=null&&a.providerChanged&&J.length>0?K&&J.includes(K)?_n(K):I&&J.includes(I)?_n(I):_n(J[0]):I&&J.includes(I)?_n(h.model):J.length>0?_n(J[0]):_n("")),L&&P.value.trim().length>0){const Ue=Zs(X.value);Ue[L]=P.value.trim(),X.value=Ue,ai(X.value)}h.reasoningEffort&&sf.includes(h.reasoningEffort)&&(F.value=h.reasoningEffort),z.value=h.speedMode}catch{}}async function pn(){if(N){await N;return}N=(async()=>{try{const a=await Vw();Zn(a),pe.value=a?[a]:[]}catch{}finally{N=null}})(),await N}function hn(){if(typeof window>"u"){pn();return}ye!==null&&window.clearTimeout(ye),ye=window.setTimeout(()=>{ye=null,pn()},Tx)}function Zt(a){if(!a||typeof window>"u")return;const u=he.get(a);u!==void 0&&(window.clearTimeout(u),he.delete(a))}function mn(a){if(!a||typeof window>"u")return;Zt(a);const u=window.setTimeout(()=>{he.delete(a),te.add(a),Cr()},_x);he.set(a,u)}function Un(a){const u=Ne.value;return Object.keys(u).length===0?a:a.map(h=>({projectName:h.projectName,threads:h.threads.map(b=>{const I=u[b.id];return I?{...b,title:I}:b})}))}function vn(a){return a?Array.isArray(Ve.value[a])?Ve.value[a]:[]:[]}function Mn(a){return a==="item/commandExecution/requestApproval"||a==="item/fileChange/requestApproval"||a==="item/permissions/requestApproval"||a==="execCommandApproval"||a==="applyPatchApproval"}function gn(a){return a.some(u=>Mn(u.method))?"approval":a.length>0?"response":null}function Nt(){const u=Un(t.value).map(h=>({projectName:h.projectName,threads:h.threads.map(b=>{const I=p.value[b.id]===!0,R=gn(vn(b.id)),L=n.value===b.id,K=ue.value[b.id],J=T.value[b.id]===!0,Ae=!L&&!I&&(J||K!==b.updatedAtIso);return{...b,inProgress:I,unread:Ae,pendingRequestState:R}})}));e.value=di(e.value,u)}function nr(a,u,h){const b=new Date().toISOString(),I=Jt(u),R=Ca(I),L={id:a,title:t1(h),projectName:R,cwd:I,hasWorktree:I.includes("/.codex/worktrees/")||I.includes("/.git/worktrees/"),createdAtIso:b,updatedAtIso:b,preview:h,unread:!1,inProgress:!1},K=t.value.findIndex(Ae=>Ae.projectName===R);if(K>=0){const Ue=t.value[K].threads.filter(bt=>bt.id!==a),Ze={projectName:R,threads:[L,...Ue]},ft=[...t.value];ft.splice(K,1,Ze),t.value=ft}else t.value=[{projectName:R,threads:[L]},...t.value];const J=li(ke.value,t.value);Eo(ke.value,J)||(ke.value=J,hs(ke.value)),Nt()}function qn(a){const u=new Set(a.map(K=>K.id)),h=lf(X.value,u);h!==X.value&&(X.value=h,P.value=ct(n.value),Bt(P.value),ai(h));const b=lf(H.value,u);b!==H.value&&(H.value=b,q.value=ii(b,n.value),cf(b));const I=Vt(ue.value,u);I!==ue.value&&(ue.value=I,af(I));const R=Vt(we.value,u);R!==we.value&&(we.value=R,df(R)),Oe.value=Vt(Oe.value,u),Ie.value=Vt(Ie.value,u),Y.value=Vt(Y.value,u),ve.value=Vt(ve.value,u),r.value=Vt(r.value,u),s.value=Vt(s.value,u),i.value=Vt(i.value,u),l.value=Vt(l.value,u),c.value=Vt(c.value,u),Fe.value=Vt(Fe.value,u),Le.value=Vt(Le.value,u),Me.value=Vt(Me.value,u),Te.value=Vt(Te.value,u),_e.value=Vt(_e.value,u),He.value=Vt(He.value,u),Ke.value=Vt(Ke.value,u),Qe.value=Vt(Qe.value,u),T.value=Vt(T.value,u),p.value=Vt(p.value,u);const L={};for(const[K,J]of Object.entries(Ve.value))(K===ps||u.has(K))&&(L[K]=J);Ve.value=L}function rr(a){const u=fr(t.value).find(h=>h.id===a);u&&(ue.value={...ue.value,[a]:u.updatedAtIso},af(ue.value),T.value[a]&&(T.value=pt(T.value,a)),Nt())}function Yt(a,u){if(!a)return;const h=Fe.value[a];if(u){if(Wx(h,u))return;Fe.value={...Fe.value,[a]:u}}else h&&(Fe.value=pt(Fe.value,a))}function Ct(a,u){!a||p.value[a]===!0===u||(u?p.value={...p.value,[a]:!0}:(p.value=pt(p.value,a),dt(a),Sn(a)),Nt())}function Sn(a){a&&(_e.value[a]&&(_e.value=pt(_e.value,a)),He.value[a]&&(He.value=pt(He.value,a)),Ke.value[a]&&(Ke.value=pt(Ke.value,a)))}function ho(a){a&&(_e.value={..._e.value,[a]:!0},He.value[a]&&(He.value=pt(He.value,a)),Ke.value[a]&&(Ke.value=pt(Ke.value,a)))}function kn(a){a&&_e.value[a]===!0&&He.value[a]===!0&&Ke.value[a]===!0&&Sn(a)}function Hn(a){const u=Object.keys(_e.value);if(u.length===0)return;let h=He.value,b=!1;for(const I of u)!a.has(I)||h[I]===!0||(h={...h,[I]:!0},b=!0);if(b){He.value=h;for(const I of u)kn(I)}}function Vn(a,u){a&&_e.value[a]===!0&&u.some(h=>h.role==="user")&&(Ke.value[a]!==!0&&(Ke.value={...Ke.value,[a]:!0}),kn(a))}function qt(a){a&&a!==n.value&&T.value[a]!==!0&&(T.value={...T.value,[a]:!0},Nt())}function At(a,u){if(!a)return;const h=Le.value[a];if(!u){h&&(Le.value=pt(Le.value,a));return}const b=Os(u.label)||"Thinking",I=u.details.map(K=>Os(K)).filter(K=>K.length>0&&K!==b),R=Array.from(new Set([...(h==null?void 0:h.details)??[],...I])).slice(-3),L={label:b,details:R};zx(h,L)||(Le.value={...Le.value,[a]:L})}function It(a,u,h={}){if(!a)return;const b=Me.value[a],I=u?Ou(u):"";if(!I){b&&(Me.value=pt(Me.value,a));return}const R=h.transient===!0;(b==null?void 0:b.message)===I&&b.transient===R||(Me.value={...Me.value,[a]:{message:I,transient:R}})}function ht(a){var u;a&&(u=Me.value[a])!=null&&u.transient&&It(a,null)}function xn(){const a=Object.entries(Me.value).filter(([,h])=>h==null?void 0:h.transient).map(([h])=>h);if(a.length===0)return;let u=Me.value;for(const h of a)u=pt(u,h);Me.value=u}function an(a){const u=fr(t.value).find(h=>h.id===a);return(u==null?void 0:u.updatedAtIso)??""}function Wn(a,u){if(!a)return;const h={scrollTop:Math.max(0,u.scrollTop),isAtBottom:u.isAtBottom===!0};typeof u.scrollRatio=="number"&&Number.isFinite(u.scrollRatio)&&(h.scrollRatio=xi(u.scrollRatio,0,1));const b=we.value[a];b&&b.scrollTop===h.scrollTop&&b.isAtBottom===h.isAtBottom&&b.scrollRatio===h.scrollRatio||(we.value={...we.value,[a]:h},df(we.value))}function cr(a,u){if(!a)return;const h={...xt.value};u?h[a]=!0:delete h[a],xt.value=h,Px(h)}function zn(){const a=n.value;a&&cr(a,!et.value)}function en(a,u){const h=r.value[a]??[];bs(h,u)||(r.value={...r.value,[a]:u})}function Rn(a,u){const h=s.value[a]??[];bs(h,u)||(s.value={...s.value,[a]:u})}function Nr(a){a&&a in s.value&&(s.value=pt(s.value,a))}function dr(a,u){const h=c.value[a]??[];bs(h,u)||(c.value={...c.value,[a]:u})}function xr(a,u){const h=o.value[a]??[];bs(h,u)||(o.value={...o.value,[a]:u})}function Cn(a,u){const h=o.value[a]??[],b=ci(h,u);xr(a,b)}function E(a,u){const h=s.value[a]??[],b=ci(h,u);Rn(a,b)}function j(a,u){const h=c.value[a]??[],b=ci(h,u);dr(a,b)}function Z(a,u){if(!a)return;const h=u.trim(),b=i.value[a]??"";if(h.length===0){if(!b)return;i.value=pt(i.value,a);return}b!==h&&(i.value={...i.value,[a]:h})}function Ce(a,u){if(!a)return;const h=i.value[a]??"";Z(a,`${h}${u}`)}function tt(a){a&&a in i.value&&(i.value=pt(i.value,a))}function jt(a){a&&a in o.value&&(o.value=pt(o.value,a))}function Pn(a){a&&a in c.value&&(c.value=pt(c.value,a))}function dt(a){a&&(jt(a),tt(a),At(a,null),n.value,l.value[a]&&(l.value=pt(l.value,a)),Te.value[a]&&(Te.value=pt(Te.value,a)),on(a))}function Ht(a){return a==="completed"?"completed":a==="inProgress"||a==="in_progress"?"inProgress":"pending"}function or(a){var h;const u=[];(h=a.explanation)!=null&&h.trim()&&u.push(a.explanation.trim());for(const b of a.steps){const I=b.status==="completed"?"x":b.status==="inProgress"?"~":" ";u.push(`- [${I}] ${b.step}`)}return u.join(`
52
- `).trim()}function Mt(a){if(a.method!=="turn/plan/updated")return null;const u=y(a.params),h=vt(a),b=w(u==null?void 0:u.turnId)||w(u==null?void 0:u.turn_id),R=(Array.isArray(u==null?void 0:u.plan)?u==null?void 0:u.plan:[]).map(J=>y(J)).map(J=>({step:w(J==null?void 0:J.step),status:Ht(J==null?void 0:J.status)})).filter(J=>J.step.length>0);if(!h||!b)return null;const K={explanation:w(u==null?void 0:u.explanation).trim()||void 0,steps:R,isStreaming:!0};return{threadId:h,message:{id:`${b}:plan`,role:"assistant",text:or(K),messageType:"plan.live",plan:K}}}function Gn(a){if(a.method!=="item/plan/delta")return null;const u=y(a.params),h=vt(a),b=w(u==null?void 0:u.turnId)||w(u==null?void 0:u.turn_id),I=w(u==null?void 0:u.delta);if(!h||!b||!I)return null;const R=`${b}:plan`,L=(o.value[h]??[]).find(Ae=>Ae.id===R),K=`${(L==null?void 0:L.text)??""}${I}`,J=L!=null&&L.plan?{...L.plan,isStreaming:!0}:void 0;return{threadId:h,message:{id:R,role:"assistant",text:K,messageType:"plan.live",plan:J}}}function y(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)?a:null}function w(a){return typeof a=="string"?a:""}function C(a){return typeof a=="number"&&Number.isFinite(a)?a:null}function W(a){const u=y(a);if(!u)return null;const h=C(u.totalTokens??u.total_tokens),b=C(u.inputTokens??u.input_tokens),I=C(u.cachedInputTokens??u.cached_input_tokens),R=C(u.outputTokens??u.output_tokens),L=C(u.reasoningOutputTokens??u.reasoning_output_tokens);return h===null||b===null||I===null||R===null||L===null?null:{totalTokens:h,inputTokens:b,cachedInputTokens:I,outputTokens:R,reasoningOutputTokens:L}}function je(a){const u=y(a);if(!u)return null;const h=W(u.total),b=W(u.last);if(!h||!b)return null;const I=C(u.modelContextWindow??u.model_context_window),R=b.totalTokens,L=typeof I=="number"?Math.max(I-R,0):null,K=typeof I=="number"&&I>0?xi(Math.round((L??0)/I*100),0,100):null;return{total:h,last:b,modelContextWindow:I,currentContextTokens:R,remainingContextTokens:L,remainingContextPercent:K}}function wt(a){if(a.method!=="thread/tokenUsage/updated")return null;const u=y(a.params),h=vt(a),b=je((u==null?void 0:u.tokenUsage)??(u==null?void 0:u.token_usage));return!h||!b?null:{threadId:h,usage:b}}function vt(a){const u=y(a.params);if(!u)return"";const h=w(u.threadId);if(h)return h;const b=w(u.thread_id);if(b)return b;const I=w(u.conversationId);if(I)return I;const R=w(u.conversation_id);if(R)return R;const L=y(u.thread),K=w(L==null?void 0:L.id);if(K)return K;const J=y(u.turn),Ae=w(J==null?void 0:J.threadId);if(Ae)return Ae;const Ue=w(J==null?void 0:J.thread_id);return Ue||""}function sr(a){if(a.method!=="turn/completed")return"";const u=y(a.params),h=y(u==null?void 0:u.turn);if(!h||h.status!=="failed")return"";const b=y(h.error);return w(b==null?void 0:b.message)}function yn(a){var b;if(a.method!=="error")return null;const u=y(a.params),h=w(u==null?void 0:u.message)||w((b=y(u==null?void 0:u.error))==null?void 0:b.message);return h?{message:h,transient:(u==null?void 0:u.willRetry)===!0}:null}function Ut(a){const u=y(a);if(!u)return null;const h=u.id,b=w(u.method),I=u.params;if(typeof h!="number"||!Number.isInteger(h)||!b)return null;const R=y(I),L=yr(b,R),K=w(R==null?void 0:R.threadId)||w(R==null?void 0:R.thread_id)||w(R==null?void 0:R.conversationId)||w(R==null?void 0:R.conversation_id)||ps,J=w(R==null?void 0:R.turnId)||w(R==null?void 0:R.turn_id),Ae=w(R==null?void 0:R.itemId)||w(R==null?void 0:R.item_id)||w(R==null?void 0:R.callId)||w(R==null?void 0:R.call_id),Ue=w(u.receivedAtIso)||new Date().toISOString();return{id:h,method:L,threadId:K,turnId:J,itemId:Ae,receivedAtIso:Ue,params:I??null}}function yr(a,u){const h=a.trim();return h&&(h==="item/commandExecution/requestApproval"||h==="execCommandApproval"||h==="exec_approval_request"||wr(u)?"item/commandExecution/requestApproval":h==="item/fileChange/requestApproval"||h==="applyPatchApproval"||h==="apply_patch_approval_request"||br(u)?"item/fileChange/requestApproval":h==="item/tool/requestUserInput"||h==="request_user_input"||tn(u)?"item/tool/requestUserInput":h==="mcpServer/elicitation/request"||h==="elicitation_request"||Hi(u)?"mcpServer/elicitation/request":h==="item/permissions/requestApproval"||Vi(u)?"item/permissions/requestApproval":h==="item/tool/call"||h==="dynamic_tool_call_request"||mo(u)?"item/tool/call":h)}function wr(a){if(!a)return!1;const u=a.command;return Array.isArray(u)&&u.some(h=>typeof h=="string"&&h.trim().length>0)||typeof u=="string"&&u.trim().length>0?!0:Array.isArray(a.commandActions)}function br(a){return a?typeof a.grantRoot=="string"&&a.grantRoot.trim().length>0||typeof a.grant_root=="string"&&a.grant_root.trim().length>0||y(a.fileChanges)?!0:y(a.changes)!==null:!1}function tn(a){return!!(a&&Array.isArray(a.questions))}function mo(a){return a?typeof a.toolName=="string"||typeof a.tool_name=="string"||typeof a.name=="string"||Array.isArray(a.arguments):!1}function Hi(a){if(!a)return!1;const u=w(a.mode);return typeof a.serverName=="string"&&typeof a.threadId=="string"&&typeof a.message=="string"&&(u==="form"||u==="url")}function Vi(a){return a?typeof a.threadId=="string"&&typeof a.turnId=="string"&&typeof a.itemId=="string"&&y(a.permissions)!==null:!1}function Wi(a){if(a.method!=="item/tool/requestUserInput")return[];const u=y(a.params),h=Array.isArray(u==null?void 0:u.questions)?u.questions:[],b=[];for(const I of h){const R=y(I),L=w(R==null?void 0:R.id).trim();L&&b.push(L)}return b}function es(a){const u=a.threadId||ps,h=Ve.value[u]??[],b=h.findIndex(R=>R.id===a.id),I=[...h];b>=0?I.splice(b,1,a):I.push(a),Ve.value={...Ve.value,[u]:I.sort((R,L)=>R.receivedAtIso.localeCompare(L.receivedAtIso))},Nt()}function Aa(a){const u={};for(const[h,b]of Object.entries(Ve.value)){const I=b.filter(R=>R.id!==a);I.length>0&&(u[h]=I)}Ve.value=u,Nt()}function vo(a){const u={};for(const h of a){const b=h.threadId||ps,I=u[b]??[];I.push(h),u[b]=I}for(const h of Object.values(u))h.sort((b,I)=>b.receivedAtIso.localeCompare(I.receivedAtIso));Ve.value=u}function Ea(a){if(a.method==="server/request"){const u=Ut(a.params);return u&&es(u),!0}if(a.method==="server/request/resolved"){const u=y(a.params),h=u==null?void 0:u.id;return typeof h=="number"&&Number.isInteger(h)&&Aa(h),!0}return!1}function Os(a){return a.replace(/\s+/gu," ").trim()}function $n(a){const u=vt(a);if(!u)return null;if(a.method==="turn/started")return{threadId:u,activity:{label:"Thinking",details:[]}};if(a.method==="item/started"){const h=y(a.params),b=y(h==null?void 0:h.item),I=w(b==null?void 0:b.type).toLowerCase();if(I==="reasoning")return{threadId:u,activity:{label:"Thinking",details:[]}};if(I==="agentmessage")return{threadId:u,activity:{label:"Writing response",details:[]}};if(I==="commandexecution"){const R=w(b==null?void 0:b.command);return{threadId:u,activity:{label:"Running command",details:R?[R]:[]}}}if(I==="filechange"){const L=(Array.isArray(b==null?void 0:b.changes)?b.changes:[])[0],K=w(L==null?void 0:L.path);return{threadId:u,activity:{label:"Applying changes",details:K?[K]:[]}}}}return a.method==="item/commandExecution/outputDelta"?{threadId:u,activity:{label:"Running command",details:[]}}:a.method==="item/fileChange/outputDelta"?{threadId:u,activity:{label:"Applying changes",details:[]}}:a.method==="item/reasoning/summaryTextDelta"||a.method==="item/reasoning/summaryPartAdded"?{threadId:u,activity:{label:"Thinking",details:[]}}:a.method==="item/agentMessage/delta"?{threadId:u,activity:{label:"Writing response",details:[]}}:null}function zi(a){if(a.method!=="turn/started")return null;const u=y(a.params);if(!u)return null;const h=vt(a);if(!h)return null;const b=y(u.turn),I=w(b==null?void 0:b.id)||w(u.turnId)||`${h}:unknown`;if(!I)return null;const R=So(w(b==null?void 0:b.startedAt))??So(w(u.startedAt))??So(a.atIso)??Date.now();return{threadId:h,turnId:I,startedAtMs:R}}function Gi(a){if(a.method!=="turn/completed")return null;const u=y(a.params);if(!u)return null;const h=vt(a);if(!h)return null;const b=y(u.turn),I=w(b==null?void 0:b.id)||w(u.turnId)||`${h}:unknown`;if(!I)return null;const R=So(w(b==null?void 0:b.completedAt))??So(w(u.completedAt))??So(a.atIso)??Date.now(),L=So(w(b==null?void 0:b.startedAt))??So(w(u.startedAt))??void 0;return{threadId:h,turnId:I,completedAtMs:R,startedAtMs:L}}function Ds(a){return`${a}:live-reasoning`}function Ls(a){const u=r.value[a]??[];let h=-1;for(const b of u)typeof b.turnIndex=="number"&&Number.isFinite(b.turnIndex)&&(h=Math.max(h,b.turnIndex));return h+1}function Ki(a,u,h){if(!a||!u||!Number.isInteger(h)||h<0)return;const b=ve.value[a]??{};b[u]!==h&&(ve.value={...ve.value,[a]:{...b,[u]:h}})}function Ns(a,u){const h=ve.value[a]??{},b=Object.entries(h),I=Object.entries(u);b.length===I.length&&b.every(([R,L])=>u[R]===L)||(ve.value={...ve.value,[a]:{...u}})}function ts(a){const u=c.value[a];if(!u||u.length===0)return;const h=ve.value[a]??{};let b=!1;const I=u.map(R=>{if(typeof R.turnIndex=="number"||!R.turnId)return R;const L=h[R.turnId];return typeof L!="number"?R:(b=!0,{...R,turnIndex:L})});b&&(c.value={...c.value,[a]:I})}function Yi(a){const u=y(a.params);if(!u)return"";if(a.method==="item/started"){const h=y(u.item);return!h||h.type!=="reasoning"?"":w(h.id)}return""}function Ia(a){const u=y(a.params);if(!u)return null;if(a.method==="item/reasoning/summaryTextDelta"){const h=w(u.itemId),b=w(u.delta);return!h||!b?null:{messageId:Ds(h),delta:b}}return null}function Ji(a){const u=y(a.params);if(!u)return"";if(a.method==="item/reasoning/summaryPartAdded"){const h=w(u.itemId);return h?Ds(h):""}return""}function Qi(a){const u=y(a.params);if(!u)return"";if(a.method==="item/completed"){const h=y(u.item);return!h||h.type!=="reasoning"?"":Ds(w(h.id))}return""}function Xi(a){const u=y(a.params);if(!u)return"";if(a.method==="item/started"){const h=y(u.item);return!h||h.type!=="agentMessage"?"":w(h.id)}return""}function js(a){const u=y(a.params);if(!u)return null;if(a.method==="item/agentMessage/delta"){const h=w(u.itemId),b=w(u.delta);return!h||!b?null:{messageId:h,delta:b}}return null}function Fs(a){const u=y(a.params);if(!u)return null;if(a.method==="item/completed"){const h=y(u.item);if(!h||h.type!=="agentMessage")return null;const b=w(h.id),I=w(h.text);return!b||!I?null:{id:b,role:"assistant",text:I,messageType:"agentMessage.live"}}return null}function Ma(a){return`/codex-local-image?path=${encodeURIComponent(a)}`}function Zi(a){const u=a.trim();if(!u)return"";if(u.startsWith("data:")||u.startsWith("http://")||u.startsWith("https://")||u.startsWith("/codex-local-image?"))return u;const h=u.replace(/\s+/gu,"");return/^[A-Za-z0-9+/]+={0,2}$/u.test(h)?`data:image/png;base64,${h}`:""}function el(a){if(a.method!=="item/completed")return null;const u=y(a.params),h=y(u==null?void 0:u.item);if(!h)return null;const b=w(h.id);if(!b)return null;if(h.type==="imageView"){const L=w(h.path);return L?{id:b,role:"assistant",text:"",images:[Ma(L)],messageType:"imageView"}:null}if(h.type!=="imageGeneration"&&h.type!=="image_generation")return null;const I=w(h.result),R=I?Zi(I):"";return R?{id:b,role:"assistant",text:"",images:[R],messageType:"imageView"}:null}function Ra(a){var Ae;if(a.method!=="item/started")return null;const u=y(a.params),h=y(u==null?void 0:u.item);if(!h||h.type!=="commandExecution")return null;const b=w(h.id),I=w(h.command);if(!b)return null;const R=typeof h.cwd=="string"?h.cwd:null,L=vt(a),K=w(u==null?void 0:u.turnId)||w(u==null?void 0:u.turn_id),J=L&&K?(Ae=ve.value[L])==null?void 0:Ae[K]:void 0;return{id:b,role:"system",text:I,messageType:"commandExecution",commandExecution:{command:I,cwd:R,status:"inProgress",aggregatedOutput:"",exitCode:null},turnId:K||void 0,turnIndex:typeof J=="number"?J:void 0}}function Pa(a){if(a.method!=="item/commandExecution/outputDelta")return null;const u=y(a.params);if(!u)return null;const h=w(u.itemId),b=w(u.delta);return!h||!b?null:{itemId:h,delta:b}}function tl(a){var bt;if(a.method!=="item/completed")return null;const u=y(a.params),h=y(u==null?void 0:u.item);if(!h||h.type!=="commandExecution")return null;const b=w(h.id),I=w(h.command);if(!b)return null;const R=typeof h.cwd=="string"?h.cwd:null,L=w(h.status),K=L==="failed"?"failed":L==="declined"?"declined":L==="interrupted"?"interrupted":"completed",J=typeof h.aggregatedOutput=="string"?h.aggregatedOutput:"",Ae=typeof h.exitCode=="number"?h.exitCode:null,Ue=vt(a),Ze=w(u==null?void 0:u.turnId)||w(u==null?void 0:u.turn_id),ft=Ue&&Ze?(bt=ve.value[Ue])==null?void 0:bt[Ze]:void 0;return{id:b,role:"system",text:I,messageType:"commandExecution",commandExecution:{command:I,cwd:R,status:K,aggregatedOutput:J,exitCode:Ae},turnId:Ze||void 0,turnIndex:typeof ft=="number"?ft:void 0}}function nl(a){var Ae;if(a.method!=="item/completed")return null;const u=y(a.params),h=y(u==null?void 0:u.item);if(!h||h.type!=="fileChange")return null;const b=w(h.id);if(!b)return null;const I=w(u==null?void 0:u.threadId),R=w(u==null?void 0:u.turnId),L=I&&R?(Ae=ve.value[I])==null?void 0:Ae[R]:void 0,K=Zp(h.changes),J=Xp(h.status);return K.length===0||J!=="completed"?null:{id:b,role:"system",text:"",messageType:"fileChange",fileChangeStatus:J,fileChanges:K,turnId:R||void 0,turnIndex:typeof L=="number"?L:void 0}}function Bs(a,u){const h=l.value[a]??[],b=ci(h,u);b!==h&&(l.value={...l.value,[a]:b})}function $a(a,u){const h=l.value[a];if(!h||h.length===0)return;const b=new Set(u.map(R=>R.id)),I=h.filter(R=>!b.has(R.id));I.length!==h.length&&(I.length===0?l.value=pt(l.value,a):l.value={...l.value,[a]:I})}function Us(a,u){const h=c.value[a];if(!h||h.length===0)return;const b=new Set(u.map(K=>K.id)),I=new Set(u.filter(K=>K.messageType==="fileChange"&&typeof K.turnId=="string"&&K.turnId.length>0).map(K=>K.turnId)),R=new Set(u.filter(K=>K.messageType==="fileChange"&&typeof K.turnIndex=="number").map(K=>K.turnIndex)),L=h.filter(K=>!b.has(K.id)&&!(K.turnId&&I.has(K.turnId))&&!(typeof K.turnIndex=="number"&&R.has(K.turnIndex)));L.length!==h.length&&(L.length===0?c.value=pt(c.value,a):c.value={...c.value,[a]:L})}function go(a){if(a.method==="item/agentMessage/delta")return!0;const u=y(a.params);if(!u)return!1;if(a.method==="item/completed"){const h=y(u.item);return(h==null?void 0:h.type)==="agentMessage"}return!1}function rl(a){var za,zs,Ga,Ka,Ya;if(Ea(a))return;if(a.method==="account/rateLimits/updated"&&hn(),a.method==="thread/name/updated"){const We=y(a.params),ar=w(We==null?void 0:We.threadId),Jr=w(We==null?void 0:We.threadName);ar&&Jr&&(Ne.value={...Ne.value,[ar]:Jr},Nt(),eu(ar,Jr))}if(a.method==="account/rateLimits/updated"){Zn(rh(a.params));return}const u=wt(a);if(u){Kr(u.threadId,u.usage);return}const h=$n(a);h&&At(h.threadId,h.activity);const b=vt(a),I=yn(a);!I&&b&&ht(b);const R=zi(a);R&&(bn.set(R.turnId,R),Ki(R.threadId,R.turnId,Ls(R.threadId)),Te.value={...Te.value,[R.threadId]:R.turnId},jt(R.threadId),Pn(R.threadId),Yt(R.threadId,null),It(R.threadId,null),Ct(R.threadId,!0),T.value[R.threadId]&&(T.value=pt(T.value,R.threadId)));const L=Gi(a),K=sr(a),J=(L==null?void 0:L.threadId)??vt(a),Ae=J?ct(J):"",Ue=!!J&&!!K&&Ae!==Ar&&ui(new Error(K));if(L){Ye.value[L.threadId];const We=bn.get(L.turnId);We&&bn.delete(L.turnId);const ar=C((za=y(a.params))==null?void 0:za.durationMs)??C((Ga=y((zs=y(a.params))==null?void 0:zs.turn))==null?void 0:Ga.durationMs)??(typeof L.startedAtMs=="number"?L.completedAtMs-L.startedAtMs:null)??(We?L.completedAtMs-We.startedAtMs:null),Jr=typeof ar=="number"?Math.max(0,ar):0;Yt(L.threadId,{turnId:L.turnId,durationMs:Jr}),Te.value[L.threadId]&&(Te.value=pt(Te.value,L.threadId)),Ct(L.threadId,!1),At(L.threadId,null),qt(L.threadId),Ue||(on(L.threadId),ja(L.threadId))}if(K){const We=(L==null?void 0:L.threadId)||vt(a);We&&It(We,K),G.value=K,We&&Ue&&er(We)}else L&&It(L.threadId,null);if(I){const We=b,ar=We?ct(We):P.value.trim();We&&It(We,I.message,{transient:I.transient}),G.value=I.message,ar!==Ar&&ui(new Error(I.message))&&(We?er(We):Kt())}const Ze=Mt(a);Ze&&(Cn(Ze.threadId,Ze.message),At(Ze.threadId,{label:"Planning",details:((Ka=Ze.message.plan)==null?void 0:Ka.steps.map(We=>We.step).slice(0,2))??[]}));const ft=Gn(a);if(ft&&(Cn(ft.threadId,ft.message),At(ft.threadId,{label:"Planning",details:[]})),!b||b!==n.value)return;Xi(a);const bt=js(a);if(bt){const We=(s.value[b]??[]).find(Jr=>Jr.id===bt.messageId),ar=`${(We==null?void 0:We.text)??""}${bt.delta}`;E(b,{id:bt.messageId,role:"assistant",text:ar,messageType:"agentMessage.live"})}const yo=Fs(a);yo&&E(b,yo);const wo=el(a);wo&&E(b,wo),Yi(a);const ls=Ia(a);if(ls&&Ce(b,ls.delta),Ji(a)){const We=i.value[b]??"";We.trim().length>0&&!We.endsWith(`
53
-
54
- `)&&Z(b,`${We}
55
-
56
- `)}Qi(a);const Lo=Ra(a);Lo&&(Bs(b,Lo),At(b,{label:"Running command",details:[((Ya=Lo.commandExecution)==null?void 0:Ya.command)??""]}));const No=Pa(a);if(No){const We=(l.value[b]??[]).find(ar=>ar.id===No.itemId);We!=null&&We.commandExecution&&Bs(b,{...We,commandExecution:{...We.commandExecution,aggregatedOutput:`${We.commandExecution.aggregatedOutput}${No.delta}`}})}const jo=tl(a);jo&&Bs(b,jo);const Wa=nl(a);if(Wa&&j(b,Wa),go(a)&&(Lt&&n.value&&Wn(n.value,{scrollTop:0,isAtBottom:!0,scrollRatio:1}),tt(b)),a.method==="turn/completed"){Lt=!1,tt(b),l.value[b]&&(l.value=pt(l.value,b));const We=vt(a);We&&(Ct(We,!1),At(We,null),qt(We),Ue||(on(We),ja(We)))}}function ol(a){if(a.method==="thread/tokenUsage/updated")return;const u=vt(a);u&&te.add(u);const h=a.method;(h.startsWith("thread/")||h.startsWith("turn/")||h.startsWith("item/"))&&(V=!0),!(Ee!==null||typeof window>"u")&&(Ee=window.setTimeout(()=>{Ee=null,Cr()},ou))}async function Oa(a,u){if(!Pt){Pt=!0;try{if(!u)return;const h=[];for(const b of u.order){const I=ko(b);h.includes(I)||h.push(I)}if(h.length>0){const b=li(h,a);Eo(ke.value,b)||(ke.value=b,hs(ke.value))}if(Object.keys(u.labels).length>0){const b={...me.value};let I=!1;for(const[R,L]of Object.entries(u.labels)){const K=ko(R);b[K]!==L&&(b[K]=L,I=!0)}I&&(me.value=b,au(b))}}catch{}}}async function sl(){if(!(Object.keys(Ne.value).length>0))try{const a=await _b();Object.keys(a.titles).length>0&&(Ne.value=a.titles)}catch{}}async function al(){try{return await gs()}catch{return null}}async function Yr(a,u,h){if(Ne.value[a])return;const b=u.trim();if(!b)return;const I=b.length>300?b.slice(0,300):b;try{const R=await xb(I,h);if(!R||Ne.value[a])return;Ne.value={...Ne.value,[a]:R},Nt(),eu(a,R)}catch{}}function il(a,u){if(!u||u.order.length===0)return a;const h=new Set(u.order.map(b=>ko(b)));return a.filter(b=>h.has(b.projectName))}function ns(a,u){const h=il(a,u),b=li(ke.value,h);Eo(ke.value,b)||(ke.value=b,hs(ke.value));const I=iu(h,ke.value);Hn(new Set(fr(I).map(L=>L.id)));const R=e1(t.value,I,p.value);t.value=di(t.value,R),p.value=Vt(p.value,new Set(fr(t.value).map(L=>L.id))),Nt()}function qs(a,u){if(a.length===0)return u;if(u.length===0)return a;const h=new Map;for(const I of fr(a))h.set(I.id,I);for(const I of fr(u))h.set(I.id,I);const b=new Map;for(const I of h.values()){const R=b.get(I.projectName);R?R.push(I):b.set(I.projectName,[I])}return Array.from(b.entries()).map(([I,R])=>({projectName:I,threads:R.sort((L,K)=>new Date(K.updatedAtIso).getTime()-new Date(L.updatedAtIso).getTime())})).sort((I,R)=>{var J,Ae;const L=new Date(((J=I.threads[0])==null?void 0:J.updatedAtIso)??0).getTime();return new Date(((Ae=R.threads[0])==null?void 0:Ae.updatedAtIso)??0).getTime()-L})}async function ll(a){if(!(st||!$e)){st=!0;try{const u=await Bd($e,Pw());$e=u.nextCursor,ut=u.nextCursor===null,at=qs(at,u.groups),ns(at,a)}catch{}finally{st=!1}}}async function Oo(){if(De){await De;return}De=(async()=>{var a;ee.value||(ge.value=!0);try{const[u,h]=await Promise.all([Bd(),al(),sl()]),b=u.groups;at=ee.value?qs(at,b):b,$e=ee.value&&!ut?$e:u.nextCursor,ut=u.nextCursor===null,await Oa(b,h),ns(at,h),ee.value=!0,ut||ll(h);const I=fr(e.value);qn(I),!I.some(L=>L.id===n.value)&&!n.value&&dn(((a=I[0])==null?void 0:a.id)??"")}finally{ge.value=!1}})().finally(()=>{De=null}),await De}async function jr(a,u={}){if(!a)return;const h=$.get(a);if(h){await h;return}const b=Oe.value[a]===!0,I=u.silent!==!0&&!b;I&&(Pe.value=!0);const R=(async()=>{try{const L=an(a),K=Ie.value[a]??"",J=Date.now()-(be.get(a)??0)<Sx;if(b&&(J||(L.length===0||K===L)&&p.value[a]!==!0)){rr(a);return}const Ze=Y.value[a]!==!0?await Yl(a):null,ft=Ze??await Ud(a);Ze&&(Bn(a,Ze.model),Y.value={...Y.value,[a]:!0});const{messages:bt,inProgress:yo,activeTurnId:wo,turnIndexByTurnId:ls}=ft;Vn(a,bt),Ns(a,ls),ts(a);const Va=r.value[a]??[],Lo=Ux(Va,bt,{preserveMissing:u.silent===!0});en(a,Lo);const No=s.value[a]??[];if(yo){const jo=Hx(No,bt);Rn(a,jo)}else Nr(a);$a(a,bt),Us(a,bt),Oe.value={...Oe.value,[a]:!0},be.set(a,Date.now()),L&&(Ie.value={...Ie.value,[a]:L}),Ct(a,yo),wo?Te.value={...Te.value,[a]:wo}:Te.value[a]&&(Te.value=pt(Te.value,a)),yo||dt(a),rr(a)}finally{I&&(Pe.value=!1)}})().finally(()=>{$.delete(a)});$.set(a,R),await R}async function ul(a,u={}){a&&Oe.value[a]!==!0&&await jr(a,u)}async function Hs(){if(D){await D;return}D=(async()=>{var a,u;try{const h=((u=(a=Sr.value)==null?void 0:a.cwd)==null?void 0:u.trim())??"";Q.value=await Cb(h?[h]:void 0)}catch{}finally{D=null}})(),await D}async function cl(){await pn()}async function dl(a={}){G.value="";const u=a.includeSelectedThreadMessages!==!1,h=a.awaitAncillaryRefreshes===!0;try{await Oo();const b=Promise.allSettled([gr({providerChanged:a.providerChanged,includeProviderModels:a.providerChanged===!0||h}),pn(),tr(),Hs(),cl()]).then(()=>{});u&&await jr(n.value),h&&await b}catch(b){G.value=b instanceof Error?b.message:"Unknown application error"}}async function fl(a){dn(a);try{await Promise.all([jr(a),Hs()])}catch(u){G.value=u instanceof Error?u.message:"Unknown application error"}}async function Da(a){try{await Yw(a),await Oo(),n.value===a&&await jr(n.value)}catch(u){G.value=u instanceof Error?u.message:"Unknown application error"}}async function La(a,u){const h=u.trim();if(!(!a||!h))try{await Jw(a,h),Ne.value={...Ne.value,[a]:h},Nt(),eu(a,h)}catch(b){G.value=b instanceof Error?b.message:"Unknown application error"}}async function Do(a){var L,K;const u=a.trim();if(!u)return"";const h=fr(t.value).find(J=>J.id===u),b=((L=h==null?void 0:h.cwd)==null?void 0:L.trim())??"",I=((K=h==null?void 0:h.title)==null?void 0:K.trim())??"Forked chat",R=ct(u);G.value="";try{const J=await Wd(u,b||void 0,R||void 0),Ae=J.threadId.trim();return Ae?(nr(Ae,b,I),Bn(Ae,J.model),Y.value={...Y.value,[Ae]:!0},dn(Ae),await Oo(),await jr(Ae),Ae):""}catch(J){return G.value=J instanceof Error?J.message:"Unknown application error",""}}async function Na(a,u){var L;const h=a.trim();if(!h||!Number.isInteger(u)||u<0)return"";if(p.value[h]===!0)return G.value="Finish the current turn before forking from a response.","";if(Oe.value[h]!==!0)try{await jr(h)}catch(K){return G.value=K instanceof Error?K.message:"Unknown application error",""}const b=r.value[h]??[];let I=-1;for(const K of b)typeof K.turnIndex=="number"&&Number.isFinite(K.turnIndex)&&(I=Math.max(I,K.turnIndex));if(I>=0&&u>I)return"";const R=fr(t.value).find(K=>K.id===h)??null;try{G.value="";const K=await Wd(h),J=K.threadId.trim();if(!J)return"";const Ae=K.cwd.trim()||((L=R==null?void 0:R.cwd)==null?void 0:L.trim())||"",Ue=n1((R==null?void 0:R.title)||(R==null?void 0:R.preview)||"Untitled thread");nr(J,Ae,Ue),Bn(J,K.model),en(J,K.messages),Oe.value={...Oe.value,[J]:!0},Y.value={...Y.value,[J]:!0},jt(J),Rn(J,[]),tt(J),l.value[J]&&(l.value=pt(l.value,J)),Yt(J,null),At(J,null),It(J,null),Ct(J,!1);const Ze=I-u;if(Ze>0){const ft=await Jl(J,Ze);en(J,ft)}return await La(J,Ue),dn(J),Oo().catch(()=>{}),J}catch(K){return G.value=K instanceof Error?K.message:"Unknown application error",""}}async function rs(a,u,h=[],b=[],I=[]){if(!a||!u.trim()||h.length>0||b.length>0||I.length>0)return!1;const L=(Ve.value[a]??[]).filter(Ae=>Ae.method==="item/tool/requestUserInput");if(L.length!==1)return!1;const[K]=L,J=Wi(K);return J.length!==1?!1:Ua({id:K.id,result:{answers:{[J[0]]:{answers:[u.trim()]}}}})}async function Vs(a,u=[],h=[],b="steer",I=[],R){if(A.value)return;const L=n.value,K=a.trim();if(!L||!K&&u.length===0&&I.length===0||await rs(L,K,u,h,I))return;const J=p.value[L]===!0;if(J&&b==="queue"){const Ae=f.value[L]??[],Ue=`q-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,Ze=[...Ae],ft=typeof R=="number"?Math.max(0,Math.min(R,Ze.length)):Ze.length;Ze.splice(ft,0,{id:Ue,text:K,imageUrls:u,skills:h,fileAttachments:I,collaborationMode:q.value}),f.value={...f.value,[L]:Ze};return}if(J){Lt=!0,os(L,K,u,h,I).catch(Ae=>{const Ue=Ae instanceof Error?Ae.message:"Unknown application error";It(L,Ue),G.value=Ue});return}G.value="",Lt=!0,Yt(L,null),At(L,{label:"Thinking",details:vr(ct(L),F.value,q.value)}),It(L,null),Ct(L,!0);try{await os(L,K,u,h,I)}catch(Ae){Lt=!1,Ct(L,!1),At(L,null);const Ue=Ae instanceof Error?Ae.message:"Unknown application error";throw It(L,Ue),G.value=Ue,Ae}}async function pl(a,u,h=[],b=[],I=[]){if(A.value)return"";const R=a.trim(),L=u.trim(),K=ct(Mo).trim();if(!R&&h.length===0&&I.length===0)return"";Ge.value=!0,G.value="";let J="";try{try{const ft=await Vd(L||void 0,K||void 0);J=ft.threadId,Bn(J,ft.model)}catch(ft){if(K&&K!==Ar&&ui(ft)){await Kt();const bt=await Vd(L||void 0,Ar);J=bt.threadId,Bn(J,bt.model)}else throw ft}if(!J)return"";nr(J,L,R||"[Image]"),ho(J),Y.value={...Y.value,[J]:!0},dn(J),Lt=!0,Yt(J,null),At(J,{label:"Thinking",details:vr(ct(J),F.value,q.value)}),It(J,null),Ct(J,!0);const Ae=J,Ue=L||null,Ze=R;return os(J,R,h,b,I).catch(ft=>{Lt=!1,Ct(J,!1),At(J,null);const bt=ft instanceof Error?ft.message:"Unknown application error";It(J,bt),G.value=bt}).finally(()=>{Ge.value=!1}),Yr(Ae,Ze,Ue),J}catch(Ae){Lt=!1,J&&(Ct(J,!1),At(J,null));const Ue=Ae instanceof Error?Ae.message:"Unknown application error";throw J&&It(J,Ue),G.value=Ue,Ge.value=!1,Ae}}async function os(a,u,h=[],b=[],I=[]){const R=F.value,L=q.value,K=u.trim(),J=[...h];if(J.length===0&&fe(K)){const Ze=ce(a);Ze&&J.push(Ze)}const Ae=b.map(Ze=>({name:Ze.name,path:Ze.path})),Ue=I.map(Ze=>({...Ze}));ur(a,{text:K,imageUrls:[...J],skills:Ae,fileAttachments:Ue,effort:R,collaborationMode:L,fallbackRetried:!1});try{if(Y.value[a]!==!0){const bt=await Yl(a);Bn(a,bt.model)}const Ze=ct(a);let ft="";try{ft=await Ql(a,u,J,Ze||void 0,R||void 0,b.length>0?b:void 0,I,L)}catch(bt){if(Ze&&Ze!==Ar&&ui(bt))await Kt(a),ur(a,{text:K,imageUrls:[...J],skills:Ae,fileAttachments:Ue,effort:R,collaborationMode:L,fallbackRetried:!0}),ft=await Ql(a,u,J,Ar,R||void 0,b.length>0?b:void 0,I,L);else throw bt}ft&&(Te.value={...Te.value,[a]:ft}),Y.value={...Y.value,[a]:!0},te.add(a),V=!0,await Cr(),mn(a)}catch(Ze){throw Ze}}async function ja(a){if(g.value[a]===!0)return;const u=f.value[a];if(!u||u.length===0)return;g.value={...g.value,[a]:!0};const[h,...b]=u;f.value=b.length>0?{...f.value,[a]:b}:pt(f.value,a),Ge.value=!0,G.value="",Lt=!0,Yt(a,null),At(a,{label:"Thinking",details:vr(ct(a),F.value,h.collaborationMode)}),It(a,null),Ct(a,!0);try{fn(h.collaborationMode),await os(a,h.text,h.imageUrls,h.skills,h.fileAttachments)}catch{Ct(a,!1),At(a,null)}finally{g.value=pt(g.value,a),Ge.value=!1}}async function hl(){const a=n.value;if(!a||p.value[a]!==!0||_e.value[a]===!0)return;let u=Te.value[a];if(!u){const{activeTurnId:h}=await Ud(a);u=h,u&&(Te.value={...Te.value,[a]:u})}if(!u)throw new Error("Could not determine active turn id for interrupt");_.value=!0,G.value="";try{await nb(a,u),Ct(a,!1),At(a,null),It(a,null),Te.value[a]&&(Te.value=pt(Te.value,a)),te.add(a),V=!0,await Cr()}catch(h){const b=h instanceof Error?h.message:"Failed to interrupt active turn";It(a,b),G.value=b}finally{_.value=!1}}async function ml(a){var K,J;const u=n.value;if(!u||B.value||!a.trim())return;const h=r.value[u]??[],b=h.find(Ae=>Ae.turnId===a),I=typeof(b==null?void 0:b.turnIndex)=="number"?b.turnIndex:-1;if(I<0)return;const R=h.reduce((Ae,Ue)=>typeof Ue.turnIndex=="number"&&Ue.turnIndex>Ae?Ue.turnIndex:Ae,-1);if(R<0||I>R)return;const L=R-I+1;if(!(L<1)){B.value=!0,G.value="";try{const Ae=((J=(K=Sr.value)==null?void 0:K.cwd)==null?void 0:J.trim())??"";Ae&&await Qw(u,a,Ae);const Ue=await Jl(u,L);en(u,Ue),Rn(u,[]),tt(u),l.value[u]&&(l.value=pt(l.value,u)),Yt(u,null),At(u,null),It(u,null),V=!0,await Cr()}catch(Ae){G.value=Ae instanceof Error?Ae.message:"Failed to rollback thread"}finally{B.value=!1}}}let ss=null;async function Fa(a,u){try{const h=await gs(),b={...h.labels};let I=!1;for(const R of h.order){if(ko(R)!==a)continue;const L=u.trim();L.length===0?b[R]!==void 0&&(delete b[R],I=!0):b[R]!==L&&(b[R]=L,I=!0)}I&&await Xl({order:h.order,labels:b,active:h.active})}catch{}}function vl(a,u){a.length===0||(me.value[a]??"")===u||(me.value={...me.value,[a]:u},au(me.value),ss!==null&&clearTimeout(ss),ss=setTimeout(()=>{ss=null,Fa(a,u)},500))}async function as(a){var R;if(a.length===0)return;const u=ke.value.filter(L=>L!==a);if(Eo(ke.value,u)||(ke.value=u,hs(ke.value)),t.value=t.value.filter(L=>L.projectName!==a),me.value[a]!==void 0){const L={...me.value};delete L[a],me.value=L,au(L)}Nt();const h=fr(e.value);qn(h),h.some(L=>L.id===n.value)||dn(((R=h[0])==null?void 0:R.id)??"");const I=new Set;try{const L=await gs();for(const K of L.order)ko(K)===a&&I.add(K);for(const K of L.active)ko(K)===a&&I.add(K);for(const K of Object.keys(L.labels))ko(K)===a&&I.add(K)}catch{}if(I.size>0)try{const L=await gs(),K=L.order.filter(Ue=>!I.has(Ue)),J=L.active.filter(Ue=>!I.has(Ue)),Ae=J.length===0&&K.length>0?[K[0]]:J;await Xl({order:K,labels:Jx(L.labels,I),active:Ae});return}catch{}await Ws()}function gl(a,u){if(a.length===0||t.value.length===0)return;const h=t.value.map(J=>J.projectName),b=h.indexOf(a);if(b===-1)return;const I=Math.max(0,Math.min(u,h.length-1)),R=Nx(h,b,I);if(R===h)return;const L=li(R,t.value);ke.value=L,hs(ke.value);const K=iu(t.value,ke.value);t.value=di(t.value,K),Nt(),Ws()}function yl(a){const u=a.trim();if(!u)return;const h=[u,...ke.value.filter(I=>I!==u)];if(Eo(ke.value,h))return;ke.value=h,hs(ke.value);const b=iu(t.value,ke.value);t.value=di(t.value,b),Nt(),Ws()}async function Ws(){var a,u;try{const h=await gs(),b=new Map;for(const L of h.order){const K=ko(L);b.has(K)||b.set(K,L)}for(const L of t.value){const K=((u=(a=L.threads[0])==null?void 0:a.cwd)==null?void 0:u.trim())??"";K&&b.set(L.projectName,K)}const I=[];for(const L of ke.value){const K=b.get(L);K&&!I.includes(K)&&I.push(K)}for(const L of h.order)I.includes(L)||I.push(L);const R=h.active.filter(L=>I.includes(L));R.length===0&&I.length>0&&R.push(I[0]),await Xl({order:I,labels:h.labels,active:R})}catch{}}async function Cr(){if(ne.value){typeof window<"u"&&Ee===null&&(Ee=window.setTimeout(()=>{Ee=null,Cr()},ou));return}ne.value=!0;const a=V,u=new Set(te);V=!1,te.clear();try{a&&await Oo();const h=n.value;if(!h)return;const b=u.has(h),I=p.value[h]===!0,R=an(h),L=Ie.value[h]??"";(R.length>0&&R!==L||I&&Oe.value[h]!==!0||b&&Oe.value[h]!==!0||a&&Oe.value[h]!==!0)&&await jr(h,{silent:!0})}catch{}finally{ne.value=!1,(V||te.size>0)&&typeof window<"u"&&Ee===null&&(Ee=window.setTimeout(()=>{Ee=null,Cr()},ou))}}async function wl(){await is(),V=!ee.value,n.value&&Oe.value[n.value]!==!0&&te.add(n.value),await Cr()}function Ba(){typeof window>"u"||oe||(is(),oe=Bw(a=>{if(a.method==="ready"){xn(),wl();return}rl(a),ol(a)}))}async function is(){try{const u=(await Hw()).map(h=>Ut(h)).filter(h=>h!==null);vo(u)}catch{}}async function Ua(a){try{return await qw(a.id,{result:a.result,error:a.error}),Aa(a.id),!0}catch(u){return G.value=u instanceof Error?u.message:"Failed to reply to server request",!1}}function bl(){if(oe&&(oe(),oe=null),V=!1,te.clear(),bn.clear(),Ee!==null&&typeof window<"u"&&(window.clearTimeout(Ee),Ee=null),ye!==null&&typeof window<"u"&&(window.clearTimeout(ye),ye=null),typeof window<"u")for(const a of he.values())window.clearTimeout(a);he.clear(),Lt=!1,r.value={},o.value={},s.value={},i.value={},l.value={},c.value={},ve.value={},Le.value={},Fe.value={},Me.value={},Te.value={},_e.value={},He.value={},Ke.value={},f.value={},g.value={},yt.value=null,Qe.value={}}const qa=re(()=>{const a=n.value;return a?f.value[a]??[]:[]});function Ha(a){const u=n.value;if(!u)return;const h=f.value[u];if(!h)return;const b=h.filter(I=>I.id!==a);f.value=b.length>0?{...f.value,[u]:b}:pt(f.value,u)}function Tl(a){const u=n.value;if(!u)return;const h=f.value[u];if(!h)return;const b=h.find(I=>I.id===a);b&&(Ha(a),fn(b.collaborationMode),Vs(b.text,b.imageUrls,b.skills,"steer",b.fileAttachments))}function _l(a){dn(a)}return{projectGroups:e,projectDisplayNameById:me,selectedThread:Sr,selectedThreadTokenUsage:lr,selectedThreadScrollState:hr,selectedThreadTerminalOpen:et,isSelectedThreadInterruptPending:$t,selectedThreadServerRequests:Tn,selectedLiveOverlay:mr,codexQuota:Qt,selectedThreadId:n,availableCollaborationModes:U,availableModelIds:k,selectedCollaborationMode:q,selectedModelId:P,selectedReasoningEffort:F,selectedSpeedMode:z,installedSkills:Q,accountRateLimitSnapshots:pe,messages:Xt,isLoadingThreads:ge,isLoadingMessages:Pe,isSendingMessage:Ge,isInterruptingTurn:_,isUpdatingSpeedMode:A,isRollingBack:B,error:G,refreshAll:dl,refreshSkills:Hs,selectThread:fl,loadMessages:jr,ensureThreadMessagesLoaded:ul,setThreadScrollState:Wn,setThreadTerminalOpen:cr,toggleSelectedThreadTerminal:zn,archiveThreadById:Da,renameThreadById:La,forkThreadById:Do,forkThreadFromTurn:Na,rollbackSelectedThread:ml,sendMessageToSelectedThread:Vs,sendMessageToNewThread:pl,interruptSelectedThreadTurn:hl,selectedThreadQueuedMessages:qa,removeQueuedMessage:Ha,steerQueuedMessage:Tl,setSelectedCollaborationMode:fn,readModelIdForThread:ct,setSelectedModelIdForThread:Lr,setSelectedModelId:_n,setSelectedReasoningEffort:sn,updateSelectedSpeedMode:kr,respondToPendingServerRequest:Ua,renameProject:vl,removeProject:as,reorderProject:gl,pinProjectToTop:yl,startPolling:Ba,stopPolling:bl,primeSelectedThread:_l}}const o1={class:"sidebar-root"},s1={class:"sidebar-scrollable"},a1=["aria-pressed"],i1={key:1,class:"sidebar-search-bar"},l1={class:"sidebar-settings-account-section"},u1={class:"sidebar-settings-account-header"},c1={class:"sidebar-settings-account-header-main"},d1=["aria-expanded","title"],f1={class:"sidebar-settings-account-collapse-icon"},p1={class:"sidebar-settings-account-count"},h1=["disabled"],m1={key:0,class:"sidebar-settings-account-error"},v1={key:1,class:"sidebar-settings-account-empty"},g1={key:2,class:"sidebar-settings-account-list"},y1=["title","onMouseenter","onMouseleave"],w1={class:"sidebar-settings-account-main"},b1={class:"sidebar-settings-account-email"},T1={class:"sidebar-settings-account-meta"},_1={class:"sidebar-settings-account-quota"},S1={class:"sidebar-settings-account-id"},k1={class:"sidebar-settings-account-actions"},x1=["disabled","onClick"],C1=["disabled","onClick"],A1=["title"],E1=["title"],I1={class:"sidebar-settings-value"},M1=["title"],R1={class:"sidebar-settings-value"},P1=["title"],$1={class:"sidebar-settings-value"},O1=["title"],D1=["title"],L1=["title"],N1={class:"sidebar-settings-row sidebar-settings-row--select",title:"Choose the API provider for the Codex backend"},j1=["value","disabled"],F1={key:0,class:"sidebar-settings-row sidebar-settings-error"},B1={key:1,class:"sidebar-settings-row sidebar-settings-row--input"},U1={class:"sidebar-settings-key-group"},q1={class:"sidebar-settings-key-masked"},H1=["disabled"],V1=["disabled"],W1={class:"sidebar-settings-row sidebar-settings-row--select",style:{"margin-top":"4px",padding:"0"}},z1={class:"sidebar-settings-segmented",role:"group","aria-label":"OpenRouter API format"},G1=["disabled"],K1=["disabled"],Y1={key:2,class:"sidebar-settings-row sidebar-settings-row--input"},J1={class:"sidebar-settings-key-group"},Q1=["disabled"],X1={key:3,class:"sidebar-settings-row sidebar-settings-row--input"},Z1={class:"sidebar-settings-key-group"},eC={class:"sidebar-settings-key-group"},tC=["disabled"],nC={class:"sidebar-settings-row sidebar-settings-row--select",style:{"margin-top":"4px",padding:"0"}},rC={class:"sidebar-settings-segmented",role:"group","aria-label":"Custom endpoint API format"},oC=["title"],sC={class:"sidebar-settings-value"},aC={key:4,class:"sidebar-settings-telegram-panel"},iC={class:"sidebar-settings-field"},lC={class:"sidebar-settings-field"},uC={key:0,class:"sidebar-settings-telegram-error"},cC={class:"sidebar-settings-telegram-actions"},dC=["disabled"],fC=["data-state","title"],pC=["data-state"],hC={class:"sidebar-settings-context-meta"},mC={class:"sidebar-settings-rate-limits"},vC={class:"sidebar-settings-build-label","aria-label":"Worktree name and version"},gC={class:"sidebar-settings-button-version"},yC={key:0,class:"content-keyboard-spacer","aria-hidden":"true"},wC=["aria-pressed","title"],bC={class:"content-header-terminal-shortcut"},TC={class:"content-body"},_C={key:1,class:"content-grid content-grid-home"},SC={class:"new-thread-empty"},kC=["title"],xC=["onKeydown"],CC={class:"new-thread-open-folder-current"},AC=["title"],EC=["disabled"],IC={class:"new-thread-open-folder-actions"},MC={class:"new-thread-open-folder-toggle"},RC=["aria-pressed","disabled"],PC={key:0,class:"new-thread-open-folder-create"},$C={class:"new-thread-open-folder-create-composer"},OC=["onKeydown"],DC=["disabled"],LC={key:0,class:"new-thread-open-folder-error"},NC=["onKeydown"],jC={key:1,class:"new-thread-open-folder-error-actions"},FC={class:"new-thread-open-folder-error"},BC=["disabled"],UC={key:2,class:"new-thread-open-folder-status"},qC={key:3,class:"new-thread-open-folder-status"},HC={key:4,class:"new-thread-open-folder-list"},VC=["title","disabled","onClick"],WC={class:"new-thread-open-folder-item-name"},zC=["disabled","onClick"],GC={key:1,class:"new-thread-branch-select"},KC={class:"new-thread-branch-select-help"},YC={class:"worktree-init-status-title"},JC={class:"worktree-init-status-message"},QC={key:3,class:"new-thread-trending"},XC={class:"new-thread-trending-header"},ZC={key:0,class:"new-thread-trending-empty"},eA={key:1,class:"new-thread-trending-empty"},tA={key:2,class:"new-thread-trending-list"},nA=["onClick"],rA=["title"],oA={class:"new-thread-trending-tip-name-owner"},sA={class:"new-thread-trending-tip-name-repo"},aA={key:1,class:"new-thread-trending-tip-name-repo"},iA={class:"new-thread-trending-tip-meta"},lA={class:"new-thread-trending-tip-description"},uA={class:"composer-with-queue"},cA={key:2,class:"content-grid"},dA={class:"content-thread"},fA={class:"composer-with-queue"},hf="codex-web-local.sidebar-collapsed.v1",mf="codex-web-local.accounts-section-collapsed.v1",vf="codex-web-local.send-with-enter.v1",gf="codex-web-local.in-progress-send-mode.v1",yf="codex-web-local.dark-mode.v1",wf="codex-web-local.dictation-click-to-toggle.v1",bf="codex-web-local.dictation-auto-send.v1",Tf="codex-web-local.dictation-language.v1",_f="codex-web-local.github-trending-projects.v1",Sf="codex-web-local.chat-width.v1",pA=400,hA=In({__name:"App",setup(e){var Tc;const t=ni(()=>oi(()=>import("./ThreadConversation-DgJc2aJG.js"),__vite__mapDeps([0,1]))),n=ni(()=>oi(()=>import("./ThreadTerminalPanel-Dy-oA46U.js"),__vite__mapDeps([2,3]))),r=ni(()=>oi(()=>import("./ReviewPane-D1nOf7-W.js"),__vite__mapDeps([4,5]))),o=ni(()=>oi(()=>import("./SkillsHub-BpqR2Yu5.js"),__vite__mapDeps([6,7]))),s="2c53",i="0.1.84",l={sendWithEnter:"When enabled, press Enter to send. When disabled, use Command+Enter to send.",inProgressSendMode:"If a turn is still running, choose whether a new prompt should steer the current turn or be queued.",appearance:"Switch between system theme, light mode, and dark mode.",chatWidth:"Choose how wide the conversation column and composer can grow on desktop screens.",dictationClickToToggle:"Use click-to-start and click-to-stop dictation instead of hold-to-talk.",dictationAutoSend:"Automatically send transcribed dictation when recording stops.",githubTrendingProjects:"Show or hide GitHub trending project cards on the new thread screen.",dictationLanguage:"Choose transcription language or keep auto-detect."},c={standard:{label:"Standard",columnMax:"45rem",cardMax:"76ch"},wide:{label:"Wide",columnMax:"72rem",cardMax:"88ch"},"extra-wide":{label:"Extra wide",columnMax:"96rem",cardMax:"96ch"}},p={en:"english",zh:"chinese",de:"german",es:"spanish",ru:"russian",ko:"korean",fr:"french",ja:"japanese",pt:"portuguese",tr:"turkish",pl:"polish",ca:"catalan",nl:"dutch",ar:"arabic",sv:"swedish",it:"italian",id:"indonesian",hi:"hindi",fi:"finnish",vi:"vietnamese",he:"hebrew",uk:"ukrainian",el:"greek",ms:"malay",cs:"czech",ro:"romanian",da:"danish",hu:"hungarian",ta:"tamil",no:"norwegian",th:"thai",ur:"urdu",hr:"croatian",bg:"bulgarian",lt:"lithuanian",la:"latin",mi:"maori",ml:"malayalam",cy:"welsh",sk:"slovak",te:"telugu",fa:"persian",lv:"latvian",bn:"bengali",sr:"serbian",az:"azerbaijani",sl:"slovenian",kn:"kannada",et:"estonian",mk:"macedonian",br:"breton",eu:"basque",is:"icelandic",hy:"armenian",ne:"nepali",mn:"mongolian",bs:"bosnian",kk:"kazakh",sq:"albanian",sw:"swahili",gl:"galician",mr:"marathi",pa:"punjabi",si:"sinhala",km:"khmer",sn:"shona",yo:"yoruba",so:"somali",af:"afrikaans",oc:"occitan",ka:"georgian",be:"belarusian",tg:"tajik",sd:"sindhi",gu:"gujarati",am:"amharic",yi:"yiddish",lo:"lao",uz:"uzbek",fo:"faroese",ht:"haitian creole",ps:"pashto",tk:"turkmen",nn:"nynorsk",mt:"maltese",sa:"sanskrit",lb:"luxembourgish",my:"myanmar",bo:"tibetan",tl:"tagalog",mg:"malagasy",as:"assamese",tt:"tatar",haw:"hawaiian",ln:"lingala",ha:"hausa",ba:"bashkir",jw:"javanese",su:"sundanese",yue:"cantonese"},{projectGroups:f,projectDisplayNameById:g,selectedThread:T,selectedThreadTokenUsage:k,selectedThreadScrollState:U,selectedThreadTerminalOpen:H,selectedThreadServerRequests:X,selectedLiveOverlay:q,codexQuota:P,selectedThreadId:F,availableCollaborationModes:z,availableModelIds:de,selectedCollaborationMode:ue,selectedReasoningEffort:we,selectedSpeedMode:ke,installedSkills:me,accountRateLimitSnapshots:Ie,messages:Oe,isLoadingThreads:Y,isLoadingMessages:ve,isSendingMessage:Fe,isInterruptingTurn:Le,isSelectedThreadInterruptPending:Me,isUpdatingSpeedMode:Te,refreshAll:_e,refreshSkills:He,selectThread:Ke,ensureThreadMessagesLoaded:Ve,setThreadScrollState:Ye,setThreadTerminalOpen:yt,toggleSelectedThreadTerminal:Qe,archiveThreadById:xt,forkThreadById:Ne,renameThreadById:Q,forkThreadFromTurn:pe,sendMessageToSelectedThread:ge,sendMessageToNewThread:Pe,interruptSelectedThreadTurn:Ge,selectedThreadQueuedMessages:_,removeQueuedMessage:A,steerQueuedMessage:B,setSelectedCollaborationMode:G,readModelIdForThread:ne,setSelectedModelIdForThread:ee,setSelectedReasoningEffort:le,updateSelectedSpeedMode:fe,respondToPendingServerRequest:ce,renameProject:oe,removeProject:Ee,reorderProject:ye,pinProjectToTop:he,startPolling:De,stopPolling:$,primeSelectedThread:D,rollbackSelectedThread:N}=r1(),V=Hy(),te=qy(),{isMobile:be}=rc(),$e=M(null),st=M(null),ut=M(null),at=M(!1),Pt=M([]),Lt=M(!1),bn=M("trending-daily"),ir=M(null),Dr=M(!1);let Sr=!1;const hr=M(!1),et=M(""),$t=M("local"),Tn=M(""),mr=M([]),Qt=M(!1),lr=M({order:[],labels:{}}),Xt=M({phase:"idle",title:"",message:""}),ct=M(zh()),Bt=M(""),dn=M(!1),Lr=M(null),_n=M(null),Bn=M(null),Kr=M(null),fn=M(null);let Zn=null;const Kt=M("New Project (1)"),ur=M(""),on=M(!1),er=M(Kh()),sn=M(!1),kr=M([]),tr=M(null),vr=M(!1),gr=M(!1),pn=M(null),hn=M([]),Zt=M(!1),mn=M(!1),Un=M(""),vn=M(""),Mn=M(""),gn=M(""),Nt=M(Ja(vf,!0)),nr=M(Ph()),qn=M(Rh()),rr=M($h()),Yt=M(Ja(wf,!1)),Ct=M(Ja(bf,!0)),Sn=M(Vh()),ho=re(()=>Wh()),kn=M(Ja(_f,!1)),Hn=M(!1),Vn=M(!1),qt=M(""),At=M(!1),It=M(null),ht=M(!1),xn=M(""),an=M("codex"),Wn=M(""),cr=M(""),zn=M("responses"),en=M("responses"),Rn=M(""),Nr=M(!1),dr=M(""),xr=M(""),Cn=M(""),E=M(!1),j=M(!1),Z=M(""),Ce=M(""),tt=M(!1),jt=M(!1),Pn=M(null),dt=M(""),Ht=M(""),or=M([]),Mt=M(""),Gn=M(!1),y=M(!1),w=M(!1),C=M(""),W=M({configured:!1,active:!1,mappedChats:0,mappedThreads:0,allowedUsers:0,allowAllUsers:!1,lastError:""}),je=M(null),wt=M(!1),vt=M(!1),sr=M(typeof window<"u"?((Tc=window.visualViewport)==null?void 0:Tc.height)??window.innerHeight:0),yn=M(typeof window<"u"?window.innerHeight:0);let Ut=null,yr=!1,wr=0;const br=re(()=>{const d=V.params.threadId;return typeof d=="string"?d:""}),tn=re(()=>V.name==="home"),mo=re(()=>V.name==="skills"),Hi=re(()=>{var d;return mo.value?"Skills":tn.value?"New thread":((d=T.value)==null?void 0:d.title)??"Choose a thread"}),Vi=typeof window<"u"&&(window.location.hostname||window.location.host)||"codexui",Wi=re(()=>{var m,x;return(((x=(m=T.value)==null?void 0:m.title)==null?void 0:x.trim())??"")||Vi}),es=re(()=>Oe.value.filter(d=>{const m=Jh(d.messageType,d.role);return m==="worked"?!0:!(m==="turnActivity.live"||m==="turnError.live"||m==="agentReasoning.live")})),Aa=re(()=>q.value),vo=re(()=>tn.value?"__new-thread__":F.value),Ea=re(()=>ne(vo.value)),Os=re(()=>{const d=X.value;return d.length>0?d[d.length-1]:null}),$n=re(()=>{var d,m;return tn.value?et.value.trim():((m=(d=T.value)==null?void 0:d.cwd)==null?void 0:m.trim())??""}),zi=re(()=>tn.value&&$n.value.length>0||V.name==="thread"&&F.value.length>0),Gi=re(()=>tn.value?at.value:H.value),Ds=re(()=>!be.value||sr.value<=0||yn.value<=0?!1:yn.value-sr.value>120),Ls=re(()=>{var d;return!tn.value&&((d=T.value)==null?void 0:d.inProgress)===!0}),Ki=re(()=>!tn.value&&!mo.value&&F.value.trim().length>0),Ns=re(()=>Fe.value||Le.value||Ls.value||X.value.length>0);function ts(d){return Number.isFinite(d)?new Intl.NumberFormat("en-US",{notation:d>=1e3?"compact":"standard",maximumFractionDigits:d>=1e5?0:1}).format(Math.max(0,Math.trunc(d))):"0"}function Yi(d){if(!d)return"Waiting for Codex thread/tokenUsage/updated events for this thread.";const m=[`Current context usage: ${d.currentContextTokens.toLocaleString()} tokens`,`Cumulative thread usage: ${d.total.totalTokens.toLocaleString()} tokens`];return typeof d.modelContextWindow=="number"?(m.unshift(`Model context window: ${d.modelContextWindow.toLocaleString()} tokens`),m.push(`Remaining context: ${(d.remainingContextTokens??0).toLocaleString()} tokens`)):m.push("Model context window is unavailable in the latest usage event."),m.join(`
57
- `)}const Ia=re(()=>{var m;const d=(m=k.value)==null?void 0:m.remainingContextPercent;return d===null||typeof d!="number"?"pending":d<=10?"danger":d<=25?"warning":"ok"}),Ji=re(()=>{const d=k.value;return d?typeof d.remainingContextTokens=="number"?`${ts(d.remainingContextTokens)} left`:`${ts(d.currentContextTokens)} used`:"Awaiting data"}),Qi=re(()=>{const d=k.value;return d?typeof d.modelContextWindow=="number"?`${ts(d.currentContextTokens)} used / ${ts(d.modelContextWindow)}`:"Window size unavailable":"Updates after the next token usage event"}),Xi=re(()=>Yi(k.value)),js=re(()=>{var se,Se;const d=[],m=new Set;for(const xe of lr.value.order){const nt=xe.trim();!nt||m.has(nt)||(m.add(nt),d.push({value:nt,label:lr.value.labels[nt]||Wo(nt)}))}for(const xe of f.value){const nt=((Se=(se=xe.threads[0])==null?void 0:se.cwd)==null?void 0:Se.trim())??"";!nt||m.has(nt)||(m.add(nt),d.push({value:nt,label:g.value[xe.projectName]??xe.projectName}))}const x=et.value.trim();return x&&!m.has(x)&&d.unshift({value:x,label:Wo(x)}),d}),Fs=re(()=>{const d=Tn.value.trim(),m=[...mr.value];return d&&!m.some(x=>x.value===d)&&m.unshift({value:d,label:d}),m}),Ma=re(()=>{const d=Tn.value.trim();if(!d)return"";const m=Fs.value.find(x=>x.value===d);return(m==null?void 0:m.label)??d}),Zi=re(()=>tr.value??"__detached_head__"),el=re(()=>{var se;const d=[{value:"__review__",label:sn.value?"Review (Open)":"Review"}],m=new Set,x=((se=tr.value)==null?void 0:se.trim())??"";x?(d.push({value:x,label:x}),m.add(x)):(d.push({value:"__detached_head__",label:"Detached HEAD"}),m.add("__detached_head__"));for(const Se of kr.value)!Se.value||m.has(Se.value)||(m.add(Se.value),d.push(Se));return d}),Ra=re(()=>dt.value.trim()),Pa=re(()=>{const d=Z.value.trim();return!d||d==="."||d===".."?!1:!/[\\/]/u.test(d)}),tl=re(()=>Pa.value&&Ra.value.trim().length>0&&!Mt.value),nl=re(()=>tt.value?"Creating…":"Create"),Bs=re(()=>{const d=dt.value.trim(),m=Ht.value.trim();return!!(d&&m&&d!==m)}),$a=re(()=>{const d=[];Bs.value&&d.push({key:`parent:${Ht.value}`,name:"..",path:Ht.value,kind:"parent"});for(const m of or.value)d.push({key:`directory:${m.path}`,name:m.name,path:m.path,kind:"directory"});return d}),Us=re(()=>{const d=C.value.trim().toLowerCase();return d?$a.value.filter(m=>m.kind==="parent"||m.name.toLowerCase().includes(d)):$a.value}),go=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)"):null,rl=re(()=>[{value:"search-daily",label:"Search daily"},{value:"search-weekly",label:"Search weekly"},{value:"search-monthly",label:"Search monthly"},{value:"trending-daily",label:"Trending daily"},{value:"trending-weekly",label:"Trending weekly"},{value:"trending-monthly",label:"Trending monthly"}]),ol=re(()=>c[rr.value].label),Oa=re(()=>typeof navigator<"u"&&/mac|iphone|ipad|ipod/i.test(navigator.platform)?"⌘J":"Ctrl+J"),sl=re(()=>{const d=c[rr.value];return{"--chat-column-max":d.columnMax,"--chat-card-max":d.cardMax,"--visual-viewport-height":sr.value>0?`${sr.value}px`:"100dvh"}}),al=re(()=>{if(!W.value.configured)return"Not configured";const d=W.value.active?"Online":"Configured (offline)",m=W.value.allowAllUsers?"allow all users":`${W.value.allowedUsers} allowed user(s)`,x=`${W.value.mappedChats} chat(s), ${W.value.mappedThreads} thread(s), ${m}`,se=W.value.lastError?`, error: ${W.value.lastError}`:"";return`${d}, ${x}${se}`});$o(()=>{var d,m;document.addEventListener("pointerdown",J),window.addEventListener("keydown",L),document.addEventListener("visibilitychange",Ue),window.addEventListener("pageshow",Ze),window.addEventListener("focus",ft),window.addEventListener("resize",Yr),(d=window.visualViewport)==null||d.addEventListener("resize",Yr),(m=window.visualViewport)==null||m.addEventListener("scroll",Yr),Yr(),Qa(),go==null||go.addEventListener("change",Qa),Qh(),kh(),us(),bo(),qs(),ns(),Al(),kn.value&&kl()}),Di(()=>{var d,m;document.removeEventListener("pointerdown",J),window.removeEventListener("keydown",L),document.removeEventListener("visibilitychange",Ue),window.removeEventListener("pageshow",Ze),window.removeEventListener("focus",ft),window.removeEventListener("resize",Yr),(d=window.visualViewport)==null||d.removeEventListener("resize",Yr),(m=window.visualViewport)==null||m.removeEventListener("scroll",Yr),go==null||go.removeEventListener("change",Qa),Ut!==null&&(window.clearInterval(Ut),Ut=null),Zn&&(clearTimeout(Zn),Zn=null),$()});function Yr(){var d;typeof window>"u"||(yn.value=window.innerHeight,sr.value=((d=window.visualViewport)==null?void 0:d.height)??window.innerHeight)}it(Bt,d=>{const m=d.trim();if(Zn&&(clearTimeout(Zn),Zn=null),!m){fn.value=null;return}Zn=setTimeout(()=>{vb(m,1e3).then(x=>{Bt.value.trim()===m&&(fn.value=x.threadIds)}).catch(()=>{Bt.value.trim()===m&&(fn.value=null)})},220)}),it(hn,()=>{if(typeof window>"u")return;if(!hn.value.some(m=>m.quotaStatus==="loading")){Ut!==null&&(window.clearInterval(Ut),Ut=null);return}Ut===null&&(Ut=window.setInterval(()=>{yr||(yr=!0,as({silent:!0}).finally(()=>{yr=!1}))},1500))},{deep:!0});function il(){He()}async function ns(){try{W.value=await wb()}catch(d){const m=d instanceof Error?d.message:"Failed to load Telegram status";W.value={configured:!1,active:!1,mappedChats:0,mappedThreads:0,allowedUsers:0,allowAllUsers:!1,lastError:m}}}async function qs(){try{const d=await yb();dr.value=d.botToken,xr.value=d.allowedUserIds.map(m=>String(m)).join(`
58
- `),Cn.value=""}catch(d){Cn.value=d instanceof Error?d.message:"Failed to load Telegram configuration"}}function ll(d){const m=d.split(/[\n,]/).map(Se=>Se.trim().replace(/^(telegram|tg):/i,"").trim()).filter(Boolean),x=m.includes("*"),se=Array.from(new Set(m.filter(Se=>/^-?\d+$/.test(Se)).map(Se=>Number.parseInt(Se,10))));return x?["*",...se]:se}async function Oo(){const d=dr.value.trim(),m=ll(xr.value);if(!d){Cn.value="Telegram bot token is required.";return}if(m.length===0){Cn.value="At least one allowed Telegram user ID or * is required.";return}E.value=!0,Cn.value="";try{await gb(d,m),xr.value=m.map(x=>String(x)).join(`
59
- `),await Promise.all([qs(),ns()]),window.alert("Telegram bot configured. Only allowlisted Telegram users can use the bridge.")}catch(x){Cn.value=x instanceof Error?x.message:"Failed to connect Telegram bot",ns()}finally{E.value=!1}}function jr(){dn.value=!dn.value,dn.value?Gt(()=>{var d;return(d=Lr.value)==null?void 0:d.focus()}):Bt.value=""}function ul(){var d;Bt.value="",(d=Lr.value)==null||d.focus()}function Hs(d){d.key==="Escape"&&(dn.value=!1,Bt.value="")}function cl(d){d&&(V.name==="thread"&&br.value===d||(te.push({name:"thread",params:{threadId:d}}),be.value&&R(!0)))}async function dl(d){d&&(F.value!==d&&(await Ke(d),await te.push({name:"thread",params:{threadId:d}})),await Gt(),Ah())}function fl(d){return d.length>8?d.slice(-8):d}function Da(d){const m=[d.planType||"unknown"];return d.authMode&&m.unshift(d.authMode),m.join(" · ")}function La(d){if(!d)return!1;const m=d.toLowerCase();return m.includes("payment required")||/\b402\b/.test(m)}function Do(d){return d.unavailableReason==="payment_required"||La(d.quotaError)}function Na(d){return Zt.value||mn.value||Un.value.length>0||d.isActive&&Un.value!==d.accountId&&Ns.value}function rs(d){return vn.value===d.accountId}function Vs(d){return Mn.value===d.accountId||rs(d)}function pl(d){return Do(d)?"Unavailable":d.isActive?"Active":mn.value?"Switching…":"Switch"}function os(d){return Un.value===d.accountId?"Removing…":rs(d)?"Click again to remove":"Remove"}function ja(d){Mn.value=d}function hl(d){Mn.value===d&&(Mn.value=""),Un.value!==d&&vn.value===d&&(vn.value="")}function ml(d){const m=d.quotaSnapshot;if(!m)return null;const x=[m==null?void 0:m.primary,m==null?void 0:m.secondary].filter(xe=>xe!==null),se=x.find(xe=>xe.windowMinutes===10080);if(se)return se;const Se=x.filter(xe=>typeof xe.windowMinutes=="number"&&xe.windowMinutes>=10080).sort((xe,nt)=>(xe.windowMinutes??0)-(nt.windowMinutes??0))[0]??null;return Se||(m.secondary??null)}function ss(d){if(typeof d!="number"||!Number.isFinite(d))return"";const m=new Date(d*1e3);return`${m.getMonth()+1}月${m.getDate()}日`}function Fa(d){var xe,nt;if(Do(d))return d.quotaError||"402 Payment Required";const m=d.quotaSnapshot,x=ml(d),se=(m==null?void 0:m.primary)??(m==null?void 0:m.secondary)??null,Se=x??se;if(Se){const On=Math.max(0,Math.min(100,100-Math.round(Se.usedPercent))),Fr=ss(Se.resetsAt);return Fr?`${On}% weekly remaining · ${Fr}`:`${On}% weekly remaining`}return(xe=m==null?void 0:m.credits)!=null&&xe.unlimited?"Unlimited credits":(nt=m==null?void 0:m.credits)!=null&&nt.hasCredits&&m.credits.balance?`${m.credits.balance} credits`:d.quotaStatus==="loading"?"Loading quota…":d.quotaStatus==="error"?d.quotaError||"Quota unavailable":d.quotaStatus==="ready"||d.quotaStatus==="idle"?"Quota unavailable":"Fetching account details…"}function vl(d){return[d.email||"Account",Da(d),Do(d)?"Unavailable account":null,Fa(d),`Workspace ${d.accountId}`].filter(Boolean).join(`
60
- `)}async function as(d={}){try{const m=await Ww();hn.value=m.accounts,m.accounts.some(x=>x.accountId===Mn.value)||(Mn.value=""),m.accounts.some(x=>x.accountId===vn.value)||(vn.value="")}catch(m){if(d.silent===!0)return;gn.value=m instanceof Error?m.message:"Failed to load accounts"}}async function gl(){if(!(Zt.value||mn.value)){gn.value="",Mn.value="",vn.value="",Zt.value=!0;try{const d=await zw();hn.value=d.accounts,$(),De(),_e({includeSelectedThreadMessages:!0})}catch(d){gn.value=d instanceof Error?d.message:"Failed to refresh accounts"}finally{Zt.value=!1}}}async function yl(d){if(!(mn.value||Zt.value)){if(Ns.value){gn.value="Finish the current turn and pending requests before switching accounts.";return}gn.value="",Mn.value="",vn.value="",mn.value=!0;try{const m=await Gw(d);hn.value=hn.value.map(x=>x.accountId===d?m:{...x,isActive:!1}),$(),De(),_e({includeSelectedThreadMessages:!0}),as({silent:!0})}catch(m){gn.value=m instanceof Error?m.message:"Failed to switch account"}finally{mn.value=!1}}}async function Ws(d){if(Zt.value||mn.value||Un.value.length>0)return;const m=hn.value.find(se=>se.accountId===d)??null;if(!m)return;if(vn.value!==d){vn.value=d;return}if(m.isActive&&Ns.value){gn.value="Finish the current turn and pending requests before removing the active account.";return}const x=m.isActive;gn.value="",vn.value="",Un.value=d;try{const se=await Kw(d);hn.value=se.accounts,$(),De(),x&&_e({includeSelectedThreadMessages:!0}),as({silent:!0})}catch(se){gn.value=se instanceof Error?se.message:"Failed to remove account"}finally{Un.value=""}}function Cr(d){xt(d)}async function wl(d){const m=await Ne(d);m&&(tn.value?await te.replace({name:"thread",params:{threadId:m}}):await te.push({name:"thread",params:{threadId:m}}),be.value&&R(!0))}function Ba(d){const m=d.trim().replace(/\\/gu,"/");return m?m.includes("/.codex/worktrees/")||m.includes("/.git/worktrees/"):!1}function is(d,m=""){var xe,nt,On;const x=f.value.find(Fr=>Fr.projectName===d);if(!x)return m.trim();const se=x.threads.find(Fr=>!Ba(Fr.cwd));return(((xe=se==null?void 0:se.cwd)==null?void 0:xe.trim())??((On=(nt=x.threads[0])==null?void 0:nt.cwd)==null?void 0:On.trim())??"")||m.trim()}function Ua(d){var se,Se;const m=f.value.find(xe=>xe.projectName===d),x=is(d,((Se=(se=m==null?void 0:m.threads[0])==null?void 0:se.cwd)==null?void 0:Se.trim())??"");x&&(et.value=x),be.value&&R(!0),!tn.value&&te.push({name:"home"})}function bl(d){var x;let m="";for(const se of f.value){const Se=se.threads.find(xe=>xe.id===d);if((x=Se==null?void 0:Se.cwd)!=null&&x.trim()){m=Se.cwd.trim();break}}!m||typeof window>"u"||window.open(`/codex-local-browse${encodeURI(m)}`,"_blank","noopener,noreferrer")}function qa(){var x;const d=T.value,m=d?is(d.projectName,((x=d.cwd)==null?void 0:x.trim())??""):"";m&&(et.value=m),be.value&&R(!0),!tn.value&&te.push({name:"home"})}function Ha(d){oe(d.projectName,d.displayName)}function Tl(d){Q(d.threadId,d.title)}async function _l(d){await Ee(d),await us(),bo()}function a(d){ye(d.projectName,d.toIndex)}function u(d){Ye(d.threadId,d.state)}function h(d){b(d)}async function b(d){var se;const m=await ce(d),x=((se=d.followUpMessageText)==null?void 0:se.trim())??"";if(!(!m||!x||tn.value))try{await ge(x,[],[],"steer",[])}catch{}}async function I(d){const m=await pe(d.threadId,d.turnIndex);m&&(await te.push({name:"thread",params:{threadId:m}}),F.value!==m&&await Ke(m),be.value&&R(!0))}function R(d){ct.value!==d&&(ct.value=d,Gh(d))}function L(d){if(d.defaultPrevented)return;if(d.key==="Escape"&&on.value){on.value=!1;return}if(!d.ctrlKey&&!d.metaKey||d.shiftKey||d.altKey)return;const m=d.key.toLowerCase();if(m==="b"){d.preventDefault(),R(!ct.value);return}if(m==="j"&&V.name==="thread"&&F.value){d.preventDefault(),K();return}m==="j"&&tn.value&&$n.value&&(d.preventDefault(),K())}function K(){if(tn.value){if(!$n.value)return;at.value=!at.value;return}Qe()}function J(d){var x,se;if(!on.value)return;const m=d.target;m instanceof Node&&((x=Bn.value)!=null&&x.contains(m)||(se=Kr.value)!=null&&se.contains(m)||(on.value=!1))}function Ae(d){var x,se;if(!on.value)return;const m=d.target;m instanceof Node&&((x=Bn.value)!=null&&x.contains(m)||(se=Kr.value)!=null&&se.contains(m)||(on.value=!1))}function Ue(){if(!(typeof document>"u")&&be.value){if(document.visibilityState==="hidden"){je.value=Date.now(),wt.value=!1;return}bt()}}function Ze(d){d.persisted&&bt()}function ft(){V.name==="home"&&(us(),bo()),bt()}function bt(){typeof window>"u"||typeof document>"u"||!be.value||document.visibilityState!=="visible"||wt.value||je.value===null||Date.now()-je.value<pA||(wt.value=!0,je.value=null,yo())}async function yo(){if(!vt.value){vt.value=!0;try{await _e({includeSelectedThreadMessages:!0,awaitAncillaryRefreshes:!0}),await Il()}finally{vt.value=!1}}}function wo(d){const m=d.text;jo();const x=ir.value,se=d.mode==="queue"&&x&&x.threadId===F.value?x.queueIndex:void 0;if(ir.value=null,tn.value){Xh(m,d.imageUrls,d.skills,d.fileAttachments);return}ge(m,d.imageUrls,d.skills,d.mode,d.fileAttachments,se)}function ls(d){const m=new Intl.NumberFormat().format(d.stars);return d.language?`${d.language} · ★ ${m}`:`★ ${m}`}function Va(d){const x=new Set(["search-daily","search-weekly","search-monthly","trending-daily","trending-weekly","trending-monthly"]).has(d)?d:"trending-daily";bn.value!==x&&(bn.value=x)}function Lo(d){const m=$e.value;m&&m.hydrateDraft({text:`Clone this GitHub project and run it: ${d.url}
61
- Then explain what this project does in very simple words a 5th grader can understand.`,imageUrls:[],fileAttachments:[],skills:[]})}function No(d){const m=_.value.findIndex(xe=>xe.id===d),x=m>=0?_.value[m]:void 0,se=st.value;if(!x||!se||se.hasUnsavedDraft()&&!window.confirm("Replace the current draft with this queued message for editing?"))return;ir.value=F.value?{threadId:F.value,queueIndex:m}:null;const Se={text:x.text,imageUrls:[...x.imageUrls],fileAttachments:x.fileAttachments.map(xe=>({...xe})),skills:x.skills.map(xe=>({...xe}))};se.hydrateDraft(Se),A(d)}function jo(){if(!be.value||tn.value)return;const d=()=>{var m;(m=ut.value)==null||m.jumpToLatest()};d(),Gt(()=>{d(),!(typeof window>"u")&&window.requestAnimationFrame(()=>{d(),window.requestAnimationFrame(d)})})}function Wa(d){et.value=d.trim(),Ce.value=""}function za(d){Tn.value=d.trim()}async function zs(d){const m=d.trim();if(!m||V.name!=="thread"){kr.value=[],tr.value=null;return}vr.value=!0;try{const x=await cb(m);kr.value=x.options,tr.value=x.currentBranch}catch{kr.value=[],tr.value=null}finally{vr.value=!1}}function Ga(d){if(d==="__review__"){sn.value=!sn.value;return}if(d==="__detached_head__"||gr.value)return;const m=d.trim();if(!m||m===(tr.value??""))return;const x=$n.value.trim();x&&(gr.value=!0,db(x,m).then(se=>(tr.value=se||m,sn.value=!1,zs(x))).catch(se=>{const Se=se instanceof Error?se.message:"Failed to switch branch";window.alert(Se)}).finally(()=>{gr.value=!1}))}async function Ka(){const d=await Sl();if(!d)return;await bo();const m=Kt.value.trim()||"New Project (1)",x=window.prompt(`Create project in ${d}`,m);if(x===null)return;const se=x.trim();if(!se)return;const Se=fc(dc(d,se));if(Se)try{const xe=await Zl(Se,{createIfMissing:!0,label:""});if(!xe)return;et.value=xe,he(Wo(xe)),await us(),await bo()}catch(xe){const nt=xe instanceof Error?xe.message:"Failed to create the project.";window.alert(nt)}}async function Ya(){const d=et.value.trim()||await Sl();d&&(j.value=!1,jt.value=!0,C.value="",await cs(d),Mt.value||Gt(()=>{var m;return(m=Pn.value)==null?void 0:m.focus()}))}function We(){wr+=1,jt.value=!1,Gn.value=!1,Mt.value="",C.value="",Gs()}async function ar(d){!d||Gn.value||(C.value="",await cs(d))}function Jr(){const d=dt.value.trim();!jt.value||!d||cs(d)}function Th(){const d=dt.value.trim();!jt.value||!d||Gn.value||cs(d)}async function lc(d=dt.value){const m=d.trim();if(m){Mt.value="",y.value=!0;try{const x=await Zl(m,{createIfMissing:!1,label:""});if(!x){Mt.value="Failed to open the selected folder.";return}et.value=x,he(Wo(x)),await us(),await bo(),We()}catch(x){Mt.value=x instanceof Error?x.message:"Failed to open the selected folder."}finally{y.value=!1}}}async function _h(){if(Ce.value="",j.value){Gs();return}if(!jt.value){const d=et.value.trim()||await Sl();if(!d||(jt.value=!0,C.value="",await cs(d),Mt.value))return}Mt.value||(Z.value=Kt.value,j.value=!0,Gt(()=>{var d;return(d=pn.value)==null?void 0:d.focus()}))}function Gs(){Ce.value="",Z.value="",j.value=!1}async function uc(){const d=Z.value.trim();if(!d)return;if(Ce.value="",Mt.value){Ce.value="Reload the current folder before creating a new one.";return}tt.value=!0;const m=Ra.value.trim(),x=fc(dc(m,d));if(!x){Ce.value="Unable to determine where the new folder should be created.",tt.value=!1;return}if(!Pa.value){Ce.value="Enter a single folder name.",tt.value=!1;return}try{const se=await pb(x);if(!se){Ce.value="Failed to create the folder.";return}Ce.value="",C.value="",await cs(se),Gs()}catch(se){Ce.value=se instanceof Error?se.message:"Failed to create folder."}finally{tt.value=!1}}async function Sh(){var m;if(typeof window>"u")return!1;const d=((m=new URLSearchParams(window.location.search).get("openProjectPath"))==null?void 0:m.trim())??"";if(!d)return!1;try{const x=await Zl(d,{createIfMissing:!1,label:""});if(!x)return!1;et.value=x,he(Wo(x)),await te.replace({name:"home"}),await us();const se=new URL(window.location.href);return se.searchParams.delete("openProjectPath"),window.history.replaceState({},"",se.toString()),!0}catch{return!1}}async function Sl(){const d=cc();if(d)return d;try{const m=await Yd();if(m)return ur.value=m,m}catch{}return""}async function bo(){const d=cc();if(!d){Kt.value="New Project (1)";return}try{const m=await hb(d);Kt.value=m.name||"New Project (1)"}catch{Kt.value="New Project (1)"}}function cc(){var x,se;const d=et.value.trim();if(d)return zl(d);const m=((se=(x=js.value[0])==null?void 0:x.value)==null?void 0:se.trim())??"";return m?zl(m):ur.value.trim()}async function kh(){try{ur.value=await Yd()}catch{ur.value=""}}async function us(){try{const d=await gs();lr.value={order:[...d.order],labels:{...d.labels}}}catch{lr.value={order:[],labels:{}}}}async function cs(d){const m=++wr;dt.value=Jt(d).trim(),Mt.value="",Gn.value=!0;try{const x=await fb(d,{showHidden:w.value});if(m!==wr)return;dt.value=x.path,Ht.value=x.parentPath,or.value=x.entries}catch(x){if(m!==wr)return;Mt.value=x instanceof Error?x.message:"Failed to load local folders.",Ht.value=zl(dt.value),or.value=[],Gs()}finally{m===wr&&(Gn.value=!1)}}async function kl(){Lt.value=!0;try{Pt.value=await Tb(bn.value,6)}catch{Pt.value=[]}finally{Lt.value=!1}}function dc(d,m){const x=Jt(d).trim(),se=Jt(m).trim().replace(/^[\\/]+/u,"");if(!x||!se)return"";const Se=x.includes("\\")&&!x.includes("/")?"\\":"/";if(/^[a-zA-Z]:[\\/]?$/u.test(x))return`${x.slice(0,2)}${Se}${se}`;if(/^\/+$/u.test(x))return`/${se}`;const xe=x.replace(/[\\/]+$/u,"");return xe?`${xe}${Se}${se}`:""}function fc(d){const m=Jt(d).trim();if(!m)return"";const x=m.match(/^\\\\([^\\/]+)[\\/]+([^\\/]+)([\\/].*)?$/u);if(x){const[,Se,xe,nt=""]=x,On=xl(nt.split(/[\\/]+/u));return On.length>0?`\\\\${Se}\\${xe}\\${On.join("\\")}`:`\\\\${Se}\\${xe}`}const se=m.match(/^([a-zA-Z]:)([\\/].*)?$/u);if(se){const[,Se,xe=""]=se,nt=m.includes("\\")&&!m.includes("/")?"\\":"/",On=xl(xe.split(/[\\/]+/u));return On.length>0?`${Se}${nt}${On.join(nt)}`:`${Se}${nt}`}if(m.startsWith("/")){const Se=xl(m.split("/"));return Se.length>0?`/${Se.join("/")}`:"/"}return m}function xl(d){const m=[];for(const x of d){const se=x.trim();if(!(!se||se===".")){if(se===".."){m.length>0&&m.pop();continue}m.push(se)}}return m}function pc(d){ee(vo.value,d)}function hc(d){le(d)}function mc(d){fe(d)}function xh(){Ge()}function Ch(d){const m=d.turnId.trim();if(m.length>0){const x=[...es.value].reverse().find(se=>{var Se;return se.role==="user"&&(((Se=se.turnId)==null?void 0:Se.trim())??"")===m&&se.text.trim().length>0});x!=null&&x.text&&st.value&&st.value.appendTextToDraft(x.text)}N(d.turnId)}function Ah(){if(tn.value||mo.value||typeof document>"u"||!T.value||es.value.length===0)return;const d=Eh(),m=Ih(),x=new Blob([d],{type:"text/markdown;charset=utf-8"}),se=URL.createObjectURL(x),Se=document.createElement("a");Se.href=se,Se.download=m,document.body.appendChild(Se),Se.click(),document.body.removeChild(Se),window.setTimeout(()=>URL.revokeObjectURL(se),0)}function Eh(){var x,se,Se;const d=[],m=((se=(x=T.value)==null?void 0:x.title)==null?void 0:se.trim())||"Untitled thread";d.push(`# ${Mh(m)}`),d.push(""),d.push(`- Exported: ${new Date().toISOString()}`),d.push(`- Thread ID: ${((Se=T.value)==null?void 0:Se.id)??""}`),d.push(""),d.push("---"),d.push("");for(const xe of es.value){const nt=xe.role?xe.role.toUpperCase():"MESSAGE";d.push(`## ${nt}`),d.push("");const On=xe.text.trim();if(On&&(d.push(On),d.push("")),xe.commandExecution&&(d.push("```text"),d.push(`command: ${xe.commandExecution.command}`),d.push(`status: ${xe.commandExecution.status}`),xe.commandExecution.cwd&&d.push(`cwd: ${xe.commandExecution.cwd}`),xe.commandExecution.exitCode!==null&&d.push(`exitCode: ${xe.commandExecution.exitCode}`),d.push(xe.commandExecution.aggregatedOutput||"(no output)"),d.push("```"),d.push("")),xe.fileAttachments&&xe.fileAttachments.length>0){d.push("Attachments:");for(const Fr of xe.fileAttachments)d.push(`- ${Fr.path}`);d.push("")}if(xe.images&&xe.images.length>0){d.push("Images:");for(const Fr of xe.images)d.push(`- ${Fr}`);d.push("")}}return`${d.join(`
62
- `).trimEnd()}
63
- `}function Ih(){var Se,xe;const x=(((xe=(Se=T.value)==null?void 0:Se.title)==null?void 0:xe.trim())||"chat").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"chat",se=new Date().toISOString().replace(/[:.]/g,"-");return`${x}-${se}.md`}function Mh(d){return d.replace(/([\\`*_{}\[\]()#+\-.!])/g,"\\$1")}function Ja(d,m){if(typeof window>"u")return m;const x=window.localStorage.getItem(d);return x===null?m:x==="1"}function Rh(){if(typeof window>"u")return"system";const d=window.localStorage.getItem(yf);return d==="light"||d==="dark"?d:"system"}function Ph(){return typeof window>"u"?"steer":window.localStorage.getItem(gf)==="queue"?"queue":"steer"}function $h(){if(typeof window>"u")return"standard";const d=window.localStorage.getItem(Sf);return d==="standard"||d==="wide"||d==="extra-wide"?d:"standard"}function Oh(){Nt.value=!Nt.value,window.localStorage.setItem(vf,Nt.value?"1":"0")}function Dh(){nr.value=nr.value==="steer"?"queue":"steer",window.localStorage.setItem(gf,nr.value)}function Lh(){const d=["system","light","dark"],m=d.indexOf(qn.value);qn.value=d[(m+1)%d.length],window.localStorage.setItem(yf,qn.value),Qa()}function Nh(){const d=["standard","wide","extra-wide"],m=d.indexOf(rr.value);rr.value=d[(m+1)%d.length],window.localStorage.setItem(Sf,rr.value)}function jh(){Yt.value=!Yt.value,window.localStorage.setItem(wf,Yt.value?"1":"0")}function Fh(){Ct.value=!Ct.value,window.localStorage.setItem(bf,Ct.value?"1":"0")}function Bh(){kn.value=!kn.value,window.localStorage.setItem(_f,kn.value?"1":"0")}async function Uh(d){if(!Vn.value){Vn.value=!0;try{if(d==="codex"){an.value="codex";const m=await Gd(!1);Hn.value=m.enabled}else if(d==="openrouter"){an.value="openrouter";const m=await Gd(!0);Hn.value=m.enabled,await fs("","",{wireApi:en.value,provider:"openrouter"})}else d==="opencode-zen"?(an.value="opencode-zen",await fs("",Rn.value.trim(),{wireApi:"chat",provider:"opencode-zen"}),Hn.value=!0):d==="custom"&&(an.value="custom",Wn.value.trim()&&cr.value.trim()&&(await fs(Wn.value.trim(),cr.value.trim(),{wireApi:zn.value}),Hn.value=!0));xn.value="",await _e({includeSelectedThreadMessages:!1,providerChanged:!0,awaitAncillaryRefreshes:!0}),V.name==="thread"&&te.push({name:"home"})}catch(m){xn.value=m instanceof Error?m.message:"Failed to switch provider"}finally{Vn.value=!1}}}async function Cl(){if(ht.value)return;const d=Wn.value.trim();if(d){ht.value=!0;try{xn.value="",await fs(d,cr.value.trim(),{wireApi:zn.value}),Hn.value=!0,await _e({includeSelectedThreadMessages:!1,providerChanged:!0,awaitAncillaryRefreshes:!0})}catch(m){xn.value=m instanceof Error?m.message:"Failed to save custom endpoint"}finally{ht.value=!1}}}async function vc(d){if(ht.value||Vn.value||en.value===d)return;const m=en.value;en.value=d,ht.value=!0;try{xn.value="",await fs("","",{wireApi:d,provider:"openrouter"}),Hn.value=!0,await _e({includeSelectedThreadMessages:!1,providerChanged:!0,awaitAncillaryRefreshes:!0})}catch(x){en.value=m,xn.value=x instanceof Error?x.message:"Failed to save OpenRouter API format"}finally{ht.value=!1}}async function gc(){if(ht.value)return;const d=Rn.value.trim();if(d){ht.value=!0;try{xn.value="",await fs("",d,{wireApi:"chat",provider:"opencode-zen"}),Hn.value=!0,await _e({includeSelectedThreadMessages:!1,providerChanged:!0,awaitAncillaryRefreshes:!0})}catch(m){xn.value=m instanceof Error?m.message:"Failed to save OpenCode Zen config"}finally{ht.value=!1}}}async function yc(){if(!ht.value){ht.value=!0;try{const d=qt.value.trim();await Kd(d),qt.value="",await Al(),await _e({includeSelectedThreadMessages:!1})}catch{}finally{ht.value=!1}}}async function qh(){if(!ht.value){ht.value=!0;try{await Kd(""),qt.value="",await Al(),await _e({includeSelectedThreadMessages:!1})}catch{}finally{ht.value=!1}}}async function Al(){try{const d=await ob();Hn.value=d.enabled,At.value=d.customKey??!1,It.value=d.maskedKey??null,d.enabled?d.provider==="opencode-zen"?an.value="opencode-zen":d.provider==="custom"?(an.value="custom",Wn.value=d.customBaseUrl??"",zn.value=d.wireApi==="chat"?"chat":"responses"):(an.value="openrouter",en.value=d.wireApi==="chat"?"chat":"responses"):an.value="codex"}catch{}}function Hh(d){const x=El(d.trim())||"auto";Sn.value=x,window.localStorage.setItem(Tf,x)}function Vh(){var x;if(typeof window>"u")return"auto";const d=((x=window.localStorage.getItem(Tf))==null?void 0:x.trim())||"auto";return El(d)||"auto"}function Wh(){const d=[{value:"auto",label:"Auto-detect"}],m=new Set(["auto"]);function x(Se){const xe=p[Se]||Se;return`${xe.charAt(0).toUpperCase()+xe.slice(1)} (${Se})`}for(const Se of typeof navigator<"u"?navigator.languages??[]:[]){const xe=El(Se);!xe||m.has(xe)||(m.add(xe),d.push({value:xe,label:`Preferred: ${x(xe)}`}))}for(const Se of Object.keys(p))m.has(Se)||(m.add(Se),d.push({value:Se,label:x(Se)}));const se=Sn.value.trim();return se&&!m.has(se)&&d.push({value:se,label:x(se)}),d}function El(d){const m=d.trim().toLowerCase();if(!m||m==="auto")return"";if(m in p)return m;const x=m.split("-")[0]??m;return x in p?x:""}function Qa(){const d=document.documentElement;if(qn.value==="dark")d.classList.add("dark");else if(qn.value==="light")d.classList.remove("dark");else{const m=window.matchMedia("(prefers-color-scheme: dark)").matches;d.classList.toggle("dark",m)}}function zh(){return typeof window>"u"?!1:window.localStorage.getItem(hf)==="1"}function Gh(d){typeof window>"u"||window.localStorage.setItem(hf,d?"1":"0")}function Kh(){if(typeof window>"u")return!0;const d=window.localStorage.getItem(mf);return d===null?!0:d==="1"}function Yh(){er.value=!er.value,!(typeof window>"u")&&window.localStorage.setItem(mf,er.value?"1":"0")}function Jh(d,m){const x=(d??"").trim();return x.length>0?x:m.trim()||"message"}function wc(d){G(d)}async function Qh(){await te.isReady(),V.name==="thread"&&br.value&&D(br.value),await _e({includeSelectedThreadMessages:V.name==="thread"}),as({silent:!0}),await Sh(),hr.value=!0,await Il(),De()}async function Il(){if(Dr.value){Sr=!0;return}Dr.value=!0;try{do{if(Sr=!1,V.name==="home"||V.name==="skills"){F.value!==""&&await Ke("");continue}if(V.name==="thread"){const d=br.value;if(!d)continue;F.value!==d?await Ke(d):Ve(d,{silent:!0})}}while(Sr)}finally{Dr.value=!1}}it(()=>[V.name,br.value,Y.value,F.value],async()=>{hr.value&&await Il()}),it(()=>F.value,async d=>{if(hr.value&&!Dr.value&&!(tn.value||mo.value)){if(!d){V.name!=="home"&&await te.replace({name:"home"});return}V.name==="thread"&&br.value===d||await te.replace({name:"thread",params:{threadId:d}})}}),it(()=>bn.value,()=>{kn.value&&kl()}),it(()=>kn.value,d=>{if(!d){Pt.value=[];return}kl()}),it(()=>[hr.value,V.name,F.value],([d,m,x])=>{d&&m==="thread"&&x&&Ve(x,{silent:!0})}),it(()=>js.value,d=>{if(d.length===0){et.value="";return}d.some(x=>x.value===et.value)||(et.value=d[0].value),bo()},{immediate:!0}),it(()=>et.value,()=>{Xt.value={phase:"idle",title:"",message:""},bo()}),it(()=>[$t.value,et.value],([d,m])=>{d==="worktree"&&bc(m)},{immediate:!0}),it(()=>$t.value,d=>{var m;if(d==="local"){Xt.value={phase:"idle",title:"",message:""};const x=et.value.trim();if(x&&Ba(x)){const se=((m=T.value)==null?void 0:m.projectName)??Wo(x),Se=is(se,"");Se&&(et.value=Se)}return}bc(et.value)}),it(()=>V.name,d=>{d!=="home"&&(Xt.value={phase:"idle",title:"",message:""}),d!=="thread"&&(sn.value=!1)}),it(()=>F.value,()=>{Xt.value={phase:"idle",title:"",message:""}}),it(()=>[V.name,$n.value],([d,m])=>{if(d!=="thread"){kr.value=[],tr.value=null;return}zs(m)},{immediate:!0}),it(Wi,d=>{typeof document>"u"||(document.title=d)},{immediate:!0}),it(be,d=>{d&&!ct.value&&R(!0)},{immediate:!0});async function Xh(d,m=[],x=[],se=[]){try{Xt.value={phase:"idle",title:"",message:""};let Se=et.value;if($t.value==="worktree"){Xt.value={phase:"running",title:"Creating worktree",message:"Creating a worktree and running setup."};try{const nt=await lb(et.value,Tn.value);Se=nt.cwd,et.value=nt.cwd,Xt.value={phase:"idle",title:"",message:""}}catch{Xt.value={phase:"error",title:"Worktree setup failed",message:"Unable to create worktree. Try again or switch to Local project."};return}}const xe=await Pe(d,Se,m,x,se);if(!xe)return;await te.replace({name:"thread",params:{threadId:xe}}),jo()}catch{}}async function bc(d){var x;const m=d.trim();if(!m){mr.value=[],Tn.value="";return}Qt.value=!0;try{const se=await ub(m);mr.value=se;const Se=Tn.value.trim();if(!(Se.length>0&&se.some(nt=>nt.value===Se))){const nt=se.find(On=>On.value.trim()==="main");Tn.value=(nt==null?void 0:nt.value)??((x=se[0])==null?void 0:x.value)??""}}catch{mr.value=[],Tn.value=""}finally{Qt.value=!1}}return(d,m)=>(S(),ot(Yy,{"is-sidebar-collapsed":ct.value,onCloseSidebar:m[26]||(m[26]=x=>R(!0))},{sidebar:Tt(()=>[v("section",o1,[v("div",s1,[ct.value?ie("",!0):(S(),ot(rf,{key:0,class:"sidebar-thread-controls-host","is-sidebar-collapsed":ct.value,"show-new-thread-button":!0,onToggleSidebar:m[0]||(m[0]=x=>R(!ct.value)),onStartNewThread:qa},{default:Tt(()=>[v("button",{class:"sidebar-search-toggle",type:"button","aria-pressed":dn.value,"aria-label":"Search threads",title:"Search threads",onClick:jr},[Be(of,{class:"sidebar-search-toggle-icon"})],8,a1)]),_:1},8,["is-sidebar-collapsed"])),!ct.value&&dn.value?(S(),O("div",i1,[Be(of,{class:"sidebar-search-bar-icon"}),nn(v("input",{ref_key:"sidebarSearchInputRef",ref:Lr,"onUpdate:modelValue":m[1]||(m[1]=x=>Bt.value=x),class:"sidebar-search-input",type:"text",placeholder:"Filter threads...",onKeydown:Hs},null,544),[[wn,Bt.value]]),Bt.value.length>0?(S(),O("button",{key:0,class:"sidebar-search-clear",type:"button","aria-label":"Clear search",onClick:ul},[Be(bx,{class:"sidebar-search-clear-icon"})])):ie("",!0)])):ie("",!0),ct.value?ie("",!0):(S(),O("button",{key:2,class:rt(["sidebar-skills-link",{"is-active":mo.value}]),type:"button",onClick:m[2]||(m[2]=x=>{Re(te).push({name:"skills"}),Re(be)&&R(!0)})}," Skills Hub ",2)),ct.value?ie("",!0):(S(),ot(OT,{key:3,groups:Re(f),"project-display-name-by-id":Re(g),"selected-thread-id":Re(F),"is-loading":Re(Y),"search-query":Bt.value,"search-matched-thread-ids":fn.value,onSelect:cl,onArchive:Cr,onStartNewThread:Ua,onRenameProject:Ha,onBrowseThreadFiles:bl,onRenameThread:Tl,onForkThread:wl,onRemoveProject:_l,onReorderProject:a,onExportThread:dl},null,8,["groups","project-display-name-by-id","selected-thread-id","is-loading","search-query","search-matched-thread-ids"]))]),ct.value?ie("",!0):(S(),O("div",{key:0,ref_key:"settingsAreaRef",ref:_n,class:"sidebar-settings-area",onClick:Ae},[Be(Lp,{name:"settings-panel"},{default:Tt(()=>[on.value?(S(),O("div",{key:0,ref_key:"settingsPanelRef",ref:Bn,class:"sidebar-settings-panel",onClick:m[15]||(m[15]=lt(()=>{},["stop"]))},[v("div",l1,[v("div",u1,[v("div",c1,[v("button",{class:"sidebar-settings-account-collapse",type:"button","aria-expanded":!er.value,title:er.value?"Expand accounts":"Collapse accounts",onClick:Yh},[v("span",f1,ae(er.value?"▸":"▾"),1)],8,d1),m[27]||(m[27]=v("span",{class:"sidebar-settings-account-title"},"Accounts",-1)),v("span",p1,ae(hn.value.length),1)]),v("button",{class:"sidebar-settings-account-refresh",type:"button",disabled:Zt.value||mn.value,onClick:gl},ae(Zt.value?"Reloading…":"Reload"),9,h1)]),er.value?ie("",!0):(S(),O(qe,{key:0},[gn.value?(S(),O("p",m1,ae(gn.value),1)):ie("",!0),hn.value.length===0?(S(),O("p",v1," Run `codex login`, then click reload. ")):(S(),O("div",g1,[(S(!0),O(qe,null,Ot(hn.value,x=>(S(),O("article",{key:x.accountId,class:rt(["sidebar-settings-account-item",{"is-active":x.isActive,"is-unavailable":Do(x),"is-confirming-remove":rs(x),"is-remove-visible":Vs(x)}]),title:vl(x),onMouseenter:se=>ja(x.accountId),onMouseleave:se=>hl(x.accountId)},[v("div",w1,[v("p",b1,ae(x.email||"Account"),1),v("p",T1,ae(Da(x)),1),v("p",_1,ae(Fa(x)),1),v("p",S1," Workspace "+ae(fl(x.accountId)),1)]),v("div",k1,[v("button",{class:"sidebar-settings-account-switch",type:"button",disabled:Na(x)||x.isActive||Do(x),onClick:se=>yl(x.accountId)},ae(pl(x)),9,x1),v("button",{class:rt(["sidebar-settings-account-remove",{"is-visible":Vs(x),"is-confirming":rs(x)}]),type:"button",disabled:Na(x),onClick:se=>Ws(x.accountId)},ae(os(x)),11,C1)])],42,y1))),128))]))],64))]),v("button",{class:"sidebar-settings-row",type:"button",title:l.sendWithEnter,onClick:Oh},[m[28]||(m[28]=v("span",{class:"sidebar-settings-label"},"Require ⌘ + enter to send",-1)),v("span",{class:rt(["sidebar-settings-toggle",{"is-on":!Nt.value}])},null,2)],8,A1),v("button",{class:"sidebar-settings-row",type:"button",title:l.inProgressSendMode,onClick:Dh},[m[29]||(m[29]=v("span",{class:"sidebar-settings-label"},"When busy, send as",-1)),v("span",I1,ae(nr.value==="steer"?"Steer":"Queue"),1)],8,E1),v("button",{class:"sidebar-settings-row",type:"button",title:l.appearance,onClick:Lh},[m[30]||(m[30]=v("span",{class:"sidebar-settings-label"},"Appearance",-1)),v("span",R1,ae(qn.value==="system"?"System":qn.value==="dark"?"Dark":"Light"),1)],8,M1),v("button",{class:"sidebar-settings-row",type:"button",title:l.chatWidth,onClick:Nh},[m[31]||(m[31]=v("span",{class:"sidebar-settings-label"},"Chat width",-1)),v("span",$1,ae(ol.value),1)],8,P1),v("button",{class:"sidebar-settings-row",type:"button",title:l.dictationClickToToggle,onClick:jh},[m[32]||(m[32]=v("span",{class:"sidebar-settings-label"},"Click to toggle dictation",-1)),v("span",{class:rt(["sidebar-settings-toggle",{"is-on":Yt.value}])},null,2)],8,O1),v("button",{class:"sidebar-settings-row",type:"button",title:l.dictationAutoSend,onClick:Fh},[m[33]||(m[33]=v("span",{class:"sidebar-settings-label"},"Auto send dictation",-1)),v("span",{class:rt(["sidebar-settings-toggle",{"is-on":Ct.value}])},null,2)],8,D1),v("button",{class:"sidebar-settings-row",type:"button",title:l.githubTrendingProjects,onClick:Bh},[m[34]||(m[34]=v("span",{class:"sidebar-settings-label"},"GitHub trending projects",-1)),v("span",{class:rt(["sidebar-settings-toggle",{"is-on":kn.value}])},null,2)],8,L1),v("div",N1,[m[36]||(m[36]=v("span",{class:"sidebar-settings-label"},"Provider",-1)),v("select",{class:"sidebar-settings-provider-select",value:an.value,disabled:Vn.value,onChange:m[3]||(m[3]=x=>Uh(x.target.value))},[...m[35]||(m[35]=[v("option",{value:"codex"},"Codex",-1),v("option",{value:"openrouter"},"OpenRouter",-1),v("option",{value:"opencode-zen"},"OpenCode Zen",-1),v("option",{value:"custom"},"Custom endpoint",-1)])],40,j1)]),xn.value?(S(),O("div",F1,ae(xn.value),1)):ie("",!0),an.value==="openrouter"?(S(),O("div",B1,[m[38]||(m[38]=v("div",{class:"sidebar-settings-provider-info"},[v("span",{class:"sidebar-settings-label"},"OpenRouter API key"),v("a",{class:"sidebar-settings-provider-link",href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer"},"Get API key")],-1)),v("div",U1,[At.value&&!qt.value?(S(),O(qe,{key:0},[v("span",q1,ae(It.value),1),v("button",{class:"sidebar-settings-key-clear",type:"button",disabled:ht.value,title:"Remove custom key, use community keys",onClick:qh},"✕",8,H1)],64)):(S(),O(qe,{key:1},[nn(v("input",{"onUpdate:modelValue":m[4]||(m[4]=x=>qt.value=x),class:"sidebar-settings-key-input",type:"password",placeholder:"sk-or-v1-... (optional, uses free keys if empty)",onKeydown:zt(yc,["enter"])},null,544),[[wn,qt.value]]),v("button",{class:"sidebar-settings-key-save",type:"button",disabled:ht.value||!qt.value.trim(),onClick:yc},ae(ht.value?"...":"Set"),9,V1)],64))]),v("div",W1,[m[37]||(m[37]=v("span",{class:"sidebar-settings-label"},"API format",-1)),v("div",z1,[v("button",{type:"button",class:rt(["sidebar-settings-segmented-option",{"is-active":en.value==="responses"}]),disabled:ht.value||Vn.value,onClick:m[5]||(m[5]=x=>vc("responses"))}," Responses ",10,G1),v("button",{type:"button",class:rt(["sidebar-settings-segmented-option",{"is-active":en.value==="chat"}]),disabled:ht.value||Vn.value,onClick:m[6]||(m[6]=x=>vc("chat"))}," Completions ",10,K1)])])])):ie("",!0),an.value==="opencode-zen"?(S(),O("div",Y1,[m[39]||(m[39]=v("div",{class:"sidebar-settings-provider-info"},[v("span",{class:"sidebar-settings-label"},"OpenCode Zen API key"),v("a",{class:"sidebar-settings-provider-link",href:"https://opencode.ai/auth",target:"_blank",rel:"noopener noreferrer"},"Get API key")],-1)),v("div",J1,[nn(v("input",{"onUpdate:modelValue":m[7]||(m[7]=x=>Rn.value=x),class:"sidebar-settings-key-input",type:"password",placeholder:"sk-...",onKeydown:zt(gc,["enter"])},null,544),[[wn,Rn.value]]),v("button",{class:"sidebar-settings-key-save",type:"button",disabled:ht.value||!Rn.value.trim(),onClick:gc},ae(ht.value?"...":"Save"),9,Q1)])])):ie("",!0),an.value==="custom"?(S(),O("div",X1,[m[41]||(m[41]=v("span",{class:"sidebar-settings-label"},"Custom endpoint URL",-1)),v("div",Z1,[nn(v("input",{"onUpdate:modelValue":m[8]||(m[8]=x=>Wn.value=x),class:"sidebar-settings-key-input",type:"url",placeholder:"https://api.example.com/v1",onKeydown:zt(Cl,["enter"])},null,544),[[wn,Wn.value]])]),m[42]||(m[42]=v("span",{class:"sidebar-settings-label",style:{"margin-top":"4px"}},"API key",-1)),v("div",eC,[nn(v("input",{"onUpdate:modelValue":m[9]||(m[9]=x=>cr.value=x),class:"sidebar-settings-key-input",type:"password",placeholder:"Bearer token (optional)",onKeydown:zt(Cl,["enter"])},null,544),[[wn,cr.value]]),v("button",{class:"sidebar-settings-key-save",type:"button",disabled:ht.value||!Wn.value.trim(),onClick:Cl},ae(ht.value?"...":"Save"),9,tC)]),v("div",nC,[m[40]||(m[40]=v("span",{class:"sidebar-settings-label"},"API format",-1)),v("div",rC,[v("button",{type:"button",class:rt(["sidebar-settings-segmented-option",{"is-active":zn.value==="responses"}]),onClick:m[10]||(m[10]=x=>zn.value="responses")}," Responses ",2),v("button",{type:"button",class:rt(["sidebar-settings-segmented-option",{"is-active":zn.value==="chat"}]),onClick:m[11]||(m[11]=x=>zn.value="chat")}," Completions ",2)])])])):ie("",!0),v("div",{class:"sidebar-settings-row sidebar-settings-row--select",title:l.dictationLanguage},[m[43]||(m[43]=v("span",{class:"sidebar-settings-label"},"Dictation language",-1)),Be(Ko,{class:"sidebar-settings-language-dropdown","model-value":Sn.value,options:ho.value,placeholder:"Auto-detect","open-direction":"up","enable-search":!0,"search-placeholder":"Search language...","onUpdate:modelValue":Hh},null,8,["model-value","options"])],8,oC),v("button",{class:"sidebar-settings-row",type:"button","aria-live":"polite",onClick:m[12]||(m[12]=x=>Nr.value=!Nr.value)},[m[44]||(m[44]=v("span",{class:"sidebar-settings-label"},"Telegram",-1)),v("span",sC,ae(al.value),1)]),Nr.value?(S(),O("div",aC,[v("label",iC,[m[45]||(m[45]=v("span",{class:"sidebar-settings-field-label"},"Bot token",-1)),nn(v("input",{"onUpdate:modelValue":m[13]||(m[13]=x=>dr.value=x),class:"sidebar-settings-input",type:"password",placeholder:"123456:ABCDEF",autocomplete:"off",spellcheck:"false"},null,512),[[wn,dr.value]])]),v("label",lC,[m[46]||(m[46]=v("span",{class:"sidebar-settings-field-label"},"Allowed Telegram user IDs",-1)),nn(v("textarea",{"onUpdate:modelValue":m[14]||(m[14]=x=>xr.value=x),class:"sidebar-settings-textarea",rows:"3",placeholder:`123456789
64
- 987654321`,spellcheck:"false"},null,512),[[wn,xr.value]])]),m[47]||(m[47]=v("div",{class:"sidebar-settings-field-help"}," Put one Telegram user ID per line or separate them with commas. Use `*` to allow all Telegram users. Unauthorized users will see their own ID in the rejection message so they can copy it here. ",-1)),Cn.value?(S(),O("div",uC,ae(Cn.value),1)):ie("",!0),v("div",cC,[v("button",{class:"sidebar-settings-telegram-save",type:"button",disabled:E.value,onClick:Oo},ae(E.value?"Saving…":"Save Telegram config"),9,dC)])])):ie("",!0),Ki.value?(S(),O("div",{key:5,class:"sidebar-settings-row sidebar-settings-context-row","data-state":Ia.value,title:Xi.value},[m[48]||(m[48]=v("span",{class:"sidebar-settings-label"},"Context",-1)),v("span",{class:"sidebar-settings-context-value","data-state":Ia.value},[so(ae(Ji.value)+" ",1),v("span",hC,ae(Qi.value),1)],8,pC)],8,fC)):ie("",!0),v("div",mC,[Be(Hk,{snapshots:Re(Ie)},null,8,["snapshots"])]),v("div",vC," WT "+ae(Re(s))+" · v"+ae(Re(i)),1)],512)):ie("",!0)]),_:1}),v("button",{ref_key:"settingsButtonRef",ref:Kr,class:"sidebar-settings-button",type:"button",onClick:m[16]||(m[16]=lt(x=>on.value=!on.value,["stop"]))},[Be(fx,{class:"sidebar-settings-icon"}),m[49]||(m[49]=v("span",null,"Settings",-1)),v("span",gC,ae(Re(s))+" · v"+ae(Re(i)),1)],512)],512))])]),content:Tt(()=>[v("section",{class:"content-root",style:oo(sl.value)},[Ds.value?(S(),O("span",yC)):ie("",!0),Be(BT,{title:Hi.value},{leading:Tt(()=>[ct.value||Re(be)?(S(),ot(rf,{key:0,class:"sidebar-thread-controls-header-host","is-sidebar-collapsed":ct.value,"show-new-thread-button":!0,onToggleSidebar:m[17]||(m[17]=x=>R(!ct.value)),onStartNewThread:qa},null,8,["is-sidebar-collapsed"])):ie("",!0)]),actions:Tt(()=>[zi.value?(S(),O("button",{key:0,class:"content-header-terminal-toggle",type:"button","aria-pressed":Gi.value,title:`Toggle terminal (${Oa.value})`,"aria-label":"Toggle terminal",onClick:K},[Be(vx,{class:"content-header-terminal-toggle-icon"}),v("span",bC,ae(Oa.value),1)],8,wC)):ie("",!0),Re(V).name==="thread"&&Re(F)?(S(),ot(Ko,{key:1,class:rt(["content-header-branch-dropdown",{"is-review-open":sn.value}]),"model-value":Zi.value,options:el.value,disabled:vr.value||gr.value,"enable-search":!0,"search-placeholder":"Search branches...","onUpdate:modelValue":Ga},null,8,["class","model-value","options","disabled"])):ie("",!0)]),_:1},8,["title"]),v("section",TC,[mo.value?(S(),ot(Re(o),{key:0,onSkillsChanged:il})):tn.value?(S(),O("div",_C,[v("div",SC,[m[56]||(m[56]=v("p",{class:"new-thread-hero"},"Let's build",-1)),Be(Ko,{class:"new-thread-folder-dropdown","model-value":et.value,options:js.value,placeholder:"Choose folder","enable-search":!0,"search-placeholder":"Quick search project",disabled:!1,"onUpdate:modelValue":Wa},null,8,["model-value","options"]),et.value?(S(),O("p",{key:0,class:"new-thread-folder-selected",title:et.value}," Selected folder: "+ae(et.value),9,kC)):ie("",!0),v("div",{class:"new-thread-folder-actions"},[v("button",{class:"new-thread-folder-action new-thread-folder-action-primary",type:"button",onClick:Ya}," Select folder "),v("button",{class:"new-thread-folder-action",type:"button",onClick:Ka}," Create Project ")]),(S(),ot(ws,{to:"body"},[jt.value?(S(),O("div",{key:0,class:"new-thread-open-folder-overlay",onClick:lt(We,["self"])},[v("div",{class:"new-thread-open-folder",role:"dialog","aria-modal":"true","aria-label":"Select folder",onKeydown:zt(lt(We,["prevent"]),["esc"])},[v("div",{class:"new-thread-open-folder-header"},[m[50]||(m[50]=v("p",{class:"new-thread-open-folder-title"},"Select folder",-1)),v("button",{class:"new-thread-open-folder-close",type:"button",onClick:We}," Cancel ")]),m[52]||(m[52]=v("p",{class:"new-thread-open-folder-label"},"Current folder",-1)),v("div",CC,[v("p",{class:"new-thread-open-folder-path",title:dt.value||"Unavailable"},ae(dt.value||"Unavailable"),9,AC),v("button",{class:"new-thread-folder-action new-thread-folder-action-primary",type:"button",disabled:!dt.value||!!Mt.value||Gn.value||y.value,onClick:m[18]||(m[18]=x=>lc())},ae(y.value?"Opening…":"Open"),9,EC)]),v("div",IC,[v("label",MC,[nn(v("input",{"onUpdate:modelValue":m[19]||(m[19]=x=>w.value=x),class:"new-thread-open-folder-toggle-input",type:"checkbox",onChange:Jr},null,544),[[Sg,w.value]]),m[51]||(m[51]=v("span",null,"Show hidden folders",-1))]),v("button",{class:rt(["new-thread-folder-action",{"new-thread-folder-action-primary":j.value}]),type:"button","aria-pressed":j.value,disabled:!dt.value||Gn.value||y.value||tt.value||!!Mt.value&&!j.value,onClick:_h}," New folder ",10,RC)]),j.value?(S(),O("div",PC,[v("div",$C,[nn(v("input",{ref_key:"createFolderInputRef",ref:pn,"onUpdate:modelValue":m[20]||(m[20]=x=>Z.value=x),class:"new-thread-open-folder-create-input",type:"text",placeholder:"Folder name",onKeydown:[zt(lt(uc,["prevent"]),["enter"]),zt(lt(Gs,["prevent"]),["esc"])]},null,40,OC),[[wn,Z.value]]),v("button",{class:"new-thread-folder-action new-thread-folder-action-primary new-thread-open-folder-create-submit",type:"button",disabled:!tl.value||tt.value,onClick:uc},ae(nl.value),9,DC)]),Ce.value?(S(),O("p",LC,ae(Ce.value),1)):ie("",!0)])):ie("",!0),nn(v("input",{ref_key:"existingFolderFilterInputRef",ref:Pn,"onUpdate:modelValue":m[21]||(m[21]=x=>C.value=x),class:"new-thread-open-folder-filter",type:"text",placeholder:"Filter folders...",onKeydown:zt(lt(We,["prevent"]),["esc"])},null,40,NC),[[wn,C.value]]),Mt.value?(S(),O("div",jC,[v("p",FC,ae(Mt.value),1),v("button",{class:"new-thread-folder-action",type:"button",disabled:Gn.value||y.value,onClick:Th}," Retry ",8,BC)])):ie("",!0),Gn.value?(S(),O("p",UC,"Loading folders…")):!Mt.value&&Us.value.length===0?(S(),O("p",qC,ae(C.value.trim()?"No folders match this filter.":"No subfolders found here."),1)):Us.value.length>0?(S(),O("ul",HC,[(S(!0),O(qe,null,Ot(Us.value,x=>(S(),O("li",{key:x.key,class:"new-thread-open-folder-item"},[v("button",{class:"new-thread-open-folder-item-main",type:"button",title:x.path,disabled:Gn.value||y.value,onClick:se=>ar(x.path)},[v("span",WC,ae(x.name),1)],8,VC),x.kind==="directory"?(S(),O("button",{key:0,class:"new-thread-open-folder-item-open",type:"button",disabled:Gn.value||y.value,onClick:se=>lc(x.path)}," Open ",8,zC)):ie("",!0)]))),128))])):ie("",!0)],40,xC)])):ie("",!0)])),Be(Kk,{class:"new-thread-runtime-dropdown",modelValue:$t.value,"onUpdate:modelValue":m[22]||(m[22]=x=>$t.value=x)},null,8,["modelValue"]),$t.value==="worktree"?(S(),O("div",GC,[m[53]||(m[53]=v("p",{class:"new-thread-branch-select-label"},"Base branch",-1)),Be(Ko,{class:"new-thread-branch-dropdown","model-value":Tn.value,options:Fs.value,placeholder:"Select branch","enable-search":!0,"search-placeholder":"Search branches...",disabled:Qt.value||Fs.value.length===0,"onUpdate:modelValue":za},null,8,["model-value","options","disabled"]),v("p",KC,ae(Qt.value?"Loading branches…":Ma.value?`New worktree branch will start from ${Ma.value}.`:"No Git branches found for this folder."),1)])):ie("",!0),m[57]||(m[57]=v("p",{class:"new-thread-runtime-help"},[v("code",null,"Local project"),so(" uses the selected folder directly. "),v("code",null,"New worktree"),so(" creates an isolated Git worktree before the first prompt. ")],-1)),Xt.value.phase!=="idle"?(S(),O("div",{key:2,class:rt(["worktree-init-status",{"is-running":Xt.value.phase==="running","is-error":Xt.value.phase==="error"}])},[v("strong",YC,ae(Xt.value.title),1),v("span",JC,ae(Xt.value.message),1)],2)):ie("",!0),kn.value?(S(),O("div",QC,[v("div",XC,[m[54]||(m[54]=v("p",{class:"new-thread-trending-title"},"Trending GitHub projects",-1)),Be(Ko,{class:"new-thread-trending-scope-dropdown","model-value":bn.value,options:rl.value,"onUpdate:modelValue":Va},null,8,["model-value","options"])]),Lt.value?(S(),O("p",ZC,"Loading trending projects...")):Pt.value.length===0?(S(),O("p",eA," Trending repos are unavailable right now. ")):(S(),O("div",tA,[(S(!0),O(qe,null,Ot(Pt.value,x=>(S(),O("button",{key:x.id,type:"button",class:"new-thread-trending-tip",onClick:se=>Lo(x)},[v("span",{class:"new-thread-trending-tip-name",title:x.fullName},[x.owner&&x.repo?(S(),O(qe,{key:0},[v("span",oA,ae(x.owner),1),m[55]||(m[55]=v("span",{class:"new-thread-trending-tip-name-slash"},"/",-1)),v("span",sA,ae(x.repo),1)],64)):(S(),O("span",aA,ae(x.fullName),1))],8,rA),v("span",iA,ae(ls(x)),1),v("span",lA,ae(x.description||"No description available."),1)],8,nA))),128))]))])):ie("",!0)]),v("div",uA,[at.value&&$n.value?(S(),ot(Re(n),{key:0,class:"content-thread-terminal-panel","thread-id":vo.value,cwd:$n.value,onHide:m[23]||(m[23]=x=>at.value=!1)},null,8,["thread-id","cwd"])):ie("",!0),Be(nf,{ref_key:"homeThreadComposerRef",ref:$e,"active-thread-id":vo.value,cwd:$n.value,"collaboration-modes":Re(z),"selected-collaboration-mode":Re(ue),models:Re(de),"selected-model":Ea.value,"selected-reasoning-effort":Re(we),"selected-speed-mode":Re(ke),"is-updating-speed-mode":Re(Te),skills:Re(me),"thread-token-usage":Re(k),"codex-quota":Re(P),"is-turn-in-progress":!1,"is-stop-pending":!1,"is-interrupting-turn":!1,"send-with-enter":Nt.value,"in-progress-submit-mode":nr.value,"dictation-click-to-toggle":Yt.value,"dictation-auto-send":Ct.value,"dictation-language":Sn.value,onSubmit:wo,"onUpdate:selectedCollaborationMode":wc,"onUpdate:selectedModel":pc,"onUpdate:selectedReasoningEffort":hc,"onUpdate:selectedSpeedMode":mc},null,8,["active-thread-id","cwd","collaboration-modes","selected-collaboration-mode","models","selected-model","selected-reasoning-effort","selected-speed-mode","is-updating-speed-mode","skills","thread-token-usage","codex-quota","send-with-enter","in-progress-submit-mode","dictation-click-to-toggle","dictation-auto-send","dictation-language"])])])):(S(),O("div",cA,[sn.value&&Re(F)&&$n.value?(S(),ot(Re(r),{key:0,"thread-id":Re(F),cwd:$n.value,"is-thread-in-progress":Ls.value,onClose:m[24]||(m[24]=x=>sn.value=!1)},null,8,["thread-id","cwd","is-thread-in-progress"])):(S(),O(qe,{key:1},[v("div",dA,[Be(Re(t),{ref_key:"threadConversationRef",ref:ut,messages:es.value,"is-loading":Re(ve),"active-thread-id":vo.value,cwd:$n.value,"scroll-state":Re(U),"live-overlay":Aa.value,"pending-requests":Re(X),onUpdateScrollState:u,onForkThread:I,onRollback:Ch,onRespondServerRequest:h},null,8,["messages","is-loading","active-thread-id","cwd","scroll-state","live-overlay","pending-requests"])]),v("div",fA,[Be(Ok,{messages:Re(_),onEdit:No,onSteer:Re(B),onDelete:Re(A)},null,8,["messages","onSteer","onDelete"]),Re(H)&&Re(F)&&$n.value?(S(),ot(Re(n),{key:0,class:"content-thread-terminal-panel","thread-id":Re(F),cwd:$n.value,onHide:m[25]||(m[25]=x=>Re(yt)(Re(F),!1))},null,8,["thread-id","cwd"])):ie("",!0),Os.value?(S(),ot(xk,{key:1,request:Os.value,"request-count":Re(X).length,"has-queue-above":Re(_).length>0,onRespondServerRequest:h},null,8,["request","request-count","has-queue-above"])):(S(),ot(nf,{key:2,ref_key:"threadComposerRef",ref:st,"active-thread-id":vo.value,cwd:$n.value,"collaboration-modes":Re(z),"selected-collaboration-mode":Re(ue),models:Re(de),"selected-model":Ea.value,"selected-reasoning-effort":Re(we),"selected-speed-mode":Re(ke),"is-updating-speed-mode":Re(Te),skills:Re(me),"thread-token-usage":Re(k),"codex-quota":Re(P),"is-turn-in-progress":Ls.value,"is-stop-pending":Re(Me),"is-interrupting-turn":Re(Le),"has-queue-above":Re(_).length>0,"send-with-enter":Nt.value,"in-progress-submit-mode":nr.value,"dictation-click-to-toggle":Yt.value,"dictation-auto-send":Ct.value,"dictation-language":Sn.value,"onUpdate:selectedCollaborationMode":wc,onSubmit:wo,"onUpdate:selectedModel":pc,"onUpdate:selectedReasoningEffort":hc,"onUpdate:selectedSpeedMode":mc,onInterrupt:xh},null,8,["active-thread-id","cwd","collaboration-modes","selected-collaboration-mode","models","selected-model","selected-reasoning-effort","selected-speed-mode","is-updating-speed-mode","skills","thread-token-usage","codex-quota","is-turn-in-progress","is-stop-pending","is-interrupting-turn","has-queue-above","send-with-enter","in-progress-submit-mode","dictation-click-to-toggle","dictation-auto-send","dictation-language"]))])],64))]))])],4)]),_:1},8,["is-sidebar-collapsed"]))}}),mA=mt(hA,[["__scopeId","data-v-e4622052"]]),lu={render:()=>null},vA=Uy({history:wy(),routes:[{path:"/",name:"home",component:lu},{path:"/thread/:threadId",name:"thread",component:lu},{path:"/skills",name:"skills",component:lu},{path:"/new-thread",redirect:{name:"home"}},{path:"/:pathMatch(.*)*",redirect:{name:"home"}}]});console.log("Welcome to codexui. github: https://github.com/friuns2/codexUI");Mg(mA).use(vA).mount("#app");"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(e=>{console.error("Service worker registration failed.",e)})});export{oi as A,Bw as B,wA as C,yA as D,bA as E,qe as F,TA as G,nn as H,ki as I,kg as J,_A as K,kA as L,xA as M,gA as N,SA as O,ic as P,ws as Q,Ob as R,of as S,Lp as T,wn as U,zt as V,mt as _,v as a,$o as b,O as c,In as d,Xo as e,ie as f,Ot as g,rt as h,ot as i,Tt as j,Ku as k,oo as l,Be as m,Gt as n,S as o,mi as p,zT as q,M as r,bx as s,ae as t,rc as u,lt as v,it as w,Re as x,so as y,re as z};